| 1 |
- {"version":3,"file":"unit.entry.js","sources":["webpack:///webpack/bootstrap 540a2f02cd324e3ffc29","webpack:///src/helpers/dom/element.js","webpack:///src/helpers/array.js","webpack:///src/helpers/object.js","webpack:///./~/core-js/modules/_export.js","webpack:///src/eventManager.js","webpack:///src/helpers/number.js","webpack:///src/plugins.js","webpack:///src/helpers/dom/event.js","webpack:///src/pluginHooks.js","webpack:///./~/core-js/modules/_wks.js","webpack:///src/3rdparty/walkontable/src/index.js","webpack:///src/plugins/_base.js","webpack:///./~/core-js/modules/_global.js","webpack:///src/editors.js","webpack:///src/helpers/unicode.js","webpack:///./~/core-js/modules/_is-object.js","webpack:///src/helpers/mixed.js","webpack:///src/helpers/string.js","webpack:///src/plugins/contextMenu/utils.js","webpack:///src/renderers.js","webpack:///./~/core-js/modules/_an-object.js","webpack:///./~/core-js/modules/_object-dp.js","webpack:///./~/core-js/modules/_descriptors.js","webpack:///./~/core-js/modules/_has.js","webpack:///./~/core-js/modules/_to-iobject.js","webpack:///./~/core-js/modules/_to-length.js","webpack:///src/3rdparty/walkontable/src/overlay/_base.js","webpack:///src/helpers/browser.js","webpack:///src/helpers/feature.js","webpack:///src/helpers/function.js","webpack:///./~/core-js/modules/_ctx.js","webpack:///./~/core-js/modules/_defined.js","webpack:///./~/core-js/modules/_fails.js","webpack:///./~/core-js/modules/_hide.js","webpack:///./~/core-js/modules/_redefine.js","webpack:///./~/core-js/modules/_add-to-unscopables.js","webpack:///./~/core-js/modules/_cof.js","webpack:///./~/core-js/modules/_object-keys.js","webpack:///./~/core-js/modules/_property-desc.js","webpack:///./~/core-js/modules/_to-object.js","webpack:///src/3rdparty/walkontable/src/cell/coords.js","webpack:///src/editors/_baseEditor.js","webpack:///src/editors/textEditor.js","webpack:///./~/core-js/modules/_core.js","webpack:///./~/core-js/modules/_iterators.js","webpack:///./~/core-js/modules/_meta.js","webpack:///./~/core-js/modules/_object-pie.js","webpack:///./~/core-js/modules/_set-to-string-tag.js","webpack:///./~/core-js/modules/_uid.js","webpack:///./~/moment/moment.js","webpack:///src/helpers/data.js","webpack:///src/plugins/contextMenu/predefinedItems.js","webpack:///./~/core-js/modules/_an-instance.js","webpack:///./~/core-js/modules/_array-methods.js","webpack:///./~/core-js/modules/_collection.js","webpack:///./~/core-js/modules/_fix-re-wks.js","webpack:///./~/core-js/modules/_for-of.js","webpack:///./~/core-js/modules/_library.js","webpack:///./~/core-js/modules/_object-gops.js","webpack:///./~/core-js/modules/_redefine-all.js","webpack:///./~/core-js/modules/_to-index.js","webpack:///./~/core-js/modules/_to-integer.js","webpack:///src/3rdparty/walkontable/src/cell/range.js","webpack:///src/cellTypes.js","webpack:///src/core.js","webpack:///src/helpers/date.js","webpack:///src/helpers/setting.js","webpack:///src/mixins/localHooks.js","webpack:///src/plugins/contextMenu/predefinedItems/separator.js","webpack:///src/utils/ghostTable.js","webpack:///src/utils/recordTranslator.js","webpack:///src/utils/samplesGenerator.js","webpack:///./~/core-js/modules/_a-function.js","webpack:///./~/core-js/modules/_create-property.js","webpack:///./~/core-js/modules/_dom-create.js","webpack:///./~/core-js/modules/_enum-bug-keys.js","webpack:///./~/core-js/modules/_fails-is-regexp.js","webpack:///./~/core-js/modules/_iobject.js","webpack:///./~/core-js/modules/_iter-detect.js","webpack:///./~/core-js/modules/_object-create.js","webpack:///./~/core-js/modules/_object-gopd.js","webpack:///./~/core-js/modules/_object-gopn.js","webpack:///./~/core-js/modules/_shared-key.js","webpack:///./~/core-js/modules/_shared.js","webpack:///./~/core-js/modules/_string-context.js","webpack:///./~/core-js/modules/_task.js","webpack:///./~/core-js/modules/_to-primitive.js","webpack:///./~/core-js/modules/es6.array.iterator.js","webpack:///./~/numbro/numbro.js","webpack:///lib/SheetClip/SheetClip.js","webpack:///lib/jsonpatch/json-patch-duplex.js","webpack:///src/3rdparty/walkontable/src/border.js","webpack:///src/3rdparty/walkontable/src/calculator/viewportColumns.js","webpack:///src/3rdparty/walkontable/src/calculator/viewportRows.js","webpack:///src/3rdparty/walkontable/src/core.js","webpack:///src/3rdparty/walkontable/src/event.js","webpack:///src/3rdparty/walkontable/src/filter/column.js","webpack:///src/3rdparty/walkontable/src/filter/row.js","webpack:///src/3rdparty/walkontable/src/overlays.js","webpack:///src/3rdparty/walkontable/src/scroll.js","webpack:///src/3rdparty/walkontable/src/settings.js","webpack:///src/3rdparty/walkontable/src/table.js","webpack:///src/3rdparty/walkontable/src/tableRenderer.js","webpack:///src/3rdparty/walkontable/src/viewport.js","webpack:///src/defaultSettings.js","webpack:///src/editors/autocompleteEditor.js","webpack:///src/editors/handsontableEditor.js","webpack:///src/mixins/arrayMapper.js","webpack:///src/multiMap.js","webpack:///src/plugins/contextMenu/cursor.js","webpack:///src/plugins/manualColumnMove/columnsMapper.js","webpack:///src/plugins/manualColumnMove/ui/_base.js","webpack:///src/plugins/manualRowMove/rowsMapper.js","webpack:///src/plugins/manualRowMove/ui/_base.js","webpack:///src/utils/dataStructures/linkedList.js","webpack:///src/utils/interval.js","webpack:///src/utils/sortingAlgorithms/mergeSort.js","webpack:///./~/core-js/modules/_array-includes.js","webpack:///./~/core-js/modules/_classof.js","webpack:///./~/core-js/modules/_collection-strong.js","webpack:///./~/core-js/modules/_collection-weak.js","webpack:///./~/core-js/modules/_html.js","webpack:///./~/core-js/modules/_ie8-dom-define.js","webpack:///./~/core-js/modules/_is-array-iter.js","webpack:///./~/core-js/modules/_is-array.js","webpack:///./~/core-js/modules/_is-integer.js","webpack:///./~/core-js/modules/_is-regexp.js","webpack:///./~/core-js/modules/_iter-call.js","webpack:///./~/core-js/modules/_iter-define.js","webpack:///./~/core-js/modules/_iter-step.js","webpack:///./~/core-js/modules/_object-assign.js","webpack:///./~/core-js/modules/_object-keys-internal.js","webpack:///./~/core-js/modules/_object-to-array.js","webpack:///./~/core-js/modules/_set-proto.js","webpack:///./~/core-js/modules/_set-species.js","webpack:///./~/core-js/modules/_string-pad.js","webpack:///./~/core-js/modules/_string-repeat.js","webpack:///./~/core-js/modules/_wks-ext.js","webpack:///./~/core-js/modules/core.get-iterator-method.js","webpack:///./~/core-js/modules/es6.array.copy-within.js","webpack:///./~/core-js/modules/es6.array.fill.js","webpack:///./~/core-js/modules/es6.array.find-index.js","webpack:///./~/core-js/modules/es6.array.find.js","webpack:///./~/core-js/modules/es6.array.from.js","webpack:///./~/core-js/modules/es6.array.of.js","webpack:///./~/core-js/modules/es6.function.name.js","webpack:///./~/core-js/modules/es6.map.js","webpack:///./~/core-js/modules/es6.number.epsilon.js","webpack:///./~/core-js/modules/es6.number.is-finite.js","webpack:///./~/core-js/modules/es6.number.is-integer.js","webpack:///./~/core-js/modules/es6.number.is-nan.js","webpack:///./~/core-js/modules/es6.number.is-safe-integer.js","webpack:///./~/core-js/modules/es6.number.max-safe-integer.js","webpack:///./~/core-js/modules/es6.number.min-safe-integer.js","webpack:///./~/core-js/modules/es6.object.assign.js","webpack:///./~/core-js/modules/es6.object.is.js","webpack:///./~/core-js/modules/es6.object.set-prototype-of.js","webpack:///./~/core-js/modules/es6.promise.js","webpack:///./~/core-js/modules/es6.regexp.flags.js","webpack:///./~/core-js/modules/es6.regexp.match.js","webpack:///./~/core-js/modules/es6.regexp.replace.js","webpack:///./~/core-js/modules/es6.regexp.search.js","webpack:///./~/core-js/modules/es6.regexp.split.js","webpack:///./~/core-js/modules/es6.set.js","webpack:///./~/core-js/modules/es6.string.code-point-at.js","webpack:///./~/core-js/modules/es6.string.ends-with.js","webpack:///./~/core-js/modules/es6.string.from-code-point.js","webpack:///./~/core-js/modules/es6.string.includes.js","webpack:///./~/core-js/modules/es6.string.raw.js","webpack:///./~/core-js/modules/es6.string.repeat.js","webpack:///./~/core-js/modules/es6.string.starts-with.js","webpack:///./~/core-js/modules/es6.symbol.js","webpack:///./~/core-js/modules/es6.weak-map.js","webpack:///./~/core-js/modules/es6.weak-set.js","webpack:///./~/core-js/modules/es7.array.includes.js","webpack:///./~/core-js/modules/es7.object.entries.js","webpack:///./~/core-js/modules/es7.object.get-own-property-descriptors.js","webpack:///./~/core-js/modules/es7.object.values.js","webpack:///./~/core-js/modules/es7.string.pad-end.js","webpack:///./~/core-js/modules/es7.string.pad-start.js","webpack:///./~/core-js/modules/web.dom.iterable.js","webpack:///./~/core-js/modules/web.immediate.js","webpack:///./~/process/browser.js","webpack:///./src/plugins \\.unit\\.js$","webpack:///./test/unit \\.spec\\.js$","webpack:///lib/autoResize/autoResize.js","webpack:///lib/copyPaste/copyPaste.js","webpack:///src/3rdparty/walkontable/src/overlay/debug.js","webpack:///src/3rdparty/walkontable/src/overlay/left.js","webpack:///src/3rdparty/walkontable/src/overlay/top.js","webpack:///src/3rdparty/walkontable/src/overlay/topLeftCorner.js","webpack:///src/3rdparty/walkontable/src/selection.js","webpack:///src/dataMap.js","webpack:///src/dataSource.js","webpack:///src/editorManager.js","webpack:///src/editors/checkboxEditor.js","webpack:///src/editors/dateEditor.js","webpack:///src/editors/dropdownEditor.js","webpack:///src/editors/mobileTextEditor.js","webpack:///src/editors/numericEditor.js","webpack:///src/editors/passwordEditor.js","webpack:///src/editors/selectEditor.js","webpack:///src/helpers/wrappers/jquery.js","webpack:///src/index.js","webpack:///src/plugins/autoColumnSize/autoColumnSize.js","webpack:///src/plugins/autoRowSize/autoRowSize.js","webpack:///src/plugins/autofill/autofill.js","webpack:///src/plugins/autofill/utils.js","webpack:///src/plugins/columnSorting/columnSorting.js","webpack:///src/plugins/comments/commentEditor.js","webpack:///src/plugins/comments/comments.js","webpack:///src/plugins/contextMenu/commandExecutor.js","webpack:///src/plugins/contextMenu/contextMenu.js","webpack:///src/plugins/contextMenu/itemsFactory.js","webpack:///src/plugins/contextMenu/menu.js","webpack:///src/plugins/contextMenu/predefinedItems/alignment.js","webpack:///src/plugins/contextMenu/predefinedItems/clearColumn.js","webpack:///src/plugins/contextMenu/predefinedItems/columnLeft.js","webpack:///src/plugins/contextMenu/predefinedItems/columnRight.js","webpack:///src/plugins/contextMenu/predefinedItems/readOnly.js","webpack:///src/plugins/contextMenu/predefinedItems/redo.js","webpack:///src/plugins/contextMenu/predefinedItems/removeColumn.js","webpack:///src/plugins/contextMenu/predefinedItems/removeRow.js","webpack:///src/plugins/contextMenu/predefinedItems/rowAbove.js","webpack:///src/plugins/contextMenu/predefinedItems/rowBelow.js","webpack:///src/plugins/contextMenu/predefinedItems/undo.js","webpack:///src/plugins/contextMenu/test/cursor.unit.js","webpack:///src/plugins/contextMenuCopyPaste/contextMenuCopyPaste.js","webpack:///src/plugins/copyPaste/copyPaste.js","webpack:///src/plugins/customBorders/customBorders.js","webpack:///src/plugins/dragToScroll/dragToScroll.js","webpack:///src/plugins/index.js","webpack:///src/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js","webpack:///src/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js","webpack:///src/plugins/manualColumnFreeze/manualColumnFreeze.js","webpack:///src/plugins/manualColumnMove/manualColumnMove.js","webpack:///src/plugins/manualColumnMove/test/columnsMapper.unit.js","webpack:///src/plugins/manualColumnMove/ui/backlight.js","webpack:///src/plugins/manualColumnMove/ui/guideline.js","webpack:///src/plugins/manualColumnResize/manualColumnResize.js","webpack:///src/plugins/manualRowMove/manualRowMove.js","webpack:///src/plugins/manualRowMove/test/rowsMapper.unit.js","webpack:///src/plugins/manualRowMove/ui/backlight.js","webpack:///src/plugins/manualRowMove/ui/guideline.js","webpack:///src/plugins/manualRowResize/manualRowResize.js","webpack:///src/plugins/mergeCells/mergeCells.js","webpack:///src/plugins/multipleSelectionHandles/multipleSelectionHandles.js","webpack:///src/plugins/observeChanges/dataObserver.js","webpack:///src/plugins/observeChanges/observeChanges.js","webpack:///src/plugins/observeChanges/utils.js","webpack:///src/plugins/persistentState/persistentState.js","webpack:///src/plugins/search/search.js","webpack:///src/plugins/touchScroll/touchScroll.js","webpack:///src/plugins/undoRedo/undoRedo.js","webpack:///src/renderers/_cellDecorator.js","webpack:///src/renderers/autocompleteRenderer.js","webpack:///src/renderers/checkboxRenderer.js","webpack:///src/renderers/htmlRenderer.js","webpack:///src/renderers/numericRenderer.js","webpack:///src/renderers/passwordRenderer.js","webpack:///src/renderers/textRenderer.js","webpack:///src/tableView.js","webpack:///src/validators/autocompleteValidator.js","webpack:///src/validators/dateValidator.js","webpack:///src/validators/numericValidator.js","webpack:///src/validators/timeValidator.js","webpack:///test/unit/EventManager.spec.js","webpack:///test/unit/PluginHooks.spec.js","webpack:///test/unit/helpers/Array.spec.js","webpack:///test/unit/helpers/Data.spec.js","webpack:///test/unit/helpers/Date.spec.js","webpack:///test/unit/helpers/Feature.spec.js","webpack:///test/unit/helpers/Function.spec.js","webpack:///test/unit/helpers/Mixed.spec.js","webpack:///test/unit/helpers/Number.spec.js","webpack:///test/unit/helpers/Object.spec.js","webpack:///test/unit/helpers/String.spec.js","webpack:///test/unit/helpers/Unicode.spec.js","webpack:///test/unit/helpers/dom/Element.spec.js","webpack:///test/unit/helpers/dom/Event.spec.js","webpack:///test/unit/index.js","webpack:///test/unit/mixins/localHooks.spec.js","webpack:///test/unit/multiMap.spec.js","webpack:///test/unit/utils/Interval.spec.js","webpack:///test/unit/utils/dataStructures/LinkedList.spec.js","webpack:///test/unit/utils/recordTranslator.spec.js","webpack:///test/unit/utils/samplesGenerator.spec.js","webpack:///test/unit/utils/sortingAlgorithms/mergeSort.spec.js","webpack:///./~/core-js/modules/_array-copy-within.js","webpack:///./~/core-js/modules/_array-fill.js","webpack:///./~/core-js/modules/_array-species-constructor.js","webpack:///./~/core-js/modules/_array-species-create.js","webpack:///./~/core-js/modules/_enum-keys.js","webpack:///./~/core-js/modules/_flags.js","webpack:///./~/core-js/modules/_inherit-if-required.js","webpack:///./~/core-js/modules/_invoke.js","webpack:///./~/core-js/modules/_iter-create.js","webpack:///./~/core-js/modules/_keyof.js","webpack:///./~/core-js/modules/_microtask.js","webpack:///./~/core-js/modules/_object-dps.js","webpack:///./~/core-js/modules/_object-gopn-ext.js","webpack:///./~/core-js/modules/_object-gpo.js","webpack:///./~/core-js/modules/_own-keys.js","webpack:///./~/core-js/modules/_same-value.js","webpack:///./~/core-js/modules/_species-constructor.js","webpack:///./~/core-js/modules/_string-at.js","webpack:///./~/core-js/modules/_wks-define.js","webpack:///./~/moment/locale ^\\.\\/.*$","webpack:///./~/pikaday/pikaday.js","webpack:///(webpack)/buildin/module.js","webpack:///./~/zeroclipboard/dist/ZeroClipboard.js"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 408);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 540a2f02cd324e3ffc29","import {isIE8, isIE9, isSafari} from '../browser';\nimport {hasCaptionProblem} from '../feature';\n\n/**\n * Get the parent of the specified node in the DOM tree.\n *\n * @param {HTMLElement} element Element from which traversing is started.\n * @param {Number} [level=0] Traversing deep level.\n * @return {HTMLElement|null}\n */\nexport function getParent(element, level = 0) {\n let iteration = -1;\n let parent = null;\n\n while (element != null) {\n if (iteration === level) {\n parent = element;\n break;\n }\n\n if (element.host && element.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n element = element.host;\n\n } else {\n iteration++;\n element = element.parentNode;\n }\n }\n\n return parent;\n}\n\n/**\n * Goes up the DOM tree (including given element) until it finds an element that matches the nodes or nodes name.\n * This method goes up through web components.\n *\n * @param {HTMLElement} element Element from which traversing is started\n * @param {Array} nodes Array of elements or Array of elements name\n * @param {HTMLElement} [until]\n * @returns {HTMLElement|null}\n */\nexport function closest(element, nodes, until) {\n while (element != null && element !== until) {\n if (element.nodeType === Node.ELEMENT_NODE && (nodes.indexOf(element.nodeName) > -1 || nodes.indexOf(element) > -1)) {\n return element;\n }\n if (element.host && element.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n element = element.host;\n\n } else {\n element = element.parentNode;\n }\n }\n\n return null;\n}\n\n/**\n * Goes \"down\" the DOM tree (including given element) until it finds an element that matches the nodes or nodes name.\n *\n * @param {HTMLElement} element Element from which traversing is started\n * @param {Array} nodes Array of elements or Array of elements name\n * @param {HTMLElement} [until]\n * @returns {HTMLElement|null}\n */\nexport function closestDown(element, nodes, until) {\n const matched = [];\n\n while (element) {\n element = closest(element, nodes, until);\n\n if (!element || (until && !until.contains(element))) {\n break;\n }\n matched.push(element);\n\n if (element.host && element.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n element = element.host;\n\n } else {\n element = element.parentNode;\n }\n }\n const length = matched.length;\n\n return length ? matched[length - 1] : null;\n}\n\n/**\n * Goes up the DOM tree and checks if element is child of another element.\n *\n * @param child Child element\n * @param {Object|String} parent Parent element OR selector of the parent element.\n * If string provided, function returns `true` for the first occurrence of element with that class.\n * @returns {Boolean}\n */\nexport function isChildOf(child, parent) {\n var node = child.parentNode;\n var queriedParents = [];\n\n if (typeof parent === 'string') {\n queriedParents = Array.prototype.slice.call(document.querySelectorAll(parent), 0);\n } else {\n queriedParents.push(parent);\n }\n\n while (node != null) {\n if (queriedParents.indexOf(node) > -1) {\n return true;\n }\n node = node.parentNode;\n }\n\n return false;\n}\n\n/**\n * Check if an element is part of `hot-table` web component.\n *\n * @param {Element} element\n * @returns {Boolean}\n */\nexport function isChildOfWebComponentTable(element) {\n var hotTableName = 'hot-table',\n result = false,\n parentNode;\n\n parentNode = polymerWrap(element);\n\n function isHotTable(element) {\n return element.nodeType === Node.ELEMENT_NODE && element.nodeName === hotTableName.toUpperCase();\n }\n\n while (parentNode != null) {\n if (isHotTable(parentNode)) {\n result = true;\n break;\n } else if (parentNode.host && parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n result = isHotTable(parentNode.host);\n\n if (result) {\n break;\n }\n parentNode = parentNode.host;\n }\n parentNode = parentNode.parentNode;\n }\n\n return result;\n}\n\n/**\n * Wrap element into polymer/webcomponent container if exists\n *\n * @param element\n * @returns {*}\n */\nexport function polymerWrap(element) {\n /* global Polymer */\n return typeof Polymer !== 'undefined' && typeof wrap === 'function' ? wrap(element) : element;\n}\n\n/**\n * Unwrap element from polymer/webcomponent container if exists\n *\n * @param element\n * @returns {*}\n */\nexport function polymerUnwrap(element) {\n /* global Polymer */\n return typeof Polymer !== 'undefined' && typeof unwrap === 'function' ? unwrap(element) : element;\n}\n\n/**\n * Counts index of element within its parent\n * WARNING: for performance reasons, assumes there are only element nodes (no text nodes). This is true for Walkotnable\n * Otherwise would need to check for nodeType or use previousElementSibling\n *\n * @see http://jsperf.com/sibling-index/10\n * @param {Element} element\n * @return {Number}\n */\nexport function index(element) {\n var i = 0;\n\n if (element.previousSibling) {\n /* eslint-disable no-cond-assign */\n while (element = element.previousSibling) {\n ++i;\n }\n }\n\n return i;\n}\n\n/**\n * Check if the provided overlay contains the provided element\n *\n * @param {String} overlay\n * @param {HTMLElement} element\n * @returns {boolean}\n */\nexport function overlayContainsElement(overlayType, element) {\n let overlayElement = document.querySelector(`.ht_clone_${overlayType}`);\n return overlayElement ? overlayElement.contains(element) : null;\n}\n\nvar classListSupport = !!document.documentElement.classList;\nvar _hasClass,\n _addClass,\n _removeClass;\n\nfunction filterEmptyClassNames(classNames) {\n var len = 0,\n result = [];\n\n if (!classNames || !classNames.length) {\n return result;\n }\n while (classNames[len]) {\n result.push(classNames[len]);\n len++;\n }\n\n return result;\n}\n\nif (classListSupport) {\n var isSupportMultipleClassesArg = (function() {\n var element = document.createElement('div');\n\n element.classList.add('test', 'test2');\n\n return element.classList.contains('test2');\n }());\n\n _hasClass = function _hasClass(element, className) {\n if (className === '') {\n return false;\n }\n\n return element.classList.contains(className);\n };\n\n _addClass = function _addClass(element, className) {\n var len = 0;\n\n if (typeof className === 'string') {\n className = className.split(' ');\n }\n className = filterEmptyClassNames(className);\n\n if (isSupportMultipleClassesArg) {\n element.classList.add.apply(element.classList, className);\n\n } else {\n while (className && className[len]) {\n element.classList.add(className[len]);\n len++;\n }\n }\n };\n\n _removeClass = function _removeClass(element, className) {\n var len = 0;\n\n if (typeof className === 'string') {\n className = className.split(' ');\n }\n className = filterEmptyClassNames(className);\n\n if (isSupportMultipleClassesArg) {\n element.classList.remove.apply(element.classList, className);\n\n } else {\n while (className && className[len]) {\n element.classList.remove(className[len]);\n len++;\n }\n }\n };\n\n} else {\n var createClassNameRegExp = function createClassNameRegExp(className) {\n return new RegExp(`(\\\\s|^)${className}(\\\\s|$)`);\n };\n\n _hasClass = function _hasClass(element, className) {\n // http://snipplr.com/view/3561/addclass-removeclass-hasclass/\n return !!element.className.match(createClassNameRegExp(className));\n };\n\n _addClass = function _addClass(element, className) {\n var len = 0,\n _className = element.className;\n\n if (typeof className === 'string') {\n className = className.split(' ');\n }\n if (_className === '') {\n _className = className.join(' ');\n\n } else {\n while (className && className[len]) {\n if (!createClassNameRegExp(className[len]).test(_className)) {\n _className += ` ${className[len]}`;\n }\n len++;\n }\n }\n element.className = _className;\n };\n\n _removeClass = function _removeClass(element, className) {\n var len = 0,\n _className = element.className;\n\n if (typeof className === 'string') {\n className = className.split(' ');\n }\n while (className && className[len]) {\n // String.prototype.trim is defined in polyfill.js\n _className = _className.replace(createClassNameRegExp(className[len]), ' ').trim();\n len++;\n }\n if (element.className !== _className) {\n element.className = _className;\n }\n };\n}\n\n/**\n * Checks if element has class name\n *\n * @param {HTMLElement} element\n * @param {String} className Class name to check\n * @returns {Boolean}\n */\nexport function hasClass(element, className) {\n return _hasClass(element, className);\n}\n\n/**\n * Add class name to an element\n *\n * @param {HTMLElement} element\n * @param {String|Array} className Class name as string or array of strings\n */\nexport function addClass(element, className) {\n return _addClass(element, className);\n}\n\n/**\n * Remove class name from an element\n *\n * @param {HTMLElement} element\n * @param {String|Array} className Class name as string or array of strings\n */\nexport function removeClass(element, className) {\n return _removeClass(element, className);\n}\n\nexport function removeTextNodes(element, parent) {\n if (element.nodeType === 3) {\n parent.removeChild(element); // bye text nodes!\n\n } else if (['TABLE', 'THEAD', 'TBODY', 'TFOOT', 'TR'].indexOf(element.nodeName) > -1) {\n var childs = element.childNodes;\n for (var i = childs.length - 1; i >= 0; i--) {\n removeTextNodes(childs[i], element);\n }\n }\n}\n\n/**\n * Remove childs function\n * WARNING - this doesn't unload events and data attached by jQuery\n * http://jsperf.com/jquery-html-vs-empty-vs-innerhtml/9\n * http://jsperf.com/jquery-html-vs-empty-vs-innerhtml/11 - no siginificant improvement with Chrome remove() method\n *\n * @param element\n * @returns {void}\n */\n//\nexport function empty(element) {\n var child;\n /* eslint-disable no-cond-assign */\n while (child = element.lastChild) {\n element.removeChild(child);\n }\n}\n\nexport const HTML_CHARACTERS = /(<(.*)>|&(.*);)/;\n\n/**\n * Insert content into element trying avoid innerHTML method.\n * @return {void}\n */\nexport function fastInnerHTML(element, content) {\n if (HTML_CHARACTERS.test(content)) {\n element.innerHTML = content;\n } else {\n fastInnerText(element, content);\n }\n}\n\n/**\n * Insert text content into element\n * @return {void}\n */\n\nvar textContextSupport = !!document.createTextNode('test').textContent;\n\nexport function fastInnerText(element, content) {\n var child = element.firstChild;\n\n if (child && child.nodeType === 3 && child.nextSibling === null) {\n // fast lane - replace existing text node\n\n if (textContextSupport) {\n // http://jsperf.com/replace-text-vs-reuse\n child.textContent = content;\n } else {\n // http://jsperf.com/replace-text-vs-reuse\n child.data = content;\n }\n } else {\n // slow lane - empty element and insert a text node\n empty(element);\n element.appendChild(document.createTextNode(content));\n }\n}\n\n/**\n * Returns true if element is attached to the DOM and visible, false otherwise\n * @param elem\n * @returns {boolean}\n */\nexport function isVisible(elem) {\n var next = elem;\n\n while (polymerUnwrap(next) !== document.documentElement) { // until <html> reached\n if (next === null) { // parent detached from DOM\n return false;\n } else if (next.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n if (next.host) { // this is Web Components Shadow DOM\n // see: http://w3c.github.io/webcomponents/spec/shadow/#encapsulation\n // according to spec, should be if (next.ownerDocument !== window.document), but that doesn't work yet\n if (next.host.impl) { // Chrome 33.0.1723.0 canary (2013-11-29) Web Platform features disabled\n return isVisible(next.host.impl);\n\n } else if (next.host) { // Chrome 33.0.1723.0 canary (2013-11-29) Web Platform features enabled\n return isVisible(next.host);\n\n }\n throw new Error('Lost in Web Components world');\n\n } else {\n return false; // this is a node detached from document in IE8\n }\n } else if (next.style.display === 'none') {\n return false;\n }\n next = next.parentNode;\n }\n\n return true;\n}\n\n/**\n * Returns elements top and left offset relative to the document. Function is not compatible with jQuery offset.\n *\n * @param {HTMLElement} elem\n * @return {Object} Returns object with `top` and `left` props\n */\nexport function offset(elem) {\n var offsetLeft,\n offsetTop,\n lastElem,\n docElem,\n box;\n\n docElem = document.documentElement;\n\n if (hasCaptionProblem() && elem.firstChild && elem.firstChild.nodeName === 'CAPTION') {\n // fixes problem with Firefox ignoring <caption> in TABLE offset (see also export outerHeight)\n // http://jsperf.com/offset-vs-getboundingclientrect/8\n box = elem.getBoundingClientRect();\n\n return {\n top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0),\n left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0)\n };\n }\n offsetLeft = elem.offsetLeft;\n offsetTop = elem.offsetTop;\n lastElem = elem;\n\n /* eslint-disable no-cond-assign */\n while (elem = elem.offsetParent) {\n // from my observation, document.body always has scrollLeft/scrollTop == 0\n if (elem === document.body) {\n break;\n }\n offsetLeft += elem.offsetLeft;\n offsetTop += elem.offsetTop;\n lastElem = elem;\n }\n\n // slow - http://jsperf.com/offset-vs-getboundingclientrect/6\n if (lastElem && lastElem.style.position === 'fixed') {\n // if(lastElem !== document.body) { //faster but does gives false positive in Firefox\n offsetLeft += window.pageXOffset || docElem.scrollLeft;\n offsetTop += window.pageYOffset || docElem.scrollTop;\n }\n\n return {\n left: offsetLeft,\n top: offsetTop\n };\n}\n\n/**\n * Returns the document's scrollTop property.\n *\n * @returns {Number}\n */\nexport function getWindowScrollTop() {\n var res = window.scrollY;\n\n if (res === void 0) { // IE8-11\n res = document.documentElement.scrollTop;\n }\n\n return res;\n}\n\n/**\n * Returns the document's scrollLeft property.\n *\n * @returns {Number}\n */\nexport function getWindowScrollLeft() {\n var res = window.scrollX;\n\n if (res === void 0) { // IE8-11\n res = document.documentElement.scrollLeft;\n }\n\n return res;\n}\n\n/**\n * Returns the provided element's scrollTop property.\n *\n * @param element\n * @returns {Number}\n */\nexport function getScrollTop(element) {\n if (element === window) {\n return getWindowScrollTop();\n }\n return element.scrollTop;\n\n}\n\n/**\n * Returns the provided element's scrollLeft property.\n *\n * @param element\n * @returns {Number}\n */\nexport function getScrollLeft(element) {\n if (element === window) {\n return getWindowScrollLeft();\n }\n return element.scrollLeft;\n}\n\n/**\n * Returns a DOM element responsible for scrolling of the provided element.\n *\n * @param {HTMLElement} element\n * @returns {HTMLElement} Element's scrollable parent\n */\nexport function getScrollableElement(element) {\n var el = element.parentNode,\n props = ['auto', 'scroll'],\n overflow,\n overflowX,\n overflowY,\n computedStyle = '',\n computedOverflow = '',\n computedOverflowY = '',\n computedOverflowX = '';\n\n while (el && el.style && document.body !== el) {\n overflow = el.style.overflow;\n overflowX = el.style.overflowX;\n overflowY = el.style.overflowY;\n\n if (overflow == 'scroll' || overflowX == 'scroll' || overflowY == 'scroll') {\n return el;\n\n } else if (window.getComputedStyle) {\n computedStyle = window.getComputedStyle(el);\n computedOverflow = computedStyle.getPropertyValue('overflow');\n computedOverflowY = computedStyle.getPropertyValue('overflow-y');\n computedOverflowX = computedStyle.getPropertyValue('overflow-x');\n\n if (computedOverflow === 'scroll' || computedOverflowX === 'scroll' || computedOverflowY === 'scroll') {\n return el;\n }\n }\n\n if (el.clientHeight <= el.scrollHeight && (props.indexOf(overflowY) !== -1 || props.indexOf(overflow) !== -1 ||\n props.indexOf(computedOverflow) !== -1 || props.indexOf(computedOverflowY) !== -1)) {\n return el;\n }\n if (el.clientWidth <= el.scrollWidth && (props.indexOf(overflowX) !== -1 || props.indexOf(overflow) !== -1 ||\n props.indexOf(computedOverflow) !== -1 || props.indexOf(computedOverflowX) !== -1)) {\n return el;\n }\n el = el.parentNode;\n }\n\n return window;\n}\n\n/**\n * Returns a DOM element responsible for trimming the provided element.\n *\n * @param {HTMLElement} base Base element\n * @returns {HTMLElement} Base element's trimming parent\n */\nexport function getTrimmingContainer(base) {\n var el = base.parentNode;\n\n while (el && el.style && document.body !== el) {\n if (el.style.overflow !== 'visible' && el.style.overflow !== '') {\n return el;\n\n } else if (window.getComputedStyle) {\n var computedStyle = window.getComputedStyle(el);\n\n if (computedStyle.getPropertyValue('overflow') !== 'visible' && computedStyle.getPropertyValue('overflow') !== '') {\n return el;\n }\n }\n\n el = el.parentNode;\n }\n\n return window;\n}\n\n/**\n * Returns a style property for the provided element. (Be it an inline or external style).\n *\n * @param {HTMLElement} element\n * @param {String} prop Wanted property\n * @returns {String|undefined} Element's style property\n */\nexport function getStyle(element, prop) {\n /* eslint-disable */\n if (!element) {\n return;\n\n } else if (element === window) {\n if (prop === 'width') {\n return window.innerWidth + 'px';\n\n } else if (prop === 'height') {\n return window.innerHeight + 'px';\n }\n\n return;\n }\n\n var\n styleProp = element.style[prop],\n computedStyle;\n\n if (styleProp !== '' && styleProp !== void 0) {\n return styleProp;\n\n } else {\n computedStyle = getComputedStyle(element);\n\n if (computedStyle[prop] !== '' && computedStyle[prop] !== void 0) {\n return computedStyle[prop];\n }\n }\n}\n\n/**\n * Returns a computed style object for the provided element. (Needed if style is declared in external stylesheet).\n *\n * @param element\n * @returns {IEElementStyle|CssStyle} Elements computed style object\n */\nexport function getComputedStyle(element) {\n return element.currentStyle || document.defaultView.getComputedStyle(element);\n}\n\n/**\n * Returns the element's outer width.\n *\n * @param element\n * @returns {number} Element's outer width\n */\nexport function outerWidth(element) {\n return element.offsetWidth;\n}\n\n/**\n * Returns the element's outer height\n *\n * @param elem\n * @returns {number} Element's outer height\n */\nexport function outerHeight(elem) {\n if (hasCaptionProblem() && elem.firstChild && elem.firstChild.nodeName === 'CAPTION') {\n // fixes problem with Firefox ignoring <caption> in TABLE.offsetHeight\n // jQuery (1.10.1) still has this unsolved\n // may be better to just switch to getBoundingClientRect\n // http://bililite.com/blog/2009/03/27/finding-the-size-of-a-table/\n // http://lists.w3.org/Archives/Public/www-style/2009Oct/0089.html\n // http://bugs.jquery.com/ticket/2196\n // http://lists.w3.org/Archives/Public/www-style/2009Oct/0140.html#start140\n return elem.offsetHeight + elem.firstChild.offsetHeight;\n }\n\n return elem.offsetHeight;\n}\n\n/**\n * Returns the element's inner height.\n *\n * @param element\n * @returns {number} Element's inner height\n */\nexport function innerHeight(element) {\n return element.clientHeight || element.innerHeight;\n}\n\n/**\n * Returns the element's inner width.\n *\n * @param element\n * @returns {number} Element's inner width\n */\nexport function innerWidth(element) {\n return element.clientWidth || element.innerWidth;\n}\n\nexport function addEvent(element, event, callback) {\n if (window.addEventListener) {\n element.addEventListener(event, callback, false);\n } else {\n element.attachEvent('on' + event, callback);\n }\n}\n\nexport function removeEvent(element, event, callback) {\n if (window.removeEventListener) {\n element.removeEventListener(event, callback, false);\n } else {\n element.detachEvent('on' + event, callback);\n }\n}\n\n/**\n * Returns caret position in text input\n *\n * @author http://stackoverflow.com/questions/263743/how-to-get-caret-position-in-textarea\n * @return {Number}\n */\nexport function getCaretPosition(el) {\n if (el.selectionStart) {\n return el.selectionStart;\n\n } else if (document.selection) { // IE8\n el.focus();\n\n let r = document.selection.createRange();\n\n if (r == null) {\n return 0;\n }\n let re = el.createTextRange();\n let rc = re.duplicate();\n\n re.moveToBookmark(r.getBookmark());\n rc.setEndPoint('EndToStart', re);\n\n return rc.text.length;\n }\n\n return 0;\n}\n\n/**\n * Returns end of the selection in text input\n *\n * @return {Number}\n */\nexport function getSelectionEndPosition(el) {\n if (el.selectionEnd) {\n return el.selectionEnd;\n\n } else if (document.selection) { // IE8\n let r = document.selection.createRange();\n\n if (r == null) {\n return 0;\n }\n let re = el.createTextRange();\n\n return re.text.indexOf(r.text) + r.text.length;\n }\n\n return 0;\n}\n\n/**\n * Returns text under selection.\n *\n * @returns {String}\n */\nexport function getSelectionText() {\n let text = '';\n\n if (window.getSelection) {\n text = window.getSelection().toString();\n } else if (document.selection && document.selection.type !== 'Control') {\n text = document.selection.createRange().text;\n }\n\n return text;\n}\n\n/**\n * Sets caret position in text input.\n *\n * @author http://blog.vishalon.net/index.php/javascript-getting-and-setting-caret-position-in-textarea/\n * @param {Element} element\n * @param {Number} pos\n * @param {Number} endPos\n */\nexport function setCaretPosition(element, pos, endPos) {\n if (endPos === void 0) {\n endPos = pos;\n }\n if (element.setSelectionRange) {\n element.focus();\n\n try {\n element.setSelectionRange(pos, endPos);\n } catch (err) {\n var elementParent = element.parentNode;\n var parentDisplayValue = elementParent.style.display;\n elementParent.style.display = 'block';\n element.setSelectionRange(pos, endPos);\n elementParent.style.display = parentDisplayValue;\n }\n } else if (element.createTextRange) { // IE8\n var range = element.createTextRange();\n range.collapse(true);\n range.moveEnd('character', endPos);\n range.moveStart('character', pos);\n range.select();\n }\n}\n\nvar cachedScrollbarWidth;\n\n// http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes\nfunction walkontableCalculateScrollbarWidth() {\n var inner = document.createElement('div');\n inner.style.height = '200px';\n inner.style.width = '100%';\n\n var outer = document.createElement('div');\n outer.style.boxSizing = 'content-box';\n outer.style.height = '150px';\n outer.style.left = '0px';\n outer.style.overflow = 'hidden';\n outer.style.position = 'absolute';\n outer.style.top = '0px';\n outer.style.width = '200px';\n outer.style.visibility = 'hidden';\n outer.appendChild(inner);\n\n (document.body || document.documentElement).appendChild(outer);\n var w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n var w2 = inner.offsetWidth;\n if (w1 == w2) {\n w2 = outer.clientWidth;\n }\n\n (document.body || document.documentElement).removeChild(outer);\n\n return (w1 - w2);\n}\n\n/**\n * Returns the computed width of the native browser scroll bar.\n *\n * @return {Number} width\n */\nexport function getScrollbarWidth() {\n if (cachedScrollbarWidth === void 0) {\n cachedScrollbarWidth = walkontableCalculateScrollbarWidth();\n }\n\n return cachedScrollbarWidth;\n}\n\n/**\n * Checks if the provided element has a vertical scrollbar.\n *\n * @param {HTMLElement} element\n * @returns {Boolean}\n */\nexport function hasVerticalScrollbar(element) {\n return element.offsetWidth !== element.clientWidth;\n}\n\n/**\n * Checks if the provided element has a vertical scrollbar.\n *\n * @param {HTMLElement} element\n * @returns {Boolean}\n */\nexport function hasHorizontalScrollbar(element) {\n return element.offsetHeight !== element.clientHeight;\n}\n\n/**\n * Sets overlay position depending on it's type and used browser\n */\nexport function setOverlayPosition(overlayElem, left, top) {\n if (isIE8() || isIE9()) {\n overlayElem.style.top = top;\n overlayElem.style.left = left;\n } else if (isSafari()) {\n overlayElem.style['-webkit-transform'] = 'translate3d(' + left + ',' + top + ',0)';\n } else {\n overlayElem.style.transform = 'translate3d(' + left + ',' + top + ',0)';\n }\n}\n\nexport function getCssTransform(element) {\n var transform;\n\n if (element.style.transform && (transform = element.style.transform) !== '') {\n return ['transform', transform];\n\n } else if (element.style['-webkit-transform'] && (transform = element.style['-webkit-transform']) !== '') {\n\n return ['-webkit-transform', transform];\n }\n\n return -1;\n}\n\nexport function resetCssTransform(element) {\n if (element.style.transform && element.style.transform !== '') {\n element.style.transform = '';\n } else if (element.style['-webkit-transform'] && element.style['-webkit-transform'] !== '') {\n element.style['-webkit-transform'] = '';\n }\n}\n\n/**\n * Determines if the given DOM element is an input field.\n * Notice: By 'input' we mean input, textarea and select nodes\n *\n * @param {HTMLElement} element - DOM element\n * @returns {Boolean}\n */\nexport function isInput(element) {\n var inputs = ['INPUT', 'SELECT', 'TEXTAREA'];\n\n return element && (inputs.indexOf(element.nodeName) > -1 || element.contentEditable === 'true');\n}\n\n/**\n * Determines if the given DOM element is an input field placed OUTSIDE of HOT.\n * Notice: By 'input' we mean input, textarea and select nodes\n *\n * @param {HTMLElement} element - DOM element\n * @returns {Boolean}\n */\nexport function isOutsideInput(element) {\n return isInput(element) && element.className.indexOf('handsontableInput') == -1 && element.className.indexOf('copyPaste') == -1;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/helpers/dom/element.js","export function to2dArray(arr) {\n var i = 0,\n ilen = arr.length;\n\n while (i < ilen) {\n arr[i] = [arr[i]];\n i++;\n }\n}\n\nexport function extendArray(arr, extension) {\n var i = 0,\n ilen = extension.length;\n\n while (i < ilen) {\n arr.push(extension[i]);\n i++;\n }\n}\n\nexport function pivot(arr) {\n var pivotedArr = [];\n\n if (!arr || arr.length === 0 || !arr[0] || arr[0].length === 0) {\n return pivotedArr;\n }\n\n var rowCount = arr.length;\n var colCount = arr[0].length;\n\n for (var i = 0; i < rowCount; i++) {\n for (var j = 0; j < colCount; j++) {\n if (!pivotedArr[j]) {\n pivotedArr[j] = [];\n }\n\n pivotedArr[j][i] = arr[i][j];\n }\n }\n\n return pivotedArr;\n}\n\n/**\n * A specialized version of `.reduce` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * {@link https://github.com/lodash/lodash/blob/master/lodash.js}\n *\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {Boolean} [initFromArray] Specify using the first element of `array` as the initial value.\n * @returns {*} Returns the accumulated value.\n */\nexport function arrayReduce(array, iteratee, accumulator, initFromArray) {\n let index = -1,\n length = array.length;\n\n if (initFromArray && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n\n return accumulator;\n}\n\n/**\n * A specialized version of `.filter` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * {@link https://github.com/lodash/lodash/blob/master/lodash.js}\n *\n * @param {Array} array The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nexport function arrayFilter(array, predicate) {\n let index = -1,\n length = array.length,\n resIndex = -1,\n result = [];\n\n while (++index < length) {\n let value = array[index];\n\n if (predicate(value, index, array)) {\n result[++resIndex] = value;\n }\n }\n\n return result;\n}\n\n/**\n * A specialized version of `.map` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nexport function arrayMap(array, iteratee) {\n let index = -1,\n length = array.length,\n resIndex = -1,\n result = [];\n\n while (++index < length) {\n let value = array[index];\n\n result[++resIndex] = iteratee(value, index, array);\n }\n\n return result;\n}\n\n/**\n * A specialized version of `.forEach` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * {@link https://github.com/lodash/lodash/blob/master/lodash.js}\n *\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nexport function arrayEach(array, iteratee) {\n let index = -1,\n length = array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n\n return array;\n}\n\n/**\n * Calculate sum value for each item of the array.\n *\n * @param {Array} array The array to process.\n * @returns {Number} Returns calculated sum value.\n */\nexport function arraySum(array) {\n return arrayReduce(array, (a, b) => (a + b), 0);\n}\n\n/**\n * Returns the highest value from an array. Can be array of numbers or array of strings.\n * NOTICE: Mixed values is not supported.\n *\n * @param {Array} array The array to process.\n * @returns {Number} Returns the highest value from an array.\n */\nexport function arrayMax(array) {\n return arrayReduce(array, (a, b) => (a > b ? a : b), Array.isArray(array) ? array[0] : void 0);\n}\n\n/**\n * Returns the lowest value from an array. Can be array of numbers or array of strings.\n * NOTICE: Mixed values is not supported.\n *\n * @param {Array} array The array to process.\n * @returns {Number} Returns the lowest value from an array.\n */\nexport function arrayMin(array) {\n return arrayReduce(array, (a, b) => (a < b ? a : b), Array.isArray(array) ? array[0] : void 0);\n}\n\n/**\n * Calculate average value for each item of the array.\n *\n * @param {Array} array The array to process.\n * @returns {Number} Returns calculated average value.\n */\nexport function arrayAvg(array) {\n if (!array.length) {\n return 0;\n }\n\n return arraySum(array) / array.length;\n}\n\n/**\n * Flatten multidimensional array.\n *\n * @param {Array} array Array of Arrays\n * @returns {Array}\n */\nexport function arrayFlatten(array) {\n return arrayReduce(array, (initial, value) => initial.concat(Array.isArray(value) ? arrayFlatten(value) : value), []);\n}\n\n/**\n * Unique values in the array.\n *\n * @param {Array} array The array to process.\n * @returns {Array}\n */\nexport function arrayUnique(array) {\n let unique = [];\n\n arrayEach(array, (value) => {\n if (unique.indexOf(value) === -1) {\n unique.push(value);\n }\n });\n\n return unique;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/helpers/array.js","import {arrayEach} from './array';\n\n/**\n * Generate schema for passed object.\n *\n * @param {Array|Object} object\n * @returns {Array|Object}\n */\nexport function duckSchema(object) {\n var schema;\n\n if (Array.isArray(object)) {\n schema = [];\n } else {\n schema = {};\n\n objectEach(object, (value, key) => {\n if (key === '__children') {\n return;\n }\n\n if (value && typeof value === 'object' && !Array.isArray(value)) {\n schema[key] = duckSchema(value);\n\n } else if (Array.isArray(value)) {\n if (value.length && typeof value[0] === 'object' && !Array.isArray(value[0])) {\n schema[key] = [duckSchema(value[0])];\n } else {\n schema[key] = [];\n }\n\n } else {\n schema[key] = null;\n }\n });\n }\n\n return schema;\n}\n\n/**\n * Inherit without without calling parent constructor, and setting `Child.prototype.constructor` to `Child` instead of `Parent`.\n * Creates temporary dummy function to call it as constructor.\n * Described in ticket: https://github.com/handsontable/handsontable/pull/516\n *\n * @param {Object} Child child class\n * @param {Object} Parent parent class\n * @return {Object} extended Child\n */\nexport function inherit(Child, Parent) {\n Parent.prototype.constructor = Parent;\n Child.prototype = new Parent();\n Child.prototype.constructor = Child;\n\n return Child;\n}\n\n/**\n * Perform shallow extend of a target object with extension's own properties.\n *\n * @param {Object} target An object that will receive the new properties.\n * @param {Object} extension An object containing additional properties to merge into the target.\n */\nexport function extend(target, extension) {\n objectEach(extension, (value, key) => {\n target[key] = value;\n });\n\n return target;\n}\n\n/**\n * Perform deep extend of a target object with extension's own properties.\n *\n * @param {Object} target An object that will receive the new properties.\n * @param {Object} extension An object containing additional properties to merge into the target.\n */\nexport function deepExtend(target, extension) {\n objectEach(extension, (value, key) => {\n if (extension[key] && typeof extension[key] === 'object') {\n if (!target[key]) {\n if (Array.isArray(extension[key])) {\n target[key] = [];\n } else if (Object.prototype.toString.call(extension[key]) === '[object Date]') {\n target[key] = extension[key];\n } else {\n target[key] = {};\n }\n }\n deepExtend(target[key], extension[key]);\n\n } else {\n target[key] = extension[key];\n }\n });\n}\n\n/**\n * Perform deep clone of an object.\n * WARNING! Only clones JSON properties. Will cause error when `obj` contains a function, Date, etc.\n *\n * @param {Object} obj An object that will be cloned\n * @return {Object}\n */\nexport function deepClone(obj) {\n if (typeof obj === 'object') {\n return JSON.parse(JSON.stringify(obj));\n }\n\n return obj;\n}\n\n/**\n * Shallow clone object.\n *\n * @param {Object} object\n * @returns {Object}\n */\nexport function clone(object) {\n let result = {};\n\n objectEach(object, (value, key) => {\n result[key] = value;\n });\n\n return result;\n}\n\n/**\n * Extend the Base object (usually prototype) of the functionality the `mixins` objects.\n *\n * @param {Object} Base Base object which will be extended.\n * @param {Object} mixins The object of the functionality will be \"copied\".\n * @returns {Object}\n */\nexport function mixin(Base, ...mixins) {\n if (!Base.MIXINS) {\n Base.MIXINS = [];\n }\n arrayEach(mixins, (mixin) => {\n Base.MIXINS.push(mixin.MIXIN_NAME);\n\n objectEach(mixin, (value, key) => {\n if (Base.prototype[key] !== void 0) {\n throw new Error(`Mixin conflict. Property '${key}' already exist and cannot be overwritten.`);\n }\n if (typeof value === 'function') {\n Base.prototype[key] = value;\n\n } else {\n let getter = function _getter(propertyName, initialValue) {\n propertyName = `_${propertyName}`;\n\n let initValue = (value) => {\n if (Array.isArray(value) || isObject(value)) {\n value = deepClone(value);\n }\n\n return value;\n };\n\n return function() {\n if (this[propertyName] === void 0) {\n this[propertyName] = initValue(initialValue);\n }\n\n return this[propertyName];\n };\n };\n let setter = function _setter(propertyName) {\n propertyName = `_${propertyName}`;\n\n return function(value) {\n this[propertyName] = value;\n };\n };\n Object.defineProperty(Base.prototype, key, {\n get: getter(key, value),\n set: setter(key),\n configurable: true,\n });\n }\n });\n });\n\n return Base;\n}\n\n/**\n * Checks if two objects or arrays are (deep) equal\n *\n * @param {Object|Array} object1\n * @param {Object|Array} object2\n * @returns {Boolean}\n */\nexport function isObjectEquals(object1, object2) {\n return JSON.stringify(object1) === JSON.stringify(object2);\n}\n\n/**\n * Determines whether given object is a plain Object.\n * Note: String and Array are not plain Objects\n * @param {*} obj\n * @returns {boolean}\n */\nexport function isObject(obj) {\n return Object.prototype.toString.call(obj) == '[object Object]';\n}\n\nexport function defineGetter(object, property, value, options) {\n options.value = value;\n options.writable = options.writable !== false;\n options.enumerable = options.enumerable !== false;\n options.configurable = options.configurable !== false;\n\n Object.defineProperty(object, property, options);\n}\n\n/**\n * A specialized version of `.forEach` for objects.\n *\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nexport function objectEach(object, iteratee) {\n for (let key in object) {\n if (!object.hasOwnProperty || (object.hasOwnProperty && Object.prototype.hasOwnProperty.call(object, key))) {\n if (iteratee(object[key], key, object) === false) {\n break;\n }\n }\n }\n\n return object;\n}\n\n/**\n * Get object property by its name. Access to sub properties can be achieved by dot notation (e.q. `'foo.bar.baz'`).\n *\n * @param {Object} object Object which value will be exported.\n * @param {String} name Object property name.\n * @returns {*}\n */\nexport function getProperty(object, name) {\n let names = name.split('.');\n let result = object;\n\n objectEach(names, (name) => {\n result = result[name];\n\n if (result === void 0) {\n result = void 0;\n\n return false;\n }\n });\n\n return result;\n}\n\n/**\n * Return object length (recursively).\n *\n * @param {*} object Object for which we want get length.\n * @returns {Number}\n */\nexport function deepObjectSize(object) {\n if (!isObject(object)) {\n return 0;\n }\n let recursObjLen = function(obj) {\n let result = 0;\n\n if (isObject(obj)) {\n objectEach(obj, (key) => {\n result += recursObjLen(key);\n });\n } else {\n result++;\n }\n\n return result;\n };\n\n return recursObjLen(object);\n}\n\n/**\n * Create object with property where its value change will be observed.\n *\n * @param {*} [defaultValue=undefined] Default value.\n * @param {String} [propertyToListen='value'] Property to listen.\n * @returns {Object}\n */\nexport function createObjectPropListener(defaultValue, propertyToListen = 'value') {\n const privateProperty = `_${propertyToListen}`;\n const holder = {\n _touched: false,\n [privateProperty]: defaultValue,\n isTouched() {\n return this._touched;\n }\n };\n\n Object.defineProperty(holder, propertyToListen, {\n get() {\n return this[privateProperty];\n },\n set(value) {\n this._touched = true;\n this[privateProperty] = value;\n },\n enumerable: true,\n configurable: true\n });\n\n return holder;\n}\n\n/**\n * Check if at specified `key` there is any value for `object`.\n *\n * @param {Object} object Object to search value at specyfic key.\n * @param {String} key String key to check.\n */\nexport function hasOwnProperty(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\n\n\n\n// WEBPACK FOOTER //\n// src/helpers/object.js","var global = require('./_global')\n , core = require('./_core')\n , hide = require('./_hide')\n , redefine = require('./_redefine')\n , ctx = require('./_ctx')\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {})\n , key, own, out, exp;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if(target)redefine(target, key, out, type & $export.U);\n // export\n if(exports[key] != out)hide(exports, key, exp);\n if(IS_PROTO && expProto[key] != out)expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library` \nmodule.exports = $export;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_export.js\n// module id = 3\n// module chunks = 0","// import Core from './core';\nimport {polymerWrap, closest} from './helpers/dom/element';\nimport {isWebComponentSupportedNatively} from './helpers/feature';\nimport {stopImmediatePropagation as _stopImmediatePropagation} from './helpers/dom/event';\n\n/**\n * Counter which tracks unregistered listeners (useful for detecting memory leaks).\n *\n * @type {Number}\n */\nlet listenersCounter = 0;\n\n/**\n * Event DOM manager for internal use in Handsontable.\n *\n * @class EventManager\n * @util\n */\nclass EventManager {\n /**\n * @param {Object} [context=null]\n * @private\n */\n constructor(context = null) {\n this.context = context || this;\n\n if (!this.context.eventListeners) {\n this.context.eventListeners = [];\n }\n }\n\n /**\n * Register specified listener (`eventName`) to the element.\n *\n * @param {Element} element Target element.\n * @param {String} eventName Event name.\n * @param {Function} callback Function which will be called after event occur.\n * @returns {Function} Returns function which you can easily call to remove that event\n */\n addEventListener(element, eventName, callback) {\n let context = this.context;\n\n function callbackProxy(event) {\n event = extendEvent(context, event);\n\n callback.call(this, event);\n }\n this.context.eventListeners.push({\n element,\n event: eventName,\n callback,\n callbackProxy,\n });\n\n if (window.addEventListener) {\n element.addEventListener(eventName, callbackProxy, false);\n } else {\n element.attachEvent(`on${eventName}`, callbackProxy);\n }\n listenersCounter++;\n\n return () => {\n this.removeEventListener(element, eventName, callback);\n };\n }\n\n /**\n * Remove the event listener previously registered.\n *\n * @param {Element} element Target element.\n * @param {String} eventName Event name.\n * @param {Function} callback Function to remove from the event target. It must be the same as during registration listener.\n */\n removeEventListener(element, eventName, callback) {\n let len = this.context.eventListeners.length;\n let tmpEvent;\n\n while (len--) {\n tmpEvent = this.context.eventListeners[len];\n\n if (tmpEvent.event == eventName && tmpEvent.element == element) {\n if (callback && callback != tmpEvent.callback) {\n /* eslint-disable no-continue */\n continue;\n }\n this.context.eventListeners.splice(len, 1);\n\n if (tmpEvent.element.removeEventListener) {\n tmpEvent.element.removeEventListener(tmpEvent.event, tmpEvent.callbackProxy, false);\n } else {\n tmpEvent.element.detachEvent(`on${tmpEvent.event}`, tmpEvent.callbackProxy);\n }\n listenersCounter--;\n }\n }\n }\n\n /**\n * Clear all previously registered events.\n *\n * @private\n * @since 0.15.0-beta3\n */\n clearEvents() {\n if (!this.context) {\n return;\n }\n let len = this.context.eventListeners.length;\n\n while (len--) {\n let event = this.context.eventListeners[len];\n\n if (event) {\n this.removeEventListener(event.element, event.event, event.callback);\n }\n }\n }\n\n /**\n * Clear all previously registered events.\n */\n clear() {\n this.clearEvents();\n }\n\n /**\n * Destroy instance of EventManager.\n */\n destroy() {\n this.clearEvents();\n this.context = null;\n }\n\n /**\n * Trigger event at the specified target element.\n *\n * @param {Element} element Target element.\n * @param {String} eventName Event name.\n */\n fireEvent(element, eventName) {\n let options = {\n bubbles: true,\n cancelable: (eventName !== 'mousemove'),\n view: window,\n detail: 0,\n screenX: 0,\n screenY: 0,\n clientX: 1,\n clientY: 1,\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false,\n button: 0,\n relatedTarget: undefined,\n };\n var event;\n\n if (document.createEvent) {\n event = document.createEvent('MouseEvents');\n event.initMouseEvent(eventName, options.bubbles, options.cancelable,\n options.view, options.detail,\n options.screenX, options.screenY, options.clientX, options.clientY,\n options.ctrlKey, options.altKey, options.shiftKey, options.metaKey,\n options.button, options.relatedTarget || document.body.parentNode);\n\n } else {\n event = document.createEventObject();\n }\n\n if (element.dispatchEvent) {\n element.dispatchEvent(event);\n } else {\n element.fireEvent(`on${eventName}`, event);\n }\n }\n}\n\n/**\n * @param {Object} context\n * @param {Event} event\n * @private\n * @returns {*}\n */\nfunction extendEvent(context, event) {\n let componentName = 'HOT-TABLE';\n let isHotTableSpotted;\n let fromElement;\n let realTarget;\n let target;\n let len;\n let nativeStopImmediatePropagation;\n\n event.isTargetWebComponent = false;\n event.realTarget = event.target;\n\n nativeStopImmediatePropagation = event.stopImmediatePropagation;\n event.stopImmediatePropagation = function() {\n nativeStopImmediatePropagation.apply(this);\n _stopImmediatePropagation(this);\n };\n\n if (!EventManager.isHotTableEnv) {\n return event;\n }\n event = polymerWrap(event);\n len = event.path ? event.path.length : 0;\n\n while (len--) {\n if (event.path[len].nodeName === componentName) {\n isHotTableSpotted = true;\n\n } else if (isHotTableSpotted && event.path[len].shadowRoot) {\n target = event.path[len];\n\n break;\n }\n if (len === 0 && !target) {\n target = event.path[len];\n }\n }\n if (!target) {\n target = event.target;\n }\n event.isTargetWebComponent = true;\n\n if (isWebComponentSupportedNatively()) {\n event.realTarget = event.srcElement || event.toElement;\n\n } else if (context instanceof Core || context instanceof Walkontable) {\n // Polymer doesn't support `event.target` property properly we must emulate it ourselves\n if (context instanceof Core) {\n fromElement = context.view ? context.view.wt.wtTable.TABLE : null;\n\n } else if (context instanceof Walkontable) {\n // .wtHider\n fromElement = context.wtTable.TABLE.parentNode.parentNode;\n }\n realTarget = closest(event.target, [componentName], fromElement);\n\n if (realTarget) {\n event.realTarget = fromElement.querySelector(componentName) || event.target;\n } else {\n event.realTarget = event.target;\n }\n }\n\n Object.defineProperty(event, 'target', {\n get() {\n return polymerWrap(target);\n },\n enumerable: true,\n configurable: true,\n });\n\n return event;\n}\n\nexport default EventManager;\n\nexport function getListenersCounter() {\n return listenersCounter;\n};\n\n\n\n// WEBPACK FOOTER //\n// src/eventManager.js","/**\n * Checks if value of n is a numeric one\n * http://jsperf.com/isnan-vs-isnumeric/4\n * @param n\n * @returns {boolean}\n */\nexport function isNumeric(n) {\n /* eslint-disable */\n var t = typeof n;\n\n return t == 'number' ? !isNaN(n) && isFinite(n) :\n t == 'string' ? !n.length ? false :\n n.length == 1 ? /\\d/.test(n) :\n /^\\s*[+-]?\\s*(?:(?:\\d+(?:\\.\\d+)?(?:e[+-]?\\d+)?)|(?:0x[a-f\\d]+))\\s*$/i.test(n) :\n t == 'object' ? !!n && typeof n.valueOf() == 'number' && !(n instanceof Date) : false;\n}\n\n/**\n * A specialized version of `.forEach` defined by ranges.\n *\n * @param {Number} rangeFrom The number from start iterate.\n * @param {Number|Function} rangeTo The number where finish iterate or function as a iteratee.\n * @param {Function} [iteratee] The function invoked per iteration.\n */\nexport function rangeEach(rangeFrom, rangeTo, iteratee) {\n let index = -1;\n\n if (typeof rangeTo === 'function') {\n iteratee = rangeTo;\n rangeTo = rangeFrom;\n } else {\n index = rangeFrom - 1;\n }\n while (++index <= rangeTo) {\n if (iteratee(index) === false) {\n break;\n }\n }\n}\n\n/**\n * A specialized version of `.forEach` defined by ranges iterable in reverse order.\n *\n * @param {Number} rangeFrom The number from start iterate.\n * @param {Number} rangeTo The number where finish iterate.\n * @param {Function} iteratee The function invoked per iteration.\n */\nexport function rangeEachReverse(rangeFrom, rangeTo, iteratee) {\n let index = rangeFrom + 1;\n\n if (typeof rangeTo === 'function') {\n iteratee = rangeTo;\n rangeTo = 0;\n }\n while (--index >= rangeTo) {\n if (iteratee(index) === false) {\n break;\n }\n }\n}\n\n/**\n * Calculate value from percent.\n *\n * @param {Number} value Base value from percent will be calculated.\n * @param {String|Number} percent Can be Number or String (eq. `'33%'`).\n * @returns {Number}\n */\nexport function valueAccordingPercent(value, percent) {\n percent = parseInt(percent.toString().replace('%', ''), 10);\n percent = parseInt(value * percent / 100, 10);\n\n return percent;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/helpers/number.js","/**\n * Utility to register plugins and common namespace for keeping reference to all plugins classes\n */\nimport Hooks from './pluginHooks';\nimport {objectEach} from './helpers/object';\nimport {toUpperCaseFirst} from './helpers/string';\n\nconst registeredPlugins = new WeakMap();\n\n/**\n * Registers plugin under given name\n *\n * @param {String} pluginName\n * @param {Function} PluginClass\n */\nfunction registerPlugin(pluginName, PluginClass) {\n pluginName = toUpperCaseFirst(pluginName);\n\n Hooks.getSingleton().add('construct', function() {\n let holder;\n\n if (!registeredPlugins.has(this)) {\n registeredPlugins.set(this, {});\n }\n holder = registeredPlugins.get(this);\n\n if (!holder[pluginName]) {\n holder[pluginName] = new PluginClass(this);\n }\n });\n Hooks.getSingleton().add('afterDestroy', function() {\n if (registeredPlugins.has(this)) {\n let pluginsHolder = registeredPlugins.get(this);\n\n objectEach(pluginsHolder, (plugin) => plugin.destroy());\n registeredPlugins.delete(this);\n }\n });\n}\n\n/**\n * @param {Object} instance\n * @param {String|Function} pluginName\n * @returns {Function} pluginClass Returns plugin instance if exists or `undefined` if not exists.\n */\nfunction getPlugin(instance, pluginName) {\n if (typeof pluginName != 'string') {\n throw Error('Only strings can be passed as \"plugin\" parameter');\n }\n let _pluginName = toUpperCaseFirst(pluginName);\n\n if (!registeredPlugins.has(instance) || !registeredPlugins.get(instance)[_pluginName]) {\n return void 0;\n }\n\n return registeredPlugins.get(instance)[_pluginName];\n}\n\n/**\n * Get all registred plugins names for concrete Handsontable instance.\n *\n * @param {Object} hotInstance\n * @returns {Array}\n */\nfunction getRegistredPluginNames(hotInstance) {\n return registeredPlugins.has(hotInstance) ? Object.keys(registeredPlugins.get(hotInstance)) : [];\n}\n\n/**\n * Get plugin name.\n *\n * @param {Object} hotInstance\n * @param {Object} plugin\n * @returns {String|null}\n */\nfunction getPluginName(hotInstance, plugin) {\n let pluginName = null;\n\n if (registeredPlugins.has(hotInstance)) {\n objectEach(registeredPlugins.get(hotInstance), (pluginInstance, name) => {\n if (pluginInstance === plugin) {\n pluginName = name;\n }\n });\n }\n\n return pluginName;\n}\n\nexport {registerPlugin, getPlugin, getRegistredPluginNames, getPluginName};\n\n\n\n// WEBPACK FOOTER //\n// src/plugins.js","import {getWindowScrollTop, getWindowScrollLeft} from './element';\n\n/**\n * Prevent other listeners of the same event from being called.\n *\n * @param {Event} event\n */\nexport function stopImmediatePropagation(event) {\n event.isImmediatePropagationEnabled = false;\n event.cancelBubble = true;\n}\n\n/**\n * Check if event was stopped by `stopImmediatePropagation`.\n *\n * @param event {Event}\n * @returns {Boolean}\n */\nexport function isImmediatePropagationStopped(event) {\n return event.isImmediatePropagationEnabled === false;\n}\n\n/**\n * Prevent further propagation of the current event (prevent bubbling).\n *\n * @param event {Event}\n */\nexport function stopPropagation(event) {\n // ie8\n // http://msdn.microsoft.com/en-us/library/ie/ff975462(v=vs.85).aspx\n if (typeof event.stopPropagation === 'function') {\n event.stopPropagation();\n } else {\n event.cancelBubble = true;\n }\n}\n\n/**\n * Get horizontal coordinate of the event object relative to the whole document.\n *\n * @param {Event} event\n * @returns {Number}\n */\nexport function pageX(event) {\n if (event.pageX) {\n return event.pageX;\n }\n\n return event.clientX + getWindowScrollLeft();\n}\n\n/**\n * Get vertical coordinate of the event object relative to the whole document.\n *\n * @param {Event} event\n * @returns {Number}\n */\nexport function pageY(event) {\n if (event.pageY) {\n return event.pageY;\n }\n\n return event.clientY + getWindowScrollTop();\n}\n\n/**\n * Check if provided event was triggered by clicking the right mouse button.\n *\n * @param {Event} event DOM Event.\n * @returns {Boolean}\n */\nexport function isRightClick(event) {\n return event.button === 2;\n}\n\n/**\n * Check if provided event was triggered by clicking the left mouse button.\n *\n * @param {Event} event DOM Event.\n * @returns {Boolean}\n */\nexport function isLeftClick(event) {\n return event.button === 0;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/helpers/dom/event.js","import {arrayEach} from './helpers/array';\nimport {objectEach} from './helpers/object';\n\n/**\n * @description\n * Handsontable events are the common interface that function in 2 ways: as __callbacks__ and as __hooks__.\n *\n * @example\n *\n * ```js\n * // Using events as callbacks:\n * ...\n * var hot1 = new Handsontable(document.getElementById('example1'), {\n * afterChange: function(changes, source) {\n * $.ajax({\n * url: \"save.php',\n * data: change\n * });\n * }\n * });\n * ...\n * ```\n *\n * ```js\n * // Using events as plugin hooks:\n * ...\n * var hot1 = new Handsontable(document.getElementById('example1'), {\n * myPlugin: true\n * });\n *\n * var hot2 = new Handsontable(document.getElementById('example2'), {\n * myPlugin: false\n * });\n *\n * // global hook\n * Handsontable.hooks.add('afterChange', function() {\n * // Fired twice - for hot1 and hot2\n * if (this.getSettings().myPlugin) {\n * // function body - will only run for hot1\n * }\n * });\n *\n * // local hook (has same effect as a callback)\n * hot2.addHook('afterChange', function() {\n * // function body - will only run in #example2\n * });\n * ```\n * ...\n */\n\n// @TODO: Move plugin description hooks to plugin?\nconst REGISTERED_HOOKS = [\n /**\n * Callback fired after resetting a cell's meta.\n *\n * @event Hooks#afterCellMetaReset\n * @since 0.11\n */\n 'afterCellMetaReset',\n\n /**\n * @description\n * Callback fired after one or more cells has been changed. Its main use case is to save the input.\n *\n * __Note:__ For performance reasons, the `changes` array is null for `\"loadData\"` source.\n *\n * @event Hooks#afterChange\n * @param {Array} changes 2D array containing information about each of the edited cells `[[row, prop, oldVal, newVal], ...]`.\n * @param {String} [source] String that identifies source of hook call\n * ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).\n */\n 'afterChange',\n\n /**\n * @description\n * Fired after observing changes.\n *\n * @event Hooks#afterChangesObserved\n */\n 'afterChangesObserved',\n\n /**\n * @description\n * Fired after setting up the Context Menu's default options. These options are a collection which user can select by setting\n * an array of keys or an array of objects in `contextMenu` option.\n *\n * @event Hooks#afterContextMenuDefaultOptions\n * @param {Array} predefinedItems Array of objects containing information about the pre-defined Context Menu items.\n */\n 'afterContextMenuDefaultOptions',\n\n /**\n * @description\n * Fired before setting up the Context Menu's items but after filtering these options by user (`contextMenu` option). This hook\n * can by helpful to determine if user use specified menu item or to set up one of the menu item to by always visible.\n *\n * @event Hooks#beforeContextMenuSetItems\n * @param {Array} menuItems Array of objects containing information about to generated Context Menu items.\n */\n 'beforeContextMenuSetItems',\n\n /**\n * @description\n * Fired after setting up the Context Menu's default options. These options are a collection which user can select by setting\n * an array of keys or an array of objects in `contextMenu` option.\n *\n * @pro\n * @event Hooks#afterDropdownMenuDefaultOptions\n * @param {Array} predefinedItems Array of objects containing information about the pre-defined Context Menu items.\n */\n 'afterDropdownMenuDefaultOptions',\n\n /**\n * @description\n * Fired before setting up the Dropdown Menu's items but after filtering these options by user (`dropdownMenu` option). This hook\n * can by helpful to determine if user use specified menu item or to set up one of the menu item to by always visible.\n *\n * @pro\n * @event Hooks#beforeDropdownMenuSetItems\n * @param {Array} menuItems Array of objects containing information about to generated Dropdown Menu items.\n */\n 'beforeDropdownMenuSetItems',\n\n /**\n * @description\n * Fired after hiding the Context Menu.\n *\n * @event Hooks#afterContextMenuHide\n * @param {Object} context The Context menu instance.\n */\n 'afterContextMenuHide',\n\n /**\n * @description\n * Fired after opening the Context Menu.\n *\n * @event Hooks#afterContextMenuShow\n * @param {Object} context The Context Menu instance.\n */\n 'afterContextMenuShow',\n\n /**\n * @description\n * Fired after reaching the copy limit while copying data.\n *\n * @event Hooks#afterCopyLimit\n * @param {Number} selectedRows Count of selected copyable rows.\n * @param {Number} selectedColumns Count of selected copyable columns.\n * @param {Number} copyRowsLimit Current copy rows limit.\n * @param {Number} copyColumnsLimit Current copy columns limit.\n */\n 'afterCopyLimit',\n\n /**\n * Callback is fired before a new column was created.\n *\n * @since 0.28.0\n * @event Hooks#beforeCreateCol\n * @param {Number} index Represents the index of first newly created column in the data source array.\n * @param {Number} amount Number of newly created columns in the data source array.\n * @param {String} [source] String that identifies source of hook call\n * ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).\n */\n 'beforeCreateCol',\n\n /**\n * Callback is fired after a new column was created.\n *\n * @event Hooks#afterCreateCol\n * @param {Number} index Represents the index of first newly created column in the data source array.\n * @param {Number} amount Number of newly created columns in the data source array.\n * @param {String} [source] String that identifies source of hook call\n * ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).\n */\n 'afterCreateCol',\n\n /**\n * Callback is fired before a new row was created.\n *\n * @since 0.28.0\n * @event Hooks#beforeCreateRow\n * @param {Number} index Represents the index of first newly created row in the data source array.\n * @param {Number} amount Number of newly created rows in the data source array.\n * @param {String} [source] String that identifies source of hook call\n * ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).\n */\n 'beforeCreateRow',\n\n /**\n * Callback is fired after a new row was created.\n *\n * @event Hooks#afterCreateRow\n * @param {Number} index Represents the index of first newly created row in the data source array.\n * @param {Number} amount Number of newly created rows in the data source array.\n * @param {String} [source] String that identifies source of hook call\n * ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).\n */\n 'afterCreateRow',\n\n /**\n * Fired after the current cell is deselected.\n *\n * @event Hooks#afterDeselect\n */\n 'afterDeselect',\n\n /**\n * Fired after destroying the Handsontable instance.\n *\n * @event Hooks#afterDestroy\n */\n 'afterDestroy',\n\n /**\n * Fired on a `keydown` event on the document body.\n *\n * @event Hooks#afterDocumentKeyDown\n * @param {Event} event A `keydown` event.\n */\n 'afterDocumentKeyDown',\n\n /**\n * Callback fired after getting the cell settings.\n *\n * @event Hooks#afterGetCellMeta\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @param {Object} cellProperties Object containing the cell properties.\n */\n 'afterGetCellMeta',\n\n /**\n * Callback fired after retrieving information about a column header and appending it to the table header.\n *\n * @event Hooks#afterGetColHeader\n * @param {Number} col Column index.\n * @param {Element} TH Header's TH element.\n */\n 'afterGetColHeader',\n\n /**\n * Callback fired after retrieving information about a column header and appending it to the table header.\n *\n * @event Hooks#afterGetRowHeader\n * @param {Number} row Row index.\n * @param {Element} TH Header's TH element.\n */\n 'afterGetRowHeader',\n\n /**\n * Callback fired after Handsontable instance is initiated.\n *\n * @event Hooks#afterInit\n */\n 'afterInit',\n\n /**\n * Callback fired after new data is loaded (by `loadData` method) into the data source array.\n *\n * @event Hooks#afterLoadData\n * @param {Boolean} firstTime flag that determines whether the data has been loaded during the initialization.\n */\n 'afterLoadData',\n\n /**\n * Fired after a scroll event, which is identified as a momentum scroll (e.g. on an iPad).\n *\n * @event Hooks#afterMomentumScroll\n */\n 'afterMomentumScroll',\n\n /**\n * Fired after a `mousedown` event is triggered on the cell corner (the drag handle).\n *\n * @event Hooks#afterOnCellCornerMouseDown\n * @since 0.11\n * @param {Object} event `mousedown` event object.\n */\n 'afterOnCellCornerMouseDown',\n\n /**\n * Fired after a `dblclick` event is triggered on the cell corner (the drag handle).\n *\n * @event Hooks#afterOnCellCornerDblClick\n * @since 0.30.0\n * @param {Object} event `dblclick` event object.\n */\n 'afterOnCellCornerDblClick',\n\n /**\n * Callback fired after clicking on a cell or row/column header.\n * In case the row/column header was clicked, the index is negative.\n * For example clicking on the row header of cell (0, 0) results with `afterOnCellMouseDown` called\n * with coords `{row: 0, col: -1}`.\n *\n * @event Hooks#afterOnCellMouseDown\n * @since 0.11\n * @param {Object} event `mousedown` event object.\n * @param {Object} coords Coordinates object containing the row and column indexes of the clicked cell.\n * @param {Element} TD Cell's TD (or TH) element.\n */\n 'afterOnCellMouseDown',\n\n /**\n * Callback fired after hovering a cell or row/column header with the mouse cursor.\n * In case the row/column header was hovered, the index is negative.\n * For example, hovering over the row header of cell (0, 0) results with `afterOnCellMouseOver` called\n * with coords `{row: 0, col: -1}`.\n *\n * @event Hooks#afterOnCellMouseOver\n * @since 0.11\n * @param {Object} event `mouseover` event object.\n * @param {Object} coords Hovered cell's coordinate object.\n * @param {Element} TD Cell's TD (or TH) element.\n */\n 'afterOnCellMouseOver',\n\n /**\n * Callback fired after leaving a cell or row/column header with the mouse cursor.\n *\n * @event Hooks#afterOnCellMouseOver\n * @since 0.31.1\n * @param {Object} event `mouseout` event object.\n * @param {Object} coords Leaved cell's coordinate object.\n * @param {Element} TD Cell's TD (or TH) element.\n */\n 'afterOnCellMouseOut',\n\n /**\n * Callback is fired when one or more columns are removed.\n *\n * @event Hooks#afterRemoveCol\n * @param {Number} index Is an index of starter column.\n * @param {Number} amount Is an amount of removed columns.\n */\n 'afterRemoveCol',\n\n /**\n * Callback is fired when one or more rows are removed.\n *\n * @event Hooks#afterRemoveRow\n * @param {Number} index Is an index of starter row.\n * @param {Number} amount Is an amount of removed rows.\n */\n 'afterRemoveRow',\n\n /**\n * Callback fired after the Handsontable table is rendered.\n *\n * @event Hooks#afterRender\n * @param {Boolean} isForced Is `true` if rendering was triggered by a change of settings or data; or `false` if\n * rendering was triggered by scrolling or moving selection.\n */\n 'afterRender',\n\n /**\n * Fired before starting rendering the cell.\n *\n * @event Hooks#beforeRenderer\n * @since 0.24.2\n * @param {Element} TD Currently rendered cell's TD element.\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @param {String|Number} prop Column property name or a column index, if datasource is an array of arrays.\n * @param {String} value Value of the rendered cell.\n * @param {Object} cellProperties Object containing the cell's properties.\n */\n 'beforeRenderer',\n\n /**\n * Fired after finishing rendering the cell (after the renderer finishes).\n *\n * @event Hooks#afterRenderer\n * @since 0.11.0\n * @param {Element} TD Currently rendered cell's TD element.\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @param {String|Number} prop Column property name or a column index, if datasource is an array of arrays.\n * @param {String} value Value of the rendered cell.\n * @param {Object} cellProperties Object containing the cell's properties.\n */\n 'afterRenderer',\n\n /**\n * Fired after the horizontal scroll event.\n *\n * @event Hooks#afterScrollHorizontally\n * @since 0.11\n */\n 'afterScrollHorizontally',\n\n /**\n * Fired after the vertical scroll event.\n *\n * @event Hooks#afterScrollVertically\n * @since 0.11\n */\n 'afterScrollVertically',\n\n /**\n * Callback fired after one or more cells are selected (e.g. during mouse move).\n *\n * @event Hooks#afterSelection\n * @param {Number} r Selection start row index.\n * @param {Number} c Selection start column index.\n * @param {Number} r2 Selection end row index.\n * @param {Number} c2 Selection end column index.\n * @param {Object} preventScrolling Object with `value` property where its value change will be observed.\n * * @example\n * ```js\n * handsontable({\n * afterSelection: function (r, c, r2, c2, preventScrolling) {\n * // setting if prevent scrolling after selection\n *\n * preventScrolling.value = true;\n * }\n * })\n * ```\n */\n 'afterSelection',\n\n /**\n * Callback fired after one or more cells are selected. The `p` argument represents the source object property name instead of the column number.\n *\n * @event Hooks#afterSelectionByProp\n * @param {Number} r Selection start row index.\n * @param {String} p Selection start data source object property name.\n * @param {Number} r2 Selection end row index.\n * @param {String} p2 Selection end data source object property name.\n * @param {Object} preventScrolling Object with `value` property where its value change will be observed.\n * * @example\n * ```js\n * handsontable({\n * afterSelectionByProp: function (r, c, r2, c2, preventScrolling) {\n * // setting if prevent scrolling after selection\n *\n * preventScrolling.value = true;\n * }\n * })\n * ```\n */\n 'afterSelectionByProp',\n\n /**\n * Callback fired after one or more cells are selected (e.g. on mouse up).\n *\n * @event Hooks#afterSelectionEnd\n * @param {Number} r Selection start row index.\n * @param {Number} c Selection start column index.\n * @param {Number} r2 Selection end row index.\n * @param {Number} c2 Selection end column index.\n */\n 'afterSelectionEnd',\n\n /**\n * Callback fired after one or more cells are selected (e.g. on mouse up). The `p` argument represents the data source object\n * property name instead of the column number.\n *\n * @event Hooks#afterSelectionEndByProp\n * @param {Number} r Selection start row index.\n * @param {String} p Selection start data source object property index.\n * @param {Number} r2 Selection end row index.\n * @param {String} p2 Selection end data source object property index.\n */\n 'afterSelectionEndByProp',\n\n /**\n * Called after cell meta is changed.\n *\n * @event Hooks#afterSetCellMeta\n * @since 0.11.0\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @param {String} key The updated meta key.\n * @param {*} value The updated meta value.\n */\n 'afterSetCellMeta',\n\n /**\n * Called after cell data was changed.\n *\n * @event Hooks#afterSetDataAtCell\n * @since 0.28.0\n * @param {Array} changes An array of changes in format `[[row, col, oldValue, value], ...]`.\n * @param {String} [source] String that identifies source of hook call\n * ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).\n */\n 'afterSetDataAtCell',\n\n /**\n * Called after cell data was changed.\n *\n * @event Hooks#afterSetDataAtRowProp\n * @since 0.28.0\n * @param {Array} changes An array of changes in format `[[row, prop, oldValue, value], ...]`.\n * @param {String} [source] String that identifies source of hook call\n * ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).\n */\n 'afterSetDataAtRowProp',\n\n /**\n * Fired after calling the `updateSettings` method.\n *\n * @event Hooks#afterUpdateSettings\n */\n 'afterUpdateSettings',\n\n /**\n * @description\n * A plugin hook executed after validator function, only if validator function is defined.\n * Validation result is the first parameter. This can be used to determinate if validation passed successfully or not.\n *\n * __Returning false from the callback will mark the cell as invalid.__\n *\n * @event Hooks#afterValidate\n * @since 0.9.5\n * @param {Boolean} isValid `true` if valid, `false` if not.\n * @param {*} value The value in question.\n * @param {Number} row Row index.\n * @param {String|Number} prop Property name / column index.\n * @param {String} [source] String that identifies source of hook call\n * ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).\n */\n 'afterValidate',\n\n /**\n * Fired before populating the data in the autofill feature.\n *\n * @event Hooks#beforeAutofill\n * @param {Object} start Object containing information about first filled cell: `{row: 2, col: 0}`.\n * @param {Object} end Object containing information about last filled cell: `{row: 4, col: 1}`.\n * @param {Array} data 2D array containing information about fill pattern: `[[\"1', \"Ted\"], [\"1', \"John\"]]`.\n */\n 'beforeAutofill',\n\n /**\n * Fired before aligning the cell contents.\n *\n * @event Hooks#beforeCellAlignment\n * @param stateBefore\n * @param range\n * @param {String} type Type of the alignment - either `horizontal` or `vertical`\n * @param {String} alignmentClass String defining the alignment class added to the cell.\n * Possible values:\n * * `htLeft`,\n * * `htCenter`,\n * * `htRight`,\n * * `htJustify`\n * for horizontal alignment,\n *\n *\n * * `htTop`,\n * * `htMiddle`,\n * * `htBottom`\n * for vertical alignment.\n */\n 'beforeCellAlignment',\n\n /**\n * Callback fired before one or more cells is changed. Its main purpose is to alter changes silently before input.\n *\n * @event Hooks#beforeChange\n * @param {Array} changes 2D array containing information about each of the edited cells.\n * @param {String} [source] String that identifies source of hook call\n * ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).\n * @example\n * ```js\n * // To disregard a single change, set changes[i] to null or remove it from array using changes.splice(i, 1).\n * ...\n * new Handsontable(document.getElementById('example'), {\n * beforeChange: function(changes, source) {\n * // [[row, prop, oldVal, newVal], ...]\n * changes[0] = null;\n * }\n * });\n * ...\n *\n * // To alter a single change, overwrite the desired value to changes[i][3].\n * ...\n * new Handsontable(document.getElementById('example'), {\n * beforeChange: function(changes, source) {\n * // [[row, prop, oldVal, newVal], ...]\n * changes[0][3] = 10;\n * }\n * });\n * ...\n *\n * // To cancel all edit, return false from the callback or set array length to 0 (changes.length = 0).\n * ...\n * new Handsontable(document.getElementById('example'), {\n * beforeChange: function(changes, source) {\n * // [[row, prop, oldVal, newVal], ...]\n * return false;\n * }\n * });\n * ...\n * ```\n */\n 'beforeChange',\n\n /**\n * Fired right before rendering the changes.\n *\n * @event Hooks#beforeChangeRender\n * @since 0.11\n * @param {Array} changes Array in form of [row, prop, oldValue, newValue].\n * @param {String} [source] String that identifies source of hook call\n * ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).\n */\n 'beforeChangeRender',\n\n /**\n * Fired before drawing the borders.\n *\n * @event Hooks#beforeDrawBorders\n * @param {Array} corners Array specifying the current selection borders.\n * @param {String} borderClassName Specifies the border class name.\n */\n 'beforeDrawBorders',\n\n /**\n * Callback fired before getting cell settings.\n *\n * @event Hooks#beforeGetCellMeta\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @param {Object} cellProperties Object containing the cell's properties.\n */\n 'beforeGetCellMeta',\n\n /**\n * @description\n * Callback fired before Handsontable instance is initiated.\n *\n * @event Hooks#beforeInit\n */\n 'beforeInit',\n\n /**\n * Callback fired before Walkontable instance is initiated.\n *\n * @since 0.11\n * @event Hooks#beforeInitWalkontable\n * @param {Object} walkontableConfig Walkontable configuration object.\n */\n 'beforeInitWalkontable',\n\n /**\n * Callback fired before keydown event is handled. It can be used to overwrite default key bindings.\n * Caution - in your `beforeKeyDown` handler you need to call `event.stopImmediatePropagation()` to prevent default key behavior.\n *\n * @event Hooks#beforeKeyDown\n * @since 0.9.0\n * @param {Event} event Original DOM event.\n */\n 'beforeKeyDown',\n\n /**\n * Fired after the user clicked a cell, but before all the calculations related with it.\n *\n * @event Hooks#beforeOnCellMouseDown\n * @param {Event} event The `mousedown` event object.\n * @param {CellCoords} coords CellCoords object containing the coordinates of the clicked cell.\n * @param {Element} TD TD element.\n */\n 'beforeOnCellMouseDown',\n\n /**\n * Fired after the user moved cursor over a cell, but before all the calculations related with it.\n *\n * @event Hooks#beforeOnCellMouseOver\n * @param {Event} event The `mouseover` event object.\n * @param {CellCoords} coords CellCoords object containing the coordinates of the clicked cell.\n * @param {Element} TD TD element.\n * @param {Object} blockCalculations Contain keys 'row' and 'column' with boolean value.\n */\n 'beforeOnCellMouseOver',\n\n /**\n * Fired after the user moved cursor out from a cell, but before all the calculations related with it.\n *\n * @event Hooks#beforeOnCellMouseOut\n * @since 0.31.1\n * @param {Event} event The `mouseout` event object.\n * @param {WalkontableCellCoords} coords WalkontableCellCoords object containing the coordinates of the leaved cell.\n * @param {Element} TD TD element.\n */\n 'beforeOnCellMouseOut',\n\n /**\n * Callback is fired when one or more columns are about to be removed.\n *\n * @event Hooks#beforeRemoveCol\n * @param {Number} index Index of starter column.\n * @param {Number} amount Amount of columns to be removed.\n * @param {Array} [logicalCols] Consists of logical indexes of processed columns.\n */\n 'beforeRemoveCol',\n\n /**\n * Callback is fired when one or more rows are about to be removed.\n *\n * @event Hooks#beforeRemoveRow\n * @param {Number} index Index of starter column.\n * @param {Number} amount Amount of columns to be removed.\n * @param {Array} [logicalRows] Consists of logical indexes of processed rows.\n */\n 'beforeRemoveRow',\n\n /**\n * Callback fired before Handsontable table is rendered.\n *\n * @event Hooks#beforeRender\n * @param {Boolean} isForced If `true` rendering was triggered by a change of settings or data; or `false` if\n * rendering was triggered by scrolling or moving selection.\n */\n 'beforeRender',\n\n /**\n * Callback fired before setting range is started.\n *\n * @event Hooks#beforeSetRangeStart\n * @param {Array} coords CellCoords array.\n */\n 'beforeSetRangeStart',\n\n /**\n * Callback fired before setting range is ended.\n *\n * @event Hooks#beforeSetRangeEnd\n * @param {Array} coords CellCoords array.\n */\n 'beforeSetRangeEnd',\n\n /**\n * Fired before the logic of handling a touch scroll, when user started scrolling on a touch-enabled device.\n *\n * @event Hooks#beforeTouchScroll\n */\n 'beforeTouchScroll',\n\n /**\n * @description\n * A plugin hook executed before validator function, only if validator function is defined.\n * This can be used to manipulate the value of changed cell before it is applied to the validator function.\n *\n * __Notice:__ this will not affect values of changes. This will change value ONLY for validation!\n *\n * @event Hooks#beforeValidate\n * @since 0.9.5\n * @param {*} value Value of the cell.\n * @param {Number} row Row index.\n * @param {String|Number} prop Property name / column index.\n * @param {String} [source] String that identifies source of hook call\n * ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).\n */\n 'beforeValidate',\n\n /**\n * Callback fired before cell value is rendered into the DOM (through renderer function).\n *\n * @event Hooks#beforeValueRender\n * @since 0.29.0\n * @param {*} value Cell value to render.\n */\n 'beforeValueRender',\n\n /**\n * Callback fired after Handsontable instance is constructed (via `new` operator).\n *\n * @event Hooks#construct\n * @since 0.16.1\n */\n 'construct',\n\n /**\n * Callback fired after Handsontable instance is initiated but before table is rendered.\n *\n * @event Hooks#init\n * @since 0.16.1\n */\n 'init',\n\n /**\n * Fired when a column index is about to be modified by a callback function.\n *\n * @event Hooks#modifyCol\n * @since 0.11\n * @param {Number} col Column index.\n */\n 'modifyCol',\n\n /**\n * Fired when a column index is about to be de-modified by a callback function.\n *\n * @event Hooks#unmodifyCol\n * @since 0.23.0\n * @param {Number} col Column index.\n */\n 'unmodifyCol',\n\n /**\n * Fired when a row index is about to be de-modified by a callback function.\n *\n * @event Hooks#unmodifyRow\n * @since 0.26.2\n * @param {Number} row Logical row index.\n */\n 'unmodifyRow',\n /**\n * Fired when a column header index is about to be modified by a callback function.\n *\n * @event Hooks#modifyColHeader\n * @since 0.20.0\n * @param {Number} column Column header index.\n */\n 'modifyColHeader',\n\n /**\n * Fired when a column width is about to be modified by a callback function.\n *\n * @event Hooks#modifyColWidth\n * @since 0.11\n * @param {Number} width Current column width.\n * @param {Number} col Column index.\n */\n 'modifyColWidth',\n\n /**\n * Fired when a row index is about to be modified by a callback function.\n *\n * @event Hooks#modifyRow\n * @since 0.11\n * @param {Number} row Row index.\n */\n 'modifyRow',\n\n /**\n * Fired when a row header index is about to be modified by a callback function.\n *\n * @event Hooks#modifyRowHeader\n * @since 0.20.0\n * @param {Number} row Row header index.\n */\n 'modifyRowHeader',\n\n /**\n * Fired when a row height is about to be modified by a callback function.\n *\n * @event Hooks#modifyRowHeight\n * @since 0.11.0\n * @param {Number} height Row height.\n * @param {Number} row Row index.\n */\n 'modifyRowHeight',\n\n /**\n * Fired when a data was retrieved or modified.\n *\n * @event Hooks#modifyData\n * @since 0.28.0\n * @param {Number} row Row height.\n * @param {Number} column Column index.\n * @param {Object} valueHolder Object which contains original value which can be modified by overwriting `.value` property.\n * @param {String} ioMode String which indicates for what operation hook is fired (`get` or `set`).\n */\n 'modifyData',\n\n /**\n * Fired when a data was retrieved or modified.\n *\n * @event Hooks#modifyRowSourceData\n * @since 0.28.0\n * @param {Number} row Row logical index.\n */\n 'modifyRowData',\n\n /**\n * Fired after loading data using the Persistent State plugin.\n *\n * @event Hooks#persistentStateLoad\n * @param {String} key Key string.\n * @param {Object} valuePlaceholder Object containing the loaded data.\n */\n 'persistentStateLoad',\n\n /**\n * Fired after resetting data using the Persistent State plugin.\n *\n * @event Hooks#persistentStateReset\n * @param {String} key Key string.\n */\n 'persistentStateReset',\n\n /**\n * Fired after resetting data using the Persistent State plugin.\n *\n * @event Hooks#persistentStateSave\n * @param {String} key Key string.\n * @param {Mixed} value Value to save.\n */\n 'persistentStateSave',\n\n /**\n * Fired before sorting the column. If you return `false` value then sorting will be not applied by\n * Handsontable (useful for server-side sorting).\n *\n * @event Hooks#beforeColumnSort\n * @param {Number} column Sorted column index.\n * @param {Boolean} order Soring order where:\n * * `true` means ascending order,\n * * `false` means descending order,\n * * `undefined` means original order.\n */\n 'beforeColumnSort',\n\n /**\n * Fired after sorting the column.\n *\n * @event Hooks#afterColumnSort\n * @param {Number} column Sorted column index.\n * @param {Boolean} order Soring order where:\n * * `true` means ascending order\n * * `false` means descending order\n * * `undefined` means original order\n */\n 'afterColumnSort',\n\n /**\n * @description\n * Fired after setting range of autofill.\n * Both arguments are provided in the following format:\n * ```js\n * [startRow, startColumn, endRow, endColumn]\n * ```\n *\n * @event Hooks#modifyAutofillRange\n * @param {Array} startArea Array of coordinates of the starting point for the drag-down operation.\n * @param {Array} entireArea Array of coordinates of the entire area of the drag-down operation.\n */\n 'modifyAutofillRange',\n\n /**\n * Fired to allow modifying the copyable range with a callback function.\n *\n * @since 0.19.0\n * @event Hooks#modifyCopyableRange\n * @param {Array} copyableRanges Array of objects defining copyable cells.\n */\n 'modifyCopyableRange',\n\n /**\n * Called before copying the values into clipboard and before clearing values of the selected cells.\n *\n * @event Hooks#beforeCut\n * @since 0.31.1\n * @param {Array} data An array of arrays which contains data to cut.\n * @param {Array} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)\n * which will be cut out.\n * @returns {*} If returns `false` then operation of the cutting out is cancelled.\n *\n * @example\n * ```js\n * // To disregard a single row, remove it from array using data.splice(i, 1).\n * ...\n * new Handsontable(document.getElementById('example'), {\n * beforeCut: function(data, coords) {\n * // data -> [[1, 2, 3], [4, 5, 6]]\n * data.splice(0, 1);\n * // data -> [[4, 5, 6]]\n * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]\n * }\n * });\n * ...\n *\n * // To cancel cutting out, return false from the callback.\n * ...\n * new Handsontable(document.getElementById('example'), {\n * beforeCut: function(data, coords) {\n * return false;\n * }\n * });\n * ...\n * ```\n */\n 'beforeCut',\n\n /**\n * Fired after data are cutted out from the table.\n *\n * @event Hooks#afterCut\n * @since 0.31.1\n * @param {Array} data An array of arrays which contains the cutted out data.\n * @param {Array} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)\n * which was cut out.\n */\n 'afterCut',\n\n /**\n * Fired before values are copied into clipboard.\n *\n * @event Hooks#beforeCopy\n * @since 0.31.1\n * @param {Array} data An array of arrays which contains data to copied.\n * @param {Array} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)\n * which will copied.\n * @returns {*} If returns `false` then copying is cancelled.\n *\n * @example\n * ```js\n * // To disregard a single row, remove it from array using data.splice(i, 1).\n * ...\n * new Handsontable(document.getElementById('example'), {\n * beforeCopy: function(data, coords) {\n * // data -> [[1, 2, 3], [4, 5, 6]]\n * data.splice(0, 1);\n * // data -> [[4, 5, 6]]\n * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]\n * }\n * });\n * ...\n *\n * // To cancel copying, return false from the callback.\n * ...\n * new Handsontable(document.getElementById('example'), {\n * beforeCopy: function(data, coords) {\n * return false;\n * }\n * });\n * ...\n * ```\n */\n 'beforeCopy',\n\n /**\n * Fired after data are pasted into table.\n *\n * @event Hooks#afterCopy\n * @since 0.31.1\n * @param {Array} data An array of arrays which contains the copied data.\n * @param {Array} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)\n * which was copied.\n */\n 'afterCopy',\n\n /**\n * Fired before values are pasted into table.\n *\n * @event Hooks#beforePaste\n * @since 0.31.1\n * @param {Array} data An array of arrays which contains data to paste.\n * @param {Array} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)\n * where changes will be inserted.\n * @returns {*} If returns `false` then pasting is cancelled.\n *\n * @example\n * ```js\n * // To disregard a single row, remove it from array using data.splice(i, 1).\n * ...\n * new Handsontable(document.getElementById('example'), {\n * beforePaste: function(data, coords) {\n * // data -> [[1, 2, 3], [4, 5, 6]]\n * data.splice(0, 1);\n * // data -> [[4, 5, 6]]\n * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]\n * }\n * });\n * ...\n *\n * // To cancel pasting, return false from the callback.\n * ...\n * new Handsontable(document.getElementById('example'), {\n * beforePaste: function(data, coords) {\n * return false;\n * }\n * });\n * ...\n * ```\n */\n 'beforePaste',\n\n /**\n * Fired after values are pasted into table.\n *\n * @event Hooks#afterePaste\n * @since 0.31.1\n * @param {Array} data An array of arrays which contains the pasted data.\n * @param {Array} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)\n * where changes was inserted.\n */\n 'afterPaste',\n\n /**\n * Fired before change order of the logical indexes.\n *\n * @event Hooks#beforeColumnMove\n * @param {Array} columns Array of visual column indexes to be moved.\n * @param {Number} target Visual column index being a target for moved columns.\n */\n 'beforeColumnMove',\n\n /**\n * Fired after change order of the logical indexes.\n *\n * @event Hooks#afterColumnMove\n * @param {Array} columns Array of visual column indexes that were moved.\n * @param {Number} target Visual column index being a target for moved columns.\n */\n 'afterColumnMove',\n\n /**\n * Fired before change order of the logical indexes.\n *\n * @event Hooks#beforeRowMove\n * @param {Array} rows Array of visual row indexes to be moved.\n * @param {Number} target Visual row index being a target for moved rows.\n */\n 'beforeRowMove',\n\n /**\n * Fired after change order of the logical indexes.\n *\n * @event Hooks#afterRowMove\n * @param {Array} rows Array of visual row indexes that were moved.\n * @param {Number} target Visual row index being a target for moved rows.\n */\n 'afterRowMove',\n\n /**\n * Fired before rendering the table with modified column sizes.\n *\n * @event Hooks#beforeColumnResize\n * @param {Number} currentColumn Index of the resized column.\n * @param {Number} newSize Calculated new column width.\n * @param {Boolean} isDoubleClick Flag that determines whether there was a double-click.\n * @returns {Number} Returns a new column size or `undefined`, if column size should be calculated automatically.\n */\n 'beforeColumnResize',\n\n /**\n * Fired after rendering the table with modified column sizes.\n *\n * @event Hooks#afterColumnResize\n * @param {Number} currentColumn Index of the resized column.\n * @param {Number} newSize Calculated new column width.\n * @param {Boolean} isDoubleClick Flag that determines whether there was a double-click.\n */\n 'afterColumnResize',\n\n /**\n * Fired before rendering the table with modified row sizes.\n *\n * @event Hooks#beforeRowResize\n * @param {Number} currentRow Index of the resized row.\n * @param {Number} newSize Calculated new row height.\n * @param {Boolean} isDoubleClick Flag that determines whether there was a double-click.\n * @returns {Number} Returns the new row size or `undefined` if row size should be calculated automatically.\n */\n 'beforeRowResize',\n\n /**\n * Fired after rendering the table with modified row sizes.\n *\n * @event Hooks#afterRowResize\n * @param {Number} currentRow Index of the resized row.\n * @param {Number} newSize Calculated new row height.\n * @param {Boolean} isDoubleClick Flag that determines whether there was a double-click.\n */\n 'afterRowResize',\n\n /**\n * Fired after getting the column header renderers.\n *\n * @event Hooks#afterGetColumnHeaderRenderers\n * @param {Array} array Array of the column header renderers.\n */\n 'afterGetColumnHeaderRenderers',\n\n /**\n * Fired after getting the row header renderers.\n *\n * @event Hooks#afterGetRowHeaderRenderers\n * @param {Array} array Array of the row header renderers.\n */\n 'afterGetRowHeaderRenderers',\n\n /**\n * Fired before applying stretched column width to column.\n *\n * @event Hooks#beforeStretchingColumnWidth\n * @param {Number} stretchedWidth Calculated width.\n * @param {Number} column Column index.\n * @returns {Number} Returns new width which will be applied to the column element.\n */\n 'beforeStretchingColumnWidth',\n\n /**\n * Fired before applying [filtering]{@link http://docs.handsontable.com/pro/demo-filtering.html}.\n *\n * @pro\n * @event Hooks#beforeFilter\n * @param {Array} formulasStack An array of objects with added formulas.\n * @returns {Boolean} If hook returns `false` value then filtering won't be applied on the UI side (server-side filtering).\n */\n 'beforeFilter',\n\n /**\n * Fired after applying [filtering]{@link http://docs.handsontable.com/pro/demo-filtering.html}.\n *\n * @pro\n * @event Hooks#afterFilter\n * @param {Array} formulasStack An array of objects with added formulas.\n */\n 'afterFilter',\n\n /**\n * Used to modify the column header height.\n *\n * @event Hooks#modifyColumnHeaderHeight\n * @since 0.25.0\n * @param {Number} col Column index.\n */\n 'modifyColumnHeaderHeight',\n\n /**\n * Fired before the undo action. Contains information about the action that is being undone.\n *\n * @event Hooks#beforeUndo\n * @since 0.26.2\n * @param {Object} action The action object. Contains information about the action being undone. The `actionType`\n * property of the object specifies the type of the action in a String format. (e.g. `'remove_row'`).\n */\n 'beforeUndo',\n\n /**\n * Fired after the undo action. Contains information about the action that is being undone.\n *\n * @event Hooks#afterUndo\n * @since 0.26.2\n * @param {Object} action The action object. Contains information about the action being undone. The `actionType`\n * property of the object specifies the type of the action in a String format. (e.g. `'remove_row'`).\n */\n 'afterUndo',\n\n /**\n * Fired before the redo action. Contains information about the action that is being redone.\n *\n * @event Hooks#beforeRedo\n * @since 0.26.2\n * @param {Object} action The action object. Contains information about the action being redone. The `actionType`\n * property of the object specifies the type of the action in a String format. (e.g. `'remove_row'`).\n */\n 'beforeRedo',\n\n /**\n * Fired after the redo action. Contains information about the action that is being redone.\n *\n * @event Hooks#afterRedo\n * @since 0.26.2\n * @param {Object} action The action object. Contains information about the action being redone. The `actionType`\n * property of the object specifies the type of the action in a String format. (e.g. `'remove_row'`).\n */\n 'afterRedo',\n\n /**\n * Used to modify the row header width.\n *\n * @event Hooks#modifyRowHeaderWidth\n * @param {Number} rowHeaderWidth Row header width.\n */\n 'modifyRowHeaderWidth',\n\n /**\n * Fired from the `populateFromArray` method during the `autofill` process. Fired for each \"autofilled\" cell individually.\n *\n * @event Hooks#beforeAutofillInsidePopulate\n * @param {Object} index Object containing `row` and `col` properties, defining the number of rows/columns from the initial cell of the autofill.\n * @param {String} direction Declares the direction of the autofill. Possible values: `up`, `down`, `left`, `right`.\n * @param {Array} input Array of arrays. Contains an array of rows with data being used in the autofill.\n * @param {Array} deltas The deltas array passed to the `populateFromArray` method.\n */\n 'beforeAutofillInsidePopulate',\n\n /**\n * Fired when the start of the selection is being modified. (e.g. moving the selection with the arrow keys).\n *\n * @event Hooks#modifyTransformStart\n * @param {CellCoords} delta Cell coords object declaring the delta of the new selection relative to the previous one.\n */\n 'modifyTransformStart',\n\n /**\n * Fired when the end of the selection is being modified. (e.g. moving the selection with the arrow keys).\n *\n * @event Hooks#modifyTransformEnd\n * @param {CellCoords} delta Cell coords object declaring the delta of the new selection relative to the previous one.\n */\n 'modifyTransformEnd',\n\n /**\n * Fired after the start of the selection is being modified. (e.g. moving the selection with the arrow keys).\n *\n * @event Hooks#afterModifyTransformStart\n * @param {CellCoords} coords Coords of the freshly selected cell.\n * @param {Number} rowTransformDir `-1` if trying to select a cell with a negative row index. `0` otherwise.\n * @param {Number} colTransformDir `-1` if trying to select a cell with a negative column index. `0` otherwise.\n */\n 'afterModifyTransformStart',\n\n /**\n * Fired after the end of the selection is being modified. (e.g. moving the selection with the arrow keys).\n *\n * @event Hooks#afterModifyTransformEnd\n * @param {CellCoords} coords Coords of the freshly selected cell.\n * @param {Number} rowTransformDir `-1` if trying to select a cell with a negative row index. `0` otherwise.\n * @param {Number} colTransformDir `-1` if trying to select a cell with a negative column index. `0` otherwise.\n */\n 'afterModifyTransformEnd',\n\n /**\n * Fired before rendering a cell value.\n *\n * @event Hooks#beforeValueRender\n * @param {Mixed} value The rendered value.\n */\n 'beforeValueRender',\n\n /**\n * Fired inside the `viewportRowCalculatorOverride` method. Allows modifying the row calculator parameters.\n *\n * @event Hooks#afterViewportRowCalculatorOverride\n * @param {Object} calc The row calculator.\n */\n 'afterViewportRowCalculatorOverride',\n\n /**\n * Fired inside the `viewportColumnCalculatorOverride` method. Allows modifying the row calculator parameters.\n *\n * @event Hooks#afterViewportColumnCalculatorOverride\n * @param {Object} calc The row calculator.\n */\n 'afterViewportColumnCalculatorOverride',\n\n /**\n * Fired after initializing all the plugins.\n *\n * @event Hooks#afterPluginsInitialized\n */\n 'afterPluginsInitialized',\n\n /**\n * Used when saving/loading the manual row heights state.\n *\n * @event Hooks#manualRowHeights\n * @param {Array} state The current manual row heights state.\n */\n 'manualRowHeights',\n\n /**\n * Used to skip the length cache calculation for a defined period of time.\n *\n * @event Hooks#skipLengthCache\n * @param {Number} delay The delay in milliseconds.\n */\n 'skipLengthCache',\n\n /**\n * Fired after trimming rows in the TrimRows plugin.\n *\n * @pro\n * @event Hooks#afterTrimRow\n * @param {Array} rows Indexes of trimmed rows.\n */\n 'afterTrimRow',\n\n /**\n * Fired after untrimming rows in the TrimRows plugin.\n *\n * @pro\n * @event Hooks#afterUntrimRow\n * @param {Array} rows Indexes of untrimmed rows.\n */\n 'afterUntrimRow',\n\n /**\n * Fired after opening the dropdown menu.\n *\n * @pro\n * @event Hooks#afterDropdownMenuShow\n * @param {DropdownMenu} instance The DropdownMenu instance.\n */\n 'afterDropdownMenuShow',\n\n /**\n * Fired after hiding the dropdown menu.\n *\n * @pro\n * @event Hooks#afterDropdownMenuHide\n * @param {DropdownMenu} instance The DropdownMenu instance.\n */\n 'afterDropdownMenuHide',\n\n /**\n * Used to check whether the provided row index is hidden.\n *\n * @pro\n * @event Hooks#hiddenRow\n * @param {Number} row The row index in question.\n */\n 'hiddenRow',\n\n /**\n * Used to check whether the provided column index is hidden.\n *\n * @pro\n * @event Hooks#hiddenColumn\n * @param {Number} column The column index in question.\n */\n 'hiddenColumn',\n\n /**\n * Fired before adding a children to the NestedRows structure.\n *\n * @pro\n * @event Hooks#beforeAddChild\n * @param {Object} parent The parent object.\n * @param {Object|undefined} element The element added as a child. If `undefined`, a blank child was added.\n * @param {Number|undefined} index The index within the parent where the new child was added. If `undefined`, the element was added as the last child.\n */\n 'beforeAddChild',\n\n /**\n * Fired after adding a children to the NestedRows structure.\n *\n * @pro\n * @event Hooks#afterAddChild\n * @param {Object} parent The parent object.\n * @param {Object|undefined} element The element added as a child. If `undefined`, a blank child was added.\n * @param {Number|undefined} index The index within the parent where the new child was added. If `undefined`, the element was added as the last child.\n */\n 'afterAddChild',\n\n /**\n * Fired before detaching a child from its parent in the NestedRows plugin.\n *\n * @pro\n * @event Hooks#beforeDetachChild\n * @param {Object} parent An object representing the parent from which the element is to be detached.\n * @param {Object} element The detached element.\n */\n 'beforeDetachChild',\n\n /**\n * Fired after detaching a child from its parent in the NestedRows plugin.\n *\n * @pro\n * @event Hooks#afterDetachChild\n * @param {Object} parent An object representing the parent from which the element was detached.\n * @param {Object} element The detached element.\n */\n 'afterDetachChild',\n\n /**\n * Fired after the editor is opened and rendered.\n *\n * @event Hooks#afterBeginEditing\n * @param {Number} row Row index of the edited cell.\n * @param {Number} column Column index of the edited cell.\n */\n 'afterBeginEditing'\n];\n\nclass Hooks {\n static getSingleton() {\n return globalSingleton;\n }\n\n /**\n *\n */\n constructor() {\n this.globalBucket = this.createEmptyBucket();\n }\n\n /**\n * Returns a new object with empty handlers related to every registered hook name.\n *\n * @returns {Object} The empty bucket object.\n *\n * @example\n * ```js\n * Handsontable.hooks.createEmptyBucket();\n * // Results:\n * {\n * ...\n * afterCreateCol: [],\n * afterCreateRow: [],\n * beforeInit: [],\n * ...\n * }\n * ```\n */\n createEmptyBucket() {\n const bucket = Object.create(null);\n\n arrayEach(REGISTERED_HOOKS, (hook) => (bucket[hook] = []));\n\n return bucket;\n }\n\n /**\n * Get hook bucket based on the context of the object or if argument is `undefined`, get the global hook bucket.\n *\n * @param {Object} [context=null] A Handsontable instance.\n * @returns {Object} Returns a global or Handsontable instance bucket.\n */\n getBucket(context = null) {\n if (context) {\n if (!context.pluginHookBucket) {\n context.pluginHookBucket = this.createEmptyBucket();\n }\n\n return context.pluginHookBucket;\n }\n\n return this.globalBucket;\n }\n\n /**\n * Adds a listener (globally or locally) to a specified hook name.\n * If the `context` parameter is provided, the hook will be added only to the instance it references.\n * Otherwise, the callback will be used everytime the hook fires on any Handsontable instance.\n * You can provide an array of callback functions as the `callback` argument, this way they will all be fired\n * once the hook is triggered.\n *\n * @see Core#addHook\n * @param {String} key Hook name.\n * @param {Function|Array} callback Callback function or an array of functions.\n * @param {Object} [context=null] The context for the hook callback to be added - a Handsontable instance or leave empty.\n * @returns {Hooks} Instance of Hooks.\n *\n * @example\n * ```js\n * // single callback, added locally\n * Handsontable.hooks.add('beforeInit', myCallback, hotInstance);\n *\n * // single callback, added globally\n * Handsontable.hooks.add('beforeInit', myCallback);\n *\n * // multiple callbacks, added locally\n * Handsontable.hooks.add('beforeInit', [myCallback, anotherCallback], hotInstance);\n *\n * // multiple callbacks, added globally\n * Handsontable.hooks.add('beforeInit', [myCallback, anotherCallback]);\n * ```\n */\n add(key, callback, context = null) {\n if (Array.isArray(callback)) {\n arrayEach(callback, (c) => this.add(key, c, context));\n\n } else {\n const bucket = this.getBucket(context);\n\n if (typeof bucket[key] === 'undefined') {\n this.register(key);\n bucket[key] = [];\n }\n callback.skip = false;\n\n if (bucket[key].indexOf(callback) === -1) {\n // only add a hook if it has not already been added (adding the same hook twice is now silently ignored)\n let foundInitialHook = false;\n\n if (callback.initialHook) {\n arrayEach(bucket[key], (cb, i) => {\n if (cb.initialHook) {\n bucket[key][i] = callback;\n foundInitialHook = true;\n\n return false;\n }\n });\n }\n\n if (!foundInitialHook) {\n bucket[key].push(callback);\n }\n }\n }\n\n return this;\n }\n\n /**\n * Adds a listener to a specified hook. After the hook runs this listener will be automatically removed from the bucket.\n *\n * @see Core#addHookOnce\n * @param {String} key Hook/Event name.\n * @param {Function|Array} callback Callback function.\n * @param {Object} [context=null] A Handsontable instance.\n *\n * @example\n * ```js\n * Handsontable.hooks.once('beforeInit', myCallback, hotInstance);\n * ```\n */\n once(key, callback, context = null) {\n if (Array.isArray(callback)) {\n arrayEach(callback, (c) => this.once(key, c, context));\n\n } else {\n callback.runOnce = true;\n this.add(key, callback, context);\n }\n }\n\n /**\n * Removes a listener from a hook with a given name. If the `context` argument is provided, it removes a listener from a local hook assigned to the given Handsontable instance.\n *\n * @see Core#removeHook\n * @param {String} key Hook/Event name.\n * @param {Function} callback Callback function (needs the be the function that was previously added to the hook).\n * @param {Object} [context=null] Handsontable instance.\n * @return {Boolean} Returns `true` if hook was removed, `false` otherwise.\n *\n * @example\n * ```js\n * Handsontable.hooks.remove('beforeInit', myCallback);\n * ```\n */\n remove(key, callback, context = null) {\n let bucket = this.getBucket(context);\n\n if (typeof bucket[key] !== 'undefined') {\n if (bucket[key].indexOf(callback) >= 0) {\n callback.skip = true;\n\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Checks whether there are any registered listeners for the provided hook name.\n * If the `context` parameter is provided, it only checks for listeners assigned to the given Handsontable instance.\n *\n * @param {String} key Hook name.\n * @param {Object} [context=null] A Handsontable instance.\n * @returns {Boolean} `true` for success, `false` otherwise.\n */\n has(key, context = null) {\n let bucket = this.getBucket(context);\n\n return !!(bucket[key] !== void 0 && bucket[key].length);\n }\n\n /**\n * Runs all local and global callbacks assigned to the hook identified by the `key` parameter.\n * It returns either a return value from the last called callback or the first parameter (`p1`) passed to the `run` function.\n *\n * @see Core#runHooks\n * @param {Object} context Handsontable instance.\n * @param {String} key Hook/Event name.\n * @param {*} [p1] Parameter to be passed as an argument to the callback function.\n * @param {*} [p2] Parameter to be passed as an argument to the callback function.\n * @param {*} [p3] Parameter to be passed as an argument to the callback function.\n * @param {*} [p4] Parameter to be passed as an argument to the callback function.\n * @param {*} [p5] Parameter to be passed as an argument to the callback function.\n * @param {*} [p6] Parameter to be passed as an argument to the callback function.\n * @returns {*} Either a return value from the last called callback or `p1`.\n *\n * @example\n * ```js\n * Handsontable.hooks.run(hot, 'beforeInit');\n * ```\n */\n run(context, key, p1, p2, p3, p4, p5, p6) {\n {\n const globalHandlers = this.globalBucket[key];\n let index = -1;\n let length = globalHandlers ? globalHandlers.length : 0;\n\n if (length) {\n // Do not optimise this loop with arrayEach or arrow function! If you do You'll decrease perf because of GC.\n while (++index < length) {\n if (!globalHandlers[index] || globalHandlers[index].skip) {\n /* eslint-disable no-continue */\n continue;\n }\n // performance considerations - http://jsperf.com/call-vs-apply-for-a-plugin-architecture\n let res = globalHandlers[index].call(context, p1, p2, p3, p4, p5, p6);\n\n if (res !== void 0) {\n p1 = res;\n }\n if (globalHandlers[index] && globalHandlers[index].runOnce) {\n this.remove(key, globalHandlers[index]);\n }\n }\n }\n }\n {\n const localHandlers = this.getBucket(context)[key];\n let index = -1;\n let length = localHandlers ? localHandlers.length : 0;\n\n if (length) {\n // Do not optimise this loop with arrayEach or arrow function! If you do You'll decrease perf because of GC.\n while (++index < length) {\n if (!localHandlers[index] || localHandlers[index].skip) {\n /* eslint-disable no-continue */\n continue;\n }\n // performance considerations - http://jsperf.com/call-vs-apply-for-a-plugin-architecture\n let res = localHandlers[index].call(context, p1, p2, p3, p4, p5, p6);\n\n if (res !== void 0) {\n p1 = res;\n }\n if (localHandlers[index] && localHandlers[index].runOnce) {\n this.remove(key, localHandlers[index], context);\n }\n }\n }\n }\n\n return p1;\n }\n\n /**\n * Destroy all listeners connected to the context. If no context is provided, the global listeners will be destroyed.\n *\n * @param {Object} [context=null] A Handsontable instance.\n * @example\n * ```js\n * // destroy the global listeners\n * Handsontable.hooks.destroy();\n *\n * // destroy the local listeners\n * Handsontable.hooks.destroy(hotInstance);\n * ```\n */\n destroy(context = null) {\n objectEach(this.getBucket(context), (value, key, bucket) => (bucket[key].length = 0));\n }\n\n /**\n * Registers a hook name (adds it to the list of the known hook names). Used by plugins.\n * It is not necessary to call register, but if you use it, your plugin hook will be used returned by\n * the `getRegistered` method. (which itself is used in the demo http://docs.handsontable.com/tutorial-callbacks.html).\n *\n * @param key {String} The hook name.\n *\n * @example\n * ```js\n * Handsontable.hooks.register('myHook');\n * ```\n */\n register(key) {\n if (!this.isRegistered(key)) {\n REGISTERED_HOOKS.push(key);\n }\n }\n\n /**\n * Deregisters a hook name (removes it from the list of known hook names).\n *\n * @param key {String} Hook name.\n *\n * @example\n * ```js\n * Handsontable.hooks.deregister('myHook');\n * ```\n */\n deregister(key) {\n if (this.isRegistered(key)) {\n REGISTERED_HOOKS.splice(REGISTERED_HOOKS.indexOf(key), 1);\n }\n }\n\n /**\n * Returns a boolean depending on if a hook by such name has been registered.\n *\n * @param key {String} Hook name.\n * @returns {Boolean} `true` for success, `false` otherwise.\n *\n * @example\n * ```js\n * Handsontable.hooks.isRegistered('beforeInit');\n *\n * // Results:\n * true\n * ```\n */\n isRegistered(key) {\n return REGISTERED_HOOKS.indexOf(key) >= 0;\n }\n\n /**\n * Returns an array of registered hooks.\n *\n * @returns {Array} An array of registered hooks.\n *\n * @example\n * ```js\n * Handsontable.hooks.getRegistered();\n *\n * // Results:\n * [\n * ...\n * 'beforeInit',\n * 'beforeRender',\n * 'beforeSetRangeEnd',\n * 'beforeDrawBorders',\n * 'beforeChange',\n * ...\n * ]\n * ```\n */\n getRegistered() {\n return REGISTERED_HOOKS;\n }\n}\n\nconst globalSingleton = new Hooks();\n\nexport default Hooks;\n\n\n\n// WEBPACK FOOTER //\n// src/pluginHooks.js","var store = require('./_shared')('wks')\n , uid = require('./_uid')\n , Symbol = require('./_global').Symbol\n , USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function(name){\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_wks.js\n// module id = 9\n// module chunks = 0","import 'babel-polyfill';\n\nimport ViewportColumnsCalculator from './calculator/viewportColumns';\nimport ViewportRowsCalculator from './calculator/viewportRows';\n\nimport CellCoords from './cell/coords';\nimport CellRange from './cell/range';\n\nimport ColumnFilter from './filter/column';\nimport RowFilter from './filter/row';\n\nimport DebugOverlay from './overlay/debug';\nimport LeftOverlay from './overlay/left';\nimport TopOverlay from './overlay/top';\nimport TopLeftCornerOverlay from './overlay/topLeftCorner';\n\nimport Border from './border';\nimport Walkontable from './core';\nimport Event from './event';\nimport Overlays from './overlays';\nimport Scroll from './scroll';\nimport Selection from './selection';\nimport Settings from './settings';\nimport Table from './table';\nimport TableRenderer from './tableRenderer';\nimport Viewport from './viewport';\n\nexport {\n ViewportColumnsCalculator,\n ViewportRowsCalculator,\n\n CellCoords,\n CellRange,\n\n ColumnFilter,\n RowFilter,\n\n DebugOverlay,\n LeftOverlay,\n TopOverlay,\n TopLeftCornerOverlay,\n\n Border,\n Walkontable as default,\n Walkontable as Core,\n Event,\n Overlays,\n Scroll,\n Selection,\n Settings,\n Table,\n TableRenderer,\n Viewport,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/index.js","import {defineGetter, objectEach} from './../helpers/object';\nimport {arrayEach} from './../helpers/array';\nimport {registerIdentity, getTranslator} from './../utils/recordTranslator';\nimport {getRegistredPluginNames, getPluginName} from './../plugins';\n\nconst privatePool = new WeakMap();\nlet initializedPlugins = null;\n\n/**\n * @private\n */\nclass BasePlugin {\n /**\n * @param {Object} hotInstance Handsontable instance.\n */\n constructor(hotInstance) {\n /**\n * Handsontable instance.\n *\n * @type {Core}\n */\n defineGetter(this, 'hot', hotInstance, {\n writable: false\n });\n defineGetter(this, 't', getTranslator(hotInstance), {\n writable: false\n });\n\n privatePool.set(this, {hooks: {}});\n initializedPlugins = null;\n\n this.pluginName = null;\n this.pluginsInitializedCallbacks = [];\n this.isPluginsReady = false;\n this.enabled = false;\n this.initialized = false;\n\n this.hot.addHook('afterPluginsInitialized', () => this.onAfterPluginsInitialized());\n this.hot.addHook('afterUpdateSettings', () => this.onUpdateSettings());\n this.hot.addHook('beforeInit', () => this.init());\n }\n\n init() {\n this.pluginName = getPluginName(this.hot, this);\n\n if (this.isEnabled && this.isEnabled()) {\n this.enablePlugin();\n }\n if (!initializedPlugins) {\n initializedPlugins = getRegistredPluginNames(this.hot);\n }\n if (initializedPlugins.indexOf(this.pluginName) >= 0) {\n initializedPlugins.splice(initializedPlugins.indexOf(this.pluginName), 1);\n }\n if (!initializedPlugins.length) {\n this.hot.runHooks('afterPluginsInitialized');\n }\n this.initialized = true;\n }\n\n /**\n * Enable plugin for this Handsontable instance.\n */\n enablePlugin() {\n this.enabled = true;\n }\n\n /**\n * Disable plugin for this Handsontable instance.\n */\n disablePlugin() {\n if (this.eventManager) {\n this.eventManager.clear();\n }\n this.clearHooks();\n this.enabled = false;\n }\n\n /**\n * Add listener to plugin hooks system.\n *\n * @param {String} name\n * @param {Function} callback\n */\n addHook(name, callback) {\n privatePool.get(this).hooks[name] = (privatePool.get(this).hooks[name] || []);\n\n const hooks = privatePool.get(this).hooks[name];\n\n this.hot.addHook(name, callback);\n hooks.push(callback);\n privatePool.get(this).hooks[name] = hooks;\n }\n\n /**\n * Remove all hooks listeners by hook name.\n *\n * @param {String} name\n */\n removeHooks(name) {\n arrayEach(privatePool.get(this).hooks[name] || [], (callback) => {\n this.hot.removeHook(name, callback);\n });\n }\n\n /**\n * Clear all hooks.\n */\n clearHooks() {\n const hooks = privatePool.get(this).hooks;\n\n objectEach(hooks, (callbacks, name) => this.removeHooks(name));\n hooks.length = 0;\n }\n\n /**\n * Register function which will be immediately called after all plugins initialized.\n *\n * @param {Function} callback\n */\n callOnPluginsReady(callback) {\n if (this.isPluginsReady) {\n callback();\n } else {\n this.pluginsInitializedCallbacks.push(callback);\n }\n }\n\n /**\n * On after plugins initialized listener.\n *\n * @private\n */\n onAfterPluginsInitialized() {\n arrayEach(this.pluginsInitializedCallbacks, (callback) => callback());\n this.pluginsInitializedCallbacks.length = 0;\n this.isPluginsReady = true;\n }\n\n /**\n * On update settings listener.\n *\n * @private\n */\n onUpdateSettings() {\n if (this.isEnabled) {\n if (this.enabled && !this.isEnabled()) {\n this.disablePlugin();\n }\n if (!this.enabled && this.isEnabled()) {\n this.enablePlugin();\n }\n if (this.enabled && this.isEnabled()) {\n this.updatePlugin();\n }\n }\n }\n\n /**\n * Updates the plugin to use the latest options you have specified.\n *\n * @private\n */\n updatePlugin() {\n\n }\n\n /**\n * Destroy plugin.\n */\n destroy() {\n if (this.eventManager) {\n this.eventManager.destroy();\n }\n this.clearHooks();\n\n objectEach(this, (value, property) => {\n if (property !== 'hot' && property !== 't') {\n this[property] = null;\n }\n });\n delete this.t;\n delete this.hot;\n }\n}\n\nexport default BasePlugin;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/_base.js","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_global.js\n// module id = 12\n// module chunks = 0","/**\n * Utility to register editors and common namespace for keeping reference to all editor classes\n */\nimport {toUpperCaseFirst} from './helpers/string';\nimport Hooks from './pluginHooks';\n\nvar\n registeredEditorNames = {},\n registeredEditorClasses = new WeakMap();\n\nfunction RegisteredEditor(editorClass) {\n var Clazz,\n instances;\n\n instances = {};\n Clazz = editorClass;\n\n this.getConstructor = function() {\n return editorClass;\n };\n\n this.getInstance = function(hotInstance) {\n if (!(hotInstance.guid in instances)) {\n instances[hotInstance.guid] = new Clazz(hotInstance);\n }\n\n return instances[hotInstance.guid];\n };\n\n Hooks.getSingleton().add('afterDestroy', function() {\n instances = {};\n });\n}\n\n/**\n * Registers editor under given name\n * @param {String} editorName\n * @param {Function} editorClass\n */\nfunction registerEditor(editorName, editorClass) {\n var editor = new RegisteredEditor(editorClass);\n\n if (typeof editorName === 'string') {\n registeredEditorNames[editorName] = editor;\n }\n registeredEditorClasses.set(editorClass, editor);\n}\n\n/**\n * Returns instance (singleton) of editor class\n *\n * @param {String} editorName\n * @param {Object} hotInstance\n * @returns {Function} editorClass\n */\nfunction getEditor(editorName, hotInstance) {\n var editor;\n\n if (typeof editorName === 'function') {\n if (!(registeredEditorClasses.get(editorName))) {\n registerEditor(null, editorName);\n }\n editor = registeredEditorClasses.get(editorName);\n\n } else if (typeof editorName === 'string') {\n editor = registeredEditorNames[editorName];\n\n } else {\n throw Error('Only strings and functions can be passed as \"editor\" parameter ');\n }\n\n if (!editor) {\n throw Error(`No editor registered under name \"${editorName}\"`);\n }\n\n return editor.getInstance(hotInstance);\n}\n\n/**\n * Get editor constructor class\n *\n * @param {String} editorName\n * @returns {Function}\n */\nfunction getEditorConstructor(editorName) {\n var editor;\n\n if (typeof editorName === 'string') {\n editor = registeredEditorNames[editorName];\n\n } else {\n throw Error('Only strings and functions can be passed as \"editor\" parameter ');\n }\n\n if (!editor) {\n throw Error(`No editor registered under name \"${editorName}\"`);\n }\n\n return editor.getConstructor();\n}\n\n/**\n * @param editorName\n * @returns {Boolean}\n */\nfunction hasEditor(editorName) {\n return !!registeredEditorNames[editorName];\n}\n\n/**\n * Get list of registered editor names.\n *\n * @return {Array} Returns an array of registered editor names.\n */\nfunction getRegisteredEditorNames() {\n return Object.keys(registeredEditorNames);\n}\n\nexport {registerEditor, getEditor, hasEditor, getEditorConstructor, getRegisteredEditorNames};\n\n\n\n// WEBPACK FOOTER //\n// src/editors.js","import {arrayEach} from './array';\n\nexport const KEY_CODES = {\n MOUSE_LEFT: 1,\n MOUSE_RIGHT: 3,\n MOUSE_MIDDLE: 2,\n BACKSPACE: 8,\n COMMA: 188,\n INSERT: 45,\n DELETE: 46,\n END: 35,\n ENTER: 13,\n ESCAPE: 27,\n CONTROL_LEFT: 91,\n COMMAND_LEFT: 17,\n COMMAND_RIGHT: 93,\n ALT: 18,\n HOME: 36,\n PAGE_DOWN: 34,\n PAGE_UP: 33,\n PERIOD: 190,\n SPACE: 32,\n SHIFT: 16,\n CAPS_LOCK: 20,\n TAB: 9,\n ARROW_RIGHT: 39,\n ARROW_LEFT: 37,\n ARROW_UP: 38,\n ARROW_DOWN: 40,\n F1: 112,\n F2: 113,\n F3: 114,\n F4: 115,\n F5: 116,\n F6: 117,\n F7: 118,\n F8: 119,\n F9: 120,\n F10: 121,\n F11: 122,\n F12: 123,\n A: 65,\n X: 88,\n C: 67,\n V: 86\n};\n\n/**\n * Returns true if keyCode represents a printable character.\n *\n * @param {Number} keyCode\n * @returns {Boolean}\n */\nexport function isPrintableChar(keyCode) {\n return ((keyCode == 32) || // space\n (keyCode >= 48 && keyCode <= 57) || // 0-9\n (keyCode >= 96 && keyCode <= 111) || // numpad\n (keyCode >= 186 && keyCode <= 192) || // ;=,-./`\n (keyCode >= 219 && keyCode <= 222) || // []{}\\|\"'\n keyCode >= 226 || // special chars (229 for Asian chars)\n (keyCode >= 65 && keyCode <= 90)); // a-z\n}\n\n/**\n * @param {Number} keyCode\n * @returns {Boolean}\n */\nexport function isMetaKey(keyCode) {\n var metaKeys = [\n KEY_CODES.ARROW_DOWN,\n KEY_CODES.ARROW_UP,\n KEY_CODES.ARROW_LEFT,\n KEY_CODES.ARROW_RIGHT,\n KEY_CODES.HOME,\n KEY_CODES.END,\n KEY_CODES.DELETE,\n KEY_CODES.BACKSPACE,\n KEY_CODES.F1,\n KEY_CODES.F2,\n KEY_CODES.F3,\n KEY_CODES.F4,\n KEY_CODES.F5,\n KEY_CODES.F6,\n KEY_CODES.F7,\n KEY_CODES.F8,\n KEY_CODES.F9,\n KEY_CODES.F10,\n KEY_CODES.F11,\n KEY_CODES.F12,\n KEY_CODES.TAB,\n KEY_CODES.PAGE_DOWN,\n KEY_CODES.PAGE_UP,\n KEY_CODES.ENTER,\n KEY_CODES.ESCAPE,\n KEY_CODES.SHIFT,\n KEY_CODES.CAPS_LOCK,\n KEY_CODES.ALT\n ];\n\n return metaKeys.indexOf(keyCode) !== -1;\n}\n\n/**\n * @param {Number} keyCode\n * @returns {Boolean}\n */\nexport function isCtrlKey(keyCode) {\n return [KEY_CODES.CONTROL_LEFT, 224, KEY_CODES.COMMAND_LEFT, KEY_CODES.COMMAND_RIGHT].indexOf(keyCode) !== -1;\n}\n\n/**\n * @param {Number} keyCode\n * @param {String} baseCode\n * @returns {Boolean}\n */\nexport function isKey(keyCode, baseCode) {\n let keys = baseCode.split('|');\n let result = false;\n\n arrayEach(keys, (key) => {\n if (keyCode === KEY_CODES[key]) {\n result = true;\n\n return false;\n }\n });\n\n return result;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/helpers/unicode.js","module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_is-object.js\n// module id = 15\n// module chunks = 0","\n/**\n * Converts any value to string.\n *\n * @param {*} value\n * @returns {String}\n */\nexport function stringify(value) {\n let result;\n\n switch (typeof value) {\n case 'string':\n case 'number':\n result = `${value}`;\n break;\n\n case 'object':\n result = value === null ? '' : value.toString();\n break;\n case 'undefined':\n result = '';\n break;\n default:\n result = value.toString();\n break;\n }\n\n return result;\n}\n\n/**\n * Checks if given variable is defined.\n *\n * @param {*} variable Variable to check.\n * @returns {Boolean}\n */\nexport function isDefined(variable) {\n return typeof variable !== 'undefined';\n}\n\n/**\n * Checks if given variable is undefined.\n *\n * @param {*} variable Variable to check.\n * @returns {Boolean}\n */\nexport function isUndefined(variable) {\n return typeof variable === 'undefined';\n}\n\n/**\n * Check if given variable is null, empty string or undefined\n * @param {*} variable Variable to check.\n * @returns {Boolean}\n */\nexport function isEmpty(variable) {\n return variable === null || variable === '' || isUndefined(variable);\n}\n\n\n\n// WEBPACK FOOTER //\n// src/helpers/mixed.js","import {stringify} from './mixed';\nimport {rangeEach} from './number';\n\n/**\n * Convert string to upper case first letter.\n *\n * @param {String} string String to convert.\n * @returns {String}\n */\nexport function toUpperCaseFirst(string) {\n return string[0].toUpperCase() + string.substr(1);\n}\n\n/**\n * Compare strings case insensitively.\n *\n * @param {...String} strings Strings to compare.\n * @returns {Boolean}\n */\nexport function equalsIgnoreCase(...strings) {\n let unique = [];\n let length = strings.length;\n\n while (length--) {\n let string = stringify(strings[length]).toLowerCase();\n\n if (unique.indexOf(string) === -1) {\n unique.push(string);\n }\n }\n\n return unique.length === 1;\n}\n\n/**\n * Generates a random hex string. Used as namespace for Handsontable instance events.\n *\n * @return {String} Returns 16-long character random string (eq. `'92b1bfc74ec4'`).\n */\nexport function randomString() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return s4() + s4() + s4() + s4();\n}\n\n/**\n * Checks if value is valid percent.\n *\n * @param {String} value\n * @returns {Boolean}\n */\nexport function isPercentValue(value) {\n return /^([0-9][0-9]?%$)|(^100%$)/.test(value);\n}\n\n/**\n * Substitute strings placed beetwen square brackets into value defined in `variables` object. String names defined in\n * square brackets must be the same as property name of `variables` object.\n *\n * @param {String} template Template string.\n * @param {Object} variables Object which contains all available values which can be injected into template.\n * @returns {String}\n */\nexport function substitute(template, variables = {}) {\n return (`${template}`).replace(/(?:\\\\)?\\[([^[\\]]+)]/g, (match, name) => {\n if (match.charAt(0) === '\\\\') {\n return match.substr(1, match.length - 1);\n }\n\n return variables[name] === void 0 ? '' : variables[name];\n });\n}\n\nconst STRIP_TAGS_REGEX = /<\\/?\\w+\\/?>|<\\w+[\\s|/][^>]*>/gi;\n\n/**\n * Strip any HTML tag from the string.\n *\n * @param {String} string String to cut HTML from.\n * @return {String}\n */\nexport function stripTags(string) {\n string += '';\n\n return string.replace(STRIP_TAGS_REGEX, '');\n}\n\n\n\n// WEBPACK FOOTER //\n// src/helpers/string.js","import {arrayEach} from './../../helpers/array';\nimport {hasClass} from './../../helpers/dom/element';\nimport {KEY as SEPARATOR} from './predefinedItems/separator';\n\nexport function normalizeSelection(selRange) {\n return {\n start: selRange.getTopLeftCorner(),\n end: selRange.getBottomRightCorner()\n };\n}\n\nexport function isSeparator(cell) {\n return hasClass(cell, 'htSeparator');\n}\n\nexport function hasSubMenu(cell) {\n return hasClass(cell, 'htSubmenu');\n}\n\nexport function isDisabled(cell) {\n return hasClass(cell, 'htDisabled');\n}\n\nexport function isSelectionDisabled(cell) {\n return hasClass(cell, 'htSelectionDisabled');\n}\n\nexport function getValidSelection(hot) {\n let selected = hot.getSelected();\n\n if (!selected) {\n return null;\n }\n if (selected[0] < 0) {\n return null;\n }\n\n return selected;\n}\n\nexport function prepareVerticalAlignClass(className, alignment) {\n if (className.indexOf(alignment) != -1) {\n return className;\n }\n className = className\n .replace('htTop', '')\n .replace('htMiddle', '')\n .replace('htBottom', '')\n .replace(' ', '');\n\n className += ` ${alignment}`;\n\n return className;\n}\n\nexport function prepareHorizontalAlignClass(className, alignment) {\n if (className.indexOf(alignment) != -1) {\n return className;\n }\n className = className\n .replace('htLeft', '')\n .replace('htCenter', '')\n .replace('htRight', '')\n .replace('htJustify', '')\n .replace(' ', '');\n\n className += ` ${alignment}`;\n\n return className;\n}\n\nexport function getAlignmentClasses(range, callback) {\n const classes = {};\n\n for (let row = range.from.row; row <= range.to.row; row++) {\n for (let col = range.from.col; col <= range.to.col; col++) {\n if (!classes[row]) {\n classes[row] = [];\n }\n classes[row][col] = callback(row, col);\n }\n }\n\n return classes;\n}\n\nexport function align(range, type, alignment, cellDescriptor, propertySetter) {\n if (range.from.row == range.to.row && range.from.col == range.to.col) {\n applyAlignClassName(range.from.row, range.from.col, type, alignment, cellDescriptor, propertySetter);\n } else {\n for (let row = range.from.row; row <= range.to.row; row++) {\n for (let col = range.from.col; col <= range.to.col; col++) {\n applyAlignClassName(row, col, type, alignment, cellDescriptor, propertySetter);\n }\n }\n }\n}\n\nfunction applyAlignClassName(row, col, type, alignment, cellDescriptor, propertySetter) {\n let cellMeta = cellDescriptor(row, col);\n let className = alignment;\n\n if (cellMeta.className) {\n if (type === 'vertical') {\n className = prepareVerticalAlignClass(cellMeta.className, alignment);\n } else {\n className = prepareHorizontalAlignClass(cellMeta.className, alignment);\n }\n }\n\n propertySetter(row, col, 'className', className);\n}\n\nexport function checkSelectionConsistency(range, comparator) {\n let result = false;\n\n if (range) {\n range.forAll((row, col) => {\n if (comparator(row, col)) {\n result = true;\n\n return false;\n }\n });\n }\n\n return result;\n}\n\nexport function markLabelAsSelected(label) {\n // workaround for https://github.com/handsontable/handsontable/issues/1946\n return `<span class=\"selected\">${String.fromCharCode(10003)}</span>${label}`;\n}\n\nexport function isItemHidden(item, instance) {\n return !item.hidden || !(typeof item.hidden == 'function' && item.hidden.call(instance));\n}\n\nfunction shiftSeparators(items, separator) {\n let result = items.slice(0);\n\n for (let i = 0; i < result.length;) {\n if (result[i].name === separator) {\n result.shift();\n } else {\n break;\n }\n }\n return result;\n}\n\nfunction popSeparators(items, separator) {\n let result = items.slice(0);\n\n result.reverse();\n result = shiftSeparators(result, separator);\n result.reverse();\n\n return result;\n}\n\nfunction removeDuplicatedSeparators(items) {\n let result = [];\n\n arrayEach(items, (value, index) => {\n if (index > 0) {\n if (result[result.length - 1].name !== value.name) {\n result.push(value);\n }\n } else {\n result.push(value);\n }\n });\n\n return result;\n}\n\nexport function filterSeparators(items, separator = SEPARATOR) {\n let result = items.slice(0);\n\n result = shiftSeparators(result, separator);\n result = popSeparators(result, separator);\n result = removeDuplicatedSeparators(result);\n\n return result;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/utils.js","/**\n * Utility to register renderers and common namespace for keeping reference to all renderers classes\n */\nimport {toUpperCaseFirst} from './helpers/string';\n\nvar registeredRenderers = {};\n\n/**\n * Registers renderer under given name\n * @param {String} rendererName\n * @param {Function} rendererFunction\n */\nfunction registerRenderer(rendererName, rendererFunction) {\n registeredRenderers[rendererName] = rendererFunction;\n}\n\n/**\n * @param {String|Function} rendererName\n * @returns {Function} rendererFunction\n */\nfunction getRenderer(rendererName) {\n if (typeof rendererName == 'function') {\n return rendererName;\n }\n\n if (typeof rendererName != 'string') {\n throw Error('Only strings and functions can be passed as \"renderer\" parameter');\n }\n\n if (!(rendererName in registeredRenderers)) {\n throw Error(`No editor registered under name \"${rendererName}\"`);\n }\n\n return registeredRenderers[rendererName];\n}\n\n/**\n * @param rendererName\n * @returns {Boolean}\n */\nfunction hasRenderer(rendererName) {\n return rendererName in registeredRenderers;\n}\n\n/**\n * Get list of registered renderer names.\n *\n * @return {Array} Returns an array of registered renderer names.\n */\nfunction getRegisteredRendererNames() {\n return Object.keys(registeredRenderers);\n}\n\nexport {registerRenderer, getRenderer, hasRenderer, getRegisteredRendererNames};\n\n\n\n// WEBPACK FOOTER //\n// src/renderers.js","var isObject = require('./_is-object');\nmodule.exports = function(it){\n if(!isObject(it))throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_an-object.js\n// module id = 20\n// module chunks = 0","var anObject = require('./_an-object')\n , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n , toPrimitive = require('./_to-primitive')\n , dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if(IE8_DOM_DEFINE)try {\n return dP(O, P, Attributes);\n } catch(e){ /* empty */ }\n if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');\n if('value' in Attributes)O[P] = Attributes.value;\n return O;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-dp.js\n// module id = 21\n// module chunks = 0","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_descriptors.js\n// module id = 22\n// module chunks = 0","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function(it, key){\n return hasOwnProperty.call(it, key);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_has.js\n// module id = 23\n// module chunks = 0","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject')\n , defined = require('./_defined');\nmodule.exports = function(it){\n return IObject(defined(it));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_to-iobject.js\n// module id = 24\n// module chunks = 0","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer')\n , min = Math.min;\nmodule.exports = function(it){\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_to-length.js\n// module id = 25\n// module chunks = 0","import {\n getScrollableElement,\n getTrimmingContainer,\n} from './../../../../helpers/dom/element';\nimport {defineGetter} from './../../../../helpers/object';\nimport {arrayEach} from './../../../../helpers/array';\nimport EventManager from './../../../../eventManager';\nimport Walkontable from './../core';\n\nconst registeredOverlays = {};\n\n/**\n * Creates an overlay over the original Walkontable instance. The overlay renders the clone of the original Walkontable\n * and (optionally) implements behavior needed for native horizontal and vertical scrolling.\n *\n * @class Overlay\n */\nclass Overlay {\n /**\n * @type {String}\n */\n static get CLONE_TOP() {\n return 'top';\n }\n\n /**\n * @type {String}\n */\n static get CLONE_BOTTOM() {\n return 'bottom';\n }\n\n /**\n * @type {String}\n */\n static get CLONE_LEFT() {\n return 'left';\n }\n\n /**\n * @type {String}\n */\n static get CLONE_TOP_LEFT_CORNER() {\n return 'top_left_corner';\n }\n\n /**\n * @type {String}\n */\n static get CLONE_BOTTOM_LEFT_CORNER() {\n return 'bottom_left_corner';\n }\n\n /**\n * @type {String}\n */\n static get CLONE_DEBUG() {\n return 'debug';\n }\n\n /**\n * List of all availables clone types\n *\n * @type {Array}\n */\n static get CLONE_TYPES() {\n return [\n Overlay.CLONE_TOP,\n Overlay.CLONE_BOTTOM,\n Overlay.CLONE_LEFT,\n Overlay.CLONE_TOP_LEFT_CORNER,\n Overlay.CLONE_BOTTOM_LEFT_CORNER,\n Overlay.CLONE_DEBUG,\n ];\n }\n\n /**\n * Register overlay class.\n *\n * @param {String} type Overlay type, one of the CLONE_TYPES value\n * @param {Overlay} overlayClass Overlay class extended from base overlay class {@link Overlay}\n */\n static registerOverlay(type, overlayClass) {\n if (Overlay.CLONE_TYPES.indexOf(type) === -1) {\n throw new Error(`Unsupported overlay (${type}).`);\n }\n registeredOverlays[type] = overlayClass;\n }\n\n /**\n * Create new instance of overlay type.\n *\n * @param {String} type Overlay type, one of the CLONE_TYPES value\n * @param {Walkontable} wot Walkontable instance\n */\n static createOverlay(type, wot) {\n return new registeredOverlays[type](wot);\n }\n\n /**\n * Check if specified overlay was registered.\n *\n * @param {String} type Overlay type, one of the CLONE_TYPES value\n * @returns {Boolean}\n */\n static hasOverlay(type) {\n return registeredOverlays[type] !== void 0;\n }\n\n /**\n * Checks if overlay object (`overlay`) is instance of overlay type (`type`).\n *\n * @param {Overlay} overlay Overlay object\n * @param {String} type Overlay type, one of the CLONE_TYPES value\n * @returns {Boolean}\n */\n static isOverlayTypeOf(overlay, type) {\n if (!overlay || !registeredOverlays[type]) {\n return false;\n }\n\n return overlay instanceof registeredOverlays[type];\n }\n\n /**\n * @param {Walkontable} wotInstance\n */\n constructor(wotInstance) {\n defineGetter(this, 'wot', wotInstance, {\n writable: false,\n });\n\n // legacy support, deprecated in the future\n this.instance = this.wot;\n\n this.type = '';\n this.mainTableScrollableElement = null;\n this.TABLE = this.wot.wtTable.TABLE;\n this.hider = this.wot.wtTable.hider;\n this.spreader = this.wot.wtTable.spreader;\n this.holder = this.wot.wtTable.holder;\n this.wtRootElement = this.wot.wtTable.wtRootElement;\n this.trimmingContainer = getTrimmingContainer(this.hider.parentNode.parentNode);\n this.areElementSizesAdjusted = false;\n this.updateStateOfRendering();\n }\n\n /**\n * Update internal state of object with an information about the need of full rendering of the overlay.\n *\n * @returns {Boolean} Returns `true` if the state has changed since the last check.\n */\n updateStateOfRendering() {\n const previousState = this.needFullRender;\n\n this.needFullRender = this.shouldBeRendered();\n\n const changed = previousState !== this.needFullRender;\n\n if (changed && !this.needFullRender) {\n this.reset();\n }\n\n return changed;\n }\n\n /**\n * Checks if overlay should be fully rendered\n *\n * @returns {Boolean}\n */\n shouldBeRendered() {\n return true;\n }\n\n /**\n * Update the trimming container.\n */\n updateTrimmingContainer() {\n this.trimmingContainer = getTrimmingContainer(this.hider.parentNode.parentNode);\n }\n\n /**\n * Update the main scrollable element.\n */\n updateMainScrollableElement() {\n this.mainTableScrollableElement = getScrollableElement(this.wot.wtTable.TABLE);\n }\n\n /**\n * Make a clone of table for overlay\n *\n * @param {String} direction Can be `Overlay.CLONE_TOP`, `Overlay.CLONE_LEFT`,\n * `Overlay.CLONE_TOP_LEFT_CORNER`, `Overlay.CLONE_DEBUG`\n * @returns {Walkontable}\n */\n makeClone(direction) {\n if (Overlay.CLONE_TYPES.indexOf(direction) === -1) {\n throw new Error(`Clone type \"${direction}\" is not supported.`);\n }\n let clone = document.createElement('DIV');\n let clonedTable = document.createElement('TABLE');\n\n clone.className = `ht_clone_${direction} handsontable`;\n clone.style.position = 'absolute';\n clone.style.top = 0;\n clone.style.left = 0;\n clone.style.overflow = 'hidden';\n\n clonedTable.className = this.wot.wtTable.TABLE.className;\n clone.appendChild(clonedTable);\n\n this.type = direction;\n this.wot.wtTable.wtRootElement.parentNode.appendChild(clone);\n\n let preventOverflow = this.wot.getSetting('preventOverflow');\n\n if (preventOverflow === true ||\n preventOverflow === 'horizontal' && this.type === Overlay.CLONE_TOP ||\n preventOverflow === 'vertical' && this.type === Overlay.CLONE_LEFT) {\n this.mainTableScrollableElement = window;\n\n } else {\n this.mainTableScrollableElement = getScrollableElement(this.wot.wtTable.TABLE);\n }\n\n return new Walkontable({\n cloneSource: this.wot,\n cloneOverlay: this,\n table: clonedTable,\n });\n }\n\n /**\n * Refresh/Redraw overlay\n *\n * @param {Boolean} [fastDraw=false]\n */\n refresh(fastDraw = false) {\n // When hot settings are changed we allow to refresh overlay once before blocking\n var nextCycleRenderFlag = this.shouldBeRendered();\n\n if (this.clone && (this.needFullRender || nextCycleRenderFlag)) {\n this.clone.draw(fastDraw);\n }\n this.needFullRender = nextCycleRenderFlag;\n }\n\n /**\n * Reset overlay styles to initial values.\n */\n reset() {\n if (!this.clone) {\n return;\n }\n const holder = this.clone.wtTable.holder;\n const hider = this.clone.wtTable.hider;\n let holderStyle = holder.style;\n let hidderStyle = hider.style;\n let rootStyle = holder.parentNode.style;\n\n arrayEach([holderStyle, hidderStyle, rootStyle], (style) => {\n style.width = '';\n style.height = '';\n });\n }\n\n /**\n * Destroy overlay instance\n */\n destroy() {\n (new EventManager(this.clone)).destroy();\n }\n}\n\nexport default Overlay;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/overlay/_base.js","\nvar _isIE8 = !(document.createTextNode('test').textContent);\n\nexport function isIE8() {\n return _isIE8;\n}\n\nvar _isIE9 = !!(document.documentMode);\n\nexport function isIE9() {\n return _isIE9;\n}\n\nvar _isSafari = (/Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor));\n\nexport function isSafari() {\n return _isSafari;\n}\n\nvar _isChrome = (/Chrome/.test(navigator.userAgent) && /Google/.test(navigator.vendor));\n\nexport function isChrome() {\n return _isChrome;\n}\n\nexport function isMobileBrowser(userAgent) {\n if (!userAgent) {\n userAgent = navigator.userAgent;\n }\n\n return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent));\n}\n\n\n\n// WEBPACK FOOTER //\n// src/helpers/browser.js","// https://gist.github.com/paulirish/1579671\nlet lastTime = 0;\nlet vendors = ['ms', 'moz', 'webkit', 'o'];\nlet _requestAnimationFrame = window.requestAnimationFrame;\nlet _cancelAnimationFrame = window.cancelAnimationFrame;\n\nfor (let x = 0; x < vendors.length && !_requestAnimationFrame; ++x) {\n _requestAnimationFrame = window[`${vendors[x]}RequestAnimationFrame`];\n _cancelAnimationFrame = window[`${vendors[x]}CancelAnimationFrame`] || window[`${vendors[x]}CancelRequestAnimationFrame`];\n}\n\nif (!_requestAnimationFrame) {\n _requestAnimationFrame = function(callback) {\n let currTime = new Date().getTime();\n let timeToCall = Math.max(0, 16 - (currTime - lastTime));\n let id = window.setTimeout(() => {\n callback(currTime + timeToCall);\n }, timeToCall);\n lastTime = currTime + timeToCall;\n\n return id;\n };\n}\n\nif (!_cancelAnimationFrame) {\n _cancelAnimationFrame = function(id) {\n clearTimeout(id);\n };\n}\n\n/**\n * Polyfill for requestAnimationFrame\n *\n * @param {Function} callback\n * @returns {Number}\n */\nexport function requestAnimationFrame(callback) {\n return _requestAnimationFrame.call(window, callback);\n}\n\n/**\n * Polyfill for cancelAnimationFrame\n *\n * @param {Number} id\n */\nexport function cancelAnimationFrame(id) {\n _cancelAnimationFrame.call(window, id);\n}\n\nexport function isTouchSupported() {\n return ('ontouchstart' in window);\n}\n\n/**\n * Checks if browser is support web components natively\n *\n * @returns {Boolean}\n */\nexport function isWebComponentSupportedNatively() {\n var test = document.createElement('div');\n\n return !!(test.createShadowRoot && test.createShadowRoot.toString().match(/\\[native code\\]/));\n}\n\nvar _hasCaptionProblem;\n\nfunction detectCaptionProblem() {\n var TABLE = document.createElement('TABLE');\n TABLE.style.borderSpacing = 0;\n TABLE.style.borderWidth = 0;\n TABLE.style.padding = 0;\n var TBODY = document.createElement('TBODY');\n TABLE.appendChild(TBODY);\n TBODY.appendChild(document.createElement('TR'));\n TBODY.firstChild.appendChild(document.createElement('TD'));\n TBODY.firstChild.firstChild.innerHTML = '<tr><td>t<br>t</td></tr>';\n\n var CAPTION = document.createElement('CAPTION');\n CAPTION.innerHTML = 'c<br>c<br>c<br>c';\n CAPTION.style.padding = 0;\n CAPTION.style.margin = 0;\n TABLE.insertBefore(CAPTION, TBODY);\n\n document.body.appendChild(TABLE);\n _hasCaptionProblem = (TABLE.offsetHeight < 2 * TABLE.lastChild.offsetHeight); // boolean\n document.body.removeChild(TABLE);\n}\n\nexport function hasCaptionProblem() {\n if (_hasCaptionProblem === void 0) {\n detectCaptionProblem();\n }\n\n return _hasCaptionProblem;\n}\n\nlet comparisonFunction;\n\n/**\n * Get string comparison function for sorting purposes. It supports multilingual string comparison base on Internationalization API.\n *\n * @param {String} [language]\n * @param {Object} [options]\n * @returns {*}\n */\nexport function getComparisonFunction(language, options = {}) {\n if (comparisonFunction) {\n return comparisonFunction;\n }\n\n if (typeof Intl === 'object') {\n comparisonFunction = new Intl.Collator(language, options).compare;\n\n } else if (typeof String.prototype.localeCompare === 'function') {\n comparisonFunction = (a, b) => (`${a}`).localeCompare(b);\n\n } else {\n comparisonFunction = (a, b) => {\n if (a === b) {\n return 0;\n }\n\n return a > b ? -1 : 1;\n };\n }\n\n return comparisonFunction;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/helpers/feature.js","import {arrayReduce} from './array';\n\n/**\n * Checks if given variable is function.\n *\n * @param {*} func Variable to check.\n * @returns {Boolean}\n */\nexport function isFunction(func) {\n return typeof func === 'function';\n}\n\n/**\n * Creates throttle function that enforces a maximum number of times a function (`func`) can be called over time (`wait`).\n *\n * @param {Function} func Function to invoke.\n * @param {Number} wait Delay in miliseconds.\n * @returns {Function}\n */\nexport function throttle(func, wait = 200) {\n let lastCalled = 0;\n let result = {\n lastCallThrottled: true\n };\n let lastTimer = null;\n\n function _throttle() {\n const args = arguments;\n let stamp = Date.now();\n let needCall = false;\n\n result.lastCallThrottled = true;\n\n if (!lastCalled) {\n lastCalled = stamp;\n needCall = true;\n }\n let remaining = wait - (stamp - lastCalled);\n\n if (needCall) {\n result.lastCallThrottled = false;\n func.apply(this, args);\n } else {\n if (lastTimer) {\n clearTimeout(lastTimer);\n }\n lastTimer = setTimeout(() => {\n result.lastCallThrottled = false;\n func.apply(this, args);\n lastCalled = 0;\n lastTimer = void 0;\n }, remaining);\n }\n\n return result;\n }\n\n return _throttle;\n}\n\n/**\n * Creates throttle function that enforces a maximum number of times a function (`func`) can be called over\n * time (`wait`) after specified hits.\n *\n * @param {Function} func Function to invoke.\n * @param {Number} wait Delay in miliseconds.\n * @param {Number} hits Number of hits after throttling will be applied.\n * @returns {Function}\n */\nexport function throttleAfterHits(func, wait = 200, hits = 10) {\n const funcThrottle = throttle(func, wait);\n let remainHits = hits;\n\n function _clearHits() {\n remainHits = hits;\n }\n function _throttleAfterHits() {\n if (remainHits) {\n remainHits--;\n\n return func.apply(this, arguments);\n }\n\n return funcThrottle.apply(this, arguments);\n }\n _throttleAfterHits.clearHits = _clearHits;\n\n return _throttleAfterHits;\n}\n\n/**\n * Creates debounce function that enforces a function (`func`) not be called again until a certain amount of time (`wait`)\n * has passed without it being called.\n *\n * @param {Function} func Function to invoke.\n * @param {Number} wait Delay in milliseconds.\n * @returns {Function}\n */\nexport function debounce(func, wait = 200) {\n let lastTimer = null;\n let result;\n\n function _debounce() {\n const args = arguments;\n\n if (lastTimer) {\n clearTimeout(lastTimer);\n }\n lastTimer = setTimeout(() => {\n result = func.apply(this, args);\n }, wait);\n\n return result;\n }\n\n return _debounce;\n}\n\n/**\n * Creates the function that returns the result of calling the given functions. Result of the first function is passed to\n * the second as an argument and so on. Only first function in the chain can handle multiple arguments.\n *\n * @param {Function} functions Functions to compose.\n * @returns {Function}\n */\nexport function pipe(...functions) {\n const [firstFunc, ...restFunc] = functions;\n\n return function _pipe() {\n return arrayReduce(restFunc, (acc, fn) => fn(acc), firstFunc.apply(this, arguments));\n };\n}\n\n/**\n * Creates the function that returns the function with cached arguments.\n *\n * @param {Function} func Function to partialization.\n * @param {Array} params Function arguments to cache.\n * @returns {Function}\n */\nexport function partial(func, ...params) {\n return function _partial(...restParams) {\n return func.apply(this, params.concat(restParams));\n };\n}\n\n/**\n * Creates the functions that returns the function with cached arguments. If count if passed arguments will be matched\n * to the arguments defined in `func` then function will be invoked.\n * Arguments are added to the stack in direction from the left to the right.\n *\n * @example\n * ```\n * var replace = curry(function(find, replace, string) {\n * return string.replace(find, replace);\n * });\n *\n * // returns function with bounded first argument\n * var replace = replace('foo')\n *\n * // returns replaced string - all arguments was passed so function was invoked\n * replace('bar', 'Some test with foo...');\n *\n * ```\n *\n * @param {Function} func Function to currying.\n * @returns {Function}\n */\nexport function curry(func) {\n const argsLength = func.length;\n\n function given(argsSoFar) {\n return function _curry(...params) {\n const passedArgsSoFar = argsSoFar.concat(params);\n let result;\n\n if (passedArgsSoFar.length >= argsLength) {\n result = func.apply(this, passedArgsSoFar);\n } else {\n result = given(passedArgsSoFar);\n }\n\n return result;\n };\n }\n\n return given([]);\n}\n\n/**\n * Creates the functions that returns the function with cached arguments. If count if passed arguments will be matched\n * to the arguments defined in `func` then function will be invoked.\n * Arguments are added to the stack in direction from the right to the left.\n *\n * @example\n * ```\n * var replace = curry(function(find, replace, string) {\n * return string.replace(find, replace);\n * });\n *\n * // returns function with bounded first argument\n * var replace = replace('Some test with foo...')\n *\n * // returns replaced string - all arguments was passed so function was invoked\n * replace('bar', 'foo');\n *\n * ```\n *\n * @param {Function} func Function to currying.\n * @returns {Function}\n */\nexport function curryRight(func) {\n const argsLength = func.length;\n\n function given(argsSoFar) {\n return function _curry(...params) {\n const passedArgsSoFar = argsSoFar.concat(params.reverse());\n let result;\n\n if (passedArgsSoFar.length >= argsLength) {\n result = func.apply(this, passedArgsSoFar);\n } else {\n result = given(passedArgsSoFar);\n }\n\n return result;\n };\n }\n\n return given([]);\n}\n\n\n\n// WEBPACK FOOTER //\n// src/helpers/function.js","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_ctx.js\n// module id = 30\n// module chunks = 0","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function(it){\n if(it == undefined)throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_defined.js\n// module id = 31\n// module chunks = 0","module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_fails.js\n// module id = 32\n// module chunks = 0","var dP = require('./_object-dp')\n , createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function(object, key, value){\n return dP.f(object, key, createDesc(1, value));\n} : function(object, key, value){\n object[key] = value;\n return object;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_hide.js\n// module id = 33\n// module chunks = 0","var global = require('./_global')\n , hide = require('./_hide')\n , has = require('./_has')\n , SRC = require('./_uid')('src')\n , TO_STRING = 'toString'\n , $toString = Function[TO_STRING]\n , TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function(it){\n return $toString.call(it);\n};\n\n(module.exports = function(O, key, val, safe){\n var isFunction = typeof val == 'function';\n if(isFunction)has(val, 'name') || hide(val, 'name', key);\n if(O[key] === val)return;\n if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if(O === global){\n O[key] = val;\n } else {\n if(!safe){\n delete O[key];\n hide(O, key, val);\n } else {\n if(O[key])O[key] = val;\n else hide(O, key, val);\n }\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString(){\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_redefine.js\n// module id = 34\n// module chunks = 0","// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = require('./_wks')('unscopables')\n , ArrayProto = Array.prototype;\nif(ArrayProto[UNSCOPABLES] == undefined)require('./_hide')(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function(key){\n ArrayProto[UNSCOPABLES][key] = true;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_add-to-unscopables.js\n// module id = 35\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = function(it){\n return toString.call(it).slice(8, -1);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_cof.js\n// module id = 36\n// module chunks = 0","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal')\n , enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O){\n return $keys(O, enumBugKeys);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-keys.js\n// module id = 37\n// module chunks = 0","module.exports = function(bitmap, value){\n return {\n enumerable : !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable : !(bitmap & 4),\n value : value\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_property-desc.js\n// module id = 38\n// module chunks = 0","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function(it){\n return Object(defined(it));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_to-object.js\n// module id = 39\n// module chunks = 0","/**\n * CellCoords holds cell coordinates (row, column) and few method to validate them and\n * retrieve as an array or an object\n *\n * @class CellCoords\n */\nclass CellCoords {\n /**\n * @param {Number} row Row index\n * @param {Number} col Column index\n */\n constructor(row, col) {\n if (typeof row !== 'undefined' && typeof col !== 'undefined') {\n this.row = row;\n this.col = col;\n\n } else {\n this.row = null;\n this.col = null;\n }\n }\n\n /**\n * Checks if given set of coordinates is valid in context of a given Walkontable instance\n *\n * @param {Walkontable} wotInstance\n * @returns {Boolean}\n */\n isValid(wotInstance) {\n // is it a valid cell index (0 or higher)\n if (this.row < 0 || this.col < 0) {\n return false;\n }\n // is selection within total rows and columns\n if (this.row >= wotInstance.getSetting('totalRows') || this.col >= wotInstance.getSetting('totalColumns')) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Checks if this cell coords are the same as cell coords given as a parameter\n *\n * @param {CellCoords} cellCoords\n * @returns {Boolean}\n */\n isEqual(cellCoords) {\n if (cellCoords === this) {\n return true;\n }\n\n return this.row === cellCoords.row && this.col === cellCoords.col;\n }\n\n /**\n * Checks if tested coordinates are positioned in south-east from this cell coords\n *\n * @param {Object} testedCoords\n * @returns {Boolean}\n */\n isSouthEastOf(testedCoords) {\n return this.row >= testedCoords.row && this.col >= testedCoords.col;\n }\n\n /**\n * Checks if tested coordinates are positioned in north-east from this cell coords\n *\n * @param {Object} testedCoords\n * @returns {Boolean}\n */\n isNorthWestOf(testedCoords) {\n return this.row <= testedCoords.row && this.col <= testedCoords.col;\n }\n\n /**\n * Checks if tested coordinates are positioned in south-west from this cell coords\n *\n * @param {Object} testedCoords\n * @returns {Boolean}\n */\n isSouthWestOf(testedCoords) {\n return this.row >= testedCoords.row && this.col <= testedCoords.col;\n }\n\n /**\n * Checks if tested coordinates are positioned in north-east from this cell coords\n *\n * @param {Object} testedCoords\n * @returns {Boolean}\n */\n isNorthEastOf(testedCoords) {\n return this.row <= testedCoords.row && this.col >= testedCoords.col;\n }\n}\n\nexport default CellCoords;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/cell/coords.js","import {CellCoords} from './../3rdparty/walkontable/src';\nimport {registerEditor} from './../editors';\nimport {stringify} from './../helpers/mixed';\n\nexport const EditorState = {\n VIRGIN: 'STATE_VIRGIN', // before editing\n EDITING: 'STATE_EDITING',\n WAITING: 'STATE_WAITING', // waiting for async validation\n FINISHED: 'STATE_FINISHED'\n};\n\nfunction BaseEditor(instance) {\n this.instance = instance;\n this.state = EditorState.VIRGIN;\n\n this._opened = false;\n this._fullEditMode = false;\n this._closeCallback = null;\n\n this.init();\n}\n\nBaseEditor.prototype._fireCallbacks = function(result) {\n if (this._closeCallback) {\n this._closeCallback(result);\n this._closeCallback = null;\n }\n};\n\nBaseEditor.prototype.init = function() {};\n\nBaseEditor.prototype.getValue = function() {\n throw Error('Editor getValue() method unimplemented');\n};\n\nBaseEditor.prototype.setValue = function(newValue) {\n throw Error('Editor setValue() method unimplemented');\n};\n\nBaseEditor.prototype.open = function() {\n throw Error('Editor open() method unimplemented');\n};\n\nBaseEditor.prototype.close = function() {\n throw Error('Editor close() method unimplemented');\n};\n\nBaseEditor.prototype.prepare = function(row, col, prop, td, originalValue, cellProperties) {\n this.TD = td;\n this.row = row;\n this.col = col;\n this.prop = prop;\n this.originalValue = originalValue;\n this.cellProperties = cellProperties;\n\n let invalidActiveElement = !document.activeElement || (document.activeElement && document.activeElement.nodeName === void 0);\n\n if (this.instance.view.isMouseDown() && document.activeElement && document.activeElement !== document.body && !invalidActiveElement) {\n document.activeElement.blur();\n\n } else if (invalidActiveElement) { // IE\n document.body.focus();\n }\n\n this.state = EditorState.VIRGIN;\n};\n\nBaseEditor.prototype.extend = function() {\n var baseClass = this.constructor;\n\n function Editor() {\n baseClass.apply(this, arguments);\n }\n\n function inherit(Child, Parent) {\n function Bridge() {}\n Bridge.prototype = Parent.prototype;\n Child.prototype = new Bridge();\n Child.prototype.constructor = Child;\n\n return Child;\n }\n\n return inherit(Editor, baseClass);\n};\n\nBaseEditor.prototype.saveValue = function(value, ctrlDown) {\n let selection;\n let tmp;\n\n // if ctrl+enter and multiple cells selected, behave like Excel (finish editing and apply to all cells)\n if (ctrlDown) {\n selection = this.instance.getSelected();\n\n if (selection[0] > selection[2]) {\n tmp = selection[0];\n selection[0] = selection[2];\n selection[2] = tmp;\n }\n if (selection[1] > selection[3]) {\n tmp = selection[1];\n selection[1] = selection[3];\n selection[3] = tmp;\n }\n } else {\n selection = [this.row, this.col, null, null];\n }\n\n this.instance.populateFromArray(selection[0], selection[1], value, selection[2], selection[3], 'edit');\n};\n\nBaseEditor.prototype.beginEditing = function(initialValue, event) {\n if (this.state != EditorState.VIRGIN) {\n return;\n }\n this.instance.view.scrollViewport(new CellCoords(this.row, this.col));\n this.instance.view.render();\n this.state = EditorState.EDITING;\n\n initialValue = typeof initialValue == 'string' ? initialValue : this.originalValue;\n this.setValue(stringify(initialValue));\n\n this.open(event);\n this._opened = true;\n this.focus();\n\n // only rerender the selections (FillHandle should disappear when beginediting is triggered)\n this.instance.view.render();\n\n this.instance.runHooks('afterBeginEditing', this.row, this.col);\n};\n\nBaseEditor.prototype.finishEditing = function(restoreOriginalValue, ctrlDown, callback) {\n var _this = this,\n val;\n\n if (callback) {\n var previousCloseCallback = this._closeCallback;\n\n this._closeCallback = function(result) {\n if (previousCloseCallback) {\n previousCloseCallback(result);\n }\n\n callback(result);\n _this.instance.view.render();\n };\n }\n\n if (this.isWaiting()) {\n return;\n }\n\n if (this.state == EditorState.VIRGIN) {\n this.instance._registerTimeout(setTimeout(() => {\n _this._fireCallbacks(true);\n }, 0));\n\n return;\n }\n\n if (this.state == EditorState.EDITING) {\n if (restoreOriginalValue) {\n this.cancelChanges();\n this.instance.view.render();\n\n return;\n }\n\n let value = this.getValue();\n\n if (this.instance.getSettings().trimWhitespace) {\n // We trim only string values\n val = [\n [typeof value === 'string' ? String.prototype.trim.call(value || '') : value]\n ];\n } else {\n val = [\n [value]\n ];\n }\n\n this.state = EditorState.WAITING;\n this.saveValue(val, ctrlDown);\n\n if (this.instance.getCellValidator(this.cellProperties)) {\n this.instance.addHookOnce('postAfterValidate', (result) => {\n _this.state = EditorState.FINISHED;\n _this.discardEditor(result);\n });\n } else {\n this.state = EditorState.FINISHED;\n this.discardEditor(true);\n }\n }\n};\n\nBaseEditor.prototype.cancelChanges = function() {\n this.state = EditorState.FINISHED;\n this.discardEditor();\n};\n\nBaseEditor.prototype.discardEditor = function(result) {\n if (this.state !== EditorState.FINISHED) {\n return;\n }\n // validator was defined and failed\n if (result === false && this.cellProperties.allowInvalid !== true) {\n this.instance.selectCell(this.row, this.col);\n this.focus();\n this.state = EditorState.EDITING;\n this._fireCallbacks(false);\n\n } else {\n this.close();\n this._opened = false;\n this._fullEditMode = false;\n this.state = EditorState.VIRGIN;\n this._fireCallbacks(true);\n }\n};\n\n/**\n * Switch editor into full edit mode. In this state navigation keys don't close editor. This mode is activated\n * automatically after hit ENTER or F2 key on the cell or while editing cell press F2 key.\n */\nBaseEditor.prototype.enableFullEditMode = function() {\n this._fullEditMode = true;\n};\n\n/**\n * Checks if editor is in full edit mode.\n *\n * @returns {Boolean}\n */\nBaseEditor.prototype.isInFullEditMode = function() {\n return this._fullEditMode;\n};\n\nBaseEditor.prototype.isOpened = function() {\n return this._opened;\n};\n\nBaseEditor.prototype.isWaiting = function() {\n return this.state === EditorState.WAITING;\n};\n\nBaseEditor.prototype.checkEditorSection = function() {\n var totalRows = this.instance.countRows();\n var section = '';\n\n if (this.row < this.instance.getSettings().fixedRowsTop) {\n if (this.col < this.instance.getSettings().fixedColumnsLeft) {\n section = 'top-left-corner';\n } else {\n section = 'top';\n }\n } else if (this.instance.getSettings().fixedRowsBottom && this.row >= totalRows - this.instance.getSettings().fixedRowsBottom) {\n if (this.col < this.instance.getSettings().fixedColumnsLeft) {\n section = 'bottom-left-corner';\n } else {\n section = 'bottom';\n }\n } else if (this.col < this.instance.getSettings().fixedColumnsLeft) {\n section = 'left';\n }\n\n return section;\n};\n\nregisterEditor('base', BaseEditor);\n\nexport default BaseEditor;\n\n\n\n// WEBPACK FOOTER //\n// src/editors/_baseEditor.js","import {\n addClass,\n getCaretPosition,\n getComputedStyle,\n getCssTransform,\n getScrollableElement,\n getScrollbarWidth,\n innerWidth,\n offset,\n resetCssTransform,\n setCaretPosition,\n hasVerticalScrollbar,\n hasHorizontalScrollbar\n} from './../helpers/dom/element';\nimport autoResize from './../../lib/autoResize/autoResize';\nimport BaseEditor, {EditorState} from './_baseEditor';\nimport EventManager from './../eventManager';\nimport {getEditor, registerEditor} from './../editors';\nimport {KEY_CODES} from './../helpers/unicode';\nimport {stopPropagation, stopImmediatePropagation, isImmediatePropagationStopped} from './../helpers/dom/event';\n\nconst TextEditor = BaseEditor.prototype.extend();\n\n/**\n * @private\n * @editor TextEditor\n * @class TextEditor\n * @dependencies autoResize\n */\nTextEditor.prototype.init = function() {\n var that = this;\n this.createElements();\n this.eventManager = new EventManager(this);\n this.bindEvents();\n this.autoResize = autoResize();\n\n this.instance.addHook('afterDestroy', () => {\n that.destroy();\n });\n};\n\nTextEditor.prototype.getValue = function() {\n return this.TEXTAREA.value;\n};\n\nTextEditor.prototype.setValue = function(newValue) {\n this.TEXTAREA.value = newValue;\n};\n\nvar onBeforeKeyDown = function onBeforeKeyDown(event) {\n var\n instance = this,\n that = instance.getActiveEditor(),\n ctrlDown;\n\n // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)\n ctrlDown = (event.ctrlKey || event.metaKey) && !event.altKey;\n\n // Process only events that have been fired in the editor\n if (event.target !== that.TEXTAREA || isImmediatePropagationStopped(event)) {\n return;\n }\n\n if (event.keyCode === 17 || event.keyCode === 224 || event.keyCode === 91 || event.keyCode === 93) {\n // when CTRL or its equivalent is pressed and cell is edited, don't prepare selectable text in textarea\n stopImmediatePropagation(event);\n return;\n }\n\n switch (event.keyCode) {\n case KEY_CODES.ARROW_RIGHT:\n if (that.isInFullEditMode()) {\n if ((!that.isWaiting() && !that.allowKeyEventPropagation) ||\n (!that.isWaiting() && that.allowKeyEventPropagation && !that.allowKeyEventPropagation(event.keyCode))) {\n stopImmediatePropagation(event);\n }\n }\n break;\n case KEY_CODES.ARROW_LEFT:\n if (that.isInFullEditMode()) {\n if ((!that.isWaiting() && !that.allowKeyEventPropagation) ||\n (!that.isWaiting() && that.allowKeyEventPropagation && !that.allowKeyEventPropagation(event.keyCode))) {\n stopImmediatePropagation(event);\n }\n }\n break;\n case KEY_CODES.ARROW_UP:\n case KEY_CODES.ARROW_DOWN:\n if (that.isInFullEditMode()) {\n if ((!that.isWaiting() && !that.allowKeyEventPropagation) ||\n (!that.isWaiting() && that.allowKeyEventPropagation && !that.allowKeyEventPropagation(event.keyCode))) {\n stopImmediatePropagation(event);\n }\n }\n break;\n\n case KEY_CODES.ENTER:\n var selected = that.instance.getSelected();\n var isMultipleSelection = !(selected[0] === selected[2] && selected[1] === selected[3]);\n if ((ctrlDown && !isMultipleSelection) || event.altKey) { // if ctrl+enter or alt+enter, add new line\n if (that.isOpened()) {\n var\n caretPosition = getCaretPosition(that.TEXTAREA),\n value = that.getValue();\n\n var newValue = `${value.slice(0, caretPosition)}\\n${value.slice(caretPosition)}`;\n\n that.setValue(newValue);\n\n setCaretPosition(that.TEXTAREA, caretPosition + 1);\n\n } else {\n that.beginEditing(`${that.originalValue}\\n`);\n }\n stopImmediatePropagation(event);\n }\n event.preventDefault(); // don't add newline to field\n break;\n\n case KEY_CODES.A:\n case KEY_CODES.X:\n case KEY_CODES.C:\n case KEY_CODES.V:\n if (ctrlDown) {\n stopImmediatePropagation(event); // CTRL+A, CTRL+C, CTRL+V, CTRL+X should only work locally when cell is edited (not in table context)\n }\n break;\n\n case KEY_CODES.BACKSPACE:\n case KEY_CODES.DELETE:\n case KEY_CODES.HOME:\n case KEY_CODES.END:\n stopImmediatePropagation(event); // backspace, delete, home, end should only work locally when cell is edited (not in table context)\n break;\n default:\n break;\n }\n\n if ([KEY_CODES.ARROW_UP, KEY_CODES.ARROW_RIGHT, KEY_CODES.ARROW_DOWN, KEY_CODES.ARROW_LEFT].indexOf(event.keyCode) === -1) {\n that.autoResize.resize(String.fromCharCode(event.keyCode));\n }\n};\n\nTextEditor.prototype.open = function() {\n this.refreshDimensions(); // need it instantly, to prevent https://github.com/handsontable/handsontable/issues/348\n\n this.instance.addHook('beforeKeyDown', onBeforeKeyDown);\n};\n\nTextEditor.prototype.close = function(tdOutside) {\n this.textareaParentStyle.display = 'none';\n\n this.autoResize.unObserve();\n\n if (document.activeElement === this.TEXTAREA) {\n this.instance.listen(); // don't refocus the table if user focused some cell outside of HT on purpose\n }\n this.instance.removeHook('beforeKeyDown', onBeforeKeyDown);\n};\n\nTextEditor.prototype.focus = function() {\n this.TEXTAREA.focus();\n setCaretPosition(this.TEXTAREA, this.TEXTAREA.value.length);\n};\n\nTextEditor.prototype.createElements = function() {\n // this.$body = $(document.body);\n\n this.TEXTAREA = document.createElement('TEXTAREA');\n\n addClass(this.TEXTAREA, 'handsontableInput');\n\n this.textareaStyle = this.TEXTAREA.style;\n this.textareaStyle.width = 0;\n this.textareaStyle.height = 0;\n\n this.TEXTAREA_PARENT = document.createElement('DIV');\n addClass(this.TEXTAREA_PARENT, 'handsontableInputHolder');\n\n this.textareaParentStyle = this.TEXTAREA_PARENT.style;\n this.textareaParentStyle.top = 0;\n this.textareaParentStyle.left = 0;\n this.textareaParentStyle.display = 'none';\n\n this.TEXTAREA_PARENT.appendChild(this.TEXTAREA);\n\n this.instance.rootElement.appendChild(this.TEXTAREA_PARENT);\n\n var that = this;\n this.instance._registerTimeout(setTimeout(() => {\n that.refreshDimensions();\n }, 0));\n};\n\nTextEditor.prototype.getEditedCell = function() {\n var\n editorSection = this.checkEditorSection(),\n editedCell;\n\n switch (editorSection) {\n case 'top':\n editedCell = this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({\n row: this.row,\n col: this.col\n });\n this.textareaParentStyle.zIndex = 101;\n break;\n case 'top-left-corner':\n editedCell = this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({\n row: this.row,\n col: this.col\n });\n this.textareaParentStyle.zIndex = 103;\n break;\n case 'bottom-left-corner':\n editedCell = this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell({\n row: this.row,\n col: this.col\n });\n this.textareaParentStyle.zIndex = 103;\n break;\n case 'left':\n editedCell = this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({\n row: this.row,\n col: this.col\n });\n this.textareaParentStyle.zIndex = 102;\n break;\n case 'bottom':\n editedCell = this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.getCell({\n row: this.row,\n col: this.col\n });\n this.textareaParentStyle.zIndex = 102;\n break;\n default:\n editedCell = this.instance.getCell(this.row, this.col);\n this.textareaParentStyle.zIndex = '';\n break;\n }\n\n return editedCell != -1 && editedCell != -2 ? editedCell : void 0;\n};\n\nTextEditor.prototype.refreshValue = function() {\n let sourceData = this.instance.getSourceDataAtCell(this.row, this.prop);\n this.originalValue = sourceData;\n\n this.setValue(sourceData);\n this.refreshDimensions();\n};\n\nTextEditor.prototype.refreshDimensions = function() {\n if (this.state !== EditorState.EDITING) {\n return;\n }\n this.TD = this.getEditedCell();\n\n // TD is outside of the viewport.\n if (!this.TD) {\n this.close(true);\n\n return;\n }\n var\n currentOffset = offset(this.TD),\n containerOffset = offset(this.instance.rootElement),\n scrollableContainer = getScrollableElement(this.TD),\n totalRowsCount = this.instance.countRows(),\n\n // If colHeaders is disabled, cells in the first row have border-top\n editTopModifier = currentOffset.top === containerOffset.top ? 0 : 1,\n editTop = currentOffset.top - containerOffset.top - editTopModifier - (scrollableContainer.scrollTop || 0),\n editLeft = currentOffset.left - containerOffset.left - 1 - (scrollableContainer.scrollLeft || 0),\n\n settings = this.instance.getSettings(),\n rowHeadersCount = this.instance.hasRowHeaders(),\n colHeadersCount = this.instance.hasColHeaders(),\n editorSection = this.checkEditorSection(),\n backgroundColor = this.TD.style.backgroundColor,\n cssTransformOffset;\n\n // TODO: Refactor this to the new instance.getCell method (from #ply-59), after 0.12.1 is released\n switch (editorSection) {\n case 'top':\n cssTransformOffset = getCssTransform(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);\n break;\n case 'left':\n cssTransformOffset = getCssTransform(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);\n break;\n case 'top-left-corner':\n cssTransformOffset = getCssTransform(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);\n break;\n case 'bottom-left-corner':\n cssTransformOffset = getCssTransform(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);\n break;\n case 'bottom':\n cssTransformOffset = getCssTransform(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode);\n break;\n default:\n break;\n }\n\n if (colHeadersCount && this.instance.getSelected()[0] === 0 ||\n (settings.fixedRowsBottom && this.instance.getSelected()[0] === totalRowsCount - settings.fixedRowsBottom)) {\n editTop += 1;\n }\n\n if (this.instance.getSelected()[1] === 0) {\n editLeft += 1;\n }\n\n if (cssTransformOffset && cssTransformOffset != -1) {\n this.textareaParentStyle[cssTransformOffset[0]] = cssTransformOffset[1];\n } else {\n resetCssTransform(this.TEXTAREA_PARENT);\n }\n\n this.textareaParentStyle.top = `${editTop}px`;\n this.textareaParentStyle.left = `${editLeft}px`;\n\n let firstRowOffset = this.instance.view.wt.wtViewport.rowsRenderCalculator.startPosition;\n let firstColumnOffset = this.instance.view.wt.wtViewport.columnsRenderCalculator.startPosition;\n let horizontalScrollPosition = this.instance.view.wt.wtOverlays.leftOverlay.getScrollPosition();\n let verticalScrollPosition = this.instance.view.wt.wtOverlays.topOverlay.getScrollPosition();\n let scrollbarWidth = getScrollbarWidth();\n\n let cellTopOffset = this.TD.offsetTop + firstRowOffset - verticalScrollPosition;\n let cellLeftOffset = this.TD.offsetLeft + firstColumnOffset - horizontalScrollPosition;\n\n let width = innerWidth(this.TD) - 8;\n let actualVerticalScrollbarWidth = hasVerticalScrollbar(scrollableContainer) ? scrollbarWidth : 0;\n let actualHorizontalScrollbarWidth = hasHorizontalScrollbar(scrollableContainer) ? scrollbarWidth : 0;\n let maxWidth = this.instance.view.maximumVisibleElementWidth(cellLeftOffset) - 9 - actualVerticalScrollbarWidth;\n let height = this.TD.scrollHeight + 1;\n let maxHeight = Math.max(this.instance.view.maximumVisibleElementHeight(cellTopOffset) - actualHorizontalScrollbarWidth, 23);\n\n const cellComputedStyle = getComputedStyle(this.TD);\n\n this.TEXTAREA.style.fontSize = cellComputedStyle.fontSize;\n this.TEXTAREA.style.fontFamily = cellComputedStyle.fontFamily;\n this.TEXTAREA.style.backgroundColor = ''; // RESET STYLE\n this.TEXTAREA.style.backgroundColor = backgroundColor ? backgroundColor : getComputedStyle(this.TEXTAREA).backgroundColor;\n\n this.autoResize.init(this.TEXTAREA, {\n minHeight: Math.min(height, maxHeight),\n maxHeight, // TEXTAREA should never be wider than visible part of the viewport (should not cover the scrollbar)\n minWidth: Math.min(width, maxWidth),\n maxWidth // TEXTAREA should never be wider than visible part of the viewport (should not cover the scrollbar)\n }, true);\n\n this.textareaParentStyle.display = 'block';\n};\n\nTextEditor.prototype.bindEvents = function() {\n var editor = this;\n\n this.eventManager.addEventListener(this.TEXTAREA, 'cut', (event) => {\n stopPropagation(event);\n });\n\n this.eventManager.addEventListener(this.TEXTAREA, 'paste', (event) => {\n stopPropagation(event);\n });\n\n this.instance.addHook('afterScrollHorizontally', () => {\n editor.refreshDimensions();\n });\n\n this.instance.addHook('afterScrollVertically', () => {\n editor.refreshDimensions();\n });\n\n this.instance.addHook('afterColumnResize', () => {\n editor.refreshDimensions();\n editor.focus();\n });\n\n this.instance.addHook('afterRowResize', () => {\n editor.refreshDimensions();\n editor.focus();\n });\n\n this.instance.addHook('afterDestroy', () => {\n editor.eventManager.destroy();\n });\n};\n\nTextEditor.prototype.destroy = function() {\n this.eventManager.destroy();\n};\n\nregisterEditor('text', TextEditor);\n\nexport default TextEditor;\n\n\n\n// WEBPACK FOOTER //\n// src/editors/textEditor.js","var core = module.exports = {version: '2.4.0'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_core.js\n// module id = 43\n// module chunks = 0","module.exports = {};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_iterators.js\n// module id = 44\n// module chunks = 0","var META = require('./_uid')('meta')\n , isObject = require('./_is-object')\n , has = require('./_has')\n , setDesc = require('./_object-dp').f\n , id = 0;\nvar isExtensible = Object.isExtensible || function(){\n return true;\n};\nvar FREEZE = !require('./_fails')(function(){\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function(it){\n setDesc(it, META, {value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n }});\n};\nvar fastKey = function(it, create){\n // return primitive with prefix\n if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if(!has(it, META)){\n // can't set metadata to uncaught frozen object\n if(!isExtensible(it))return 'F';\n // not necessary to add metadata\n if(!create)return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function(it, create){\n if(!has(it, META)){\n // can't set metadata to uncaught frozen object\n if(!isExtensible(it))return true;\n // not necessary to add metadata\n if(!create)return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function(it){\n if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_meta.js\n// module id = 45\n// module chunks = 0","exports.f = {}.propertyIsEnumerable;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-pie.js\n// module id = 46\n// module chunks = 0","var def = require('./_object-dp').f\n , has = require('./_has')\n , TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function(it, tag, stat){\n if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_set-to-string-tag.js\n// module id = 47\n// module chunks = 0","var id = 0\n , px = Math.random();\nmodule.exports = function(key){\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_uid.js\n// module id = 48\n// module chunks = 0","//! moment.js\n//! version : 2.18.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\nvar hookCallback;\n\nfunction hooks () {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback (callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n}\n\nfunction isObjectEmpty(obj) {\n var k;\n for (k in obj) {\n // even if its not own property I'd still call it non-empty\n return false;\n }\n return true;\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n}\n\nfunction isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n}\n\nfunction map(arr, fn) {\n var res = [], i;\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty : false,\n unusedTokens : [],\n unusedInput : [],\n overflow : -2,\n charsLeftOver : 0,\n nullInput : false,\n invalidMonth : null,\n invalidFormat : false,\n userInvalidated : false,\n iso : false,\n parsedDateParts : [],\n meridiem : null,\n rfc2822 : false,\n weekdayMismatch : false\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nvar some$1 = some;\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some$1.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid = isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n }\n else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid (flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n }\n else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = hooks.momentProperties = [];\n\nfunction copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\nvar updateInProgress = false;\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment (obj) {\n return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n}\n\nfunction absFloor (number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\nfunction warn(msg) {\n if (hooks.suppressDeprecationWarnings === false &&\n (typeof console !== 'undefined') && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [];\n var arg;\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + (new Error()).stack);\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n}\n\nfunction set (config) {\n var prop, i;\n for (i in config) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' + (/\\d{1,2}/).source);\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig), prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i, res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar keys$1 = keys;\n\nvar defaultCalendar = {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n};\n\nfunction calendar (key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nvar defaultLongDateFormat = {\n LTS : 'h:mm:ss A',\n LT : 'h:mm A',\n L : 'MM/DD/YYYY',\n LL : 'MMMM D, YYYY',\n LLL : 'MMMM D, YYYY h:mm A',\n LLLL : 'dddd, MMMM D, YYYY h:mm A'\n};\n\nfunction longDateFormat (key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate () {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d';\nvar defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal (number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n ss : '%d seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n};\n\nfunction relativeTime (number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return (isFunction(output)) ?\n output(number, withoutSuffix, string, isFuture) :\n output.replace(/%d/i, number);\n}\n\nfunction pastFuture (diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias (unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [];\n for (var u in unitsObj) {\n units.push({unit: u, priority: priorities[u]});\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction makeGetSet (unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get (mom, unit) {\n return mom.isValid() ?\n mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n}\n\nfunction set$1 (mom, unit, value) {\n if (mom.isValid()) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n}\n\n// MOMENTS\n\nfunction stringGet (units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\n\nfunction stringSet (units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n}\n\nvar formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n\nvar localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\nvar formatFunctions = {};\n\nvar formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken (token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens), i, length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '', i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar match1 = /\\d/; // 0 - 9\nvar match2 = /\\d\\d/; // 00 - 99\nvar match3 = /\\d{3}/; // 000 - 999\nvar match4 = /\\d{4}/; // 0000 - 9999\nvar match6 = /[+-]?\\d{6}/; // -999999 - 999999\nvar match1to2 = /\\d\\d?/; // 0 - 99\nvar match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\nvar match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\nvar match1to3 = /\\d{1,3}/; // 0 - 999\nvar match1to4 = /\\d{1,4}/; // 0 - 9999\nvar match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\nvar matchUnsigned = /\\d+/; // 0 - inf\nvar matchSigned = /[+-]?\\d+/; // -inf - inf\n\nvar matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\nvar matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\nvar matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n// any word (or two) characters or numbers including two/three word month in arabic.\n// includes scottish gaelic two word and hyphenated months\nvar matchWord = /[0-9]*['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+|[\\u0600-\\u06FF\\/]+(\\s*?[\\u0600-\\u06FF]+){1,2}/i;\n\n\nvar regexes = {};\n\nfunction addRegexToken (token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return (isStrict && strictRegex) ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken (token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken (token, callback) {\n var i, func = callback;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken (token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0;\nvar MONTH = 1;\nvar DATE = 2;\nvar HOUR = 3;\nvar MINUTE = 4;\nvar SECOND = 5;\nvar MILLISECOND = 6;\nvar WEEK = 7;\nvar WEEKDAY = 8;\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nvar indexOf$1 = indexOf;\n\nfunction daysInMonth(year, month) {\n return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\nvar defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\nfunction localeMonths (m, format) {\n if (!m) {\n return isArray(this._months) ? this._months :\n this._months['standalone'];\n }\n return isArray(this._months) ? this._months[m.month()] :\n this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n}\n\nvar defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\nfunction localeMonthsShort (m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort :\n this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] :\n this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i, ii, mom, llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf$1.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf$1.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse (monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth (mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth (value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth () {\n return daysInMonth(this.year(), this.month());\n}\n\nvar defaultMonthsShortRegex = matchWord;\nfunction monthsShortRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict ?\n this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n}\n\nvar defaultMonthsRegex = matchWord;\nfunction monthsRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict ?\n this._monthsStrictRegex : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear () {\n return isLeapYear(this.year());\n}\n\nfunction createDate (y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date = new Date(y, m, d, h, M, s, ms);\n\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n return date;\n}\n\nfunction createUTCDate (y) {\n var date = new Date(Date.UTC.apply(null, arguments));\n\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear, resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek, resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n});\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek (mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek () {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear () {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek (input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek (input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\n\nvar defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\nfunction localeWeekdays (m, format) {\n if (!m) {\n return isArray(this._weekdays) ? this._weekdays :\n this._weekdays['standalone'];\n }\n return isArray(this._weekdays) ? this._weekdays[m.day()] :\n this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];\n}\n\nvar defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\nfunction localeWeekdaysShort (m) {\n return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n}\n\nvar defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\nfunction localeWeekdaysMin (m) {\n return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i, ii, mom, llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf$1.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf$1.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse (weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i');\n }\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nvar defaultWeekdaysRegex = matchWord;\nfunction weekdaysRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict ?\n this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n}\n\nvar defaultWeekdaysShortRegex = matchWord;\nfunction weekdaysShortRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict ?\n this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n}\n\nvar defaultWeekdaysMinRegex = matchWord;\nfunction weekdaysMinRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict ?\n this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n}\n\n\nfunction computeWeekdaysParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom, minp, shortp, longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n});\n\nfunction meridiem (token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem (isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM (input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return ((input + '').toLowerCase().charAt(0) === 'p');\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\nfunction localeMeridiem (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\n\n// MOMENTS\n\n// Setting the hour should keep the time, because the user explicitly\n// specified which hour he wants. So trying to maintain the same hour (in\n// a new timezone) makes sense. Adding/subtracting hours does not follow\n// this rule.\nvar getSetHour = makeGetSet('Hours', true);\n\n// months\n// week\n// weekdays\n// meridiem\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse\n};\n\n// internal storage for locale config files\nvar locales = {};\nvar localeFamilies = {};\nvar globalLocale;\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null;\n // TODO: Find a better way to register and load all the locales in Node\n if (!locales[name] && (typeof module !== 'undefined') &&\n module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n require('./locale/' + name);\n // because defineLocale currently also sets the global locale, we\n // want to undo that for lazy loaded locales\n getSetGlobalLocale(oldLocale);\n } catch (e) { }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale (name, config) {\n if (config !== null) {\n var parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale, parentConfig = baseConfig;\n // MERGE\n if (locales[name] != null) {\n parentConfig = locales[name]._config;\n }\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale (key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys$1(locales);\n}\n\nfunction checkOverflow (m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :\n a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :\n a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :\n a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\nvar basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n\nvar tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n\nvar isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/]\n];\n\n// iso time formats and regexes\nvar isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/]\n];\n\nvar aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n// date from iso format\nfunction configFromISO(config) {\n var i, l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime, dateFormat, timeFormat, tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\n// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\nvar basicRfcRegex = /^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d?\\d\\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(?:\\d\\d)?\\d\\d\\s)(\\d\\d:\\d\\d)(\\:\\d\\d)?(\\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\\d{4}))$/;\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var string, match, dayFormat,\n dateFormat, timeFormat, tzFormat;\n var timezones = {\n ' GMT': ' +0000',\n ' EDT': ' -0400',\n ' EST': ' -0500',\n ' CDT': ' -0500',\n ' CST': ' -0600',\n ' MDT': ' -0600',\n ' MST': ' -0700',\n ' PDT': ' -0700',\n ' PST': ' -0800'\n };\n var military = 'YXWVUTSRQPONZABCDEFGHIKLM';\n var timezone, timezoneIndex;\n\n string = config._i\n .replace(/\\([^\\)]*\\)|[\\n\\t]/g, ' ') // Remove comments and folding whitespace\n .replace(/(\\s\\s+)/g, ' ') // Replace multiple-spaces with a single space\n .replace(/^\\s|\\s$/g, ''); // Remove leading and trailing spaces\n match = basicRfcRegex.exec(string);\n\n if (match) {\n dayFormat = match[1] ? 'ddd' + ((match[1].length === 5) ? ', ' : ' ') : '';\n dateFormat = 'D MMM ' + ((match[2].length > 10) ? 'YYYY ' : 'YY ');\n timeFormat = 'HH:mm' + (match[4] ? ':ss' : '');\n\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n if (match[1]) { // day of week given\n var momentDate = new Date(match[2]);\n var momentDay = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'][momentDate.getDay()];\n\n if (match[1].substr(0,3) !== momentDay) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return;\n }\n }\n\n switch (match[5].length) {\n case 2: // military\n if (timezoneIndex === 0) {\n timezone = ' +0000';\n } else {\n timezoneIndex = military.indexOf(match[5][1].toUpperCase()) - 12;\n timezone = ((timezoneIndex < 0) ? ' -' : ' +') +\n (('' + timezoneIndex).replace(/^-?/, '0')).match(/..$/)[0] + '00';\n }\n break;\n case 4: // Zone\n timezone = timezones[match[5]];\n break;\n default: // UT or +/-9999\n timezone = timezones[' GMT'];\n }\n match[5] = timezone;\n config._i = match.splice(1).join('');\n tzFormat = ' ZZ';\n config._f = dayFormat + dateFormat + timeFormat + tzFormat;\n configFromStringAndFormat(config);\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from iso format or fallback\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged and will be removed in an upcoming major release. Please refer to ' +\n 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n var curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from begining of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to begining of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n }\n else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n configFromArray(config);\n checkOverflow(config);\n}\n\n\nfunction meridiemFixWrap (locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n\n configFromArray(config);\n}\n\nfunction createFromConfig (config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig (config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({nullInput: true});\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC (input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if ((isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n);\n\nvar prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n);\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +(new Date());\n};\n\nvar ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\nfunction isDurationValid(m) {\n for (var key in m) {\n if (!(ordering.indexOf(key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration (duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds = +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days +\n weeks * 7;\n // It is impossible translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months +\n quarters * 3 +\n years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration (obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound (number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// FORMATTING\n\nfunction offset (token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ?\n 0 :\n parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset (m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset (input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone (input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC (keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal (keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset () {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n }\n else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset (input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime () {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted () {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() &&\n compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal () {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset () {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc () {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(\\-)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/;\n\n// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n// and further modified to allow for strings containing both week and day\nvar isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;\n\nfunction createDuration (input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms : input._milliseconds,\n d : input._days,\n M : input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : 0,\n d : toInt(match[DATE]) * sign,\n h : toInt(match[HOUR]) * sign,\n m : toInt(match[MINUTE]) * sign,\n s : toInt(match[SECOND]) * sign,\n ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : parseIso(match[2], sign),\n M : parseIso(match[3], sign),\n w : parseIso(match[4], sign),\n d : parseIso(match[5], sign),\n h : parseIso(match[6], sign),\n m : parseIso(match[7], sign),\n s : parseIso(match[8], sign)\n };\n } else if (duration == null) {// checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso (inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {milliseconds: 0, months: 0};\n\n res.months = other.month() - base.month() +\n (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return {milliseconds: 0, months: 0};\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val; val = period; period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract (mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add');\nvar subtract = createAdder(-1, 'subtract');\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' :\n diff < -1 ? 'lastWeek' :\n diff < 0 ? 'lastDay' :\n diff < 1 ? 'sameDay' :\n diff < 2 ? 'nextDay' :\n diff < 7 ? 'nextWeek' : 'sameElse';\n}\n\nfunction calendar$1 (time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n}\n\nfunction clone () {\n return new Moment(this);\n}\n\nfunction isAfter (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween (from, to, units, inclusivity) {\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&\n (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));\n}\n\nfunction isSame (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units || 'millisecond');\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n}\n\nfunction isSameOrAfter (input, units) {\n return this.isSame(input, units) || this.isAfter(input,units);\n}\n\nfunction isSameOrBefore (input, units) {\n return this.isSame(input, units) || this.isBefore(input,units);\n}\n\nfunction diff (input, units, asFloat) {\n var that,\n zoneDelta,\n delta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n if (units === 'year' || units === 'month' || units === 'quarter') {\n output = monthDiff(this, that);\n if (units === 'quarter') {\n output = output / 3;\n } else if (units === 'year') {\n output = output / 12;\n }\n } else {\n delta = this - that;\n output = units === 'second' ? delta / 1e3 : // 1000\n units === 'minute' ? delta / 6e4 : // 1000 * 60\n units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60\n units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst\n units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst\n delta;\n }\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff (a, b) {\n // difference in months\n var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2, adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString () {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString() {\n if (!this.isValid()) {\n return null;\n }\n var m = this.clone().utc();\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n return this.toDate().toISOString();\n }\n return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format (inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow (withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow (withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData () {\n return this._locale;\n}\n\nfunction startOf (units) {\n units = normalizeUnits(units);\n // the following switch intentionally omits break keywords\n // to utilize falling through the cases.\n switch (units) {\n case 'year':\n this.month(0);\n /* falls through */\n case 'quarter':\n case 'month':\n this.date(1);\n /* falls through */\n case 'week':\n case 'isoWeek':\n case 'day':\n case 'date':\n this.hours(0);\n /* falls through */\n case 'hour':\n this.minutes(0);\n /* falls through */\n case 'minute':\n this.seconds(0);\n /* falls through */\n case 'second':\n this.milliseconds(0);\n }\n\n // weeks are a special case\n if (units === 'week') {\n this.weekday(0);\n }\n if (units === 'isoWeek') {\n this.isoWeekday(1);\n }\n\n // quarters are also special\n if (units === 'quarter') {\n this.month(Math.floor(this.month() / 3) * 3);\n }\n\n return this;\n}\n\nfunction endOf (units) {\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond') {\n return this;\n }\n\n // 'date' is an alias for 'day', so it should be considered as such.\n if (units === 'date') {\n units = 'day';\n }\n\n return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');\n}\n\nfunction valueOf () {\n return this._d.valueOf() - ((this._offset || 0) * 60000);\n}\n\nfunction unix () {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate () {\n return new Date(this.valueOf());\n}\n\nfunction toArray () {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n}\n\nfunction toObject () {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n}\n\nfunction toJSON () {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2 () {\n return isValid(this);\n}\n\nfunction parsingFlags () {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt () {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken (token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n});\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy);\n}\n\nfunction getSetISOWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input, this.isoWeek(), this.isoWeekday(), 1, 4);\n}\n\nfunction getISOWeeksInYear () {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getWeeksInYear () {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter (input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIOROITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ?\n (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :\n locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0], 10);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear (input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n// MOMENTS\n\nvar getSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr () {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName () {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\n\n// Year\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\n\n// Week Year\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\n\n// Quarter\nproto.quarter = proto.quarters = getSetQuarter;\n\n// Month\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\n\n// Week\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\n\n// Day\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\n\n// Hour\nproto.hour = proto.hours = getSetHour;\n\n// Minute\nproto.minute = proto.minutes = getSetMinute;\n\n// Second\nproto.second = proto.seconds = getSetSecond;\n\n// Millisecond\nproto.millisecond = proto.milliseconds = getSetMillisecond;\n\n// Offset\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\n\n// Timezone\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\n\n// Deprecations\nproto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\nproto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\nproto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\nproto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\nproto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\nfunction createUnix (input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone () {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat (string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\n\n// Month\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\n\n// Week\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n// Day of Week\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n// Hours\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1 (format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl (format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl (localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths (format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort (format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (toInt(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n }\n});\n\n// Side effect imports\nhooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\nhooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n\nvar mathAbs = Math.abs;\n\nfunction abs () {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1 (duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1 (input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1 (input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil (number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble () {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0))) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths (days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n}\n\nfunction monthsToDays (months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n}\n\nfunction as (units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days;\n var months;\n var milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n return units === 'month' ? months : months / 12;\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week' : return days / 7 + milliseconds / 6048e5;\n case 'day' : return days + milliseconds / 864e5;\n case 'hour' : return days * 24 + milliseconds / 36e5;\n case 'minute' : return days * 1440 + milliseconds / 6e4;\n case 'second' : return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n default: throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1 () {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs (alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms');\nvar asSeconds = makeAs('s');\nvar asMinutes = makeAs('m');\nvar asHours = makeAs('h');\nvar asDays = makeAs('d');\nvar asWeeks = makeAs('w');\nvar asMonths = makeAs('M');\nvar asYears = makeAs('y');\n\nfunction get$2 (units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds');\nvar seconds = makeGetter('seconds');\nvar minutes = makeGetter('minutes');\nvar hours = makeGetter('hours');\nvar days = makeGetter('days');\nvar months = makeGetter('months');\nvar years = makeGetter('years');\n\nfunction weeks () {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round;\nvar thresholds = {\n ss: 44, // a few seconds to seconds\n s : 45, // seconds to minute\n m : 45, // minutes to hour\n h : 22, // hours to day\n d : 26, // days to month\n M : 11 // months to year\n};\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1 (posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n\n var a = seconds <= thresholds.ss && ['s', seconds] ||\n seconds < thresholds.s && ['ss', seconds] ||\n minutes <= 1 && ['m'] ||\n minutes < thresholds.m && ['mm', minutes] ||\n hours <= 1 && ['h'] ||\n hours < thresholds.h && ['hh', hours] ||\n days <= 1 && ['d'] ||\n days < thresholds.d && ['dd', days] ||\n months <= 1 && ['M'] ||\n months < thresholds.M && ['MM', months] ||\n years <= 1 && ['y'] || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize (withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years;\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds;\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n return (total < 0 ? '-' : '') +\n 'P' +\n (Y ? Y + 'Y' : '') +\n (M ? M + 'M' : '') +\n (D ? D + 'D' : '') +\n ((h || m || s) ? 'T' : '') +\n (h ? h + 'H' : '') +\n (m ? m + 'M' : '') +\n (s ? s + 'S' : '');\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\n// Deprecations\nproto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\nproto$2.lang = lang;\n\n// Side effect imports\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n// Side effect imports\n\n\nhooks.version = '2.18.1';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\nreturn hooks;\n\n})));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/moment.js\n// module id = 49\n// module chunks = 0","import cellTypes from './../cellTypes';\nimport {hasOwnProperty} from './object';\n\nconst COLUMN_LABEL_BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\nconst COLUMN_LABEL_BASE_LENGTH = COLUMN_LABEL_BASE.length;\n\n/**\n * Generates spreadsheet-like column names: A, B, C, ..., Z, AA, AB, etc.\n *\n * @param {Number} index Column index.\n * @returns {String}\n */\nexport function spreadsheetColumnLabel(index) {\n let dividend = index + 1;\n let columnLabel = '';\n let modulo;\n\n while (dividend > 0) {\n modulo = (dividend - 1) % COLUMN_LABEL_BASE_LENGTH;\n columnLabel = String.fromCharCode(65 + modulo) + columnLabel;\n dividend = parseInt((dividend - modulo) / COLUMN_LABEL_BASE_LENGTH, 10);\n }\n\n return columnLabel;\n}\n\n/**\n * Generates spreadsheet-like column index from theirs labels: A, B, C ...., Z, AA, AB, etc.\n *\n * @param {String} label Column label.\n * @returns {Number}\n */\nexport function spreadsheetColumnIndex(label) {\n let result = 0;\n\n if (label) {\n for (let i = 0, j = label.length - 1; i < label.length; i += 1, j -= 1) {\n result += Math.pow(COLUMN_LABEL_BASE_LENGTH, j) * (COLUMN_LABEL_BASE.indexOf(label[i]) + 1);\n }\n }\n --result;\n\n return result;\n}\n\n/**\n * Creates 2D array of Excel-like values \"A1\", \"A2\", ...\n *\n * @param {Number} rows Number of rows to generate.\n * @param {Number} columns Number of columns to generate.\n * @returns {Array}\n */\nexport function createSpreadsheetData(rows = 100, columns = 4) {\n var _rows = [],\n i,\n j;\n\n for (i = 0; i < rows; i++) {\n var row = [];\n\n for (j = 0; j < columns; j++) {\n row.push(spreadsheetColumnLabel(j) + (i + 1));\n }\n _rows.push(row);\n }\n\n return _rows;\n}\n\n/**\n * Creates 2D array of Excel-like values \"A1\", \"A2\", as an array of objects.\n *\n * @param {Number} rows Number of rows to generate.\n * @param {Number} colCount Number of columns to generate.\n * @returns {Array}\n */\nexport function createSpreadsheetObjectData(rows = 100, colCount = 4) {\n var _rows = [],\n i,\n j;\n\n for (i = 0; i < rows; i++) {\n var row = {};\n\n for (j = 0; j < colCount; j++) {\n row[`prop${j}`] = spreadsheetColumnLabel(j) + (i + 1);\n }\n _rows.push(row);\n }\n\n return _rows;\n}\n\n/**\n * Generates an empty data object.\n *\n * @param {Number} rows Number of rows to generate.\n * @param {Number} columns Number of columns to generate\n * @returns {Array}\n */\nexport function createEmptySpreadsheetData(rows, columns) {\n let data = [];\n let row;\n\n for (let i = 0; i < rows; i++) {\n row = [];\n for (let j = 0; j < columns; j++) {\n row.push('');\n }\n data.push(row);\n }\n\n return data;\n}\n\nexport function translateRowsToColumns(input) {\n var i,\n ilen,\n j,\n jlen,\n output = [],\n olen = 0;\n\n for (i = 0, ilen = input.length; i < ilen; i++) {\n for (j = 0, jlen = input[i].length; j < jlen; j++) {\n if (j == olen) {\n output.push([]);\n olen++;\n }\n output[j].push(input[i][j]);\n }\n }\n\n return output;\n}\n\n/**\n * Factory that produces a function for searching methods (or any properties) which could be defined directly in\n * table configuration or implicitly, within cell type definition.\n *\n * For example: renderer can be defined explicitly using \"renderer\" property in column configuration or it can be\n * defined implicitly using \"type\" property.\n *\n * Methods/properties defined explicitly always takes precedence over those defined through \"type\".\n *\n * If the method/property is not found in an object, searching is continued recursively through prototype chain, until\n * it reaches the Object.prototype.\n *\n *\n * @param methodName {String} name of the method/property to search (i.e. 'renderer', 'validator', 'copyable')\n * @param allowUndefined {Boolean} [optional] if false, the search is continued if methodName has not been found in cell \"type\"\n * @returns {Function}\n */\nexport function cellMethodLookupFactory(methodName, allowUndefined) {\n\n allowUndefined = typeof allowUndefined == 'undefined' ? true : allowUndefined;\n\n return function cellMethodLookup(row, col) {\n return (function getMethodFromProperties(properties) {\n\n if (!properties) {\n return; // method not found\n\n } else if (hasOwnProperty(properties, methodName) && properties[methodName] !== void 0) { // check if it is own and is not empty\n return properties[methodName]; // method defined directly\n\n } else if (hasOwnProperty(properties, 'type') && properties.type) { // check if it is own and is not empty\n var type;\n\n if (typeof properties.type != 'string') {\n throw new Error('Cell type must be a string ');\n }\n type = translateTypeNameToObject(properties.type);\n\n if (hasOwnProperty(type, methodName)) {\n return type[methodName]; // method defined in type.\n } else if (allowUndefined) {\n return; // method does not defined in type (eg. validator), returns undefined\n }\n }\n\n return getMethodFromProperties(Object.getPrototypeOf(properties));\n\n }(typeof row == 'number' ? this.getCellMeta(row, col) : row));\n };\n\n function translateTypeNameToObject(typeName) {\n var type = cellTypes[typeName];\n\n if (typeof type == 'undefined') {\n throw new Error(`You declared cell type \"${typeName}\" as a string that is not mapped to a known object. ` +\n 'Cell type must be an object or a string mapped to an object in Handsontable.cellTypes');\n }\n\n return type;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// src/helpers/data.js","import {objectEach} from './../../helpers/object';\nimport alignmentItem, {KEY as ALIGNMENT} from './predefinedItems/alignment';\nimport clearColumnItem, {KEY as CLEAR_COLUMN} from './predefinedItems/clearColumn';\nimport columnLeftItem, {KEY as COLUMN_LEFT} from './predefinedItems/columnLeft';\nimport columnRightItem, {KEY as COLUMN_RIGHT} from './predefinedItems/columnRight';\nimport readOnlyItem, {KEY as READ_ONLY} from './predefinedItems/readOnly';\nimport redoItem, {KEY as REDO} from './predefinedItems/redo';\nimport removeColumnItem, {KEY as REMOVE_COLUMN} from './predefinedItems/removeColumn';\nimport removeRowItem, {KEY as REMOVE_ROW} from './predefinedItems/removeRow';\nimport rowAboveItem, {KEY as ROW_ABOVE} from './predefinedItems/rowAbove';\nimport rowBelowItem, {KEY as ROW_BELOW} from './predefinedItems/rowBelow';\nimport separatorItem, {KEY as SEPARATOR} from './predefinedItems/separator';\nimport undoItem, {KEY as UNDO} from './predefinedItems/undo';\n\nexport {KEY as ALIGNMENT} from './predefinedItems/alignment';\nexport {KEY as CLEAR_COLUMN} from './predefinedItems/clearColumn';\nexport {KEY as COLUMN_LEFT} from './predefinedItems/columnLeft';\nexport {KEY as COLUMN_RIGHT} from './predefinedItems/columnRight';\nexport {KEY as READ_ONLY} from './predefinedItems/readOnly';\nexport {KEY as REDO} from './predefinedItems/redo';\nexport {KEY as REMOVE_COLUMN} from './predefinedItems/removeColumn';\nexport {KEY as REMOVE_ROW} from './predefinedItems/removeRow';\nexport {KEY as ROW_ABOVE} from './predefinedItems/rowAbove';\nexport {KEY as ROW_BELOW} from './predefinedItems/rowBelow';\nexport {KEY as SEPARATOR} from './predefinedItems/separator';\nexport {KEY as UNDO} from './predefinedItems/undo';\n\nexport const ITEMS = [\n ROW_ABOVE, ROW_BELOW, COLUMN_LEFT, COLUMN_RIGHT, CLEAR_COLUMN, REMOVE_ROW, REMOVE_COLUMN, UNDO, REDO, READ_ONLY,\n ALIGNMENT, SEPARATOR\n];\n\nconst _predefinedItems = {\n [SEPARATOR]: separatorItem,\n [ROW_ABOVE]: rowAboveItem,\n [ROW_BELOW]: rowBelowItem,\n [COLUMN_LEFT]: columnLeftItem,\n [COLUMN_RIGHT]: columnRightItem,\n [CLEAR_COLUMN]: clearColumnItem,\n [REMOVE_ROW]: removeRowItem,\n [REMOVE_COLUMN]: removeColumnItem,\n [UNDO]: undoItem,\n [REDO]: redoItem,\n [READ_ONLY]: readOnlyItem,\n [ALIGNMENT]: alignmentItem,\n};\n\n/**\n * Gets new object with all predefined menu items.\n *\n * @returns {Object}\n */\nexport function predefinedItems() {\n const items = {};\n\n objectEach(_predefinedItems, (itemFactory, key) => {\n items[key] = itemFactory();\n });\n\n return items;\n}\n\n/**\n * Add new predefined menu item to the collection.\n *\n * @param {String} key Menu command id.\n * @param {Object} item Object command descriptor.\n */\nexport function addItem(key, item) {\n if (ITEMS.indexOf(key) === -1) {\n _predefinedItems[key] = item;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/predefinedItems.js","module.exports = function(it, Constructor, name, forbiddenField){\n if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_an-instance.js\n// module id = 52\n// module chunks = 0","// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = require('./_ctx')\n , IObject = require('./_iobject')\n , toObject = require('./_to-object')\n , toLength = require('./_to-length')\n , asc = require('./_array-species-create');\nmodule.exports = function(TYPE, $create){\n var IS_MAP = TYPE == 1\n , IS_FILTER = TYPE == 2\n , IS_SOME = TYPE == 3\n , IS_EVERY = TYPE == 4\n , IS_FIND_INDEX = TYPE == 6\n , NO_HOLES = TYPE == 5 || IS_FIND_INDEX\n , create = $create || asc;\n return function($this, callbackfn, that){\n var O = toObject($this)\n , self = IObject(O)\n , f = ctx(callbackfn, that, 3)\n , length = toLength(self.length)\n , index = 0\n , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined\n , val, res;\n for(;length > index; index++)if(NO_HOLES || index in self){\n val = self[index];\n res = f(val, index, O);\n if(TYPE){\n if(IS_MAP)result[index] = res; // map\n else if(res)switch(TYPE){\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if(IS_EVERY)return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_array-methods.js\n// module id = 53\n// module chunks = 0","'use strict';\nvar global = require('./_global')\n , $export = require('./_export')\n , redefine = require('./_redefine')\n , redefineAll = require('./_redefine-all')\n , meta = require('./_meta')\n , forOf = require('./_for-of')\n , anInstance = require('./_an-instance')\n , isObject = require('./_is-object')\n , fails = require('./_fails')\n , $iterDetect = require('./_iter-detect')\n , setToStringTag = require('./_set-to-string-tag')\n , inheritIfRequired = require('./_inherit-if-required');\n\nmodule.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){\n var Base = global[NAME]\n , C = Base\n , ADDER = IS_MAP ? 'set' : 'add'\n , proto = C && C.prototype\n , O = {};\n var fixMethod = function(KEY){\n var fn = proto[KEY];\n redefine(proto, KEY,\n KEY == 'delete' ? function(a){\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'has' ? function has(a){\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'get' ? function get(a){\n return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; }\n : function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; }\n );\n };\n if(typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){\n new C().entries().next();\n }))){\n // create collection constructor\n C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n redefineAll(C.prototype, methods);\n meta.NEED = true;\n } else {\n var instance = new C\n // early implementations not supports chaining\n , HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n , THROWS_ON_PRIMITIVES = fails(function(){ instance.has(1); })\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n , ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new\n // for early implementations -0 and +0 not the same\n , BUGGY_ZERO = !IS_WEAK && fails(function(){\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new C()\n , index = 5;\n while(index--)$instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n if(!ACCEPT_ITERABLES){ \n C = wrapper(function(target, iterable){\n anInstance(target, C, NAME);\n var that = inheritIfRequired(new Base, target, C);\n if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);\n return that;\n });\n C.prototype = proto;\n proto.constructor = C;\n }\n if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n if(BUGGY_ZERO || HASNT_CHAINING)fixMethod(ADDER);\n // weak collections should not contains .clear method\n if(IS_WEAK && proto.clear)delete proto.clear;\n }\n\n setToStringTag(C, NAME);\n\n O[NAME] = C;\n $export($export.G + $export.W + $export.F * (C != Base), O);\n\n if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP);\n\n return C;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_collection.js\n// module id = 54\n// module chunks = 0","'use strict';\nvar hide = require('./_hide')\n , redefine = require('./_redefine')\n , fails = require('./_fails')\n , defined = require('./_defined')\n , wks = require('./_wks');\n\nmodule.exports = function(KEY, length, exec){\n var SYMBOL = wks(KEY)\n , fns = exec(defined, SYMBOL, ''[KEY])\n , strfn = fns[0]\n , rxfn = fns[1];\n if(fails(function(){\n var O = {};\n O[SYMBOL] = function(){ return 7; };\n return ''[KEY](O) != 7;\n })){\n redefine(String.prototype, KEY, strfn);\n hide(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function(string, arg){ return rxfn.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function(string){ return rxfn.call(string, this); }\n );\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_fix-re-wks.js\n// module id = 55\n// module chunks = 0","var ctx = require('./_ctx')\n , call = require('./_iter-call')\n , isArrayIter = require('./_is-array-iter')\n , anObject = require('./_an-object')\n , toLength = require('./_to-length')\n , getIterFn = require('./core.get-iterator-method')\n , BREAK = {}\n , RETURN = {};\nvar exports = module.exports = function(iterable, entries, fn, that, ITERATOR){\n var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)\n , f = ctx(fn, that, entries ? 2 : 1)\n , index = 0\n , length, step, iterator, result;\n if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if(result === BREAK || result === RETURN)return result;\n } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){\n result = call(iterator, f, step.value, entries);\n if(result === BREAK || result === RETURN)return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_for-of.js\n// module id = 56\n// module chunks = 0","module.exports = false;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_library.js\n// module id = 57\n// module chunks = 0","exports.f = Object.getOwnPropertySymbols;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-gops.js\n// module id = 58\n// module chunks = 0","var redefine = require('./_redefine');\nmodule.exports = function(target, src, safe){\n for(var key in src)redefine(target, key, src[key], safe);\n return target;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_redefine-all.js\n// module id = 59\n// module chunks = 0","var toInteger = require('./_to-integer')\n , max = Math.max\n , min = Math.min;\nmodule.exports = function(index, length){\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_to-index.js\n// module id = 60\n// module chunks = 0","// 7.1.4 ToInteger\nvar ceil = Math.ceil\n , floor = Math.floor;\nmodule.exports = function(it){\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_to-integer.js\n// module id = 61\n// module chunks = 0","import CellCoords from './../cell/coords';\n\n/**\n * A cell range is a set of exactly two CellCoords (that can be the same or different)\n *\n * @class CellRange\n */\nclass CellRange {\n /**\n * @param {CellCoords} highlight Used to draw bold border around a cell where selection was\n * started and to edit the cell when you press Enter\n * @param {CellCoords} from Usually the same as highlight, but in Excel there is distinction - one can change\n * highlight within a selection\n * @param {CellCoords} to End selection\n */\n constructor(highlight, from, to) {\n this.highlight = highlight;\n this.from = from;\n this.to = to;\n }\n\n /**\n * Checks if given coords are valid in context of a given Walkontable instance\n *\n * @param {Walkontable} wotInstance\n * @returns {Boolean}\n */\n isValid(wotInstance) {\n return this.from.isValid(wotInstance) && this.to.isValid(wotInstance);\n }\n\n /**\n * Checks if this cell range is restricted to one cell\n *\n * @returns {Boolean}\n */\n isSingle() {\n return this.from.row === this.to.row && this.from.col === this.to.col;\n }\n\n /**\n * Returns selected range height (in number of rows)\n *\n * @returns {Number}\n */\n getHeight() {\n return Math.max(this.from.row, this.to.row) - Math.min(this.from.row, this.to.row) + 1;\n }\n\n /**\n * Returns selected range width (in number of columns)\n *\n * @returns {Number}\n */\n getWidth() {\n return Math.max(this.from.col, this.to.col) - Math.min(this.from.col, this.to.col) + 1;\n }\n\n /**\n * Checks if given cell coords is within `from` and `to` cell coords of this range\n *\n * @param {CellCoords} cellCoords\n * @returns {Boolean}\n */\n includes(cellCoords) {\n let {row, col} = cellCoords;\n let topLeft = this.getTopLeftCorner();\n let bottomRight = this.getBottomRightCorner();\n\n return topLeft.row <= row && bottomRight.row >= row &&\n topLeft.col <= col && bottomRight.col >= col;\n }\n\n /**\n * Checks if given range is within of this range\n *\n * @param {CellRange} testedRange\n * @returns {Boolean}\n */\n includesRange(testedRange) {\n return this.includes(testedRange.getTopLeftCorner()) && this.includes(testedRange.getBottomRightCorner());\n }\n\n /**\n * Checks if given range is equal to this range\n *\n * @param {CellRange} testedRange\n * @returns {Boolean}\n */\n isEqual(testedRange) {\n return (Math.min(this.from.row, this.to.row) == Math.min(testedRange.from.row, testedRange.to.row)) &&\n (Math.max(this.from.row, this.to.row) == Math.max(testedRange.from.row, testedRange.to.row)) &&\n (Math.min(this.from.col, this.to.col) == Math.min(testedRange.from.col, testedRange.to.col)) &&\n (Math.max(this.from.col, this.to.col) == Math.max(testedRange.from.col, testedRange.to.col));\n }\n\n /**\n * Checks if tested range overlaps with the range.\n * Range A is considered to to be overlapping with range B if intersection of A and B or B and A is not empty.\n *\n * @param {CellRange} testedRange\n * @returns {Boolean}\n */\n overlaps(testedRange) {\n return testedRange.isSouthEastOf(this.getTopLeftCorner()) && testedRange.isNorthWestOf(this.getBottomRightCorner());\n }\n\n /**\n * @param {CellRange} testedCoords\n * @returns {Boolean}\n */\n isSouthEastOf(testedCoords) {\n return this.getTopLeftCorner().isSouthEastOf(testedCoords) || this.getBottomRightCorner().isSouthEastOf(testedCoords);\n }\n\n /**\n * @param {CellRange} testedCoords\n * @returns {Boolean}\n */\n isNorthWestOf(testedCoords) {\n return this.getTopLeftCorner().isNorthWestOf(testedCoords) || this.getBottomRightCorner().isNorthWestOf(testedCoords);\n }\n\n /**\n * Adds a cell to a range (only if exceeds corners of the range). Returns information if range was expanded\n *\n * @param {CellCoords} cellCoords\n * @returns {Boolean}\n */\n expand(cellCoords) {\n let topLeft = this.getTopLeftCorner();\n let bottomRight = this.getBottomRightCorner();\n\n if (cellCoords.row < topLeft.row || cellCoords.col < topLeft.col ||\n cellCoords.row > bottomRight.row || cellCoords.col > bottomRight.col) {\n this.from = new CellCoords(Math.min(topLeft.row, cellCoords.row), Math.min(topLeft.col, cellCoords.col));\n this.to = new CellCoords(Math.max(bottomRight.row, cellCoords.row), Math.max(bottomRight.col, cellCoords.col));\n\n return true;\n }\n\n return false;\n }\n\n /**\n * @param {CellRange} expandingRange\n * @returns {Boolean}\n */\n expandByRange(expandingRange) {\n if (this.includesRange(expandingRange) || !this.overlaps(expandingRange)) {\n return false;\n }\n\n let topLeft = this.getTopLeftCorner();\n let bottomRight = this.getBottomRightCorner();\n let topRight = this.getTopRightCorner();\n let bottomLeft = this.getBottomLeftCorner();\n\n let expandingTopLeft = expandingRange.getTopLeftCorner();\n let expandingBottomRight = expandingRange.getBottomRightCorner();\n\n let resultTopRow = Math.min(topLeft.row, expandingTopLeft.row);\n let resultTopCol = Math.min(topLeft.col, expandingTopLeft.col);\n let resultBottomRow = Math.max(bottomRight.row, expandingBottomRight.row);\n let resultBottomCol = Math.max(bottomRight.col, expandingBottomRight.col);\n\n let finalFrom = new CellCoords(resultTopRow, resultTopCol),\n finalTo = new CellCoords(resultBottomRow, resultBottomCol);\n let isCorner = new CellRange(finalFrom, finalFrom, finalTo).isCorner(this.from, expandingRange),\n onlyMerge = expandingRange.isEqual(new CellRange(finalFrom, finalFrom, finalTo));\n\n if (isCorner && !onlyMerge) {\n if (this.from.col > finalFrom.col) {\n finalFrom.col = resultBottomCol;\n finalTo.col = resultTopCol;\n }\n if (this.from.row > finalFrom.row) {\n finalFrom.row = resultBottomRow;\n finalTo.row = resultTopRow;\n }\n }\n this.from = finalFrom;\n this.to = finalTo;\n\n return true;\n }\n\n /**\n * @returns {String}\n */\n getDirection() {\n if (this.from.isNorthWestOf(this.to)) { // NorthWest - SouthEast\n return 'NW-SE';\n\n } else if (this.from.isNorthEastOf(this.to)) { // NorthEast - SouthWest\n return 'NE-SW';\n\n } else if (this.from.isSouthEastOf(this.to)) { // SouthEast - NorthWest\n return 'SE-NW';\n\n } else if (this.from.isSouthWestOf(this.to)) { // SouthWest - NorthEast\n return 'SW-NE';\n }\n }\n\n /**\n * @param {String} direction\n */\n setDirection(direction) {\n switch (direction) {\n case 'NW-SE':\n [this.from, this.to] = [this.getTopLeftCorner(), this.getBottomRightCorner()];\n break;\n case 'NE-SW':\n [this.from, this.to] = [this.getTopRightCorner(), this.getBottomLeftCorner()];\n break;\n case 'SE-NW':\n [this.from, this.to] = [this.getBottomRightCorner(), this.getTopLeftCorner()];\n break;\n case 'SW-NE':\n [this.from, this.to] = [this.getBottomLeftCorner(), this.getTopRightCorner()];\n break;\n default:\n break;\n }\n }\n\n /**\n * Get top left corner of this range\n *\n * @returns {CellCoords}\n */\n getTopLeftCorner() {\n return new CellCoords(Math.min(this.from.row, this.to.row), Math.min(this.from.col, this.to.col));\n }\n\n /**\n * Get bottom right corner of this range\n *\n * @returns {CellCoords}\n */\n getBottomRightCorner() {\n return new CellCoords(Math.max(this.from.row, this.to.row), Math.max(this.from.col, this.to.col));\n }\n\n /**\n * Get top right corner of this range\n *\n * @returns {CellCoords}\n */\n getTopRightCorner() {\n return new CellCoords(Math.min(this.from.row, this.to.row), Math.max(this.from.col, this.to.col));\n }\n\n /**\n * Get bottom left corner of this range\n *\n * @returns {CellCoords}\n */\n getBottomLeftCorner() {\n return new CellCoords(Math.max(this.from.row, this.to.row), Math.min(this.from.col, this.to.col));\n }\n\n /**\n * @param {CellCoords} coords\n * @param {CellRange} expandedRange\n * @returns {*}\n */\n isCorner(coords, expandedRange) {\n if (expandedRange) {\n if (expandedRange.includes(coords)) {\n if (this.getTopLeftCorner().isEqual(new CellCoords(expandedRange.from.row, expandedRange.from.col)) ||\n this.getTopRightCorner().isEqual(new CellCoords(expandedRange.from.row, expandedRange.to.col)) ||\n this.getBottomLeftCorner().isEqual(new CellCoords(expandedRange.to.row, expandedRange.from.col)) ||\n this.getBottomRightCorner().isEqual(new CellCoords(expandedRange.to.row, expandedRange.to.col))) {\n return true;\n }\n }\n }\n\n return coords.isEqual(this.getTopLeftCorner()) || coords.isEqual(this.getTopRightCorner()) ||\n coords.isEqual(this.getBottomLeftCorner()) || coords.isEqual(this.getBottomRightCorner());\n }\n\n /**\n * @param {CellCoords} coords\n * @param {CellRange} expandedRange\n * @returns {CellCoords}\n */\n getOppositeCorner(coords, expandedRange) {\n if (!(coords instanceof CellCoords)) {\n return false;\n }\n\n if (expandedRange) {\n if (expandedRange.includes(coords)) {\n if (this.getTopLeftCorner().isEqual(new CellCoords(expandedRange.from.row, expandedRange.from.col))) {\n return this.getBottomRightCorner();\n }\n if (this.getTopRightCorner().isEqual(new CellCoords(expandedRange.from.row, expandedRange.to.col))) {\n return this.getBottomLeftCorner();\n }\n if (this.getBottomLeftCorner().isEqual(new CellCoords(expandedRange.to.row, expandedRange.from.col))) {\n return this.getTopRightCorner();\n }\n if (this.getBottomRightCorner().isEqual(new CellCoords(expandedRange.to.row, expandedRange.to.col))) {\n return this.getTopLeftCorner();\n }\n }\n }\n\n if (coords.isEqual(this.getBottomRightCorner())) {\n return this.getTopLeftCorner();\n\n } else if (coords.isEqual(this.getTopLeftCorner())) {\n return this.getBottomRightCorner();\n\n } else if (coords.isEqual(this.getTopRightCorner())) {\n return this.getBottomLeftCorner();\n\n } else if (coords.isEqual(this.getBottomLeftCorner())) {\n return this.getTopRightCorner();\n }\n }\n\n /**\n * @param {CellRange} range\n * @returns {Array}\n */\n getBordersSharedWith(range) {\n if (!this.includesRange(range)) {\n return [];\n }\n\n const thisBorders = {\n top: Math.min(this.from.row, this.to.row),\n bottom: Math.max(this.from.row, this.to.row),\n left: Math.min(this.from.col, this.to.col),\n right: Math.max(this.from.col, this.to.col)\n };\n const rangeBorders = {\n top: Math.min(range.from.row, range.to.row),\n bottom: Math.max(range.from.row, range.to.row),\n left: Math.min(range.from.col, range.to.col),\n right: Math.max(range.from.col, range.to.col)\n };\n const result = [];\n\n if (thisBorders.top == rangeBorders.top) {\n result.push('top');\n }\n if (thisBorders.right == rangeBorders.right) {\n result.push('right');\n }\n if (thisBorders.bottom == rangeBorders.bottom) {\n result.push('bottom');\n }\n if (thisBorders.left == rangeBorders.left) {\n result.push('left');\n }\n\n return result;\n }\n\n /**\n * Get inner selected cell coords defined by this range\n *\n * @returns {Array}\n */\n getInner() {\n let topLeft = this.getTopLeftCorner();\n let bottomRight = this.getBottomRightCorner();\n let out = [];\n\n for (let r = topLeft.row; r <= bottomRight.row; r++) {\n for (let c = topLeft.col; c <= bottomRight.col; c++) {\n if (!(this.from.row === r && this.from.col === c) && !(this.to.row === r && this.to.col === c)) {\n out.push(new CellCoords(r, c));\n }\n }\n }\n return out;\n }\n\n /**\n * Get all selected cell coords defined by this range\n *\n * @returns {Array}\n */\n getAll() {\n let topLeft = this.getTopLeftCorner();\n let bottomRight = this.getBottomRightCorner();\n let out = [];\n\n for (let r = topLeft.row; r <= bottomRight.row; r++) {\n for (let c = topLeft.col; c <= bottomRight.col; c++) {\n if (topLeft.row === r && topLeft.col === c) {\n out.push(topLeft);\n\n } else if (bottomRight.row === r && bottomRight.col === c) {\n out.push(bottomRight);\n\n } else {\n out.push(new CellCoords(r, c));\n }\n }\n }\n\n return out;\n }\n\n /**\n * Runs a callback function against all cells in the range. You can break the iteration by returning\n * `false` in the callback function\n *\n * @param callback {Function}\n */\n forAll(callback) {\n let topLeft = this.getTopLeftCorner();\n let bottomRight = this.getBottomRightCorner();\n\n for (let r = topLeft.row; r <= bottomRight.row; r++) {\n for (let c = topLeft.col; c <= bottomRight.col; c++) {\n let breakIteration = callback(r, c);\n\n if (breakIteration === false) {\n return;\n }\n }\n }\n }\n}\n\nexport default CellRange;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/cell/range.js","/**\n * Cell type is just a shortcut for setting bunch of cellProperties (used in getCellMeta)\n */\n\nimport {isMobileBrowser} from './helpers/browser';\nimport {getEditorConstructor} from './editors';\nimport {getRenderer} from './renderers';\n\nimport AutocompleteEditor from './editors/autocompleteEditor';\nimport CheckboxEditor from './editors/checkboxEditor';\nimport DateEditor from './editors/dateEditor';\nimport DropdownEditor from './editors/dropdownEditor';\nimport HandsontableEditor from './editors/handsontableEditor';\nimport MobileTextEditor from './editors/mobileTextEditor';\nimport NumericEditor from './editors/numericEditor';\nimport PasswordEditor from './editors/passwordEditor';\nimport SelectEditor from './editors/selectEditor';\nimport TextEditor from './editors/textEditor';\n\nimport AutocompleteRenderer from './renderers/autocompleteRenderer';\nimport CheckboxRenderer from './renderers/checkboxRenderer';\nimport HtmlRenderer from './renderers/htmlRenderer';\nimport NumericRenderer from './renderers/numericRenderer';\nimport PasswordRenderer from './renderers/passwordRenderer';\nimport TextRenderer from './renderers/textRenderer';\n\nimport AutocompleteValidator from './validators/autocompleteValidator';\nimport DateValidator from './validators/dateValidator';\nimport TimeValidator from './validators/timeValidator';\nimport NumericValidator from './validators/numericValidator';\n\nexport const AutocompleteCell = {\n editor: getEditorConstructor('autocomplete'),\n renderer: getRenderer('autocomplete'),\n validator: AutocompleteValidator,\n};\n\nexport const CheckboxCell = {\n editor: getEditorConstructor('checkbox'),\n renderer: getRenderer('checkbox'),\n};\n\nexport const TextCell = {\n editor: isMobileBrowser() ? getEditorConstructor('mobile') : getEditorConstructor('text'),\n renderer: getRenderer('text'),\n};\n\nexport const NumericCell = {\n editor: getEditorConstructor('numeric'),\n renderer: getRenderer('numeric'),\n validator: NumericValidator,\n dataType: 'number',\n};\n\nexport const DateCell = {\n editor: getEditorConstructor('date'),\n validator: DateValidator,\n // displays small gray arrow on right side of the cell\n renderer: getRenderer('autocomplete'),\n};\n\nexport const TimeCell = {\n editor: getEditorConstructor('text'),\n validator: TimeValidator,\n // displays small gray arrow on right side of the cell\n renderer: getRenderer('text'),\n};\n\nexport const HandsontableCell = {\n editor: getEditorConstructor('handsontable'),\n // displays small gray arrow on right side of the cell\n renderer: getRenderer('autocomplete'),\n};\n\nexport const PasswordCell = {\n editor: getEditorConstructor('password'),\n renderer: getRenderer('password'),\n copyable: false,\n};\n\nexport const DropdownCell = {\n editor: getEditorConstructor('dropdown'),\n // displays small gray arrow on right side of the cell\n renderer: getRenderer('autocomplete'),\n validator: AutocompleteValidator,\n};\n\n// here setup the friendly aliases that are used by cellProperties.renderer and cellProperties.editor\nexport const cellLookup = {\n validator: {\n numeric: NumericValidator,\n autocomplete: AutocompleteValidator,\n }\n};\n\n// here setup the friendly aliases that are used by cellProperties.type\nconst cellTypes = {\n text: TextCell,\n date: DateCell,\n time: TimeCell,\n numeric: NumericCell,\n checkbox: CheckboxCell,\n autocomplete: AutocompleteCell,\n handsontable: HandsontableCell,\n password: PasswordCell,\n dropdown: DropdownCell,\n};\n\nexport default cellTypes;\n\n\n\n// WEBPACK FOOTER //\n// src/cellTypes.js","import numbro from 'numbro';\nimport {addClass, empty, isChildOfWebComponentTable, removeClass} from './helpers/dom/element';\nimport {columnFactory} from './helpers/setting';\nimport {isFunction} from './helpers/function';\nimport {isDefined, isUndefined} from './helpers/mixed';\nimport {isMobileBrowser} from './helpers/browser';\nimport DataMap from './dataMap';\nimport EditorManager from './editorManager';\nimport EventManager from './eventManager';\nimport {deepClone, duckSchema, extend, isObject, isObjectEquals, deepObjectSize, hasOwnProperty, createObjectPropListener} from './helpers/object';\nimport {arrayFlatten, arrayMap} from './helpers/array';\nimport {getPlugin} from './plugins';\nimport {getRenderer} from './renderers';\nimport {randomString} from './helpers/string';\nimport {rangeEach} from './helpers/number';\nimport TableView from './tableView';\nimport DataSource from './dataSource';\nimport {translateRowsToColumns, cellMethodLookupFactory, spreadsheetColumnLabel} from './helpers/data';\nimport {getTranslator} from './utils/recordTranslator';\nimport {CellCoords, CellRange, ViewportColumnsCalculator} from './3rdparty/walkontable/src';\nimport Hooks from './pluginHooks';\nimport DefaultSettings from './defaultSettings';\nimport cellTypes from './cellTypes';\n\nlet activeGuid = null;\n\n/**\n * Handsontable constructor\n *\n * @core\n * @dependencies numbro\n * @constructor Core\n * @description\n *\n * After Handsontable is constructed, you can modify the grid behavior using the available public methods.\n *\n * ---\n * ## How to call methods\n *\n * These are 2 equal ways to call a Handsontable method:\n *\n * ```js\n * // all following examples assume that you constructed Handsontable like this\n * var ht = new Handsontable(document.getElementById('example1'), options);\n *\n * // now, to use setDataAtCell method, you can either:\n * ht.setDataAtCell(0, 0, 'new value');\n * ```\n *\n * Alternatively, you can call the method using jQuery wrapper (__obsolete__, requires initialization using our jQuery guide\n * ```js\n * $('#example1').handsontable('setDataAtCell', 0, 0, 'new value');\n * ```\n * ---\n */\nexport default function Core(rootElement, userSettings) {\n var priv,\n datamap,\n dataSource,\n grid,\n selection,\n editorManager,\n instance = this,\n GridSettings = function() {\n },\n eventManager = new EventManager(instance);\n\n extend(GridSettings.prototype, DefaultSettings.prototype); // create grid settings as a copy of default settings\n extend(GridSettings.prototype, userSettings); // overwrite defaults with user settings\n extend(GridSettings.prototype, expandType(userSettings));\n\n this.rootElement = rootElement;\n this.isHotTableEnv = isChildOfWebComponentTable(this.rootElement);\n EventManager.isHotTableEnv = this.isHotTableEnv;\n\n this.container = document.createElement('DIV');\n this.renderCall = false;\n\n rootElement.insertBefore(this.container, rootElement.firstChild);\n\n this.guid = `ht_${randomString()}`; // this is the namespace for global events\n\n const recordTranslator = getTranslator(instance);\n\n dataSource = new DataSource(instance);\n\n if (!this.rootElement.id || this.rootElement.id.substring(0, 3) === 'ht_') {\n this.rootElement.id = this.guid; // if root element does not have an id, assign a random id\n }\n priv = {\n cellSettings: [],\n columnSettings: [],\n columnsSettingConflicts: ['data', 'width'],\n settings: new GridSettings(), // current settings instance\n selRange: null, // exposed by public method `getSelectedRange`\n isPopulated: null,\n scrollable: null,\n firstRun: true,\n };\n\n grid = {\n /**\n * Inserts or removes rows and columns\n *\n * @memberof Core#\n * @function alter\n * @private\n * @param {String} action Possible values: \"insert_row\", \"insert_col\", \"remove_row\", \"remove_col\"\n * @param {Number} index\n * @param {Number} amount\n * @param {String} [source] Optional. Source of hook runner.\n * @param {Boolean} [keepEmptyRows] Optional. Flag for preventing deletion of empty rows.\n */\n alter(action, index, amount, source, keepEmptyRows) {\n var delta;\n\n amount = amount || 1;\n\n function spliceWith(data, index, count, toInject) {\n let valueFactory = () => {\n let result;\n\n if (toInject === 'array') {\n result = [];\n\n } else if (toInject === 'object') {\n result = {};\n }\n\n return result;\n };\n let spliceArgs = arrayMap(new Array(count), () => valueFactory());\n\n spliceArgs.unshift(index, 0);\n data.splice(...spliceArgs);\n }\n\n /* eslint-disable no-case-declarations */\n switch (action) {\n case 'insert_row':\n\n const numberOfSourceRows = instance.countSourceRows();\n\n if (instance.getSettings().maxRows === numberOfSourceRows) {\n return;\n }\n\n index = (isDefined(index)) ? index : numberOfSourceRows;\n\n delta = datamap.createRow(index, amount, source);\n spliceWith(priv.cellSettings, index, amount, 'array');\n\n if (delta) {\n if (selection.isSelected() && priv.selRange.from.row >= index) {\n priv.selRange.from.row += delta;\n selection.transformEnd(delta, 0); // will call render() internally\n } else {\n selection.refreshBorders(); // it will call render and prepare methods\n }\n }\n break;\n\n case 'insert_col':\n delta = datamap.createCol(index, amount, source);\n\n for (let row = 0, len = instance.countSourceRows(); row < len; row++) {\n if (priv.cellSettings[row]) {\n spliceWith(priv.cellSettings[row], index, amount);\n }\n }\n\n if (delta) {\n if (Array.isArray(instance.getSettings().colHeaders)) {\n var spliceArray = [index, 0];\n spliceArray.length += delta; // inserts empty (undefined) elements at the end of an array\n Array.prototype.splice.apply(instance.getSettings().colHeaders, spliceArray); // inserts empty (undefined) elements into the colHeader array\n }\n\n if (selection.isSelected() && priv.selRange.from.col >= index) {\n priv.selRange.from.col += delta;\n selection.transformEnd(0, delta); // will call render() internally\n } else {\n selection.refreshBorders(); // it will call render and prepare methods\n }\n }\n break;\n\n case 'remove_row':\n datamap.removeRow(index, amount, source);\n priv.cellSettings.splice(index, amount);\n\n var totalRows = instance.countRows();\n var fixedRowsTop = instance.getSettings().fixedRowsTop;\n if (fixedRowsTop >= index + 1) {\n instance.getSettings().fixedRowsTop -= Math.min(amount, fixedRowsTop - index);\n }\n\n var fixedRowsBottom = instance.getSettings().fixedRowsBottom;\n if (fixedRowsBottom && index >= totalRows - fixedRowsBottom) {\n instance.getSettings().fixedRowsBottom -= Math.min(amount, fixedRowsBottom);\n }\n\n grid.adjustRowsAndCols();\n selection.refreshBorders(); // it will call render and prepare methods\n break;\n\n case 'remove_col':\n let logicalColumnIndex = recordTranslator.toPhysicalColumn(index);\n\n datamap.removeCol(index, amount, source);\n\n for (let row = 0, len = instance.countSourceRows(); row < len; row++) {\n if (priv.cellSettings[row]) { // if row hasn't been rendered it wouldn't have cellSettings\n priv.cellSettings[row].splice(logicalColumnIndex, amount);\n }\n }\n var fixedColumnsLeft = instance.getSettings().fixedColumnsLeft;\n\n if (fixedColumnsLeft >= index + 1) {\n instance.getSettings().fixedColumnsLeft -= Math.min(amount, fixedColumnsLeft - index);\n }\n\n if (Array.isArray(instance.getSettings().colHeaders)) {\n if (typeof logicalColumnIndex == 'undefined') {\n logicalColumnIndex = -1;\n }\n instance.getSettings().colHeaders.splice(logicalColumnIndex, amount);\n }\n\n grid.adjustRowsAndCols();\n selection.refreshBorders(); // it will call render and prepare methods\n\n break;\n default:\n throw new Error(`There is no such action \"${action}\"`);\n }\n\n if (!keepEmptyRows) {\n grid.adjustRowsAndCols(); // makes sure that we did not add rows that will be removed in next refresh\n }\n },\n\n /**\n * Makes sure there are empty rows at the bottom of the table\n */\n adjustRowsAndCols() {\n if (priv.settings.minRows) {\n // should I add empty rows to data source to meet minRows?\n let rows = instance.countRows();\n\n if (rows < priv.settings.minRows) {\n for (let r = 0, minRows = priv.settings.minRows; r < minRows - rows; r++) {\n datamap.createRow(instance.countRows(), 1, 'auto');\n }\n }\n }\n if (priv.settings.minSpareRows) {\n let emptyRows = instance.countEmptyRows(true);\n\n // should I add empty rows to meet minSpareRows?\n if (emptyRows < priv.settings.minSpareRows) {\n for (; emptyRows < priv.settings.minSpareRows && instance.countSourceRows() < priv.settings.maxRows; emptyRows++) {\n datamap.createRow(instance.countRows(), 1, 'auto');\n }\n }\n }\n {\n let emptyCols;\n\n // count currently empty cols\n if (priv.settings.minCols || priv.settings.minSpareCols) {\n emptyCols = instance.countEmptyCols(true);\n }\n\n // should I add empty cols to meet minCols?\n if (priv.settings.minCols && !priv.settings.columns && instance.countCols() < priv.settings.minCols) {\n for (; instance.countCols() < priv.settings.minCols; emptyCols++) {\n datamap.createCol(instance.countCols(), 1, 'auto');\n }\n }\n // should I add empty cols to meet minSpareCols?\n if (priv.settings.minSpareCols && !priv.settings.columns && instance.dataType === 'array' &&\n emptyCols < priv.settings.minSpareCols) {\n for (; emptyCols < priv.settings.minSpareCols && instance.countCols() < priv.settings.maxCols; emptyCols++) {\n datamap.createCol(instance.countCols(), 1, 'auto');\n }\n }\n }\n let rowCount = instance.countRows();\n let colCount = instance.countCols();\n\n if (rowCount === 0 || colCount === 0) {\n selection.deselect();\n }\n\n if (selection.isSelected()) {\n let selectionChanged = false;\n let fromRow = priv.selRange.from.row;\n let fromCol = priv.selRange.from.col;\n let toRow = priv.selRange.to.row;\n let toCol = priv.selRange.to.col;\n\n // if selection is outside, move selection to last row\n if (fromRow > rowCount - 1) {\n fromRow = rowCount - 1;\n selectionChanged = true;\n\n if (toRow > fromRow) {\n toRow = fromRow;\n }\n } else if (toRow > rowCount - 1) {\n toRow = rowCount - 1;\n selectionChanged = true;\n\n if (fromRow > toRow) {\n fromRow = toRow;\n }\n }\n // if selection is outside, move selection to last row\n if (fromCol > colCount - 1) {\n fromCol = colCount - 1;\n selectionChanged = true;\n\n if (toCol > fromCol) {\n toCol = fromCol;\n }\n } else if (toCol > colCount - 1) {\n toCol = colCount - 1;\n selectionChanged = true;\n\n if (fromCol > toCol) {\n fromCol = toCol;\n }\n }\n\n if (selectionChanged) {\n instance.selectCell(fromRow, fromCol, toRow, toCol);\n }\n }\n if (instance.view) {\n instance.view.wt.wtOverlays.adjustElementsSize();\n }\n },\n\n /**\n * Populate the data from the provided 2d array from the given cell coordinates.\n *\n * @private\n * @param {Object} start Start selection position.\n * @param {Array} input 2d data array.\n * @param {Object} [end] End selection position (only for drag-down mode).\n * @param {String} [source=\"populateFromArray\"] Source information string.\n * @param {String} [method=\"overwrite\"] Populate method. Possible options: `shift_down`, `shift_right`, `overwrite`.\n * @param {String} direction (left|right|up|down) String specifying the direction.\n * @param {Array} deltas The deltas array.\n * @returns {Object|undefined} ending td in pasted area (only if any cell was changed).\n */\n populateFromArray(start, input, end, source, method, direction, deltas) {\n var r,\n rlen,\n c,\n clen,\n setData = [],\n current = {};\n\n rlen = input.length;\n\n if (rlen === 0) {\n return false;\n }\n\n var repeatCol,\n repeatRow,\n cmax,\n rmax,\n baseEnd = {\n row: end === null ? null : end.row,\n col: end === null ? null : end.col\n };\n\n /* eslint-disable no-case-declarations */\n // insert data with specified pasteMode method\n switch (method) {\n case 'shift_down' :\n repeatCol = end ? end.col - start.col + 1 : 0;\n repeatRow = end ? end.row - start.row + 1 : 0;\n input = translateRowsToColumns(input);\n for (c = 0, clen = input.length, cmax = Math.max(clen, repeatCol); c < cmax; c++) {\n if (c < clen) {\n for (r = 0, rlen = input[c].length; r < repeatRow - rlen; r++) {\n input[c].push(input[c][r % rlen]);\n }\n input[c].unshift(start.col + c, start.row, 0);\n instance.spliceCol(...input[c]);\n } else {\n input[c % clen][0] = start.col + c;\n instance.spliceCol(...input[c % clen]);\n }\n }\n break;\n\n case 'shift_right':\n repeatCol = end ? end.col - start.col + 1 : 0;\n repeatRow = end ? end.row - start.row + 1 : 0;\n for (r = 0, rlen = input.length, rmax = Math.max(rlen, repeatRow); r < rmax; r++) {\n if (r < rlen) {\n for (c = 0, clen = input[r].length; c < repeatCol - clen; c++) {\n input[r].push(input[r][c % clen]);\n }\n input[r].unshift(start.row + r, start.col, 0);\n instance.spliceRow(...input[r]);\n } else {\n input[r % rlen][0] = start.row + r;\n instance.spliceRow(...input[r % rlen]);\n }\n }\n break;\n\n case 'overwrite':\n default:\n // overwrite and other not specified options\n current.row = start.row;\n current.col = start.col;\n\n let selected = { // selected range\n row: (end && start) ? (end.row - start.row + 1) : 1,\n col: (end && start) ? (end.col - start.col + 1) : 1\n };\n let skippedRow = 0;\n let skippedColumn = 0;\n let pushData = true;\n let cellMeta;\n\n let getInputValue = function getInputValue(row, col = null) {\n let rowValue = input[row % input.length];\n\n if (col !== null) {\n return rowValue[col % rowValue.length];\n }\n\n return rowValue;\n };\n let rowInputLength = input.length;\n let rowSelectionLength = end ? end.row - start.row + 1 : 0;\n\n if (end) {\n rlen = rowSelectionLength;\n } else {\n rlen = Math.max(rowInputLength, rowSelectionLength);\n }\n for (r = 0; r < rlen; r++) {\n if ((end && current.row > end.row && rowSelectionLength > rowInputLength) ||\n (!priv.settings.allowInsertRow && current.row > instance.countRows() - 1) ||\n (current.row >= priv.settings.maxRows)) {\n break;\n }\n let logicalRow = r - skippedRow;\n let colInputLength = getInputValue(logicalRow).length;\n let colSelectionLength = end ? end.col - start.col + 1 : 0;\n\n if (end) {\n clen = colSelectionLength;\n } else {\n clen = Math.max(colInputLength, colSelectionLength);\n }\n current.col = start.col;\n cellMeta = instance.getCellMeta(current.row, current.col);\n\n if ((source === 'CopyPaste.paste' || source === 'Autofill.autofill') && cellMeta.skipRowOnPaste) {\n skippedRow++;\n current.row++;\n rlen++;\n /* eslint-disable no-continue */\n continue;\n }\n skippedColumn = 0;\n\n for (c = 0; c < clen; c++) {\n if ((end && current.col > end.col && colSelectionLength > colInputLength) ||\n (!priv.settings.allowInsertColumn && current.col > instance.countCols() - 1) ||\n (current.col >= priv.settings.maxCols)) {\n break;\n }\n cellMeta = instance.getCellMeta(current.row, current.col);\n\n if ((source === 'CopyPaste.paste' || source === 'Autofill.fill') && cellMeta.skipColumnOnPaste) {\n skippedColumn++;\n current.col++;\n clen++;\n continue;\n }\n if (cellMeta.readOnly) {\n current.col++;\n /* eslint-disable no-continue */\n continue;\n }\n let logicalColumn = c - skippedColumn;\n let value = getInputValue(logicalRow, logicalColumn);\n let orgValue = instance.getDataAtCell(current.row, current.col);\n let index = {\n row: logicalRow,\n col: logicalColumn\n };\n\n if (source === 'Autofill.fill') {\n let result = instance.runHooks('beforeAutofillInsidePopulate', index, direction, input, deltas, {}, selected);\n\n if (result) {\n value = isUndefined(result.value) ? value : result.value;\n }\n }\n if (value !== null && typeof value === 'object') {\n if (orgValue === null || typeof orgValue !== 'object') {\n pushData = false;\n\n } else {\n let orgValueSchema = duckSchema(orgValue[0] || orgValue);\n let valueSchema = duckSchema(value[0] || value);\n\n /* eslint-disable max-depth */\n if (isObjectEquals(orgValueSchema, valueSchema)) {\n value = deepClone(value);\n } else {\n pushData = false;\n }\n }\n\n } else if (orgValue !== null && typeof orgValue === 'object') {\n pushData = false;\n }\n if (pushData) {\n setData.push([current.row, current.col, value]);\n }\n pushData = true;\n current.col++;\n }\n current.row++;\n }\n instance.setDataAtCell(setData, null, null, source || 'populateFromArray');\n break;\n }\n },\n };\n\n /* eslint-disable no-multi-assign */\n this.selection = selection = { // this public assignment is only temporary\n inProgress: false,\n\n selectedHeader: {\n cols: false,\n rows: false,\n },\n\n /**\n * @param {Boolean} [rows=false]\n * @param {Boolean} [cols=false]\n * @param {Boolean} [corner=false]\n */\n setSelectedHeaders(rows = false, cols = false, corner = false) {\n instance.selection.selectedHeader.rows = rows;\n instance.selection.selectedHeader.cols = cols;\n instance.selection.selectedHeader.corner = corner;\n },\n\n /**\n * Sets inProgress to `true`. This enables onSelectionEnd and onSelectionEndByProp to function as desired.\n */\n begin() {\n instance.selection.inProgress = true;\n },\n\n /**\n * Sets inProgress to `false`. Triggers onSelectionEnd and onSelectionEndByProp.\n */\n finish() {\n var sel = instance.getSelected();\n instance.runHooks('afterSelectionEnd', sel[0], sel[1], sel[2], sel[3]);\n instance.runHooks('afterSelectionEndByProp', sel[0], instance.colToProp(sel[1]), sel[2], instance.colToProp(sel[3]));\n instance.selection.inProgress = false;\n },\n\n /**\n * @returns {Boolean}\n */\n isInProgress() {\n return instance.selection.inProgress;\n },\n\n /**\n * Starts selection range on given td object.\n *\n * @param {CellCoords} coords\n * @param keepEditorOpened\n */\n setRangeStart(coords, keepEditorOpened) {\n instance.runHooks('beforeSetRangeStart', coords);\n priv.selRange = new CellRange(coords, coords, coords);\n selection.setRangeEnd(coords, null, keepEditorOpened);\n },\n\n /**\n * Starts selection range on given td object.\n *\n * @param {CellCoords} coords\n * @param keepEditorOpened\n */\n setRangeStartOnly(coords) {\n instance.runHooks('beforeSetRangeStartOnly', coords);\n priv.selRange = new CellRange(coords, coords, coords);\n },\n\n /**\n * Ends selection range on given td object.\n *\n * @param {CellCoords} coords\n * @param {Boolean} [scrollToCell=true] If `true`, viewport will be scrolled to range end\n * @param {Boolean} [keepEditorOpened] If `true`, cell editor will be still opened after changing selection range\n */\n setRangeEnd(coords, scrollToCell, keepEditorOpened) {\n if (priv.selRange === null) {\n return;\n }\n var disableVisualSelection,\n isHeaderSelected = false,\n areCoordsPositive = true;\n\n var firstVisibleRow = instance.view.wt.wtTable.getFirstVisibleRow();\n var firstVisibleColumn = instance.view.wt.wtTable.getFirstVisibleColumn();\n var newRangeCoords = {\n row: null,\n col: null,\n };\n\n // trigger handlers\n instance.runHooks('beforeSetRangeEnd', coords);\n instance.selection.begin();\n\n newRangeCoords.row = coords.row < 0 ? firstVisibleRow : coords.row;\n newRangeCoords.col = coords.col < 0 ? firstVisibleColumn : coords.col;\n\n priv.selRange.to = new CellCoords(newRangeCoords.row, newRangeCoords.col);\n\n if (!priv.settings.multiSelect) {\n priv.selRange.from = coords;\n }\n // set up current selection\n instance.view.wt.selections.current.clear();\n\n disableVisualSelection = instance.getCellMeta(priv.selRange.highlight.row, priv.selRange.highlight.col).disableVisualSelection;\n\n if (typeof disableVisualSelection === 'string') {\n disableVisualSelection = [disableVisualSelection];\n }\n\n if (disableVisualSelection === false ||\n Array.isArray(disableVisualSelection) && disableVisualSelection.indexOf('current') === -1) {\n instance.view.wt.selections.current.add(priv.selRange.highlight);\n }\n // set up area selection\n instance.view.wt.selections.area.clear();\n\n if ((disableVisualSelection === false ||\n Array.isArray(disableVisualSelection) && disableVisualSelection.indexOf('area') === -1) &&\n selection.isMultiple()) {\n instance.view.wt.selections.area.add(priv.selRange.from);\n instance.view.wt.selections.area.add(priv.selRange.to);\n }\n // set up highlight\n if (priv.settings.currentHeaderClassName || priv.settings.currentRowClassName || priv.settings.currentColClassName) {\n instance.view.wt.selections.highlight.clear();\n instance.view.wt.selections.highlight.add(priv.selRange.from);\n instance.view.wt.selections.highlight.add(priv.selRange.to);\n }\n\n const preventScrolling = createObjectPropListener('value');\n\n // trigger handlers\n instance.runHooks('afterSelection',\n priv.selRange.from.row, priv.selRange.from.col, priv.selRange.to.row, priv.selRange.to.col, preventScrolling);\n instance.runHooks('afterSelectionByProp',\n priv.selRange.from.row, datamap.colToProp(priv.selRange.from.col), priv.selRange.to.row, datamap.colToProp(priv.selRange.to.col), preventScrolling);\n\n if ((priv.selRange.from.row === 0 && priv.selRange.to.row === instance.countRows() - 1 && instance.countRows() > 1) ||\n (priv.selRange.from.col === 0 && priv.selRange.to.col === instance.countCols() - 1 && instance.countCols() > 1)) {\n isHeaderSelected = true;\n }\n\n if (coords.row < 0 || coords.col < 0) {\n areCoordsPositive = false;\n }\n\n if (preventScrolling.isTouched()) {\n scrollToCell = !preventScrolling.value;\n }\n\n if (scrollToCell !== false && !isHeaderSelected && areCoordsPositive) {\n if (priv.selRange.from && !selection.isMultiple()) {\n instance.view.scrollViewport(priv.selRange.from);\n } else {\n instance.view.scrollViewport(coords);\n }\n }\n\n if (selection.selectedHeader.rows && selection.selectedHeader.cols) {\n addClass(instance.rootElement, ['ht__selection--rows', 'ht__selection--columns']);\n\n } else if (selection.selectedHeader.rows) {\n removeClass(instance.rootElement, 'ht__selection--columns');\n addClass(instance.rootElement, 'ht__selection--rows');\n\n } else if (selection.selectedHeader.cols) {\n removeClass(instance.rootElement, 'ht__selection--rows');\n addClass(instance.rootElement, 'ht__selection--columns');\n\n } else {\n removeClass(instance.rootElement, ['ht__selection--rows', 'ht__selection--columns']);\n }\n\n selection.refreshBorders(null, keepEditorOpened);\n },\n\n /**\n * Destroys editor, redraws borders around cells, prepares editor.\n *\n * @param {Boolean} [revertOriginal]\n * @param {Boolean} [keepEditor]\n */\n refreshBorders(revertOriginal, keepEditor) {\n if (!keepEditor) {\n editorManager.destroyEditor(revertOriginal);\n }\n instance.view.render();\n\n if (selection.isSelected() && !keepEditor) {\n editorManager.prepareEditor();\n }\n },\n\n /**\n * Returns information if we have a multiselection.\n *\n * @returns {Boolean}\n */\n isMultiple() {\n var\n isMultiple = !(priv.selRange.to.col === priv.selRange.from.col && priv.selRange.to.row === priv.selRange.from.row),\n modifier = instance.runHooks('afterIsMultipleSelection', isMultiple);\n\n if (isMultiple) {\n return modifier;\n }\n },\n\n /**\n * Selects cell relative to current cell (if possible).\n */\n transformStart(rowDelta, colDelta, force, keepEditorOpened) {\n var delta = new CellCoords(rowDelta, colDelta),\n rowTransformDir = 0,\n colTransformDir = 0,\n totalRows,\n totalCols,\n coords,\n fixedRowsBottom;\n\n instance.runHooks('modifyTransformStart', delta);\n totalRows = instance.countRows();\n totalCols = instance.countCols();\n fixedRowsBottom = instance.getSettings().fixedRowsBottom;\n\n if (priv.selRange.highlight.row + rowDelta > totalRows - 1) {\n if (force && priv.settings.minSpareRows > 0 && !(fixedRowsBottom && priv.selRange.highlight.row >= totalRows - fixedRowsBottom - 1)) {\n instance.alter('insert_row', totalRows);\n totalRows = instance.countRows();\n\n } else if (priv.settings.autoWrapCol) {\n delta.row = 1 - totalRows;\n delta.col = priv.selRange.highlight.col + delta.col == totalCols - 1 ? 1 - totalCols : 1;\n }\n } else if (priv.settings.autoWrapCol && priv.selRange.highlight.row + delta.row < 0 && priv.selRange.highlight.col + delta.col >= 0) {\n delta.row = totalRows - 1;\n delta.col = priv.selRange.highlight.col + delta.col == 0 ? totalCols - 1 : -1;\n }\n\n if (priv.selRange.highlight.col + delta.col > totalCols - 1) {\n if (force && priv.settings.minSpareCols > 0) {\n instance.alter('insert_col', totalCols);\n totalCols = instance.countCols();\n\n } else if (priv.settings.autoWrapRow) {\n delta.row = priv.selRange.highlight.row + delta.row == totalRows - 1 ? 1 - totalRows : 1;\n delta.col = 1 - totalCols;\n }\n } else if (priv.settings.autoWrapRow && priv.selRange.highlight.col + delta.col < 0 && priv.selRange.highlight.row + delta.row >= 0) {\n delta.row = priv.selRange.highlight.row + delta.row == 0 ? totalRows - 1 : -1;\n delta.col = totalCols - 1;\n }\n\n coords = new CellCoords(priv.selRange.highlight.row + delta.row, priv.selRange.highlight.col + delta.col);\n\n if (coords.row < 0) {\n rowTransformDir = -1;\n coords.row = 0;\n\n } else if (coords.row > 0 && coords.row >= totalRows) {\n rowTransformDir = 1;\n coords.row = totalRows - 1;\n }\n\n if (coords.col < 0) {\n colTransformDir = -1;\n coords.col = 0;\n\n } else if (coords.col > 0 && coords.col >= totalCols) {\n colTransformDir = 1;\n coords.col = totalCols - 1;\n }\n instance.runHooks('afterModifyTransformStart', coords, rowTransformDir, colTransformDir);\n selection.setRangeStart(coords, keepEditorOpened);\n },\n\n /**\n * Sets selection end cell relative to current selection end cell (if possible).\n */\n transformEnd(rowDelta, colDelta) {\n var delta = new CellCoords(rowDelta, colDelta),\n rowTransformDir = 0,\n colTransformDir = 0,\n totalRows,\n totalCols,\n coords;\n\n instance.runHooks('modifyTransformEnd', delta);\n\n totalRows = instance.countRows();\n totalCols = instance.countCols();\n coords = new CellCoords(priv.selRange.to.row + delta.row, priv.selRange.to.col + delta.col);\n\n if (coords.row < 0) {\n rowTransformDir = -1;\n coords.row = 0;\n\n } else if (coords.row > 0 && coords.row >= totalRows) {\n rowTransformDir = 1;\n coords.row = totalRows - 1;\n }\n\n if (coords.col < 0) {\n colTransformDir = -1;\n coords.col = 0;\n\n } else if (coords.col > 0 && coords.col >= totalCols) {\n colTransformDir = 1;\n coords.col = totalCols - 1;\n }\n instance.runHooks('afterModifyTransformEnd', coords, rowTransformDir, colTransformDir);\n selection.setRangeEnd(coords, true);\n },\n\n /**\n * Returns `true` if currently there is a selection on screen, `false` otherwise.\n *\n * @returns {Boolean}\n */\n isSelected() {\n return (priv.selRange !== null);\n },\n\n /**\n * Returns `true` if coords is within current selection coords.\n *\n * @param {CellCoords} coords\n * @returns {Boolean}\n */\n inInSelection(coords) {\n if (!selection.isSelected()) {\n return false;\n }\n\n return priv.selRange.includes(coords);\n },\n\n /**\n * Deselects all selected cells\n */\n deselect() {\n if (!selection.isSelected()) {\n return;\n }\n instance.selection.inProgress = false; // needed by HT inception\n priv.selRange = null;\n instance.view.wt.selections.current.clear();\n instance.view.wt.selections.area.clear();\n if (priv.settings.currentHeaderClassName || priv.settings.currentRowClassName || priv.settings.currentColClassName) {\n instance.view.wt.selections.highlight.clear();\n }\n editorManager.destroyEditor();\n selection.refreshBorders();\n removeClass(instance.rootElement, ['ht__selection--rows', 'ht__selection--columns']);\n instance.runHooks('afterDeselect');\n },\n\n /**\n * Select all cells\n */\n selectAll() {\n if (!priv.settings.multiSelect) {\n return;\n }\n selection.setSelectedHeaders(true, true, true);\n selection.setRangeStart(new CellCoords(0, 0));\n selection.setRangeEnd(new CellCoords(instance.countRows() - 1, instance.countCols() - 1), false);\n },\n\n /**\n * Deletes data from selected cells\n */\n empty() {\n if (!selection.isSelected()) {\n return;\n }\n var topLeft = priv.selRange.getTopLeftCorner();\n var bottomRight = priv.selRange.getBottomRightCorner();\n var r,\n c,\n changes = [];\n\n for (r = topLeft.row; r <= bottomRight.row; r++) {\n for (c = topLeft.col; c <= bottomRight.col; c++) {\n if (!instance.getCellMeta(r, c).readOnly) {\n changes.push([r, c, '']);\n }\n }\n }\n instance.setDataAtCell(changes);\n },\n };\n\n this.init = function() {\n dataSource.setData(priv.settings.data);\n instance.runHooks('beforeInit');\n\n if (isMobileBrowser()) {\n addClass(instance.rootElement, 'mobile');\n }\n\n this.updateSettings(priv.settings, true);\n\n this.view = new TableView(this);\n editorManager = new EditorManager(instance, priv, selection, datamap);\n\n this.forceFullRender = true; // used when data was changed\n\n instance.runHooks('init');\n this.view.render();\n\n if (typeof priv.firstRun === 'object') {\n instance.runHooks('afterChange', priv.firstRun[0], priv.firstRun[1]);\n priv.firstRun = false;\n }\n instance.runHooks('afterInit');\n };\n\n function ValidatorsQueue() { // moved this one level up so it can be used in any function here. Probably this should be moved to a separate file\n var resolved = false;\n\n return {\n validatorsInQueue: 0,\n valid: true,\n addValidatorToQueue() {\n this.validatorsInQueue++;\n resolved = false;\n },\n removeValidatorFormQueue() {\n this.validatorsInQueue = this.validatorsInQueue - 1 < 0 ? 0 : this.validatorsInQueue - 1;\n this.checkIfQueueIsEmpty();\n },\n onQueueEmpty(valid) {\n },\n checkIfQueueIsEmpty() {\n if (this.validatorsInQueue == 0 && resolved == false) {\n resolved = true;\n this.onQueueEmpty(this.valid);\n }\n }\n };\n }\n\n function validateChanges(changes, source, callback) {\n var waitingForValidator = new ValidatorsQueue();\n waitingForValidator.onQueueEmpty = resolve;\n\n for (var i = changes.length - 1; i >= 0; i--) {\n if (changes[i] === null) {\n changes.splice(i, 1);\n } else {\n var row = changes[i][0];\n var col = datamap.propToCol(changes[i][1]);\n\n var cellProperties = instance.getCellMeta(row, col);\n\n if (cellProperties.type === 'numeric' && typeof changes[i][3] === 'string') {\n if (changes[i][3].length > 0 && (/^-?[\\d\\s]*(\\.|,)?\\d*$/.test(changes[i][3]) || cellProperties.format)) {\n var len = changes[i][3].length;\n\n if (isUndefined(cellProperties.language)) {\n numbro.culture('en-US');\n\n } else if (changes[i][3].indexOf('.') === len - 3 && changes[i][3].indexOf(',') === -1) {\n // this input in format XXXX.XX is likely to come from paste. Let's parse it using international rules\n numbro.culture('en-US');\n } else {\n\n numbro.culture(cellProperties.language);\n }\n\n const {delimiters} = numbro.cultureData(numbro.culture());\n\n // try to parse to float - https://github.com/foretagsplatsen/numbro/pull/183\n if (numbro.validate(changes[i][3]) && !isNaN(changes[i][3])) {\n changes[i][3] = parseFloat(changes[i][3]);\n\n } else {\n changes[i][3] = numbro().unformat(changes[i][3]) || changes[i][3];\n }\n }\n }\n\n /* eslint-disable no-loop-func */\n if (instance.getCellValidator(cellProperties)) {\n waitingForValidator.addValidatorToQueue();\n instance.validateCell(changes[i][3], cellProperties, (function(i, cellProperties) {\n return function(result) {\n if (typeof result !== 'boolean') {\n throw new Error('Validation error: result is not boolean');\n }\n if (result === false && cellProperties.allowInvalid === false) {\n changes.splice(i, 1); // cancel the change\n cellProperties.valid = true; // we cancelled the change, so cell value is still valid\n const cell = instance.getCell(cellProperties.row, cellProperties.col);\n removeClass(cell, instance.getSettings().invalidCellClassName);\n --i;\n }\n waitingForValidator.removeValidatorFormQueue();\n };\n }(i, cellProperties)), source);\n }\n }\n }\n waitingForValidator.checkIfQueueIsEmpty();\n\n function resolve() {\n var beforeChangeResult;\n\n if (changes.length) {\n beforeChangeResult = instance.runHooks('beforeChange', changes, source);\n if (isFunction(beforeChangeResult)) {\n console.warn('Your beforeChange callback returns a function. It\\'s not supported since Handsontable 0.12.1 (and the returned function will not be executed).');\n } else if (beforeChangeResult === false) {\n changes.splice(0, changes.length); // invalidate all changes (remove everything from array)\n }\n }\n callback(); // called when async validators are resolved and beforeChange was not async\n }\n }\n\n /**\n * Internal function to apply changes. Called after validateChanges\n *\n * @private\n * @param {Array} changes Array in form of [row, prop, oldValue, newValue]\n * @param {String} source String that identifies how this change will be described in changes array (useful in onChange callback)\n * @fires Hooks#beforeChangeRender\n * @fires Hooks#afterChange\n */\n function applyChanges(changes, source) {\n let i = changes.length - 1;\n\n if (i < 0) {\n return;\n }\n\n for (; i >= 0; i--) {\n let skipThisChange = false;\n\n if (changes[i] === null) {\n changes.splice(i, 1);\n /* eslint-disable no-continue */\n continue;\n }\n\n if (changes[i][2] == null && changes[i][3] == null) {\n /* eslint-disable no-continue */\n continue;\n }\n\n if (priv.settings.allowInsertRow) {\n while (changes[i][0] > instance.countRows() - 1) {\n let numberOfCreatedRows = datamap.createRow(void 0, void 0, source);\n\n if (numberOfCreatedRows === 0) {\n skipThisChange = true;\n break;\n }\n }\n }\n\n if (skipThisChange) {\n /* eslint-disable no-continue */\n continue;\n }\n\n if (instance.dataType === 'array' && (!priv.settings.columns || priv.settings.columns.length === 0) && priv.settings.allowInsertColumn) {\n while (datamap.propToCol(changes[i][1]) > instance.countCols() - 1) {\n datamap.createCol(void 0, void 0, source);\n }\n }\n\n datamap.set(changes[i][0], changes[i][1], changes[i][3]);\n }\n\n instance.forceFullRender = true; // used when data was changed\n grid.adjustRowsAndCols();\n instance.runHooks('beforeChangeRender', changes, source);\n selection.refreshBorders(null, true);\n instance.view.wt.wtOverlays.adjustElementsSize();\n instance.runHooks('afterChange', changes, source || 'edit');\n\n let activeEditor = instance.getActiveEditor();\n\n if (activeEditor && isDefined(activeEditor.refreshValue)) {\n activeEditor.refreshValue();\n }\n }\n\n this.validateCell = function(value, cellProperties, callback, source) {\n var validator = instance.getCellValidator(cellProperties);\n\n function done(valid) {\n var col = cellProperties.visualCol,\n row = cellProperties.visualRow,\n td = instance.getCell(row, col, true);\n\n if (td && td.nodeName != 'TH') {\n instance.view.wt.wtSettings.settings.cellRenderer(row, col, td);\n }\n callback(valid);\n }\n\n if (Object.prototype.toString.call(validator) === '[object RegExp]') {\n validator = (function(validator) {\n return function(value, callback) {\n callback(validator.test(value));\n };\n }(validator));\n }\n\n if (isFunction(validator)) {\n\n value = instance.runHooks('beforeValidate', value, cellProperties.visualRow, cellProperties.prop, source);\n\n // To provide consistent behaviour, validation should be always asynchronous\n instance._registerTimeout(setTimeout(() => {\n validator.call(cellProperties, value, (valid) => {\n valid = instance.runHooks('afterValidate', valid, value, cellProperties.visualRow, cellProperties.prop, source);\n cellProperties.valid = valid;\n\n done(valid);\n instance.runHooks('postAfterValidate', valid, value, cellProperties.visualRow, cellProperties.prop, source);\n });\n }, 0));\n\n } else {\n // resolve callback even if validator function was not found\n instance._registerTimeout(setTimeout(() => {\n cellProperties.valid = true;\n done(cellProperties.valid);\n }, 0));\n }\n };\n\n function setDataInputToArray(row, propOrCol, value) {\n if (typeof row === 'object') { // is it an array of changes\n return row;\n }\n return [\n [row, propOrCol, value]\n ];\n\n }\n\n /**\n * @description\n * Set new value to a cell. To change many cells at once, pass an array of `changes` in format `[[row, col, value], ...]` as\n * the only parameter. `col` is the index of a __visible__ column (note that if columns were reordered,\n * the current visible order will be used). `source` is a flag for before/afterChange events. If you pass only array of\n * changes then `source` could be set as second parameter.\n *\n * @memberof Core#\n * @function setDataAtCell\n * @param {Number|Array} row Row index or array of changes in format `[[row, col, value], ...]`.\n * @param {Number} col Column index.\n * @param {String} value New value.\n * @param {String} [source] String that identifies how this change will be described in the changes array (useful in onAfterChange or onBeforeChange callback).\n */\n this.setDataAtCell = function(row, col, value, source) {\n var\n input = setDataInputToArray(row, col, value),\n i,\n ilen,\n changes = [],\n prop;\n\n for (i = 0, ilen = input.length; i < ilen; i++) {\n if (typeof input[i] !== 'object') {\n throw new Error('Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter');\n }\n if (typeof input[i][1] !== 'number') {\n throw new Error('Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`');\n }\n prop = datamap.colToProp(input[i][1]);\n changes.push([\n input[i][0],\n prop,\n dataSource.getAtCell(recordTranslator.toPhysicalRow(input[i][0]), input[i][1]),\n input[i][2],\n ]);\n }\n\n if (!source && typeof row === 'object') {\n source = col;\n }\n\n instance.runHooks('afterSetDataAtCell', changes, source);\n\n validateChanges(changes, source, () => {\n applyChanges(changes, source);\n });\n };\n\n /**\n * @description\n * Set new value to a cell. To change many cells at once, pass an array of `changes` in format `[[row, prop, value], ...]` as\n * the only parameter. `prop` is the name of the object property (e.g. `first.name`). `source` is a flag for before/afterChange events.\n * If you pass only array of changes then `source` could be set as second parameter.\n *\n * @memberof Core#\n * @function setDataAtRowProp\n * @param {Number|Array} row Row index or array of changes in format `[[row, prop, value], ...]`.\n * @param {String} prop Property name or the source string.\n * @param {String} value Value to be set.\n * @param {String} [source] String that identifies how this change will be described in changes array (useful in onChange callback).\n */\n this.setDataAtRowProp = function(row, prop, value, source) {\n var input = setDataInputToArray(row, prop, value),\n i,\n ilen,\n changes = [];\n\n for (i = 0, ilen = input.length; i < ilen; i++) {\n changes.push([\n input[i][0],\n input[i][1],\n dataSource.getAtCell(recordTranslator.toPhysicalRow(input[i][0]), input[i][1]),\n input[i][2],\n ]);\n }\n\n if (!source && typeof row === 'object') {\n source = prop;\n }\n\n instance.runHooks('afterSetDataAtRowProp', changes, source);\n\n validateChanges(changes, source, () => {\n applyChanges(changes, source);\n });\n };\n\n /**\n * Listen to the keyboard input on document body.\n *\n * @memberof Core#\n * @function listen\n * @since 0.11\n */\n this.listen = function() {\n activeGuid = instance.guid;\n };\n\n /**\n * Stop listening to keyboard input on the document body.\n *\n * @memberof Core#\n * @function unlisten\n * @since 0.11\n */\n this.unlisten = function() {\n activeGuid = null;\n };\n\n /**\n * Returns `true` if the current Handsontable instance is listening to keyboard input on document body.\n *\n * @memberof Core#\n * @function isListening\n * @since 0.11\n * @returns {Boolean} `true` if the instance is listening, `false` otherwise.\n */\n this.isListening = function() {\n return activeGuid === instance.guid;\n };\n\n /**\n * Destroys the current editor, renders and selects the current cell.\n *\n * @memberof Core#\n * @function destroyEditor\n * @param {Boolean} [revertOriginal] If != `true`, edited data is saved. Otherwise the previous value is restored.\n */\n this.destroyEditor = function(revertOriginal) {\n selection.refreshBorders(revertOriginal);\n };\n\n /**\n * Populate cells at position with 2D input array (e.g. `[[1, 2], [3, 4]]`).\n * Use `endRow`, `endCol` when you want to cut input when a certain row is reached.\n * Optional `source` parameter (default value \"populateFromArray\") is used to identify this call in the resulting events (beforeChange, afterChange).\n * Optional `populateMethod` parameter (default value \"overwrite\", possible values \"shift_down\" and \"shift_right\")\n * has the same effect as pasteMode option {@link Options#pasteMode}\n *\n * @memberof Core#\n * @function populateFromArray\n * @since 0.9.0\n * @param {Number} row Start row\n * @param {Number} col Start column\n * @param {Array} input 2d array\n * @param {Number} [endRow] End row (use when you want to cut input when certain row is reached)\n * @param {Number} [endCol] End column (use when you want to cut input when certain column is reached)\n * @param {String} [source=\"populateFromArray\"] Source string.\n * @param {String} [method=\"overwrite\"] Populate method. Possible options: `shift_down`, `shift_right`, `overwrite`.\n * @param {String} direction Populate direction. (left|right|up|down)\n * @param {Array} deltas Deltas array.\n * @returns {Object|undefined} The ending TD element in pasted area (only if any cells were changed).\n */\n this.populateFromArray = function(row, col, input, endRow, endCol, source, method, direction, deltas) {\n var c;\n\n if (!(typeof input === 'object' && typeof input[0] === 'object')) {\n 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\n }\n c = typeof endRow === 'number' ? new CellCoords(endRow, endCol) : null;\n\n return grid.populateFromArray(new CellCoords(row, col), input, c, source, method, direction, deltas);\n };\n\n /**\n * Adds/removes data from the column. This function is modelled after Array.splice.\n * Parameter `col` is the index of the column in which do you want to do splice.\n * Parameter `index` is the row index at which to start changing the array.\n * If negative, will begin that many elements from the end. Parameter `amount`, is the number of the old array elements to remove.\n * If the amount is 0, no elements are removed. Fourth and further parameters are the `elements` to add to the array.\n * If you don't specify any elements, spliceCol simply removes elements from the array.\n * {@link DataMap#spliceCol}\n *\n * @memberof Core#\n * @function spliceCol\n * @since 0.9-beta2\n * @param {Number} col Index of the column in which do you want to do splice.\n * @param {Number} index Index at which to start changing the array. If negative, will begin that many elements from the end.\n * @param {Number} amount An integer indicating the number of old array elements to remove. If amount is 0, no elements are removed.\n * @param {*} [elements] The elements to add to the array. If you don't specify any elements, spliceCol simply removes elements from the array.\n */\n this.spliceCol = function(col, index, amount/* , elements... */) {\n return datamap.spliceCol(...arguments);\n };\n\n /**\n * Adds/removes data from the row. This function works is modelled after Array.splice.\n * Parameter `row` is the index of row in which do you want to do splice.\n * Parameter `index` is the column index at which to start changing the array.\n * If negative, will begin that many elements from the end. Parameter `amount`, is the number of old array elements to remove.\n * If the amount is 0, no elements are removed. Fourth and further parameters are the `elements` to add to the array.\n * If you don't specify any elements, spliceCol simply removes elements from the array.\n * {@link DataMap#spliceRow}\n *\n * @memberof Core#\n * @function spliceRow\n * @since 0.11\n * @param {Number} row Index of column in which do you want to do splice.\n * @param {Number} index Index at which to start changing the array. If negative, will begin that many elements from the end.\n * @param {Number} amount An integer indicating the number of old array elements to remove. If amount is 0, no elements are removed.\n * @param {*} [elements] The elements to add to the array. If you don't specify any elements, spliceCol simply removes elements from the array.\n */\n this.spliceRow = function(row, index, amount/* , elements... */) {\n return datamap.spliceRow(...arguments);\n };\n\n /**\n * Returns indexes of the currently selected cells as an array `[startRow, startCol, endRow, endCol]`.\n *\n * Start row and start col are the coordinates of the active cell (where the selection was started).\n *\n * @memberof Core#\n * @function getSelected\n * @returns {Array} Array of the selection's indexes.\n */\n this.getSelected = function() { // https://github.com/handsontable/handsontable/issues/44 //cjl\n if (selection.isSelected()) {\n return [priv.selRange.from.row, priv.selRange.from.col, priv.selRange.to.row, priv.selRange.to.col];\n }\n };\n\n /**\n * Returns the current selection as a CellRange object.\n *\n * @memberof Core#\n * @function getSelectedRange\n * @since 0.11\n * @returns {CellRange} Selected range object or undefined` if there is no selection.\n */\n this.getSelectedRange = function() { // https://github.com/handsontable/handsontable/issues/44 //cjl\n if (selection.isSelected()) {\n return priv.selRange;\n }\n };\n\n /**\n * Rerender the table.\n *\n * @memberof Core#\n * @function render\n */\n this.render = function() {\n if (instance.view) {\n instance.renderCall = true;\n instance.forceFullRender = true; // used when data was changed\n selection.refreshBorders(null, true);\n }\n };\n\n /**\n * Reset all cells in the grid to contain data from the data array.\n *\n * @memberof Core#\n * @function loadData\n * @param {Array} data Array of arrays or array of objects containing data.\n * @fires Hooks#afterLoadData\n * @fires Hooks#afterChange\n */\n this.loadData = function(data) {\n if (Array.isArray(priv.settings.dataSchema)) {\n instance.dataType = 'array';\n } else if (isFunction(priv.settings.dataSchema)) {\n instance.dataType = 'function';\n } else {\n instance.dataType = 'object';\n }\n\n if (datamap) {\n datamap.destroy();\n }\n datamap = new DataMap(instance, priv, GridSettings);\n\n if (typeof data === 'object' && data !== null) {\n if (!(data.push && data.splice)) { // check if data is array. Must use duck-type check so Backbone Collections also pass it\n // when data is not an array, attempt to make a single-row array of it\n data = [data];\n }\n\n } else if (data === null) {\n data = [];\n var row;\n var r = 0;\n var rlen = 0;\n var dataSchema = datamap.getSchema();\n\n for (r = 0, rlen = priv.settings.startRows; r < rlen; r++) {\n if ((instance.dataType === 'object' || instance.dataType === 'function') && priv.settings.dataSchema) {\n row = deepClone(dataSchema);\n data.push(row);\n\n } else if (instance.dataType === 'array') {\n row = deepClone(dataSchema[0]);\n data.push(row);\n\n } else {\n row = [];\n\n for (var c = 0, clen = priv.settings.startCols; c < clen; c++) {\n row.push(null);\n }\n\n data.push(row);\n }\n }\n\n } else {\n throw new Error(`loadData only accepts array of objects or array of arrays (${typeof data} given)`);\n }\n\n priv.isPopulated = false;\n GridSettings.prototype.data = data;\n\n if (Array.isArray(data[0])) {\n instance.dataType = 'array';\n }\n\n datamap.dataSource = data;\n dataSource.data = data;\n dataSource.dataType = instance.dataType;\n dataSource.colToProp = datamap.colToProp.bind(datamap);\n dataSource.propToCol = datamap.propToCol.bind(datamap);\n\n clearCellSettingCache();\n\n grid.adjustRowsAndCols();\n instance.runHooks('afterLoadData', priv.firstRun);\n\n if (priv.firstRun) {\n priv.firstRun = [null, 'loadData'];\n } else {\n instance.runHooks('afterChange', null, 'loadData');\n instance.render();\n }\n priv.isPopulated = true;\n\n function clearCellSettingCache() {\n priv.cellSettings.length = 0;\n }\n };\n\n /**\n * Returns the current data object (the same one that was passed by `data` configuration option or `loadData` method,\n * unless the `modifyRow` hook was used to trim some of the rows. If that's the case - use the {@link Core#getSourceData} method.).\n * Optionally you can provide cell range by defining `row`, `col`, `row2`, `col2` to get only a fragment of grid data.\n *\n * Note: getData functionality changed with the release of version 0.20. If you're looking for the previous functionality,\n * you should use the {@link Core#getSourceData} method.\n *\n * @memberof Core#\n * @function getData\n * @param {Number} [r] From row.\n * @param {Number} [c] From column.\n * @param {Number} [r2] To row.\n * @param {Number} [c2] To column.\n * @returns {Array} Array with the data.\n */\n this.getData = function(r, c, r2, c2) {\n if (isUndefined(r)) {\n return datamap.getAll();\n }\n return datamap.getRange(new CellCoords(r, c), new CellCoords(r2, c2), datamap.DESTINATION_RENDERER);\n\n };\n\n /**\n * Returns a string value of the selected range. Each column is separated by tab, each row is separated by a new line character.\n * {@link DataMap#getCopyableText}\n *\n * @memberof Core#\n * @function getCopyableText\n * @since 0.11\n * @param {Number} startRow From row.\n * @param {Number} startCol From column.\n * @param {Number} endRow To row.\n * @param {Number} endCol To column.\n * @returns {String}\n */\n this.getCopyableText = function(startRow, startCol, endRow, endCol) {\n return datamap.getCopyableText(new CellCoords(startRow, startCol), new CellCoords(endRow, endCol));\n };\n\n /**\n * Returns the data's copyable value at specified row and column index ({@link DataMap#getCopyable}).\n *\n * @memberof Core#\n * @function getCopyableData\n * @since 0.19.0\n * @param {Number} row Row index.\n * @param {Number} column Column index.\n * @returns {String}\n */\n this.getCopyableData = function(row, column) {\n return datamap.getCopyable(row, datamap.colToProp(column));\n };\n\n /**\n * Returns schema provided by constructor settings. If it doesn't exist then it returns the schema based on the data\n * structure in the first row.\n *\n * @memberof Core#\n * @function getSchema\n * @since 0.13.2\n * @returns {Object} Schema object.\n */\n this.getSchema = function() {\n return datamap.getSchema();\n };\n\n /**\n * Use it if you need to change configuration after initialization. The `settings` parameter is an object containing the new\n * settings, declared the same way as in the initial settings object.\n * Note, that although the `updateSettings` method doesn't overwrite the previously declared settings, it might reset\n * the settings made post-initialization. (for example - ignore changes made using the columnResize feature).\n *\n * @memberof Core#\n * @function updateSettings\n * @param {Object} settings New settings object.\n * @param {Boolean} init\n * @example\n * ```js\n * hot.updateSettings({\n * contextMenu: true,\n * colHeaders: true,\n * fixedRowsTop: 2\n * });\n * ```\n * @fires Hooks#afterCellMetaReset\n * @fires Hooks#afterUpdateSettings\n */\n this.updateSettings = function(settings, init) {\n let columnsAsFunc = false;\n let i;\n let j;\n let clen;\n\n if (isDefined(settings.rows)) {\n throw new Error('\"rows\" setting is no longer supported. do you mean startRows, minRows or maxRows?');\n }\n if (isDefined(settings.cols)) {\n throw new Error('\"cols\" setting is no longer supported. do you mean startCols, minCols or maxCols?');\n }\n\n for (i in settings) {\n if (i === 'data') {\n /* eslint-disable no-continue */\n continue; // loadData will be triggered later\n\n } else if (Hooks.getSingleton().getRegistered().indexOf(i) > -1) {\n if (isFunction(settings[i]) || Array.isArray(settings[i])) {\n settings[i].initialHook = true;\n instance.addHook(i, settings[i]);\n }\n\n } else if (!init && hasOwnProperty(settings, i)) { // Update settings\n GridSettings.prototype[i] = settings[i];\n }\n }\n\n // Load data or create data map\n if (settings.data === void 0 && priv.settings.data === void 0) {\n instance.loadData(null); // data source created just now\n\n } else if (settings.data !== void 0) {\n instance.loadData(settings.data); // data source given as option\n\n } else if (settings.columns !== void 0) {\n datamap.createMap();\n }\n\n clen = instance.countCols();\n\n const columnSetting = settings.columns || GridSettings.prototype.columns;\n\n // Init columns constructors configuration\n if (columnSetting && isFunction(columnSetting)) {\n clen = instance.countSourceCols();\n columnsAsFunc = true;\n }\n\n // Clear cellSettings cache\n if (settings.cell !== void 0 || settings.cells !== void 0 || settings.columns !== void 0) {\n priv.cellSettings.length = 0;\n }\n\n if (clen > 0) {\n let proto;\n let column;\n\n for (i = 0, j = 0; i < clen; i++) {\n if (columnsAsFunc && !columnSetting(i)) {\n /* eslint-disable no-continue */\n continue;\n }\n priv.columnSettings[j] = columnFactory(GridSettings, priv.columnsSettingConflicts);\n\n // shortcut for prototype\n proto = priv.columnSettings[j].prototype;\n\n // Use settings provided by user\n if (columnSetting) {\n if (columnsAsFunc) {\n column = columnSetting(i);\n\n } else {\n column = columnSetting[j];\n }\n\n if (column) {\n extend(proto, column);\n extend(proto, expandType(column));\n }\n }\n\n j++;\n }\n }\n\n if (isDefined(settings.cell)) {\n for (let key in settings.cell) {\n if (hasOwnProperty(settings.cell, key)) {\n let cell = settings.cell[key];\n\n instance.setCellMetaObject(cell.row, cell.col, cell);\n }\n }\n }\n\n instance.runHooks('afterCellMetaReset');\n\n if (isDefined(settings.className)) {\n if (GridSettings.prototype.className) {\n removeClass(instance.rootElement, GridSettings.prototype.className);\n }\n if (settings.className) {\n addClass(instance.rootElement, settings.className);\n }\n }\n\n let currentHeight = instance.rootElement.style.height;\n if (currentHeight !== '') {\n currentHeight = parseInt(instance.rootElement.style.height, 10);\n }\n\n let height = settings.height;\n if (isFunction(height)) {\n height = height();\n }\n\n if (init) {\n let initialStyle = instance.rootElement.getAttribute('style');\n\n if (initialStyle) {\n instance.rootElement.setAttribute('data-initialstyle', instance.rootElement.getAttribute('style'));\n }\n }\n\n if (height === null) {\n let initialStyle = instance.rootElement.getAttribute('data-initialstyle');\n\n if (initialStyle && (initialStyle.indexOf('height') > -1 || initialStyle.indexOf('overflow') > -1)) {\n instance.rootElement.setAttribute('style', initialStyle);\n\n } else {\n instance.rootElement.style.height = '';\n instance.rootElement.style.overflow = '';\n }\n\n } else if (height !== void 0) {\n instance.rootElement.style.height = `${height}px`;\n instance.rootElement.style.overflow = 'hidden';\n }\n\n if (typeof settings.width != 'undefined') {\n var width = settings.width;\n\n if (isFunction(width)) {\n width = width();\n }\n\n instance.rootElement.style.width = `${width}px`;\n }\n\n if (!init) {\n datamap.clearLengthCache(); // force clear cache length on updateSettings() #3416\n\n if (instance.view) {\n instance.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked();\n }\n\n instance.runHooks('afterUpdateSettings');\n }\n\n grid.adjustRowsAndCols();\n if (instance.view && !priv.firstRun) {\n instance.forceFullRender = true; // used when data was changed\n selection.refreshBorders(null, true);\n }\n\n if (!init && instance.view && (currentHeight === '' || height === '' || height === void 0) && currentHeight !== height) {\n instance.view.wt.wtOverlays.updateMainScrollableElements();\n }\n };\n\n /**\n * Get value from the selected cell.\n *\n * @memberof Core#\n * @function getValue\n * @since 0.11\n * @returns {*} Value of selected cell.\n */\n this.getValue = function() {\n var sel = instance.getSelected();\n if (GridSettings.prototype.getValue) {\n if (isFunction(GridSettings.prototype.getValue)) {\n return GridSettings.prototype.getValue.call(instance);\n } else if (sel) {\n return instance.getData()[sel[0]][GridSettings.prototype.getValue];\n }\n } else if (sel) {\n return instance.getDataAtCell(sel[0], sel[1]);\n }\n };\n\n function expandType(obj) {\n if (!hasOwnProperty(obj, 'type')) {\n // ignore obj.prototype.type\n return;\n }\n\n var type,\n expandedType = {};\n\n if (typeof obj.type === 'object') {\n type = obj.type;\n } else if (typeof obj.type === 'string') {\n type = cellTypes[obj.type];\n if (type === void 0) {\n throw new Error(`You declared cell type \"${obj.type\n }\" as a string that is not mapped to a known object. Cell type must be an object or a string mapped to an object in Handsontable.cellTypes`);\n }\n }\n\n for (var i in type) {\n if (hasOwnProperty(type, i) && !hasOwnProperty(obj, i)) {\n expandedType[i] = type[i];\n }\n }\n\n return expandedType;\n\n }\n\n /**\n * Returns the object settings.\n *\n * @memberof Core#\n * @function getSettings\n * @returns {Object} Object containing the current grid settings.\n */\n this.getSettings = function() {\n return priv.settings;\n };\n\n /**\n * Clears the data from the grid. (The table settings remain intact.)\n *\n * @memberof Core#\n * @function clear\n * @since 0.11\n */\n this.clear = function() {\n selection.selectAll();\n selection.empty();\n };\n\n /**\n * @memberof Core#\n * @function alter\n * @param {String} action See grid.alter for possible values: `\"insert_row\"`, `\"insert_col\"`, `\"remove_row\"`, `\"remove_col\"`\n * @param {Number} index Index of the row/column before which the new row/column will be inserted/removed.\n * @param {Number} [amount = 1] Amound of rows/columns to be inserted/removed.\n * @param {String} [source] Source indicator.\n * @param {Boolean} [keepEmptyRows] Flag for preventing deletion of empty rows.\n * @description\n *\n * Allows altering the table structure by either inserting/removing rows or inserting/removing columns:\n *\n * Insert new row(s) above the row with a given `index`. If index is `null` or `undefined`, the new row will be\n * added after the last row.\n * ```js\n * var hot = new Handsontable(document.getElementById('example'));\n * hot.alter('insert_row', 10);\n * ```\n *\n * Insert new column(s) before the column with a given `index`. If index is `null` or `undefined`, the new column\n * will be added after the last column.\n * ```js\n * var hot = new Handsontable(document.getElementById('example'));\n * hot.alter('insert_col', 10);\n * ```\n *\n * Remove the row(s) at the given `index`.\n * ```js\n * var hot = new Handsontable(document.getElementById('example'));\n * hot.alter('remove_row', 10);\n * ```\n *\n * Remove the column(s) at the given `index`.\n * ```js\n * var hot = new Handsontable(document.getElementById('example'));\n * hot.alter('remove_col', 10);\n * ```\n */\n this.alter = function(action, index, amount, source, keepEmptyRows) {\n grid.alter(action, index, amount, source, keepEmptyRows);\n };\n\n /**\n * Returns a TD element for the given `row` and `col` arguments, if it is rendered on screen.\n * Returns `null` if the TD is not rendered on screen (probably because that part of the table is not visible).\n *\n * @memberof Core#\n * @function getCell\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @param {Boolean} topmost If set to true, it returns the TD element from the topmost overlay. For example,\n * if the wanted cell is in the range of fixed rows, it will return a TD element from the `top` overlay.\n * @returns {Element} The cell's TD element.\n */\n this.getCell = function(row, col, topmost) {\n return instance.view.getCellAtCoords(new CellCoords(row, col), topmost);\n };\n\n /**\n * Returns the coordinates of the cell, provided as a HTML Element.\n *\n * @memberof Core#\n * @function getCoords\n * @param {Element} elem The HTML Element representing the cell.\n * @returns {CellCoords} Coordinates object.\n */\n this.getCoords = function(elem) {\n return this.view.wt.wtTable.getCoords.call(this.view.wt.wtTable, elem);\n };\n\n /**\n * Returns the property name that corresponds with the given column index. {@link DataMap#colToProp}\n * If the data source is an array of arrays, it returns the columns index.\n *\n * @memberof Core#\n * @function colToProp\n * @param {Number} col Column index\n * @returns {String|Number} Column property or column index.\n */\n this.colToProp = function(col) {\n return datamap.colToProp(col);\n };\n\n /**\n * Returns column index that corresponds with the given property. {@link DataMap#propToCol}\n *\n * @memberof Core#\n * @function propToCol\n * @param {String|Number} prop Property name or column index.\n * @returns {Number} Column index.\n */\n this.propToCol = function(prop) {\n return datamap.propToCol(prop);\n };\n\n /**\n * Translate physical row index into visual.\n *\n * @since 0.29.0\n * @memberof Core#\n * @function toVisualRow\n * @param {Number} row Physical row index.\n * @returns {Number} Returns visual row index.\n */\n this.toVisualRow = (row) => recordTranslator.toVisualRow(row);\n\n /**\n * Translate physical column index into visual.\n *\n * @since 0.29.0\n * @memberof Core#\n * @function toVisualColumn\n * @param {Number} column Physical column index.\n * @returns {Number} Returns visual column index.\n */\n this.toVisualColumn = (column) => recordTranslator.toVisualColumn(column);\n\n /**\n * Translate visual row index into physical.\n * If displayed rows order is different than the order of rows stored in memory (i.e. sorting is applied)\n * to retrieve valid physical row index you can use this method.\n *\n * @since 0.29.0\n * @memberof Core#\n * @function toPhysicalRow\n * @param {Number} row Visual row index.\n * @returns {Number} Returns physical row index.\n */\n this.toPhysicalRow = (row) => recordTranslator.toPhysicalRow(row);\n\n /**\n * Translate visual column index into physical.\n * If displayed columns order is different than the order of columns stored in memory (i.e. manual column move is applied)\n * to retrieve valid physical column index you can use this method.\n *\n * @since 0.29.0\n * @memberof Core#\n * @function toPhysicalColumn\n * @param {Number} column Visual column index.\n * @returns {Number} Returns physical column index.\n */\n this.toPhysicalColumn = (column) => recordTranslator.toPhysicalColumn(column);\n\n /**\n * @description\n * Returns the cell value at `row`, `col`. `row` and `col` are the __visible__ indexes (note, that if columns were reordered or sorted,\n * the currently visible order will be used).\n *\n * @memberof Core#\n * @function getDataAtCell\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @returns {String|Boolean|null} Data at cell.\n */\n this.getDataAtCell = function(row, col) {\n return datamap.get(row, datamap.colToProp(col));\n };\n\n /**\n * Return value at `row`, `prop`. (Uses {@link DataMap#get})\n *\n * @memberof Core#\n * @function getDataAtRowProp\n * @param {Number} row Row index.\n * @param {String} prop Property name.\n * @returns {*} Cell value.\n */\n this.getDataAtRowProp = function(row, prop) {\n return datamap.get(row, prop);\n };\n\n /**\n * @description\n * Returns array of column values from the data source. `col` is the __visible__ index of the column.\n * Note, that if columns were reordered or sorted, the currently visible order will be used.\n *\n * @memberof Core#\n * @function getDataAtCol\n * @since 0.9-beta2\n * @param {Number} col Column index.\n * @returns {Array} Array of cell values.\n */\n this.getDataAtCol = function(col) {\n var out = [];\n return out.concat(...datamap.getRange(\n new CellCoords(0, col), new CellCoords(priv.settings.data.length - 1, col), datamap.DESTINATION_RENDERER));\n };\n\n /**\n * Given the object property name (e.g. `'first.name'`), returns an array of column's values from the data source.\n * You can also provide a column index as the first argument.\n *\n * @memberof Core#\n * @function getDataAtProp\n * @since 0.9-beta2\n * @param {String|Number} prop Property name / column index.\n * @returns {Array} Array of cell values.\n */\n this.getDataAtProp = function(prop) {\n var out = [],\n range;\n\n range = datamap.getRange(\n new CellCoords(0, datamap.propToCol(prop)),\n new CellCoords(priv.settings.data.length - 1, datamap.propToCol(prop)),\n datamap.DESTINATION_RENDERER);\n\n return out.concat(...range);\n };\n\n /**\n * Returns the source data object (the same that was passed by `data` configuration option or `loadData` method).\n * Optionally you can provide a cell range by using the `row`, `col`, `row2`, `col2` arguments, to get only a fragment of grid data.\n *\n * @memberof Core#\n * @function getSourceData\n * @since 0.20.0\n * @param {Number} [r] From row.\n * @param {Number} [c] From column.\n * @param {Number} [r2] To row.\n * @param {Number} [c2] To column.\n * @returns {Array} Array of grid data.\n */\n this.getSourceData = function(r, c, r2, c2) {\n let data;\n\n if (r === void 0) {\n data = dataSource.getData();\n } else {\n data = dataSource.getByRange(new CellCoords(r, c), new CellCoords(r2, c2));\n }\n\n return data;\n };\n\n /**\n * Returns the source data object as an arrays of arrays format even when source data was provided in another format.\n * Optionally you can provide a cell range by using the `row`, `col`, `row2`, `col2` arguments, to get only a fragment of grid data.\n *\n * @memberof Core#\n * @function getSourceDataArray\n * @since 0.28.0\n * @param {Number} [r] From row.\n * @param {Number} [c] From column.\n * @param {Number} [r2] To row.\n * @param {Number} [c2] To column.\n * @returns {Array} An array of arrays.\n */\n this.getSourceDataArray = function(r, c, r2, c2) {\n let data;\n\n if (r === void 0) {\n data = dataSource.getData(true);\n } else {\n data = dataSource.getByRange(new CellCoords(r, c), new CellCoords(r2, c2), true);\n }\n\n return data;\n };\n\n /**\n * Returns an array of column values from the data source. `col` is the index of the row in the data source.\n *\n * @memberof Core#\n * @function getSourceDataAtCol\n * @since 0.11.0-beta3\n * @param {Number} column Column index.\n * @returns {Array} Array of the column's cell values.\n */\n this.getSourceDataAtCol = function(column) {\n return dataSource.getAtColumn(column);\n };\n\n /**\n * Returns a single row of the data (array or object, depending on what you have). `row` is the index of the row in the data source.\n *\n * @memberof Core#\n * @function getSourceDataAtRow\n * @since 0.11.0-beta3\n * @param {Number} row Row index.\n * @returns {Array|Object} Single row of data.\n */\n this.getSourceDataAtRow = function(row) {\n return dataSource.getAtRow(row);\n };\n\n /**\n * Returns a single value from the data source.\n *\n * @memberof Core#\n * @function getSourceDataAtCell\n * @param {Number} row Row index.\n * @param {Number} column Column index.\n * @returns {*} Cell data.\n * @since 0.20.0\n */\n this.getSourceDataAtCell = function(row, column) {\n return dataSource.getAtCell(row, column);\n };\n\n /**\n * @description\n * Returns a single row of the data. The `row` argument is the __visible__ index of the row.\n *\n * @memberof Core#\n * @function getDataAtRow\n * @param {Number} row Row index.\n * @returns {Array} Array of row's cell data.\n * @since 0.9-beta2\n */\n this.getDataAtRow = function(row) {\n var data = datamap.getRange(new CellCoords(row, 0), new CellCoords(row, this.countCols() - 1), datamap.DESTINATION_RENDERER);\n\n return data[0];\n };\n\n /**\n * @description\n * Returns a data type defined in the Handsontable settings under the `type` key ([Options#type](http://docs.handsontable.com/Options.html#type)).\n * If there are cells with different types in the selected range, it returns `'mixed'`.\n *\n * @since 0.18.1\n * @memberof Core#\n * @function getDataType\n * @param {Number} rowFrom From row index.\n * @param {Number} columnFrom To row index.\n * @param {Number} rowTo From column index.\n * @param {Number} columnTo To column index.\n * @returns {String} Cell type (e.q: `'mixed'`, `'text'`, `'numeric'`, `'autocomplete'`).\n */\n this.getDataType = function(rowFrom, columnFrom, rowTo, columnTo) {\n let previousType = null;\n let currentType = null;\n\n if (rowFrom === void 0) {\n rowFrom = 0;\n rowTo = this.countRows();\n columnFrom = 0;\n columnTo = this.countCols();\n }\n if (rowTo === void 0) {\n rowTo = rowFrom;\n }\n if (columnTo === void 0) {\n columnTo = columnFrom;\n }\n let type = 'mixed';\n\n rangeEach(Math.min(rowFrom, rowTo), Math.max(rowFrom, rowTo), (row) => {\n let isTypeEqual = true;\n\n rangeEach(Math.min(columnFrom, columnTo), Math.max(columnFrom, columnTo), (column) => {\n let cellType = this.getCellMeta(row, column);\n\n currentType = cellType.type;\n\n if (previousType) {\n isTypeEqual = previousType === currentType;\n } else {\n previousType = currentType;\n }\n\n return isTypeEqual;\n });\n type = isTypeEqual ? currentType : 'mixed';\n\n return isTypeEqual;\n });\n\n return type;\n };\n\n /**\n * Remove a property defined by the `key` argument from the cell meta object for the provided `row` and `col` coordinates.\n *\n * @memberof Core#\n * @function removeCellMeta\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @param {String} key Property name.\n */\n this.removeCellMeta = function(row, col, key) {\n var cellMeta = instance.getCellMeta(row, col);\n if (cellMeta[key] != undefined) {\n delete priv.cellSettings[row][col][key];\n }\n };\n\n /**\n * Remove one or more rows from the cell meta object.\n *\n * @since 0.30.0\n * @param {Number} index An integer that specifies at what position to add/remove items, Use negative values to specify the position from the end of the array.\n * @param {Number} deleteAmount The number of items to be removed. If set to 0, no items will be removed.\n * @param {Array} items The new items to be added to the array.\n */\n this.spliceCellsMeta = function(index, deleteAmount, ...items) {\n priv.cellSettings.splice(index, deleteAmount, ...items);\n };\n\n /**\n * Set cell meta data object defined by `prop` to the corresponding params `row` and `col`.\n *\n * @memberof Core#\n * @function setCellMetaObject\n * @since 0.11\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @param {Object} prop Meta object.\n */\n this.setCellMetaObject = function(row, col, prop) {\n if (typeof prop === 'object') {\n for (var key in prop) {\n if (hasOwnProperty(prop, key)) {\n var value = prop[key];\n this.setCellMeta(row, col, key, value);\n }\n }\n }\n };\n\n /**\n * Sets a property defined by the `key` object to the meta object of a cell corresponding to params `row` and `col`.\n *\n * @memberof Core#\n * @function setCellMeta\n * @since 0.11\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @param {String} key Property name.\n * @param {String} val Property value.\n * @fires Hooks#afterSetCellMeta\n */\n this.setCellMeta = function(row, col, key, val) {\n [row, col] = recordTranslator.toPhysical(row, col);\n\n if (!priv.cellSettings[row]) {\n priv.cellSettings[row] = [];\n }\n if (!priv.cellSettings[row][col]) {\n priv.cellSettings[row][col] = new priv.columnSettings[col]();\n }\n priv.cellSettings[row][col][key] = val;\n instance.runHooks('afterSetCellMeta', row, col, key, val);\n };\n\n /**\n * Get all the cells meta settings at least once generated in the table (in order of cell initialization).\n *\n * @since 0.19.0\n * @returns {Array} Returns Array of ColumnSettings object.\n */\n this.getCellsMeta = function() {\n return arrayFlatten(priv.cellSettings);\n };\n\n /**\n * Returns the cell properties object for the given `row` and `col` coordinates.\n *\n * @memberof Core#\n * @function getCellMeta\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @returns {Object} The cell properties object.\n * @fires Hooks#beforeGetCellMeta\n * @fires Hooks#afterGetCellMeta\n */\n this.getCellMeta = function(row, col) {\n var prop = datamap.colToProp(col),\n cellProperties;\n\n let visualRow = row;\n let visualCol = col;\n\n [row, col] = recordTranslator.toPhysical(row, col);\n\n if (!priv.columnSettings[col]) {\n priv.columnSettings[col] = columnFactory(GridSettings, priv.columnsSettingConflicts);\n }\n\n if (!priv.cellSettings[row]) {\n priv.cellSettings[row] = [];\n }\n if (!priv.cellSettings[row][col]) {\n priv.cellSettings[row][col] = new priv.columnSettings[col]();\n }\n\n cellProperties = priv.cellSettings[row][col]; // retrieve cellProperties from cache\n\n cellProperties.row = row;\n cellProperties.col = col;\n cellProperties.visualRow = visualRow;\n cellProperties.visualCol = visualCol;\n cellProperties.prop = prop;\n cellProperties.instance = instance;\n\n instance.runHooks('beforeGetCellMeta', row, col, cellProperties);\n extend(cellProperties, expandType(cellProperties)); // for `type` added in beforeGetCellMeta\n\n if (cellProperties.cells) {\n var settings = cellProperties.cells.call(cellProperties, row, col, prop);\n\n if (settings) {\n extend(cellProperties, settings);\n extend(cellProperties, expandType(settings)); // for `type` added in cells\n }\n }\n\n instance.runHooks('afterGetCellMeta', row, col, cellProperties);\n\n return cellProperties;\n };\n\n /**\n * Returns a row off the cell meta array.\n *\n * @memberof Core#\n * @function getCellMetaAtRow\n * @since 0.30.0\n * @param {Number} row Index of the row to return cell meta for.\n * @returns {Array}\n */\n this.getCellMetaAtRow = function(row) {\n return priv.cellSettings[row];\n };\n\n /**\n * Checks if the data format and config allows user to modify the column structure.\n * @returns {boolean}\n */\n this.isColumnModificationAllowed = function() {\n return !(instance.dataType === 'object' || instance.getSettings().columns);\n };\n\n var rendererLookup = cellMethodLookupFactory('renderer');\n\n /**\n * Returns the cell renderer function by given `row` and `col` arguments.\n *\n * @memberof Core#\n * @function getCellRenderer\n * @since 0.11\n * @param {Number|Object} row Row index or cell meta object.\n * @param {Number} [col] Column index.\n * @returns {Function} The renderer function.\n */\n this.getCellRenderer = function(row, col) {\n var renderer = rendererLookup.call(this, row, col);\n\n return getRenderer(renderer);\n };\n\n /**\n * Returns the cell editor by the provided `row` and `col` arguments.\n *\n * @memberof Core#\n * @function getCellEditor\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @returns {Object} The Editor object.\n */\n this.getCellEditor = cellMethodLookupFactory('editor');\n\n /**\n * Returns the cell validator by `row` and `col`, provided a validator is defined. If not - it doesn't return anything.\n *\n * @memberof Core#\n * @function getCellValidator\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @returns {Function|undefined} The validator function.\n */\n this.getCellValidator = cellMethodLookupFactory('validator');\n\n /**\n * Validates all cells using their validator functions and calls callback when finished.\n *\n * If one of the cells is invalid, the callback will be fired with `'valid'` arguments as `false` - otherwise it would equal `true`.\n *\n * @memberof Core#\n * @function validateCells\n * @param {Function} [callback] The callback function.\n */\n this.validateCells = function(callback) {\n var waitingForValidator = new ValidatorsQueue();\n\n if (callback) {\n waitingForValidator.onQueueEmpty = callback;\n }\n\n let i = instance.countRows() - 1;\n\n while (i >= 0) {\n let j = instance.countCols() - 1;\n\n while (j >= 0) {\n waitingForValidator.addValidatorToQueue();\n\n instance.validateCell(instance.getDataAtCell(i, j), instance.getCellMeta(i, j), (result) => {\n if (typeof result !== 'boolean') {\n throw new Error('Validation error: result is not boolean');\n }\n if (result === false) {\n waitingForValidator.valid = false;\n }\n waitingForValidator.removeValidatorFormQueue();\n }, 'validateCells');\n j--;\n }\n i--;\n }\n waitingForValidator.checkIfQueueIsEmpty();\n };\n\n /**\n * Returns an array of row headers' values (if they are enabled). If param `row` was given, it returns the header of the given row as a string.\n *\n * @memberof Core#\n * @function getRowHeader\n * @param {Number} [row] Row index.\n * @fires Hooks#modifyRowHeader\n * @returns {Array|String} Array of header values / single header value.\n */\n this.getRowHeader = function(row) {\n let rowHeader = priv.settings.rowHeaders;\n\n if (row !== void 0) {\n row = instance.runHooks('modifyRowHeader', row);\n }\n if (row === void 0) {\n rowHeader = [];\n rangeEach(instance.countRows() - 1, (i) => {\n rowHeader.push(instance.getRowHeader(i));\n });\n\n } else if (Array.isArray(rowHeader) && rowHeader[row] !== void 0) {\n rowHeader = rowHeader[row];\n\n } else if (isFunction(rowHeader)) {\n rowHeader = rowHeader(row);\n\n } else if (rowHeader && typeof rowHeader !== 'string' && typeof rowHeader !== 'number') {\n rowHeader = row + 1;\n }\n\n return rowHeader;\n };\n\n /**\n * Returns information about if this table is configured to display row headers.\n *\n * @memberof Core#\n * @function hasRowHeaders\n * @returns {Boolean} `true` if the instance has the row headers enabled, `false` otherwise.\n * @since 0.11\n */\n this.hasRowHeaders = function() {\n return !!priv.settings.rowHeaders;\n };\n\n /**\n * Returns information about if this table is configured to display column headers.\n *\n * @memberof Core#\n * @function hasColHeaders\n * @since 0.11\n * @returns {Boolean} `True` if the instance has the column headers enabled, `false` otherwise.\n */\n this.hasColHeaders = function() {\n if (priv.settings.colHeaders !== void 0 && priv.settings.colHeaders !== null) { // Polymer has empty value = null\n return !!priv.settings.colHeaders;\n }\n for (var i = 0, ilen = instance.countCols(); i < ilen; i++) {\n if (instance.getColHeader(i)) {\n return true;\n }\n }\n\n return false;\n };\n\n /**\n * Returns an array of column headers (in string format, if they are enabled). If param `col` is given, it returns the header at the given column as a string.\n *\n * @memberof Core#\n * @function getColHeader\n * @param {Number} [col] Column index.\n * @fires Hooks#modifyColHeader\n * @returns {Array|String} The column header(s).\n */\n this.getColHeader = function(col) {\n let columnsAsFunc = priv.settings.columns && isFunction(priv.settings.columns);\n let result = priv.settings.colHeaders;\n\n col = instance.runHooks('modifyColHeader', col);\n\n if (col === void 0) {\n let out = [];\n let ilen = columnsAsFunc ? instance.countSourceCols() : instance.countCols();\n\n for (let i = 0; i < ilen; i++) {\n out.push(instance.getColHeader(i));\n }\n\n result = out;\n\n } else {\n let translateVisualIndexToColumns = function(col) {\n let arr = [];\n let columnsLen = instance.countSourceCols();\n let index = 0;\n\n for (; index < columnsLen; index++) {\n if (isFunction(instance.getSettings().columns) && instance.getSettings().columns(index)) {\n arr.push(index);\n }\n }\n\n return arr[col];\n };\n let baseCol = col;\n col = instance.runHooks('modifyCol', col);\n\n let prop = translateVisualIndexToColumns(col);\n\n if (priv.settings.columns && isFunction(priv.settings.columns) && priv.settings.columns(prop) && priv.settings.columns(prop).title) {\n result = priv.settings.columns(prop).title;\n\n } else if (priv.settings.columns && priv.settings.columns[col] && priv.settings.columns[col].title) {\n result = priv.settings.columns[col].title;\n\n } else if (Array.isArray(priv.settings.colHeaders) && priv.settings.colHeaders[col] !== void 0) {\n result = priv.settings.colHeaders[col];\n\n } else if (isFunction(priv.settings.colHeaders)) {\n result = priv.settings.colHeaders(col);\n\n } else if (priv.settings.colHeaders && typeof priv.settings.colHeaders !== 'string' && typeof priv.settings.colHeaders !== 'number') {\n result = spreadsheetColumnLabel(baseCol); // see #1458\n\n }\n }\n\n return result;\n };\n\n /**\n * Return column width from settings (no guessing). Private use intended.\n *\n * @private\n * @memberof Core#\n * @function _getColWidthFromSettings\n * @param {Number} col\n * @returns {Number}\n */\n this._getColWidthFromSettings = function(col) {\n var cellProperties = instance.getCellMeta(0, col);\n var width = cellProperties.width;\n\n if (width === void 0 || width === priv.settings.width) {\n width = cellProperties.colWidths;\n }\n if (width !== void 0 && width !== null) {\n switch (typeof width) {\n case 'object': // array\n width = width[col];\n break;\n\n case 'function':\n width = width(col);\n break;\n default:\n break;\n }\n if (typeof width === 'string') {\n width = parseInt(width, 10);\n }\n }\n\n return width;\n };\n\n /**\n * Returns the width of the requested column.\n *\n * @memberof Core#\n * @function getColWidth\n * @since 0.11\n * @param {Number} col Column index.\n * @returns {Number} Column width.\n * @fires Hooks#modifyColWidth\n */\n this.getColWidth = function(col) {\n let width = instance._getColWidthFromSettings(col);\n\n width = instance.runHooks('modifyColWidth', width, col);\n\n if (width === void 0) {\n width = ViewportColumnsCalculator.DEFAULT_WIDTH;\n }\n\n return width;\n };\n\n /**\n * Return row height from settings (no guessing). Private use intended.\n *\n * @private\n * @memberof Core#\n * @function _getRowHeightFromSettings\n * @param {Number} row\n * @returns {Number}\n */\n this._getRowHeightFromSettings = function(row) {\n // let cellProperties = instance.getCellMeta(row, 0);\n // let height = cellProperties.height;\n //\n // if (height === void 0 || height === priv.settings.height) {\n // height = cellProperties.rowHeights;\n // }\n var height = priv.settings.rowHeights;\n\n if (height !== void 0 && height !== null) {\n switch (typeof height) {\n case 'object': // array\n height = height[row];\n break;\n\n case 'function':\n height = height(row);\n break;\n default:\n break;\n }\n if (typeof height === 'string') {\n height = parseInt(height, 10);\n }\n }\n\n return height;\n };\n\n /**\n * Returns the row height.\n *\n * @memberof Core#\n * @function getRowHeight\n * @since 0.11\n * @param {Number} row Row index.\n * @returns {Number} The given row's height.\n * @fires Hooks#modifyRowHeight\n */\n this.getRowHeight = function(row) {\n var height = instance._getRowHeightFromSettings(row);\n\n height = instance.runHooks('modifyRowHeight', height, row);\n\n return height;\n };\n\n /**\n * Returns the total number of rows in the data source.\n *\n * @memberof Core#\n * @function countSourceRows\n * @since 0.20.0\n * @returns {Number} Total number in rows in data source.\n */\n this.countSourceRows = function() {\n let sourceLength = instance.runHooks('modifySourceLength');\n return sourceLength || (instance.getSourceData() ? instance.getSourceData().length : 0);\n };\n\n /**\n * Returns the total number of columns in the data source.\n *\n * @memberof Core#\n * @function countSourceCols\n * @since 0.26.1\n * @returns {Number} Total number in columns in data source.\n */\n this.countSourceCols = function() {\n let len = 0;\n let obj = instance.getSourceData() && instance.getSourceData()[0] ? instance.getSourceData()[0] : [];\n\n if (isObject(obj)) {\n len = deepObjectSize(obj);\n\n } else {\n len = obj.length || 0;\n }\n\n return len;\n };\n\n /**\n * Returns the total number of rows in the grid.\n *\n * @memberof Core#\n * @function countRows\n * @returns {Number} Total number in rows the grid.\n */\n this.countRows = function() {\n return datamap.getLength();\n };\n\n /**\n * Returns the total number of columns in the grid.\n *\n * @memberof Core#\n * @function countCols\n * @returns {Number} Total number of columns.\n */\n this.countCols = function() {\n let dataHasLength = false;\n let dataLen = 0;\n\n if (instance.dataType === 'array') {\n dataHasLength = priv.settings.data && priv.settings.data[0] && priv.settings.data[0].length;\n }\n\n if (dataHasLength) {\n dataLen = priv.settings.data[0].length;\n }\n\n if (priv.settings.columns) {\n let columnsIsFunction = isFunction(priv.settings.columns);\n\n if (columnsIsFunction) {\n if (instance.dataType === 'array') {\n let columnLen = 0;\n\n for (let i = 0; i < dataLen; i++) {\n if (priv.settings.columns(i)) {\n columnLen++;\n }\n }\n\n dataLen = columnLen;\n } else if (instance.dataType === 'object' || instance.dataType === 'function') {\n dataLen = datamap.colToPropCache.length;\n }\n\n } else {\n dataLen = priv.settings.columns.length;\n }\n\n } else if (instance.dataType === 'object' || instance.dataType === 'function') {\n dataLen = datamap.colToPropCache.length;\n }\n\n return dataLen;\n };\n\n /**\n * Returns an index of the first rendered row.\n *\n * @memberof Core#\n * @function rowOffset\n * @returns {Number} Index of first rendered row.\n */\n this.rowOffset = function() {\n return instance.view.wt.wtTable.getFirstRenderedRow();\n };\n\n /**\n * Returns the index of the first rendered column.\n *\n * @memberof Core#\n * @function colOffset\n * @returns {Number} Index of the first visible column.\n */\n this.colOffset = function() {\n return instance.view.wt.wtTable.getFirstRenderedColumn();\n };\n\n /**\n * Returns the number of rendered rows (including rows partially or fully rendered outside viewport).\n *\n * @memberof Core#\n * @function countRenderedRows\n * @returns {Number} Returns -1 if table is not visible.\n */\n this.countRenderedRows = function() {\n return instance.view.wt.drawn ? instance.view.wt.wtTable.getRenderedRowsCount() : -1;\n };\n\n /**\n * Returns the number of visible rows (rendered rows that fully fit inside viewport).\n *\n * @memberof Core#\n * @function countVisibleRows\n * @returns {Number} Number of visible rows or -1.\n */\n this.countVisibleRows = function() {\n return instance.view.wt.drawn ? instance.view.wt.wtTable.getVisibleRowsCount() : -1;\n };\n\n /**\n * Returns the number of rendered columns (including columns partially or fully rendered outside viewport).\n *\n * @memberof Core#\n * @function countRenderedCols\n * @returns {Number} Returns -1 if table is not visible.\n */\n this.countRenderedCols = function() {\n return instance.view.wt.drawn ? instance.view.wt.wtTable.getRenderedColumnsCount() : -1;\n };\n\n /**\n * Returns the number of visible columns. Returns -1 if table is not visible\n *\n * @memberof Core#\n * @function countVisibleCols\n * @return {Number} Number of visible columns or -1.\n */\n this.countVisibleCols = function() {\n return instance.view.wt.drawn ? instance.view.wt.wtTable.getVisibleColumnsCount() : -1;\n };\n\n /**\n * Returns the number of empty rows. If the optional ending parameter is `true`, returns the\n * number of empty rows at the bottom of the table.\n *\n * @memberof Core#\n * @function countEmptyRows\n * @param {Boolean} [ending] If `true`, will only count empty rows at the end of the data source.\n * @returns {Number} Count empty rows\n * @fires Hooks#modifyRow\n */\n this.countEmptyRows = function(ending) {\n var i = instance.countRows() - 1,\n empty = 0,\n row;\n\n while (i >= 0) {\n row = instance.runHooks('modifyRow', i);\n\n if (instance.isEmptyRow(row)) {\n empty++;\n\n } else if (ending) {\n break;\n }\n i--;\n }\n\n return empty;\n };\n\n /**\n * Returns the number of empty columns. If the optional ending parameter is `true`, returns the number of empty\n * columns at right hand edge of the table.\n *\n * @memberof Core#\n * @function countEmptyCols\n * @param {Boolean} [ending] If `true`, will only count empty columns at the end of the data source row.\n * @returns {Number} Count empty cols\n */\n this.countEmptyCols = function(ending) {\n if (instance.countRows() < 1) {\n return 0;\n }\n var i = instance.countCols() - 1,\n empty = 0;\n\n while (i >= 0) {\n if (instance.isEmptyCol(i)) {\n empty++;\n } else if (ending) {\n break;\n }\n i--;\n }\n\n return empty;\n };\n\n /**\n * Check if all cells in the row declared by the `row` argument are empty.\n *\n * @memberof Core#\n * @function isEmptyRow\n * @param {Number} row Row index.\n * @returns {Boolean} `true` if the row at the given `row` is empty, `false` otherwise.\n */\n this.isEmptyRow = function(row) {\n return priv.settings.isEmptyRow.call(instance, row);\n };\n\n /**\n * Check if all cells in the the column declared by the `col` argument are empty.\n *\n * @memberof Core#\n * @function isEmptyCol\n * @param {Number} col Column index.\n * @returns {Boolean} `true` if the column at the given `col` is empty, `false` otherwise.\n */\n this.isEmptyCol = function(col) {\n return priv.settings.isEmptyCol.call(instance, col);\n };\n\n /**\n * Select cell specified by `row` and `col` values or a range of cells finishing at `endRow`, `endCol`.\n * By default, viewport will be scrolled to selection.\n * After the `selectCell` method had finished, the instance will be listening to keyboard input on the document.\n *\n * @memberof Core#\n * @function selectCell\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @param {Number} [endRow] End row index (if selecting a range).\n * @param {Number} [endCol] End column index (if selecting a range).\n * @param {Boolean} [scrollToCell=true] If `true`, the viewport will be scrolled to the selection.\n * @param {Boolean} [changeListener=true] If `false`, Handsontable will not change keyboard events listener to himself.\n * @returns {Boolean} `true` if selection was successful, `false` otherwise.\n */\n this.selectCell = function(row, col, endRow, endCol, scrollToCell, changeListener) {\n var coords;\n\n changeListener = isUndefined(changeListener) || changeListener === true;\n\n if (typeof row !== 'number' || row < 0 || row >= instance.countRows()) {\n return false;\n }\n if (typeof col !== 'number' || col < 0 || col >= instance.countCols()) {\n return false;\n }\n if (isDefined(endRow)) {\n if (typeof endRow !== 'number' || endRow < 0 || endRow >= instance.countRows()) {\n return false;\n }\n if (typeof endCol !== 'number' || endCol < 0 || endCol >= instance.countCols()) {\n return false;\n }\n }\n coords = new CellCoords(row, col);\n priv.selRange = new CellRange(coords, coords, coords);\n\n if (changeListener) {\n instance.listen();\n }\n\n if (isUndefined(endRow)) {\n selection.setRangeEnd(priv.selRange.from, scrollToCell);\n\n } else {\n selection.setRangeEnd(new CellCoords(endRow, endCol), scrollToCell);\n }\n instance.selection.finish();\n\n return true;\n };\n\n /**\n * Select the cell specified by the `row` and `prop` arguments, or a range finishing at `endRow`, `endProp`.\n * By default, viewport will be scrolled to selection.\n *\n * @memberof Core#\n * @function selectCellByProp\n * @param {Number} row Row index.\n * @param {String} prop Property name.\n * @param {Number} [endRow] End row index (if selecting a range).\n * @param {String} [endProp] End property name (if selecting a range).\n * @param {Boolean} [scrollToCell=true] If `true`, viewport will be scrolled to the selection.\n * @returns {Boolean} `true` if selection was successful, `false` otherwise.\n */\n this.selectCellByProp = function(row, prop, endRow, endProp, scrollToCell) {\n arguments[1] = datamap.propToCol(arguments[1]);\n\n if (isDefined(arguments[3])) {\n arguments[3] = datamap.propToCol(arguments[3]);\n }\n\n return instance.selectCell(...arguments);\n };\n\n /**\n * Deselects the current cell selection on grid.\n *\n * @memberof Core#\n * @function deselectCell\n */\n this.deselectCell = function() {\n selection.deselect();\n };\n\n /**\n * Scroll viewport to coords specified by the `row` and `column` arguments.\n *\n * @since 0.24.3\n * @memberof Core#\n * @function scrollViewportTo\n * @param {Number} [row] Row index.\n * @param {Number} [column] Column index.\n * @param {Boolean} [snapToBottom = false] If `true`, viewport is scrolled to show the cell on the bottom of the table.\n * @param {Boolean} [snapToRight = false] If `true`, viewport is scrolled to show the cell on the right side of the table.\n * @returns {Boolean} `true` if scroll was successful, `false` otherwise.\n */\n this.scrollViewportTo = function(row, column, snapToBottom = false, snapToRight = false) {\n if (row !== void 0 && (row < 0 || row >= instance.countRows())) {\n return false;\n }\n if (column !== void 0 && (column < 0 || column >= instance.countCols())) {\n return false;\n }\n\n let result = false;\n\n if (row !== void 0 && column !== void 0) {\n instance.view.wt.wtOverlays.topOverlay.scrollTo(row, snapToBottom);\n instance.view.wt.wtOverlays.leftOverlay.scrollTo(column, snapToRight);\n\n result = true;\n }\n if (typeof row === 'number' && typeof column !== 'number') {\n instance.view.wt.wtOverlays.topOverlay.scrollTo(row, snapToBottom);\n\n result = true;\n }\n if (typeof column === 'number' && typeof row !== 'number') {\n instance.view.wt.wtOverlays.leftOverlay.scrollTo(column, snapToRight);\n\n result = true;\n }\n\n return result;\n };\n\n /**\n * Removes grid from the DOM.\n *\n * @memberof Core#\n * @function destroy\n * @fires Hooks#afterDestroy\n */\n this.destroy = function() {\n\n instance._clearTimeouts();\n if (instance.view) { // in case HT is destroyed before initialization has finished\n instance.view.destroy();\n }\n if (dataSource) {\n dataSource.destroy();\n }\n dataSource = null;\n\n empty(instance.rootElement);\n eventManager.destroy();\n\n instance.runHooks('afterDestroy');\n Hooks.getSingleton().destroy(instance);\n\n for (var i in instance) {\n if (hasOwnProperty(instance, i)) {\n // replace instance methods with post mortem\n if (isFunction(instance[i])) {\n instance[i] = postMortem;\n\n } else if (i !== 'guid') {\n // replace instance properties with null (restores memory)\n // it should not be necessary but this prevents a memory leak side effects that show itself in Jasmine tests\n instance[i] = null;\n }\n }\n }\n\n // replace private properties with null (restores memory)\n // it should not be necessary but this prevents a memory leak side effects that show itself in Jasmine tests\n if (datamap) {\n datamap.destroy();\n }\n datamap = null;\n priv = null;\n grid = null;\n selection = null;\n editorManager = null;\n instance = null;\n GridSettings = null;\n };\n\n /**\n * Replacement for all methods after Handsotnable was destroyed.\n *\n * @private\n */\n function postMortem() {\n throw new Error('This method cannot be called because this Handsontable instance has been destroyed');\n }\n\n /**\n * Returns the active editor object.\n *\n * @memberof Core#\n * @function getActiveEditor\n * @returns {Object} The active editor object.\n */\n this.getActiveEditor = function() {\n return editorManager.getActiveEditor();\n };\n\n /**\n * Returns plugin instance using the plugin name provided.\n *\n * @memberof Core#\n * @function getPlugin\n * @param {String} pluginName The plugin name.\n * @returns {*} The plugin instance.\n * @since 0.15.0\n */\n this.getPlugin = function(pluginName) {\n return getPlugin(this, pluginName);\n };\n\n /**\n * Returns the Handsontable instance.\n *\n * @memberof Core#\n * @function getInstance\n * @returns {Handsontable} The Handsontable instance.\n */\n this.getInstance = function() {\n return instance;\n };\n\n /**\n * Adds listener to the specified hook name (only for this Handsontable instance).\n *\n * @memberof Core#\n * @function addHook\n * @see Hooks#add\n * @param {String} key Hook name.\n * @param {Function|Array} callback Function or array of Functions.\n *\n * @example\n * ```js\n * hot.addHook('beforeInit', myCallback);\n * ```\n */\n this.addHook = function(key, callback) {\n Hooks.getSingleton().add(key, callback, instance);\n };\n\n /**\n * Check if for a specified hook name there are added listeners (only for this Handsontable instance).\n *\n * @memberof Core#\n * @function hasHook\n * @see Hooks#has\n * @param {String} key Hook name\n * @return {Boolean}\n *\n * @example\n * ```js\n * var hasBeforeInitListeners = hot.hasHook('beforeInit');\n * ```\n */\n this.hasHook = function(key) {\n return Hooks.getSingleton().has(key, instance);\n };\n\n /**\n * Adds listener to specified hook name (only for this Handsontable instance).\n * After the listener is triggered, it will be automatically removed.\n *\n * @memberof Core#\n * @function addHookOnce\n * @see Hooks#once\n * @param {String} key Hook name.\n * @param {Function|Array} callback Function or array of Functions.\n *\n * @example\n * ```js\n * hot.addHookOnce('beforeInit', myCallback);\n * ```\n */\n this.addHookOnce = function(key, callback) {\n Hooks.getSingleton().once(key, callback, instance);\n };\n\n /**\n * Removes the hook listener previously registered with {@link Core#addHook}.\n *\n * @memberof Core#\n * @function removeHook\n * @see Hooks#remove\n * @param {String} key Hook name.\n * @param {Function} callback Function which have been registered via {@link Core#addHook}.\n *\n * @example\n * ```js\n * hot.removeHook('beforeInit', myCallback);\n * ```\n */\n this.removeHook = function(key, callback) {\n Hooks.getSingleton().remove(key, callback, instance);\n };\n\n /**\n * Run the callbacks for the hook provided in the `key` argument using the parameters given in the other arguments.\n *\n * @memberof Core#\n * @function runHooks\n * @see Hooks#run\n * @param {String} key Hook name.\n * @param {*} [p1] Argument passed to the callback.\n * @param {*} [p2] Argument passed to the callback.\n * @param {*} [p3] Argument passed to the callback.\n * @param {*} [p4] Argument passed to the callback.\n * @param {*} [p5] Argument passed to the callback.\n * @param {*} [p6] Argument passed to the callback.\n * @returns {*}\n *\n * @example\n * ```js\n * hot.runHooks('beforeInit');\n * ```\n */\n this.runHooks = function(key, p1, p2, p3, p4, p5, p6) {\n return Hooks.getSingleton().run(instance, key, p1, p2, p3, p4, p5, p6);\n };\n\n this.timeouts = [];\n\n /**\n * Sets timeout. Purpose of this method is to clear all known timeouts when `destroy` method is called.\n *\n * @param {*} handle\n * @private\n */\n this._registerTimeout = function(handle) {\n this.timeouts.push(handle);\n };\n\n /**\n * Clears all known timeouts.\n *\n * @private\n */\n this._clearTimeouts = function() {\n for (var i = 0, ilen = this.timeouts.length; i < ilen; i++) {\n clearTimeout(this.timeouts[i]);\n }\n };\n\n /**\n * Handsontable version\n *\n * @type {String}\n */\n // this.version = Handsontable.version;\n\n Hooks.getSingleton().run(instance, 'construct');\n};\n\n\n\n// WEBPACK FOOTER //\n// src/core.js","/* eslint-disable import/prefer-default-export */\n\n/**\n * Get normalized Date object for the ISO formatted date strings.\n * Natively, the date object parsed from a ISO 8601 string will be offsetted by the timezone difference, which may result in returning a wrong date.\n * See: Github issue #3338.\n *\n * @param {String} dateString String representing the date.\n * @returns {Date} The proper Date object.\n */\nexport function getNormalizedDate(dateString) {\n let nativeDate = new Date(dateString);\n\n // NaN if dateString is not in ISO format\n if (!isNaN(new Date(`${dateString}T00:00`).getDate())) {\n\n // Compensate timezone offset\n return new Date(nativeDate.getTime() + (nativeDate.getTimezoneOffset() * 60000));\n }\n\n return nativeDate;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/helpers/date.js","import {inherit} from './object';\n/* eslint-disable import/prefer-default-export */\n/**\n * Factory for columns constructors.\n *\n * @param {Object} GridSettings\n * @param {Array} conflictList\n * @return {Object} ColumnSettings\n */\nexport function columnFactory(GridSettings, conflictList) {\n function ColumnSettings() {};\n\n inherit(ColumnSettings, GridSettings);\n\n // Clear conflict settings\n for (let i = 0, len = conflictList.length; i < len; i++) {\n ColumnSettings.prototype[conflictList[i]] = void 0;\n }\n\n return ColumnSettings;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/helpers/setting.js","import {arrayEach} from './../helpers/array';\nimport {defineGetter} from './../helpers/object';\n\nconst MIXIN_NAME = 'localHooks';\n\n/**\n * Mixin object to extend objects functionality for local hooks.\n *\n * @type {Object}\n */\nconst localHooks = {\n /**\n * Internal hooks storage.\n */\n _localHooks: Object.create(null),\n\n /**\n * Add hook to the collection.\n *\n * @param {String} key Hook name.\n * @param {Function} callback Hook callback\n */\n addLocalHook(key, callback) {\n if (!this._localHooks[key]) {\n this._localHooks[key] = [];\n }\n this._localHooks[key].push(callback);\n },\n\n /**\n * Run hooks.\n *\n * @param {String} key Hook name.\n * @param {*} params\n */\n runLocalHooks(key, ...params) {\n if (this._localHooks[key]) {\n arrayEach(this._localHooks[key], (callback) => callback.apply(this, params));\n }\n },\n\n /**\n * Clear all added hooks.\n */\n clearLocalHooks() {\n this._localHooks = {};\n },\n};\n\ndefineGetter(localHooks, 'MIXIN_NAME', MIXIN_NAME, {\n writable: false,\n enumerable: false,\n});\n\nexport default localHooks;\n\n\n\n// WEBPACK FOOTER //\n// src/mixins/localHooks.js","export const KEY = '---------';\n\nexport default function separatorItem() {\n return {\n name: KEY\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/predefinedItems/separator.js","import {addClass, outerHeight, outerWidth} from './../helpers/dom/element';\nimport {arrayEach} from './../helpers/array';\n\n/**\n * @class GhostTable\n * @util\n */\nclass GhostTable {\n constructor(hotInstance) {\n /**\n * Handsontable instance.\n *\n * @type {Core}\n */\n this.hot = hotInstance;\n /**\n * Container element where every table will be injected.\n *\n * @type {HTMLElement|null}\n */\n this.container = null;\n /**\n * Flag which determine is table was injected to DOM.\n *\n * @type {Boolean}\n */\n this.injected = false;\n /**\n * Added rows collection.\n *\n * @type {Array}\n */\n this.rows = [];\n /**\n * Added columns collection.\n *\n * @type {Array}\n */\n this.columns = [];\n /**\n * Samples prepared for calculations.\n *\n * @type {Map}\n * @default {null}\n */\n this.samples = null;\n /**\n * Ghost table settings.\n *\n * @type {Object}\n * @default {Object}\n */\n this.settings = {\n useHeaders: true\n };\n }\n\n /**\n * Add row.\n *\n * @param {Number} row Row index.\n * @param {Map} samples Samples Map object.\n */\n addRow(row, samples) {\n if (this.columns.length) {\n throw new Error('Doesn\\'t support multi-dimensional table');\n }\n if (!this.rows.length) {\n this.container = this.createContainer(this.hot.rootElement.className);\n }\n const rowObject = {row};\n this.rows.push(rowObject);\n\n this.samples = samples;\n this.table = this.createTable(this.hot.table.className);\n this.table.colGroup.appendChild(this.createColGroupsCol());\n this.table.tr.appendChild(this.createRow(row));\n this.container.container.appendChild(this.table.fragment);\n\n rowObject.table = this.table.table;\n }\n\n /**\n * Add a row consisting of the column headers.\n */\n addColumnHeadersRow(samples) {\n if (this.hot.getColHeader(0) != null) {\n const rowObject = {row: -1};\n this.rows.push(rowObject);\n\n this.container = this.createContainer(this.hot.rootElement.className);\n\n this.samples = samples;\n this.table = this.createTable(this.hot.table.className);\n this.table.colGroup.appendChild(this.createColGroupsCol());\n this.table.tHead.appendChild(this.createColumnHeadersRow());\n this.container.container.appendChild(this.table.fragment);\n\n rowObject.table = this.table.table;\n }\n }\n\n /**\n * Add column.\n *\n * @param {Number} column Column index.\n * @param {Map} samples Samples Map object.\n */\n addColumn(column, samples) {\n if (this.rows.length) {\n throw new Error('Doesn\\'t support multi-dimensional table');\n }\n if (!this.columns.length) {\n this.container = this.createContainer(this.hot.rootElement.className);\n }\n const columnObject = {col: column};\n this.columns.push(columnObject);\n\n this.samples = samples;\n this.table = this.createTable(this.hot.table.className);\n\n if (this.getSetting('useHeaders') && this.hot.getColHeader(column) !== null) {\n this.hot.view.appendColHeader(column, this.table.th);\n }\n this.table.tBody.appendChild(this.createCol(column));\n this.container.container.appendChild(this.table.fragment);\n\n columnObject.table = this.table.table;\n }\n\n /**\n * Get calculated heights.\n *\n * @param {Function} callback Callback which will be fired for each calculated row.\n */\n getHeights(callback) {\n if (!this.injected) {\n this.injectTable();\n }\n arrayEach(this.rows, (row) => {\n // -1 <- reduce border-top from table\n callback(row.row, outerHeight(row.table) - 1);\n });\n }\n\n /**\n * Get calculated widths.\n *\n * @param {Function} callback Callback which will be fired for each calculated column.\n */\n getWidths(callback) {\n if (!this.injected) {\n this.injectTable();\n }\n arrayEach(this.columns, (column) => {\n callback(column.col, outerWidth(column.table));\n });\n }\n\n /**\n * Set the Ghost Table settings to the provided object.\n *\n * @param {Object} settings New Ghost Table Settings\n */\n setSettings(settings) {\n this.settings = settings;\n }\n\n /**\n * Set a single setting of the Ghost Table.\n *\n * @param {String} name Setting name.\n * @param {*} value Setting value.\n */\n setSetting(name, value) {\n if (!this.settings) {\n this.settings = {};\n }\n\n this.settings[name] = value;\n }\n\n /**\n * Get the Ghost Table settings.\n *\n * @returns {Object|null}\n */\n getSettings() {\n return this.settings;\n }\n\n /**\n * Get a single Ghost Table setting.\n *\n * @param {String} name\n * @returns {Boolean|null}\n */\n getSetting(name) {\n if (this.settings) {\n return this.settings[name];\n }\n return null;\n\n }\n\n /**\n * Create colgroup col elements.\n *\n * @returns {DocumentFragment}\n */\n createColGroupsCol() {\n const d = document;\n const fragment = d.createDocumentFragment();\n\n if (this.hot.hasRowHeaders()) {\n fragment.appendChild(this.createColElement(-1));\n }\n\n this.samples.forEach((sample) => {\n arrayEach(sample.strings, (string) => {\n fragment.appendChild(this.createColElement(string.col));\n });\n });\n\n return fragment;\n }\n\n /**\n * Create table row element.\n *\n * @param {Number} row Row index.\n * @returns {DocumentFragment} Returns created table row elements.\n */\n createRow(row) {\n const d = document;\n const fragment = d.createDocumentFragment();\n const th = d.createElement('th');\n\n if (this.hot.hasRowHeaders()) {\n this.hot.view.appendRowHeader(row, th);\n\n fragment.appendChild(th);\n }\n\n this.samples.forEach((sample) => {\n arrayEach(sample.strings, (string) => {\n let column = string.col;\n let cellProperties = this.hot.getCellMeta(row, column);\n\n cellProperties.col = column;\n cellProperties.row = row;\n\n let renderer = this.hot.getCellRenderer(cellProperties);\n const td = d.createElement('td');\n\n renderer(this.hot, td, row, column, this.hot.colToProp(column), string.value, cellProperties);\n fragment.appendChild(td);\n });\n });\n\n return fragment;\n }\n\n createColumnHeadersRow() {\n const d = document;\n const fragment = d.createDocumentFragment();\n\n if (this.hot.hasRowHeaders()) {\n const th = d.createElement('th');\n this.hot.view.appendColHeader(-1, th);\n fragment.appendChild(th);\n }\n\n this.samples.forEach((sample) => {\n arrayEach(sample.strings, (string) => {\n let column = string.col;\n\n const th = d.createElement('th');\n\n this.hot.view.appendColHeader(column, th);\n fragment.appendChild(th);\n });\n });\n\n return fragment;\n }\n\n /**\n * Create table column elements.\n *\n * @param {Number} column Column index.\n * @returns {DocumentFragment} Returns created column table column elements.\n */\n createCol(column) {\n const d = document;\n const fragment = d.createDocumentFragment();\n\n this.samples.forEach((sample) => {\n arrayEach(sample.strings, (string) => {\n let row = string.row;\n let cellProperties = this.hot.getCellMeta(row, column);\n\n cellProperties.col = column;\n cellProperties.row = row;\n\n let renderer = this.hot.getCellRenderer(cellProperties);\n const td = d.createElement('td');\n const tr = d.createElement('tr');\n\n renderer(this.hot, td, row, column, this.hot.colToProp(column), string.value, cellProperties);\n tr.appendChild(td);\n fragment.appendChild(tr);\n });\n });\n\n return fragment;\n }\n\n /**\n * Remove table from document and reset internal state.\n */\n clean() {\n this.rows.length = 0;\n this.rows[-1] = void 0;\n this.columns.length = 0;\n\n if (this.samples) {\n this.samples.clear();\n }\n this.samples = null;\n this.removeTable();\n }\n\n /**\n * Inject generated table into document.\n *\n * @param {HTMLElement} [parent=null]\n */\n injectTable(parent = null) {\n if (!this.injected) {\n (parent || this.hot.rootElement).appendChild(this.container.fragment);\n this.injected = true;\n }\n }\n\n /**\n * Remove table from document.\n */\n removeTable() {\n if (this.injected && this.container.container.parentNode) {\n this.container.container.parentNode.removeChild(this.container.container);\n this.container = null;\n this.injected = false;\n }\n }\n\n /**\n * Create col element.\n *\n * @param {Number} column Column index.\n * @returns {HTMLElement}\n */\n createColElement(column) {\n const d = document;\n const col = d.createElement('col');\n\n col.style.width = `${this.hot.view.wt.wtTable.getStretchedColumnWidth(column)}px`;\n\n return col;\n }\n\n /**\n * Create table element.\n *\n * @param {String} className\n * @returns {Object}\n */\n createTable(className = '') {\n const d = document;\n const fragment = d.createDocumentFragment();\n const table = d.createElement('table');\n const tHead = d.createElement('thead');\n const tBody = d.createElement('tbody');\n const colGroup = d.createElement('colgroup');\n const tr = d.createElement('tr');\n const th = d.createElement('th');\n\n if (this.isVertical()) {\n table.appendChild(colGroup);\n }\n if (this.isHorizontal()) {\n tr.appendChild(th);\n tHead.appendChild(tr);\n table.style.tableLayout = 'auto';\n table.style.width = 'auto';\n }\n table.appendChild(tHead);\n\n if (this.isVertical()) {\n tBody.appendChild(tr);\n }\n table.appendChild(tBody);\n addClass(table, className);\n fragment.appendChild(table);\n\n return {fragment, table, tHead, tBody, colGroup, tr, th};\n }\n\n /**\n * Create container for tables.\n *\n * @param {String} className\n * @returns {Object}\n */\n createContainer(className = '') {\n const d = document;\n const fragment = d.createDocumentFragment();\n const container = d.createElement('div');\n\n className = `htGhostTable htAutoSize ${className.trim()}`;\n addClass(container, className);\n fragment.appendChild(container);\n\n return {fragment, container};\n }\n\n /**\n * Checks if table is raised vertically (checking rows).\n *\n * @returns {Boolean}\n */\n isVertical() {\n return !!(this.rows.length && !this.columns.length);\n }\n\n /**\n * Checks if table is raised horizontally (checking columns).\n *\n * @returns {Boolean}\n */\n isHorizontal() {\n return !!(this.columns.length && !this.rows.length);\n }\n}\n\nexport default GhostTable;\n\n\n\n// WEBPACK FOOTER //\n// src/utils/ghostTable.js","import Core from './../core';\nimport {isObject} from './../helpers/object';\n\n/**\n * @class RecordTranslator\n * @util\n */\nclass RecordTranslator {\n constructor(hot) {\n this.hot = hot;\n }\n\n /**\n * Translate physical row index into visual.\n *\n * @param {Number} row Physical row index.\n * @returns {Number} Returns visual row index.\n */\n toVisualRow(row) {\n return this.hot.runHooks('unmodifyRow', row);\n }\n\n /**\n * Translate physical column index into visual.\n *\n * @param {Number} column Physical column index.\n * @returns {Number} Returns visual column index.\n */\n toVisualColumn(column) {\n return this.hot.runHooks('unmodifyCol', column);\n }\n\n /**\n * Translate physical coordinates into visual. Can be passed as separate 2 arguments (row, column) or as an object in first\n * argument with `row` and `column` keys.\n *\n * @param {Number|Object} row Physical coordinates or row index.\n * @param {Number} [column] Physical column index.\n * @returns {Object|Array} Returns an object with visual records or an array if coordinates passed as separate arguments.\n */\n toVisual(row, column) {\n let result;\n\n if (isObject(row)) {\n result = {\n row: this.toVisualRow(row.row),\n column: this.toVisualColumn(row.column),\n };\n } else {\n result = [this.toVisualRow(row), this.toVisualColumn(column)];\n }\n\n return result;\n }\n\n /**\n * Translate visual row index into physical.\n *\n * @param {Number} row Visual row index.\n * @returns {Number} Returns physical row index.\n */\n toPhysicalRow(row) {\n return this.hot.runHooks('modifyRow', row);\n }\n\n /**\n * Translate visual column index into physical.\n *\n * @param {Number} column Visual column index.\n * @returns {Number} Returns physical column index.\n */\n toPhysicalColumn(column) {\n return this.hot.runHooks('modifyCol', column);\n }\n\n /**\n * Translate visual coordinates into physical. Can be passed as separate 2 arguments (row, column) or as an object in first\n * argument with `row` and `column` keys.\n *\n * @param {Number|Object} row Visual coordinates or row index.\n * @param {Number} [column] Visual column index.\n * @returns {Object|Array} Returns an object with physical records or an array if coordinates passed as separate arguments.\n */\n toPhysical(row, column) {\n let result;\n\n if (isObject(row)) {\n result = {\n row: this.toPhysicalRow(row.row),\n column: this.toPhysicalColumn(row.column),\n };\n } else {\n result = [this.toPhysicalRow(row), this.toPhysicalColumn(column)];\n }\n\n return result;\n }\n}\n\nexport {RecordTranslator};\n\nconst identities = new WeakMap();\nconst translatorSingletons = new WeakMap();\n\nexport function registerIdentity(identity, hot) {\n identities.set(identity, hot);\n}\n\nexport function getTranslator(identity) {\n let singleton;\n\n if (!(identity instanceof Core)) {\n if (!identities.has(identity)) {\n throw Error('Record translator was not registered for this object identity');\n }\n identity = identities.get(identity);\n }\n if (translatorSingletons.has(identity)) {\n singleton = translatorSingletons.get(identity);\n\n } else {\n singleton = new RecordTranslator(identity);\n translatorSingletons.set(identity, singleton);\n }\n\n return singleton;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/utils/recordTranslator.js","import {isObject} from './../helpers/object';\nimport {rangeEach} from './../helpers/number';\nimport {stringify} from './../helpers/mixed';\n\n/**\n * @class SamplesGenerator\n * @util\n */\nclass SamplesGenerator {\n /**\n * Number of samples to take of each value length.\n *\n * @type {Number}\n */\n static get SAMPLE_COUNT() {\n return 3;\n }\n\n constructor(dataFactory) {\n /**\n * Samples prepared for calculations.\n *\n * @type {Map}\n * @default {null}\n */\n this.samples = null;\n /**\n * Function which give the data to collect samples.\n *\n * @type {Function}\n */\n this.dataFactory = dataFactory;\n /**\n * Custom number of samples to take of each value length.\n *\n * @type {Number}\n * @default {null}\n */\n this.customSampleCount = null;\n /**\n * `true` if duplicate samples collection should be allowed, `false` otherwise.\n *\n * @type {Boolean}\n * @default {false}\n */\n this.allowDuplicates = false;\n }\n\n /**\n * Get the sample count for this instance.\n *\n * @returns {Number}\n */\n getSampleCount() {\n if (this.customSampleCount) {\n return this.customSampleCount;\n }\n return SamplesGenerator.SAMPLE_COUNT;\n };\n\n /**\n * Set the sample count.\n *\n * @param {Number} sampleCount Number of samples to be collected.\n */\n setSampleCount(sampleCount) {\n this.customSampleCount = sampleCount;\n }\n\n /**\n * Set if the generator should accept duplicate values.\n *\n * @param {Boolean} allowDuplicates `true` to allow duplicate values.\n */\n setAllowDuplicates(allowDuplicates) {\n this.allowDuplicates = allowDuplicates;\n }\n\n /**\n * Generate samples for row. You can control which area should be sampled by passing `rowRange` object and `colRange` object.\n *\n * @param {Object|Number} rowRange\n * @param {Object} colRange\n * @returns {Object}\n */\n generateRowSamples(rowRange, colRange) {\n return this.generateSamples('row', colRange, rowRange);\n }\n\n /**\n * Generate samples for column. You can control which area should be sampled by passing `colRange` object and `rowRange` object.\n *\n * @param {Object} colRange Column index.\n * @param {Object} rowRange Column index.\n * @returns {Object}\n */\n generateColumnSamples(colRange, rowRange) {\n return this.generateSamples('col', rowRange, colRange);\n }\n\n /**\n * Generate collection of samples.\n *\n * @param {String} type Type to generate. Can be `col` or `row`.\n * @param {Object} range\n * @param {Object|Number} specifierRange\n * @returns {Map}\n */\n generateSamples(type, range, specifierRange) {\n const samples = new Map();\n\n if (typeof specifierRange === 'number') {\n specifierRange = {from: specifierRange, to: specifierRange};\n }\n rangeEach(specifierRange.from, specifierRange.to, (index) => {\n const sample = this.generateSample(type, range, index);\n\n samples.set(index, sample);\n });\n\n return samples;\n }\n\n /**\n * Generate sample for specified type (`row` or `col`).\n *\n * @param {String} type Samples type `row` or `col`.\n * @param {Object} range\n * @param {Number} specifierValue\n * @returns {Map}\n */\n generateSample(type, range, specifierValue) {\n const samples = new Map();\n let sampledValues = [];\n let length;\n\n rangeEach(range.from, range.to, (index) => {\n let value;\n\n if (type === 'row') {\n value = this.dataFactory(specifierValue, index);\n\n } else if (type === 'col') {\n value = this.dataFactory(index, specifierValue);\n\n } else {\n throw new Error('Unsupported sample type');\n }\n\n if (isObject(value)) {\n length = Object.keys(value).length;\n\n } else if (Array.isArray(value)) {\n length = value.length;\n\n } else {\n length = stringify(value).length;\n }\n\n if (!samples.has(length)) {\n samples.set(length, {\n needed: this.getSampleCount(),\n strings: [],\n });\n }\n let sample = samples.get(length);\n\n if (sample.needed) {\n let duplicate = sampledValues.indexOf(value) > -1;\n\n if (!duplicate || this.allowDuplicates) {\n let computedKey = type === 'row' ? 'col' : 'row';\n\n sample.strings.push({value, [computedKey]: index});\n sampledValues.push(value);\n sample.needed--;\n }\n }\n });\n\n return samples;\n }\n}\n\nexport default SamplesGenerator;\n\n\n\n// WEBPACK FOOTER //\n// src/utils/samplesGenerator.js","module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_a-function.js\n// module id = 72\n// module chunks = 0","'use strict';\nvar $defineProperty = require('./_object-dp')\n , createDesc = require('./_property-desc');\n\nmodule.exports = function(object, index, value){\n if(index in object)$defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_create-property.js\n// module id = 73\n// module chunks = 0","var isObject = require('./_is-object')\n , document = require('./_global').document\n // in old IE typeof document.createElement is 'object'\n , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n return is ? document.createElement(it) : {};\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_dom-create.js\n// module id = 74\n// module chunks = 0","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_enum-bug-keys.js\n// module id = 75\n// module chunks = 0","var MATCH = require('./_wks')('match');\nmodule.exports = function(KEY){\n var re = /./;\n try {\n '/./'[KEY](re);\n } catch(e){\n try {\n re[MATCH] = false;\n return !'/./'[KEY](re);\n } catch(f){ /* empty */ }\n } return true;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_fails-is-regexp.js\n// module id = 76\n// module chunks = 0","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_iobject.js\n// module id = 77\n// module chunks = 0","var ITERATOR = require('./_wks')('iterator')\n , SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function(){ SAFE_CLOSING = true; };\n Array.from(riter, function(){ throw 2; });\n} catch(e){ /* empty */ }\n\nmodule.exports = function(exec, skipClosing){\n if(!skipClosing && !SAFE_CLOSING)return false;\n var safe = false;\n try {\n var arr = [7]\n , iter = arr[ITERATOR]();\n iter.next = function(){ return {done: safe = true}; };\n arr[ITERATOR] = function(){ return iter; };\n exec(arr);\n } catch(e){ /* empty */ }\n return safe;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_iter-detect.js\n// module id = 78\n// module chunks = 0","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object')\n , dPs = require('./_object-dps')\n , enumBugKeys = require('./_enum-bug-keys')\n , IE_PROTO = require('./_shared-key')('IE_PROTO')\n , Empty = function(){ /* empty */ }\n , PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function(){\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe')\n , i = enumBugKeys.length\n , lt = '<'\n , gt = '>'\n , iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties){\n var result;\n if(O !== null){\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty;\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-create.js\n// module id = 79\n// module chunks = 0","var pIE = require('./_object-pie')\n , createDesc = require('./_property-desc')\n , toIObject = require('./_to-iobject')\n , toPrimitive = require('./_to-primitive')\n , has = require('./_has')\n , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n , gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P){\n O = toIObject(O);\n P = toPrimitive(P, true);\n if(IE8_DOM_DEFINE)try {\n return gOPD(O, P);\n } catch(e){ /* empty */ }\n if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-gopd.js\n// module id = 80\n// module chunks = 0","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal')\n , hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){\n return $keys(O, hiddenKeys);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-gopn.js\n// module id = 81\n// module chunks = 0","var shared = require('./_shared')('keys')\n , uid = require('./_uid');\nmodule.exports = function(key){\n return shared[key] || (shared[key] = uid(key));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_shared-key.js\n// module id = 82\n// module chunks = 0","var global = require('./_global')\n , SHARED = '__core-js_shared__'\n , store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function(key){\n return store[key] || (store[key] = {});\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_shared.js\n// module id = 83\n// module chunks = 0","// helper for String#{startsWith, endsWith, includes}\nvar isRegExp = require('./_is-regexp')\n , defined = require('./_defined');\n\nmodule.exports = function(that, searchString, NAME){\n if(isRegExp(searchString))throw TypeError('String#' + NAME + \" doesn't accept regex!\");\n return String(defined(that));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_string-context.js\n// module id = 84\n// module chunks = 0","var ctx = require('./_ctx')\n , invoke = require('./_invoke')\n , html = require('./_html')\n , cel = require('./_dom-create')\n , global = require('./_global')\n , process = global.process\n , setTask = global.setImmediate\n , clearTask = global.clearImmediate\n , MessageChannel = global.MessageChannel\n , counter = 0\n , queue = {}\n , ONREADYSTATECHANGE = 'onreadystatechange'\n , defer, channel, port;\nvar run = function(){\n var id = +this;\n if(queue.hasOwnProperty(id)){\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function(event){\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif(!setTask || !clearTask){\n setTask = function setImmediate(fn){\n var args = [], i = 1;\n while(arguments.length > i)args.push(arguments[i++]);\n queue[++counter] = function(){\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id){\n delete queue[id];\n };\n // Node.js 0.8-\n if(require('./_cof')(process) == 'process'){\n defer = function(id){\n process.nextTick(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if(MessageChannel){\n channel = new MessageChannel;\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){\n defer = function(id){\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if(ONREADYSTATECHANGE in cel('script')){\n defer = function(id){\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function(id){\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_task.js\n// module id = 85\n// module chunks = 0","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function(it, S){\n if(!isObject(it))return it;\n var fn, val;\n if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;\n if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_to-primitive.js\n// module id = 86\n// module chunks = 0","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables')\n , step = require('./_iter-step')\n , Iterators = require('./_iterators')\n , toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function(iterated, kind){\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , kind = this._k\n , index = this._i++;\n if(!O || index >= O.length){\n this._t = undefined;\n return step(1);\n }\n if(kind == 'keys' )return step(0, index);\n if(kind == 'values')return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.array.iterator.js\n// module id = 87\n// module chunks = 0","/*!\n * numbro.js\n * version : 1.10.1\n * author : Företagsplatsen AB\n * license : MIT\n * http://www.foretagsplatsen.se\n */\n\n(function () {\n 'use strict';\n\n /************************************\n Constants\n ************************************/\n\n var numbro,\n VERSION = '1.10.1',\n binarySuffixes = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'],\n decimalSuffixes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],\n bytes = {\n general: { scale: 1024, suffixes: decimalSuffixes, marker: 'bd' },\n binary: { scale: 1024, suffixes: binarySuffixes, marker: 'b' },\n decimal: { scale: 1000, suffixes: decimalSuffixes, marker: 'd' }\n },\n // general must be before the others because it reuses their characters!\n byteFormatOrder = [ bytes.general, bytes.binary, bytes.decimal ],\n // internal storage for culture config files\n cultures = {},\n // Todo: Remove in 2.0.0\n languages = cultures,\n currentCulture = 'en-US',\n zeroFormat = null,\n defaultFormat = '0,0',\n defaultCurrencyFormat = '0$',\n // check for nodeJS\n hasModule = (typeof module !== 'undefined' && module.exports),\n // default culture\n enUS = {\n delimiters: {\n thousands: ',',\n decimal: '.'\n },\n abbreviations: {\n thousand: 'k',\n million: 'm',\n billion: 'b',\n trillion: 't'\n },\n ordinal: function(number) {\n var b = number % 10;\n return (~~(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n },\n currency: {\n symbol: '$',\n position: 'prefix'\n },\n defaults: {\n currencyFormat: ',0000 a'\n },\n formats: {\n fourDigits: '0000 a',\n fullWithTwoDecimals: '$ ,0.00',\n fullWithTwoDecimalsNoCurrency: ',0.00'\n }\n };\n\n /************************************\n Constructors\n ************************************/\n\n\n // Numbro prototype object\n function Numbro(number) {\n this._value = number;\n }\n\n function numberLength(number) {\n if (number === 0) { return 1; }\n return Math.floor(Math.log(Math.abs(number)) / Math.LN10) + 1;\n }\n\n function zeroes(count) {\n var i, ret = '';\n\n for (i = 0; i < count; i++) {\n ret += '0';\n }\n\n return ret;\n }\n /**\n * Implementation of toFixed() for numbers with exponents\n * This function may return negative representations for zero values e.g. \"-0.0\"\n */\n function toFixedLargeSmall(value, precision) {\n var mantissa,\n beforeDec,\n afterDec,\n exponent,\n prefix,\n endStr,\n zerosStr,\n str;\n\n str = value.toString();\n\n mantissa = str.split('e')[0];\n exponent = str.split('e')[1];\n\n beforeDec = mantissa.split('.')[0];\n afterDec = mantissa.split('.')[1] || '';\n\n if (+exponent > 0) {\n // exponent is positive - add zeros after the numbers\n str = beforeDec + afterDec + zeroes(exponent - afterDec.length);\n } else {\n // exponent is negative\n\n if (+beforeDec < 0) {\n prefix = '-0';\n } else {\n prefix = '0';\n }\n\n // tack on the decimal point if needed\n if (precision > 0) {\n prefix += '.';\n }\n\n zerosStr = zeroes((-1 * exponent) - 1);\n // substring off the end to satisfy the precision\n endStr = (zerosStr + Math.abs(beforeDec) + afterDec).substr(0, precision);\n str = prefix + endStr;\n }\n\n // only add percision 0's if the exponent is positive\n if (+exponent > 0 && precision > 0) {\n str += '.' + zeroes(precision);\n }\n\n return str;\n }\n\n /**\n * Implementation of toFixed() that treats floats more like decimals\n *\n * Fixes binary rounding issues (eg. (0.615).toFixed(2) === '0.61') that present\n * problems for accounting- and finance-related software.\n *\n * Also removes negative signs for zero-formatted numbers. e.g. -0.01 w/ precision 1 -> 0.0\n */\n function toFixed(value, precision, roundingFunction, optionals) {\n var power = Math.pow(10, precision),\n optionalsRegExp,\n output;\n\n if (value.toString().indexOf('e') > -1) {\n // toFixed returns scientific notation for numbers above 1e21 and below 1e-7\n output = toFixedLargeSmall(value, precision);\n // remove the leading negative sign if it exists and should not be present (e.g. -0.00)\n if (output.charAt(0) === '-' && +output >= 0) {\n output = output.substr(1); // chop off the '-'\n }\n }\n else {\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value + 'e+' + precision) / power).toFixed(precision);\n }\n\n if (optionals) {\n optionalsRegExp = new RegExp('0{1,' + optionals + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }\n\n /************************************\n Formatting\n ************************************/\n\n // determine what type of formatting we need to do\n function formatNumbro(n, format, roundingFunction) {\n var output,\n escapedFormat = format.replace(/\\{[^\\{\\}]*\\}/g, '');\n\n // figure out what kind of format we are dealing with\n if (escapedFormat.indexOf('$') > -1) { // currency!!!!!\n output = formatCurrency(n, cultures[currentCulture].currency.symbol, format, roundingFunction);\n } else if (escapedFormat.indexOf('%') > -1) { // percentage\n output = formatPercentage(n, format, roundingFunction);\n } else if (escapedFormat.indexOf(':') > -1) { // time\n output = formatTime(n, format);\n } else { // plain ol' numbers or bytes\n output = formatNumber(n._value, format, roundingFunction);\n }\n\n // return string\n return output;\n }\n\n // revert to number\n function unformatNumbro(n, string) {\n var stringOriginal = string,\n thousandRegExp,\n millionRegExp,\n billionRegExp,\n trillionRegExp,\n bytesMultiplier = false,\n power;\n\n if (string.indexOf(':') > -1) {\n n._value = unformatTime(string);\n } else {\n if (string === zeroFormat) {\n n._value = 0;\n } else {\n if (cultures[currentCulture].delimiters.decimal !== '.') {\n string = string.replace(/\\./g, '').replace(cultures[currentCulture].delimiters.decimal, '.');\n }\n\n // see if abbreviations are there so that we can multiply to the correct number\n thousandRegExp = new RegExp('[^a-zA-Z]' + cultures[currentCulture].abbreviations.thousand +\n '(?:\\\\)|(\\\\' + cultures[currentCulture].currency.symbol + ')?(?:\\\\))?)?$');\n millionRegExp = new RegExp('[^a-zA-Z]' + cultures[currentCulture].abbreviations.million +\n '(?:\\\\)|(\\\\' + cultures[currentCulture].currency.symbol + ')?(?:\\\\))?)?$');\n billionRegExp = new RegExp('[^a-zA-Z]' + cultures[currentCulture].abbreviations.billion +\n '(?:\\\\)|(\\\\' + cultures[currentCulture].currency.symbol + ')?(?:\\\\))?)?$');\n trillionRegExp = new RegExp('[^a-zA-Z]' + cultures[currentCulture].abbreviations.trillion +\n '(?:\\\\)|(\\\\' + cultures[currentCulture].currency.symbol + ')?(?:\\\\))?)?$');\n\n // see if bytes are there so that we can multiply to the correct number\n for (power = 1; power < binarySuffixes.length && !bytesMultiplier; ++power) {\n if (string.indexOf(binarySuffixes[power]) > -1) {\n bytesMultiplier = Math.pow(1024, power);\n } else if (string.indexOf(decimalSuffixes[power]) > -1) {\n bytesMultiplier = Math.pow(1000, power);\n }\n }\n\n var str = string.replace(/[^0-9\\.]+/g, '');\n if (str === '') {\n // An empty string is not a number.\n n._value = NaN;\n\n } else {\n // do some math to create our number\n n._value = ((bytesMultiplier) ? bytesMultiplier : 1) *\n ((stringOriginal.match(thousandRegExp)) ? Math.pow(10, 3) : 1) *\n ((stringOriginal.match(millionRegExp)) ? Math.pow(10, 6) : 1) *\n ((stringOriginal.match(billionRegExp)) ? Math.pow(10, 9) : 1) *\n ((stringOriginal.match(trillionRegExp)) ? Math.pow(10, 12) : 1) *\n ((string.indexOf('%') > -1) ? 0.01 : 1) *\n (((string.split('-').length +\n Math.min(string.split('(').length - 1, string.split(')').length - 1)) % 2) ? 1 : -1) *\n Number(str);\n\n // round if we are talking about bytes\n n._value = (bytesMultiplier) ? Math.ceil(n._value) : n._value;\n }\n }\n }\n return n._value;\n }\n\n function formatCurrency(n, currencySymbol, originalFormat, roundingFunction) {\n var format = originalFormat,\n symbolIndex = format.indexOf('$'),\n openParenIndex = format.indexOf('('),\n plusSignIndex = format.indexOf('+'),\n minusSignIndex = format.indexOf('-'),\n space = '',\n decimalSeparator = '',\n spliceIndex,\n output;\n\n if(format.indexOf('$') === -1){\n // Use defaults instead of the format provided\n if (cultures[currentCulture].currency.position === 'infix') {\n decimalSeparator = currencySymbol;\n if (cultures[currentCulture].currency.spaceSeparated) {\n decimalSeparator = ' ' + decimalSeparator + ' ';\n }\n } else if (cultures[currentCulture].currency.spaceSeparated) {\n space = ' ';\n }\n } else {\n // check for space before or after currency\n if (format.indexOf(' $') > -1) {\n space = ' ';\n format = format.replace(' $', '');\n } else if (format.indexOf('$ ') > -1) {\n space = ' ';\n format = format.replace('$ ', '');\n } else {\n format = format.replace('$', '');\n }\n }\n\n // Format The Number\n output = formatNumber(n._value, format, roundingFunction, decimalSeparator);\n\n if (originalFormat.indexOf('$') === -1) {\n // Use defaults instead of the format provided\n switch (cultures[currentCulture].currency.position) {\n case 'postfix':\n if (output.indexOf(')') > -1) {\n output = output.split('');\n output.splice(-1, 0, space + currencySymbol);\n output = output.join('');\n } else {\n output = output + space + currencySymbol;\n }\n break;\n case 'infix':\n break;\n case 'prefix':\n if (output.indexOf('(') > -1 || output.indexOf('-') > -1) {\n output = output.split('');\n spliceIndex = Math.max(openParenIndex, minusSignIndex) + 1;\n\n output.splice(spliceIndex, 0, currencySymbol + space);\n output = output.join('');\n } else {\n output = currencySymbol + space + output;\n }\n break;\n default:\n throw Error('Currency position should be among [\"prefix\", \"infix\", \"postfix\"]');\n }\n } else {\n // position the symbol\n if (symbolIndex <= 1) {\n if (output.indexOf('(') > -1 || output.indexOf('+') > -1 || output.indexOf('-') > -1) {\n output = output.split('');\n spliceIndex = 1;\n if (symbolIndex < openParenIndex || symbolIndex < plusSignIndex || symbolIndex < minusSignIndex) {\n // the symbol appears before the \"(\", \"+\" or \"-\"\n spliceIndex = 0;\n }\n output.splice(spliceIndex, 0, currencySymbol + space);\n output = output.join('');\n } else {\n output = currencySymbol + space + output;\n }\n } else {\n if (output.indexOf(')') > -1) {\n output = output.split('');\n output.splice(-1, 0, space + currencySymbol);\n output = output.join('');\n } else {\n output = output + space + currencySymbol;\n }\n }\n }\n\n return output;\n }\n\n function formatForeignCurrency(n, foreignCurrencySymbol, originalFormat, roundingFunction) {\n return formatCurrency(n, foreignCurrencySymbol, originalFormat, roundingFunction);\n }\n\n function formatPercentage(n, format, roundingFunction) {\n var space = '',\n output,\n value = n._value * 100;\n\n // check for space before %\n if (format.indexOf(' %') > -1) {\n space = ' ';\n format = format.replace(' %', '');\n } else {\n format = format.replace('%', '');\n }\n\n output = formatNumber(value, format, roundingFunction);\n\n if (output.indexOf(')') > -1) {\n output = output.split('');\n output.splice(-1, 0, space + '%');\n output = output.join('');\n } else {\n output = output + space + '%';\n }\n\n return output;\n }\n\n function formatTime(n) {\n var hours = Math.floor(n._value / 60 / 60),\n minutes = Math.floor((n._value - (hours * 60 * 60)) / 60),\n seconds = Math.round(n._value - (hours * 60 * 60) - (minutes * 60));\n return hours + ':' +\n ((minutes < 10) ? '0' + minutes : minutes) + ':' +\n ((seconds < 10) ? '0' + seconds : seconds);\n }\n\n function unformatTime(string) {\n var timeArray = string.split(':'),\n seconds = 0;\n // turn hours and minutes into seconds and add them all up\n if (timeArray.length === 3) {\n // hours\n seconds = seconds + (Number(timeArray[0]) * 60 * 60);\n // minutes\n seconds = seconds + (Number(timeArray[1]) * 60);\n // seconds\n seconds = seconds + Number(timeArray[2]);\n } else if (timeArray.length === 2) {\n // minutes\n seconds = seconds + (Number(timeArray[0]) * 60);\n // seconds\n seconds = seconds + Number(timeArray[1]);\n }\n return Number(seconds);\n }\n\n function formatByteUnits (value, suffixes, scale) {\n var suffix = suffixes[0],\n power,\n min,\n max,\n abs = Math.abs(value);\n\n if (abs >= scale) {\n for (power = 1; power < suffixes.length; ++power) {\n min = Math.pow(scale, power);\n max = Math.pow(scale, power + 1);\n\n if (abs >= min && abs < max) {\n suffix = suffixes[power];\n value = value / min;\n break;\n }\n }\n\n // values greater than or equal to [scale] YB never set the suffix\n if (suffix === suffixes[0]) {\n value = value / Math.pow(scale, suffixes.length - 1);\n suffix = suffixes[suffixes.length - 1];\n }\n }\n\n return { value: value, suffix: suffix };\n }\n\n function formatNumber (value, format, roundingFunction, sep) {\n var negP = false,\n signed = false,\n optDec = false,\n abbr = '',\n abbrK = false, // force abbreviation to thousands\n abbrM = false, // force abbreviation to millions\n abbrB = false, // force abbreviation to billions\n abbrT = false, // force abbreviation to trillions\n abbrForce = false, // force abbreviation\n bytes = '',\n byteFormat,\n units,\n ord = '',\n abs = Math.abs(value),\n totalLength,\n length,\n minimumPrecision,\n pow,\n w,\n intPrecision,\n precision,\n prefix,\n postfix,\n thousands,\n d = '',\n forcedNeg = false,\n neg = false,\n indexOpenP,\n indexMinus,\n paren = '',\n minlen,\n i;\n\n // check if number is zero and a custom zero format has been set\n if (value === 0 && zeroFormat !== null) {\n return zeroFormat;\n }\n\n if (!isFinite(value)) {\n return '' + value;\n }\n\n if (format.indexOf('{') === 0) {\n var end = format.indexOf('}');\n if (end === -1) {\n throw Error('Format should also contain a \"}\"');\n }\n prefix = format.slice(1, end);\n format = format.slice(end + 1);\n } else {\n prefix = '';\n }\n\n if (format.indexOf('}') === format.length - 1 && format.length) {\n var start = format.indexOf('{');\n if (start === -1) {\n throw Error('Format should also contain a \"{\"');\n }\n postfix = format.slice(start + 1, -1);\n format = format.slice(0, start + 1);\n } else {\n postfix = '';\n }\n\n // check for min length\n var info;\n if (format.indexOf('.') === -1) {\n info = format.match(/([0-9]+).*/);\n } else {\n info = format.match(/([0-9]+)\\..*/);\n }\n minlen = info === null ? -1 : info[1].length;\n\n // see if we should use parentheses for negative number or if we should prefix with a sign\n // if both are present we default to parentheses\n if (format.indexOf('-') !== -1) {\n forcedNeg = true;\n }\n if (format.indexOf('(') > -1) {\n negP = true;\n format = format.slice(1, -1);\n } else if (format.indexOf('+') > -1) {\n signed = true;\n format = format.replace(/\\+/g, '');\n }\n\n // see if abbreviation is wanted\n if (format.indexOf('a') > -1) {\n intPrecision = format.split('.')[0].match(/[0-9]+/g) || ['0'];\n intPrecision = parseInt(intPrecision[0], 10);\n\n // check if abbreviation is specified\n abbrK = format.indexOf('aK') >= 0;\n abbrM = format.indexOf('aM') >= 0;\n abbrB = format.indexOf('aB') >= 0;\n abbrT = format.indexOf('aT') >= 0;\n abbrForce = abbrK || abbrM || abbrB || abbrT;\n\n // check for space before abbreviation\n if (format.indexOf(' a') > -1) {\n abbr = ' ';\n format = format.replace(' a', '');\n } else {\n format = format.replace('a', '');\n }\n\n totalLength = numberLength(value);\n minimumPrecision = totalLength % 3;\n minimumPrecision = minimumPrecision === 0 ? 3 : minimumPrecision;\n\n if (intPrecision && abs !== 0) {\n pow = 3 * ~~((Math.min(intPrecision, totalLength) - minimumPrecision) / 3);\n abs = abs / Math.pow(10, pow);\n }\n\n if (totalLength !== intPrecision) {\n if (abs >= Math.pow(10, 12) && !abbrForce || abbrT) {\n // trillion\n abbr = abbr + cultures[currentCulture].abbreviations.trillion;\n value = value / Math.pow(10, 12);\n } else if (abs < Math.pow(10, 12) && abs >= Math.pow(10, 9) && !abbrForce || abbrB) {\n // billion\n abbr = abbr + cultures[currentCulture].abbreviations.billion;\n value = value / Math.pow(10, 9);\n } else if (abs < Math.pow(10, 9) && abs >= Math.pow(10, 6) && !abbrForce || abbrM) {\n // million\n abbr = abbr + cultures[currentCulture].abbreviations.million;\n value = value / Math.pow(10, 6);\n } else if (abs < Math.pow(10, 6) && abs >= Math.pow(10, 3) && !abbrForce || abbrK) {\n // thousand\n abbr = abbr + cultures[currentCulture].abbreviations.thousand;\n value = value / Math.pow(10, 3);\n }\n }\n\n length = numberLength(value);\n if (intPrecision && length < intPrecision && format.indexOf('.') === -1) {\n format += '[.]';\n format += zeroes(intPrecision - length);\n }\n }\n\n // see if we are formatting\n // binary-decimal bytes (1024 MB), binary bytes (1024 MiB), or decimal bytes (1000 MB)\n for (i = 0; i < byteFormatOrder.length; ++i) {\n byteFormat = byteFormatOrder[i];\n\n if (format.indexOf(byteFormat.marker) > -1) {\n // check for space before\n if (format.indexOf(' ' + byteFormat.marker) >-1) {\n bytes = ' ';\n }\n\n // remove the marker (with the space if it had one)\n format = format.replace(bytes + byteFormat.marker, '');\n\n units = formatByteUnits(value, byteFormat.suffixes, byteFormat.scale);\n\n value = units.value;\n bytes = bytes + units.suffix;\n\n break;\n }\n }\n\n // see if ordinal is wanted\n if (format.indexOf('o') > -1) {\n // check for space before\n if (format.indexOf(' o') > -1) {\n ord = ' ';\n format = format.replace(' o', '');\n } else {\n format = format.replace('o', '');\n }\n\n if (cultures[currentCulture].ordinal) {\n ord = ord + cultures[currentCulture].ordinal(value);\n }\n }\n\n if (format.indexOf('[.]') > -1) {\n optDec = true;\n format = format.replace('[.]', '.');\n }\n\n precision = format.split('.')[1];\n thousands = format.indexOf(',');\n\n if (precision) {\n var dSplit = [];\n\n if (precision.indexOf('*') !== -1) {\n d = value.toString();\n dSplit = d.split('.');\n if (dSplit.length > 1) {\n d = toFixed(value, dSplit[1].length, roundingFunction);\n }\n } else {\n if (precision.indexOf('[') > -1) {\n precision = precision.replace(']', '');\n precision = precision.split('[');\n d = toFixed(value, (precision[0].length + precision[1].length), roundingFunction,\n precision[1].length);\n } else {\n d = toFixed(value, precision.length, roundingFunction);\n }\n }\n\n dSplit = d.split('.');\n w = dSplit[0];\n\n if (dSplit.length > 1 && dSplit[1].length) {\n var p = sep ? abbr + sep : cultures[currentCulture].delimiters.decimal;\n d = p + dSplit[1];\n } else {\n d = '';\n }\n\n if (optDec && Number(d.slice(1)) === 0) {\n d = '';\n }\n } else {\n w = toFixed(value, 0, roundingFunction);\n }\n\n // format number\n if (w.indexOf('-') > -1) {\n w = w.slice(1);\n neg = true;\n }\n\n if (w.length < minlen) {\n w = zeroes(minlen - w.length) + w;\n }\n\n if (thousands > -1) {\n w = w.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, '$1' +\n cultures[currentCulture].delimiters.thousands);\n }\n\n if (format.indexOf('.') === 0) {\n w = '';\n }\n\n indexOpenP = format.indexOf('(');\n indexMinus = format.indexOf('-');\n\n if (indexOpenP < indexMinus) {\n paren = ((negP && neg) ? '(' : '') + (((forcedNeg && neg) || (!negP && neg)) ? '-' : '');\n } else {\n paren = (((forcedNeg && neg) || (!negP && neg)) ? '-' : '') + ((negP && neg) ? '(' : '');\n }\n\n return prefix +\n paren + ((!neg && signed && value !== 0) ? '+' : '') +\n w + d +\n ((ord) ? ord : '') +\n ((abbr && !sep) ? abbr : '') +\n ((bytes) ? bytes : '') +\n ((negP && neg) ? ')' : '') +\n postfix;\n }\n\n /************************************\n Top Level Functions\n ************************************/\n\n numbro = function(input) {\n if (numbro.isNumbro(input)) {\n input = input.value();\n } else if (typeof input === 'string' || typeof input === 'number') {\n input = numbro.fn.unformat(input);\n } else {\n input = NaN;\n }\n\n return new Numbro(Number(input));\n };\n\n // version number\n numbro.version = VERSION;\n\n // compare numbro object\n numbro.isNumbro = function(obj) {\n return obj instanceof Numbro;\n };\n\n /**\n * This function allow the user to set a new language with a fallback if\n * the language does not exist. If no fallback language is provided,\n * it fallbacks to english.\n *\n * @deprecated Since in version 1.6.0. It will be deleted in version 2.0\n * `setCulture` should be used instead.\n */\n numbro.setLanguage = function(newLanguage, fallbackLanguage) {\n console.warn('`setLanguage` is deprecated since version 1.6.0. Use `setCulture` instead');\n var key = newLanguage,\n prefix = newLanguage.split('-')[0],\n matchingLanguage = null;\n if (!languages[key]) {\n Object.keys(languages).forEach(function(language) {\n if (!matchingLanguage && language.split('-')[0] === prefix) {\n matchingLanguage = language;\n }\n });\n key = matchingLanguage || fallbackLanguage || 'en-US';\n }\n chooseCulture(key);\n };\n\n /**\n * This function allow the user to set a new culture with a fallback if\n * the culture does not exist. If no fallback culture is provided,\n * it falls back to \"en-US\".\n */\n numbro.setCulture = function(newCulture, fallbackCulture) {\n var key = newCulture,\n suffix = newCulture.split('-')[1],\n matchingCulture = null;\n if (!cultures[key]) {\n if (suffix) {\n Object.keys(cultures).forEach(function(language) {\n if (!matchingCulture && language.split('-')[1] === suffix) {\n matchingCulture = language;\n }\n });\n }\n\n key = matchingCulture || fallbackCulture || 'en-US';\n }\n chooseCulture(key);\n };\n\n /**\n * This function will load languages and then set the global language. If\n * no arguments are passed in, it will simply return the current global\n * language key.\n *\n * @deprecated Since in version 1.6.0. It will be deleted in version 2.0\n * `culture` should be used instead.\n */\n numbro.language = function(key, values) {\n console.warn('`language` is deprecated since version 1.6.0. Use `culture` instead');\n\n if (!key) {\n return currentCulture;\n }\n\n if (key && !values) {\n if (!languages[key]) {\n throw new Error('Unknown language : ' + key);\n }\n chooseCulture(key);\n }\n\n if (values || !languages[key]) {\n setCulture(key, values);\n }\n\n return numbro;\n };\n\n /**\n * This function will load cultures and then set the global culture. If\n * no arguments are passed in, it will simply return the current global\n * culture code.\n */\n numbro.culture = function(code, values) {\n if (!code) {\n return currentCulture;\n }\n\n if (code && !values) {\n if (!cultures[code]) {\n throw new Error('Unknown culture : ' + code);\n }\n chooseCulture(code);\n }\n\n if (values || !cultures[code]) {\n setCulture(code, values);\n }\n\n return numbro;\n };\n\n /**\n * This function provides access to the loaded language data. If\n * no arguments are passed in, it will simply return the current\n * global language object.\n *\n * @deprecated Since in version 1.6.0. It will be deleted in version 2.0\n * `culture` should be used instead.\n */\n numbro.languageData = function(key) {\n console.warn('`languageData` is deprecated since version 1.6.0. Use `cultureData` instead');\n\n if (!key) {\n return languages[currentCulture];\n }\n\n if (!languages[key]) {\n throw new Error('Unknown language : ' + key);\n }\n\n return languages[key];\n };\n\n /**\n * This function provides access to the loaded culture data. If\n * no arguments are passed in, it will simply return the current\n * global culture object.\n */\n numbro.cultureData = function(code) {\n if (!code) {\n return cultures[currentCulture];\n }\n\n if (!cultures[code]) {\n throw new Error('Unknown culture : ' + code);\n }\n\n return cultures[code];\n };\n\n numbro.culture('en-US', enUS);\n\n /**\n * @deprecated Since in version 1.6.0. It will be deleted in version 2.0\n * `cultures` should be used instead.\n */\n numbro.languages = function() {\n console.warn('`languages` is deprecated since version 1.6.0. Use `cultures` instead');\n\n return languages;\n };\n\n numbro.cultures = function() {\n return cultures;\n };\n\n numbro.zeroFormat = function(format) {\n zeroFormat = typeof(format) === 'string' ? format : null;\n };\n\n numbro.defaultFormat = function(format) {\n defaultFormat = typeof(format) === 'string' ? format : '0.0';\n };\n\n numbro.defaultCurrencyFormat = function (format) {\n defaultCurrencyFormat = typeof(format) === 'string' ? format : '0$';\n };\n\n numbro.validate = function(val, culture) {\n\n var _decimalSep,\n _thousandSep,\n _currSymbol,\n _valArray,\n _abbrObj,\n _thousandRegEx,\n cultureData,\n temp;\n\n //coerce val to string\n if (typeof val !== 'string') {\n val += '';\n if (console.warn) {\n console.warn('Numbro.js: Value is not string. It has been co-erced to: ', val);\n }\n }\n\n //trim whitespaces from either sides\n val = val.trim();\n\n //replace the initial '+' or '-' sign if present\n val = val.replace(/^[+-]?/, '');\n\n //if val is just digits return true\n if ( !! val.match(/^\\d+$/)) {\n return true;\n }\n\n //if val is empty return false\n if (val === '') {\n return false;\n }\n\n //get the decimal and thousands separator from numbro.cultureData\n try {\n //check if the culture is understood by numbro. if not, default it to current culture\n cultureData = numbro.cultureData(culture);\n } catch (e) {\n cultureData = numbro.cultureData(numbro.culture());\n }\n\n //setup the delimiters and currency symbol based on culture\n _currSymbol = cultureData.currency.symbol;\n _abbrObj = cultureData.abbreviations;\n _decimalSep = cultureData.delimiters.decimal;\n if (cultureData.delimiters.thousands === '.') {\n _thousandSep = '\\\\.';\n } else {\n _thousandSep = cultureData.delimiters.thousands;\n }\n\n // validating currency symbol\n temp = val.match(/^[^\\d\\.\\,]+/);\n if (temp !== null) {\n val = val.substr(1);\n if (temp[0] !== _currSymbol) {\n return false;\n }\n }\n\n //validating abbreviation symbol\n temp = val.match(/[^\\d]+$/);\n if (temp !== null) {\n val = val.slice(0, -1);\n if (temp[0] !== _abbrObj.thousand && temp[0] !== _abbrObj.million &&\n temp[0] !== _abbrObj.billion && temp[0] !== _abbrObj.trillion) {\n return false;\n }\n }\n\n _thousandRegEx = new RegExp(_thousandSep + '{2}');\n\n if (!val.match(/[^\\d.,]/g)) {\n _valArray = val.split(_decimalSep);\n if (_valArray.length > 2) {\n return false;\n } else {\n if (_valArray.length < 2) {\n return ( !! _valArray[0].match(/^\\d+.*\\d$/) && !_valArray[0].match(_thousandRegEx));\n } else {\n if (_valArray[0] === '') {\n // for values without leading zero eg. .984\n return (!_valArray[0].match(_thousandRegEx) &&\n !!_valArray[1].match(/^\\d+$/));\n\n } else if (_valArray[0].length === 1) {\n return ( !! _valArray[0].match(/^\\d+$/) &&\n !_valArray[0].match(_thousandRegEx) &&\n !! _valArray[1].match(/^\\d+$/));\n } else {\n return ( !! _valArray[0].match(/^\\d+.*\\d$/) &&\n !_valArray[0].match(_thousandRegEx) &&\n !! _valArray[1].match(/^\\d+$/));\n }\n }\n }\n }\n\n return false;\n };\n\n /**\n * * @deprecated Since in version 1.6.0. It will be deleted in version 2.0\n * `loadCulturesInNode` should be used instead.\n */\n numbro.loadLanguagesInNode = function() {\n console.warn('`loadLanguagesInNode` is deprecated since version 1.6.0. Use `loadCulturesInNode` instead');\n\n numbro.loadCulturesInNode();\n };\n\n numbro.loadCulturesInNode = function() {\n // TODO: Rename the folder in 2.0.0\n var cultures = require('./languages');\n\n for(var langLocaleCode in cultures) {\n if(langLocaleCode) {\n numbro.culture(langLocaleCode, cultures[langLocaleCode]);\n }\n }\n };\n\n /************************************\n Helpers\n ************************************/\n\n function setCulture(code, values) {\n cultures[code] = values;\n }\n\n function chooseCulture(code) {\n currentCulture = code;\n var defaults = cultures[code].defaults;\n if (defaults && defaults.format) {\n numbro.defaultFormat(defaults.format);\n }\n if (defaults && defaults.currencyFormat) {\n numbro.defaultCurrencyFormat(defaults.currencyFormat);\n }\n }\n\n function inNodejsRuntime() {\n return (typeof process !== 'undefined') &&\n (process.browser === undefined) &&\n process.title &&\n (\n process.title.indexOf('node') !== -1 ||\n process.title.indexOf('meteor-tool') > 0 ||\n process.title === 'grunt' ||\n process.title === 'gulp'\n ) &&\n (typeof require !== 'undefined');\n }\n\n /************************************\n Floating-point helpers\n ************************************/\n\n // The floating-point helper functions and implementation\n // borrows heavily from sinful.js: http://guipn.github.io/sinful.js/\n\n /**\n * Array.prototype.reduce for browsers that don't support it\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce#Compatibility\n */\n if ('function' !== typeof Array.prototype.reduce) {\n Array.prototype.reduce = function(callback, optInitialValue) {\n\n if (null === this || 'undefined' === typeof this) {\n // At the moment all modern browsers, that support strict mode, have\n // native implementation of Array.prototype.reduce. For instance, IE8\n // does not support strict mode, so this check is actually useless.\n throw new TypeError('Array.prototype.reduce called on null or undefined');\n }\n\n if ('function' !== typeof callback) {\n throw new TypeError(callback + ' is not a function');\n }\n\n var index,\n value,\n length = this.length >>> 0,\n isValueSet = false;\n\n if (1 < arguments.length) {\n value = optInitialValue;\n isValueSet = true;\n }\n\n for (index = 0; length > index; ++index) {\n if (this.hasOwnProperty(index)) {\n if (isValueSet) {\n value = callback(value, this[index], index, this);\n } else {\n value = this[index];\n isValueSet = true;\n }\n }\n }\n\n if (!isValueSet) {\n throw new TypeError('Reduce of empty array with no initial value');\n }\n\n return value;\n };\n }\n\n\n /**\n * Computes the multiplier necessary to make x >= 1,\n * effectively eliminating miscalculations caused by\n * finite precision.\n */\n function multiplier(x) {\n var parts = x.toString().split('.');\n if (parts.length < 2) {\n return 1;\n }\n return Math.pow(10, parts[1].length);\n }\n\n /**\n * Given a variable number of arguments, returns the maximum\n * multiplier that must be used to normalize an operation involving\n * all of them.\n */\n function correctionFactor() {\n var args = Array.prototype.slice.call(arguments);\n return args.reduce(function(prev, next) {\n var mp = multiplier(prev),\n mn = multiplier(next);\n return mp > mn ? mp : mn;\n }, -Infinity);\n }\n\n /************************************\n Numbro Prototype\n ************************************/\n\n\n numbro.fn = Numbro.prototype = {\n\n clone: function() {\n return numbro(this);\n },\n\n format: function(inputString, roundingFunction) {\n return formatNumbro(this,\n inputString ? inputString : defaultFormat,\n (roundingFunction !== undefined) ? roundingFunction : Math.round\n );\n },\n\n formatCurrency: function(inputString, roundingFunction) {\n return formatCurrency(this,\n cultures[currentCulture].currency.symbol,\n inputString ? inputString : defaultCurrencyFormat,\n (roundingFunction !== undefined) ? roundingFunction : Math.round\n );\n },\n\n formatForeignCurrency: function(currencySymbol, inputString, roundingFunction) {\n return formatForeignCurrency(this,\n currencySymbol,\n inputString ? inputString : defaultCurrencyFormat,\n (roundingFunction !== undefined) ? roundingFunction : Math.round\n );\n },\n\n unformat: function(inputString) {\n if (typeof inputString === 'number') {\n return inputString;\n } else if (typeof inputString === 'string') {\n var result = unformatNumbro(this, inputString);\n\n // Any unparseable string (represented as NaN in the result) is\n // converted into undefined.\n return isNaN(result) ? undefined : result;\n } else {\n return undefined;\n }\n },\n\n binaryByteUnits: function() {\n return formatByteUnits(this._value, bytes.binary.suffixes, bytes.binary.scale).suffix;\n },\n\n byteUnits: function() {\n return formatByteUnits(this._value, bytes.general.suffixes, bytes.general.scale).suffix;\n },\n\n decimalByteUnits: function() {\n return formatByteUnits(this._value, bytes.decimal.suffixes, bytes.decimal.scale).suffix;\n },\n\n value: function() {\n return this._value;\n },\n\n valueOf: function() {\n return this._value;\n },\n\n set: function(value) {\n this._value = Number(value);\n return this;\n },\n\n add: function(value) {\n var corrFactor = correctionFactor.call(null, this._value, value);\n\n function cback(accum, curr) {\n return accum + corrFactor * curr;\n }\n this._value = [this._value, value].reduce(cback, 0) / corrFactor;\n return this;\n },\n\n subtract: function(value) {\n var corrFactor = correctionFactor.call(null, this._value, value);\n\n function cback(accum, curr) {\n return accum - corrFactor * curr;\n }\n this._value = [value].reduce(cback, this._value * corrFactor) / corrFactor;\n return this;\n },\n\n multiply: function(value) {\n function cback(accum, curr) {\n var corrFactor = correctionFactor(accum, curr),\n result = accum * corrFactor;\n result *= curr * corrFactor;\n result /= corrFactor * corrFactor;\n return result;\n }\n this._value = [this._value, value].reduce(cback, 1);\n return this;\n },\n\n divide: function(value) {\n function cback(accum, curr) {\n var corrFactor = correctionFactor(accum, curr);\n return (accum * corrFactor) / (curr * corrFactor);\n }\n this._value = [this._value, value].reduce(cback);\n return this;\n },\n\n difference: function(value) {\n return Math.abs(numbro(this._value).subtract(value).value());\n }\n\n };\n\n /************************************\n Exposing Numbro\n ************************************/\n\n if (inNodejsRuntime()) {\n //Todo: Rename the folder in 2.0.0\n numbro.loadCulturesInNode();\n }\n\n // CommonJS module is defined\n if (hasModule) {\n module.exports = numbro;\n } else {\n /*global ender:false */\n if (typeof ender === 'undefined') {\n // here, `this` means `window` in the browser, or `global` on the server\n // add `numbro` as a global object via a string identifier,\n // for Closure Compiler 'advanced' mode\n this.numbro = numbro;\n }\n\n /*global define:false */\n if (typeof define === 'function' && define.amd) {\n define([], function() {\n return numbro;\n });\n }\n }\n\n}.call(typeof window === 'undefined' ? this : window));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/numbro/numbro.js\n// module id = 88\n// module chunks = 0","/**\n * SheetClip - Spreadsheet Clipboard Parser\n * version 0.2\n *\n * This tiny library transforms JavaScript arrays to strings that are pasteable by LibreOffice, OpenOffice,\n * Google Docs and Microsoft Excel.\n *\n * Copyright 2012, Marcin Warpechowski\n * Licensed under the MIT license.\n * http://github.com/warpech/sheetclip/\n */\n/*jslint white: true*/\n(function (global) {\n \"use strict\";\n\n function countQuotes(str) {\n return str.split('\"').length - 1;\n }\n\n var SheetClip = {\n /**\n * Decode spreadsheet string into array\n *\n * @param {String} str\n * @returns {Array}\n */\n parse: function (str) {\n var r, rLen, rows, arr = [], a = 0, c, cLen, multiline, last;\n\n rows = str.split('\\n');\n\n if (rows.length > 1 && rows[rows.length - 1] === '') {\n rows.pop();\n }\n for (r = 0, rLen = rows.length; r < rLen; r += 1) {\n rows[r] = rows[r].split('\\t');\n\n for (c = 0, cLen = rows[r].length; c < cLen; c += 1) {\n if (!arr[a]) {\n arr[a] = [];\n }\n if (multiline && c === 0) {\n last = arr[a].length - 1;\n arr[a][last] = arr[a][last] + '\\n' + rows[r][0];\n\n if (multiline && (countQuotes(rows[r][0]) & 1)) { //& 1 is a bitwise way of performing mod 2\n multiline = false;\n arr[a][last] = arr[a][last].substring(0, arr[a][last].length - 1).replace(/\"\"/g, '\"');\n }\n }\n else {\n if (c === cLen - 1 && rows[r][c].indexOf('\"') === 0 && (countQuotes(rows[r][c]) & 1)) {\n arr[a].push(rows[r][c].substring(1).replace(/\"\"/g, '\"'));\n multiline = true;\n }\n else {\n arr[a].push(rows[r][c].replace(/\"\"/g, '\"'));\n multiline = false;\n }\n }\n }\n if (!multiline) {\n a += 1;\n }\n }\n\n return arr;\n },\n\n /**\n * Encode array into valid spreadsheet string\n *\n * @param arr\n * @returns {String}\n */\n stringify: function (arr) {\n var r, rLen, c, cLen, str = '', val;\n\n for (r = 0, rLen = arr.length; r < rLen; r += 1) {\n cLen = arr[r].length;\n\n for (c = 0; c < cLen; c += 1) {\n if (c > 0) {\n str += '\\t';\n }\n val = arr[r][c];\n\n if (typeof val === 'string') {\n if (val.indexOf('\\n') > -1) {\n str += '\"' + val.replace(/\"/g, '\"\"') + '\"';\n }\n else {\n str += val;\n }\n }\n else if (val === null || val === void 0) { // void 0 resolves to undefined\n str += '';\n }\n else {\n str += val;\n }\n }\n str += '\\n';\n }\n\n return str;\n }\n };\n\n if (typeof exports !== 'undefined') {\n exports.parse = SheetClip.parse;\n exports.stringify = SheetClip.stringify;\n } else {\n global.SheetClip = SheetClip;\n }\n}(window));\n\n\n\n// WEBPACK FOOTER //\n// lib/SheetClip/SheetClip.js","/*!\n * https://github.com/Starcounter-Jack/JSON-Patch\n * json-patch-duplex.js version: 0.5.7\n * (c) 2013 Joachim Wester\n * MIT license\n */\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\nvar OriginalError = Error;\nvar jsonpatch;\n(function (jsonpatch) {\n var _objectKeys = function (obj) {\n if (_isArray(obj)) {\n var keys = new Array(obj.length);\n for (var k = 0; k < keys.length; k++) {\n keys[k] = \"\" + k;\n }\n return keys;\n }\n if (Object.keys) {\n return Object.keys(obj);\n }\n var keys = [];\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n keys.push(i);\n }\n }\n return keys;\n };\n function _equals(a, b) {\n switch (typeof a) {\n case 'undefined': //backward compatibility, but really I think we should return false\n case 'boolean':\n case 'string':\n case 'number':\n return a === b;\n case 'object':\n if (a === null)\n return b === null;\n if (_isArray(a)) {\n if (!_isArray(b) || a.length !== b.length)\n return false;\n for (var i = 0, l = a.length; i < l; i++)\n if (!_equals(a[i], b[i]))\n return false;\n return true;\n }\n var bKeys = _objectKeys(b);\n var bLength = bKeys.length;\n if (_objectKeys(a).length !== bLength)\n return false;\n for (var i = 0; i < bLength; i++)\n if (!_equals(a[i], b[i]))\n return false;\n return true;\n default:\n return false;\n }\n }\n /* We use a Javascript hash to store each\n function. Each hash entry (property) uses\n the operation identifiers specified in rfc6902.\n In this way, we can map each patch operation\n to its dedicated function in efficient way.\n */\n /* The operations applicable to an object */\n var objOps = {\n add: function (obj, key) {\n obj[key] = this.value;\n return true;\n },\n remove: function (obj, key) {\n delete obj[key];\n return true;\n },\n replace: function (obj, key) {\n obj[key] = this.value;\n return true;\n },\n move: function (obj, key, tree) {\n var temp = { op: \"_get\", path: this.from };\n apply(tree, [temp]);\n apply(tree, [\n { op: \"remove\", path: this.from }\n ]);\n apply(tree, [\n { op: \"add\", path: this.path, value: temp.value }\n ]);\n return true;\n },\n copy: function (obj, key, tree) {\n var temp = { op: \"_get\", path: this.from };\n apply(tree, [temp]);\n apply(tree, [\n { op: \"add\", path: this.path, value: temp.value }\n ]);\n return true;\n },\n test: function (obj, key) {\n return _equals(obj[key], this.value);\n },\n _get: function (obj, key) {\n this.value = obj[key];\n }\n };\n /* The operations applicable to an array. Many are the same as for the object */\n var arrOps = {\n add: function (arr, i) {\n arr.splice(i, 0, this.value);\n return true;\n },\n remove: function (arr, i) {\n arr.splice(i, 1);\n return true;\n },\n replace: function (arr, i) {\n arr[i] = this.value;\n return true;\n },\n move: objOps.move,\n copy: objOps.copy,\n test: objOps.test,\n _get: objOps._get\n };\n /* The operations applicable to object root. Many are the same as for the object */\n var rootOps = {\n add: function (obj) {\n rootOps.remove.call(this, obj);\n for (var key in this.value) {\n if (this.value.hasOwnProperty(key)) {\n obj[key] = this.value[key];\n }\n }\n return true;\n },\n remove: function (obj) {\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n objOps.remove.call(this, obj, key);\n }\n }\n return true;\n },\n replace: function (obj) {\n apply(obj, [\n { op: \"remove\", path: this.path }\n ]);\n apply(obj, [\n { op: \"add\", path: this.path, value: this.value }\n ]);\n return true;\n },\n move: objOps.move,\n copy: objOps.copy,\n test: function (obj) {\n return (JSON.stringify(obj) === JSON.stringify(this.value));\n },\n _get: function (obj) {\n this.value = obj;\n }\n };\n var observeOps = {\n add: function (patches, path) {\n var patch = {\n op: \"add\",\n path: path + escapePathComponent(this.name),\n value: this.object[this.name] };\n patches.push(patch);\n },\n 'delete': function (patches, path) {\n var patch = {\n op: \"remove\",\n path: path + escapePathComponent(this.name)\n };\n patches.push(patch);\n },\n update: function (patches, path) {\n var patch = {\n op: \"replace\",\n path: path + escapePathComponent(this.name),\n value: this.object[this.name]\n };\n patches.push(patch);\n }\n };\n function escapePathComponent(str) {\n if (str.indexOf('/') === -1 && str.indexOf('~') === -1)\n return str;\n return str.replace(/~/g, '~0').replace(/\\//g, '~1');\n }\n function _getPathRecursive(root, obj) {\n var found;\n for (var key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] === obj) {\n return escapePathComponent(key) + '/';\n }\n else if (typeof root[key] === 'object') {\n found = _getPathRecursive(root[key], obj);\n if (found != '') {\n return escapePathComponent(key) + '/' + found;\n }\n }\n }\n }\n return '';\n }\n function getPath(root, obj) {\n if (root === obj) {\n return '/';\n }\n var path = _getPathRecursive(root, obj);\n if (path === '') {\n throw new OriginalError(\"Object not found in root\");\n }\n return '/' + path;\n }\n var beforeDict = [];\n var Mirror = (function () {\n function Mirror(obj) {\n this.observers = [];\n this.obj = obj;\n }\n return Mirror;\n })();\n var ObserverInfo = (function () {\n function ObserverInfo(callback, observer) {\n this.callback = callback;\n this.observer = observer;\n }\n return ObserverInfo;\n })();\n function getMirror(obj) {\n for (var i = 0, ilen = beforeDict.length; i < ilen; i++) {\n if (beforeDict[i].obj === obj) {\n return beforeDict[i];\n }\n }\n }\n function getObserverFromMirror(mirror, callback) {\n for (var j = 0, jlen = mirror.observers.length; j < jlen; j++) {\n if (mirror.observers[j].callback === callback) {\n return mirror.observers[j].observer;\n }\n }\n }\n function removeObserverFromMirror(mirror, observer) {\n for (var j = 0, jlen = mirror.observers.length; j < jlen; j++) {\n if (mirror.observers[j].observer === observer) {\n mirror.observers.splice(j, 1);\n return;\n }\n }\n }\n function unobserve(root, observer) {\n observer.unobserve();\n }\n jsonpatch.unobserve = unobserve;\n function deepClone(obj) {\n if (typeof obj === \"object\") {\n return JSON.parse(JSON.stringify(obj)); //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n }\n else {\n return obj; //no need to clone primitives\n }\n }\n function observe(obj, callback) {\n var patches = [];\n var root = obj;\n var observer;\n var mirror = getMirror(obj);\n if (!mirror) {\n mirror = new Mirror(obj);\n beforeDict.push(mirror);\n }\n else {\n observer = getObserverFromMirror(mirror, callback);\n }\n if (observer) {\n return observer;\n }\n observer = {};\n mirror.value = deepClone(obj);\n if (callback) {\n observer.callback = callback;\n observer.next = null;\n var intervals = this.intervals || [100, 1000, 10000, 60000];\n if (intervals.push === void 0) {\n throw new OriginalError(\"jsonpatch.intervals must be an array\");\n }\n var currentInterval = 0;\n var dirtyCheck = function () {\n generate(observer);\n };\n var fastCheck = function () {\n clearTimeout(observer.next);\n observer.next = setTimeout(function () {\n dirtyCheck();\n currentInterval = 0;\n observer.next = setTimeout(slowCheck, intervals[currentInterval++]);\n }, 0);\n };\n var slowCheck = function () {\n dirtyCheck();\n if (currentInterval == intervals.length)\n currentInterval = intervals.length - 1;\n observer.next = setTimeout(slowCheck, intervals[currentInterval++]);\n };\n if (typeof window !== 'undefined') {\n if (window.addEventListener) {\n window.addEventListener('mousedown', fastCheck);\n window.addEventListener('mouseup', fastCheck);\n window.addEventListener('keydown', fastCheck);\n }\n else {\n document.documentElement.attachEvent('onmousedown', fastCheck);\n document.documentElement.attachEvent('onmouseup', fastCheck);\n document.documentElement.attachEvent('onkeydown', fastCheck);\n }\n }\n observer.next = setTimeout(slowCheck, intervals[currentInterval++]);\n }\n observer.patches = patches;\n observer.object = obj;\n observer.unobserve = function () {\n generate(observer);\n clearTimeout(observer.next);\n removeObserverFromMirror(mirror, observer);\n if (typeof window !== 'undefined') {\n if (window.removeEventListener) {\n window.removeEventListener('mousedown', fastCheck);\n window.removeEventListener('mouseup', fastCheck);\n window.removeEventListener('keydown', fastCheck);\n }\n else {\n document.documentElement.detachEvent('onmousedown', fastCheck);\n document.documentElement.detachEvent('onmouseup', fastCheck);\n document.documentElement.detachEvent('onkeydown', fastCheck);\n }\n }\n };\n mirror.observers.push(new ObserverInfo(callback, observer));\n return observer;\n }\n jsonpatch.observe = observe;\n function generate(observer) {\n var mirror;\n for (var i = 0, ilen = beforeDict.length; i < ilen; i++) {\n if (beforeDict[i].obj === observer.object) {\n mirror = beforeDict[i];\n break;\n }\n }\n _generate(mirror.value, observer.object, observer.patches, \"\");\n if (observer.patches.length) {\n apply(mirror.value, observer.patches);\n }\n var temp = observer.patches;\n if (temp.length > 0) {\n observer.patches = [];\n if (observer.callback) {\n observer.callback(temp);\n }\n }\n return temp;\n }\n jsonpatch.generate = generate;\n // Dirty check if obj is different from mirror, generate patches and update mirror\n function _generate(mirror, obj, patches, path) {\n var newKeys = _objectKeys(obj);\n var oldKeys = _objectKeys(mirror);\n var changed = false;\n var deleted = false;\n //if ever \"move\" operation is implemented here, make sure this test runs OK: \"should not generate the same patch twice (move)\"\n for (var t = oldKeys.length - 1; t >= 0; t--) {\n var key = oldKeys[t];\n var oldVal = mirror[key];\n if (obj.hasOwnProperty(key)) {\n var newVal = obj[key];\n if (typeof oldVal == \"object\" && oldVal != null && typeof newVal == \"object\" && newVal != null) {\n _generate(oldVal, newVal, patches, path + \"/\" + escapePathComponent(key));\n }\n else {\n if (oldVal != newVal) {\n changed = true;\n patches.push({ op: \"replace\", path: path + \"/\" + escapePathComponent(key), value: deepClone(newVal) });\n }\n }\n }\n else {\n patches.push({ op: \"remove\", path: path + \"/\" + escapePathComponent(key) });\n deleted = true; // property has been deleted\n }\n }\n if (!deleted && newKeys.length == oldKeys.length) {\n return;\n }\n for (var t = 0; t < newKeys.length; t++) {\n var key = newKeys[t];\n if (!mirror.hasOwnProperty(key)) {\n patches.push({ op: \"add\", path: path + \"/\" + escapePathComponent(key), value: deepClone(obj[key]) });\n }\n }\n }\n var _isArray;\n if (Array.isArray) {\n _isArray = Array.isArray;\n }\n else {\n _isArray = function (obj) {\n return obj.push && typeof obj.length === 'number';\n };\n }\n //3x faster than cached /^\\d+$/.test(str)\n function isInteger(str) {\n var i = 0;\n var len = str.length;\n var charCode;\n while (i < len) {\n charCode = str.charCodeAt(i);\n if (charCode >= 48 && charCode <= 57) {\n i++;\n continue;\n }\n return false;\n }\n return true;\n }\n /// Apply a json-patch operation on an object tree\n function apply(tree, patches, validate) {\n var result = false, p = 0, plen = patches.length, patch, key;\n while (p < plen) {\n patch = patches[p];\n p++;\n // Find the object\n var path = patch.path || \"\";\n var keys = path.split('/');\n var obj = tree;\n var t = 1; //skip empty element - http://jsperf.com/to-shift-or-not-to-shift\n var len = keys.length;\n var existingPathFragment = undefined;\n while (true) {\n key = keys[t];\n if (validate) {\n if (existingPathFragment === undefined) {\n if (obj[key] === undefined) {\n existingPathFragment = keys.slice(0, t).join('/');\n }\n else if (t == len - 1) {\n existingPathFragment = patch.path;\n }\n if (existingPathFragment !== undefined) {\n this.validator(patch, p - 1, tree, existingPathFragment);\n }\n }\n }\n t++;\n if (key === undefined) {\n if (t >= len) {\n result = rootOps[patch.op].call(patch, obj, key, tree); // Apply patch\n break;\n }\n }\n if (_isArray(obj)) {\n if (key === '-') {\n key = obj.length;\n }\n else {\n if (validate && !isInteger(key)) {\n throw new JsonPatchError(\"Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index\", \"OPERATION_PATH_ILLEGAL_ARRAY_INDEX\", p - 1, patch.path, patch);\n }\n key = parseInt(key, 10);\n }\n if (t >= len) {\n if (validate && patch.op === \"add\" && key > obj.length) {\n throw new JsonPatchError(\"The specified index MUST NOT be greater than the number of elements in the array\", \"OPERATION_VALUE_OUT_OF_BOUNDS\", p - 1, patch.path, patch);\n }\n result = arrOps[patch.op].call(patch, obj, key, tree); // Apply patch\n break;\n }\n }\n else {\n if (key && key.indexOf('~') != -1)\n key = key.replace(/~1/g, '/').replace(/~0/g, '~'); // escape chars\n if (t >= len) {\n result = objOps[patch.op].call(patch, obj, key, tree); // Apply patch\n break;\n }\n }\n obj = obj[key];\n }\n }\n return result;\n }\n jsonpatch.apply = apply;\n function compare(tree1, tree2) {\n var patches = [];\n _generate(tree1, tree2, patches, '');\n return patches;\n }\n jsonpatch.compare = compare;\n var JsonPatchError = (function (_super) {\n __extends(JsonPatchError, _super);\n function JsonPatchError(message, name, index, operation, tree) {\n _super.call(this, message);\n this.message = message;\n this.name = name;\n this.index = index;\n this.operation = operation;\n this.tree = tree;\n }\n return JsonPatchError;\n })(OriginalError);\n jsonpatch.JsonPatchError = JsonPatchError;\n jsonpatch.Error = JsonPatchError;\n /**\n * Recursively checks whether an object has any undefined values inside.\n */\n function hasUndefined(obj) {\n if (obj === undefined) {\n return true;\n }\n if (typeof obj == \"array\" || typeof obj == \"object\") {\n for (var i in obj) {\n if (hasUndefined(obj[i])) {\n return true;\n }\n }\n }\n return false;\n }\n /**\n * Validates a single operation. Called from `jsonpatch.validate`. Throws `JsonPatchError` in case of an error.\n * @param {object} operation - operation object (patch)\n * @param {number} index - index of operation in the sequence\n * @param {object} [tree] - object where the operation is supposed to be applied\n * @param {string} [existingPathFragment] - comes along with `tree`\n */\n function validator(operation, index, tree, existingPathFragment) {\n if (typeof operation !== 'object' || operation === null || _isArray(operation)) {\n throw new JsonPatchError('Operation is not an object', 'OPERATION_NOT_AN_OBJECT', index, operation, tree);\n }\n else if (!objOps[operation.op]) {\n throw new JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902', 'OPERATION_OP_INVALID', index, operation, tree);\n }\n else if (typeof operation.path !== 'string') {\n throw new JsonPatchError('Operation `path` property is not a string', 'OPERATION_PATH_INVALID', index, operation, tree);\n }\n else if ((operation.op === 'move' || operation.op === 'copy') && typeof operation.from !== 'string') {\n throw new JsonPatchError('Operation `from` property is not present (applicable in `move` and `copy` operations)', 'OPERATION_FROM_REQUIRED', index, operation, tree);\n }\n else if ((operation.op === 'add' || operation.op === 'replace' || operation.op === 'test') && operation.value === undefined) {\n throw new JsonPatchError('Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)', 'OPERATION_VALUE_REQUIRED', index, operation, tree);\n }\n else if ((operation.op === 'add' || operation.op === 'replace' || operation.op === 'test') && hasUndefined(operation.value)) {\n throw new JsonPatchError('Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)', 'OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED', index, operation, tree);\n }\n else if (tree) {\n if (operation.op == \"add\") {\n var pathLen = operation.path.split(\"/\").length;\n var existingPathLen = existingPathFragment.split(\"/\").length;\n if (pathLen !== existingPathLen + 1 && pathLen !== existingPathLen) {\n throw new JsonPatchError('Cannot perform an `add` operation at the desired path', 'OPERATION_PATH_CANNOT_ADD', index, operation, tree);\n }\n }\n else if (operation.op === 'replace' || operation.op === 'remove' || operation.op === '_get') {\n if (operation.path !== existingPathFragment) {\n throw new JsonPatchError('Cannot perform the operation at a path that does not exist', 'OPERATION_PATH_UNRESOLVABLE', index, operation, tree);\n }\n }\n else if (operation.op === 'move' || operation.op === 'copy') {\n var existingValue = { op: \"_get\", path: operation.from, value: undefined };\n var error = jsonpatch.validate([existingValue], tree);\n if (error && error.name === 'OPERATION_PATH_UNRESOLVABLE') {\n throw new JsonPatchError('Cannot perform the operation from a path that does not exist', 'OPERATION_FROM_UNRESOLVABLE', index, operation, tree);\n }\n }\n }\n }\n jsonpatch.validator = validator;\n /**\n * Validates a sequence of operations. If `tree` parameter is provided, the sequence is additionally validated against the object tree.\n * If error is encountered, returns a JsonPatchError object\n * @param sequence\n * @param tree\n * @returns {JsonPatchError|undefined}\n */\n function validate(sequence, tree) {\n try {\n if (!_isArray(sequence)) {\n throw new JsonPatchError('Patch sequence must be an array', 'SEQUENCE_NOT_AN_ARRAY');\n }\n if (tree) {\n tree = JSON.parse(JSON.stringify(tree)); //clone tree so that we can safely try applying operations\n apply.call(this, tree, sequence, true);\n }\n else {\n for (var i = 0; i < sequence.length; i++) {\n this.validator(sequence[i], i);\n }\n }\n }\n catch (e) {\n if (e instanceof JsonPatchError) {\n return e;\n }\n else {\n throw e;\n }\n }\n }\n jsonpatch.validate = validate;\n})(jsonpatch || (jsonpatch = {}));\nif (typeof exports !== \"undefined\") {\n exports.apply = jsonpatch.apply;\n exports.observe = jsonpatch.observe;\n exports.unobserve = jsonpatch.unobserve;\n exports.generate = jsonpatch.generate;\n exports.compare = jsonpatch.compare;\n exports.validate = jsonpatch.validate;\n exports.validator = jsonpatch.validator;\n exports.JsonPatchError = jsonpatch.JsonPatchError;\n exports.Error = jsonpatch.Error;\n}\n\n\n\n// WEBPACK FOOTER //\n// lib/jsonpatch/json-patch-duplex.js","import {\n getComputedStyle,\n getTrimmingContainer,\n innerWidth,\n innerHeight,\n offset,\n outerHeight,\n outerWidth,\n} from './../../../helpers/dom/element';\nimport {stopImmediatePropagation} from './../../../helpers/dom/event';\nimport {hasOwnProperty} from './../../../helpers/object';\nimport {isMobileBrowser} from './../../../helpers/browser';\nimport EventManager from './../../../eventManager';\nimport CellCoords from './cell/coords';\nimport Overlay from './overlay/_base.js';\n\n/**\n *\n */\nclass Border {\n /**\n * @param {Walkontable} wotInstance\n * @param {Object} settings\n */\n constructor(wotInstance, settings) {\n if (!settings) {\n return;\n }\n this.eventManager = new EventManager(wotInstance);\n this.instance = wotInstance;\n this.wot = wotInstance;\n this.settings = settings;\n this.mouseDown = false;\n this.main = null;\n\n this.top = null;\n this.left = null;\n this.bottom = null;\n this.right = null;\n\n this.topStyle = null;\n this.leftStyle = null;\n this.bottomStyle = null;\n this.rightStyle = null;\n\n this.cornerDefaultStyle = {\n width: '5px',\n height: '5px',\n borderWidth: '2px',\n borderStyle: 'solid',\n borderColor: '#FFF'\n };\n this.corner = null;\n this.cornerStyle = null;\n\n this.createBorders(settings);\n this.registerListeners();\n }\n\n /**\n * Register all necessary events\n */\n registerListeners() {\n this.eventManager.addEventListener(document.body, 'mousedown', () => this.onMouseDown());\n this.eventManager.addEventListener(document.body, 'mouseup', () => this.onMouseUp());\n\n for (let c = 0, len = this.main.childNodes.length; c < len; c++) {\n this.eventManager.addEventListener(this.main.childNodes[c], 'mouseenter', (event) => this.onMouseEnter(event, this.main.childNodes[c]));\n }\n }\n\n /**\n * Mouse down listener\n *\n * @private\n */\n onMouseDown() {\n this.mouseDown = true;\n }\n\n /**\n * Mouse up listener\n *\n * @private\n */\n onMouseUp() {\n this.mouseDown = false;\n }\n\n /**\n * Mouse enter listener for fragment selection functionality.\n *\n * @private\n * @param {Event} event Dom event\n * @param {HTMLElement} parentElement Part of border element.\n */\n onMouseEnter(event, parentElement) {\n if (!this.mouseDown || !this.wot.getSetting('hideBorderOnMouseDownOver')) {\n return;\n }\n event.preventDefault();\n stopImmediatePropagation(event);\n\n let _this = this;\n let bounds = parentElement.getBoundingClientRect();\n // Hide border to prevents selection jumping when fragmentSelection is enabled.\n parentElement.style.display = 'none';\n\n function isOutside(event) {\n if (event.clientY < Math.floor(bounds.top)) {\n return true;\n }\n if (event.clientY > Math.ceil(bounds.top + bounds.height)) {\n return true;\n }\n if (event.clientX < Math.floor(bounds.left)) {\n return true;\n }\n if (event.clientX > Math.ceil(bounds.left + bounds.width)) {\n return true;\n }\n }\n\n function handler(event) {\n if (isOutside(event)) {\n _this.eventManager.removeEventListener(document.body, 'mousemove', handler);\n parentElement.style.display = 'block';\n }\n }\n\n this.eventManager.addEventListener(document.body, 'mousemove', handler);\n }\n\n /**\n * Create border elements\n *\n * @param {Object} settings\n */\n createBorders(settings) {\n this.main = document.createElement('div');\n\n let borderDivs = ['top', 'left', 'bottom', 'right', 'corner'];\n let style = this.main.style;\n style.position = 'absolute';\n style.top = 0;\n style.left = 0;\n\n for (let i = 0; i < 5; i++) {\n let position = borderDivs[i];\n let div = document.createElement('div');\n div.className = `wtBorder ${this.settings.className || ''}`; // + borderDivs[i];\n\n if (this.settings[position] && this.settings[position].hide) {\n div.className += ' hidden';\n }\n style = div.style;\n style.backgroundColor = (this.settings[position] && this.settings[position].color) ? this.settings[position].color : settings.border.color;\n style.height = (this.settings[position] && this.settings[position].width) ? `${this.settings[position].width}px` : `${settings.border.width}px`;\n style.width = (this.settings[position] && this.settings[position].width) ? `${this.settings[position].width}px` : `${settings.border.width}px`;\n\n this.main.appendChild(div);\n }\n this.top = this.main.childNodes[0];\n this.left = this.main.childNodes[1];\n this.bottom = this.main.childNodes[2];\n this.right = this.main.childNodes[3];\n\n this.topStyle = this.top.style;\n this.leftStyle = this.left.style;\n this.bottomStyle = this.bottom.style;\n this.rightStyle = this.right.style;\n\n this.corner = this.main.childNodes[4];\n this.corner.className += ' corner';\n this.cornerStyle = this.corner.style;\n this.cornerStyle.width = this.cornerDefaultStyle.width;\n this.cornerStyle.height = this.cornerDefaultStyle.height;\n this.cornerStyle.border = [\n this.cornerDefaultStyle.borderWidth,\n this.cornerDefaultStyle.borderStyle,\n this.cornerDefaultStyle.borderColor\n ].join(' ');\n\n if (isMobileBrowser()) {\n this.createMultipleSelectorHandles();\n }\n this.disappear();\n\n if (!this.wot.wtTable.bordersHolder) {\n this.wot.wtTable.bordersHolder = document.createElement('div');\n this.wot.wtTable.bordersHolder.className = 'htBorders';\n this.wot.wtTable.spreader.appendChild(this.wot.wtTable.bordersHolder);\n }\n this.wot.wtTable.bordersHolder.insertBefore(this.main, this.wot.wtTable.bordersHolder.firstChild);\n }\n\n /**\n * Create multiple selector handler for mobile devices\n */\n createMultipleSelectorHandles() {\n this.selectionHandles = {\n topLeft: document.createElement('DIV'),\n topLeftHitArea: document.createElement('DIV'),\n bottomRight: document.createElement('DIV'),\n bottomRightHitArea: document.createElement('DIV')\n };\n let width = 10;\n let hitAreaWidth = 40;\n\n this.selectionHandles.topLeft.className = 'topLeftSelectionHandle';\n this.selectionHandles.topLeftHitArea.className = 'topLeftSelectionHandle-HitArea';\n this.selectionHandles.bottomRight.className = 'bottomRightSelectionHandle';\n this.selectionHandles.bottomRightHitArea.className = 'bottomRightSelectionHandle-HitArea';\n\n this.selectionHandles.styles = {\n topLeft: this.selectionHandles.topLeft.style,\n topLeftHitArea: this.selectionHandles.topLeftHitArea.style,\n bottomRight: this.selectionHandles.bottomRight.style,\n bottomRightHitArea: this.selectionHandles.bottomRightHitArea.style\n };\n\n let hitAreaStyle = {\n position: 'absolute',\n height: `${hitAreaWidth}px`,\n width: `${hitAreaWidth}px`,\n 'border-radius': `${parseInt(hitAreaWidth / 1.5, 10)}px`,\n };\n\n for (let prop in hitAreaStyle) {\n if (hasOwnProperty(hitAreaStyle, prop)) {\n this.selectionHandles.styles.bottomRightHitArea[prop] = hitAreaStyle[prop];\n this.selectionHandles.styles.topLeftHitArea[prop] = hitAreaStyle[prop];\n }\n }\n\n let handleStyle = {\n position: 'absolute',\n height: `${width}px`,\n width: `${width}px`,\n 'border-radius': `${parseInt(width / 1.5, 10)}px`,\n background: '#F5F5FF',\n border: '1px solid #4285c8'\n };\n\n for (let prop in handleStyle) {\n if (hasOwnProperty(handleStyle, prop)) {\n this.selectionHandles.styles.bottomRight[prop] = handleStyle[prop];\n this.selectionHandles.styles.topLeft[prop] = handleStyle[prop];\n }\n }\n this.main.appendChild(this.selectionHandles.topLeft);\n this.main.appendChild(this.selectionHandles.bottomRight);\n this.main.appendChild(this.selectionHandles.topLeftHitArea);\n this.main.appendChild(this.selectionHandles.bottomRightHitArea);\n }\n\n isPartRange(row, col) {\n if (this.wot.selections.area.cellRange) {\n if (row != this.wot.selections.area.cellRange.to.row || col != this.wot.selections.area.cellRange.to.col) {\n return true;\n }\n }\n\n return false;\n }\n\n updateMultipleSelectionHandlesPosition(row, col, top, left, width, height) {\n let handleWidth = parseInt(this.selectionHandles.styles.topLeft.width, 10);\n let hitAreaWidth = parseInt(this.selectionHandles.styles.topLeftHitArea.width, 10);\n\n this.selectionHandles.styles.topLeft.top = `${parseInt(top - handleWidth, 10)}px`;\n this.selectionHandles.styles.topLeft.left = `${parseInt(left - handleWidth, 10)}px`;\n\n this.selectionHandles.styles.topLeftHitArea.top = `${parseInt(top - ((hitAreaWidth / 4) * 3), 10)}px`;\n this.selectionHandles.styles.topLeftHitArea.left = `${parseInt(left - ((hitAreaWidth / 4) * 3), 10)}px`;\n\n this.selectionHandles.styles.bottomRight.top = `${parseInt(top + height, 10)}px`;\n this.selectionHandles.styles.bottomRight.left = `${parseInt(left + width, 10)}px`;\n\n this.selectionHandles.styles.bottomRightHitArea.top = `${parseInt(top + height - (hitAreaWidth / 4), 10)}px`;\n this.selectionHandles.styles.bottomRightHitArea.left = `${parseInt(left + width - (hitAreaWidth / 4), 10)}px`;\n\n if (this.settings.border.multipleSelectionHandlesVisible && this.settings.border.multipleSelectionHandlesVisible()) {\n this.selectionHandles.styles.topLeft.display = 'block';\n this.selectionHandles.styles.topLeftHitArea.display = 'block';\n\n if (this.isPartRange(row, col)) {\n this.selectionHandles.styles.bottomRight.display = 'none';\n this.selectionHandles.styles.bottomRightHitArea.display = 'none';\n } else {\n this.selectionHandles.styles.bottomRight.display = 'block';\n this.selectionHandles.styles.bottomRightHitArea.display = 'block';\n }\n } else {\n this.selectionHandles.styles.topLeft.display = 'none';\n this.selectionHandles.styles.bottomRight.display = 'none';\n this.selectionHandles.styles.topLeftHitArea.display = 'none';\n this.selectionHandles.styles.bottomRightHitArea.display = 'none';\n }\n\n if (row == this.wot.wtSettings.getSetting('fixedRowsTop') || col == this.wot.wtSettings.getSetting('fixedColumnsLeft')) {\n this.selectionHandles.styles.topLeft.zIndex = '9999';\n this.selectionHandles.styles.topLeftHitArea.zIndex = '9999';\n } else {\n this.selectionHandles.styles.topLeft.zIndex = '';\n this.selectionHandles.styles.topLeftHitArea.zIndex = '';\n }\n }\n\n /**\n * Show border around one or many cells\n *\n * @param {Array} corners\n */\n appear(corners) {\n if (this.disabled) {\n return;\n }\n var isMultiple,\n fromTD,\n toTD,\n fromOffset,\n toOffset,\n containerOffset,\n top,\n minTop,\n left,\n minLeft,\n height,\n width,\n fromRow,\n fromColumn,\n toRow,\n toColumn,\n trimmingContainer,\n cornerOverlappingContainer,\n ilen;\n\n ilen = this.wot.wtTable.getRenderedRowsCount();\n\n for (let i = 0; i < ilen; i++) {\n let s = this.wot.wtTable.rowFilter.renderedToSource(i);\n\n if (s >= corners[0] && s <= corners[2]) {\n fromRow = s;\n break;\n }\n }\n\n for (let i = ilen - 1; i >= 0; i--) {\n let s = this.wot.wtTable.rowFilter.renderedToSource(i);\n\n if (s >= corners[0] && s <= corners[2]) {\n toRow = s;\n break;\n }\n }\n\n ilen = this.wot.wtTable.getRenderedColumnsCount();\n\n for (let i = 0; i < ilen; i++) {\n let s = this.wot.wtTable.columnFilter.renderedToSource(i);\n\n if (s >= corners[1] && s <= corners[3]) {\n fromColumn = s;\n break;\n }\n }\n\n for (let i = ilen - 1; i >= 0; i--) {\n let s = this.wot.wtTable.columnFilter.renderedToSource(i);\n\n if (s >= corners[1] && s <= corners[3]) {\n toColumn = s;\n break;\n }\n }\n if (fromRow === void 0 || fromColumn === void 0) {\n this.disappear();\n\n return;\n }\n isMultiple = (fromRow !== toRow || fromColumn !== toColumn);\n fromTD = this.wot.wtTable.getCell(new CellCoords(fromRow, fromColumn));\n toTD = isMultiple ? this.wot.wtTable.getCell(new CellCoords(toRow, toColumn)) : fromTD;\n fromOffset = offset(fromTD);\n toOffset = isMultiple ? offset(toTD) : fromOffset;\n containerOffset = offset(this.wot.wtTable.TABLE);\n\n minTop = fromOffset.top;\n height = toOffset.top + outerHeight(toTD) - minTop;\n minLeft = fromOffset.left;\n width = toOffset.left + outerWidth(toTD) - minLeft;\n\n top = minTop - containerOffset.top - 1;\n left = minLeft - containerOffset.left - 1;\n let style = getComputedStyle(fromTD);\n\n if (parseInt(style.borderTopWidth, 10) > 0) {\n top += 1;\n height = height > 0 ? height - 1 : 0;\n }\n if (parseInt(style.borderLeftWidth, 10) > 0) {\n left += 1;\n width = width > 0 ? width - 1 : 0;\n }\n\n this.topStyle.top = `${top}px`;\n this.topStyle.left = `${left}px`;\n this.topStyle.width = `${width}px`;\n this.topStyle.display = 'block';\n\n this.leftStyle.top = `${top}px`;\n this.leftStyle.left = `${left}px`;\n this.leftStyle.height = `${height}px`;\n this.leftStyle.display = 'block';\n\n let delta = Math.floor(this.settings.border.width / 2);\n\n this.bottomStyle.top = `${top + height - delta}px`;\n this.bottomStyle.left = `${left}px`;\n this.bottomStyle.width = `${width}px`;\n this.bottomStyle.display = 'block';\n\n this.rightStyle.top = `${top}px`;\n this.rightStyle.left = `${left + width - delta}px`;\n this.rightStyle.height = `${height + 1}px`;\n this.rightStyle.display = 'block';\n\n if (isMobileBrowser() || (!this.hasSetting(this.settings.border.cornerVisible) || this.isPartRange(toRow, toColumn))) {\n this.cornerStyle.display = 'none';\n } else {\n this.cornerStyle.top = `${top + height - 4}px`;\n this.cornerStyle.left = `${left + width - 4}px`;\n this.cornerStyle.borderRightWidth = this.cornerDefaultStyle.borderWidth;\n this.cornerStyle.width = this.cornerDefaultStyle.width;\n\n // Hide the fill handle, so the possible further adjustments won't force unneeded scrollbars.\n this.cornerStyle.display = 'none';\n\n trimmingContainer = getTrimmingContainer(this.wot.wtTable.TABLE);\n\n if (toColumn === this.wot.getSetting('totalColumns') - 1) {\n cornerOverlappingContainer = toTD.offsetLeft + outerWidth(toTD) + (parseInt(this.cornerDefaultStyle.width, 10) / 2) >= innerWidth(trimmingContainer);\n\n if (cornerOverlappingContainer) {\n this.cornerStyle.left = `${Math.floor(left + width - 3 - (parseInt(this.cornerDefaultStyle.width, 10) / 2))}px`;\n this.cornerStyle.borderRightWidth = 0;\n }\n }\n\n if (toRow === this.wot.getSetting('totalRows') - 1) {\n cornerOverlappingContainer = toTD.offsetTop + outerHeight(toTD) + (parseInt(this.cornerDefaultStyle.height, 10) / 2) >= innerHeight(trimmingContainer);\n\n if (cornerOverlappingContainer) {\n this.cornerStyle.top = `${Math.floor(top + height - 3 - (parseInt(this.cornerDefaultStyle.height, 10) / 2))}px`;\n this.cornerStyle.borderBottomWidth = 0;\n }\n }\n\n this.cornerStyle.display = 'block';\n }\n\n if (isMobileBrowser()) {\n this.updateMultipleSelectionHandlesPosition(fromRow, fromColumn, top, left, width, height);\n }\n }\n\n /**\n * Hide border\n */\n disappear() {\n this.topStyle.display = 'none';\n this.leftStyle.display = 'none';\n this.bottomStyle.display = 'none';\n this.rightStyle.display = 'none';\n this.cornerStyle.display = 'none';\n\n if (isMobileBrowser()) {\n this.selectionHandles.styles.topLeft.display = 'none';\n this.selectionHandles.styles.bottomRight.display = 'none';\n }\n }\n\n /**\n * @param {Function} setting\n * @returns {*}\n */\n hasSetting(setting) {\n if (typeof setting === 'function') {\n return setting();\n }\n\n return !!setting;\n }\n}\n\nexport default Border;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/border.js","const privatePool = new WeakMap();\n\n/**\n * Calculates indexes of columns to render OR columns that are visible.\n * To redo the calculation, you need to create a new calculator.\n *\n * @class ViewportColumnsCalculator\n */\nclass ViewportColumnsCalculator {\n /**\n * Default column width\n *\n * @type {Number}\n */\n static get DEFAULT_WIDTH() {\n return 50;\n }\n\n /**\n * @param {Number} viewportWidth Width of the viewport\n * @param {Number} scrollOffset Current horizontal scroll position of the viewport\n * @param {Number} totalColumns Total number of rows\n * @param {Function} columnWidthFn Function that returns the width of the column at a given index (in px)\n * @param {Function} overrideFn Function that changes calculated this.startRow, this.endRow (used by MergeCells plugin)\n * @param {Boolean} onlyFullyVisible if `true`, only startRow and endRow will be indexes of rows that are fully in viewport\n * @param {Boolean} stretchH\n * @param {Function} [stretchingColumnWidthFn] Function that returns the new width of the stretched column.\n */\n constructor(viewportWidth, scrollOffset, totalColumns, columnWidthFn, overrideFn, onlyFullyVisible, stretchH,\n stretchingColumnWidthFn = (width) => width) {\n privatePool.set(this, {\n viewportWidth,\n scrollOffset,\n totalColumns,\n columnWidthFn,\n overrideFn,\n onlyFullyVisible,\n stretchingColumnWidthFn,\n });\n\n /**\n * Number of rendered/visible columns\n *\n * @type {Number}\n */\n this.count = 0;\n\n /**\n * Index of the first rendered/visible column (can be overwritten using overrideFn)\n *\n * @type {Number|null}\n */\n this.startColumn = null;\n\n /**\n * Index of the last rendered/visible column (can be overwritten using overrideFn)\n *\n * @type {null}\n */\n this.endColumn = null;\n\n /**\n * Position of the first rendered/visible column (in px)\n *\n * @type {Number|null}\n */\n this.startPosition = null;\n\n this.stretchAllRatio = 0;\n this.stretchLastWidth = 0;\n this.stretch = stretchH;\n this.totalTargetWidth = 0;\n this.needVerifyLastColumnWidth = true;\n this.stretchAllColumnsWidth = [];\n\n this.calculate();\n }\n\n /**\n * Calculates viewport\n */\n calculate() {\n let sum = 0;\n let needReverse = true;\n let startPositions = [];\n let columnWidth;\n\n let priv = privatePool.get(this);\n let onlyFullyVisible = priv.onlyFullyVisible;\n let overrideFn = priv.overrideFn;\n let scrollOffset = priv.scrollOffset;\n let totalColumns = priv.totalColumns;\n let viewportWidth = priv.viewportWidth;\n\n for (let i = 0; i < totalColumns; i++) {\n columnWidth = this._getColumnWidth(i);\n\n if (sum <= scrollOffset && !onlyFullyVisible) {\n this.startColumn = i;\n }\n\n // +1 pixel for row header width compensation for horizontal scroll > 0\n let compensatedViewportWidth = scrollOffset > 0 ? viewportWidth + 1 : viewportWidth;\n\n if (sum >= scrollOffset && sum + columnWidth <= scrollOffset + compensatedViewportWidth) {\n if (this.startColumn == null) {\n this.startColumn = i;\n }\n this.endColumn = i;\n }\n startPositions.push(sum);\n sum += columnWidth;\n\n if (!onlyFullyVisible) {\n this.endColumn = i;\n }\n if (sum >= scrollOffset + viewportWidth) {\n needReverse = false;\n break;\n }\n }\n\n if (this.endColumn === totalColumns - 1 && needReverse) {\n this.startColumn = this.endColumn;\n\n while (this.startColumn > 0) {\n let viewportSum = startPositions[this.endColumn] + columnWidth - startPositions[this.startColumn - 1];\n\n if (viewportSum <= viewportWidth || !onlyFullyVisible) {\n this.startColumn--;\n }\n if (viewportSum > viewportWidth) {\n break;\n }\n }\n }\n\n if (this.startColumn !== null && overrideFn) {\n overrideFn(this);\n }\n this.startPosition = startPositions[this.startColumn];\n\n if (this.startPosition == void 0) {\n this.startPosition = null;\n }\n if (this.startColumn !== null) {\n this.count = this.endColumn - this.startColumn + 1;\n }\n }\n\n /**\n * Recalculate columns stretching.\n *\n * @param {Number} totalWidth\n */\n refreshStretching(totalWidth) {\n if (this.stretch === 'none') {\n return;\n }\n this.totalTargetWidth = totalWidth;\n\n let priv = privatePool.get(this);\n let totalColumns = priv.totalColumns;\n let sumAll = 0;\n\n for (let i = 0; i < totalColumns; i++) {\n let columnWidth = this._getColumnWidth(i);\n let permanentColumnWidth = priv.stretchingColumnWidthFn(void 0, i);\n\n if (typeof permanentColumnWidth === 'number') {\n totalWidth -= permanentColumnWidth;\n } else {\n sumAll += columnWidth;\n }\n }\n let remainingSize = totalWidth - sumAll;\n\n if (this.stretch === 'all' && remainingSize > 0) {\n this.stretchAllRatio = totalWidth / sumAll;\n this.stretchAllColumnsWidth = [];\n this.needVerifyLastColumnWidth = true;\n\n } else if (this.stretch === 'last' && totalWidth !== Infinity) {\n let columnWidth = this._getColumnWidth(totalColumns - 1);\n let lastColumnWidth = remainingSize + columnWidth;\n\n this.stretchLastWidth = lastColumnWidth >= 0 ? lastColumnWidth : columnWidth;\n }\n }\n\n /**\n * Get stretched column width based on stretchH (all or last) setting passed in handsontable instance.\n *\n * @param {Number} column\n * @param {Number} baseWidth\n * @returns {Number|null}\n */\n getStretchedColumnWidth(column, baseWidth) {\n let result = null;\n\n if (this.stretch === 'all' && this.stretchAllRatio !== 0) {\n result = this._getStretchedAllColumnWidth(column, baseWidth);\n\n } else if (this.stretch === 'last' && this.stretchLastWidth !== 0) {\n result = this._getStretchedLastColumnWidth(column);\n }\n\n return result;\n }\n\n /**\n * @param {Number} column\n * @param {Number} baseWidth\n * @returns {Number}\n * @private\n */\n _getStretchedAllColumnWidth(column, baseWidth) {\n let sumRatioWidth = 0;\n let priv = privatePool.get(this);\n let totalColumns = priv.totalColumns;\n\n if (!this.stretchAllColumnsWidth[column]) {\n let stretchedWidth = Math.round(baseWidth * this.stretchAllRatio);\n let newStretchedWidth = priv.stretchingColumnWidthFn(stretchedWidth, column);\n\n if (newStretchedWidth === void 0) {\n this.stretchAllColumnsWidth[column] = stretchedWidth;\n } else {\n this.stretchAllColumnsWidth[column] = isNaN(newStretchedWidth) ? this._getColumnWidth(column) : newStretchedWidth;\n }\n }\n\n if (this.stretchAllColumnsWidth.length === totalColumns && this.needVerifyLastColumnWidth) {\n this.needVerifyLastColumnWidth = false;\n\n for (let i = 0; i < this.stretchAllColumnsWidth.length; i++) {\n sumRatioWidth += this.stretchAllColumnsWidth[i];\n }\n if (sumRatioWidth !== this.totalTargetWidth) {\n this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length - 1] += this.totalTargetWidth - sumRatioWidth;\n }\n }\n\n return this.stretchAllColumnsWidth[column];\n }\n\n /**\n * @param {Number} column\n * @returns {Number|null}\n * @private\n */\n _getStretchedLastColumnWidth(column) {\n let priv = privatePool.get(this);\n let totalColumns = priv.totalColumns;\n\n if (column === totalColumns - 1) {\n return this.stretchLastWidth;\n }\n\n return null;\n }\n\n /**\n * @param {Number} column Column index.\n * @returns {Number}\n * @private\n */\n _getColumnWidth(column) {\n let width = privatePool.get(this).columnWidthFn(column);\n\n if (width === void 0) {\n width = ViewportColumnsCalculator.DEFAULT_WIDTH;\n }\n\n return width;\n }\n}\n\nexport default ViewportColumnsCalculator;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/calculator/viewportColumns.js","const privatePool = new WeakMap();\n\n/**\n * Calculates indexes of rows to render OR rows that are visible.\n * To redo the calculation, you need to create a new calculator.\n *\n * @class ViewportRowsCalculator\n */\nclass ViewportRowsCalculator {\n /**\n * Default row height\n *\n * @type {Number}\n */\n static get DEFAULT_HEIGHT() {\n return 23;\n }\n\n /**\n * @param {Number} viewportHeight Height of the viewport\n * @param {Number} scrollOffset Current vertical scroll position of the viewport\n * @param {Number} totalRows Total number of rows\n * @param {Function} rowHeightFn Function that returns the height of the row at a given index (in px)\n * @param {Function} overrideFn Function that changes calculated this.startRow, this.endRow (used by MergeCells plugin)\n * @param {Boolean} onlyFullyVisible if `true`, only startRow and endRow will be indexes of rows that are fully in viewport\n * @param {Number} horizontalScrollbarHeight\n */\n constructor(viewportHeight, scrollOffset, totalRows, rowHeightFn, overrideFn, onlyFullyVisible, horizontalScrollbarHeight) {\n privatePool.set(this, {\n viewportHeight,\n scrollOffset,\n totalRows,\n rowHeightFn,\n overrideFn,\n onlyFullyVisible,\n horizontalScrollbarHeight\n });\n\n /**\n * Number of rendered/visible rows\n *\n * @type {Number}\n */\n this.count = 0;\n\n /**\n * Index of the first rendered/visible row (can be overwritten using overrideFn)\n *\n * @type {Number|null}\n */\n this.startRow = null;\n\n /**\n * Index of the last rendered/visible row (can be overwritten using overrideFn)\n *\n * @type {null}\n */\n this.endRow = null;\n\n /**\n * Position of the first rendered/visible row (in px)\n *\n * @type {Number|null}\n */\n this.startPosition = null;\n\n this.calculate();\n }\n\n /**\n * Calculates viewport\n */\n calculate() {\n let sum = 0;\n let needReverse = true;\n let startPositions = [];\n\n let priv = privatePool.get(this);\n let onlyFullyVisible = priv.onlyFullyVisible;\n let overrideFn = priv.overrideFn;\n let rowHeightFn = priv.rowHeightFn;\n let scrollOffset = priv.scrollOffset;\n let totalRows = priv.totalRows;\n let viewportHeight = priv.viewportHeight;\n let horizontalScrollbarHeight = priv.horizontalScrollbarHeight || 0;\n let rowHeight;\n\n // Calculate the number (start and end index) of rows needed\n for (let i = 0; i < totalRows; i++) {\n rowHeight = rowHeightFn(i);\n\n if (rowHeight === undefined) {\n rowHeight = ViewportRowsCalculator.DEFAULT_HEIGHT;\n }\n if (sum <= scrollOffset && !onlyFullyVisible) {\n this.startRow = i;\n }\n\n // the row is within the \"visible range\"\n if (sum >= scrollOffset && sum + rowHeight <= scrollOffset + viewportHeight - horizontalScrollbarHeight) {\n if (this.startRow === null) {\n this.startRow = i;\n }\n this.endRow = i;\n }\n startPositions.push(sum);\n sum += rowHeight;\n\n if (!onlyFullyVisible) {\n this.endRow = i;\n }\n if (sum >= scrollOffset + viewportHeight - horizontalScrollbarHeight) {\n needReverse = false;\n break;\n }\n }\n\n // If the estimation has reached the last row and there is still some space available in the viewport,\n // we need to render in reverse in order to fill the whole viewport with rows\n if (this.endRow === totalRows - 1 && needReverse) {\n this.startRow = this.endRow;\n\n while (this.startRow > 0) {\n // rowHeight is the height of the last row\n let viewportSum = startPositions[this.endRow] + rowHeight - startPositions[this.startRow - 1];\n\n if (viewportSum <= viewportHeight - horizontalScrollbarHeight || !onlyFullyVisible) {\n this.startRow--;\n }\n if (viewportSum >= viewportHeight - horizontalScrollbarHeight) {\n break;\n }\n }\n }\n\n if (this.startRow !== null && overrideFn) {\n overrideFn(this);\n }\n this.startPosition = startPositions[this.startRow];\n\n if (this.startPosition == void 0) {\n this.startPosition = null;\n }\n if (this.startRow !== null) {\n this.count = this.endRow - this.startRow + 1;\n }\n }\n}\n\nexport default ViewportRowsCalculator;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/calculator/viewportRows.js","import {\n addClass,\n fastInnerText,\n isVisible,\n removeClass,\n} from './../../../helpers/dom/element';\nimport {objectEach} from './../../../helpers/object';\nimport {toUpperCaseFirst, randomString} from './../../../helpers/string';\nimport Event from './event';\nimport Overlays from './overlays';\nimport Scroll from './scroll';\nimport Settings from './settings';\nimport Table from './table';\nimport Viewport from './viewport';\n\n/**\n * @class Walkontable\n */\nclass Walkontable {\n /**\n * @param {Object} settings\n */\n constructor(settings) {\n let originalHeaders = [];\n\n // this is the namespace for global events\n this.guid = `wt_${randomString()}`;\n\n // bootstrap from settings\n if (settings.cloneSource) {\n this.cloneSource = settings.cloneSource;\n this.cloneOverlay = settings.cloneOverlay;\n this.wtSettings = settings.cloneSource.wtSettings;\n this.wtTable = new Table(this, settings.table, settings.wtRootElement);\n this.wtScroll = new Scroll(this);\n this.wtViewport = settings.cloneSource.wtViewport;\n this.wtEvent = new Event(this);\n this.selections = this.cloneSource.selections;\n } else {\n this.wtSettings = new Settings(this, settings);\n this.wtTable = new Table(this, settings.table);\n this.wtScroll = new Scroll(this);\n this.wtViewport = new Viewport(this);\n this.wtEvent = new Event(this);\n this.selections = this.getSetting('selections');\n this.wtOverlays = new Overlays(this);\n this.exportSettingsAsClassNames();\n }\n\n // find original headers\n if (this.wtTable.THEAD.childNodes.length && this.wtTable.THEAD.childNodes[0].childNodes.length) {\n for (let c = 0, clen = this.wtTable.THEAD.childNodes[0].childNodes.length; c < clen; c++) {\n originalHeaders.push(this.wtTable.THEAD.childNodes[0].childNodes[c].innerHTML);\n }\n if (!this.getSetting('columnHeaders').length) {\n this.update('columnHeaders', [\n function(column, TH) {\n fastInnerText(TH, originalHeaders[column]);\n }\n ]);\n }\n }\n this.drawn = false;\n this.drawInterrupted = false;\n }\n\n /**\n * Force rerender of Walkontable\n *\n * @param {Boolean} [fastDraw=false] When `true`, try to refresh only the positions of borders without rerendering\n * the data. It will only work if Table.draw() does not force\n * rendering anyway\n * @returns {Walkontable}\n */\n draw(fastDraw = false) {\n this.drawInterrupted = false;\n\n if (!fastDraw && !isVisible(this.wtTable.TABLE)) {\n // draw interrupted because TABLE is not visible\n this.drawInterrupted = true;\n } else {\n this.wtTable.draw(fastDraw);\n }\n\n return this;\n }\n\n /**\n * Returns the TD at coords. If topmost is set to true, returns TD from the topmost overlay layer,\n * if not set or set to false, returns TD from the master table.\n *\n * @param {CellCoords} coords\n * @param {Boolean} [topmost=false]\n * @returns {Object}\n */\n getCell(coords, topmost = false) {\n if (!topmost) {\n return this.wtTable.getCell(coords);\n }\n\n let totalRows = this.wtSettings.getSetting('totalRows');\n let fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');\n let fixedRowsBottom = this.wtSettings.getSetting('fixedRowsBottom');\n let fixedColumns = this.wtSettings.getSetting('fixedColumnsLeft');\n\n if (coords.row < fixedRowsTop && coords.col < fixedColumns) {\n return this.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell(coords);\n\n } else if (coords.row < fixedRowsTop) {\n return this.wtOverlays.topOverlay.clone.wtTable.getCell(coords);\n\n } else if (coords.col < fixedColumns && coords.row >= totalRows - fixedRowsBottom) {\n if (this.wtOverlays.bottomLeftCornerOverlay && this.wtOverlays.bottomLeftCornerOverlay.clone) {\n return this.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell(coords);\n }\n\n } else if (coords.col < fixedColumns) {\n return this.wtOverlays.leftOverlay.clone.wtTable.getCell(coords);\n\n } else if (coords.row < totalRows && coords.row > totalRows - fixedRowsBottom) {\n if (this.wtOverlays.bottomOverlay && this.wtOverlays.bottomOverlay.clone) {\n return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(coords);\n }\n\n }\n\n return this.wtTable.getCell(coords);\n }\n\n /**\n * @param {Object} settings\n * @param {*} value\n * @returns {Walkontable}\n */\n update(settings, value) {\n return this.wtSettings.update(settings, value);\n }\n\n /**\n * Scroll the viewport to a row at the given index in the data source\n *\n * @param {Number} row\n * @returns {Walkontable}\n */\n scrollVertical(row) {\n this.wtOverlays.topOverlay.scrollTo(row);\n this.getSetting('onScrollVertically');\n\n return this;\n }\n\n /**\n * Scroll the viewport to a column at the given index in the data source\n *\n * @param {Number} column\n * @returns {Walkontable}\n */\n scrollHorizontal(column) {\n this.wtOverlays.leftOverlay.scrollTo(column);\n this.getSetting('onScrollHorizontally');\n\n return this;\n }\n\n /**\n * Scrolls the viewport to a cell (rerenders if needed)\n *\n * @param {CellCoords} coords\n * @returns {Walkontable}\n */\n scrollViewport(coords) {\n this.wtScroll.scrollViewport(coords);\n\n return this;\n }\n\n /**\n * @returns {Array}\n */\n getViewport() {\n return [\n this.wtTable.getFirstVisibleRow(),\n this.wtTable.getFirstVisibleColumn(),\n this.wtTable.getLastVisibleRow(),\n this.wtTable.getLastVisibleColumn()\n ];\n }\n\n /**\n * Get overlay name\n *\n * @returns {String}\n */\n getOverlayName() {\n return this.cloneOverlay ? this.cloneOverlay.type : 'master';\n }\n\n /**\n * Check overlay type of this Walkontable instance.\n *\n * @param {String} name Clone type @see {Overlay.CLONE_TYPES}.\n * @returns {Boolean}\n */\n isOverlayName(name) {\n if (this.cloneOverlay) {\n return this.cloneOverlay.type === name;\n }\n\n return false;\n }\n\n /**\n * Export settings as class names added to the parent element of the table.\n */\n exportSettingsAsClassNames() {\n let toExport = {\n rowHeaders: ['array'],\n columnHeaders: ['array']\n };\n let allClassNames = [];\n let newClassNames = [];\n\n objectEach(toExport, (optionType, key) => {\n if (optionType.indexOf('array') > -1 && this.getSetting(key).length) {\n newClassNames.push(`ht${toUpperCaseFirst(key)}`);\n }\n allClassNames.push(`ht${toUpperCaseFirst(key)}`);\n });\n removeClass(this.wtTable.wtRootElement.parentNode, allClassNames);\n addClass(this.wtTable.wtRootElement.parentNode, newClassNames);\n }\n\n /**\n * Get/Set Walkontable instance setting\n *\n * @param {String} key\n * @param {*} [param1]\n * @param {*} [param2]\n * @param {*} [param3]\n * @param {*} [param4]\n * @returns {*}\n */\n getSetting(key, param1, param2, param3, param4) {\n // this is faster than .apply - https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips\n return this.wtSettings.getSetting(key, param1, param2, param3, param4);\n }\n\n /**\n * Checks if setting exists\n *\n * @param {String} key\n * @returns {Boolean}\n */\n hasSetting(key) {\n return this.wtSettings.has(key);\n }\n\n /**\n * Destroy instance\n */\n destroy() {\n this.wtOverlays.destroy();\n this.wtEvent.destroy();\n }\n}\n\nexport default Walkontable;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/core.js","import {\n closestDown,\n hasClass,\n isChildOf,\n getParent,\n} from './../../../helpers/dom/element';\nimport {partial} from './../../../helpers/function';\nimport {isMobileBrowser} from './../../../helpers/browser';\nimport EventManager from './../../../eventManager';\n\n/**\n *\n */\nfunction Event(instance) {\n const that = this;\n const eventManager = new EventManager(instance);\n\n this.instance = instance;\n\n var dblClickOrigin = [null, null];\n this.dblClickTimeout = [null, null];\n\n var onMouseDown = function(event) {\n const activeElement = document.activeElement;\n const getParentNode = partial(getParent, event.realTarget);\n const realTarget = event.realTarget;\n\n // ignore focusable element from mouse down processing (https://github.com/handsontable/handsontable/issues/3555)\n if (realTarget === activeElement ||\n getParentNode(0) === activeElement ||\n getParentNode(1) === activeElement) {\n return;\n }\n\n var cell = that.parentCell(realTarget);\n\n if (hasClass(realTarget, 'corner')) {\n that.instance.getSetting('onCellCornerMouseDown', event, realTarget);\n } else if (cell.TD) {\n if (that.instance.hasSetting('onCellMouseDown')) {\n that.instance.getSetting('onCellMouseDown', event, cell.coords, cell.TD, that.instance);\n }\n }\n\n if (event.button !== 2) { // if not right mouse button\n if (cell.TD) {\n dblClickOrigin[0] = cell.TD;\n clearTimeout(that.dblClickTimeout[0]);\n that.dblClickTimeout[0] = setTimeout(() => {\n dblClickOrigin[0] = null;\n }, 1000);\n }\n }\n };\n\n var onTouchMove = function(event) {\n that.instance.touchMoving = true;\n };\n\n var longTouchTimeout;\n\n // /**\n // * Update touch event target - if user taps on resize handle 'hit area', update the target to the cell itself\n // * @param event\n // */\n /*\n var adjustTapTarget = function (event) {\n var currentSelection\n , properTarget;\n\n if(hasClass(event.target,'SelectionHandle')) {\n if(that.instance.selections[0].cellRange) {\n currentSelection = that.instance.selections[0].cellRange.highlight;\n\n properTarget = that.instance.getCell(currentSelection, true);\n }\n }\n\n if(properTarget) {\n Object.defineProperty(event,'target',{\n value: properTarget\n });\n }\n\n return event;\n };*/\n\n var onTouchStart = function(event) {\n var container = this;\n\n eventManager.addEventListener(this, 'touchmove', onTouchMove);\n\n // this.addEventListener(\"touchmove\", onTouchMove, false);\n\n // touch-and-hold event\n // longTouchTimeout = setTimeout(function () {\n // if(!that.instance.touchMoving) {\n // that.instance.longTouch = true;\n //\n // var targetCoords = offset(event.target);\n // var contextMenuEvent = new MouseEvent('contextmenu', {\n // clientX: targetCoords.left + event.target.offsetWidth,\n // clientY: targetCoords.top + event.target.offsetHeight,\n // button: 2\n // });\n //\n // that.instance.wtTable.holder.parentNode.parentNode.dispatchEvent(contextMenuEvent);\n // }\n // },200);\n\n // Prevent cell selection when scrolling with touch event - not the best solution performance-wise\n that.checkIfTouchMove = setTimeout(() => {\n if (that.instance.touchMoving === true) {\n that.instance.touchMoving = void 0;\n\n eventManager.removeEventListener('touchmove', onTouchMove, false);\n\n\n }\n // event = adjustTapTarget(event);\n\n onMouseDown(event);\n\n }, 30);\n\n // eventManager.removeEventListener(that.instance.wtTable.holder, \"mousedown\", onMouseDown);\n };\n\n var onMouseOver = function(event) {\n var table,\n td,\n mainWOT;\n\n if (that.instance.hasSetting('onCellMouseOver')) {\n table = that.instance.wtTable.TABLE;\n td = closestDown(event.realTarget, ['TD', 'TH'], table);\n mainWOT = that.instance.cloneSource || that.instance;\n\n if (td && td !== mainWOT.lastMouseOver && isChildOf(td, table)) {\n mainWOT.lastMouseOver = td;\n\n that.instance.getSetting('onCellMouseOver', event, that.instance.wtTable.getCoords(td), td, that.instance);\n }\n }\n };\n\n var onMouseOut = function(event) {\n let table;\n let lastTD;\n let nextTD;\n\n if (that.instance.hasSetting('onCellMouseOut')) {\n table = that.instance.wtTable.TABLE;\n lastTD = closestDown(event.realTarget, ['TD', 'TH'], table);\n nextTD = closestDown(event.relatedTarget, ['TD', 'TH'], table);\n\n if (lastTD && lastTD !== nextTD && isChildOf(lastTD, table)) {\n that.instance.getSetting('onCellMouseOut', event, that.instance.wtTable.getCoords(lastTD), lastTD, that.instance);\n }\n }\n };\n\n var onMouseUp = function(event) {\n if (event.button !== 2) { // if not right mouse button\n var cell = that.parentCell(event.realTarget);\n\n if (cell.TD === dblClickOrigin[0] && cell.TD === dblClickOrigin[1]) {\n if (hasClass(event.realTarget, 'corner')) {\n that.instance.getSetting('onCellCornerDblClick', event, cell.coords, cell.TD, that.instance);\n\n } else {\n that.instance.getSetting('onCellDblClick', event, cell.coords, cell.TD, that.instance);\n }\n\n dblClickOrigin[0] = null;\n dblClickOrigin[1] = null;\n\n } else if (cell.TD === dblClickOrigin[0]) {\n that.instance.getSetting('onCellMouseUp', event, cell.coords, cell.TD, that.instance);\n\n dblClickOrigin[1] = cell.TD;\n clearTimeout(that.dblClickTimeout[1]);\n that.dblClickTimeout[1] = setTimeout(() => {\n dblClickOrigin[1] = null;\n }, 500);\n\n } else if (cell.TD && that.instance.hasSetting('onCellMouseUp')) {\n that.instance.getSetting('onCellMouseUp', event, cell.coords, cell.TD, that.instance);\n }\n }\n };\n\n var onTouchEnd = function(event) {\n clearTimeout(longTouchTimeout);\n // that.instance.longTouch == void 0;\n\n event.preventDefault();\n onMouseUp(event);\n\n // eventManager.removeEventListener(that.instance.wtTable.holder, \"mouseup\", onMouseUp);\n };\n\n eventManager.addEventListener(this.instance.wtTable.holder, 'mousedown', onMouseDown);\n eventManager.addEventListener(this.instance.wtTable.TABLE, 'mouseover', onMouseOver);\n eventManager.addEventListener(this.instance.wtTable.TABLE, 'mouseout', onMouseOut);\n eventManager.addEventListener(this.instance.wtTable.holder, 'mouseup', onMouseUp);\n\n // check if full HOT instance, or detached WOT AND run on mobile device\n if (this.instance.wtTable.holder.parentNode.parentNode && isMobileBrowser() && !that.instance.wtTable.isWorkingOnClone()) {\n var classSelector = `.${this.instance.wtTable.holder.parentNode.className.split(' ').join('.')}`;\n\n eventManager.addEventListener(this.instance.wtTable.holder, 'touchstart', (event) => {\n that.instance.touchApplied = true;\n if (isChildOf(event.target, classSelector)) {\n onTouchStart.call(event.target, event);\n }\n });\n eventManager.addEventListener(this.instance.wtTable.holder, 'touchend', (event) => {\n that.instance.touchApplied = false;\n if (isChildOf(event.target, classSelector)) {\n onTouchEnd.call(event.target, event);\n }\n });\n\n if (!that.instance.momentumScrolling) {\n that.instance.momentumScrolling = {};\n }\n eventManager.addEventListener(this.instance.wtTable.holder, 'scroll', (event) => {\n clearTimeout(that.instance.momentumScrolling._timeout);\n\n if (!that.instance.momentumScrolling.ongoing) {\n that.instance.getSetting('onBeforeTouchScroll');\n }\n that.instance.momentumScrolling.ongoing = true;\n\n that.instance.momentumScrolling._timeout = setTimeout(() => {\n if (!that.instance.touchApplied) {\n that.instance.momentumScrolling.ongoing = false;\n\n that.instance.getSetting('onAfterMomentumScroll');\n }\n }, 200);\n });\n }\n\n eventManager.addEventListener(window, 'resize', () => {\n if (that.instance.getSetting('stretchH') !== 'none') {\n that.instance.draw();\n }\n });\n\n this.destroy = function() {\n clearTimeout(this.dblClickTimeout[0]);\n clearTimeout(this.dblClickTimeout[1]);\n\n eventManager.destroy();\n };\n}\n\nEvent.prototype.parentCell = function(elem) {\n var cell = {};\n var TABLE = this.instance.wtTable.TABLE;\n var TD = closestDown(elem, ['TD', 'TH'], TABLE);\n\n if (TD) {\n cell.coords = this.instance.wtTable.getCoords(TD);\n cell.TD = TD;\n\n } else if (hasClass(elem, 'wtBorder') && hasClass(elem, 'current')) {\n cell.coords = this.instance.selections.current.cellRange.highlight; // selections.current is current selected cell\n cell.TD = this.instance.wtTable.getCell(cell.coords);\n\n } else if (hasClass(elem, 'wtBorder') && hasClass(elem, 'area')) {\n if (this.instance.selections.area.cellRange) {\n cell.coords = this.instance.selections.area.cellRange.to; // selections.area is area selected cells\n cell.TD = this.instance.wtTable.getCell(cell.coords);\n }\n }\n\n return cell;\n};\n\nexport default Event;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/event.js","/**\n * @class ColumnFilter\n */\nclass ColumnFilter {\n /**\n * @param {Number} offset\n * @param {Number} total\n * @param {Number} countTH\n */\n constructor(offset, total, countTH) {\n this.offset = offset;\n this.total = total;\n this.countTH = countTH;\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n offsetted(index) {\n return index + this.offset;\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n unOffsetted(index) {\n return index - this.offset;\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n renderedToSource(index) {\n return this.offsetted(index);\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n sourceToRendered(index) {\n return this.unOffsetted(index);\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n offsettedTH(index) {\n return index - this.countTH;\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n unOffsettedTH(index) {\n return index + this.countTH;\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n visibleRowHeadedColumnToSourceColumn(index) {\n return this.renderedToSource(this.offsettedTH(index));\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n sourceColumnToVisibleRowHeadedColumn(index) {\n return this.unOffsettedTH(this.sourceToRendered(index));\n }\n}\n\nexport default ColumnFilter;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/filter/column.js","/**\n * @class RowFilter\n */\nclass RowFilter {\n /**\n * @param {Number} offset\n * @param {Number} total\n * @param {Number} countTH\n */\n constructor(offset, total, countTH) {\n this.offset = offset;\n this.total = total;\n this.countTH = countTH;\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n offsetted(index) {\n return index + this.offset;\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n unOffsetted(index) {\n return index - this.offset;\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n renderedToSource(index) {\n return this.offsetted(index);\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n sourceToRendered(index) {\n return this.unOffsetted(index);\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n offsettedTH(index) {\n return index - this.countTH;\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n unOffsettedTH(index) {\n return index + this.countTH;\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n visibleColHeadedRowToSourceRow(index) {\n return this.renderedToSource(this.offsettedTH(index));\n }\n\n /**\n * @param index\n * @returns {Number}\n */\n sourceRowToVisibleColHeadedRow(index) {\n return this.unOffsettedTH(this.sourceToRendered(index));\n }\n}\n\nexport default RowFilter;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/filter/row.js","import {\n getScrollableElement,\n getScrollbarWidth,\n getScrollLeft,\n getScrollTop,\n} from './../../../helpers/dom/element';\nimport {arrayEach} from './../../../helpers/array';\nimport {isKey} from './../../../helpers/unicode';\nimport {isMobileBrowser} from './../../../helpers/browser';\nimport EventManager from './../../../eventManager';\nimport Overlay from './overlay/_base.js';\n\n/**\n * @class Overlays\n */\nclass Overlays {\n /**\n * @param {Walkontable} wotInstance\n */\n constructor(wotInstance) {\n this.wot = wotInstance;\n\n // legacy support\n this.instance = this.wot;\n this.eventManager = new EventManager(this.wot);\n\n this.wot.update('scrollbarWidth', getScrollbarWidth());\n this.wot.update('scrollbarHeight', getScrollbarWidth());\n\n this.scrollableElement = getScrollableElement(this.wot.wtTable.TABLE);\n\n this.prepareOverlays();\n\n this.destroyed = false;\n this.keyPressed = false;\n this.spreaderLastSize = {\n width: null,\n height: null,\n };\n this.overlayScrollPositions = {\n master: {\n top: 0,\n left: 0,\n },\n top: {\n top: null,\n left: 0,\n },\n bottom: {\n top: null,\n left: 0\n },\n left: {\n top: 0,\n left: null\n }\n };\n\n this.pendingScrollCallbacks = {\n master: {\n top: 0,\n left: 0,\n },\n top: {\n left: 0,\n },\n bottom: {\n left: 0,\n },\n left: {\n top: 0,\n }\n };\n\n this.verticalScrolling = false;\n this.horizontalScrolling = false;\n this.delegatedScrollCallback = false;\n\n this.registeredListeners = [];\n\n this.registerListeners();\n }\n\n /**\n * Prepare overlays based on user settings.\n *\n * @returns {Boolean} Returns `true` if changes applied to overlay needs scroll synchronization.\n */\n prepareOverlays() {\n let syncScroll = false;\n\n if (this.topOverlay) {\n syncScroll = this.topOverlay.updateStateOfRendering() || syncScroll;\n } else {\n this.topOverlay = Overlay.createOverlay(Overlay.CLONE_TOP, this.wot);\n }\n\n if (!Overlay.hasOverlay(Overlay.CLONE_BOTTOM)) {\n this.bottomOverlay = {\n needFullRender: false,\n updateStateOfRendering: () => false,\n };\n }\n if (!Overlay.hasOverlay(Overlay.CLONE_BOTTOM_LEFT_CORNER)) {\n this.bottomLeftCornerOverlay = {\n needFullRender: false,\n updateStateOfRendering: () => false,\n };\n }\n\n if (this.bottomOverlay) {\n syncScroll = this.bottomOverlay.updateStateOfRendering() || syncScroll;\n } else {\n this.bottomOverlay = Overlay.createOverlay(Overlay.CLONE_BOTTOM, this.wot);\n }\n\n if (this.leftOverlay) {\n syncScroll = this.leftOverlay.updateStateOfRendering() || syncScroll;\n } else {\n this.leftOverlay = Overlay.createOverlay(Overlay.CLONE_LEFT, this.wot);\n }\n\n if (this.topOverlay.needFullRender && this.leftOverlay.needFullRender) {\n if (this.topLeftCornerOverlay) {\n syncScroll = this.topLeftCornerOverlay.updateStateOfRendering() || syncScroll;\n } else {\n this.topLeftCornerOverlay = Overlay.createOverlay(Overlay.CLONE_TOP_LEFT_CORNER, this.wot);\n }\n }\n\n if (this.bottomOverlay.needFullRender && this.leftOverlay.needFullRender) {\n if (this.bottomLeftCornerOverlay) {\n syncScroll = this.bottomLeftCornerOverlay.updateStateOfRendering() || syncScroll;\n } else {\n this.bottomLeftCornerOverlay = Overlay.createOverlay(Overlay.CLONE_BOTTOM_LEFT_CORNER, this.wot);\n }\n }\n\n if (this.wot.getSetting('debug') && !this.debug) {\n this.debug = Overlay.createOverlay(Overlay.CLONE_DEBUG, this.wot);\n }\n\n return syncScroll;\n }\n\n /**\n * Refresh and redraw table\n */\n refreshAll() {\n if (!this.wot.drawn) {\n return;\n }\n if (!this.wot.wtTable.holder.parentNode) {\n // Walkontable was detached from DOM, but this handler was not removed\n this.destroy();\n\n return;\n }\n this.wot.draw(true);\n\n if (this.verticalScrolling) {\n this.leftOverlay.onScroll();\n }\n\n if (this.horizontalScrolling) {\n this.topOverlay.onScroll();\n }\n\n this.verticalScrolling = false;\n this.horizontalScrolling = false;\n }\n\n /**\n * Register all necessary event listeners.\n */\n registerListeners() {\n const topOverlayScrollable = this.topOverlay.mainTableScrollableElement;\n const leftOverlayScrollable = this.leftOverlay.mainTableScrollableElement;\n\n let listenersToRegister = [];\n listenersToRegister.push([document.documentElement, 'keydown', (event) => this.onKeyDown(event)]);\n listenersToRegister.push([document.documentElement, 'keyup', () => this.onKeyUp()]);\n listenersToRegister.push([document, 'visibilitychange', () => this.onKeyUp()]);\n listenersToRegister.push([topOverlayScrollable, 'scroll', (event) => this.onTableScroll(event)]);\n\n if (topOverlayScrollable !== leftOverlayScrollable) {\n listenersToRegister.push([leftOverlayScrollable, 'scroll', (event) => this.onTableScroll(event)]);\n }\n\n if (this.topOverlay.needFullRender) {\n listenersToRegister.push([this.topOverlay.clone.wtTable.holder, 'scroll', (event) => this.onTableScroll(event)]);\n listenersToRegister.push([this.topOverlay.clone.wtTable.holder, 'wheel', (event) => this.onTableScroll(event)]);\n }\n\n if (this.bottomOverlay.needFullRender) {\n listenersToRegister.push([this.bottomOverlay.clone.wtTable.holder, 'scroll', (event) => this.onTableScroll(event)]);\n listenersToRegister.push([this.bottomOverlay.clone.wtTable.holder, 'wheel', (event) => this.onTableScroll(event)]);\n }\n\n if (this.leftOverlay.needFullRender) {\n listenersToRegister.push([this.leftOverlay.clone.wtTable.holder, 'scroll', (event) => this.onTableScroll(event)]);\n listenersToRegister.push([this.leftOverlay.clone.wtTable.holder, 'wheel', (event) => this.onTableScroll(event)]);\n }\n\n if (this.topLeftCornerOverlay && this.topLeftCornerOverlay.needFullRender) {\n listenersToRegister.push([this.topLeftCornerOverlay.clone.wtTable.holder, 'wheel', (event) => this.onTableScroll(event)]);\n }\n\n if (this.bottomLeftCornerOverlay && this.bottomLeftCornerOverlay.needFullRender) {\n listenersToRegister.push([this.bottomLeftCornerOverlay.clone.wtTable.holder, 'wheel', (event) => this.onTableScroll(event)]);\n }\n\n if (this.topOverlay.trimmingContainer !== window && this.leftOverlay.trimmingContainer !== window) {\n // This is necessary?\n // eventManager.addEventListener(window, 'scroll', (event) => this.refreshAll(event));\n listenersToRegister.push([window, 'wheel', (event) => {\n let overlay;\n let deltaY = event.wheelDeltaY || event.deltaY;\n let deltaX = event.wheelDeltaX || event.deltaX;\n\n if (this.topOverlay.clone.wtTable.holder.contains(event.realTarget)) {\n overlay = 'top';\n\n } else if (this.bottomOverlay.clone && this.bottomOverlay.clone.wtTable.holder.contains(event.realTarget)) {\n overlay = 'bottom';\n\n } else if (this.leftOverlay.clone.wtTable.holder.contains(event.realTarget)) {\n overlay = 'left';\n\n } else if (this.topLeftCornerOverlay && this.topLeftCornerOverlay.clone && this.topLeftCornerOverlay.clone.wtTable.holder.contains(event.realTarget)) {\n overlay = 'topLeft';\n\n } else if (this.bottomLeftCornerOverlay && this.bottomLeftCornerOverlay.clone && this.bottomLeftCornerOverlay.clone.wtTable.holder.contains(event.realTarget)) {\n overlay = 'bottomLeft';\n }\n\n if ((overlay == 'top' && deltaY !== 0) ||\n (overlay == 'left' && deltaX !== 0) ||\n (overlay == 'bottom' && deltaY !== 0) ||\n ((overlay === 'topLeft' || overlay === 'bottomLeft') && (deltaY !== 0 || deltaX !== 0))) {\n\n event.preventDefault();\n }\n }]);\n }\n\n while (listenersToRegister.length) {\n let listener = listenersToRegister.pop();\n this.eventManager.addEventListener(listener[0], listener[1], listener[2]);\n\n this.registeredListeners.push(listener);\n }\n }\n\n /**\n * Deregister all previously registered listeners.\n */\n deregisterListeners() {\n while (this.registeredListeners.length) {\n let listener = this.registeredListeners.pop();\n this.eventManager.removeEventListener(listener[0], listener[1], listener[2]);\n }\n }\n\n /**\n * Scroll listener\n *\n * @param {Event} event\n */\n onTableScroll(event) {\n // if mobile browser, do not update scroll positions, as the overlays are hidden during the scroll\n if (isMobileBrowser()) {\n return;\n }\n const masterHorizontal = this.leftOverlay.mainTableScrollableElement;\n const masterVertical = this.topOverlay.mainTableScrollableElement;\n const target = event.target;\n\n // For key press, sync only master -> overlay position because while pressing Walkontable.render is triggered\n // by hot.refreshBorder\n if (this.keyPressed) {\n if ((masterVertical !== window && target !== window && !event.target.contains(masterVertical)) ||\n (masterHorizontal !== window && target !== window && !event.target.contains(masterHorizontal))) {\n return;\n }\n }\n\n if (event.type === 'scroll') {\n this.syncScrollPositions(event);\n\n } else {\n this.translateMouseWheelToScroll(event);\n }\n }\n\n /**\n * Key down listener\n */\n onKeyDown(event) {\n this.keyPressed = isKey(event.keyCode, 'ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT');\n }\n\n /**\n * Key up listener\n */\n onKeyUp() {\n this.keyPressed = false;\n }\n\n /**\n * Translate wheel event into scroll event and sync scroll overlays position\n *\n * @private\n * @param {Event} event\n * @returns {Boolean}\n */\n translateMouseWheelToScroll(event) {\n const topOverlay = this.topOverlay.clone.wtTable.holder;\n const bottomOverlay = this.bottomOverlay.clone ? this.bottomOverlay.clone.wtTable.holder : null;\n const leftOverlay = this.leftOverlay.clone.wtTable.holder;\n const topLeftCornerOverlay = this.topLeftCornerOverlay && this.topLeftCornerOverlay.clone ? this.topLeftCornerOverlay.clone.wtTable.holder : null;\n const bottomLeftCornerOverlay = this.bottomLeftCornerOverlay && this.bottomLeftCornerOverlay.clone ? this.bottomLeftCornerOverlay.clone.wtTable.holder : null;\n const mouseWheelSpeedRatio = -0.2;\n let deltaY = event.wheelDeltaY || (-1) * event.deltaY;\n let deltaX = event.wheelDeltaX || (-1) * event.deltaX;\n let parentHolder = null;\n let eventMockup = {type: 'wheel'};\n let tempElem = event.target;\n let delta = null;\n\n // Fix for extremely slow header scrolling with a mousewheel on Firefox\n if (event.deltaMode === 1) {\n deltaY *= 120;\n deltaX *= 120;\n }\n\n while (tempElem != document && tempElem != null) {\n if (tempElem.className.indexOf('wtHolder') > -1) {\n parentHolder = tempElem;\n break;\n }\n tempElem = tempElem.parentNode;\n }\n eventMockup.target = parentHolder;\n\n if (parentHolder === topLeftCornerOverlay || parentHolder === bottomLeftCornerOverlay) {\n this.syncScrollPositions(eventMockup, mouseWheelSpeedRatio * deltaX, 'x');\n this.syncScrollPositions(eventMockup, mouseWheelSpeedRatio * deltaY, 'y');\n\n } else {\n if (parentHolder === topOverlay || parentHolder === bottomOverlay) {\n delta = deltaY;\n\n } else if (parentHolder === leftOverlay) {\n delta = deltaX;\n }\n\n this.syncScrollPositions(eventMockup, mouseWheelSpeedRatio * delta);\n }\n\n return false;\n }\n\n /**\n * Synchronize scroll position between master table and overlay table.\n *\n * @private\n * @param {Event|Object} event\n * @param {Number} [fakeScrollValue=null]\n * @param {String} [fakeScrollDirection=null] `x` or `y`.\n */\n syncScrollPositions(event, fakeScrollValue = null, fakeScrollDirection = null) {\n if (this.destroyed) {\n return;\n }\n if (arguments.length === 0) {\n this.syncScrollWithMaster();\n\n return;\n }\n let masterHorizontal = this.leftOverlay.mainTableScrollableElement;\n let masterVertical = this.topOverlay.mainTableScrollableElement;\n let target = event.target;\n let tempScrollValue = 0;\n let scrollValueChanged = false;\n let topOverlay;\n let leftOverlay;\n let topLeftCornerOverlay;\n let bottomLeftCornerOverlay;\n let bottomOverlay;\n let delegatedScroll = false;\n let preventOverflow = this.wot.getSetting('preventOverflow');\n\n if (this.topOverlay.needFullRender) {\n topOverlay = this.topOverlay.clone.wtTable.holder;\n }\n\n if (this.bottomOverlay.needFullRender) {\n bottomOverlay = this.bottomOverlay.clone.wtTable.holder;\n }\n\n if (this.leftOverlay.needFullRender) {\n leftOverlay = this.leftOverlay.clone.wtTable.holder;\n }\n\n if (this.leftOverlay.needFullRender && this.topOverlay.needFullRender) {\n topLeftCornerOverlay = this.topLeftCornerOverlay.clone.wtTable.holder;\n }\n\n if (this.leftOverlay.needFullRender && this.bottomOverlay.needFullRender) {\n bottomLeftCornerOverlay = this.bottomLeftCornerOverlay.clone.wtTable.holder;\n }\n\n if (target === document) {\n target = window;\n }\n\n if (target === masterHorizontal || target === masterVertical) {\n if (preventOverflow) {\n tempScrollValue = getScrollLeft(this.scrollableElement);\n } else {\n tempScrollValue = getScrollLeft(target);\n }\n\n // if scrolling the master table - populate the scroll values to both top and left overlays\n this.horizontalScrolling = true;\n this.overlayScrollPositions.master.left = tempScrollValue;\n scrollValueChanged = true;\n\n if (this.pendingScrollCallbacks.master.left > 0) {\n this.pendingScrollCallbacks.master.left--;\n\n } else {\n if (topOverlay && topOverlay.scrollLeft !== tempScrollValue) {\n\n if (fakeScrollValue == null) {\n this.pendingScrollCallbacks.top.left++;\n }\n\n topOverlay.scrollLeft = tempScrollValue;\n delegatedScroll = (masterHorizontal !== window);\n }\n\n if (bottomOverlay && bottomOverlay.scrollLeft !== tempScrollValue) {\n\n if (fakeScrollValue == null) {\n this.pendingScrollCallbacks.bottom.left++;\n }\n\n bottomOverlay.scrollLeft = tempScrollValue;\n delegatedScroll = (masterHorizontal !== window);\n }\n }\n\n tempScrollValue = getScrollTop(target);\n\n this.verticalScrolling = true;\n this.overlayScrollPositions.master.top = tempScrollValue;\n scrollValueChanged = true;\n\n if (this.pendingScrollCallbacks.master.top > 0) {\n this.pendingScrollCallbacks.master.top--;\n\n } else if (leftOverlay && leftOverlay.scrollTop !== tempScrollValue) {\n if (fakeScrollValue == null) {\n this.pendingScrollCallbacks.left.top++;\n }\n\n leftOverlay.scrollTop = tempScrollValue;\n delegatedScroll = (masterVertical !== window);\n }\n\n } else if (target === bottomOverlay) {\n tempScrollValue = getScrollLeft(target);\n\n // if scrolling the bottom overlay - populate the horizontal scroll to the master table\n this.horizontalScrolling = true;\n this.overlayScrollPositions.bottom.left = tempScrollValue;\n scrollValueChanged = true;\n\n if (this.pendingScrollCallbacks.bottom.left > 0) {\n this.pendingScrollCallbacks.bottom.left--;\n\n } else {\n if (fakeScrollValue == null) {\n this.pendingScrollCallbacks.master.left++;\n }\n\n masterHorizontal.scrollLeft = tempScrollValue;\n\n if (topOverlay && topOverlay.scrollLeft !== tempScrollValue) {\n if (fakeScrollValue == null) {\n this.pendingScrollCallbacks.top.left++;\n }\n\n topOverlay.scrollLeft = tempScrollValue;\n delegatedScroll = (masterVertical !== window);\n }\n\n }\n\n // \"fake\" scroll value calculated from the mousewheel event\n if (fakeScrollValue !== null) {\n scrollValueChanged = true;\n masterVertical.scrollTop += fakeScrollValue;\n }\n\n } else if (target === topOverlay) {\n tempScrollValue = getScrollLeft(target);\n\n // if scrolling the top overlay - populate the horizontal scroll to the master table\n this.horizontalScrolling = true;\n this.overlayScrollPositions.top.left = tempScrollValue;\n scrollValueChanged = true;\n\n if (this.pendingScrollCallbacks.top.left > 0) {\n this.pendingScrollCallbacks.top.left--;\n\n } else {\n\n if (fakeScrollValue == null) {\n this.pendingScrollCallbacks.master.left++;\n }\n\n masterHorizontal.scrollLeft = tempScrollValue;\n }\n\n // \"fake\" scroll value calculated from the mousewheel event\n if (fakeScrollValue !== null) {\n scrollValueChanged = true;\n masterVertical.scrollTop += fakeScrollValue;\n }\n\n if (bottomOverlay && bottomOverlay.scrollLeft !== tempScrollValue) {\n if (fakeScrollValue == null) {\n this.pendingScrollCallbacks.bottom.left++;\n }\n\n bottomOverlay.scrollLeft = tempScrollValue;\n delegatedScroll = (masterVertical !== window);\n }\n\n } else if (target === leftOverlay) {\n tempScrollValue = getScrollTop(target);\n\n // if scrolling the left overlay - populate the vertical scroll to the master table\n if (this.overlayScrollPositions.left.top !== tempScrollValue) {\n this.verticalScrolling = true;\n this.overlayScrollPositions.left.top = tempScrollValue;\n scrollValueChanged = true;\n\n if (this.pendingScrollCallbacks.left.top > 0) {\n this.pendingScrollCallbacks.left.top--;\n\n } else {\n if (fakeScrollValue == null) {\n this.pendingScrollCallbacks.master.top++;\n }\n\n masterVertical.scrollTop = tempScrollValue;\n }\n }\n\n // \"fake\" scroll value calculated from the mousewheel event\n if (fakeScrollValue !== null) {\n scrollValueChanged = true;\n masterVertical.scrollLeft += fakeScrollValue;\n }\n } else if (target === topLeftCornerOverlay || target === bottomLeftCornerOverlay) {\n if (fakeScrollValue !== null) {\n scrollValueChanged = true;\n\n if (fakeScrollDirection === 'x') {\n masterVertical.scrollLeft += fakeScrollValue;\n } else if (fakeScrollDirection === 'y') {\n masterVertical.scrollTop += fakeScrollValue;\n }\n }\n }\n\n if (!this.keyPressed && scrollValueChanged && event.type === 'scroll') {\n if (this.delegatedScrollCallback) {\n this.delegatedScrollCallback = false;\n } else {\n this.refreshAll();\n }\n\n if (delegatedScroll) {\n this.delegatedScrollCallback = true;\n }\n }\n }\n\n /**\n * Synchronize overlay scrollbars with the master scrollbar\n */\n syncScrollWithMaster() {\n const master = this.topOverlay.mainTableScrollableElement;\n const {scrollLeft, scrollTop} = master;\n\n if (this.topOverlay.needFullRender) {\n this.topOverlay.clone.wtTable.holder.scrollLeft = scrollLeft;\n }\n if (this.bottomOverlay.needFullRender) {\n this.bottomOverlay.clone.wtTable.holder.scrollLeft = scrollLeft;\n }\n if (this.leftOverlay.needFullRender) {\n this.leftOverlay.clone.wtTable.holder.scrollTop = scrollTop;\n }\n }\n\n /**\n * Update the main scrollable elements for all the overlays.\n */\n updateMainScrollableElements() {\n this.deregisterListeners();\n\n this.leftOverlay.updateMainScrollableElement();\n this.topOverlay.updateMainScrollableElement();\n\n if (this.bottomOverlay.needFullRender) {\n this.bottomOverlay.updateMainScrollableElement();\n }\n\n this.scrollableElement = getScrollableElement(this.wot.wtTable.TABLE);\n\n this.registerListeners();\n }\n\n /**\n *\n */\n destroy() {\n this.eventManager.destroy();\n this.topOverlay.destroy();\n\n if (this.bottomOverlay.clone) {\n this.bottomOverlay.destroy();\n }\n this.leftOverlay.destroy();\n\n if (this.topLeftCornerOverlay) {\n this.topLeftCornerOverlay.destroy();\n }\n\n if (this.bottomLeftCornerOverlay && this.bottomLeftCornerOverlay.clone) {\n this.bottomLeftCornerOverlay.destroy();\n }\n\n if (this.debug) {\n this.debug.destroy();\n }\n this.destroyed = true;\n }\n\n /**\n * @param {Boolean} [fastDraw=false]\n */\n refresh(fastDraw = false) {\n if (this.topOverlay.areElementSizesAdjusted && this.leftOverlay.areElementSizesAdjusted) {\n let container = this.wot.wtTable.wtRootElement.parentNode || this.wot.wtTable.wtRootElement;\n let width = container.clientWidth;\n let height = container.clientHeight;\n\n if (width !== this.spreaderLastSize.width || height !== this.spreaderLastSize.height) {\n this.spreaderLastSize.width = width;\n this.spreaderLastSize.height = height;\n this.adjustElementsSize();\n }\n }\n\n if (this.bottomOverlay.clone) {\n this.bottomOverlay.refresh(fastDraw);\n }\n\n this.leftOverlay.refresh(fastDraw);\n this.topOverlay.refresh(fastDraw);\n\n if (this.topLeftCornerOverlay) {\n this.topLeftCornerOverlay.refresh(fastDraw);\n }\n\n if (this.bottomLeftCornerOverlay && this.bottomLeftCornerOverlay.clone) {\n this.bottomLeftCornerOverlay.refresh(fastDraw);\n }\n\n if (this.debug) {\n this.debug.refresh(fastDraw);\n }\n }\n\n /**\n * Adjust overlays elements size and master table size\n *\n * @param {Boolean} [force=false]\n */\n adjustElementsSize(force = false) {\n let totalColumns = this.wot.getSetting('totalColumns');\n let totalRows = this.wot.getSetting('totalRows');\n let headerRowSize = this.wot.wtViewport.getRowHeaderWidth();\n let headerColumnSize = this.wot.wtViewport.getColumnHeaderHeight();\n let hiderStyle = this.wot.wtTable.hider.style;\n\n hiderStyle.width = `${headerRowSize + this.leftOverlay.sumCellSizes(0, totalColumns)}px`;\n hiderStyle.height = `${headerColumnSize + this.topOverlay.sumCellSizes(0, totalRows) + 1}px`;\n\n this.topOverlay.adjustElementsSize(force);\n this.leftOverlay.adjustElementsSize(force);\n\n if (this.bottomOverlay.clone) {\n this.bottomOverlay.adjustElementsSize(force);\n }\n }\n\n /**\n *\n */\n applyToDOM() {\n if (!this.topOverlay.areElementSizesAdjusted || !this.leftOverlay.areElementSizesAdjusted) {\n this.adjustElementsSize();\n }\n this.topOverlay.applyToDOM();\n\n if (this.bottomOverlay.clone) {\n this.bottomOverlay.applyToDOM();\n }\n\n this.leftOverlay.applyToDOM();\n }\n\n /**\n * Get the parent overlay of the provided element.\n *\n * @param {HTMLElement} element\n * @returns {Object|null}\n */\n getParentOverlay(element) {\n if (!element) {\n return null;\n }\n\n let overlays = [\n this.topOverlay,\n this.leftOverlay,\n this.bottomOverlay,\n this.topLeftCornerOverlay,\n this.bottomLeftCornerOverlay\n ];\n let result = null;\n\n arrayEach(overlays, (elem, i) => {\n if (!elem) {\n return;\n }\n\n if (elem.clone && elem.clone.wtTable.TABLE.contains(element)) {\n result = elem.clone;\n }\n });\n\n return result;\n }\n}\n\nexport default Overlays;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/overlays.js","import {\n innerHeight,\n innerWidth,\n getScrollLeft,\n getScrollTop,\n offset,\n} from './../../../helpers/dom/element';\nimport {rangeEach, rangeEachReverse} from './../../../helpers/number';\n\n/**\n * @class Scroll\n */\nclass Scroll {\n /**\n * @param {Walkontable} wotInstance\n */\n constructor(wotInstance) {\n this.wot = wotInstance;\n\n // legacy support\n this.instance = wotInstance;\n }\n\n /**\n * Scrolls viewport to a cell by minimum number of cells\n *\n * @param {CellCoords} coords\n */\n scrollViewport(coords) {\n if (!this.wot.drawn) {\n return;\n }\n\n const {\n topOverlay,\n leftOverlay,\n totalRows,\n totalColumns,\n fixedRowsTop,\n fixedRowsBottom,\n fixedColumnsLeft,\n } = this._getVariables();\n\n if (coords.row < 0 || coords.row > Math.max(totalRows - 1, 0)) {\n throw new Error(`row ${coords.row} does not exist`);\n }\n\n if (coords.col < 0 || coords.col > Math.max(totalColumns - 1, 0)) {\n throw new Error(`column ${coords.col} does not exist`);\n }\n\n if (coords.row >= fixedRowsTop && coords.row < this.getFirstVisibleRow()) {\n topOverlay.scrollTo(coords.row);\n\n } else if (coords.row > this.getLastVisibleRow() && coords.row < totalRows - fixedRowsBottom) {\n topOverlay.scrollTo(coords.row, true);\n }\n\n if (coords.col >= fixedColumnsLeft && coords.col < this.getFirstVisibleColumn()) {\n leftOverlay.scrollTo(coords.col);\n\n } else if (coords.col > this.getLastVisibleColumn()) {\n leftOverlay.scrollTo(coords.col, true);\n }\n }\n\n /**\n * Get first visible row based on virtual dom and how table is visible in browser window viewport.\n *\n * @returns {Number}\n */\n getFirstVisibleRow() {\n const {\n topOverlay,\n wtTable,\n wtViewport,\n totalRows,\n fixedRowsTop,\n } = this._getVariables();\n\n let firstVisibleRow = wtTable.getFirstVisibleRow();\n\n if (topOverlay.mainTableScrollableElement === window) {\n const rootElementOffset = offset(wtTable.wtRootElement);\n const totalTableHeight = innerHeight(wtTable.hider);\n const windowHeight = innerHeight(window);\n const windowScrollTop = getScrollTop(window);\n\n // Only calculate firstVisibleRow when table didn't filled (from up) whole viewport space\n if (rootElementOffset.top + totalTableHeight - windowHeight <= windowScrollTop) {\n let rowsHeight = wtViewport.getColumnHeaderHeight();\n\n rowsHeight += topOverlay.sumCellSizes(0, fixedRowsTop);\n\n rangeEachReverse(totalRows, 1, (row) => {\n rowsHeight += topOverlay.sumCellSizes(row - 1, row);\n\n if (rootElementOffset.top + totalTableHeight - rowsHeight <= windowScrollTop) {\n // Return physical row + 1\n firstVisibleRow = row;\n\n return false;\n }\n });\n }\n }\n\n return firstVisibleRow;\n }\n\n /**\n * Get last visible row based on virtual dom and how table is visible in browser window viewport.\n *\n * @returns {Number}\n */\n getLastVisibleRow() {\n const {\n topOverlay,\n wtTable,\n wtViewport,\n totalRows,\n } = this._getVariables();\n\n let lastVisibleRow = wtTable.getLastVisibleRow();\n\n if (topOverlay.mainTableScrollableElement === window) {\n const rootElementOffset = offset(wtTable.wtRootElement);\n const windowHeight = innerHeight(window);\n const windowScrollTop = getScrollTop(window);\n\n // Only calculate lastVisibleRow when table didn't filled (from bottom) whole viewport space\n if (rootElementOffset.top > windowScrollTop) {\n let rowsHeight = wtViewport.getColumnHeaderHeight();\n\n rangeEach(1, totalRows, (row) => {\n rowsHeight += topOverlay.sumCellSizes(row - 1, row);\n\n if (rootElementOffset.top + rowsHeight - windowScrollTop >= windowHeight) {\n // Return physical row - 1 (-2 because rangeEach gives row index + 1 - sumCellSizes requirements)\n lastVisibleRow = row - 2;\n\n return false;\n }\n });\n }\n }\n\n return lastVisibleRow;\n }\n\n /**\n * Get first visible column based on virtual dom and how table is visible in browser window viewport.\n *\n * @returns {Number}\n */\n getFirstVisibleColumn() {\n const {\n leftOverlay,\n wtTable,\n wtViewport,\n totalColumns,\n fixedColumnsLeft,\n } = this._getVariables();\n\n let firstVisibleColumn = wtTable.getFirstVisibleColumn();\n\n if (leftOverlay.mainTableScrollableElement === window) {\n const rootElementOffset = offset(wtTable.wtRootElement);\n const totalTableWidth = innerWidth(wtTable.hider);\n const windowWidth = innerWidth(window);\n const windowScrollLeft = getScrollLeft(window);\n\n // Only calculate firstVisibleColumn when table didn't filled (from left) whole viewport space\n if (rootElementOffset.left + totalTableWidth - windowWidth <= windowScrollLeft) {\n let columnsWidth = wtViewport.getRowHeaderWidth();\n\n rangeEachReverse(totalColumns, 1, (column) => {\n columnsWidth += leftOverlay.sumCellSizes(column - 1, column);\n\n if (rootElementOffset.left + totalTableWidth - columnsWidth <= windowScrollLeft) {\n // Return physical column + 1\n firstVisibleColumn = column;\n\n return false;\n }\n });\n }\n }\n\n return firstVisibleColumn;\n }\n\n /**\n * Get last visible column based on virtual dom and how table is visible in browser window viewport.\n *\n * @returns {Number}\n */\n getLastVisibleColumn() {\n const {\n leftOverlay,\n wtTable,\n wtViewport,\n totalColumns,\n } = this._getVariables();\n\n let lastVisibleColumn = wtTable.getLastVisibleColumn();\n\n if (leftOverlay.mainTableScrollableElement === window) {\n const rootElementOffset = offset(wtTable.wtRootElement);\n const windowWidth = innerWidth(window);\n const windowScrollLeft = getScrollLeft(window);\n\n // Only calculate lastVisibleColumn when table didn't filled (from right) whole viewport space\n if (rootElementOffset.left > windowScrollLeft) {\n let columnsWidth = wtViewport.getRowHeaderWidth();\n\n rangeEach(1, totalColumns, (column) => {\n columnsWidth += leftOverlay.sumCellSizes(column - 1, column);\n\n if (rootElementOffset.left + columnsWidth - windowScrollLeft >= windowWidth) {\n // Return physical column - 1 (-2 because rangeEach gives column index + 1 - sumCellSizes requirements)\n lastVisibleColumn = column - 2;\n\n return false;\n }\n });\n }\n }\n\n return lastVisibleColumn;\n }\n\n /**\n * Returns collection of variables used to rows and columns visibility calculations.\n *\n * @returns {Object}\n * @private\n */\n _getVariables() {\n const wot = this.wot;\n const topOverlay = wot.wtOverlays.topOverlay;\n const leftOverlay = wot.wtOverlays.leftOverlay;\n const wtTable = wot.wtTable;\n const wtViewport = wot.wtViewport;\n const totalRows = wot.getSetting('totalRows');\n const totalColumns = wot.getSetting('totalColumns');\n const fixedRowsTop = wot.getSetting('fixedRowsTop');\n const fixedRowsBottom = wot.getSetting('fixedRowsBottom');\n const fixedColumnsLeft = wot.getSetting('fixedColumnsLeft');\n\n return {\n topOverlay,\n leftOverlay,\n wtTable,\n wtViewport,\n totalRows,\n totalColumns,\n fixedRowsTop,\n fixedRowsBottom,\n fixedColumnsLeft\n };\n }\n}\n\nexport default Scroll;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/scroll.js","import {fastInnerText} from './../../../helpers/dom/element';\nimport {hasOwnProperty} from './../../../helpers/object';\n\n/**\n * @class Settings\n */\nclass Settings {\n /**\n * @param {Walkontable} wotInstance\n * @param {Object} settings\n */\n constructor(wotInstance, settings) {\n this.wot = wotInstance;\n\n // legacy support\n this.instance = wotInstance;\n\n // default settings. void 0 means it is required, null means it can be empty\n this.defaults = {\n table: void 0,\n debug: false, // shows WalkontableDebugOverlay\n\n // presentation mode\n externalRowCalculator: false,\n stretchH: 'none', // values: all, last, none\n currentRowClassName: null,\n currentColumnClassName: null,\n preventOverflow() {\n return false;\n },\n\n // data source\n data: void 0,\n freezeOverlays: false,\n fixedColumnsLeft: 0,\n fixedRowsTop: 0,\n fixedRowsBottom: 0,\n minSpareRows: 0,\n\n // this must be array of functions: [function (row, TH) {}]\n rowHeaders() {\n return [];\n },\n\n // this must be array of functions: [function (column, TH) {}]\n columnHeaders() {\n return [];\n },\n totalRows: void 0,\n totalColumns: void 0,\n cellRenderer: (row, column, TD) => {\n let cellData = this.getSetting('data', row, column);\n\n fastInnerText(TD, cellData === void 0 || cellData === null ? '' : cellData);\n },\n\n // columnWidth: 50,\n columnWidth(col) {\n // return undefined means use default size for the rendered cell content\n },\n rowHeight(row) {\n // return undefined means use default size for the rendered cell content\n },\n defaultRowHeight: 23,\n defaultColumnWidth: 50,\n selections: null,\n hideBorderOnMouseDownOver: false,\n viewportRowCalculatorOverride: null,\n viewportColumnCalculatorOverride: null,\n\n // callbacks\n onCellMouseDown: null,\n onCellMouseOver: null,\n onCellMouseOut: null,\n onCellMouseUp: null,\n\n // onCellMouseOut: null,\n onCellDblClick: null,\n onCellCornerMouseDown: null,\n onCellCornerDblClick: null,\n beforeDraw: null,\n onDraw: null,\n onBeforeDrawBorders: null,\n onScrollVertically: null,\n onScrollHorizontally: null,\n onBeforeTouchScroll: null,\n onAfterMomentumScroll: null,\n onBeforeStretchingColumnWidth: (width) => width,\n onModifyRowHeaderWidth: null,\n\n // constants\n scrollbarWidth: 10,\n scrollbarHeight: 10,\n\n renderAllRows: false,\n groups: false,\n rowHeaderWidth: null,\n columnHeaderHeight: null,\n headerClassName: null\n };\n\n // reference to settings\n this.settings = {};\n\n for (let i in this.defaults) {\n if (hasOwnProperty(this.defaults, i)) {\n if (settings[i] !== void 0) {\n this.settings[i] = settings[i];\n\n } else if (this.defaults[i] === void 0) {\n throw new Error(`A required setting \"${i}\" was not provided`);\n\n } else {\n this.settings[i] = this.defaults[i];\n }\n }\n }\n }\n\n /**\n * Update settings\n *\n * @param {Object} settings\n * @param {*} value\n * @returns {Walkontable}\n */\n update(settings, value) {\n if (value === void 0) { // settings is object\n for (let i in settings) {\n if (hasOwnProperty(settings, i)) {\n this.settings[i] = settings[i];\n }\n }\n } else { // if value is defined then settings is the key\n this.settings[settings] = value;\n }\n return this.wot;\n }\n\n /**\n * Get setting by name\n *\n * @param {String} key\n * @param {*} param1\n * @param {*} param2\n * @param {*} param3\n * @param {*} param4\n * @returns {*}\n */\n getSetting(key, param1, param2, param3, param4) {\n if (typeof this.settings[key] === 'function') {\n // this is faster than .apply - https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips\n return this.settings[key](param1, param2, param3, param4);\n\n } else if (param1 !== void 0 && Array.isArray(this.settings[key])) {\n // perhaps this can be removed, it is only used in tests\n return this.settings[key][param1];\n\n }\n\n return this.settings[key];\n }\n\n /**\n * Checks if setting exists\n *\n * @param {Boolean} key\n * @returns {Boolean}\n */\n has(key) {\n return !!this.settings[key];\n }\n}\n\nexport default Settings;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/settings.js","import {\n getStyle,\n getTrimmingContainer,\n hasClass,\n index,\n offset,\n removeClass,\n removeTextNodes,\n overlayContainsElement,\n closest\n} from './../../../helpers/dom/element';\nimport {isFunction} from './../../../helpers/function';\nimport CellCoords from './cell/coords';\nimport CellRange from './cell/range';\nimport ColumnFilter from './filter/column';\nimport RowFilter from './filter/row';\nimport TableRenderer from './tableRenderer';\nimport Overlay from './overlay/_base';\n\n/**\n *\n */\nclass Table {\n /**\n * @param {Walkontable} wotInstance\n * @param {HTMLTableElement} table\n */\n constructor(wotInstance, table) {\n this.wot = wotInstance;\n\n // legacy support\n this.instance = this.wot;\n this.TABLE = table;\n this.TBODY = null;\n this.THEAD = null;\n this.COLGROUP = null;\n this.tableOffset = 0;\n this.holderOffset = 0;\n\n removeTextNodes(this.TABLE);\n\n this.spreader = this.createSpreader(this.TABLE);\n this.hider = this.createHider(this.spreader);\n this.holder = this.createHolder(this.hider);\n\n this.wtRootElement = this.holder.parentNode;\n this.alignOverlaysWithTrimmingContainer();\n this.fixTableDomTree();\n\n this.colgroupChildrenLength = this.COLGROUP.childNodes.length;\n this.theadChildrenLength = this.THEAD.firstChild ? this.THEAD.firstChild.childNodes.length : 0;\n this.tbodyChildrenLength = this.TBODY.childNodes.length;\n\n this.rowFilter = null;\n this.columnFilter = null;\n this.correctHeaderWidth = false;\n\n const origRowHeaderWidth = this.wot.wtSettings.settings.rowHeaderWidth;\n\n // Fix for jumping row headers (https://github.com/handsontable/handsontable/issues/3850)\n this.wot.wtSettings.settings.rowHeaderWidth = () => this._modifyRowHeaderWidth(origRowHeaderWidth);\n }\n\n /**\n *\n */\n fixTableDomTree() {\n this.TBODY = this.TABLE.querySelector('tbody');\n\n if (!this.TBODY) {\n this.TBODY = document.createElement('tbody');\n this.TABLE.appendChild(this.TBODY);\n }\n this.THEAD = this.TABLE.querySelector('thead');\n\n if (!this.THEAD) {\n this.THEAD = document.createElement('thead');\n this.TABLE.insertBefore(this.THEAD, this.TBODY);\n }\n this.COLGROUP = this.TABLE.querySelector('colgroup');\n\n if (!this.COLGROUP) {\n this.COLGROUP = document.createElement('colgroup');\n this.TABLE.insertBefore(this.COLGROUP, this.THEAD);\n }\n\n if (this.wot.getSetting('columnHeaders').length && !this.THEAD.childNodes.length) {\n this.THEAD.appendChild(document.createElement('TR'));\n }\n }\n\n /**\n * @param table\n * @returns {HTMLElement}\n */\n createSpreader(table) {\n const parent = table.parentNode;\n let spreader;\n\n if (!parent || parent.nodeType !== 1 || !hasClass(parent, 'wtHolder')) {\n spreader = document.createElement('div');\n spreader.className = 'wtSpreader';\n\n if (parent) {\n // if TABLE is detached (e.g. in Jasmine test), it has no parentNode so we cannot attach holder to it\n parent.insertBefore(spreader, table);\n }\n spreader.appendChild(table);\n }\n spreader.style.position = 'relative';\n\n return spreader;\n }\n\n /**\n * @param spreader\n * @returns {HTMLElement}\n */\n createHider(spreader) {\n const parent = spreader.parentNode;\n let hider;\n\n if (!parent || parent.nodeType !== 1 || !hasClass(parent, 'wtHolder')) {\n hider = document.createElement('div');\n hider.className = 'wtHider';\n\n if (parent) {\n // if TABLE is detached (e.g. in Jasmine test), it has no parentNode so we cannot attach holder to it\n parent.insertBefore(hider, spreader);\n }\n hider.appendChild(spreader);\n }\n\n return hider;\n }\n\n /**\n *\n * @param hider\n * @returns {HTMLElement}\n */\n createHolder(hider) {\n const parent = hider.parentNode;\n let holder;\n\n if (!parent || parent.nodeType !== 1 || !hasClass(parent, 'wtHolder')) {\n holder = document.createElement('div');\n holder.style.position = 'relative';\n holder.className = 'wtHolder';\n\n if (parent) {\n // if TABLE is detached (e.g. in Jasmine test), it has no parentNode so we cannot attach holder to it\n parent.insertBefore(holder, hider);\n }\n if (!this.isWorkingOnClone()) {\n holder.parentNode.className += 'ht_master handsontable';\n }\n holder.appendChild(hider);\n }\n\n return holder;\n }\n\n alignOverlaysWithTrimmingContainer() {\n const trimmingElement = getTrimmingContainer(this.wtRootElement);\n\n if (!this.isWorkingOnClone()) {\n this.holder.parentNode.style.position = 'relative';\n\n if (trimmingElement === window) {\n let preventOverflow = this.wot.getSetting('preventOverflow');\n\n if (!preventOverflow) {\n this.holder.style.overflow = 'visible';\n this.wtRootElement.style.overflow = 'visible';\n }\n } else {\n this.holder.style.width = getStyle(trimmingElement, 'width');\n this.holder.style.height = getStyle(trimmingElement, 'height');\n this.holder.style.overflow = '';\n }\n }\n }\n\n isWorkingOnClone() {\n return !!this.wot.cloneSource;\n }\n\n /**\n * Redraws the table\n *\n * @param {Boolean} fastDraw If TRUE, will try to avoid full redraw and only update the border positions. If FALSE or UNDEFINED, will perform a full redraw\n * @returns {Table}\n */\n draw(fastDraw) {\n const {wtOverlays, wtViewport} = this.wot;\n let totalRows = this.instance.getSetting('totalRows');\n let rowHeaders = this.wot.getSetting('rowHeaders').length;\n let columnHeaders = this.wot.getSetting('columnHeaders').length;\n let syncScroll = false;\n\n if (!this.isWorkingOnClone()) {\n this.holderOffset = offset(this.holder);\n fastDraw = wtViewport.createRenderCalculators(fastDraw);\n\n if (rowHeaders && !this.wot.getSetting('fixedColumnsLeft')) {\n const leftScrollPos = wtOverlays.leftOverlay.getScrollPosition();\n const previousState = this.correctHeaderWidth;\n\n this.correctHeaderWidth = leftScrollPos > 0;\n\n if (previousState !== this.correctHeaderWidth) {\n fastDraw = false;\n }\n }\n }\n\n if (!this.isWorkingOnClone()) {\n syncScroll = wtOverlays.prepareOverlays();\n }\n\n if (fastDraw) {\n if (!this.isWorkingOnClone()) {\n // in case we only scrolled without redraw, update visible rows information in oldRowsCalculator\n wtViewport.createVisibleCalculators();\n }\n if (wtOverlays) {\n wtOverlays.refresh(true);\n }\n } else {\n if (this.isWorkingOnClone()) {\n this.tableOffset = this.wot.cloneSource.wtTable.tableOffset;\n } else {\n this.tableOffset = offset(this.TABLE);\n }\n let startRow;\n\n if (Overlay.isOverlayTypeOf(this.wot.cloneOverlay, Overlay.CLONE_DEBUG) ||\n Overlay.isOverlayTypeOf(this.wot.cloneOverlay, Overlay.CLONE_TOP) ||\n Overlay.isOverlayTypeOf(this.wot.cloneOverlay, Overlay.CLONE_TOP_LEFT_CORNER)) {\n startRow = 0;\n } else if (Overlay.isOverlayTypeOf(this.instance.cloneOverlay, Overlay.CLONE_BOTTOM) ||\n Overlay.isOverlayTypeOf(this.instance.cloneOverlay, Overlay.CLONE_BOTTOM_LEFT_CORNER)) {\n startRow = Math.max(totalRows - this.wot.getSetting('fixedRowsBottom'), 0);\n } else {\n startRow = wtViewport.rowsRenderCalculator.startRow;\n }\n let startColumn;\n\n if (Overlay.isOverlayTypeOf(this.wot.cloneOverlay, Overlay.CLONE_DEBUG) ||\n Overlay.isOverlayTypeOf(this.wot.cloneOverlay, Overlay.CLONE_LEFT) ||\n Overlay.isOverlayTypeOf(this.wot.cloneOverlay, Overlay.CLONE_TOP_LEFT_CORNER) ||\n Overlay.isOverlayTypeOf(this.wot.cloneOverlay, Overlay.CLONE_BOTTOM_LEFT_CORNER)) {\n startColumn = 0;\n } else {\n startColumn = wtViewport.columnsRenderCalculator.startColumn;\n }\n this.rowFilter = new RowFilter(startRow, totalRows, columnHeaders);\n this.columnFilter = new ColumnFilter(startColumn, this.wot.getSetting('totalColumns'), rowHeaders);\n\n this.alignOverlaysWithTrimmingContainer();\n this._doDraw(); // creates calculator after draw\n }\n this.refreshSelections(fastDraw);\n\n if (!this.isWorkingOnClone()) {\n wtOverlays.topOverlay.resetFixedPosition();\n\n if (wtOverlays.bottomOverlay.clone) {\n wtOverlays.bottomOverlay.resetFixedPosition();\n }\n\n wtOverlays.leftOverlay.resetFixedPosition();\n\n if (wtOverlays.topLeftCornerOverlay) {\n wtOverlays.topLeftCornerOverlay.resetFixedPosition();\n }\n\n if (wtOverlays.bottomLeftCornerOverlay && wtOverlays.bottomLeftCornerOverlay.clone) {\n wtOverlays.bottomLeftCornerOverlay.resetFixedPosition();\n }\n }\n if (syncScroll) {\n wtOverlays.syncScrollWithMaster();\n }\n this.wot.drawn = true;\n\n return this;\n }\n\n _doDraw() {\n const wtRenderer = new TableRenderer(this);\n\n wtRenderer.render();\n }\n\n removeClassFromCells(className) {\n const nodes = this.TABLE.querySelectorAll(`.${className}`);\n\n for (let i = 0, len = nodes.length; i < len; i++) {\n removeClass(nodes[i], className);\n }\n }\n\n refreshSelections(fastDraw) {\n if (!this.wot.selections) {\n return;\n }\n let len = this.wot.selections.length;\n\n if (fastDraw) {\n for (let i = 0; i < len; i++) {\n // there was no rerender, so we need to remove classNames by ourselves\n if (this.wot.selections[i].settings.className) {\n this.removeClassFromCells(this.wot.selections[i].settings.className);\n }\n if (this.wot.selections[i].settings.highlightHeaderClassName) {\n this.removeClassFromCells(this.wot.selections[i].settings.highlightHeaderClassName);\n }\n if (this.wot.selections[i].settings.highlightRowClassName) {\n this.removeClassFromCells(this.wot.selections[i].settings.highlightRowClassName);\n }\n if (this.wot.selections[i].settings.highlightColumnClassName) {\n this.removeClassFromCells(this.wot.selections[i].settings.highlightColumnClassName);\n }\n }\n }\n for (let i = 0; i < len; i++) {\n this.wot.selections[i].draw(this.wot, fastDraw);\n }\n }\n\n /**\n * Get cell element at coords.\n *\n * @param {CellCoords} coords\n * @returns {HTMLElement|Number} HTMLElement on success or Number one of the exit codes on error:\n * -1 row before viewport\n * -2 row after viewport\n */\n getCell(coords) {\n if (this.isRowBeforeRenderedRows(coords.row)) {\n // row before rendered rows\n return -1;\n\n } else if (this.isRowAfterRenderedRows(coords.row)) {\n // row after rendered rows\n return -2;\n }\n\n const TR = this.TBODY.childNodes[this.rowFilter.sourceToRendered(coords.row)];\n\n if (TR) {\n return TR.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(coords.col)];\n }\n }\n\n /**\n * getColumnHeader\n *\n * @param {Number} col Column index\n * @param {Number} [level=0] Header level (0 = most distant to the table)\n * @returns {Object} HTMLElement on success or undefined on error\n */\n getColumnHeader(col, level = 0) {\n const TR = this.THEAD.childNodes[level];\n\n if (TR) {\n return TR.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(col)];\n }\n }\n\n /**\n * getRowHeader\n *\n * @param {Number} row Row index\n * @returns {HTMLElement} HTMLElement on success or Number one of the exit codes on error: `null table doesn't have row headers`\n */\n getRowHeader(row) {\n if (this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0) === 0) {\n return null;\n }\n const TR = this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];\n\n if (TR) {\n return TR.childNodes[0];\n }\n }\n\n /**\n * Returns cell coords object for a given TD\n *\n * @param {HTMLTableCellElement} TD\n * @returns {CellCoords}\n */\n getCoords(TD) {\n if (TD.nodeName !== 'TD' && TD.nodeName !== 'TH') {\n TD = closest(TD, ['TD', 'TH']);\n }\n\n const TR = TD.parentNode;\n const CONTAINER = TR.parentNode;\n let row = index(TR);\n let col = TD.cellIndex;\n\n if (overlayContainsElement(Overlay.CLONE_TOP_LEFT_CORNER, TD) || overlayContainsElement(Overlay.CLONE_TOP, TD)) {\n if (CONTAINER.nodeName === 'THEAD') {\n row -= CONTAINER.childNodes.length;\n }\n\n } else if (CONTAINER === this.THEAD) {\n row = this.rowFilter.visibleColHeadedRowToSourceRow(row);\n\n } else {\n row = this.rowFilter.renderedToSource(row);\n }\n\n if (overlayContainsElement(Overlay.CLONE_TOP_LEFT_CORNER, TD) || overlayContainsElement(Overlay.CLONE_LEFT, TD)) {\n col = this.columnFilter.offsettedTH(col);\n\n } else {\n col = this.columnFilter.visibleRowHeadedColumnToSourceColumn(col);\n }\n\n return new CellCoords(row, col);\n }\n\n getTrForRow(row) {\n return this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];\n }\n\n getFirstRenderedRow() {\n return this.wot.wtViewport.rowsRenderCalculator.startRow;\n }\n\n getFirstVisibleRow() {\n return this.wot.wtViewport.rowsVisibleCalculator.startRow;\n }\n\n getFirstRenderedColumn() {\n return this.wot.wtViewport.columnsRenderCalculator.startColumn;\n }\n\n /**\n * @returns {Number} Returns -1 if no row is visible\n */\n getFirstVisibleColumn() {\n return this.wot.wtViewport.columnsVisibleCalculator.startColumn;\n }\n\n /**\n * @returns {Number} Returns -1 if no row is visible\n */\n getLastRenderedRow() {\n return this.wot.wtViewport.rowsRenderCalculator.endRow;\n }\n\n getLastVisibleRow() {\n return this.wot.wtViewport.rowsVisibleCalculator.endRow;\n }\n\n getLastRenderedColumn() {\n return this.wot.wtViewport.columnsRenderCalculator.endColumn;\n }\n\n /**\n * @returns {Number} Returns -1 if no column is visible\n */\n getLastVisibleColumn() {\n return this.wot.wtViewport.columnsVisibleCalculator.endColumn;\n }\n\n isRowBeforeRenderedRows(row) {\n return this.rowFilter && (this.rowFilter.sourceToRendered(row) < 0 && row >= 0);\n }\n\n isRowAfterViewport(row) {\n return this.rowFilter && (this.rowFilter.sourceToRendered(row) > this.getLastVisibleRow());\n }\n\n isRowAfterRenderedRows(row) {\n return this.rowFilter && (this.rowFilter.sourceToRendered(row) > this.getLastRenderedRow());\n }\n\n isColumnBeforeViewport(column) {\n return this.columnFilter && (this.columnFilter.sourceToRendered(column) < 0 && column >= 0);\n }\n\n isColumnAfterViewport(column) {\n return this.columnFilter && (this.columnFilter.sourceToRendered(column) > this.getLastVisibleColumn());\n }\n\n isLastRowFullyVisible() {\n return this.getLastVisibleRow() === this.getLastRenderedRow();\n }\n\n isLastColumnFullyVisible() {\n return this.getLastVisibleColumn() === this.getLastRenderedColumn();\n }\n\n getRenderedColumnsCount() {\n let columnsCount = this.wot.wtViewport.columnsRenderCalculator.count;\n let totalColumns = this.wot.getSetting('totalColumns');\n\n if (this.wot.isOverlayName(Overlay.CLONE_DEBUG)) {\n columnsCount = totalColumns;\n\n } else if (this.wot.isOverlayName(Overlay.CLONE_LEFT) ||\n this.wot.isOverlayName(Overlay.CLONE_TOP_LEFT_CORNER) ||\n this.wot.isOverlayName(Overlay.CLONE_BOTTOM_LEFT_CORNER)) {\n return Math.min(this.wot.getSetting('fixedColumnsLeft'), totalColumns);\n\n }\n\n return columnsCount;\n }\n\n getRenderedRowsCount() {\n let rowsCount = this.wot.wtViewport.rowsRenderCalculator.count;\n let totalRows = this.wot.getSetting('totalRows');\n\n if (this.wot.isOverlayName(Overlay.CLONE_DEBUG)) {\n rowsCount = totalRows;\n\n } else if (this.wot.isOverlayName(Overlay.CLONE_TOP) ||\n this.wot.isOverlayName(Overlay.CLONE_TOP_LEFT_CORNER)) {\n rowsCount = Math.min(this.wot.getSetting('fixedRowsTop'), totalRows);\n\n } else if (this.wot.isOverlayName(Overlay.CLONE_BOTTOM) ||\n this.wot.isOverlayName(Overlay.CLONE_BOTTOM_LEFT_CORNER)) {\n rowsCount = Math.min(this.wot.getSetting('fixedRowsBottom'), totalRows);\n }\n\n return rowsCount;\n }\n\n getVisibleRowsCount() {\n return this.wot.wtViewport.rowsVisibleCalculator.count;\n }\n\n allRowsInViewport() {\n return this.wot.getSetting('totalRows') == this.getVisibleRowsCount();\n }\n\n /**\n * Checks if any of the row's cells content exceeds its initial height, and if so, returns the oversized height\n *\n * @param {Number} sourceRow\n * @returns {Number}\n */\n getRowHeight(sourceRow) {\n let height = this.wot.wtSettings.settings.rowHeight(sourceRow);\n let oversizedHeight = this.wot.wtViewport.oversizedRows[sourceRow];\n\n if (oversizedHeight !== void 0) {\n height = height === void 0 ? oversizedHeight : Math.max(height, oversizedHeight);\n }\n\n return height;\n }\n\n getColumnHeaderHeight(level) {\n let height = this.wot.wtSettings.settings.defaultRowHeight;\n let oversizedHeight = this.wot.wtViewport.oversizedColumnHeaders[level];\n\n if (oversizedHeight !== void 0) {\n height = height ? Math.max(height, oversizedHeight) : oversizedHeight;\n }\n\n return height;\n }\n\n getVisibleColumnsCount() {\n return this.wot.wtViewport.columnsVisibleCalculator.count;\n }\n\n allColumnsInViewport() {\n return this.wot.getSetting('totalColumns') == this.getVisibleColumnsCount();\n }\n\n getColumnWidth(sourceColumn) {\n let width = this.wot.wtSettings.settings.columnWidth;\n\n if (typeof width === 'function') {\n width = width(sourceColumn);\n\n } else if (typeof width === 'object') {\n width = width[sourceColumn];\n }\n\n return width || this.wot.wtSettings.settings.defaultColumnWidth;\n }\n\n getStretchedColumnWidth(sourceColumn) {\n let columnWidth = this.getColumnWidth(sourceColumn);\n let width = columnWidth == null ? this.instance.wtSettings.settings.defaultColumnWidth : columnWidth;\n let calculator = this.wot.wtViewport.columnsRenderCalculator;\n\n if (calculator) {\n let stretchedWidth = calculator.getStretchedColumnWidth(sourceColumn, width);\n\n if (stretchedWidth) {\n width = stretchedWidth;\n }\n }\n\n return width;\n }\n\n /**\n * Modify row header widths provided by user in class contructor.\n *\n * @private\n */\n _modifyRowHeaderWidth(rowHeaderWidthFactory) {\n let widths = isFunction(rowHeaderWidthFactory) ? rowHeaderWidthFactory() : null;\n\n if (Array.isArray(widths)) {\n widths = [...widths];\n widths[widths.length - 1] = this._correctRowHeaderWidth(widths[widths.length - 1]);\n } else {\n widths = this._correctRowHeaderWidth(widths);\n }\n\n return widths;\n }\n\n /**\n * Correct row header width if necessary.\n *\n * @private\n */\n _correctRowHeaderWidth(width) {\n if (typeof width !== 'number') {\n width = this.wot.getSetting('defaultColumnWidth');\n }\n if (this.correctHeaderWidth) {\n width++;\n }\n\n return width;\n }\n}\n\nexport default Table;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/table.js","import {\n addClass,\n empty,\n getScrollbarWidth,\n hasClass,\n innerHeight,\n outerWidth\n} from './../../../helpers/dom/element';\nimport Overlay from './overlay/_base';\n\nlet performanceWarningAppeared = false;\n\n/**\n * @class TableRenderer\n */\nclass TableRenderer {\n /**\n * @param {WalkontableTable} wtTable\n */\n constructor(wtTable) {\n this.wtTable = wtTable;\n this.wot = wtTable.instance;\n\n // legacy support\n this.instance = wtTable.instance;\n\n this.rowFilter = wtTable.rowFilter;\n this.columnFilter = wtTable.columnFilter;\n\n this.TABLE = wtTable.TABLE;\n this.THEAD = wtTable.THEAD;\n this.TBODY = wtTable.TBODY;\n this.COLGROUP = wtTable.COLGROUP;\n\n this.rowHeaders = [];\n this.rowHeaderCount = 0;\n this.columnHeaders = [];\n this.columnHeaderCount = 0;\n this.fixedRowsTop = 0;\n this.fixedRowsBottom = 0;\n }\n\n /**\n *\n */\n render() {\n if (!this.wtTable.isWorkingOnClone()) {\n const skipRender = {};\n this.wot.getSetting('beforeDraw', true, skipRender);\n\n if (skipRender.skipRender === true) {\n return;\n }\n }\n\n this.rowHeaders = this.wot.getSetting('rowHeaders');\n this.rowHeaderCount = this.rowHeaders.length;\n this.fixedRowsTop = this.wot.getSetting('fixedRowsTop');\n this.fixedRowsBottom = this.wot.getSetting('fixedRowsBottom');\n this.columnHeaders = this.wot.getSetting('columnHeaders');\n this.columnHeaderCount = this.columnHeaders.length;\n\n let columnsToRender = this.wtTable.getRenderedColumnsCount();\n let rowsToRender = this.wtTable.getRenderedRowsCount();\n let totalColumns = this.wot.getSetting('totalColumns');\n let totalRows = this.wot.getSetting('totalRows');\n let workspaceWidth;\n let adjusted = false;\n\n if (Overlay.isOverlayTypeOf(this.wot.cloneOverlay, Overlay.CLONE_BOTTOM) ||\n Overlay.isOverlayTypeOf(this.wot.cloneOverlay, Overlay.CLONE_BOTTOM_LEFT_CORNER)) {\n\n // do NOT render headers on the bottom or bottom-left corner overlay\n this.columnHeaders = [];\n this.columnHeaderCount = 0;\n }\n\n if (totalColumns >= 0) {\n // prepare COL and TH elements for rendering\n this.adjustAvailableNodes();\n adjusted = true;\n\n // adjust column widths according to user widths settings\n this.renderColumnHeaders();\n\n // Render table rows\n this.renderRows(totalRows, rowsToRender, columnsToRender);\n\n if (!this.wtTable.isWorkingOnClone()) {\n workspaceWidth = this.wot.wtViewport.getWorkspaceWidth();\n this.wot.wtViewport.containerWidth = null;\n }\n\n this.adjustColumnWidths(columnsToRender);\n this.markOversizedColumnHeaders();\n this.adjustColumnHeaderHeights();\n }\n\n if (!adjusted) {\n this.adjustAvailableNodes();\n }\n this.removeRedundantRows(rowsToRender);\n\n if (!this.wtTable.isWorkingOnClone() || this.wot.isOverlayName(Overlay.CLONE_BOTTOM)) {\n this.markOversizedRows();\n }\n if (!this.wtTable.isWorkingOnClone()) {\n this.wot.wtViewport.createVisibleCalculators();\n this.wot.wtOverlays.refresh(false);\n\n this.wot.wtOverlays.applyToDOM();\n\n let hiderWidth = outerWidth(this.wtTable.hider);\n let tableWidth = outerWidth(this.wtTable.TABLE);\n\n if (hiderWidth !== 0 && (tableWidth !== hiderWidth)) {\n // Recalculate the column widths, if width changes made in the overlays removed the scrollbar, thus changing the viewport width.\n this.adjustColumnWidths(columnsToRender);\n }\n\n if (workspaceWidth !== this.wot.wtViewport.getWorkspaceWidth()) {\n // workspace width changed though to shown/hidden vertical scrollbar. Let's reapply stretching\n this.wot.wtViewport.containerWidth = null;\n\n let firstRendered = this.wtTable.getFirstRenderedColumn();\n let lastRendered = this.wtTable.getLastRenderedColumn();\n let defaultColumnWidth = this.wot.getSetting('defaultColumnWidth');\n let rowHeaderWidthSetting = this.wot.getSetting('rowHeaderWidth');\n\n rowHeaderWidthSetting = this.instance.getSetting('onModifyRowHeaderWidth', rowHeaderWidthSetting);\n\n if (rowHeaderWidthSetting != null) {\n for (let i = 0; i < this.rowHeaderCount; i++) {\n let width = Array.isArray(rowHeaderWidthSetting) ? rowHeaderWidthSetting[i] : rowHeaderWidthSetting;\n\n width = width == null ? defaultColumnWidth : width;\n\n this.COLGROUP.childNodes[i].style.width = `${width}px`;\n }\n }\n\n for (let i = firstRendered; i < lastRendered; i++) {\n let width = this.wtTable.getStretchedColumnWidth(i);\n let renderedIndex = this.columnFilter.sourceToRendered(i);\n\n this.COLGROUP.childNodes[renderedIndex + this.rowHeaderCount].style.width = `${width}px`;\n }\n }\n\n this.wot.getSetting('onDraw', true);\n\n } else if (this.wot.isOverlayName(Overlay.CLONE_BOTTOM)) {\n this.wot.cloneSource.wtOverlays.adjustElementsSize();\n }\n }\n\n /**\n * @param {Number} renderedRowsCount\n */\n removeRedundantRows(renderedRowsCount) {\n while (this.wtTable.tbodyChildrenLength > renderedRowsCount) {\n this.TBODY.removeChild(this.TBODY.lastChild);\n this.wtTable.tbodyChildrenLength--;\n }\n }\n\n /**\n * @param {Number} totalRows\n * @param {Number} rowsToRender\n * @param {Number} columnsToRender\n */\n renderRows(totalRows, rowsToRender, columnsToRender) {\n let lastTD,\n TR;\n let visibleRowIndex = 0;\n let sourceRowIndex = this.rowFilter.renderedToSource(visibleRowIndex);\n let isWorkingOnClone = this.wtTable.isWorkingOnClone();\n\n while (sourceRowIndex < totalRows && sourceRowIndex >= 0) {\n if (!performanceWarningAppeared && visibleRowIndex > 1000) {\n performanceWarningAppeared = true;\n console.warn('Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting the number ' +\n 'of rendered rows by specifying the table height and/or turning off the \"renderAllRows\" option.');\n }\n if (rowsToRender !== void 0 && visibleRowIndex === rowsToRender) {\n // We have as much rows as needed for this clone\n break;\n }\n TR = this.getOrCreateTrForRow(visibleRowIndex, TR);\n\n // Render row headers\n this.renderRowHeaders(sourceRowIndex, TR);\n // Add and/or remove TDs to TR to match the desired number\n this.adjustColumns(TR, columnsToRender + this.rowHeaderCount);\n\n lastTD = this.renderCells(sourceRowIndex, TR, columnsToRender);\n\n if (!isWorkingOnClone ||\n // Necessary to refresh oversized row heights after editing cell in overlays\n this.wot.isOverlayName(Overlay.CLONE_BOTTOM)) {\n // Reset the oversized row cache for this row\n this.resetOversizedRow(sourceRowIndex);\n }\n\n if (TR.firstChild) {\n // if I have 2 fixed columns with one-line content and the 3rd column has a multiline content, this is\n // the way to make sure that the overlay will has same row height\n let height = this.wot.wtTable.getRowHeight(sourceRowIndex);\n\n if (height) {\n // Decrease height. 1 pixel will be \"replaced\" by 1px border top\n height--;\n TR.firstChild.style.height = `${height}px`;\n } else {\n TR.firstChild.style.height = '';\n }\n }\n visibleRowIndex++;\n sourceRowIndex = this.rowFilter.renderedToSource(visibleRowIndex);\n }\n }\n\n /**\n * Reset the oversized row cache for the provided index\n *\n * @param {Number} sourceRow Row index\n */\n resetOversizedRow(sourceRow) {\n if (this.wot.getSetting('externalRowCalculator')) {\n return;\n }\n if (this.wot.wtViewport.oversizedRows && this.wot.wtViewport.oversizedRows[sourceRow]) {\n this.wot.wtViewport.oversizedRows[sourceRow] = void 0;\n }\n }\n\n /**\n * Check if any of the rendered rows is higher than expected, and if so, cache them\n */\n markOversizedRows() {\n if (this.wot.getSetting('externalRowCalculator')) {\n return;\n }\n let rowCount = this.instance.wtTable.TBODY.childNodes.length;\n let expectedTableHeight = rowCount * this.instance.wtSettings.settings.defaultRowHeight;\n let actualTableHeight = innerHeight(this.instance.wtTable.TBODY) - 1;\n let previousRowHeight;\n let rowInnerHeight;\n let sourceRowIndex;\n let currentTr;\n let rowHeader;\n let totalRows = this.instance.getSetting('totalRows');\n\n if (expectedTableHeight === actualTableHeight && !this.instance.getSetting('fixedRowsBottom')) {\n // If the actual table height equals rowCount * default single row height, no row is oversized -> no need to iterate over them\n return;\n }\n\n while (rowCount) {\n rowCount--;\n sourceRowIndex = this.instance.wtTable.rowFilter.renderedToSource(rowCount);\n previousRowHeight = this.instance.wtTable.getRowHeight(sourceRowIndex);\n currentTr = this.instance.wtTable.getTrForRow(sourceRowIndex);\n rowHeader = currentTr.querySelector('th');\n\n if (rowHeader) {\n rowInnerHeight = innerHeight(rowHeader);\n } else {\n rowInnerHeight = innerHeight(currentTr) - 1;\n }\n\n if ((!previousRowHeight && this.instance.wtSettings.settings.defaultRowHeight < rowInnerHeight ||\n previousRowHeight < rowInnerHeight)) {\n this.instance.wtViewport.oversizedRows[sourceRowIndex] = ++rowInnerHeight;\n }\n }\n }\n\n /**\n * Check if any of the rendered columns is higher than expected, and if so, cache them.\n */\n markOversizedColumnHeaders() {\n let overlayName = this.wot.getOverlayName();\n\n if (!this.columnHeaderCount || this.wot.wtViewport.hasOversizedColumnHeadersMarked[overlayName] || this.wtTable.isWorkingOnClone()) {\n return;\n }\n let columnCount = this.wtTable.getRenderedColumnsCount();\n\n for (let i = 0; i < this.columnHeaderCount; i++) {\n for (let renderedColumnIndex = (-1) * this.rowHeaderCount; renderedColumnIndex < columnCount; renderedColumnIndex++) {\n this.markIfOversizedColumnHeader(renderedColumnIndex);\n }\n }\n this.wot.wtViewport.hasOversizedColumnHeadersMarked[overlayName] = true;\n }\n\n /**\n *\n */\n adjustColumnHeaderHeights() {\n let columnHeaders = this.wot.getSetting('columnHeaders');\n let children = this.wot.wtTable.THEAD.childNodes;\n let oversizedColumnHeaders = this.wot.wtViewport.oversizedColumnHeaders;\n\n for (let i = 0, len = columnHeaders.length; i < len; i++) {\n if (oversizedColumnHeaders[i]) {\n if (!children[i] || children[i].childNodes.length === 0) {\n return;\n }\n children[i].childNodes[0].style.height = `${oversizedColumnHeaders[i]}px`;\n }\n }\n }\n\n /**\n * Check if column header for the specified column is higher than expected, and if so, cache it\n *\n * @param {Number} col Index of column\n */\n markIfOversizedColumnHeader(col) {\n let sourceColIndex = this.wot.wtTable.columnFilter.renderedToSource(col);\n let level = this.columnHeaderCount;\n let defaultRowHeight = this.wot.wtSettings.settings.defaultRowHeight;\n let previousColHeaderHeight;\n let currentHeader;\n let currentHeaderHeight;\n let columnHeaderHeightSetting = this.wot.getSetting('columnHeaderHeight') || [];\n\n while (level) {\n level--;\n\n previousColHeaderHeight = this.wot.wtTable.getColumnHeaderHeight(level);\n currentHeader = this.wot.wtTable.getColumnHeader(sourceColIndex, level);\n\n if (!currentHeader) {\n /* eslint-disable no-continue */\n continue;\n }\n currentHeaderHeight = innerHeight(currentHeader);\n\n if (!previousColHeaderHeight && defaultRowHeight < currentHeaderHeight || previousColHeaderHeight < currentHeaderHeight) {\n this.wot.wtViewport.oversizedColumnHeaders[level] = currentHeaderHeight;\n }\n\n if (Array.isArray(columnHeaderHeightSetting)) {\n if (columnHeaderHeightSetting[level] != null) {\n this.wot.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting[level];\n }\n\n } else if (!isNaN(columnHeaderHeightSetting)) {\n this.wot.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting;\n }\n\n if (this.wot.wtViewport.oversizedColumnHeaders[level] < (columnHeaderHeightSetting[level] || columnHeaderHeightSetting)) {\n this.wot.wtViewport.oversizedColumnHeaders[level] = (columnHeaderHeightSetting[level] || columnHeaderHeightSetting);\n }\n }\n }\n\n /**\n * @param {Number} sourceRowIndex\n * @param {HTMLTableRowElement} TR\n * @param {Number} columnsToRender\n * @returns {HTMLTableCellElement}\n */\n renderCells(sourceRowIndex, TR, columnsToRender) {\n let TD;\n let sourceColIndex;\n\n for (let visibleColIndex = 0; visibleColIndex < columnsToRender; visibleColIndex++) {\n sourceColIndex = this.columnFilter.renderedToSource(visibleColIndex);\n\n if (visibleColIndex === 0) {\n TD = TR.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(sourceColIndex)];\n } else {\n TD = TD.nextSibling; // http://jsperf.com/nextsibling-vs-indexed-childnodes\n }\n // If the number of headers has been reduced, we need to replace excess TH with TD\n if (TD.nodeName == 'TH') {\n TD = replaceThWithTd(TD, TR);\n }\n if (!hasClass(TD, 'hide')) {\n TD.className = '';\n }\n TD.removeAttribute('style');\n this.wot.wtSettings.settings.cellRenderer(sourceRowIndex, sourceColIndex, TD);\n }\n\n return TD;\n }\n\n /**\n * @param {Number} columnsToRender Number of columns to render.\n */\n adjustColumnWidths(columnsToRender) {\n let scrollbarCompensation = 0;\n let sourceInstance = this.wot.cloneSource ? this.wot.cloneSource : this.wot;\n let mainHolder = sourceInstance.wtTable.holder;\n let defaultColumnWidth = this.wot.getSetting('defaultColumnWidth');\n let rowHeaderWidthSetting = this.wot.getSetting('rowHeaderWidth');\n\n if (mainHolder.offsetHeight < mainHolder.scrollHeight) {\n scrollbarCompensation = getScrollbarWidth();\n }\n this.wot.wtViewport.columnsRenderCalculator.refreshStretching(this.wot.wtViewport.getViewportWidth() - scrollbarCompensation);\n\n rowHeaderWidthSetting = this.instance.getSetting('onModifyRowHeaderWidth', rowHeaderWidthSetting);\n\n if (rowHeaderWidthSetting != null) {\n for (let i = 0; i < this.rowHeaderCount; i++) {\n let width = Array.isArray(rowHeaderWidthSetting) ? rowHeaderWidthSetting[i] : rowHeaderWidthSetting;\n\n width = width == null ? defaultColumnWidth : width;\n\n this.COLGROUP.childNodes[i].style.width = `${width}px`;\n }\n }\n\n for (let renderedColIndex = 0; renderedColIndex < columnsToRender; renderedColIndex++) {\n let width = this.wtTable.getStretchedColumnWidth(this.columnFilter.renderedToSource(renderedColIndex));\n\n this.COLGROUP.childNodes[renderedColIndex + this.rowHeaderCount].style.width = `${width}px`;\n }\n }\n\n /**\n * @param {HTMLTableCellElement} TR\n */\n appendToTbody(TR) {\n this.TBODY.appendChild(TR);\n this.wtTable.tbodyChildrenLength++;\n }\n\n /**\n * @param {Number} rowIndex\n * @param {HTMLTableRowElement} currentTr\n * @returns {HTMLTableCellElement}\n */\n getOrCreateTrForRow(rowIndex, currentTr) {\n let TR;\n\n if (rowIndex >= this.wtTable.tbodyChildrenLength) {\n TR = this.createRow();\n this.appendToTbody(TR);\n\n } else if (rowIndex === 0) {\n TR = this.TBODY.firstChild;\n\n } else {\n // http://jsperf.com/nextsibling-vs-indexed-childnodes\n TR = currentTr.nextSibling;\n }\n if (TR.className) {\n TR.removeAttribute('class');\n }\n\n return TR;\n }\n\n /**\n * @returns {HTMLTableCellElement}\n */\n createRow() {\n let TR = document.createElement('TR');\n\n for (let visibleColIndex = 0; visibleColIndex < this.rowHeaderCount; visibleColIndex++) {\n TR.appendChild(document.createElement('TH'));\n }\n\n return TR;\n }\n\n /**\n * @param {Number} row\n * @param {Number} col\n * @param {HTMLTableCellElement} TH\n */\n renderRowHeader(row, col, TH) {\n TH.className = '';\n TH.removeAttribute('style');\n this.rowHeaders[col](row, TH, col);\n }\n\n /**\n * @param {Number} row\n * @param {HTMLTableCellElement} TR\n */\n renderRowHeaders(row, TR) {\n for (let TH = TR.firstChild, visibleColIndex = 0; visibleColIndex < this.rowHeaderCount; visibleColIndex++) {\n // If the number of row headers increased we need to create TH or replace an existing TD node with TH\n if (!TH) {\n TH = document.createElement('TH');\n TR.appendChild(TH);\n\n } else if (TH.nodeName == 'TD') {\n TH = replaceTdWithTh(TH, TR);\n }\n this.renderRowHeader(row, visibleColIndex, TH);\n // http://jsperf.com/nextsibling-vs-indexed-childnodes\n TH = TH.nextSibling;\n }\n }\n\n /**\n * Adjust the number of COL and TH elements to match the number of columns and headers that need to be rendered\n */\n adjustAvailableNodes() {\n this.adjustColGroups();\n this.adjustThead();\n }\n\n /**\n * Renders the column headers\n */\n renderColumnHeaders() {\n if (!this.columnHeaderCount) {\n return;\n }\n let columnCount = this.wtTable.getRenderedColumnsCount();\n\n for (let i = 0; i < this.columnHeaderCount; i++) {\n let TR = this.getTrForColumnHeaders(i);\n\n for (let renderedColumnIndex = (-1) * this.rowHeaderCount; renderedColumnIndex < columnCount; renderedColumnIndex++) {\n let sourceCol = this.columnFilter.renderedToSource(renderedColumnIndex);\n\n this.renderColumnHeader(i, sourceCol, TR.childNodes[renderedColumnIndex + this.rowHeaderCount]);\n }\n }\n }\n\n /**\n * Adjusts the number of COL elements to match the number of columns that need to be rendered\n */\n adjustColGroups() {\n let columnCount = this.wtTable.getRenderedColumnsCount();\n\n while (this.wtTable.colgroupChildrenLength < columnCount + this.rowHeaderCount) {\n this.COLGROUP.appendChild(document.createElement('COL'));\n this.wtTable.colgroupChildrenLength++;\n }\n while (this.wtTable.colgroupChildrenLength > columnCount + this.rowHeaderCount) {\n this.COLGROUP.removeChild(this.COLGROUP.lastChild);\n this.wtTable.colgroupChildrenLength--;\n }\n if (this.rowHeaderCount) {\n addClass(this.COLGROUP.childNodes[0], 'rowHeader');\n }\n }\n\n /**\n * Adjusts the number of TH elements in THEAD to match the number of headers and columns that need to be rendered\n */\n adjustThead() {\n let columnCount = this.wtTable.getRenderedColumnsCount();\n let TR = this.THEAD.firstChild;\n\n if (this.columnHeaders.length) {\n for (let i = 0, len = this.columnHeaders.length; i < len; i++) {\n TR = this.THEAD.childNodes[i];\n\n if (!TR) {\n TR = document.createElement('TR');\n this.THEAD.appendChild(TR);\n }\n this.theadChildrenLength = TR.childNodes.length;\n\n while (this.theadChildrenLength < columnCount + this.rowHeaderCount) {\n TR.appendChild(document.createElement('TH'));\n this.theadChildrenLength++;\n }\n while (this.theadChildrenLength > columnCount + this.rowHeaderCount) {\n TR.removeChild(TR.lastChild);\n this.theadChildrenLength--;\n }\n }\n let theadChildrenLength = this.THEAD.childNodes.length;\n\n if (theadChildrenLength > this.columnHeaders.length) {\n for (let i = this.columnHeaders.length; i < theadChildrenLength; i++) {\n this.THEAD.removeChild(this.THEAD.lastChild);\n }\n }\n } else if (TR) {\n empty(TR);\n }\n }\n\n /**\n * @param {Number} index\n * @returns {HTMLTableCellElement}\n */\n getTrForColumnHeaders(index) {\n return this.THEAD.childNodes[index];\n }\n\n /**\n * @param {Number} row\n * @param {Number} col\n * @param {HTMLTableCellElement} TH\n * @returns {*}\n */\n renderColumnHeader(row, col, TH) {\n TH.className = '';\n TH.removeAttribute('style');\n\n return this.columnHeaders[row](col, TH, row);\n }\n\n /**\n * Add and/or remove the TDs to match the desired number\n *\n * @param {HTMLTableCellElement} TR Table row in question\n * @param {Number} desiredCount The desired number of TDs in the TR\n */\n adjustColumns(TR, desiredCount) {\n let count = TR.childNodes.length;\n\n while (count < desiredCount) {\n let TD = document.createElement('TD');\n\n TR.appendChild(TD);\n count++;\n }\n while (count > desiredCount) {\n TR.removeChild(TR.lastChild);\n count--;\n }\n }\n\n /**\n * @param {Number} columnsToRender\n */\n removeRedundantColumns(columnsToRender) {\n while (this.wtTable.tbodyChildrenLength > columnsToRender) {\n this.TBODY.removeChild(this.TBODY.lastChild);\n this.wtTable.tbodyChildrenLength--;\n }\n }\n}\n\nfunction replaceTdWithTh(TD, TR) {\n let TH = document.createElement('TH');\n\n TR.insertBefore(TH, TD);\n TR.removeChild(TD);\n\n return TH;\n}\n\nfunction replaceThWithTd(TH, TR) {\n let TD = document.createElement('TD');\n\n TR.insertBefore(TD, TH);\n TR.removeChild(TH);\n\n return TD;\n}\n\nexport default TableRenderer;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/tableRenderer.js","import {\n getScrollbarWidth,\n getScrollTop,\n getStyle,\n offset,\n outerHeight,\n outerWidth,\n} from './../../../helpers/dom/element';\nimport {objectEach} from './../../../helpers/object';\nimport EventManager from './../../../eventManager';\nimport ViewportColumnsCalculator from './calculator/viewportColumns';\nimport ViewportRowsCalculator from './calculator/viewportRows';\n\n/**\n * @class Viewport\n */\nclass Viewport {\n /**\n * @param wotInstance\n */\n constructor(wotInstance) {\n this.wot = wotInstance;\n // legacy support\n this.instance = this.wot;\n\n this.oversizedRows = [];\n this.oversizedColumnHeaders = [];\n this.hasOversizedColumnHeadersMarked = {};\n this.clientHeight = 0;\n this.containerWidth = NaN;\n this.rowHeaderWidth = NaN;\n this.rowsVisibleCalculator = null;\n this.columnsVisibleCalculator = null;\n\n this.eventManager = new EventManager(this.wot);\n this.eventManager.addEventListener(window, 'resize', () => {\n this.clientHeight = this.getWorkspaceHeight();\n });\n }\n\n /**\n * @returns {number}\n */\n getWorkspaceHeight() {\n let trimmingContainer = this.instance.wtOverlays.topOverlay.trimmingContainer;\n let elemHeight;\n let height = 0;\n\n if (trimmingContainer === window) {\n height = document.documentElement.clientHeight;\n\n } else {\n elemHeight = outerHeight(trimmingContainer);\n // returns height without DIV scrollbar\n height = (elemHeight > 0 && trimmingContainer.clientHeight > 0) ? trimmingContainer.clientHeight : Infinity;\n }\n\n return height;\n }\n\n getWorkspaceWidth() {\n let width;\n let totalColumns = this.wot.getSetting('totalColumns');\n let trimmingContainer = this.instance.wtOverlays.leftOverlay.trimmingContainer;\n let overflow;\n let stretchSetting = this.wot.getSetting('stretchH');\n let docOffsetWidth = document.documentElement.offsetWidth;\n let preventOverflow = this.wot.getSetting('preventOverflow');\n\n if (preventOverflow) {\n return outerWidth(this.instance.wtTable.wtRootElement);\n }\n\n if (this.wot.getSetting('freezeOverlays')) {\n width = Math.min(docOffsetWidth - this.getWorkspaceOffset().left, docOffsetWidth);\n } else {\n width = Math.min(this.getContainerFillWidth(), docOffsetWidth - this.getWorkspaceOffset().left, docOffsetWidth);\n }\n\n if (trimmingContainer === window && totalColumns > 0 && this.sumColumnWidths(0, totalColumns - 1) > width) {\n // in case sum of column widths is higher than available stylesheet width, let's assume using the whole window\n // otherwise continue below, which will allow stretching\n // this is used in `scroll_window.html`\n // TODO test me\n return document.documentElement.clientWidth;\n }\n\n if (trimmingContainer !== window) {\n overflow = getStyle(this.instance.wtOverlays.leftOverlay.trimmingContainer, 'overflow');\n\n if (overflow == 'scroll' || overflow == 'hidden' || overflow == 'auto') {\n // this is used in `scroll.html`\n // TODO test me\n return Math.max(width, trimmingContainer.clientWidth);\n }\n }\n\n if (stretchSetting === 'none' || !stretchSetting) {\n // if no stretching is used, return the maximum used workspace width\n return Math.max(width, outerWidth(this.instance.wtTable.TABLE));\n }\n // if stretching is used, return the actual container width, so the columns can fit inside it\n return width;\n\n }\n\n /**\n * Checks if viewport has vertical scroll\n *\n * @returns {Boolean}\n */\n hasVerticalScroll() {\n return this.getWorkspaceActualHeight() > this.getWorkspaceHeight();\n }\n\n /**\n * Checks if viewport has horizontal scroll\n *\n * @returns {Boolean}\n */\n hasHorizontalScroll() {\n return this.getWorkspaceActualWidth() > this.getWorkspaceWidth();\n }\n\n /**\n * @param from\n * @param length\n * @returns {Number}\n */\n sumColumnWidths(from, length) {\n let sum = 0;\n\n while (from < length) {\n sum += this.wot.wtTable.getColumnWidth(from);\n from++;\n }\n\n return sum;\n }\n\n /**\n * @returns {Number}\n */\n getContainerFillWidth() {\n if (this.containerWidth) {\n return this.containerWidth;\n }\n let mainContainer = this.instance.wtTable.holder;\n let fillWidth;\n let dummyElement;\n\n dummyElement = document.createElement('div');\n dummyElement.style.width = '100%';\n dummyElement.style.height = '1px';\n mainContainer.appendChild(dummyElement);\n fillWidth = dummyElement.offsetWidth;\n\n this.containerWidth = fillWidth;\n mainContainer.removeChild(dummyElement);\n\n return fillWidth;\n }\n\n /**\n * @returns {Number}\n */\n getWorkspaceOffset() {\n return offset(this.wot.wtTable.TABLE);\n }\n\n /**\n * @returns {Number}\n */\n getWorkspaceActualHeight() {\n return outerHeight(this.wot.wtTable.TABLE);\n }\n\n /**\n * @returns {Number}\n */\n getWorkspaceActualWidth() {\n return outerWidth(this.wot.wtTable.TABLE) ||\n outerWidth(this.wot.wtTable.TBODY) ||\n outerWidth(this.wot.wtTable.THEAD); // IE8 reports 0 as <table> offsetWidth;\n }\n\n /**\n * @returns {Number}\n */\n getColumnHeaderHeight() {\n if (isNaN(this.columnHeaderHeight)) {\n this.columnHeaderHeight = outerHeight(this.wot.wtTable.THEAD);\n }\n\n return this.columnHeaderHeight;\n }\n\n /**\n * @returns {Number}\n */\n getViewportHeight() {\n let containerHeight = this.getWorkspaceHeight();\n let columnHeaderHeight;\n\n if (containerHeight === Infinity) {\n return containerHeight;\n }\n columnHeaderHeight = this.getColumnHeaderHeight();\n\n if (columnHeaderHeight > 0) {\n containerHeight -= columnHeaderHeight;\n }\n\n return containerHeight;\n }\n\n /**\n * @returns {Number}\n */\n getRowHeaderWidth() {\n let rowHeadersHeightSetting = this.instance.getSetting('rowHeaderWidth');\n let rowHeaders = this.instance.getSetting('rowHeaders');\n\n if (rowHeadersHeightSetting) {\n this.rowHeaderWidth = 0;\n\n for (let i = 0, len = rowHeaders.length; i < len; i++) {\n this.rowHeaderWidth += rowHeadersHeightSetting[i] || rowHeadersHeightSetting;\n }\n }\n\n if (this.wot.cloneSource) {\n return this.wot.cloneSource.wtViewport.getRowHeaderWidth();\n }\n\n if (isNaN(this.rowHeaderWidth)) {\n\n if (rowHeaders.length) {\n let TH = this.instance.wtTable.TABLE.querySelector('TH');\n this.rowHeaderWidth = 0;\n\n for (let i = 0, len = rowHeaders.length; i < len; i++) {\n if (TH) {\n this.rowHeaderWidth += outerWidth(TH);\n TH = TH.nextSibling;\n\n } else {\n // yes this is a cheat but it worked like that before, just taking assumption from CSS instead of measuring.\n // TODO: proper fix\n this.rowHeaderWidth += 50;\n }\n }\n } else {\n this.rowHeaderWidth = 0;\n }\n }\n\n this.rowHeaderWidth = this.instance.getSetting('onModifyRowHeaderWidth', this.rowHeaderWidth) || this.rowHeaderWidth;\n\n return this.rowHeaderWidth;\n }\n\n /**\n * @returns {Number}\n */\n getViewportWidth() {\n let containerWidth = this.getWorkspaceWidth();\n let rowHeaderWidth;\n\n if (containerWidth === Infinity) {\n return containerWidth;\n }\n rowHeaderWidth = this.getRowHeaderWidth();\n\n if (rowHeaderWidth > 0) {\n return containerWidth - rowHeaderWidth;\n }\n\n return containerWidth;\n }\n\n /**\n * Creates:\n * - rowsRenderCalculator (before draw, to qualify rows for rendering)\n * - rowsVisibleCalculator (after draw, to measure which rows are actually visible)\n *\n * @returns {ViewportRowsCalculator}\n */\n createRowsCalculator(visible = false) {\n let height;\n let pos;\n let fixedRowsTop;\n let scrollbarHeight;\n let fixedRowsBottom;\n let fixedRowsHeight;\n let totalRows;\n\n this.rowHeaderWidth = NaN;\n\n if (this.wot.wtSettings.settings.renderAllRows) {\n height = Infinity;\n } else {\n height = this.getViewportHeight();\n }\n pos = this.wot.wtOverlays.topOverlay.getScrollPosition() - this.wot.wtOverlays.topOverlay.getTableParentOffset();\n\n if (pos < 0) {\n pos = 0;\n }\n fixedRowsTop = this.wot.getSetting('fixedRowsTop');\n fixedRowsBottom = this.wot.getSetting('fixedRowsBottom');\n totalRows = this.wot.getSetting('totalRows');\n\n if (fixedRowsTop) {\n fixedRowsHeight = this.wot.wtOverlays.topOverlay.sumCellSizes(0, fixedRowsTop);\n pos += fixedRowsHeight;\n height -= fixedRowsHeight;\n }\n\n if (fixedRowsBottom && this.wot.wtOverlays.bottomOverlay.clone) {\n fixedRowsHeight = this.wot.wtOverlays.bottomOverlay.sumCellSizes(totalRows - fixedRowsBottom, totalRows);\n\n height -= fixedRowsHeight;\n }\n\n if (this.wot.wtTable.holder.clientHeight === this.wot.wtTable.holder.offsetHeight) {\n scrollbarHeight = 0;\n } else {\n scrollbarHeight = getScrollbarWidth();\n }\n\n return new ViewportRowsCalculator(\n height,\n pos,\n this.wot.getSetting('totalRows'),\n (sourceRow) => this.wot.wtTable.getRowHeight(sourceRow),\n visible ? null : this.wot.wtSettings.settings.viewportRowCalculatorOverride,\n visible,\n scrollbarHeight\n );\n }\n\n /**\n * Creates:\n * - columnsRenderCalculator (before draw, to qualify columns for rendering)\n * - columnsVisibleCalculator (after draw, to measure which columns are actually visible)\n *\n * @returns {ViewportRowsCalculator}\n */\n createColumnsCalculator(visible = false) {\n let width = this.getViewportWidth();\n let pos;\n let fixedColumnsLeft;\n\n this.columnHeaderHeight = NaN;\n\n pos = this.wot.wtOverlays.leftOverlay.getScrollPosition() - this.wot.wtOverlays.leftOverlay.getTableParentOffset();\n\n if (pos < 0) {\n pos = 0;\n }\n fixedColumnsLeft = this.wot.getSetting('fixedColumnsLeft');\n\n if (fixedColumnsLeft) {\n let fixedColumnsWidth = this.wot.wtOverlays.leftOverlay.sumCellSizes(0, fixedColumnsLeft);\n pos += fixedColumnsWidth;\n width -= fixedColumnsWidth;\n }\n if (this.wot.wtTable.holder.clientWidth !== this.wot.wtTable.holder.offsetWidth) {\n width -= getScrollbarWidth();\n }\n\n return new ViewportColumnsCalculator(\n width,\n pos,\n this.wot.getSetting('totalColumns'),\n (sourceCol) => this.wot.wtTable.getColumnWidth(sourceCol),\n visible ? null : this.wot.wtSettings.settings.viewportColumnCalculatorOverride,\n visible,\n this.wot.getSetting('stretchH'),\n (stretchedWidth, column) => this.wot.getSetting('onBeforeStretchingColumnWidth', stretchedWidth, column)\n );\n }\n\n /**\n * Creates rowsRenderCalculator and columnsRenderCalculator (before draw, to determine what rows and\n * cols should be rendered)\n *\n * @param fastDraw {Boolean} If `true`, will try to avoid full redraw and only update the border positions.\n * If `false` or `undefined`, will perform a full redraw\n * @returns fastDraw {Boolean} The fastDraw value, possibly modified\n */\n createRenderCalculators(fastDraw = false) {\n if (fastDraw) {\n let proposedRowsVisibleCalculator = this.createRowsCalculator(true);\n let proposedColumnsVisibleCalculator = this.createColumnsCalculator(true);\n\n if (!(this.areAllProposedVisibleRowsAlreadyRendered(proposedRowsVisibleCalculator) &&\n this.areAllProposedVisibleColumnsAlreadyRendered(proposedColumnsVisibleCalculator))) {\n fastDraw = false;\n }\n }\n\n if (!fastDraw) {\n this.rowsRenderCalculator = this.createRowsCalculator();\n this.columnsRenderCalculator = this.createColumnsCalculator();\n }\n // delete temporarily to make sure that renderers always use rowsRenderCalculator, not rowsVisibleCalculator\n this.rowsVisibleCalculator = null;\n this.columnsVisibleCalculator = null;\n\n return fastDraw;\n }\n\n /**\n * Creates rowsVisibleCalculator and columnsVisibleCalculator (after draw, to determine what are\n * the actually visible rows and columns)\n */\n createVisibleCalculators() {\n this.rowsVisibleCalculator = this.createRowsCalculator(true);\n this.columnsVisibleCalculator = this.createColumnsCalculator(true);\n }\n\n /**\n * Returns information whether proposedRowsVisibleCalculator viewport\n * is contained inside rows rendered in previous draw (cached in rowsRenderCalculator)\n *\n * @param {Object} proposedRowsVisibleCalculator\n * @returns {Boolean} Returns `true` if all proposed visible rows are already rendered (meaning: redraw is not needed).\n * Returns `false` if at least one proposed visible row is not already rendered (meaning: redraw is needed)\n */\n areAllProposedVisibleRowsAlreadyRendered(proposedRowsVisibleCalculator) {\n if (this.rowsVisibleCalculator) {\n if (proposedRowsVisibleCalculator.startRow < this.rowsRenderCalculator.startRow ||\n (proposedRowsVisibleCalculator.startRow === this.rowsRenderCalculator.startRow &&\n proposedRowsVisibleCalculator.startRow > 0)) {\n return false;\n\n } else if (proposedRowsVisibleCalculator.endRow > this.rowsRenderCalculator.endRow ||\n (proposedRowsVisibleCalculator.endRow === this.rowsRenderCalculator.endRow &&\n proposedRowsVisibleCalculator.endRow < this.wot.getSetting('totalRows') - 1)) {\n return false;\n\n }\n return true;\n\n }\n\n return false;\n }\n\n /**\n * Returns information whether proposedColumnsVisibleCalculator viewport\n * is contained inside column rendered in previous draw (cached in columnsRenderCalculator)\n *\n * @param {Object} proposedColumnsVisibleCalculator\n * @returns {Boolean} Returns `true` if all proposed visible columns are already rendered (meaning: redraw is not needed).\n * Returns `false` if at least one proposed visible column is not already rendered (meaning: redraw is needed)\n */\n areAllProposedVisibleColumnsAlreadyRendered(proposedColumnsVisibleCalculator) {\n if (this.columnsVisibleCalculator) {\n if (proposedColumnsVisibleCalculator.startColumn < this.columnsRenderCalculator.startColumn ||\n (proposedColumnsVisibleCalculator.startColumn === this.columnsRenderCalculator.startColumn &&\n proposedColumnsVisibleCalculator.startColumn > 0)) {\n return false;\n\n } else if (proposedColumnsVisibleCalculator.endColumn > this.columnsRenderCalculator.endColumn ||\n (proposedColumnsVisibleCalculator.endColumn === this.columnsRenderCalculator.endColumn &&\n proposedColumnsVisibleCalculator.endColumn < this.wot.getSetting('totalColumns') - 1)) {\n return false;\n\n }\n return true;\n\n }\n\n return false;\n }\n\n /**\n * Resets values in keys of the hasOversizedColumnHeadersMarked object after updateSettings.\n */\n resetHasOversizedColumnHeadersMarked() {\n objectEach(this.hasOversizedColumnHeadersMarked, (value, key, object) => {\n object[key] = void 0;\n });\n }\n}\n\nexport default Viewport;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/viewport.js","import {isDefined} from './helpers/mixed';\n\n/**\n * @alias Options\n * @constructor\n * @description\n\n * ## Constructor options\n *\n * Constructor options are applied using an object literal passed as a second argument to the Handsontable constructor.\n *\n * ```js\n * var hot = new Handsontable(document.getElementById('example1'), {\n * data: myArray,\n * width: 400,\n * height: 300\n * });\n * ```\n *\n * ---\n * ## Cascading configuration\n *\n * Handsontable 0.9 and newer is using *Cascading Configuration*, which is a fast way to provide configuration options\n * for the entire table, including its columns and particular cells.\n *\n * Consider the following example:\n * ```js\n * var hot = new Handsontable(document.getElementById('example'), {\n * readOnly: true,\n * columns: [\n * {readOnly: false},\n * {},\n * {}\n * ],\n * cells: function (row, col, prop) {\n * var cellProperties = {};\n *\n * if (row === 0 && col === 0) {\n * cellProperties.readOnly = true;\n * }\n *\n * return cellProperties;\n * }\n * });\n * ```\n *\n * The above notation will result in all TDs being *read only*, except for first column TDs which will be *editable*, except for the TD in top left corner which will still be *read only*.\n *\n * ### The Cascading Configuration model\n *\n * ##### 1. Constructor\n *\n * Configuration options that are provided using first-level `handsontable(container, {option: \"value\"})` and `updateSettings` method.\n *\n * ##### 2. Columns\n *\n * Configuration options that are provided using second-level object `handsontable(container, {columns: {option: \"value\"}]})`\n *\n * ##### 3. Cells\n *\n * Configuration options that are provided using second-level function `handsontable(container, {cells: function: (row, col, prop){ }})`\n *\n * ---\n * ## Architecture performance\n *\n * The Cascading Configuration model is based on prototypical inheritance. It is much faster and memory efficient compared\n * to the previous model that used jQuery extend. See: [http://jsperf.com/extending-settings](http://jsperf.com/extending-settings).\n *\n * ---\n * __Important notice:__ In order for the data separation to work properly, make sure that each instance of Handsontable has a unique `id`.\n */\nfunction DefaultSettings() {};\n\nDefaultSettings.prototype = {\n /**\n * @description\n * Initial data source that will be bound to the data grid __by reference__ (editing data grid alters the data source).\n * Can be declared as an Array of Arrays, Array of Objects or a Function.\n *\n * See [Understanding binding as reference](http://docs.handsontable.com/tutorial-data-binding.html#page-reference).\n *\n * @type {Array|Function}\n * @default undefined\n */\n data: void 0,\n\n /**\n * @description\n * Defines the structure of a new row when data source is an array of objects.\n *\n * See [data-schema](http://docs.handsontable.com/tutorial-data-sources.html#page-data-schema) for examples.\n *\n * @type {Object}\n * @default undefined\n */\n dataSchema: void 0,\n\n /**\n * Width of the grid. Can be a value or a function that returns a value.\n *\n * @type {Number|Function}\n * @default undefined\n */\n width: void 0,\n\n /**\n * Height of the grid. Can be a number or a function that returns a number.\n *\n * @type {Number|Function}\n * @default undefined\n */\n height: void 0,\n\n /**\n * @description\n * Initial number of rows.\n *\n * __Notice:__ This option only has effect in Handsontable constructor and only if `data` option is not provided\n *\n * @type {Number}\n * @default 5\n */\n startRows: 5,\n\n /**\n * @description\n * Initial number of columns.\n *\n * __Notice:__ This option only has effect in Handsontable constructor and only if `data` option is not provided\n *\n * @type {Number}\n * @default 5\n */\n startCols: 5,\n\n /**\n * Setting `true` or `false` will enable or disable the default row headers (1, 2, 3).\n * You can also define an array `['One', 'Two', 'Three', ...]` or a function to define the headers.\n * If a function is set the index of the row is passed as a parameter.\n *\n * @type {Boolean|Array|Function}\n * @default null\n * @example\n * ```js\n * ...\n * // as boolean\n * rowHeaders: true,\n * ...\n *\n * ...\n * // as array\n * rowHeaders: [1, 2, 3],\n * ...\n *\n * ...\n * // as function\n * rowHeaders: function(index) {\n * return index + ': AB';\n * },\n * ...\n * ```\n */\n rowHeaders: void 0,\n\n /**\n * Setting `true` or `false` will enable or disable the default column headers (A, B, C).\n * You can also define an array `['One', 'Two', 'Three', ...]` or a function to define the headers.\n * If a function is set, then the index of the column is passed as a parameter.\n *\n * @type {Boolean|Array|Function}\n * @default null\n * @example\n * ```js\n * ...\n * // as boolean\n * colHeaders: true,\n * ...\n *\n * ...\n * // as array\n * colHeaders: ['A', 'B', 'C'],\n * ...\n *\n * ...\n * // as function\n * colHeaders: function(index) {\n * return index + ': AB';\n * },\n * ...\n * ```\n */\n colHeaders: null,\n\n /**\n * Defines column widths in pixels. Accepts number, string (that will be converted to a number),\n * array of numbers (if you want to define column width separately for each column) or a\n * function (if you want to set column width dynamically on each render).\n *\n * @type {Array|Function|Number|String}\n * @default undefined\n */\n colWidths: void 0,\n\n /**\n * Defines row heights in pixels. Accepts numbers, strings (that will be converted into a number),\n * array of numbers (if you want to define row height separately for each row) or a\n * function (if you want to set row height dynamically on each render).\n *\n * @type {Array|Function|Number|String}\n * @default undefined\n */\n rowHeights: void 0,\n\n /**\n * @description\n * Defines the cell properties and data binding for certain columns.\n *\n * __Notice:__ Using this option sets a fixed number of columns (options `startCols`, `minCols`, `maxCols` will be ignored).\n *\n * See [documentation -> datasources.html](http://docs.handsontable.com/tutorial-data-sources.html#page-nested) for examples.\n *\n * @type {Array}\n * @default undefined\n * @example\n * ```js\n * ...\n * columns: [\n * {\n * // column options for the first column\n * type: 'numeric',\n * format: '0,0.00 $'\n * },\n * {\n * // column options for the second column\n * type: 'text',\n * readOnly: true\n * }\n * ],\n * ...\n * ```\n */\n columns: void 0,\n\n /**\n * @description\n * Defines the cell properties for given `row`, `col`, `prop` coordinates.\n * Any constructor or column option may be overwritten for a particular cell (row/column combination)\n * using the `cells` property in the Handsontable constructor.\n *\n * @type {Function}\n * @default undefined\n * @example\n * ```js\n * ...\n * cells: function (row, col, prop) {\n * var cellProperties = {};\n *\n * if (row === 0 && col === 0) {\n * cellProperties.readOnly = true;\n * }\n *\n * return cellProperties;\n * },\n * ...\n * ```\n */\n cells: void 0,\n\n /**\n * Any constructor or column option may be overwritten for a particular cell (row/column combination), using `cell`\n * array passed to the Handsontable constructor.\n *\n * @type {Array}\n * @default []\n * @example\n * ```js\n * ...\n * cell: [\n * {row: 0, col: 0, readOnly: true}\n * ],\n * ...\n * ```\n */\n cell: [],\n\n /**\n * @description\n * If `true`, enables the {@link Comments} plugin, which enables an option to apply cell comments through the context menu\n * (configurable with context menu keys `commentsAddEdit`, `commentsRemove`).\n *\n * To initialize Handsontable with predefined comments, provide cell coordinates and comment text values in a form of an array.\n *\n * See [Comments](http://docs.handsontable.com/demo-comments_.html) demo for examples.\n *\n * @since 0.11.0\n * @type {Boolean|Array}\n * @default false\n * @example\n * ```js\n * ...\n * comments: [{row: 1, col: 1, comment: {value: \"Test comment\"}}],\n * ...\n * ```\n */\n comments: false,\n\n /**\n * @description\n * If `true`, enables the Custom Borders plugin, which enables an option to apply custom borders through the context menu (configurable with context menu key `borders`).\n *\n * To initialize Handsontable with predefined custom borders, provide cell coordinates and border styles in a form of an array.\n *\n * See [Custom Borders](http://docs.handsontable.com/demo-custom-borders.html) demo for examples.\n *\n * @since 0.11.0\n * @type {Boolean|Array}\n * @default false\n * @example\n * ```js\n * ...\n * customBorders: [\n * {range: {\n * from: {row: 1, col: 1},\n * to: {row: 3, col: 4}},\n * left: {},\n * right: {},\n * top: {},\n * bottom: {}\n * }\n * ],\n * ...\n *\n * // or\n * ...\n * customBorders: [\n * {row: 2, col: 2, left: {width: 2, color: 'red'},\n * right: {width: 1, color: 'green'}, top: '', bottom: ''}\n * ],\n * ...\n * ```\n */\n customBorders: false,\n\n /**\n * Minimum number of rows. At least that number of rows will be created during initialization.\n *\n * @type {Number}\n * @default 0\n */\n minRows: 0,\n\n /**\n * Minimum number of columns. At least that number of columns will be created during initialization.\n *\n * @type {Number}\n * @default 0\n */\n minCols: 0,\n\n /**\n * Maximum number of rows. If set to a value lower than the initial row count, the data will be trimmed to the provided value as the number of rows.\n *\n * @type {Number}\n * @default Infinity\n */\n maxRows: Infinity,\n\n /**\n * Maximum number of cols.\n *\n * @type {Number}\n * @default Infinity\n */\n maxCols: Infinity,\n\n /**\n * When set to 1 (or more), Handsontable will add a new row at the end of grid if there are no more empty rows.\n * (unless the number of rows exceeds the one set in the `maxRows` property)\n *\n * @type {Number}\n * @default 0\n */\n minSpareRows: 0,\n\n /**\n * When set to 1 (or more), Handsontable will add a new column at the end of grid if there are no more empty columns.\n * (unless the number of rows exceeds the one set in the `maxCols` property)\n *\n * @type {Number}\n * @default 0\n */\n minSpareCols: 0,\n\n /**\n * If set to `false`, there won't be an option to insert new rows in the Context Menu.\n *\n * @type {Boolean}\n * @default true\n */\n allowInsertRow: true,\n\n /**\n * If set to `false`, there won't be an option to insert new columns in the Context Menu.\n *\n * @type {Boolean}\n * @default true\n */\n allowInsertColumn: true,\n\n /**\n * If set to `false`, there won't be an option to remove rows in the Context Menu.\n *\n * @type {Boolean}\n * @default true\n */\n allowRemoveRow: true,\n\n /**\n * If set to `false`, there won't be an option to remove columns in the Context Menu.\n *\n * @type {Boolean}\n * @default true\n */\n allowRemoveColumn: true,\n\n /**\n * If true, selection of multiple cells using keyboard or mouse is allowed.\n *\n * @type {Boolean}\n * @default true\n */\n multiSelect: true,\n\n /**\n * Enables the fill handle (drag-down and copy-down) functionality, which shows a small rectangle in bottom\n * right corner of the selected area, that let's you expand values to the adjacent cells.\n *\n * Possible values: `true` (to enable in all directions), `'vertical'` or `'horizontal'` (to enable in one direction),\n * `false` (to disable completely). Setting to `true` enables the fillHandle plugin.\n *\n * Since 0.23.0 you can pass object to plugin which allows you to add more options for this functionality. If `autoInsertRow`\n * option is `true`, fill-handler will create new rows till it reaches the last row. It is enabled by default.\n *\n * @example\n * ```js\n * ...\n * fillHandle: true // enable plugin in all directions and with autoInsertRow as true\n * ...\n * // or\n * ...\n * fillHandle: 'vertical' // enable plugin in vertical direction and with autoInsertRow as true\n * ...\n * // or\n * ...\n * fillHandle: { // enable plugin in both directions and with autoInsertRow as false\n * autoInsertRow: false,\n * }\n * // or\n * ...\n * fillHandle: { // enable plugin in vertical direction and with autoInsertRow as false\n * autoInsertRow: false,\n * direction: 'vertical' // 'vertical' or 'horizontal'\n * }\n * ```\n *\n * @type {Boolean|String|Object}\n * @default true\n */\n fillHandle: true,\n\n /**\n * Allows to specify the number of fixed (or *frozen*) rows at the top of the table.\n *\n * @type {Number}\n * @default 0\n * @example\n * ```js\n * fixedRowsTop: 3 // This would freeze the top 3 rows of the table.\n * ```\n */\n fixedRowsTop: 0,\n\n /**\n * Allows to specify the number of fixed (or *frozen*) rows at the bottom of the table.\n *\n * @pro\n * @type {Number}\n * @default 0\n * @example\n * ```js\n * fixedRowsBottom: 3 // This would freeze the top 3 rows of the table.\n * ```\n */\n fixedRowsBottom: 0,\n\n /**\n * Allows to specify the number of fixed (or *frozen*) columns on the left of the table.\n *\n * @type {Number}\n * @default 0\n * @example\n * ```js\n * fixedColumnsLeft: 3 // This would freeze the top 3 rows of the table.\n * ```\n */\n fixedColumnsLeft: 0,\n\n /**\n * If `true`, mouse click outside the grid will deselect the current selection.\n * Can be a function that takes the click event target and returns a boolean.\n *\n * @type {Boolean|Function}\n * @default true\n */\n outsideClickDeselects: true,\n\n /**\n * If `true`, <kbd>ENTER</kbd> begins editing mode (like in Google Docs). If `false`, <kbd>ENTER</kbd> moves to next\n * row (like Excel) and adds a new row if necessary. <kbd>TAB</kbd> adds new column if necessary.\n *\n * @type {Boolean}\n * @default true\n */\n enterBeginsEditing: true,\n\n /**\n * Defines the cursor movement after <kbd>ENTER</kbd> was pressed (<kbd>SHIFT</kbd> + <kbd>ENTER</kbd> uses a negative vector).\n * Can be an object or a function that returns an object. The event argument passed to the function\n * is a DOM Event object received after the <kbd>ENTER</kbd> key has been pressed. This event object can be used to check\n * whether user pressed <kbd>ENTER</kbd> or <kbd>SHIFT</kbd> + <kbd>ENTER</kbd>.\n *\n * @type {Object|Function}\n * @default {row: 1, col: 0}\n */\n enterMoves: {row: 1, col: 0},\n\n /**\n * Defines the cursor movement after <kbd>TAB</kbd> is pressed (<kbd>SHIFT</kbd> + <kbd>TAB</kbd> uses a negative vector).\n * Can be an object or a function that returns an object. The event argument passed to the function\n * is a DOM Event object received after the <kbd>TAB</kbd> key has been pressed. This event object can be used to check\n * whether user pressed <kbd>TAB</kbd> or <kbd>SHIFT</kbd> + <kbd>TAB</kbd>.\n *\n * @type {Object}\n * @default {row: 0, col: 1}\n */\n tabMoves: {row: 0, col: 1},\n\n /**\n * If `true`, pressing <kbd>TAB</kbd> or right arrow in the last column will move to first column in next row.\n *\n * @type {Boolean}\n * @default false\n */\n autoWrapRow: false,\n\n /**\n * If `true`, pressing <kbd>ENTER</kbd> or down arrow in the last row will move to the first row in the next column.\n *\n * @type {Boolean}\n * @default false\n */\n autoWrapCol: false,\n\n /**\n * Maximum number of rows than can be copied to clipboard using <kbd>CTRL</kbd> + <kbd>C</kbd>.\n *\n * @type {Number}\n * @default 1000\n */\n copyRowsLimit: 1000,\n\n /**\n * Maximum number of columns than can be copied to clipboard using <kbd>CTRL</kbd> + <kbd>C</kbd>.\n *\n * @type {Number}\n * @default 1000\n */\n copyColsLimit: 1000,\n\n /**\n * @description\n * Defines paste (<kbd>CTRL</kbd> + <kbd>V</kbd>) behavior.\n * * Default value `\"overwrite\"` will paste clipboard value over current selection.\n * * When set to `\"shift_down\"`, clipboard data will be pasted in place of current selection, while all selected cells are moved down.\n * * When set to `\"shift_right\"`, clipboard data will be pasted in place of current selection, while all selected cells are moved right.\n *\n * @type {String}\n * @default 'overwrite'\n */\n pasteMode: 'overwrite',\n\n /**\n * @description\n * Turns on saving the state of column sorting, column positions and column sizes in local storage.\n *\n * You can save any sort of data in local storage to preserve table state between page reloads.\n * In order to enable data storage mechanism, `persistentState` option must be set to `true` (you can set it\n * either during Handsontable initialization or using the `updateSettings` method). When `persistentState` is enabled it exposes 3 hooks:\n *\n * __persistentStateSave__ (key: String, value: Mixed)\n *\n * * Saves value under given key in browser local storage.\n *\n * __persistentStateLoad__ (key: String, valuePlaceholder: Object)\n *\n * * Loads `value`, saved under given key, form browser local storage. The loaded `value` will be saved in `valuePlaceholder.value`\n * (this is due to specific behaviour of `Hooks.run()` method). If no value have been saved under key `valuePlaceholder.value`\n * will be `undefined`.\n *\n * __persistentStateReset__ (key: String)\n *\n * * Clears the value saved under `key`. If no `key` is given, all values associated with table will be cleared.\n *\n * __Note:__ The main reason behind using `persistentState` hooks rather than regular LocalStorage API is that it\n * ensures separation of data stored by multiple Handsontable instances. In other words, if you have two (or more)\n * instances of Handsontable on one page, data saved by one instance won't be accessible by the second instance.\n * Those two instances can store data under the same key and no data would be overwritten.\n *\n * __Important:__ In order for the data separation to work properly, make sure that each instance of Handsontable has a unique `id`.\n *\n * @type {Boolean}\n * @default false\n */\n persistentState: void 0,\n\n /**\n * Class name for all visible rows in the current selection.\n *\n * @type {String}\n * @default undefined\n * @example\n * ```js\n * currentRowClassName: 'currentRow' // This will add a 'currentRow' class name to appropriate table cells.\n * ```\n */\n currentRowClassName: void 0,\n\n /**\n * Class name for all visible columns in the current selection.\n *\n * @type {String}\n * @default undefined\n * @example\n * ```js\n * currentColClassName: 'currentColumn' // This will add a 'currentColumn' class name to appropriate table cells.\n * ```\n */\n currentColClassName: void 0,\n\n /**\n * Class name for all visible headers in current selection.\n *\n * @type {String}\n * @since 0.27.0\n * @default 'ht__highlight'\n * @example\n * ```js\n * currentHeaderClassName: 'ht__highlight' // This will add a 'ht__highlight' class name to appropriate table headers.\n * ```\n */\n currentHeaderClassName: 'ht__highlight',\n /**\n * Class name for the Handsontable container element.\n *\n * @type {String|Array}\n * @default undefined\n */\n className: void 0,\n\n /**\n * Class name for all tables inside container element.\n *\n * @since 0.17.0\n * @type {String|Array}\n * @default undefined\n */\n tableClassName: void 0,\n\n /**\n * @description\n * Defines how the columns react, when the declared table width is different than the calculated sum of all column widths.\n * [See more](http://docs.handsontable.com/demo-stretching.html) mode. Possible values:\n * * `'none'` Disable stretching\n * * `'last'` Stretch only the last column\n * * `'all'` Stretch all the columns evenly\n *\n * @type {String}\n * @default 'none'\n */\n stretchH: 'none',\n\n /**\n * Lets you overwrite the default `isEmptyRow` method, which checks if row at the provided index is empty.\n *\n * @type {Function}\n * @param {Number} row\n * @returns {Boolean}\n */\n isEmptyRow(row) {\n var col,\n colLen,\n value,\n meta;\n\n for (col = 0, colLen = this.countCols(); col < colLen; col++) {\n value = this.getDataAtCell(row, col);\n\n if (value !== '' && value !== null && isDefined(value)) {\n if (typeof value === 'object') {\n meta = this.getCellMeta(row, col);\n\n return isObjectEquals(this.getSchema()[meta.prop], value);\n }\n return false;\n }\n }\n\n return true;\n },\n\n /**\n * Lets you overwrite the default `isEmptyCol` method, which checks if column at the provided index is empty.\n *\n * @type {Function}\n * @param {Number} col\n * @returns {Boolean}\n */\n isEmptyCol(col) {\n var row,\n rowLen,\n value;\n\n for (row = 0, rowLen = this.countRows(); row < rowLen; row++) {\n value = this.getDataAtCell(row, col);\n\n if (value !== '' && value !== null && isDefined(value)) {\n return false;\n }\n }\n\n return true;\n },\n\n /**\n * When set to `true`, the table is re-rendered when it is detected that it was made visible in DOM.\n *\n * @type {Boolean}\n * @default true\n */\n observeDOMVisibility: true,\n\n /**\n * If set to `true`, Handsontable will accept values that were marked as invalid by the cell `validator`.\n * It will result with *invalid* cells being treated as *valid* (will save the *invalid* value into the Handsontable data source).\n * If set to `false`, Handsontable will *not* accept the invalid values and won't allow the user to close the editor.\n * This option will be particularly useful when used with the Autocomplete's `strict` mode.\n *\n * @type {Boolean}\n * @default true\n * @since 0.9.5\n */\n allowInvalid: true,\n\n /**\n * If set to `true`, Handsontable will accept values that are empty (`null`, `undefined` or `''`).\n * If set to `false`, Handsontable will *not* accept the empty values and mark cell as invalid.\n *\n * @example\n * ```js\n * ...\n * allowEmpty: true // allow empty values for all cells (whole table)\n * ...\n * // or\n * ...\n * columns: [\n * // allow empty values only for 'date' column\n * {data: 'date', dateFormat: 'DD/MM/YYYY', allowEmpty: true}\n * ]\n * ...\n * ```\n *\n * @type {Boolean}\n * @default true\n * @since 0.23.0\n */\n allowEmpty: true,\n\n /**\n * CSS class name for cells that did not pass validation.\n *\n * @type {String}\n * @default 'htInvalid'\n */\n invalidCellClassName: 'htInvalid',\n\n /**\n * When set to an non-empty string, displayed as the cell content for empty cells. If a value of a different type is provided,\n * it will be stringified and applied as a string.\n *\n * @type {Mixed}\n * @default false\n */\n placeholder: false,\n\n /**\n * CSS class name for cells that have a placeholder in use.\n *\n * @type {String}\n * @default 'htPlaceholder'\n */\n placeholderCellClassName: 'htPlaceholder',\n\n /**\n * CSS class name for read-only cells.\n *\n * @type {String}\n * @default 'htDimmed'\n */\n readOnlyCellClassName: 'htDimmed',\n\n /**\n * @description\n * If a string is provided, it may be one of the following predefined values:\n * * `autocomplete`,\n * * `checkbox`,\n * * `text`,\n * * `numeric`.\n *\n * If a function is provided, it will receive the following arguments:\n * ```js\n * function(instance, TD, row, col, prop, value, cellProperties) {}\n * ```\n *\n * You can read more about custom renderes [in the documentation](http://docs.handsontable.com/demo-custom-renderers.html).\n *\n * @example\n * ```js\n * ...\n * columns: [\n * {\n * editor: 'select',\n * renderer: 'autocomplete' // as string\n * },\n * {\n * // renderer as custom function\n * renderer: function(hotInstance, TD, row, col, prop, value, cellProperties) {\n * TD.style.color = 'blue';\n * TD.innerHTML = value;\n * }\n * }\n * ]\n * ...\n * ```\n *\n * @type {String|Function}\n * @default undefined\n */\n renderer: void 0,\n\n /**\n * CSS class name added to the commented cells.\n *\n * @type {String}\n * @default 'htCommentCell'\n */\n commentedCellClassName: 'htCommentCell',\n\n /**\n * If set to `true`, it enables the browser's native selection of a fragment of the text within a single cell, between adjacent cells or in a whole table.\n * If set to `'cell'`, it enables the possibility of selecting a fragment of the text within a single cell's body.\n *\n * @type {Boolean|String}\n * @default false\n */\n fragmentSelection: false,\n\n /**\n * @description\n * Make cell [read only](http://docs.handsontable.com/demo-read-only.html).\n *\n * @type {Boolean}\n * @default false\n */\n readOnly: false,\n\n /**\n * @description\n * When added to a `column` property, it skips the column on paste and pastes the data on the next column to the right.\n *\n * @type {Boolean}\n * @default false\n */\n skipColumnOnPaste: false,\n\n /**\n * @description\n * Setting to true enables the search plugin (see [demo](http://docs.handsontable.com/demo-search-for-values.html)).\n *\n * @type {Boolean}\n * @default false\n */\n search: false,\n\n /**\n * @description\n * Shortcut to define the combination of the cell renderer and editor for the column.\n *\n * Possible values:\n * * text\n * * [numeric](http://docs.handsontable.com/demo-numeric.html)\n * * [date](http://docs.handsontable.com/demo-date.html)\n * * [checkbox](http://docs.handsontable.com/demo-checkbox.html)\n * * [autocomplete](http://docs.handsontable.com/demo-autocomplete.html)\n * * [dropdown](http://docs.handsontable.com/demo-dropdown.html)\n * * [handsontable](http://docs.handsontable.com/demo-handsontable.html)\n *\n * @example\n * ```js\n * ...\n * columns: [\n * {\n * type: 'text'\n * },\n * {\n * type: 'checkbox'\n * }\n * ]\n * ...\n * ```\n *\n * @type {String}\n * @default 'text'\n */\n type: 'text',\n\n /**\n * @description\n * Make cell copyable (pressing <kbd>CTRL</kbd> + <kbd>C</kbd> on your keyboard moves its value to system clipboard).\n *\n * __Note:__ this setting is `false` by default for cells with type `password`.\n *\n * @type {Boolean}\n * @default true\n * @since 0.10.2\n */\n copyable: true,\n\n /**\n * Defines the editor for the table/column/cell.\n *\n * If a string is provided, it may be one of the following predefined values:\n * * [autocomplete](http://docs.handsontable.com/demo-autocomplete.html)\n * * [checkbox](http://docs.handsontable.com/demo-checkbox.html)\n * * [date](http://docs.handsontable.com/demo-date.html)\n * * [dropdown](http://docs.handsontable.com/demo-dropdown.html)\n * * [handsontable](http://docs.handsontable.com/demo-handsontable.html)\n * * [mobile](http://docs.handsontable.com/demo-mobiles-and-tablets.html)\n * * [password](http://docs.handsontable.com/demo-password.html)\n * * [select](http://docs.handsontable.com/demo-select.html)\n * * text\n *\n * Or you can disable cell editing passing `false`.\n *\n * @example\n * ```js\n * ...\n * columns: [\n * {\n * editor: 'select'\n * },\n * {\n * editor: false\n * }\n * ]\n * ...\n * ```\n *\n * @type {String|Function|Boolean}\n * @default 'text'\n */\n editor: void 0,\n\n /**\n * @description\n * Autocomplete definitions. See [autocomplete demo](http://docs.handsontable.com/demo-autocomplete.html) for examples and definitions.\n *\n * @type {Array}\n * @default undefined\n */\n autoComplete: void 0,\n\n /**\n * Control number of choices for the autocomplete (or dropdown) typed cells. After exceeding it, a scrollbar for the dropdown list of choices will appear.\n *\n * @since 0.18.0\n * @type {Number}\n * @default 10\n */\n visibleRows: 10,\n\n /**\n * Makes autocomplete or dropdown width the same as the edited cell width. If `false` then editor will be scaled\n * according to its content.\n *\n * @since 0.17.0\n * @type {Boolean}\n * @default true\n */\n trimDropdown: true,\n\n /**\n * Setting to true enables the debug mode, currently used to test the correctness of the row and column\n * header fixed positioning on a layer above the master table.\n *\n * @type {Boolean}\n * @default false\n */\n debug: false,\n\n /**\n * When set to `true`, the text of the cell content is wrapped if it does not fit in the fixed column width.\n *\n * @type {Boolean}\n * @default true\n * @since 0.11.0\n */\n wordWrap: true,\n\n /**\n * CSS class name added to cells with cell meta `wordWrap: false`.\n *\n * @type {String}\n * @default 'htNoWrap'\n * @since 0.11.0\n */\n noWordWrapClassName: 'htNoWrap',\n\n /**\n * @description\n * Defines if the right-click context menu should be enabled. Context menu allows to create new row or\n * column at any place in the grid among [other features](http://docs.handsontable.com/demo-context-menu.html).\n * Possible values:\n * * `true` (to enable default options),\n * * `false` (to disable completely)\n *\n * or array of any available strings:\n * * `[\"row_above\", \"row_below\", \"col_left\", \"col_right\",\n * \"remove_row\", \"remove_col\", \"---------\", \"undo\", \"redo\"]`.\n *\n * See [the context menu demo](http://docs.handsontable.com/demo-context-menu.html) for examples.\n *\n * @example\n * ```js\n * ...\n * // as a boolean\n * contextMenu: true\n * ...\n * // as a array\n * contextMenu: ['row_above', 'row_below', '--------', 'undo', 'redo']\n * ...\n * ```\n *\n * @type {Boolean|Array|Object}\n * @default undefined\n */\n contextMenu: void 0,\n\n /**\n * @description\n * Defines new actions copy/paste for context menu. This functionality is dependent on ZeroClipboard from which you\n * should pass the swf file path under `swfPath` object key.\n *\n * @example\n * ```js\n * ...\n * contextMenuCopyPaste: {swfPath: '[path to file]'}\n * ...\n * ```\n *\n * @type {Object}\n */\n contextMenuCopyPaste: void 0,\n\n /**\n * @description\n * Disable or enable the copy/paste functionality.\n *\n * @example\n * ```js\n * ...\n * copyPaste: false,\n * ...\n * ```\n *\n * @type {Boolean}\n * @default undefined\n */\n copyPaste: void 0,\n\n /**\n * If `true`, undo/redo functionality is enabled.\n *\n * @type {Boolean}\n * @default undefined\n */\n undo: void 0,\n\n /**\n * @description\n * Turns on [Column sorting](http://docs.handsontable.com/demo-sorting-data.html).\n * Can be either a boolean (true/false) or an object with a declared sorting options. See the below example:\n *\n * @example\n * ```js\n * ...\n * // as boolean\n * columnSorting: true\n * ...\n * // as a object with initial order (sort ascending column at index 2)\n * columnSorting: {\n * column: 2,\n * sortOrder: true, // true = ascending, false = descending, undefined = original order\n * sortEmptyCells: true // true = the table sorts empty cells, false = the table moves all empty cells to the end of the table\n * }\n * ...\n * ```\n *\n * @type {Boolean|Object}\n * @default undefined\n */\n columnSorting: void 0,\n\n /**\n * @description\n * Turns on [Manual column move](http://docs.handsontable.com/demo-moving-rows-and-columns.html), if set to a boolean or define initial\n * column order, if set to an array of column indexes.\n *\n * @example\n * ```js\n * ...\n * // as boolean\n * manualColumnMove: true\n * ...\n * // as a array with initial order (move column index at 0 to 1 and move column index at 1 to 4)\n * manualColumnMove: [1, 4]\n * ...\n * ```\n *\n * @type {Boolean|Array}\n * @default undefined\n */\n manualColumnMove: void 0,\n\n /**\n * @description\n * Turns on [Manual column resize](http://docs.handsontable.com/demo-resizing.html), if set to a boolean or define initial\n * column resized widths, if set to an array of numbers.\n *\n * @example\n * ```js\n * ...\n * // as boolean\n * manualColumnResize: true\n * ...\n * // as a array with initial widths (column at 0 index has 40px and column at 1 index has 50px)\n * manualColumnResize: [40, 50]\n * ...\n * ```\n *\n * @type {Boolean|Array}\n * @default undefined\n */\n manualColumnResize: void 0,\n\n /**\n * @description\n * Turns on [Manual row move](http://docs.handsontable.com/demo-moving-rows-and-columns.html), if set to a boolean or define initial\n * row order, if set to an array of row indexes.\n *\n * @example\n * ```js\n * ...\n * // as boolean\n * manualRowMove: true\n * ...\n * // as a array with initial order (move row index at 0 to 1 and move row index at 1 to 4)\n * manualRowMove: [1, 4]\n * ...\n * ```\n *\n * @type {Boolean|Array}\n * @default undefined\n * @since 0.11.0\n */\n manualRowMove: void 0,\n\n /**\n * @description\n * Turns on [Manual row resize](http://docs.handsontable.com/demo-resizing.html), if set to a boolean or define initial\n * row resized heights, if set to an array of numbers.\n *\n * @example\n * ```js\n * ...\n * // as boolean\n * manualRowResize: true\n * ...\n * // as a array with initial heights (row at 0 index has 40px and row at 1 index has 50px)\n * manualRowResize: [40, 50]\n * ...\n * ```\n *\n * @type {Boolean|Array}\n * @default undefined\n * @since 0.11.0\n */\n manualRowResize: void 0,\n\n /**\n * @description\n * If set to `true`, it enables a possibility to merge cells. If set to an array of objects, it merges the cells provided in the objects (see the example below).\n * [More information on the demo page.](http://docs.handsontable.com/demo-merge-cells.html)\n *\n * @example\n * ```js\n * // enables the mergeCells plugin:\n * margeCells: true\n * ...\n * // declares a list of merged sections:\n * mergeCells: [\n * {row: 1, col: 1, rowspan: 3, colspan: 3}, // rowspan and colspan properties declare the width and height of a merged section in cells\n * {row: 3, col: 4, rowspan: 2, colspan: 2},\n * {row: 5, col: 6, rowspan: 3, colspan: 3}\n * ]\n * ```\n * @type {Boolean|Array}\n * @default false\n */\n mergeCells: false,\n\n /**\n * Number of rows to be rendered outside of the visible part of the table.\n * By default, it's set to `'auto'`, which makes Handsontable to attempt to calculate the best offset performance-wise.\n *\n * You may test out different values to find the best one that works for your specific implementation.\n *\n * @type {Number|String}\n * @default 'auto'\n */\n viewportRowRenderingOffset: 'auto',\n\n /**\n * Number of columns to be rendered outside of the visible part of the table.\n * By default, it's set to `'auto'`, which makes Handsontable try calculating the best offset performance-wise.\n *\n * You may experiment with the value to find the one that works best for your specific implementation.\n *\n * @type {Number|String}\n * @default 'auto'\n */\n viewportColumnRenderingOffset: 'auto',\n\n /**\n * A function or a regular expression, which will be used in the process of cell validation.\n * If a function is used, be sure to execute the callback argument with either `true` (`callback(true)`) if the validation passed\n * or with `false` (`callback(false)`), if the validation failed.\n * Note, that `this` in the function points to the `cellProperties` object.\n *\n * See more [in the demo](http://docs.handsontable.com/demo-data-validation.html).\n *\n * @example\n * ```js\n * // as a function\n * columns: [\n * {\n * validator: function(value, callback) { // validation rules }\n * }\n * ]\n * ...\n * // as a regexp\n * columns: [\n * {\n * validator: /^[0-9]$/ // regular expression\n * }\n * ]\n * ```\n * @type {Function|RegExp}\n * @default undefined\n * @since 0.9.5\n */\n validator: void 0,\n\n /**\n * @description\n * Disable visual cells selection.\n *\n * Possible values:\n * * `true` - Disables any type of visual selection (current and area selection),\n * * `false` - Enables any type of visual selection. This is default value.\n * * `current` - Disables the selection of a currently selected cell, the area selection is still present.\n * * `area` - Disables the area selection, the currently selected cell selection is still present.\n *\n * @type {Boolean|String|Array}\n * @default false\n * @since 0.13.2\n * @example\n * ```js\n * ...\n * // as boolean\n * disableVisualSelection: true,\n * ...\n *\n * ...\n * // as string ('current' or 'area')\n * disableVisualSelection: 'current',\n * ...\n *\n * ...\n * // as array\n * disableVisualSelection: ['current', 'area'],\n * ...\n * ```\n */\n disableVisualSelection: false,\n\n /**\n * @description\n * Set whether to display the current sorting order indicator (a triangle icon in the column header, specifying the sorting order).\n *\n * @type {Boolean}\n * @default false\n * @since 0.15.0-beta3\n */\n sortIndicator: void 0,\n\n /**\n * Disable or enable ManualColumnFreeze plugin.\n *\n * @type {Boolean}\n * @default false\n */\n manualColumnFreeze: void 0,\n\n /**\n * @description\n * Defines whether Handsontable should trim the whitespace at the beginning and the end of the cell contents.\n *\n * @type {Boolean}\n * @default true\n */\n trimWhitespace: true,\n\n settings: void 0,\n\n /**\n * @description\n * Defines data source for Autocomplete or Dropdown cell types.\n *\n * @example\n * ```js\n * ...\n * // source as a array\n * columns: [{\n * type: 'autocomplete',\n * source: ['A', 'B', 'C', 'D']\n * }]\n * ...\n * // source as a function\n * columns: [{\n * type: 'autocomplete',\n * source: function(query, callback) {\n * fetch('http://example.com/query?q=' + query, function(response) {\n * callback(response.items);\n * })\n * }\n * }]\n * ...\n * ```\n *\n * @type {Array|Function}\n * @default undefined\n */\n source: void 0,\n\n /**\n * @description\n * Defines the column header name.\n *\n * @example\n * ```js\n * ...\n * columns: [{\n * title: 'First name',\n * type: 'text',\n * },\n * {\n * title: 'Last name',\n * type: 'text',\n * }]\n * ...\n * ```\n *\n * @type {String}\n * @default undefined\n */\n title: void 0,\n\n /**\n * Data template for `'checkbox'` type when checkbox is checked.\n *\n * @example\n * ```js\n * checkedTemplate: 'good'\n *\n * // if a checkbox-typed cell is checked, then getDataAtCell(x,y), where x and y are the coordinates of the cell\n * // will return 'good'.\n * ```\n * @type {Boolean|String}\n * @default true\n */\n checkedTemplate: void 0,\n\n /**\n * Data template for `'checkbox'` type when checkbox is unchecked.\n *\n * @example\n * ```js\n * uncheckedTemplate: 'bad'\n *\n * // if a checkbox-typed cell is not checked, then getDataAtCell(x,y), where x and y are the coordinates of the cell\n * // will return 'bad'.\n * ```\n * @type {Boolean|String}\n * @default false\n */\n uncheckedTemplate: void 0,\n\n /**\n * @description\n * Object which describes if renderer should create checkbox element with label element as a parent. Option desired for\n * [checkbox](http://docs.handsontable.com/demo-checkbox.html)-typed cells.\n *\n * By default the [checkbox](http://docs.handsontable.com/demo-checkbox.html) renderer renders the checkbox without a label.\n *\n * Possible object properties:\n * * `property` - Defines the property name of the data object, which will to be used as a label.\n * (eg. `label: {property: 'name.last'}`). This option works only if data was passed as an array of objects.\n * * `position` - String which describes where to place the label text (before or after checkbox element).\n * Valid values are `'before'` and '`after`' (defaults to `'after'`).\n * * `value` - String or a Function which will be used as label text.\n *\n * @example\n * ```js\n * ...\n * columns: [{\n * type: 'checkbox',\n * label: {position: 'after', value: 'My label: '}\n * }]\n * ...\n * ```\n *\n * @since 0.19.0\n * @type {Object}\n * @default undefined\n */\n label: void 0,\n\n /**\n * Display format. See [numbrojs](http://numbrojs.com). This option is desired for\n * [numeric](http://docs.handsontable.com/demo-numeric.html)-typed cells.\n *\n * Since 0.26.0 Handsontable uses [numbro](http://numbrojs.com/) as a main library for numbers formatting.\n *\n * @example\n * ```js\n * ...\n * columns: [{\n * type: 'numeric',\n * format: '0,00'\n * }]\n * ...\n * ```\n *\n * @type {String}\n * @default '0'\n */\n format: void 0,\n\n /**\n * Language display format. See [numbrojs](http://numbrojs.com/languages.html#supported-languages). This option is desired for\n * [numeric](http://docs.handsontable.com/demo-numeric.html)-typed cells.\n *\n * Since 0.26.0 Handsontable uses [numbro](http://numbrojs.com/) as a main library for numbers formatting.\n *\n * @example\n * ```js\n * ...\n * columns: [{\n * type: 'numeric',\n * language: 'en-US'\n * }]\n * ...\n * ```\n *\n * @type {String}\n * @default 'en-US'\n */\n language: void 0,\n\n /**\n * @description\n * Data source for [select](http://docs.handsontable.com/demo-select.html)-typed cells.\n *\n * @example\n * ```js\n * ...\n * columns: [{\n * editor: 'select',\n * selectOptions: ['A', 'B', 'C'],\n * }]\n * ...\n * ```\n *\n * @type {Array}\n */\n selectOptions: void 0,\n\n /**\n * Enables or disables the autoColumnSize plugin. Default value is `undefined`, which has the same effect as `true`.\n * Disabling this plugin can increase performance, as no size-related calculations would be done.\n *\n * Column width calculations are divided into sync and async part. Each of this parts has their own advantages and\n * disadvantages. Synchronous calculations are faster but they block the browser UI, while the slower asynchronous operations don't\n * block the browser UI.\n *\n * To configure the sync/async distribution, you can pass an absolute value (number of columns) or a percentage value.\n * `syncLimit` option is available since 0.16.0.\n *\n * You can also use the `useHeaders` option to take the column headers with into calculation.\n *\n * @example\n * ```js\n * ...\n * // as a number (300 columns in sync, rest async)\n * autoColumnSize: {syncLimit: 300},\n * ...\n *\n * ...\n * // as a string (percent)\n * autoColumnSize: {syncLimit: '40%'},\n * ...\n *\n * ...\n * // use headers width while calculation the column width\n * autoColumnSize: {useHeaders: true},\n * ...\n *\n * ```\n *\n * @type {Object|Boolean}\n * @default {syncLimit: 50}\n */\n autoColumnSize: void 0,\n\n /**\n * Enables or disables autoRowSize plugin. Default value is `undefined`, which has the same effect as `true`.\n * Disabling this plugin can increase performance, as no size-related calculations would be performed.\n *\n * Row height calculations are divided into sync and async stages. Each of these stages has their own advantages and\n * disadvantages. Synchronous calculations are faster but they block the browser UI, while the slower asynchronous operations don't\n * block the browser UI.\n *\n * To configure the sync/async distribution, you can pass an absolute value (number of columns) or a percentage value.\n * `syncLimit` options is available since 0.16.0.\n *\n * @example\n * ```js\n * ...\n * // as number (300 columns in sync, rest async)\n * autoRowSize: {syncLimit: 300},\n * ...\n *\n * ...\n * // as string (percent)\n * autoRowSize: {syncLimit: '40%'},\n * ...\n * ```\n * @type {Object|Boolean}\n * @default {syncLimit: 1000}\n */\n autoRowSize: void 0,\n\n /**\n * Date validation format.\n *\n * Option desired for `'date'` - typed cells.\n *\n * @example\n * ```js\n * ...\n * columns: [{\n * type: 'date',\n * dateFormat: 'MM/DD/YYYY'\n * }]\n * ...\n * ```\n *\n * @type {String}\n * @default 'DD/MM/YYYY'\n */\n dateFormat: void 0,\n\n /**\n * If `true` then dates will be automatically formatted to match the desired format.\n *\n * Option desired for `'date'`-typed typed cells.\n *\n * @example\n * ```js\n * ...\n * columns: [{\n * type: 'date',\n * dateFormat: 'YYYY-MM-DD',\n * correctFormat: true\n * }]\n * ...\n * ```\n *\n * @type {Boolean}\n * @default false\n */\n correctFormat: false,\n\n /**\n * Definition of default value which will fill the empty cells.\n *\n * Option desired for `'date'`-typed cells.\n *\n * @example\n * ```js\n * ...\n * columns: [{\n * type: 'date',\n * defaultData: '2015-02-02'\n * }]\n * ...\n * ```\n *\n * @type {String}\n */\n defaultDate: void 0,\n\n /**\n * If set to `true`, the value entered into the cell must match (case-sensitive) the autocomplete source. Otherwise, cell won't pass the validation.\n * When filtering the autocomplete source list, the editor will be working in case-insensitive mode.\n *\n * Option desired for `autocomplete`-typed cells.\n *\n * @example\n * ```js\n * ...\n * columns: [{\n * type: 'autocomplete',\n * source: ['A', 'B', 'C'],\n * strict: true\n * }]\n * ...\n * ```\n *\n * @type {Boolean}\n */\n strict: void 0,\n\n /**\n * @description\n * If typed `true`, data defined in `source` of the autocomplete or dropdown cell will be treated as HTML.\n *\n * __Warning:__ Enabling this option can cause serious XSS vulnerabilities.\n *\n * Option desired for `'autocomplete'`-typed cells.\n * @example\n * ```js\n * ...\n * columns: [{\n * type: 'autocomplete',\n * allowHtml: true,\n * source: ['<b>foo</b>', '<b>bar</b>']\n * }]\n * ...\n * ```\n * @type {Boolean}\n * @default false\n */\n allowHtml: false,\n\n /**\n * If typed `true` then virtual rendering mechanism for handsontable will be disabled.\n *\n * @type {Boolean}\n */\n renderAllRows: void 0,\n\n /**\n * Prevents table to overlap outside the parent element. If `'horizontal'` option is chosen then table will appear horizontal\n * scrollbar in case where parent's width is narrower then table's width.\n *\n * Possible values:\n * * `false` - Disables functionality (Default option).\n * * `horizontal` - Prevents horizontal overflow table.\n * * `vertical` - Prevents vertical overflow table (Not implemented yet).\n *\n * @since 0.20.3\n * @example\n * ```js\n * ...\n * preventOverflow: 'horizontal'\n * ...\n * ```\n *\n * @type {String|Boolean}\n */\n preventOverflow: false,\n\n /**\n * @description\n * Plugin allowing binding the table rows with their headers.\n * If the plugin is enabled, the table row headers will \"stick\" to the rows, when they are hidden/moved. Basically, if at the initialization\n * row 0 has a header titled \"A\", it will have it no matter what you do with the table.\n *\n * @pro\n * @since 1.0.0-beta1\n * @type {Boolean|String}\n * @example\n *\n * ```js\n * ...\n * var hot = new Handsontable(document.getElementById('example'), {\n * date: getData(),\n * bindRowsWithHeaders: true\n * });\n * ...\n * ```\n *\n */\n bindRowsWithHeaders: void 0,\n\n /**\n * @description\n * The CollapsibleColumns plugin allows collapsing of columns, covered by a header with the `colspan` property defined.\n *\n * Clicking the \"collapse/expand\" button collapses (or expands) all \"child\" headers except the first one.\n *\n * Setting the `collapsibleColumns` property to `true` will display a \"collapse/expand\" button in every header with a defined\n * `colspan` property.\n *\n * To limit this functionality to a smaller group of headers, define the `collapsibleColumns` property as an array of objects, as in\n * the example below.\n *\n * @pro\n * @since 1.0.0-beta1\n * @type {Boolean|Array}\n * @example\n * ```js\n * ...\n * collapsibleColumns: [\n * {row: -4, col: 1, collapsible: true},\n * {row: -3, col: 5, collapsible: true}\n * ]\n * ...\n * // or\n * ...\n * collapsibleColumns: true\n * ...\n * ```\n */\n collapsibleColumns: void 0,\n\n /**\n * @description\n * Allows making pre-defined calculations on the cell values and display the results within Handsontable.\n * See the demo for more information.\n *\n * @pro\n * @since 1.0.0-beta1\n * @type {Object}\n */\n columnSummary: void 0,\n\n /**\n * This plugin allows adding a configurable dropdown menu to the table's column headers.\n * The dropdown menu acts like the Context Menu, but is triggered by clicking the button in the header.\n *\n * @pro\n * @since 1.0.0-beta1\n * @type {Boolean|Object|Array}\n */\n dropdownMenu: void 0,\n\n /**\n * The filters plugin.\n * It allows filtering the table data either by the built-in component or with the API.\n *\n * @pro\n * @since 1.0.0-beta1\n * @type {Boolean}\n */\n filters: void 0,\n\n /**\n * It allows Handsontable to process formula expressions defined in the provided data.\n *\n * @pro\n * @since 1.7.0\n * @type {Boolean}\n */\n formulas: void 0,\n\n /**\n * @description\n * GanttChart plugin enables a possibility to create a Gantt chart using a Handsontable instance.\n * In this case, the whole table becomes read-only.\n *\n * @pro\n * @since 1.0.0-beta1\n * @type {Object}\n */\n ganttChart: void 0,\n\n /**\n * @description\n * Allows adding a tooltip to the table headers.\n *\n * Available options:\n * * the `rows` property defines if tooltips should be added to row headers,\n * * the `columns` property defines if tooltips should be added to column headers,\n * * the `onlyTrimmed` property defines if tooltips should be added only to headers, which content is trimmed by the header itself (the content being wider then the header).\n *\n * @pro\n * @since 1.0.0-beta1\n * @type {Boolean|Object}\n */\n headerTooltips: void 0,\n\n /**\n * Plugin allowing hiding of certain columns.\n *\n * @pro\n * @since 1.0.0-beta1\n * @type {Boolean|Object}\n */\n hiddenColumns: void 0,\n\n /**\n * @description\n * Plugin allowing hiding of certain rows.\n *\n * @pro\n * @since 1.0.0-beta1\n * @type {Boolean|Object}\n */\n hiddenRows: void 0,\n\n /**\n * @description\n * Allows creating a nested header structure, using the HTML's colspan attribute.\n *\n * @pro\n * @since 1.0.0-beta1\n * @type {Array}\n */\n nestedHeaders: void 0,\n\n /**\n * @description\n * Plugin allowing hiding of certain rows.\n *\n * @pro\n * @since 1.0.0-beta1\n * @type {Boolean|Array}\n */\n trimRows: void 0,\n\n /**\n * @description\n * Allows setting a custom width of the row headers. You can provide a number or an array of widths, if many row header levels are defined.\n *\n * @since 0.22.0\n * @type {Number|Array}\n */\n rowHeaderWidth: void 0,\n\n /**\n * @description\n * Allows setting a custom height of the column headers. You can provide a number or an array of heights, if many column header levels are defined.\n *\n * @since 0.22.0\n * @type {Number|Array}\n */\n columnHeaderHeight: void 0,\n\n /**\n * @description\n * Enabling this plugin switches table into one-way data binding where changes are applied into data source (from outside table)\n * will be automatically reflected in the table.\n *\n * For every data change [afterChangesObserved](Hooks.html#event:afterChangesObserved) hook will be fired.\n *\n * @type {Boolean}\n * @default false\n */\n observeChanges: void 0,\n\n /**\n * @description\n * When passed to the `column` property, allows specifying a custom sorting function for the desired column.\n *\n * @since 0.24.0\n * @type {Function}\n * @example\n * ```js\n * columns: [\n * {\n * sortFunction: function(sortOrder) {\n * return function(a, b) {\n * // sorting function body.\n * //\n * // Function parameters:\n * // sortOrder: If true, the order is ascending, if false - descending. undefined = original order\n * // a, b: Two compared elements. These are 2-element arrays, with the first element being the row index, the second - cell value.\n * }\n * }\n * }\n * ]\n * ```\n */\n sortFunction: void 0,\n\n /**\n * If defined as 'true', the Autocomplete's suggestion list would be sorted by relevance (the closer to the left the match is, the higher the suggestion).\n *\n * Option desired for cells of the `'autocomplete'` type.\n *\n * @type {Boolean}\n * @default true\n */\n sortByRelevance: true,\n\n /**\n * If defined as 'true', when the user types into the input area the Autocomplete's suggestion list is updated to only\n * include those choices starting with what has been typed; if defined as 'false' all suggestions remain shown, with\n * those matching what has been typed marked in bold.\n *\n * @type {Boolean}\n * @default true\n */\n filter: true,\n\n /**\n * If defined as 'true', filtering in the Autocomplete Editor will be case-sensitive.\n *\n * @type {Boolean}\n * @default: false\n */\n filteringCaseSensitive: false,\n};\n\nexport default DefaultSettings;\n\n\n\n// WEBPACK FOOTER //\n// src/defaultSettings.js","import {KEY_CODES, isPrintableChar} from './../helpers/unicode';\nimport {stringify} from './../helpers/mixed';\nimport {stripTags} from './../helpers/string';\nimport {pivot, arrayFilter, arrayMap} from './../helpers/array';\nimport {\n addClass,\n getCaretPosition,\n getScrollbarWidth,\n getSelectionEndPosition,\n outerWidth,\n outerHeight,\n offset,\n getTrimmingContainer,\n setCaretPosition,\n} from './../helpers/dom/element';\nimport {registerEditor} from './../editors';\nimport HandsontableEditor from './handsontableEditor';\n\nconst AutocompleteEditor = HandsontableEditor.prototype.extend();\n\n/**\n * @private\n * @editor AutocompleteEditor\n * @class AutocompleteEditor\n * @dependencies HandsontableEditor\n */\nAutocompleteEditor.prototype.init = function() {\n HandsontableEditor.prototype.init.apply(this, arguments);\n\n this.query = null;\n this.choices = [];\n};\n\nAutocompleteEditor.prototype.createElements = function() {\n HandsontableEditor.prototype.createElements.apply(this, arguments);\n\n addClass(this.htContainer, 'autocompleteEditor');\n addClass(this.htContainer, window.navigator.platform.indexOf('Mac') === -1 ? '' : 'htMacScroll');\n};\n\nvar skipOne = false;\nfunction onBeforeKeyDown(event) {\n skipOne = false;\n let editor = this.getActiveEditor();\n\n if (isPrintableChar(event.keyCode) || event.keyCode === KEY_CODES.BACKSPACE ||\n event.keyCode === KEY_CODES.DELETE || event.keyCode === KEY_CODES.INSERT) {\n let timeOffset = 0;\n\n // on ctl+c / cmd+c don't update suggestion list\n if (event.keyCode === KEY_CODES.C && (event.ctrlKey || event.metaKey)) {\n return;\n }\n if (!editor.isOpened()) {\n timeOffset += 10;\n }\n\n if (editor.htEditor) {\n editor.instance._registerTimeout(setTimeout(() => {\n editor.queryChoices(editor.TEXTAREA.value);\n skipOne = true;\n }, timeOffset));\n }\n }\n}\n\nAutocompleteEditor.prototype.prepare = function() {\n this.instance.addHook('beforeKeyDown', onBeforeKeyDown);\n HandsontableEditor.prototype.prepare.apply(this, arguments);\n};\n\nAutocompleteEditor.prototype.open = function() {\n // Ugly fix for handsontable which grab window object for autocomplete scroll listener instead table element.\n this.TEXTAREA_PARENT.style.overflow = 'auto';\n HandsontableEditor.prototype.open.apply(this, arguments);\n this.TEXTAREA_PARENT.style.overflow = '';\n\n let choicesListHot = this.htEditor.getInstance();\n let _this = this;\n let trimDropdown = this.cellProperties.trimDropdown === void 0 ? true : this.cellProperties.trimDropdown;\n\n this.TEXTAREA.style.visibility = 'visible';\n this.focus();\n\n choicesListHot.updateSettings({\n colWidths: trimDropdown ? [outerWidth(this.TEXTAREA) - 2] : void 0,\n width: trimDropdown ? outerWidth(this.TEXTAREA) + getScrollbarWidth() + 2 : void 0,\n afterRenderer(TD, row, col, prop, value, cellProperties) {\n let {filteringCaseSensitive, allowHtml} = _this.cellProperties;\n let indexOfMatch;\n let match;\n\n value = stringify(value);\n\n if (value && !allowHtml) {\n indexOfMatch = filteringCaseSensitive === true ? value.indexOf(this.query) : value.toLowerCase().indexOf(_this.query.toLowerCase());\n\n if (indexOfMatch !== -1) {\n match = value.substr(indexOfMatch, _this.query.length);\n value = value.replace(match, `<strong>${match}</strong>`);\n }\n }\n TD.innerHTML = value;\n },\n autoColumnSize: true,\n modifyColWidth(width, col) {\n // workaround for <strong> text overlapping the dropdown, not really accurate\n let autoWidths = this.getPlugin('autoColumnSize').widths;\n\n if (autoWidths[col]) {\n width = autoWidths[col];\n }\n\n return trimDropdown ? width : width + 15;\n }\n });\n\n // Add additional space for autocomplete holder\n this.htEditor.view.wt.wtTable.holder.parentNode.style['padding-right'] = `${getScrollbarWidth() + 2}px`;\n\n if (skipOne) {\n skipOne = false;\n }\n\n _this.instance._registerTimeout(setTimeout(() => {\n _this.queryChoices(_this.TEXTAREA.value);\n }, 0));\n};\n\nAutocompleteEditor.prototype.close = function() {\n HandsontableEditor.prototype.close.apply(this, arguments);\n};\nAutocompleteEditor.prototype.queryChoices = function(query) {\n this.query = query;\n\n const {source, filter, filteringCaseSensitive, allowHtml} = this.cellProperties;\n const stripTagsEach = (choices) => arrayMap(choices, (choice) => stripTags(choice));\n\n if (typeof source == 'function') {\n source.call(this.cellProperties, query, (choices) => {\n this.updateChoicesList(allowHtml ? choices : stripTagsEach(choices));\n });\n\n } else if (Array.isArray(source)) {\n this.updateChoicesList(allowHtml ? source : stripTagsEach(source));\n\n } else {\n this.updateChoicesList([]);\n }\n};\n\nAutocompleteEditor.prototype.updateChoicesList = function(choices) {\n let pos = getCaretPosition(this.TEXTAREA);\n let endPos = getSelectionEndPosition(this.TEXTAREA);\n let sortByRelevanceSetting = this.cellProperties.sortByRelevance;\n let filterSetting = this.cellProperties.filter;\n let orderByRelevance = null;\n let highlightIndex = null;\n let flipped = null;\n\n if (sortByRelevanceSetting) {\n orderByRelevance = AutocompleteEditor.sortByRelevance(this.getValue(), choices, this.cellProperties.filteringCaseSensitive);\n }\n let orderByRelevanceLength = Array.isArray(orderByRelevance) ? orderByRelevance.length : 0;\n\n if (filterSetting === false) {\n if (orderByRelevanceLength) {\n highlightIndex = orderByRelevance[0];\n }\n } else {\n let sorted = [];\n\n for (let i = 0, choicesCount = choices.length; i < choicesCount; i++) {\n if (sortByRelevanceSetting && orderByRelevanceLength <= i) {\n break;\n }\n if (orderByRelevanceLength) {\n sorted.push(choices[orderByRelevance[i]]);\n } else {\n sorted.push(choices[i]);\n }\n }\n\n highlightIndex = 0;\n choices = sorted;\n }\n\n this.choices = choices;\n this.htEditor.loadData(pivot([choices]));\n\n this.updateDropdownHeight();\n\n this.flipDropdownIfNeeded();\n\n if (this.cellProperties.strict === true) {\n this.highlightBestMatchingChoice(highlightIndex);\n }\n\n this.instance.listen();\n this.TEXTAREA.focus();\n setCaretPosition(this.TEXTAREA, pos, (pos === endPos ? void 0 : endPos));\n};\n\nAutocompleteEditor.prototype.flipDropdownIfNeeded = function() {\n let textareaOffset = offset(this.TEXTAREA);\n let textareaHeight = outerHeight(this.TEXTAREA);\n let dropdownHeight = this.getDropdownHeight();\n let trimmingContainer = getTrimmingContainer(this.instance.view.wt.wtTable.TABLE);\n let trimmingContainerScrollTop = trimmingContainer.scrollTop;\n let headersHeight = outerHeight(this.instance.view.wt.wtTable.THEAD);\n let containerOffset = {\n row: 0,\n col: 0\n };\n\n if (trimmingContainer !== window) {\n containerOffset = offset(trimmingContainer);\n }\n\n let spaceAbove = textareaOffset.top - containerOffset.top - headersHeight + trimmingContainerScrollTop;\n let spaceBelow = trimmingContainer.scrollHeight - spaceAbove - headersHeight - textareaHeight;\n let flipNeeded = dropdownHeight > spaceBelow && spaceAbove > spaceBelow;\n\n if (flipNeeded) {\n this.flipDropdown(dropdownHeight);\n } else {\n this.unflipDropdown();\n }\n\n this.limitDropdownIfNeeded(flipNeeded ? spaceAbove : spaceBelow, dropdownHeight);\n\n return flipNeeded;\n};\n\nAutocompleteEditor.prototype.limitDropdownIfNeeded = function(spaceAvailable, dropdownHeight) {\n if (dropdownHeight > spaceAvailable) {\n let tempHeight = 0;\n let i = 0;\n let lastRowHeight = 0;\n let height = null;\n\n do {\n lastRowHeight = this.htEditor.getRowHeight(i) || this.htEditor.view.wt.wtSettings.settings.defaultRowHeight;\n tempHeight += lastRowHeight;\n i++;\n } while (tempHeight < spaceAvailable);\n\n height = tempHeight - lastRowHeight;\n\n if (this.htEditor.flipped) {\n this.htEditor.rootElement.style.top = `${parseInt(this.htEditor.rootElement.style.top, 10) + dropdownHeight - height}px`;\n }\n\n this.setDropdownHeight(tempHeight - lastRowHeight);\n }\n};\n\nAutocompleteEditor.prototype.flipDropdown = function(dropdownHeight) {\n let dropdownStyle = this.htEditor.rootElement.style;\n\n dropdownStyle.position = 'absolute';\n dropdownStyle.top = `${-dropdownHeight}px`;\n\n this.htEditor.flipped = true;\n};\n\nAutocompleteEditor.prototype.unflipDropdown = function() {\n let dropdownStyle = this.htEditor.rootElement.style;\n\n if (dropdownStyle.position === 'absolute') {\n dropdownStyle.position = '';\n dropdownStyle.top = '';\n }\n\n this.htEditor.flipped = void 0;\n};\n\nAutocompleteEditor.prototype.updateDropdownHeight = function() {\n var currentDropdownWidth = this.htEditor.getColWidth(0) + getScrollbarWidth() + 2;\n var trimDropdown = this.cellProperties.trimDropdown;\n\n this.htEditor.updateSettings({\n height: this.getDropdownHeight(),\n width: trimDropdown ? void 0 : currentDropdownWidth\n });\n\n this.htEditor.view.wt.wtTable.alignOverlaysWithTrimmingContainer();\n};\n\nAutocompleteEditor.prototype.setDropdownHeight = function(height) {\n this.htEditor.updateSettings({\n height\n });\n};\n\nAutocompleteEditor.prototype.finishEditing = function(restoreOriginalValue) {\n if (!restoreOriginalValue) {\n this.instance.removeHook('beforeKeyDown', onBeforeKeyDown);\n }\n HandsontableEditor.prototype.finishEditing.apply(this, arguments);\n};\n\nAutocompleteEditor.prototype.highlightBestMatchingChoice = function(index) {\n if (typeof index === 'number') {\n this.htEditor.selectCell(index, 0);\n } else {\n this.htEditor.deselectCell();\n }\n};\n\n/**\n * Filters and sorts by relevance\n * @param value\n * @param choices\n * @param caseSensitive\n * @returns {Array} array of indexes in original choices array\n */\nAutocompleteEditor.sortByRelevance = function(value, choices, caseSensitive) {\n let choicesRelevance = [];\n let currentItem;\n let valueLength = value.length;\n let valueIndex;\n let charsLeft;\n let result = [];\n let i;\n let choicesCount = choices.length;\n\n if (valueLength === 0) {\n for (i = 0; i < choicesCount; i++) {\n result.push(i);\n }\n return result;\n }\n\n for (i = 0; i < choicesCount; i++) {\n currentItem = stripTags(stringify(choices[i]));\n\n if (caseSensitive) {\n valueIndex = currentItem.indexOf(value);\n } else {\n valueIndex = currentItem.toLowerCase().indexOf(value.toLowerCase());\n }\n\n if (valueIndex !== -1) {\n charsLeft = currentItem.length - valueIndex - valueLength;\n\n choicesRelevance.push({\n baseIndex: i,\n index: valueIndex,\n charsLeft,\n value: currentItem\n });\n }\n }\n\n choicesRelevance.sort((a, b) => {\n\n if (b.index === -1) {\n return -1;\n }\n if (a.index === -1) {\n return 1;\n }\n\n if (a.index < b.index) {\n return -1;\n } else if (b.index < a.index) {\n return 1;\n } else if (a.index === b.index) {\n if (a.charsLeft < b.charsLeft) {\n return -1;\n } else if (a.charsLeft > b.charsLeft) {\n return 1;\n }\n }\n\n return 0;\n });\n\n for (i = 0, choicesCount = choicesRelevance.length; i < choicesCount; i++) {\n result.push(choicesRelevance[i].baseIndex);\n }\n\n return result;\n};\n\nAutocompleteEditor.prototype.getDropdownHeight = function() {\n let firstRowHeight = this.htEditor.getInstance().getRowHeight(0) || 23;\n let visibleRows = this.cellProperties.visibleRows;\n\n return this.choices.length >= visibleRows ? (visibleRows * firstRowHeight) : (this.choices.length * firstRowHeight) + 8;\n};\n\nAutocompleteEditor.prototype.allowKeyEventPropagation = function(keyCode) {\n let selected = {row: this.htEditor.getSelectedRange() ? this.htEditor.getSelectedRange().from.row : -1};\n let allowed = false;\n\n if (keyCode === KEY_CODES.ARROW_DOWN && selected.row > 0 && selected.row < this.htEditor.countRows() - 1) {\n allowed = true;\n }\n if (keyCode === KEY_CODES.ARROW_UP && selected.row > -1) {\n allowed = true;\n }\n\n return allowed;\n};\n\nAutocompleteEditor.prototype.discardEditor = function(result) {\n HandsontableEditor.prototype.discardEditor.apply(this, arguments);\n\n this.instance.view.render();\n};\n\nregisterEditor('autocomplete', AutocompleteEditor);\n\nexport default AutocompleteEditor;\n\n\n\n// WEBPACK FOOTER //\n// src/editors/autocompleteEditor.js","import {KEY_CODES} from './../helpers/unicode';\nimport {extend} from './../helpers/object';\nimport {setCaretPosition} from './../helpers/dom/element';\nimport {stopImmediatePropagation, isImmediatePropagationStopped} from './../helpers/dom/event';\nimport {getEditor, registerEditor} from './../editors';\nimport TextEditor from './textEditor';\n\nconst HandsontableEditor = TextEditor.prototype.extend();\n\n/**\n * @private\n * @editor HandsontableEditor\n * @class HandsontableEditor\n * @dependencies TextEditor\n */\nHandsontableEditor.prototype.createElements = function() {\n TextEditor.prototype.createElements.apply(this, arguments);\n\n var DIV = document.createElement('DIV');\n DIV.className = 'handsontableEditor';\n this.TEXTAREA_PARENT.appendChild(DIV);\n\n this.htContainer = DIV;\n this.assignHooks();\n};\n\nHandsontableEditor.prototype.prepare = function(td, row, col, prop, value, cellProperties) {\n\n TextEditor.prototype.prepare.apply(this, arguments);\n\n var parent = this;\n var options = {\n startRows: 0,\n startCols: 0,\n minRows: 0,\n minCols: 0,\n className: 'listbox',\n copyPaste: false,\n autoColumnSize: false,\n autoRowSize: false,\n readOnly: true,\n fillHandle: false,\n afterOnCellMouseDown() {\n var value = this.getValue();\n\n // if the value is undefined then it means we don't want to set the value\n if (value !== void 0) {\n parent.setValue(value);\n }\n parent.instance.destroyEditor();\n }\n };\n\n if (this.cellProperties.handsontable) {\n extend(options, cellProperties.handsontable);\n }\n this.htOptions = options;\n};\n\nvar onBeforeKeyDown = function(event) {\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n var editor = this.getActiveEditor();\n\n var innerHOT = editor.htEditor.getInstance();\n\n var rowToSelect;\n var selectedRow;\n\n if (event.keyCode == KEY_CODES.ARROW_DOWN) {\n if (!innerHOT.getSelected() && !innerHOT.flipped) {\n rowToSelect = 0;\n } else if (innerHOT.getSelected()) {\n if (innerHOT.flipped) {\n rowToSelect = innerHOT.getSelected()[0] + 1;\n } else if (!innerHOT.flipped) {\n selectedRow = innerHOT.getSelected()[0];\n var lastRow = innerHOT.countRows() - 1;\n rowToSelect = Math.min(lastRow, selectedRow + 1);\n }\n }\n } else if (event.keyCode == KEY_CODES.ARROW_UP) {\n if (!innerHOT.getSelected() && innerHOT.flipped) {\n rowToSelect = innerHOT.countRows() - 1;\n\n } else if (innerHOT.getSelected()) {\n if (innerHOT.flipped) {\n selectedRow = innerHOT.getSelected()[0];\n rowToSelect = Math.max(0, selectedRow - 1);\n } else {\n selectedRow = innerHOT.getSelected()[0];\n rowToSelect = selectedRow - 1;\n }\n }\n }\n\n if (rowToSelect !== void 0) {\n if (rowToSelect < 0 || (innerHOT.flipped && rowToSelect > innerHOT.countRows() - 1)) {\n innerHOT.deselectCell();\n } else {\n innerHOT.selectCell(rowToSelect, 0);\n }\n if (innerHOT.getData().length) {\n event.preventDefault();\n stopImmediatePropagation(event);\n\n editor.instance.listen();\n editor.TEXTAREA.focus();\n }\n }\n};\n\nHandsontableEditor.prototype.open = function() {\n\n this.instance.addHook('beforeKeyDown', onBeforeKeyDown);\n\n TextEditor.prototype.open.apply(this, arguments);\n\n if (this.htEditor) {\n this.htEditor.destroy();\n }\n this.htEditor = new Handsontable(this.htContainer, this.htOptions);\n\n if (this.cellProperties.strict) {\n this.htEditor.selectCell(0, 0);\n this.TEXTAREA.style.visibility = 'hidden';\n } else {\n this.htEditor.deselectCell();\n this.TEXTAREA.style.visibility = 'visible';\n }\n\n setCaretPosition(this.TEXTAREA, 0, this.TEXTAREA.value.length);\n};\n\nHandsontableEditor.prototype.close = function() {\n this.instance.removeHook('beforeKeyDown', onBeforeKeyDown);\n this.instance.listen();\n\n TextEditor.prototype.close.apply(this, arguments);\n};\n\nHandsontableEditor.prototype.focus = function() {\n this.instance.listen();\n TextEditor.prototype.focus.apply(this, arguments);\n};\n\nHandsontableEditor.prototype.beginEditing = function(initialValue) {\n var onBeginEditing = this.instance.getSettings().onBeginEditing;\n\n if (onBeginEditing && onBeginEditing() === false) {\n return;\n }\n TextEditor.prototype.beginEditing.apply(this, arguments);\n};\n\nHandsontableEditor.prototype.finishEditing = function(isCancelled, ctrlDown) {\n if (this.htEditor && this.htEditor.isListening()) { // if focus is still in the HOT editor\n\n this.instance.listen(); // return the focus to the parent HOT instance\n }\n\n if (this.htEditor && this.htEditor.getSelected()) {\n var value = this.htEditor.getInstance().getValue();\n\n if (value !== void 0) { // if the value is undefined then it means we don't want to set the value\n this.setValue(value);\n }\n }\n\n return TextEditor.prototype.finishEditing.apply(this, arguments);\n};\n\nHandsontableEditor.prototype.assignHooks = function() {\n var _this = this;\n\n this.instance.addHook('afterDestroy', () => {\n if (_this.htEditor) {\n _this.htEditor.destroy();\n }\n });\n};\n\nregisterEditor('handsontable', HandsontableEditor);\n\nexport default HandsontableEditor;\n\n\n\n// WEBPACK FOOTER //\n// src/editors/handsontableEditor.js","import {arrayEach, arrayReduce, arrayMap, arrayMax} from './../helpers/array';\nimport {defineGetter} from './../helpers/object';\nimport {rangeEach} from './../helpers/number';\n\nconst MIXIN_NAME = 'arrayMapper';\n\n/**\n * @type {Object}\n */\nconst arrayMapper = {\n _arrayMap: [],\n\n /**\n * Get value by map index.\n *\n * @param {Number} index Array index.\n * @return {*} Returns value mapped to passed index.\n */\n getValueByIndex(index) {\n let value;\n\n /* eslint-disable no-cond-assign */\n return (value = this._arrayMap[index]) === void 0 ? null : value;\n },\n\n /**\n * Get map index by its value.\n *\n * @param {*} value Value to search.\n * @returns {Number} Returns array index.\n */\n getIndexByValue(value) {\n let index;\n\n /* eslint-disable no-cond-assign */\n return (index = this._arrayMap.indexOf(value)) === -1 ? null : index;\n },\n\n /**\n * Insert new items to array mapper starting at passed index. New entries will be a continuation of last value in the array.\n *\n * @param {Number} index Array index.\n * @param {Number} [amount=1] Defines how many items will be created to an array.\n * @returns {Array} Returns added items.\n */\n insertItems(index, amount = 1) {\n let newIndex = arrayMax(this._arrayMap) + 1;\n let addedItems = [];\n\n rangeEach(amount - 1, (count) => {\n addedItems.push(this._arrayMap.splice(index + count, 0, newIndex + count));\n });\n\n return addedItems;\n },\n\n /**\n * Remove items from array mapper.\n *\n * @param {Number} index Array index.\n * @param {Number} [amount=1] Defines how many items will be created to an array.\n * @returns {Array} Returns removed items.\n */\n removeItems(index, amount = 1) {\n let removedItems = [];\n\n if (Array.isArray(index)) {\n let mapCopy = [].concat(this._arrayMap);\n\n // Sort descending\n index.sort((a, b) => b - a);\n\n removedItems = arrayReduce(index, (acc, item) => {\n this._arrayMap.splice(item, 1);\n\n return acc.concat(mapCopy.slice(item, item + 1));\n }, []);\n\n } else {\n removedItems = this._arrayMap.splice(index, amount);\n }\n\n return removedItems;\n },\n\n /**\n * Unshift items (remove and shift chunk of array to the left).\n *\n * @param {Number|Array} index Array index or Array of indexes to unshift.\n * @param {Number} [amount=1] Defines how many items will be removed from an array (when index is passed as number).\n */\n unshiftItems(index, amount = 1) {\n let removedItems = this.removeItems(index, amount);\n\n function countRowShift(logicalRow) {\n // Todo: compare perf between reduce vs sort->each->brake\n return arrayReduce(removedItems, (count, removedLogicalRow) => {\n if (logicalRow > removedLogicalRow) {\n count++;\n }\n\n return count;\n }, 0);\n }\n\n this._arrayMap = arrayMap(this._arrayMap, (logicalRow, physicalRow) => {\n let rowShift = countRowShift(logicalRow);\n\n if (rowShift) {\n logicalRow -= rowShift;\n }\n\n return logicalRow;\n });\n },\n\n /**\n * Shift (right shifting) items starting at passed index.\n *\n * @param {Number} index Array index.\n * @param {Number} [amount=1] Defines how many items will be created to an array.\n */\n shiftItems(index, amount = 1) {\n this._arrayMap = arrayMap(this._arrayMap, (row) => {\n if (row >= index) {\n row += amount;\n }\n\n return row;\n });\n\n rangeEach(amount - 1, (count) => {\n this._arrayMap.splice(index + count, 0, index + count);\n });\n },\n\n /**\n * Clear all stored index<->value information from an array.\n */\n clearMap() {\n this._arrayMap.length = 0;\n }\n};\n\ndefineGetter(arrayMapper, 'MIXIN_NAME', MIXIN_NAME, {\n writable: false,\n enumerable: false,\n});\n\nexport default arrayMapper;\n\n\n\n// WEBPACK FOOTER //\n// src/mixins/arrayMapper.js","function MultiMap() {\n var map = {\n arrayMap: [],\n weakMap: new WeakMap(),\n };\n\n return {\n get(key) {\n if (canBeAnArrayMapKey(key)) {\n return map.arrayMap[key];\n } else if (canBeAWeakMapKey(key)) {\n return map.weakMap.get(key);\n }\n },\n\n set(key, value) {\n if (canBeAnArrayMapKey(key)) {\n map.arrayMap[key] = value;\n } else if (canBeAWeakMapKey(key)) {\n map.weakMap.set(key, value);\n } else {\n throw new Error('Invalid key type');\n }\n },\n\n delete(key) {\n if (canBeAnArrayMapKey(key)) {\n delete map.arrayMap[key];\n } else if (canBeAWeakMapKey(key)) {\n map.weakMap.delete(key);\n }\n },\n };\n\n function canBeAnArrayMapKey(obj) {\n return obj !== null && !isNaNSymbol(obj) && (typeof obj == 'string' || typeof obj == 'number');\n }\n\n function canBeAWeakMapKey(obj) {\n return obj !== null && (typeof obj == 'object' || typeof obj == 'function');\n }\n\n function isNaNSymbol(obj) {\n /* eslint-disable no-self-compare */\n return obj !== obj; // NaN === NaN is always false\n }\n}\n\nexport default MultiMap;\n\n\n\n// WEBPACK FOOTER //\n// src/multiMap.js","import {getWindowScrollLeft, getWindowScrollTop} from './../../helpers/dom/element';\nimport {pageX, pageY} from './../../helpers/dom/event';\n\n/**\n * Helper class for checking if element will fit at the desired side of cursor.\n *\n * @class Cursor\n * @plugin ContextMenu\n */\nclass Cursor {\n constructor(object) {\n let windowScrollTop = getWindowScrollTop();\n let windowScrollLeft = getWindowScrollLeft();\n let top,\n topRelative;\n let left,\n leftRelative;\n let cellHeight,\n cellWidth;\n\n this.type = this.getSourceType(object);\n\n if (this.type === 'literal') {\n top = parseInt(object.top, 10);\n left = parseInt(object.left, 10);\n cellHeight = object.height || 0;\n cellWidth = object.width || 0;\n topRelative = top;\n leftRelative = left;\n top += windowScrollTop;\n left += windowScrollLeft;\n\n } else if (this.type === 'event') {\n top = parseInt(pageY(object), 10);\n left = parseInt(pageX(object), 10);\n cellHeight = object.target.clientHeight;\n cellWidth = object.target.clientWidth;\n topRelative = top - windowScrollTop;\n leftRelative = left - windowScrollLeft;\n }\n\n this.top = top;\n this.topRelative = topRelative;\n this.left = left;\n this.leftRelative = leftRelative;\n this.scrollTop = windowScrollTop;\n this.scrollLeft = windowScrollLeft;\n this.cellHeight = cellHeight;\n this.cellWidth = cellWidth;\n }\n\n /**\n * Get source type name.\n *\n * @param {*} object Event or Object with coordinates.\n * @returns {String} Returns one of this values: `'literal'`, `'event'`.\n */\n getSourceType(object) {\n let type = 'literal';\n\n if (object instanceof Event) {\n type = 'event';\n }\n\n return type;\n }\n\n /**\n * Checks if element can be placed above the cursor.\n *\n * @param {HTMLElement} element Element to check if it's size will fit above the cursor.\n * @returns {Boolean}\n */\n fitsAbove(element) {\n return this.topRelative >= element.offsetHeight;\n }\n\n /**\n * Checks if element can be placed below the cursor.\n *\n * @param {HTMLElement} element Element to check if it's size will fit below the cursor.\n * @param {Number} [viewportHeight] The viewport height.\n * @returns {Boolean}\n */\n fitsBelow(element, viewportHeight = window.innerHeight) {\n return this.topRelative + element.offsetHeight <= viewportHeight;\n }\n\n /**\n * Checks if element can be placed on the right of the cursor.\n *\n * @param {HTMLElement} element Element to check if it's size will fit on the right of the cursor.\n * @param {Number} [viewportWidth] The viewport width.\n * @returns {Boolean}\n */\n fitsOnRight(element, viewportWidth = window.innerWidth) {\n return this.leftRelative + this.cellWidth + element.offsetWidth <= viewportWidth;\n }\n\n /**\n * Checks if element can be placed on the left on the cursor.\n *\n * @param {HTMLElement} element Element to check if it's size will fit on the left of the cursor.\n * @returns {Boolean}\n */\n fitsOnLeft(element) {\n return this.leftRelative >= element.offsetWidth;\n }\n}\n\nexport default Cursor;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/cursor.js","import arrayMapper from './../../mixins/arrayMapper';\nimport {arrayFilter} from './../../helpers/array';\nimport {mixin} from './../../helpers/object';\nimport {rangeEach} from './../../helpers/number';\n\n/**\n * @class ColumnsMapper\n * @plugin ManualColumnMove\n */\nclass ColumnsMapper {\n constructor(manualColumnMove) {\n /**\n * Instance of ManualColumnMove plugin.\n *\n * @type {ManualColumnMove}\n */\n this.manualColumnMove = manualColumnMove;\n }\n\n /**\n * Reset current map array and create new one.\n *\n * @param {Number} [length] Custom generated map length.\n */\n createMap(length) {\n let originLength = length === void 0 ? this._arrayMap.length : length;\n\n this._arrayMap.length = 0;\n\n rangeEach(originLength - 1, (itemIndex) => {\n this._arrayMap[itemIndex] = itemIndex;\n });\n }\n\n /**\n * Destroy class.\n */\n destroy() {\n this._arrayMap = null;\n }\n\n /**\n * Moving elements in columnsMapper.\n *\n * @param {Number} from Column index to move.\n * @param {Number} to Target index.\n */\n moveColumn(from, to) {\n let indexToMove = this._arrayMap[from];\n this._arrayMap[from] = null;\n this._arrayMap.splice(to, 0, indexToMove);\n }\n\n /**\n * Clearing arrayMap from `null` entries.\n */\n clearNull() {\n this._arrayMap = arrayFilter(this._arrayMap, (i) => i !== null);\n }\n}\n\nmixin(ColumnsMapper, arrayMapper);\n\nexport default ColumnsMapper;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualColumnMove/columnsMapper.js","import {isNumeric} from './../../../helpers/number';\n\nconst STATE_INITIALIZED = 0;\nconst STATE_BUILT = 1;\nconst STATE_APPENDED = 2;\nconst UNIT = 'px';\n\n/**\n * @class\n * @private\n */\nclass BaseUI {\n constructor(hotInstance) {\n /**\n * Instance of Handsontable.\n *\n * @type {Core}\n */\n this.hot = hotInstance;\n /**\n * DOM element representing the ui element.\n *\n * @type {HTMLElement}\n * @private\n */\n this._element = null;\n /**\n * Flag which determines build state of element.\n *\n * @type {Boolean}\n */\n this.state = STATE_INITIALIZED;\n }\n\n /**\n * Add created UI elements to table.\n *\n * @param {HTMLElement} wrapper Element which are parent for our UI element.\n */\n appendTo(wrapper) {\n wrapper.appendChild(this._element);\n\n this.state = STATE_APPENDED;\n }\n\n /**\n * Method for create UI element. Only create, without append to table.\n */\n build() {\n this._element = document.createElement('div');\n this.state = STATE_BUILT;\n }\n\n /**\n * Method for remove UI element.\n */\n destroy() {\n if (this.isAppended()) {\n this._element.parentElement.removeChild(this._element);\n }\n\n this._element = null;\n this.state = STATE_INITIALIZED;\n }\n\n /**\n * Check if UI element are appended.\n *\n * @returns {Boolean}\n */\n isAppended() {\n return this.state === STATE_APPENDED;\n }\n\n /**\n * Check if UI element are built.\n *\n * @returns {Boolean}\n */\n isBuilt() {\n return this.state >= STATE_BUILT;\n }\n\n /**\n * Setter for position.\n *\n * @param {Number} top New top position of the element.\n * @param {Number} left New left position of the element.\n */\n setPosition(top, left) {\n if (isNumeric(top)) {\n this._element.style.top = top + UNIT;\n }\n if (isNumeric(left)) {\n this._element.style.left = left + UNIT;\n }\n }\n\n /**\n * Getter for the element position.\n *\n * @returns {Object} Object contains left and top position of the element.\n */\n getPosition() {\n return {\n top: this._element.style.top ? parseInt(this._element.style.top, 10) : 0,\n left: this._element.style.left ? parseInt(this._element.style.left, 10) : 0\n };\n }\n\n /**\n * Setter for the element size.\n *\n * @param {Number} width New width of the element.\n * @param {Number} height New height of the element.\n */\n setSize(width, height) {\n if (isNumeric(width)) {\n this._element.style.width = width + UNIT;\n }\n if (isNumeric(height)) {\n this._element.style.height = height + UNIT;\n }\n }\n\n /**\n * Getter for the element position.\n *\n * @returns {Object} Object contains height and width of the element.\n */\n getSize() {\n return {\n width: this._element.style.width ? parseInt(this._element.style.width, 10) : 0,\n height: this._element.style.height ? parseInt(this._element.style.height, 10) : 0\n };\n }\n\n /**\n * Setter for the element offset. Offset means marginTop and marginLeft of the element.\n *\n * @param {Number} top New margin top of the element.\n * @param {Number} left New margin left of the element.\n */\n setOffset(top, left) {\n if (isNumeric(top)) {\n this._element.style.marginTop = top + UNIT;\n }\n if (isNumeric(left)) {\n this._element.style.marginLeft = left + UNIT;\n }\n }\n\n /**\n * Getter for the element offset.\n *\n * @returns {Object} Object contains top and left offset of the element.\n */\n getOffset() {\n return {\n top: this._element.style.marginTop ? parseInt(this._element.style.marginTop, 10) : 0,\n left: this._element.style.marginLeft ? parseInt(this._element.style.marginLeft, 10) : 0\n };\n }\n}\n\nexport default BaseUI;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualColumnMove/ui/_base.js","import arrayMapper from './../../mixins/arrayMapper';\nimport {arrayFilter} from './../../helpers/array';\nimport {mixin} from './../../helpers/object';\nimport {rangeEach} from './../../helpers/number';\n\n/**\n * @class RowsMapper\n * @plugin ManualRowMove\n */\nclass RowsMapper {\n constructor(manualRowMove) {\n /**\n * Instance of ManualRowMove plugin.\n *\n * @type {ManualRowMove}\n */\n this.manualRowMove = manualRowMove;\n }\n\n /**\n * Reset current map array and create new one.\n *\n * @param {Number} [length] Custom generated map length.\n */\n createMap(length) {\n let originLength = length === void 0 ? this._arrayMap.length : length;\n\n this._arrayMap.length = 0;\n\n rangeEach(originLength - 1, (itemIndex) => {\n this._arrayMap[itemIndex] = itemIndex;\n });\n }\n\n /**\n * Destroy class.\n */\n destroy() {\n this._arrayMap = null;\n }\n\n /**\n * Moving elements in rowsMapper.\n *\n * @param {Number} from Row index to move.\n * @param {Number} to Target index.\n */\n moveRow(from, to) {\n let indexToMove = this._arrayMap[from];\n this._arrayMap[from] = null;\n this._arrayMap.splice(to, 0, indexToMove);\n }\n\n /**\n * Clearing arrayMap from `null` entries.\n */\n clearNull() {\n this._arrayMap = arrayFilter(this._arrayMap, (i) => i !== null);\n }\n}\n\nmixin(RowsMapper, arrayMapper);\n\nexport default RowsMapper;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualRowMove/rowsMapper.js","const STATE_INITIALIZED = 0;\nconst STATE_BUILT = 1;\nconst STATE_APPENDED = 2;\nconst UNIT = 'px';\n\n/**\n * @class\n * @private\n */\nclass BaseUI {\n constructor(hotInstance) {\n /**\n * Instance of Handsontable.\n *\n * @type {Core}\n */\n this.hot = hotInstance;\n /**\n * DOM element representing the ui element.\n *\n * @type {HTMLElement}\n * @private\n */\n this._element = null;\n /**\n * Flag which determines build state of element.\n *\n * @type {Boolean}\n */\n this.state = STATE_INITIALIZED;\n }\n\n /**\n * Add created UI elements to table.\n *\n * @param {HTMLElement} wrapper Element which are parent for our UI element.\n */\n appendTo(wrapper) {\n wrapper.appendChild(this._element);\n\n this.state = STATE_APPENDED;\n }\n\n /**\n * Method for create UI element. Only create, without append to table.\n */\n build() {\n this._element = document.createElement('div');\n this.state = STATE_BUILT;\n }\n\n /**\n * Method for remove UI element.\n */\n destroy() {\n if (this.isAppended()) {\n this._element.parentElement.removeChild(this._element);\n }\n\n this._element = null;\n this.state = STATE_INITIALIZED;\n }\n\n /**\n * Check if UI element are appended.\n *\n * @returns {Boolean}\n */\n isAppended() {\n return this.state === STATE_APPENDED;\n }\n\n /**\n * Check if UI element are built.\n *\n * @returns {Boolean}\n */\n isBuilt() {\n return this.state >= STATE_BUILT;\n }\n\n /**\n * Setter for position.\n *\n * @param {Number} top New top position of the element.\n * @param {Number} left New left position of the element.\n */\n setPosition(top, left) {\n if (top) {\n this._element.style.top = top + UNIT;\n }\n if (left) {\n this._element.style.left = left + UNIT;\n }\n }\n\n /**\n * Getter for the element position.\n *\n * @returns {Object} Object contains left and top position of the element.\n */\n getPosition() {\n return {\n top: this._element.style.top ? parseInt(this._element.style.top, 10) : 0,\n left: this._element.style.left ? parseInt(this._element.style.left, 10) : 0\n };\n }\n\n /**\n * Setter for the element size.\n *\n * @param {Number} width New width of the element.\n * @param {Number} height New height of the element.\n */\n setSize(width, height) {\n if (width) {\n this._element.style.width = width + UNIT;\n }\n if (height) {\n this._element.style.height = height + UNIT;\n }\n }\n\n /**\n * Getter for the element position.\n *\n * @returns {Object} Object contains height and width of the element.\n */\n getSize() {\n return {\n width: this._element.style.width ? parseInt(this._element.style.width, 10) : 0,\n height: this._element.style.height ? parseInt(this._element.style.height, 10) : 0\n };\n }\n\n /**\n * Setter for the element offset. Offset means marginTop and marginLeft of the element.\n *\n * @param {Number} top New margin top of the element.\n * @param {Number} left New margin left of the element.\n */\n setOffset(top, left) {\n if (top) {\n this._element.style.marginTop = top + UNIT;\n }\n if (left) {\n this._element.style.marginLeft = left + UNIT;\n }\n }\n\n /**\n * Getter for the element offset.\n *\n * @returns {Object} Object contains top and left offset of the element.\n */\n getOffset() {\n return {\n top: this._element.style.marginTop ? parseInt(this._element.style.marginTop, 10) : 0,\n left: this._element.style.marginLeft ? parseInt(this._element.style.marginLeft, 10) : 0\n };\n }\n}\n\nexport default BaseUI;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualRowMove/ui/_base.js","/**\n * Refactored implementation of LinkedList (part of javascript-algorithms project) by Github users:\n * mgechev, AndriiHeonia, Microfed and Jakeh (part of javascript-algorithms project - all project contributors\n * at repository website)\n *\n * Link to repository: https://github.com/mgechev/javascript-algorithms\n */\n\n/**\n * Linked list node.\n *\n * @class NodeStructure\n * @util\n */\nclass NodeStructure {\n constructor(data) {\n /**\n * Data of the node.\n * @member {Object}\n */\n this.data = data;\n /**\n * Next node.\n * @member {NodeStructure}\n */\n this.next = null;\n /**\n * Previous node.\n * @member {NodeStructure}\n */\n this.prev = null;\n }\n}\n\n/**\n * Linked list.\n *\n * @class LinkedList\n * @util\n */\nclass LinkedList {\n constructor() {\n this.first = null;\n this.last = null;\n }\n\n /**\n * Add data to the end of linked list.\n *\n * @param {Object} data Data which should be added.\n */\n push(data) {\n const node = new NodeStructure(data);\n\n if (this.first === null) {\n this.first = node;\n this.last = node;\n\n } else {\n const temp = this.last;\n\n this.last = node;\n node.prev = temp;\n temp.next = node;\n }\n }\n\n /**\n * Add data to the beginning of linked list.\n *\n * @param {Object} data Data which should be added.\n */\n unshift(data) {\n const node = new NodeStructure(data);\n\n if (this.first === null) {\n this.first = node;\n this.last = node;\n\n } else {\n const temp = this.first;\n\n this.first = node;\n node.next = temp;\n temp.prev = node;\n }\n }\n\n /**\n * In order traversal of the linked list.\n *\n * @param {Function} callback Callback which should be executed on each node.\n */\n inorder(callback) {\n let temp = this.first;\n\n while (temp) {\n callback(temp);\n temp = temp.next;\n }\n }\n\n /**\n * Remove data from the linked list.\n *\n * @param {Object} data Data which should be removed.\n * @returns {Boolean} Returns true if data has been removed.\n */\n remove(data) {\n if (this.first === null) {\n return false;\n }\n\n let temp = this.first;\n let next;\n let prev;\n\n while (temp) {\n if (temp.data === data) {\n next = temp.next;\n prev = temp.prev;\n\n if (next) {\n next.prev = prev;\n }\n\n if (prev) {\n prev.next = next;\n }\n\n if (temp === this.first) {\n this.first = next;\n }\n\n if (temp === this.last) {\n this.last = prev;\n }\n\n return true;\n }\n\n temp = temp.next;\n }\n\n return false;\n }\n\n /**\n * Check if linked list contains cycle.\n *\n * @returns {Boolean} Returns true if linked list contains cycle.\n */\n hasCycle() {\n let fast = this.first;\n let slow = this.first;\n\n while (true) {\n if (fast === null) {\n return false;\n }\n\n fast = fast.next;\n\n if (fast === null) {\n return false;\n }\n\n fast = fast.next;\n slow = slow.next;\n\n if (fast === slow) {\n return true;\n }\n }\n };\n\n /**\n * Return last node from the linked list.\n *\n * @returns {NodeStructure} Last node.\n */\n pop() {\n if (this.last === null) {\n return null;\n }\n\n let temp = this.last;\n this.last = this.last.prev;\n\n return temp;\n };\n\n /**\n * Return first node from the linked list.\n *\n * @returns {NodeStructure} First node.\n */\n shift() {\n if (this.first === null) {\n return null;\n }\n\n const temp = this.first;\n this.first = this.first.next;\n\n return temp;\n };\n\n /**\n * Reverses the linked list recursively\n */\n recursiveReverse() {\n function inverse(current, next) {\n if (!next) {\n return;\n }\n inverse(next, next.next);\n next.next = current;\n }\n\n if (!this.first) {\n return;\n }\n\n inverse(this.first, this.first.next);\n\n this.first.next = null;\n const temp = this.first;\n this.first = this.last;\n this.last = temp;\n };\n\n /**\n * Reverses the linked list iteratively\n */\n reverse() {\n if (!this.first || !this.first.next) {\n return;\n }\n\n let current = this.first.next;\n let prev = this.first;\n let temp;\n\n while (current) {\n temp = current.next;\n current.next = prev;\n prev.prev = current;\n prev = current;\n current = temp;\n }\n\n this.first.next = null;\n this.last.prev = null;\n temp = this.first;\n this.first = prev;\n this.last = temp;\n };\n};\n\nexport {NodeStructure};\nexport default LinkedList;\n\n\n\n// WEBPACK FOOTER //\n// src/utils/dataStructures/linkedList.js","import {requestAnimationFrame, cancelAnimationFrame} from './../helpers/feature';\n\n/**\n * @class Interval\n * @util\n */\nclass Interval {\n static create(func, delay) {\n return new Interval(func, delay);\n }\n\n constructor(func, delay) {\n /**\n * Animation frame request id.\n *\n * @type {Number}\n */\n this.timer = null;\n /**\n * Function to invoke repeatedly.\n *\n * @type {Function}\n */\n this.func = func;\n /**\n * Number of milliseconds that function should wait before next call.\n */\n this.delay = parseDelay(delay);\n /**\n * Flag which indicates if interval object was stopped.\n *\n * @type {Boolean}\n * @default true\n */\n this.stopped = true;\n /**\n * Interval time (in milliseconds) of the last callback call.\n *\n * @private\n * @type {Number}\n */\n this._then = null;\n /**\n * Bounded function `func`.\n *\n * @private\n * @type {Function}\n */\n this._callback = () => this.__callback();\n }\n\n /**\n * Start loop.\n *\n * @returns {Interval}\n */\n start() {\n if (this.stopped) {\n this._then = Date.now();\n this.stopped = false;\n this.timer = requestAnimationFrame(this._callback);\n }\n\n return this;\n }\n\n /**\n * Stop looping.\n *\n * @returns {Interval}\n */\n stop() {\n if (!this.stopped) {\n this.stopped = true;\n cancelAnimationFrame(this.timer);\n this.timer = null;\n }\n\n return this;\n }\n\n /**\n * Loop callback, fired on every animation frame.\n *\n * @private\n */\n __callback() {\n this.timer = requestAnimationFrame(this._callback);\n\n if (this.delay) {\n const now = Date.now();\n const elapsed = now - this._then;\n\n if (elapsed > this.delay) {\n this._then = now - (elapsed % this.delay);\n this.func();\n }\n } else {\n this.func();\n }\n }\n}\n\nexport default Interval;\n\nexport function parseDelay(delay) {\n if (typeof delay === 'string' && /fps$/.test(delay)) {\n delay = 1000 / parseInt(delay.replace('fps', '') || 0, 10);\n }\n\n return delay;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/utils/interval.js","import LinkedList from '../dataStructures/linkedList';\n\n/**\n * Refactored implementation of mergeSort (part of javascript-algorithms project) by Github users:\n * mgechev, AndriiHeonia and lekkas (part of javascript-algorithms project - all project contributors\n * at repository website)\n *\n * Link to repository: https://github.com/mgechev/javascript-algorithms\n */\n\n/**\n * Specifies a function that defines the sort order. The array is sorted according to each\n * character's Unicode code point value, according to the string conversion of each element.\n *\n * @param a {*} first compared element.\n * @param b {*} second compared element.\n * @returns {Number}\n */\nconst defaultCompareFunction = function(a, b) {\n // sort lexically\n\n const firstValue = a.toString();\n const secondValue = b.toString();\n\n if (firstValue === secondValue) {\n return 0;\n\n } else if (firstValue < secondValue) {\n return -1;\n\n }\n return 1;\n\n};\n\n/**\n * Mergesort method which is recursively called for sorting the input array.\n *\n * @param {Array} array The array which should be sorted.\n * @param {Function} compareFunction Compares two items in an array. If compareFunction is not supplied,\n * elements are sorted by converting them to strings and comparing strings in Unicode code point order.\n * @param {Number} startIndex Left side of the subarray.\n * @param {Number} endIndex Right side of the subarray.\n * @returns {Array} Array with sorted subarray.\n */\nexport default function mergeSort(array, compareFunction = defaultCompareFunction, startIndex = 0, endIndex = array.length) {\n if (Math.abs(endIndex - startIndex) <= 1) {\n return [];\n }\n\n const middleIndex = Math.ceil((startIndex + endIndex) / 2);\n\n mergeSort(array, compareFunction, startIndex, middleIndex);\n mergeSort(array, compareFunction, middleIndex, endIndex);\n\n return merge(array, compareFunction, startIndex, middleIndex, endIndex);\n}\n\n/**\n * Devides and sort merges two subarrays of given array\n *\n * @param {Array} array The array which subarrays should be sorted.\n * @param {Number} startIndex The start of the first subarray.\n * This subarray is with end middle - 1.\n * @param {Number} middleIndex The start of the second array.\n * @param {Number} endIndex end - 1 is the end of the second array.\n * @returns {Array} The array with sorted subarray.\n */\nexport function merge(array, compareFunction, startIndex, middleIndex, endIndex) {\n const leftElements = new LinkedList();\n const rightElements = new LinkedList();\n const leftSize = middleIndex - startIndex;\n const rightSize = endIndex - middleIndex;\n const maxSize = Math.max(leftSize, rightSize);\n const size = endIndex - startIndex;\n\n for (let i = 0; i < maxSize; i += 1) {\n if (i < leftSize) {\n leftElements.push(array[startIndex + i]);\n }\n\n if (i < rightSize) {\n rightElements.push(array[middleIndex + i]);\n }\n }\n\n let i = 0;\n\n while (i < size) {\n if (leftElements.first && rightElements.first) {\n if (compareFunction(leftElements.first.data, rightElements.first.data) > 0) {\n array[startIndex + i] = rightElements.shift().data;\n\n } else {\n array[startIndex + i] = leftElements.shift().data;\n }\n\n } else if (leftElements.first) {\n\n array[startIndex + i] = leftElements.shift().data;\n } else {\n\n array[startIndex + i] = rightElements.shift().data;\n }\n\n i += 1;\n }\n\n return array;\n};\n\n\n\n// WEBPACK FOOTER //\n// src/utils/sortingAlgorithms/mergeSort.js","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject')\n , toLength = require('./_to-length')\n , toIndex = require('./_to-index');\nmodule.exports = function(IS_INCLUDES){\n return function($this, el, fromIndex){\n var O = toIObject($this)\n , length = toLength(O.length)\n , index = toIndex(fromIndex, length)\n , value;\n // Array#includes uses SameValueZero equality algorithm\n if(IS_INCLUDES && el != el)while(length > index){\n value = O[index++];\n if(value != value)return true;\n // Array#toIndex ignores holes, Array#includes - not\n } else for(;length > index; index++)if(IS_INCLUDES || index in O){\n if(O[index] === el)return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_array-includes.js\n// module id = 232\n// module chunks = 0","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof')\n , TAG = require('./_wks')('toStringTag')\n // ES3 wrong here\n , ARG = cof(function(){ return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function(it, key){\n try {\n return it[key];\n } catch(e){ /* empty */ }\n};\n\nmodule.exports = function(it){\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_classof.js\n// module id = 233\n// module chunks = 0","'use strict';\nvar dP = require('./_object-dp').f\n , create = require('./_object-create')\n , redefineAll = require('./_redefine-all')\n , ctx = require('./_ctx')\n , anInstance = require('./_an-instance')\n , defined = require('./_defined')\n , forOf = require('./_for-of')\n , $iterDefine = require('./_iter-define')\n , step = require('./_iter-step')\n , setSpecies = require('./_set-species')\n , DESCRIPTORS = require('./_descriptors')\n , fastKey = require('./_meta').fastKey\n , SIZE = DESCRIPTORS ? '_s' : 'size';\n\nvar getEntry = function(that, key){\n // fast case\n var index = fastKey(key), entry;\n if(index !== 'F')return that._i[index];\n // frozen object case\n for(entry = that._f; entry; entry = entry.n){\n if(entry.k == key)return entry;\n }\n};\n\nmodule.exports = {\n getConstructor: function(wrapper, NAME, IS_MAP, ADDER){\n var C = wrapper(function(that, iterable){\n anInstance(that, C, NAME, '_i');\n that._i = create(null); // index\n that._f = undefined; // first entry\n that._l = undefined; // last entry\n that[SIZE] = 0; // size\n if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear(){\n for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){\n entry.r = true;\n if(entry.p)entry.p = entry.p.n = undefined;\n delete data[entry.i];\n }\n that._f = that._l = undefined;\n that[SIZE] = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function(key){\n var that = this\n , entry = getEntry(that, key);\n if(entry){\n var next = entry.n\n , prev = entry.p;\n delete that._i[entry.i];\n entry.r = true;\n if(prev)prev.n = next;\n if(next)next.p = prev;\n if(that._f == entry)that._f = next;\n if(that._l == entry)that._l = prev;\n that[SIZE]--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /*, that = undefined */){\n anInstance(this, C, 'forEach');\n var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3)\n , entry;\n while(entry = entry ? entry.n : this._f){\n f(entry.v, entry.k, this);\n // revert to the last existing entry\n while(entry && entry.r)entry = entry.p;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key){\n return !!getEntry(this, key);\n }\n });\n if(DESCRIPTORS)dP(C.prototype, 'size', {\n get: function(){\n return defined(this[SIZE]);\n }\n });\n return C;\n },\n def: function(that, key, value){\n var entry = getEntry(that, key)\n , prev, index;\n // change existing entry\n if(entry){\n entry.v = value;\n // create new entry\n } else {\n that._l = entry = {\n i: index = fastKey(key, true), // <- index\n k: key, // <- key\n v: value, // <- value\n p: prev = that._l, // <- previous entry\n n: undefined, // <- next entry\n r: false // <- removed\n };\n if(!that._f)that._f = entry;\n if(prev)prev.n = entry;\n that[SIZE]++;\n // add to index\n if(index !== 'F')that._i[index] = entry;\n } return that;\n },\n getEntry: getEntry,\n setStrong: function(C, NAME, IS_MAP){\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n $iterDefine(C, NAME, function(iterated, kind){\n this._t = iterated; // target\n this._k = kind; // kind\n this._l = undefined; // previous\n }, function(){\n var that = this\n , kind = that._k\n , entry = that._l;\n // revert to the last existing entry\n while(entry && entry.r)entry = entry.p;\n // get next entry\n if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){\n // or finish the iteration\n that._t = undefined;\n return step(1);\n }\n // return step by kind\n if(kind == 'keys' )return step(0, entry.k);\n if(kind == 'values')return step(0, entry.v);\n return step(0, [entry.k, entry.v]);\n }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(NAME);\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_collection-strong.js\n// module id = 234\n// module chunks = 0","'use strict';\nvar redefineAll = require('./_redefine-all')\n , getWeak = require('./_meta').getWeak\n , anObject = require('./_an-object')\n , isObject = require('./_is-object')\n , anInstance = require('./_an-instance')\n , forOf = require('./_for-of')\n , createArrayMethod = require('./_array-methods')\n , $has = require('./_has')\n , arrayFind = createArrayMethod(5)\n , arrayFindIndex = createArrayMethod(6)\n , id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function(that){\n return that._l || (that._l = new UncaughtFrozenStore);\n};\nvar UncaughtFrozenStore = function(){\n this.a = [];\n};\nvar findUncaughtFrozen = function(store, key){\n return arrayFind(store.a, function(it){\n return it[0] === key;\n });\n};\nUncaughtFrozenStore.prototype = {\n get: function(key){\n var entry = findUncaughtFrozen(this, key);\n if(entry)return entry[1];\n },\n has: function(key){\n return !!findUncaughtFrozen(this, key);\n },\n set: function(key, value){\n var entry = findUncaughtFrozen(this, key);\n if(entry)entry[1] = value;\n else this.a.push([key, value]);\n },\n 'delete': function(key){\n var index = arrayFindIndex(this.a, function(it){\n return it[0] === key;\n });\n if(~index)this.a.splice(index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function(wrapper, NAME, IS_MAP, ADDER){\n var C = wrapper(function(that, iterable){\n anInstance(that, C, NAME, '_i');\n that._i = id++; // collection id\n that._l = undefined; // leak store for uncaught frozen objects\n if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.3.3.2 WeakMap.prototype.delete(key)\n // 23.4.3.3 WeakSet.prototype.delete(value)\n 'delete': function(key){\n if(!isObject(key))return false;\n var data = getWeak(key);\n if(data === true)return uncaughtFrozenStore(this)['delete'](key);\n return data && $has(data, this._i) && delete data[this._i];\n },\n // 23.3.3.4 WeakMap.prototype.has(key)\n // 23.4.3.4 WeakSet.prototype.has(value)\n has: function has(key){\n if(!isObject(key))return false;\n var data = getWeak(key);\n if(data === true)return uncaughtFrozenStore(this).has(key);\n return data && $has(data, this._i);\n }\n });\n return C;\n },\n def: function(that, key, value){\n var data = getWeak(anObject(key), true);\n if(data === true)uncaughtFrozenStore(that).set(key, value);\n else data[that._i] = value;\n return that;\n },\n ufstore: uncaughtFrozenStore\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_collection-weak.js\n// module id = 235\n// module chunks = 0","module.exports = require('./_global').document && document.documentElement;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_html.js\n// module id = 236\n// module chunks = 0","module.exports = !require('./_descriptors') && !require('./_fails')(function(){\n return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_ie8-dom-define.js\n// module id = 237\n// module chunks = 0","// check on default Array iterator\nvar Iterators = require('./_iterators')\n , ITERATOR = require('./_wks')('iterator')\n , ArrayProto = Array.prototype;\n\nmodule.exports = function(it){\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_is-array-iter.js\n// module id = 238\n// module chunks = 0","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg){\n return cof(arg) == 'Array';\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_is-array.js\n// module id = 239\n// module chunks = 0","// 20.1.2.3 Number.isInteger(number)\nvar isObject = require('./_is-object')\n , floor = Math.floor;\nmodule.exports = function isInteger(it){\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_is-integer.js\n// module id = 240\n// module chunks = 0","// 7.2.8 IsRegExp(argument)\nvar isObject = require('./_is-object')\n , cof = require('./_cof')\n , MATCH = require('./_wks')('match');\nmodule.exports = function(it){\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_is-regexp.js\n// module id = 241\n// module chunks = 0","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function(iterator, fn, value, entries){\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch(e){\n var ret = iterator['return'];\n if(ret !== undefined)anObject(ret.call(iterator));\n throw e;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_iter-call.js\n// module id = 242\n// module chunks = 0","'use strict';\nvar LIBRARY = require('./_library')\n , $export = require('./_export')\n , redefine = require('./_redefine')\n , hide = require('./_hide')\n , has = require('./_has')\n , Iterators = require('./_iterators')\n , $iterCreate = require('./_iter-create')\n , setToStringTag = require('./_set-to-string-tag')\n , getPrototypeOf = require('./_object-gpo')\n , ITERATOR = require('./_wks')('iterator')\n , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`\n , FF_ITERATOR = '@@iterator'\n , KEYS = 'keys'\n , VALUES = 'values';\n\nvar returnThis = function(){ return this; };\n\nmodule.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){\n $iterCreate(Constructor, NAME, next);\n var getMethod = function(kind){\n if(!BUGGY && kind in proto)return proto[kind];\n switch(kind){\n case KEYS: return function keys(){ return new Constructor(this, kind); };\n case VALUES: return function values(){ return new Constructor(this, kind); };\n } return function entries(){ return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator'\n , DEF_VALUES = DEFAULT == VALUES\n , VALUES_BUG = false\n , proto = Base.prototype\n , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]\n , $default = $native || getMethod(DEFAULT)\n , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined\n , $anyNative = NAME == 'Array' ? proto.entries || $native : $native\n , methods, key, IteratorPrototype;\n // Fix native\n if($anyNative){\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base));\n if(IteratorPrototype !== Object.prototype){\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if(DEF_VALUES && $native && $native.name !== VALUES){\n VALUES_BUG = true;\n $default = function values(){ return $native.call(this); };\n }\n // Define iterator\n if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if(DEFAULT){\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if(FORCED)for(key in methods){\n if(!(key in proto))redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_iter-define.js\n// module id = 243\n// module chunks = 0","module.exports = function(done, value){\n return {value: value, done: !!done};\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_iter-step.js\n// module id = 244\n// module chunks = 0","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys')\n , gOPS = require('./_object-gops')\n , pIE = require('./_object-pie')\n , toObject = require('./_to-object')\n , IObject = require('./_iobject')\n , $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function(){\n var A = {}\n , B = {}\n , S = Symbol()\n , K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function(k){ B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source){ // eslint-disable-line no-unused-vars\n var T = toObject(target)\n , aLen = arguments.length\n , index = 1\n , getSymbols = gOPS.f\n , isEnum = pIE.f;\n while(aLen > index){\n var S = IObject(arguments[index++])\n , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)\n , length = keys.length\n , j = 0\n , key;\n while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];\n } return T;\n} : $assign;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-assign.js\n// module id = 245\n// module chunks = 0","var has = require('./_has')\n , toIObject = require('./_to-iobject')\n , arrayIndexOf = require('./_array-includes')(false)\n , IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function(object, names){\n var O = toIObject(object)\n , i = 0\n , result = []\n , key;\n for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while(names.length > i)if(has(O, key = names[i++])){\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-keys-internal.js\n// module id = 246\n// module chunks = 0","var getKeys = require('./_object-keys')\n , toIObject = require('./_to-iobject')\n , isEnum = require('./_object-pie').f;\nmodule.exports = function(isEntries){\n return function(it){\n var O = toIObject(it)\n , keys = getKeys(O)\n , length = keys.length\n , i = 0\n , result = []\n , key;\n while(length > i)if(isEnum.call(O, key = keys[i++])){\n result.push(isEntries ? [key, O[key]] : O[key]);\n } return result;\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-to-array.js\n// module id = 247\n// module chunks = 0","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object')\n , anObject = require('./_an-object');\nvar check = function(O, proto){\n anObject(O);\n if(!isObject(proto) && proto !== null)throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function(test, buggy, set){\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch(e){ buggy = true; }\n return function setPrototypeOf(O, proto){\n check(O, proto);\n if(buggy)O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_set-proto.js\n// module id = 248\n// module chunks = 0","'use strict';\nvar global = require('./_global')\n , dP = require('./_object-dp')\n , DESCRIPTORS = require('./_descriptors')\n , SPECIES = require('./_wks')('species');\n\nmodule.exports = function(KEY){\n var C = global[KEY];\n if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {\n configurable: true,\n get: function(){ return this; }\n });\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_set-species.js\n// module id = 249\n// module chunks = 0","// https://github.com/tc39/proposal-string-pad-start-end\nvar toLength = require('./_to-length')\n , repeat = require('./_string-repeat')\n , defined = require('./_defined');\n\nmodule.exports = function(that, maxLength, fillString, left){\n var S = String(defined(that))\n , stringLength = S.length\n , fillStr = fillString === undefined ? ' ' : String(fillString)\n , intMaxLength = toLength(maxLength);\n if(intMaxLength <= stringLength || fillStr == '')return S;\n var fillLen = intMaxLength - stringLength\n , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));\n if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen);\n return left ? stringFiller + S : S + stringFiller;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_string-pad.js\n// module id = 250\n// module chunks = 0","'use strict';\nvar toInteger = require('./_to-integer')\n , defined = require('./_defined');\n\nmodule.exports = function repeat(count){\n var str = String(defined(this))\n , res = ''\n , n = toInteger(count);\n if(n < 0 || n == Infinity)throw RangeError(\"Count can't be negative\");\n for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;\n return res;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_string-repeat.js\n// module id = 251\n// module chunks = 0","exports.f = require('./_wks');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_wks-ext.js\n// module id = 252\n// module chunks = 0","var classof = require('./_classof')\n , ITERATOR = require('./_wks')('iterator')\n , Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function(it){\n if(it != undefined)return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/core.get-iterator-method.js\n// module id = 253\n// module chunks = 0","// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)\nvar $export = require('./_export');\n\n$export($export.P, 'Array', {copyWithin: require('./_array-copy-within')});\n\nrequire('./_add-to-unscopables')('copyWithin');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.array.copy-within.js\n// module id = 254\n// module chunks = 0","// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\nvar $export = require('./_export');\n\n$export($export.P, 'Array', {fill: require('./_array-fill')});\n\nrequire('./_add-to-unscopables')('fill');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.array.fill.js\n// module id = 255\n// module chunks = 0","'use strict';\n// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)\nvar $export = require('./_export')\n , $find = require('./_array-methods')(6)\n , KEY = 'findIndex'\n , forced = true;\n// Shouldn't skip holes\nif(KEY in [])Array(1)[KEY](function(){ forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n findIndex: function findIndex(callbackfn/*, that = undefined */){\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\nrequire('./_add-to-unscopables')(KEY);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.array.find-index.js\n// module id = 256\n// module chunks = 0","'use strict';\n// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)\nvar $export = require('./_export')\n , $find = require('./_array-methods')(5)\n , KEY = 'find'\n , forced = true;\n// Shouldn't skip holes\nif(KEY in [])Array(1)[KEY](function(){ forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n find: function find(callbackfn/*, that = undefined */){\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\nrequire('./_add-to-unscopables')(KEY);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.array.find.js\n// module id = 257\n// module chunks = 0","'use strict';\nvar ctx = require('./_ctx')\n , $export = require('./_export')\n , toObject = require('./_to-object')\n , call = require('./_iter-call')\n , isArrayIter = require('./_is-array-iter')\n , toLength = require('./_to-length')\n , createProperty = require('./_create-property')\n , getIterFn = require('./core.get-iterator-method');\n\n$export($export.S + $export.F * !require('./_iter-detect')(function(iter){ Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){\n var O = toObject(arrayLike)\n , C = typeof this == 'function' ? this : Array\n , aLen = arguments.length\n , mapfn = aLen > 1 ? arguments[1] : undefined\n , mapping = mapfn !== undefined\n , index = 0\n , iterFn = getIterFn(O)\n , length, result, step, iterator;\n if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){\n for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for(result = new C(length); length > index; index++){\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.array.from.js\n// module id = 258\n// module chunks = 0","'use strict';\nvar $export = require('./_export')\n , createProperty = require('./_create-property');\n\n// WebKit Array.of isn't generic\n$export($export.S + $export.F * require('./_fails')(function(){\n function F(){}\n return !(Array.of.call(F) instanceof F);\n}), 'Array', {\n // 22.1.2.3 Array.of( ...items)\n of: function of(/* ...args */){\n var index = 0\n , aLen = arguments.length\n , result = new (typeof this == 'function' ? this : Array)(aLen);\n while(aLen > index)createProperty(result, index, arguments[index++]);\n result.length = aLen;\n return result;\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.array.of.js\n// module id = 259\n// module chunks = 0","var dP = require('./_object-dp').f\n , createDesc = require('./_property-desc')\n , has = require('./_has')\n , FProto = Function.prototype\n , nameRE = /^\\s*function ([^ (]*)/\n , NAME = 'name';\n\nvar isExtensible = Object.isExtensible || function(){\n return true;\n};\n\n// 19.2.4.2 name\nNAME in FProto || require('./_descriptors') && dP(FProto, NAME, {\n configurable: true,\n get: function(){\n try {\n var that = this\n , name = ('' + that).match(nameRE)[1];\n has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name));\n return name;\n } catch(e){\n return '';\n }\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.function.name.js\n// module id = 260\n// module chunks = 0","'use strict';\nvar strong = require('./_collection-strong');\n\n// 23.1 Map Objects\nmodule.exports = require('./_collection')('Map', function(get){\n return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key){\n var entry = strong.getEntry(this, key);\n return entry && entry.v;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value){\n return strong.def(this, key === 0 ? 0 : key, value);\n }\n}, strong, true);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.map.js\n// module id = 261\n// module chunks = 0","// 20.1.2.1 Number.EPSILON\nvar $export = require('./_export');\n\n$export($export.S, 'Number', {EPSILON: Math.pow(2, -52)});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.number.epsilon.js\n// module id = 262\n// module chunks = 0","// 20.1.2.2 Number.isFinite(number)\nvar $export = require('./_export')\n , _isFinite = require('./_global').isFinite;\n\n$export($export.S, 'Number', {\n isFinite: function isFinite(it){\n return typeof it == 'number' && _isFinite(it);\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.number.is-finite.js\n// module id = 263\n// module chunks = 0","// 20.1.2.3 Number.isInteger(number)\nvar $export = require('./_export');\n\n$export($export.S, 'Number', {isInteger: require('./_is-integer')});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.number.is-integer.js\n// module id = 264\n// module chunks = 0","// 20.1.2.4 Number.isNaN(number)\nvar $export = require('./_export');\n\n$export($export.S, 'Number', {\n isNaN: function isNaN(number){\n return number != number;\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.number.is-nan.js\n// module id = 265\n// module chunks = 0","// 20.1.2.5 Number.isSafeInteger(number)\nvar $export = require('./_export')\n , isInteger = require('./_is-integer')\n , abs = Math.abs;\n\n$export($export.S, 'Number', {\n isSafeInteger: function isSafeInteger(number){\n return isInteger(number) && abs(number) <= 0x1fffffffffffff;\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.number.is-safe-integer.js\n// module id = 266\n// module chunks = 0","// 20.1.2.6 Number.MAX_SAFE_INTEGER\nvar $export = require('./_export');\n\n$export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.number.max-safe-integer.js\n// module id = 267\n// module chunks = 0","// 20.1.2.10 Number.MIN_SAFE_INTEGER\nvar $export = require('./_export');\n\n$export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.number.min-safe-integer.js\n// module id = 268\n// module chunks = 0","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', {assign: require('./_object-assign')});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.object.assign.js\n// module id = 269\n// module chunks = 0","// 19.1.3.10 Object.is(value1, value2)\nvar $export = require('./_export');\n$export($export.S, 'Object', {is: require('./_same-value')});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.object.is.js\n// module id = 270\n// module chunks = 0","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./_export');\n$export($export.S, 'Object', {setPrototypeOf: require('./_set-proto').set});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.object.set-prototype-of.js\n// module id = 271\n// module chunks = 0","'use strict';\nvar LIBRARY = require('./_library')\n , global = require('./_global')\n , ctx = require('./_ctx')\n , classof = require('./_classof')\n , $export = require('./_export')\n , isObject = require('./_is-object')\n , aFunction = require('./_a-function')\n , anInstance = require('./_an-instance')\n , forOf = require('./_for-of')\n , speciesConstructor = require('./_species-constructor')\n , task = require('./_task').set\n , microtask = require('./_microtask')()\n , PROMISE = 'Promise'\n , TypeError = global.TypeError\n , process = global.process\n , $Promise = global[PROMISE]\n , process = global.process\n , isNode = classof(process) == 'process'\n , empty = function(){ /* empty */ }\n , Internal, GenericPromiseCapability, Wrapper;\n\nvar USE_NATIVE = !!function(){\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1)\n , FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function(exec){ exec(empty, empty); };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;\n } catch(e){ /* empty */ }\n}();\n\n// helpers\nvar sameConstructor = function(a, b){\n // with library wrapper special case\n return a === b || a === $Promise && b === Wrapper;\n};\nvar isThenable = function(it){\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar newPromiseCapability = function(C){\n return sameConstructor($Promise, C)\n ? new PromiseCapability(C)\n : new GenericPromiseCapability(C);\n};\nvar PromiseCapability = GenericPromiseCapability = function(C){\n var resolve, reject;\n this.promise = new C(function($$resolve, $$reject){\n if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n};\nvar perform = function(exec){\n try {\n exec();\n } catch(e){\n return {error: e};\n }\n};\nvar notify = function(promise, isReject){\n if(promise._n)return;\n promise._n = true;\n var chain = promise._c;\n microtask(function(){\n var value = promise._v\n , ok = promise._s == 1\n , i = 0;\n var run = function(reaction){\n var handler = ok ? reaction.ok : reaction.fail\n , resolve = reaction.resolve\n , reject = reaction.reject\n , domain = reaction.domain\n , result, then;\n try {\n if(handler){\n if(!ok){\n if(promise._h == 2)onHandleUnhandled(promise);\n promise._h = 1;\n }\n if(handler === true)result = value;\n else {\n if(domain)domain.enter();\n result = handler(value);\n if(domain)domain.exit();\n }\n if(result === reaction.promise){\n reject(TypeError('Promise-chain cycle'));\n } else if(then = isThenable(result)){\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch(e){\n reject(e);\n }\n };\n while(chain.length > i)run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if(isReject && !promise._h)onUnhandled(promise);\n });\n};\nvar onUnhandled = function(promise){\n task.call(global, function(){\n var value = promise._v\n , abrupt, handler, console;\n if(isUnhandled(promise)){\n abrupt = perform(function(){\n if(isNode){\n process.emit('unhandledRejection', value, promise);\n } else if(handler = global.onunhandledrejection){\n handler({promise: promise, reason: value});\n } else if((console = global.console) && console.error){\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if(abrupt)throw abrupt.error;\n });\n};\nvar isUnhandled = function(promise){\n if(promise._h == 1)return false;\n var chain = promise._a || promise._c\n , i = 0\n , reaction;\n while(chain.length > i){\n reaction = chain[i++];\n if(reaction.fail || !isUnhandled(reaction.promise))return false;\n } return true;\n};\nvar onHandleUnhandled = function(promise){\n task.call(global, function(){\n var handler;\n if(isNode){\n process.emit('rejectionHandled', promise);\n } else if(handler = global.onrejectionhandled){\n handler({promise: promise, reason: promise._v});\n }\n });\n};\nvar $reject = function(value){\n var promise = this;\n if(promise._d)return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if(!promise._a)promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function(value){\n var promise = this\n , then;\n if(promise._d)return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if(promise === value)throw TypeError(\"Promise can't be resolved itself\");\n if(then = isThenable(value)){\n microtask(function(){\n var wrapper = {_w: promise, _d: false}; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch(e){\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch(e){\n $reject.call({_w: promise, _d: false}, e); // wrap\n }\n};\n\n// constructor polyfill\nif(!USE_NATIVE){\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor){\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch(err){\n $reject.call(this, err);\n }\n };\n Internal = function Promise(executor){\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected){\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if(this._a)this._a.push(reaction);\n if(this._s)notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function(onRejected){\n return this.then(undefined, onRejected);\n }\n });\n PromiseCapability = function(){\n var promise = new Internal;\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r){\n var capability = newPromiseCapability(this)\n , $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x){\n // instanceof instead of internal slot check because we should fix it without replacement native Promise core\n if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;\n var capability = newPromiseCapability(this)\n , $$resolve = capability.resolve;\n $$resolve(x);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function(iter){\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable){\n var C = this\n , capability = newPromiseCapability(C)\n , resolve = capability.resolve\n , reject = capability.reject;\n var abrupt = perform(function(){\n var values = []\n , index = 0\n , remaining = 1;\n forOf(iterable, false, function(promise){\n var $index = index++\n , alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function(value){\n if(alreadyCalled)return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if(abrupt)reject(abrupt.error);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable){\n var C = this\n , capability = newPromiseCapability(C)\n , reject = capability.reject;\n var abrupt = perform(function(){\n forOf(iterable, false, function(promise){\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if(abrupt)reject(abrupt.error);\n return capability.promise;\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.promise.js\n// module id = 272\n// module chunks = 0","// 21.2.5.3 get RegExp.prototype.flags()\nif(require('./_descriptors') && /./g.flags != 'g')require('./_object-dp').f(RegExp.prototype, 'flags', {\n configurable: true,\n get: require('./_flags')\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.regexp.flags.js\n// module id = 273\n// module chunks = 0","// @@match logic\nrequire('./_fix-re-wks')('match', 1, function(defined, MATCH, $match){\n // 21.1.3.11 String.prototype.match(regexp)\n return [function match(regexp){\n 'use strict';\n var O = defined(this)\n , fn = regexp == undefined ? undefined : regexp[MATCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n }, $match];\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.regexp.match.js\n// module id = 274\n// module chunks = 0","// @@replace logic\nrequire('./_fix-re-wks')('replace', 2, function(defined, REPLACE, $replace){\n // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)\n return [function replace(searchValue, replaceValue){\n 'use strict';\n var O = defined(this)\n , fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n }, $replace];\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.regexp.replace.js\n// module id = 275\n// module chunks = 0","// @@search logic\nrequire('./_fix-re-wks')('search', 1, function(defined, SEARCH, $search){\n // 21.1.3.15 String.prototype.search(regexp)\n return [function search(regexp){\n 'use strict';\n var O = defined(this)\n , fn = regexp == undefined ? undefined : regexp[SEARCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n }, $search];\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.regexp.search.js\n// module id = 276\n// module chunks = 0","// @@split logic\nrequire('./_fix-re-wks')('split', 2, function(defined, SPLIT, $split){\n 'use strict';\n var isRegExp = require('./_is-regexp')\n , _split = $split\n , $push = [].push\n , $SPLIT = 'split'\n , LENGTH = 'length'\n , LAST_INDEX = 'lastIndex';\n if(\n 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||\n 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||\n 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||\n '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||\n '.'[$SPLIT](/()()/)[LENGTH] > 1 ||\n ''[$SPLIT](/.?/)[LENGTH]\n ){\n var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group\n // based on es5-shim implementation, need to rework it\n $split = function(separator, limit){\n var string = String(this);\n if(separator === undefined && limit === 0)return [];\n // If `separator` is not a regex, use native split\n if(!isRegExp(separator))return _split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var separator2, match, lastIndex, lastLength, i;\n // Doesn't need flags gy, but they don't hurt\n if(!NPCG)separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\\\s)', flags);\n while(match = separatorCopy.exec(string)){\n // `separatorCopy.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0][LENGTH];\n if(lastIndex > lastLastIndex){\n output.push(string.slice(lastLastIndex, match.index));\n // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG\n if(!NPCG && match[LENGTH] > 1)match[0].replace(separator2, function(){\n for(i = 1; i < arguments[LENGTH] - 2; i++)if(arguments[i] === undefined)match[i] = undefined;\n });\n if(match[LENGTH] > 1 && match.index < string[LENGTH])$push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if(output[LENGTH] >= splitLimit)break;\n }\n if(separatorCopy[LAST_INDEX] === match.index)separatorCopy[LAST_INDEX]++; // Avoid an infinite loop\n }\n if(lastLastIndex === string[LENGTH]){\n if(lastLength || !separatorCopy.test(''))output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n };\n // Chakra, V8\n } else if('0'[$SPLIT](undefined, 0)[LENGTH]){\n $split = function(separator, limit){\n return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);\n };\n }\n // 21.1.3.17 String.prototype.split(separator, limit)\n return [function split(separator, limit){\n var O = defined(this)\n , fn = separator == undefined ? undefined : separator[SPLIT];\n return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);\n }, $split];\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.regexp.split.js\n// module id = 277\n// module chunks = 0","'use strict';\nvar strong = require('./_collection-strong');\n\n// 23.2 Set Objects\nmodule.exports = require('./_collection')('Set', function(get){\n return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value){\n return strong.def(this, value = value === 0 ? 0 : value, value);\n }\n}, strong);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.set.js\n// module id = 278\n// module chunks = 0","'use strict';\nvar $export = require('./_export')\n , $at = require('./_string-at')(false);\n$export($export.P, 'String', {\n // 21.1.3.3 String.prototype.codePointAt(pos)\n codePointAt: function codePointAt(pos){\n return $at(this, pos);\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.code-point-at.js\n// module id = 279\n// module chunks = 0","// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])\n'use strict';\nvar $export = require('./_export')\n , toLength = require('./_to-length')\n , context = require('./_string-context')\n , ENDS_WITH = 'endsWith'\n , $endsWith = ''[ENDS_WITH];\n\n$export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'String', {\n endsWith: function endsWith(searchString /*, endPosition = @length */){\n var that = context(this, searchString, ENDS_WITH)\n , endPosition = arguments.length > 1 ? arguments[1] : undefined\n , len = toLength(that.length)\n , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len)\n , search = String(searchString);\n return $endsWith\n ? $endsWith.call(that, search, end)\n : that.slice(end - search.length, end) === search;\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.ends-with.js\n// module id = 280\n// module chunks = 0","var $export = require('./_export')\n , toIndex = require('./_to-index')\n , fromCharCode = String.fromCharCode\n , $fromCodePoint = String.fromCodePoint;\n\n// length should be 1, old FF problem\n$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {\n // 21.1.2.2 String.fromCodePoint(...codePoints)\n fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars\n var res = []\n , aLen = arguments.length\n , i = 0\n , code;\n while(aLen > i){\n code = +arguments[i++];\n if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point');\n res.push(code < 0x10000\n ? fromCharCode(code)\n : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)\n );\n } return res.join('');\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.from-code-point.js\n// module id = 281\n// module chunks = 0","// 21.1.3.7 String.prototype.includes(searchString, position = 0)\n'use strict';\nvar $export = require('./_export')\n , context = require('./_string-context')\n , INCLUDES = 'includes';\n\n$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', {\n includes: function includes(searchString /*, position = 0 */){\n return !!~context(this, searchString, INCLUDES)\n .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.includes.js\n// module id = 282\n// module chunks = 0","var $export = require('./_export')\n , toIObject = require('./_to-iobject')\n , toLength = require('./_to-length');\n\n$export($export.S, 'String', {\n // 21.1.2.4 String.raw(callSite, ...substitutions)\n raw: function raw(callSite){\n var tpl = toIObject(callSite.raw)\n , len = toLength(tpl.length)\n , aLen = arguments.length\n , res = []\n , i = 0;\n while(len > i){\n res.push(String(tpl[i++]));\n if(i < aLen)res.push(String(arguments[i]));\n } return res.join('');\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.raw.js\n// module id = 283\n// module chunks = 0","var $export = require('./_export');\n\n$export($export.P, 'String', {\n // 21.1.3.13 String.prototype.repeat(count)\n repeat: require('./_string-repeat')\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.repeat.js\n// module id = 284\n// module chunks = 0","// 21.1.3.18 String.prototype.startsWith(searchString [, position ])\n'use strict';\nvar $export = require('./_export')\n , toLength = require('./_to-length')\n , context = require('./_string-context')\n , STARTS_WITH = 'startsWith'\n , $startsWith = ''[STARTS_WITH];\n\n$export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'String', {\n startsWith: function startsWith(searchString /*, position = 0 */){\n var that = context(this, searchString, STARTS_WITH)\n , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length))\n , search = String(searchString);\n return $startsWith\n ? $startsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.starts-with.js\n// module id = 285\n// module chunks = 0","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global')\n , has = require('./_has')\n , DESCRIPTORS = require('./_descriptors')\n , $export = require('./_export')\n , redefine = require('./_redefine')\n , META = require('./_meta').KEY\n , $fails = require('./_fails')\n , shared = require('./_shared')\n , setToStringTag = require('./_set-to-string-tag')\n , uid = require('./_uid')\n , wks = require('./_wks')\n , wksExt = require('./_wks-ext')\n , wksDefine = require('./_wks-define')\n , keyOf = require('./_keyof')\n , enumKeys = require('./_enum-keys')\n , isArray = require('./_is-array')\n , anObject = require('./_an-object')\n , toIObject = require('./_to-iobject')\n , toPrimitive = require('./_to-primitive')\n , createDesc = require('./_property-desc')\n , _create = require('./_object-create')\n , gOPNExt = require('./_object-gopn-ext')\n , $GOPD = require('./_object-gopd')\n , $DP = require('./_object-dp')\n , $keys = require('./_object-keys')\n , gOPD = $GOPD.f\n , dP = $DP.f\n , gOPN = gOPNExt.f\n , $Symbol = global.Symbol\n , $JSON = global.JSON\n , _stringify = $JSON && $JSON.stringify\n , PROTOTYPE = 'prototype'\n , HIDDEN = wks('_hidden')\n , TO_PRIMITIVE = wks('toPrimitive')\n , isEnum = {}.propertyIsEnumerable\n , SymbolRegistry = shared('symbol-registry')\n , AllSymbols = shared('symbols')\n , OPSymbols = shared('op-symbols')\n , ObjectProto = Object[PROTOTYPE]\n , USE_NATIVE = typeof $Symbol == 'function'\n , QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function(){\n return _create(dP({}, 'a', {\n get: function(){ return dP(this, 'a', {value: 7}).a; }\n })).a != 7;\n}) ? function(it, key, D){\n var protoDesc = gOPD(ObjectProto, key);\n if(protoDesc)delete ObjectProto[key];\n dP(it, key, D);\n if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function(tag){\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){\n return typeof it == 'symbol';\n} : function(it){\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D){\n if(it === ObjectProto)$defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if(has(AllSymbols, key)){\n if(!D.enumerable){\n if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;\n D = _create(D, {enumerable: createDesc(0, false)});\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P){\n anObject(it);\n var keys = enumKeys(P = toIObject(P))\n , i = 0\n , l = keys.length\n , key;\n while(l > i)$defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P){\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key){\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){\n it = toIObject(it);\n key = toPrimitive(key, true);\n if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;\n var D = gOPD(it, key);\n if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it){\n var names = gOPN(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i){\n if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it){\n var IS_OP = it === ObjectProto\n , names = gOPN(IS_OP ? OPSymbols : toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i){\n if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif(!USE_NATIVE){\n $Symbol = function Symbol(){\n if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function(value){\n if(this === ObjectProto)$set.call(OPSymbols, value);\n if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString(){\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n require('./_object-gops').f = $getOwnPropertySymbols;\n\n if(DESCRIPTORS && !require('./_library')){\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function(name){\n return wrap(wks(name));\n }\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});\n\nfor(var symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);\n\nfor(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function(key){\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(key){\n if(isSymbol(key))return keyOf(SymbolRegistry, key);\n throw TypeError(key + ' is not a symbol!');\n },\n useSetter: function(){ setter = true; },\n useSimple: function(){ setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it){\n if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined\n var args = [it]\n , i = 1\n , replacer, $replacer;\n while(arguments.length > i)args.push(arguments[i++]);\n replacer = args[1];\n if(typeof replacer == 'function')$replacer = replacer;\n if($replacer || !isArray(replacer))replacer = function(key, value){\n if($replacer)value = $replacer.call(this, key, value);\n if(!isSymbol(value))return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.symbol.js\n// module id = 286\n// module chunks = 0","'use strict';\nvar each = require('./_array-methods')(0)\n , redefine = require('./_redefine')\n , meta = require('./_meta')\n , assign = require('./_object-assign')\n , weak = require('./_collection-weak')\n , isObject = require('./_is-object')\n , getWeak = meta.getWeak\n , isExtensible = Object.isExtensible\n , uncaughtFrozenStore = weak.ufstore\n , tmp = {}\n , InternalMap;\n\nvar wrapper = function(get){\n return function WeakMap(){\n return get(this, arguments.length > 0 ? arguments[0] : undefined);\n };\n};\n\nvar methods = {\n // 23.3.3.3 WeakMap.prototype.get(key)\n get: function get(key){\n if(isObject(key)){\n var data = getWeak(key);\n if(data === true)return uncaughtFrozenStore(this).get(key);\n return data ? data[this._i] : undefined;\n }\n },\n // 23.3.3.5 WeakMap.prototype.set(key, value)\n set: function set(key, value){\n return weak.def(this, key, value);\n }\n};\n\n// 23.3 WeakMap Objects\nvar $WeakMap = module.exports = require('./_collection')('WeakMap', wrapper, methods, weak, true, true);\n\n// IE11 WeakMap frozen keys fix\nif(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){\n InternalMap = weak.getConstructor(wrapper);\n assign(InternalMap.prototype, methods);\n meta.NEED = true;\n each(['delete', 'has', 'get', 'set'], function(key){\n var proto = $WeakMap.prototype\n , method = proto[key];\n redefine(proto, key, function(a, b){\n // store frozen objects on internal weakmap shim\n if(isObject(a) && !isExtensible(a)){\n if(!this._f)this._f = new InternalMap;\n var result = this._f[key](a, b);\n return key == 'set' ? this : result;\n // store all the rest on native weakmap\n } return method.call(this, a, b);\n });\n });\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.weak-map.js\n// module id = 287\n// module chunks = 0","'use strict';\nvar weak = require('./_collection-weak');\n\n// 23.4 WeakSet Objects\nrequire('./_collection')('WeakSet', function(get){\n return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.4.3.1 WeakSet.prototype.add(value)\n add: function add(value){\n return weak.def(this, value, true);\n }\n}, weak, false, true);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.weak-set.js\n// module id = 288\n// module chunks = 0","'use strict';\n// https://github.com/tc39/Array.prototype.includes\nvar $export = require('./_export')\n , $includes = require('./_array-includes')(true);\n\n$export($export.P, 'Array', {\n includes: function includes(el /*, fromIndex = 0 */){\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\nrequire('./_add-to-unscopables')('includes');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es7.array.includes.js\n// module id = 289\n// module chunks = 0","// https://github.com/tc39/proposal-object-values-entries\nvar $export = require('./_export')\n , $entries = require('./_object-to-array')(true);\n\n$export($export.S, 'Object', {\n entries: function entries(it){\n return $entries(it);\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es7.object.entries.js\n// module id = 290\n// module chunks = 0","// https://github.com/tc39/proposal-object-getownpropertydescriptors\nvar $export = require('./_export')\n , ownKeys = require('./_own-keys')\n , toIObject = require('./_to-iobject')\n , gOPD = require('./_object-gopd')\n , createProperty = require('./_create-property');\n\n$export($export.S, 'Object', {\n getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){\n var O = toIObject(object)\n , getDesc = gOPD.f\n , keys = ownKeys(O)\n , result = {}\n , i = 0\n , key;\n while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key));\n return result;\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es7.object.get-own-property-descriptors.js\n// module id = 291\n// module chunks = 0","// https://github.com/tc39/proposal-object-values-entries\nvar $export = require('./_export')\n , $values = require('./_object-to-array')(false);\n\n$export($export.S, 'Object', {\n values: function values(it){\n return $values(it);\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es7.object.values.js\n// module id = 292\n// module chunks = 0","'use strict';\n// https://github.com/tc39/proposal-string-pad-start-end\nvar $export = require('./_export')\n , $pad = require('./_string-pad');\n\n$export($export.P, 'String', {\n padEnd: function padEnd(maxLength /*, fillString = ' ' */){\n return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es7.string.pad-end.js\n// module id = 293\n// module chunks = 0","'use strict';\n// https://github.com/tc39/proposal-string-pad-start-end\nvar $export = require('./_export')\n , $pad = require('./_string-pad');\n\n$export($export.P, 'String', {\n padStart: function padStart(maxLength /*, fillString = ' ' */){\n return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es7.string.pad-start.js\n// module id = 294\n// module chunks = 0","var $iterators = require('./es6.array.iterator')\n , redefine = require('./_redefine')\n , global = require('./_global')\n , hide = require('./_hide')\n , Iterators = require('./_iterators')\n , wks = require('./_wks')\n , ITERATOR = wks('iterator')\n , TO_STRING_TAG = wks('toStringTag')\n , ArrayValues = Iterators.Array;\n\nfor(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){\n var NAME = collections[i]\n , Collection = global[NAME]\n , proto = Collection && Collection.prototype\n , key;\n if(proto){\n if(!proto[ITERATOR])hide(proto, ITERATOR, ArrayValues);\n if(!proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n for(key in $iterators)if(!proto[key])redefine(proto, key, $iterators[key], true);\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/web.dom.iterable.js\n// module id = 295\n// module chunks = 0","var $export = require('./_export')\n , $task = require('./_task');\n$export($export.G + $export.B, {\n setImmediate: $task.set,\n clearImmediate: $task.clear\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/web.immediate.js\n// module id = 296\n// module chunks = 0","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process/browser.js\n// module id = 297\n// module chunks = 0","var map = {\n\t\"./contextMenu/test/cursor.unit.js\": 353,\n\t\"./manualColumnMove/test/columnsMapper.unit.js\": 363,\n\t\"./manualRowMove/test/rowsMapper.unit.js\": 368\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 299;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/plugins \\.unit\\.js$\n// module id = 299\n// module chunks = 0","var map = {\n\t\"./EventManager.spec.js\": 394,\n\t\"./PluginHooks.spec.js\": 395,\n\t\"./helpers/Array.spec.js\": 396,\n\t\"./helpers/Data.spec.js\": 397,\n\t\"./helpers/Date.spec.js\": 398,\n\t\"./helpers/Feature.spec.js\": 399,\n\t\"./helpers/Function.spec.js\": 400,\n\t\"./helpers/Mixed.spec.js\": 401,\n\t\"./helpers/Number.spec.js\": 402,\n\t\"./helpers/Object.spec.js\": 403,\n\t\"./helpers/String.spec.js\": 404,\n\t\"./helpers/Unicode.spec.js\": 405,\n\t\"./helpers/dom/Element.spec.js\": 406,\n\t\"./helpers/dom/Event.spec.js\": 407,\n\t\"./mixins/localHooks.spec.js\": 409,\n\t\"./multiMap.spec.js\": 410,\n\t\"./utils/Interval.spec.js\": 411,\n\t\"./utils/dataStructures/LinkedList.spec.js\": 412,\n\t\"./utils/recordTranslator.spec.js\": 413,\n\t\"./utils/samplesGenerator.spec.js\": 414,\n\t\"./utils/sortingAlgorithms/mergeSort.spec.js\": 415\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 300;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./test/unit \\.spec\\.js$\n// module id = 300\n// module chunks = 0","/**\n * autoResize - resizes a DOM element to the width and height of another DOM element\n *\n * Copyright 2014, Marcin Warpechowski\n * Licensed under the MIT license\n */\n\n\nfunction autoResize() {\n var defaults = {\n minHeight: 200,\n maxHeight: 300,\n minWidth: 100,\n maxWidth: 300\n },\n el,\n body = document.body,\n text = document.createTextNode(''),\n span = document.createElement('SPAN'),\n observe = function (element, event, handler) {\n if (window.attachEvent) {\n element.attachEvent('on' + event, handler);\n } else {\n element.addEventListener(event, handler, false);\n }\n },\n unObserve = function (element, event, handler) {\n if (window.removeEventListener) {\n element.removeEventListener(event, handler, false);\n } else {\n element.detachEvent('on' + event, handler);\n }\n },\n resize = function (newChar) {\n var width, scrollHeight;\n\n if (!newChar) {\n newChar = \"\";\n } else if (!/^[a-zA-Z \\.,\\\\\\/\\|0-9]$/.test(newChar)) {\n newChar = \".\";\n }\n\n if (text.textContent !== void 0) {\n text.textContent = el.value + newChar;\n }\n else {\n text.data = el.value + newChar; //IE8\n }\n span.style.fontSize = getComputedStyle(el).fontSize;\n span.style.fontFamily = getComputedStyle(el).fontFamily;\n span.style.whiteSpace = \"pre\";\n\n body.appendChild(span);\n width = span.clientWidth + 2;\n body.removeChild(span);\n\n el.style.height = defaults.minHeight + 'px';\n\n if (defaults.minWidth > width) {\n el.style.width = defaults.minWidth + 'px';\n\n } else if (width > defaults.maxWidth) {\n el.style.width = defaults.maxWidth + 'px';\n\n } else {\n el.style.width = width + 'px';\n }\n scrollHeight = el.scrollHeight ? el.scrollHeight - 1 : 0;\n\n if (defaults.minHeight > scrollHeight) {\n el.style.height = defaults.minHeight + 'px';\n\n } else if (defaults.maxHeight < scrollHeight) {\n el.style.height = defaults.maxHeight + 'px';\n el.style.overflowY = 'visible';\n\n } else {\n el.style.height = scrollHeight + 'px';\n }\n },\n delayedResize = function () {\n window.setTimeout(resize, 0);\n },\n extendDefaults = function (config) {\n\n if (config && config.minHeight) {\n if (config.minHeight == 'inherit') {\n defaults.minHeight = el.clientHeight;\n } else {\n var minHeight = parseInt(config.minHeight);\n if (!isNaN(minHeight)) {\n defaults.minHeight = minHeight;\n }\n }\n }\n\n if (config && config.maxHeight) {\n if (config.maxHeight == 'inherit') {\n defaults.maxHeight = el.clientHeight;\n } else {\n var maxHeight = parseInt(config.maxHeight);\n if (!isNaN(maxHeight)) {\n defaults.maxHeight = maxHeight;\n }\n }\n }\n\n if (config && config.minWidth) {\n if (config.minWidth == 'inherit') {\n defaults.minWidth = el.clientWidth;\n } else {\n var minWidth = parseInt(config.minWidth);\n if (!isNaN(minWidth)) {\n defaults.minWidth = minWidth;\n }\n }\n }\n\n if (config && config.maxWidth) {\n if (config.maxWidth == 'inherit') {\n defaults.maxWidth = el.clientWidth;\n } else {\n var maxWidth = parseInt(config.maxWidth);\n if (!isNaN(maxWidth)) {\n defaults.maxWidth = maxWidth;\n }\n }\n }\n\n if(!span.firstChild) {\n span.className = \"autoResize\";\n span.style.display = 'inline-block';\n span.appendChild(text);\n }\n },\n init = function (el_, config, doObserve) {\n el = el_;\n extendDefaults(config);\n\n if (el.nodeName == 'TEXTAREA') {\n\n el.style.resize = 'none';\n el.style.overflowY = '';\n el.style.height = defaults.minHeight + 'px';\n el.style.minWidth = defaults.minWidth + 'px';\n el.style.maxWidth = defaults.maxWidth + 'px';\n el.style.overflowY = 'hidden';\n }\n\n if(doObserve) {\n observe(el, 'change', resize);\n observe(el, 'cut', delayedResize);\n observe(el, 'paste', delayedResize);\n observe(el, 'drop', delayedResize);\n observe(el, 'keydown', delayedResize);\n observe(el, 'focus', resize);\n }\n\n resize();\n };\n\n function getComputedStyle(element) {\n return element.currentStyle || document.defaultView.getComputedStyle(element);\n }\n\n return {\n init: function (el_, config, doObserve) {\n init(el_, config, doObserve);\n },\n unObserve: function () {\n unObserve(el, 'change', resize);\n unObserve(el, 'cut', delayedResize);\n unObserve(el, 'paste', delayedResize);\n unObserve(el, 'drop', delayedResize);\n unObserve(el, 'keydown', delayedResize);\n unObserve(el, 'focus', resize);\n },\n resize: resize\n };\n}\n\nif (typeof exports !== 'undefined') {\n module.exports = autoResize;\n}\n\n\n\n// WEBPACK FOOTER //\n// lib/autoResize/autoResize.js","/**\n * Creates a textarea that stays hidden on the page and gets focused when user presses CTRL while not having a form\n * input focused.\n * In future we may implement a better driver when better APIs are available.\n *\n * @constructor\n * @private\n */\n\nvar instance;\n\nfunction copyPaste() {\n if (!instance) {\n instance = new CopyPasteClass();\n\n } else if (instance.hasBeenDestroyed()){\n instance.init();\n }\n instance.refCounter++;\n\n return instance;\n}\n\nif (typeof exports !== 'undefined') {\n module.exports = copyPaste;\n}\n\nfunction CopyPasteClass() {\n this.refCounter = 0;\n this.init();\n}\n\nCopyPasteClass.prototype.init = function () {\n var\n style,\n parent;\n\n this.copyCallbacks = [];\n this.cutCallbacks = [];\n this.pasteCallbacks = [];\n\n // this.listenerElement = document.documentElement;\n parent = document.body;\n\n if (document.getElementById('CopyPasteDiv')) {\n this.elDiv = document.getElementById('CopyPasteDiv');\n this.elTextarea = this.elDiv.firstChild;\n\n } else {\n this.elDiv = document.createElement('div');\n this.elDiv.id = 'CopyPasteDiv';\n style = this.elDiv.style;\n style.position = 'fixed';\n style.top = '-10000px';\n style.left = '-10000px';\n parent.appendChild(this.elDiv);\n\n this.elTextarea = document.createElement('textarea');\n this.elTextarea.className = 'copyPaste';\n this.elTextarea.onpaste = function(event) {\n var clipboardContents,\n temp;\n\n if ('WebkitAppearance' in document.documentElement.style) { // chrome and safari\n clipboardContents = event.clipboardData.getData(\"Text\");\n\n // Safari adds an additional newline to copied text\n if (navigator.userAgent.indexOf('Safari') !== -1 && navigator.userAgent.indexOf('Chrome') === -1) {\n temp = clipboardContents.split('\\n');\n\n if (temp[temp.length - 1] === '') {\n temp.pop();\n }\n clipboardContents = temp.join('\\n');\n }\n this.value = clipboardContents;\n\n event.preventDefault();\n }\n };\n style = this.elTextarea.style;\n style.width = '10000px';\n style.height = '10000px';\n style.overflow = 'hidden';\n this.elDiv.appendChild(this.elTextarea);\n\n if (typeof style.opacity !== 'undefined') {\n style.opacity = 0;\n }\n }\n this.onKeyDownRef = this.onKeyDown.bind(this);\n document.documentElement.addEventListener('keydown', this.onKeyDownRef, false);\n};\n\n/**\n * Call method on every key down event\n *\n * @param {Event} event\n */\nCopyPasteClass.prototype.onKeyDown = function(event) {\n var _this = this,\n isCtrlDown = false;\n\n function isActiveElementEditable() {\n var element = document.activeElement;\n\n if (element.shadowRoot && element.shadowRoot.activeElement) {\n element = element.shadowRoot.activeElement;\n }\n\n return ['INPUT', 'SELECT', 'TEXTAREA'].indexOf(element.nodeName) > -1 || element.contentEditable === 'true';\n }\n\n // mac\n if (event.metaKey) {\n isCtrlDown = true;\n }\n // pc\n else if (event.ctrlKey && navigator.userAgent.indexOf('Mac') === -1) {\n isCtrlDown = true;\n }\n if (isCtrlDown) {\n // this is needed by fragmentSelection in Handsontable. Ignore copypaste.js behavior if fragment of cell text is selected\n if (document.activeElement !== this.elTextarea && (this.getSelectionText() !== '' || isActiveElementEditable())) {\n return;\n }\n this.selectNodeText(this.elTextarea);\n setTimeout(function() {\n if (document.activeElement !== _this.elTextarea) {\n _this.selectNodeText(_this.elTextarea);\n }\n }, 0);\n }\n\n if (event.isImmediatePropagationEnabled !== false && isCtrlDown &&\n (event.keyCode === 67 ||\n event.keyCode === 86 ||\n event.keyCode === 88)) {\n // works in all browsers, incl. Opera < 12.12\n if (event.keyCode === 88) {\n setTimeout(function () {\n _this.triggerCut(event);\n }, 0);\n\n } else if (event.keyCode === 86) {\n setTimeout(function () {\n _this.triggerPaste(event);\n }, 0);\n }\n }\n};\n\n//http://jsperf.com/textara-selection\n//http://stackoverflow.com/questions/1502385/how-can-i-make-this-code-work-in-ie\n/**\n * Select all text contains in passed node element\n *\n * @param {Element} element\n */\nCopyPasteClass.prototype.selectNodeText = function(element) {\n if (element) {\n element.select();\n }\n};\n\n//http://stackoverflow.com/questions/5379120/get-the-highlighted-selected-text\n/**\n * Get selection text\n *\n * @returns {String}\n */\nCopyPasteClass.prototype.getSelectionText = function() {\n var text = '';\n\n if (window.getSelection) {\n text = window.getSelection().toString();\n\n } else if (document.selection && document.selection.type !== 'Control') {\n text = document.selection.createRange().text;\n }\n\n return text;\n};\n\n/**\n * Make string copyable\n *\n * @param {String} string\n */\nCopyPasteClass.prototype.copyable = function(string) {\n if (typeof string !== 'string' && string.toString === void 0) {\n throw new Error('copyable requires string parameter');\n }\n this.elTextarea.value = string;\n this.selectNodeText(this.elTextarea);\n};\n\n/*CopyPasteClass.prototype.onCopy = function (fn) {\n this.copyCallbacks.push(fn);\n};*/\n\n/**\n * Add function callback to onCut event\n *\n * @param {Function} callback\n */\nCopyPasteClass.prototype.onCut = function(callback) {\n this.cutCallbacks.push(callback);\n};\n\n/**\n * Add function callback to onPaste event\n *\n * @param {Function} callback\n */\nCopyPasteClass.prototype.onPaste = function(callback) {\n this.pasteCallbacks.push(callback);\n};\n\n/**\n * Remove callback from all events\n *\n * @param {Function} callback\n * @returns {Boolean}\n */\nCopyPasteClass.prototype.removeCallback = function(callback) {\n var i, len;\n\n for (i = 0, len = this.copyCallbacks.length; i < len; i++) {\n if (this.copyCallbacks[i] === callback) {\n this.copyCallbacks.splice(i, 1);\n\n return true;\n }\n }\n for (i = 0, len = this.cutCallbacks.length; i < len; i++) {\n if (this.cutCallbacks[i] === callback) {\n this.cutCallbacks.splice(i, 1);\n\n return true;\n }\n }\n for (i = 0, len = this.pasteCallbacks.length; i < len; i++) {\n if (this.pasteCallbacks[i] === callback) {\n this.pasteCallbacks.splice(i, 1);\n\n return true;\n }\n }\n\n return false;\n};\n\n/**\n * Trigger cut event\n *\n * @param {DOMEvent} event\n */\nCopyPasteClass.prototype.triggerCut = function(event) {\n var _this = this;\n\n if (_this.cutCallbacks) {\n setTimeout(function () {\n for (var i = 0, len = _this.cutCallbacks.length; i < len; i++) {\n _this.cutCallbacks[i](event);\n }\n }, 50);\n }\n};\n\n/**\n * Trigger paste event\n *\n * @param {DOMEvent} event\n * @param {String} string\n */\nCopyPasteClass.prototype.triggerPaste = function(event, string) {\n var _this = this;\n\n if (_this.pasteCallbacks) {\n setTimeout(function () {\n var val = string || _this.elTextarea.value;\n\n for (var i = 0, len = _this.pasteCallbacks.length; i < len; i++) {\n _this.pasteCallbacks[i](val, event);\n }\n }, 50);\n }\n};\n\n/**\n * Destroy instance\n */\nCopyPasteClass.prototype.destroy = function() {\n if (!this.hasBeenDestroyed() && --this.refCounter === 0) {\n if (this.elDiv && this.elDiv.parentNode) {\n this.elDiv.parentNode.removeChild(this.elDiv);\n this.elDiv = null;\n this.elTextarea = null;\n }\n document.documentElement.removeEventListener('keydown', this.onKeyDownRef);\n this.onKeyDownRef = null;\n }\n};\n\n/**\n * Check if instance has been destroyed\n *\n * @returns {Boolean}\n */\nCopyPasteClass.prototype.hasBeenDestroyed = function() {\n return !this.refCounter;\n};\n\n\n\n\n\n// WEBPACK FOOTER //\n// lib/copyPaste/copyPaste.js","import {addClass} from './../../../../helpers/dom/element';\nimport Overlay from './_base';\n\n/**\n * A overlay that renders ALL available rows & columns positioned on top of the original Walkontable instance and all other overlays.\n * Used for debugging purposes to see if the other overlays (that render only part of the rows & columns) are positioned correctly\n *\n * @class DebugOverlay\n */\nclass DebugOverlay extends Overlay {\n /**\n * @param {Walkontable} wotInstance\n */\n constructor(wotInstance) {\n super(wotInstance);\n\n this.clone = this.makeClone(Overlay.CLONE_DEBUG);\n this.clone.wtTable.holder.style.opacity = 0.4;\n this.clone.wtTable.holder.style.textShadow = '0 0 2px #ff0000';\n\n addClass(this.clone.wtTable.holder.parentNode, 'wtDebugVisible');\n }\n}\n\nOverlay.registerOverlay(Overlay.CLONE_DEBUG, DebugOverlay);\n\nexport default DebugOverlay;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/overlay/debug.js","import {\n addClass,\n getScrollbarWidth,\n getScrollLeft,\n getWindowScrollTop,\n hasClass,\n outerWidth,\n innerHeight,\n removeClass,\n setOverlayPosition,\n resetCssTransform\n} from './../../../../helpers/dom/element';\nimport Overlay from './_base';\n\n/**\n * @class LeftOverlay\n */\nclass LeftOverlay extends Overlay {\n /**\n * @param {Walkontable} wotInstance\n */\n constructor(wotInstance) {\n super(wotInstance);\n this.clone = this.makeClone(Overlay.CLONE_LEFT);\n }\n\n /**\n * Checks if overlay should be fully rendered\n *\n * @returns {Boolean}\n */\n shouldBeRendered() {\n return !!(this.wot.getSetting('fixedColumnsLeft') || this.wot.getSetting('rowHeaders').length);\n }\n\n /**\n * Updates the left overlay position\n */\n resetFixedPosition() {\n if (!this.needFullRender || !this.wot.wtTable.holder.parentNode) {\n // removed from DOM\n return;\n }\n let overlayRoot = this.clone.wtTable.holder.parentNode;\n let headerPosition = 0;\n let preventOverflow = this.wot.getSetting('preventOverflow');\n\n if (this.trimmingContainer === window && (!preventOverflow || preventOverflow !== 'horizontal')) {\n let box = this.wot.wtTable.hider.getBoundingClientRect();\n let left = Math.ceil(box.left);\n let right = Math.ceil(box.right);\n let finalLeft;\n let finalTop;\n\n finalTop = this.wot.wtTable.hider.style.top;\n finalTop = finalTop === '' ? 0 : finalTop;\n\n if (left < 0 && (right - overlayRoot.offsetWidth) > 0) {\n finalLeft = -left;\n } else {\n finalLeft = 0;\n }\n headerPosition = finalLeft;\n finalLeft += 'px';\n\n setOverlayPosition(overlayRoot, finalLeft, finalTop);\n\n } else {\n headerPosition = this.getScrollPosition();\n resetCssTransform(overlayRoot);\n }\n this.adjustHeaderBordersPosition(headerPosition);\n\n this.adjustElementsSize();\n }\n\n /**\n * Sets the main overlay's horizontal scroll position\n *\n * @param {Number} pos\n */\n setScrollPosition(pos) {\n if (this.mainTableScrollableElement === window) {\n window.scrollTo(pos, getWindowScrollTop());\n\n } else {\n this.mainTableScrollableElement.scrollLeft = pos;\n }\n }\n\n /**\n * Triggers onScroll hook callback\n */\n onScroll() {\n this.wot.getSetting('onScrollVertically');\n }\n\n /**\n * Calculates total sum cells width\n *\n * @param {Number} from Column index which calculates started from\n * @param {Number} to Column index where calculation is finished\n * @returns {Number} Width sum\n */\n sumCellSizes(from, to) {\n let sum = 0;\n let defaultColumnWidth = this.wot.wtSettings.defaultColumnWidth;\n\n while (from < to) {\n sum += this.wot.wtTable.getStretchedColumnWidth(from) || defaultColumnWidth;\n from++;\n }\n\n return sum;\n }\n\n /**\n * Adjust overlay root element, childs and master table element sizes (width, height).\n *\n * @param {Boolean} [force=false]\n */\n adjustElementsSize(force = false) {\n this.updateTrimmingContainer();\n\n if (this.needFullRender || force) {\n this.adjustRootElementSize();\n this.adjustRootChildrenSize();\n\n if (!force) {\n this.areElementSizesAdjusted = true;\n }\n }\n }\n\n /**\n * Adjust overlay root element size (width and height).\n */\n adjustRootElementSize() {\n let masterHolder = this.wot.wtTable.holder;\n let scrollbarHeight = masterHolder.clientHeight === masterHolder.offsetHeight ? 0 : getScrollbarWidth();\n let overlayRoot = this.clone.wtTable.holder.parentNode;\n let overlayRootStyle = overlayRoot.style;\n let preventOverflow = this.wot.getSetting('preventOverflow');\n let tableWidth;\n\n if (this.trimmingContainer !== window || preventOverflow === 'vertical') {\n let height = this.wot.wtViewport.getWorkspaceHeight() - scrollbarHeight;\n\n height = Math.min(height, innerHeight(this.wot.wtTable.wtRootElement));\n\n overlayRootStyle.height = `${height}px`;\n\n } else {\n overlayRootStyle.height = '';\n }\n\n this.clone.wtTable.holder.style.height = overlayRootStyle.height;\n\n tableWidth = outerWidth(this.clone.wtTable.TABLE);\n overlayRootStyle.width = `${tableWidth === 0 ? tableWidth : tableWidth + 4}px`;\n }\n\n /**\n * Adjust overlay root childs size\n */\n adjustRootChildrenSize() {\n let scrollbarWidth = getScrollbarWidth();\n\n this.clone.wtTable.hider.style.height = this.hider.style.height;\n this.clone.wtTable.holder.style.height = this.clone.wtTable.holder.parentNode.style.height;\n\n if (scrollbarWidth === 0) {\n scrollbarWidth = 30;\n }\n this.clone.wtTable.holder.style.width = `${parseInt(this.clone.wtTable.holder.parentNode.style.width, 10) + scrollbarWidth}px`;\n }\n\n /**\n * Adjust the overlay dimensions and position\n */\n applyToDOM() {\n let total = this.wot.getSetting('totalColumns');\n\n if (!this.areElementSizesAdjusted) {\n this.adjustElementsSize();\n }\n if (typeof this.wot.wtViewport.columnsRenderCalculator.startPosition === 'number') {\n this.spreader.style.left = `${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`;\n\n } else if (total === 0) {\n this.spreader.style.left = '0';\n\n } else {\n throw new Error('Incorrect value of the columnsRenderCalculator');\n }\n this.spreader.style.right = '';\n\n if (this.needFullRender) {\n this.syncOverlayOffset();\n }\n }\n\n /**\n * Synchronize calculated top position to an element\n */\n syncOverlayOffset() {\n if (typeof this.wot.wtViewport.rowsRenderCalculator.startPosition === 'number') {\n this.clone.wtTable.spreader.style.top = `${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;\n\n } else {\n this.clone.wtTable.spreader.style.top = '';\n }\n }\n\n /**\n * Scrolls horizontally to a column at the left edge of the viewport\n *\n * @param sourceCol {Number} Column index which you want to scroll to\n * @param [beyondRendered=false] {Boolean} if `true`, scrolls according to the bottom edge (top edge is by default)\n */\n scrollTo(sourceCol, beyondRendered) {\n let newX = this.getTableParentOffset();\n let sourceInstance = this.wot.cloneSource ? this.wot.cloneSource : this.wot;\n let mainHolder = sourceInstance.wtTable.holder;\n let scrollbarCompensation = 0;\n\n if (beyondRendered && mainHolder.offsetWidth !== mainHolder.clientWidth) {\n scrollbarCompensation = getScrollbarWidth();\n }\n if (beyondRendered) {\n newX += this.sumCellSizes(0, sourceCol + 1);\n newX -= this.wot.wtViewport.getViewportWidth();\n\n } else {\n newX += this.sumCellSizes(this.wot.getSetting('fixedColumnsLeft'), sourceCol);\n }\n newX += scrollbarCompensation;\n\n this.setScrollPosition(newX);\n }\n\n /**\n * Gets table parent left position\n *\n * @returns {Number}\n */\n getTableParentOffset() {\n let preventOverflow = this.wot.getSetting('preventOverflow');\n let offset = 0;\n\n if (!preventOverflow && this.trimmingContainer === window) {\n offset = this.wot.wtTable.holderOffset.left;\n }\n\n return offset;\n }\n\n /**\n * Gets the main overlay's horizontal scroll position\n *\n * @returns {Number} Main table's vertical scroll position\n */\n getScrollPosition() {\n return getScrollLeft(this.mainTableScrollableElement);\n }\n\n /**\n * Adds css classes to hide the header border's header (cell-selection border hiding issue)\n *\n * @param {Number} position Header X position if trimming container is window or scroll top if not\n */\n adjustHeaderBordersPosition(position) {\n const masterParent = this.wot.wtTable.holder.parentNode;\n const rowHeaders = this.wot.getSetting('rowHeaders');\n const fixedColumnsLeft = this.wot.getSetting('fixedColumnsLeft');\n const totalRows = this.wot.getSetting('totalRows');\n\n if (totalRows) {\n removeClass(masterParent, 'emptyRows');\n } else {\n addClass(masterParent, 'emptyRows');\n }\n\n if (fixedColumnsLeft && !rowHeaders.length) {\n addClass(masterParent, 'innerBorderLeft');\n\n } else if (!fixedColumnsLeft && rowHeaders.length) {\n let previousState = hasClass(masterParent, 'innerBorderLeft');\n\n if (position) {\n addClass(masterParent, 'innerBorderLeft');\n } else {\n removeClass(masterParent, 'innerBorderLeft');\n }\n if (!previousState && position || previousState && !position) {\n this.wot.wtOverlays.adjustElementsSize();\n }\n }\n }\n}\n\nOverlay.registerOverlay(Overlay.CLONE_LEFT, LeftOverlay);\n\nexport default LeftOverlay;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/overlay/left.js","import {\n addClass,\n getScrollbarWidth,\n getScrollTop,\n getWindowScrollLeft,\n hasClass,\n outerHeight,\n innerWidth,\n removeClass,\n setOverlayPosition,\n resetCssTransform\n} from './../../../../helpers/dom/element';\nimport Overlay from './_base';\n\n/**\n * @class TopOverlay\n */\nclass TopOverlay extends Overlay {\n /**\n * @param {Walkontable} wotInstance\n */\n constructor(wotInstance) {\n super(wotInstance);\n this.clone = this.makeClone(Overlay.CLONE_TOP);\n }\n\n /**\n * Checks if overlay should be fully rendered\n *\n * @returns {Boolean}\n */\n shouldBeRendered() {\n return !!(this.wot.getSetting('fixedRowsTop') || this.wot.getSetting('columnHeaders').length);\n }\n\n /**\n * Updates the top overlay position\n */\n resetFixedPosition() {\n if (!this.needFullRender || !this.wot.wtTable.holder.parentNode) {\n // removed from DOM\n return;\n }\n let overlayRoot = this.clone.wtTable.holder.parentNode;\n let headerPosition = 0;\n let preventOverflow = this.wot.getSetting('preventOverflow');\n\n if (this.trimmingContainer === window && (!preventOverflow || preventOverflow !== 'vertical')) {\n let box = this.wot.wtTable.hider.getBoundingClientRect();\n let top = Math.ceil(box.top);\n let bottom = Math.ceil(box.bottom);\n let finalLeft;\n let finalTop;\n\n finalLeft = this.wot.wtTable.hider.style.left;\n finalLeft = finalLeft === '' ? 0 : finalLeft;\n\n if (top < 0 && (bottom - overlayRoot.offsetHeight) > 0) {\n finalTop = -top;\n } else {\n finalTop = 0;\n }\n headerPosition = finalTop;\n finalTop += 'px';\n\n setOverlayPosition(overlayRoot, finalLeft, finalTop);\n\n } else {\n headerPosition = this.getScrollPosition();\n resetCssTransform(overlayRoot);\n }\n\n this.adjustHeaderBordersPosition(headerPosition);\n\n this.adjustElementsSize();\n }\n\n /**\n * Sets the main overlay's vertical scroll position\n *\n * @param {Number} pos\n */\n setScrollPosition(pos) {\n if (this.mainTableScrollableElement === window) {\n window.scrollTo(getWindowScrollLeft(), pos);\n\n } else {\n this.mainTableScrollableElement.scrollTop = pos;\n }\n }\n\n /**\n * Triggers onScroll hook callback\n */\n onScroll() {\n this.wot.getSetting('onScrollHorizontally');\n }\n\n /**\n * Calculates total sum cells height\n *\n * @param {Number} from Row index which calculates started from\n * @param {Number} to Row index where calculation is finished\n * @returns {Number} Height sum\n */\n sumCellSizes(from, to) {\n let sum = 0;\n let defaultRowHeight = this.wot.wtSettings.settings.defaultRowHeight;\n\n while (from < to) {\n let height = this.wot.wtTable.getRowHeight(from);\n\n sum += height === void 0 ? defaultRowHeight : height;\n from++;\n }\n\n return sum;\n }\n\n /**\n * Adjust overlay root element, childs and master table element sizes (width, height).\n *\n * @param {Boolean} [force=false]\n */\n adjustElementsSize(force = false) {\n this.updateTrimmingContainer();\n\n if (this.needFullRender || force) {\n this.adjustRootElementSize();\n this.adjustRootChildrenSize();\n\n if (!force) {\n this.areElementSizesAdjusted = true;\n }\n }\n }\n\n /**\n * Adjust overlay root element size (width and height).\n */\n adjustRootElementSize() {\n let masterHolder = this.wot.wtTable.holder;\n let scrollbarWidth = masterHolder.clientWidth === masterHolder.offsetWidth ? 0 : getScrollbarWidth();\n let overlayRoot = this.clone.wtTable.holder.parentNode;\n let overlayRootStyle = overlayRoot.style;\n let preventOverflow = this.wot.getSetting('preventOverflow');\n let tableHeight;\n\n if (this.trimmingContainer !== window || preventOverflow === 'horizontal') {\n let width = this.wot.wtViewport.getWorkspaceWidth() - scrollbarWidth;\n\n width = Math.min(width, innerWidth(this.wot.wtTable.wtRootElement));\n\n overlayRootStyle.width = `${width}px`;\n\n } else {\n overlayRootStyle.width = '';\n }\n\n this.clone.wtTable.holder.style.width = overlayRootStyle.width;\n\n tableHeight = outerHeight(this.clone.wtTable.TABLE);\n overlayRootStyle.height = `${tableHeight === 0 ? tableHeight : tableHeight + 4}px`;\n }\n\n /**\n * Adjust overlay root childs size\n */\n adjustRootChildrenSize() {\n let scrollbarWidth = getScrollbarWidth();\n\n this.clone.wtTable.hider.style.width = this.hider.style.width;\n this.clone.wtTable.holder.style.width = this.clone.wtTable.holder.parentNode.style.width;\n\n if (scrollbarWidth === 0) {\n scrollbarWidth = 30;\n }\n this.clone.wtTable.holder.style.height = `${parseInt(this.clone.wtTable.holder.parentNode.style.height, 10) + scrollbarWidth}px`;\n }\n\n /**\n * Adjust the overlay dimensions and position\n */\n applyToDOM() {\n let total = this.wot.getSetting('totalRows');\n\n if (!this.areElementSizesAdjusted) {\n this.adjustElementsSize();\n }\n if (typeof this.wot.wtViewport.rowsRenderCalculator.startPosition === 'number') {\n this.spreader.style.top = `${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;\n\n } else if (total === 0) {\n // can happen if there are 0 rows\n this.spreader.style.top = '0';\n\n } else {\n throw new Error('Incorrect value of the rowsRenderCalculator');\n }\n this.spreader.style.bottom = '';\n\n if (this.needFullRender) {\n this.syncOverlayOffset();\n }\n }\n\n /**\n * Synchronize calculated left position to an element\n */\n syncOverlayOffset() {\n if (typeof this.wot.wtViewport.columnsRenderCalculator.startPosition === 'number') {\n this.clone.wtTable.spreader.style.left = `${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`;\n\n } else {\n this.clone.wtTable.spreader.style.left = '';\n }\n }\n\n /**\n * Scrolls vertically to a row\n *\n * @param sourceRow {Number} Row index which you want to scroll to\n * @param [bottomEdge=false] {Boolean} if `true`, scrolls according to the bottom edge (top edge is by default)\n */\n scrollTo(sourceRow, bottomEdge) {\n let newY = this.getTableParentOffset();\n let sourceInstance = this.wot.cloneSource ? this.wot.cloneSource : this.wot;\n let mainHolder = sourceInstance.wtTable.holder;\n let scrollbarCompensation = 0;\n\n if (bottomEdge && mainHolder.offsetHeight !== mainHolder.clientHeight) {\n scrollbarCompensation = getScrollbarWidth();\n }\n\n if (bottomEdge) {\n let fixedRowsBottom = this.wot.getSetting('fixedRowsBottom');\n let fixedRowsTop = this.wot.getSetting('fixedRowsTop');\n let totalRows = this.wot.getSetting('totalRows');\n\n newY += this.sumCellSizes(0, sourceRow + 1);\n newY -= this.wot.wtViewport.getViewportHeight() - this.sumCellSizes(totalRows - fixedRowsBottom, totalRows);\n // Fix 1 pixel offset when cell is selected\n newY += 1;\n\n } else {\n newY += this.sumCellSizes(this.wot.getSetting('fixedRowsTop'), sourceRow);\n }\n newY += scrollbarCompensation;\n\n this.setScrollPosition(newY);\n }\n\n /**\n * Gets table parent top position\n *\n * @returns {Number}\n */\n getTableParentOffset() {\n if (this.mainTableScrollableElement === window) {\n return this.wot.wtTable.holderOffset.top;\n\n }\n return 0;\n\n }\n\n /**\n * Gets the main overlay's vertical scroll position\n *\n * @returns {Number} Main table's vertical scroll position\n */\n getScrollPosition() {\n return getScrollTop(this.mainTableScrollableElement);\n }\n\n /**\n * Redraw borders of selection\n *\n * @param {WalkontableSelection} selection Selection for redraw\n */\n redrawSelectionBorders(selection) {\n if (selection && selection.cellRange) {\n const border = selection.getBorder(this.wot);\n\n if (border) {\n const corners = selection.getCorners();\n border.disappear();\n border.appear(corners);\n }\n }\n }\n\n /**\n * Redrawing borders of all selections\n */\n redrawAllSelectionsBorders() {\n const selections = this.wot.selections;\n\n this.redrawSelectionBorders(selections.current);\n this.redrawSelectionBorders(selections.area);\n this.redrawSelectionBorders(selections.fill);\n this.wot.wtTable.wot.wtOverlays.leftOverlay.refresh();\n }\n\n /**\n * Adds css classes to hide the header border's header (cell-selection border hiding issue)\n *\n * @param {Number} position Header Y position if trimming container is window or scroll top if not\n */\n adjustHeaderBordersPosition(position) {\n const masterParent = this.wot.wtTable.holder.parentNode;\n const totalColumns = this.wot.getSetting('totalColumns');\n\n if (totalColumns) {\n removeClass(masterParent, 'emptyColumns');\n } else {\n addClass(masterParent, 'emptyColumns');\n }\n\n if (this.wot.getSetting('fixedRowsTop') === 0 && this.wot.getSetting('columnHeaders').length > 0) {\n let previousState = hasClass(masterParent, 'innerBorderTop');\n\n if (position || this.wot.getSetting('totalRows') === 0) {\n addClass(masterParent, 'innerBorderTop');\n } else {\n removeClass(masterParent, 'innerBorderTop');\n }\n\n if (!previousState && position || previousState && !position) {\n this.wot.wtOverlays.adjustElementsSize();\n\n // cell borders should be positioned once again,\n // because we added / removed 1px border from table header\n this.redrawAllSelectionsBorders();\n }\n }\n\n // nasty workaround for double border in the header, TODO: find a pure-css solution\n if (this.wot.getSetting('rowHeaders').length === 0) {\n let secondHeaderCell = this.clone.wtTable.THEAD.querySelectorAll('th:nth-of-type(2)');\n\n if (secondHeaderCell) {\n for (let i = 0; i < secondHeaderCell.length; i++) {\n secondHeaderCell[i].style['border-left-width'] = 0;\n }\n }\n }\n }\n}\n\nOverlay.registerOverlay(Overlay.CLONE_TOP, TopOverlay);\n\nexport default TopOverlay;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/overlay/top.js","\nimport {\n outerHeight,\n outerWidth,\n setOverlayPosition,\n resetCssTransform\n} from './../../../../helpers/dom/element';\nimport Overlay from './_base';\n\n/**\n * @class TopLeftCornerOverlay\n */\nclass TopLeftCornerOverlay extends Overlay {\n /**\n * @param {Walkontable} wotInstance\n */\n constructor(wotInstance) {\n super(wotInstance);\n this.clone = this.makeClone(Overlay.CLONE_TOP_LEFT_CORNER);\n }\n\n /**\n * Checks if overlay should be fully rendered\n *\n * @returns {Boolean}\n */\n shouldBeRendered() {\n return !!((this.wot.getSetting('fixedRowsTop') || this.wot.getSetting('columnHeaders').length) &&\n (this.wot.getSetting('fixedColumnsLeft') || this.wot.getSetting('rowHeaders').length));\n }\n\n /**\n * Updates the corner overlay position\n */\n resetFixedPosition() {\n this.updateTrimmingContainer();\n\n if (!this.wot.wtTable.holder.parentNode) {\n // removed from DOM\n return;\n }\n let overlayRoot = this.clone.wtTable.holder.parentNode;\n let tableHeight = outerHeight(this.clone.wtTable.TABLE);\n let tableWidth = outerWidth(this.clone.wtTable.TABLE);\n let preventOverflow = this.wot.getSetting('preventOverflow');\n\n if (this.trimmingContainer === window) {\n let box = this.wot.wtTable.hider.getBoundingClientRect();\n let top = Math.ceil(box.top);\n let left = Math.ceil(box.left);\n let bottom = Math.ceil(box.bottom);\n let right = Math.ceil(box.right);\n let finalLeft = '0';\n let finalTop = '0';\n\n if (!preventOverflow || preventOverflow === 'vertical') {\n if (left < 0 && (right - overlayRoot.offsetWidth) > 0) {\n finalLeft = `${-left}px`;\n }\n }\n\n if (!preventOverflow || preventOverflow === 'horizontal') {\n if (top < 0 && (bottom - overlayRoot.offsetHeight) > 0) {\n finalTop = `${-top}px`;\n }\n }\n setOverlayPosition(overlayRoot, finalLeft, finalTop);\n } else {\n resetCssTransform(overlayRoot);\n }\n overlayRoot.style.height = `${tableHeight === 0 ? tableHeight : tableHeight + 4}px`;\n overlayRoot.style.width = `${tableWidth === 0 ? tableWidth : tableWidth + 4}px`;\n }\n}\n\nOverlay.registerOverlay(Overlay.CLONE_TOP_LEFT_CORNER, TopLeftCornerOverlay);\n\nexport default TopLeftCornerOverlay;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/overlay/topLeftCorner.js","import {addClass} from './../../../helpers/dom/element';\nimport Border from './border';\nimport CellCoords from './cell/coords';\nimport CellRange from './cell/range';\n\n/**\n * @class Selection\n */\nclass Selection {\n /**\n * @param {Object} settings\n * @param {CellRange} cellRange\n */\n constructor(settings, cellRange) {\n this.settings = settings;\n this.cellRange = cellRange || null;\n this.instanceBorders = {};\n }\n\n /**\n * Each Walkontable clone requires it's own border for every selection. This method creates and returns selection\n * borders per instance\n *\n * @param {Walkontable} wotInstance\n * @returns {Border}\n */\n getBorder(wotInstance) {\n if (this.instanceBorders[wotInstance.guid]) {\n return this.instanceBorders[wotInstance.guid];\n }\n\n // where is this returned?\n this.instanceBorders[wotInstance.guid] = new Border(wotInstance, this.settings);\n }\n\n /**\n * Checks if selection is empty\n *\n * @returns {Boolean}\n */\n isEmpty() {\n return this.cellRange === null;\n }\n\n /**\n * Adds a cell coords to the selection\n *\n * @param {CellCoords} coords\n */\n add(coords) {\n if (this.isEmpty()) {\n this.cellRange = new CellRange(coords, coords, coords);\n\n } else {\n this.cellRange.expand(coords);\n }\n }\n\n /**\n * If selection range from or to property equals oldCoords, replace it with newCoords. Return boolean\n * information about success\n *\n * @param {CellCoords} oldCoords\n * @param {CellCoords} newCoords\n * @returns {Boolean}\n */\n replace(oldCoords, newCoords) {\n if (!this.isEmpty()) {\n if (this.cellRange.from.isEqual(oldCoords)) {\n this.cellRange.from = newCoords;\n\n return true;\n }\n if (this.cellRange.to.isEqual(oldCoords)) {\n this.cellRange.to = newCoords;\n\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Clears selection\n */\n clear() {\n this.cellRange = null;\n }\n\n /**\n * Returns the top left (TL) and bottom right (BR) selection coordinates\n *\n * @returns {Array} Returns array of coordinates for example `[1, 1, 5, 5]`\n */\n getCorners() {\n let topLeft = this.cellRange.getTopLeftCorner();\n let bottomRight = this.cellRange.getBottomRightCorner();\n\n return [\n topLeft.row,\n topLeft.col,\n bottomRight.row,\n bottomRight.col,\n ];\n }\n\n /**\n * Adds class name to cell element at given coords\n *\n * @param {Walkontable} wotInstance Walkontable instance\n * @param {Number} sourceRow Cell row coord\n * @param {Number} sourceColumn Cell column coord\n * @param {String} className Class name\n */\n addClassAtCoords(wotInstance, sourceRow, sourceColumn, className) {\n let TD = wotInstance.wtTable.getCell(new CellCoords(sourceRow, sourceColumn));\n\n if (typeof TD === 'object') {\n addClass(TD, className);\n }\n }\n\n /**\n * @param wotInstance\n */\n draw(wotInstance) {\n if (this.isEmpty()) {\n if (this.settings.border) {\n let border = this.getBorder(wotInstance);\n\n if (border) {\n border.disappear();\n }\n }\n\n return;\n }\n let renderedRows = wotInstance.wtTable.getRenderedRowsCount();\n let renderedColumns = wotInstance.wtTable.getRenderedColumnsCount();\n let corners = this.getCorners();\n let sourceRow,\n sourceCol,\n TH;\n\n for (let column = 0; column < renderedColumns; column++) {\n sourceCol = wotInstance.wtTable.columnFilter.renderedToSource(column);\n\n if (sourceCol >= corners[1] && sourceCol <= corners[3]) {\n TH = wotInstance.wtTable.getColumnHeader(sourceCol);\n\n if (TH) {\n let newClasses = [];\n\n if (this.settings.highlightHeaderClassName) {\n newClasses.push(this.settings.highlightHeaderClassName);\n }\n\n if (this.settings.highlightColumnClassName) {\n newClasses.push(this.settings.highlightColumnClassName);\n }\n\n addClass(TH, newClasses);\n }\n }\n }\n\n for (let row = 0; row < renderedRows; row++) {\n sourceRow = wotInstance.wtTable.rowFilter.renderedToSource(row);\n\n if (sourceRow >= corners[0] && sourceRow <= corners[2]) {\n TH = wotInstance.wtTable.getRowHeader(sourceRow);\n\n if (TH) {\n let newClasses = [];\n\n if (this.settings.highlightHeaderClassName) {\n newClasses.push(this.settings.highlightHeaderClassName);\n }\n\n if (this.settings.highlightRowClassName) {\n newClasses.push(this.settings.highlightRowClassName);\n }\n\n addClass(TH, newClasses);\n }\n }\n\n for (let column = 0; column < renderedColumns; column++) {\n sourceCol = wotInstance.wtTable.columnFilter.renderedToSource(column);\n\n if (sourceRow >= corners[0] && sourceRow <= corners[2] && sourceCol >= corners[1] && sourceCol <= corners[3]) {\n // selected cell\n if (this.settings.className) {\n this.addClassAtCoords(wotInstance, sourceRow, sourceCol, this.settings.className);\n }\n } else if (sourceRow >= corners[0] && sourceRow <= corners[2]) {\n // selection is in this row\n if (this.settings.highlightRowClassName) {\n this.addClassAtCoords(wotInstance, sourceRow, sourceCol, this.settings.highlightRowClassName);\n }\n } else if (sourceCol >= corners[1] && sourceCol <= corners[3]) {\n // selection is in this column\n if (this.settings.highlightColumnClassName) {\n this.addClassAtCoords(wotInstance, sourceRow, sourceCol, this.settings.highlightColumnClassName);\n }\n }\n }\n }\n wotInstance.getSetting('onBeforeDrawBorders', corners, this.settings.className);\n\n if (this.settings.border) {\n let border = this.getBorder(wotInstance);\n\n if (border) {\n // warning! border.appear modifies corners!\n border.appear(corners);\n }\n }\n }\n}\n\nexport default Selection;\n\n\n\n// WEBPACK FOOTER //\n// src/3rdparty/walkontable/src/selection.js","import SheetClip from './../lib/SheetClip/SheetClip.js';\nimport {cellMethodLookupFactory} from './helpers/data';\nimport {columnFactory} from './helpers/setting';\nimport {createObjectPropListener, duckSchema, deepExtend, deepClone, isObject, deepObjectSize, hasOwnProperty} from './helpers/object';\nimport {extendArray, to2dArray} from './helpers/array';\nimport Interval from './utils/interval';\nimport {rangeEach} from './helpers/number';\nimport MultiMap from './multiMap';\nimport Hooks from './pluginHooks';\n\n/**\n * Utility class that gets and saves data from/to the data source using mapping of columns numbers to object property names\n * @todo refactor arguments of methods getRange, getText to be numbers (not objects)\n * @todo remove priv, GridSettings from object constructor\n *\n * @param {Object} instance Instance of Handsontable\n * @param {*} priv\n * @param {*} GridSettings Grid settings\n * @util\n * @class DataMap\n */\nfunction DataMap(instance, priv, GridSettings) {\n this.instance = instance;\n this.priv = priv;\n this.GridSettings = GridSettings;\n this.dataSource = this.instance.getSettings().data;\n this.cachedLength = null;\n this.skipCache = false;\n this.latestSourceRowsCount = 0;\n\n if (this.dataSource && this.dataSource[0]) {\n this.duckSchema = this.recursiveDuckSchema(this.dataSource[0]);\n } else {\n this.duckSchema = {};\n }\n this.createMap();\n this.interval = Interval.create(() => this.clearLengthCache(), '15fps');\n\n this.instance.addHook('skipLengthCache', (delay) => this.onSkipLengthCache(delay));\n this.onSkipLengthCache(500);\n}\n\nDataMap.prototype.DESTINATION_RENDERER = 1;\nDataMap.prototype.DESTINATION_CLIPBOARD_GENERATOR = 2;\n\n/**\n * @param {Object|Array} object\n * @returns {Object|Array}\n */\nDataMap.prototype.recursiveDuckSchema = function(object) {\n return duckSchema(object);\n};\n\n/**\n * @param {Object} schema\n * @param {Number} lastCol\n * @param {Number} parent\n * @returns {Number}\n */\nDataMap.prototype.recursiveDuckColumns = function(schema, lastCol, parent) {\n var prop,\n i;\n if (typeof lastCol === 'undefined') {\n lastCol = 0;\n parent = '';\n }\n if (typeof schema === 'object' && !Array.isArray(schema)) {\n for (i in schema) {\n if (hasOwnProperty(schema, i)) {\n if (schema[i] === null) {\n prop = parent + i;\n this.colToPropCache.push(prop);\n this.propToColCache.set(prop, lastCol);\n\n lastCol++;\n } else {\n lastCol = this.recursiveDuckColumns(schema[i], lastCol, `${i}.`);\n }\n }\n }\n }\n\n return lastCol;\n};\n\nDataMap.prototype.createMap = function() {\n let i;\n let schema = this.getSchema();\n\n if (typeof schema === 'undefined') {\n throw new Error('trying to create `columns` definition but you didn\\'t provide `schema` nor `data`');\n }\n\n this.colToPropCache = [];\n this.propToColCache = new MultiMap();\n\n let columns = this.instance.getSettings().columns;\n\n if (columns) {\n let columnsLen = columns.length;\n let filteredIndex = 0;\n let columnsAsFunc = false;\n let schemaLen = deepObjectSize(schema);\n\n if (typeof columns === 'function') {\n columnsLen = schemaLen > 0 ? schemaLen : this.instance.countSourceCols();\n columnsAsFunc = true;\n }\n\n for (i = 0; i < columnsLen; i++) {\n let column = columnsAsFunc ? columns(i) : columns[i];\n\n if (isObject(column)) {\n if (typeof column.data !== 'undefined') {\n let index = columnsAsFunc ? filteredIndex : i;\n this.colToPropCache[index] = column.data;\n this.propToColCache.set(column.data, index);\n }\n\n filteredIndex++;\n }\n }\n\n } else {\n this.recursiveDuckColumns(schema);\n }\n};\n\n/**\n * Returns property name that corresponds with the given column index.\n *\n * @param {Number} col\n * @returns {Number}\n */\nDataMap.prototype.colToProp = function(col) {\n col = this.instance.runHooks('modifyCol', col);\n\n if (this.colToPropCache && typeof this.colToPropCache[col] !== 'undefined') {\n return this.colToPropCache[col];\n }\n\n return col;\n};\n\n/**\n * @param {Object} prop\n * @fires Hooks#modifyCol\n * @returns {*}\n */\nDataMap.prototype.propToCol = function(prop) {\n var col;\n\n if (typeof this.propToColCache.get(prop) === 'undefined') {\n col = prop;\n } else {\n col = this.propToColCache.get(prop);\n }\n col = this.instance.runHooks('unmodifyCol', col);\n\n return col;\n};\n\n/**\n * @returns {Object}\n */\nDataMap.prototype.getSchema = function() {\n var schema = this.instance.getSettings().dataSchema;\n\n if (schema) {\n if (typeof schema === 'function') {\n return schema();\n }\n return schema;\n }\n\n return this.duckSchema;\n};\n\n/**\n * Creates row at the bottom of the data array.\n *\n * @param {Number} [index] Index of the row before which the new row will be inserted.\n * @param {Number} [amount] An amount of rows to add.\n * @param {String} [source] Source of method call.\n * @fires Hooks#afterCreateRow\n * @returns {Number} Returns number of created rows.\n */\nDataMap.prototype.createRow = function(index, amount, source) {\n var row,\n colCount = this.instance.countCols(),\n numberOfCreatedRows = 0,\n currentIndex;\n\n if (!amount) {\n amount = 1;\n }\n\n if (typeof index !== 'number' || index >= this.instance.countSourceRows()) {\n index = this.instance.countSourceRows();\n }\n this.instance.runHooks('beforeCreateRow', index, amount, source);\n\n currentIndex = index;\n var maxRows = this.instance.getSettings().maxRows;\n\n while (numberOfCreatedRows < amount && this.instance.countSourceRows() < maxRows) {\n if (this.instance.dataType === 'array') {\n if (this.instance.getSettings().dataSchema) {\n // Clone template array\n row = deepClone(this.getSchema());\n\n } else {\n row = [];\n /* eslint-disable no-loop-func */\n rangeEach(colCount - 1, () => row.push(null));\n }\n\n } else if (this.instance.dataType === 'function') {\n row = this.instance.getSettings().dataSchema(index);\n\n } else {\n row = {};\n deepExtend(row, this.getSchema());\n }\n\n if (index === this.instance.countSourceRows()) {\n this.dataSource.push(row);\n\n } else {\n this.spliceData(index, 0, row);\n }\n\n numberOfCreatedRows++;\n currentIndex++;\n }\n\n this.instance.runHooks('afterCreateRow', index, numberOfCreatedRows, source);\n this.instance.forceFullRender = true; // used when data was changed\n\n return numberOfCreatedRows;\n};\n\n/**\n * Creates col at the right of the data array.\n *\n * @param {Number} [index] Index of the column before which the new column will be inserted\n * @param {Number} [amount] An amount of columns to add.\n * @param {String} [source] Source of method call.\n * @fires Hooks#afterCreateCol\n * @returns {Number} Returns number of created columns\n */\nDataMap.prototype.createCol = function(index, amount, source) {\n if (!this.instance.isColumnModificationAllowed()) {\n throw new Error('Cannot create new column. When data source in an object, ' +\n 'you can only have as much columns as defined in first data row, data schema or in the \\'columns\\' setting.' +\n 'If you want to be able to add new columns, you have to use array datasource.');\n }\n var rlen = this.instance.countSourceRows(),\n data = this.dataSource,\n constructor,\n numberOfCreatedCols = 0,\n currentIndex;\n\n if (!amount) {\n amount = 1;\n }\n\n if (typeof index !== 'number' || index >= this.instance.countCols()) {\n index = this.instance.countCols();\n }\n this.instance.runHooks('beforeCreateCol', index, amount, source);\n\n currentIndex = index;\n\n var maxCols = this.instance.getSettings().maxCols;\n while (numberOfCreatedCols < amount && this.instance.countCols() < maxCols) {\n constructor = columnFactory(this.GridSettings, this.priv.columnsSettingConflicts);\n\n if (typeof index !== 'number' || index >= this.instance.countCols()) {\n if (rlen > 0) {\n for (var r = 0; r < rlen; r++) {\n if (typeof data[r] === 'undefined') {\n data[r] = [];\n }\n data[r].push(null);\n }\n } else {\n data.push([null]);\n }\n // Add new column constructor\n this.priv.columnSettings.push(constructor);\n\n } else {\n for (let r = 0; r < rlen; r++) {\n data[r].splice(currentIndex, 0, null);\n }\n // Add new column constructor at given index\n this.priv.columnSettings.splice(currentIndex, 0, constructor);\n }\n\n numberOfCreatedCols++;\n currentIndex++;\n }\n\n this.instance.runHooks('afterCreateCol', index, numberOfCreatedCols, source);\n this.instance.forceFullRender = true; // used when data was changed\n\n return numberOfCreatedCols;\n};\n\n/**\n * Removes row from the data array.\n *\n * @param {Number} [index] Index of the row to be removed. If not provided, the last row will be removed\n * @param {Number} [amount] Amount of the rows to be removed. If not provided, one row will be removed\n * @param {String} [source] Source of method call.\n * @fires Hooks#beforeRemoveRow\n * @fires Hooks#afterRemoveRow\n */\nDataMap.prototype.removeRow = function(index, amount, source) {\n if (!amount) {\n amount = 1;\n }\n if (typeof index !== 'number') {\n index = -amount;\n }\n\n amount = this.instance.runHooks('modifyRemovedAmount', amount, index);\n\n index = (this.instance.countSourceRows() + index) % this.instance.countSourceRows();\n\n let logicRows = this.physicalRowsToLogical(index, amount);\n let actionWasNotCancelled = this.instance.runHooks('beforeRemoveRow', index, amount, logicRows, source);\n\n if (actionWasNotCancelled === false) {\n return;\n }\n\n let data = this.dataSource;\n let newData;\n\n newData = this.filterData(index, amount);\n\n if (newData) {\n data.length = 0;\n Array.prototype.push.apply(data, newData);\n }\n\n this.instance.runHooks('afterRemoveRow', index, amount, logicRows, source);\n\n this.instance.forceFullRender = true; // used when data was changed\n};\n\n/**\n * Removes column from the data array.\n *\n * @param {Number} [index] Index of the column to be removed. If not provided, the last column will be removed\n * @param {Number} [amount] Amount of the columns to be removed. If not provided, one column will be removed\n * @param {String} [source] Source of method call.\n * @fires Hooks#beforeRemoveCol\n * @fires Hooks#afterRemoveCol\n */\nDataMap.prototype.removeCol = function(index, amount, source) {\n if (this.instance.dataType === 'object' || this.instance.getSettings().columns) {\n throw new Error('cannot remove column with object data source or columns option specified');\n }\n if (!amount) {\n amount = 1;\n }\n if (typeof index !== 'number') {\n index = -amount;\n }\n\n index = (this.instance.countCols() + index) % this.instance.countCols();\n\n let logicColumns = this.physicalColumnsToLogical(index, amount);\n let descendingLogicColumns = logicColumns.slice(0).sort((a, b) => b - a);\n let actionWasNotCancelled = this.instance.runHooks('beforeRemoveCol', index, amount, logicColumns, source);\n\n if (actionWasNotCancelled === false) {\n return;\n }\n\n let isTableUniform = true;\n let removedColumnsCount = descendingLogicColumns.length;\n let data = this.dataSource;\n\n for (let c = 0; c < removedColumnsCount; c++) {\n if (isTableUniform && logicColumns[0] !== logicColumns[c] - c) {\n isTableUniform = false;\n }\n }\n\n if (isTableUniform) {\n for (let r = 0, rlen = this.instance.countSourceRows(); r < rlen; r++) {\n data[r].splice(logicColumns[0], amount);\n }\n\n } else {\n for (let r = 0, rlen = this.instance.countSourceRows(); r < rlen; r++) {\n for (let c = 0; c < removedColumnsCount; c++) {\n data[r].splice(descendingLogicColumns[c], 1);\n }\n }\n\n for (let c = 0; c < removedColumnsCount; c++) {\n this.priv.columnSettings.splice(logicColumns[c], 1);\n }\n }\n\n this.instance.runHooks('afterRemoveCol', index, amount, logicColumns, source);\n\n this.instance.forceFullRender = true; // used when data was changed\n};\n\n/**\n * Add/Removes data from the column.\n *\n * @param {Number} col Index of column in which do you want to do splice\n * @param {Number} index Index at which to start changing the array. If negative, will begin that many elements from the end\n * @param {Number} amount An integer indicating the number of old array elements to remove. If amount is 0, no elements are removed\n * @returns {Array} Returns removed portion of columns\n */\nDataMap.prototype.spliceCol = function(col, index, amount/* , elements...*/) {\n var elements = arguments.length >= 4 ? [].slice.call(arguments, 3) : [];\n\n var colData = this.instance.getDataAtCol(col);\n var removed = colData.slice(index, index + amount);\n var after = colData.slice(index + amount);\n\n extendArray(elements, after);\n var i = 0;\n while (i < amount) {\n elements.push(null); // add null in place of removed elements\n i++;\n }\n to2dArray(elements);\n this.instance.populateFromArray(index, col, elements, null, null, 'spliceCol');\n\n return removed;\n};\n\n/**\n * Add/Removes data from the row.\n *\n * @param {Number} row Index of row in which do you want to do splice\n * @param {Number} index Index at which to start changing the array. If negative, will begin that many elements from the end\n * @param {Number} amount An integer indicating the number of old array elements to remove. If amount is 0, no elements are removed\n * @returns {Array} Returns removed portion of rows\n */\nDataMap.prototype.spliceRow = function(row, index, amount/* , elements...*/) {\n var elements = arguments.length >= 4 ? [].slice.call(arguments, 3) : [];\n\n var rowData = this.instance.getSourceDataAtRow(row);\n var removed = rowData.slice(index, index + amount);\n var after = rowData.slice(index + amount);\n\n extendArray(elements, after);\n var i = 0;\n while (i < amount) {\n elements.push(null); // add null in place of removed elements\n i++;\n }\n this.instance.populateFromArray(row, index, [elements], null, null, 'spliceRow');\n\n return removed;\n};\n\n/**\n * Add/remove row(s) to/from the data source.\n *\n * @param {Number} index Index of the element to remove.\n * @param {Number} amount Number of rows to add/remove.\n * @param {Object} element Row to add.\n */\nDataMap.prototype.spliceData = function(index, amount, element) {\n let continueSplicing = this.instance.runHooks('beforeDataSplice', index, amount, element);\n\n if (continueSplicing !== false) {\n this.dataSource.splice(index, amount, element);\n }\n};\n\n/**\n * Filter unwanted data elements from the data source.\n *\n * @param {Number} index Index of the element to remove.\n * @param {Number} amount Number of rows to add/remove.\n * @returns {Array}\n */\nDataMap.prototype.filterData = function(index, amount) {\n let logicRows = this.physicalRowsToLogical(index, amount);\n let continueSplicing = this.instance.runHooks('beforeDataFilter', index, amount, logicRows);\n\n if (continueSplicing !== false) {\n let newData = this.dataSource.filter((row, index) => logicRows.indexOf(index) == -1);\n\n return newData;\n }\n};\n\n/**\n * Returns single value from the data array.\n *\n * @param {Number} row\n * @param {Number} prop\n */\nDataMap.prototype.get = function(row, prop) {\n row = this.instance.runHooks('modifyRow', row);\n\n let dataRow = this.dataSource[row];\n // TODO: To remove, use 'modifyData' hook instead (see below)\n let modifiedRowData = this.instance.runHooks('modifyRowData', row);\n\n dataRow = isNaN(modifiedRowData) ? modifiedRowData : dataRow;\n //\n\n let value = null;\n\n // try to get value under property `prop` (includes dot)\n if (dataRow && dataRow.hasOwnProperty && hasOwnProperty(dataRow, prop)) {\n value = dataRow[prop];\n\n } else if (typeof prop === 'string' && prop.indexOf('.') > -1) {\n let sliced = prop.split('.');\n let out = dataRow;\n\n if (!out) {\n return null;\n }\n for (let i = 0, ilen = sliced.length; i < ilen; i++) {\n out = out[sliced[i]];\n\n if (typeof out === 'undefined') {\n return null;\n }\n }\n value = out;\n\n } else if (typeof prop === 'function') {\n /**\n * allows for interacting with complex structures, for example\n * d3/jQuery getter/setter properties:\n *\n * {columns: [{\n * data: function(row, value){\n * if(arguments.length === 1){\n * return row.property();\n * }\n * row.property(value);\n * }\n * }]}\n */\n value = prop(this.dataSource.slice(row, row + 1)[0]);\n }\n\n if (this.instance.hasHook('modifyData')) {\n const valueHolder = createObjectPropListener(value);\n\n this.instance.runHooks('modifyData', row, this.propToCol(prop), valueHolder, 'get');\n\n if (valueHolder.isTouched()) {\n value = valueHolder.value;\n }\n }\n\n return value;\n};\n\nvar copyableLookup = cellMethodLookupFactory('copyable', false);\n\n/**\n * Returns single value from the data array (intended for clipboard copy to an external application).\n *\n * @param {Number} row\n * @param {Number} prop\n * @returns {String}\n */\nDataMap.prototype.getCopyable = function(row, prop) {\n if (copyableLookup.call(this.instance, row, this.propToCol(prop))) {\n return this.get(row, prop);\n }\n return '';\n};\n\n/**\n * Saves single value to the data array.\n *\n * @param {Number} row\n * @param {Number} prop\n * @param {String} value\n * @param {String} [source] Source of hook runner.\n */\nDataMap.prototype.set = function(row, prop, value, source) {\n row = this.instance.runHooks('modifyRow', row, source || 'datamapGet');\n\n let dataRow = this.dataSource[row];\n // TODO: To remove, use 'modifyData' hook instead (see below)\n let modifiedRowData = this.instance.runHooks('modifyRowData', row);\n\n dataRow = isNaN(modifiedRowData) ? modifiedRowData : dataRow;\n //\n\n if (this.instance.hasHook('modifyData')) {\n const valueHolder = createObjectPropListener(value);\n\n this.instance.runHooks('modifyData', row, this.propToCol(prop), valueHolder, 'set');\n\n if (valueHolder.isTouched()) {\n value = valueHolder.value;\n }\n }\n\n // try to set value under property `prop` (includes dot)\n if (dataRow && dataRow.hasOwnProperty && hasOwnProperty(dataRow, prop)) {\n dataRow[prop] = value;\n\n } else if (typeof prop === 'string' && prop.indexOf('.') > -1) {\n let sliced = prop.split('.');\n let out = dataRow;\n let i = 0;\n let ilen;\n\n for (i = 0, ilen = sliced.length - 1; i < ilen; i++) {\n if (typeof out[sliced[i]] === 'undefined') {\n out[sliced[i]] = {};\n }\n out = out[sliced[i]];\n }\n out[sliced[i]] = value;\n\n } else if (typeof prop === 'function') {\n /* see the `function` handler in `get` */\n prop(this.dataSource.slice(row, row + 1)[0], value);\n\n } else {\n dataRow[prop] = value;\n }\n};\n\n/**\n * This ridiculous piece of code maps rows Id that are present in table data to those displayed for user.\n * The trick is, the physical row id (stored in settings.data) is not necessary the same\n * as the logical (displayed) row id (e.g. when sorting is applied).\n *\n * @param {Number} index\n * @param {Number} amount\n * @fires Hooks#modifyRow\n * @returns {Number}\n */\nDataMap.prototype.physicalRowsToLogical = function(index, amount) {\n var totalRows = this.instance.countSourceRows();\n var physicRow = (totalRows + index) % totalRows;\n var logicRows = [];\n var rowsToRemove = amount;\n var row;\n\n while (physicRow < totalRows && rowsToRemove) {\n row = this.instance.runHooks('modifyRow', physicRow);\n logicRows.push(row);\n\n rowsToRemove--;\n physicRow++;\n }\n\n return logicRows;\n};\n\n/**\n *\n * @param index\n * @param amount\n * @returns {Array}\n */\nDataMap.prototype.physicalColumnsToLogical = function(index, amount) {\n let totalCols = this.instance.countCols();\n let physicalCol = (totalCols + index) % totalCols;\n let logicalCols = [];\n let colsToRemove = amount;\n\n while (physicalCol < totalCols && colsToRemove) {\n let col = this.instance.runHooks('modifyCol', physicalCol);\n\n logicalCols.push(col);\n\n colsToRemove--;\n physicalCol++;\n }\n\n return logicalCols;\n};\n\n/**\n * Clears the data array.\n */\nDataMap.prototype.clear = function() {\n for (var r = 0; r < this.instance.countSourceRows(); r++) {\n for (var c = 0; c < this.instance.countCols(); c++) {\n this.set(r, this.colToProp(c), '');\n }\n }\n};\n\n/**\n * Clear cached data length.\n */\nDataMap.prototype.clearLengthCache = function() {\n this.cachedLength = null;\n};\n\n/**\n * Get data length.\n *\n * @returns {Number}\n */\nDataMap.prototype.getLength = function() {\n let maxRows,\n maxRowsFromSettings = this.instance.getSettings().maxRows;\n\n if (maxRowsFromSettings < 0 || maxRowsFromSettings === 0) {\n maxRows = 0;\n } else {\n maxRows = maxRowsFromSettings || Infinity;\n }\n\n let length = this.instance.countSourceRows();\n\n if (this.instance.hasHook('modifyRow')) {\n let reValidate = this.skipCache;\n\n this.interval.start();\n if (length !== this.latestSourceRowsCount) {\n reValidate = true;\n }\n\n this.latestSourceRowsCount = length;\n if (this.cachedLength === null || reValidate) {\n rangeEach(length - 1, (row) => {\n row = this.instance.runHooks('modifyRow', row);\n\n if (row === null) {\n --length;\n }\n });\n this.cachedLength = length;\n\n } else {\n length = this.cachedLength;\n }\n } else {\n this.interval.stop();\n }\n\n return Math.min(length, maxRows);\n};\n\n/**\n * Returns the data array.\n *\n * @returns {Array}\n */\nDataMap.prototype.getAll = function() {\n let start = {\n row: 0,\n col: 0,\n };\n\n let maxRows = this.instance.getSettings().maxRows;\n\n if (maxRows === 0) {\n return [];\n }\n\n let end = {\n row: Math.min(Math.max(maxRows - 1, 0), Math.max(this.instance.countSourceRows() - 1, 0)),\n col: Math.max(this.instance.countCols() - 1, 0),\n };\n\n if (start.row - end.row === 0 && !this.instance.countSourceRows()) {\n return [];\n }\n\n return this.getRange(start, end, DataMap.prototype.DESTINATION_RENDERER);\n};\n\n/**\n * Returns data range as array.\n *\n * @param {Object} [start] Start selection position\n * @param {Object} [end] End selection position\n * @param {Number} destination Destination of datamap.get\n * @returns {Array}\n */\nDataMap.prototype.getRange = function(start, end, destination) {\n var r,\n rlen,\n c,\n clen,\n output = [],\n row;\n\n var getFn = destination === this.DESTINATION_CLIPBOARD_GENERATOR ? this.getCopyable : this.get;\n\n rlen = Math.max(start.row, end.row);\n clen = Math.max(start.col, end.col);\n\n for (r = Math.min(start.row, end.row); r <= rlen; r++) {\n row = [];\n let physicalRow = this.instance.runHooks('modifyRow', r);\n\n for (c = Math.min(start.col, end.col); c <= clen; c++) {\n\n if (physicalRow === null) {\n break;\n }\n row.push(getFn.call(this, r, this.colToProp(c)));\n }\n if (physicalRow !== null) {\n output.push(row);\n }\n }\n\n return output;\n};\n\n/**\n * Return data as text (tab separated columns).\n *\n * @param {Object} [start] Start selection position\n * @param {Object} [end] End selection position\n * @returns {String}\n */\nDataMap.prototype.getText = function(start, end) {\n return SheetClip.stringify(this.getRange(start, end, this.DESTINATION_RENDERER));\n};\n\n/**\n * Return data as copyable text (tab separated columns intended for clipboard copy to an external application).\n *\n * @param {Object} [start] Start selection position\n * @param {Object} [end] End selection position\n * @returns {String}\n */\nDataMap.prototype.getCopyableText = function(start, end) {\n return SheetClip.stringify(this.getRange(start, end, this.DESTINATION_CLIPBOARD_GENERATOR));\n};\n\n/**\n * `skipLengthCache` callback.\n * @private\n * @param {Number} delay Time of the delay in milliseconds.\n */\nDataMap.prototype.onSkipLengthCache = function(delay) {\n this.skipCache = true;\n setTimeout(() => {\n this.skipCache = false;\n }, delay);\n};\n\n/**\n * Destroy instance.\n */\nDataMap.prototype.destroy = function() {\n this.interval.stop();\n\n this.interval = null;\n this.instance = null;\n this.priv = null;\n this.GridSettings = null;\n this.dataSource = null;\n this.cachedLength = null;\n this.duckSchema = null;\n};\n\nexport default DataMap;\n\n\n\n// WEBPACK FOOTER //\n// src/dataMap.js","import {getProperty} from './helpers/object';\nimport {arrayEach} from './helpers/array';\nimport {rangeEach} from './helpers/number';\n\n/**\n * @class DataSource\n * @private\n */\nclass DataSource {\n constructor(hotInstance, dataSource = []) {\n /**\n * Instance of Handsontable.\n *\n * @type {Handsontable}\n */\n this.hot = hotInstance;\n /**\n * Data source\n *\n * @type {Array}\n */\n this.data = dataSource;\n /**\n * Type of data source.\n *\n * @type {String}\n * @default 'array'\n */\n this.dataType = 'array';\n\n this.colToProp = () => {};\n this.propToCol = () => {};\n }\n\n /**\n * Get all data.\n *\n * @param {Boolean} [toArray=false] If `true` return source data as an array of arrays even when source data was provided\n * in another format.\n * @returns {Array}\n */\n getData(toArray = false) {\n let result = this.data;\n\n if (toArray) {\n result = this.getByRange(\n {row: 0, col: 0},\n {row: Math.max(this.countRows() - 1, 0), col: Math.max(this.countColumns() - 1, 0)},\n true\n );\n }\n\n return result;\n }\n\n /**\n * Set new data source.\n *\n * @param data {Array}\n */\n setData(data) {\n this.data = data;\n }\n\n /**\n * Returns array of column values from the data source. `column` is the index of the row in the data source.\n *\n * @param {Number} column\n * @returns {Array}\n */\n getAtColumn(column) {\n let result = [];\n\n arrayEach(this.data, (row) => {\n let property = this.colToProp(column);\n\n if (typeof property === 'string') {\n row = getProperty(row, property);\n } else {\n row = row[property];\n }\n result.push(row);\n });\n\n return result;\n }\n\n /**\n * Returns a single row of the data (array or object, depending on what you have). `row` is the index of the row in the data source.\n *\n * @param {Number} row\n * @returns {Array|Object}\n */\n getAtRow(row) {\n return this.data[row];\n }\n\n /**\n * Returns a single value from the data.\n *\n * @param {Number} row Row index.\n * @param {Number} column Column index.\n * @returns {*}\n */\n getAtCell(row, column) {\n let result = null;\n\n let modifyRowData = this.hot.runHooks('modifyRowData', row);\n\n let dataRow = isNaN(modifyRowData) ? modifyRowData : this.data[row];\n\n if (dataRow) {\n let prop = this.colToProp(column);\n\n if (typeof prop === 'string') {\n result = getProperty(dataRow, prop);\n\n } else if (typeof prop === 'function') {\n result = prop(this.data.slice(row, row + 1)[0]);\n\n } else {\n result = dataRow[prop];\n }\n }\n\n return result;\n }\n\n /**\n * Returns source data by passed range.\n *\n * @param {Object} start Object with `row` and `col` keys.\n * @param {Object} end Object with `row` and `col` keys.\n * @param {Boolean} [toArray=false] If `true` return source data as an array of arrays even when source data was provided\n * in another format.\n * @returns {Array}\n */\n getByRange(start, end, toArray = false) {\n let startRow = Math.min(start.row, end.row);\n let startCol = Math.min(start.col, end.col);\n let endRow = Math.max(start.row, end.row);\n let endCol = Math.max(start.col, end.col);\n let result = [];\n\n rangeEach(startRow, endRow, (currentRow) => {\n let row = this.getAtRow(currentRow);\n let newRow;\n\n if (this.dataType === 'array') {\n newRow = row.slice(startCol, endCol + 1);\n\n } else if (this.dataType === 'object') {\n newRow = toArray ? [] : {};\n\n rangeEach(startCol, endCol, (column) => {\n let prop = this.colToProp(column);\n\n if (toArray) {\n newRow.push(row[prop]);\n } else {\n newRow[prop] = row[prop];\n }\n });\n }\n\n result.push(newRow);\n });\n\n return result;\n }\n\n /**\n * Count number of rows.\n *\n * @returns {Number}\n */\n countRows() {\n return Array.isArray(this.data) ? this.data.length : 0;\n }\n\n /**\n * Count number of columns.\n *\n * @returns {Number}\n */\n countColumns() {\n let result = 0;\n\n if (Array.isArray(this.data)) {\n if (this.dataType === 'array') {\n result = this.data[0].length;\n\n } else if (this.dataType === 'object') {\n result = Object.keys(this.data[0]).length;\n }\n }\n\n return result;\n }\n\n /**\n * Destroy instance.\n */\n destroy() {\n this.data = null;\n this.hot = null;\n }\n}\n\nexport default DataSource;\n\n\n\n// WEBPACK FOOTER //\n// src/dataSource.js","import {CellCoords} from './3rdparty/walkontable/src';\nimport {KEY_CODES, isMetaKey, isCtrlKey} from './helpers/unicode';\nimport {stopPropagation, stopImmediatePropagation, isImmediatePropagationStopped} from './helpers/dom/event';\nimport {getEditor} from './editors';\nimport EventManager from './eventManager';\nimport {EditorState} from './editors/_baseEditor';\n\nfunction EditorManager(instance, priv, selection) {\n var _this = this,\n destroyed = false,\n eventManager,\n activeEditor;\n\n eventManager = new EventManager(instance);\n\n function moveSelectionAfterEnter(shiftKey) {\n selection.setSelectedHeaders(false, false, false);\n var enterMoves = typeof priv.settings.enterMoves === 'function' ? priv.settings.enterMoves(event) : priv.settings.enterMoves;\n\n if (shiftKey) {\n // move selection up\n selection.transformStart(-enterMoves.row, -enterMoves.col);\n\n } else {\n // move selection down (add a new row if needed)\n selection.transformStart(enterMoves.row, enterMoves.col, true);\n }\n }\n\n function moveSelectionUp(shiftKey) {\n if (shiftKey) {\n if (selection.selectedHeader.cols) {\n selection.setSelectedHeaders(selection.selectedHeader.rows, false, false);\n }\n selection.transformEnd(-1, 0);\n\n } else {\n selection.setSelectedHeaders(false, false, false);\n selection.transformStart(-1, 0);\n }\n }\n\n function moveSelectionDown(shiftKey) {\n if (shiftKey) {\n // expanding selection down with shift\n selection.transformEnd(1, 0);\n } else {\n selection.setSelectedHeaders(false, false, false);\n selection.transformStart(1, 0);\n }\n }\n\n function moveSelectionRight(shiftKey) {\n if (shiftKey) {\n selection.transformEnd(0, 1);\n } else {\n selection.setSelectedHeaders(false, false, false);\n selection.transformStart(0, 1);\n }\n }\n\n function moveSelectionLeft(shiftKey) {\n if (shiftKey) {\n if (selection.selectedHeader.rows) {\n selection.setSelectedHeaders(false, selection.selectedHeader.cols, false);\n }\n selection.transformEnd(0, -1);\n\n } else {\n selection.setSelectedHeaders(false, false, false);\n selection.transformStart(0, -1);\n }\n }\n\n function onKeyDown(event) {\n var ctrlDown,\n rangeModifier;\n\n if (!instance.isListening()) {\n return;\n }\n instance.runHooks('beforeKeyDown', event);\n\n if (destroyed) {\n return;\n }\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n priv.lastKeyCode = event.keyCode;\n\n if (!selection.isSelected()) {\n return;\n }\n // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)\n ctrlDown = (event.ctrlKey || event.metaKey) && !event.altKey;\n\n if (activeEditor && !activeEditor.isWaiting()) {\n if (!isMetaKey(event.keyCode) && !isCtrlKey(event.keyCode) && !ctrlDown && !_this.isEditorOpened()) {\n _this.openEditor('', event);\n\n return;\n }\n }\n rangeModifier = event.shiftKey ? selection.setRangeEnd : selection.setRangeStart;\n\n switch (event.keyCode) {\n case KEY_CODES.A:\n if (!_this.isEditorOpened() && ctrlDown) {\n selection.selectAll();\n\n event.preventDefault();\n stopPropagation(event);\n }\n break;\n\n case KEY_CODES.ARROW_UP:\n if (_this.isEditorOpened() && !activeEditor.isWaiting()) {\n _this.closeEditorAndSaveChanges(ctrlDown);\n }\n moveSelectionUp(event.shiftKey);\n\n event.preventDefault();\n stopPropagation(event);\n break;\n\n case KEY_CODES.ARROW_DOWN:\n if (_this.isEditorOpened() && !activeEditor.isWaiting()) {\n _this.closeEditorAndSaveChanges(ctrlDown);\n }\n\n moveSelectionDown(event.shiftKey);\n\n event.preventDefault();\n stopPropagation(event);\n break;\n\n case KEY_CODES.ARROW_RIGHT:\n if (_this.isEditorOpened() && !activeEditor.isWaiting()) {\n _this.closeEditorAndSaveChanges(ctrlDown);\n }\n\n moveSelectionRight(event.shiftKey);\n\n event.preventDefault();\n stopPropagation(event);\n break;\n\n case KEY_CODES.ARROW_LEFT:\n if (_this.isEditorOpened() && !activeEditor.isWaiting()) {\n _this.closeEditorAndSaveChanges(ctrlDown);\n }\n\n moveSelectionLeft(event.shiftKey);\n\n event.preventDefault();\n stopPropagation(event);\n break;\n\n case KEY_CODES.TAB:\n selection.setSelectedHeaders(false, false, false);\n var tabMoves = typeof priv.settings.tabMoves === 'function' ? priv.settings.tabMoves(event) : priv.settings.tabMoves;\n\n if (event.shiftKey) {\n // move selection left\n selection.transformStart(-tabMoves.row, -tabMoves.col);\n } else {\n // move selection right (add a new column if needed)\n selection.transformStart(tabMoves.row, tabMoves.col, true);\n }\n event.preventDefault();\n stopPropagation(event);\n break;\n\n case KEY_CODES.BACKSPACE:\n case KEY_CODES.DELETE:\n selection.empty(event);\n _this.prepareEditor();\n event.preventDefault();\n break;\n\n case KEY_CODES.F2:\n /* F2 */\n _this.openEditor(null, event);\n\n if (activeEditor) {\n activeEditor.enableFullEditMode();\n }\n event.preventDefault(); // prevent Opera from opening 'Go to Page dialog'\n break;\n\n case KEY_CODES.ENTER:\n /* return/enter */\n if (_this.isEditorOpened()) {\n\n if (activeEditor && activeEditor.state !== EditorState.WAITING) {\n _this.closeEditorAndSaveChanges(ctrlDown);\n }\n moveSelectionAfterEnter(event.shiftKey);\n\n } else if (instance.getSettings().enterBeginsEditing) {\n _this.openEditor(null, event);\n\n if (activeEditor) {\n activeEditor.enableFullEditMode();\n }\n } else {\n moveSelectionAfterEnter(event.shiftKey);\n }\n event.preventDefault(); // don't add newline to field\n stopImmediatePropagation(event); // required by HandsontableEditor\n break;\n\n case KEY_CODES.ESCAPE:\n if (_this.isEditorOpened()) {\n _this.closeEditorAndRestoreOriginalValue(ctrlDown);\n }\n event.preventDefault();\n break;\n\n case KEY_CODES.HOME:\n selection.setSelectedHeaders(false, false, false);\n if (event.ctrlKey || event.metaKey) {\n rangeModifier(new CellCoords(0, priv.selRange.from.col));\n } else {\n rangeModifier(new CellCoords(priv.selRange.from.row, 0));\n }\n event.preventDefault(); // don't scroll the window\n stopPropagation(event);\n break;\n\n case KEY_CODES.END:\n selection.setSelectedHeaders(false, false, false);\n if (event.ctrlKey || event.metaKey) {\n rangeModifier(new CellCoords(instance.countRows() - 1, priv.selRange.from.col));\n } else {\n rangeModifier(new CellCoords(priv.selRange.from.row, instance.countCols() - 1));\n }\n event.preventDefault(); // don't scroll the window\n stopPropagation(event);\n break;\n\n case KEY_CODES.PAGE_UP:\n selection.setSelectedHeaders(false, false, false);\n selection.transformStart(-instance.countVisibleRows(), 0);\n event.preventDefault(); // don't page up the window\n stopPropagation(event);\n break;\n\n case KEY_CODES.PAGE_DOWN:\n selection.setSelectedHeaders(false, false, false);\n selection.transformStart(instance.countVisibleRows(), 0);\n event.preventDefault(); // don't page down the window\n stopPropagation(event);\n break;\n default:\n break;\n }\n }\n\n function init() {\n instance.addHook('afterDocumentKeyDown', onKeyDown);\n\n eventManager.addEventListener(document.documentElement, 'keydown', (event) => {\n if (!destroyed) {\n instance.runHooks('afterDocumentKeyDown', event);\n }\n });\n\n function onDblClick(event, coords, elem) {\n // may be TD or TH\n if (elem.nodeName == 'TD') {\n _this.openEditor();\n\n if (activeEditor) {\n activeEditor.enableFullEditMode();\n }\n }\n }\n instance.view.wt.update('onCellDblClick', onDblClick);\n\n instance.addHook('afterDestroy', () => {\n destroyed = true;\n });\n }\n\n /**\n * Destroy current editor, if exists.\n *\n * @function destroyEditor\n * @memberof! Handsontable.EditorManager#\n * @param {Boolean} revertOriginal\n */\n this.destroyEditor = function(revertOriginal) {\n this.closeEditor(revertOriginal);\n };\n\n /**\n * Get active editor.\n *\n * @function getActiveEditor\n * @memberof! Handsontable.EditorManager#\n * @returns {*}\n */\n this.getActiveEditor = function() {\n return activeEditor;\n };\n\n /**\n * Prepare text input to be displayed at given grid cell.\n *\n * @function prepareEditor\n * @memberof! Handsontable.EditorManager#\n */\n this.prepareEditor = function() {\n var row,\n col,\n prop,\n td,\n originalValue,\n cellProperties,\n editorClass;\n\n if (activeEditor && activeEditor.isWaiting()) {\n this.closeEditor(false, false, (dataSaved) => {\n if (dataSaved) {\n _this.prepareEditor();\n }\n });\n\n return;\n }\n row = priv.selRange.highlight.row;\n col = priv.selRange.highlight.col;\n prop = instance.colToProp(col);\n td = instance.getCell(row, col);\n\n originalValue = instance.getSourceDataAtCell(instance.runHooks('modifyRow', row), col);\n cellProperties = instance.getCellMeta(row, col);\n editorClass = instance.getCellEditor(cellProperties);\n\n if (editorClass) {\n activeEditor = getEditor(editorClass, instance);\n activeEditor.prepare(row, col, prop, td, originalValue, cellProperties);\n\n } else {\n activeEditor = void 0;\n }\n };\n\n /**\n * Check is editor is opened/showed.\n *\n * @function isEditorOpened\n * @memberof! Handsontable.EditorManager#\n * @returns {Boolean}\n */\n this.isEditorOpened = function() {\n return activeEditor && activeEditor.isOpened();\n };\n\n /**\n * Open editor with initial value.\n *\n * @function openEditor\n * @memberof! Handsontable.EditorManager#\n * @param {String} initialValue\n * @param {DOMEvent} event\n */\n this.openEditor = function(initialValue, event) {\n if (activeEditor && !activeEditor.cellProperties.readOnly) {\n activeEditor.beginEditing(initialValue, event);\n } else if (activeEditor && activeEditor.cellProperties.readOnly) {\n\n // move the selection after opening the editor with ENTER key\n if (event && event.keyCode === KEY_CODES.ENTER) {\n moveSelectionAfterEnter();\n }\n }\n };\n\n /**\n * Close editor, finish editing cell.\n *\n * @function closeEditor\n * @memberof! Handsontable.EditorManager#\n * @param {Boolean} restoreOriginalValue\n * @param {Boolean} [ctrlDown]\n * @param {Function} [callback]\n */\n this.closeEditor = function(restoreOriginalValue, ctrlDown, callback) {\n if (activeEditor) {\n activeEditor.finishEditing(restoreOriginalValue, ctrlDown, callback);\n\n } else if (callback) {\n callback(false);\n }\n };\n\n /**\n * Close editor and save changes.\n *\n * @function closeEditorAndSaveChanges\n * @memberof! Handsontable.EditorManager#\n * @param {Boolean} ctrlDown\n */\n this.closeEditorAndSaveChanges = function(ctrlDown) {\n return this.closeEditor(false, ctrlDown);\n };\n\n /**\n * Close editor and restore original value.\n *\n * @function closeEditorAndRestoreOriginalValue\n * @memberof! Handsontable.EditorManager#\n * @param {Boolean} ctrlDown\n */\n this.closeEditorAndRestoreOriginalValue = function(ctrlDown) {\n return this.closeEditor(true, ctrlDown);\n };\n\n init();\n}\n\nexport default EditorManager;\n\n\n\n// WEBPACK FOOTER //\n// src/editorManager.js","import {registerEditor} from './../editors';\nimport BaseEditor from './_baseEditor';\nimport {hasClass} from './../helpers/dom/element';\n\n/**\n * @private\n * @editor CheckboxEditor\n * @class CheckboxEditor\n */\nclass CheckboxEditor extends BaseEditor {\n beginEditing(initialValue, event) {\n // editorManager return double click event as undefined\n if (event === void 0) {\n let checkbox = this.TD.querySelector('input[type=\"checkbox\"]');\n\n if (!hasClass(checkbox, 'htBadValue')) {\n checkbox.click();\n }\n }\n }\n\n finishEditing() {}\n init() {}\n open() {}\n close() {}\n getValue() {}\n setValue() {}\n focus() {}\n}\n\nregisterEditor('checkbox', CheckboxEditor);\n\nexport default CheckboxEditor;\n\n\n\n// WEBPACK FOOTER //\n// src/editors/checkboxEditor.js","import moment from 'moment';\nimport Pikaday from 'pikaday';\nimport 'pikaday/css/pikaday.css';\nimport {addClass, outerHeight} from './../helpers/dom/element';\nimport {deepExtend} from './../helpers/object';\nimport EventManager from './../eventManager';\nimport {getEditor, registerEditor} from './../editors';\nimport {isMetaKey} from './../helpers/unicode';\nimport {stopPropagation} from './../helpers/dom/event';\nimport TextEditor from './textEditor';\n\n/**\n * @private\n * @editor DateEditor\n * @class DateEditor\n * @dependencies TextEditor moment pikaday\n */\nclass DateEditor extends TextEditor {\n /**\n * @param {Core} hotInstance Handsontable instance\n * @private\n */\n constructor(hotInstance) {\n super(hotInstance);\n\n this.defaultDateFormat = 'DD/MM/YYYY';\n this.isCellEdited = false;\n this.parentDestroyed = false;\n }\n\n init() {\n if (typeof moment !== 'function') {\n throw new Error('You need to include moment.js to your project.');\n }\n\n if (typeof Pikaday !== 'function') {\n throw new Error('You need to include Pikaday to your project.');\n }\n super.init();\n this.instance.addHook('afterDestroy', () => {\n this.parentDestroyed = true;\n this.destroyElements();\n });\n }\n\n /**\n * Create data picker instance\n */\n createElements() {\n super.createElements();\n\n this.datePicker = document.createElement('DIV');\n this.datePickerStyle = this.datePicker.style;\n this.datePickerStyle.position = 'absolute';\n this.datePickerStyle.top = 0;\n this.datePickerStyle.left = 0;\n this.datePickerStyle.zIndex = 9999;\n\n addClass(this.datePicker, 'htDatepickerHolder');\n document.body.appendChild(this.datePicker);\n\n this.$datePicker = new Pikaday(this.getDatePickerConfig());\n const eventManager = new EventManager(this);\n\n /**\n * Prevent recognizing clicking on datepicker as clicking outside of table\n */\n eventManager.addEventListener(this.datePicker, 'mousedown', (event) => stopPropagation(event));\n this.hideDatepicker();\n }\n\n /**\n * Destroy data picker instance\n */\n destroyElements() {\n this.$datePicker.destroy();\n }\n\n /**\n * Prepare editor to appear\n *\n * @param {Number} row Row index\n * @param {Number} col Column index\n * @param {String} prop Property name (passed when datasource is an array of objects)\n * @param {HTMLTableCellElement} td Table cell element\n * @param {*} originalValue Original value\n * @param {Object} cellProperties Object with cell properties ({@see Core#getCellMeta})\n */\n prepare(row, col, prop, td, originalValue, cellProperties) {\n this._opened = false;\n super.prepare(row, col, prop, td, originalValue, cellProperties);\n }\n\n /**\n * Open editor\n *\n * @param {Event} [event=null]\n */\n open(event = null) {\n super.open();\n this.showDatepicker(event);\n }\n\n /**\n * Close editor\n */\n close() {\n this._opened = false;\n this.instance._registerTimeout(setTimeout(() => {\n this.instance.selection.refreshBorders();\n }, 0));\n\n super.close();\n }\n\n /**\n * @param {Boolean} [isCancelled=false]\n * @param {Boolean} [ctrlDown=false]\n */\n finishEditing(isCancelled = false, ctrlDown = false) {\n if (isCancelled) { // pressed ESC, restore original value\n // var value = this.instance.getDataAtCell(this.row, this.col);\n let value = this.originalValue;\n\n if (value !== void 0) {\n this.setValue(value);\n }\n }\n this.hideDatepicker();\n super.finishEditing(isCancelled, ctrlDown);\n }\n\n /**\n * Show data picker\n *\n * @param {Event} event\n */\n showDatepicker(event) {\n this.$datePicker.config(this.getDatePickerConfig());\n\n let offset = this.TD.getBoundingClientRect();\n let dateFormat = this.cellProperties.dateFormat || this.defaultDateFormat;\n let datePickerConfig = this.$datePicker.config();\n let dateStr;\n let isMouseDown = this.instance.view.isMouseDown();\n let isMeta = event ? isMetaKey(event.keyCode) : false;\n\n this.datePickerStyle.top = `${window.pageYOffset + offset.top + outerHeight(this.TD)}px`;\n this.datePickerStyle.left = `${window.pageXOffset + offset.left}px`;\n\n this.$datePicker._onInputFocus = function() {};\n datePickerConfig.format = dateFormat;\n\n if (this.originalValue) {\n dateStr = this.originalValue;\n\n if (moment(dateStr, dateFormat, true).isValid()) {\n this.$datePicker.setMoment(moment(dateStr, dateFormat), true);\n }\n\n // workaround for date/time cells - pikaday resets the cell value to 12:00 AM by default, this will overwrite the value.\n if (this.getValue() !== this.originalValue) {\n this.setValue(this.originalValue);\n }\n\n if (!isMeta && !isMouseDown) {\n this.setValue('');\n }\n\n } else if (this.cellProperties.defaultDate) {\n dateStr = this.cellProperties.defaultDate;\n\n datePickerConfig.defaultDate = dateStr;\n\n if (moment(dateStr, dateFormat, true).isValid()) {\n this.$datePicker.setMoment(moment(dateStr, dateFormat), true);\n }\n\n if (!isMeta && !isMouseDown) {\n this.setValue('');\n }\n } else {\n // if a default date is not defined, set a soft-default-date: display the current day and month in the\n // datepicker, but don't fill the editor input\n this.$datePicker.gotoToday();\n }\n\n this.datePickerStyle.display = 'block';\n this.$datePicker.show();\n }\n\n /**\n * Hide data picker\n */\n hideDatepicker() {\n this.datePickerStyle.display = 'none';\n this.$datePicker.hide();\n }\n\n /**\n * Get date picker options.\n *\n * @returns {Object}\n */\n getDatePickerConfig() {\n let htInput = this.TEXTAREA;\n let options = {};\n\n if (this.cellProperties && this.cellProperties.datePickerConfig) {\n deepExtend(options, this.cellProperties.datePickerConfig);\n }\n const origOnSelect = options.onSelect;\n const origOnClose = options.onClose;\n\n options.field = htInput;\n options.trigger = htInput;\n options.container = this.datePicker;\n options.bound = false;\n options.format = options.format || this.defaultDateFormat;\n options.reposition = options.reposition || false;\n options.onSelect = (dateStr) => {\n if (!isNaN(dateStr.getTime())) {\n dateStr = moment(dateStr).format(this.cellProperties.dateFormat || this.defaultDateFormat);\n }\n this.setValue(dateStr);\n this.hideDatepicker();\n\n if (origOnSelect) {\n origOnSelect();\n }\n };\n options.onClose = () => {\n if (!this.parentDestroyed) {\n this.finishEditing(false);\n }\n if (origOnClose) {\n origOnClose();\n }\n };\n\n return options;\n }\n}\n\nregisterEditor('date', DateEditor);\n\nexport default DateEditor;\n\n\n\n// WEBPACK FOOTER //\n// src/editors/dateEditor.js","import {registerEditor, getEditorConstructor} from './../editors';\nimport AutocompleteEditor from './autocompleteEditor';\nimport Hooks from './../pluginHooks';\n\n/**\n * @private\n * @editor DropdownEditor\n * @class DropdownEditor\n * @dependencies AutocompleteEditor\n */\nclass DropdownEditor extends AutocompleteEditor {\n prepare(row, col, prop, td, originalValue, cellProperties) {\n super.prepare(row, col, prop, td, originalValue, cellProperties);\n this.cellProperties.filter = false;\n this.cellProperties.strict = true;\n }\n}\n\nHooks.getSingleton().add('beforeValidate', function(value, row, col, source) {\n let cellMeta = this.getCellMeta(row, this.propToCol(col));\n\n if (cellMeta.editor === getEditorConstructor('dropdown')) {\n if (cellMeta.strict === void 0) {\n cellMeta.filter = false;\n cellMeta.strict = true;\n }\n }\n});\n\nregisterEditor('dropdown', DropdownEditor);\n\nexport default DropdownEditor;\n\n\n\n// WEBPACK FOOTER //\n// src/editors/dropdownEditor.js","import {KEY_CODES} from './../helpers/unicode';\nimport {stopImmediatePropagation, isImmediatePropagationStopped} from './../helpers/dom/event';\nimport {\n addClass,\n getScrollLeft,\n getScrollTop,\n hasClass,\n isChildOf,\n offset,\n outerHeight,\n outerWidth,\n removeClass,\n setCaretPosition,\n} from './../helpers/dom/element';\nimport {getEditor, registerEditor} from './../editors';\nimport BaseEditor from './_baseEditor';\nimport EventManager from './../eventManager';\n\nconst MobileTextEditor = BaseEditor.prototype.extend();\nconst domDimensionsCache = {};\n\n/**\n * @private\n * @editor MobileTextEditor\n * @class MobileTextEditor\n */\nvar createControls = function() {\n this.controls = {};\n\n this.controls.leftButton = document.createElement('DIV');\n this.controls.leftButton.className = 'leftButton';\n this.controls.rightButton = document.createElement('DIV');\n this.controls.rightButton.className = 'rightButton';\n this.controls.upButton = document.createElement('DIV');\n this.controls.upButton.className = 'upButton';\n this.controls.downButton = document.createElement('DIV');\n this.controls.downButton.className = 'downButton';\n\n for (var button in this.controls) {\n if (Object.prototype.hasOwnProperty.call(this.controls, button)) {\n this.positionControls.appendChild(this.controls[button]);\n }\n }\n};\n\nMobileTextEditor.prototype.valueChanged = function() {\n return this.initValue != this.getValue();\n};\n\nMobileTextEditor.prototype.init = function() {\n var that = this;\n this.eventManager = new EventManager(this.instance);\n\n this.createElements();\n this.bindEvents();\n\n this.instance.addHook('afterDestroy', () => {\n that.destroy();\n });\n\n};\n\nMobileTextEditor.prototype.getValue = function() {\n return this.TEXTAREA.value;\n};\n\nMobileTextEditor.prototype.setValue = function(newValue) {\n this.initValue = newValue;\n\n this.TEXTAREA.value = newValue;\n};\n\nMobileTextEditor.prototype.createElements = function() {\n this.editorContainer = document.createElement('DIV');\n this.editorContainer.className = 'htMobileEditorContainer';\n\n this.cellPointer = document.createElement('DIV');\n this.cellPointer.className = 'cellPointer';\n\n this.moveHandle = document.createElement('DIV');\n this.moveHandle.className = 'moveHandle';\n\n this.inputPane = document.createElement('DIV');\n this.inputPane.className = 'inputs';\n\n this.positionControls = document.createElement('DIV');\n this.positionControls.className = 'positionControls';\n\n this.TEXTAREA = document.createElement('TEXTAREA');\n addClass(this.TEXTAREA, 'handsontableInput');\n\n this.inputPane.appendChild(this.TEXTAREA);\n\n this.editorContainer.appendChild(this.cellPointer);\n this.editorContainer.appendChild(this.moveHandle);\n this.editorContainer.appendChild(this.inputPane);\n this.editorContainer.appendChild(this.positionControls);\n\n createControls.call(this);\n\n document.body.appendChild(this.editorContainer);\n};\n\nMobileTextEditor.prototype.onBeforeKeyDown = function(event) {\n var instance = this;\n var that = instance.getActiveEditor();\n\n if (event.target !== that.TEXTAREA || isImmediatePropagationStopped(event)) {\n return;\n }\n\n switch (event.keyCode) {\n case KEY_CODES.ENTER:\n that.close();\n event.preventDefault(); // don't add newline to field\n break;\n case KEY_CODES.BACKSPACE:\n stopImmediatePropagation(event); // backspace, delete, home, end should only work locally when cell is edited (not in table context)\n break;\n default:\n break;\n }\n};\n\nMobileTextEditor.prototype.open = function() {\n this.instance.addHook('beforeKeyDown', this.onBeforeKeyDown);\n\n addClass(this.editorContainer, 'active');\n removeClass(this.cellPointer, 'hidden');\n\n this.updateEditorPosition();\n};\n\nMobileTextEditor.prototype.focus = function() {\n this.TEXTAREA.focus();\n setCaretPosition(this.TEXTAREA, this.TEXTAREA.value.length);\n};\n\nMobileTextEditor.prototype.close = function() {\n this.TEXTAREA.blur();\n this.instance.removeHook('beforeKeyDown', this.onBeforeKeyDown);\n\n removeClass(this.editorContainer, 'active');\n};\n\nMobileTextEditor.prototype.scrollToView = function() {\n var coords = this.instance.getSelectedRange().highlight;\n this.instance.view.scrollViewport(coords);\n};\n\nMobileTextEditor.prototype.hideCellPointer = function() {\n if (!hasClass(this.cellPointer, 'hidden')) {\n addClass(this.cellPointer, 'hidden');\n }\n};\n\nMobileTextEditor.prototype.updateEditorPosition = function(x, y) {\n if (x && y) {\n x = parseInt(x, 10);\n y = parseInt(y, 10);\n\n this.editorContainer.style.top = `${y}px`;\n this.editorContainer.style.left = `${x}px`;\n\n } else {\n var selection = this.instance.getSelected(),\n selectedCell = this.instance.getCell(selection[0], selection[1]);\n\n // cache sizes\n if (!domDimensionsCache.cellPointer) {\n domDimensionsCache.cellPointer = {\n height: outerHeight(this.cellPointer),\n width: outerWidth(this.cellPointer)\n };\n }\n if (!domDimensionsCache.editorContainer) {\n domDimensionsCache.editorContainer = {\n width: outerWidth(this.editorContainer)\n };\n }\n\n if (selectedCell !== undefined) {\n var scrollLeft = this.instance.view.wt.wtOverlays.leftOverlay\n .trimmingContainer == window ? 0 : getScrollLeft(this.instance.view.wt.wtOverlays.leftOverlay.holder);\n var scrollTop = this.instance.view.wt.wtOverlays.topOverlay\n .trimmingContainer == window ? 0 : getScrollTop(this.instance.view.wt.wtOverlays.topOverlay.holder);\n\n var selectedCellOffset = offset(selectedCell),\n selectedCellWidth = outerWidth(selectedCell),\n currentScrollPosition = {\n x: scrollLeft,\n y: scrollTop\n };\n\n this.editorContainer.style.top = `${parseInt(selectedCellOffset.top + outerHeight(selectedCell) -\n currentScrollPosition.y + domDimensionsCache.cellPointer.height, 10)}px`;\n this.editorContainer.style.left = `${parseInt((window.innerWidth / 2) - (domDimensionsCache.editorContainer.width / 2), 10)}px`;\n\n if (selectedCellOffset.left + (selectedCellWidth / 2) > parseInt(this.editorContainer.style.left, 10) +\n domDimensionsCache.editorContainer.width) {\n this.editorContainer.style.left = `${window.innerWidth - domDimensionsCache.editorContainer.width}px`;\n\n } else if (selectedCellOffset.left + (selectedCellWidth / 2) < parseInt(this.editorContainer.style.left, 10) + 20) {\n this.editorContainer.style.left = `${0}px`;\n }\n\n this.cellPointer.style.left = `${parseInt(selectedCellOffset.left - (domDimensionsCache.cellPointer.width / 2) -\n offset(this.editorContainer).left + (selectedCellWidth / 2) - currentScrollPosition.x, 10)}px`;\n }\n }\n};\n\nMobileTextEditor.prototype.updateEditorData = function() {\n var selected = this.instance.getSelected(),\n selectedValue = this.instance.getDataAtCell(selected[0], selected[1]);\n\n this.row = selected[0];\n this.col = selected[1];\n this.setValue(selectedValue);\n this.updateEditorPosition();\n};\n\nMobileTextEditor.prototype.prepareAndSave = function() {\n var val;\n\n if (!this.valueChanged()) {\n return;\n }\n\n if (this.instance.getSettings().trimWhitespace) {\n val = [\n [String.prototype.trim.call(this.getValue())]\n ];\n } else {\n val = [\n [this.getValue()]\n ];\n }\n\n this.saveValue(val);\n};\n\nMobileTextEditor.prototype.bindEvents = function() {\n var that = this;\n\n this.eventManager.addEventListener(this.controls.leftButton, 'touchend', (event) => {\n that.prepareAndSave();\n that.instance.selection.transformStart(0, -1, null, true);\n that.updateEditorData();\n event.preventDefault();\n });\n this.eventManager.addEventListener(this.controls.rightButton, 'touchend', (event) => {\n that.prepareAndSave();\n that.instance.selection.transformStart(0, 1, null, true);\n that.updateEditorData();\n event.preventDefault();\n });\n this.eventManager.addEventListener(this.controls.upButton, 'touchend', (event) => {\n that.prepareAndSave();\n that.instance.selection.transformStart(-1, 0, null, true);\n that.updateEditorData();\n event.preventDefault();\n });\n this.eventManager.addEventListener(this.controls.downButton, 'touchend', (event) => {\n that.prepareAndSave();\n that.instance.selection.transformStart(1, 0, null, true);\n that.updateEditorData();\n event.preventDefault();\n });\n\n this.eventManager.addEventListener(this.moveHandle, 'touchstart', function(event) {\n if (event.touches.length == 1) {\n var touch = event.touches[0];\n var onTouchPosition = {\n x: that.editorContainer.offsetLeft,\n y: that.editorContainer.offsetTop\n };\n var onTouchOffset = {\n x: touch.pageX - onTouchPosition.x,\n y: touch.pageY - onTouchPosition.y\n };\n\n that.eventManager.addEventListener(this, 'touchmove', (event) => {\n var touch = event.touches[0];\n that.updateEditorPosition(touch.pageX - onTouchOffset.x, touch.pageY - onTouchOffset.y);\n that.hideCellPointer();\n event.preventDefault();\n });\n\n }\n });\n\n this.eventManager.addEventListener(document.body, 'touchend', (event) => {\n if (!isChildOf(event.target, that.editorContainer) && !isChildOf(event.target, that.instance.rootElement)) {\n that.close();\n }\n });\n\n this.eventManager.addEventListener(this.instance.view.wt.wtOverlays.leftOverlay.holder, 'scroll', (event) => {\n if (that.instance.view.wt.wtOverlays.leftOverlay.trimmingContainer != window) {\n that.hideCellPointer();\n }\n });\n\n this.eventManager.addEventListener(this.instance.view.wt.wtOverlays.topOverlay.holder, 'scroll', (event) => {\n if (that.instance.view.wt.wtOverlays.topOverlay.trimmingContainer != window) {\n that.hideCellPointer();\n }\n });\n\n};\n\nMobileTextEditor.prototype.destroy = function() {\n this.eventManager.clear();\n\n this.editorContainer.parentNode.removeChild(this.editorContainer);\n};\n\nregisterEditor('mobile', MobileTextEditor);\n\nexport default MobileTextEditor;\n\n\n\n// WEBPACK FOOTER //\n// src/editors/mobileTextEditor.js","import numbro from 'numbro';\nimport {registerEditor} from './../editors';\nimport TextEditor from './textEditor';\n\n/**\n * @private\n * @editor NumericEditor\n * @class NumericEditor\n * @dependencies TextEditor numbro\n */\nclass NumericEditor extends TextEditor {\n /**\n * @param {*} initialValue\n */\n beginEditing(initialValue) {\n if (typeof initialValue === 'undefined' && this.originalValue) {\n if (typeof this.cellProperties.language !== 'undefined') {\n numbro.culture(this.cellProperties.language);\n }\n let decimalDelimiter = numbro.cultureData().delimiters.decimal;\n initialValue = (`${this.originalValue}`).replace('.', decimalDelimiter);\n }\n super.beginEditing(initialValue);\n }\n}\n\nregisterEditor('numeric', NumericEditor);\n\nexport default NumericEditor;\n\n\n\n// WEBPACK FOOTER //\n// src/editors/numericEditor.js","import {empty} from './../helpers/dom/element';\nimport {getEditor, registerEditor} from './../editors';\nimport TextEditor from './textEditor';\n\n/**\n * @private\n * @editor PasswordEditor\n * @class PasswordEditor\n * @dependencies TextEditor\n */\nclass PasswordEditor extends TextEditor {\n createElements() {\n super.createElements();\n\n this.TEXTAREA = document.createElement('input');\n this.TEXTAREA.setAttribute('type', 'password');\n this.TEXTAREA.className = 'handsontableInput';\n this.textareaStyle = this.TEXTAREA.style;\n this.textareaStyle.width = 0;\n this.textareaStyle.height = 0;\n\n empty(this.TEXTAREA_PARENT);\n this.TEXTAREA_PARENT.appendChild(this.TEXTAREA);\n }\n}\n\nregisterEditor('password', PasswordEditor);\n\nexport default PasswordEditor;\n\n\n\n// WEBPACK FOOTER //\n// src/editors/passwordEditor.js","import {\n addClass,\n empty,\n fastInnerHTML,\n getComputedStyle,\n getCssTransform,\n getScrollableElement,\n offset,\n outerHeight,\n outerWidth,\n resetCssTransform,\n} from './../helpers/dom/element';\nimport {stopImmediatePropagation} from './../helpers/dom/event';\nimport {KEY_CODES} from './../helpers/unicode';\nimport {getEditor, registerEditor} from './../editors';\nimport BaseEditor, {EditorState} from './_baseEditor';\n\nconst SelectEditor = BaseEditor.prototype.extend();\n\n/**\n * @private\n * @editor SelectEditor\n * @class SelectEditor\n */\nSelectEditor.prototype.init = function() {\n this.select = document.createElement('SELECT');\n addClass(this.select, 'htSelectEditor');\n this.select.style.display = 'none';\n this.instance.rootElement.appendChild(this.select);\n this.registerHooks();\n};\n\nSelectEditor.prototype.registerHooks = function() {\n this.instance.addHook('afterScrollHorizontally', () => this.refreshDimensions());\n this.instance.addHook('afterScrollVertically', () => this.refreshDimensions());\n this.instance.addHook('afterColumnResize', () => this.refreshDimensions());\n this.instance.addHook('afterRowResize', () => this.refreshDimensions());\n};\n\nSelectEditor.prototype.prepare = function() {\n BaseEditor.prototype.prepare.apply(this, arguments);\n\n var selectOptions = this.cellProperties.selectOptions;\n var options;\n\n if (typeof selectOptions == 'function') {\n options = this.prepareOptions(selectOptions(this.row, this.col, this.prop));\n } else {\n options = this.prepareOptions(selectOptions);\n }\n\n empty(this.select);\n\n for (var option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option)) {\n var optionElement = document.createElement('OPTION');\n optionElement.value = option;\n fastInnerHTML(optionElement, options[option]);\n this.select.appendChild(optionElement);\n }\n }\n};\n\nSelectEditor.prototype.prepareOptions = function(optionsToPrepare) {\n var preparedOptions = {};\n\n if (Array.isArray(optionsToPrepare)) {\n for (var i = 0, len = optionsToPrepare.length; i < len; i++) {\n preparedOptions[optionsToPrepare[i]] = optionsToPrepare[i];\n }\n } else if (typeof optionsToPrepare == 'object') {\n preparedOptions = optionsToPrepare;\n }\n\n return preparedOptions;\n\n};\n\nSelectEditor.prototype.getValue = function() {\n return this.select.value;\n};\n\nSelectEditor.prototype.setValue = function(value) {\n this.select.value = value;\n};\n\nvar onBeforeKeyDown = function(event) {\n var instance = this;\n var editor = instance.getActiveEditor();\n\n switch (event.keyCode) {\n case KEY_CODES.ARROW_UP:\n var previousOptionIndex = editor.select.selectedIndex - 1;\n if (previousOptionIndex >= 0) {\n editor.select[previousOptionIndex].selected = true;\n }\n\n stopImmediatePropagation(event);\n event.preventDefault();\n break;\n\n case KEY_CODES.ARROW_DOWN:\n var nextOptionIndex = editor.select.selectedIndex + 1;\n if (nextOptionIndex <= editor.select.length - 1) {\n editor.select[nextOptionIndex].selected = true;\n }\n\n stopImmediatePropagation(event);\n event.preventDefault();\n break;\n default:\n break;\n }\n};\n\nSelectEditor.prototype.open = function() {\n this._opened = true;\n this.refreshDimensions();\n this.select.style.display = '';\n this.instance.addHook('beforeKeyDown', onBeforeKeyDown);\n};\n\nSelectEditor.prototype.close = function() {\n this._opened = false;\n this.select.style.display = 'none';\n this.instance.removeHook('beforeKeyDown', onBeforeKeyDown);\n};\n\nSelectEditor.prototype.focus = function() {\n this.select.focus();\n};\n\nSelectEditor.prototype.refreshValue = function() {\n let sourceData = this.instance.getSourceDataAtCell(this.row, this.prop);\n this.originalValue = sourceData;\n\n this.setValue(sourceData);\n this.refreshDimensions();\n};\n\nSelectEditor.prototype.refreshDimensions = function() {\n if (this.state !== EditorState.EDITING) {\n return;\n }\n this.TD = this.getEditedCell();\n\n // TD is outside of the viewport.\n if (!this.TD) {\n this.close();\n\n return;\n }\n var\n width = outerWidth(this.TD) + 1,\n height = outerHeight(this.TD) + 1,\n currentOffset = offset(this.TD),\n containerOffset = offset(this.instance.rootElement),\n scrollableContainer = getScrollableElement(this.TD),\n editTop = currentOffset.top - containerOffset.top - 1 - (scrollableContainer.scrollTop || 0),\n editLeft = currentOffset.left - containerOffset.left - 1 - (scrollableContainer.scrollLeft || 0),\n editorSection = this.checkEditorSection(),\n cssTransformOffset;\n\n const settings = this.instance.getSettings();\n let rowHeadersCount = settings.rowHeaders ? 1 : 0;\n let colHeadersCount = settings.colHeaders ? 1 : 0;\n\n switch (editorSection) {\n case 'top':\n cssTransformOffset = getCssTransform(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);\n break;\n case 'left':\n cssTransformOffset = getCssTransform(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);\n break;\n case 'top-left-corner':\n cssTransformOffset = getCssTransform(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);\n break;\n case 'bottom-left-corner':\n cssTransformOffset = getCssTransform(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);\n break;\n case 'bottom':\n cssTransformOffset = getCssTransform(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode);\n break;\n default:\n break;\n }\n if (this.instance.getSelected()[0] === 0) {\n editTop += 1;\n }\n\n if (this.instance.getSelected()[1] === 0) {\n editLeft += 1;\n }\n\n var selectStyle = this.select.style;\n\n if (cssTransformOffset && cssTransformOffset != -1) {\n selectStyle[cssTransformOffset[0]] = cssTransformOffset[1];\n } else {\n resetCssTransform(this.select);\n }\n const cellComputedStyle = getComputedStyle(this.TD);\n\n if (parseInt(cellComputedStyle.borderTopWidth, 10) > 0) {\n height -= 1;\n }\n if (parseInt(cellComputedStyle.borderLeftWidth, 10) > 0) {\n width -= 1;\n }\n\n selectStyle.height = `${height}px`;\n selectStyle.minWidth = `${width}px`;\n selectStyle.top = `${editTop}px`;\n selectStyle.left = `${editLeft}px`;\n selectStyle.margin = '0px';\n};\n\nSelectEditor.prototype.getEditedCell = function() {\n var editorSection = this.checkEditorSection(),\n editedCell;\n\n switch (editorSection) {\n case 'top':\n editedCell = this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({\n row: this.row,\n col: this.col\n });\n this.select.style.zIndex = 101;\n break;\n case 'corner':\n editedCell = this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({\n row: this.row,\n col: this.col\n });\n this.select.style.zIndex = 103;\n break;\n case 'left':\n editedCell = this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({\n row: this.row,\n col: this.col\n });\n this.select.style.zIndex = 102;\n break;\n default:\n editedCell = this.instance.getCell(this.row, this.col);\n this.select.style.zIndex = '';\n break;\n }\n\n return editedCell != -1 && editedCell != -2 ? editedCell : void 0;\n};\n\nregisterEditor('select', SelectEditor);\n\nexport default SelectEditor;\n\n\n\n// WEBPACK FOOTER //\n// src/editors/selectEditor.js","export default function jQueryWrapper(Handsontable) {\n const jQuery = typeof window === 'undefined' ? false : window.jQuery;\n\n if (!jQuery) {\n return;\n }\n\n jQuery.fn.handsontable = function(action) {\n const $this = this.first(); // Use only first element from list\n let instance = $this.data('handsontable');\n\n // Init case\n if (typeof action !== 'string') {\n const userSettings = action || {};\n\n if (instance) {\n instance.updateSettings(userSettings);\n\n } else {\n instance = new Handsontable.Core($this[0], userSettings);\n $this.data('handsontable', instance);\n instance.init();\n }\n\n return $this;\n }\n\n // Action case\n const args = [];\n let output;\n\n if (arguments.length > 1) {\n for (let i = 1, ilen = arguments.length; i < ilen; i++) {\n args.push(arguments[i]);\n }\n }\n\n if (instance) {\n if (typeof instance[action] !== 'undefined') {\n output = instance[action].apply(instance, args);\n\n if (action === 'destroy') {\n $this.removeData();\n }\n\n } else {\n throw new Error('Handsontable do not provide action: ' + action);\n }\n }\n\n return output;\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// src/helpers/wrappers/jquery.js","import 'babel-polyfill';\n\nimport './css/bootstrap.css';\nimport './css/handsontable.css';\nimport './css/mobile.handsontable.css';\n\nimport Core from './core';\nimport './renderers/_cellDecorator';\nimport jQueryWrapper from './helpers/wrappers/jquery';\nimport EventManager, {getListenersCounter} from './eventManager';\nimport Hooks from './pluginHooks';\nimport GhostTable from './utils/ghostTable';\nimport * as arrayHelpers from './helpers/array';\nimport * as browserHelpers from './helpers/browser';\nimport * as dataHelpers from './helpers/data';\nimport * as dateHelpers from './helpers/date';\nimport * as featureHelpers from './helpers/feature';\nimport * as functionHelpers from './helpers/function';\nimport * as mixedHelpers from './helpers/mixed';\nimport * as numberHelpers from './helpers/number';\nimport * as objectHelpers from './helpers/object';\nimport * as settingHelpers from './helpers/setting';\nimport * as stringHelpers from './helpers/string';\nimport * as unicodeHelpers from './helpers/unicode';\nimport * as domHelpers from './helpers/dom/element';\nimport * as domEventHelpers from './helpers/dom/event';\nimport {getRegisteredEditorNames, registerEditor, getEditor, getEditorConstructor} from './editors';\nimport {getRegisteredRendererNames, getRenderer, registerRenderer} from './renderers';\nimport * as plugins from './plugins/index';\nimport {registerPlugin} from './plugins';\nimport cellTypes from './cellTypes';\nimport DefaultSettings from './defaultSettings';\n\nfunction Handsontable(rootElement, userSettings) {\n const instance = new Core(rootElement, userSettings || {});\n\n instance.init();\n\n return instance;\n}\n\njQueryWrapper(Handsontable);\n\nHandsontable.Core = Core;\nHandsontable.DefaultSettings = DefaultSettings;\nHandsontable.EventManager = EventManager;\nHandsontable._getListenersCounter = getListenersCounter; // For MemoryLeak tests\n\nHandsontable.buildDate = __HOT_BUILD_DATE__;\nHandsontable.packageName = __HOT_PACKAGE_NAME__;\nHandsontable.version = __HOT_VERSION__;\n\nconst baseVersion = __HOT_BASE_VERSION__;\n\nif (baseVersion) {\n Handsontable.baseVersion = baseVersion;\n}\n\n// Export Hooks singleton\nHandsontable.hooks = Hooks.getSingleton();\n\n// TODO: Remove this exports after rewrite tests about this module\nHandsontable.__GhostTable = GhostTable;\n//\n\n// Export all helpers to the Handsontable object\nconst HELPERS = [\n arrayHelpers,\n browserHelpers,\n dataHelpers,\n dateHelpers,\n featureHelpers,\n functionHelpers,\n mixedHelpers,\n numberHelpers,\n objectHelpers,\n settingHelpers,\n stringHelpers,\n unicodeHelpers,\n];\nconst DOM = [\n domHelpers,\n domEventHelpers,\n];\n\nHandsontable.helper = {};\nHandsontable.dom = {};\n\n// Fill general helpers.\narrayHelpers.arrayEach(HELPERS, (helper) => {\n arrayHelpers.arrayEach(Object.getOwnPropertyNames(helper), (key) => {\n if (key.charAt(0) !== '_') {\n Handsontable.helper[key] = helper[key];\n }\n });\n});\n\n// Fill DOM helpers.\narrayHelpers.arrayEach(DOM, (helper) => {\n arrayHelpers.arrayEach(Object.getOwnPropertyNames(helper), (key) => {\n if (key.charAt(0) !== '_') {\n Handsontable.dom[key] = helper[key];\n }\n });\n});\n\n// Export cell types.\nHandsontable.cellTypes = {};\n\narrayHelpers.arrayEach(Object.getOwnPropertyNames(cellTypes), (key) => {\n Handsontable.cellTypes[key] = cellTypes[key];\n});\n\n// Export all registered editors from the Handsontable.\nHandsontable.editors = {};\n\narrayHelpers.arrayEach(getRegisteredEditorNames(), (editorName) => {\n Handsontable.editors[`${stringHelpers.toUpperCaseFirst(editorName)}Editor`] = getEditorConstructor(editorName);\n});\n\nHandsontable.editors.registerEditor = registerEditor;\nHandsontable.editors.getEditor = getEditor;\n\n// Export all registered renderers from the Handsontable.\nHandsontable.renderers = {};\n\narrayHelpers.arrayEach(getRegisteredRendererNames(), (rendererName) => {\n const renderer = getRenderer(rendererName);\n\n if (rendererName === 'base') {\n Handsontable.renderers.cellDecorator = renderer;\n }\n Handsontable.renderers[`${stringHelpers.toUpperCaseFirst(rendererName)}Renderer`] = renderer;\n});\n\nHandsontable.renderers.registerRenderer = registerRenderer;\nHandsontable.renderers.getRenderer = getRenderer;\n\n// Export all registered validators from the Handsontable.\nHandsontable.validators = {};\n\narrayHelpers.arrayEach(Object.getOwnPropertyNames(cellTypes), (key) => {\n if (cellTypes[key].validator) {\n Handsontable.validators[`${stringHelpers.toUpperCaseFirst(key)}Validator`] = cellTypes[key].validator;\n }\n});\n\n// Export all registered plugins from the Handsontable.\nHandsontable.plugins = {};\n\narrayHelpers.arrayEach(Object.getOwnPropertyNames(plugins), (pluginName) => {\n const plugin = plugins[pluginName];\n\n if (pluginName === 'Base') {\n Handsontable.plugins[`${pluginName}Plugin`] = plugin;\n } else {\n Handsontable.plugins[pluginName] = plugin;\n }\n});\n\nHandsontable.plugins.registerPlugin = registerPlugin;\n\n// Export Handsontable\nmodule.exports = Handsontable;\n\n\n\n// WEBPACK FOOTER //\n// src/index.js","import BasePlugin from './../_base';\nimport {arrayEach, arrayFilter, arrayReduce, arrayMap} from './../../helpers/array';\nimport {cancelAnimationFrame, requestAnimationFrame} from './../../helpers/feature';\nimport {isVisible} from './../../helpers/dom/element';\nimport GhostTable from './../../utils/ghostTable';\nimport {isObject, objectEach, hasOwnProperty} from './../../helpers/object';\nimport {valueAccordingPercent, rangeEach} from './../../helpers/number';\nimport {registerPlugin} from './../../plugins';\nimport SamplesGenerator from './../../utils/samplesGenerator';\nimport {isPercentValue} from './../../helpers/string';\nimport {ViewportColumnsCalculator} from './../../3rdparty/walkontable/src';\n\nconst privatePool = new WeakMap();\n\n/**\n * @plugin AutoColumnSize\n *\n * @description\n * This plugin allows to set column widths based on their widest cells.\n *\n * By default, the plugin is declared as `undefined`, which makes it enabled (same as if it was declared as `true`).\n * Enabling this plugin may decrease the overall table performance, as it needs to calculate the widths of all cells to\n * resize the columns accordingly.\n * If you experience problems with the performance, try turning this feature off and declaring the column widths manually.\n *\n * Column width calculations are divided into sync and async part. Each of this parts has their own advantages and\n * disadvantages. Synchronous calculations are faster but they block the browser UI, while the slower asynchronous operations don't\n * block the browser UI.\n *\n * To configure the sync/async distribution, you can pass an absolute value (number of columns) or a percentage value to a config object:\n * ```js\n * ...\n * // as a number (300 columns in sync, rest async)\n * autoColumnSize: {syncLimit: 300},\n * ...\n *\n * ...\n * // as a string (percent)\n * autoColumnSize: {syncLimit: '40%'},\n * ...\n * ```\n *\n * To configure this plugin see {@link Options#autoColumnSize}.\n *\n * @example\n * ```js\n * ...\n * var hot = new Handsontable(document.getElementById('example'), {\n * date: getData(),\n * autoColumnSize: true\n * });\n * // Access to plugin instance:\n * var plugin = hot.getPlugin('autoColumnSize');\n *\n * plugin.getColumnWidth(4);\n *\n * if (plugin.isEnabled()) {\n * // code...\n * }\n * ...\n * ```\n */\nclass AutoColumnSize extends BasePlugin {\n static get CALCULATION_STEP() {\n return 50;\n }\n\n static get SYNC_CALCULATION_LIMIT() {\n return 50;\n }\n\n constructor(hotInstance) {\n super(hotInstance);\n privatePool.set(this, {\n /**\n * Cached column header names. It is used to diff current column headers with previous state and detect which\n * columns width should be updated.\n *\n * @private\n * @type {Array}\n */\n cachedColumnHeaders: [],\n });\n /**\n * Cached columns widths.\n *\n * @type {Array}\n */\n this.widths = [];\n /**\n * Instance of {@link GhostTable} for rows and columns size calculations.\n *\n * @type {GhostTable}\n */\n this.ghostTable = new GhostTable(this.hot);\n /**\n * Instance of {@link SamplesGenerator} for generating samples necessary for columns width calculations.\n *\n * @type {SamplesGenerator}\n */\n this.samplesGenerator = new SamplesGenerator((row, col) => this.hot.getDataAtCell(row, col));\n /**\n * `true` only if the first calculation was performed\n *\n * @type {Boolean}\n */\n this.firstCalculation = true;\n /**\n * `true` if the size calculation is in progress.\n *\n * @type {Boolean}\n */\n this.inProgress = false;\n\n // moved to constructor to allow auto-sizing the columns when the plugin is disabled\n this.addHook('beforeColumnResize', (col, size, isDblClick) => this.onBeforeColumnResize(col, size, isDblClick));\n }\n\n /**\n * Check if the plugin is enabled in the handsontable settings.\n *\n * @returns {Boolean}\n */\n isEnabled() {\n return this.hot.getSettings().autoColumnSize !== false && !this.hot.getSettings().colWidths;\n }\n\n /**\n * Enable plugin for this Handsontable instance.\n */\n enablePlugin() {\n if (this.enabled) {\n return;\n }\n\n let setting = this.hot.getSettings().autoColumnSize;\n\n if (setting && setting.useHeaders != null) {\n this.ghostTable.setSetting('useHeaders', setting.useHeaders);\n }\n\n this.addHook('afterLoadData', () => this.onAfterLoadData());\n this.addHook('beforeChange', (changes) => this.onBeforeChange(changes));\n\n this.addHook('beforeRender', (force) => this.onBeforeRender(force));\n this.addHook('modifyColWidth', (width, col) => this.getColumnWidth(col, width));\n this.addHook('afterInit', () => this.onAfterInit());\n super.enablePlugin();\n }\n\n /**\n * Update plugin state.\n */\n updatePlugin() {\n const changedColumns = this.findColumnsWhereHeaderWasChanged();\n\n if (changedColumns.length) {\n this.clearCache(changedColumns);\n }\n super.updatePlugin();\n }\n\n /**\n * Disable plugin for this Handsontable instance.\n */\n disablePlugin() {\n super.disablePlugin();\n }\n\n /**\n * Calculate a columns width.\n *\n * @param {Number|Object} colRange Column range object.\n * @param {Number|Object} rowRange Row range object.\n * @param {Boolean} [force=false] If `true` force calculate width even when value was cached earlier.\n */\n calculateColumnsWidth(colRange = {from: 0, to: this.hot.countCols() - 1}, rowRange = {from: 0, to: this.hot.countRows() - 1}, force = false) {\n if (typeof colRange === 'number') {\n colRange = {from: colRange, to: colRange};\n }\n if (typeof rowRange === 'number') {\n rowRange = {from: rowRange, to: rowRange};\n }\n\n rangeEach(colRange.from, colRange.to, (col) => {\n if (force || (this.widths[col] === void 0 && !this.hot._getColWidthFromSettings(col))) {\n const samples = this.samplesGenerator.generateColumnSamples(col, rowRange);\n\n samples.forEach((sample, col) => this.ghostTable.addColumn(col, sample));\n }\n });\n\n if (this.ghostTable.columns.length) {\n this.ghostTable.getWidths((col, width) => {\n this.widths[col] = width;\n });\n this.ghostTable.clean();\n }\n }\n\n /**\n * Calculate all columns width.\n *\n * @param {Object|Number} rowRange Row range object.\n */\n calculateAllColumnsWidth(rowRange = {from: 0, to: this.hot.countRows() - 1}) {\n let current = 0;\n let length = this.hot.countCols() - 1;\n let timer = null;\n\n this.inProgress = true;\n\n let loop = () => {\n // When hot was destroyed after calculating finished cancel frame\n if (!this.hot) {\n cancelAnimationFrame(timer);\n this.inProgress = false;\n\n return;\n }\n\n this.calculateColumnsWidth({\n from: current,\n to: Math.min(current + AutoColumnSize.CALCULATION_STEP, length)\n }, rowRange);\n\n current = current + AutoColumnSize.CALCULATION_STEP + 1;\n\n if (current < length) {\n timer = requestAnimationFrame(loop);\n } else {\n cancelAnimationFrame(timer);\n this.inProgress = false;\n\n // @TODO Should call once per render cycle, currently fired separately in different plugins\n this.hot.view.wt.wtOverlays.adjustElementsSize(true);\n // tmp\n if (this.hot.view.wt.wtOverlays.leftOverlay.needFullRender) {\n this.hot.view.wt.wtOverlays.leftOverlay.clone.draw();\n }\n }\n };\n // sync\n if (this.firstCalculation && this.getSyncCalculationLimit()) {\n this.calculateColumnsWidth({from: 0, to: this.getSyncCalculationLimit()}, rowRange);\n this.firstCalculation = false;\n current = this.getSyncCalculationLimit() + 1;\n }\n // async\n if (current < length) {\n loop();\n } else {\n this.inProgress = false;\n }\n }\n\n /**\n * Set the sampling options.\n *\n * @private\n */\n setSamplingOptions() {\n let setting = this.hot.getSettings().autoColumnSize;\n let samplingRatio = setting && hasOwnProperty(setting, 'samplingRatio') ? this.hot.getSettings().autoColumnSize.samplingRatio : void 0;\n let allowSampleDuplicates = setting && hasOwnProperty(setting, 'allowSampleDuplicates') ? this.hot.getSettings().autoColumnSize.allowSampleDuplicates : void 0;\n\n if (samplingRatio && !isNaN(samplingRatio)) {\n this.samplesGenerator.setSampleCount(parseInt(samplingRatio, 10));\n }\n\n if (allowSampleDuplicates) {\n this.samplesGenerator.setAllowDuplicates(allowSampleDuplicates);\n }\n }\n\n /**\n * Recalculate all columns width (overwrite cache values).\n */\n recalculateAllColumnsWidth() {\n if (this.hot.view && isVisible(this.hot.view.wt.wtTable.TABLE)) {\n this.clearCache();\n this.calculateAllColumnsWidth();\n }\n }\n\n /**\n * Get value which tells how many columns should be calculated synchronously. Rest of the columns will be calculated asynchronously.\n *\n * @returns {Number}\n */\n getSyncCalculationLimit() {\n /* eslint-disable no-bitwise */\n let limit = AutoColumnSize.SYNC_CALCULATION_LIMIT;\n let colsLimit = this.hot.countCols() - 1;\n\n if (isObject(this.hot.getSettings().autoColumnSize)) {\n limit = this.hot.getSettings().autoColumnSize.syncLimit;\n\n if (isPercentValue(limit)) {\n limit = valueAccordingPercent(colsLimit, limit);\n } else {\n // Force to Number\n limit >>= 0;\n }\n }\n\n return Math.min(limit, colsLimit);\n }\n\n /**\n * Get the calculated column width.\n *\n * @param {Number} col Column index.\n * @param {Number} [defaultWidth] Default column width. It will be picked up if no calculated width found.\n * @param {Boolean} [keepMinimum=true] If `true` then returned value won't be smaller then 50 (default column width).\n * @returns {Number}\n */\n getColumnWidth(col, defaultWidth = void 0, keepMinimum = true) {\n let width = defaultWidth;\n\n if (width === void 0) {\n width = this.widths[col];\n\n if (keepMinimum && typeof width === 'number') {\n width = Math.max(width, ViewportColumnsCalculator.DEFAULT_WIDTH);\n }\n }\n\n return width;\n }\n\n /**\n * Get the first visible column.\n *\n * @returns {Number} Returns column index or -1 if table is not rendered.\n */\n getFirstVisibleColumn() {\n const wot = this.hot.view.wt;\n\n if (wot.wtViewport.columnsVisibleCalculator) {\n return wot.wtTable.getFirstVisibleColumn();\n }\n if (wot.wtViewport.columnsRenderCalculator) {\n return wot.wtTable.getFirstRenderedColumn();\n }\n\n return -1;\n }\n\n /**\n * Get the last visible column.\n *\n * @returns {Number} Returns column index or -1 if table is not rendered.\n */\n getLastVisibleColumn() {\n const wot = this.hot.view.wt;\n\n if (wot.wtViewport.columnsVisibleCalculator) {\n return wot.wtTable.getLastVisibleColumn();\n }\n if (wot.wtViewport.columnsRenderCalculator) {\n return wot.wtTable.getLastRenderedColumn();\n }\n\n return -1;\n }\n\n /**\n * Collects all columns which titles has been changed in comparison to the previous state.\n *\n * @returns {Array} It returns an array of physical column indexes.\n */\n findColumnsWhereHeaderWasChanged() {\n const columnHeaders = this.hot.getColHeader();\n const {cachedColumnHeaders} = privatePool.get(this);\n\n const changedColumns = arrayReduce(columnHeaders, (acc, columnTitle, physicalColumn) => {\n const cachedColumnsLength = cachedColumnHeaders.length;\n\n if (cachedColumnsLength - 1 < physicalColumn || cachedColumnHeaders[physicalColumn] !== columnTitle) {\n acc.push(physicalColumn);\n }\n if (cachedColumnsLength - 1 < physicalColumn) {\n cachedColumnHeaders.push(columnTitle);\n } else {\n cachedColumnHeaders[physicalColumn] = columnTitle;\n }\n\n return acc;\n }, []);\n\n return changedColumns;\n }\n\n /**\n * Clear cache of calculated column widths. If you want to clear only selected columns pass an array with their indexes.\n * Otherwise whole cache will be cleared.\n *\n * @param {Array} [columns=[]] List of column indexes (physical indexes) to clear.\n */\n clearCache(columns = []) {\n if (columns.length) {\n arrayEach(columns, (physicalIndex) => {\n this.widths[physicalIndex] = void 0;\n });\n } else {\n this.widths.length = 0;\n }\n }\n\n /**\n * Check if all widths were calculated. If not then return `true` (need recalculate).\n *\n * @returns {Boolean}\n */\n isNeedRecalculate() {\n return !!arrayFilter(this.widths, (item) => (item === void 0)).length;\n }\n\n /**\n * On before render listener.\n *\n * @private\n */\n onBeforeRender() {\n const force = this.hot.renderCall;\n const rowsCount = this.hot.countRows();\n\n // Keep last column widths unchanged for situation when all rows was deleted or trimmed (pro #6)\n if (!rowsCount) {\n return;\n }\n\n this.calculateColumnsWidth({from: this.getFirstVisibleColumn(), to: this.getLastVisibleColumn()}, void 0, force);\n\n if (this.isNeedRecalculate() && !this.inProgress) {\n this.calculateAllColumnsWidth();\n }\n }\n\n /**\n * On after load data listener.\n *\n * @private\n */\n onAfterLoadData() {\n if (this.hot.view) {\n this.recalculateAllColumnsWidth();\n } else {\n // first load - initialization\n setTimeout(() => {\n if (this.hot) {\n this.recalculateAllColumnsWidth();\n }\n }, 0);\n }\n }\n\n /**\n * On before change listener.\n *\n * @private\n * @param {Array} changes\n */\n onBeforeChange(changes) {\n const changedColumns = arrayMap(changes, ([row, column]) => this.hot.propToCol(column));\n\n this.clearCache(changedColumns);\n }\n\n /**\n * On before column resize listener.\n *\n * @private\n * @param {Number} col\n * @param {Number} size\n * @param {Boolean} isDblClick\n * @returns {Number}\n */\n onBeforeColumnResize(col, size, isDblClick) {\n if (isDblClick) {\n this.calculateColumnsWidth(col, void 0, true);\n size = this.getColumnWidth(col, void 0, false);\n }\n\n return size;\n }\n\n /**\n * On after Handsontable init fill plugin with all necessary values.\n *\n * @private\n */\n onAfterInit() {\n privatePool.get(this).cachedColumnHeaders = this.hot.getColHeader();\n }\n\n /**\n * Destroy plugin instance.\n */\n destroy() {\n this.ghostTable.clean();\n super.destroy();\n }\n}\n\nregisterPlugin('autoColumnSize', AutoColumnSize);\n\nexport default AutoColumnSize;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/autoColumnSize/autoColumnSize.js","import BasePlugin from './../_base';\nimport {arrayEach, arrayFilter} from './../../helpers/array';\nimport {cancelAnimationFrame, requestAnimationFrame} from './../../helpers/feature';\nimport {isVisible} from './../../helpers/dom/element';\nimport GhostTable from './../../utils/ghostTable';\nimport {isObject, objectEach, hasOwnProperty} from './../../helpers/object';\nimport {valueAccordingPercent, rangeEach} from './../../helpers/number';\nimport {registerPlugin} from './../../plugins';\nimport SamplesGenerator from './../../utils/samplesGenerator';\nimport {isPercentValue} from './../../helpers/string';\n\n/**\n * @plugin AutoRowSize\n *\n * @description\n * This plugin allows to set row heights based on their highest cells.\n *\n * By default, the plugin is declared as `undefined`, which makes it disabled (same as if it was declared as `false`).\n * Enabling this plugin may decrease the overall table performance, as it needs to calculate the heights of all cells to\n * resize the rows accordingly.\n * If you experience problems with the performance, try turning this feature off and declaring the row heights manually.\n *\n * Row height calculations are divided into sync and async part. Each of this parts has their own advantages and\n * disadvantages. Synchronous calculations are faster but they block the browser UI, while the slower asynchronous operations don't\n * block the browser UI.\n *\n * To configure the sync/async distribution, you can pass an absolute value (number of columns) or a percentage value to a config object:\n * ```js\n * ...\n * // as a number (300 columns in sync, rest async)\n * autoRowSize: {syncLimit: 300},\n * ...\n *\n * ...\n * // as a string (percent)\n * autoRowSize: {syncLimit: '40%'},\n * ...\n * ```\n *\n * You can also use the `allowSampleDuplicates` option to allow sampling duplicate values when calculating the row height. Note, that this might have\n * a negative impact on performance.\n *\n * To configure this plugin see {@link Options#autoRowSize}.\n *\n * @example\n *\n * ```js\n * ...\n * var hot = new Handsontable(document.getElementById('example'), {\n * date: getData(),\n * autoRowSize: true\n * });\n * // Access to plugin instance:\n * var plugin = hot.getPlugin('autoRowSize');\n *\n * plugin.getRowHeight(4);\n *\n * if (plugin.isEnabled()) {\n * // code...\n * }\n * ...\n * ```\n */\nclass AutoRowSize extends BasePlugin {\n static get CALCULATION_STEP() {\n return 50;\n }\n\n static get SYNC_CALCULATION_LIMIT() {\n return 500;\n }\n\n constructor(hotInstance) {\n super(hotInstance);\n /**\n * Cached rows heights.\n *\n * @type {Array}\n */\n this.heights = [];\n /**\n * Instance of {@link GhostTable} for rows and columns size calculations.\n *\n * @type {GhostTable}\n */\n this.ghostTable = new GhostTable(this.hot);\n /**\n * Instance of {@link SamplesGenerator} for generating samples necessary for rows height calculations.\n *\n * @type {SamplesGenerator}\n */\n this.samplesGenerator = new SamplesGenerator((row, col) => {\n if (row >= 0) {\n return this.hot.getDataAtCell(row, col);\n\n } else if (row === -1) {\n return this.hot.getColHeader(col);\n\n }\n return null;\n\n });\n /**\n * `true` if only the first calculation was performed.\n *\n * @type {Boolean}\n */\n this.firstCalculation = true;\n /**\n * `true` if the size calculation is in progress.\n *\n * @type {Boolean}\n */\n this.inProgress = false;\n\n // moved to constructor to allow auto-sizing the rows when the plugin is disabled\n this.addHook('beforeRowResize', (row, size, isDblClick) => this.onBeforeRowResize(row, size, isDblClick));\n }\n\n /**\n * Check if the plugin is enabled in the Handsontable settings.\n *\n * @returns {Boolean}\n */\n isEnabled() {\n return this.hot.getSettings().autoRowSize === true || isObject(this.hot.getSettings().autoRowSize);\n }\n\n /**\n * Enable plugin for this Handsontable instance.\n */\n enablePlugin() {\n if (this.enabled) {\n return;\n }\n\n this.setSamplingOptions();\n\n this.addHook('afterLoadData', () => this.onAfterLoadData());\n this.addHook('beforeChange', (changes) => this.onBeforeChange(changes));\n this.addHook('beforeColumnMove', () => this.recalculateAllRowsHeight());\n this.addHook('beforeColumnResize', () => this.recalculateAllRowsHeight());\n this.addHook('beforeColumnSort', () => this.clearCache());\n this.addHook('beforeRender', (force) => this.onBeforeRender(force));\n this.addHook('beforeRowMove', (rowStart, rowEnd) => this.onBeforeRowMove(rowStart, rowEnd));\n this.addHook('modifyRowHeight', (height, row) => this.getRowHeight(row, height));\n this.addHook('modifyColumnHeaderHeight', () => this.getColumnHeaderHeight());\n super.enablePlugin();\n }\n\n /**\n * Disable plugin for this Handsontable instance.\n */\n disablePlugin() {\n super.disablePlugin();\n }\n\n /**\n * Calculate a given rows height.\n *\n * @param {Number|Object} rowRange Row range object.\n * @param {Number|Object} colRange Column range object.\n * @param {Boolean} [force=false] If `true` force calculate height even when value was cached earlier.\n */\n calculateRowsHeight(rowRange = {from: 0, to: this.hot.countRows() - 1}, colRange = {from: 0, to: this.hot.countCols() - 1}, force = false) {\n if (typeof rowRange === 'number') {\n rowRange = {from: rowRange, to: rowRange};\n }\n if (typeof colRange === 'number') {\n colRange = {from: colRange, to: colRange};\n }\n\n if (this.hot.getColHeader(0) !== null) {\n const samples = this.samplesGenerator.generateRowSamples(-1, colRange);\n\n this.ghostTable.addColumnHeadersRow(samples.get(-1));\n }\n\n rangeEach(rowRange.from, rowRange.to, (row) => {\n // For rows we must calculate row height even when user had set height value manually.\n // We can shrink column but cannot shrink rows!\n if (force || this.heights[row] === void 0) {\n const samples = this.samplesGenerator.generateRowSamples(row, colRange);\n\n samples.forEach((sample, row) => {\n this.ghostTable.addRow(row, sample);\n });\n }\n });\n if (this.ghostTable.rows.length) {\n this.ghostTable.getHeights((row, height) => {\n this.heights[row] = height;\n });\n this.ghostTable.clean();\n }\n }\n\n /**\n * Calculate the height of all the rows.\n *\n * @param {Object|Number} colRange Column range object.\n */\n calculateAllRowsHeight(colRange = {from: 0, to: this.hot.countCols() - 1}) {\n let current = 0;\n let length = this.hot.countRows() - 1;\n let timer = null;\n\n this.inProgress = true;\n\n let loop = () => {\n // When hot was destroyed after calculating finished cancel frame\n if (!this.hot) {\n cancelAnimationFrame(timer);\n this.inProgress = false;\n\n return;\n }\n this.calculateRowsHeight({from: current, to: Math.min(current + AutoRowSize.CALCULATION_STEP, length)}, colRange);\n current = current + AutoRowSize.CALCULATION_STEP + 1;\n\n if (current < length) {\n timer = requestAnimationFrame(loop);\n } else {\n cancelAnimationFrame(timer);\n this.inProgress = false;\n\n // @TODO Should call once per render cycle, currently fired separately in different plugins\n this.hot.view.wt.wtOverlays.adjustElementsSize(true);\n // tmp\n if (this.hot.view.wt.wtOverlays.leftOverlay.needFullRender) {\n this.hot.view.wt.wtOverlays.leftOverlay.clone.draw();\n }\n }\n };\n // sync\n if (this.firstCalculation && this.getSyncCalculationLimit()) {\n this.calculateRowsHeight({from: 0, to: this.getSyncCalculationLimit()}, colRange);\n this.firstCalculation = false;\n current = this.getSyncCalculationLimit() + 1;\n }\n // async\n if (current < length) {\n loop();\n } else {\n this.inProgress = false;\n this.hot.view.wt.wtOverlays.adjustElementsSize(false);\n }\n }\n\n /**\n * Set the sampling options.\n *\n * @private\n */\n setSamplingOptions() {\n let setting = this.hot.getSettings().autoRowSize;\n let samplingRatio = setting && hasOwnProperty(setting, 'samplingRatio') ? this.hot.getSettings().autoRowSize.samplingRatio : void 0;\n let allowSampleDuplicates = setting && hasOwnProperty(setting, 'allowSampleDuplicates') ? this.hot.getSettings().autoRowSize.allowSampleDuplicates : void 0;\n\n if (samplingRatio && !isNaN(samplingRatio)) {\n this.samplesGenerator.setSampleCount(parseInt(samplingRatio, 10));\n }\n\n if (allowSampleDuplicates) {\n this.samplesGenerator.setAllowDuplicates(allowSampleDuplicates);\n }\n }\n\n /**\n * Recalculate all rows height (overwrite cache values).\n */\n recalculateAllRowsHeight() {\n if (isVisible(this.hot.view.wt.wtTable.TABLE)) {\n this.clearCache();\n this.calculateAllRowsHeight();\n }\n }\n\n /**\n * Get value which tells how much rows will be calculated synchronously. Rest rows will be calculated asynchronously.\n *\n * @returns {Number}\n */\n getSyncCalculationLimit() {\n /* eslint-disable no-bitwise */\n let limit = AutoRowSize.SYNC_CALCULATION_LIMIT;\n let rowsLimit = this.hot.countRows() - 1;\n\n if (isObject(this.hot.getSettings().autoRowSize)) {\n limit = this.hot.getSettings().autoRowSize.syncLimit;\n\n if (isPercentValue(limit)) {\n limit = valueAccordingPercent(rowsLimit, limit);\n } else {\n // Force to Number\n limit >>= 0;\n }\n }\n\n return Math.min(limit, rowsLimit);\n }\n\n /**\n * Get the calculated row height.\n *\n * @param {Number} row Row index.\n * @param {Number} [defaultHeight] Default row height. It will be pick up if no calculated height found.\n * @returns {Number}\n */\n getRowHeight(row, defaultHeight = void 0) {\n let height = defaultHeight;\n\n if (this.heights[row] !== void 0 && this.heights[row] > (defaultHeight || 0)) {\n height = this.heights[row];\n }\n\n return height;\n }\n\n /**\n * Get the calculated column header height.\n *\n * @returns {Number|undefined}\n */\n getColumnHeaderHeight() {\n return this.heights[-1];\n }\n\n /**\n * Get the first visible row.\n *\n * @returns {Number} Returns row index or -1 if table is not rendered.\n */\n getFirstVisibleRow() {\n const wot = this.hot.view.wt;\n\n if (wot.wtViewport.rowsVisibleCalculator) {\n return wot.wtTable.getFirstVisibleRow();\n }\n if (wot.wtViewport.rowsRenderCalculator) {\n return wot.wtTable.getFirstRenderedRow();\n }\n\n return -1;\n }\n\n /**\n * Get the last visible row.\n *\n * @returns {Number} Returns row index or -1 if table is not rendered.\n */\n getLastVisibleRow() {\n const wot = this.hot.view.wt;\n\n if (wot.wtViewport.rowsVisibleCalculator) {\n return wot.wtTable.getLastVisibleRow();\n }\n if (wot.wtViewport.rowsRenderCalculator) {\n return wot.wtTable.getLastRenderedRow();\n }\n\n return -1;\n }\n\n /**\n * Clear cached heights.\n */\n clearCache() {\n this.heights.length = 0;\n this.heights[-1] = void 0;\n }\n\n /**\n * Clear cache by range.\n *\n * @param {Object|Number} range Row range object.\n */\n clearCacheByRange(range) {\n if (typeof range === 'number') {\n range = {from: range, to: range};\n }\n rangeEach(Math.min(range.from, range.to), Math.max(range.from, range.to), (row) => {\n this.heights[row] = void 0;\n });\n }\n\n /**\n * @returns {Boolean}\n */\n isNeedRecalculate() {\n return !!arrayFilter(this.heights, (item) => (item === void 0)).length;\n }\n\n /**\n * On before render listener.\n *\n * @private\n */\n onBeforeRender() {\n let force = this.hot.renderCall;\n this.calculateRowsHeight({from: this.getFirstVisibleRow(), to: this.getLastVisibleRow()}, void 0, force);\n\n let fixedRowsBottom = this.hot.getSettings().fixedRowsBottom;\n\n // Calculate rows height synchronously for bottom overlay\n if (fixedRowsBottom) {\n let totalRows = this.hot.countRows() - 1;\n this.calculateRowsHeight({from: totalRows - fixedRowsBottom, to: totalRows});\n }\n\n if (this.isNeedRecalculate() && !this.inProgress) {\n this.calculateAllRowsHeight();\n }\n }\n\n /**\n * On before row move listener.\n *\n * @private\n * @param {Number} from Row index where was grabbed.\n * @param {Number} to Destination row index.\n */\n onBeforeRowMove(from, to) {\n this.clearCacheByRange({from, to});\n this.calculateAllRowsHeight();\n }\n\n /**\n * On before row resize listener.\n *\n * @private\n * @param {Number} row\n * @param {Number} size\n * @param {Boolean} isDblClick\n * @returns {Number}\n */\n onBeforeRowResize(row, size, isDblClick) {\n if (isDblClick) {\n this.calculateRowsHeight(row, void 0, true);\n size = this.getRowHeight(row);\n }\n\n return size;\n }\n\n /**\n * On after load data listener.\n *\n * @private\n */\n onAfterLoadData() {\n if (this.hot.view) {\n this.recalculateAllRowsHeight();\n } else {\n // first load - initialization\n setTimeout(() => {\n if (this.hot) {\n this.recalculateAllRowsHeight();\n }\n }, 0);\n }\n }\n\n /**\n * On before change listener.\n *\n * @private\n * @param {Array} changes\n */\n onBeforeChange(changes) {\n let range = null;\n\n if (changes.length === 1) {\n range = changes[0][0];\n } else if (changes.length > 1) {\n range = {\n from: changes[0][0],\n to: changes[changes.length - 1][0],\n };\n }\n if (range !== null) {\n this.clearCacheByRange(range);\n }\n }\n\n /**\n * Destroy plugin instance.\n */\n destroy() {\n this.ghostTable.clean();\n super.destroy();\n }\n}\n\nregisterPlugin('autoRowSize', AutoRowSize);\n\nexport default AutoRowSize;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/autoRowSize/autoRowSize.js","import BasePlugin from './../_base';\nimport Hooks from './../../pluginHooks';\nimport {offset, outerHeight, outerWidth} from './../../helpers/dom/element';\nimport EventManager from './../../eventManager';\nimport {registerPlugin} from './../../plugins';\nimport {CellCoords} from './../../3rdparty/walkontable/src';\nimport {getDeltas, getDragDirectionAndRange, DIRECTIONS, getMappedFillHandleSetting} from './utils';\n\nHooks.getSingleton().register('modifyAutofillRange');\nHooks.getSingleton().register('beforeAutofill');\n\nconst INSERT_ROW_ALTER_ACTION_NAME = 'insert_row';\nconst INTERVAL_FOR_ADDING_ROW = 200;\n\n/**\n * This plugin provides \"drag-down\" and \"copy-down\" functionalities, both operated\n * using the small square in the right bottom of the cell selection.\n *\n * \"Drag-down\" expands the value of the selected cells to the neighbouring\n * cells when you drag the small square in the corner.\n *\n * \"Copy-down\" copies the value of the selection to all empty cells\n * below when you double click the small square.\n *\n * @class Autofill\n * @plugin Autofill\n */\n\nclass Autofill extends BasePlugin {\n constructor(hotInstance) {\n super(hotInstance);\n /**\n * Event manager\n *\n * @type {EventManager}\n */\n this.eventManager = new EventManager(this);\n /**\n * Specifies if adding new row started.\n *\n * @type {Boolean}\n */\n this.addingStarted = false;\n /**\n * Specifies if there was mouse down on the cell corner.\n *\n * @type {Boolean}\n */\n this.mouseDownOnCellCorner = false;\n /**\n * Specifies if mouse was dragged outside Handsontable.\n *\n * @type {Boolean}\n */\n this.mouseDragOutside = false;\n /**\n * Specifies how many cell levels were dragged using the handle.\n *\n * @type {Boolean}\n */\n this.handleDraggedCells = 0;\n /**\n * Specifies allowed directions of drag.\n *\n * @type {Array}\n */\n this.directions = [];\n /**\n * Specifies if can insert new rows if needed.\n *\n * @type {Boolean}\n */\n this.autoInsertRow = false;\n }\n\n /**\n * Check if the plugin is enabled in the Handsontable settings.\n *\n * @returns {Boolean}\n */\n isEnabled() {\n return this.hot.getSettings().fillHandle;\n }\n\n /**\n * Enable plugin for this Handsontable instance.\n */\n enablePlugin() {\n if (this.enabled) {\n return;\n }\n\n this.mapSettings();\n this.registerEvents();\n\n this.addHook('afterOnCellCornerMouseDown', (event) => this.onAfterCellCornerMouseDown(event));\n this.addHook('afterOnCellCornerDblClick', (event) => this.onCellCornerDblClick(event));\n this.addHook('beforeOnCellMouseOver', (event, coords, TD) => this.onBeforeCellMouseOver(coords));\n\n super.enablePlugin();\n }\n\n /**\n * Update plugin for this Handsontable instance.\n */\n updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n super.updatePlugin();\n }\n\n /**\n * Disable plugin for this Handsontable instance.\n */\n disablePlugin() {\n this.clearMappedSettings();\n super.disablePlugin();\n }\n\n /**\n * Get selection data\n *\n * @private\n * @returns {Array} Array with the data.\n */\n getSelectionData() {\n const selRange = {\n from: this.hot.getSelectedRange().from,\n to: this.hot.getSelectedRange().to,\n };\n\n return this.hot.getData(selRange.from.row, selRange.from.col, selRange.to.row, selRange.to.col);\n }\n\n /**\n * Try to apply fill values to the area in fill border, omitting the selection border.\n *\n * @private\n * @returns {Boolean} reports if fill was applied.\n */\n fillIn() {\n if (this.hot.view.wt.selections.fill.isEmpty()) {\n return false;\n }\n\n const cornersOfSelectionAndDragAreas = this.hot.view.wt.selections.fill.getCorners();\n\n this.resetSelectionOfDraggedArea();\n\n const cornersOfSelectedCells = this.getCornersOfSelectedCells();\n const {directionOfDrag, startOfDragCoords, endOfDragCoords} = getDragDirectionAndRange(cornersOfSelectedCells, cornersOfSelectionAndDragAreas);\n\n this.hot.runHooks('modifyAutofillRange', cornersOfSelectedCells, cornersOfSelectionAndDragAreas);\n\n if (startOfDragCoords && startOfDragCoords.row > -1 && startOfDragCoords.col > -1) {\n const selectionData = this.getSelectionData();\n const deltas = getDeltas(startOfDragCoords, endOfDragCoords, selectionData, directionOfDrag);\n\n this.hot.runHooks('beforeAutofill', startOfDragCoords, endOfDragCoords, selectionData);\n\n this.hot.populateFromArray(\n startOfDragCoords.row,\n startOfDragCoords.col,\n selectionData,\n endOfDragCoords.row,\n endOfDragCoords.col,\n `${this.pluginName}.fill`,\n null,\n directionOfDrag,\n deltas\n );\n\n this.setSelection(cornersOfSelectionAndDragAreas);\n\n } else {\n // reset to avoid some range bug\n this.hot.selection.refreshBorders();\n }\n\n return true;\n }\n\n /**\n * Reduce the selection area if the handle was dragged outside of the table or on headers.\n *\n * @private\n * @param {CellCoords} coords indexes of selection corners.\n * @returns {CellCoords}\n */\n reduceSelectionAreaIfNeeded(coords) {\n if (coords.row < 0) {\n coords.row = 0;\n }\n\n if (coords.col < 0) {\n coords.col = 0;\n }\n return coords;\n }\n\n /**\n * Get the coordinates of the drag & drop borders.\n *\n * @private\n * @param {CellCoords} coordsOfSelection `CellCoords` coord object.\n * @returns {Array}\n */\n\n getCoordsOfDragAndDropBorders(coordsOfSelection) {\n const topLeftCorner = this.hot.getSelectedRange().getTopLeftCorner();\n const bottomRightCorner = this.hot.getSelectedRange().getBottomRightCorner();\n let coords;\n\n if (this.directions.includes(DIRECTIONS.vertical) &&\n (bottomRightCorner.row < coordsOfSelection.row || topLeftCorner.row > coordsOfSelection.row)) {\n coords = new CellCoords(coordsOfSelection.row, bottomRightCorner.col);\n\n } else if (this.directions.includes(DIRECTIONS.horizontal)) {\n coords = new CellCoords(bottomRightCorner.row, coordsOfSelection.col);\n\n } else {\n // wrong direction\n return;\n }\n\n return this.reduceSelectionAreaIfNeeded(coords);\n }\n\n /**\n * Show the fill border.\n *\n * @private\n * @param {CellCoords} coordsOfSelection `CellCoords` coord object.\n */\n showBorder(coordsOfSelection) {\n const coordsOfDragAndDropBorders = this.getCoordsOfDragAndDropBorders(coordsOfSelection);\n\n if (coordsOfDragAndDropBorders) {\n this.redrawBorders(coordsOfDragAndDropBorders);\n }\n }\n\n /**\n * Add new row\n *\n * @private\n */\n addRow() {\n this.hot._registerTimeout(setTimeout(() => {\n this.hot.alter(INSERT_ROW_ALTER_ACTION_NAME, void 0, 1, `${this.pluginName}.fill`);\n\n this.addingStarted = false;\n }, INTERVAL_FOR_ADDING_ROW));\n }\n\n /**\n * Add new rows if they are needed to continue auto-filling values.\n *\n * @private\n */\n addNewRowIfNeeded() {\n if (this.hot.view.wt.selections.fill.cellRange && this.addingStarted === false && this.autoInsertRow) {\n const cornersOfSelectedCells = this.hot.getSelected();\n const cornersOfSelectedDragArea = this.hot.view.wt.selections.fill.getCorners();\n const nrOfTableRows = this.hot.countRows();\n\n if (cornersOfSelectedCells[2] < nrOfTableRows - 1 && cornersOfSelectedDragArea[2] === nrOfTableRows - 1) {\n this.addingStarted = true;\n\n this.addRow();\n }\n }\n }\n\n /**\n * Get corners of selected cells.\n *\n * @private\n * @returns {Array}\n */\n getCornersOfSelectedCells() {\n if (this.hot.selection.isMultiple()) {\n return this.hot.view.wt.selections.area.getCorners();\n\n }\n return this.hot.view.wt.selections.current.getCorners();\n\n }\n\n /**\n * Get index of last adjacent filled in row\n *\n * @private\n * @param {Array} cornersOfSelectedCells indexes of selection corners.\n * @returns {Number} gives number greater than or equal to zero when selection adjacent can be applied.\n * or -1 when selection adjacent can't be applied\n */\n getIndexOfLastAdjacentFilledInRow(cornersOfSelectedCells) {\n const data = this.hot.getData();\n const nrOfTableRows = this.hot.countRows();\n let lastFilledInRowIndex;\n\n for (let rowIndex = cornersOfSelectedCells[2] + 1; rowIndex < nrOfTableRows; rowIndex++) {\n for (let columnIndex = cornersOfSelectedCells[1]; columnIndex <= cornersOfSelectedCells[3]; columnIndex++) {\n const dataInCell = data[rowIndex][columnIndex];\n\n if (dataInCell) {\n return -1;\n }\n }\n\n const dataInNextLeftCell = data[rowIndex][cornersOfSelectedCells[1] - 1];\n const dataInNextRightCell = data[rowIndex][cornersOfSelectedCells[3] + 1];\n\n if (!!dataInNextLeftCell || !!dataInNextRightCell) {\n lastFilledInRowIndex = rowIndex;\n }\n }\n return lastFilledInRowIndex;\n }\n\n /**\n * Add a selection from the start area to the specific row index.\n *\n * @private\n * @param {Array} selectStartArea selection area from which we start to create more comprehensive selection.\n * @param {Number} rowIndex\n */\n addSelectionFromStartAreaToSpecificRowIndex(selectStartArea, rowIndex) {\n this.hot.view.wt.selections.fill.clear();\n this.hot.view.wt.selections.fill.add(new CellCoords(\n selectStartArea[0],\n selectStartArea[1])\n );\n this.hot.view.wt.selections.fill.add(new CellCoords(\n rowIndex,\n selectStartArea[3])\n );\n }\n\n /**\n * Set selection based on passed corners.\n *\n * @private\n * @param {Array} cornersOfArea\n */\n setSelection(cornersOfArea) {\n this.hot.selection.setRangeStart(new CellCoords(\n cornersOfArea[0],\n cornersOfArea[1])\n );\n this.hot.selection.setRangeEnd(new CellCoords(\n cornersOfArea[2],\n cornersOfArea[3])\n );\n }\n\n /**\n * Try to select cells down to the last row in the left column and then returns if selection was applied.\n *\n * @private\n * @returns {Boolean}\n */\n selectAdjacent() {\n const cornersOfSelectedCells = this.getCornersOfSelectedCells();\n const lastFilledInRowIndex = this.getIndexOfLastAdjacentFilledInRow(cornersOfSelectedCells);\n\n if (lastFilledInRowIndex === -1) {\n return false;\n\n }\n this.addSelectionFromStartAreaToSpecificRowIndex(cornersOfSelectedCells, lastFilledInRowIndex);\n\n return true;\n\n }\n\n /**\n * Reset selection of dragged area.\n *\n * @private\n */\n resetSelectionOfDraggedArea() {\n this.handleDraggedCells = 0;\n\n this.hot.view.wt.selections.fill.clear();\n }\n\n /**\n * Redraw borders.\n *\n * @private\n * @param {CellCoords} coords `CellCoords` coord object.\n */\n redrawBorders(coords) {\n this.hot.view.wt.selections.fill.clear();\n this.hot.view.wt.selections.fill.add(this.hot.getSelectedRange().from);\n this.hot.view.wt.selections.fill.add(this.hot.getSelectedRange().to);\n this.hot.view.wt.selections.fill.add(coords);\n this.hot.view.render();\n }\n\n /**\n * Get if mouse was dragged outside.\n *\n * @private\n * @param {MouseEvent} event `mousemove` event properties.\n * @returns {Boolean}\n */\n getIfMouseWasDraggedOutside(event) {\n const tableBottom = offset(this.hot.table).top - (window.pageYOffset ||\n document.documentElement.scrollTop) + outerHeight(this.hot.table);\n const tableRight = offset(this.hot.table).left - (window.pageXOffset ||\n document.documentElement.scrollLeft) + outerWidth(this.hot.table);\n\n return event.clientY > tableBottom && event.clientX <= tableRight;\n }\n\n /**\n * Bind the events used by the plugin.\n *\n * @private\n */\n registerEvents() {\n this.eventManager.addEventListener(document.documentElement, 'mouseup', () => this.onMouseUp());\n this.eventManager.addEventListener(document.documentElement, 'mousemove', (event) => this.onMouseMove(event));\n }\n\n /**\n * On cell corner double click callback.\n *\n * @private\n */\n onCellCornerDblClick() {\n const selectionApplied = this.selectAdjacent();\n\n if (selectionApplied) {\n this.fillIn();\n }\n }\n\n /**\n * On after cell corner mouse down listener.\n *\n * @private\n */\n onAfterCellCornerMouseDown() {\n this.handleDraggedCells = 1;\n this.mouseDownOnCellCorner = true;\n }\n\n /**\n * On before cell mouse over listener.\n *\n * @private\n * @param {CellCoords} coords `CellCoords` coord object.\n */\n onBeforeCellMouseOver(coords) {\n if (this.mouseDownOnCellCorner && !this.hot.view.isMouseDown() && this.handleDraggedCells) {\n this.handleDraggedCells++;\n\n this.showBorder(coords);\n this.addNewRowIfNeeded();\n }\n }\n\n /**\n * On mouse up listener.\n *\n * @private\n */\n onMouseUp() {\n if (this.handleDraggedCells) {\n if (this.handleDraggedCells > 1) {\n this.fillIn();\n }\n\n this.handleDraggedCells = 0;\n this.mouseDownOnCellCorner = false;\n }\n }\n\n /**\n * On mouse move listener.\n *\n * @private\n * @param {MouseEvent} event `mousemove` event properties.\n */\n onMouseMove(event) {\n const mouseWasDraggedOutside = this.getIfMouseWasDraggedOutside(event);\n\n if (this.addingStarted === false && this.handleDraggedCells > 0 && mouseWasDraggedOutside) {\n this.mouseDragOutside = true;\n this.addingStarted = true;\n\n } else {\n this.mouseDragOutside = false;\n }\n\n if (this.mouseDragOutside && this.autoInsertRow) {\n this.addRow();\n }\n }\n\n /**\n * Clear mapped settings.\n *\n * @private\n */\n clearMappedSettings() {\n this.directions.length = 0;\n this.autoInsertRow = false;\n }\n\n /**\n * Map settings.\n *\n * @private\n */\n mapSettings() {\n const mappedSettings = getMappedFillHandleSetting(this.hot.getSettings().fillHandle);\n this.directions = mappedSettings.directions;\n this.autoInsertRow = mappedSettings.autoInsertRow;\n }\n\n /**\n * Destroy plugin instance.\n */\n destroy() {\n super.destroy();\n }\n}\n\nregisterPlugin('autofill', Autofill);\n\nexport default Autofill;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/autofill/autofill.js","import {isObject} from './../../helpers/object';\nimport {isDefined} from './../../helpers/mixed';\nimport {CellCoords} from './../../3rdparty/walkontable/src';\n\nexport const DIRECTIONS = {\n horizontal: 'horizontal',\n vertical: 'vertical'\n};\n\n/**\n * Get deltas array.\n *\n * @param {CellCoords} start\n * @param {CellCoords} end\n * @param {Array} data\n * @param {String} direction\n * @returns {Array}\n */\nexport function getDeltas(start, end, data, direction) {\n const rowsLength = data.length;\n const columnsLength = data ? data[0].length : 0;\n const deltas = [];\n const diffRow = end.row - start.row;\n const diffCol = end.col - start.col;\n\n if (['down', 'up'].indexOf(direction) !== -1) {\n const arr = [];\n\n for (let col = 0; col <= diffCol; col++) {\n let startValue = parseInt(data[0][col], 10);\n let endValue = parseInt(data[rowsLength - 1][col], 10);\n let delta = (direction === 'down' ? (endValue - startValue) : (startValue - endValue)) / (rowsLength - 1) || 0;\n\n arr.push(delta);\n }\n\n deltas.push(arr);\n }\n\n if (['right', 'left'].indexOf(direction) !== -1) {\n for (let row = 0; row <= diffRow; row++) {\n let startValue = parseInt(data[row][0], 10);\n let endValue = parseInt(data[row][columnsLength - 1], 10);\n let delta = (direction === 'right' ? (endValue - startValue) : (startValue - endValue)) / (columnsLength - 1) || 0;\n\n deltas.push([delta]);\n }\n }\n\n return deltas;\n}\n\n/**\n * Get direction between positions and cords of selections difference (drag area)\n *\n * @param {Array} startSelection\n * @param {Array} endSelection\n * @returns {{direction: String, start: CellCoords, end: CellCoords}}\n */\nexport function getDragDirectionAndRange(startSelection, endSelection) {\n let startOfDragCoords,\n endOfDragCoords,\n directionOfDrag;\n\n if (endSelection[0] === startSelection[0] && endSelection[1] < startSelection[1]) {\n directionOfDrag = 'left';\n\n startOfDragCoords = new CellCoords(endSelection[0], endSelection[1]);\n endOfDragCoords = new CellCoords(endSelection[2], startSelection[1] - 1);\n\n } else if (endSelection[0] === startSelection[0] && endSelection[3] > startSelection[3]) {\n directionOfDrag = 'right';\n\n startOfDragCoords = new CellCoords(endSelection[0], startSelection[3] + 1);\n endOfDragCoords = new CellCoords(endSelection[2], endSelection[3]);\n\n } else if (endSelection[0] < startSelection[0] && endSelection[1] === startSelection[1]) {\n directionOfDrag = 'up';\n\n startOfDragCoords = new CellCoords(endSelection[0], endSelection[1]);\n endOfDragCoords = new CellCoords(startSelection[0] - 1, endSelection[3]);\n\n } else if (endSelection[2] > startSelection[2] &&\n endSelection[1] === startSelection[1]) {\n directionOfDrag = 'down';\n\n startOfDragCoords = new CellCoords(startSelection[2] + 1, endSelection[1]);\n endOfDragCoords = new CellCoords(endSelection[2], endSelection[3]);\n }\n\n return {\n directionOfDrag,\n startOfDragCoords,\n endOfDragCoords\n };\n}\n\n/**\n * Get mapped FillHandle setting containing information about\n * allowed FillHandle directions and if allowed is automatic insertion of rows on drag\n *\n * @param {Boolean|Object} fillHandle property of Handsontable settings\n * @returns {{directions: Array, autoInsertRow: Boolean}} object allowing access to information\n * about FillHandle in more useful way\n */\nexport function getMappedFillHandleSetting(fillHandle) {\n const mappedSettings = {};\n\n if (fillHandle === true) {\n mappedSettings.directions = Object.keys(DIRECTIONS);\n mappedSettings.autoInsertRow = true;\n\n } else if (isObject(fillHandle)) {\n if (isDefined(fillHandle.autoInsertRow)) {\n\n // autoInsertRow for horizontal direction will be always false\n\n if (fillHandle.direction === DIRECTIONS.horizontal) {\n mappedSettings.autoInsertRow = false;\n\n } else {\n mappedSettings.autoInsertRow = fillHandle.autoInsertRow;\n }\n\n } else {\n mappedSettings.autoInsertRow = false;\n }\n\n if (isDefined(fillHandle.direction)) {\n mappedSettings.directions = [fillHandle.direction];\n\n } else {\n mappedSettings.directions = Object.keys(DIRECTIONS);\n }\n\n } else if (typeof fillHandle === 'string') {\n mappedSettings.directions = [fillHandle];\n mappedSettings.autoInsertRow = true;\n\n } else {\n mappedSettings.directions = [];\n mappedSettings.autoInsertRow = false;\n }\n\n return mappedSettings;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/autofill/utils.js","import moment from 'moment';\nimport {\n addClass,\n hasClass,\n removeClass,\n} from './../../helpers/dom/element';\nimport {arrayMap, arrayReduce} from './../../helpers/array';\nimport {isEmpty} from './../../helpers/mixed';\nimport {hasOwnProperty} from './../../helpers/object';\nimport BasePlugin from './../_base';\nimport {registerPlugin} from './../../plugins';\nimport mergeSort from './../../utils/sortingAlgorithms/mergeSort';\nimport Hooks from './../../pluginHooks';\n\nHooks.getSingleton().register('beforeColumnSort');\nHooks.getSingleton().register('afterColumnSort');\n\n// TODO: Implement mixin arrayMapper to ColumnSorting plugin.\n\n/**\n * @plugin ColumnSorting\n *\n * @description\n * This plugin sorts the view by a column (but does not sort the data source!).\n * To enable the plugin, set the `columnSorting` property to either:\n * * a boolean value (`true`/`false`),\n * * an object defining the initial sorting order (see the example below).\n *\n * @example\n * ```js\n * ...\n * // as boolean\n * columnSorting: true\n * ...\n * // as a object with initial order (sort ascending column at index 2)\n * columnSorting: {\n * column: 2,\n * sortOrder: true, // true = ascending, false = descending, undefined = original order\n * sortEmptyCells: true // true = the table sorts empty cells, false = the table moves all empty cells to the end of the table\n * }\n * ...\n * ```\n * @dependencies ObserveChanges\n */\nclass ColumnSorting extends BasePlugin {\n\n constructor(hotInstance) {\n super(hotInstance);\n this.sortIndicators = [];\n this.lastSortedColumn = null;\n this.sortEmptyCells = false;\n }\n\n /**\n * Check if the plugin is enabled in the handsontable settings.\n *\n * @returns {Boolean}\n */\n isEnabled() {\n return !!(this.hot.getSettings().columnSorting);\n }\n\n /**\n * Enable plugin for this Handsontable instance.\n */\n enablePlugin() {\n if (this.enabled) {\n return;\n }\n\n this.setPluginOptions();\n\n const _this = this;\n this.hot.sortIndex = [];\n\n this.hot.sort = function() {\n let args = Array.prototype.slice.call(arguments);\n\n return _this.sortByColumn(...args);\n };\n\n if (typeof this.hot.getSettings().observeChanges === 'undefined') {\n this.enableObserveChangesPlugin();\n }\n\n this.addHook('afterTrimRow', (row) => this.sort());\n this.addHook('afterUntrimRow', (row) => this.sort());\n this.addHook('modifyRow', (row) => this.translateRow(row));\n this.addHook('unmodifyRow', (row) => this.untranslateRow(row));\n this.addHook('afterUpdateSettings', () => this.onAfterUpdateSettings());\n this.addHook('afterGetColHeader', (col, TH) => this.getColHeader(col, TH));\n this.addHook('afterOnCellMouseDown', (event, target) => this.onAfterOnCellMouseDown(event, target));\n this.addHook('afterCreateRow', function() {\n _this.afterCreateRow(...arguments);\n });\n this.addHook('afterRemoveRow', function() {\n _this.afterRemoveRow(...arguments);\n });\n this.addHook('afterInit', () => this.sortBySettings());\n this.addHook('afterLoadData', () => {\n this.hot.sortIndex = [];\n\n if (this.hot.view) {\n this.sortBySettings();\n }\n });\n if (this.hot.view) {\n this.sortBySettings();\n }\n super.enablePlugin();\n }\n\n /**\n * Disable plugin for this Handsontable instance.\n */\n disablePlugin() {\n this.hot.sort = void 0;\n super.disablePlugin();\n }\n\n /**\n * afterUpdateSettings callback.\n *\n * @private\n */\n onAfterUpdateSettings() {\n this.sortBySettings();\n }\n\n sortBySettings() {\n let sortingSettings = this.hot.getSettings().columnSorting;\n let loadedSortingState = this.loadSortingState();\n let sortingColumn;\n let sortingOrder;\n\n if (typeof loadedSortingState === 'undefined') {\n sortingColumn = sortingSettings.column;\n sortingOrder = sortingSettings.sortOrder;\n } else {\n sortingColumn = loadedSortingState.sortColumn;\n sortingOrder = loadedSortingState.sortOrder;\n }\n if (typeof sortingColumn === 'number') {\n this.lastSortedColumn = sortingColumn;\n this.sortByColumn(sortingColumn, sortingOrder);\n }\n }\n\n /**\n * Set sorted column and order info\n *\n * @param {number} col Sorted column index.\n * @param {boolean|undefined} order Sorting order (`true` for ascending, `false` for descending).\n */\n setSortingColumn(col, order) {\n if (typeof col == 'undefined') {\n this.hot.sortColumn = void 0;\n this.hot.sortOrder = void 0;\n\n return;\n } else if (this.hot.sortColumn === col && typeof order == 'undefined') {\n if (this.hot.sortOrder === false) {\n this.hot.sortOrder = void 0;\n } else {\n this.hot.sortOrder = !this.hot.sortOrder;\n }\n\n } else {\n this.hot.sortOrder = typeof order === 'undefined' ? true : order;\n }\n\n this.hot.sortColumn = col;\n }\n\n sortByColumn(col, order) {\n this.setSortingColumn(col, order);\n\n if (typeof this.hot.sortColumn == 'undefined') {\n return;\n }\n\n let allowSorting = this.hot.runHooks('beforeColumnSort', this.hot.sortColumn, this.hot.sortOrder);\n\n if (allowSorting !== false) {\n this.sort();\n }\n this.updateOrderClass();\n this.updateSortIndicator();\n\n this.hot.runHooks('afterColumnSort', this.hot.sortColumn, this.hot.sortOrder);\n\n this.hot.render();\n this.saveSortingState();\n }\n\n /**\n * Save the sorting state\n */\n saveSortingState() {\n let sortingState = {};\n\n if (typeof this.hot.sortColumn != 'undefined') {\n sortingState.sortColumn = this.hot.sortColumn;\n }\n\n if (typeof this.hot.sortOrder != 'undefined') {\n sortingState.sortOrder = this.hot.sortOrder;\n }\n\n if (hasOwnProperty(sortingState, 'sortColumn') || hasOwnProperty(sortingState, 'sortOrder')) {\n this.hot.runHooks('persistentStateSave', 'columnSorting', sortingState);\n }\n\n }\n\n /**\n * Load the sorting state.\n *\n * @returns {*} Previously saved sorting state.\n */\n loadSortingState() {\n let storedState = {};\n this.hot.runHooks('persistentStateLoad', 'columnSorting', storedState);\n\n return storedState.value;\n }\n\n /**\n * Update sorting class name state.\n */\n updateOrderClass() {\n let orderClass;\n\n if (this.hot.sortOrder === true) {\n orderClass = 'ascending';\n\n } else if (this.hot.sortOrder === false) {\n orderClass = 'descending';\n }\n this.sortOrderClass = orderClass;\n }\n\n enableObserveChangesPlugin() {\n let _this = this;\n\n this.hot._registerTimeout(\n setTimeout(() => {\n _this.hot.updateSettings({\n observeChanges: true\n });\n }, 0));\n }\n\n /**\n * Default sorting algorithm.\n *\n * @param {Boolean} sortOrder Sorting order - `true` for ascending, `false` for descending.\n * @param {Object} columnMeta Column meta object.\n * @returns {Function} The comparing function.\n */\n defaultSort(sortOrder, columnMeta) {\n return function(a, b) {\n if (typeof a[1] == 'string') {\n a[1] = a[1].toLowerCase();\n }\n if (typeof b[1] == 'string') {\n b[1] = b[1].toLowerCase();\n }\n\n if (a[1] === b[1]) {\n return 0;\n }\n\n if (isEmpty(a[1])) {\n if (isEmpty(b[1])) {\n return 0;\n }\n\n if (columnMeta.columnSorting.sortEmptyCells) {\n return sortOrder ? -1 : 1;\n }\n\n return 1;\n }\n if (isEmpty(b[1])) {\n if (isEmpty(a[1])) {\n return 0;\n }\n\n if (columnMeta.columnSorting.sortEmptyCells) {\n return sortOrder ? 1 : -1;\n }\n\n return -1;\n }\n\n if (isNaN(a[1]) && !isNaN(b[1])) {\n return sortOrder ? 1 : -1;\n\n } else if (!isNaN(a[1]) && isNaN(b[1])) {\n return sortOrder ? -1 : 1;\n\n } else if (!(isNaN(a[1]) || isNaN(b[1]))) {\n a[1] = parseFloat(a[1]);\n b[1] = parseFloat(b[1]);\n }\n if (a[1] < b[1]) {\n return sortOrder ? -1 : 1;\n }\n if (a[1] > b[1]) {\n return sortOrder ? 1 : -1;\n }\n\n return 0;\n };\n }\n\n /**\n * Date sorting algorithm\n * @param {Boolean} sortOrder Sorting order (`true` for ascending, `false` for descending).\n * @param {Object} columnMeta Column meta object.\n * @returns {Function} The compare function.\n */\n dateSort(sortOrder, columnMeta) {\n return function(a, b) {\n if (a[1] === b[1]) {\n return 0;\n }\n\n if (isEmpty(a[1])) {\n if (isEmpty(b[1])) {\n return 0;\n }\n\n if (columnMeta.columnSorting.sortEmptyCells) {\n return sortOrder ? -1 : 1;\n }\n\n return 1;\n }\n\n if (isEmpty(b[1])) {\n if (isEmpty(a[1])) {\n return 0;\n }\n\n if (columnMeta.columnSorting.sortEmptyCells) {\n return sortOrder ? 1 : -1;\n }\n\n return -1;\n }\n\n var aDate = moment(a[1], columnMeta.dateFormat);\n var bDate = moment(b[1], columnMeta.dateFormat);\n\n if (!aDate.isValid()) {\n return 1;\n }\n if (!bDate.isValid()) {\n return -1;\n }\n\n if (bDate.isAfter(aDate)) {\n return sortOrder ? -1 : 1;\n }\n if (bDate.isBefore(aDate)) {\n return sortOrder ? 1 : -1;\n }\n\n return 0;\n };\n }\n\n /**\n * Numeric sorting algorithm.\n *\n * @param {Boolean} sortOrder Sorting order (`true` for ascending, `false` for descending).\n * @param {Object} columnMeta Column meta object.\n * @returns {Function} The compare function.\n */\n numericSort(sortOrder, columnMeta) {\n return function(a, b) {\n const parsedA = parseFloat(a[1]);\n const parsedB = parseFloat(b[1]);\n\n // Watch out when changing this part of code!\n // Check below returns 0 (as expected) when comparing empty string, null, undefined\n if (parsedA === parsedB || (isNaN(parsedA) && isNaN(parsedB))) {\n return 0;\n }\n\n if (columnMeta.columnSorting.sortEmptyCells) {\n if (isEmpty(a[1])) {\n return sortOrder ? -1 : 1;\n }\n\n if (isEmpty(b[1])) {\n return sortOrder ? 1 : -1;\n }\n }\n\n if (isNaN(parsedA)) {\n return 1;\n }\n\n if (isNaN(parsedB)) {\n return -1;\n }\n\n if (parsedA < parsedB) {\n return sortOrder ? -1 : 1;\n\n } else if (parsedA > parsedB) {\n return sortOrder ? 1 : -1;\n }\n\n return 0;\n };\n }\n\n /**\n * Perform the sorting.\n */\n sort() {\n if (typeof this.hot.sortOrder == 'undefined') {\n this.hot.sortIndex.length = 0;\n\n return;\n }\n\n const colMeta = this.hot.getCellMeta(0, this.hot.sortColumn);\n const emptyRows = this.hot.countEmptyRows();\n let sortFunction;\n let nrOfRows;\n\n this.hot.sortingEnabled = false; // this is required by translateRow plugin hook\n this.hot.sortIndex.length = 0;\n\n if (typeof colMeta.columnSorting.sortEmptyCells === 'undefined') {\n colMeta.columnSorting = {sortEmptyCells: this.sortEmptyCells};\n }\n\n if (this.hot.getSettings().maxRows === Number.POSITIVE_INFINITY) {\n nrOfRows = this.hot.countRows() - this.hot.getSettings().minSpareRows;\n } else {\n nrOfRows = this.hot.countRows() - emptyRows;\n }\n\n for (let i = 0, ilen = nrOfRows; i < ilen; i++) {\n this.hot.sortIndex.push([i, this.hot.getDataAtCell(i, this.hot.sortColumn)]);\n }\n\n if (colMeta.sortFunction) {\n sortFunction = colMeta.sortFunction;\n\n } else {\n switch (colMeta.type) {\n case 'date':\n sortFunction = this.dateSort;\n break;\n case 'numeric':\n sortFunction = this.numericSort;\n break;\n default:\n sortFunction = this.defaultSort;\n }\n }\n\n mergeSort(this.hot.sortIndex, sortFunction(this.hot.sortOrder, colMeta));\n\n // Append spareRows\n for (let i = this.hot.sortIndex.length; i < this.hot.countRows(); i++) {\n this.hot.sortIndex.push([i, this.hot.getDataAtCell(i, this.hot.sortColumn)]);\n }\n\n this.hot.sortingEnabled = true; // this is required by translateRow plugin hook\n }\n\n /**\n * Update indicator states.\n */\n updateSortIndicator() {\n if (typeof this.hot.sortOrder == 'undefined') {\n return;\n }\n const colMeta = this.hot.getCellMeta(0, this.hot.sortColumn);\n\n this.sortIndicators[this.hot.sortColumn] = colMeta.sortIndicator;\n }\n\n /**\n * `modifyRow` hook callback. Translates physical row index to the sorted row index.\n *\n * @param {Number} row Row index.\n * @returns {Number} Sorted row index.\n */\n translateRow(row) {\n if (this.hot.sortingEnabled && (typeof this.hot.sortOrder !== 'undefined') && this.hot.sortIndex && this.hot.sortIndex.length && this.hot.sortIndex[row]) {\n return this.hot.sortIndex[row][0];\n }\n\n return row;\n }\n\n /**\n * Translates sorted row index to physical row index.\n *\n * @param {Number} row Sorted row index.\n * @returns {number} Physical row index.\n */\n untranslateRow(row) {\n if (this.hot.sortingEnabled && this.hot.sortIndex && this.hot.sortIndex.length) {\n for (var i = 0; i < this.hot.sortIndex.length; i++) {\n if (this.hot.sortIndex[i][0] == row) {\n return i;\n }\n }\n }\n }\n\n /**\n * `afterGetColHeader` callback. Adds column sorting css classes to clickable headers.\n *\n * @private\n * @param {Number} col Column index.\n * @param {Element} TH TH HTML element.\n */\n getColHeader(col, TH) {\n if (col < 0 || !TH.parentNode) {\n return false;\n }\n\n let headerLink = TH.querySelector('.colHeader');\n let colspan = TH.getAttribute('colspan');\n let TRs = TH.parentNode.parentNode.childNodes;\n let headerLevel = Array.prototype.indexOf.call(TRs, TH.parentNode);\n headerLevel -= TRs.length;\n\n if (!headerLink) {\n return;\n }\n\n if (this.hot.getSettings().columnSorting && col >= 0 && headerLevel === -1) {\n addClass(headerLink, 'columnSorting');\n }\n removeClass(headerLink, 'descending');\n removeClass(headerLink, 'ascending');\n\n if (this.sortIndicators[col]) {\n if (col === this.hot.sortColumn) {\n if (this.sortOrderClass === 'ascending') {\n addClass(headerLink, 'ascending');\n\n } else if (this.sortOrderClass === 'descending') {\n addClass(headerLink, 'descending');\n }\n }\n }\n }\n\n /**\n * Check if any column is in a sorted state.\n *\n * @returns {Boolean}\n */\n isSorted() {\n return typeof this.hot.sortColumn != 'undefined';\n }\n\n /**\n * `afterCreateRow` callback. Updates the sorting state after a row have been created.\n *\n * @private\n * @param {Number} index\n * @param {Number} amount\n */\n afterCreateRow(index, amount) {\n if (!this.isSorted()) {\n return;\n }\n\n for (let i = 0; i < this.hot.sortIndex.length; i++) {\n if (this.hot.sortIndex[i][0] >= index) {\n this.hot.sortIndex[i][0] += amount;\n }\n }\n\n for (let i = 0; i < amount; i++) {\n this.hot.sortIndex.splice(index + i, 0, [index + i, this.hot.getSourceData()[index + i][this.hot.sortColumn + this.hot.colOffset()]]);\n }\n\n this.saveSortingState();\n }\n\n /**\n * `afterRemoveRow` hook callback.\n *\n * @private\n * @param {Number} index\n * @param {Number} amount\n */\n afterRemoveRow(index, amount) {\n if (!this.isSorted()) {\n return;\n }\n let removedRows = this.hot.sortIndex.splice(index, amount);\n\n removedRows = arrayMap(removedRows, (row) => row[0]);\n\n function countRowShift(logicalRow) {\n // Todo: compare perf between reduce vs sort->each->brake\n return arrayReduce(removedRows, (count, removedLogicalRow) => {\n if (logicalRow > removedLogicalRow) {\n count++;\n }\n\n return count;\n }, 0);\n }\n\n this.hot.sortIndex = arrayMap(this.hot.sortIndex, (logicalRow, physicalRow) => {\n let rowShift = countRowShift(logicalRow[0]);\n\n if (rowShift) {\n logicalRow[0] -= rowShift;\n }\n\n return logicalRow;\n });\n\n this.saveSortingState();\n }\n\n /**\n * Set options by passed settings\n *\n * @private\n */\n setPluginOptions() {\n const columnSorting = this.hot.getSettings().columnSorting;\n\n if (typeof columnSorting === 'object') {\n this.sortEmptyCells = columnSorting.sortEmptyCells || false;\n\n } else {\n this.sortEmptyCells = false;\n }\n }\n\n /**\n * `onAfterOnCellMouseDown` hook callback.\n *\n * @private\n * @param {Event} event Event which are provided by hook.\n * @param {CellCoords} coords Coords of the selected cell.\n */\n onAfterOnCellMouseDown(event, coords) {\n if (coords.row > -1) {\n return;\n }\n\n if (hasClass(event.realTarget, 'columnSorting')) {\n // reset order state on every new column header click\n if (coords.col !== this.lastSortedColumn) {\n this.hot.sortOrder = true;\n }\n\n this.lastSortedColumn = coords.col;\n\n this.sortByColumn(coords.col);\n }\n }\n}\n\nregisterPlugin('columnSorting', ColumnSorting);\n\nexport default ColumnSorting;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/columnSorting/columnSorting.js","import {addClass} from './../../helpers/dom/element';\n\n/**\n * Comment editor for the Comments plugin.\n *\n * @class CommentEditor\n * @plugin Comments\n */\nclass CommentEditor {\n static get CLASS_EDITOR_CONTAINER() {\n return 'htCommentsContainer';\n }\n\n static get CLASS_EDITOR() {\n return 'htComments';\n }\n\n static get CLASS_INPUT() {\n return 'htCommentTextArea';\n }\n\n static get CLASS_CELL() {\n return 'htCommentCell';\n }\n\n constructor() {\n this.editor = this.createEditor();\n this.editorStyle = this.editor.style;\n\n this.hidden = true;\n\n this.hide();\n }\n\n /**\n * Set position of the comments editor according to the provided x and y coordinates.\n *\n * @param {Number} x X position (in pixels).\n * @param {Number} y Y position (in pixels).\n */\n setPosition(x, y) {\n this.editorStyle.left = `${x}px`;\n this.editorStyle.top = `${y}px`;\n }\n\n /**\n * Set the editor size according to the provided arguments.\n *\n * @param {Number} width Width in pixels.\n * @param {Number} height Height in pixels.\n */\n setSize(width, height) {\n if (width && height) {\n const input = this.getInputElement();\n\n input.style.width = `${width}px`;\n input.style.height = `${height}px`;\n }\n }\n\n /**\n * Reset the editor size to its initial state.\n */\n resetSize() {\n const input = this.getInputElement();\n\n input.style.width = '';\n input.style.height = '';\n }\n\n /**\n * Set the read-only state for the comments editor.\n *\n * @param {Boolean} state The new read only state.\n */\n setReadOnlyState(state) {\n const input = this.getInputElement();\n\n input.readOnly = state;\n }\n\n /**\n * Show the comments editor.\n */\n show() {\n this.editorStyle.display = 'block';\n this.hidden = false;\n }\n\n /**\n * Hide the comments editor.\n */\n hide() {\n this.editorStyle.display = 'none';\n this.hidden = true;\n }\n\n /**\n * Checks if the editor is visible.\n *\n * @returns {Boolean}\n */\n isVisible() {\n return this.editorStyle.display === 'block';\n }\n\n /**\n * Set the comment value.\n *\n * @param {String} [value] The value to use.\n */\n setValue(value = '') {\n value = value || '';\n this.getInputElement().value = value;\n }\n\n /**\n * Get the comment value.\n *\n * @returns {String}\n */\n getValue() {\n return this.getInputElement().value;\n }\n\n /**\n * Checks if the comment input element is focused.\n *\n * @returns {Boolean}\n */\n isFocused() {\n return document.activeElement === this.getInputElement();\n }\n\n /**\n * Focus the comments input element.\n */\n focus() {\n this.getInputElement().focus();\n }\n\n /**\n * Create the `textarea` to be used as a comments editor.\n *\n * @returns {HTMLElement}\n */\n createEditor() {\n let container = document.querySelector(`.${CommentEditor.CLASS_EDITOR_CONTAINER}`);\n let editor;\n let textArea;\n\n if (!container) {\n container = document.createElement('div');\n addClass(container, CommentEditor.CLASS_EDITOR_CONTAINER);\n document.body.appendChild(container);\n }\n editor = document.createElement('div');\n addClass(editor, CommentEditor.CLASS_EDITOR);\n\n textArea = document.createElement('textarea');\n addClass(textArea, CommentEditor.CLASS_INPUT);\n\n editor.appendChild(textArea);\n container.appendChild(editor);\n\n return editor;\n }\n\n /**\n * Get the input element.\n *\n * @returns {HTMLElement}\n */\n getInputElement() {\n return this.editor.querySelector(`.${CommentEditor.CLASS_INPUT}`);\n }\n\n /**\n * Destroy the comments editor.\n */\n destroy() {\n this.editor.parentNode.removeChild(this.editor);\n this.editor = null;\n this.editorStyle = null;\n }\n}\n\nexport default CommentEditor;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/comments/commentEditor.js","import {\n addClass,\n closest,\n isChildOf,\n hasClass,\n offset,\n outerWidth,\n outerHeight,\n getScrollableElement\n} from './../../helpers/dom/element';\nimport {\n deepClone, deepExtend\n} from './../../helpers/object';\nimport {\n debounce\n} from './../../helpers/function';\nimport EventManager from './../../eventManager';\nimport {CellCoords} from './../../3rdparty/walkontable/src';\nimport {registerPlugin, getPlugin} from './../../plugins';\nimport BasePlugin from './../_base';\nimport CommentEditor from './commentEditor';\nimport {checkSelectionConsistency, markLabelAsSelected} from './../contextMenu/utils';\n\nimport './comments.css';\n\nconst privatePool = new WeakMap();\nconst META_COMMENT = 'comment';\nconst META_COMMENT_VALUE = 'value';\nconst META_STYLE = 'style';\nconst META_READONLY = 'readOnly';\n\n/**\n * @plugin Comments\n *\n * @description\n * This plugin allows setting and managing cell comments by either an option in the context menu or with the use of the API.\n *\n * To enable the plugin, you'll need to set the comments property of the config object to `true`:\n * ```js\n * ...\n * comments: true\n * ...\n * ```\n *\n * To add comments at the table initialization, define the `comment` property in the `cell` config array as in an example below.\n *\n * @example\n *\n * ```js\n * ...\n * var hot = new Handsontable(document.getElementById('example'), {\n * date: getData(),\n * comments: true,\n * cell: [\n * {row: 1, col: 1, comment: {value: 'Foo'}},\n * {row: 2, col: 2, comment: {value: 'Bar'}}\n * ]\n * });\n *\n * // Access to the Comments plugin instance:\n * var commentsPlugin = hot.getPlugin('comments');\n *\n * // Manage comments programmatically:\n * commentsPlugin.editor.setCommentAtCell(1, 6, 'Comment contents');\n * commentsPlugin.showAtCell(1, 6);\n * commentsPlugin.removeCommentAtCell(1, 6);\n *\n * // You can also set range once and use proper methods:\n * commentsPlugin.setRange({row: 1, col: 6});\n * commentsPlugin.setComment('Comment contents');\n * commentsPlugin.show();\n * commentsPlugin.removeComment();\n * ...\n * ```\n */\nclass Comments extends BasePlugin {\n constructor(hotInstance) {\n super(hotInstance);\n /**\n * Instance of {@link CommentEditor}.\n *\n * @type {CommentEditor}\n */\n this.editor = null;\n /**\n * Instance of {@link EventManager}.\n *\n * @private\n * @type {EventManager}\n */\n this.eventManager = null;\n /**\n * Current cell range.\n *\n * @type {Object}\n */\n this.range = {};\n /**\n * @private\n * @type {Boolean}\n */\n this.mouseDown = false;\n /**\n * @private\n * @type {Boolean}\n */\n this.contextMenuEvent = false;\n /**\n * @private\n * @type {*}\n */\n this.timer = null;\n /**\n * Delay used when showing/hiding the comments (in milliseconds).\n *\n * @type {Number}\n */\n this.displayDelay = 250;\n\n privatePool.set(this, {\n tempEditorDimensions: {},\n cellBelowCursor: null\n });\n }\n\n /**\n * Check if the plugin is enabled in the Handsontable settings.\n *\n * @returns {Boolean}\n */\n isEnabled() {\n return !!this.hot.getSettings().comments;\n }\n\n /**\n * Enable plugin for this Handsontable instance.\n */\n enablePlugin() {\n if (this.enabled) {\n return;\n }\n\n if (!this.editor) {\n this.editor = new CommentEditor();\n }\n\n if (!this.eventManager) {\n this.eventManager = new EventManager(this);\n }\n\n this.addHook('afterContextMenuDefaultOptions', (options) => this.addToContextMenu(options));\n this.addHook('afterRenderer', (TD, row, col, prop, value, cellProperties) => this.onAfterRenderer(TD, cellProperties));\n this.addHook('afterScrollHorizontally', () => this.hide());\n this.addHook('afterScrollVertically', () => this.hide());\n\n this.addHook('afterBeginEditing', (args) => this.onAfterBeginEditing(args));\n\n this.registerListeners();\n\n super.enablePlugin();\n }\n\n /**\n * Disable plugin for this Handsontable instance.\n */\n disablePlugin() {\n super.disablePlugin();\n }\n\n /**\n * Register all necessary DOM listeners.\n *\n * @private\n */\n registerListeners() {\n this.eventManager.addEventListener(document, 'mouseover', (event) => this.onMouseOver(event));\n this.eventManager.addEventListener(document, 'mousedown', (event) => this.onMouseDown(event));\n this.eventManager.addEventListener(document, 'mouseup', (event) => this.onMouseUp(event));\n this.eventManager.addEventListener(this.editor.getInputElement(), 'blur', (event) => this.onEditorBlur(event));\n this.eventManager.addEventListener(this.editor.getInputElement(), 'mousedown', (event) => this.onEditorMouseDown(event));\n this.eventManager.addEventListener(this.editor.getInputElement(), 'mouseup', (event) => this.onEditorMouseUp(event));\n }\n\n /**\n * Set current cell range to be able to use general methods like {@link Comments#setComment},\n * {@link Comments#removeComment}, {@link Comments#show}.\n *\n * @param {Object} range Object with `from` and `to` properties, each with `row` and `col` properties.\n */\n setRange(range) {\n this.range = range;\n }\n\n /**\n * Clear the currently selected cell.\n */\n clearRange() {\n this.range = {};\n }\n\n /**\n * Check if the event target is a cell containing a comment.\n *\n * @param {Event} event DOM event\n * @returns {Boolean}\n */\n targetIsCellWithComment(event) {\n const closestCell = closest(event.target, 'TD', 'TBODY');\n\n return !!(closestCell && hasClass(closestCell, 'htCommentCell') && closest(closestCell, [this.hot.rootElement]));\n }\n\n /**\n * Check if the event target is a comment textarea.\n *\n * @param {Event} event DOM event.\n * @returns {Boolean}\n */\n targetIsCommentTextArea(event) {\n return this.editor.getInputElement() === event.target;\n }\n\n /**\n * Set a comment for a cell according to the previously set range (see {@link Comments#setRange}).\n *\n * @param {String} value Comment contents.\n */\n setComment(value) {\n if (!this.range.from) {\n throw new Error('Before using this method, first set cell range (hot.getPlugin(\"comment\").setRange())');\n }\n const editorValue = this.editor.getValue();\n let comment = '';\n\n if (value != null) {\n comment = value;\n } else if (editorValue != null) {\n comment = editorValue;\n }\n\n let row = this.range.from.row;\n let col = this.range.from.col;\n\n this.updateCommentMeta(row, col, {[META_COMMENT_VALUE]: comment});\n this.hot.render();\n }\n\n /**\n * Set a comment for a cell.\n *\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @param {String} value Comment contents.\n */\n setCommentAtCell(row, col, value) {\n this.setRange({\n from: new CellCoords(row, col)\n });\n this.setComment(value);\n }\n\n /**\n * Remove a comment from a cell according to previously set range (see {@link Comments#setRange}).\n *\n * @param {Boolean} [forceRender = true] If set to `true`, the table will be re-rendered at the end of the operation.\n */\n removeComment(forceRender = true) {\n if (!this.range.from) {\n throw new Error('Before using this method, first set cell range (hot.getPlugin(\"comment\").setRange())');\n }\n\n this.hot.setCellMeta(this.range.from.row, this.range.from.col, META_COMMENT, void 0);\n\n if (forceRender) {\n this.hot.render();\n }\n\n this.hide();\n }\n\n /**\n * Remove comment from a cell.\n *\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @param {Boolean} [forceRender = true] If `true`, the table will be re-rendered at the end of the operation.\n */\n removeCommentAtCell(row, col, forceRender = true) {\n this.setRange({\n from: new CellCoords(row, col)\n });\n this.removeComment(forceRender);\n }\n\n /**\n * Get comment from a cell at the predefined range.\n */\n getComment() {\n const row = this.range.from.row;\n const column = this.range.from.col;\n\n return this.getCommentMeta(row, column, META_COMMENT_VALUE);\n }\n\n /**\n * Get comment from a cell at the provided coordinates.\n *\n * @param {Number} row Row index.\n * @param {Number} column Column index.\n */\n getCommentAtCell(row, column) {\n return this.getCommentMeta(row, column, META_COMMENT_VALUE);\n }\n\n /**\n * Show the comment editor accordingly to the previously set range (see {@link Comments#setRange}).\n *\n * @returns {Boolean} Returns `true` if comment editor was shown.\n */\n show() {\n if (!this.range.from) {\n throw new Error('Before using this method, first set cell range (hot.getPlugin(\"comment\").setRange())');\n }\n let meta = this.hot.getCellMeta(this.range.from.row, this.range.from.col);\n\n this.refreshEditor(true);\n this.editor.setValue(meta[META_COMMENT] ? meta[META_COMMENT][META_COMMENT_VALUE] : null || '');\n\n if (this.editor.hidden) {\n this.editor.show();\n }\n\n return true;\n }\n\n /**\n * Show comment editor according to cell coordinates.\n *\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @returns {Boolean} Returns `true` if comment editor was shown.\n */\n showAtCell(row, col) {\n this.setRange({\n from: new CellCoords(row, col)\n });\n\n return this.show();\n }\n\n /**\n * Hide the comment editor.\n */\n hide() {\n if (!this.editor.hidden) {\n this.editor.hide();\n }\n }\n\n /**\n * Refresh comment editor position and styling.\n *\n * @param {Boolean} [force=false] If `true` then recalculation will be forced.\n */\n refreshEditor(force = false) {\n if (!force && (!this.range.from || !this.editor.isVisible())) {\n return;\n }\n const scrollableElement = getScrollableElement(this.hot.view.wt.wtTable.TABLE);\n const TD = this.hot.view.wt.wtTable.getCell(this.range.from);\n const row = this.range.from.row;\n const column = this.range.from.col;\n let cellOffset = offset(TD);\n let lastColWidth = this.hot.view.wt.wtTable.getStretchedColumnWidth(column);\n let cellTopOffset = cellOffset.top < 0 ? 0 : cellOffset.top;\n let cellLeftOffset = cellOffset.left;\n\n if (this.hot.view.wt.wtViewport.hasVerticalScroll() && scrollableElement !== window) {\n cellTopOffset -= this.hot.view.wt.wtOverlays.topOverlay.getScrollPosition();\n }\n\n if (this.hot.view.wt.wtViewport.hasHorizontalScroll() && scrollableElement !== window) {\n cellLeftOffset -= this.hot.view.wt.wtOverlays.leftOverlay.getScrollPosition();\n }\n\n let x = cellLeftOffset + lastColWidth;\n let y = cellTopOffset;\n\n const commentStyle = this.getCommentMeta(row, column, META_STYLE);\n const readOnly = this.getCommentMeta(row, column, META_READONLY);\n\n if (commentStyle) {\n this.editor.setSize(commentStyle.width, commentStyle.height);\n } else {\n this.editor.resetSize();\n }\n\n this.editor.setReadOnlyState(readOnly);\n\n this.editor.setPosition(x, y);\n }\n\n /**\n * Check if there is a comment for selected range.\n *\n * @private\n * @returns {Boolean}\n */\n checkSelectionCommentsConsistency() {\n const selected = this.hot.getSelectedRange();\n\n if (!selected) {\n return false;\n }\n let hasComment = false;\n let cell = selected.from; // IN EXCEL THERE IS COMMENT ONLY FOR TOP LEFT CELL IN SELECTION\n\n if (this.getCommentMeta(cell.row, cell.col, META_COMMENT_VALUE)) {\n hasComment = true;\n }\n\n return hasComment;\n }\n\n /**\n * Set or update the comment-related cell meta.\n *\n * @param {Number} row Row index.\n * @param {Number} column Column index.\n * @param {Object} metaObject Object defining all the comment-related meta information.\n */\n updateCommentMeta(row, column, metaObject) {\n const oldComment = this.hot.getCellMeta(row, column)[META_COMMENT];\n let newComment;\n\n if (oldComment) {\n newComment = deepClone(oldComment);\n deepExtend(newComment, metaObject);\n } else {\n newComment = metaObject;\n }\n\n this.hot.setCellMeta(row, column, META_COMMENT, newComment);\n }\n\n /**\n * Get the comment related meta information.\n *\n * @param {Number} row Row index.\n * @param {Number} column Column index.\n * @param {String} property Cell meta property.\n * @returns {Mixed}\n */\n getCommentMeta(row, column, property) {\n const cellMeta = this.hot.getCellMeta(row, column);\n\n if (!cellMeta[META_COMMENT]) {\n return void 0;\n }\n\n return cellMeta[META_COMMENT][property];\n }\n\n /**\n * `mousedown` event callback.\n *\n * @private\n * @param {MouseEvent} event The `mousedown` event.\n */\n onMouseDown(event) {\n this.mouseDown = true;\n\n if (!this.hot.view || !this.hot.view.wt) {\n return;\n }\n\n if (!this.contextMenuEvent && !this.targetIsCommentTextArea(event)) {\n const eventCell = closest(event.target, 'TD', 'TBODY');\n let coordinates = null;\n\n if (eventCell) {\n coordinates = this.hot.view.wt.wtTable.getCoords(eventCell);\n }\n\n if (!eventCell || ((this.range.from && coordinates) && (this.range.from.row !== coordinates.row || this.range.from.col !== coordinates.col))) {\n this.hide();\n }\n }\n this.contextMenuEvent = false;\n }\n\n /**\n * `mouseover` event callback.\n *\n * @private\n * @param {MouseEvent} event The `mouseover` event.\n */\n onMouseOver(event) {\n if (this.mouseDown || this.editor.isFocused()) {\n return;\n }\n const priv = privatePool.get(this);\n priv.cellBelowCursor = document.elementFromPoint(event.clientX, event.clientY);\n\n debounce(() => {\n if (hasClass(event.target, 'wtBorder') || priv.cellBelowCursor !== event.target || !this.editor) {\n return;\n }\n\n if (this.targetIsCellWithComment(event)) {\n let coordinates = this.hot.view.wt.wtTable.getCoords(event.target);\n let range = {\n from: new CellCoords(coordinates.row, coordinates.col)\n };\n\n this.setRange(range);\n this.show();\n\n } else if (isChildOf(event.target, document) && !this.targetIsCommentTextArea(event) && !this.editor.isFocused()) {\n this.hide();\n }\n }, this.displayDelay)();\n }\n\n /**\n * `mouseup` event callback.\n *\n * @private\n * @param {MouseEvent} event The `mouseup` event.\n */\n onMouseUp(event) {\n this.mouseDown = false;\n }\n\n /** *\n * The `afterRenderer` hook callback..\n *\n * @private\n * @param {HTMLTableCellElement} TD The rendered `TD` element.\n * @param {Object} cellProperties The rendered cell's property object.\n */\n onAfterRenderer(TD, cellProperties) {\n if (cellProperties[META_COMMENT] && cellProperties[META_COMMENT][META_COMMENT_VALUE]) {\n addClass(TD, cellProperties.commentedCellClassName);\n }\n }\n\n /**\n * `blur` event callback for the comment editor.\n *\n * @private\n * @param {Event} event The `blur` event.\n */\n onEditorBlur(event) {\n this.setComment();\n }\n\n /**\n * `mousedown` hook. Along with `onEditorMouseUp` used to simulate the textarea resizing event.\n *\n * @private\n * @param {MouseEvent} event The `mousedown` event.\n */\n onEditorMouseDown(event) {\n const priv = privatePool.get(this);\n\n priv.tempEditorDimensions = {\n width: outerWidth(event.target),\n height: outerHeight(event.target)\n };\n }\n\n /**\n * `mouseup` hook. Along with `onEditorMouseDown` used to simulate the textarea resizing event.\n *\n * @private\n * @param {MouseEvent} event The `mouseup` event.\n */\n onEditorMouseUp(event) {\n const priv = privatePool.get(this);\n const currentWidth = outerWidth(event.target);\n const currentHeight = outerHeight(event.target);\n\n if (currentWidth !== priv.tempEditorDimensions.width + 1 || currentHeight !== priv.tempEditorDimensions.height + 2) {\n this.updateCommentMeta(this.range.from.row, this.range.from.col, {\n [META_STYLE]: {\n width: currentWidth,\n height: currentHeight\n }\n });\n }\n }\n\n /**\n * Context Menu's \"Add comment\" callback. Results in showing the comment editor.\n *\n * @private\n */\n onContextMenuAddComment() {\n let coords = this.hot.getSelectedRange();\n\n this.contextMenuEvent = true;\n this.setRange({\n from: coords.from\n });\n this.show();\n setTimeout(() => {\n if (this.hot) {\n this.hot.deselectCell();\n this.editor.focus();\n }\n }, 10);\n }\n\n /**\n * Context Menu's \"remove comment\" callback.\n *\n * @private\n * @param {Object} selection The current selection.\n */\n onContextMenuRemoveComment(selection) {\n this.contextMenuEvent = true;\n\n for (let i = selection.start.row; i <= selection.end.row; i++) {\n for (let j = selection.start.col; j <= selection.end.col; j++) {\n this.removeCommentAtCell(i, j, false);\n }\n }\n\n this.hot.render();\n }\n\n /**\n * Context Menu's \"make comment read-only\" callback.\n *\n * @private\n * @param {Object} selection The current selection.\n */\n onContextMenuMakeReadOnly(selection) {\n this.contextMenuEvent = true;\n\n for (let i = selection.start.row; i <= selection.end.row; i++) {\n for (let j = selection.start.col; j <= selection.end.col; j++) {\n let currentState = !!this.getCommentMeta(i, j, META_READONLY);\n\n this.updateCommentMeta(i, j, {[META_READONLY]: !currentState});\n }\n }\n }\n\n /**\n * Add Comments plugin options to the Context Menu.\n *\n * @private\n * @param {Object} defaultOptions\n */\n addToContextMenu(defaultOptions) {\n defaultOptions.items.push(\n getPlugin(this.hot, 'contextMenu').constructor.SEPARATOR,\n {\n key: 'commentsAddEdit',\n name: () => (this.checkSelectionCommentsConsistency() ? 'Edit comment' : 'Add comment'),\n callback: () => this.onContextMenuAddComment(),\n disabled() {\n return !(this.getSelected() && !this.selection.selectedHeader.corner);\n }\n },\n {\n key: 'commentsRemove',\n name() {\n return 'Delete comment';\n },\n callback: (key, selection) => this.onContextMenuRemoveComment(selection),\n disabled: () => this.hot.selection.selectedHeader.corner\n },\n {\n key: 'commentsReadOnly',\n name() {\n let label = 'Read only comment';\n let hasProperty = checkSelectionConsistency(this.getSelectedRange(), (row, col) => {\n let readOnlyProperty = this.getCellMeta(row, col)[META_COMMENT];\n if (readOnlyProperty) {\n readOnlyProperty = readOnlyProperty[META_READONLY];\n }\n\n if (readOnlyProperty) {\n return true;\n }\n });\n\n if (hasProperty) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback: (key, selection) => this.onContextMenuMakeReadOnly(selection),\n disabled: () => this.hot.selection.selectedHeader.corner || !this.checkSelectionCommentsConsistency()\n }\n );\n }\n\n /**\n * `afterBeginEditing` hook callback.\n *\n * @private\n * @param {Number} row Row index of the currently edited cell.\n * @param {Number} column Column index of the currently edited cell.\n */\n onAfterBeginEditing(row, column) {\n this.hide();\n }\n\n /**\n * Destroy plugin instance.\n */\n destroy() {\n if (this.editor) {\n this.editor.destroy();\n }\n super.destroy();\n }\n}\n\nregisterPlugin('comments', Comments);\n\nexport default Comments;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/comments/comments.js","import {arrayEach} from './../../helpers/array';\nimport {hasOwnProperty} from './../../helpers/object';\n\n/**\n * Command executor for ContextMenu.\n *\n * @class CommandExecutor\n * @plugin ContextMenu\n */\nclass CommandExecutor {\n constructor(hotInstance) {\n this.hot = hotInstance;\n this.commands = {};\n this.commonCallback = null;\n }\n\n /**\n * Register command.\n *\n * @param {String} name Command name.\n * @param {Object} commandDescriptor Command descriptor object with properties like `key` (command id),\n * `callback` (task to execute), `name` (command name), `disabled` (command availability).\n */\n registerCommand(name, commandDescriptor) {\n this.commands[name] = commandDescriptor;\n }\n\n /**\n * Set common callback which will be trigger on every executed command.\n *\n * @param {Function} callback Function which will be fired on every command execute.\n */\n setCommonCallback(callback) {\n this.commonCallback = callback;\n }\n\n /**\n * Execute command by its name.\n *\n * @param {String} commandName Command id.\n * @param {*} params Arguments passed to command task.\n */\n execute(commandName, ...params) {\n let commandSplit = commandName.split(':');\n commandName = commandSplit[0];\n\n let subCommandName = commandSplit.length === 2 ? commandSplit[1] : null;\n let command = this.commands[commandName];\n\n if (!command) {\n throw new Error(`Menu command '${commandName}' not exists.`);\n }\n if (subCommandName && command.submenu) {\n command = findSubCommand(subCommandName, command.submenu.items);\n }\n if (command.disabled === true) {\n return;\n }\n if (typeof command.disabled == 'function' && command.disabled.call(this.hot) === true) {\n return;\n }\n if (hasOwnProperty(command, 'submenu')) {\n return;\n }\n let callbacks = [];\n\n if (typeof command.callback === 'function') {\n callbacks.push(command.callback);\n }\n if (typeof this.commonCallback === 'function') {\n callbacks.push(this.commonCallback);\n }\n params.unshift(commandSplit.join(':'));\n arrayEach(callbacks, (callback) => callback.apply(this.hot, params));\n }\n}\n\nfunction findSubCommand(subCommandName, subCommands) {\n let command;\n\n arrayEach(subCommands, (cmd) => {\n let cmds = cmd.key ? cmd.key.split(':') : null;\n\n if (Array.isArray(cmds) && cmds[1] === subCommandName) {\n command = cmd;\n\n return false;\n }\n });\n\n return command;\n}\n\nexport default CommandExecutor;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/commandExecutor.js","import BasePlugin from './../_base';\nimport Hooks from './../../pluginHooks';\nimport {arrayEach} from './../../helpers/array';\nimport CommandExecutor from './commandExecutor';\nimport EventManager from './../../eventManager';\nimport ItemsFactory from './itemsFactory';\nimport Menu from './menu';\nimport {registerPlugin} from './../../plugins';\nimport {stopPropagation, pageX, pageY} from './../../helpers/dom/event';\nimport {getWindowScrollLeft, getWindowScrollTop, hasClass} from './../../helpers/dom/element';\nimport {\n ROW_ABOVE,\n ROW_BELOW,\n COLUMN_LEFT,\n COLUMN_RIGHT,\n REMOVE_ROW,\n REMOVE_COLUMN,\n UNDO,\n REDO,\n READ_ONLY,\n ALIGNMENT,\n SEPARATOR\n} from './predefinedItems';\n\nimport './contextMenu.css';\n\nHooks.getSingleton().register('afterContextMenuDefaultOptions');\nHooks.getSingleton().register('afterContextMenuShow');\nHooks.getSingleton().register('afterContextMenuHide');\nHooks.getSingleton().register('afterContextMenuExecute');\n\n/**\n * @description\n * This plugin creates the Handsontable Context Menu. It allows to create a new row or\n * column at any place in the grid among [other features](http://docs.handsontable.com/demo-context-menu.html).\n * Possible values:\n * * `true` (to enable default options),\n * * `false` (to disable completely)\n *\n * or array of any available strings:\n * * `[\"row_above\", \"row_below\", \"col_left\", \"col_right\",\n * \"remove_row\", \"remove_col\", \"---------\", \"undo\", \"redo\"]`.\n *\n * See [the context menu demo](http://docs.handsontable.com/demo-context-menu.html) for examples.\n *\n * @example\n * ```js\n * ...\n * // as a boolean\n * contextMenu: true\n * ...\n * // as a array\n * contextMenu: ['row_above', 'row_below', '---------', 'undo', 'redo']\n * ...\n * ```\n *\n * @plugin ContextMenu\n */\nclass ContextMenu extends BasePlugin {\n /**\n * Default menu items order when `contextMenu` is enabled by `true`.\n *\n * @returns {Array}\n */\n static get DEFAULT_ITEMS() {\n return [\n ROW_ABOVE, ROW_BELOW,\n SEPARATOR,\n COLUMN_LEFT, COLUMN_RIGHT,\n SEPARATOR,\n REMOVE_ROW, REMOVE_COLUMN,\n SEPARATOR,\n UNDO, REDO,\n SEPARATOR,\n READ_ONLY,\n SEPARATOR,\n ALIGNMENT,\n ];\n }\n\n constructor(hotInstance) {\n super(hotInstance);\n /**\n * Instance of {@link EventManager}.\n *\n * @type {EventManager}\n */\n this.eventManager = new EventManager(this);\n /**\n * Instance of {@link CommandExecutor}.\n *\n * @type {CommandExecutor}\n */\n this.commandExecutor = new CommandExecutor(this.hot);\n /**\n * Instance of {@link ItemsFactory}.\n *\n * @type {ItemsFactory}\n */\n this.itemsFactory = null;\n /**\n * Instance of {@link Menu}.\n *\n * @type {Menu}\n */\n this.menu = null;\n }\n\n /**\n * Check if the plugin is enabled in the Handsontable settings.\n *\n * @returns {Boolean}\n */\n isEnabled() {\n return this.hot.getSettings().contextMenu;\n }\n\n /**\n * Enable plugin for this Handsontable instance.\n */\n enablePlugin() {\n if (this.enabled) {\n return;\n }\n this.itemsFactory = new ItemsFactory(this.hot, ContextMenu.DEFAULT_ITEMS);\n\n const settings = this.hot.getSettings().contextMenu;\n let predefinedItems = {\n items: this.itemsFactory.getItems(settings)\n };\n this.registerEvents();\n\n if (typeof settings.callback === 'function') {\n this.commandExecutor.setCommonCallback(settings.callback);\n }\n super.enablePlugin();\n\n this.callOnPluginsReady(() => {\n this.hot.runHooks('afterContextMenuDefaultOptions', predefinedItems);\n\n this.itemsFactory.setPredefinedItems(predefinedItems.items);\n let menuItems = this.itemsFactory.getItems(settings);\n\n this.menu = new Menu(this.hot, {\n className: 'htContextMenu',\n keepInViewport: true\n });\n this.hot.runHooks('beforeContextMenuSetItems', menuItems);\n\n this.menu.setMenuItems(menuItems);\n\n this.menu.addLocalHook('afterOpen', () => this.onMenuAfterOpen());\n this.menu.addLocalHook('afterClose', () => this.onMenuAfterClose());\n this.menu.addLocalHook('executeCommand', (...params) => this.executeCommand.apply(this, params));\n\n // Register all commands. Predefined and added by user or by plugins\n arrayEach(menuItems, (command) => this.commandExecutor.registerCommand(command.key, command));\n });\n }\n\n /**\n * Updates the plugin to use the latest options you have specified.\n */\n updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n super.updatePlugin();\n }\n\n /**\n * Disable plugin for this Handsontable instance.\n */\n disablePlugin() {\n this.close();\n\n if (this.menu) {\n this.menu.destroy();\n this.menu = null;\n }\n super.disablePlugin();\n }\n\n /**\n * Register dom listeners.\n *\n * @private\n */\n registerEvents() {\n this.eventManager.addEventListener(this.hot.rootElement, 'contextmenu', (event) => this.onContextMenu(event));\n }\n\n /**\n * Open menu and re-position it based on dom event object.\n *\n * @param {Event} event The event object.\n */\n open(event) {\n if (!this.menu) {\n return;\n }\n this.menu.open();\n this.menu.setPosition({\n top: parseInt(pageY(event), 10) - getWindowScrollTop(),\n left: parseInt(pageX(event), 10) - getWindowScrollLeft(),\n });\n\n // ContextMenu is not detected HotTableEnv correctly because is injected outside hot-table\n this.menu.hotMenu.isHotTableEnv = this.hot.isHotTableEnv;\n // Handsontable.eventManager.isHotTableEnv = this.hot.isHotTableEnv;\n }\n\n /**\n * Close menu.\n */\n close() {\n if (!this.menu) {\n return;\n }\n this.menu.close();\n }\n\n /**\n * Execute context menu command.\n *\n * You can execute all predefined commands:\n * * `'row_above'` - Insert row above\n * * `'row_below'` - Insert row below\n * * `'col_left'` - Insert column on the left\n * * `'col_right'` - Insert column on the right\n * * `'clear_column'` - Clear selected column\n * * `'remove_row'` - Remove row\n * * `'remove_col'` - Remove column\n * * `'undo'` - Undo last action\n * * `'redo'` - Redo last action\n * * `'make_read_only'` - Make cell read only\n * * `'alignment:left'` - Alignment to the left\n * * `'alignment:top'` - Alignment to the top\n * * `'alignment:right'` - Alignment to the right\n * * `'alignment:bottom'` - Alignment to the bottom\n * * `'alignment:middle'` - Alignment to the middle\n * * `'alignment:center'` - Alignment to the center (justify)\n *\n * Or you can execute command registered in settings where `key` is your command name.\n *\n * @param {String} commandName\n * @param {*} params\n */\n executeCommand(...params) {\n this.commandExecutor.execute.apply(this.commandExecutor, params);\n }\n\n /**\n * On context menu listener.\n *\n * @private\n * @param {Event} event\n */\n onContextMenu(event) {\n let settings = this.hot.getSettings();\n let showRowHeaders = settings.rowHeaders;\n let showColHeaders = settings.colHeaders;\n\n function isValidElement(element) {\n return element.nodeName === 'TD' || element.parentNode.nodeName === 'TD';\n }\n // if event is from hot-table we must get web component element not element inside him\n let element = event.realTarget;\n this.close();\n\n if (hasClass(element, 'handsontableInput')) {\n return;\n }\n\n event.preventDefault();\n stopPropagation(event);\n\n if (!(showRowHeaders || showColHeaders)) {\n if (!isValidElement(element) && !(hasClass(element, 'current') && hasClass(element, 'wtBorder'))) {\n return;\n }\n }\n\n this.open(event);\n }\n\n /**\n * On menu after open listener.\n *\n * @private\n */\n onMenuAfterOpen() {\n this.hot.runHooks('afterContextMenuShow', this);\n }\n\n /**\n * On menu after close listener.\n *\n * @private\n */\n onMenuAfterClose() {\n this.hot.listen();\n this.hot.runHooks('afterContextMenuHide', this);\n }\n\n /**\n * Destroy instance.\n */\n destroy() {\n this.close();\n\n if (this.menu) {\n this.menu.destroy();\n }\n super.destroy();\n }\n}\n\nContextMenu.SEPARATOR = {\n name: SEPARATOR\n};\n\nregisterPlugin('contextMenu', ContextMenu);\n\nexport default ContextMenu;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/contextMenu.js","import {objectEach, isObject, extend} from './../../helpers/object';\nimport {arrayEach} from './../../helpers/array';\nimport {\n SEPARATOR,\n ITEMS,\n predefinedItems\n} from './predefinedItems';\n\n/**\n * Predefined items class factory for menu items.\n *\n * @class ItemsFactory\n * @plugin ContextMenu\n */\nclass ItemsFactory {\n constructor(hotInstance, orderPattern = null) {\n this.hot = hotInstance;\n this.predefinedItems = predefinedItems();\n this.defaultOrderPattern = orderPattern;\n }\n\n /**\n * Set predefined items.\n *\n * @param {Array} predefinedItems Array of predefined items.\n */\n setPredefinedItems(predefinedItems) {\n let items = {};\n\n this.defaultOrderPattern.length = 0;\n\n objectEach(predefinedItems, (value, key) => {\n let menuItemKey = '';\n\n if (value.name === SEPARATOR) {\n items[SEPARATOR] = value;\n menuItemKey = SEPARATOR;\n\n // Menu item added as a property to array\n } else if (isNaN(parseInt(key, 10))) {\n value.key = value.key === void 0 ? key : value.key;\n items[key] = value;\n menuItemKey = value.key;\n\n } else {\n items[value.key] = value;\n menuItemKey = value.key;\n }\n this.defaultOrderPattern.push(menuItemKey);\n });\n this.predefinedItems = items;\n }\n\n /**\n * Get all menu items based on pattern.\n *\n * @param {Array|Object|Boolean} pattern Pattern which you can define by displaying menu items order. If `true` default\n * pattern will be used.\n * @returns {Array}\n */\n getItems(pattern = null) {\n return getItems(pattern, this.defaultOrderPattern, this.predefinedItems);\n }\n}\n\nfunction getItems(pattern = null, defaultPattern = [], items = {}) {\n let result = [];\n\n if (pattern && pattern.items) {\n pattern = pattern.items;\n\n } else if (!Array.isArray(pattern)) {\n pattern = defaultPattern;\n }\n if (isObject(pattern)) {\n objectEach(pattern, (value, key) => {\n let item = items[typeof value === 'string' ? value : key];\n\n if (!item) {\n item = value;\n }\n if (isObject(value)) {\n extend(item, value);\n\n } else if (typeof item === 'string') {\n item = {name: item};\n }\n if (item.key === void 0) {\n item.key = key;\n }\n result.push(item);\n });\n } else {\n arrayEach(pattern, (name, key) => {\n let item = items[name];\n\n // Item deleted from settings `allowInsertRow: false` etc.\n if (!item && ITEMS.indexOf(name) >= 0) {\n return;\n }\n if (!item) {\n item = {name, key: `${key}`};\n }\n if (isObject(name)) {\n extend(item, name);\n }\n if (item.key === void 0) {\n item.key = key;\n }\n result.push(item);\n });\n }\n\n return result;\n}\n\nexport default ItemsFactory;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/itemsFactory.js","import Core from './../../core';\nimport {\n addClass,\n empty,\n fastInnerHTML,\n getScrollbarWidth,\n isChildOf,\n removeClass,\n} from './../../helpers/dom/element';\nimport {arrayEach, arrayFilter, arrayReduce} from './../../helpers/array';\nimport Cursor from './cursor';\nimport EventManager from './../../eventManager';\nimport {mixin, hasOwnProperty} from './../../helpers/object';\nimport {debounce} from './../../helpers/function';\nimport {filterSeparators, hasSubMenu, isDisabled, isItemHidden, isSeparator, isSelectionDisabled, normalizeSelection} from './utils';\nimport {KEY_CODES} from './../../helpers/unicode';\nimport localHooks from './../../mixins/localHooks';\nimport {SEPARATOR} from './predefinedItems';\nimport {stopImmediatePropagation} from './../../helpers/dom/event';\n\n/**\n * @class Menu\n * @plugin ContextMenu\n */\nclass Menu {\n constructor(hotInstance, options) {\n this.hot = hotInstance;\n this.options = options || {\n parent: null,\n name: null,\n className: '',\n keepInViewport: true,\n standalone: false\n };\n this.eventManager = new EventManager(this);\n this.container = this.createContainer(this.options.name);\n this.hotMenu = null;\n this.hotSubMenus = {};\n this.parentMenu = this.options.parent || null;\n this.menuItems = null;\n this.origOutsideClickDeselects = null;\n this.keyEvent = false;\n\n this.offset = {\n above: 0,\n below: 0,\n left: 0,\n right: 0\n };\n this._afterScrollCallback = null;\n\n this.registerEvents();\n }\n\n /**\n * Register event listeners.\n *\n * @private\n */\n registerEvents() {\n this.eventManager.addEventListener(document.documentElement, 'mousedown', (event) => this.onDocumentMouseDown(event));\n }\n\n /**\n * Set array of objects which defines menu items.\n *\n * @param {Array} menuItems Menu items to display.\n */\n setMenuItems(menuItems) {\n this.menuItems = menuItems;\n }\n\n /**\n * Set offset menu position for specified area (`above`, `below`, `left` or `right`).\n *\n * @param {String} area Specified area name (`above`, `below`, `left` or `right`).\n * @param {Number} offset Offset value.\n */\n setOffset(area, offset = 0) {\n this.offset[area] = offset;\n }\n\n /**\n * Check if menu is using as sub-menu.\n *\n * @returns {Boolean}\n */\n isSubMenu() {\n return this.parentMenu !== null;\n }\n\n /**\n * Open menu.\n */\n open() {\n this.container.removeAttribute('style');\n this.container.style.display = 'block';\n\n const delayedOpenSubMenu = debounce((row) => this.openSubMenu(row), 300);\n\n let filteredItems = arrayFilter(this.menuItems, (item) => isItemHidden(item, this.hot));\n\n filteredItems = filterSeparators(filteredItems, SEPARATOR);\n\n let settings = {\n data: filteredItems,\n colHeaders: false,\n colWidths: [200],\n autoRowSize: false,\n readOnly: true,\n copyPaste: false,\n columns: [{\n data: 'name',\n renderer: (hot, TD, row, col, prop, value) => this.menuItemRenderer(hot, TD, row, col, prop, value)\n }],\n renderAllRows: true,\n fragmentSelection: 'cell',\n disableVisualSelection: 'area',\n beforeKeyDown: (event) => this.onBeforeKeyDown(event),\n afterOnCellMouseOver: (event, coords, TD) => {\n if (this.isAllSubMenusClosed()) {\n delayedOpenSubMenu(coords.row);\n } else {\n this.openSubMenu(coords.row);\n }\n },\n rowHeights: (row) => (filteredItems[row].name === SEPARATOR ? 1 : 23)\n };\n this.origOutsideClickDeselects = this.hot.getSettings().outsideClickDeselects;\n this.hot.getSettings().outsideClickDeselects = false;\n this.hotMenu = new Core(this.container, settings);\n this.hotMenu.addHook('afterInit', () => this.onAfterInit());\n this.hotMenu.addHook('afterSelection', (r, c, r2, c2, preventScrolling) => this.onAfterSelection(r, c, r2, c2, preventScrolling));\n this.hotMenu.init();\n this.hotMenu.listen();\n this.blockMainTableCallbacks();\n this.runLocalHooks('afterOpen');\n }\n\n /**\n * Close menu.\n *\n * @param {Boolean} [closeParent=false] if `true` try to close parent menu if exists.\n */\n close(closeParent = false) {\n if (!this.isOpened()) {\n return;\n }\n if (closeParent && this.parentMenu) {\n this.parentMenu.close();\n } else {\n this.closeAllSubMenus();\n this.container.style.display = 'none';\n this.releaseMainTableCallbacks();\n this.hotMenu.destroy();\n this.hotMenu = null;\n this.hot.getSettings().outsideClickDeselects = this.origOutsideClickDeselects;\n this.runLocalHooks('afterClose');\n\n if (this.parentMenu) {\n this.parentMenu.hotMenu.listen();\n }\n }\n }\n\n /**\n * Open sub menu at the provided row index.\n *\n * @param {Number} row Row index.\n * @returns {Menu|Boolean} Returns created menu or `false` if no one menu was created.\n */\n openSubMenu(row) {\n if (!this.hotMenu) {\n return false;\n }\n let cell = this.hotMenu.getCell(row, 0);\n\n this.closeAllSubMenus();\n\n if (!cell || !hasSubMenu(cell)) {\n return false;\n }\n let dataItem = this.hotMenu.getSourceDataAtRow(row);\n let subMenu = new Menu(this.hot, {\n parent: this,\n name: dataItem.name,\n className: this.options.className,\n keepInViewport: true\n });\n subMenu.setMenuItems(dataItem.submenu.items);\n subMenu.open();\n subMenu.setPosition(cell.getBoundingClientRect());\n this.hotSubMenus[dataItem.key] = subMenu;\n\n return subMenu;\n }\n\n /**\n * Close sub menu at row index.\n *\n * @param {Number} row Row index.\n */\n closeSubMenu(row) {\n let dataItem = this.hotMenu.getSourceDataAtRow(row);\n let menus = this.hotSubMenus[dataItem.key];\n\n if (menus) {\n menus.destroy();\n delete this.hotSubMenus[dataItem.key];\n }\n }\n\n /**\n * Close all opened sub menus.\n */\n closeAllSubMenus() {\n arrayEach(this.hotMenu.getData(), (value, row) => this.closeSubMenu(row));\n }\n\n /**\n * Checks if all created and opened sub menus are closed.\n *\n * @returns {Boolean}\n */\n isAllSubMenusClosed() {\n return Object.keys(this.hotSubMenus).length === 0;\n }\n\n /**\n * Destroy instance.\n */\n destroy() {\n this.clearLocalHooks();\n this.close();\n this.parentMenu = null;\n this.eventManager.destroy();\n }\n\n /**\n * Checks if menu was opened.\n *\n * @returns {Boolean} Returns `true` if menu was opened.\n */\n isOpened() {\n return this.hotMenu !== null;\n }\n\n /**\n * Execute menu command.\n *\n * @param {Event} [event]\n */\n executeCommand(event) {\n if (!this.isOpened() || !this.hotMenu.getSelected()) {\n return;\n }\n const selectedItem = this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelected()[0]);\n\n this.runLocalHooks('select', selectedItem, event);\n\n if (selectedItem.isCommand === false || selectedItem.name === SEPARATOR) {\n return;\n }\n const selRange = this.hot.getSelectedRange();\n const normalizedSelection = selRange ? normalizeSelection(selRange) : {};\n let autoClose = true;\n\n // Don't close context menu if item is disabled or it has submenu\n if (selectedItem.disabled === true ||\n (typeof selectedItem.disabled === 'function' && selectedItem.disabled.call(this.hot) === true) ||\n selectedItem.submenu) {\n autoClose = false;\n }\n\n this.runLocalHooks('executeCommand', selectedItem.key, normalizedSelection, event);\n\n if (this.isSubMenu()) {\n this.parentMenu.runLocalHooks('executeCommand', selectedItem.key, normalizedSelection, event);\n }\n\n if (autoClose) {\n this.close(true);\n }\n }\n\n /**\n * Set menu position based on dom event or based on literal object.\n *\n * @param {Event|Object} coords Event or literal Object with coordinates.\n */\n setPosition(coords) {\n const cursor = new Cursor(coords);\n\n if (this.options.keepInViewport) {\n if (cursor.fitsBelow(this.container)) {\n this.setPositionBelowCursor(cursor);\n\n } else if (cursor.fitsAbove(this.container)) {\n this.setPositionAboveCursor(cursor);\n\n } else {\n this.setPositionBelowCursor(cursor);\n }\n if (cursor.fitsOnRight(this.container)) {\n this.setPositionOnRightOfCursor(cursor);\n } else {\n this.setPositionOnLeftOfCursor(cursor);\n }\n } else {\n this.setPositionBelowCursor(cursor);\n this.setPositionOnRightOfCursor(cursor);\n }\n }\n\n /**\n * Set menu position above cursor object.\n *\n * @param {Cursor} cursor `Cursor` object.\n */\n setPositionAboveCursor(cursor) {\n let top = this.offset.above + cursor.top - this.container.offsetHeight;\n\n if (this.isSubMenu()) {\n top = cursor.top + cursor.cellHeight - this.container.offsetHeight + 3;\n }\n this.container.style.top = `${top}px`;\n }\n\n /**\n * Set menu position below cursor object.\n *\n * @param {Cursor} cursor `Cursor` object.\n */\n setPositionBelowCursor(cursor) {\n let top = this.offset.below + cursor.top;\n\n if (this.isSubMenu()) {\n top = cursor.top - 1;\n }\n this.container.style.top = `${top}px`;\n }\n\n /**\n * Set menu position on the right of cursor object.\n *\n * @param {Cursor} cursor `Cursor` object.\n */\n setPositionOnRightOfCursor(cursor) {\n let left;\n\n if (this.isSubMenu()) {\n left = 1 + cursor.left + cursor.cellWidth;\n } else {\n left = this.offset.right + 1 + cursor.left;\n }\n\n this.container.style.left = `${left}px`;\n }\n\n /**\n * Set menu position on the left of cursor object.\n *\n * @param {Cursor} cursor `Cursor` object.\n */\n setPositionOnLeftOfCursor(cursor) {\n let left = this.offset.left + cursor.left - this.container.offsetWidth + getScrollbarWidth() + 4;\n\n this.container.style.left = `${left}px`;\n }\n\n /**\n * Select first cell in opened menu.\n */\n selectFirstCell() {\n let cell = this.hotMenu.getCell(0, 0);\n\n if (isSeparator(cell) || isDisabled(cell) || isSelectionDisabled(cell)) {\n this.selectNextCell(0, 0);\n } else {\n this.hotMenu.selectCell(0, 0);\n }\n }\n\n /**\n * Select last cell in opened menu.\n */\n selectLastCell() {\n let lastRow = this.hotMenu.countRows() - 1;\n let cell = this.hotMenu.getCell(lastRow, 0);\n\n if (isSeparator(cell) || isDisabled(cell) || isSelectionDisabled(cell)) {\n this.selectPrevCell(lastRow, 0);\n } else {\n this.hotMenu.selectCell(lastRow, 0);\n }\n }\n\n /**\n * Select next cell in opened menu.\n *\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n */\n selectNextCell(row, col) {\n let nextRow = row + 1;\n let cell = nextRow < this.hotMenu.countRows() ? this.hotMenu.getCell(nextRow, col) : null;\n\n if (!cell) {\n return;\n }\n if (isSeparator(cell) || isDisabled(cell) || isSelectionDisabled(cell)) {\n this.selectNextCell(nextRow, col);\n } else {\n this.hotMenu.selectCell(nextRow, col);\n }\n }\n\n /**\n * Select previous cell in opened menu.\n *\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n */\n selectPrevCell(row, col) {\n let prevRow = row - 1;\n let cell = prevRow >= 0 ? this.hotMenu.getCell(prevRow, col) : null;\n\n if (!cell) {\n return;\n }\n if (isSeparator(cell) || isDisabled(cell) || isSelectionDisabled(cell)) {\n this.selectPrevCell(prevRow, col);\n } else {\n this.hotMenu.selectCell(prevRow, col);\n }\n }\n\n /**\n * Menu item renderer.\n *\n * @private\n */\n menuItemRenderer(hot, TD, row, col, prop, value) {\n let item = hot.getSourceDataAtRow(row);\n let wrapper = document.createElement('div');\n\n let isSubMenu = (item) => hasOwnProperty(item, 'submenu');\n let itemIsSeparator = (item) => new RegExp(SEPARATOR, 'i').test(item.name);\n let itemIsDisabled = (item) => item.disabled === true || (typeof item.disabled == 'function' && item.disabled.call(this.hot) === true);\n let itemIsSelectionDisabled = (item) => item.disableSelection;\n\n if (typeof value === 'function') {\n value = value.call(this.hot);\n }\n empty(TD);\n addClass(wrapper, 'htItemWrapper');\n TD.appendChild(wrapper);\n\n if (itemIsSeparator(item)) {\n addClass(TD, 'htSeparator');\n\n } else if (typeof item.renderer === 'function') {\n addClass(TD, 'htCustomMenuRenderer');\n TD.appendChild(item.renderer(hot, wrapper, row, col, prop, value));\n\n } else {\n fastInnerHTML(wrapper, value);\n }\n if (itemIsDisabled(item)) {\n addClass(TD, 'htDisabled');\n this.eventManager.addEventListener(TD, 'mouseenter', () => hot.deselectCell());\n\n } else if (itemIsSelectionDisabled(item)) {\n addClass(TD, 'htSelectionDisabled');\n this.eventManager.addEventListener(TD, 'mouseenter', () => hot.deselectCell());\n\n } else if (isSubMenu(item)) {\n addClass(TD, 'htSubmenu');\n\n if (itemIsSelectionDisabled(item)) {\n this.eventManager.addEventListener(TD, 'mouseenter', () => hot.deselectCell());\n } else {\n this.eventManager.addEventListener(TD, 'mouseenter', () => hot.selectCell(row, col, void 0, void 0, false, false));\n }\n } else {\n removeClass(TD, 'htSubmenu');\n removeClass(TD, 'htDisabled');\n\n if (itemIsSelectionDisabled(item)) {\n this.eventManager.addEventListener(TD, 'mouseenter', () => hot.deselectCell());\n } else {\n this.eventManager.addEventListener(TD, 'mouseenter', () => hot.selectCell(row, col, void 0, void 0, false, false));\n }\n }\n }\n\n /**\n * Create container/wrapper for handsontable.\n *\n * @private\n * @param {String} [name] Class name.\n * @returns {HTMLElement}\n */\n createContainer(name = null) {\n if (name) {\n name = name.replace(/[^A-z0-9]/g, '_');\n name = `${this.options.className}Sub_${name}`;\n }\n let container;\n\n if (name) {\n container = document.querySelector(`.${this.options.className}.${name}`);\n } else {\n container = document.querySelector(`.${this.options.className}`);\n }\n if (!container) {\n container = document.createElement('div');\n addClass(container, `htMenu ${this.options.className}`);\n\n if (name) {\n addClass(container, name);\n }\n document.getElementsByTagName('body')[0].appendChild(container);\n }\n\n return container;\n }\n\n /**\n * @private\n */\n blockMainTableCallbacks() {\n this._afterScrollCallback = function() {};\n this.hot.addHook('afterScrollVertically', this._afterScrollCallback);\n this.hot.addHook('afterScrollHorizontally', this._afterScrollCallback);\n }\n\n /**\n * @private\n */\n releaseMainTableCallbacks() {\n if (this._afterScrollCallback) {\n this.hot.removeHook('afterScrollVertically', this._afterScrollCallback);\n this.hot.removeHook('afterScrollHorizontally', this._afterScrollCallback);\n this._afterScrollCallback = null;\n }\n }\n\n /**\n * On before key down listener.\n *\n * @private\n * @param {Event} event\n */\n onBeforeKeyDown(event) {\n let selection = this.hotMenu.getSelected();\n let stopEvent = false;\n this.keyEvent = true;\n\n switch (event.keyCode) {\n case KEY_CODES.ESCAPE:\n this.close();\n stopEvent = true;\n break;\n\n case KEY_CODES.ENTER:\n if (selection) {\n if (this.hotMenu.getSourceDataAtRow(selection[0]).submenu) {\n stopEvent = true;\n } else {\n this.executeCommand(event);\n this.close(true);\n }\n }\n break;\n\n case KEY_CODES.ARROW_DOWN:\n if (selection) {\n this.selectNextCell(selection[0], selection[1]);\n } else {\n this.selectFirstCell();\n }\n stopEvent = true;\n break;\n\n case KEY_CODES.ARROW_UP:\n if (selection) {\n this.selectPrevCell(selection[0], selection[1]);\n } else {\n this.selectLastCell();\n }\n stopEvent = true;\n break;\n\n case KEY_CODES.ARROW_RIGHT:\n if (selection) {\n let menu = this.openSubMenu(selection[0]);\n\n if (menu) {\n menu.selectFirstCell();\n }\n }\n stopEvent = true;\n\n break;\n\n case KEY_CODES.ARROW_LEFT:\n if (selection && this.isSubMenu()) {\n this.close();\n\n if (this.parentMenu) {\n this.parentMenu.hotMenu.listen();\n }\n stopEvent = true;\n }\n break;\n default:\n break;\n }\n if (stopEvent) {\n event.preventDefault();\n stopImmediatePropagation(event);\n }\n\n this.keyEvent = false;\n }\n\n /**\n * On after init listener.\n *\n * @private\n */\n onAfterInit() {\n const data = this.hotMenu.getSettings().data;\n const hiderStyle = this.hotMenu.view.wt.wtTable.hider.style;\n const holderStyle = this.hotMenu.view.wt.wtTable.holder.style;\n let currentHiderWidth = parseInt(hiderStyle.width, 10);\n\n let realHeight = arrayReduce(data, (accumulator, value) => accumulator + (value.name === SEPARATOR ? 1 : 26), 0);\n\n holderStyle.width = `${currentHiderWidth + 22}px`;\n holderStyle.height = `${realHeight + 4}px`;\n hiderStyle.height = holderStyle.height;\n }\n\n /**\n * On after selection listener.\n *\n * @param {Number} r Selection start row index.\n * @param {Number} c Selection start column index.\n * @param {Number} r2 Selection end row index.\n * @param {Number} c2 Selection end column index.\n * @param {Object} preventScrolling Object with `value` property where its value change will be observed.\n */\n onAfterSelection(r, c, r2, c2, preventScrolling) {\n if (this.keyEvent === false) {\n preventScrolling.value = true;\n }\n }\n\n /**\n * Document mouse down listener.\n *\n * @private\n * @param {Event} event\n */\n onDocumentMouseDown(event) {\n if (!this.isOpened()) {\n return;\n }\n if (this.container && isChildOf(event.target, this.container)) {\n this.executeCommand(event);\n }\n // Close menu when clicked element is not belongs to menu itself\n if (this.options.standalone && this.hotMenu && !isChildOf(event.target, this.hotMenu.rootElement)) {\n this.close(true);\n\n // Automatically close menu when clicked element is not belongs to menu or submenu (not necessarily to itself)\n } else if ((this.isAllSubMenusClosed() || this.isSubMenu()) &&\n (!isChildOf(event.target, '.htMenu') && isChildOf(event.target, document))) {\n this.close(true);\n }\n }\n}\n\nmixin(Menu, localHooks);\n\nexport default Menu;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/menu.js","import {align, getAlignmentClasses, checkSelectionConsistency, markLabelAsSelected} from './../utils';\nimport {KEY as SEPARATOR} from './separator';\n\nexport const KEY = 'alignment';\n\nexport default function alignmentItem() {\n return {\n key: KEY,\n name: 'Alignment',\n disabled() {\n return !(this.getSelectedRange() && !this.selection.selectedHeader.corner);\n },\n submenu: {\n items: [\n {\n key: `${KEY}:left`,\n name() {\n let label = 'Left';\n let hasClass = checkSelectionConsistency(this.getSelectedRange(), (row, col) => {\n let className = this.getCellMeta(row, col).className;\n\n if (className && className.indexOf('htLeft') !== -1) {\n return true;\n }\n });\n\n if (hasClass) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback() {\n let range = this.getSelectedRange();\n let stateBefore = getAlignmentClasses(range, (row, col) => this.getCellMeta(row, col).className);\n let type = 'horizontal';\n let alignment = 'htLeft';\n\n this.runHooks('beforeCellAlignment', stateBefore, range, type, alignment);\n align(range, type, alignment, (row, col) => this.getCellMeta(row, col),\n (row, col, key, value) => this.setCellMeta(row, col, key, value));\n this.render();\n },\n disabled: false\n },\n {\n key: `${KEY}:center`,\n name() {\n let label = 'Center';\n let hasClass = checkSelectionConsistency(this.getSelectedRange(), (row, col) => {\n let className = this.getCellMeta(row, col).className;\n\n if (className && className.indexOf('htCenter') !== -1) {\n return true;\n }\n });\n\n if (hasClass) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback() {\n let range = this.getSelectedRange();\n let stateBefore = getAlignmentClasses(range, (row, col) => this.getCellMeta(row, col).className);\n let type = 'horizontal';\n let alignment = 'htCenter';\n\n this.runHooks('beforeCellAlignment', stateBefore, range, type, alignment);\n align(range, type, alignment, (row, col) => this.getCellMeta(row, col),\n (row, col, key, value) => this.setCellMeta(row, col, key, value));\n this.render();\n },\n disabled: false\n },\n {\n key: `${KEY}:right`,\n name() {\n let label = 'Right';\n let hasClass = checkSelectionConsistency(this.getSelectedRange(), (row, col) => {\n let className = this.getCellMeta(row, col).className;\n\n if (className && className.indexOf('htRight') !== -1) {\n return true;\n }\n });\n\n if (hasClass) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback() {\n let range = this.getSelectedRange();\n let stateBefore = getAlignmentClasses(range, (row, col) => this.getCellMeta(row, col).className);\n let type = 'horizontal';\n let alignment = 'htRight';\n\n this.runHooks('beforeCellAlignment', stateBefore, range, type, alignment);\n align(range, type, alignment, (row, col) => this.getCellMeta(row, col),\n (row, col, key, value) => this.setCellMeta(row, col, key, value));\n this.render();\n },\n disabled: false\n },\n {\n key: `${KEY}:justify`,\n name() {\n let label = 'Justify';\n let hasClass = checkSelectionConsistency(this.getSelectedRange(), (row, col) => {\n let className = this.getCellMeta(row, col).className;\n\n if (className && className.indexOf('htJustify') !== -1) {\n return true;\n }\n });\n\n if (hasClass) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback() {\n let range = this.getSelectedRange();\n let stateBefore = getAlignmentClasses(range, (row, col) => this.getCellMeta(row, col).className);\n let type = 'horizontal';\n let alignment = 'htJustify';\n\n this.runHooks('beforeCellAlignment', stateBefore, range, type, alignment);\n align(range, type, alignment, (row, col) => this.getCellMeta(row, col),\n (row, col, key, value) => this.setCellMeta(row, col, key, value));\n this.render();\n },\n disabled: false\n },\n {\n name: SEPARATOR\n },\n {\n key: `${KEY}:top`,\n name() {\n let label = 'Top';\n let hasClass = checkSelectionConsistency(this.getSelectedRange(), (row, col) => {\n let className = this.getCellMeta(row, col).className;\n\n if (className && className.indexOf('htTop') !== -1) {\n return true;\n }\n });\n\n if (hasClass) {\n label = markLabelAsSelected(label);\n }\n return label;\n },\n callback() {\n let range = this.getSelectedRange();\n let stateBefore = getAlignmentClasses(range, (row, col) => this.getCellMeta(row, col).className);\n let type = 'vertical';\n let alignment = 'htTop';\n\n this.runHooks('beforeCellAlignment', stateBefore, range, type, alignment);\n align(range, type, alignment, (row, col) => this.getCellMeta(row, col),\n (row, col, key, value) => this.setCellMeta(row, col, key, value));\n this.render();\n },\n disabled: false\n },\n {\n key: `${KEY}:middle`,\n name() {\n let label = 'Middle';\n let hasClass = checkSelectionConsistency(this.getSelectedRange(), (row, col) => {\n let className = this.getCellMeta(row, col).className;\n\n if (className && className.indexOf('htMiddle') !== -1) {\n return true;\n }\n });\n\n if (hasClass) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback() {\n let range = this.getSelectedRange();\n let stateBefore = getAlignmentClasses(range, (row, col) => this.getCellMeta(row, col).className);\n let type = 'vertical';\n let alignment = 'htMiddle';\n\n this.runHooks('beforeCellAlignment', stateBefore, range, type, alignment);\n align(range, type, alignment, (row, col) => this.getCellMeta(row, col),\n (row, col, key, value) => this.setCellMeta(row, col, key, value));\n this.render();\n },\n disabled: false\n },\n {\n key: `${KEY}:bottom`,\n name() {\n let label = 'Bottom';\n let hasClass = checkSelectionConsistency(this.getSelectedRange(), (row, col) => {\n let className = this.getCellMeta(row, col).className;\n\n if (className && className.indexOf('htBottom') !== -1) {\n return true;\n }\n });\n\n if (hasClass) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback() {\n let range = this.getSelectedRange();\n let stateBefore = getAlignmentClasses(range, (row, col) => this.getCellMeta(row, col).className);\n let type = 'vertical';\n let alignment = 'htBottom';\n\n this.runHooks('beforeCellAlignment', stateBefore, range, type, alignment);\n align(range, type, alignment, (row, col) => this.getCellMeta(row, col),\n (row, col, key, value) => this.setCellMeta(row, col, key, value));\n this.render();\n },\n disabled: false\n }\n ]\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/predefinedItems/alignment.js","import {getValidSelection} from './../utils';\n\nexport const KEY = 'clear_column';\n\nexport default function clearColumnItem() {\n return {\n key: KEY,\n name: 'Clear column',\n\n callback(key, selection) {\n let column = selection.start.col;\n\n if (this.countRows()) {\n this.populateFromArray(0, column, [[null]], Math.max(selection.start.row, selection.end.row), column, 'ContextMenu.clearColumn');\n }\n },\n disabled() {\n let selected = getValidSelection(this);\n\n if (!selected) {\n return true;\n }\n let entireRowSelection = [selected[0], 0, selected[0], this.countCols() - 1];\n let rowSelected = entireRowSelection.join(',') == selected.join(',');\n\n return selected[1] < 0 || this.countCols() >= this.getSettings().maxCols || rowSelected;\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/predefinedItems/clearColumn.js","import {getValidSelection} from './../utils';\n\nexport const KEY = 'col_left';\n\nexport default function columnLeftItem() {\n return {\n key: KEY,\n name: 'Insert column on the left',\n callback(key, selection) {\n this.alter('insert_col', selection.start.col, 1, 'ContextMenu.columnLeft');\n },\n disabled() {\n let selected = getValidSelection(this);\n\n if (!selected) {\n return true;\n }\n if (!this.isColumnModificationAllowed()) {\n return true;\n }\n let entireRowSelection = [selected[0], 0, selected[0], this.countCols() - 1];\n let rowSelected = entireRowSelection.join(',') == selected.join(',');\n let onlyOneColumn = this.countCols() === 1;\n\n return selected[1] < 0 || this.countCols() >= this.getSettings().maxCols || (!onlyOneColumn && rowSelected);\n },\n hidden() {\n return !this.getSettings().allowInsertColumn;\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/predefinedItems/columnLeft.js","import {getValidSelection} from './../utils';\n\nexport const KEY = 'col_right';\n\nexport default function columnRightItem() {\n return {\n key: KEY,\n name: 'Insert column on the right',\n\n callback(key, selection) {\n this.alter('insert_col', selection.end.col + 1, 1, 'ContextMenu.columnRight');\n },\n disabled() {\n let selected = getValidSelection(this);\n\n if (!selected) {\n return true;\n }\n if (!this.isColumnModificationAllowed()) {\n return true;\n }\n let entireRowSelection = [selected[0], 0, selected[0], this.countCols() - 1];\n let rowSelected = entireRowSelection.join(',') == selected.join(',');\n let onlyOneColumn = this.countCols() === 1;\n\n return selected[1] < 0 || this.countCols() >= this.getSettings().maxCols || (!onlyOneColumn && rowSelected);\n },\n hidden() {\n return !this.getSettings().allowInsertColumn;\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/predefinedItems/columnRight.js","import {checkSelectionConsistency, markLabelAsSelected} from './../utils';\n\nexport const KEY = 'make_read_only';\n\nexport default function readOnlyItem() {\n return {\n key: KEY,\n name() {\n let label = 'Read only';\n let atLeastOneReadOnly = checkSelectionConsistency(this.getSelectedRange(), (row, col) => this.getCellMeta(row, col).readOnly);\n\n if (atLeastOneReadOnly) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback() {\n let range = this.getSelectedRange();\n let atLeastOneReadOnly = checkSelectionConsistency(range, (row, col) => this.getCellMeta(row, col).readOnly);\n\n range.forAll((row, col) => {\n this.setCellMeta(row, col, 'readOnly', !atLeastOneReadOnly);\n });\n this.render();\n },\n disabled() {\n return !(this.getSelectedRange() && !this.selection.selectedHeader.corner);\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/predefinedItems/readOnly.js","export const KEY = 'redo';\n\nexport default function redoItem() {\n return {\n key: KEY,\n name: 'Redo',\n\n callback() {\n this.redo();\n },\n disabled() {\n return this.undoRedo && !this.undoRedo.isRedoAvailable();\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/predefinedItems/redo.js","import {getValidSelection} from './../utils';\n\nexport const KEY = 'remove_col';\n\nexport default function removeColumnItem() {\n return {\n key: KEY,\n name: 'Remove column',\n\n callback(key, selection) {\n let amount = selection.end.col - selection.start.col + 1;\n\n this.alter('remove_col', selection.start.col, amount, 'ContextMenu.removeColumn');\n\n },\n disabled() {\n const selected = getValidSelection(this);\n const totalColumns = this.countCols();\n\n return !selected || this.selection.selectedHeader.rows || this.selection.selectedHeader.corner ||\n !this.isColumnModificationAllowed() || !totalColumns;\n },\n hidden() {\n return !this.getSettings().allowRemoveColumn;\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/predefinedItems/removeColumn.js","import {getValidSelection} from './../utils';\n\nexport const KEY = 'remove_row';\n\nexport default function removeRowItem() {\n return {\n key: KEY,\n name: 'Remove row',\n\n callback(key, selection) {\n let amount = selection.end.row - selection.start.row + 1;\n\n this.alter('remove_row', selection.start.row, amount, 'ContextMenu.removeRow');\n },\n disabled() {\n const selected = getValidSelection(this);\n const totalRows = this.countRows();\n\n return !selected || this.selection.selectedHeader.cols || this.selection.selectedHeader.corner || !totalRows;\n },\n hidden() {\n return !this.getSettings().allowRemoveRow;\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/predefinedItems/removeRow.js","import {getValidSelection} from './../utils';\n\nexport const KEY = 'row_above';\n\nexport default function rowAboveItem() {\n return {\n key: KEY,\n name: 'Insert row above',\n\n callback(key, selection) {\n this.alter('insert_row', selection.start.row, 1, 'ContextMenu.rowAbove');\n },\n disabled() {\n let selected = getValidSelection(this);\n\n return !selected || this.selection.selectedHeader.cols || this.countRows() >= this.getSettings().maxRows;\n },\n hidden() {\n return !this.getSettings().allowInsertRow;\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/predefinedItems/rowAbove.js","import {getValidSelection} from './../utils';\n\nexport const KEY = 'row_below';\n\nexport default function rowBelowItem() {\n return {\n key: KEY,\n name: 'Insert row below',\n\n callback(key, selection) {\n this.alter('insert_row', selection.end.row + 1, 1, 'ContextMenu.rowBelow');\n },\n disabled() {\n let selected = getValidSelection(this);\n\n return !selected || this.selection.selectedHeader.cols || this.countRows() >= this.getSettings().maxRows;\n },\n hidden() {\n return !this.getSettings().allowInsertRow;\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/predefinedItems/rowBelow.js","export const KEY = 'undo';\n\nexport default function undoItem() {\n return {\n key: KEY,\n name: 'Undo',\n\n callback() {\n this.undo();\n },\n disabled() {\n return this.undoRedo && !this.undoRedo.isUndoAvailable();\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/predefinedItems/undo.js","import Cursor from 'handsontable/plugins/contextMenu/cursor';\n\ndescribe('ContextMenu', () => {\n describe('Cursor', () => {\n it('should initialize internal properties on construct (object literal)', () => {\n var coords = {\n top: 10,\n left: 50,\n width: 100,\n height: 200\n };\n var cursor = new Cursor(coords);\n\n expect(cursor.top).toBe(coords.top);\n expect(cursor.topRelative).toBeLessThan(coords.top + 1);\n expect(cursor.left).toBe(coords.left);\n expect(cursor.leftRelative).toBeLessThan(coords.left + 1);\n expect(cursor.scrollLeft).toBeGreaterThan(-1);\n expect(cursor.scrollTop).toBeGreaterThan(-1);\n expect(cursor.cellHeight).toBe(coords.height);\n expect(cursor.cellWidth).toBe(coords.width);\n });\n\n it('should returns boolean value related to if element fits above the cursor', () => {\n var coords = {\n top: 10,\n left: 50,\n width: 100,\n height: 200\n };\n var cursor = new Cursor(coords);\n var fakeElement = {\n offsetHeight: 9\n };\n\n expect(cursor.fitsAbove(fakeElement)).toBe(true);\n\n fakeElement.offsetHeight = 10;\n\n expect(cursor.fitsAbove(fakeElement)).toBe(true);\n\n fakeElement.offsetHeight = 11;\n\n expect(cursor.fitsAbove(fakeElement)).toBe(false);\n });\n\n it('should returns boolean value related to if element fits below the cursor', () => {\n var coords = {\n top: 10,\n left: 50,\n width: 100,\n height: 200\n };\n var cursor = new Cursor(coords);\n var fakeElement = {\n offsetHeight: 9\n };\n var viewportHeight = 100;\n\n expect(cursor.fitsBelow(fakeElement, viewportHeight)).toBe(true);\n\n fakeElement.offsetHeight = 90;\n\n expect(cursor.fitsBelow(fakeElement, viewportHeight)).toBe(true);\n\n fakeElement.offsetHeight = 91;\n\n expect(cursor.fitsBelow(fakeElement, viewportHeight)).toBe(false);\n });\n\n it('should returns boolean value related to if element fits on the right of the cursor', () => {\n var coords = {\n top: 10,\n left: 20,\n width: 30,\n height: 200\n };\n var cursor = new Cursor(coords);\n var fakeElement = {\n offsetWidth: 9\n };\n var viewportWidth = 100;\n\n expect(cursor.fitsOnRight(fakeElement, viewportWidth)).toBe(true);\n\n fakeElement.offsetWidth = 50;\n\n expect(cursor.fitsOnRight(fakeElement, viewportWidth)).toBe(true);\n\n fakeElement.offsetWidth = 51;\n\n expect(cursor.fitsOnRight(fakeElement, viewportWidth)).toBe(false);\n });\n\n it('should returns boolean value related to if element fits on the left of the cursor', () => {\n var coords = {\n top: 10,\n left: 50,\n width: 100,\n height: 200\n };\n var cursor = new Cursor(coords);\n var fakeElement = {\n offsetWidth: 9\n };\n\n expect(cursor.fitsOnLeft(fakeElement)).toBe(true);\n\n fakeElement.offsetWidth = 50;\n\n expect(cursor.fitsOnLeft(fakeElement)).toBe(true);\n\n fakeElement.offsetWidth = 51;\n\n expect(cursor.fitsOnLeft(fakeElement)).toBe(false);\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenu/test/cursor.unit.js","import ZeroClipboard from 'zeroclipboard';\nimport BasePlugin from './../_base';\nimport {removeClass} from './../../helpers/dom/element';\nimport {arrayEach} from './../../helpers/array';\nimport EventManager from './../../eventManager';\nimport {registerPlugin} from './../../plugins';\nimport {SEPARATOR} from './../contextMenu/predefinedItems';\n\n/**\n * @description\n * This plugin adds a copy/paste functionality to the context menu. Due to browser restrictions, it uses ZeroClipboard to allow\n * copying data with a click.\n *\n * @plugin ContextMenuCopyPaste\n * @dependencies ContextMenu\n */\nclass ContextMenuCopyPaste extends BasePlugin {\n /**\n * @param {Object} hotInstance\n */\n constructor(hotInstance) {\n super(hotInstance);\n /**\n * Instance of {@link EventManager}.\n *\n * @type {EventManager}\n */\n this.eventManager = new EventManager(this);\n /**\n * Path to swf file which is necessary for ZeroClipboard.\n *\n * @type {String}\n */\n this.swfPath = null;\n /**\n * outsideClickDeselectsCache setting cache.\n *\n * @type {Boolean}\n */\n this.outsideClickDeselectsCache = null;\n }\n\n /**\n * Check if the plugin is enabled in the handsontable settings.\n *\n * @returns {Boolean}\n */\n isEnabled() {\n return this.hot.getSettings().contextMenuCopyPaste;\n }\n\n /**\n * Enable plugin for this Handsontable instance.\n */\n enablePlugin() {\n if (this.enabled) {\n return;\n }\n if (typeof this.hot.getSettings().contextMenuCopyPaste === 'object') {\n this.swfPath = this.hot.getSettings().contextMenuCopyPaste.swfPath;\n }\n if (typeof ZeroClipboard === 'undefined') {\n console.error('To be able to use the Copy/Paste feature from the context menu, you need to manually include ZeroClipboard.js file to your website.');\n }\n try {\n /* eslint-disable no-new */\n new ActiveXObject('ShockwaveFlash.ShockwaveFlash');\n } catch (exception) {\n if (typeof navigator.mimeTypes['application/x-shockwave-flash'] == 'undefined') {\n console.error('To be able to use the Copy/Paste feature from the context menu, your browser needs to have Flash Plugin installed.');\n }\n }\n if (this.swfPath) {\n ZeroClipboard.config({\n swfPath: this.swfPath\n });\n }\n this.hot.addHook('afterContextMenuShow', () => this.onAfterContextMenuShow());\n this.hot.addHook('afterContextMenuDefaultOptions', (options) => this.onAfterContextMenuDefaultOptions(options));\n this.registerEvents();\n super.enablePlugin();\n }\n\n /**\n * Disable plugin for this Handsontable instance.\n */\n disablePlugin() {\n super.disablePlugin();\n }\n\n /**\n * @private\n */\n registerEvents() {\n this.eventManager.addEventListener(document, 'mouseenter', () => this.removeCurrentClass());\n this.eventManager.addEventListener(document, 'mouseleave', () => this.removeZeroClipboardClass());\n }\n\n /**\n * Get a value to copy.\n *\n * @returns {String}\n */\n getCopyValue() {\n this.hot.copyPaste.setCopyableText();\n this.hot.copyPaste.copyPasteInstance.triggerCopy();\n return this.hot.copyPaste.copyPasteInstance.elTextarea.value;\n }\n\n /**\n * Add Copy and Paste functionality to the context menu.\n *\n * @private\n * @param {Object} defaultOptions\n */\n onAfterContextMenuDefaultOptions(defaultOptions) {\n defaultOptions.items.unshift({\n key: 'copy',\n name: 'Copy',\n disabled() {\n return this.selection.selectedHeader.corner;\n },\n }, {\n key: 'paste',\n name: 'Paste',\n callback() {\n this.copyPaste.triggerPaste();\n },\n disabled() {\n return this.selection.selectedHeader.corner;\n },\n },\n {name: SEPARATOR}\n );\n }\n\n /**\n * After context menu show listener.\n *\n * @private\n */\n onAfterContextMenuShow() {\n const contextMenu = this.hot.getPlugin('contextMenu');\n const data = contextMenu.menu.hotMenu.getSourceData();\n\n // find position of 'copy' option.\n arrayEach(data, (item, index) => {\n if (item.key === 'copy') {\n let zeroClipboardInstance = new ZeroClipboard(contextMenu.menu.hotMenu.getCell(index, 0));\n\n zeroClipboardInstance.off();\n zeroClipboardInstance.on('copy', (event) => {\n let clipboard = event.clipboardData;\n\n clipboard.setData('text/plain', this.getCopyValue());\n this.hot.getSettings().outsideClickDeselects = this.outsideClickDeselectsCache;\n });\n\n return false;\n }\n });\n }\n\n /**\n * @private\n */\n removeCurrentClass() {\n const contextMenu = this.hot.getPlugin('contextMenu');\n\n if (!contextMenu.enabled) {\n return;\n }\n if (contextMenu.menu.isOpened()) {\n let element = contextMenu.menu.hotMenu.rootElement.querySelector('td.current');\n\n if (element) {\n removeClass(element, 'current');\n }\n }\n this.outsideClickDeselectsCache = this.hot.getSettings().outsideClickDeselects;\n this.hot.getSettings().outsideClickDeselects = false;\n }\n\n /**\n * @private\n */\n removeZeroClipboardClass() {\n const contextMenu = this.hot.getPlugin('contextMenu');\n\n if (!contextMenu.enabled) {\n return;\n }\n if (contextMenu.menu.isOpened()) {\n let element = contextMenu.menu.hotMenu.rootElement.querySelector('td.zeroclipboard-is-hover');\n\n if (element) {\n removeClass(element, 'zeroclipboard-is-hover');\n }\n }\n this.hot.getSettings().outsideClickDeselects = this.outsideClickDeselectsCache;\n }\n}\n\nregisterPlugin('contextMenuCopyPaste', ContextMenuCopyPaste);\n\nexport default ContextMenuCopyPaste;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/contextMenuCopyPaste/contextMenuCopyPaste.js","import copyPaste from './../../../lib/copyPaste/copyPaste';\nimport SheetClip from './../../../lib/SheetClip/SheetClip';\nimport Hooks from './../../pluginHooks';\nimport {KEY_CODES, isCtrlKey} from './../../helpers/unicode';\nimport {arrayEach} from './../../helpers/array';\nimport {rangeEach} from './../../helpers/number';\nimport {stopImmediatePropagation, isImmediatePropagationStopped} from './../../helpers/dom/event';\nimport {getSelectionText} from './../../helpers/dom/element';\nimport {CellCoords, CellRange} from './../../3rdparty/walkontable/src';\n\nHooks.getSingleton().register('afterCopyLimit');\nHooks.getSingleton().register('modifyCopyableRange');\nHooks.getSingleton().register('beforeCut');\nHooks.getSingleton().register('afterCut');\nHooks.getSingleton().register('beforePaste');\nHooks.getSingleton().register('afterPaste');\nHooks.getSingleton().register('beforeCopy');\nHooks.getSingleton().register('afterCopy');\n\n/**\n * @description\n * This plugin enables the copy/paste functionality in Handsontable.\n *\n * @example\n * ```js\n * ...\n * copyPaste: true,\n * ...\n * ```\n * @class CopyPaste\n * @plugin CopyPaste\n */\nfunction CopyPastePlugin(instance) {\n var _this = this;\n\n this.copyPasteInstance = copyPaste();\n this.copyPasteInstance.onCut(onCut);\n this.copyPasteInstance.triggerCopy = callCopyAction;\n this.copyPasteInstance.onPaste(onPaste);\n this.onPaste = onPaste; // for paste testing purposes\n this.copyableRanges = [];\n\n instance.addHook('beforeKeyDown', onBeforeKeyDown);\n\n function onCut() {\n instance.isListening();\n }\n\n function callCutAction() {\n let rangedData = _this.getRangedData(_this.copyableRanges);\n\n if (instance.getSettings().fragmentSelection && (SheetClip.stringify(rangedData) != getSelectionText())) {\n return;\n }\n\n let allowCuttingOut = !!instance.runHooks('beforeCut', rangedData, _this.copyableRanges);\n\n if (allowCuttingOut) {\n instance.copyPaste.copyPasteInstance.copyable(SheetClip.stringify(rangedData));\n instance.selection.empty();\n instance.runHooks('afterCut', rangedData, _this.copyableRanges);\n\n } else {\n instance.copyPaste.copyPasteInstance.copyable('');\n }\n }\n\n function callCopyAction() {\n if (!instance.isListening()) {\n return;\n }\n\n let rangedData = _this.getRangedData(_this.copyableRanges);\n\n if (instance.getSettings().fragmentSelection && (SheetClip.stringify(rangedData) != getSelectionText())) {\n return;\n }\n\n let allowCopying = !!instance.runHooks('beforeCopy', rangedData, _this.copyableRanges);\n\n if (allowCopying) {\n instance.copyPaste.copyPasteInstance.copyable(SheetClip.stringify(rangedData));\n instance.runHooks('afterCopy', rangedData, _this.copyableRanges);\n\n } else {\n instance.copyPaste.copyPasteInstance.copyable('');\n }\n }\n\n function onPaste(str) {\n var\n input,\n inputArray,\n selected,\n coordsFrom,\n coordsTo,\n cellRange,\n topLeftCorner,\n bottomRightCorner,\n areaStart,\n areaEnd;\n\n if (!instance.isListening() || !instance.selection.isSelected()) {\n return;\n }\n input = str;\n inputArray = SheetClip.parse(input);\n selected = instance.getSelected();\n coordsFrom = new CellCoords(selected[0], selected[1]);\n coordsTo = new CellCoords(selected[2], selected[3]);\n cellRange = new CellRange(coordsFrom, coordsFrom, coordsTo);\n topLeftCorner = cellRange.getTopLeftCorner();\n bottomRightCorner = cellRange.getBottomRightCorner();\n areaStart = topLeftCorner;\n areaEnd = new CellCoords(\n Math.max(bottomRightCorner.row, inputArray.length - 1 + topLeftCorner.row),\n Math.max(bottomRightCorner.col, inputArray[0].length - 1 + topLeftCorner.col));\n\n let isSelRowAreaCoverInputValue = coordsTo.row - coordsFrom.row >= inputArray.length - 1;\n let isSelColAreaCoverInputValue = coordsTo.col - coordsFrom.col >= inputArray[0].length - 1;\n\n instance.addHookOnce('afterChange', (changes, source) => {\n let changesLength = changes ? changes.length : 0;\n\n if (changesLength) {\n let offset = {row: 0, col: 0};\n let highestColumnIndex = -1;\n\n arrayEach(changes, (change, index) => {\n let nextChange = changesLength > index + 1 ? changes[index + 1] : null;\n\n if (nextChange) {\n if (!isSelRowAreaCoverInputValue) {\n offset.row += Math.max(nextChange[0] - change[0] - 1, 0);\n }\n if (!isSelColAreaCoverInputValue && change[1] > highestColumnIndex) {\n highestColumnIndex = change[1];\n offset.col += Math.max(nextChange[1] - change[1] - 1, 0);\n }\n }\n });\n instance.selectCell(areaStart.row, areaStart.col, areaEnd.row + offset.row, areaEnd.col + offset.col);\n }\n });\n\n let allowPasting = !!instance.runHooks('beforePaste', inputArray, _this.copyableRanges);\n\n if (allowPasting) {\n instance.populateFromArray(areaStart.row, areaStart.col, inputArray, areaEnd.row, areaEnd.col, 'CopyPaste.paste', instance.getSettings().pasteMode);\n instance.runHooks('afterPaste', inputArray, _this.copyableRanges);\n }\n }\n\n function onBeforeKeyDown(event) {\n if (!instance.getSelected()) {\n return;\n }\n if (instance.getActiveEditor() && instance.getActiveEditor().isOpened()) {\n return;\n }\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n if (isCtrlKey(event.keyCode)) {\n // When fragmentSelection is enabled and some text is selected then don't blur selection calling 'setCopyableText'\n if (instance.getSettings().fragmentSelection && getSelectionText()) {\n return;\n }\n // when CTRL is pressed, prepare selectable text in textarea\n _this.setCopyableText();\n stopImmediatePropagation(event);\n\n return;\n }\n // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)\n let ctrlDown = (event.ctrlKey || event.metaKey) && !event.altKey;\n\n if (ctrlDown) {\n if (event.keyCode == KEY_CODES.A) {\n instance._registerTimeout(setTimeout(_this.setCopyableText.bind(_this), 0));\n }\n if (event.keyCode == KEY_CODES.X) {\n callCutAction();\n }\n if (event.keyCode == KEY_CODES.C) {\n callCopyAction();\n }\n }\n }\n\n /**\n * Destroy plugin instance.\n *\n * @function destroy\n * @memberof CopyPaste#\n */\n this.destroy = function() {\n if (this.copyPasteInstance) {\n this.copyPasteInstance.removeCallback(onCut);\n this.copyPasteInstance.removeCallback(onPaste);\n this.copyPasteInstance.destroy();\n this.copyPasteInstance = null;\n }\n instance.removeHook('beforeKeyDown', onBeforeKeyDown);\n };\n\n instance.addHook('afterDestroy', this.destroy.bind(this));\n\n /**\n * @function triggerPaste\n * @memberof CopyPaste#\n */\n this.triggerPaste = this.copyPasteInstance.triggerPaste.bind(this.copyPasteInstance);\n\n /**\n * @function triggerCut\n * @memberof CopyPaste#\n */\n this.triggerCut = this.copyPasteInstance.triggerCut.bind(this.copyPasteInstance);\n\n /**\n * Prepares copyable text in the invisible textarea.\n *\n * @function setCopyable\n * @memberof CopyPaste#\n */\n this.setCopyableText = function() {\n var settings = instance.getSettings();\n var copyRowsLimit = settings.copyRowsLimit;\n var copyColsLimit = settings.copyColsLimit;\n\n var selRange = instance.getSelectedRange();\n var topLeft = selRange.getTopLeftCorner();\n var bottomRight = selRange.getBottomRightCorner();\n var startRow = topLeft.row;\n var startCol = topLeft.col;\n var endRow = bottomRight.row;\n var endCol = bottomRight.col;\n var finalEndRow = Math.min(endRow, startRow + copyRowsLimit - 1);\n var finalEndCol = Math.min(endCol, startCol + copyColsLimit - 1);\n\n this.copyableRanges.length = 0;\n\n this.copyableRanges.push({\n startRow,\n startCol,\n endRow: finalEndRow,\n endCol: finalEndCol\n });\n\n this.copyableRanges = instance.runHooks('modifyCopyableRange', this.copyableRanges);\n\n let copyableData = this.getRangedCopyableData(this.copyableRanges);\n\n instance.copyPaste.copyPasteInstance.copyable(copyableData);\n\n if (endRow !== finalEndRow || endCol !== finalEndCol) {\n instance.runHooks('afterCopyLimit', endRow - startRow + 1, endCol - startCol + 1, copyRowsLimit, copyColsLimit);\n }\n };\n\n /**\n * Create copyable text releated to range objects.\n *\n * @since 0.19.0\n * @param {Array} ranges Array of Objects with properties `startRow`, `endRow`, `startCol` and `endCol`.\n * @returns {String} Returns string which will be copied into clipboard.\n */\n this.getRangedCopyableData = function(ranges) {\n let dataSet = [];\n let copyableRows = [];\n let copyableColumns = [];\n\n // Count all copyable rows and columns\n arrayEach(ranges, (range) => {\n rangeEach(range.startRow, range.endRow, (row) => {\n if (copyableRows.indexOf(row) === -1) {\n copyableRows.push(row);\n }\n });\n rangeEach(range.startCol, range.endCol, (column) => {\n if (copyableColumns.indexOf(column) === -1) {\n copyableColumns.push(column);\n }\n });\n });\n // Concat all rows and columns data defined in ranges into one copyable string\n arrayEach(copyableRows, (row) => {\n let rowSet = [];\n\n arrayEach(copyableColumns, (column) => {\n rowSet.push(instance.getCopyableData(row, column));\n });\n\n dataSet.push(rowSet);\n });\n\n return SheetClip.stringify(dataSet);\n };\n\n /**\n * Create copyable text releated to range objects.\n *\n * @since 0.31.1\n * @param {Array} ranges Array of Objects with properties `startRow`, `startCol`, `endRow` and `endCol`.\n * @returns {Array} Returns array of arrays which will be copied into clipboard.\n */\n this.getRangedData = function(ranges) {\n let dataSet = [];\n let copyableRows = [];\n let copyableColumns = [];\n\n // Count all copyable rows and columns\n arrayEach(ranges, (range) => {\n rangeEach(range.startRow, range.endRow, (row) => {\n if (copyableRows.indexOf(row) === -1) {\n copyableRows.push(row);\n }\n });\n rangeEach(range.startCol, range.endCol, (column) => {\n if (copyableColumns.indexOf(column) === -1) {\n copyableColumns.push(column);\n }\n });\n });\n // Concat all rows and columns data defined in ranges into one copyable string\n arrayEach(copyableRows, (row) => {\n let rowSet = [];\n\n arrayEach(copyableColumns, (column) => {\n rowSet.push(instance.getCopyableData(row, column));\n });\n\n dataSet.push(rowSet);\n });\n\n return dataSet;\n };\n}\n\n/**\n * Init plugin.\n *\n * @function init\n * @memberof CopyPaste#\n */\nfunction init() {\n var instance = this,\n pluginEnabled = instance.getSettings().copyPaste !== false;\n\n if (pluginEnabled && !instance.copyPaste) {\n /**\n * Instance of CopyPaste Plugin {@link Handsontable.CopyPaste}\n *\n * @alias copyPaste\n * @memberof! Handsontable.Core#\n * @type {CopyPaste}\n */\n instance.copyPaste = new CopyPastePlugin(instance);\n\n } else if (!pluginEnabled && instance.copyPaste) {\n instance.copyPaste.destroy();\n instance.copyPaste = null;\n }\n}\n\nHooks.getSingleton().add('afterInit', init);\nHooks.getSingleton().add('afterUpdateSettings', init);\n\nexport default CopyPastePlugin;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/copyPaste/copyPaste.js","import Hooks from './../../pluginHooks';\nimport {registerPlugin} from './../../plugins';\nimport {hasOwnProperty} from './../../helpers/object';\nimport {CellRange, Selection} from './../../3rdparty/walkontable/src';\n\nfunction CustomBorders() {}\n/** *\n * Current instance (table where borders should be placed)\n */\nvar instance;\n\n/**\n * This plugin enables an option to apply custom borders through the context menu (configurable with context menu key `borders`).\n *\n * To initialize Handsontable with predefined custom borders, provide cell coordinates and border styles in a form of an array.\n *\n * See [Custom Borders](http://docs.handsontable.com/demo-custom-borders.html) demo for more examples.\n *\n * @example\n * ```js\n * ...\n * customBorders: [\n * {range: {\n * from: {row: 1, col: 1},\n * to: {row: 3, col: 4}},\n * left: {},\n * right: {},\n * top: {},\n * bottom: {}\n * }\n * ],\n * ...\n *\n * // or\n * ...\n * customBorders: [\n * {row: 2, col: 2, left: {width: 2, color: 'red'},\n * right: {width: 1, color: 'green'}, top: '', bottom: ''}\n * ],\n * ...\n * ```\n * @private\n * @class CustomBorders\n * @plugin CustomBorders\n */\n\n/** *\n * Check if plugin should be enabled.\n */\nvar checkEnable = function(customBorders) {\n if (typeof customBorders === 'boolean') {\n if (customBorders === true) {\n return true;\n }\n }\n if (typeof customBorders === 'object') {\n if (customBorders.length > 0) {\n return true;\n }\n }\n\n return false;\n};\n\n/** *\n * Initialize plugin.\n */\nvar init = function() {\n if (checkEnable(this.getSettings().customBorders)) {\n if (!this.customBorders) {\n instance = this;\n this.customBorders = new CustomBorders();\n }\n }\n};\n\n/** *\n * Get index of border from the settings.\n *\n * @param {String} className\n * @returns {Number}\n */\nvar getSettingIndex = function(className) {\n for (var i = 0; i < instance.view.wt.selections.length; i++) {\n if (instance.view.wt.selections[i].settings.className == className) {\n return i;\n }\n }\n\n return -1;\n};\n\n/** *\n * Insert WalkontableSelection instance into Walkontable settings.\n *\n * @param border\n */\nvar insertBorderIntoSettings = function(border) {\n var coordinates = {\n row: border.row,\n col: border.col\n };\n var selection = new Selection(border, new CellRange(coordinates, coordinates, coordinates));\n var index = getSettingIndex(border.className);\n\n if (index >= 0) {\n instance.view.wt.selections[index] = selection;\n } else {\n instance.view.wt.selections.push(selection);\n }\n};\n\n/** *\n * Prepare borders from setting (single cell).\n *\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @param borderObj\n */\nvar prepareBorderFromCustomAdded = function(row, col, borderObj) {\n var border = createEmptyBorders(row, col);\n border = extendDefaultBorder(border, borderObj);\n this.setCellMeta(row, col, 'borders', border);\n\n insertBorderIntoSettings(border);\n};\n\n/** *\n * Prepare borders from setting (object).\n *\n * @param {Object} rowObj\n */\nvar prepareBorderFromCustomAddedRange = function(rowObj) {\n var range = rowObj.range;\n\n for (var row = range.from.row; row <= range.to.row; row++) {\n for (var col = range.from.col; col <= range.to.col; col++) {\n var border = createEmptyBorders(row, col);\n var add = 0;\n\n if (row == range.from.row) {\n add++;\n\n if (hasOwnProperty(rowObj, 'top')) {\n border.top = rowObj.top;\n }\n }\n\n if (row == range.to.row) {\n add++;\n\n if (hasOwnProperty(rowObj, 'bottom')) {\n border.bottom = rowObj.bottom;\n }\n }\n\n if (col == range.from.col) {\n add++;\n\n if (hasOwnProperty(rowObj, 'left')) {\n border.left = rowObj.left;\n }\n }\n\n if (col == range.to.col) {\n add++;\n\n if (hasOwnProperty(rowObj, 'right')) {\n border.right = rowObj.right;\n }\n }\n\n if (add > 0) {\n this.setCellMeta(row, col, 'borders', border);\n insertBorderIntoSettings(border);\n }\n }\n }\n};\n\n/** *\n * Create separated class name for borders for each cell.\n *\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @returns {String}\n */\nvar createClassName = function(row, col) {\n return `border_row${row}col${col}`;\n};\n\n/** *\n * Create default single border for each position (top/right/bottom/left).\n *\n * @returns {Object} `{{width: number, color: string}}`\n */\nvar createDefaultCustomBorder = function() {\n return {\n width: 1,\n color: '#000'\n };\n};\n\n/** *\n * Create default object for empty border.\n *\n * @returns {Object} `{{hide: boolean}}`\n */\nvar createSingleEmptyBorder = function() {\n return {\n hide: true\n };\n};\n\n/** *\n * Create default Handsontable border object.\n *\n * @returns {Object} `{{width: number, color: string, cornerVisible: boolean}}`\n */\nvar createDefaultHtBorder = function() {\n return {\n width: 1,\n color: '#000',\n cornerVisible: false,\n };\n};\n\n/** *\n * Prepare empty border for each cell with all custom borders hidden.\n *\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n * @returns {Object} `{{className: *, border: *, row: *, col: *, top: {hide: boolean}, right: {hide: boolean}, bottom: {hide: boolean}, left: {hide: boolean}}}`\n */\nvar createEmptyBorders = function(row, col) {\n return {\n className: createClassName(row, col),\n border: createDefaultHtBorder(),\n row,\n col,\n top: createSingleEmptyBorder(),\n right: createSingleEmptyBorder(),\n bottom: createSingleEmptyBorder(),\n left: createSingleEmptyBorder(),\n };\n};\n\nvar extendDefaultBorder = function(defaultBorder, customBorder) {\n if (hasOwnProperty(customBorder, 'border')) {\n defaultBorder.border = customBorder.border;\n }\n\n if (hasOwnProperty(customBorder, 'top')) {\n defaultBorder.top = customBorder.top;\n }\n\n if (hasOwnProperty(customBorder, 'right')) {\n defaultBorder.right = customBorder.right;\n }\n\n if (hasOwnProperty(customBorder, 'bottom')) {\n defaultBorder.bottom = customBorder.bottom;\n }\n\n if (hasOwnProperty(customBorder, 'left')) {\n defaultBorder.left = customBorder.left;\n }\n\n return defaultBorder;\n};\n\n/**\n * Remove borders divs from DOM.\n *\n * @param borderClassName\n */\nvar removeBordersFromDom = function(borderClassName) {\n var borders = document.querySelectorAll(`.${borderClassName}`);\n\n for (var i = 0; i < borders.length; i++) {\n if (borders[i]) {\n if (borders[i].nodeName != 'TD') {\n var parent = borders[i].parentNode;\n\n if (parent.parentNode) {\n parent.parentNode.removeChild(parent);\n }\n }\n }\n }\n};\n\n/** *\n * Remove border (triggered from context menu).\n *\n * @param {Number} row Row index.\n * @param {Number} col Column index.\n */\nvar removeAllBorders = function(row, col) {\n var borderClassName = createClassName(row, col);\n removeBordersFromDom(borderClassName);\n this.removeCellMeta(row, col, 'borders');\n};\n\n/** *\n * Set borders for each cell re. to border position\n *\n * @param row\n * @param col\n * @param place\n * @param remove\n */\nvar setBorder = function(row, col, place, remove) {\n\n var bordersMeta = this.getCellMeta(row, col).borders;\n\n if (!bordersMeta || bordersMeta.border == undefined) {\n bordersMeta = createEmptyBorders(row, col);\n }\n\n if (remove) {\n bordersMeta[place] = createSingleEmptyBorder();\n } else {\n bordersMeta[place] = createDefaultCustomBorder();\n }\n\n this.setCellMeta(row, col, 'borders', bordersMeta);\n\n var borderClassName = createClassName(row, col);\n removeBordersFromDom(borderClassName);\n insertBorderIntoSettings(bordersMeta);\n\n this.render();\n};\n\n/** *\n * Prepare borders based on cell and border position\n *\n * @param range\n * @param place\n * @param remove\n */\nvar prepareBorder = function(range, place, remove) {\n\n if (range.from.row == range.to.row && range.from.col == range.to.col) {\n if (place == 'noBorders') {\n removeAllBorders.call(this, range.from.row, range.from.col);\n } else {\n setBorder.call(this, range.from.row, range.from.col, place, remove);\n }\n } else {\n switch (place) {\n case 'noBorders':\n for (var column = range.from.col; column <= range.to.col; column++) {\n for (var row = range.from.row; row <= range.to.row; row++) {\n removeAllBorders.call(this, row, column);\n }\n }\n break;\n case 'top':\n for (var topCol = range.from.col; topCol <= range.to.col; topCol++) {\n setBorder.call(this, range.from.row, topCol, place, remove);\n }\n break;\n case 'right':\n for (var rowRight = range.from.row; rowRight <= range.to.row; rowRight++) {\n setBorder.call(this, rowRight, range.to.col, place);\n }\n break;\n case 'bottom':\n for (var bottomCol = range.from.col; bottomCol <= range.to.col; bottomCol++) {\n setBorder.call(this, range.to.row, bottomCol, place);\n }\n break;\n case 'left':\n for (var rowLeft = range.from.row; rowLeft <= range.to.row; rowLeft++) {\n setBorder.call(this, rowLeft, range.from.col, place);\n }\n break;\n default:\n break;\n }\n }\n};\n\n/** *\n * Check if selection has border by className\n *\n * @param hot\n * @param direction\n */\nvar checkSelectionBorders = function(hot, direction) {\n var atLeastOneHasBorder = false;\n\n hot.getSelectedRange().forAll((r, c) => {\n var metaBorders = hot.getCellMeta(r, c).borders;\n\n if (metaBorders) {\n if (direction) {\n if (!hasOwnProperty(metaBorders[direction], 'hide')) {\n atLeastOneHasBorder = true;\n return false; // breaks forAll\n }\n } else {\n atLeastOneHasBorder = true;\n return false; // breaks forAll\n }\n }\n });\n return atLeastOneHasBorder;\n};\n\n/** *\n * Mark label in contextMenu as selected\n *\n * @param label\n * @returns {string}\n */\nvar markSelected = function(label) {\n return `<span class=\"selected\">${String.fromCharCode(10003)}</span>${label}`; // workaround for https://github.com/handsontable/handsontable/issues/1946\n};\n\n/** *\n * Add border options to context menu\n *\n * @param defaultOptions\n */\nvar addBordersOptionsToContextMenu = function(defaultOptions) {\n if (!this.getSettings().customBorders) {\n return;\n }\n\n defaultOptions.items.push({\n name: '---------',\n });\n defaultOptions.items.push({\n key: 'borders',\n name: 'Borders',\n disabled() {\n return this.selection.selectedHeader.corner;\n },\n submenu: {\n items: [\n {\n key: 'borders:top',\n name() {\n var label = 'Top';\n var hasBorder = checkSelectionBorders(this, 'top');\n if (hasBorder) {\n label = markSelected(label);\n }\n\n return label;\n },\n callback() {\n var hasBorder = checkSelectionBorders(this, 'top');\n prepareBorder.call(this, this.getSelectedRange(), 'top', hasBorder);\n },\n },\n {\n key: 'borders:right',\n name() {\n var label = 'Right';\n var hasBorder = checkSelectionBorders(this, 'right');\n if (hasBorder) {\n label = markSelected(label);\n }\n return label;\n },\n callback() {\n var hasBorder = checkSelectionBorders(this, 'right');\n prepareBorder.call(this, this.getSelectedRange(), 'right', hasBorder);\n },\n },\n {\n key: 'borders:bottom',\n name() {\n var label = 'Bottom';\n var hasBorder = checkSelectionBorders(this, 'bottom');\n if (hasBorder) {\n label = markSelected(label);\n }\n return label;\n },\n callback() {\n var hasBorder = checkSelectionBorders(this, 'bottom');\n prepareBorder.call(this, this.getSelectedRange(), 'bottom', hasBorder);\n },\n },\n {\n key: 'borders:left',\n name() {\n var label = 'Left';\n var hasBorder = checkSelectionBorders(this, 'left');\n if (hasBorder) {\n label = markSelected(label);\n }\n\n return label;\n },\n callback() {\n var hasBorder = checkSelectionBorders(this, 'left');\n prepareBorder.call(this, this.getSelectedRange(), 'left', hasBorder);\n },\n },\n {\n key: 'borders:no_borders',\n name: 'Remove border(s)',\n callback() {\n prepareBorder.call(this, this.getSelectedRange(), 'noBorders');\n },\n disabled() {\n return !checkSelectionBorders(this);\n }\n }\n ]\n }\n });\n};\n\nHooks.getSingleton().add('beforeInit', init);\nHooks.getSingleton().add('afterContextMenuDefaultOptions', addBordersOptionsToContextMenu);\nHooks.getSingleton().add('afterInit', function() {\n var customBorders = this.getSettings().customBorders;\n\n if (customBorders) {\n for (var i = 0; i < customBorders.length; i++) {\n if (customBorders[i].range) {\n prepareBorderFromCustomAddedRange.call(this, customBorders[i]);\n\n } else {\n prepareBorderFromCustomAdded.call(this, customBorders[i].row, customBorders[i].col, customBorders[i]);\n }\n }\n\n this.render();\n this.view.wt.draw(true);\n }\n});\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/customBorders/customBorders.js","import Hooks from './../../pluginHooks';\nimport EventManager from './../../eventManager';\nimport {registerPlugin} from './../../plugins';\n\n/**\n * @description\n * Plugin used to scroll Handsontable by selecting a cell and dragging outside of the visible viewport.\n *\n * @private\n * @class DragToScroll\n * @plugin DragToScroll\n */\nfunction DragToScroll() {\n this.boundaries = null;\n this.callback = null;\n}\n\n/**\n * @param boundaries {Object} compatible with getBoundingClientRect\n */\nDragToScroll.prototype.setBoundaries = function(boundaries) {\n this.boundaries = boundaries;\n};\n\n/**\n * @param callback {Function}\n */\nDragToScroll.prototype.setCallback = function(callback) {\n this.callback = callback;\n};\n\n/**\n * Check if mouse position (x, y) is outside of the viewport\n * @param x\n * @param y\n */\nDragToScroll.prototype.check = function(x, y) {\n var diffX = 0;\n var diffY = 0;\n\n if (y < this.boundaries.top) {\n // y is less than top\n diffY = y - this.boundaries.top;\n } else if (y > this.boundaries.bottom) {\n // y is more than bottom\n diffY = y - this.boundaries.bottom;\n }\n\n if (x < this.boundaries.left) {\n // x is less than left\n diffX = x - this.boundaries.left;\n } else if (x > this.boundaries.right) {\n // x is more than right\n diffX = x - this.boundaries.right;\n }\n\n this.callback(diffX, diffY);\n};\n\nvar dragToScroll;\nvar instance;\n\nvar setupListening = function(instance) {\n instance.dragToScrollListening = false;\n var scrollHandler = instance.view.wt.wtTable.holder; // native scroll\n dragToScroll = new DragToScroll();\n if (scrollHandler === window) {\n // not much we can do currently\n return;\n }\n dragToScroll.setBoundaries(scrollHandler.getBoundingClientRect());\n\n\n dragToScroll.setCallback((scrollX, scrollY) => {\n if (scrollX < 0) {\n scrollHandler.scrollLeft -= 50;\n } else if (scrollX > 0) {\n scrollHandler.scrollLeft += 50;\n }\n\n if (scrollY < 0) {\n scrollHandler.scrollTop -= 20;\n } else if (scrollY > 0) {\n scrollHandler.scrollTop += 20;\n }\n });\n\n instance.dragToScrollListening = true;\n};\n\nHooks.getSingleton().add('afterInit', function() {\n var instance = this;\n var eventManager = new EventManager(this);\n\n eventManager.addEventListener(document, 'mouseup', () => {\n instance.dragToScrollListening = false;\n });\n\n eventManager.addEventListener(document, 'mousemove', (event) => {\n if (instance.dragToScrollListening) {\n dragToScroll.check(event.clientX, event.clientY);\n }\n });\n});\n\nHooks.getSingleton().add('afterDestroy', function() {\n (new EventManager(this)).clear();\n});\n\nHooks.getSingleton().add('afterOnCellMouseDown', function() {\n setupListening(this);\n});\n\nHooks.getSingleton().add('afterOnCellCornerMouseDown', function() {\n setupListening(this);\n});\n\nexport default DragToScroll;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/dragToScroll/dragToScroll.js","import AutoColumnSize from './autoColumnSize/autoColumnSize';\nimport AutoFill from './autofill/autofill';\nimport AutoRowSize from './autoRowSize/autoRowSize';\nimport ColumnSorting from './columnSorting/columnSorting';\nimport Comments from './comments/comments';\nimport ContextMenu from './contextMenu/contextMenu';\nimport ContextMenuCopyPaste from './contextMenuCopyPaste/contextMenuCopyPaste';\nimport CopyPaste from './copyPaste/copyPaste';\nimport CustomBorders from './customBorders/customBorders';\nimport DragToScroll from './dragToScroll/dragToScroll';\nimport ManualColumnFreeze from './manualColumnFreeze/manualColumnFreeze';\nimport ManualColumnMove from './manualColumnMove/manualColumnMove';\nimport ManualColumnResize from './manualColumnResize/manualColumnResize';\nimport ManualRowMove from './manualRowMove/manualRowMove';\nimport ManualRowResize from './manualRowResize/manualRowResize';\nimport MergeCells from './mergeCells/mergeCells';\nimport MultipleSelectionHandles from './multipleSelectionHandles/multipleSelectionHandles';\nimport ObserveChanges from './observeChanges/observeChanges';\nimport PersistentState from './persistentState/persistentState';\nimport Search from './search/search';\nimport TouchScroll from './touchScroll/touchScroll';\nimport UndoRedo from './undoRedo/undoRedo';\nimport Base from './_base';\n\nexport {\n AutoColumnSize,\n AutoFill,\n AutoRowSize,\n ColumnSorting,\n Comments,\n ContextMenu,\n ContextMenuCopyPaste,\n CopyPaste,\n CustomBorders,\n DragToScroll,\n ManualColumnFreeze,\n ManualColumnMove,\n ManualColumnResize,\n ManualRowMove,\n ManualRowResize,\n MergeCells,\n MultipleSelectionHandles,\n ObserveChanges,\n PersistentState,\n Search,\n TouchScroll,\n UndoRedo,\n Base,\n};\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/index.js","export default function freezeColumnItem(manualColumnFreezePlugin) {\n return {\n key: 'freeze_column',\n name: 'Freeze this column',\n callback() {\n let selectedColumn = this.getSelectedRange().from.col;\n\n manualColumnFreezePlugin.freezeColumn(selectedColumn);\n\n this.render();\n this.view.wt.wtOverlays.adjustElementsSize(true);\n },\n hidden() {\n let selection = this.getSelectedRange();\n let hide = false;\n\n if (selection === void 0) {\n hide = true;\n\n } else if ((selection.from.col !== selection.to.col) || (selection.from.col <= this.getSettings().fixedColumnsLeft - 1)) {\n hide = true;\n }\n\n return hide;\n },\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js","export default function unfreezeColumnItem(manualColumnFreezePlugin) {\n return {\n key: 'unfreeze_column',\n name: 'Unfreeze this column',\n callback() {\n let selectedColumn = this.getSelectedRange().from.col;\n\n manualColumnFreezePlugin.unfreezeColumn(selectedColumn);\n\n this.render();\n this.view.wt.wtOverlays.adjustElementsSize(true);\n },\n hidden() {\n let selection = this.getSelectedRange();\n let hide = false;\n\n if (selection === void 0) {\n hide = true;\n\n } else if ((selection.from.col !== selection.to.col) || selection.from.col >= this.getSettings().fixedColumnsLeft) {\n hide = true;\n }\n\n return hide;\n },\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js","import BasePlugin from './../_base';\nimport {registerPlugin} from './../../plugins';\nimport {arrayEach} from './../../helpers/array';\nimport freezeColumnItem from './contextMenuItem/freezeColumn';\nimport unfreezeColumnItem from './contextMenuItem/unfreezeColumn';\n\nimport './manualColumnFreeze.css';\n\nconst privatePool = new WeakMap();\n/**\n * This plugin allows to manually \"freeze\" and \"unfreeze\" a column using an entry in the Context Menu.\n * You can turn it on by setting a `manualColumnFreeze` property to `true`.\n *\n * @plugin ManualColumnFreeze\n * @dependencies ManualColumnMove\n */\nclass ManualColumnFreeze extends BasePlugin {\n constructor(hotInstance) {\n super(hotInstance);\n\n privatePool.set(this, {\n moveByFreeze: false,\n afterFirstUse: false,\n });\n /**\n * Original column positions\n *\n * @type {Array}\n */\n this.frozenColumnsBasePositions = [];\n /**\n * Reference to the `ManualColumnMove` plugin.\n */\n this.manualColumnMovePlugin = void 0;\n }\n\n /**\n * Check if the plugin is enabled in the Handsontable settings.\n *\n * @returns {Boolean}\n */\n isEnabled() {\n return !!this.hot.getSettings().manualColumnFreeze;\n }\n\n /**\n * Enable plugin for this Handsontable instance.\n */\n enablePlugin() {\n if (this.enabled) {\n return;\n }\n\n this.addHook('afterContextMenuDefaultOptions', (options) => this.addContextMenuEntry(options));\n this.addHook('afterInit', () => this.onAfterInit());\n this.addHook('beforeColumnMove', (rows, target) => this.onBeforeColumnMove(rows, target));\n\n super.enablePlugin();\n }\n\n /**\n * Disable plugin for this Handsontable instance.\n */\n disablePlugin() {\n let priv = privatePool.get(this);\n\n priv.afterFirstUse = false;\n priv.moveByFreeze = false;\n\n super.disablePlugin();\n }\n\n /**\n * Updates the plugin to use the latest options you have specified.\n */\n updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n super.updatePlugin();\n }\n\n /**\n * Freeze the given column (add it to fixed columns).\n *\n * @param {Number} column Column index.\n */\n freezeColumn(column) {\n let priv = privatePool.get(this);\n let settings = this.hot.getSettings();\n\n if (!priv.afterFirstUse) {\n priv.afterFirstUse = true;\n }\n\n if (settings.fixedColumnsLeft === this.hot.countCols() || column <= settings.fixedColumnsLeft - 1) {\n return; // already fixed\n }\n\n priv.moveByFreeze = true;\n\n if (column !== this.getMovePlugin().columnsMapper.getValueByIndex(column)) {\n this.frozenColumnsBasePositions[settings.fixedColumnsLeft] = column;\n }\n\n this.getMovePlugin().moveColumn(column, settings.fixedColumnsLeft++);\n\n }\n\n /**\n * Unfreeze the given column (remove it from fixed columns and bring to it's previous position).\n *\n * @param {Number} column Column index.\n */\n unfreezeColumn(column) {\n let priv = privatePool.get(this);\n let settings = this.hot.getSettings();\n\n if (!priv.afterFirstUse) {\n priv.afterFirstUse = true;\n }\n\n if (settings.fixedColumnsLeft <= 0 || (column > settings.fixedColumnsLeft - 1)) {\n return; // not fixed\n }\n\n let returnCol = this.getBestColumnReturnPosition(column);\n\n priv.moveByFreeze = true;\n settings.fixedColumnsLeft--;\n\n this.getMovePlugin().moveColumn(column, returnCol + 1);\n }\n\n /**\n * Get the reference to the ManualColumnMove plugin.\n *\n * @private\n * @returns {Object}\n */\n getMovePlugin() {\n if (!this.manualColumnMovePlugin) {\n this.manualColumnMovePlugin = this.hot.getPlugin('manualColumnMove');\n }\n\n return this.manualColumnMovePlugin;\n }\n\n /**\n * Estimates the most fitting return position for unfrozen column.\n *\n * @private\n * @param {Number} column Column index.\n */\n getBestColumnReturnPosition(column) {\n let movePlugin = this.getMovePlugin();\n let settings = this.hot.getSettings();\n let i = settings.fixedColumnsLeft;\n let j = movePlugin.columnsMapper.getValueByIndex(i);\n let initialCol;\n\n if (this.frozenColumnsBasePositions[column] == null) {\n initialCol = movePlugin.columnsMapper.getValueByIndex(column);\n\n while (j < initialCol) {\n i++;\n j = movePlugin.columnsMapper.getValueByIndex(i);\n }\n\n } else {\n initialCol = this.frozenColumnsBasePositions[column];\n this.frozenColumnsBasePositions[column] = void 0;\n\n while (j <= initialCol) {\n i++;\n j = movePlugin.columnsMapper.getValueByIndex(i);\n }\n i = j;\n }\n\n return i - 1;\n }\n /**\n * Add the manualColumnFreeze context menu entries.\n *\n * @private\n * @param {Object} options Context menu options.\n */\n addContextMenuEntry(options) {\n options.items.push(\n {name: '---------'},\n freezeColumnItem(this),\n unfreezeColumnItem(this)\n );\n }\n\n /**\n * Enabling `manualColumnMove` plugin on `afterInit` hook.\n *\n * @private\n */\n onAfterInit() {\n if (!this.getMovePlugin().isEnabled()) {\n this.getMovePlugin().enablePlugin();\n }\n }\n\n /**\n * Prevent moving the rows from/to fixed area.\n *\n * @private\n * @param {Array} rows\n * @param {Number} target\n */\n onBeforeColumnMove(rows, target) {\n let priv = privatePool.get(this);\n\n if (priv.afterFirstUse && !priv.moveByFreeze) {\n let frozenLen = this.hot.getSettings().fixedColumnsLeft;\n let disallowMoving = target < frozenLen;\n\n if (!disallowMoving) {\n arrayEach(rows, (value, index, array) => {\n if (value < frozenLen) {\n disallowMoving = true;\n return false;\n }\n });\n }\n\n if (disallowMoving) {\n return false;\n }\n }\n\n if (priv.moveByFreeze) {\n priv.moveByFreeze = false;\n }\n }\n\n /**\n * Destroy plugin instance.\n */\n destroy() {\n super.destroy();\n }\n\n}\n\nregisterPlugin('manualColumnFreeze', ManualColumnFreeze);\n\nexport default ManualColumnFreeze;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualColumnFreeze/manualColumnFreeze.js","import BasePlugin from './../_base.js';\nimport Hooks from './../../pluginHooks';\nimport {arrayEach} from './../../helpers/array';\nimport {addClass, removeClass, offset} from './../../helpers/dom/element';\nimport {rangeEach} from './../../helpers/number';\nimport EventManager from './../../eventManager';\nimport {registerPlugin} from './../../plugins';\nimport ColumnsMapper from './columnsMapper';\nimport BacklightUI from './ui/backlight';\nimport GuidelineUI from './ui/guideline';\nimport {CellCoords} from './../../3rdparty/walkontable/src';\n\nimport './manualColumnMove.css';\n\nHooks.getSingleton().register('beforeColumnMove');\nHooks.getSingleton().register('afterColumnMove');\nHooks.getSingleton().register('unmodifyCol');\n\nconst privatePool = new WeakMap();\nconst CSS_PLUGIN = 'ht__manualColumnMove';\nconst CSS_SHOW_UI = 'show-ui';\nconst CSS_ON_MOVING = 'on-moving--columns';\nconst CSS_AFTER_SELECTION = 'after-selection--columns';\n\n/**\n * @plugin ManualColumnMove\n *\n * @description\n * This plugin allows to change columns order.\n *\n * API:\n * - moveColumn - move single column to the new position.\n * - moveColumns - move many columns (as an array of indexes) to the new position.\n *\n * If you want apply visual changes, you have to call manually the render() method on the instance of Handsontable.\n *\n * UI components:\n * - backlight - highlight of selected columns.\n * - guideline - line which shows where rows has been moved.\n *\n * @class ManualColumnMove\n * @plugin ManualColumnMove\n */\nclass ManualColumnMove extends BasePlugin {\n constructor(hotInstance) {\n super(hotInstance);\n\n /**\n * Set up WeakMap of plugin to sharing private parameters;\n */\n privatePool.set(this, {\n columnsToMove: [],\n countCols: 0,\n fixedColumns: 0,\n pressed: void 0,\n disallowMoving: void 0,\n target: {\n eventPageX: void 0,\n coords: void 0,\n TD: void 0,\n col: void 0\n }\n });\n\n /**\n * List of last removed row indexes.\n *\n * @type {Array}\n */\n this.removedColumns = [];\n /**\n * Object containing visual row indexes mapped to data source indexes.\n *\n * @type {RowsMapper}\n */\n this.columnsMapper = new ColumnsMapper(this);\n /**\n * Event Manager object.\n *\n * @type {Object}\n */\n this.eventManager = new EventManager(this);\n /**\n * Backlight UI object.\n *\n * @type {Object}\n */\n this.backlight = new BacklightUI(hotInstance);\n /**\n * Guideline UI object.\n *\n * @type {Object}\n */\n this.guideline = new GuidelineUI(hotInstance);\n }\n\n /**\n * Check if plugin is enabled.\n *\n * @returns {Boolean}\n */\n isEnabled() {\n return !!this.hot.getSettings().manualColumnMove;\n }\n\n /**\n * Enable the plugin.\n */\n enablePlugin() {\n if (this.enabled) {\n return;\n }\n\n this.addHook('beforeOnCellMouseDown', (event, coords, TD, blockCalculations) => this.onBeforeOnCellMouseDown(event, coords, TD, blockCalculations));\n this.addHook('beforeOnCellMouseOver', (event, coords, TD, blockCalculations) => this.onBeforeOnCellMouseOver(event, coords, TD, blockCalculations));\n this.addHook('afterScrollVertically', () => this.onAfterScrollVertically());\n this.addHook('modifyCol', (row, source) => this.onModifyCol(row, source));\n this.addHook('beforeRemoveCol', (index, amount) => this.onBeforeRemoveCol(index, amount));\n this.addHook('afterRemoveCol', (index, amount) => this.onAfterRemoveCol(index, amount));\n this.addHook('afterCreateCol', (index, amount) => this.onAfterCreateCol(index, amount));\n this.addHook('afterLoadData', (firstTime) => this.onAfterLoadData(firstTime));\n this.addHook('unmodifyCol', (column) => this.onUnmodifyCol(column));\n\n this.registerEvents();\n\n // TODO: move adding plugin classname to BasePlugin.\n addClass(this.hot.rootElement, CSS_PLUGIN);\n\n super.enablePlugin();\n }\n\n /**\n * Updates the plugin to use the latest options you have specified.\n */\n updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n this.onAfterPluginsInitialized();\n\n super.updatePlugin();\n }\n\n /**\n * Disable plugin for this Handsontable instance.\n */\n disablePlugin() {\n let pluginSettings = this.hot.getSettings().manualColumnMove;\n\n if (Array.isArray(pluginSettings)) {\n this.columnsMapper.clearMap();\n }\n\n removeClass(this.hot.rootElement, CSS_PLUGIN);\n\n this.unregisterEvents();\n this.backlight.destroy();\n this.guideline.destroy();\n\n super.disablePlugin();\n }\n\n /**\n * Move a single column.\n *\n * @param {Number} column Visual column index to be moved.\n * @param {Number} target Visual column index being a target for the moved column.\n */\n moveColumn(column, target) {\n this.moveColumns([column], target);\n }\n\n /**\n * Move multiple columns.\n *\n * @param {Array} columns Array of visual column indexes to be moved.\n * @param {Number} target Visual column index being a target for the moved columns.\n */\n moveColumns(columns, target) {\n let priv = privatePool.get(this);\n let beforeColumnHook = this.hot.runHooks('beforeColumnMove', columns, target);\n\n priv.disallowMoving = !beforeColumnHook;\n\n if (beforeColumnHook !== false) {\n // first we need to rewrite an visual indexes to logical for save reference after move\n arrayEach(columns, (column, index, array) => {\n array[index] = this.columnsMapper.getValueByIndex(column);\n });\n\n // next, when we have got an logical indexes, we can move columns\n arrayEach(columns, (column, index) => {\n let actualPosition = this.columnsMapper.getIndexByValue(column);\n\n if (actualPosition !== target) {\n this.columnsMapper.moveColumn(actualPosition, target + index);\n }\n });\n\n // after moving we have to clear columnsMapper from null entries\n this.columnsMapper.clearNull();\n }\n\n this.hot.runHooks('afterColumnMove', columns, target);\n }\n\n /**\n * Correct the cell selection after the move action. Fired only when action was made with a mouse.\n * That means that changing the column order using the API won't correct the selection.\n *\n * @private\n * @param {Number} startColumn Visual column index for the start of the selection.\n * @param {Number} endColumn Visual column index for the end of the selection.\n */\n changeSelection(startColumn, endColumn) {\n let selection = this.hot.selection;\n let lastRowIndex = this.hot.countRows() - 1;\n\n selection.setRangeStartOnly(new CellCoords(0, startColumn));\n selection.setRangeEnd(new CellCoords(lastRowIndex, endColumn), false);\n }\n\n /**\n * Get the sum of the widths of columns in the provided range.\n *\n * @private\n * @param {Number} from Visual column index.\n * @param {Number} to Visual column index.\n * @returns {Number}\n */\n getColumnsWidth(from, to) {\n let width = 0;\n\n for (let i = from; i < to; i++) {\n let columnWidth = 0;\n\n if (i < 0) {\n columnWidth = this.hot.view.wt.wtTable.getColumnWidth(i) || 0;\n } else {\n columnWidth = this.hot.view.wt.wtTable.getStretchedColumnWidth(i) || 0;\n }\n\n width += columnWidth;\n }\n\n return width;\n }\n\n /**\n * Load initial settings when persistent state is saved or when plugin was initialized as an array.\n *\n * @private\n */\n initialSettings() {\n let pluginSettings = this.hot.getSettings().manualColumnMove;\n\n if (Array.isArray(pluginSettings)) {\n this.moveColumns(pluginSettings, 0);\n\n } else if (pluginSettings !== void 0) {\n this.persistentStateLoad();\n }\n }\n\n /**\n * Check if the provided column is in the fixedColumnsLeft section.\n *\n * @private\n * @param {Number} column Visual column index to check.\n * @returns {Boolean}\n */\n isFixedColumnsLeft(column) {\n return column < this.hot.getSettings().fixedColumnsLeft;\n }\n\n /**\n * Save the manual column positions to the persistent state.\n *\n * @private\n */\n persistentStateSave() {\n this.hot.runHooks('persistentStateSave', 'manualColumnMove', this.columnsMapper._arrayMap);\n }\n\n /**\n * Load the manual column positions from the persistent state.\n *\n * @private\n */\n persistentStateLoad() {\n let storedState = {};\n\n this.hot.runHooks('persistentStateLoad', 'manualColumnMove', storedState);\n\n if (storedState.value) {\n this.columnsMapper._arrayMap = storedState.value;\n }\n }\n\n /**\n * Prepare array of indexes based on actual selection.\n *\n * @private\n * @returns {Array}\n */\n prepareColumnsToMoving(start, end) {\n let selectedColumns = [];\n\n rangeEach(start, end, (i) => {\n selectedColumns.push(i);\n });\n\n return selectedColumns;\n }\n\n /**\n * Update the UI visual position.\n *\n * @private\n */\n refreshPositions() {\n let priv = privatePool.get(this);\n let firstVisible = this.hot.view.wt.wtTable.getFirstVisibleColumn();\n let lastVisible = this.hot.view.wt.wtTable.getLastVisibleColumn();\n let wtTable = this.hot.view.wt.wtTable;\n let scrollableElement = this.hot.view.wt.wtOverlays.scrollableElement;\n let scrollLeft = typeof scrollableElement.scrollX === 'number' ? scrollableElement.scrollX : scrollableElement.scrollLeft;\n let tdOffsetLeft = this.hot.view.THEAD.offsetLeft + this.getColumnsWidth(0, priv.coordsColumn);\n let mouseOffsetLeft = priv.target.eventPageX - (priv.rootElementOffset - (scrollableElement.scrollX === void 0 ? scrollLeft : 0));\n let hiderWidth = wtTable.hider.offsetWidth;\n let tbodyOffsetLeft = wtTable.TBODY.offsetLeft;\n let backlightElemMarginLeft = this.backlight.getOffset().left;\n let backlightElemWidth = this.backlight.getSize().width;\n let rowHeaderWidth = 0;\n\n if ((priv.rootElementOffset + wtTable.holder.offsetWidth + scrollLeft) < priv.target.eventPageX) {\n if (priv.coordsColumn < priv.countCols) {\n priv.coordsColumn++;\n }\n }\n\n if (priv.hasRowHeaders) {\n rowHeaderWidth = this.hot.view.wt.wtOverlays.leftOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth;\n }\n if (this.isFixedColumnsLeft(priv.coordsColumn)) {\n tdOffsetLeft += scrollLeft;\n }\n tdOffsetLeft += rowHeaderWidth;\n\n if (priv.coordsColumn < 0) {\n // if hover on rowHeader\n if (priv.fixedColumns > 0) {\n priv.target.col = 0;\n } else {\n priv.target.col = firstVisible > 0 ? firstVisible - 1 : firstVisible;\n }\n\n } else if (((priv.target.TD.offsetWidth / 2) + tdOffsetLeft) <= mouseOffsetLeft) {\n let newCoordsCol = priv.coordsColumn >= priv.countCols ? priv.countCols - 1 : priv.coordsColumn;\n // if hover on right part of TD\n priv.target.col = newCoordsCol + 1;\n // unfortunately first column is bigger than rest\n tdOffsetLeft += priv.target.TD.offsetWidth;\n\n if (priv.target.col > lastVisible) {\n this.hot.scrollViewportTo(void 0, lastVisible + 1, void 0, true);\n }\n\n } else {\n // elsewhere on table\n priv.target.col = priv.coordsColumn;\n\n if (priv.target.col <= firstVisible && priv.target.col >= priv.fixedColumns) {\n this.hot.scrollViewportTo(void 0, firstVisible - 1);\n }\n }\n\n if (priv.target.col <= firstVisible && priv.target.col >= priv.fixedColumns) {\n this.hot.scrollViewportTo(void 0, firstVisible - 1);\n }\n\n let backlightLeft = mouseOffsetLeft;\n let guidelineLeft = tdOffsetLeft;\n\n if (mouseOffsetLeft + backlightElemWidth + backlightElemMarginLeft >= hiderWidth) {\n // prevent display backlight on the right side of the table\n backlightLeft = hiderWidth - backlightElemWidth - backlightElemMarginLeft;\n\n } else if (mouseOffsetLeft + backlightElemMarginLeft < tbodyOffsetLeft + rowHeaderWidth) {\n // prevent display backlight on the left side of the table\n backlightLeft = tbodyOffsetLeft + rowHeaderWidth + Math.abs(backlightElemMarginLeft);\n }\n\n if (tdOffsetLeft >= hiderWidth - 1) {\n // prevent display guideline outside the table\n guidelineLeft = hiderWidth - 1;\n\n } else if (guidelineLeft === 0) {\n // guideline has got `margin-left: -1px` as default\n guidelineLeft = 1;\n\n } else if (scrollableElement.scrollX !== void 0 && priv.coordsColumn < priv.fixedColumns) {\n guidelineLeft -= ((priv.rootElementOffset <= scrollableElement.scrollX) ? priv.rootElementOffset : 0);\n }\n\n this.backlight.setPosition(null, backlightLeft);\n this.guideline.setPosition(null, guidelineLeft);\n }\n\n /**\n * This method checks arrayMap from columnsMapper and updates the columnsMapper if it's necessary.\n *\n * @private\n */\n updateColumnsMapper() {\n let countCols = this.hot.countSourceCols();\n let columnsMapperLen = this.columnsMapper._arrayMap.length;\n\n if (columnsMapperLen === 0) {\n this.columnsMapper.createMap(countCols || this.hot.getSettings().startCols);\n\n } else if (columnsMapperLen < countCols) {\n let diff = countCols - columnsMapperLen;\n\n this.columnsMapper.insertItems(columnsMapperLen, diff);\n\n } else if (columnsMapperLen > countCols) {\n let maxIndex = countCols - 1;\n let columnsToRemove = [];\n\n arrayEach(this.columnsMapper._arrayMap, (value, index, array) => {\n if (value > maxIndex) {\n columnsToRemove.push(index);\n }\n });\n\n this.columnsMapper.removeItems(columnsToRemove);\n }\n }\n\n /**\n * Bind the events used by the plugin.\n *\n * @private\n */\n registerEvents() {\n this.eventManager.addEventListener(document.documentElement, 'mousemove', (event) => this.onMouseMove(event));\n this.eventManager.addEventListener(document.documentElement, 'mouseup', () => this.onMouseUp());\n }\n\n /**\n * Unbind the events used by the plugin.\n *\n * @private\n */\n unregisterEvents() {\n this.eventManager.clear();\n }\n\n /**\n * Change the behavior of selection / dragging.\n *\n * @private\n * @param {MouseEvent} event\n * @param {CellCoords} coords\n * @param {HTMLElement} TD\n * @param {Object} blockCalculations\n */\n onBeforeOnCellMouseDown(event, coords, TD, blockCalculations) {\n let wtTable = this.hot.view.wt.wtTable;\n let isHeaderSelection = this.hot.selection.selectedHeader.cols;\n let selection = this.hot.getSelectedRange();\n let priv = privatePool.get(this);\n let isSortingElement = event.realTarget.className.indexOf('columnSorting') > -1;\n\n if (!selection || !isHeaderSelection || priv.pressed || event.button !== 0 || isSortingElement) {\n priv.pressed = false;\n priv.columnsToMove.length = 0;\n removeClass(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI]);\n return;\n }\n\n let guidelineIsNotReady = this.guideline.isBuilt() && !this.guideline.isAppended();\n let backlightIsNotReady = this.backlight.isBuilt() && !this.backlight.isAppended();\n\n if (guidelineIsNotReady && backlightIsNotReady) {\n this.guideline.appendTo(wtTable.hider);\n this.backlight.appendTo(wtTable.hider);\n }\n\n let {from, to} = selection;\n let start = Math.min(from.col, to.col);\n let end = Math.max(from.col, to.col);\n\n if (coords.row < 0 && (coords.col >= start && coords.col <= end)) {\n blockCalculations.column = true;\n priv.pressed = true;\n priv.target.eventPageX = event.pageX;\n priv.coordsColumn = coords.col;\n priv.target.TD = TD;\n priv.target.col = coords.col;\n priv.columnsToMove = this.prepareColumnsToMoving(start, end);\n priv.hasRowHeaders = !!this.hot.getSettings().rowHeaders;\n priv.countCols = this.hot.countCols();\n priv.fixedColumns = this.hot.getSettings().fixedColumnsLeft;\n priv.rootElementOffset = offset(this.hot.rootElement).left;\n\n let countColumnsFrom = priv.hasRowHeaders ? -1 : 0;\n let topPos = wtTable.holder.scrollTop + wtTable.getColumnHeaderHeight(0) + 1;\n let fixedColumns = coords.col < priv.fixedColumns;\n let scrollableElement = this.hot.view.wt.wtOverlays.scrollableElement;\n let wrapperIsWindow = scrollableElement.scrollX ? scrollableElement.scrollX - priv.rootElementOffset : 0;\n\n let mouseOffset = event.layerX - (fixedColumns ? wrapperIsWindow : 0);\n let leftOffset = Math.abs(this.getColumnsWidth(start, coords.col) + mouseOffset);\n\n this.backlight.setPosition(topPos, this.getColumnsWidth(countColumnsFrom, start) + leftOffset);\n this.backlight.setSize(this.getColumnsWidth(start, end + 1), wtTable.hider.offsetHeight - topPos);\n this.backlight.setOffset(null, leftOffset * -1);\n\n addClass(this.hot.rootElement, CSS_ON_MOVING);\n\n } else {\n removeClass(this.hot.rootElement, CSS_AFTER_SELECTION);\n priv.pressed = false;\n priv.columnsToMove.length = 0;\n }\n }\n\n /**\n * 'mouseMove' event callback. Fired when pointer move on document.documentElement.\n *\n * @private\n * @param {MouseEvent} event `mousemove` event properties.\n */\n onMouseMove(event) {\n let priv = privatePool.get(this);\n\n if (!priv.pressed) {\n return;\n }\n\n // callback for browser which doesn't supports CSS pointer-event: none\n if (event.realTarget === this.backlight.element) {\n let width = this.backlight.getSize().width;\n this.backlight.setSize(0);\n\n setTimeout(function() {\n this.backlight.setPosition(width);\n });\n }\n\n priv.target.eventPageX = event.pageX;\n this.refreshPositions();\n }\n\n /**\n * 'beforeOnCellMouseOver' hook callback. Fired when pointer was over cell.\n *\n * @private\n * @param {MouseEvent} event `mouseover` event properties.\n * @param {CellCoords} coords Cell coordinates where was fired event.\n * @param {HTMLElement} TD Cell represented as HTMLElement.\n * @param {Object} blockCalculations Object which contains information about blockCalculation for row, column or cells.\n */\n onBeforeOnCellMouseOver(event, coords, TD, blockCalculations) {\n let selectedRange = this.hot.getSelectedRange();\n let priv = privatePool.get(this);\n\n if (!selectedRange || !priv.pressed) {\n return;\n }\n\n if (priv.columnsToMove.indexOf(coords.col) > -1) {\n removeClass(this.hot.rootElement, CSS_SHOW_UI);\n\n } else {\n addClass(this.hot.rootElement, CSS_SHOW_UI);\n }\n\n blockCalculations.row = true;\n blockCalculations.column = true;\n blockCalculations.cell = true;\n priv.coordsColumn = coords.col;\n priv.target.TD = TD;\n }\n\n /**\n * `onMouseUp` hook callback.\n *\n * @private\n */\n onMouseUp() {\n let priv = privatePool.get(this);\n\n priv.coordsColumn = void 0;\n priv.pressed = false;\n priv.backlightWidth = 0;\n\n removeClass(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI, CSS_AFTER_SELECTION]);\n\n if (this.hot.selection.selectedHeader.cols) {\n addClass(this.hot.rootElement, CSS_AFTER_SELECTION);\n }\n if (priv.columnsToMove.length < 1 || priv.target.col === void 0 || priv.columnsToMove.indexOf(priv.target.col) > -1) {\n return;\n }\n\n this.moveColumns(priv.columnsToMove, priv.target.col);\n this.persistentStateSave();\n this.hot.render();\n this.hot.view.wt.wtOverlays.adjustElementsSize(true);\n\n if (!priv.disallowMoving) {\n let selectionStart = this.columnsMapper.getIndexByValue(priv.columnsToMove[0]);\n let selectionEnd = this.columnsMapper.getIndexByValue(priv.columnsToMove[priv.columnsToMove.length - 1]);\n this.changeSelection(selectionStart, selectionEnd);\n }\n\n priv.columnsToMove.length = 0;\n }\n\n /**\n * `afterScrollHorizontally` hook callback. Fired the table was scrolled horizontally.\n *\n * @private\n */\n onAfterScrollVertically() {\n let wtTable = this.hot.view.wt.wtTable;\n let headerHeight = wtTable.getColumnHeaderHeight(0) + 1;\n let scrollTop = wtTable.holder.scrollTop;\n let posTop = headerHeight + scrollTop;\n\n this.backlight.setPosition(posTop);\n this.backlight.setSize(null, wtTable.hider.offsetHeight - posTop);\n }\n\n /**\n * `afterCreateCol` hook callback.\n *\n * @private\n * @param {Number} index Index of the created column.\n * @param {Number} amount Amount of created columns.\n */\n onAfterCreateCol(index, amount) {\n this.columnsMapper.shiftItems(index, amount);\n }\n\n /**\n * On before remove column listener.\n *\n * @private\n * @param {Number} index Column index.\n * @param {Number} amount Defines how many columns removed.\n */\n onBeforeRemoveCol(index, amount) {\n this.removedColumns.length = 0;\n\n if (index !== false) {\n // Collect physical row index.\n rangeEach(index, index + amount - 1, (removedIndex) => {\n this.removedColumns.push(this.hot.runHooks('modifyCol', removedIndex, this.pluginName));\n });\n }\n }\n\n /**\n * `afterRemoveCol` hook callback.\n *\n * @private\n * @param {Number} index Index of the removed column.\n * @param {Number} amount Amount of removed columns.\n */\n onAfterRemoveCol(index, amount) {\n this.columnsMapper.unshiftItems(this.removedColumns);\n }\n\n /**\n * `afterLoadData` hook callback.\n *\n * @private\n * @param {Boolean} firstTime True if that was loading data during the initialization.\n */\n onAfterLoadData(firstTime) {\n this.updateColumnsMapper();\n }\n\n /**\n * 'modifyRow' hook callback.\n *\n * @private\n * @param {Number} column Visual column index.\n * @returns {Number} Modified column index.\n */\n onModifyCol(column, source) {\n if (source !== this.pluginName) {\n // ugly fix for try to insert new, needed columns after pasting data\n let columnInMapper = this.columnsMapper.getValueByIndex(column);\n column = columnInMapper === null ? column : columnInMapper;\n }\n\n return column;\n }\n\n /**\n * 'unmodifyCol' hook callback.\n *\n * @private\n * @param {Number} column Visual column index.\n * @returns {Number} Logical column index.\n */\n onUnmodifyCol(column) {\n let indexInMapper = this.columnsMapper.getIndexByValue(column);\n\n return indexInMapper === null ? column : indexInMapper;\n }\n\n /**\n * `afterPluginsInitialized` hook callback.\n *\n * @private\n */\n onAfterPluginsInitialized() {\n this.updateColumnsMapper();\n this.initialSettings();\n this.backlight.build();\n this.guideline.build();\n }\n\n /**\n * Destroy plugin instance.\n */\n destroy() {\n this.backlight.destroy();\n this.guideline.destroy();\n\n super.destroy();\n }\n}\n\nregisterPlugin('ManualColumnMove', ManualColumnMove);\n\nexport default ManualColumnMove;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualColumnMove/manualColumnMove.js","import ColumnsMapper from 'handsontable/plugins/manualColumnMove/columnsMapper';\n\ndescribe('manualColumnMove', () => {\n describe('columnsMapper', () => {\n it('should set manualColumnMove plugin while constructing', () => {\n var manualColumnMoveMock = {};\n var mapper = new ColumnsMapper(manualColumnMoveMock);\n\n expect(mapper.manualColumnMove).toBe(manualColumnMoveMock);\n });\n\n it('should be mixed with arrayMapper object', () => {\n expect(ColumnsMapper.MIXINS).toEqual(['arrayMapper']);\n });\n\n it('should destroy array after calling destroy method', () => {\n var mapper = new ColumnsMapper();\n\n expect(mapper._arrayMap).toEqual([]);\n\n mapper.destroy();\n\n expect(mapper._arrayMap).toBe(null);\n });\n\n it('should create map with pairs index->value', () => {\n var mapper = new ColumnsMapper();\n mapper.createMap(6);\n\n expect(mapper._arrayMap[0]).toBe(0);\n expect(mapper._arrayMap[1]).toBe(1);\n expect(mapper._arrayMap[2]).toBe(2);\n expect(mapper._arrayMap[3]).toBe(3);\n expect(mapper._arrayMap[4]).toBe(4);\n expect(mapper._arrayMap[5]).toBe(5);\n });\n\n it('should change order after move action', () => {\n var mapper = new ColumnsMapper();\n mapper.createMap(6);\n\n mapper.moveColumn(1, 0);\n mapper.clearNull();\n\n expect(mapper._arrayMap[0]).toBe(1);\n expect(mapper._arrayMap[1]).toBe(0);\n expect(mapper._arrayMap[2]).toBe(2);\n expect(mapper._arrayMap[3]).toBe(3);\n expect(mapper._arrayMap[4]).toBe(4);\n expect(mapper._arrayMap[5]).toBe(5);\n });\n\n it('should clean from null values', () => {\n var mapper = new ColumnsMapper();\n mapper.createMap(6);\n\n mapper.moveColumn(1, 6);\n mapper.moveColumn(2, 7);\n mapper.moveColumn(4, 8);\n\n mapper.clearNull();\n\n expect(mapper._arrayMap.length).toBe(6);\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualColumnMove/test/columnsMapper.unit.js","import BaseUI from './_base';\nimport {addClass} from './../../../helpers/dom/element';\n\nconst CSS_CLASSNAME = 'ht__manualColumnMove--backlight';\n\n/**\n * @class BacklightUI\n * @util\n */\nclass BacklightUI extends BaseUI {\n /**\n * Custom className on build process.\n */\n build() {\n super.build();\n\n addClass(this._element, CSS_CLASSNAME);\n }\n}\n\nexport default BacklightUI;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualColumnMove/ui/backlight.js","import BaseUI from './_base';\nimport {addClass} from './../../../helpers/dom/element';\n\nconst CSS_CLASSNAME = 'ht__manualColumnMove--guideline';\n\n/**\n * @class GuidelineUI\n * @util\n */\nclass GuidelineUI extends BaseUI {\n /**\n * Custom className on build process.\n */\n build() {\n super.build();\n\n addClass(this._element, CSS_CLASSNAME);\n }\n}\n\nexport default GuidelineUI;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualColumnMove/ui/guideline.js","import BasePlugin from './../_base.js';\nimport {addClass, hasClass, removeClass, outerHeight} from './../../helpers/dom/element';\nimport EventManager from './../../eventManager';\nimport {pageX, pageY} from './../../helpers/dom/event';\nimport {arrayEach} from './../../helpers/array';\nimport {rangeEach} from './../../helpers/number';\nimport {registerPlugin} from './../../plugins';\n\n// Developer note! Whenever you make a change in this file, make an analogous change in manualRowResize.js\n\n/**\n * @description\n * ManualColumnResize Plugin.\n *\n * Has 2 UI components:\n * - handle - the draggable element that sets the desired width of the column.\n * - guide - the helper guide that shows the desired width as a vertical guide.\n *\n * @plugin ManualColumnResize\n */\nclass ManualColumnResize extends BasePlugin {\n\n constructor(hotInstance) {\n super(hotInstance);\n\n this.currentTH = null;\n this.currentCol = null;\n this.selectedCols = [];\n this.currentWidth = null;\n this.newSize = null;\n this.startY = null;\n this.startWidth = null;\n this.startOffset = null;\n this.handle = document.createElement('DIV');\n this.guide = document.createElement('DIV');\n this.eventManager = new EventManager(this);\n this.pressed = null;\n this.dblclick = 0;\n this.autoresizeTimeout = null;\n this.manualColumnWidths = [];\n\n addClass(this.handle, 'manualColumnResizer');\n addClass(this.guide, 'manualColumnResizerGuide');\n }\n\n /**\n * Check if the plugin is enabled in the handsontable settings.\n *\n * @returns {Boolean}\n */\n isEnabled() {\n return this.hot.getSettings().manualColumnResize;\n }\n\n /**\n * Enable plugin for this Handsontable instance.\n */\n enablePlugin() {\n if (this.enabled) {\n return;\n }\n\n this.manualColumnWidths = [];\n let initialColumnWidth = this.hot.getSettings().manualColumnResize;\n let loadedManualColumnWidths = this.loadManualColumnWidths();\n\n this.addHook('modifyColWidth', (width, col) => this.onModifyColWidth(width, col));\n this.addHook('beforeStretchingColumnWidth', (stretchedWidth, column) => this.onBeforeStretchingColumnWidth(stretchedWidth, column));\n this.addHook('beforeColumnResize', (currentColumn, newSize, isDoubleClick) => this.onBeforeColumnResize(currentColumn, newSize, isDoubleClick));\n\n if (typeof loadedManualColumnWidths != 'undefined') {\n this.manualColumnWidths = loadedManualColumnWidths;\n } else if (Array.isArray(initialColumnWidth)) {\n this.manualColumnWidths = initialColumnWidth;\n } else {\n this.manualColumnWidths = [];\n }\n\n // Handsontable.hooks.register('beforeColumnResize');\n // Handsontable.hooks.register('afterColumnResize');\n\n this.bindEvents();\n\n super.enablePlugin();\n }\n\n /**\n * Updates the plugin to use the latest options you have specified.\n */\n updatePlugin() {\n let initialColumnWidth = this.hot.getSettings().manualColumnResize;\n\n if (Array.isArray(initialColumnWidth)) {\n this.manualColumnWidths = initialColumnWidth;\n\n } else if (!initialColumnWidth) {\n this.manualColumnWidths = [];\n }\n }\n\n /**\n * Disable plugin for this Handsontable instance.\n */\n disablePlugin() {\n super.disablePlugin();\n }\n\n /**\n * Save the current sizes using the persistentState plugin.\n */\n saveManualColumnWidths() {\n this.hot.runHooks('persistentStateSave', 'manualColumnWidths', this.manualColumnWidths);\n }\n\n /**\n * Load the previously saved sizes using the persistentState plugin.\n *\n * @returns {Array}\n */\n loadManualColumnWidths() {\n let storedState = {};\n\n this.hot.runHooks('persistentStateLoad', 'manualColumnWidths', storedState);\n\n return storedState.value;\n }\n\n /**\n * Set the resize handle position.\n *\n * @param {HTMLCellElement} TH TH HTML element.\n */\n setupHandlePosition(TH) {\n if (!TH.parentNode) {\n return false;\n }\n\n this.currentTH = TH;\n\n let col = this.hot.view.wt.wtTable.getCoords(TH).col; // getCoords returns CellCoords\n let headerHeight = outerHeight(this.currentTH);\n\n if (col >= 0) { // if not col header\n let box = this.currentTH.getBoundingClientRect();\n\n this.currentCol = col;\n this.selectedCols = [];\n\n if (this.hot.selection.isSelected() && this.hot.selection.selectedHeader.cols) {\n let {from, to} = this.hot.getSelectedRange();\n let start = from.col;\n let end = to.col;\n\n if (start >= end) {\n start = to.col;\n end = from.col;\n }\n\n if (this.currentCol >= start && this.currentCol <= end) {\n rangeEach(start, end, (i) => this.selectedCols.push(i));\n\n } else {\n this.selectedCols.push(this.currentCol);\n }\n } else {\n this.selectedCols.push(this.currentCol);\n }\n\n this.startOffset = box.left - 6;\n this.startWidth = parseInt(box.width, 10);\n this.handle.style.top = `${box.top}px`;\n this.handle.style.left = `${this.startOffset + this.startWidth}px`;\n this.handle.style.height = `${headerHeight}px`;\n this.hot.rootElement.appendChild(this.handle);\n }\n }\n\n /**\n * Refresh the resize handle position.\n */\n refreshHandlePosition() {\n this.handle.style.left = `${this.startOffset + this.currentWidth}px`;\n }\n\n /**\n * Set the resize guide position.\n */\n setupGuidePosition() {\n let handleHeight = parseInt(outerHeight(this.handle), 10);\n let handleBottomPosition = parseInt(this.handle.style.top, 10) + handleHeight;\n let maximumVisibleElementHeight = parseInt(this.hot.view.maximumVisibleElementHeight(0), 10);\n\n addClass(this.handle, 'active');\n addClass(this.guide, 'active');\n\n this.guide.style.top = `${handleBottomPosition}px`;\n this.guide.style.left = this.handle.style.left;\n this.guide.style.height = `${maximumVisibleElementHeight - handleHeight}px`;\n this.hot.rootElement.appendChild(this.guide);\n }\n\n /**\n * Refresh the resize guide position.\n */\n refreshGuidePosition() {\n this.guide.style.left = this.handle.style.left;\n }\n\n /**\n * Hide both the resize handle and resize guide.\n */\n hideHandleAndGuide() {\n removeClass(this.handle, 'active');\n removeClass(this.guide, 'active');\n }\n\n /**\n * Check if provided element is considered a column header.\n *\n * @param {HTMLElement} element HTML element.\n * @returns {Boolean}\n */\n checkIfColumnHeader(element) {\n if (element != this.hot.rootElement) {\n let parent = element.parentNode;\n\n if (parent.tagName === 'THEAD') {\n return true;\n }\n\n return this.checkIfColumnHeader(parent);\n }\n\n return false;\n }\n\n /**\n * Get the TH element from the provided element.\n *\n * @param {HTMLElement} element HTML element.\n * @returns {HTMLElement}\n */\n getTHFromTargetElement(element) {\n if (element.tagName != 'TABLE') {\n if (element.tagName == 'TH') {\n return element;\n }\n return this.getTHFromTargetElement(element.parentNode);\n\n }\n\n return null;\n }\n\n /**\n * 'mouseover' event callback - set the handle position.\n *\n * @private\n * @param {MouseEvent} event\n */\n onMouseOver(event) {\n if (this.checkIfColumnHeader(event.target)) {\n let th = this.getTHFromTargetElement(event.target);\n\n if (!th) {\n return;\n }\n\n let colspan = th.getAttribute('colspan');\n\n if (th && (colspan === null || colspan === 1)) {\n if (!this.pressed) {\n this.setupHandlePosition(th);\n }\n }\n }\n }\n\n /**\n * Auto-size row after doubleclick - callback.\n *\n * @private\n */\n afterMouseDownTimeout() {\n const render = () => {\n this.hot.forceFullRender = true;\n this.hot.view.render(); // updates all\n this.hot.view.wt.wtOverlays.adjustElementsSize(true);\n };\n const resize = (selectedCol, forceRender) => {\n let hookNewSize = this.hot.runHooks('beforeColumnResize', selectedCol, this.newSize, true);\n\n if (hookNewSize !== void 0) {\n this.newSize = hookNewSize;\n }\n\n if (this.hot.getSettings().stretchH === 'all') {\n this.clearManualSize(selectedCol);\n } else {\n this.setManualSize(selectedCol, this.newSize); // double click sets by auto row size plugin\n }\n\n if (forceRender) {\n render();\n }\n\n this.saveManualColumnWidths();\n\n this.hot.runHooks('afterColumnResize', selectedCol, this.newSize, true);\n };\n\n if (this.dblclick >= 2) {\n let selectedColsLength = this.selectedCols.length;\n\n if (selectedColsLength > 1) {\n arrayEach(this.selectedCols, (selectedCol) => {\n resize(selectedCol);\n });\n render();\n } else {\n arrayEach(this.selectedCols, (selectedCol) => {\n resize(selectedCol, true);\n });\n }\n }\n this.dblclick = 0;\n this.autoresizeTimeout = null;\n }\n\n /**\n * 'mousedown' event callback.\n *\n * @private\n * @param {MouseEvent} e\n */\n onMouseDown(event) {\n if (hasClass(event.target, 'manualColumnResizer')) {\n this.setupGuidePosition();\n this.pressed = this.hot;\n\n if (this.autoresizeTimeout === null) {\n this.autoresizeTimeout = setTimeout(() => this.afterMouseDownTimeout(), 500);\n\n this.hot._registerTimeout(this.autoresizeTimeout);\n }\n this.dblclick++;\n\n this.startX = pageX(event);\n this.newSize = this.startWidth;\n }\n }\n\n /**\n * 'mousemove' event callback - refresh the handle and guide positions, cache the new column width.\n *\n * @private\n * @param {MouseEvent} e\n */\n onMouseMove(event) {\n if (this.pressed) {\n this.currentWidth = this.startWidth + (pageX(event) - this.startX);\n\n arrayEach(this.selectedCols, (selectedCol) => {\n this.newSize = this.setManualSize(selectedCol, this.currentWidth);\n });\n\n this.refreshHandlePosition();\n this.refreshGuidePosition();\n }\n }\n\n /**\n * 'mouseup' event callback - apply the column resizing.\n *\n * @private\n * @param {MouseEvent} e\n */\n onMouseUp(event) {\n const render = () => {\n this.hot.forceFullRender = true;\n this.hot.view.render(); // updates all\n this.hot.view.wt.wtOverlays.adjustElementsSize(true);\n };\n const resize = (selectedCol, forceRender) => {\n this.hot.runHooks('beforeColumnResize', selectedCol, this.newSize);\n\n if (forceRender) {\n render();\n }\n\n this.saveManualColumnWidths();\n\n this.hot.runHooks('afterColumnResize', selectedCol, this.newSize);\n };\n\n if (this.pressed) {\n this.hideHandleAndGuide();\n this.pressed = false;\n\n if (this.newSize != this.startWidth) {\n let selectedColsLength = this.selectedCols.length;\n\n if (selectedColsLength > 1) {\n arrayEach(this.selectedCols, (selectedCol) => {\n resize(selectedCol);\n });\n render();\n } else {\n arrayEach(this.selectedCols, (selectedCol) => {\n resize(selectedCol, true);\n });\n }\n }\n\n this.setupHandlePosition(this.currentTH);\n }\n }\n\n /**\n * Bind the mouse events.\n *\n * @private\n */\n bindEvents() {\n this.eventManager.addEventListener(this.hot.rootElement, 'mouseover', (e) => this.onMouseOver(e));\n this.eventManager.addEventListener(this.hot.rootElement, 'mousedown', (e) => this.onMouseDown(e));\n this.eventManager.addEventListener(window, 'mousemove', (e) => this.onMouseMove(e));\n this.eventManager.addEventListener(window, 'mouseup', (e) => this.onMouseUp(e));\n }\n\n /**\n * Cache the current column width.\n *\n * @param {Number} column Column index.\n * @param {Number} width Column width.\n * @returns {Number}\n */\n setManualSize(column, width) {\n width = Math.max(width, 20);\n\n /**\n * We need to run col through modifyCol hook, in case the order of displayed columns is different than the order\n * in data source. For instance, this order can be modified by manualColumnMove plugin.\n */\n column = this.hot.runHooks('modifyCol', column);\n\n this.manualColumnWidths[column] = width;\n\n return width;\n }\n\n /**\n * Clear cache for the current column index.\n *\n * @param {Number} column Column index.\n */\n clearManualSize(column) {\n column = this.hot.runHooks('modifyCol', column);\n\n this.manualColumnWidths[column] = void 0;\n }\n\n /**\n * Modify the provided column width, based on the plugin settings\n *\n * @private\n * @param {Number} width Column width.\n * @param {Number} column Column index.\n * @returns {Number}\n */\n onModifyColWidth(width, column) {\n if (this.enabled) {\n column = this.hot.runHooks('modifyCol', column);\n\n if (this.hot.getSettings().manualColumnResize && this.manualColumnWidths[column]) {\n return this.manualColumnWidths[column];\n }\n }\n\n return width;\n }\n\n /**\n * Modify the provided column stretched width. This hook decides if specified column should be stretched or not.\n *\n * @private\n * @param {Number} stretchedWidth Stretched width.\n * @param {Number} column Column index.\n * @returns {Number}\n */\n onBeforeStretchingColumnWidth(stretchedWidth, column) {\n let width = this.manualColumnWidths[column];\n\n if (width === void 0) {\n width = stretchedWidth;\n }\n\n return width;\n }\n\n /**\n * `beforeColumnResize` hook callback.\n *\n * @private\n * @param {Number} currentColumn Index of the resized column.\n * @param {Number} newSize Calculated new column width.\n * @param {Boolean} isDoubleClick Flag that determines whether there was a double-click.\n */\n onBeforeColumnResize() {\n // clear the header height cache information\n this.hot.view.wt.wtViewport.hasOversizedColumnHeadersMarked = {};\n }\n}\n\nregisterPlugin('manualColumnResize', ManualColumnResize);\n\nexport default ManualColumnResize;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualColumnResize/manualColumnResize.js","import BasePlugin from './../_base.js';\nimport Hooks from './../../pluginHooks';\nimport {arrayEach} from './../../helpers/array';\nimport {addClass, removeClass, offset} from './../../helpers/dom/element';\nimport {rangeEach} from './../../helpers/number';\nimport EventManager from './../../eventManager';\nimport {registerPlugin} from './../../plugins';\nimport RowsMapper from './rowsMapper';\nimport BacklightUI from './ui/backlight';\nimport GuidelineUI from './ui/guideline';\nimport {CellCoords} from './../../3rdparty/walkontable/src';\n\nimport './manualRowMove.css';\n\nHooks.getSingleton().register('beforeRowMove');\nHooks.getSingleton().register('afterRowMove');\nHooks.getSingleton().register('unmodifyRow');\n\nconst privatePool = new WeakMap();\nconst CSS_PLUGIN = 'ht__manualRowMove';\nconst CSS_SHOW_UI = 'show-ui';\nconst CSS_ON_MOVING = 'on-moving--rows';\nconst CSS_AFTER_SELECTION = 'after-selection--rows';\n\n/**\n * @plugin ManualRowMove\n *\n * @description\n * This plugin allows to change rows order.\n *\n * API:\n * - moveRow - move single row to the new position.\n * - moveRows - move many rows (as an array of indexes) to the new position.\n *\n * If you want apply visual changes, you have to call manually the render() method on the instance of handsontable.\n *\n * UI components:\n * - backlight - highlight of selected rows.\n * - guideline - line which shows where rows has been moved.\n *\n * @class ManualRowMove\n * @plugin ManualRowMove\n */\nclass ManualRowMove extends BasePlugin {\n constructor(hotInstance) {\n super(hotInstance);\n\n /**\n * Set up WeakMap of plugin to sharing private parameters;\n */\n privatePool.set(this, {\n rowsToMove: [],\n pressed: void 0,\n disallowMoving: void 0,\n target: {\n eventPageY: void 0,\n coords: void 0,\n TD: void 0,\n row: void 0\n }\n });\n\n /**\n * List of last removed row indexes.\n *\n * @type {Array}\n */\n this.removedRows = [];\n /**\n * Object containing visual row indexes mapped to data source indexes.\n *\n * @type {RowsMapper}\n */\n this.rowsMapper = new RowsMapper(this);\n /**\n * Event Manager object.\n *\n * @type {Object}\n */\n this.eventManager = new EventManager(this);\n /**\n * Backlight UI object.\n *\n * @type {Object}\n */\n this.backlight = new BacklightUI(hotInstance);\n /**\n * Guideline UI object.\n *\n * @type {Object}\n */\n this.guideline = new GuidelineUI(hotInstance);\n }\n\n /**\n * Check if plugin is enabled.\n *\n * @returns {Boolean}\n */\n isEnabled() {\n return !!this.hot.getSettings().manualRowMove;\n }\n\n /**\n * Enable the plugin.\n */\n enablePlugin() {\n if (this.enabled) {\n return;\n }\n\n this.addHook('beforeOnCellMouseDown', (event, coords, TD, blockCalculations) => this.onBeforeOnCellMouseDown(event, coords, TD, blockCalculations));\n this.addHook('beforeOnCellMouseOver', (event, coords, TD, blockCalculations) => this.onBeforeOnCellMouseOver(event, coords, TD, blockCalculations));\n this.addHook('afterScrollHorizontally', () => this.onAfterScrollHorizontally());\n this.addHook('modifyRow', (row, source) => this.onModifyRow(row, source));\n this.addHook('beforeRemoveRow', (index, amount) => this.onBeforeRemoveRow(index, amount));\n this.addHook('afterRemoveRow', (index, amount) => this.onAfterRemoveRow(index, amount));\n this.addHook('afterCreateRow', (index, amount) => this.onAfterCreateRow(index, amount));\n this.addHook('afterLoadData', (firstTime) => this.onAfterLoadData(firstTime));\n this.addHook('beforeColumnSort', (column, order) => this.onBeforeColumnSort(column, order));\n this.addHook('unmodifyRow', (row) => this.onUnmodifyRow(row));\n\n this.registerEvents();\n\n // TODO: move adding plugin classname to BasePlugin.\n addClass(this.hot.rootElement, CSS_PLUGIN);\n\n super.enablePlugin();\n }\n\n /**\n * Updates the plugin to use the latest options you have specified.\n */\n updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n this.onAfterPluginsInitialized();\n\n super.updatePlugin();\n }\n\n /**\n * Disable plugin for this Handsontable instance.\n */\n disablePlugin() {\n let pluginSettings = this.hot.getSettings().manualRowMove;\n\n if (Array.isArray(pluginSettings)) {\n this.rowsMapper.clearMap();\n }\n\n removeClass(this.hot.rootElement, CSS_PLUGIN);\n\n this.unregisterEvents();\n this.backlight.destroy();\n this.guideline.destroy();\n\n super.disablePlugin();\n }\n\n /**\n * Move a single row.\n *\n * @param {Number} row Visual row index to be moved.\n * @param {Number} target Visual row index being a target for the moved row.\n */\n moveRow(row, target) {\n this.moveRows([row], target);\n }\n\n /**\n * Move multiple rows.\n *\n * @param {Array} rows Array of visual row indexes to be moved.\n * @param {Number} target Visual row index being a target for the moved rows.\n */\n moveRows(rows, target) {\n let priv = privatePool.get(this);\n let beforeMoveHook = this.hot.runHooks('beforeRowMove', rows, target);\n\n priv.disallowMoving = beforeMoveHook === false;\n\n if (!priv.disallowMoving) {\n // first we need to rewrite an visual indexes to logical for save reference after move\n arrayEach(rows, (row, index, array) => {\n array[index] = this.rowsMapper.getValueByIndex(row);\n });\n\n // next, when we have got an logical indexes, we can move rows\n arrayEach(rows, (row, index) => {\n let actualPosition = this.rowsMapper.getIndexByValue(row);\n\n if (actualPosition !== target) {\n this.rowsMapper.moveRow(actualPosition, target + index);\n }\n });\n\n // after moving we have to clear rowsMapper from null entries\n this.rowsMapper.clearNull();\n }\n\n this.hot.runHooks('afterRowMove', rows, target);\n }\n\n /**\n * Correct the cell selection after the move action. Fired only when action was made with a mouse.\n * That means that changing the row order using the API won't correct the selection.\n *\n * @private\n * @param {Number} startRow Visual row index for the start of the selection.\n * @param {Number} endRow Visual row index for the end of the selection.\n */\n changeSelection(startRow, endRow) {\n let selection = this.hot.selection;\n let lastColIndex = this.hot.countCols() - 1;\n\n selection.setRangeStartOnly(new CellCoords(startRow, 0));\n selection.setRangeEnd(new CellCoords(endRow, lastColIndex), false);\n }\n\n /**\n * Get the sum of the heights of rows in the provided range.\n *\n * @private\n * @param {Number} from Visual row index.\n * @param {Number} to Visual row index.\n * @returns {Number}\n */\n getRowsHeight(from, to) {\n let height = 0;\n\n for (let i = from; i < to; i++) {\n let rowHeight = this.hot.view.wt.wtTable.getRowHeight(i) || 23;\n\n height += rowHeight;\n }\n\n return height;\n }\n\n /**\n * Load initial settings when persistent state is saved or when plugin was initialized as an array.\n *\n * @private\n */\n initialSettings() {\n let pluginSettings = this.hot.getSettings().manualRowMove;\n\n if (Array.isArray(pluginSettings)) {\n this.moveRows(pluginSettings, 0);\n\n } else if (pluginSettings !== void 0) {\n let persistentState = this.persistentStateLoad();\n\n if (persistentState.length) {\n this.moveRows(persistentState, 0);\n }\n }\n }\n\n /**\n * Check if the provided row is in the fixedRowsTop section.\n *\n * @private\n * @param {Number} row Visual row index to check.\n * @returns {Boolean}\n */\n isFixedRowTop(row) {\n return row < this.hot.getSettings().fixedRowsTop;\n }\n\n /**\n * Check if the provided row is in the fixedRowsBottom section.\n *\n * @private\n * @param {Number} row Visual row index to check.\n * @returns {Boolean}\n */\n isFixedRowBottom(row) {\n return row > this.hot.getSettings().fixedRowsBottom;\n }\n\n /**\n * Save the manual row positions to the persistent state.\n *\n * @private\n */\n persistentStateSave() {\n this.hot.runHooks('persistentStateSave', 'manualRowMove', this.rowsMapper._arrayMap);\n }\n\n /**\n * Load the manual row positions from the persistent state.\n *\n * @private\n * @returns {Array} Stored state.\n */\n persistentStateLoad() {\n let storedState = {};\n\n this.hot.runHooks('persistentStateLoad', 'manualRowMove', storedState);\n\n return storedState.value ? storedState.value : [];\n }\n\n /**\n * Prepare array of indexes based on actual selection.\n *\n * @private\n * @returns {Array}\n */\n prepareRowsToMoving() {\n let selection = this.hot.getSelectedRange();\n let selectedRows = [];\n\n if (!selection) {\n return selectedRows;\n }\n\n let {from, to} = selection;\n let start = Math.min(from.row, to.row);\n let end = Math.max(from.row, to.row);\n\n rangeEach(start, end, (i) => {\n selectedRows.push(i);\n });\n\n return selectedRows;\n }\n\n /**\n * Update the UI visual position.\n *\n * @private\n */\n refreshPositions() {\n let priv = privatePool.get(this);\n let coords = priv.target.coords;\n let firstVisible = this.hot.view.wt.wtTable.getFirstVisibleRow();\n let lastVisible = this.hot.view.wt.wtTable.getLastVisibleRow();\n let fixedRows = this.hot.getSettings().fixedRowsTop;\n let countRows = this.hot.countRows();\n\n if (coords.row < fixedRows && firstVisible > 0) {\n this.hot.scrollViewportTo(firstVisible - 1);\n }\n if (coords.row >= lastVisible && lastVisible < countRows) {\n this.hot.scrollViewportTo(lastVisible + 1, undefined, true);\n }\n\n let wtTable = this.hot.view.wt.wtTable;\n let TD = priv.target.TD;\n let rootElementOffset = offset(this.hot.rootElement);\n let tdOffsetTop = this.hot.view.THEAD.offsetHeight + this.getRowsHeight(0, coords.row);\n let mouseOffsetTop = priv.target.eventPageY - rootElementOffset.top + wtTable.holder.scrollTop;\n let hiderHeight = wtTable.hider.offsetHeight;\n let tbodyOffsetTop = wtTable.TBODY.offsetTop;\n let backlightElemMarginTop = this.backlight.getOffset().top;\n let backlightElemHeight = this.backlight.getSize().height;\n\n if ((rootElementOffset.top + wtTable.holder.offsetHeight) < priv.target.eventPageY) {\n priv.target.coords.row++;\n }\n\n if (this.isFixedRowTop(coords.row)) {\n tdOffsetTop += wtTable.holder.scrollTop;\n }\n\n // todo: fixedRowsBottom\n // if (this.isFixedRowBottom(coords.row)) {\n //\n // }\n\n if (coords.row < 0) {\n // if hover on colHeader\n priv.target.row = firstVisible > 0 ? firstVisible - 1 : firstVisible;\n\n } else if ((TD.offsetHeight / 2) + tdOffsetTop <= mouseOffsetTop) {\n // if hover on lower part of TD\n priv.target.row = coords.row + 1;\n // unfortunately first row is bigger than rest\n tdOffsetTop += coords.row === 0 ? TD.offsetHeight - 1 : TD.offsetHeight;\n\n } else {\n // elsewhere on table\n priv.target.row = coords.row;\n }\n\n let backlightTop = mouseOffsetTop;\n let guidelineTop = tdOffsetTop;\n\n if (mouseOffsetTop + backlightElemHeight + backlightElemMarginTop >= hiderHeight) {\n // prevent display backlight below table\n backlightTop = hiderHeight - backlightElemHeight - backlightElemMarginTop;\n\n } else if (mouseOffsetTop + backlightElemMarginTop < tbodyOffsetTop) {\n // prevent display above below table\n backlightTop = tbodyOffsetTop + Math.abs(backlightElemMarginTop);\n }\n\n if (tdOffsetTop >= hiderHeight - 1) {\n // prevent display guideline below table\n guidelineTop = hiderHeight - 1;\n }\n\n let topOverlayHeight = 0;\n if (this.hot.view.wt.wtOverlays.topOverlay) {\n topOverlayHeight = this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.TABLE.offsetHeight;\n }\n\n if (coords.row >= fixedRows && (guidelineTop - wtTable.holder.scrollTop) < topOverlayHeight) {\n this.hot.scrollViewportTo(coords.row);\n }\n\n this.backlight.setPosition(backlightTop);\n this.guideline.setPosition(guidelineTop);\n }\n\n /**\n * This method checks arrayMap from rowsMapper and updates the rowsMapper if it's necessary.\n *\n * @private\n */\n updateRowsMapper() {\n let countRows = this.hot.countSourceRows();\n let rowsMapperLen = this.rowsMapper._arrayMap.length;\n\n if (rowsMapperLen === 0) {\n this.rowsMapper.createMap(countRows || this.hot.getSettings().startRows);\n\n } else if (rowsMapperLen < countRows) {\n let diff = countRows - rowsMapperLen;\n\n this.rowsMapper.insertItems(rowsMapperLen, diff);\n\n } else if (rowsMapperLen > countRows) {\n let maxIndex = countRows - 1;\n let rowsToRemove = [];\n\n arrayEach(this.rowsMapper._arrayMap, (value, index, array) => {\n if (value > maxIndex) {\n rowsToRemove.push(index);\n }\n });\n\n this.rowsMapper.removeItems(rowsToRemove);\n }\n }\n\n /**\n * Bind the events used by the plugin.\n *\n * @private\n */\n registerEvents() {\n this.eventManager.addEventListener(document.documentElement, 'mousemove', (event) => this.onMouseMove(event));\n this.eventManager.addEventListener(document.documentElement, 'mouseup', () => this.onMouseUp());\n }\n\n /**\n * Unbind the events used by the plugin.\n *\n * @private\n */\n unregisterEvents() {\n this.eventManager.clear();\n }\n\n /**\n * `beforeColumnSort` hook callback. If user uses the sorting, manual row moving is disabled.\n *\n * @private\n * @param {Number} column Column index where soring is present\n * @param {*} order State of sorting. ASC/DESC/None\n */\n onBeforeColumnSort(column, order) {\n let priv = privatePool.get(this);\n\n priv.disallowMoving = order !== void 0;\n }\n\n /**\n * Change the behavior of selection / dragging.\n *\n * @private\n * @param {MouseEvent} event\n * @param {CellCoords} coords\n * @param {HTMLElement} TD\n * @param {Object} blockCalculations\n */\n onBeforeOnCellMouseDown(event, coords, TD, blockCalculations) {\n let wtTable = this.hot.view.wt.wtTable;\n let isHeaderSelection = this.hot.selection.selectedHeader.rows;\n let selection = this.hot.getSelectedRange();\n let priv = privatePool.get(this);\n\n if (!selection || !isHeaderSelection || priv.pressed || event.button !== 0) {\n priv.pressed = false;\n priv.rowsToMove.length = 0;\n removeClass(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI]);\n return;\n }\n\n let guidelineIsNotReady = this.guideline.isBuilt() && !this.guideline.isAppended();\n let backlightIsNotReady = this.backlight.isBuilt() && !this.backlight.isAppended();\n\n if (guidelineIsNotReady && backlightIsNotReady) {\n this.guideline.appendTo(wtTable.hider);\n this.backlight.appendTo(wtTable.hider);\n }\n\n let {from, to} = selection;\n let start = Math.min(from.row, to.row);\n let end = Math.max(from.row, to.row);\n\n if (coords.col < 0 && (coords.row >= start && coords.row <= end)) {\n blockCalculations.row = true;\n priv.pressed = true;\n priv.target.eventPageY = event.pageY;\n priv.target.coords = coords;\n priv.target.TD = TD;\n priv.rowsToMove = this.prepareRowsToMoving();\n\n let leftPos = wtTable.holder.scrollLeft + wtTable.getColumnWidth(-1);\n\n this.backlight.setPosition(null, leftPos);\n this.backlight.setSize(wtTable.hider.offsetWidth - leftPos, this.getRowsHeight(start, end + 1));\n this.backlight.setOffset((this.getRowsHeight(start, coords.row) + event.layerY) * -1, null);\n\n addClass(this.hot.rootElement, CSS_ON_MOVING);\n\n this.refreshPositions();\n\n } else {\n removeClass(this.hot.rootElement, CSS_AFTER_SELECTION);\n priv.pressed = false;\n priv.rowsToMove.length = 0;\n }\n }\n\n /**\n * 'mouseMove' event callback. Fired when pointer move on document.documentElement.\n *\n * @private\n * @param {MouseEvent} event `mousemove` event properties.\n */\n onMouseMove(event) {\n let priv = privatePool.get(this);\n\n if (!priv.pressed) {\n return;\n }\n\n // callback for browser which doesn't supports CSS pointer-event: none\n if (event.realTarget === this.backlight.element) {\n let height = this.backlight.getSize().height;\n this.backlight.setSize(null, 0);\n\n setTimeout(function() {\n this.backlight.setPosition(null, height);\n });\n }\n\n priv.target.eventPageY = event.pageY;\n this.refreshPositions();\n }\n\n /**\n * 'beforeOnCellMouseOver' hook callback. Fired when pointer was over cell.\n *\n * @private\n * @param {MouseEvent} event `mouseover` event properties.\n * @param {CellCoords} coords Cell coordinates where was fired event.\n * @param {HTMLElement} TD Cell represented as HTMLElement.\n * @param {Object} blockCalculations Object which contains information about blockCalculation for row, column or cells.\n */\n onBeforeOnCellMouseOver(event, coords, TD, blockCalculations) {\n let selectedRange = this.hot.getSelectedRange();\n let priv = privatePool.get(this);\n\n if (!selectedRange || !priv.pressed) {\n return;\n }\n\n if (priv.rowsToMove.indexOf(coords.row) > -1) {\n removeClass(this.hot.rootElement, CSS_SHOW_UI);\n\n } else {\n addClass(this.hot.rootElement, CSS_SHOW_UI);\n }\n\n blockCalculations.row = true;\n blockCalculations.column = true;\n blockCalculations.cell = true;\n priv.target.coords = coords;\n priv.target.TD = TD;\n }\n\n /**\n * `onMouseUp` hook callback.\n *\n * @private\n */\n onMouseUp() {\n let priv = privatePool.get(this);\n let target = priv.target.row;\n let rowsLen = priv.rowsToMove.length;\n\n priv.pressed = false;\n priv.backlightHeight = 0;\n\n removeClass(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI, CSS_AFTER_SELECTION]);\n\n if (this.hot.selection.selectedHeader.rows) {\n addClass(this.hot.rootElement, CSS_AFTER_SELECTION);\n }\n\n if (rowsLen < 1 || target === void 0 || priv.rowsToMove.indexOf(target) > -1 ||\n (priv.rowsToMove[rowsLen - 1] === target - 1)) {\n return;\n }\n\n this.moveRows(priv.rowsToMove, target);\n\n this.persistentStateSave();\n this.hot.render();\n\n if (!priv.disallowMoving) {\n let selectionStart = this.rowsMapper.getIndexByValue(priv.rowsToMove[0]);\n let selectionEnd = this.rowsMapper.getIndexByValue(priv.rowsToMove[rowsLen - 1]);\n this.changeSelection(selectionStart, selectionEnd);\n }\n\n priv.rowsToMove.length = 0;\n }\n\n /**\n * `afterScrollHorizontally` hook callback. Fired the table was scrolled horizontally.\n *\n * @private\n */\n onAfterScrollHorizontally() {\n let wtTable = this.hot.view.wt.wtTable;\n let headerWidth = wtTable.getColumnWidth(-1);\n let scrollLeft = wtTable.holder.scrollLeft;\n let posLeft = headerWidth + scrollLeft;\n\n this.backlight.setPosition(null, posLeft);\n this.backlight.setSize(wtTable.hider.offsetWidth - posLeft);\n }\n\n /**\n * `afterCreateRow` hook callback.\n *\n * @private\n * @param {Number} index Index of the created row.\n * @param {Number} amount Amount of created rows.\n */\n onAfterCreateRow(index, amount) {\n this.rowsMapper.shiftItems(index, amount);\n }\n\n /**\n * On before remove row listener.\n *\n * @private\n * @param {Number} index Row index.\n * @param {Number} amount Defines how many rows removed.\n */\n onBeforeRemoveRow(index, amount) {\n this.removedRows.length = 0;\n\n if (index !== false) {\n // Collect physical row index.\n rangeEach(index, index + amount - 1, (removedIndex) => {\n this.removedRows.push(this.hot.runHooks('modifyRow', removedIndex, this.pluginName));\n });\n }\n }\n\n /**\n * `afterRemoveRow` hook callback.\n *\n * @private\n * @param {Number} index Index of the removed row.\n * @param {Number} amount Amount of removed rows.\n */\n onAfterRemoveRow(index, amount) {\n this.rowsMapper.unshiftItems(this.removedRows);\n }\n\n /**\n * `afterLoadData` hook callback.\n *\n * @private\n * @param {Boolean} firstTime True if that was loading data during the initialization.\n */\n onAfterLoadData(firstTime) {\n this.updateRowsMapper();\n }\n\n /**\n * 'modifyRow' hook callback.\n *\n * @private\n * @param {Number} row Visual Row index.\n * @returns {Number} Modified row index.\n */\n onModifyRow(row, source) {\n if (source !== this.pluginName) {\n let rowInMapper = this.rowsMapper.getValueByIndex(row);\n row = rowInMapper === null ? row : rowInMapper;\n }\n\n return row;\n }\n\n /**\n * 'unmodifyRow' hook callback.\n *\n * @private\n * @param {Number} row Visual row index.\n * @returns {Number} Logical row index.\n */\n onUnmodifyRow(row) {\n let indexInMapper = this.rowsMapper.getIndexByValue(row);\n\n return indexInMapper === null ? row : indexInMapper;\n }\n\n /**\n * `afterPluginsInitialized` hook callback.\n *\n * @private\n */\n onAfterPluginsInitialized() {\n this.updateRowsMapper();\n this.initialSettings();\n this.backlight.build();\n this.guideline.build();\n }\n\n /**\n * Destroy plugin instance.\n */\n destroy() {\n this.backlight.destroy();\n this.guideline.destroy();\n\n super.destroy();\n }\n}\n\nregisterPlugin('ManualRowMove', ManualRowMove);\n\nexport default ManualRowMove;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualRowMove/manualRowMove.js","import RowsMapper from 'handsontable/plugins/manualRowMove/rowsMapper';\n\ndescribe('manualRowMove', () => {\n describe('rowsMapper', () => {\n it('should set manualRowMove plugin while constructing', () => {\n var manualRowMoveMock = {};\n var mapper = new RowsMapper(manualRowMoveMock);\n\n expect(mapper.manualRowMove).toBe(manualRowMoveMock);\n });\n\n it('should be mixed with arrayMapper object', () => {\n expect(RowsMapper.MIXINS).toEqual(['arrayMapper']);\n });\n\n it('should destroy array after calling destroy method', () => {\n var mapper = new RowsMapper();\n\n expect(mapper._arrayMap).toEqual([]);\n\n mapper.destroy();\n\n expect(mapper._arrayMap).toBe(null); ;\n });\n\n it('should create map with pairs index->value', () => {\n var mapper = new RowsMapper();\n mapper.createMap(6);\n\n expect(mapper._arrayMap[0]).toBe(0);\n expect(mapper._arrayMap[1]).toBe(1);\n expect(mapper._arrayMap[2]).toBe(2);\n expect(mapper._arrayMap[3]).toBe(3);\n expect(mapper._arrayMap[4]).toBe(4);\n expect(mapper._arrayMap[5]).toBe(5);\n });\n\n it('should change order after move action', () => {\n var mapper = new RowsMapper();\n mapper.createMap(6);\n\n mapper.moveRow(1, 0);\n mapper.clearNull();\n\n expect(mapper._arrayMap[0]).toBe(1);\n expect(mapper._arrayMap[1]).toBe(0);\n expect(mapper._arrayMap[2]).toBe(2);\n expect(mapper._arrayMap[3]).toBe(3);\n expect(mapper._arrayMap[4]).toBe(4);\n expect(mapper._arrayMap[5]).toBe(5);\n });\n\n it('should clean from null values', () => {\n var mapper = new RowsMapper();\n mapper.createMap(6);\n\n mapper.moveRow(1, 6);\n mapper.moveRow(2, 7);\n mapper.moveRow(4, 8);\n\n mapper.clearNull();\n\n expect(mapper._arrayMap.length).toBe(6);\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualRowMove/test/rowsMapper.unit.js","import BaseUI from './_base';\nimport {addClass} from './../../../helpers/dom/element';\n\nconst CSS_CLASSNAME = 'ht__manualRowMove--backlight';\n\n/**\n * @class BacklightUI\n * @util\n */\nclass BacklightUI extends BaseUI {\n /**\n * Custom className on build process.\n */\n build() {\n super.build();\n\n addClass(this._element, CSS_CLASSNAME);\n }\n}\n\nexport default BacklightUI;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualRowMove/ui/backlight.js","import BaseUI from './_base';\nimport {addClass} from './../../../helpers/dom/element';\n\nconst CSS_CLASSNAME = 'ht__manualRowMove--guideline';\n\n/**\n * @class GuidelineUI\n * @util\n */\nclass GuidelineUI extends BaseUI {\n /**\n * Custom className on build process.\n */\n build() {\n super.build();\n\n addClass(this._element, CSS_CLASSNAME);\n }\n}\n\nexport default GuidelineUI;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualRowMove/ui/guideline.js","import BasePlugin from './../_base';\nimport {addClass, hasClass, removeClass, outerWidth} from './../../helpers/dom/element';\nimport EventManager from './../../eventManager';\nimport {pageX, pageY} from './../../helpers/dom/event';\nimport {arrayEach} from './../../helpers/array';\nimport {rangeEach} from './../../helpers/number';\nimport {registerPlugin} from './../../plugins';\n\n// Developer note! Whenever you make a change in this file, make an analogous change in manualRowResize.js\n\n/**\n * @description\n * ManualRowResize Plugin.\n *\n * Has 2 UI components:\n * - handle - the draggable element that sets the desired height of the row.\n * - guide - the helper guide that shows the desired height as a horizontal guide.\n *\n * @plugin ManualRowResize\n */\nclass ManualRowResize extends BasePlugin {\n\n constructor(hotInstance) {\n super(hotInstance);\n\n this.currentTH = null;\n this.currentRow = null;\n this.selectedRows = [];\n this.currentHeight = null;\n this.newSize = null;\n this.startY = null;\n this.startHeight = null;\n this.startOffset = null;\n this.handle = document.createElement('DIV');\n this.guide = document.createElement('DIV');\n this.eventManager = new EventManager(this);\n this.pressed = null;\n this.dblclick = 0;\n this.autoresizeTimeout = null;\n this.manualRowHeights = [];\n\n addClass(this.handle, 'manualRowResizer');\n addClass(this.guide, 'manualRowResizerGuide');\n }\n\n /**\n * Check if the plugin is enabled in the handsontable settings.\n *\n * @returns {Boolean}\n */\n isEnabled() {\n return this.hot.getSettings().manualRowResize;\n }\n\n /**\n * Enable plugin for this Handsontable instance.\n */\n enablePlugin() {\n if (this.enabled) {\n return;\n }\n\n this.manualRowHeights = [];\n\n let initialRowHeights = this.hot.getSettings().manualRowResize;\n let loadedManualRowHeights = this.loadManualRowHeights();\n\n if (typeof loadedManualRowHeights != 'undefined') {\n this.manualRowHeights = loadedManualRowHeights;\n } else if (Array.isArray(initialRowHeights)) {\n this.manualRowHeights = initialRowHeights;\n } else {\n this.manualRowHeights = [];\n }\n\n this.addHook('modifyRowHeight', (height, row) => this.onModifyRowHeight(height, row));\n\n // Handsontable.hooks.register('beforeRowResize');\n // Handsontable.hooks.register('afterRowResize');\n\n this.bindEvents();\n\n super.enablePlugin();\n }\n\n /**\n * Updates the plugin to use the latest options you have specified.\n */\n updatePlugin() {\n let initialRowHeights = this.hot.getSettings().manualRowResize;\n\n if (Array.isArray(initialRowHeights)) {\n this.manualRowHeights = initialRowHeights;\n\n } else if (!initialRowHeights) {\n this.manualRowHeights = [];\n }\n }\n\n /**\n * Disable plugin for this Handsontable instance.\n */\n disablePlugin() {\n super.disablePlugin();\n }\n\n /**\n * Save the current sizes using the persistentState plugin.\n */\n saveManualRowHeights() {\n this.hot.runHooks('persistentStateSave', 'manualRowHeights', this.manualRowHeights);\n }\n\n /**\n * Load the previously saved sizes using the persistentState plugin.\n *\n * @returns {Array}\n */\n loadManualRowHeights() {\n let storedState = {};\n\n this.hot.runHooks('persistentStateLoad', 'manualRowHeights', storedState);\n\n return storedState.value;\n }\n\n /**\n * Set the resize handle position.\n *\n * @param {HTMLCellElement} TH TH HTML element.\n */\n setupHandlePosition(TH) {\n this.currentTH = TH;\n let row = this.hot.view.wt.wtTable.getCoords(TH).row; // getCoords returns CellCoords\n let headerWidth = outerWidth(this.currentTH);\n\n if (row >= 0) { // if not col header\n let box = this.currentTH.getBoundingClientRect();\n\n this.currentRow = row;\n this.selectedRows = [];\n\n if (this.hot.selection.isSelected() && this.hot.selection.selectedHeader.rows) {\n let {from, to} = this.hot.getSelectedRange();\n let start = from.row;\n let end = to.row;\n\n if (start >= end) {\n start = to.row;\n end = from.row;\n }\n\n if (this.currentRow >= start && this.currentRow <= end) {\n rangeEach(start, end, (i) => this.selectedRows.push(i));\n\n } else {\n this.selectedRows.push(this.currentRow);\n }\n } else {\n this.selectedRows.push(this.currentRow);\n }\n\n this.startOffset = box.top - 6;\n this.startHeight = parseInt(box.height, 10);\n this.handle.style.left = `${box.left}px`;\n this.handle.style.top = `${this.startOffset + this.startHeight}px`;\n this.handle.style.width = `${headerWidth}px`;\n this.hot.rootElement.appendChild(this.handle);\n }\n }\n\n /**\n * Refresh the resize handle position.\n */\n refreshHandlePosition() {\n this.handle.style.top = `${this.startOffset + this.currentHeight}px`;\n }\n\n /**\n * Set the resize guide position.\n */\n setupGuidePosition() {\n let handleWidth = parseInt(outerWidth(this.handle), 10);\n let handleRightPosition = parseInt(this.handle.style.left, 10) + handleWidth;\n let maximumVisibleElementWidth = parseInt(this.hot.view.maximumVisibleElementWidth(0), 10);\n addClass(this.handle, 'active');\n addClass(this.guide, 'active');\n\n this.guide.style.top = this.handle.style.top;\n this.guide.style.left = `${handleRightPosition}px`;\n this.guide.style.width = `${maximumVisibleElementWidth - handleWidth}px`;\n this.hot.rootElement.appendChild(this.guide);\n }\n\n /**\n * Refresh the resize guide position.\n */\n refreshGuidePosition() {\n this.guide.style.top = this.handle.style.top;\n }\n\n /**\n * Hide both the resize handle and resize guide.\n */\n hideHandleAndGuide() {\n removeClass(this.handle, 'active');\n removeClass(this.guide, 'active');\n }\n\n /**\n * Check if provided element is considered as a row header.\n *\n * @param {HTMLElement} element HTML element.\n * @returns {Boolean}\n */\n checkIfRowHeader(element) {\n if (element != this.hot.rootElement) {\n let parent = element.parentNode;\n\n if (parent.tagName === 'TBODY') {\n return true;\n }\n\n return this.checkIfRowHeader(parent);\n }\n\n return false;\n }\n\n /**\n * Get the TH element from the provided element.\n *\n * @param {HTMLElement} element HTML element.\n * @returns {HTMLElement}\n */\n getTHFromTargetElement(element) {\n if (element.tagName != 'TABLE') {\n if (element.tagName == 'TH') {\n return element;\n }\n return this.getTHFromTargetElement(element.parentNode);\n\n }\n\n return null;\n }\n\n /**\n * 'mouseover' event callback - set the handle position.\n *\n * @private\n * @param {MouseEvent} event\n */\n onMouseOver(event) {\n if (this.checkIfRowHeader(event.target)) {\n let th = this.getTHFromTargetElement(event.target);\n\n if (th) {\n if (!this.pressed) {\n this.setupHandlePosition(th);\n }\n }\n }\n }\n\n /**\n * Auto-size row after doubleclick - callback.\n *\n * @private\n */\n afterMouseDownTimeout() {\n const render = () => {\n this.hot.forceFullRender = true;\n this.hot.view.render(); // updates all\n this.hot.view.wt.wtOverlays.adjustElementsSize(true);\n };\n const resize = (selectedRow, forceRender) => {\n let hookNewSize = this.hot.runHooks('beforeRowResize', selectedRow, this.newSize, true);\n\n if (hookNewSize !== void 0) {\n this.newSize = hookNewSize;\n }\n\n this.setManualSize(selectedRow, this.newSize); // double click sets auto row size\n\n if (forceRender) {\n render();\n }\n\n this.hot.runHooks('afterRowResize', selectedRow, this.newSize, true);\n };\n\n if (this.dblclick >= 2) {\n let selectedRowsLength = this.selectedRows.length;\n\n if (selectedRowsLength > 1) {\n arrayEach(this.selectedRows, (selectedRow) => {\n resize(selectedRow);\n });\n render();\n } else {\n arrayEach(this.selectedRows, (selectedRow) => {\n resize(selectedRow, true);\n });\n }\n }\n this.dblclick = 0;\n this.autoresizeTimeout = null;\n }\n\n /**\n * 'mousedown' event callback.\n *\n * @private\n * @param {MouseEvent} event\n */\n onMouseDown(event) {\n if (hasClass(event.target, 'manualRowResizer')) {\n this.setupGuidePosition();\n this.pressed = this.hot;\n\n if (this.autoresizeTimeout == null) {\n this.autoresizeTimeout = setTimeout(() => this.afterMouseDownTimeout(), 500);\n\n this.hot._registerTimeout(this.autoresizeTimeout);\n }\n this.dblclick++;\n\n this.startY = pageY(event);\n this.newSize = this.startHeight;\n }\n }\n\n /**\n * 'mousemove' event callback - refresh the handle and guide positions, cache the new row height.\n *\n * @private\n * @param {MouseEvent} event\n */\n onMouseMove(event) {\n if (this.pressed) {\n this.currentHeight = this.startHeight + (pageY(event) - this.startY);\n\n arrayEach(this.selectedRows, (selectedRow) => {\n this.newSize = this.setManualSize(selectedRow, this.currentHeight);\n });\n\n this.refreshHandlePosition();\n this.refreshGuidePosition();\n }\n }\n\n /**\n * 'mouseup' event callback - apply the row resizing.\n *\n * @private\n * @param {MouseEvent} event\n */\n onMouseUp(event) {\n const render = () => {\n this.hot.forceFullRender = true;\n this.hot.view.render(); // updates all\n this.hot.view.wt.wtOverlays.adjustElementsSize(true);\n };\n const runHooks = (selectedRow, forceRender) => {\n this.hot.runHooks('beforeRowResize', selectedRow, this.newSize);\n\n if (forceRender) {\n render();\n }\n\n this.saveManualRowHeights();\n\n this.hot.runHooks('afterRowResize', selectedRow, this.newSize);\n };\n if (this.pressed) {\n this.hideHandleAndGuide();\n this.pressed = false;\n\n if (this.newSize != this.startHeight) {\n let selectedRowsLength = this.selectedRows.length;\n\n if (selectedRowsLength > 1) {\n arrayEach(this.selectedRows, (selectedRow) => {\n runHooks(selectedRow);\n });\n render();\n } else {\n arrayEach(this.selectedRows, (selectedRow) => {\n runHooks(selectedRow, true);\n });\n }\n }\n\n this.setupHandlePosition(this.currentTH);\n }\n }\n\n /**\n * Bind the mouse events.\n *\n * @private\n */\n bindEvents() {\n this.eventManager.addEventListener(this.hot.rootElement, 'mouseover', (e) => this.onMouseOver(e));\n this.eventManager.addEventListener(this.hot.rootElement, 'mousedown', (e) => this.onMouseDown(e));\n this.eventManager.addEventListener(window, 'mousemove', (e) => this.onMouseMove(e));\n this.eventManager.addEventListener(window, 'mouseup', (e) => this.onMouseUp(e));\n }\n\n /**\n * Cache the current row height.\n *\n * @param {Number} row Row index.\n * @param {Number} height Row height.\n * @returns {Number}\n */\n setManualSize(row, height) {\n row = this.hot.runHooks('modifyRow', row);\n this.manualRowHeights[row] = height;\n\n return height;\n }\n\n /**\n * Modify the provided row height, based on the plugin settings.\n *\n * @private\n * @param {Number} height Row height.\n * @param {Number} row Row index.\n * @returns {Number}\n */\n onModifyRowHeight(height, row) {\n if (this.enabled) {\n let autoRowSizePlugin = this.hot.getPlugin('autoRowSize');\n let autoRowHeightResult = autoRowSizePlugin ? autoRowSizePlugin.heights[row] : null;\n\n row = this.hot.runHooks('modifyRow', row);\n\n let manualRowHeight = this.manualRowHeights[row];\n\n if (manualRowHeight !== void 0 && (manualRowHeight === autoRowHeightResult || manualRowHeight > (height || 0))) {\n return manualRowHeight;\n }\n }\n\n return height;\n }\n\n}\n\nregisterPlugin('manualRowResize', ManualRowResize);\n\nexport default ManualRowResize;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/manualRowResize/manualRowResize.js","import Hooks from './../../pluginHooks';\nimport {registerPlugin} from './../../plugins';\nimport {stopImmediatePropagation} from './../../helpers/dom/event';\nimport {CellCoords, CellRange, Table} from './../../3rdparty/walkontable/src';\n\nfunction CellInfoCollection() {\n var collection = [];\n\n collection.getInfo = function(row, col) {\n for (var i = 0, ilen = this.length; i < ilen; i++) {\n if (this[i].row <= row && this[i].row + this[i].rowspan - 1 >= row &&\n this[i].col <= col && this[i].col + this[i].colspan - 1 >= col) {\n return this[i];\n }\n }\n };\n\n collection.setInfo = function(info) {\n for (var i = 0, ilen = this.length; i < ilen; i++) {\n if (this[i].row === info.row && this[i].col === info.col) {\n this[i] = info;\n return;\n }\n }\n this.push(info);\n };\n\n collection.removeInfo = function(row, col) {\n for (var i = 0, ilen = this.length; i < ilen; i++) {\n if (this[i].row === row && this[i].col === col) {\n this.splice(i, 1);\n break;\n }\n }\n };\n\n return collection;\n}\n\n/**\n * Plugin used to merge cells in Handsontable.\n *\n * @private\n * @plugin MergeCells\n * @class MergeCells\n */\nfunction MergeCells(mergeCellsSetting) {\n this.mergedCellInfoCollection = new CellInfoCollection();\n\n if (Array.isArray(mergeCellsSetting)) {\n for (var i = 0, ilen = mergeCellsSetting.length; i < ilen; i++) {\n this.mergedCellInfoCollection.setInfo(mergeCellsSetting[i]);\n }\n }\n}\n\n/**\n * @param cellRange (CellRange)\n */\nMergeCells.prototype.canMergeRange = function(cellRange) {\n // is more than one cell selected\n return !cellRange.isSingle();\n};\n\nMergeCells.prototype.mergeRange = function(cellRange) {\n if (!this.canMergeRange(cellRange)) {\n return;\n }\n\n // normalize top left corner\n var topLeft = cellRange.getTopLeftCorner();\n var bottomRight = cellRange.getBottomRightCorner();\n\n var mergeParent = {};\n mergeParent.row = topLeft.row;\n mergeParent.col = topLeft.col;\n // TD has rowspan == 1 by default. rowspan == 2 means spread over 2 cells\n mergeParent.rowspan = bottomRight.row - topLeft.row + 1;\n mergeParent.colspan = bottomRight.col - topLeft.col + 1;\n this.mergedCellInfoCollection.setInfo(mergeParent);\n};\n\nMergeCells.prototype.mergeOrUnmergeSelection = function(cellRange) {\n var info = this.mergedCellInfoCollection.getInfo(cellRange.from.row, cellRange.from.col);\n if (info) {\n // unmerge\n this.unmergeSelection(cellRange.from);\n } else {\n // merge\n this.mergeSelection(cellRange);\n }\n};\n\nMergeCells.prototype.mergeSelection = function(cellRange) {\n this.mergeRange(cellRange);\n};\n\nMergeCells.prototype.unmergeSelection = function(cellRange) {\n var info = this.mergedCellInfoCollection.getInfo(cellRange.row, cellRange.col);\n this.mergedCellInfoCollection.removeInfo(info.row, info.col);\n};\n\nMergeCells.prototype.applySpanProperties = function(TD, row, col) {\n var info = this.mergedCellInfoCollection.getInfo(row, col);\n\n if (info) {\n if (info.row === row && info.col === col) {\n TD.setAttribute('rowspan', info.rowspan);\n TD.setAttribute('colspan', info.colspan);\n } else {\n TD.removeAttribute('rowspan');\n TD.removeAttribute('colspan');\n\n TD.style.display = 'none';\n }\n } else {\n TD.removeAttribute('rowspan');\n TD.removeAttribute('colspan');\n }\n};\n\nMergeCells.prototype.modifyTransform = function(hook, currentSelectedRange, delta) {\n var sameRowspan = function(merged, coords) {\n if (coords.row >= merged.row && coords.row <= (merged.row + merged.rowspan - 1)) {\n return true;\n }\n return false;\n },\n sameColspan = function(merged, coords) {\n if (coords.col >= merged.col && coords.col <= (merged.col + merged.colspan - 1)) {\n return true;\n }\n return false;\n },\n getNextPosition = function(newDelta) {\n return new CellCoords(currentSelectedRange.to.row + newDelta.row, currentSelectedRange.to.col + newDelta.col);\n };\n\n var newDelta = {\n row: delta.row,\n col: delta.col,\n };\n\n if (hook == 'modifyTransformStart') {\n /* eslint-disable block-scoped-var */\n var nextPosition;\n\n if (!this.lastDesiredCoords) {\n this.lastDesiredCoords = new CellCoords(null, null);\n }\n var currentPosition = new CellCoords(currentSelectedRange.highlight.row, currentSelectedRange.highlight.col),\n // if current position's parent is a merged range, returns it\n mergedParent = this.mergedCellInfoCollection.getInfo(currentPosition.row, currentPosition.col),\n currentRangeContainsMerge; // if current range contains a merged range\n\n for (var i = 0, mergesLength = this.mergedCellInfoCollection.length; i < mergesLength; i++) {\n var range = this.mergedCellInfoCollection[i];\n range = new CellCoords(range.row + range.rowspan - 1, range.col + range.colspan - 1);\n if (currentSelectedRange.includes(range)) {\n currentRangeContainsMerge = true;\n break;\n }\n }\n\n if (mergedParent) { // only merge selected\n let mergeTopLeft = new CellCoords(mergedParent.row, mergedParent.col);\n let mergeBottomRight = new CellCoords(mergedParent.row + mergedParent.rowspan - 1, mergedParent.col + mergedParent.colspan - 1);\n let mergeRange = new CellRange(mergeTopLeft, mergeTopLeft, mergeBottomRight);\n\n if (!mergeRange.includes(this.lastDesiredCoords)) {\n this.lastDesiredCoords = new CellCoords(null, null); // reset outdated version of lastDesiredCoords\n }\n\n newDelta.row = this.lastDesiredCoords.row ? this.lastDesiredCoords.row - currentPosition.row : newDelta.row;\n newDelta.col = this.lastDesiredCoords.col ? this.lastDesiredCoords.col - currentPosition.col : newDelta.col;\n\n if (delta.row > 0) { // moving down\n newDelta.row = mergedParent.row + mergedParent.rowspan - 1 - currentPosition.row + delta.row;\n } else if (delta.row < 0) { // moving up\n newDelta.row = currentPosition.row - mergedParent.row + delta.row;\n }\n if (delta.col > 0) { // moving right\n newDelta.col = mergedParent.col + mergedParent.colspan - 1 - currentPosition.col + delta.col;\n } else if (delta.col < 0) { // moving left\n newDelta.col = currentPosition.col - mergedParent.col + delta.col;\n }\n }\n\n nextPosition = new CellCoords(currentSelectedRange.highlight.row + newDelta.row, currentSelectedRange.highlight.col + newDelta.col);\n\n var nextParentIsMerged = this.mergedCellInfoCollection.getInfo(nextPosition.row, nextPosition.col);\n\n if (nextParentIsMerged) { // skipping the invisible cells in the merge range\n this.lastDesiredCoords = nextPosition;\n newDelta = {\n row: nextParentIsMerged.row - currentPosition.row,\n col: nextParentIsMerged.col - currentPosition.col\n };\n }\n } else if (hook == 'modifyTransformEnd') {\n for (let i = 0, mergesLength = this.mergedCellInfoCollection.length; i < mergesLength; i++) {\n let currentMerge = this.mergedCellInfoCollection[i];\n let mergeTopLeft = new CellCoords(currentMerge.row, currentMerge.col);\n let mergeBottomRight = new CellCoords(currentMerge.row + currentMerge.rowspan - 1, currentMerge.col + currentMerge.colspan - 1);\n let mergedRange = new CellRange(mergeTopLeft, mergeTopLeft, mergeBottomRight);\n let sharedBorders = currentSelectedRange.getBordersSharedWith(mergedRange);\n\n if (mergedRange.isEqual(currentSelectedRange)) { // only the merged range is selected\n currentSelectedRange.setDirection('NW-SE');\n } else if (sharedBorders.length > 0) {\n var mergeHighlighted = (currentSelectedRange.highlight.isEqual(mergedRange.from));\n\n if (sharedBorders.indexOf('top') > -1) { // if range shares a border with the merged section, change range direction accordingly\n if (currentSelectedRange.to.isSouthEastOf(mergedRange.from) && mergeHighlighted) {\n currentSelectedRange.setDirection('NW-SE');\n } else if (currentSelectedRange.to.isSouthWestOf(mergedRange.from) && mergeHighlighted) {\n currentSelectedRange.setDirection('NE-SW');\n }\n } else if (sharedBorders.indexOf('bottom') > -1) {\n if (currentSelectedRange.to.isNorthEastOf(mergedRange.from) && mergeHighlighted) {\n currentSelectedRange.setDirection('SW-NE');\n } else if (currentSelectedRange.to.isNorthWestOf(mergedRange.from) && mergeHighlighted) {\n currentSelectedRange.setDirection('SE-NW');\n }\n }\n }\n\n nextPosition = getNextPosition(newDelta);\n var\n withinRowspan = sameRowspan(currentMerge, nextPosition),\n withinColspan = sameColspan(currentMerge, nextPosition);\n\n if (currentSelectedRange.includesRange(mergedRange) && (mergedRange.includes(nextPosition) ||\n withinRowspan || withinColspan)) { // if next step overlaps a merged range, jump past it\n if (withinRowspan) {\n if (newDelta.row < 0) {\n newDelta.row -= currentMerge.rowspan - 1;\n } else if (newDelta.row > 0) {\n newDelta.row += currentMerge.rowspan - 1;\n }\n }\n if (withinColspan) {\n if (newDelta.col < 0) {\n newDelta.col -= currentMerge.colspan - 1;\n } else if (newDelta.col > 0) {\n newDelta.col += currentMerge.colspan - 1;\n }\n }\n }\n }\n }\n\n if (newDelta.row !== 0) {\n delta.row = newDelta.row;\n }\n if (newDelta.col !== 0) {\n delta.col = newDelta.col;\n }\n};\n\nMergeCells.prototype.shiftCollection = function(direction, index, count) {\n var shiftVector = [0, 0];\n\n switch (direction) {\n case 'right':\n shiftVector[0] += 1;\n\n break;\n case 'left':\n shiftVector[0] -= 1;\n\n break;\n case 'down':\n shiftVector[1] += 1;\n\n break;\n case 'up':\n shiftVector[1] -= 1;\n\n break;\n default:\n break;\n }\n\n for (var i = 0; i < this.mergedCellInfoCollection.length; i++) {\n var currentMerge = this.mergedCellInfoCollection[i];\n\n if (direction === 'right' || direction === 'left') {\n if (index <= currentMerge.col) {\n currentMerge.col += shiftVector[0];\n }\n } else if (index <= currentMerge.row) {\n currentMerge.row += shiftVector[1];\n }\n }\n};\n\nvar beforeInit = function() {\n var instance = this;\n var mergeCellsSetting = instance.getSettings().mergeCells;\n\n if (mergeCellsSetting) {\n if (!instance.mergeCells) {\n instance.mergeCells = new MergeCells(mergeCellsSetting);\n }\n }\n};\n\nvar afterInit = function() {\n var instance = this;\n if (instance.mergeCells) {\n /**\n * Monkey patch Table.prototype.getCell to return TD for merged cell parent if asked for TD of a cell that is\n * invisible due to the merge. This is not the cleanest solution but there is a test case for it (merged cells scroll) so feel free to refactor it!\n */\n instance.view.wt.wtTable.getCell = function(coords) {\n if (instance.getSettings().mergeCells) {\n var mergeParent = instance.mergeCells.mergedCellInfoCollection.getInfo(coords.row, coords.col);\n if (mergeParent) {\n coords = mergeParent;\n }\n }\n return Table.prototype.getCell.call(this, coords);\n };\n }\n};\n\nvar afterUpdateSettings = function() {\n var instance = this;\n var mergeCellsSetting = instance.getSettings().mergeCells;\n\n if (mergeCellsSetting) {\n if (instance.mergeCells) {\n instance.mergeCells.mergedCellInfoCollection = new CellInfoCollection();\n\n if (Array.isArray(mergeCellsSetting)) {\n for (var i = 0, ilen = mergeCellsSetting.length; i < ilen; i++) {\n instance.mergeCells.mergedCellInfoCollection.setInfo(mergeCellsSetting[i]);\n }\n }\n } else {\n instance.mergeCells = new MergeCells(mergeCellsSetting);\n }\n\n } else if (instance.mergeCells) { // it doesn't actually turn off the plugin, just resets the settings. Need to refactor.\n instance.mergeCells.mergedCellInfoCollection = new CellInfoCollection();\n }\n};\n\nvar onBeforeKeyDown = function(event) {\n if (!this.mergeCells) {\n return;\n }\n\n var ctrlDown = (event.ctrlKey || event.metaKey) && !event.altKey;\n\n if (ctrlDown) {\n if (event.keyCode === 77) { // CTRL + M\n this.mergeCells.mergeOrUnmergeSelection(this.getSelectedRange());\n this.render();\n stopImmediatePropagation(event);\n }\n }\n};\n\nvar addMergeActionsToContextMenu = function(defaultOptions) {\n if (!this.getSettings().mergeCells) {\n return;\n }\n\n defaultOptions.items.push({name: '---------'});\n defaultOptions.items.push({\n key: 'mergeCells',\n name() {\n var sel = this.getSelected();\n var info = this.mergeCells.mergedCellInfoCollection.getInfo(sel[0], sel[1]);\n if (info) {\n return 'Unmerge cells';\n }\n return 'Merge cells';\n\n },\n callback() {\n this.mergeCells.mergeOrUnmergeSelection(this.getSelectedRange());\n this.render();\n },\n disabled() {\n return this.selection.selectedHeader.corner;\n },\n });\n};\n\nvar afterRenderer = function(TD, row, col, prop, value, cellProperties) {\n if (this.mergeCells) {\n this.mergeCells.applySpanProperties(TD, row, col);\n }\n};\n\nvar modifyTransformFactory = function(hook) {\n return function(delta) {\n var mergeCellsSetting = this.getSettings().mergeCells;\n if (mergeCellsSetting) {\n var currentSelectedRange = this.getSelectedRange();\n this.mergeCells.modifyTransform(hook, currentSelectedRange, delta);\n\n if (hook === 'modifyTransformEnd') {\n // sanitize \"from\" (core.js will sanitize to)\n var totalRows = this.countRows();\n var totalCols = this.countCols();\n if (currentSelectedRange.from.row < 0) {\n currentSelectedRange.from.row = 0;\n } else if (currentSelectedRange.from.row > 0 && currentSelectedRange.from.row >= totalRows) {\n currentSelectedRange.from.row = currentSelectedRange.from - 1;\n }\n\n if (currentSelectedRange.from.col < 0) {\n currentSelectedRange.from.col = 0;\n } else if (currentSelectedRange.from.col > 0 && currentSelectedRange.from.col >= totalCols) {\n currentSelectedRange.from.col = totalCols - 1;\n }\n }\n }\n };\n};\n\n/**\n * While selecting cells with keyboard or mouse, make sure that rectangular area is expanded to the extent of the merged cell\n * @param coords\n */\nvar beforeSetRangeEnd = function(coords) {\n\n this.lastDesiredCoords = null; // unset lastDesiredCoords when selection is changed with mouse\n var mergeCellsSetting = this.getSettings().mergeCells;\n if (mergeCellsSetting) {\n var selRange = this.getSelectedRange();\n selRange.highlight = new CellCoords(selRange.highlight.row, selRange.highlight.col); // clone in case we will modify its reference\n selRange.to = coords;\n\n var rangeExpanded = false;\n do {\n rangeExpanded = false;\n\n for (var i = 0, ilen = this.mergeCells.mergedCellInfoCollection.length; i < ilen; i++) {\n var cellInfo = this.mergeCells.mergedCellInfoCollection[i];\n var mergedCellTopLeft = new CellCoords(cellInfo.row, cellInfo.col);\n var mergedCellBottomRight = new CellCoords(cellInfo.row + cellInfo.rowspan - 1, cellInfo.col + cellInfo.colspan - 1);\n\n var mergedCellRange = new CellRange(mergedCellTopLeft, mergedCellTopLeft, mergedCellBottomRight);\n if (selRange.expandByRange(mergedCellRange)) {\n coords.row = selRange.to.row;\n coords.col = selRange.to.col;\n\n rangeExpanded = true;\n }\n }\n } while (rangeExpanded);\n\n }\n};\n\n/**\n * Returns correct coordinates for merged start / end cells in selection for area borders\n * @param corners\n * @param className\n */\nvar beforeDrawAreaBorders = function(corners, className) {\n if (className && className == 'area') {\n var mergeCellsSetting = this.getSettings().mergeCells;\n if (mergeCellsSetting) {\n var selRange = this.getSelectedRange();\n var startRange = new CellRange(selRange.from, selRange.from, selRange.from);\n var stopRange = new CellRange(selRange.to, selRange.to, selRange.to);\n\n for (var i = 0, ilen = this.mergeCells.mergedCellInfoCollection.length; i < ilen; i++) {\n var cellInfo = this.mergeCells.mergedCellInfoCollection[i];\n var mergedCellTopLeft = new CellCoords(cellInfo.row, cellInfo.col);\n var mergedCellBottomRight = new CellCoords(cellInfo.row + cellInfo.rowspan - 1, cellInfo.col + cellInfo.colspan - 1);\n var mergedCellRange = new CellRange(mergedCellTopLeft, mergedCellTopLeft, mergedCellBottomRight);\n\n if (startRange.expandByRange(mergedCellRange)) {\n corners[0] = startRange.from.row;\n corners[1] = startRange.from.col;\n }\n\n if (stopRange.expandByRange(mergedCellRange)) {\n corners[2] = stopRange.from.row;\n corners[3] = stopRange.from.col;\n }\n }\n }\n }\n};\n\nvar afterGetCellMeta = function(row, col, cellProperties) {\n var mergeCellsSetting = this.getSettings().mergeCells;\n if (mergeCellsSetting) {\n var mergeParent = this.mergeCells.mergedCellInfoCollection.getInfo(row, col);\n if (mergeParent && (mergeParent.row != row || mergeParent.col != col)) {\n cellProperties.copyable = false;\n }\n }\n};\n\nvar afterViewportRowCalculatorOverride = function(calc) {\n var mergeCellsSetting = this.getSettings().mergeCells;\n if (mergeCellsSetting) {\n var colCount = this.countCols();\n var mergeParent;\n for (var c = 0; c < colCount; c++) {\n mergeParent = this.mergeCells.mergedCellInfoCollection.getInfo(calc.startRow, c);\n if (mergeParent) {\n if (mergeParent.row < calc.startRow) {\n calc.startRow = mergeParent.row;\n return afterViewportRowCalculatorOverride.call(this, calc); // recursively search upwards\n }\n }\n mergeParent = this.mergeCells.mergedCellInfoCollection.getInfo(calc.endRow, c);\n if (mergeParent) {\n var mergeEnd = mergeParent.row + mergeParent.rowspan - 1;\n if (mergeEnd > calc.endRow) {\n calc.endRow = mergeEnd;\n return afterViewportRowCalculatorOverride.call(this, calc); // recursively search upwards\n }\n }\n }\n }\n};\n\nvar afterViewportColumnCalculatorOverride = function(calc) {\n var mergeCellsSetting = this.getSettings().mergeCells;\n if (mergeCellsSetting) {\n var rowCount = this.countRows();\n var mergeParent;\n for (var r = 0; r < rowCount; r++) {\n mergeParent = this.mergeCells.mergedCellInfoCollection.getInfo(r, calc.startColumn);\n\n if (mergeParent) {\n if (mergeParent.col < calc.startColumn) {\n calc.startColumn = mergeParent.col;\n return afterViewportColumnCalculatorOverride.call(this, calc); // recursively search upwards\n }\n }\n mergeParent = this.mergeCells.mergedCellInfoCollection.getInfo(r, calc.endColumn);\n if (mergeParent) {\n var mergeEnd = mergeParent.col + mergeParent.colspan - 1;\n if (mergeEnd > calc.endColumn) {\n calc.endColumn = mergeEnd;\n return afterViewportColumnCalculatorOverride.call(this, calc); // recursively search upwards\n }\n }\n }\n }\n};\n\nvar isMultipleSelection = function(isMultiple) {\n if (isMultiple && this.mergeCells) {\n var mergedCells = this.mergeCells.mergedCellInfoCollection,\n selectionRange = this.getSelectedRange();\n\n for (var group in mergedCells) {\n if (selectionRange.highlight.row == mergedCells[group].row &&\n selectionRange.highlight.col == mergedCells[group].col &&\n selectionRange.to.row == mergedCells[group].row + mergedCells[group].rowspan - 1 &&\n selectionRange.to.col == mergedCells[group].col + mergedCells[group].colspan - 1) {\n return false;\n }\n }\n }\n return isMultiple;\n};\n\nfunction modifyAutofillRange(select, drag) {\n var mergeCellsSetting = this.getSettings().mergeCells;\n\n if (!mergeCellsSetting || this.selection.isMultiple()) {\n return;\n }\n var info = this.mergeCells.mergedCellInfoCollection.getInfo(select[0], select[1]);\n\n if (info) {\n select[0] = info.row;\n select[1] = info.col;\n select[2] = info.row + info.rowspan - 1;\n select[3] = info.col + info.colspan - 1;\n }\n}\n\nfunction onAfterCreateCol(col, count) {\n if (this.mergeCells) {\n this.mergeCells.shiftCollection('right', col, count);\n }\n}\n\nfunction onAfterRemoveCol(col, count) {\n if (this.mergeCells) {\n this.mergeCells.shiftCollection('left', col, count);\n }\n}\n\nfunction onAfterCreateRow(row, count) {\n if (this.mergeCells) {\n this.mergeCells.shiftCollection('down', row, count);\n }\n}\n\nfunction onAfterRemoveRow(row, count) {\n if (this.mergeCells) {\n this.mergeCells.shiftCollection('up', row, count);\n }\n}\n\nconst hook = Hooks.getSingleton();\n\nhook.add('beforeInit', beforeInit);\nhook.add('afterInit', afterInit);\nhook.add('afterUpdateSettings', afterUpdateSettings);\nhook.add('beforeKeyDown', onBeforeKeyDown);\nhook.add('modifyTransformStart', modifyTransformFactory('modifyTransformStart'));\nhook.add('modifyTransformEnd', modifyTransformFactory('modifyTransformEnd'));\nhook.add('beforeSetRangeEnd', beforeSetRangeEnd);\nhook.add('beforeDrawBorders', beforeDrawAreaBorders);\nhook.add('afterIsMultipleSelection', isMultipleSelection);\nhook.add('afterRenderer', afterRenderer);\nhook.add('afterContextMenuDefaultOptions', addMergeActionsToContextMenu);\nhook.add('afterGetCellMeta', afterGetCellMeta);\nhook.add('afterViewportRowCalculatorOverride', afterViewportRowCalculatorOverride);\nhook.add('afterViewportColumnCalculatorOverride', afterViewportColumnCalculatorOverride);\nhook.add('modifyAutofillRange', modifyAutofillRange);\nhook.add('afterCreateCol', onAfterCreateCol);\nhook.add('afterRemoveCol', onAfterRemoveCol);\nhook.add('afterCreateRow', onAfterCreateRow);\nhook.add('afterRemoveRow', onAfterRemoveRow);\n\nexport default MergeCells;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/mergeCells/mergeCells.js","import Hooks from './../../pluginHooks';\nimport {getWindowScrollTop, hasClass, getWindowScrollLeft} from './../../helpers/dom/element';\nimport {isMobileBrowser} from './../../helpers/browser';\nimport BasePlugin from './../_base';\nimport EventManager from './../../eventManager';\nimport {registerPlugin} from './../../plugins';\nimport {CellCoords} from './../../3rdparty/walkontable/src';\n\n/**\n * @private\n * @plugin MultipleSelectionHandles\n */\nclass MultipleSelectionHandles extends BasePlugin {\n /**\n * @param {Object} hotInstance\n */\n constructor(hotInstance) {\n super(hotInstance);\n /**\n * @type {Array}\n */\n this.dragged = [];\n /**\n * Instance of EventManager.\n *\n * @type {EventManager}\n */\n this.eventManager = null;\n /**\n * @type {null}\n */\n this.lastSetCell = null;\n }\n\n /**\n * Check if the plugin is enabled in the handsontable settings.\n *\n * @returns {Boolean}\n */\n isEnabled() {\n return isMobileBrowser();\n }\n\n /**\n * Enable plugin for this Handsontable instance.\n */\n enablePlugin() {\n if (this.enabled) {\n return;\n }\n if (!this.eventManager) {\n this.eventManager = new EventManager(this);\n }\n this.registerListeners();\n super.enablePlugin();\n }\n\n /**\n * Bind the touch events\n * @private\n */\n registerListeners() {\n var _this = this;\n\n function removeFromDragged(query) {\n\n if (_this.dragged.length === 1) {\n // clear array\n _this.dragged.splice(0, _this.dragged.length);\n\n return true;\n }\n\n var entryPosition = _this.dragged.indexOf(query);\n\n if (entryPosition == -1) {\n return false;\n } else if (entryPosition === 0) {\n _this.dragged = _this.dragged.slice(0, 1);\n } else if (entryPosition == 1) {\n _this.dragged = _this.dragged.slice(-1);\n }\n }\n\n this.eventManager.addEventListener(this.hot.rootElement, 'touchstart', (event) => {\n let selectedRange;\n\n if (hasClass(event.target, 'topLeftSelectionHandle-HitArea')) {\n selectedRange = _this.hot.getSelectedRange();\n\n _this.dragged.push('topLeft');\n\n _this.touchStartRange = {\n width: selectedRange.getWidth(),\n height: selectedRange.getHeight(),\n direction: selectedRange.getDirection()\n };\n\n event.preventDefault();\n return false;\n\n } else if (hasClass(event.target, 'bottomRightSelectionHandle-HitArea')) {\n selectedRange = _this.hot.getSelectedRange();\n\n _this.dragged.push('bottomRight');\n\n _this.touchStartRange = {\n width: selectedRange.getWidth(),\n height: selectedRange.getHeight(),\n direction: selectedRange.getDirection()\n };\n\n event.preventDefault();\n return false;\n }\n });\n\n this.eventManager.addEventListener(this.hot.rootElement, 'touchend', (event) => {\n if (hasClass(event.target, 'topLeftSelectionHandle-HitArea')) {\n removeFromDragged.call(_this, 'topLeft');\n\n _this.touchStartRange = void 0;\n\n event.preventDefault();\n return false;\n\n } else if (hasClass(event.target, 'bottomRightSelectionHandle-HitArea')) {\n removeFromDragged.call(_this, 'bottomRight');\n\n _this.touchStartRange = void 0;\n\n event.preventDefault();\n return false;\n }\n });\n\n this.eventManager.addEventListener(this.hot.rootElement, 'touchmove', (event) => {\n let scrollTop = getWindowScrollTop(),\n scrollLeft = getWindowScrollLeft(),\n endTarget,\n targetCoords,\n selectedRange,\n rangeWidth,\n rangeHeight,\n rangeDirection,\n newRangeCoords;\n\n if (_this.dragged.length === 0) {\n return;\n }\n\n endTarget = document.elementFromPoint(\n event.touches[0].screenX - scrollLeft,\n event.touches[0].screenY - scrollTop);\n\n if (!endTarget || endTarget === _this.lastSetCell) {\n return;\n }\n\n if (endTarget.nodeName == 'TD' || endTarget.nodeName == 'TH') {\n targetCoords = _this.hot.getCoords(endTarget);\n\n if (targetCoords.col == -1) {\n targetCoords.col = 0;\n }\n\n selectedRange = _this.hot.getSelectedRange();\n rangeWidth = selectedRange.getWidth();\n rangeHeight = selectedRange.getHeight();\n rangeDirection = selectedRange.getDirection();\n\n if (rangeWidth == 1 && rangeHeight == 1) {\n _this.hot.selection.setRangeEnd(targetCoords);\n }\n\n newRangeCoords = _this.getCurrentRangeCoords(selectedRange, targetCoords, _this.touchStartRange.direction, rangeDirection, _this.dragged[0]);\n\n if (newRangeCoords.start !== null) {\n _this.hot.selection.setRangeStart(newRangeCoords.start);\n }\n\n _this.hot.selection.setRangeEnd(newRangeCoords.end);\n\n _this.lastSetCell = endTarget;\n\n }\n\n event.preventDefault();\n });\n }\n\n getCurrentRangeCoords(selectedRange, currentTouch, touchStartDirection, currentDirection, draggedHandle) {\n var topLeftCorner = selectedRange.getTopLeftCorner(),\n bottomRightCorner = selectedRange.getBottomRightCorner(),\n bottomLeftCorner = selectedRange.getBottomLeftCorner(),\n topRightCorner = selectedRange.getTopRightCorner();\n\n var newCoords = {\n start: null,\n end: null\n };\n\n switch (touchStartDirection) {\n case 'NE-SW':\n switch (currentDirection) {\n case 'NE-SW':\n case 'NW-SE':\n if (draggedHandle == 'topLeft') {\n newCoords = {\n start: new CellCoords(currentTouch.row, selectedRange.highlight.col),\n end: new CellCoords(bottomLeftCorner.row, currentTouch.col)\n };\n } else {\n newCoords = {\n start: new CellCoords(selectedRange.highlight.row, currentTouch.col),\n end: new CellCoords(currentTouch.row, topLeftCorner.col)\n };\n }\n break;\n case 'SE-NW':\n if (draggedHandle == 'bottomRight') {\n newCoords = {\n start: new CellCoords(bottomRightCorner.row, currentTouch.col),\n end: new CellCoords(currentTouch.row, topLeftCorner.col)\n };\n }\n break;\n default:\n break;\n }\n break;\n case 'NW-SE':\n switch (currentDirection) {\n case 'NE-SW':\n if (draggedHandle == 'topLeft') {\n newCoords = {\n start: currentTouch,\n end: bottomLeftCorner\n };\n } else {\n newCoords.end = currentTouch;\n }\n break;\n case 'NW-SE':\n if (draggedHandle == 'topLeft') {\n newCoords = {\n start: currentTouch,\n end: bottomRightCorner\n };\n } else {\n newCoords.end = currentTouch;\n }\n break;\n case 'SE-NW':\n if (draggedHandle == 'topLeft') {\n newCoords = {\n start: currentTouch,\n end: topLeftCorner\n };\n } else {\n newCoords.end = currentTouch;\n }\n break;\n case 'SW-NE':\n if (draggedHandle == 'topLeft') {\n newCoords = {\n start: currentTouch,\n end: topRightCorner\n };\n } else {\n newCoords.end = currentTouch;\n }\n break;\n default:\n break;\n }\n break;\n case 'SW-NE':\n switch (currentDirection) {\n case 'NW-SE':\n if (draggedHandle == 'bottomRight') {\n newCoords = {\n start: new CellCoords(currentTouch.row, topLeftCorner.col),\n end: new CellCoords(bottomLeftCorner.row, currentTouch.col)\n };\n } else {\n newCoords = {\n start: new CellCoords(topLeftCorner.row, currentTouch.col),\n end: new CellCoords(currentTouch.row, bottomRightCorner.col)\n };\n }\n break;\n // case 'NE-SW':\n //\n // break;\n case 'SW-NE':\n if (draggedHandle == 'topLeft') {\n newCoords = {\n start: new CellCoords(selectedRange.highlight.row, currentTouch.col),\n end: new CellCoords(currentTouch.row, bottomRightCorner.col)\n };\n } else {\n newCoords = {\n start: new CellCoords(currentTouch.row, topLeftCorner.col),\n end: new CellCoords(topLeftCorner.row, currentTouch.col)\n };\n }\n break;\n case 'SE-NW':\n if (draggedHandle == 'bottomRight') {\n newCoords = {\n start: new CellCoords(currentTouch.row, topRightCorner.col),\n end: new CellCoords(topLeftCorner.row, currentTouch.col)\n };\n } else if (draggedHandle == 'topLeft') {\n newCoords = {\n start: bottomLeftCorner,\n end: currentTouch\n };\n }\n break;\n default:\n break;\n }\n break;\n case 'SE-NW':\n switch (currentDirection) {\n case 'NW-SE':\n case 'NE-SW':\n case 'SW-NE':\n if (draggedHandle == 'topLeft') {\n newCoords.end = currentTouch;\n }\n break;\n case 'SE-NW':\n if (draggedHandle == 'topLeft') {\n newCoords.end = currentTouch;\n } else {\n newCoords = {\n start: currentTouch,\n end: topLeftCorner\n };\n }\n break;\n default:\n break;\n }\n break;\n default:\n break;\n }\n\n return newCoords;\n }\n\n /**\n * Check if user is currently dragging the handle.\n *\n * @returns {boolean} Dragging state\n */\n isDragged() {\n return this.dragged.length > 0;\n }\n}\n\nregisterPlugin('multipleSelectionHandles', MultipleSelectionHandles);\n\nexport default MultipleSelectionHandles;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/multipleSelectionHandles/multipleSelectionHandles.js","import jsonpatch from './../../../lib/jsonpatch/json-patch-duplex';\nimport localHooks from '../../mixins/localHooks';\nimport {mixin} from '../../helpers/object';\nimport {cleanPatches} from './utils';\n\n/**\n * @class DataObserver\n * @plugin ObserveChanges\n * @dependencies jsonpatch\n */\nclass DataObserver {\n constructor(observedData) {\n /**\n * Observed source data.\n *\n * @type {Array}\n */\n this.observedData = null;\n /**\n * JsonPatch observer.\n *\n * @type {Object}\n */\n this.observer = null;\n /**\n * Flag which determines if observer is paused or not. Paused observer doesn't emit `change` hooks.\n *\n * @type {Boolean}\n * @default false\n */\n this.paused = false;\n\n this.setObservedData(observedData);\n }\n\n /**\n * Set data to observe.\n *\n * @param {*} observedData\n */\n setObservedData(observedData) {\n if (this.observer) {\n jsonpatch.unobserve(this.observedData, this.observer);\n }\n this.observedData = observedData;\n this.observer = jsonpatch.observe(this.observedData, (patches) => this.onChange(patches));\n }\n\n /**\n * Check if observer was paused.\n *\n * @returns {Boolean}\n */\n isPaused() {\n return this.paused;\n }\n\n /**\n * Pause observer (stop emitting all detected changes).\n */\n pause() {\n this.paused = true;\n }\n\n /**\n * Resume observer (emit all detected changes).\n */\n resume() {\n this.paused = false;\n }\n\n /**\n * JsonPatch on change listener.\n *\n * @private\n * @param {Array} patches An array of object passed from jsonpatch.\n */\n onChange(patches) {\n this.runLocalHooks('change', cleanPatches(patches));\n }\n\n /**\n * Destroy observer instance.\n */\n destroy() {\n jsonpatch.unobserve(this.observedData, this.observer);\n this.observedData = null;\n this.observer = null;\n }\n}\n\nmixin(DataObserver, localHooks);\n\nexport default DataObserver;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/observeChanges/dataObserver.js","import BasePlugin from './../_base';\nimport jsonpatch from './../../../lib/jsonpatch/json-patch-duplex';\nimport DataObserver from './dataObserver';\nimport {arrayEach} from './../../helpers/array';\nimport {registerPlugin} from './../../plugins';\n\n// Handsontable.hooks.register('afterChangesObserved');\n\n/**\n * @plugin ObserveChanges\n * @dependencies jsonpatch\n *\n * @description\n * This plugin allows to observe data source changes.\n *\n * By default, the plugin is declared as `undefined`, which makes it disabled.\n * Enabling this plugin switches the table into one-way data binding where changes are applied into the data source (outside from the table)\n * will be automatically reflected in the table.\n *\n * ```js\n * ...\n * // as a boolean\n * observeChanges: true,\n * ...\n * ```\n *\n * To configure this plugin see {@link Options#observeChanges}.\n */\nclass ObserveChanges extends BasePlugin {\n constructor(hotInstance) {\n super(hotInstance);\n /**\n * Instance of {@link DataObserver}.\n *\n * @type {DataObserver}\n */\n this.observer = null;\n }\n\n /**\n * Check if the plugin is enabled in the handsontable settings.\n *\n * @returns {Boolean}\n */\n isEnabled() {\n return this.hot.getSettings().observeChanges;\n }\n\n /**\n * Enable plugin for this Handsontable instance.\n */\n enablePlugin() {\n if (this.enabled) {\n return;\n }\n if (!this.observer) {\n this.observer = new DataObserver(this.hot.getSourceData());\n this._exposePublicApi();\n }\n\n this.observer.addLocalHook('change', (patches) => this.onDataChange(patches));\n this.addHook('afterCreateRow', () => this.onAfterTableAlter());\n this.addHook('afterRemoveRow', () => this.onAfterTableAlter());\n this.addHook('afterCreateCol', () => this.onAfterTableAlter());\n this.addHook('afterRemoveCol', () => this.onAfterTableAlter());\n this.addHook('afterChange', (changes, source) => this.onAfterTableAlter(source));\n this.addHook('afterLoadData', (firstRun) => this.onAfterLoadData(firstRun));\n\n super.enablePlugin();\n }\n\n /**\n * Disable plugin for this Handsontable instance.\n */\n disablePlugin() {\n if (this.observer) {\n this.observer.destroy();\n this.observer = null;\n this._deletePublicApi();\n }\n\n super.disablePlugin();\n }\n\n /**\n * Data change observer.\n *\n * @private\n * @param {Array} patches An array of objects which every item defines coordinates where data was changed.\n */\n onDataChange(patches) {\n if (!this.observer.isPaused()) {\n const sourceName = `${this.pluginName}.change`;\n const actions = {\n add: (patch) => {\n if (isNaN(patch.col)) {\n this.hot.runHooks('afterCreateRow', patch.row, 1, sourceName);\n } else {\n this.hot.runHooks('afterCreateCol', patch.col, 1, sourceName);\n }\n },\n remove: (patch) => {\n if (isNaN(patch.col)) {\n this.hot.runHooks('afterRemoveRow', patch.row, 1, sourceName);\n } else {\n this.hot.runHooks('afterRemoveCol', patch.col, 1, sourceName);\n }\n },\n replace: (patch) => {\n this.hot.runHooks('afterChange', [patch.row, patch.col, null, patch.value], sourceName);\n },\n };\n\n arrayEach(patches, (patch) => {\n if (actions[patch.op]) {\n actions[patch.op](patch);\n }\n });\n this.hot.render();\n }\n\n this.hot.runHooks('afterChangesObserved');\n }\n\n /**\n * On after table alter listener. Prevents infinity loop between internal and external data changing.\n *\n * @private\n * @param source\n */\n onAfterTableAlter(source) {\n if (source !== 'loadData') {\n this.observer.pause();\n this.hot.addHookOnce('afterChangesObserved', () => this.observer.resume());\n }\n }\n\n /**\n * On after load data listener.\n *\n * @private\n * @param {Boolean} firstRun `true` if event was fired first time.\n */\n onAfterLoadData(firstRun) {\n if (!firstRun) {\n this.observer.setObservedData(this.hot.getSourceData());\n }\n }\n\n /**\n * Destroy plugin instance.\n */\n destroy() {\n if (this.observer) {\n this.observer.destroy();\n this._deletePublicApi();\n }\n super.destroy();\n }\n\n /**\n * Expose plugins methods to the core.\n *\n * @private\n */\n _exposePublicApi() {\n const hot = this.hot;\n\n hot.pauseObservingChanges = () => this.observer.pause();\n hot.resumeObservingChanges = () => this.observer.resume();\n hot.isPausedObservingChanges = () => this.observer.isPaused();\n }\n\n /**\n * Delete all previously exposed methods.\n *\n * @private\n */\n _deletePublicApi() {\n const hot = this.hot;\n\n delete hot.pauseObservingChanges;\n delete hot.resumeObservingChanges;\n delete hot.isPausedObservingChanges;\n }\n}\n\nexport default ObserveChanges;\n\nregisterPlugin('observeChanges', ObserveChanges);\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/observeChanges/observeChanges.js","import {arrayFilter, arrayMap} from '../../helpers/array';\n\n/**\n * Clean and extend patches from jsonpatch observer.\n *\n * @param {Array} patches\n * @returns {Array}\n */\nexport function cleanPatches(patches) {\n const newOrRemovedColumns = [];\n\n /**\n * If observeChanges uses native Object.observe method, then it produces patches for length property. Filter them.\n * If path can't be parsed. Filter it.\n */\n patches = arrayFilter(patches, (patch) => {\n if (/[/]length/ig.test(patch.path)) {\n return false;\n }\n if (!parsePath(patch.path)) {\n return false;\n }\n\n return true;\n });\n /**\n * Extend patches with changed cells coords\n */\n patches = arrayMap(patches, (patch) => {\n const coords = parsePath(patch.path);\n\n patch.row = coords.row;\n patch.col = coords.col;\n\n return patch;\n });\n /**\n * Removing or adding column will produce one patch for each table row.\n * Leaves only one patch for each column add/remove operation.\n */\n patches = arrayFilter(patches, (patch) => {\n if (['add', 'remove'].indexOf(patch.op) !== -1 && !isNaN(patch.col)) {\n if (newOrRemovedColumns.indexOf(patch.col) !== -1) {\n return false;\n }\n newOrRemovedColumns.push(patch.col);\n }\n\n return true;\n });\n newOrRemovedColumns.length = 0;\n\n return patches;\n}\n\n/**\n * Extract coordinates from path where data was changed.\n *\n * @param {String} path Path describing where data was changed.\n * @returns {Object|null} Returns an object with `row` and `col` properties or `null` if path doesn't have necessary information.\n */\nexport function parsePath(path) {\n const match = path.match(/^\\/(\\d+)\\/?(.*)?$/);\n\n if (!match) {\n return null;\n }\n const [, row, column] = match;\n\n return {\n row: parseInt(row, 10),\n col: /^\\d*$/.test(column) ? parseInt(column, 10) : column\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/observeChanges/utils.js","import Hooks from './../../pluginHooks';\nimport {registerPlugin} from './../../plugins';\nimport {hasOwnProperty} from './../../helpers/object';\n\nfunction Storage(prefix) {\n var savedKeys;\n\n var saveSavedKeys = function() {\n window.localStorage[`${prefix}__persistentStateKeys`] = JSON.stringify(savedKeys);\n };\n\n var loadSavedKeys = function() {\n var keysJSON = window.localStorage[`${prefix}__persistentStateKeys`];\n var keys = typeof keysJSON == 'string' ? JSON.parse(keysJSON) : void 0;\n savedKeys = keys ? keys : [];\n };\n\n var clearSavedKeys = function() {\n savedKeys = [];\n saveSavedKeys();\n };\n\n loadSavedKeys();\n\n this.saveValue = function(key, value) {\n window.localStorage[`${prefix}_${key}`] = JSON.stringify(value);\n if (savedKeys.indexOf(key) == -1) {\n savedKeys.push(key);\n saveSavedKeys();\n }\n\n };\n\n this.loadValue = function(key, defaultValue) {\n\n key = typeof key === 'undefined' ? defaultValue : key;\n\n var value = window.localStorage[`${prefix}_${key}`];\n\n return typeof value == 'undefined' ? void 0 : JSON.parse(value);\n };\n\n this.reset = function(key) {\n window.localStorage.removeItem(`${prefix}_${key}`);\n };\n\n this.resetAll = function() {\n for (var index = 0; index < savedKeys.length; index++) {\n window.localStorage.removeItem(`${prefix}_${savedKeys[index]}`);\n }\n\n clearSavedKeys();\n };\n}\n\n/**\n * @private\n * @class PersistentState\n * @plugin PersistentState\n */\nfunction HandsontablePersistentState() {\n var plugin = this;\n\n this.init = function() {\n var instance = this,\n pluginSettings = instance.getSettings().persistentState;\n\n plugin.enabled = !!(pluginSettings);\n\n if (!plugin.enabled) {\n removeHooks.call(instance);\n return;\n }\n\n if (!instance.storage) {\n instance.storage = new Storage(instance.rootElement.id);\n }\n\n instance.resetState = plugin.resetValue;\n\n addHooks.call(instance);\n\n };\n\n this.saveValue = function(key, value) {\n var instance = this;\n\n instance.storage.saveValue(key, value);\n };\n\n this.loadValue = function(key, saveTo) {\n var instance = this;\n\n saveTo.value = instance.storage.loadValue(key);\n };\n\n this.resetValue = function(key) {\n var instance = this;\n\n if (typeof key === 'undefined') {\n instance.storage.resetAll();\n } else {\n instance.storage.reset(key);\n }\n\n };\n\n var hooks = {\n persistentStateSave: plugin.saveValue,\n persistentStateLoad: plugin.loadValue,\n persistentStateReset: plugin.resetValue\n };\n\n for (var hookName in hooks) {\n if (hasOwnProperty(hooks, hookName)) {\n Hooks.getSingleton().register(hookName);\n }\n }\n\n function addHooks() {\n var instance = this;\n\n for (var hookName in hooks) {\n if (hasOwnProperty(hooks, hookName)) {\n instance.addHook(hookName, hooks[hookName]);\n }\n }\n }\n\n function removeHooks() {\n var instance = this;\n\n for (var hookName in hooks) {\n if (hasOwnProperty(hooks, hookName)) {\n instance.removeHook(hookName, hooks[hookName]);\n }\n }\n }\n}\n\nvar htPersistentState = new HandsontablePersistentState();\n\nHooks.getSingleton().add('beforeInit', htPersistentState.init);\nHooks.getSingleton().add('afterUpdateSettings', htPersistentState.init);\n\nexport default HandsontablePersistentState;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/persistentState/persistentState.js","import Hooks from './../../pluginHooks';\nimport {addClass, removeClass} from './../../helpers/dom/element';\nimport {registerRenderer, getRenderer} from './../../renderers';\n\n/**\n * @private\n * @plugin Search\n */\nfunction Search(instance) {\n this.query = function(queryStr, callback, queryMethod) {\n var rowCount = instance.countRows();\n var colCount = instance.countCols();\n var queryResult = [];\n\n if (!callback) {\n callback = Search.global.getDefaultCallback();\n }\n\n if (!queryMethod) {\n queryMethod = Search.global.getDefaultQueryMethod();\n }\n\n for (var rowIndex = 0; rowIndex < rowCount; rowIndex++) {\n for (var colIndex = 0; colIndex < colCount; colIndex++) {\n var cellData = instance.getDataAtCell(rowIndex, colIndex);\n var cellProperties = instance.getCellMeta(rowIndex, colIndex);\n var cellCallback = cellProperties.search.callback || callback;\n var cellQueryMethod = cellProperties.search.queryMethod || queryMethod;\n var testResult = cellQueryMethod(queryStr, cellData);\n\n if (testResult) {\n var singleResult = {\n row: rowIndex,\n col: colIndex,\n data: cellData,\n };\n\n queryResult.push(singleResult);\n }\n\n if (cellCallback) {\n cellCallback(instance, rowIndex, colIndex, cellData, testResult);\n }\n }\n }\n\n return queryResult;\n };\n};\n\nSearch.DEFAULT_CALLBACK = function(instance, row, col, data, testResult) {\n instance.getCellMeta(row, col).isSearchResult = testResult;\n};\n\nSearch.DEFAULT_QUERY_METHOD = function(query, value) {\n if (typeof query == 'undefined' || query == null || !query.toLowerCase || query.length === 0) {\n return false;\n }\n if (typeof value == 'undefined' || value == null) {\n return false;\n }\n\n return value.toString().toLowerCase().indexOf(query.toLowerCase()) != -1;\n};\n\nSearch.DEFAULT_SEARCH_RESULT_CLASS = 'htSearchResult';\n\nSearch.global = (function() {\n\n var defaultCallback = Search.DEFAULT_CALLBACK;\n var defaultQueryMethod = Search.DEFAULT_QUERY_METHOD;\n var defaultSearchResultClass = Search.DEFAULT_SEARCH_RESULT_CLASS;\n\n return {\n getDefaultCallback() {\n return defaultCallback;\n },\n\n setDefaultCallback(newDefaultCallback) {\n defaultCallback = newDefaultCallback;\n },\n\n getDefaultQueryMethod() {\n return defaultQueryMethod;\n },\n\n setDefaultQueryMethod(newDefaultQueryMethod) {\n defaultQueryMethod = newDefaultQueryMethod;\n },\n\n getDefaultSearchResultClass() {\n return defaultSearchResultClass;\n },\n\n setDefaultSearchResultClass(newSearchResultClass) {\n defaultSearchResultClass = newSearchResultClass;\n }\n };\n\n}());\n\nfunction SearchCellDecorator(instance, TD, row, col, prop, value, cellProperties) {\n var searchResultClass = (cellProperties.search !== null && typeof cellProperties.search == 'object' &&\n cellProperties.search.searchResultClass) || Search.global.getDefaultSearchResultClass();\n\n if (cellProperties.isSearchResult) {\n addClass(TD, searchResultClass);\n } else {\n removeClass(TD, searchResultClass);\n }\n};\n\nvar originalBaseRenderer = getRenderer('base');\n\nregisterRenderer('base', function(instance, TD, row, col, prop, value, cellProperties) {\n originalBaseRenderer.apply(this, arguments);\n SearchCellDecorator.apply(this, arguments);\n});\n\nfunction init() {\n var instance = this;\n\n var pluginEnabled = !!instance.getSettings().search;\n\n if (pluginEnabled) {\n instance.search = new Search(instance);\n } else {\n delete instance.search;\n }\n}\n\nHooks.getSingleton().add('afterInit', init);\nHooks.getSingleton().add('afterUpdateSettings', init);\n\nexport default Search;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/search/search.js","import {addClass, removeClass} from './../../helpers/dom/element';\nimport {arrayEach} from './../../helpers/array';\nimport BasePlugin from './../_base';\nimport {registerPlugin} from './../../plugins';\nimport {isTouchSupported} from './../../helpers/feature';\n\n/**\n * @private\n * @plugin TouchScroll\n * @class TouchScroll\n */\nclass TouchScroll extends BasePlugin {\n constructor(hotInstance) {\n super(hotInstance);\n\n /**\n * Collection of scrollbars to update.\n *\n * @type {Array}\n */\n this.scrollbars = [];\n /**\n * Collection of overlays to update.\n *\n * @type {Array}\n */\n this.clones = [];\n /**\n * Flag which determines if collection of overlays should be refilled on every table render.\n *\n * @type {Boolean}\n * @default false\n */\n this.lockedCollection = false;\n /**\n * Flag which determines if walkontable should freeze overlays while scrolling.\n *\n * @type {Boolean}\n * @default false\n */\n this.freezeOverlays = false;\n }\n\n /**\n * Check if plugin is enabled.\n *\n * @returns {Boolean}\n */\n isEnabled() {\n return isTouchSupported();\n }\n\n /**\n * Enable the plugin.\n */\n enablePlugin() {\n if (this.enabled) {\n return;\n }\n\n this.addHook('afterRender', () => this.onAfterRender());\n this.registerEvents();\n\n super.enablePlugin();\n }\n\n /**\n * Updates the plugin to use the latest options you have specified.\n */\n updatePlugin() {\n this.lockedCollection = false;\n\n super.updatePlugin();\n }\n\n /**\n * Disable plugin for this Handsontable instance.\n */\n disablePlugin() {\n super.disablePlugin();\n }\n\n /**\n * Register all necessary events.\n *\n * @private\n */\n registerEvents() {\n this.addHook('beforeTouchScroll', () => this.onBeforeTouchScroll());\n this.addHook('afterMomentumScroll', () => this.onAfterMomentumScroll());\n }\n\n /**\n * After render listener.\n *\n * @private\n */\n onAfterRender() {\n if (this.lockedCollection) {\n return;\n }\n\n const {topOverlay, bottomOverlay, leftOverlay, topLeftCornerOverlay, bottomLeftCornerOverlay} = this.hot.view.wt.wtOverlays;\n\n this.lockedCollection = true;\n this.scrollbars.length = 0;\n this.scrollbars.push(topOverlay);\n\n if (bottomOverlay.clone) {\n this.scrollbars.push(bottomOverlay);\n }\n this.scrollbars.push(leftOverlay);\n\n if (topLeftCornerOverlay) {\n this.scrollbars.push(topLeftCornerOverlay);\n }\n if (bottomLeftCornerOverlay && bottomLeftCornerOverlay.clone) {\n this.scrollbars.push(bottomLeftCornerOverlay);\n }\n\n this.clones.length = 0;\n\n if (topOverlay.needFullRender) {\n this.clones.push(topOverlay.clone.wtTable.holder.parentNode);\n }\n if (bottomOverlay.needFullRender) {\n this.clones.push(bottomOverlay.clone.wtTable.holder.parentNode);\n }\n if (leftOverlay.needFullRender) {\n this.clones.push(leftOverlay.clone.wtTable.holder.parentNode);\n }\n if (topLeftCornerOverlay) {\n this.clones.push(topLeftCornerOverlay.clone.wtTable.holder.parentNode);\n }\n if (bottomLeftCornerOverlay && bottomLeftCornerOverlay.clone) {\n this.clones.push(bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);\n }\n }\n\n /**\n * Touch scroll listener.\n *\n * @private\n */\n onBeforeTouchScroll() {\n this.freezeOverlays = true;\n\n arrayEach(this.clones, (clone) => {\n addClass(clone, 'hide-tween');\n });\n }\n\n /**\n * After momentum scroll listener.\n *\n * @private\n */\n onAfterMomentumScroll() {\n this.freezeOverlays = false;\n\n arrayEach(this.clones, (clone) => {\n removeClass(clone, 'hide-tween');\n addClass(clone, 'show-tween');\n });\n\n setTimeout(() => {\n arrayEach(this.clones, (clone) => {\n removeClass(clone, 'show-tween');\n });\n }, 400);\n\n arrayEach(this.scrollbars, (scrollbar) => {\n scrollbar.refresh();\n scrollbar.resetFixedPosition();\n });\n\n this.hot.view.wt.wtOverlays.syncScrollWithMaster();\n }\n}\n\nregisterPlugin('touchScroll', TouchScroll);\n\nexport default TouchScroll;\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/touchScroll/touchScroll.js","/**\n * Handsontable UndoRedo class\n */\nimport Hooks from './../../pluginHooks';\nimport {arrayMap} from './../../helpers/array';\nimport {rangeEach} from './../../helpers/number';\nimport {inherit, deepClone} from './../../helpers/object';\nimport {stopImmediatePropagation} from './../../helpers/dom/event';\nimport {CellCoords} from './../../3rdparty/walkontable/src';\n\n/**\n * @description\n * Handsontable UndoRedo plugin. It allows to undo and redo certain actions done in the table.\n * Please note, that not all actions are currently undo-able.\n *\n * @example\n * ```js\n * ...\n * undo: true\n * ...\n * ```\n * @class UndoRedo\n * @plugin UndoRedo\n */\nfunction UndoRedo(instance) {\n let plugin = this;\n this.instance = instance;\n this.doneActions = [];\n this.undoneActions = [];\n this.ignoreNewActions = false;\n\n instance.addHook('afterChange', (changes, source) => {\n if (changes && source !== 'UndoRedo.undo' && source !== 'UndoRedo.redo') {\n plugin.done(new UndoRedo.ChangeAction(changes));\n }\n });\n\n instance.addHook('afterCreateRow', (index, amount, source) => {\n if (source === 'UndoRedo.undo' || source === 'UndoRedo.undo' || source === 'auto') {\n return;\n }\n\n let action = new UndoRedo.CreateRowAction(index, amount);\n plugin.done(action);\n });\n\n instance.addHook('beforeRemoveRow', (index, amount, logicRows, source) => {\n if (source === 'UndoRedo.undo' || source === 'UndoRedo.redo' || source === 'auto') {\n return;\n }\n\n var originalData = plugin.instance.getSourceDataArray();\n\n index = (originalData.length + index) % originalData.length;\n\n var removedData = deepClone(originalData.slice(index, index + amount));\n\n plugin.done(new UndoRedo.RemoveRowAction(index, removedData));\n });\n\n instance.addHook('afterCreateCol', (index, amount, source) => {\n if (source === 'UndoRedo.undo' || source === 'UndoRedo.redo' || source === 'auto') {\n return;\n }\n\n plugin.done(new UndoRedo.CreateColumnAction(index, amount));\n });\n\n instance.addHook('beforeRemoveCol', (index, amount, logicColumns, source) => {\n if (source === 'UndoRedo.undo' || source === 'UndoRedo.redo' || source === 'auto') {\n return;\n }\n\n let originalData = plugin.instance.getSourceDataArray();\n\n index = (plugin.instance.countCols() + index) % plugin.instance.countCols();\n\n let removedData = [];\n let headers = [];\n let indexes = [];\n\n rangeEach(originalData.length - 1, (i) => {\n let column = [];\n let origRow = originalData[i];\n\n rangeEach(index, index + (amount - 1), (j) => {\n column.push(origRow[instance.runHooks('modifyCol', j)]);\n });\n removedData.push(column);\n });\n\n rangeEach(amount - 1, (i) => {\n indexes.push(instance.runHooks('modifyCol', index + i));\n });\n\n if (Array.isArray(instance.getSettings().colHeaders)) {\n rangeEach(amount - 1, (i) => {\n headers.push(instance.getSettings().colHeaders[instance.runHooks('modifyCol', index + i)] || null);\n });\n }\n\n let manualColumnMovePlugin = plugin.instance.getPlugin('manualColumnMove');\n\n let columnsMap = manualColumnMovePlugin.isEnabled() ? manualColumnMovePlugin.columnsMapper.__arrayMap : [];\n let action = new UndoRedo.RemoveColumnAction(index, indexes, removedData, headers, columnsMap);\n\n plugin.done(action);\n });\n\n instance.addHook('beforeCellAlignment', (stateBefore, range, type, alignment) => {\n let action = new UndoRedo.CellAlignmentAction(stateBefore, range, type, alignment);\n plugin.done(action);\n });\n\n instance.addHook('beforeFilter', (formulaStacks) => {\n plugin.done(new UndoRedo.FiltersAction(formulaStacks));\n });\n\n instance.addHook('beforeRowMove', (movedRows, target) => {\n if (movedRows === false) {\n return;\n }\n\n plugin.done(new UndoRedo.RowMoveAction(movedRows, target));\n });\n};\n\nUndoRedo.prototype.done = function(action) {\n if (!this.ignoreNewActions) {\n this.doneActions.push(action);\n this.undoneActions.length = 0;\n }\n};\n\n/**\n * Undo last edit.\n *\n * @function undo\n * @memberof UndoRedo#\n */\nUndoRedo.prototype.undo = function() {\n if (this.isUndoAvailable()) {\n let action = this.doneActions.pop();\n let actionClone = deepClone(action);\n let instance = this.instance;\n\n let continueAction = instance.runHooks('beforeUndo', actionClone);\n\n if (continueAction === false) {\n return;\n }\n\n this.ignoreNewActions = true;\n let that = this;\n action.undo(this.instance, () => {\n that.ignoreNewActions = false;\n that.undoneActions.push(action);\n });\n\n instance.runHooks('afterUndo', actionClone);\n }\n};\n\n/**\n * Redo edit (used to reverse an undo).\n *\n * @function redo\n * @memberof UndoRedo#\n */\nUndoRedo.prototype.redo = function() {\n if (this.isRedoAvailable()) {\n let action = this.undoneActions.pop();\n let actionClone = deepClone(action);\n let instance = this.instance;\n\n let continueAction = instance.runHooks('beforeRedo', actionClone);\n\n if (continueAction === false) {\n return;\n }\n\n this.ignoreNewActions = true;\n let that = this;\n action.redo(this.instance, () => {\n that.ignoreNewActions = false;\n that.doneActions.push(action);\n });\n\n instance.runHooks('afterRedo', actionClone);\n }\n};\n\n/**\n * Check if undo action is available.\n *\n * @function isUndoAvailable\n * @memberof UndoRedo#\n * @return {Boolean} Return `true` if undo can be performed, `false` otherwise\n */\nUndoRedo.prototype.isUndoAvailable = function() {\n return this.doneActions.length > 0;\n};\n\n/**\n * Check if redo action is available.\n *\n * @function isRedoAvailable\n * @memberof UndoRedo#\n * @return {Boolean} Return `true` if redo can be performed, `false` otherwise.\n */\nUndoRedo.prototype.isRedoAvailable = function() {\n return this.undoneActions.length > 0;\n};\n\n/**\n * Clears undo history.\n *\n * @function clear\n * @memberof UndoRedo#\n */\nUndoRedo.prototype.clear = function() {\n this.doneActions.length = 0;\n this.undoneActions.length = 0;\n};\n\nUndoRedo.Action = function() {};\nUndoRedo.Action.prototype.undo = function() {};\nUndoRedo.Action.prototype.redo = function() {};\n\n/**\n * Change action.\n */\nUndoRedo.ChangeAction = function(changes) {\n this.changes = changes;\n this.actionType = 'change';\n};\ninherit(UndoRedo.ChangeAction, UndoRedo.Action);\n\nUndoRedo.ChangeAction.prototype.undo = function(instance, undoneCallback) {\n let data = deepClone(this.changes),\n emptyRowsAtTheEnd = instance.countEmptyRows(true),\n emptyColsAtTheEnd = instance.countEmptyCols(true);\n\n for (let i = 0, len = data.length; i < len; i++) {\n data[i].splice(3, 1);\n }\n\n instance.addHookOnce('afterChange', undoneCallback);\n\n instance.setDataAtRowProp(data, null, null, 'UndoRedo.undo');\n\n for (let i = 0, len = data.length; i < len; i++) {\n if (instance.getSettings().minSpareRows && data[i][0] + 1 + instance.getSettings().minSpareRows === instance.countRows() &&\n emptyRowsAtTheEnd == instance.getSettings().minSpareRows) {\n\n instance.alter('remove_row', parseInt(data[i][0] + 1, 10), instance.getSettings().minSpareRows);\n instance.undoRedo.doneActions.pop();\n\n }\n\n if (instance.getSettings().minSpareCols && data[i][1] + 1 + instance.getSettings().minSpareCols === instance.countCols() &&\n emptyColsAtTheEnd == instance.getSettings().minSpareCols) {\n\n instance.alter('remove_col', parseInt(data[i][1] + 1, 10), instance.getSettings().minSpareCols);\n instance.undoRedo.doneActions.pop();\n }\n }\n\n};\nUndoRedo.ChangeAction.prototype.redo = function(instance, onFinishCallback) {\n let data = deepClone(this.changes);\n\n for (let i = 0, len = data.length; i < len; i++) {\n data[i].splice(2, 1);\n }\n\n instance.addHookOnce('afterChange', onFinishCallback);\n instance.setDataAtRowProp(data, null, null, 'UndoRedo.redo');\n};\n\n/**\n * Create row action.\n */\nUndoRedo.CreateRowAction = function(index, amount) {\n this.index = index;\n this.amount = amount;\n this.actionType = 'insert_row';\n};\ninherit(UndoRedo.CreateRowAction, UndoRedo.Action);\n\nUndoRedo.CreateRowAction.prototype.undo = function(instance, undoneCallback) {\n let rowCount = instance.countRows(),\n minSpareRows = instance.getSettings().minSpareRows;\n\n if (this.index >= rowCount && this.index - minSpareRows < rowCount) {\n this.index -= minSpareRows; // work around the situation where the needed row was removed due to an 'undo' of a made change\n }\n\n instance.addHookOnce('afterRemoveRow', undoneCallback);\n instance.alter('remove_row', this.index, this.amount, 'UndoRedo.undo');\n};\nUndoRedo.CreateRowAction.prototype.redo = function(instance, redoneCallback) {\n instance.addHookOnce('afterCreateRow', redoneCallback);\n instance.alter('insert_row', this.index, this.amount, 'UndoRedo.redo');\n};\n\n/**\n * Remove row action.\n */\nUndoRedo.RemoveRowAction = function(index, data) {\n this.index = index;\n this.data = data;\n this.actionType = 'remove_row';\n};\ninherit(UndoRedo.RemoveRowAction, UndoRedo.Action);\n\nUndoRedo.RemoveRowAction.prototype.undo = function(instance, undoneCallback) {\n instance.alter('insert_row', this.index, this.data.length, 'UndoRedo.undo');\n instance.addHookOnce('afterRender', undoneCallback);\n instance.populateFromArray(this.index, 0, this.data, void 0, void 0, 'UndoRedo.undo');\n};\nUndoRedo.RemoveRowAction.prototype.redo = function(instance, redoneCallback) {\n instance.addHookOnce('afterRemoveRow', redoneCallback);\n instance.alter('remove_row', this.index, this.data.length, 'UndoRedo.redo');\n};\n\n/**\n * Create column action.\n */\nUndoRedo.CreateColumnAction = function(index, amount) {\n this.index = index;\n this.amount = amount;\n this.actionType = 'insert_col';\n};\ninherit(UndoRedo.CreateColumnAction, UndoRedo.Action);\n\nUndoRedo.CreateColumnAction.prototype.undo = function(instance, undoneCallback) {\n instance.addHookOnce('afterRemoveCol', undoneCallback);\n instance.alter('remove_col', this.index, this.amount, 'UndoRedo.undo');\n};\nUndoRedo.CreateColumnAction.prototype.redo = function(instance, redoneCallback) {\n instance.addHookOnce('afterCreateCol', redoneCallback);\n instance.alter('insert_col', this.index, this.amount, 'UndoRedo.redo');\n};\n\n/**\n * Remove column action.\n */\nUndoRedo.RemoveColumnAction = function(index, indexes, data, headers, columnPositions) {\n this.index = index;\n this.indexes = indexes;\n this.data = data;\n this.amount = this.data[0].length;\n this.headers = headers;\n this.columnPositions = columnPositions.slice(0);\n this.actionType = 'remove_col';\n};\ninherit(UndoRedo.RemoveColumnAction, UndoRedo.Action);\n\nUndoRedo.RemoveColumnAction.prototype.undo = function(instance, undoneCallback) {\n let row;\n let ascendingIndexes = this.indexes.slice(0).sort();\n let sortByIndexes = (elem, j, arr) => arr[this.indexes.indexOf(ascendingIndexes[j])];\n\n let sortedData = [];\n rangeEach(this.data.length - 1, (i) => {\n sortedData[i] = arrayMap(this.data[i], sortByIndexes);\n });\n\n let sortedHeaders = [];\n sortedHeaders = arrayMap(this.headers, sortByIndexes);\n\n var changes = [];\n\n // TODO: Temporary hook for undo/redo mess\n instance.runHooks('beforeCreateCol', this.indexes[0], this.indexes[this.indexes.length - 1], 'UndoRedo.undo');\n\n rangeEach(this.data.length - 1, (i) => {\n row = instance.getSourceDataAtRow(i);\n\n rangeEach(ascendingIndexes.length - 1, (j) => {\n row.splice(ascendingIndexes[j], 0, sortedData[i][j]);\n changes.push([i, ascendingIndexes[j], null, sortedData[i][j]]);\n });\n });\n\n // TODO: Temporary hook for undo/redo mess\n if (instance.getPlugin('formulas')) {\n instance.getPlugin('formulas').onAfterSetDataAtCell(changes);\n }\n\n if (typeof this.headers !== 'undefined') {\n rangeEach(sortedHeaders.length - 1, (j) => {\n instance.getSettings().colHeaders.splice(ascendingIndexes[j], 0, sortedHeaders[j]);\n });\n }\n\n if (instance.getPlugin('manualColumnMove')) {\n instance.getPlugin('manualColumnMove').columnsMapper.__arrayMap = this.columnPositions;\n }\n\n instance.addHookOnce('afterRender', undoneCallback);\n\n // TODO: Temporary hook for undo/redo mess\n instance.runHooks('afterCreateCol', this.indexes[0], this.indexes[this.indexes.length - 1], 'UndoRedo.undo');\n\n if (instance.getPlugin('formulas')) {\n instance.getPlugin('formulas').recalculateFull();\n }\n\n instance.render();\n};\n\nUndoRedo.RemoveColumnAction.prototype.redo = function(instance, redoneCallback) {\n instance.addHookOnce('afterRemoveCol', redoneCallback);\n instance.alter('remove_col', this.index, this.amount, 'UndoRedo.redo');\n};\n\n/**\n * Cell alignment action.\n */\nUndoRedo.CellAlignmentAction = function(stateBefore, range, type, alignment) {\n this.stateBefore = stateBefore;\n this.range = range;\n this.type = type;\n this.alignment = alignment;\n};\nUndoRedo.CellAlignmentAction.prototype.undo = function(instance, undoneCallback) {\n if (!instance.getPlugin('contextMenu').isEnabled()) {\n return;\n }\n for (var row = this.range.from.row; row <= this.range.to.row; row++) {\n for (var col = this.range.from.col; col <= this.range.to.col; col++) {\n instance.setCellMeta(row, col, 'className', this.stateBefore[row][col] || ' htLeft');\n }\n }\n\n instance.addHookOnce('afterRender', undoneCallback);\n instance.render();\n};\nUndoRedo.CellAlignmentAction.prototype.redo = function(instance, undoneCallback) {\n if (!instance.getPlugin('contextMenu').isEnabled()) {\n return;\n }\n instance.selectCell(this.range.from.row, this.range.from.col, this.range.to.row, this.range.to.col);\n instance.getPlugin('contextMenu').executeCommand(`alignment:${this.alignment.replace('ht', '').toLowerCase()}`);\n\n instance.addHookOnce('afterRender', undoneCallback);\n instance.render();\n};\n\n/**\n * Filters action.\n */\nUndoRedo.FiltersAction = function(formulaStacks) {\n this.formulaStacks = formulaStacks;\n this.actionType = 'filter';\n};\ninherit(UndoRedo.FiltersAction, UndoRedo.Action);\n\nUndoRedo.FiltersAction.prototype.undo = function(instance, undoneCallback) {\n let filters = instance.getPlugin('filters');\n\n instance.addHookOnce('afterRender', undoneCallback);\n\n filters.formulaCollection.importAllFormulas(this.formulaStacks.slice(0, this.formulaStacks.length - 1));\n filters.filter();\n};\nUndoRedo.FiltersAction.prototype.redo = function(instance, redoneCallback) {\n let filters = instance.getPlugin('filters');\n\n instance.addHookOnce('afterRender', redoneCallback);\n\n filters.formulaCollection.importAllFormulas(this.formulaStacks);\n filters.filter();\n};\n\n/**\n * ManualRowMove action.\n * @TODO: removeRow undo should works on logical index\n */\nUndoRedo.RowMoveAction = function(movedRows, target) {\n this.rows = movedRows.slice();\n this.target = target;\n};\ninherit(UndoRedo.RowMoveAction, UndoRedo.Action);\n\nUndoRedo.RowMoveAction.prototype.undo = function(instance, undoneCallback) {\n let manualRowMove = instance.getPlugin('manualRowMove');\n\n instance.addHookOnce('afterRender', undoneCallback);\n let mod = this.rows[0] < this.target ? -1 * this.rows.length : 0;\n let newTarget = this.rows[0] > this.target ? this.rows[0] + this.rows.length : this.rows[0];\n let newRows = [];\n let rowsLen = this.rows.length + mod;\n\n for (let i = mod; i < rowsLen; i++) {\n newRows.push(this.target + i);\n }\n manualRowMove.moveRows(newRows.slice(), newTarget);\n instance.render();\n\n instance.selection.setRangeStartOnly(new CellCoords(this.rows[0], 0));\n instance.selection.setRangeEnd(new CellCoords(this.rows[this.rows.length - 1], instance.countCols() - 1));\n};\nUndoRedo.RowMoveAction.prototype.redo = function(instance, redoneCallback) {\n let manualRowMove = instance.getPlugin('manualRowMove');\n\n instance.addHookOnce('afterRender', redoneCallback);\n manualRowMove.moveRows(this.rows.slice(), this.target);\n instance.render();\n let startSelection = this.rows[0] < this.target ? this.target - this.rows.length : this.target;\n instance.selection.setRangeStartOnly(new CellCoords(startSelection, 0));\n instance.selection.setRangeEnd(new CellCoords(startSelection + this.rows.length - 1, instance.countCols() - 1));\n};\n\nfunction init() {\n let instance = this;\n let pluginEnabled = typeof instance.getSettings().undo == 'undefined' || instance.getSettings().undo;\n\n if (pluginEnabled) {\n if (!instance.undoRedo) {\n /**\n * Instance of Handsontable.UndoRedo Plugin {@link Handsontable.UndoRedo}\n *\n * @alias undoRedo\n * @memberof! Handsontable.Core#\n * @type {UndoRedo}\n */\n instance.undoRedo = new UndoRedo(instance);\n\n exposeUndoRedoMethods(instance);\n\n instance.addHook('beforeKeyDown', onBeforeKeyDown);\n instance.addHook('afterChange', onAfterChange);\n }\n } else if (instance.undoRedo) {\n delete instance.undoRedo;\n\n removeExposedUndoRedoMethods(instance);\n\n instance.removeHook('beforeKeyDown', onBeforeKeyDown);\n instance.removeHook('afterChange', onAfterChange);\n }\n}\n\nfunction onBeforeKeyDown(event) {\n let instance = this;\n\n let ctrlDown = (event.ctrlKey || event.metaKey) && !event.altKey;\n\n if (ctrlDown) {\n if (event.keyCode === 89 || (event.shiftKey && event.keyCode === 90)) { // CTRL + Y or CTRL + SHIFT + Z\n instance.undoRedo.redo();\n stopImmediatePropagation(event);\n } else if (event.keyCode === 90) { // CTRL + Z\n instance.undoRedo.undo();\n stopImmediatePropagation(event);\n }\n }\n}\n\nfunction onAfterChange(changes, source) {\n let instance = this;\n if (source === 'loadData') {\n return instance.undoRedo.clear();\n }\n}\n\nfunction exposeUndoRedoMethods(instance) {\n /**\n * {@link UndoRedo#undo}\n * @alias undo\n * @memberof! Handsontable.Core#\n */\n instance.undo = function() {\n return instance.undoRedo.undo();\n };\n\n /**\n * {@link UndoRedo#redo}\n * @alias redo\n * @memberof! Handsontable.Core#\n */\n instance.redo = function() {\n return instance.undoRedo.redo();\n };\n\n /**\n * {@link UndoRedo#isUndoAvailable}\n * @alias isUndoAvailable\n * @memberof! Handsontable.Core#\n */\n instance.isUndoAvailable = function() {\n return instance.undoRedo.isUndoAvailable();\n };\n\n /**\n * {@link UndoRedo#isRedoAvailable}\n * @alias isRedoAvailable\n * @memberof! Handsontable.Core#\n */\n instance.isRedoAvailable = function() {\n return instance.undoRedo.isRedoAvailable();\n };\n\n /**\n * {@link UndoRedo#clear}\n * @alias clearUndo\n * @memberof! Handsontable.Core#\n */\n instance.clearUndo = function() {\n return instance.undoRedo.clear();\n };\n}\n\nfunction removeExposedUndoRedoMethods(instance) {\n delete instance.undo;\n delete instance.redo;\n delete instance.isUndoAvailable;\n delete instance.isRedoAvailable;\n delete instance.clearUndo;\n}\n\nconst hook = Hooks.getSingleton();\n\nhook.add('afterInit', init);\nhook.add('afterUpdateSettings', init);\n\nhook.register('beforeUndo');\nhook.register('afterUndo');\nhook.register('beforeRedo');\nhook.register('afterRedo');\n\n\n\n// WEBPACK FOOTER //\n// src/plugins/undoRedo/undoRedo.js","/**\n * Adds appropriate CSS class to table cell, based on cellProperties\n */\nimport {addClass, removeClass} from './../helpers/dom/element';\nimport {registerRenderer} from './../renderers';\n\nfunction cellDecorator(instance, TD, row, col, prop, value, cellProperties) {\n if (cellProperties.className) {\n if (TD.className) {\n TD.className = `${TD.className} ${cellProperties.className}`;\n } else {\n TD.className = cellProperties.className;\n }\n }\n\n if (cellProperties.readOnly) {\n addClass(TD, cellProperties.readOnlyCellClassName);\n }\n\n if (cellProperties.valid === false && cellProperties.invalidCellClassName) {\n addClass(TD, cellProperties.invalidCellClassName);\n } else {\n removeClass(TD, cellProperties.invalidCellClassName);\n }\n\n if (cellProperties.wordWrap === false && cellProperties.noWordWrapClassName) {\n addClass(TD, cellProperties.noWordWrapClassName);\n }\n\n if (!value && cellProperties.placeholder) {\n addClass(TD, cellProperties.placeholderCellClassName);\n }\n}\n\nregisterRenderer('base', cellDecorator);\n\nexport default cellDecorator;\n\n\n\n// WEBPACK FOOTER //\n// src/renderers/_cellDecorator.js","import {addClass, hasClass, empty} from './../helpers/dom/element';\nimport EventManager from './../eventManager';\nimport {getRenderer, registerRenderer} from './../renderers';\nimport {CellCoords} from './../3rdparty/walkontable/src';\n\nvar clonableWRAPPER = document.createElement('DIV');\nclonableWRAPPER.className = 'htAutocompleteWrapper';\n\nvar clonableARROW = document.createElement('DIV');\nclonableARROW.className = 'htAutocompleteArrow';\n// workaround for https://github.com/handsontable/handsontable/issues/1946\n// this is faster than innerHTML. See: https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips\nclonableARROW.appendChild(document.createTextNode(String.fromCharCode(9660)));\n\nvar wrapTdContentWithWrapper = function(TD, WRAPPER) {\n WRAPPER.innerHTML = TD.innerHTML;\n empty(TD);\n TD.appendChild(WRAPPER);\n};\n\n/**\n * Autocomplete renderer\n *\n * @private\n * @renderer AutocompleteRenderer\n * @param {Object} instance Handsontable instance\n * @param {Element} TD Table cell where to render\n * @param {Number} row\n * @param {Number} col\n * @param {String|Number} prop Row object property name\n * @param value Value to render (remember to escape unsafe HTML before inserting to DOM!)\n * @param {Object} cellProperties Cell properites (shared by cell renderer and editor)\n */\nfunction autocompleteRenderer(instance, TD, row, col, prop, value, cellProperties) {\n var WRAPPER = clonableWRAPPER.cloneNode(true); // this is faster than createElement\n var ARROW = clonableARROW.cloneNode(true); // this is faster than createElement\n\n if (cellProperties.allowHtml) {\n getRenderer('html').apply(this, arguments);\n } else {\n getRenderer('text').apply(this, arguments);\n }\n\n TD.appendChild(ARROW);\n addClass(TD, 'htAutocomplete');\n\n if (!TD.firstChild) { // http://jsperf.com/empty-node-if-needed\n // otherwise empty fields appear borderless in demo/renderers.html (IE)\n TD.appendChild(document.createTextNode(String.fromCharCode(160))); // workaround for https://github.com/handsontable/handsontable/issues/1946\n // this is faster than innerHTML. See: https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips\n }\n\n if (!instance.acArrowListener) {\n var eventManager = new EventManager(instance);\n\n // not very elegant but easy and fast\n instance.acArrowListener = function(event) {\n if (hasClass(event.target, 'htAutocompleteArrow')) {\n instance.view.wt.getSetting('onCellDblClick', null, new CellCoords(row, col), TD);\n }\n };\n\n eventManager.addEventListener(instance.rootElement, 'mousedown', instance.acArrowListener);\n\n // We need to unbind the listener after the table has been destroyed\n instance.addHookOnce('afterDestroy', () => {\n eventManager.destroy();\n });\n }\n}\n\nregisterRenderer('autocomplete', autocompleteRenderer);\n\nexport default autocompleteRenderer;\n\n\n\n// WEBPACK FOOTER //\n// src/renderers/autocompleteRenderer.js","import {empty, addClass, hasClass} from './../helpers/dom/element';\nimport {equalsIgnoreCase} from './../helpers/string';\nimport EventManager from './../eventManager';\nimport {getRenderer, registerRenderer} from './../renderers';\nimport {isKey} from './../helpers/unicode';\nimport {partial} from './../helpers/function';\nimport {stopImmediatePropagation, isImmediatePropagationStopped} from './../helpers/dom/event';\n\nconst isListeningKeyDownEvent = new WeakMap();\nconst isCheckboxListenerAdded = new WeakMap();\nconst BAD_VALUE_CLASS = 'htBadValue';\n\n/**\n * Checkbox renderer\n *\n * @private\n * @param {Object} instance Handsontable instance\n * @param {Element} TD Table cell where to render\n * @param {Number} row\n * @param {Number} col\n * @param {String|Number} prop Row object property name\n * @param value Value to render (remember to escape unsafe HTML before inserting to DOM!)\n * @param {Object} cellProperties Cell properties (shared by cell renderer and editor)\n */\nfunction checkboxRenderer(instance, TD, row, col, prop, value, cellProperties) {\n getRenderer('base').apply(this, arguments);\n\n const eventManager = registerEvents(instance);\n let input = createInput();\n const labelOptions = cellProperties.label;\n let badValue = false;\n\n if (typeof cellProperties.checkedTemplate === 'undefined') {\n cellProperties.checkedTemplate = true;\n }\n if (typeof cellProperties.uncheckedTemplate === 'undefined') {\n cellProperties.uncheckedTemplate = false;\n }\n\n empty(TD); // TODO identify under what circumstances this line can be removed\n\n if (value === cellProperties.checkedTemplate || equalsIgnoreCase(value, cellProperties.checkedTemplate)) {\n input.checked = true;\n\n } else if (value === cellProperties.uncheckedTemplate || equalsIgnoreCase(value, cellProperties.uncheckedTemplate)) {\n input.checked = false;\n\n } else if (value === null) { // default value\n addClass(input, 'noValue');\n\n } else {\n input.style.display = 'none';\n addClass(input, BAD_VALUE_CLASS);\n badValue = true;\n }\n\n input.setAttribute('data-row', row);\n input.setAttribute('data-col', col);\n\n if (!badValue && labelOptions) {\n let labelText = '';\n\n if (labelOptions.value) {\n labelText = typeof labelOptions.value === 'function' ? labelOptions.value.call(this, row, col, prop, value) : labelOptions.value;\n\n } else if (labelOptions.property) {\n labelText = instance.getDataAtRowProp(row, labelOptions.property);\n }\n const label = createLabel(labelText);\n\n if (labelOptions.position === 'before') {\n label.appendChild(input);\n } else {\n label.insertBefore(input, label.firstChild);\n }\n input = label;\n }\n\n TD.appendChild(input);\n\n if (badValue) {\n TD.appendChild(document.createTextNode('#bad-value#'));\n }\n\n if (!isListeningKeyDownEvent.has(instance)) {\n isListeningKeyDownEvent.set(instance, true);\n instance.addHook('beforeKeyDown', onBeforeKeyDown);\n }\n\n /**\n * On before key down DOM listener.\n *\n * @private\n * @param {Event} event\n */\n function onBeforeKeyDown(event) {\n const toggleKeys = 'SPACE|ENTER';\n const switchOffKeys = 'DELETE|BACKSPACE';\n const isKeyCode = partial(isKey, event.keyCode);\n\n if (isKeyCode(`${toggleKeys}|${switchOffKeys}`) && !isImmediatePropagationStopped(event)) {\n eachSelectedCheckboxCell(() => {\n stopImmediatePropagation(event);\n event.preventDefault();\n });\n }\n if (isKeyCode(toggleKeys)) {\n changeSelectedCheckboxesState();\n }\n if (isKeyCode(switchOffKeys)) {\n changeSelectedCheckboxesState(true);\n }\n }\n\n /**\n * Change checkbox checked property\n *\n * @private\n * @param {Boolean} [uncheckCheckbox=false]\n */\n function changeSelectedCheckboxesState(uncheckCheckbox = false) {\n const selRange = instance.getSelectedRange();\n\n if (!selRange) {\n return;\n }\n\n const topLeft = selRange.getTopLeftCorner();\n const bottomRight = selRange.getBottomRightCorner();\n const changes = [];\n\n for (let row = topLeft.row; row <= bottomRight.row; row += 1) {\n for (let col = topLeft.col; col <= bottomRight.col; col += 1) {\n const cellProperties = instance.getCellMeta(row, col);\n\n if (cellProperties.type !== 'checkbox') {\n return;\n }\n\n /* eslint-disable no-continue */\n if (cellProperties.readOnly === true) {\n continue;\n }\n\n if (typeof cellProperties.checkedTemplate === 'undefined') {\n cellProperties.checkedTemplate = true;\n }\n if (typeof cellProperties.uncheckedTemplate === 'undefined') {\n cellProperties.uncheckedTemplate = false;\n }\n\n const dataAtCell = instance.getDataAtCell(row, col);\n\n if (uncheckCheckbox === false) {\n if (dataAtCell === cellProperties.checkedTemplate) {\n changes.push([row, col, cellProperties.uncheckedTemplate]);\n\n } else if ([cellProperties.uncheckedTemplate, null, void 0].indexOf(dataAtCell) !== -1) {\n changes.push([row, col, cellProperties.checkedTemplate]);\n }\n\n } else {\n changes.push([row, col, cellProperties.uncheckedTemplate]);\n }\n }\n }\n\n if (changes.length > 0) {\n instance.setDataAtCell(changes);\n }\n }\n\n /**\n * Call callback for each found selected cell with checkbox type.\n *\n * @private\n * @param {Function} callback\n */\n function eachSelectedCheckboxCell(callback) {\n const selRange = instance.getSelectedRange();\n\n if (!selRange) {\n return;\n }\n const topLeft = selRange.getTopLeftCorner();\n const bottomRight = selRange.getBottomRightCorner();\n\n for (let row = topLeft.row; row <= bottomRight.row; row++) {\n for (let col = topLeft.col; col <= bottomRight.col; col++) {\n let cellProperties = instance.getCellMeta(row, col);\n\n if (cellProperties.type !== 'checkbox') {\n return;\n }\n\n let cell = instance.getCell(row, col);\n\n if (cell == null) {\n\n callback(row, col, cellProperties);\n\n } else {\n let checkboxes = cell.querySelectorAll('input[type=checkbox]');\n\n if (checkboxes.length > 0 && !cellProperties.readOnly) {\n callback(checkboxes);\n }\n }\n }\n }\n }\n}\n\n/**\n * Register checkbox listeners.\n *\n * @param {Handsontable} instance Handsontable instance.\n * @returns {EventManager}\n */\nfunction registerEvents(instance) {\n let eventManager = isCheckboxListenerAdded.get(instance);\n\n if (!eventManager) {\n eventManager = new EventManager(instance);\n eventManager.addEventListener(instance.rootElement, 'click', (event) => onClick(event, instance));\n eventManager.addEventListener(instance.rootElement, 'mouseup', (event) => onMouseUp(event, instance));\n eventManager.addEventListener(instance.rootElement, 'change', (event) => onChange(event, instance));\n\n isCheckboxListenerAdded.set(instance, eventManager);\n }\n\n return eventManager;\n}\n\n/**\n * Create input element.\n *\n * @returns {Node}\n */\nfunction createInput() {\n let input = document.createElement('input');\n\n input.className = 'htCheckboxRendererInput';\n input.type = 'checkbox';\n input.setAttribute('autocomplete', 'off');\n input.setAttribute('tabindex', '-1');\n\n return input.cloneNode(false);\n}\n\n/**\n * Create label element.\n *\n * @returns {Node}\n */\nfunction createLabel(text) {\n let label = document.createElement('label');\n\n label.className = 'htCheckboxRendererLabel';\n label.appendChild(document.createTextNode(text));\n\n return label.cloneNode(true);\n}\n\n/**\n * `mouseup` callback.\n *\n * @private\n * @param {Event} event `mouseup` event.\n * @param {Object} instance Handsontable instance.\n */\nfunction onMouseUp(event, instance) {\n if (!isCheckboxInput(event.target)) {\n return;\n }\n setTimeout(instance.listen, 10);\n}\n\n/**\n * `click` callback.\n *\n * @private\n * @param {Event} event `click` event.\n * @param {Object} instance Handsontable instance.\n */\nfunction onClick(event, instance) {\n if (!isCheckboxInput(event.target)) {\n return false;\n }\n\n const row = parseInt(event.target.getAttribute('data-row'), 10);\n const col = parseInt(event.target.getAttribute('data-col'), 10);\n const cellProperties = instance.getCellMeta(row, col);\n\n if (cellProperties.readOnly) {\n event.preventDefault();\n }\n}\n\n/**\n * `change` callback.\n *\n * @param {Event} event `change` event.\n * @param {Object} instance Handsontable instance.\n * @param {Object} cellProperties Reference to cell properties.\n * @returns {Boolean}\n */\nfunction onChange(event, instance) {\n if (!isCheckboxInput(event.target)) {\n return false;\n }\n\n const row = parseInt(event.target.getAttribute('data-row'), 10);\n const col = parseInt(event.target.getAttribute('data-col'), 10);\n const cellProperties = instance.getCellMeta(row, col);\n\n if (!cellProperties.readOnly) {\n let newCheckboxValue = null;\n\n if (event.target.checked) {\n newCheckboxValue = cellProperties.uncheckedTemplate === void 0 ? true : cellProperties.checkedTemplate;\n\n } else {\n newCheckboxValue = cellProperties.uncheckedTemplate === void 0 ? false : cellProperties.uncheckedTemplate;\n }\n\n instance.setDataAtCell(row, col, newCheckboxValue);\n }\n}\n\n/**\n * Check if the provided element is the checkbox input.\n *\n * @private\n * @param {HTMLElement} element The element in question.\n * @returns {Boolean}\n */\nfunction isCheckboxInput(element) {\n return element.tagName === 'INPUT' && element.getAttribute('type') === 'checkbox';\n}\n\nregisterRenderer('checkbox', checkboxRenderer);\n\nexport default checkboxRenderer;\n\n\n\n// WEBPACK FOOTER //\n// src/renderers/checkboxRenderer.js","import {fastInnerHTML} from './../helpers/dom/element';\nimport {getRenderer, registerRenderer} from './../renderers';\n\n/**\n * @private\n * @renderer HtmlRenderer\n * @param instance\n * @param TD\n * @param row\n * @param col\n * @param prop\n * @param value\n * @param cellProperties\n */\nfunction htmlRenderer(instance, TD, row, col, prop, value, cellProperties) {\n getRenderer('base').apply(this, arguments);\n\n if (value === null || value === void 0) {\n value = '';\n }\n\n fastInnerHTML(TD, value);\n}\n\nregisterRenderer('html', htmlRenderer);\n\nexport default htmlRenderer;\n\n\n\n// WEBPACK FOOTER //\n// src/renderers/htmlRenderer.js","import numbro from 'numbro';\nimport {getRenderer, registerRenderer} from './../renderers';\nimport {isNumeric} from './../helpers/number';\n\n/**\n * Numeric cell renderer\n *\n * @private\n * @renderer NumericRenderer\n * @dependencies numbro\n * @param {Object} instance Handsontable instance\n * @param {Element} TD Table cell where to render\n * @param {Number} row\n * @param {Number} col\n * @param {String|Number} prop Row object property name\n * @param value Value to render (remember to escape unsafe HTML before inserting to DOM!)\n * @param {Object} cellProperties Cell properties (shared by cell renderer and editor)\n */\nfunction numericRenderer(instance, TD, row, col, prop, value, cellProperties) {\n if (isNumeric(value)) {\n if (typeof cellProperties.language !== 'undefined') {\n numbro.culture(cellProperties.language);\n }\n\n value = numbro(value).format(cellProperties.format || '0');\n\n const className = cellProperties.className || '';\n\n let classArr = className.length ? className.split(' ') : [];\n\n if (classArr.indexOf('htLeft') < 0 && classArr.indexOf('htCenter') < 0 &&\n classArr.indexOf('htRight') < 0 && classArr.indexOf('htJustify') < 0) {\n classArr.push('htRight');\n }\n\n if (classArr.indexOf('htNumeric') < 0) {\n classArr.push('htNumeric');\n }\n\n cellProperties.className = classArr.join(' ');\n }\n\n getRenderer('text')(instance, TD, row, col, prop, value, cellProperties);\n}\n\nregisterRenderer('numeric', numericRenderer);\n\nexport default numericRenderer;\n\n\n\n// WEBPACK FOOTER //\n// src/renderers/numericRenderer.js","import {fastInnerHTML} from './../helpers/dom/element';\nimport {getRenderer, registerRenderer} from './../renderers';\nimport {rangeEach} from './../helpers/number';\n\n/**\n * @private\n * @renderer PasswordRenderer\n * @param instance\n * @param TD\n * @param row\n * @param col\n * @param prop\n * @param value\n * @param cellProperties\n */\nfunction passwordRenderer(instance, TD, row, col, prop, value, cellProperties) {\n getRenderer('text').apply(this, arguments);\n\n value = TD.innerHTML;\n\n const hashLength = cellProperties.hashLength || value.length;\n const hashSymbol = cellProperties.hashSymbol || '*';\n\n let hash = '';\n\n rangeEach(hashLength - 1, () => {\n hash += hashSymbol;\n });\n fastInnerHTML(TD, hash);\n}\n\nregisterRenderer('password', passwordRenderer);\n\nexport default passwordRenderer;\n\n\n\n// WEBPACK FOOTER //\n// src/renderers/passwordRenderer.js","import {empty, fastInnerText} from './../helpers/dom/element';\nimport {stringify} from './../helpers/mixed';\nimport {getRenderer, registerRenderer} from './../renderers';\n\n/**\n * Default text renderer\n *\n * @private\n * @renderer TextRenderer\n * @param {Object} instance Handsontable instance\n * @param {Element} TD Table cell where to render\n * @param {Number} row\n * @param {Number} col\n * @param {String|Number} prop Row object property name\n * @param value Value to render (remember to escape unsafe HTML before inserting to DOM!)\n * @param {Object} cellProperties Cell properties (shared by cell renderer and editor)\n */\nfunction textRenderer(instance, TD, row, col, prop, value, cellProperties) {\n getRenderer('base').apply(this, arguments);\n\n if (!value && cellProperties.placeholder) {\n value = cellProperties.placeholder;\n }\n\n var escaped = stringify(value);\n\n if (!instance.getSettings().trimWhitespace) {\n escaped = escaped.replace(/ /g, String.fromCharCode(160));\n }\n\n if (cellProperties.rendererTemplate) {\n empty(TD);\n var TEMPLATE = document.createElement('TEMPLATE');\n TEMPLATE.setAttribute('bind', '{{}}');\n TEMPLATE.innerHTML = cellProperties.rendererTemplate;\n HTMLTemplateElement.decorate(TEMPLATE);\n TEMPLATE.model = instance.getSourceDataAtRow(row);\n TD.appendChild(TEMPLATE);\n\n } else {\n // this is faster than innerHTML. See: https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips\n fastInnerText(TD, escaped);\n }\n}\n\nregisterRenderer('text', textRenderer);\n\nexport default textRenderer;\n\n\n\n// WEBPACK FOOTER //\n// src/renderers/textRenderer.js","import {\n addClass,\n empty,\n fastInnerHTML,\n fastInnerText,\n getScrollbarWidth,\n hasClass,\n isChildOf,\n isInput,\n isOutsideInput,\n removeClass\n} from './helpers/dom/element';\nimport EventManager from './eventManager';\nimport {stopPropagation, isImmediatePropagationStopped, isRightClick, isLeftClick} from './helpers/dom/event';\nimport Walkontable, {CellCoords, Selection} from './3rdparty/walkontable/src';\n\n/**\n * Handsontable TableView constructor\n * @param {Object} instance\n */\nfunction TableView(instance) {\n var that = this;\n\n this.eventManager = new EventManager(instance);\n this.instance = instance;\n this.settings = instance.getSettings();\n this.selectionMouseDown = false;\n\n var originalStyle = instance.rootElement.getAttribute('style');\n\n if (originalStyle) {\n instance.rootElement.setAttribute('data-originalstyle', originalStyle); // needed to retrieve original style in jsFiddle link generator in HT examples. may be removed in future versions\n }\n\n addClass(instance.rootElement, 'handsontable');\n // instance.rootElement.addClass('handsontable');\n\n var table = document.createElement('TABLE');\n addClass(table, 'htCore');\n\n if (instance.getSettings().tableClassName) {\n addClass(table, instance.getSettings().tableClassName);\n }\n this.THEAD = document.createElement('THEAD');\n table.appendChild(this.THEAD);\n this.TBODY = document.createElement('TBODY');\n table.appendChild(this.TBODY);\n\n instance.table = table;\n\n instance.container.insertBefore(table, instance.container.firstChild);\n\n this.eventManager.addEventListener(instance.rootElement, 'mousedown', function(event) {\n this.selectionMouseDown = true;\n\n if (!that.isTextSelectionAllowed(event.target)) {\n clearTextSelection();\n event.preventDefault();\n window.focus(); // make sure that window that contains HOT is active. Important when HOT is in iframe.\n }\n });\n this.eventManager.addEventListener(instance.rootElement, 'mouseup', function(event) {\n this.selectionMouseDown = false;\n });\n this.eventManager.addEventListener(instance.rootElement, 'mousemove', function(event) {\n if (this.selectionMouseDown && !that.isTextSelectionAllowed(event.target)) {\n clearTextSelection();\n event.preventDefault();\n }\n });\n\n this.eventManager.addEventListener(document.documentElement, 'keyup', function(event) {\n if (instance.selection.isInProgress() && !event.shiftKey) {\n instance.selection.finish();\n }\n });\n\n var isMouseDown;\n this.isMouseDown = function() {\n return isMouseDown;\n };\n\n this.eventManager.addEventListener(document.documentElement, 'mouseup', function(event) {\n if (instance.selection.isInProgress() && event.which === 1) { // is left mouse button\n instance.selection.finish();\n }\n\n isMouseDown = false;\n\n if (isOutsideInput(document.activeElement)) {\n instance.unlisten();\n }\n });\n\n this.eventManager.addEventListener(document.documentElement, 'mousedown', function(event) {\n var originalTarget = event.target;\n var next = event.target;\n var eventX = event.x || event.clientX;\n var eventY = event.y || event.clientY;\n\n if (isMouseDown || !instance.rootElement) {\n return; // it must have been started in a cell\n }\n\n // immediate click on \"holder\" means click on the right side of vertical scrollbar\n if (next === instance.view.wt.wtTable.holder) {\n var scrollbarWidth = getScrollbarWidth();\n\n if (document.elementFromPoint(eventX + scrollbarWidth, eventY) !== instance.view.wt.wtTable.holder ||\n document.elementFromPoint(eventX, eventY + scrollbarWidth) !== instance.view.wt.wtTable.holder) {\n return;\n }\n } else {\n while (next !== document.documentElement) {\n if (next === null) {\n if (event.isTargetWebComponent) {\n break;\n }\n // click on something that was a row but now is detached (possibly because your click triggered a rerender)\n return;\n }\n if (next === instance.rootElement) {\n // click inside container\n return;\n }\n next = next.parentNode;\n }\n }\n\n // function did not return until here, we have an outside click!\n\n var outsideClickDeselects = typeof that.settings.outsideClickDeselects === 'function' ?\n that.settings.outsideClickDeselects(originalTarget) :\n that.settings.outsideClickDeselects;\n\n if (outsideClickDeselects) {\n instance.deselectCell();\n } else {\n instance.destroyEditor();\n }\n });\n\n this.eventManager.addEventListener(table, 'selectstart', function(event) {\n if (that.settings.fragmentSelection || isInput(event.target)) {\n return;\n }\n // https://github.com/handsontable/handsontable/issues/160\n // Prevent text from being selected when performing drag down.\n event.preventDefault();\n });\n\n var clearTextSelection = function() {\n // http://stackoverflow.com/questions/3169786/clear-text-selection-with-javascript\n if (window.getSelection) {\n if (window.getSelection().empty) { // Chrome\n window.getSelection().empty();\n } else if (window.getSelection().removeAllRanges) { // Firefox\n window.getSelection().removeAllRanges();\n }\n } else if (document.selection) { // IE?\n document.selection.empty();\n }\n };\n\n var selections = [\n new Selection({\n className: 'current',\n border: {\n width: 2,\n color: '#5292F7',\n // style: 'solid', // not used\n cornerVisible: function() {\n return that.settings.fillHandle && !that.isCellEdited() && !instance.selection.isMultiple();\n },\n multipleSelectionHandlesVisible: function() {\n return !that.isCellEdited() && !instance.selection.isMultiple();\n },\n },\n }),\n new Selection({\n className: 'area',\n border: {\n width: 1,\n color: '#89AFF9',\n // style: 'solid', // not used\n cornerVisible: function() {\n return that.settings.fillHandle && !that.isCellEdited() && instance.selection.isMultiple();\n },\n multipleSelectionHandlesVisible: function() {\n return !that.isCellEdited() && instance.selection.isMultiple();\n },\n },\n }),\n new Selection({\n className: 'highlight',\n highlightHeaderClassName: that.settings.currentHeaderClassName,\n highlightRowClassName: that.settings.currentRowClassName,\n highlightColumnClassName: that.settings.currentColClassName,\n }),\n new Selection({\n className: 'fill',\n border: {\n width: 1,\n color: 'red',\n // style: 'solid' // not used\n },\n }),\n ];\n selections.current = selections[0];\n selections.area = selections[1];\n selections.highlight = selections[2];\n selections.fill = selections[3];\n\n var walkontableConfig = {\n debug: function() {\n return that.settings.debug;\n },\n externalRowCalculator: this.instance.getPlugin('autoRowSize') && this.instance.getPlugin('autoRowSize').isEnabled(),\n table: table,\n preventOverflow: () => this.settings.preventOverflow,\n stretchH: function() {\n return that.settings.stretchH;\n },\n data: instance.getDataAtCell,\n totalRows: () => instance.countRows(),\n totalColumns: () => instance.countCols(),\n fixedColumnsLeft: function() {\n return that.settings.fixedColumnsLeft;\n },\n fixedRowsTop: function() {\n return that.settings.fixedRowsTop;\n },\n fixedRowsBottom: function() {\n return that.settings.fixedRowsBottom;\n },\n minSpareRows: function() {\n return that.settings.minSpareRows;\n },\n renderAllRows: that.settings.renderAllRows,\n rowHeaders: function() {\n let headerRenderers = [];\n\n if (instance.hasRowHeaders()) {\n headerRenderers.push(function(row, TH) {\n that.appendRowHeader(row, TH);\n });\n }\n instance.runHooks('afterGetRowHeaderRenderers', headerRenderers);\n\n return headerRenderers;\n },\n columnHeaders: function() {\n let headerRenderers = [];\n\n if (instance.hasColHeaders()) {\n headerRenderers.push(function(column, TH) {\n that.appendColHeader(column, TH);\n });\n }\n instance.runHooks('afterGetColumnHeaderRenderers', headerRenderers);\n\n return headerRenderers;\n },\n columnWidth: instance.getColWidth,\n rowHeight: instance.getRowHeight,\n cellRenderer: function(row, col, TD) {\n const cellProperties = that.instance.getCellMeta(row, col);\n const prop = that.instance.colToProp(col);\n let value = that.instance.getDataAtRowProp(row, prop);\n\n if (that.instance.hasHook('beforeValueRender')) {\n value = that.instance.runHooks('beforeValueRender', value);\n }\n\n that.instance.runHooks('beforeRenderer', TD, row, col, prop, value, cellProperties);\n that.instance.getCellRenderer(cellProperties)(that.instance, TD, row, col, prop, value, cellProperties);\n that.instance.runHooks('afterRenderer', TD, row, col, prop, value, cellProperties);\n\n },\n selections: selections,\n hideBorderOnMouseDownOver: function() {\n return that.settings.fragmentSelection;\n },\n onCellMouseDown: function(event, coords, TD, wt) {\n let blockCalculations = {\n row: false,\n column: false,\n cells: false\n };\n\n instance.listen();\n\n that.activeWt = wt;\n isMouseDown = true;\n\n instance.runHooks('beforeOnCellMouseDown', event, coords, TD, blockCalculations);\n\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n\n let actualSelection = instance.getSelectedRange();\n let selection = instance.selection;\n let selectedHeader = selection.selectedHeader;\n\n if (event.shiftKey && actualSelection) {\n if (coords.row >= 0 && coords.col >= 0 && !blockCalculations.cells) {\n selection.setSelectedHeaders(false, false);\n selection.setRangeEnd(coords);\n\n } else if ((selectedHeader.cols || selectedHeader.rows) && coords.row >= 0 && coords.col >= 0 && !blockCalculations.cells) {\n selection.setSelectedHeaders(false, false);\n selection.setRangeEnd(new CellCoords(coords.row, coords.col));\n\n } else if (selectedHeader.cols && coords.row < 0 && !blockCalculations.column) {\n selection.setRangeEnd(new CellCoords(actualSelection.to.row, coords.col));\n\n } else if (selectedHeader.rows && coords.col < 0 && !blockCalculations.row) {\n selection.setRangeEnd(new CellCoords(coords.row, actualSelection.to.col));\n\n } else if (((!selectedHeader.cols && !selectedHeader.rows && coords.col < 0) ||\n (selectedHeader.cols && coords.col < 0)) && !blockCalculations.row) {\n selection.setSelectedHeaders(true, false);\n selection.setRangeStartOnly(new CellCoords(actualSelection.from.row, 0));\n selection.setRangeEnd(new CellCoords(coords.row, instance.countCols() - 1));\n\n } else if (((!selectedHeader.cols && !selectedHeader.rows && coords.row < 0) ||\n (selectedHeader.rows && coords.row < 0)) && !blockCalculations.column) {\n selection.setSelectedHeaders(false, true);\n selection.setRangeStartOnly(new CellCoords(0, actualSelection.from.col));\n selection.setRangeEnd(new CellCoords(instance.countRows() - 1, coords.col));\n }\n } else {\n let doNewSelection = true;\n\n if (actualSelection) {\n let {from, to} = actualSelection;\n let coordsNotInSelection = !selection.inInSelection(coords);\n\n if (coords.row < 0 && selectedHeader.cols) {\n let start = Math.min(from.col, to.col);\n let end = Math.max(from.col, to.col);\n\n doNewSelection = (coords.col < start || coords.col > end);\n\n } else if (coords.col < 0 && selectedHeader.rows) {\n let start = Math.min(from.row, to.row);\n let end = Math.max(from.row, to.row);\n\n doNewSelection = (coords.row < start || coords.row > end);\n\n } else {\n doNewSelection = coordsNotInSelection;\n }\n }\n\n const rightClick = isRightClick(event);\n const leftClick = isLeftClick(event) || event.type === 'touchstart';\n\n // clicked row header and when some column was selected\n if (coords.row < 0 && coords.col >= 0 && !blockCalculations.column) {\n selection.setSelectedHeaders(false, true);\n\n if (leftClick || (rightClick && doNewSelection)) {\n selection.setRangeStartOnly(new CellCoords(0, coords.col));\n selection.setRangeEnd(new CellCoords(Math.max(instance.countRows() - 1, 0), coords.col), false);\n }\n\n // clicked column header and when some row was selected\n } else if (coords.col < 0 && coords.row >= 0 && !blockCalculations.row) {\n selection.setSelectedHeaders(true, false);\n\n if (leftClick || (rightClick && doNewSelection)) {\n selection.setRangeStartOnly(new CellCoords(coords.row, 0));\n selection.setRangeEnd(new CellCoords(coords.row, Math.max(instance.countCols() - 1, 0)), false);\n }\n\n } else if (coords.col >= 0 && coords.row >= 0 && !blockCalculations.cells) {\n if (leftClick || (rightClick && doNewSelection)) {\n selection.setSelectedHeaders(false, false);\n selection.setRangeStart(coords);\n }\n } else if (coords.col < 0 && coords.row < 0) {\n coords.row = 0;\n coords.col = 0;\n\n selection.setSelectedHeaders(false, false, true);\n selection.setRangeStart(coords);\n }\n }\n\n instance.runHooks('afterOnCellMouseDown', event, coords, TD);\n that.activeWt = that.wt;\n },\n onCellMouseOut: function(event, coords, TD, wt) {\n that.activeWt = wt;\n instance.runHooks('beforeOnCellMouseOut', event, coords, TD);\n\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n\n instance.runHooks('afterOnCellMouseOut', event, coords, TD);\n that.activeWt = that.wt;\n },\n onCellMouseOver: function(event, coords, TD, wt) {\n let blockCalculations = {\n row: false,\n column: false,\n cell: false\n };\n\n that.activeWt = wt;\n instance.runHooks('beforeOnCellMouseOver', event, coords, TD, blockCalculations);\n\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n\n if (event.button === 0 && isMouseDown) {\n if (coords.row >= 0 && coords.col >= 0) { // is not a header\n if (instance.selection.selectedHeader.cols && !blockCalculations.column) {\n instance.selection.setRangeEnd(new CellCoords(instance.countRows() - 1, coords.col), false);\n\n } else if (instance.selection.selectedHeader.rows && !blockCalculations.row) {\n instance.selection.setRangeEnd(new CellCoords(coords.row, instance.countCols() - 1), false);\n\n } else if (!blockCalculations.cell) {\n instance.selection.setRangeEnd(coords);\n }\n } else {\n /* eslint-disable no-lonely-if */\n if (instance.selection.selectedHeader.cols && !blockCalculations.column) {\n instance.selection.setRangeEnd(new CellCoords(instance.countRows() - 1, coords.col), false);\n\n } else if (instance.selection.selectedHeader.rows && !blockCalculations.row) {\n instance.selection.setRangeEnd(new CellCoords(coords.row, instance.countCols() - 1), false);\n\n } else if (!blockCalculations.cell) {\n instance.selection.setRangeEnd(coords);\n }\n }\n }\n\n instance.runHooks('afterOnCellMouseOver', event, coords, TD);\n that.activeWt = that.wt;\n },\n onCellMouseUp: function(event, coords, TD, wt) {\n that.activeWt = wt;\n instance.runHooks('beforeOnCellMouseUp', event, coords, TD);\n\n instance.runHooks('afterOnCellMouseUp', event, coords, TD);\n that.activeWt = that.wt;\n },\n onCellCornerMouseDown: function(event) {\n event.preventDefault();\n instance.runHooks('afterOnCellCornerMouseDown', event);\n },\n onCellCornerDblClick: function(event) {\n event.preventDefault();\n instance.runHooks('afterOnCellCornerDblClick', event);\n },\n beforeDraw: function(force, skipRender) {\n that.beforeRender(force, skipRender);\n },\n onDraw: function(force) {\n that.onDraw(force);\n },\n onScrollVertically: function() {\n instance.runHooks('afterScrollVertically');\n },\n onScrollHorizontally: function() {\n instance.runHooks('afterScrollHorizontally');\n },\n onBeforeDrawBorders: function(corners, borderClassName) {\n instance.runHooks('beforeDrawBorders', corners, borderClassName);\n },\n onBeforeTouchScroll: function() {\n instance.runHooks('beforeTouchScroll');\n },\n onAfterMomentumScroll: function() {\n instance.runHooks('afterMomentumScroll');\n },\n onBeforeStretchingColumnWidth: function(stretchedWidth, column) {\n return instance.runHooks('beforeStretchingColumnWidth', stretchedWidth, column);\n },\n onModifyRowHeaderWidth: function(rowHeaderWidth) {\n return instance.runHooks('modifyRowHeaderWidth', rowHeaderWidth);\n },\n viewportRowCalculatorOverride: function(calc) {\n let rows = instance.countRows();\n let viewportOffset = that.settings.viewportRowRenderingOffset;\n\n if (viewportOffset === 'auto' && that.settings.fixedRowsTop) {\n viewportOffset = 10;\n }\n if (typeof viewportOffset === 'number') {\n calc.startRow = Math.max(calc.startRow - viewportOffset, 0);\n calc.endRow = Math.min(calc.endRow + viewportOffset, rows - 1);\n }\n if (viewportOffset === 'auto') {\n let center = calc.startRow + calc.endRow - calc.startRow;\n let offset = Math.ceil(center / rows * 12);\n\n calc.startRow = Math.max(calc.startRow - offset, 0);\n calc.endRow = Math.min(calc.endRow + offset, rows - 1);\n }\n instance.runHooks('afterViewportRowCalculatorOverride', calc);\n },\n viewportColumnCalculatorOverride: function(calc) {\n let cols = instance.countCols();\n let viewportOffset = that.settings.viewportColumnRenderingOffset;\n\n if (viewportOffset === 'auto' && that.settings.fixedColumnsLeft) {\n viewportOffset = 10;\n }\n if (typeof viewportOffset === 'number') {\n calc.startColumn = Math.max(calc.startColumn - viewportOffset, 0);\n calc.endColumn = Math.min(calc.endColumn + viewportOffset, cols - 1);\n }\n if (viewportOffset === 'auto') {\n let center = calc.startColumn + calc.endColumn - calc.startColumn;\n let offset = Math.ceil(center / cols * 12);\n\n calc.startRow = Math.max(calc.startColumn - offset, 0);\n calc.endColumn = Math.min(calc.endColumn + offset, cols - 1);\n }\n instance.runHooks('afterViewportColumnCalculatorOverride', calc);\n },\n rowHeaderWidth: function() {\n return that.settings.rowHeaderWidth;\n },\n columnHeaderHeight: function() {\n const columnHeaderHeight = instance.runHooks('modifyColumnHeaderHeight');\n return that.settings.columnHeaderHeight || columnHeaderHeight;\n }\n };\n\n instance.runHooks('beforeInitWalkontable', walkontableConfig);\n\n this.wt = new Walkontable(walkontableConfig);\n this.activeWt = this.wt;\n\n this.eventManager.addEventListener(that.wt.wtTable.spreader, 'mousedown', function(event) {\n // right mouse button exactly on spreader means right click on the right hand side of vertical scrollbar\n if (event.target === that.wt.wtTable.spreader && event.which === 3) {\n stopPropagation(event);\n }\n });\n\n this.eventManager.addEventListener(that.wt.wtTable.spreader, 'contextmenu', function(event) {\n // right mouse button exactly on spreader means right click on the right hand side of vertical scrollbar\n if (event.target === that.wt.wtTable.spreader && event.which === 3) {\n stopPropagation(event);\n }\n });\n\n this.eventManager.addEventListener(document.documentElement, 'click', function() {\n if (that.settings.observeDOMVisibility) {\n if (that.wt.drawInterrupted) {\n that.instance.forceFullRender = true;\n that.render();\n }\n }\n });\n}\n\nTableView.prototype.isTextSelectionAllowed = function(el) {\n if (isInput(el)) {\n return true;\n }\n let isChildOfTableBody = isChildOf(el, this.instance.view.wt.wtTable.spreader);\n\n if (this.settings.fragmentSelection === true && isChildOfTableBody) {\n return true;\n }\n if (this.settings.fragmentSelection === 'cell' && this.isSelectedOnlyCell() && isChildOfTableBody) {\n return true;\n }\n if (!this.settings.fragmentSelection && this.isCellEdited() && this.isSelectedOnlyCell()) {\n return true;\n }\n\n return false;\n};\n\n/**\n * Check if selected only one cell.\n *\n * @returns {Boolean}\n */\nTableView.prototype.isSelectedOnlyCell = function() {\n var [row, col, rowEnd, colEnd] = this.instance.getSelected() || [];\n\n return row !== void 0 && row === rowEnd && col === colEnd;\n};\n\nTableView.prototype.isCellEdited = function() {\n var activeEditor = this.instance.getActiveEditor();\n\n return activeEditor && activeEditor.isOpened();\n};\n\nTableView.prototype.beforeRender = function(force, skipRender) {\n if (force) {\n // this.instance.forceFullRender = did Handsontable request full render?\n this.instance.runHooks('beforeRender', this.instance.forceFullRender, skipRender);\n }\n};\n\nTableView.prototype.onDraw = function(force) {\n if (force) {\n // this.instance.forceFullRender = did Handsontable request full render?\n this.instance.runHooks('afterRender', this.instance.forceFullRender);\n }\n};\n\nTableView.prototype.render = function() {\n this.wt.draw(!this.instance.forceFullRender);\n this.instance.forceFullRender = false;\n this.instance.renderCall = false;\n};\n\n/**\n * Returns td object given coordinates\n *\n * @param {CellCoords} coords\n * @param {Boolean} topmost\n */\nTableView.prototype.getCellAtCoords = function(coords, topmost) {\n var td = this.wt.getCell(coords, topmost);\n\n if (td < 0) { // there was an exit code (cell is out of bounds)\n return null;\n }\n\n return td;\n};\n\n/**\n * Scroll viewport to selection.\n *\n * @param {CellCoords} coords\n */\nTableView.prototype.scrollViewport = function(coords) {\n this.wt.scrollViewport(coords);\n};\n\n/**\n * Append row header to a TH element\n * @param row\n * @param TH\n */\nTableView.prototype.appendRowHeader = function(row, TH) {\n if (TH.firstChild) {\n let container = TH.firstChild;\n\n if (!hasClass(container, 'relative')) {\n empty(TH);\n this.appendRowHeader(row, TH);\n\n return;\n }\n this.updateCellHeader(container.querySelector('.rowHeader'), row, this.instance.getRowHeader);\n\n } else {\n let div = document.createElement('div');\n let span = document.createElement('span');\n\n div.className = 'relative';\n span.className = 'rowHeader';\n this.updateCellHeader(span, row, this.instance.getRowHeader);\n\n div.appendChild(span);\n TH.appendChild(div);\n }\n\n this.instance.runHooks('afterGetRowHeader', row, TH);\n};\n\n/**\n * Append column header to a TH element\n * @param col\n * @param TH\n */\nTableView.prototype.appendColHeader = function(col, TH) {\n if (TH.firstChild) {\n let container = TH.firstChild;\n\n if (hasClass(container, 'relative')) {\n this.updateCellHeader(container.querySelector('.colHeader'), col, this.instance.getColHeader);\n } else {\n empty(TH);\n this.appendColHeader(col, TH);\n }\n\n } else {\n var div = document.createElement('div');\n let span = document.createElement('span');\n\n div.className = 'relative';\n span.className = 'colHeader';\n this.updateCellHeader(span, col, this.instance.getColHeader);\n\n div.appendChild(span);\n TH.appendChild(div);\n }\n\n this.instance.runHooks('afterGetColHeader', col, TH);\n};\n\n/**\n * Update header cell content\n *\n * @since 0.15.0-beta4\n * @param {HTMLElement} element Element to update\n * @param {Number} index Row index or column index\n * @param {Function} content Function which should be returns content for this cell\n */\nTableView.prototype.updateCellHeader = function(element, index, content) {\n let renderedIndex = index;\n let parentOverlay = this.wt.wtOverlays.getParentOverlay(element) || this.wt;\n\n // prevent wrong calculations from SampleGenerator\n if (element.parentNode) {\n if (hasClass(element, 'colHeader')) {\n renderedIndex = parentOverlay.wtTable.columnFilter.sourceToRendered(index);\n } else if (hasClass(element, 'rowHeader')) {\n renderedIndex = parentOverlay.wtTable.rowFilter.sourceToRendered(index);\n }\n }\n\n if (renderedIndex > -1) {\n fastInnerHTML(element, content(index));\n\n } else {\n // workaround for https://github.com/handsontable/handsontable/issues/1946\n fastInnerText(element, String.fromCharCode(160));\n addClass(element, 'cornerHeader');\n }\n};\n\n/**\n * Given a element's left position relative to the viewport, returns maximum element width until the right\n * edge of the viewport (before scrollbar)\n *\n * @param {Number} leftOffset\n * @return {Number}\n */\nTableView.prototype.maximumVisibleElementWidth = function(leftOffset) {\n var workspaceWidth = this.wt.wtViewport.getWorkspaceWidth();\n var maxWidth = workspaceWidth - leftOffset;\n return maxWidth > 0 ? maxWidth : 0;\n};\n\n/**\n * Given a element's top position relative to the viewport, returns maximum element height until the bottom\n * edge of the viewport (before scrollbar)\n *\n * @param {Number} topOffset\n * @return {Number}\n */\nTableView.prototype.maximumVisibleElementHeight = function(topOffset) {\n var workspaceHeight = this.wt.wtViewport.getWorkspaceHeight();\n var maxHeight = workspaceHeight - topOffset;\n return maxHeight > 0 ? maxHeight : 0;\n};\n\nTableView.prototype.mainViewIsActive = function() {\n return this.wt === this.activeWt;\n};\n\nTableView.prototype.destroy = function() {\n this.wt.destroy();\n this.eventManager.destroy();\n};\n\nexport default TableView;\n\n\n\n// WEBPACK FOOTER //\n// src/tableView.js","/**\n * Autocomplete cell validator.\n *\n * @private\n * @validator AutocompleteValidator\n * @param {*} value - Value of edited cell\n * @param {Function} callback - Callback called with validation result\n */\nfunction AutocompleteValidator(value, callback) {\n if (value == null) {\n value = '';\n }\n\n if (this.allowEmpty && value === '') {\n callback(true);\n\n return;\n }\n\n if (this.strict && this.source) {\n if (typeof this.source === 'function') {\n this.source(value, process(value, callback));\n } else {\n process(value, callback)(this.source);\n }\n } else {\n callback(true);\n }\n};\n\nexport default AutocompleteValidator;\n\n/**\n * Function responsible for validation of autocomplete value.\n *\n * @param {*} value - Value of edited cell\n * @param {Function} callback - Callback called with validation result\n */\nfunction process(value, callback) {\n var originalVal = value;\n\n return function(source) {\n var found = false;\n\n for (var s = 0, slen = source.length; s < slen; s++) {\n if (originalVal === source[s]) {\n found = true; // perfect match\n break;\n }\n }\n\n callback(found);\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// src/validators/autocompleteValidator.js","import moment from 'moment';\nimport {getNormalizedDate} from '../helpers/date';\nimport {getEditor} from './../editors';\n\n/**\n * Date cell validator\n *\n * @private\n * @validator DateValidator\n * @dependencies moment\n * @param {*} value - Value of edited cell\n * @param {Function} callback - Callback called with validation result\n */\nfunction DateValidator(value, callback) {\n let valid = true;\n let dateEditor = getEditor('date', this.instance);\n\n if (value == null) {\n value = '';\n }\n let isValidDate = moment(new Date(value)).isValid() || moment(value, dateEditor.defaultDateFormat).isValid();\n // is it in the specified format\n let isValidFormat = moment(value, this.dateFormat || dateEditor.defaultDateFormat, true).isValid();\n\n if (this.allowEmpty && value === '') {\n isValidDate = true;\n isValidFormat = true;\n }\n if (!isValidDate) {\n valid = false;\n }\n if (!isValidDate && isValidFormat) {\n valid = true;\n }\n\n if (isValidDate && !isValidFormat) {\n if (this.correctFormat === true) { // if format correction is enabled\n let correctedValue = correctFormat(value, this.dateFormat);\n let row = this.instance.runHooks('unmodifyRow', this.row);\n let column = this.instance.runHooks('unmodifyCol', this.col);\n\n this.instance.setDataAtCell(row, column, correctedValue, 'dateValidator');\n valid = true;\n } else {\n valid = false;\n }\n }\n\n callback(valid);\n};\n\nexport default DateValidator;\n\n/**\n * Format the given string using moment.js' format feature\n *\n * @param {String} value\n * @param {String} dateFormat\n * @returns {String}\n */\nlet correctFormat = function correctFormat(value, dateFormat) {\n let dateFromDate = moment(getNormalizedDate(value));\n let dateFromMoment = moment(value, dateFormat);\n let isAlphanumeric = value.search(/[A-z]/g) > -1;\n let date;\n\n if ((dateFromDate.isValid() && dateFromDate.format('x') === dateFromMoment.format('x')) ||\n !dateFromMoment.isValid() ||\n isAlphanumeric) {\n date = dateFromDate;\n\n } else {\n date = dateFromMoment;\n }\n\n return date.format(dateFormat);\n};\n\n\n\n// WEBPACK FOOTER //\n// src/validators/dateValidator.js","/**\n * Numeric cell validator\n *\n * @private\n * @validator NumericValidator\n * @param {*} value - Value of edited cell\n * @param {*} callback - Callback called with validation result\n */\nfunction NumericValidator(value, callback) {\n if (value == null) {\n value = '';\n }\n if (this.allowEmpty && value === '') {\n callback(true);\n\n } else if (value === '') {\n callback(false);\n\n } else {\n callback(/^-?\\d*(\\.|,)?\\d*$/.test(value));\n }\n};\n\nexport default NumericValidator;\n\n\n\n// WEBPACK FOOTER //\n// src/validators/numericValidator.js","import moment from 'moment';\n\n// Formats which are correctly parsed to time (supported by momentjs)\nconst STRICT_FORMATS = [\n 'YYYY-MM-DDTHH:mm:ss.SSSZ',\n 'X', // Unix timestamp\n 'x' // Unix ms timestamp\n];\n\n/**\n * Time cell validator\n *\n * @private\n * @validator TimeValidator\n * @dependencies moment\n * @param {*} value - Value of edited cell\n * @param {Function} callback - Callback called with validation result\n */\nfunction TimeValidator(value, callback) {\n let valid = true;\n let timeFormat = this.timeFormat || 'h:mm:ss a';\n\n if (value === null) {\n value = '';\n }\n\n value = /^\\d{3,}$/.test(value) ? parseInt(value, 10) : value;\n\n let twoDigitValue = /^\\d{1,2}$/.test(value);\n\n if (twoDigitValue) {\n value += ':00';\n }\n\n let date = moment(value, STRICT_FORMATS, true).isValid() ? moment(value) : moment(value, timeFormat);\n let isValidTime = date.isValid();\n\n // is it in the specified format\n let isValidFormat = moment(value, timeFormat, true).isValid() && !twoDigitValue;\n\n if (this.allowEmpty && value === '') {\n isValidTime = true;\n isValidFormat = true;\n }\n if (!isValidTime) {\n valid = false;\n }\n if (!isValidTime && isValidFormat) {\n valid = true;\n }\n if (isValidTime && !isValidFormat) {\n if (this.correctFormat === true) { // if format correction is enabled\n let correctedValue = date.format(timeFormat);\n let row = this.instance.runHooks('unmodifyRow', this.row);\n let column = this.instance.runHooks('unmodifyCol', this.col);\n\n this.instance.setDataAtCell(row, column, correctedValue, 'timeValidator');\n valid = true;\n } else {\n valid = false;\n }\n }\n\n callback(valid);\n};\n\nexport default TimeValidator;\n\n\n\n// WEBPACK FOOTER //\n// src/validators/timeValidator.js","import EventManager from 'handsontable/eventManager';\n\ndescribe('EventManager', () => {\n it('should add/remove/clear event for multiple instances', () => {\n var instance = {\n subinstance: {}\n };\n var instance2 = {};\n var eM0 = new EventManager(instance);\n var eM1 = new EventManager(instance.subinstance);\n var eM2 = new EventManager(instance2);\n\n expect(instance.eventListeners.length).toEqual(0);\n\n var test = function() {};\n var test2 = function() {};\n\n eM0.addEventListener(window, 'click', test, true);\n eM1.addEventListener(window, 'mousedown', test);\n eM2.addEventListener(window, 'mouseup', test, false);\n eM2.addEventListener(window, 'click', test2);\n\n expect(instance.eventListeners.length).toEqual(1);\n expect(instance.subinstance.eventListeners.length).toEqual(1);\n expect(instance2.eventListeners.length).toEqual(2);\n\n eM0.removeEventListener(window, 'click', test, true);\n expect(instance.eventListeners.length).toEqual(0);\n\n eM1.removeEventListener(window);\n expect(instance.subinstance.eventListeners.length).toEqual(1);\n\n eM1.clear();\n expect(instance.subinstance.eventListeners.length).toEqual(0);\n\n eM2.clear();\n expect(instance2.eventListeners.length).toEqual(0);\n });\n\n it('should detect event when fired from hot-table (web component)', () => {\n // skip if browser not support Shadow DOM natively\n if (!document.createElement('div').createShadowRoot) {\n // Fix for \"no exceptations\" warnings\n expect(true).toBe(true);\n\n return;\n }\n EventManager.isHotTableEnv = true;\n var instance = {};\n var em = new EventManager(instance);\n var classicHost = document.createElement('div');\n var hotTable = document.createElement('hot-table');\n\n var shadowHotTable = hotTable.createShadowRoot();\n shadowHotTable.innerHTML = '<span>shadow <inner-custom><p></p></inner-custom></span>';\n\n var test1 = jasmine.createSpy('test1');\n var test2 = jasmine.createSpy('test2');\n\n em.addEventListener(classicHost, 'click', test1);\n em.addEventListener(shadowHotTable.querySelector('p'), 'click', test2);\n em.fireEvent(classicHost, 'click');\n em.fireEvent(shadowHotTable.querySelector('p'), 'click');\n em.clear();\n\n expect(test1.calls.mostRecent().args[0].isTargetWebComponent).toEqual(true);\n expect(test1.calls.count()).toEqual(1);\n expect(test2.calls.count()).toEqual(1);\n expect(test2.calls.mostRecent().args[0].target).toEqual(shadowHotTable.querySelector('p'));\n\n EventManager.isHotTableEnv = false;\n });\n\n it('should clear all events', () => {\n var instance = {};\n var em = new EventManager(instance);\n\n var test = jasmine.createSpy('test');\n var test1 = jasmine.createSpy('test1');\n\n em.addEventListener(window, 'click', test);\n em.addEventListener(window, 'click', test1);\n em.addEventListener(window, 'click', test1);\n em.fireEvent(window, 'click');\n\n expect(test.calls.count()).toEqual(1);\n expect(test1.calls.count()).toEqual(2);\n\n em.clear(window);\n em.fireEvent(window, 'click');\n\n expect(test.calls.count()).toEqual(1);\n expect(test1.calls.count()).toEqual(2);\n });\n\n it('should destroy instance', () => {\n var instance = {};\n var em = new EventManager(instance);\n\n var test = jasmine.createSpy('test');\n var test1 = jasmine.createSpy('test1');\n\n em.addEventListener(window, 'click', test);\n em.addEventListener(window, 'click', test1);\n em.addEventListener(window, 'click', test1);\n em.fireEvent(window, 'click');\n\n expect(test.calls.count()).toEqual(1);\n expect(test1.calls.count()).toEqual(2);\n\n em.destroy(window);\n em.fireEvent(window, 'click');\n\n expect(test.calls.count()).toEqual(1);\n expect(test1.calls.count()).toEqual(2);\n expect(em.context).toBe(null);\n expect(instance.eventListeners.length).toBe(0);\n });\n\n it('should fire event', () => {\n var instance = {};\n var em = new EventManager(instance);\n\n var test = jasmine.createSpy('test');\n var test1 = jasmine.createSpy('test1');\n\n em.addEventListener(window, 'click', test);\n em.addEventListener(window, 'click', test1);\n em.addEventListener(window, 'click', test1);\n em.fireEvent(window, 'click');\n\n expect(test.calls.count()).toEqual(1);\n expect(test1.calls.count()).toEqual(2);\n\n em.fireEvent(window, 'click');\n\n expect(test.calls.count()).toEqual(2);\n expect(test1.calls.count()).toEqual(4);\n\n em.clear(window, 'click');\n });\n\n it('should remove event by calling function returned from addEvent', () => {\n var instance = {};\n var em = new EventManager(instance);\n\n var test = jasmine.createSpy('test');\n\n var clickRemoveEvent = em.addEventListener(window, 'click', test);\n em.fireEvent(window, 'click');\n\n expect(test.calls.count()).toEqual(1);\n expect(instance.eventListeners.length).toEqual(1);\n\n clickRemoveEvent();\n\n expect(test.calls.count()).toEqual(1);\n expect(instance.eventListeners.length).toEqual(0);\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/EventManager.spec.js","import Hooks from 'handsontable/pluginHooks';\n\ndescribe('PluginHooks', () => {\n it('should create global empty bucket on construct', () => {\n var hooks = new Hooks();\n\n expect(hooks.globalBucket).toBeDefined();\n expect(hooks.globalBucket.afterInit).toEqual([]);\n expect(hooks.globalBucket.beforeInit).toEqual([]);\n expect(hooks.globalBucket.init).toEqual([]);\n });\n\n it('should create empty object (bucket) on createEmptyBucket call', () => {\n var hooks = new Hooks();\n var bucket = hooks.createEmptyBucket();\n\n expect(bucket.afterInit).toEqual([]);\n expect(bucket.beforeInit).toEqual([]);\n expect(bucket.init).toEqual([]);\n expect(bucket).not.toBe(hooks.createEmptyBucket());\n });\n\n it('should create and get local bucket when context is passed', () => {\n var hooks = new Hooks();\n var context = {};\n var bucket = hooks.getBucket(context);\n\n expect(context.pluginHookBucket).toBeDefined();\n expect(context.pluginHookBucket).toBe(bucket);\n });\n\n it('should get global bucket when context is empty', () => {\n var hooks = new Hooks();\n var bucket = hooks.getBucket();\n\n expect(bucket).toBe(hooks.globalBucket);\n });\n\n it('should add hooks as array', () => {\n var hooks = new Hooks();\n var fn1 = function() {};\n var fn2 = function() {};\n var fn3 = function() {};\n var context = {};\n var bucket = {};\n\n spyOn(hooks, 'getBucket').and.returnValue(bucket);\n spyOn(hooks, 'register');\n\n hooks.add('test', [fn1, fn2, fn3, fn3, fn3], context);\n\n expect(hooks.getBucket.calls.count()).toBe(5);\n expect(hooks.getBucket.calls.mostRecent()).toEqual({object: hooks, args: [{}], returnValue: bucket});\n expect(hooks.register.calls.count()).toBe(1);\n expect(hooks.register.calls.mostRecent()).toEqual({object: hooks, args: ['test'], returnValue: void 0});\n\n expect(bucket.test.length).toBe(3);\n expect(bucket.test[0]).toBe(fn1);\n expect(bucket.test[1]).toBe(fn2);\n expect(bucket.test[2]).toBe(fn3);\n });\n\n it('should add hook as function', () => {\n var hooks = new Hooks();\n var fn1 = function() {};\n var fn2 = function() {};\n var context = {};\n var bucket = {test: []};\n\n spyOn(hooks, 'getBucket').and.returnValue(bucket);\n spyOn(hooks, 'register');\n\n hooks.add('test', fn1, context);\n hooks.add('test', fn1);\n hooks.add('test', fn2, context);\n\n expect(hooks.getBucket.calls.count()).toBe(3);\n expect(hooks.getBucket.calls.argsFor(0)[0]).toBe(context);\n expect(hooks.getBucket.calls.argsFor(1)[0]).toBe(null);\n expect(hooks.getBucket.calls.argsFor(2)[0]).toBe(context);\n expect(hooks.register).not.toHaveBeenCalled();\n\n expect(bucket.test.length).toBe(2);\n expect(bucket.test[0]).toBe(fn1);\n expect(bucket.test[1]).toBe(fn2);\n });\n\n it('should add hook once as array', () => {\n var hooks = new Hooks();\n var fn1 = function() {};\n var fn2 = function() {};\n var fn3 = function() {};\n var context = {};\n var bucket = {};\n\n spyOn(hooks, 'add');\n\n hooks.once('test', [fn1, fn2, fn3, fn3, fn3], context);\n\n expect(fn1.runOnce).toBe(true);\n expect(fn2.runOnce).toBe(true);\n expect(fn3.runOnce).toBe(true);\n expect(hooks.add.calls.count()).toBe(5);\n expect(hooks.add.calls.mostRecent()).toEqual({object: hooks, args: ['test', fn3, context], returnValue: void 0});\n });\n\n it('should add hook once as function', () => {\n var hooks = new Hooks();\n var fn1 = function() {};\n var fn2 = function() {};\n var context = {};\n var bucket = {};\n\n spyOn(hooks, 'add');\n\n hooks.once('test', fn1, context);\n hooks.once('test', fn2);\n\n expect(fn1.runOnce).toBe(true);\n expect(fn2.runOnce).toBe(true);\n expect(hooks.add.calls.count()).toBe(2);\n expect(hooks.add.calls.argsFor(0)[0]).toBe('test');\n expect(hooks.add.calls.argsFor(0)[1]).toBe(fn1);\n expect(hooks.add.calls.argsFor(0)[2]).toBe(context);\n expect(hooks.add.calls.argsFor(1)[0]).toBe('test');\n expect(hooks.add.calls.argsFor(1)[1]).toBe(fn2);\n expect(hooks.add.calls.argsFor(1)[2]).toBe(null);\n });\n\n it('should remove hook', () => {\n var hooks = new Hooks();\n var fn1 = function() {};\n var fn2 = function() {};\n var fn3 = function() {};\n var context = {};\n var bucket = {test: [fn1, fn2]};\n var result;\n\n spyOn(hooks, 'getBucket').and.returnValue(bucket);\n\n result = hooks.remove('test2', fn1);\n\n expect(result).toBe(false);\n expect(bucket.test.length).toBe(2);\n\n result = hooks.remove('test', fn3);\n\n expect(result).toBe(false);\n expect(bucket.test.length).toBe(2);\n\n result = hooks.remove('test', fn1);\n\n expect(result).toBe(true);\n expect(bucket.test[0].skip).toBe(true);\n expect(bucket.test.length).toBe(2);\n });\n\n it('should run hook', () => {\n var hooks = new Hooks();\n var fn1 = jasmine.createSpy('fn1').and.returnValue('Foo');\n var fn2 = jasmine.createSpy('fn2').and.returnValue('Bar');\n var fn3 = jasmine.createSpy('fn3');\n var context = {};\n var bucket = {test: [fn1, fn2]};\n var result;\n\n hooks.globalBucket.test = [fn3];\n\n spyOn(hooks, 'getBucket').and.returnValue(bucket);\n spyOn(hooks, 'remove');\n\n result = hooks.run(context, 'test');\n\n expect(result).toBe('Bar');\n expect(hooks.getBucket).toHaveBeenCalledWith(context);\n expect(hooks.remove).not.toHaveBeenCalled();\n expect(fn1).toHaveBeenCalled();\n expect(fn2).toHaveBeenCalled();\n expect(fn3).toHaveBeenCalled();\n\n fn1.calls.reset();\n fn1.runOnce = true;\n fn2.calls.reset();\n fn3.calls.reset();\n result = hooks.run(context, 'test', 1, 2, 'AB');\n\n expect(result).toBe('Bar');\n expect(hooks.remove).toHaveBeenCalledWith('test', fn1, context);\n expect(fn1).toHaveBeenCalledWith(1, 2, 'AB', void 0, void 0, void 0);\n expect(fn2).toHaveBeenCalledWith('Foo', 2, 'AB', void 0, void 0, void 0);\n expect(fn3).toHaveBeenCalledWith(1, 2, 'AB', void 0, void 0, void 0);\n });\n\n it('should run hooks added as once', () => {\n var hooks = new Hooks();\n var fn1 = jasmine.createSpy('fn1').and.returnValue('Foo');\n var fn2 = jasmine.createSpy('fn2').and.returnValue('Bar');\n var fn3 = jasmine.createSpy('fn3');\n var context = {pluginHookBucket: {test: [fn1, fn2]}};\n var result;\n\n fn1.runOnce = true;\n fn2.runOnce = true;\n fn3.runOnce = true;\n hooks.globalBucket = {test: [fn3]};\n\n hooks.run(context, 'test');\n hooks.run(context, 'test');\n hooks.run(context, 'test');\n\n expect(fn1.calls.count()).toBe(1);\n expect(fn2.calls.count()).toBe(1);\n expect(fn3.calls.count()).toBe(1);\n });\n\n it('should destroy hooks', () => {\n var hooks = new Hooks();\n var fn1 = jasmine.createSpy('fn1').and.returnValue('Foo');\n var fn2 = jasmine.createSpy('fn2').and.returnValue('Bar');\n var fn3 = jasmine.createSpy('fn3');\n var context = {};\n var bucket = {test: [fn1, fn2, fn3], test2: [fn3]};\n\n spyOn(hooks, 'getBucket').and.returnValue(bucket);\n\n hooks.destroy(context);\n\n expect(hooks.getBucket).toHaveBeenCalledWith(context);\n expect(bucket.test.length).toBe(0);\n expect(bucket.test2.length).toBe(0);\n });\n\n it('should register hook', () => {\n var hooks = new Hooks();\n\n spyOn(hooks, 'isRegistered').and.returnValue(false);\n\n hooks.register('test');\n\n expect(hooks.isRegistered).toHaveBeenCalledWith('test');\n expect(hooks.getRegistered().indexOf('test')).toBeGreaterThan(-1);\n\n hooks.isRegistered.and.returnValue(true);\n hooks.register('test2');\n\n expect(hooks.isRegistered).toHaveBeenCalledWith('test2');\n expect(hooks.getRegistered().indexOf('test2')).toBe(-1);\n });\n\n it('should deregister hook', () => {\n var hooks = new Hooks();\n\n spyOn(hooks, 'isRegistered').and.returnValue(false);\n hooks.register('test');\n\n hooks.deregister('test');\n\n expect(hooks.isRegistered).toHaveBeenCalledWith('test');\n expect(hooks.getRegistered().indexOf('test')).toBeGreaterThan(-1);\n\n hooks.isRegistered.and.returnValue(true);\n hooks.deregister('test2');\n\n expect(hooks.isRegistered).toHaveBeenCalledWith('test2');\n expect(hooks.getRegistered().indexOf('test2')).toBe(-1);\n });\n\n it('should returns `true` if hooks is registered', () => {\n var hooks = new Hooks();\n\n hooks.register('test');\n\n expect(hooks.isRegistered('test')).toBe(true);\n expect(hooks.isRegistered('test2')).toBe(false);\n });\n\n it('should returns array of registered hooks', () => {\n var hooks = new Hooks();\n\n expect(hooks.getRegistered().length).toBeGreaterThan(0);\n });\n\n it('should returns `true` if at least one listener was added to the hook', () => {\n var hooks = new Hooks();\n var context = {};\n\n expect(hooks.has('beforeInit', context)).toBe(false);\n\n hooks.add('beforeInit', () => {}, context);\n\n expect(hooks.has('beforeInit', context)).toBe(true);\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/PluginHooks.spec.js","import {\n arrayFlatten,\n arrayAvg,\n arraySum,\n arrayMap,\n arrayMin,\n arrayMax,\n} from 'handsontable/helpers/array';\n\ndescribe('Array helper', () => {\n //\n // Handsontable.helper.arrayFlatten\n //\n describe('arrayFlatten', () => {\n it('should returns the flattened array', () => {\n expect(arrayFlatten([1])).toEqual([1]);\n expect(arrayFlatten([1, 2, 3, [4, 5, 6]])).toEqual([1, 2, 3, 4, 5, 6]);\n expect(arrayFlatten([1, [[[2]]], 3, [[4], [5], [6]]])).toEqual([1, 2, 3, 4, 5, 6]);\n });\n });\n\n //\n // Handsontable.helper.arrayAvg\n //\n describe('arrayAvg', () => {\n it('should returns the average value', () => {\n expect(arrayAvg([1])).toBe(1);\n expect(arrayAvg([1, 1, 2, 3, 4])).toBe(2.2);\n });\n });\n\n //\n // Handsontable.helper.arraySum\n //\n describe('arraySum', () => {\n it('should returns the cumulative value', () => {\n expect(arraySum([1])).toBe(1);\n expect(arraySum([1, 1, 2, 3, 4])).toBe(11);\n expect(arraySum([1, 1, 0, 3.1, 4.2])).toBe(9.3);\n });\n });\n\n //\n // Handsontable.helper.arrayMap\n //\n describe('arrayMap', () => {\n it('should returns the mapped array', () => {\n expect(arrayMap([1], (a) => a + 1)).toEqual([2]);\n expect(arrayMap([1, 2, 3], () => '')).toEqual(['', '', '']);\n });\n });\n\n //\n // Handsontable.helper.arrayMin\n //\n describe('arrayMin', () => {\n it('should returns the lowest number from an array (array of numbers)', () => {\n expect(arrayMin([])).toBeUndefined();\n expect(arrayMin([0])).toBe(0);\n expect(arrayMin([0, 0, 0, -1, 3, 2])).toBe(-1);\n });\n\n it('should returns the lowest string from an array (array of strings)', () => {\n expect(arrayMin(['b', 'a', 'A', 'z', '1'])).toBe('1');\n expect(arrayMin(['b', 'a', 'A', 'z'])).toBe('A');\n expect(arrayMin(['b', 'a', 'z'])).toBe('a');\n });\n });\n\n //\n // Handsontable.helper.arrayMax\n //\n describe('arrayMax', () => {\n it('should returns the highest number from an array (array of numbers)', () => {\n expect(arrayMax([])).toBeUndefined();\n expect(arrayMax([0])).toBe(0);\n expect(arrayMax([0, 0, 0, -1, 3, 2])).toBe(3);\n });\n\n it('should returns the highest string from an array (array of strings)', () => {\n expect(arrayMax(['b', 'a', 'A', 'z', 'Z', '1'])).toBe('z');\n expect(arrayMax(['b', 'a', 'A', 'Z', '1'])).toBe('b');\n expect(arrayMax(['a', 'A', 'Z', '1'])).toBe('a');\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/helpers/Array.spec.js","import {\n spreadsheetColumnLabel,\n spreadsheetColumnIndex,\n} from 'handsontable/helpers/data';\n\ndescribe('Data helper', () => {\n //\n // Handsontable.helper.spreadsheetColumnLabel\n //\n describe('spreadsheetColumnLabel', () => {\n it('should return valid column names based on provided column index', () => {\n expect(spreadsheetColumnLabel()).toBe('');\n expect(spreadsheetColumnLabel(0)).toBe('A');\n expect(spreadsheetColumnLabel(11)).toBe('L');\n expect(spreadsheetColumnLabel(113)).toBe('DJ');\n expect(spreadsheetColumnLabel(33439273)).toBe('BUDNIX');\n });\n });\n\n //\n // Handsontable.helper.spreadsheetColumnIndex\n //\n describe('spreadsheetColumnIndex', () => {\n it('should return valid column indexes based on provided column name', () => {\n expect(spreadsheetColumnIndex('')).toBe(-1);\n expect(spreadsheetColumnIndex('A')).toBe(0);\n expect(spreadsheetColumnIndex('L')).toBe(11);\n expect(spreadsheetColumnIndex('DJ')).toBe(113);\n expect(spreadsheetColumnIndex('BUDNIX')).toBe(33439273);\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/helpers/Data.spec.js","import {\n getNormalizedDate,\n} from 'handsontable/helpers/date';\n\ndescribe('Date helper', () => {\n describe('getNormalizedDate', () => {\n it('should return a proper date object, with time set to 00:00, when providing it with a date-only string', () => {\n var date1 = getNormalizedDate('2016-02-02');\n var date2 = getNormalizedDate('2016/02/02');\n var date3 = getNormalizedDate('02/02/2016');\n\n expect(date1.getDate()).toEqual(2);\n expect(date2.getDate()).toEqual(2);\n expect(date3.getDate()).toEqual(2);\n\n expect(date1.getMonth()).toEqual(1);\n expect(date2.getMonth()).toEqual(1);\n expect(date3.getMonth()).toEqual(1);\n\n expect(date1.getFullYear()).toEqual(2016);\n expect(date2.getFullYear()).toEqual(2016);\n expect(date3.getFullYear()).toEqual(2016);\n\n expect(date1.getFullYear()).toEqual(2016);\n expect(date2.getFullYear()).toEqual(2016);\n expect(date3.getFullYear()).toEqual(2016);\n\n expect(date1.getHours()).toEqual(0);\n expect(date2.getHours()).toEqual(0);\n expect(date3.getHours()).toEqual(0);\n\n expect(date1.getMinutes()).toEqual(0);\n expect(date2.getMinutes()).toEqual(0);\n expect(date3.getMinutes()).toEqual(0);\n });\n\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/helpers/Date.spec.js","import {\n getComparisonFunction,\n} from 'handsontable/helpers/feature';\n\ndescribe('Feature helper', () => {\n //\n // Handsontable.helper.getComparisonFunction\n //\n describe('getComparisonFunction', () => {\n it('should correct equals strings', () => {\n var comparisonFunction = getComparisonFunction();\n\n expect(comparisonFunction('a', 'b')).toBe(-1);\n expect(comparisonFunction('b', 'a')).toBe(1);\n expect(comparisonFunction('b', 'b')).toBe(0);\n // pl\n expect(comparisonFunction('a', 'ł')).toBe(-1);\n expect(comparisonFunction('ł', 'a')).toBe(1);\n expect(comparisonFunction('Ą', 'A')).toBe(1);\n expect(comparisonFunction('Ź', 'Ż')).toBe(-1);\n expect(comparisonFunction('Ż', 'Ź')).toBe(1);\n expect(comparisonFunction('ą', 'ą')).toBe(0);\n\n expect(comparisonFunction('1', '10')).toBe(-1);\n expect(comparisonFunction('10', '1')).toBe(1);\n expect(comparisonFunction('10', '10')).toBe(0);\n expect(comparisonFunction(1, 10)).toBe(-1);\n expect(comparisonFunction(10, 1)).toBe(1);\n expect(comparisonFunction(10, 10)).toBe(0);\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/helpers/Feature.spec.js","import {\n throttle,\n throttleAfterHits,\n debounce,\n pipe,\n partial,\n curry,\n curryRight,\n isFunction,\n} from 'handsontable/helpers/function';\n\ndescribe('Function helper', () => {\n //\n // Handsontable.helper.throttle\n //\n describe('throttle', () => {\n it('should returns new function with applied throttling functionality', (done) => {\n var spy = jasmine.createSpy();\n var throttled = throttle(spy, 200);\n\n throttled();\n throttled();\n throttled();\n throttled();\n throttled();\n\n expect(spy.calls.count()).toBe(1);\n\n setTimeout(() => {\n throttled();\n throttled();\n\n expect(spy.calls.count()).toBe(1);\n }, 100);\n\n setTimeout(() => {\n throttled();\n throttled();\n throttled();\n throttled();\n\n expect(spy.calls.count()).toBe(3);\n\n }, 400);\n\n setTimeout(() => {\n expect(spy.calls.count()).toBe(4);\n done();\n }, 900);\n });\n });\n\n //\n // Handsontable.helper.throttleAfterHits\n //\n describe('throttleAfterHits', () => {\n it('should returns new function with applied throttling functionality', (done) => {\n var spy = jasmine.createSpy();\n var throttled = throttleAfterHits(spy, 200, 5);\n\n throttled();\n throttled();\n throttled();\n throttled();\n throttled();\n\n expect(spy.calls.count()).toBe(5);\n\n setTimeout(() => {\n throttled();\n throttled();\n\n expect(spy.calls.count()).toBe(6);\n }, 100);\n\n setTimeout(() => {\n throttled();\n throttled();\n throttled();\n throttled();\n\n expect(spy.calls.count()).toBe(8);\n }, 400);\n\n setTimeout(() => {\n expect(spy.calls.count()).toBe(9);\n done();\n }, 900);\n });\n });\n\n //\n // Handsontable.helper.debounce\n //\n describe('debounce', () => {\n it('should returns new function with applied debouncing functionality', (done) => {\n var spy = jasmine.createSpy();\n var debounced = debounce(spy, 200);\n\n debounced();\n debounced();\n debounced();\n debounced();\n debounced();\n\n expect(spy.calls.count()).toBe(0);\n\n setTimeout(() => {\n debounced();\n debounced();\n\n expect(spy.calls.count()).toBe(0);\n }, 100);\n\n setTimeout(() => {\n debounced();\n debounced();\n debounced();\n debounced();\n\n expect(spy.calls.count()).toBe(1);\n }, 400);\n\n setTimeout(() => {\n expect(spy.calls.count()).toBe(2);\n done();\n }, 900);\n });\n });\n\n //\n // Handsontable.helper.pipe\n //\n describe('pipe', () => {\n it('should returns new function with piped all passed functions', () => {\n var spy1 = jasmine.createSpyObj('spy', ['test1', 'test2', 'test3', 'test4']);\n\n spy1.test1.and.callFake((a) => a + 1);\n spy1.test2.and.callFake((a) => a + 1);\n spy1.test3.and.callFake((a) => a + 1);\n spy1.test4.and.callFake((a) => a + 1);\n\n var piped = pipe(spy1.test1, spy1.test2, spy1.test3, spy1.test4);\n\n var result = piped(1, 2, 'foo');\n\n expect(spy1.test1).toHaveBeenCalledWith(1, 2, 'foo');\n expect(spy1.test2).toHaveBeenCalledWith(2);\n expect(spy1.test3).toHaveBeenCalledWith(3);\n expect(spy1.test4).toHaveBeenCalledWith(4);\n expect(result).toBe(5);\n });\n });\n\n //\n // Handsontable.helper.partial\n //\n describe('partial', () => {\n it('should returns new function with cached arguments', () => {\n var spy1 = jasmine.createSpyObj('spy', ['test1', 'test2', 'test3', 'test4']);\n\n spy1.test1.and.callFake((a, b, c) => (a + b) + c);\n\n var partialized = partial(spy1.test1, 1, 2);\n\n expect(partialized('foo')).toBe('3foo');\n\n partialized = partial(spy1.test1);\n\n expect(partialized(1, 2, 'foo')).toBe('3foo');\n\n partialized = partial(spy1.test1, 1, 2, 3);\n\n expect(partialized('foo')).toBe(6);\n });\n });\n\n //\n // Handsontable.helper.curry\n //\n describe('curry', () => {\n it('should returns new function with cached arguments (collecting arguments from the left to the right)', () => {\n var fn = (a, b, c) => (a + b) + c;\n\n var curried = curry(fn);\n\n expect(curried(1, 2, 'foo')).toBe('3foo');\n expect(curried(1)(2)('foo')).toBe('3foo');\n expect(curried(1, 2)(3)).toBe(6);\n });\n });\n\n //\n // Handsontable.helper.curryRight\n //\n describe('curryRight', () => {\n it('should returns new function with cached arguments (collecting arguments from the right to the left)', () => {\n var fn = (a, b, c) => (a + b) + c;\n\n var curried = curryRight(fn);\n\n expect(curried('foo', 2, 1)).toBe('3foo');\n expect(curried(1, 2, 'foo')).toBe('foo21');\n expect(curried(1)(2)('foo')).toBe('3foo');\n expect(curried(1, 2)(3)).toBe(6);\n });\n });\n\n //\n // Handsontable.helper.isFunction\n //\n describe('isFunction', () => {\n it('should correctly detect function', () => {\n var toCheck = [\n function() {},\n {id() {}},\n 1,\n 'text',\n /^\\d+$/,\n true\n ];\n\n function namedFunc() {}\n\n expect(isFunction(toCheck[0])).toBeTruthy();\n expect(isFunction(toCheck[1].id)).toBeTruthy();\n expect(isFunction(namedFunc)).toBeTruthy();\n expect(isFunction(() => {})).toBeTruthy();\n\n expect(isFunction(toCheck)).toBeFalsy();\n expect(isFunction(toCheck[1])).toBeFalsy();\n expect(isFunction(toCheck[2])).toBeFalsy();\n expect(isFunction(toCheck[3])).toBeFalsy();\n expect(isFunction(toCheck[4])).toBeFalsy();\n expect(isFunction(toCheck[5])).toBeFalsy();\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/helpers/Function.spec.js","import {\n stringify,\n isDefined,\n isUndefined,\n isEmpty,\n} from 'handsontable/helpers/mixed';\n\ndescribe('Mixed helper', () => {\n describe('stringify', () => {\n it('should convert properly `null` to `string`', () => {\n var toConvert = null;\n\n expect(stringify(toConvert)).toBe('');\n });\n\n it('should convert properly `boolean` to `string`', () => {\n var toConvert = true;\n\n expect(stringify(toConvert)).toBe('true');\n });\n\n it('should convert properly `number` to `string`', () => {\n var toConvert = 1;\n\n expect(stringify(toConvert)).toBe('1');\n });\n\n it('should convert properly `string` to `string`', () => {\n var toConvert = '2';\n\n expect(stringify(toConvert)).toBe('2');\n });\n\n it('should convert properly `object` to `string`', () => {\n var toConvert = {id: null};\n\n expect(stringify(toConvert)).toBe('[object Object]');\n });\n\n it('should convert properly `array` to `string`', () => {\n var toConvert = ['One', 'Two', 3];\n\n expect(stringify(toConvert)).toBe('One,Two,3');\n });\n\n it('should convert properly `RegExp` to `string`', () => {\n var toConvert = /^\\d$/;\n\n expect(stringify(toConvert)).toBe('/^\\\\d$/');\n });\n\n it('should convert properly `function` to `string`', () => {\n var toConvert = function() {};\n\n expect(stringify(toConvert)).toMatch(/function/i);\n });\n\n it('should convert properly `undefined` to `string`', () => {\n var toConvert;\n\n expect(stringify(toConvert)).toBe('');\n });\n });\n\n describe('isDefined', () => {\n it('should return true when a variable is defined', () => {\n var toCheck = [];\n\n expect(isDefined(toCheck)).toBeTruthy();\n });\n\n it('should return false when a variable is not defined', () => {\n var toCheck;\n\n expect(isDefined(toCheck)).toBeFalsy();\n });\n });\n\n describe('isUndefined', () => {\n it('should check if a variable is defined', () => {\n var toCheck;\n\n expect(isUndefined(toCheck)).toBeTruthy();\n });\n\n it('should return false when a variable is not defined', () => {\n var toCheck = [];\n\n expect(isUndefined(toCheck)).toBeFalsy();\n });\n });\n\n describe('isEmpty', () => {\n it('should check if a variable is null, empty string or undefined', () => {\n expect(isEmpty(undefined)).toBeTruthy();\n expect(isEmpty('')).toBeTruthy();\n expect(isEmpty(null)).toBeTruthy();\n });\n\n it('should return false when a variable isn\\'t null, empty string or undefined', () => {\n expect(isEmpty(NaN)).toBeFalsy();\n expect(isEmpty(0)).toBeFalsy();\n expect(isEmpty('a')).toBeFalsy();\n expect(isEmpty([])).toBeFalsy();\n expect(isEmpty({})).toBeFalsy();\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/helpers/Mixed.spec.js","import {\n rangeEach,\n rangeEachReverse,\n} from 'handsontable/helpers/number';\n\ndescribe('Number helper', () => {\n //\n // Handsontable.helper.rangeEach\n //\n describe('rangeEach', () => {\n it('should iterate increasingly, when `from` and `to` arguments are passed and `from` number is lower then `to`', () => {\n var spy = jasmine.createSpy();\n\n rangeEach(-1, 2, spy);\n\n expect(spy.calls.count()).toBe(4);\n expect(spy.calls.argsFor(0)).toEqual([-1]);\n expect(spy.calls.argsFor(1)).toEqual([0]);\n expect(spy.calls.argsFor(2)).toEqual([1]);\n expect(spy.calls.argsFor(3)).toEqual([2]);\n });\n\n it('should iterate only once, when `from` and `to` arguments are equal', () => {\n var spy = jasmine.createSpy();\n\n rangeEach(10, 10, spy);\n\n expect(spy.calls.count()).toBe(1);\n expect(spy.calls.argsFor(0)).toEqual([10]);\n });\n\n it('should iterate only once, when `from` and `to` arguments are equal and from value is zero', () => {\n var spy = jasmine.createSpy();\n\n rangeEach(0, spy);\n\n expect(spy.calls.count()).toBe(1);\n expect(spy.calls.argsFor(0)).toEqual([0]);\n });\n\n it('should iterate increasingly from 0, when only `from` argument is passed', () => {\n var spy = jasmine.createSpy();\n\n rangeEach(4, spy);\n\n expect(spy.calls.count()).toBe(5);\n expect(spy.calls.argsFor(0)).toEqual([0]);\n expect(spy.calls.argsFor(4)).toEqual([4]);\n });\n\n it('should not iterate decreasingly, when `from` and `to` arguments are passed and `from` number is higher then `to`', () => {\n var spy = jasmine.createSpy();\n\n rangeEach(1, -3, spy);\n\n expect(spy.calls.count()).toBe(0);\n });\n });\n\n //\n // Handsontable.helper.rangeEachReverse\n //\n describe('rangeEachReverse', () => {\n it('should iterate decreasingly, when `from` and `to` arguments are passed and `from` number is higher then `to`', () => {\n var spy = jasmine.createSpy();\n\n rangeEachReverse(2, -1, spy);\n\n expect(spy.calls.count()).toBe(4);\n expect(spy.calls.argsFor(0)).toEqual([2]);\n expect(spy.calls.argsFor(1)).toEqual([1]);\n expect(spy.calls.argsFor(2)).toEqual([0]);\n expect(spy.calls.argsFor(3)).toEqual([-1]);\n });\n\n it('should iterate only once, when `from` and `to` arguments are equal', () => {\n var spy = jasmine.createSpy();\n\n rangeEachReverse(10, 10, spy);\n\n expect(spy.calls.count()).toBe(1);\n expect(spy.calls.argsFor(0)).toEqual([10]);\n });\n\n it('should iterate only once, when `from` and `to` arguments are equal and from value is zero', () => {\n var spy = jasmine.createSpy();\n\n rangeEachReverse(0, spy);\n\n expect(spy.calls.count()).toBe(1);\n expect(spy.calls.argsFor(0)).toEqual([0]);\n });\n\n it('should iterate decreasingly to 0, when only `from` argument is passed', () => {\n var spy = jasmine.createSpy();\n\n rangeEachReverse(4, spy);\n\n expect(spy.calls.count()).toBe(5);\n expect(spy.calls.argsFor(0)).toEqual([4]);\n expect(spy.calls.argsFor(4)).toEqual([0]);\n });\n\n it('should not iterate increasingly, when `from` and `to` arguments are passed and `from` number is higher then `to`', () => {\n var spy = jasmine.createSpy();\n\n rangeEachReverse(1, 5, spy);\n\n expect(spy.calls.count()).toBe(0);\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/helpers/Number.spec.js","import {\n isObjectEquals,\n duckSchema,\n mixin,\n clone,\n deepExtend,\n deepObjectSize,\n createObjectPropListener,\n} from 'handsontable/helpers/object';\n\ndescribe('Object helper', () => {\n //\n // Handsontable.helper.isObjectEquals\n //\n describe('isObjectEquals', () => {\n it('should returns true on equal objects', () => {\n expect(isObjectEquals({}, {})).toBe(true);\n expect(isObjectEquals({test: 1}, {test: 1})).toBe(true);\n expect(isObjectEquals({test: {test2: [{}]}}, {test: {test2: [{}]}})).toBe(true);\n\n expect(isObjectEquals([], [])).toBe(true);\n expect(isObjectEquals([33], [33])).toBe(true);\n expect(isObjectEquals([{test: 1}], [{test: 1}])).toBe(true);\n });\n\n it('should returns false for not equal objects', () => {\n expect(isObjectEquals({}, [])).toBe(false);\n\n expect(isObjectEquals({test: 2}, {test: 1})).toBe(false);\n expect(isObjectEquals({test: {test3: [{}]}}, {test: {test2: [{}]}})).toBe(false);\n\n expect(isObjectEquals([12], [33])).toBe(false);\n expect(isObjectEquals([{test: 3}], [{test: 1}])).toBe(false);\n });\n });\n\n //\n // Handsontable.helper.duckSchema\n //\n describe('duckSchema', () => {\n it('should returns valid schema object', () => {\n expect(duckSchema({})).toEqual({});\n expect(duckSchema({test: 1})).toEqual({test: null});\n expect(duckSchema({test: 'foo'})).toEqual({test: null});\n expect(duckSchema({test: undefined})).toEqual({test: null});\n expect(duckSchema({test: null})).toEqual({test: null});\n expect(duckSchema({test: []})).toEqual({test: []});\n expect(duckSchema({test: [1, 2, 3]})).toEqual({test: []});\n });\n\n it('should returns valid schema object (deeply)', () => {\n expect(duckSchema({test: {a: {b: 11}}})).toEqual({test: {a: {b: null}}});\n expect(duckSchema({test: {a: {b: []}}})).toEqual({test: {a: {b: []}}});\n expect(duckSchema({test: {a: {b: [{q: 1, w: 2}]}}})).toEqual({test: {a: {b: [{q: null, w: null}]}}});\n });\n });\n\n //\n // Handsontable.helper.mixin\n //\n describe('mixin', () => {\n it('should mix base object from one object', () => {\n var Base = function() {};\n var MixinFoo = {\n local: 'value',\n myFunction() {\n return this.local;\n },\n mySetterFunction(value) {\n this.local = value;\n }\n };\n\n mixin(Base, MixinFoo);\n\n var instance = new Base();\n\n expect(instance.myFunction()).toBe('value');\n expect(instance.local).toBe('value');\n\n instance.local = 123;\n\n expect(instance.myFunction()).toBe(123);\n expect(instance.local).toBe(123);\n\n var initialObject = {a: 1};\n instance.mySetterFunction(initialObject);\n\n expect(instance.myFunction()).toBe(initialObject);\n expect(instance.local).toBe(initialObject);\n });\n\n it('should mix base object from multiple objects', () => {\n var Base = function() {};\n var MixinFoo = {\n local: 'value',\n myFunction() {\n return this.local;\n },\n mySetterFunction(value) {\n this.local = value;\n }\n };\n var MixinBar = {\n test: {zzz: 2}\n };\n var MixinBaz = {\n getTest() {\n return this.test;\n }\n };\n\n mixin(Base, MixinFoo, MixinBar, MixinBaz);\n\n var instance = new Base();\n\n expect(instance.myFunction()).toBe('value');\n expect(instance.local).toBe('value');\n expect(instance.test).not.toBe(MixinBar.test);\n expect(instance.test).toEqual(MixinBar.test);\n expect(instance.test.zzz).toBe(2);\n expect(instance.getTest()).not.toBe(MixinBar.test);\n expect(instance.getTest()).toEqual(MixinBar.test);\n });\n\n it('mixed object should not interfere with properties from another mixed objects', () => {\n var Base = function() {};\n var Base1 = function() {};\n var MixinFoo = {\n local: {},\n myFunction() {\n this.local.test = 1;\n\n return this.local.test;\n }\n };\n\n mixin(Base, MixinFoo);\n mixin(Base1, MixinFoo);\n\n var instance = new Base();\n var instance1 = new Base1();\n\n instance.myFunction();\n\n expect(instance.local.test).toEqual(1);\n expect(instance1.local.test).not.toBeDefined();\n });\n });\n\n //\n // Handsontable.helper.clone\n //\n describe('clone', () => {\n it('should returns cloned object', () => {\n var function1 = function() {};\n var object1 = {};\n var object2 = {\n foo: false,\n und: void 0,\n bar: 0,\n baz: object1,\n func: function1,\n };\n\n expect(clone(object1)).toEqual({});\n expect(clone(object1)).not.toBe(object1);\n expect(clone(object2)).toEqual(object2);\n expect(clone(object2)).not.toBe(object2);\n expect(clone(object2).baz).toBe(object2.baz);\n expect(clone(object2).func).toBe(function1);\n });\n });\n\n //\n // Handsontable.helper.deepExtend\n //\n describe('deepExtend', () => {\n it('should extend an object with all the properties of another object (recursively)', () => {\n var baseObject = {\n test: 'one',\n anotherTest: ['one, two']\n };\n var date = new Date();\n var partial = {\n prop1: 'prop1',\n prop2: 34,\n prop3: [\n 12,\n 'test',\n {\n prop: 'one'\n },\n [0, 1]\n ],\n prop4: {\n p1: 0,\n p2: [0, 1],\n p3: {\n a: 'b'\n }\n },\n prop5: date\n };\n\n deepExtend(baseObject, partial);\n\n expect(baseObject.test).toEqual('one');\n expect(baseObject.anotherTest).toEqual(['one, two']);\n expect(baseObject.prop1).toEqual('prop1');\n expect(baseObject.prop2).toEqual(34);\n expect(baseObject.prop3[0]).toEqual(12);\n expect(baseObject.prop3[1]).toEqual('test');\n expect(baseObject.prop3[2].prop).toEqual('one');\n expect(baseObject.prop3[3]).toEqual([0, 1]);\n expect(baseObject.prop4.p1).toEqual(0);\n expect(baseObject.prop4.p2).toEqual([0, 1]);\n expect(baseObject.prop4.p3.a).toEqual('b');\n expect(baseObject.prop5).toEqual(date);\n });\n });\n\n //\n // Handsontable.helper.deepObjectSize\n //\n describe('deepObjectSize', () => {\n it('should return false if a variable is not an object', () => {\n var toCount = [\n 1,\n 2,\n 3\n ];\n\n expect(deepObjectSize(toCount)).toBeFalsy();\n });\n\n it('should return an object keys length (recursively and only these keys, which contain value)', () => {\n var toCount = {\n prop1: 1,\n prop2: 2,\n prop3: {\n prop31: {\n prop311: 311,\n prop312: 312\n },\n prop32: 32,\n prop33: 33\n },\n prop4: 4,\n prop5: 5\n };\n\n expect(deepObjectSize(toCount)).toEqual(8);\n });\n });\n\n //\n // Handsontable.helper.createObjectPropListener\n //\n describe('createObjectPropListener', () => {\n it('should returns object listener and listen default property', () => {\n var propListener = createObjectPropListener('foo');\n\n expect(propListener.isTouched()).toBe(false);\n expect(propListener.value).toBe('foo');\n\n propListener.test = 'bar';\n\n expect(propListener.isTouched()).toBe(false);\n expect(propListener.value).toBe('foo');\n\n propListener.value = 'bar';\n\n expect(propListener.isTouched()).toBe(true);\n expect(propListener.value).toBe('bar');\n expect(propListener.test).toBe('bar');\n });\n\n it('should returns object listener and listen defined by user property', () => {\n var propListener = createObjectPropListener('foo', 'me');\n\n expect(propListener.isTouched()).toBe(false);\n expect(propListener.me).toBe('foo');\n\n propListener.value = 'bar';\n\n expect(propListener.isTouched()).toBe(false);\n expect(propListener.me).toBe('foo');\n expect(propListener.value).toBe('bar');\n\n propListener.me = 'bar';\n\n expect(propListener.isTouched()).toBe(true);\n expect(propListener.value).toBe('bar');\n expect(propListener.me).toBe('bar');\n });\n\n it('should detect change value to undefined', () => {\n var propListener = createObjectPropListener('foo');\n\n propListener.value = void 0;\n\n expect(propListener.isTouched()).toBe(true);\n expect(propListener.value).toBe(void 0);\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/helpers/Object.spec.js","import {\n equalsIgnoreCase,\n substitute,\n stripTags,\n} from 'handsontable/helpers/string';\n\ndescribe('String helper', () => {\n //\n // Handsontable.helper.equalsIgnoreCase\n //\n describe('equalsIgnoreCase', () => {\n it('should correct equals strings', () => {\n expect(equalsIgnoreCase()).toEqual(false);\n expect(equalsIgnoreCase('', '')).toEqual(true);\n expect(equalsIgnoreCase('True', 'TRUE', 'TrUe', true)).toEqual(true);\n expect(equalsIgnoreCase('FALSE', 'false')).toEqual(true);\n\n expect(equalsIgnoreCase('True', 'TRUE', false)).toEqual(false);\n expect(equalsIgnoreCase('fals e', false)).toEqual(false);\n });\n });\n\n //\n // Handsontable.helper.substitute\n //\n describe('substitute', () => {\n it('should properly substitute string to specified values', () => {\n var vars = {\n zero: 0,\n empty: '',\n undef: void 0,\n string1: 'foo;',\n string2: 'foo\\nbar',\n };\n\n expect(substitute('', vars)).toBe('');\n expect(substitute('[zero]', vars)).toBe('0');\n expect(substitute('[zero][zero]', vars)).toBe('00');\n expect(substitute('[empty][zero][string1]', vars)).toBe('0foo;');\n expect(substitute('BAZ [string2] test', vars)).toBe('BAZ foo\\nbar test');\n expect(substitute('1[undef]', vars)).toBe('1');\n });\n });\n\n //\n // Handsontable.helper.stripTags\n //\n describe('stripTags', () => {\n it('should strip any HTML tags from the string', () => {\n expect(stripTags('')).toBe('');\n expect(stripTags('<i>foo</i>')).toBe('foo');\n expect(stripTags('<script>alert()</script>')).toBe('alert()');\n expect(stripTags('<strong>Hello</strong> <span class=\"my\">my</span> world<sup>2</sup>')).toBe('Hello my world2');\n expect(stripTags('This is my <a href=\"https://handsontable.com\">link</a>')).toBe('This is my link');\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/helpers/String.spec.js","import {\n isKey,\n} from 'handsontable/helpers/unicode';\n\ndescribe('Unicode helper', () => {\n //\n // Handsontable.helper.isKey\n //\n describe('isKey', () => {\n it('should be defined', () => {\n expect(isKey).toBeDefined();\n });\n\n it('should return true when base code is defined individually', () => {\n expect(isKey(39, 'ARROW_RIGHT')).toBe(true);\n\n expect(isKey('39', 'ARROW_RIGHT')).toBe(false);\n expect(isKey(30, 'ARROW_RIGHT')).toBe(false);\n });\n\n it('should return true when base code is defined many times', () => {\n expect(isKey(39, 'ARROW_RIGHT|ARROW_UP|ARROW_DOWN')).toBe(true);\n expect(isKey(38, 'ARROW_RIGHT|ARROW_UP|ARROW_DOWN')).toBe(true);\n expect(isKey(40, 'ARROW_RIGHT|ARROW_UP|ARROW_DOWN')).toBe(true);\n\n expect(isKey(37, 'ARROW_RIGHT|ARROW_UP|ARROW_BOTTOM')).toBe(false);\n expect(isKey('39', 'ARROW_RIGHT|ARROW_UP|ARROW_BOTTOM')).toBe(false);\n expect(isKey(116, 'ARROW_RIGHT|ARROW_UP|ARROW_BOTTOM')).toBe(false);\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/helpers/Unicode.spec.js","import {isInput, closestDown, getParent} from 'handsontable/helpers/dom/element';\n\ndescribe('DomElement helper', () => {\n //\n // Handsontable.helper.isInput\n //\n describe('isInput', () => {\n it('should return true for inputs, selects, and textareas', () => {\n expect(isInput(document.createElement('input'))).toBe(true);\n expect(isInput(document.createElement('select'))).toBe(true);\n expect(isInput(document.createElement('textarea'))).toBe(true);\n });\n\n it('should return true for contentEditable elements', () => {\n var div = document.createElement('div');\n\n div.contentEditable = 'true';\n\n expect(isInput(div)).toBe(true);\n });\n });\n\n //\n // Handsontable.helper.closestDown\n //\n describe('closestDown', () => {\n var test1 = '<div class=\"wrapper1\"><table><tbody><tr><td class=\"test1\">test1</td></tr></tbody></table></div>';\n var test2 = `<div class=\"wrapper2\"><table><tbody><tr><td class=\"test2\">test2${test1}</td></tr></tbody></table></div>`;\n\n it('should return last TD element (starting from last child element)', () => {\n var wrapper = document.createElement('div');\n\n wrapper.innerHTML = test2;\n var td1 = wrapper.querySelector('.test1');\n var td2 = wrapper.querySelector('.test2');\n\n expect(closestDown(td1, ['TD'])).toBe(td2);\n });\n\n it('should return proper value depends on passed `until` element', () => {\n var td = document.createElement('td');\n\n td.innerHTML = test2;\n var wrapper2 = td.querySelector('.wrapper2');\n\n expect(closestDown(wrapper2, ['TD'])).toBe(td);\n expect(closestDown(wrapper2, ['TD'], wrapper2.firstChild)).toBe(null);\n });\n });\n\n //\n // Handsontable.helper.getParent\n //\n describe('getParent', () => {\n var element = null;\n\n beforeEach(() => {\n element = document.createElement('div');\n element.innerHTML = '<div id=\"a1\"><ul id=\"a2\"></ul><ul id=\"b2\"><li id=\"a3\"><span id=\"a4\">HELLO</span></li></ul></div>';\n });\n\n afterEach(() => {\n element = null;\n });\n\n it('should return the node parent only from the one level deep', () => {\n expect(getParent(element.querySelector('#a4'))).toBe(element.querySelector('#a3'));\n expect(getParent(element.querySelector('#a1'))).toBe(element);\n });\n\n it('should return the node parent from the defined level deep', () => {\n expect(getParent(element.querySelector('#a4'), 0)).toBe(element.querySelector('#a3'));\n expect(getParent(element.querySelector('#a4'), 1)).toBe(element.querySelector('#b2'));\n expect(getParent(element.querySelector('#a4'), 2)).toBe(element.querySelector('#a1'));\n expect(getParent(element.querySelector('#a4'), 3)).toBe(element);\n expect(getParent(element.querySelector('#a4'), 4)).toBe(null);\n expect(getParent(element.querySelector('#a4'), 5)).toBe(null);\n expect(getParent(element.querySelector('#a2'), 0)).toBe(element.querySelector('#a1'));\n expect(getParent(element.querySelector('#a2'), 1)).toBe(element);\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/helpers/dom/Element.spec.js","import {isLeftClick, isRightClick} from 'handsontable/helpers/dom/event';\n\ndescribe('DomEvent helper', () => {\n //\n // Handsontable.dom.isLeftClick\n //\n describe('isLeftClick', () => {\n it('should return true for valid mouse events', () => {\n expect(isLeftClick({button: 0})).toBe(true);\n });\n\n it('should return false for invalid mouse events', () => {\n expect(isLeftClick({button: '0'})).toBe(false);\n expect(isLeftClick({button: 1})).toBe(false);\n expect(isLeftClick({button: 2})).toBe(false);\n expect(isLeftClick({button: 3})).toBe(false);\n expect(isLeftClick({button: null})).toBe(false);\n expect(isLeftClick({button: void 0})).toBe(false);\n expect(isLeftClick({})).toBe(false);\n });\n });\n //\n // Handsontable.dom.isRightClick\n //\n describe('isRightClick', () => {\n it('should return true for valid mouse events', () => {\n expect(isRightClick({button: 2})).toBe(true);\n });\n\n it('should return false for invalid mouse events', () => {\n expect(isRightClick({button: '0'})).toBe(false);\n expect(isRightClick({button: 1})).toBe(false);\n expect(isRightClick({button: -2})).toBe(false);\n expect(isRightClick({button: 3})).toBe(false);\n expect(isRightClick({button: null})).toBe(false);\n expect(isRightClick({button: void 0})).toBe(false);\n expect(isRightClick({})).toBe(false);\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/helpers/dom/Event.spec.js","[\n require.context('.', true, /\\.spec\\.js$/),\n require.context('./../../src/plugins', true, /\\.unit\\.js$/),\n].forEach((req) => {\n req.keys().forEach((key) => {\n req(key);\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/index.js","import localHooks from 'handsontable/mixins/localHooks';\n\ndescribe('localHooks mixin', () => {\n it('should have empty collection on init', () => {\n expect(localHooks._localHooks).toEqual(jasmine.any(Object));\n });\n\n it('should add local hook to the hooks collection', () => {\n var callback = function() {};\n var callback1 = function() {};\n var callback2 = function() {};\n\n localHooks.addLocalHook('myHook', callback);\n localHooks.addLocalHook('myHook', callback);\n localHooks.addLocalHook('myHook', callback1);\n localHooks.addLocalHook('myHook1', callback2);\n\n expect(localHooks._localHooks.myHook.length).toBe(3);\n expect(localHooks._localHooks.myHook[0]).toBe(callback);\n expect(localHooks._localHooks.myHook[1]).toBe(callback);\n expect(localHooks._localHooks.myHook[2]).toBe(callback1);\n expect(localHooks._localHooks.myHook1.length).toBe(1);\n expect(localHooks._localHooks.myHook1[0]).toBe(callback2);\n });\n\n it('should run local hooks registered in collection', () => {\n var callback = jasmine.createSpy();\n var callback1 = jasmine.createSpy();\n var callback2 = jasmine.createSpy();\n var myArray = [1, 2];\n\n localHooks._localHooks.myHook = [callback, callback1];\n localHooks._localHooks.myHook1 = [callback, callback2];\n\n localHooks.runLocalHooks('myHook');\n localHooks.runLocalHooks('myHook1', 'foo', 'bar', myArray);\n\n expect(callback.calls.count()).toBe(2);\n expect(callback.calls.argsFor(0)).toEqual([]);\n expect(callback.calls.argsFor(1)).toEqual(['foo', 'bar', [1, 2]]);\n expect(callback).toHaveBeenCalled();\n expect(callback2).toHaveBeenCalledWith('foo', 'bar', [1, 2]);\n });\n\n it('should clear all registered hooks from collection', () => {\n var callback = jasmine.createSpy();\n var callback1 = jasmine.createSpy();\n var callback2 = jasmine.createSpy();\n\n localHooks._localHooks.myHook = [callback, callback1];\n localHooks._localHooks.myHook1 = [callback, callback2];\n\n localHooks.clearLocalHooks();\n\n expect(localHooks._localHooks).toEqual(jasmine.any(Object));\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/mixins/localHooks.spec.js","import MultiMap from 'handsontable/multiMap';\n\ndescribe('MultiMap', () => {\n\n beforeEach(function() {\n this.multiMap = new MultiMap();\n });\n\n afterEach(function() {\n delete this.multiMap;\n });\n\n it('should use string as key', function() {\n this.multiMap.set('foo', 'bar');\n\n expect(this.multiMap.get('foo')).toEqual('bar');\n });\n\n it('should use integer as key', function() {\n this.multiMap.set(1, 'bar');\n\n expect(this.multiMap.get(1)).toEqual('bar');\n });\n\n it('should use integer as key', function() {\n this.multiMap.set(1.2, 'bar');\n\n expect(this.multiMap.get(1.2)).toEqual('bar');\n expect(this.multiMap.get(1.3)).toBeUndefined();\n });\n\n it('should use plain object as key', function() {\n var keyObj1 = {};\n var keyObj2 = {};\n\n this.multiMap.set(keyObj1, 'bar');\n\n expect(this.multiMap.get(keyObj1)).toEqual('bar');\n expect(this.multiMap.get(keyObj2)).toBeUndefined();\n });\n\n it('should use array as key', function() {\n var keyArray1 = [];\n var keyArray2 = [];\n\n this.multiMap.set(keyArray1, 'bar');\n\n expect(this.multiMap.get(keyArray1)).toEqual('bar');\n expect(this.multiMap.get(keyArray2)).toBeUndefined();\n });\n\n it('should use regexp as key', function() {\n var keyRegexp1 = /test/;\n var keyRegexp2 = /test/;\n\n this.multiMap.set(keyRegexp1, 'bar');\n\n expect(this.multiMap.get(keyRegexp1)).toEqual('bar');\n expect(this.multiMap.get(keyRegexp2)).toBeUndefined();\n });\n\n it('should not use boolean as key', () => {\n var tryToSetBooleanKey = function() {\n this.multiMap.set(false, 'bar');\n };\n\n expect(tryToSetBooleanKey).toThrow();\n });\n\n it('should not set null as key', () => {\n var tryToSetNullKey = function() {\n this.multiMap.set(null, 'bar');\n };\n\n expect(tryToSetNullKey).toThrow();\n });\n\n it('should not set undefined as key', () => {\n var tryToSetUndefinedKey = function() {\n this.multiMap.set(undefined, 'bar');\n };\n\n expect(tryToSetUndefinedKey).toThrow();\n });\n\n it('should not set NaN as key', () => {\n var tryToSetNaNKey = function() {\n this.multiMap.set(NaN, 'bar');\n };\n\n expect(tryToSetNaNKey).toThrow();\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/multiMap.spec.js","import Interval from 'handsontable/utils/interval';\n\ndescribe('Interval', () => {\n\n it('should create instance of Interval object', () => {\n var i = Interval.create(() => {}, 10);\n\n expect(i instanceof Interval).toBe(true);\n });\n\n it('should create object with delay passed as number', () => {\n var i = Interval.create(() => {}, 15);\n\n expect(i.delay).toBe(15);\n });\n\n it('should create object with delay passed as a number of FPS', () => {\n var i = Interval.create(() => {}, '60fps');\n\n expect(i.delay).toBe(1000 / 60);\n });\n\n it('should create interval object which is stopped by default', (done) => {\n var spy = jasmine.createSpy();\n var i = Interval.create(spy);\n\n setTimeout(() => {\n expect(spy).not.toHaveBeenCalled();\n done();\n }, 100);\n });\n\n it('should repeatedly invoke callback function after calling `start` method', (done) => {\n var spy = jasmine.createSpy();\n var i = Interval.create(spy, 100);\n\n i.start();\n\n setTimeout(() => {\n expect(spy).not.toHaveBeenCalled();\n }, 50);\n\n setTimeout(() => {\n expect(spy.calls.count()).toBe(1);\n }, 150);\n\n setTimeout(() => {\n expect(spy.calls.count()).toBe(2);\n }, 250);\n\n setTimeout(() => {\n expect(spy.calls.count()).toBe(3);\n i.stop();\n done();\n }, 350);\n });\n\n it('should stop repeatedly invoking callback function after calling `stop` method', (done) => {\n var spy = jasmine.createSpy();\n var i = Interval.create(spy, 100);\n\n i.start();\n\n setTimeout(() => {\n expect(spy).not.toHaveBeenCalled();\n }, 50);\n\n setTimeout(() => {\n expect(spy.calls.count()).toBe(1);\n i.stop();\n }, 150);\n\n setTimeout(() => {\n expect(spy.calls.count()).toBe(1);\n i.start();\n }, 250);\n\n setTimeout(() => {\n expect(spy.calls.count()).toBe(2);\n i.stop();\n done();\n }, 400);\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/utils/Interval.spec.js","import LinkedList, {NodeStructure} from 'handsontable/utils/dataStructures/linkedList';\n/**\n * Refactored implementation of LinkedList tests by Github user Jakehp\n * (part of javascript-algorithms project - all project contributors at repository website)\n *\n * Link to repository: https://github.com/mgechev/javascript-algorithms\n */\n\ndescribe('Node', () => {\n it('should be a constructor function', () => {\n expect(typeof NodeStructure).toBe('function');\n });\n\n it('should construct properly', () => {\n var node = new NodeStructure('data');\n\n expect(node.data).toBe('data');\n expect(node.next).toBe(null);\n expect(node.prev).toBe(null);\n });\n});\n\ndescribe('Linked List', () => {\n it('should be a constructor function', () => {\n expect(typeof LinkedList).toBe('function');\n });\n\n it('should push properly', () => {\n var linkedList = new LinkedList();\n\n linkedList.push(1);\n linkedList.push(2);\n linkedList.push(3);\n linkedList.push(4);\n linkedList.push(5);\n\n expect(linkedList.first.data).toBe(1);\n expect(linkedList.first.next.data).toBe(2);\n expect(linkedList.first.next.next.data).toBe(3);\n expect(linkedList.first.next.next.next.data).toBe(4);\n expect(linkedList.first.next.next.next.next.data).toBe(5);\n expect(linkedList.last.data).toBe(5);\n });\n\n it('should pop properly', () => {\n var linkedList = new LinkedList();\n\n linkedList.push(1);\n linkedList.push(2);\n linkedList.push(3);\n linkedList.push(4);\n linkedList.push(5);\n\n expect(linkedList.pop().data).toBe(5);\n expect(linkedList.pop().data).toBe(4);\n expect(linkedList.pop().data).toBe(3);\n expect(linkedList.pop().data).toBe(2);\n expect(linkedList.pop().data).toBe(1);\n });\n\n it('should shift properly', () => {\n var linkedList = new LinkedList();\n\n linkedList.push(1);\n linkedList.push(2);\n linkedList.push(3);\n linkedList.push(4);\n linkedList.push(5);\n\n expect(linkedList.shift().data).toBe(1);\n expect(linkedList.shift().data).toBe(2);\n expect(linkedList.shift().data).toBe(3);\n expect(linkedList.shift().data).toBe(4);\n expect(linkedList.shift().data).toBe(5);\n });\n\n it('should reverse properly', () => {\n var linkedList = new LinkedList();\n\n linkedList.push(1);\n linkedList.push(2);\n linkedList.push(3);\n linkedList.push(4);\n linkedList.push(5);\n linkedList.reverse();\n\n expect(linkedList.shift().data).toBe(5);\n expect(linkedList.shift().data).toBe(4);\n expect(linkedList.shift().data).toBe(3);\n expect(linkedList.shift().data).toBe(2);\n expect(linkedList.shift().data).toBe(1);\n });\n\n it('should recursive reverse properly', () => {\n var linkedList = new LinkedList();\n\n linkedList.push(1);\n linkedList.push(2);\n linkedList.push(3);\n linkedList.push(4);\n linkedList.push(5);\n linkedList.recursiveReverse();\n\n expect(linkedList.shift().data).toBe(5);\n expect(linkedList.shift().data).toBe(4);\n expect(linkedList.shift().data).toBe(3);\n expect(linkedList.shift().data).toBe(2);\n expect(linkedList.shift().data).toBe(1);\n });\n\n it('should unshift properly', () => {\n var linkedList = new LinkedList();\n\n linkedList.push(1);\n linkedList.push(2);\n linkedList.push(3);\n linkedList.push(4);\n linkedList.push(5);\n linkedList.unshift(3);\n\n expect(linkedList.shift().data).toBe(3);\n expect(linkedList.shift().data).toBe(1);\n expect(linkedList.shift().data).toBe(2);\n expect(linkedList.shift().data).toBe(3);\n expect(linkedList.shift().data).toBe(4);\n expect(linkedList.shift().data).toBe(5);\n });\n\n it('should properly check for existing cycle', () => {\n var linkedList = new LinkedList();\n var last = new NodeStructure(2);\n var first = new NodeStructure(1);\n last.next = first;\n last.prev = first;\n first.next = last;\n first.prev = last;\n linkedList.first = first;\n linkedList.last = last;\n\n expect(linkedList.hasCycle()).toBe(true);\n });\n\n it('should properly check for non existing cycle', () => {\n var linkedList = new LinkedList();\n\n linkedList.push(1);\n linkedList.push(2);\n linkedList.push(3);\n linkedList.push(4);\n linkedList.push(5);\n\n expect(linkedList.hasCycle()).toBe(false);\n });\n\n it('should inorder properly', () => {\n var linkedList = new LinkedList();\n\n linkedList.push(1);\n linkedList.push(2);\n linkedList.push(3);\n linkedList.push(4);\n linkedList.push(5);\n\n var pushedValue = 1;\n\n function callback(node) {\n expect(node.data).toBe(pushedValue++);\n }\n\n linkedList.inorder(callback);\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/utils/dataStructures/LinkedList.spec.js","import {RecordTranslator, registerIdentity, getTranslator} from 'handsontable/utils/recordTranslator';\nimport Handsontable from 'handsontable';\n\ndescribe('RecordTranslator', () => {\n it('should translate to visual row using hook system', () => {\n var hotMock = {\n runHooks: jasmine.createSpy().and.returnValue(54),\n };\n var t = new RecordTranslator(hotMock);\n\n expect(t.toVisualRow(12)).toBe(54);\n expect(hotMock.runHooks).toHaveBeenCalledWith('unmodifyRow', 12);\n });\n\n it('should translate to visual column using hook system', () => {\n var hotMock = {\n runHooks: jasmine.createSpy().and.returnValue(54),\n };\n var t = new RecordTranslator(hotMock);\n\n expect(t.toVisualColumn(12)).toBe(54);\n expect(hotMock.runHooks).toHaveBeenCalledWith('unmodifyCol', 12);\n });\n\n it('should translate to visual coordinates (as an object)', () => {\n var t = new RecordTranslator();\n\n spyOn(t, 'toVisualRow').and.returnValue(6);\n spyOn(t, 'toVisualColumn').and.returnValue(12);\n\n expect(t.toVisual({row: 3, column: 4})).toEqual({row: 6, column: 12});\n });\n\n it('should translate to visual coordinates (as an array)', () => {\n var t = new RecordTranslator();\n\n spyOn(t, 'toVisualRow').and.returnValue(6);\n spyOn(t, 'toVisualColumn').and.returnValue(12);\n\n expect(t.toVisual(3, 4)).toEqual([6, 12]);\n });\n\n it('should translate to physical row using hook system', () => {\n var hotMock = {\n runHooks: jasmine.createSpy().and.returnValue(54),\n };\n var t = new RecordTranslator(hotMock);\n\n expect(t.toPhysicalRow(12)).toBe(54);\n expect(hotMock.runHooks).toHaveBeenCalledWith('modifyRow', 12);\n });\n\n it('should translate to physical column using hook system', () => {\n var hotMock = {\n runHooks: jasmine.createSpy().and.returnValue(54),\n };\n var t = new RecordTranslator(hotMock);\n\n expect(t.toPhysicalColumn(12)).toBe(54);\n expect(hotMock.runHooks).toHaveBeenCalledWith('modifyCol', 12);\n });\n\n it('should translate to physical coordinates (as an object)', () => {\n var t = new RecordTranslator();\n\n spyOn(t, 'toPhysicalRow').and.returnValue(6);\n spyOn(t, 'toPhysicalColumn').and.returnValue(12);\n\n expect(t.toPhysical({row: 3, column: 4})).toEqual({row: 6, column: 12});\n });\n\n it('should translate to physical coordinates (as an array)', () => {\n var t = new RecordTranslator();\n\n spyOn(t, 'toPhysicalRow').and.returnValue(6);\n spyOn(t, 'toPhysicalColumn').and.returnValue(12);\n\n expect(t.toPhysical(3, 4)).toEqual([6, 12]);\n });\n\n it('should always return the same instance of RecordTranslator for Handsontable instance', () => {\n var hot = new Handsontable(document.createElement('div'));\n\n var translator = getTranslator(hot);\n\n expect(translator === getTranslator(hot)).toBe(true);\n });\n\n it('should throw error when identifier was not registered while retrieving translator', () => {\n expect(() => {\n getTranslator({});\n }).toThrow();\n });\n\n it('should always return the same instance of RecordTranslator for custom identifier', () => {\n var hot = new Handsontable(document.createElement('div'));\n var customIdentifier = {};\n\n registerIdentity(customIdentifier, hot);\n var translator = getTranslator(customIdentifier);\n\n expect(translator === getTranslator(customIdentifier)).toBe(true);\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/utils/recordTranslator.spec.js","import SamplesGenerator from 'handsontable/utils/samplesGenerator';\n\ndescribe('SamplesGenerator', () => {\n it('should internally call `generateSamples` when calling `generateRowSamples`', () => {\n var sg = new SamplesGenerator();\n\n spyOn(sg, 'generateSamples').and.returnValue('test');\n\n var result = sg.generateRowSamples('first param', 'second param');\n\n expect(result).toBe('test');\n expect(sg.generateSamples.calls.count()).toBe(1);\n expect(sg.generateSamples.calls.argsFor(0)[0]).toBe('row');\n expect(sg.generateSamples.calls.argsFor(0)[1]).toBe('second param');\n expect(sg.generateSamples.calls.argsFor(0)[2]).toBe('first param');\n });\n\n it('should internally call `generateSamples` when calling `generateColumnSamples`', () => {\n var sg = new SamplesGenerator();\n\n spyOn(sg, 'generateSamples').and.returnValue('test');\n\n var result = sg.generateColumnSamples('first param', 'second param');\n\n expect(result).toBe('test');\n expect(sg.generateSamples.calls.count()).toBe(1);\n expect(sg.generateSamples.calls.argsFor(0)[0]).toBe('col');\n expect(sg.generateSamples.calls.argsFor(0)[1]).toBe('second param');\n expect(sg.generateSamples.calls.argsFor(0)[2]).toBe('first param');\n });\n\n it('should generate collection of Maps when range is passed as Number', () => {\n var sg = new SamplesGenerator();\n\n spyOn(sg, 'generateSample').and.callFake((type, range, index) => {\n var map = new Map();\n\n map.set(index, {type, range, index});\n\n return map;\n });\n\n var result = sg.generateSamples('row', 10, 1);\n\n expect(result instanceof Map).toBe(true);\n expect(result.size).toBe(1);\n expect(result.get(1).get(1).type).toBe('row');\n });\n\n it('should generate collection of Maps when range is passed as Object', () => {\n var sg = new SamplesGenerator();\n\n spyOn(sg, 'generateSample').and.callFake((type, range, index) => {\n var map = new Map();\n\n map.set(index, {type, range, index});\n\n return map;\n });\n\n var result = sg.generateSamples('col', 10, {from: 4, to: 12});\n\n expect(result instanceof Map).toBe(true);\n expect(result.size).toBe(9);\n expect(result.get(7).get(7).type).toBe('col');\n });\n\n it('should generate row sample', () => {\n var sg = new SamplesGenerator((row, col) => {\n var data = [\n ['AA', {id: 2}, 'C', [1, 2, 3, 4, 5], 123456789],\n ];\n\n return data[row][col];\n });\n\n spyOn(sg, 'dataFactory').and.callThrough();\n\n var result = sg.generateSample('row', {from: 0, to: 4}, 0);\n\n expect(sg.dataFactory.calls.count()).toBe(5);\n expect(sg.dataFactory.calls.mostRecent().args[0]).toBe(0);\n expect(sg.dataFactory.calls.mostRecent().args[1]).toBe(4);\n expect(result instanceof Map).toBe(true);\n expect(result.size).toBe(4);\n expect(result.get(1).strings).toEqual([{value: {id: 2 }, col: 1}, {value: 'C', col: 2}]);\n expect(result.get(2).strings).toEqual([{value: 'AA', col: 0}]);\n });\n\n it('should generate column sample', () => {\n var sg = new SamplesGenerator((row, col) => {\n var data = [\n [1, 2, 3, 44],\n ['AA', 'BB', 'C', 'D'],\n ['zz', 'xxx', 'c-c', 'vvvvv'],\n [[1], [1, 2], [1, 2], [4]],\n [{id: 1}, {id: 2}, {id: 3}, {id: 4}],\n ];\n\n return data[row][col];\n });\n\n spyOn(sg, 'dataFactory').and.callThrough();\n\n var result = sg.generateSample('col', {from: 0, to: 4}, 3);\n\n expect(sg.dataFactory.calls.count()).toBe(5);\n expect(sg.dataFactory.calls.mostRecent().args[0]).toBe(4);\n expect(sg.dataFactory.calls.mostRecent().args[1]).toBe(3);\n expect(result instanceof Map).toBe(true);\n expect(result.size).toBe(3);\n expect(result.get(1).strings).toEqual([{value: 'D', row: 1}, {value: [4], row: 3}, {value: {id: 4}, row: 4}]);\n expect(result.get(2).strings).toEqual([{value: 44, row: 0}]);\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/utils/samplesGenerator.spec.js","import mergeSort from 'handsontable/utils/sortingAlgorithms/mergeSort';\n\n/**\n * Refactored implementation of megeSort tests by Github user mgechev\n * (part of javascript-algorithms project - all project contributors at repository website)\n *\n * Link to repository: https://github.com/mgechev/javascript-algorithms\n */\n\ndescribe('mergeSort', () => {\n it('should work with sorted arrays', () => {\n expect(mergeSort([1, 2, 3, 4])).toEqual([1, 2, 3, 4]);\n });\n\n it('should work with empty array', () => {\n expect(mergeSort([])).toEqual([]);\n });\n\n it('should sort properly the array containg strings', () => {\n expect(mergeSort(['z', 'c', '', '1', 'a'])).toEqual(['', '1', 'a', 'c', 'z']);\n });\n\n it('should sort lexically the array containg numbers (by default)', () => {\n expect(mergeSort([3, 40, 100, 2000])).toEqual([100, 2000, 3, 40]);\n });\n\n it('should not change the order when such comparator is provided', () => {\n var compareFunction = function() {\n return 0;\n };\n\n expect(mergeSort([1, 2, 11, 3], compareFunction)).toEqual([1, 2, 11, 3]);\n });\n\n it('should sort the numbers in ascending order when such comparator is provided', () => {\n var compareFunction = function(a, b) {\n return a - b;\n };\n\n expect(mergeSort([1, 2, 11, 3], compareFunction)).toEqual([1, 2, 3, 11]);\n });\n\n it('should sort the numbers in descending order when such comparator is provided', () => {\n var compareFunction = function(a, b) {\n return b - a;\n };\n\n expect(mergeSort([1, 2, 11, 3], compareFunction)).toEqual([11, 3, 2, 1]);\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// test/unit/utils/sortingAlgorithms/mergeSort.spec.js","// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)\n'use strict';\nvar toObject = require('./_to-object')\n , toIndex = require('./_to-index')\n , toLength = require('./_to-length');\n\nmodule.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){\n var O = toObject(this)\n , len = toLength(O.length)\n , to = toIndex(target, len)\n , from = toIndex(start, len)\n , end = arguments.length > 2 ? arguments[2] : undefined\n , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to)\n , inc = 1;\n if(from < to && to < from + count){\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while(count-- > 0){\n if(from in O)O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_array-copy-within.js\n// module id = 416\n// module chunks = 0","// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\n'use strict';\nvar toObject = require('./_to-object')\n , toIndex = require('./_to-index')\n , toLength = require('./_to-length');\nmodule.exports = function fill(value /*, start = 0, end = @length */){\n var O = toObject(this)\n , length = toLength(O.length)\n , aLen = arguments.length\n , index = toIndex(aLen > 1 ? arguments[1] : undefined, length)\n , end = aLen > 2 ? arguments[2] : undefined\n , endPos = end === undefined ? length : toIndex(end, length);\n while(endPos > index)O[index++] = value;\n return O;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_array-fill.js\n// module id = 417\n// module chunks = 0","var isObject = require('./_is-object')\n , isArray = require('./_is-array')\n , SPECIES = require('./_wks')('species');\n\nmodule.exports = function(original){\n var C;\n if(isArray(original)){\n C = original.constructor;\n // cross-realm fallback\n if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;\n if(isObject(C)){\n C = C[SPECIES];\n if(C === null)C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_array-species-constructor.js\n// module id = 418\n// module chunks = 0","// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = require('./_array-species-constructor');\n\nmodule.exports = function(original, length){\n return new (speciesConstructor(original))(length);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_array-species-create.js\n// module id = 419\n// module chunks = 0","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys')\n , gOPS = require('./_object-gops')\n , pIE = require('./_object-pie');\nmodule.exports = function(it){\n var result = getKeys(it)\n , getSymbols = gOPS.f;\n if(getSymbols){\n var symbols = getSymbols(it)\n , isEnum = pIE.f\n , i = 0\n , key;\n while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);\n } return result;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_enum-keys.js\n// module id = 420\n// module chunks = 0","'use strict';\n// 21.2.5.3 get RegExp.prototype.flags\nvar anObject = require('./_an-object');\nmodule.exports = function(){\n var that = anObject(this)\n , result = '';\n if(that.global) result += 'g';\n if(that.ignoreCase) result += 'i';\n if(that.multiline) result += 'm';\n if(that.unicode) result += 'u';\n if(that.sticky) result += 'y';\n return result;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_flags.js\n// module id = 421\n// module chunks = 0","var isObject = require('./_is-object')\n , setPrototypeOf = require('./_set-proto').set;\nmodule.exports = function(that, target, C){\n var P, S = target.constructor;\n if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){\n setPrototypeOf(that, P);\n } return that;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_inherit-if-required.js\n// module id = 422\n// module chunks = 0","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function(fn, args, that){\n var un = that === undefined;\n switch(args.length){\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_invoke.js\n// module id = 423\n// module chunks = 0","'use strict';\nvar create = require('./_object-create')\n , descriptor = require('./_property-desc')\n , setToStringTag = require('./_set-to-string-tag')\n , IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function(){ return this; });\n\nmodule.exports = function(Constructor, NAME, next){\n Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_iter-create.js\n// module id = 424\n// module chunks = 0","var getKeys = require('./_object-keys')\n , toIObject = require('./_to-iobject');\nmodule.exports = function(object, el){\n var O = toIObject(object)\n , keys = getKeys(O)\n , length = keys.length\n , index = 0\n , key;\n while(length > index)if(O[key = keys[index++]] === el)return key;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_keyof.js\n// module id = 425\n// module chunks = 0","var global = require('./_global')\n , macrotask = require('./_task').set\n , Observer = global.MutationObserver || global.WebKitMutationObserver\n , process = global.process\n , Promise = global.Promise\n , isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function(){\n var head, last, notify;\n\n var flush = function(){\n var parent, fn;\n if(isNode && (parent = process.domain))parent.exit();\n while(head){\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch(e){\n if(head)notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if(parent)parent.enter();\n };\n\n // Node.js\n if(isNode){\n notify = function(){\n process.nextTick(flush);\n };\n // browsers with MutationObserver\n } else if(Observer){\n var toggle = true\n , node = document.createTextNode('');\n new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new\n notify = function(){\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if(Promise && Promise.resolve){\n var promise = Promise.resolve();\n notify = function(){\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function(){\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function(fn){\n var task = {fn: fn, next: undefined};\n if(last)last.next = task;\n if(!head){\n head = task;\n notify();\n } last = task;\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_microtask.js\n// module id = 426\n// module chunks = 0","var dP = require('./_object-dp')\n , anObject = require('./_an-object')\n , getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties){\n anObject(O);\n var keys = getKeys(Properties)\n , length = keys.length\n , i = 0\n , P;\n while(length > i)dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-dps.js\n// module id = 427\n// module chunks = 0","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject')\n , gOPN = require('./_object-gopn').f\n , toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function(it){\n try {\n return gOPN(it);\n } catch(e){\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it){\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-gopn-ext.js\n// module id = 428\n// module chunks = 0","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has')\n , toObject = require('./_to-object')\n , IE_PROTO = require('./_shared-key')('IE_PROTO')\n , ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function(O){\n O = toObject(O);\n if(has(O, IE_PROTO))return O[IE_PROTO];\n if(typeof O.constructor == 'function' && O instanceof O.constructor){\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-gpo.js\n// module id = 429\n// module chunks = 0","// all object keys, includes non-enumerable and symbols\nvar gOPN = require('./_object-gopn')\n , gOPS = require('./_object-gops')\n , anObject = require('./_an-object')\n , Reflect = require('./_global').Reflect;\nmodule.exports = Reflect && Reflect.ownKeys || function ownKeys(it){\n var keys = gOPN.f(anObject(it))\n , getSymbols = gOPS.f;\n return getSymbols ? keys.concat(getSymbols(it)) : keys;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_own-keys.js\n// module id = 430\n// module chunks = 0","// 7.2.9 SameValue(x, y)\nmodule.exports = Object.is || function is(x, y){\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_same-value.js\n// module id = 431\n// module chunks = 0","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object')\n , aFunction = require('./_a-function')\n , SPECIES = require('./_wks')('species');\nmodule.exports = function(O, D){\n var C = anObject(O).constructor, S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_species-constructor.js\n// module id = 432\n// module chunks = 0","var toInteger = require('./_to-integer')\n , defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function(TO_STRING){\n return function(that, pos){\n var s = String(defined(that))\n , i = toInteger(pos)\n , l = s.length\n , a, b;\n if(i < 0 || i >= l)return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_string-at.js\n// module id = 433\n// module chunks = 0","var global = require('./_global')\n , core = require('./_core')\n , LIBRARY = require('./_library')\n , wksExt = require('./_wks-ext')\n , defineProperty = require('./_object-dp').f;\nmodule.exports = function(name){\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_wks-define.js\n// module id = 434\n// module chunks = 0","var map = {\n\t\"./af\": 89,\n\t\"./af.js\": 89,\n\t\"./ar\": 96,\n\t\"./ar-dz\": 90,\n\t\"./ar-dz.js\": 90,\n\t\"./ar-kw\": 91,\n\t\"./ar-kw.js\": 91,\n\t\"./ar-ly\": 92,\n\t\"./ar-ly.js\": 92,\n\t\"./ar-ma\": 93,\n\t\"./ar-ma.js\": 93,\n\t\"./ar-sa\": 94,\n\t\"./ar-sa.js\": 94,\n\t\"./ar-tn\": 95,\n\t\"./ar-tn.js\": 95,\n\t\"./ar.js\": 96,\n\t\"./az\": 97,\n\t\"./az.js\": 97,\n\t\"./be\": 98,\n\t\"./be.js\": 98,\n\t\"./bg\": 99,\n\t\"./bg.js\": 99,\n\t\"./bn\": 100,\n\t\"./bn.js\": 100,\n\t\"./bo\": 101,\n\t\"./bo.js\": 101,\n\t\"./br\": 102,\n\t\"./br.js\": 102,\n\t\"./bs\": 103,\n\t\"./bs.js\": 103,\n\t\"./ca\": 104,\n\t\"./ca.js\": 104,\n\t\"./cs\": 105,\n\t\"./cs.js\": 105,\n\t\"./cv\": 106,\n\t\"./cv.js\": 106,\n\t\"./cy\": 107,\n\t\"./cy.js\": 107,\n\t\"./da\": 108,\n\t\"./da.js\": 108,\n\t\"./de\": 111,\n\t\"./de-at\": 109,\n\t\"./de-at.js\": 109,\n\t\"./de-ch\": 110,\n\t\"./de-ch.js\": 110,\n\t\"./de.js\": 111,\n\t\"./dv\": 112,\n\t\"./dv.js\": 112,\n\t\"./el\": 113,\n\t\"./el.js\": 113,\n\t\"./en-au\": 114,\n\t\"./en-au.js\": 114,\n\t\"./en-ca\": 115,\n\t\"./en-ca.js\": 115,\n\t\"./en-gb\": 116,\n\t\"./en-gb.js\": 116,\n\t\"./en-ie\": 117,\n\t\"./en-ie.js\": 117,\n\t\"./en-nz\": 118,\n\t\"./en-nz.js\": 118,\n\t\"./eo\": 119,\n\t\"./eo.js\": 119,\n\t\"./es\": 121,\n\t\"./es-do\": 120,\n\t\"./es-do.js\": 120,\n\t\"./es.js\": 121,\n\t\"./et\": 122,\n\t\"./et.js\": 122,\n\t\"./eu\": 123,\n\t\"./eu.js\": 123,\n\t\"./fa\": 124,\n\t\"./fa.js\": 124,\n\t\"./fi\": 125,\n\t\"./fi.js\": 125,\n\t\"./fo\": 126,\n\t\"./fo.js\": 126,\n\t\"./fr\": 129,\n\t\"./fr-ca\": 127,\n\t\"./fr-ca.js\": 127,\n\t\"./fr-ch\": 128,\n\t\"./fr-ch.js\": 128,\n\t\"./fr.js\": 129,\n\t\"./fy\": 130,\n\t\"./fy.js\": 130,\n\t\"./gd\": 131,\n\t\"./gd.js\": 131,\n\t\"./gl\": 132,\n\t\"./gl.js\": 132,\n\t\"./gom-latn\": 133,\n\t\"./gom-latn.js\": 133,\n\t\"./he\": 134,\n\t\"./he.js\": 134,\n\t\"./hi\": 135,\n\t\"./hi.js\": 135,\n\t\"./hr\": 136,\n\t\"./hr.js\": 136,\n\t\"./hu\": 137,\n\t\"./hu.js\": 137,\n\t\"./hy-am\": 138,\n\t\"./hy-am.js\": 138,\n\t\"./id\": 139,\n\t\"./id.js\": 139,\n\t\"./is\": 140,\n\t\"./is.js\": 140,\n\t\"./it\": 141,\n\t\"./it.js\": 141,\n\t\"./ja\": 142,\n\t\"./ja.js\": 142,\n\t\"./jv\": 143,\n\t\"./jv.js\": 143,\n\t\"./ka\": 144,\n\t\"./ka.js\": 144,\n\t\"./kk\": 145,\n\t\"./kk.js\": 145,\n\t\"./km\": 146,\n\t\"./km.js\": 146,\n\t\"./kn\": 147,\n\t\"./kn.js\": 147,\n\t\"./ko\": 148,\n\t\"./ko.js\": 148,\n\t\"./ky\": 149,\n\t\"./ky.js\": 149,\n\t\"./lb\": 150,\n\t\"./lb.js\": 150,\n\t\"./lo\": 151,\n\t\"./lo.js\": 151,\n\t\"./lt\": 152,\n\t\"./lt.js\": 152,\n\t\"./lv\": 153,\n\t\"./lv.js\": 153,\n\t\"./me\": 154,\n\t\"./me.js\": 154,\n\t\"./mi\": 155,\n\t\"./mi.js\": 155,\n\t\"./mk\": 156,\n\t\"./mk.js\": 156,\n\t\"./ml\": 157,\n\t\"./ml.js\": 157,\n\t\"./mr\": 158,\n\t\"./mr.js\": 158,\n\t\"./ms\": 160,\n\t\"./ms-my\": 159,\n\t\"./ms-my.js\": 159,\n\t\"./ms.js\": 160,\n\t\"./my\": 161,\n\t\"./my.js\": 161,\n\t\"./nb\": 162,\n\t\"./nb.js\": 162,\n\t\"./ne\": 163,\n\t\"./ne.js\": 163,\n\t\"./nl\": 165,\n\t\"./nl-be\": 164,\n\t\"./nl-be.js\": 164,\n\t\"./nl.js\": 165,\n\t\"./nn\": 166,\n\t\"./nn.js\": 166,\n\t\"./pa-in\": 167,\n\t\"./pa-in.js\": 167,\n\t\"./pl\": 168,\n\t\"./pl.js\": 168,\n\t\"./pt\": 170,\n\t\"./pt-br\": 169,\n\t\"./pt-br.js\": 169,\n\t\"./pt.js\": 170,\n\t\"./ro\": 171,\n\t\"./ro.js\": 171,\n\t\"./ru\": 172,\n\t\"./ru.js\": 172,\n\t\"./sd\": 173,\n\t\"./sd.js\": 173,\n\t\"./se\": 174,\n\t\"./se.js\": 174,\n\t\"./si\": 175,\n\t\"./si.js\": 175,\n\t\"./sk\": 176,\n\t\"./sk.js\": 176,\n\t\"./sl\": 177,\n\t\"./sl.js\": 177,\n\t\"./sq\": 178,\n\t\"./sq.js\": 178,\n\t\"./sr\": 180,\n\t\"./sr-cyrl\": 179,\n\t\"./sr-cyrl.js\": 179,\n\t\"./sr.js\": 180,\n\t\"./ss\": 181,\n\t\"./ss.js\": 181,\n\t\"./sv\": 182,\n\t\"./sv.js\": 182,\n\t\"./sw\": 183,\n\t\"./sw.js\": 183,\n\t\"./ta\": 184,\n\t\"./ta.js\": 184,\n\t\"./te\": 185,\n\t\"./te.js\": 185,\n\t\"./tet\": 186,\n\t\"./tet.js\": 186,\n\t\"./th\": 187,\n\t\"./th.js\": 187,\n\t\"./tl-ph\": 188,\n\t\"./tl-ph.js\": 188,\n\t\"./tlh\": 189,\n\t\"./tlh.js\": 189,\n\t\"./tr\": 190,\n\t\"./tr.js\": 190,\n\t\"./tzl\": 191,\n\t\"./tzl.js\": 191,\n\t\"./tzm\": 193,\n\t\"./tzm-latn\": 192,\n\t\"./tzm-latn.js\": 192,\n\t\"./tzm.js\": 193,\n\t\"./uk\": 194,\n\t\"./uk.js\": 194,\n\t\"./ur\": 195,\n\t\"./ur.js\": 195,\n\t\"./uz\": 197,\n\t\"./uz-latn\": 196,\n\t\"./uz-latn.js\": 196,\n\t\"./uz.js\": 197,\n\t\"./vi\": 198,\n\t\"./vi.js\": 198,\n\t\"./x-pseudo\": 199,\n\t\"./x-pseudo.js\": 199,\n\t\"./yo\": 200,\n\t\"./yo.js\": 200,\n\t\"./zh-cn\": 201,\n\t\"./zh-cn.js\": 201,\n\t\"./zh-hk\": 202,\n\t\"./zh-hk.js\": 202,\n\t\"./zh-tw\": 203,\n\t\"./zh-tw.js\": 203\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 435;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale ^\\.\\/.*$\n// module id = 435\n// module chunks = 0","/*!\n * Pikaday\n *\n * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday\n */\n\n(function (root, factory)\n{\n 'use strict';\n\n var moment;\n if (typeof exports === 'object') {\n // CommonJS module\n // Load moment.js as an optional dependency\n try { moment = require('moment'); } catch (e) {}\n module.exports = factory(moment);\n } else if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(function (req)\n {\n // Load moment.js as an optional dependency\n var id = 'moment';\n try { moment = req(id); } catch (e) {}\n return factory(moment);\n });\n } else {\n root.Pikaday = factory(root.moment);\n }\n}(this, function (moment)\n{\n 'use strict';\n\n /**\n * feature detection and helper functions\n */\n var hasMoment = typeof moment === 'function',\n\n hasEventListeners = !!window.addEventListener,\n\n document = window.document,\n\n sto = window.setTimeout,\n\n addEvent = function(el, e, callback, capture)\n {\n if (hasEventListeners) {\n el.addEventListener(e, callback, !!capture);\n } else {\n el.attachEvent('on' + e, callback);\n }\n },\n\n removeEvent = function(el, e, callback, capture)\n {\n if (hasEventListeners) {\n el.removeEventListener(e, callback, !!capture);\n } else {\n el.detachEvent('on' + e, callback);\n }\n },\n\n fireEvent = function(el, eventName, data)\n {\n var ev;\n\n if (document.createEvent) {\n ev = document.createEvent('HTMLEvents');\n ev.initEvent(eventName, true, false);\n ev = extend(ev, data);\n el.dispatchEvent(ev);\n } else if (document.createEventObject) {\n ev = document.createEventObject();\n ev = extend(ev, data);\n el.fireEvent('on' + eventName, ev);\n }\n },\n\n trim = function(str)\n {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g,'');\n },\n\n hasClass = function(el, cn)\n {\n return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') !== -1;\n },\n\n addClass = function(el, cn)\n {\n if (!hasClass(el, cn)) {\n el.className = (el.className === '') ? cn : el.className + ' ' + cn;\n }\n },\n\n removeClass = function(el, cn)\n {\n el.className = trim((' ' + el.className + ' ').replace(' ' + cn + ' ', ' '));\n },\n\n isArray = function(obj)\n {\n return (/Array/).test(Object.prototype.toString.call(obj));\n },\n\n isDate = function(obj)\n {\n return (/Date/).test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime());\n },\n\n isWeekend = function(date)\n {\n var day = date.getDay();\n return day === 0 || day === 6;\n },\n\n isLeapYear = function(year)\n {\n // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n },\n\n getDaysInMonth = function(year, month)\n {\n return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];\n },\n\n setToStartOfDay = function(date)\n {\n if (isDate(date)) date.setHours(0,0,0,0);\n },\n\n compareDates = function(a,b)\n {\n // weak date comparison (use setToStartOfDay(date) to ensure correct result)\n return a.getTime() === b.getTime();\n },\n\n extend = function(to, from, overwrite)\n {\n var prop, hasProp;\n for (prop in from) {\n hasProp = to[prop] !== undefined;\n if (hasProp && typeof from[prop] === 'object' && from[prop] !== null && from[prop].nodeName === undefined) {\n if (isDate(from[prop])) {\n if (overwrite) {\n to[prop] = new Date(from[prop].getTime());\n }\n }\n else if (isArray(from[prop])) {\n if (overwrite) {\n to[prop] = from[prop].slice(0);\n }\n } else {\n to[prop] = extend({}, from[prop], overwrite);\n }\n } else if (overwrite || !hasProp) {\n to[prop] = from[prop];\n }\n }\n return to;\n },\n\n adjustCalendar = function(calendar) {\n if (calendar.month < 0) {\n calendar.year -= Math.ceil(Math.abs(calendar.month)/12);\n calendar.month += 12;\n }\n if (calendar.month > 11) {\n calendar.year += Math.floor(Math.abs(calendar.month)/12);\n calendar.month -= 12;\n }\n return calendar;\n },\n\n /**\n * defaults and localisation\n */\n defaults = {\n\n // bind the picker to a form field\n field: null,\n\n // automatically show/hide the picker on `field` focus (default `true` if `field` is set)\n bound: undefined,\n\n // position of the datepicker, relative to the field (default to bottom & left)\n // ('bottom' & 'left' keywords are not used, 'top' & 'right' are modifier on the bottom/left position)\n position: 'bottom left',\n\n // automatically fit in the viewport even if it means repositioning from the position option\n reposition: true,\n\n // the default output format for `.toString()` and `field` value\n format: 'YYYY-MM-DD',\n\n // the initial date to view when first opened\n defaultDate: null,\n\n // make the `defaultDate` the initial selected value\n setDefaultDate: false,\n\n // first day of week (0: Sunday, 1: Monday etc)\n firstDay: 0,\n\n // the default flag for moment's strict date parsing\n formatStrict: false,\n\n // the minimum/earliest date that can be selected\n minDate: null,\n // the maximum/latest date that can be selected\n maxDate: null,\n\n // number of years either side, or array of upper/lower range\n yearRange: 10,\n\n // show week numbers at head of row\n showWeekNumber: false,\n\n // used internally (don't config outside)\n minYear: 0,\n maxYear: 9999,\n minMonth: undefined,\n maxMonth: undefined,\n\n startRange: null,\n endRange: null,\n\n isRTL: false,\n\n // Additional text to append to the year in the calendar title\n yearSuffix: '',\n\n // Render the month after year in the calendar title\n showMonthAfterYear: false,\n\n // Render days of the calendar grid that fall in the next or previous month\n showDaysInNextAndPreviousMonths: false,\n\n // how many months are visible\n numberOfMonths: 1,\n\n // when numberOfMonths is used, this will help you to choose where the main calendar will be (default `left`, can be set to `right`)\n // only used for the first display or when a selected date is not visible\n mainCalendar: 'left',\n\n // Specify a DOM element to render the calendar in\n container: undefined,\n\n // internationalization\n i18n: {\n previousMonth : 'Previous Month',\n nextMonth : 'Next Month',\n months : ['January','February','March','April','May','June','July','August','September','October','November','December'],\n weekdays : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],\n weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']\n },\n\n // Theme Classname\n theme: null,\n\n // callback function\n onSelect: null,\n onOpen: null,\n onClose: null,\n onDraw: null\n },\n\n\n /**\n * templating functions to abstract HTML rendering\n */\n renderDayName = function(opts, day, abbr)\n {\n day += opts.firstDay;\n while (day >= 7) {\n day -= 7;\n }\n return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day];\n },\n\n renderDay = function(opts)\n {\n var arr = [];\n var ariaSelected = 'false';\n if (opts.isEmpty) {\n if (opts.showDaysInNextAndPreviousMonths) {\n arr.push('is-outside-current-month');\n } else {\n return '<td class=\"is-empty\"></td>';\n }\n }\n if (opts.isDisabled) {\n arr.push('is-disabled');\n }\n if (opts.isToday) {\n arr.push('is-today');\n }\n if (opts.isSelected) {\n arr.push('is-selected');\n ariaSelected = 'true';\n }\n if (opts.isInRange) {\n arr.push('is-inrange');\n }\n if (opts.isStartRange) {\n arr.push('is-startrange');\n }\n if (opts.isEndRange) {\n arr.push('is-endrange');\n }\n return '<td data-day=\"' + opts.day + '\" class=\"' + arr.join(' ') + '\" aria-selected=\"' + ariaSelected + '\">' +\n '<button class=\"pika-button pika-day\" type=\"button\" ' +\n 'data-pika-year=\"' + opts.year + '\" data-pika-month=\"' + opts.month + '\" data-pika-day=\"' + opts.day + '\">' +\n opts.day +\n '</button>' +\n '</td>';\n },\n\n renderWeek = function (d, m, y) {\n // Lifted from http://javascript.about.com/library/blweekyear.htm, lightly modified.\n var onejan = new Date(y, 0, 1),\n weekNum = Math.ceil((((new Date(y, m, d) - onejan) / 86400000) + onejan.getDay()+1)/7);\n return '<td class=\"pika-week\">' + weekNum + '</td>';\n },\n\n renderRow = function(days, isRTL)\n {\n return '<tr>' + (isRTL ? days.reverse() : days).join('') + '</tr>';\n },\n\n renderBody = function(rows)\n {\n return '<tbody>' + rows.join('') + '</tbody>';\n },\n\n renderHead = function(opts)\n {\n var i, arr = [];\n if (opts.showWeekNumber) {\n arr.push('<th></th>');\n }\n for (i = 0; i < 7; i++) {\n arr.push('<th scope=\"col\"><abbr title=\"' + renderDayName(opts, i) + '\">' + renderDayName(opts, i, true) + '</abbr></th>');\n }\n return '<thead><tr>' + (opts.isRTL ? arr.reverse() : arr).join('') + '</tr></thead>';\n },\n\n renderTitle = function(instance, c, year, month, refYear, randId)\n {\n var i, j, arr,\n opts = instance._o,\n isMinYear = year === opts.minYear,\n isMaxYear = year === opts.maxYear,\n html = '<div id=\"' + randId + '\" class=\"pika-title\" role=\"heading\" aria-live=\"assertive\">',\n monthHtml,\n yearHtml,\n prev = true,\n next = true;\n\n for (arr = [], i = 0; i < 12; i++) {\n arr.push('<option value=\"' + (year === refYear ? i - c : 12 + i - c) + '\"' +\n (i === month ? ' selected=\"selected\"': '') +\n ((isMinYear && i < opts.minMonth) || (isMaxYear && i > opts.maxMonth) ? 'disabled=\"disabled\"' : '') + '>' +\n opts.i18n.months[i] + '</option>');\n }\n\n monthHtml = '<div class=\"pika-label\">' + opts.i18n.months[month] + '<select class=\"pika-select pika-select-month\" tabindex=\"-1\">' + arr.join('') + '</select></div>';\n\n if (isArray(opts.yearRange)) {\n i = opts.yearRange[0];\n j = opts.yearRange[1] + 1;\n } else {\n i = year - opts.yearRange;\n j = 1 + year + opts.yearRange;\n }\n\n for (arr = []; i < j && i <= opts.maxYear; i++) {\n if (i >= opts.minYear) {\n arr.push('<option value=\"' + i + '\"' + (i === year ? ' selected=\"selected\"': '') + '>' + (i) + '</option>');\n }\n }\n yearHtml = '<div class=\"pika-label\">' + year + opts.yearSuffix + '<select class=\"pika-select pika-select-year\" tabindex=\"-1\">' + arr.join('') + '</select></div>';\n\n if (opts.showMonthAfterYear) {\n html += yearHtml + monthHtml;\n } else {\n html += monthHtml + yearHtml;\n }\n\n if (isMinYear && (month === 0 || opts.minMonth >= month)) {\n prev = false;\n }\n\n if (isMaxYear && (month === 11 || opts.maxMonth <= month)) {\n next = false;\n }\n\n if (c === 0) {\n html += '<button class=\"pika-prev' + (prev ? '' : ' is-disabled') + '\" type=\"button\">' + opts.i18n.previousMonth + '</button>';\n }\n if (c === (instance._o.numberOfMonths - 1) ) {\n html += '<button class=\"pika-next' + (next ? '' : ' is-disabled') + '\" type=\"button\">' + opts.i18n.nextMonth + '</button>';\n }\n\n return html += '</div>';\n },\n\n renderTable = function(opts, data, randId)\n {\n return '<table cellpadding=\"0\" cellspacing=\"0\" class=\"pika-table\" role=\"grid\" aria-labelledby=\"' + randId + '\">' + renderHead(opts) + renderBody(data) + '</table>';\n },\n\n\n /**\n * Pikaday constructor\n */\n Pikaday = function(options)\n {\n var self = this,\n opts = self.config(options);\n\n self._onMouseDown = function(e)\n {\n if (!self._v) {\n return;\n }\n e = e || window.event;\n var target = e.target || e.srcElement;\n if (!target) {\n return;\n }\n\n if (!hasClass(target, 'is-disabled')) {\n if (hasClass(target, 'pika-button') && !hasClass(target, 'is-empty') && !hasClass(target.parentNode, 'is-disabled')) {\n self.setDate(new Date(target.getAttribute('data-pika-year'), target.getAttribute('data-pika-month'), target.getAttribute('data-pika-day')));\n if (opts.bound) {\n sto(function() {\n self.hide();\n if (opts.field) {\n opts.field.blur();\n }\n }, 100);\n }\n }\n else if (hasClass(target, 'pika-prev')) {\n self.prevMonth();\n }\n else if (hasClass(target, 'pika-next')) {\n self.nextMonth();\n }\n }\n if (!hasClass(target, 'pika-select')) {\n // if this is touch event prevent mouse events emulation\n if (e.preventDefault) {\n e.preventDefault();\n } else {\n e.returnValue = false;\n return false;\n }\n } else {\n self._c = true;\n }\n };\n\n self._onChange = function(e)\n {\n e = e || window.event;\n var target = e.target || e.srcElement;\n if (!target) {\n return;\n }\n if (hasClass(target, 'pika-select-month')) {\n self.gotoMonth(target.value);\n }\n else if (hasClass(target, 'pika-select-year')) {\n self.gotoYear(target.value);\n }\n };\n\n self._onKeyChange = function(e)\n {\n e = e || window.event;\n\n if (self.isVisible()) {\n\n switch(e.keyCode){\n case 13:\n case 27:\n opts.field.blur();\n break;\n case 37:\n e.preventDefault();\n self.adjustDate('subtract', 1);\n break;\n case 38:\n self.adjustDate('subtract', 7);\n break;\n case 39:\n self.adjustDate('add', 1);\n break;\n case 40:\n self.adjustDate('add', 7);\n break;\n }\n }\n };\n\n self._onInputChange = function(e)\n {\n var date;\n\n if (e.firedBy === self) {\n return;\n }\n if (hasMoment) {\n date = moment(opts.field.value, opts.format, opts.formatStrict);\n date = (date && date.isValid()) ? date.toDate() : null;\n }\n else {\n date = new Date(Date.parse(opts.field.value));\n }\n if (isDate(date)) {\n self.setDate(date);\n }\n if (!self._v) {\n self.show();\n }\n };\n\n self._onInputFocus = function()\n {\n self.show();\n };\n\n self._onInputClick = function()\n {\n self.show();\n };\n\n self._onInputBlur = function()\n {\n // IE allows pika div to gain focus; catch blur the input field\n var pEl = document.activeElement;\n do {\n if (hasClass(pEl, 'pika-single')) {\n return;\n }\n }\n while ((pEl = pEl.parentNode));\n\n if (!self._c) {\n self._b = sto(function() {\n self.hide();\n }, 50);\n }\n self._c = false;\n };\n\n self._onClick = function(e)\n {\n e = e || window.event;\n var target = e.target || e.srcElement,\n pEl = target;\n if (!target) {\n return;\n }\n if (!hasEventListeners && hasClass(target, 'pika-select')) {\n if (!target.onchange) {\n target.setAttribute('onchange', 'return;');\n addEvent(target, 'change', self._onChange);\n }\n }\n do {\n if (hasClass(pEl, 'pika-single') || pEl === opts.trigger) {\n return;\n }\n }\n while ((pEl = pEl.parentNode));\n if (self._v && target !== opts.trigger && pEl !== opts.trigger) {\n self.hide();\n }\n };\n\n self.el = document.createElement('div');\n self.el.className = 'pika-single' + (opts.isRTL ? ' is-rtl' : '') + (opts.theme ? ' ' + opts.theme : '');\n\n addEvent(self.el, 'mousedown', self._onMouseDown, true);\n addEvent(self.el, 'touchend', self._onMouseDown, true);\n addEvent(self.el, 'change', self._onChange);\n addEvent(document, 'keydown', self._onKeyChange);\n\n if (opts.field) {\n if (opts.container) {\n opts.container.appendChild(self.el);\n } else if (opts.bound) {\n document.body.appendChild(self.el);\n } else {\n opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling);\n }\n addEvent(opts.field, 'change', self._onInputChange);\n\n if (!opts.defaultDate) {\n if (hasMoment && opts.field.value) {\n opts.defaultDate = moment(opts.field.value, opts.format).toDate();\n } else {\n opts.defaultDate = new Date(Date.parse(opts.field.value));\n }\n opts.setDefaultDate = true;\n }\n }\n\n var defDate = opts.defaultDate;\n\n if (isDate(defDate)) {\n if (opts.setDefaultDate) {\n self.setDate(defDate, true);\n } else {\n self.gotoDate(defDate);\n }\n } else {\n self.gotoDate(new Date());\n }\n\n if (opts.bound) {\n this.hide();\n self.el.className += ' is-bound';\n addEvent(opts.trigger, 'click', self._onInputClick);\n addEvent(opts.trigger, 'focus', self._onInputFocus);\n addEvent(opts.trigger, 'blur', self._onInputBlur);\n } else {\n this.show();\n }\n };\n\n\n /**\n * public Pikaday API\n */\n Pikaday.prototype = {\n\n\n /**\n * configure functionality\n */\n config: function(options)\n {\n if (!this._o) {\n this._o = extend({}, defaults, true);\n }\n\n var opts = extend(this._o, options, true);\n\n opts.isRTL = !!opts.isRTL;\n\n opts.field = (opts.field && opts.field.nodeName) ? opts.field : null;\n\n opts.theme = (typeof opts.theme) === 'string' && opts.theme ? opts.theme : null;\n\n opts.bound = !!(opts.bound !== undefined ? opts.field && opts.bound : opts.field);\n\n opts.trigger = (opts.trigger && opts.trigger.nodeName) ? opts.trigger : opts.field;\n\n opts.disableWeekends = !!opts.disableWeekends;\n\n opts.disableDayFn = (typeof opts.disableDayFn) === 'function' ? opts.disableDayFn : null;\n\n var nom = parseInt(opts.numberOfMonths, 10) || 1;\n opts.numberOfMonths = nom > 4 ? 4 : nom;\n\n if (!isDate(opts.minDate)) {\n opts.minDate = false;\n }\n if (!isDate(opts.maxDate)) {\n opts.maxDate = false;\n }\n if ((opts.minDate && opts.maxDate) && opts.maxDate < opts.minDate) {\n opts.maxDate = opts.minDate = false;\n }\n if (opts.minDate) {\n this.setMinDate(opts.minDate);\n }\n if (opts.maxDate) {\n this.setMaxDate(opts.maxDate);\n }\n\n if (isArray(opts.yearRange)) {\n var fallback = new Date().getFullYear() - 10;\n opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback;\n opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback;\n } else {\n opts.yearRange = Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange;\n if (opts.yearRange > 100) {\n opts.yearRange = 100;\n }\n }\n\n return opts;\n },\n\n /**\n * return a formatted string of the current selection (using Moment.js if available)\n */\n toString: function(format)\n {\n return !isDate(this._d) ? '' : hasMoment ? moment(this._d).format(format || this._o.format) : this._d.toDateString();\n },\n\n /**\n * return a Moment.js object of the current selection (if available)\n */\n getMoment: function()\n {\n return hasMoment ? moment(this._d) : null;\n },\n\n /**\n * set the current selection from a Moment.js object (if available)\n */\n setMoment: function(date, preventOnSelect)\n {\n if (hasMoment && moment.isMoment(date)) {\n this.setDate(date.toDate(), preventOnSelect);\n }\n },\n\n /**\n * return a Date object of the current selection with fallback for the current date\n */\n getDate: function()\n {\n return isDate(this._d) ? new Date(this._d.getTime()) : new Date();\n },\n\n /**\n * set the current selection\n */\n setDate: function(date, preventOnSelect)\n {\n if (!date) {\n this._d = null;\n\n if (this._o.field) {\n this._o.field.value = '';\n fireEvent(this._o.field, 'change', { firedBy: this });\n }\n\n return this.draw();\n }\n if (typeof date === 'string') {\n date = new Date(Date.parse(date));\n }\n if (!isDate(date)) {\n return;\n }\n\n var min = this._o.minDate,\n max = this._o.maxDate;\n\n if (isDate(min) && date < min) {\n date = min;\n } else if (isDate(max) && date > max) {\n date = max;\n }\n\n this._d = new Date(date.getTime());\n setToStartOfDay(this._d);\n this.gotoDate(this._d);\n\n if (this._o.field) {\n this._o.field.value = this.toString();\n fireEvent(this._o.field, 'change', { firedBy: this });\n }\n if (!preventOnSelect && typeof this._o.onSelect === 'function') {\n this._o.onSelect.call(this, this.getDate());\n }\n },\n\n /**\n * change view to a specific date\n */\n gotoDate: function(date)\n {\n var newCalendar = true;\n\n if (!isDate(date)) {\n return;\n }\n\n if (this.calendars) {\n var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1),\n lastVisibleDate = new Date(this.calendars[this.calendars.length-1].year, this.calendars[this.calendars.length-1].month, 1),\n visibleDate = date.getTime();\n // get the end of the month\n lastVisibleDate.setMonth(lastVisibleDate.getMonth()+1);\n lastVisibleDate.setDate(lastVisibleDate.getDate()-1);\n newCalendar = (visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate);\n }\n\n if (newCalendar) {\n this.calendars = [{\n month: date.getMonth(),\n year: date.getFullYear()\n }];\n if (this._o.mainCalendar === 'right') {\n this.calendars[0].month += 1 - this._o.numberOfMonths;\n }\n }\n\n this.adjustCalendars();\n },\n\n adjustDate: function(sign, days) {\n\n var day = this.getDate();\n var difference = parseInt(days)*24*60*60*1000;\n\n var newDay;\n\n if (sign === 'add') {\n newDay = new Date(day.valueOf() + difference);\n } else if (sign === 'subtract') {\n newDay = new Date(day.valueOf() - difference);\n }\n\n if (hasMoment) {\n if (sign === 'add') {\n newDay = moment(day).add(days, \"days\").toDate();\n } else if (sign === 'subtract') {\n newDay = moment(day).subtract(days, \"days\").toDate();\n }\n }\n\n this.setDate(newDay);\n },\n\n adjustCalendars: function() {\n this.calendars[0] = adjustCalendar(this.calendars[0]);\n for (var c = 1; c < this._o.numberOfMonths; c++) {\n this.calendars[c] = adjustCalendar({\n month: this.calendars[0].month + c,\n year: this.calendars[0].year\n });\n }\n this.draw();\n },\n\n gotoToday: function()\n {\n this.gotoDate(new Date());\n },\n\n /**\n * change view to a specific month (zero-index, e.g. 0: January)\n */\n gotoMonth: function(month)\n {\n if (!isNaN(month)) {\n this.calendars[0].month = parseInt(month, 10);\n this.adjustCalendars();\n }\n },\n\n nextMonth: function()\n {\n this.calendars[0].month++;\n this.adjustCalendars();\n },\n\n prevMonth: function()\n {\n this.calendars[0].month--;\n this.adjustCalendars();\n },\n\n /**\n * change view to a specific full year (e.g. \"2012\")\n */\n gotoYear: function(year)\n {\n if (!isNaN(year)) {\n this.calendars[0].year = parseInt(year, 10);\n this.adjustCalendars();\n }\n },\n\n /**\n * change the minDate\n */\n setMinDate: function(value)\n {\n if(value instanceof Date) {\n setToStartOfDay(value);\n this._o.minDate = value;\n this._o.minYear = value.getFullYear();\n this._o.minMonth = value.getMonth();\n } else {\n this._o.minDate = defaults.minDate;\n this._o.minYear = defaults.minYear;\n this._o.minMonth = defaults.minMonth;\n this._o.startRange = defaults.startRange;\n }\n\n this.draw();\n },\n\n /**\n * change the maxDate\n */\n setMaxDate: function(value)\n {\n if(value instanceof Date) {\n setToStartOfDay(value);\n this._o.maxDate = value;\n this._o.maxYear = value.getFullYear();\n this._o.maxMonth = value.getMonth();\n } else {\n this._o.maxDate = defaults.maxDate;\n this._o.maxYear = defaults.maxYear;\n this._o.maxMonth = defaults.maxMonth;\n this._o.endRange = defaults.endRange;\n }\n\n this.draw();\n },\n\n setStartRange: function(value)\n {\n this._o.startRange = value;\n },\n\n setEndRange: function(value)\n {\n this._o.endRange = value;\n },\n\n /**\n * refresh the HTML\n */\n draw: function(force)\n {\n if (!this._v && !force) {\n return;\n }\n var opts = this._o,\n minYear = opts.minYear,\n maxYear = opts.maxYear,\n minMonth = opts.minMonth,\n maxMonth = opts.maxMonth,\n html = '',\n randId;\n\n if (this._y <= minYear) {\n this._y = minYear;\n if (!isNaN(minMonth) && this._m < minMonth) {\n this._m = minMonth;\n }\n }\n if (this._y >= maxYear) {\n this._y = maxYear;\n if (!isNaN(maxMonth) && this._m > maxMonth) {\n this._m = maxMonth;\n }\n }\n\n randId = 'pika-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);\n\n for (var c = 0; c < opts.numberOfMonths; c++) {\n html += '<div class=\"pika-lendar\">' + renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId) + '</div>';\n }\n\n this.el.innerHTML = html;\n\n if (opts.bound) {\n if(opts.field.type !== 'hidden') {\n sto(function() {\n opts.trigger.focus();\n }, 1);\n }\n }\n\n if (typeof this._o.onDraw === 'function') {\n this._o.onDraw(this);\n }\n \n if (opts.bound) {\n // let the screen reader user know to use arrow keys\n opts.field.setAttribute('aria-label', 'Use the arrow keys to pick a date');\n }\n },\n\n adjustPosition: function()\n {\n var field, pEl, width, height, viewportWidth, viewportHeight, scrollTop, left, top, clientRect;\n\n if (this._o.container) return;\n\n this.el.style.position = 'absolute';\n\n field = this._o.trigger;\n pEl = field;\n width = this.el.offsetWidth;\n height = this.el.offsetHeight;\n viewportWidth = window.innerWidth || document.documentElement.clientWidth;\n viewportHeight = window.innerHeight || document.documentElement.clientHeight;\n scrollTop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;\n\n if (typeof field.getBoundingClientRect === 'function') {\n clientRect = field.getBoundingClientRect();\n left = clientRect.left + window.pageXOffset;\n top = clientRect.bottom + window.pageYOffset;\n } else {\n left = pEl.offsetLeft;\n top = pEl.offsetTop + pEl.offsetHeight;\n while((pEl = pEl.offsetParent)) {\n left += pEl.offsetLeft;\n top += pEl.offsetTop;\n }\n }\n\n // default position is bottom & left\n if ((this._o.reposition && left + width > viewportWidth) ||\n (\n this._o.position.indexOf('right') > -1 &&\n left - width + field.offsetWidth > 0\n )\n ) {\n left = left - width + field.offsetWidth;\n }\n if ((this._o.reposition && top + height > viewportHeight + scrollTop) ||\n (\n this._o.position.indexOf('top') > -1 &&\n top - height - field.offsetHeight > 0\n )\n ) {\n top = top - height - field.offsetHeight;\n }\n\n this.el.style.left = left + 'px';\n this.el.style.top = top + 'px';\n },\n\n /**\n * render HTML for a particular month\n */\n render: function(year, month, randId)\n {\n var opts = this._o,\n now = new Date(),\n days = getDaysInMonth(year, month),\n before = new Date(year, month, 1).getDay(),\n data = [],\n row = [];\n setToStartOfDay(now);\n if (opts.firstDay > 0) {\n before -= opts.firstDay;\n if (before < 0) {\n before += 7;\n }\n }\n var previousMonth = month === 0 ? 11 : month - 1,\n nextMonth = month === 11 ? 0 : month + 1,\n yearOfPreviousMonth = month === 0 ? year - 1 : year,\n yearOfNextMonth = month === 11 ? year + 1 : year,\n daysInPreviousMonth = getDaysInMonth(yearOfPreviousMonth, previousMonth);\n var cells = days + before,\n after = cells;\n while(after > 7) {\n after -= 7;\n }\n cells += 7 - after;\n for (var i = 0, r = 0; i < cells; i++)\n {\n var day = new Date(year, month, 1 + (i - before)),\n isSelected = isDate(this._d) ? compareDates(day, this._d) : false,\n isToday = compareDates(day, now),\n isEmpty = i < before || i >= (days + before),\n dayNumber = 1 + (i - before),\n monthNumber = month,\n yearNumber = year,\n isStartRange = opts.startRange && compareDates(opts.startRange, day),\n isEndRange = opts.endRange && compareDates(opts.endRange, day),\n isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange,\n isDisabled = (opts.minDate && day < opts.minDate) ||\n (opts.maxDate && day > opts.maxDate) ||\n (opts.disableWeekends && isWeekend(day)) ||\n (opts.disableDayFn && opts.disableDayFn(day));\n\n if (isEmpty) {\n if (i < before) {\n dayNumber = daysInPreviousMonth + dayNumber;\n monthNumber = previousMonth;\n yearNumber = yearOfPreviousMonth;\n } else {\n dayNumber = dayNumber - days;\n monthNumber = nextMonth;\n yearNumber = yearOfNextMonth;\n }\n }\n\n var dayConfig = {\n day: dayNumber,\n month: monthNumber,\n year: yearNumber,\n isSelected: isSelected,\n isToday: isToday,\n isDisabled: isDisabled,\n isEmpty: isEmpty,\n isStartRange: isStartRange,\n isEndRange: isEndRange,\n isInRange: isInRange,\n showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths\n };\n\n row.push(renderDay(dayConfig));\n\n if (++r === 7) {\n if (opts.showWeekNumber) {\n row.unshift(renderWeek(i - before, month, year));\n }\n data.push(renderRow(row, opts.isRTL));\n row = [];\n r = 0;\n }\n }\n return renderTable(opts, data, randId);\n },\n\n isVisible: function()\n {\n return this._v;\n },\n\n show: function()\n {\n if (!this.isVisible()) {\n removeClass(this.el, 'is-hidden');\n this._v = true;\n this.draw();\n if (this._o.bound) {\n addEvent(document, 'click', this._onClick);\n this.adjustPosition();\n }\n if (typeof this._o.onOpen === 'function') {\n this._o.onOpen.call(this);\n }\n }\n },\n\n hide: function()\n {\n var v = this._v;\n if (v !== false) {\n if (this._o.bound) {\n removeEvent(document, 'click', this._onClick);\n }\n this.el.style.position = 'static'; // reset\n this.el.style.left = 'auto';\n this.el.style.top = 'auto';\n addClass(this.el, 'is-hidden');\n this._v = false;\n if (v !== undefined && typeof this._o.onClose === 'function') {\n this._o.onClose.call(this);\n }\n }\n },\n\n /**\n * GAME OVER\n */\n destroy: function()\n {\n this.hide();\n removeEvent(this.el, 'mousedown', this._onMouseDown, true);\n removeEvent(this.el, 'touchend', this._onMouseDown, true);\n removeEvent(this.el, 'change', this._onChange);\n if (this._o.field) {\n removeEvent(this._o.field, 'change', this._onInputChange);\n if (this._o.bound) {\n removeEvent(this._o.trigger, 'click', this._onInputClick);\n removeEvent(this._o.trigger, 'focus', this._onInputFocus);\n removeEvent(this._o.trigger, 'blur', this._onInputBlur);\n }\n }\n if (this.el.parentNode) {\n this.el.parentNode.removeChild(this.el);\n }\n }\n\n };\n\n return Pikaday;\n\n}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pikaday/pikaday.js\n// module id = 436\n// module chunks = 0","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 437\n// module chunks = 0","/*!\n * ZeroClipboard\n * The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface\n * Copyright (c) 2009-2016 Jon Rohan, James M. Greene\n * Licensed MIT\n * http://zeroclipboard.org/\n * v2.3.0\n */\n(function(window, undefined) {\n \"use strict\";\n /**\n * Store references to critically important global functions that may be\n * overridden on certain web pages.\n */\n var _window = window, _document = _window.document, _navigator = _window.navigator, _setTimeout = _window.setTimeout, _clearTimeout = _window.clearTimeout, _setInterval = _window.setInterval, _clearInterval = _window.clearInterval, _getComputedStyle = _window.getComputedStyle, _encodeURIComponent = _window.encodeURIComponent, _ActiveXObject = _window.ActiveXObject, _Error = _window.Error, _parseInt = _window.Number.parseInt || _window.parseInt, _parseFloat = _window.Number.parseFloat || _window.parseFloat, _isNaN = _window.Number.isNaN || _window.isNaN, _now = _window.Date.now, _keys = _window.Object.keys, _hasOwn = _window.Object.prototype.hasOwnProperty, _slice = _window.Array.prototype.slice, _unwrap = function() {\n var unwrapper = function(el) {\n return el;\n };\n if (typeof _window.wrap === \"function\" && typeof _window.unwrap === \"function\") {\n try {\n var div = _document.createElement(\"div\");\n var unwrappedDiv = _window.unwrap(div);\n if (div.nodeType === 1 && unwrappedDiv && unwrappedDiv.nodeType === 1) {\n unwrapper = _window.unwrap;\n }\n } catch (e) {}\n }\n return unwrapper;\n }();\n /**\n * Convert an `arguments` object into an Array.\n *\n * @returns The arguments as an Array\n * @private\n */\n var _args = function(argumentsObj) {\n return _slice.call(argumentsObj, 0);\n };\n /**\n * Shallow-copy the owned, enumerable properties of one object over to another, similar to jQuery's `$.extend`.\n *\n * @returns The target object, augmented\n * @private\n */\n var _extend = function() {\n var i, len, arg, prop, src, copy, args = _args(arguments), target = args[0] || {};\n for (i = 1, len = args.length; i < len; i++) {\n if ((arg = args[i]) != null) {\n for (prop in arg) {\n if (_hasOwn.call(arg, prop)) {\n src = target[prop];\n copy = arg[prop];\n if (target !== copy && copy !== undefined) {\n target[prop] = copy;\n }\n }\n }\n }\n }\n return target;\n };\n /**\n * Return a deep copy of the source object or array.\n *\n * @returns Object or Array\n * @private\n */\n var _deepCopy = function(source) {\n var copy, i, len, prop;\n if (typeof source !== \"object\" || source == null || typeof source.nodeType === \"number\") {\n copy = source;\n } else if (typeof source.length === \"number\") {\n copy = [];\n for (i = 0, len = source.length; i < len; i++) {\n if (_hasOwn.call(source, i)) {\n copy[i] = _deepCopy(source[i]);\n }\n }\n } else {\n copy = {};\n for (prop in source) {\n if (_hasOwn.call(source, prop)) {\n copy[prop] = _deepCopy(source[prop]);\n }\n }\n }\n return copy;\n };\n /**\n * Makes a shallow copy of `obj` (like `_extend`) but filters its properties based on a list of `keys` to keep.\n * The inverse of `_omit`, mostly. The big difference is that these properties do NOT need to be enumerable to\n * be kept.\n *\n * @returns A new filtered object.\n * @private\n */\n var _pick = function(obj, keys) {\n var newObj = {};\n for (var i = 0, len = keys.length; i < len; i++) {\n if (keys[i] in obj) {\n newObj[keys[i]] = obj[keys[i]];\n }\n }\n return newObj;\n };\n /**\n * Makes a shallow copy of `obj` (like `_extend`) but filters its properties based on a list of `keys` to omit.\n * The inverse of `_pick`.\n *\n * @returns A new filtered object.\n * @private\n */\n var _omit = function(obj, keys) {\n var newObj = {};\n for (var prop in obj) {\n if (keys.indexOf(prop) === -1) {\n newObj[prop] = obj[prop];\n }\n }\n return newObj;\n };\n /**\n * Remove all owned, enumerable properties from an object.\n *\n * @returns The original object without its owned, enumerable properties.\n * @private\n */\n var _deleteOwnProperties = function(obj) {\n if (obj) {\n for (var prop in obj) {\n if (_hasOwn.call(obj, prop)) {\n delete obj[prop];\n }\n }\n }\n return obj;\n };\n /**\n * Determine if an element is contained within another element.\n *\n * @returns Boolean\n * @private\n */\n var _containedBy = function(el, ancestorEl) {\n if (el && el.nodeType === 1 && el.ownerDocument && ancestorEl && (ancestorEl.nodeType === 1 && ancestorEl.ownerDocument && ancestorEl.ownerDocument === el.ownerDocument || ancestorEl.nodeType === 9 && !ancestorEl.ownerDocument && ancestorEl === el.ownerDocument)) {\n do {\n if (el === ancestorEl) {\n return true;\n }\n el = el.parentNode;\n } while (el);\n }\n return false;\n };\n /**\n * Get the URL path's parent directory.\n *\n * @returns String or `undefined`\n * @private\n */\n var _getDirPathOfUrl = function(url) {\n var dir;\n if (typeof url === \"string\" && url) {\n dir = url.split(\"#\")[0].split(\"?\")[0];\n dir = url.slice(0, url.lastIndexOf(\"/\") + 1);\n }\n return dir;\n };\n /**\n * Get the current script's URL by throwing an `Error` and analyzing it.\n *\n * @returns String or `undefined`\n * @private\n */\n var _getCurrentScriptUrlFromErrorStack = function(stack) {\n var url, matches;\n if (typeof stack === \"string\" && stack) {\n matches = stack.match(/^(?:|[^:@]*@|.+\\)@(?=http[s]?|file)|.+?\\s+(?: at |@)(?:[^:\\(]+ )*[\\(]?)((?:http[s]?|file):\\/\\/[\\/]?.+?\\/[^:\\)]*?)(?::\\d+)(?::\\d+)?/);\n if (matches && matches[1]) {\n url = matches[1];\n } else {\n matches = stack.match(/\\)@((?:http[s]?|file):\\/\\/[\\/]?.+?\\/[^:\\)]*?)(?::\\d+)(?::\\d+)?/);\n if (matches && matches[1]) {\n url = matches[1];\n }\n }\n }\n return url;\n };\n /**\n * Get the current script's URL by throwing an `Error` and analyzing it.\n *\n * @returns String or `undefined`\n * @private\n */\n var _getCurrentScriptUrlFromError = function() {\n var url, err;\n try {\n throw new _Error();\n } catch (e) {\n err = e;\n }\n if (err) {\n url = err.sourceURL || err.fileName || _getCurrentScriptUrlFromErrorStack(err.stack);\n }\n return url;\n };\n /**\n * Get the current script's URL.\n *\n * @returns String or `undefined`\n * @private\n */\n var _getCurrentScriptUrl = function() {\n var jsPath, scripts, i;\n if (_document.currentScript && (jsPath = _document.currentScript.src)) {\n return jsPath;\n }\n scripts = _document.getElementsByTagName(\"script\");\n if (scripts.length === 1) {\n return scripts[0].src || undefined;\n }\n if (\"readyState\" in (scripts[0] || document.createElement(\"script\"))) {\n for (i = scripts.length; i--; ) {\n if (scripts[i].readyState === \"interactive\" && (jsPath = scripts[i].src)) {\n return jsPath;\n }\n }\n }\n if (_document.readyState === \"loading\" && (jsPath = scripts[scripts.length - 1].src)) {\n return jsPath;\n }\n if (jsPath = _getCurrentScriptUrlFromError()) {\n return jsPath;\n }\n return undefined;\n };\n /**\n * Get the unanimous parent directory of ALL script tags.\n * If any script tags are either (a) inline or (b) from differing parent\n * directories, this method must return `undefined`.\n *\n * @returns String or `undefined`\n * @private\n */\n var _getUnanimousScriptParentDir = function() {\n var i, jsDir, jsPath, scripts = _document.getElementsByTagName(\"script\");\n for (i = scripts.length; i--; ) {\n if (!(jsPath = scripts[i].src)) {\n jsDir = null;\n break;\n }\n jsPath = _getDirPathOfUrl(jsPath);\n if (jsDir == null) {\n jsDir = jsPath;\n } else if (jsDir !== jsPath) {\n jsDir = null;\n break;\n }\n }\n return jsDir || undefined;\n };\n /**\n * Get the presumed location of the \"ZeroClipboard.swf\" file, based on the location\n * of the executing JavaScript file (e.g. \"ZeroClipboard.js\", etc.).\n *\n * @returns String\n * @private\n */\n var _getDefaultSwfPath = function() {\n var jsDir = _getDirPathOfUrl(_getCurrentScriptUrl()) || _getUnanimousScriptParentDir() || \"\";\n return jsDir + \"ZeroClipboard.swf\";\n };\n /**\n * Is the client's operating system some version of Windows?\n *\n * @returns Boolean\n * @private\n */\n var _isWindows = function() {\n var isWindowsRegex = /win(dows|[\\s]?(nt|me|ce|xp|vista|[\\d]+))/i;\n return !!_navigator && (isWindowsRegex.test(_navigator.appVersion || \"\") || isWindowsRegex.test(_navigator.platform || \"\") || (_navigator.userAgent || \"\").indexOf(\"Windows\") !== -1);\n };\n /**\n * Keep track of if the page is framed (in an `iframe`). This can never change.\n * @private\n */\n var _pageIsFramed = function() {\n return _window.opener == null && (!!_window.top && _window != _window.top || !!_window.parent && _window != _window.parent);\n }();\n /**\n * Keep track of if the page is XHTML (vs. HTML), which requires that everything\n * be rendering in XML mode.\n * @private\n */\n var _pageIsXhtml = _document.documentElement.nodeName === \"html\";\n /**\n * Keep track of the state of the Flash object.\n * @private\n */\n var _flashState = {\n bridge: null,\n version: \"0.0.0\",\n pluginType: \"unknown\",\n sandboxed: null,\n disabled: null,\n outdated: null,\n insecure: null,\n unavailable: null,\n degraded: null,\n deactivated: null,\n overdue: null,\n ready: null\n };\n /**\n * The minimum Flash Player version required to use ZeroClipboard completely.\n * @readonly\n * @private\n */\n var _minimumFlashVersion = \"11.0.0\";\n /**\n * The ZeroClipboard library version number, as reported by Flash, at the time the SWF was compiled.\n */\n var _zcSwfVersion;\n /**\n * Keep track of all event listener registrations.\n * @private\n */\n var _handlers = {};\n /**\n * Keep track of the currently activated element.\n * @private\n */\n var _currentElement;\n /**\n * Keep track of the element that was activated when a `copy` process started.\n * @private\n */\n var _copyTarget;\n /**\n * Keep track of data for the pending clipboard transaction.\n * @private\n */\n var _clipData = {};\n /**\n * Keep track of data formats for the pending clipboard transaction.\n * @private\n */\n var _clipDataFormatMap = null;\n /**\n * Keep track of the Flash availability check timeout.\n * @private\n */\n var _flashCheckTimeout = 0;\n /**\n * Keep track of SWF network errors interval polling.\n * @private\n */\n var _swfFallbackCheckInterval = 0;\n /**\n * The `message` store for events\n * @private\n */\n var _eventMessages = {\n ready: \"Flash communication is established\",\n error: {\n \"flash-sandboxed\": \"Attempting to run Flash in a sandboxed iframe, which is impossible\",\n \"flash-disabled\": \"Flash is disabled or not installed. May also be attempting to run Flash in a sandboxed iframe, which is impossible.\",\n \"flash-outdated\": \"Flash is too outdated to support ZeroClipboard\",\n \"flash-insecure\": \"Flash will be unable to communicate due to a protocol mismatch between your `swfPath` configuration and the page\",\n \"flash-unavailable\": \"Flash is unable to communicate bidirectionally with JavaScript\",\n \"flash-degraded\": \"Flash is unable to preserve data fidelity when communicating with JavaScript\",\n \"flash-deactivated\": \"Flash is too outdated for your browser and/or is configured as click-to-activate.\\nThis may also mean that the ZeroClipboard SWF object could not be loaded, so please check your `swfPath` configuration and/or network connectivity.\\nMay also be attempting to run Flash in a sandboxed iframe, which is impossible.\",\n \"flash-overdue\": \"Flash communication was established but NOT within the acceptable time limit\",\n \"version-mismatch\": \"ZeroClipboard JS version number does not match ZeroClipboard SWF version number\",\n \"clipboard-error\": \"At least one error was thrown while ZeroClipboard was attempting to inject your data into the clipboard\",\n \"config-mismatch\": \"ZeroClipboard configuration does not match Flash's reality\",\n \"swf-not-found\": \"The ZeroClipboard SWF object could not be loaded, so please check your `swfPath` configuration and/or network connectivity\",\n \"browser-unsupported\": \"The browser does not support the required HTML DOM and JavaScript features\"\n }\n };\n /**\n * The `name`s of `error` events that can only occur is Flash has at least\n * been able to load the SWF successfully.\n * @private\n */\n var _errorsThatOnlyOccurAfterFlashLoads = [ \"flash-unavailable\", \"flash-degraded\", \"flash-overdue\", \"version-mismatch\", \"config-mismatch\", \"clipboard-error\" ];\n /**\n * The `name`s of `error` events that should likely result in the `_flashState`\n * variable's property values being updated.\n * @private\n */\n var _flashStateErrorNames = [ \"flash-sandboxed\", \"flash-disabled\", \"flash-outdated\", \"flash-insecure\", \"flash-unavailable\", \"flash-degraded\", \"flash-deactivated\", \"flash-overdue\" ];\n /**\n * A RegExp to match the `name` property of `error` events related to Flash.\n * @private\n */\n var _flashStateErrorNameMatchingRegex = new RegExp(\"^flash-(\" + _flashStateErrorNames.map(function(errorName) {\n return errorName.replace(/^flash-/, \"\");\n }).join(\"|\") + \")$\");\n /**\n * A RegExp to match the `name` property of `error` events related to Flash,\n * which is enabled.\n * @private\n */\n var _flashStateEnabledErrorNameMatchingRegex = new RegExp(\"^flash-(\" + _flashStateErrorNames.filter(function(errorName) {\n return errorName !== \"flash-disabled\";\n }).map(function(errorName) {\n return errorName.replace(/^flash-/, \"\");\n }).join(\"|\") + \")$\");\n /**\n * ZeroClipboard configuration defaults for the Core module.\n * @private\n */\n var _globalConfig = {\n swfPath: _getDefaultSwfPath(),\n trustedDomains: _window.location.host ? [ _window.location.host ] : [],\n cacheBust: true,\n forceEnhancedClipboard: false,\n flashLoadTimeout: 3e4,\n autoActivate: true,\n bubbleEvents: true,\n fixLineEndings: true,\n containerId: \"global-zeroclipboard-html-bridge\",\n containerClass: \"global-zeroclipboard-container\",\n swfObjectId: \"global-zeroclipboard-flash-bridge\",\n hoverClass: \"zeroclipboard-is-hover\",\n activeClass: \"zeroclipboard-is-active\",\n forceHandCursor: false,\n title: null,\n zIndex: 999999999\n };\n /**\n * The underlying implementation of `ZeroClipboard.config`.\n * @private\n */\n var _config = function(options) {\n if (typeof options === \"object\" && options && !(\"length\" in options)) {\n _keys(options).forEach(function(prop) {\n if (/^(?:forceHandCursor|title|zIndex|bubbleEvents|fixLineEndings)$/.test(prop)) {\n _globalConfig[prop] = options[prop];\n } else if (_flashState.bridge == null) {\n if (prop === \"containerId\" || prop === \"swfObjectId\") {\n if (_isValidHtml4Id(options[prop])) {\n _globalConfig[prop] = options[prop];\n } else {\n throw new Error(\"The specified `\" + prop + \"` value is not valid as an HTML4 Element ID\");\n }\n } else {\n _globalConfig[prop] = options[prop];\n }\n }\n });\n }\n if (typeof options === \"string\" && options) {\n if (_hasOwn.call(_globalConfig, options)) {\n return _globalConfig[options];\n }\n return;\n }\n return _deepCopy(_globalConfig);\n };\n /**\n * The underlying implementation of `ZeroClipboard.state`.\n * @private\n */\n var _state = function() {\n _detectSandbox();\n return {\n browser: _extend(_pick(_navigator, [ \"userAgent\", \"platform\", \"appName\", \"appVersion\" ]), {\n isSupported: _isBrowserSupported()\n }),\n flash: _omit(_flashState, [ \"bridge\" ]),\n zeroclipboard: {\n version: ZeroClipboard.version,\n config: ZeroClipboard.config()\n }\n };\n };\n /**\n * Does this browser support all of the necessary DOM and JS features necessary?\n * @private\n */\n var _isBrowserSupported = function() {\n return !!(_document.addEventListener && _window.Object.keys && _window.Array.prototype.map);\n };\n /**\n * The underlying implementation of `ZeroClipboard.isFlashUnusable`.\n * @private\n */\n var _isFlashUnusable = function() {\n return !!(_flashState.sandboxed || _flashState.disabled || _flashState.outdated || _flashState.unavailable || _flashState.degraded || _flashState.deactivated);\n };\n /**\n * The underlying implementation of `ZeroClipboard.on`.\n * @private\n */\n var _on = function(eventType, listener) {\n var i, len, events, added = {};\n if (typeof eventType === \"string\" && eventType) {\n events = eventType.toLowerCase().split(/\\s+/);\n } else if (typeof eventType === \"object\" && eventType && !(\"length\" in eventType) && typeof listener === \"undefined\") {\n _keys(eventType).forEach(function(key) {\n var listener = eventType[key];\n if (typeof listener === \"function\") {\n ZeroClipboard.on(key, listener);\n }\n });\n }\n if (events && events.length && listener) {\n for (i = 0, len = events.length; i < len; i++) {\n eventType = events[i].replace(/^on/, \"\");\n added[eventType] = true;\n if (!_handlers[eventType]) {\n _handlers[eventType] = [];\n }\n _handlers[eventType].push(listener);\n }\n if (added.ready && _flashState.ready) {\n ZeroClipboard.emit({\n type: \"ready\"\n });\n }\n if (added.error) {\n if (!_isBrowserSupported()) {\n ZeroClipboard.emit({\n type: \"error\",\n name: \"browser-unsupported\"\n });\n }\n for (i = 0, len = _flashStateErrorNames.length; i < len; i++) {\n if (_flashState[_flashStateErrorNames[i].replace(/^flash-/, \"\")] === true) {\n ZeroClipboard.emit({\n type: \"error\",\n name: _flashStateErrorNames[i]\n });\n break;\n }\n }\n if (_zcSwfVersion !== undefined && ZeroClipboard.version !== _zcSwfVersion) {\n ZeroClipboard.emit({\n type: \"error\",\n name: \"version-mismatch\",\n jsVersion: ZeroClipboard.version,\n swfVersion: _zcSwfVersion\n });\n }\n }\n }\n return ZeroClipboard;\n };\n /**\n * The underlying implementation of `ZeroClipboard.off`.\n * @private\n */\n var _off = function(eventType, listener) {\n var i, len, foundIndex, events, perEventHandlers;\n if (arguments.length === 0) {\n events = _keys(_handlers);\n } else if (typeof eventType === \"string\" && eventType) {\n events = eventType.toLowerCase().split(/\\s+/);\n } else if (typeof eventType === \"object\" && eventType && !(\"length\" in eventType) && typeof listener === \"undefined\") {\n _keys(eventType).forEach(function(key) {\n var listener = eventType[key];\n if (typeof listener === \"function\") {\n ZeroClipboard.off(key, listener);\n }\n });\n }\n if (events && events.length) {\n for (i = 0, len = events.length; i < len; i++) {\n eventType = events[i].replace(/^on/, \"\");\n perEventHandlers = _handlers[eventType];\n if (perEventHandlers && perEventHandlers.length) {\n if (listener) {\n foundIndex = perEventHandlers.indexOf(listener);\n while (foundIndex !== -1) {\n perEventHandlers.splice(foundIndex, 1);\n foundIndex = perEventHandlers.indexOf(listener, foundIndex);\n }\n } else {\n perEventHandlers.length = 0;\n }\n }\n }\n }\n return ZeroClipboard;\n };\n /**\n * The underlying implementation of `ZeroClipboard.handlers`.\n * @private\n */\n var _listeners = function(eventType) {\n var copy;\n if (typeof eventType === \"string\" && eventType) {\n copy = _deepCopy(_handlers[eventType]) || null;\n } else {\n copy = _deepCopy(_handlers);\n }\n return copy;\n };\n /**\n * The underlying implementation of `ZeroClipboard.emit`.\n * @private\n */\n var _emit = function(event) {\n var eventCopy, returnVal, tmp;\n event = _createEvent(event);\n if (!event) {\n return;\n }\n if (_preprocessEvent(event)) {\n return;\n }\n if (event.type === \"ready\" && _flashState.overdue === true) {\n return ZeroClipboard.emit({\n type: \"error\",\n name: \"flash-overdue\"\n });\n }\n eventCopy = _extend({}, event);\n _dispatchCallbacks.call(this, eventCopy);\n if (event.type === \"copy\") {\n tmp = _mapClipDataToFlash(_clipData);\n returnVal = tmp.data;\n _clipDataFormatMap = tmp.formatMap;\n }\n return returnVal;\n };\n /**\n * Get the protocol of the configured SWF path.\n * @private\n */\n var _getSwfPathProtocol = function() {\n var swfPath = _globalConfig.swfPath || \"\", swfPathFirstTwoChars = swfPath.slice(0, 2), swfProtocol = swfPath.slice(0, swfPath.indexOf(\"://\") + 1);\n return swfPathFirstTwoChars === \"\\\\\\\\\" ? \"file:\" : swfPathFirstTwoChars === \"//\" || swfProtocol === \"\" ? _window.location.protocol : swfProtocol;\n };\n /**\n * The underlying implementation of `ZeroClipboard.create`.\n * @private\n */\n var _create = function() {\n var maxWait, swfProtocol, previousState = _flashState.sandboxed;\n if (!_isBrowserSupported()) {\n _flashState.ready = false;\n ZeroClipboard.emit({\n type: \"error\",\n name: \"browser-unsupported\"\n });\n return;\n }\n _detectSandbox();\n if (typeof _flashState.ready !== \"boolean\") {\n _flashState.ready = false;\n }\n if (_flashState.sandboxed !== previousState && _flashState.sandboxed === true) {\n _flashState.ready = false;\n ZeroClipboard.emit({\n type: \"error\",\n name: \"flash-sandboxed\"\n });\n } else if (!ZeroClipboard.isFlashUnusable() && _flashState.bridge === null) {\n swfProtocol = _getSwfPathProtocol();\n if (swfProtocol && swfProtocol !== _window.location.protocol) {\n ZeroClipboard.emit({\n type: \"error\",\n name: \"flash-insecure\"\n });\n } else {\n maxWait = _globalConfig.flashLoadTimeout;\n if (typeof maxWait === \"number\" && maxWait >= 0) {\n _flashCheckTimeout = _setTimeout(function() {\n if (typeof _flashState.deactivated !== \"boolean\") {\n _flashState.deactivated = true;\n }\n if (_flashState.deactivated === true) {\n ZeroClipboard.emit({\n type: \"error\",\n name: \"flash-deactivated\"\n });\n }\n }, maxWait);\n }\n _flashState.overdue = false;\n _embedSwf();\n }\n }\n };\n /**\n * The underlying implementation of `ZeroClipboard.destroy`.\n * @private\n */\n var _destroy = function() {\n ZeroClipboard.clearData();\n ZeroClipboard.blur();\n ZeroClipboard.emit(\"destroy\");\n _unembedSwf();\n ZeroClipboard.off();\n };\n /**\n * The underlying implementation of `ZeroClipboard.setData`.\n * @private\n */\n var _setData = function(format, data) {\n var dataObj;\n if (typeof format === \"object\" && format && typeof data === \"undefined\") {\n dataObj = format;\n ZeroClipboard.clearData();\n } else if (typeof format === \"string\" && format) {\n dataObj = {};\n dataObj[format] = data;\n } else {\n return;\n }\n for (var dataFormat in dataObj) {\n if (typeof dataFormat === \"string\" && dataFormat && _hasOwn.call(dataObj, dataFormat) && typeof dataObj[dataFormat] === \"string\" && dataObj[dataFormat]) {\n _clipData[dataFormat] = _fixLineEndings(dataObj[dataFormat]);\n }\n }\n };\n /**\n * The underlying implementation of `ZeroClipboard.clearData`.\n * @private\n */\n var _clearData = function(format) {\n if (typeof format === \"undefined\") {\n _deleteOwnProperties(_clipData);\n _clipDataFormatMap = null;\n } else if (typeof format === \"string\" && _hasOwn.call(_clipData, format)) {\n delete _clipData[format];\n }\n };\n /**\n * The underlying implementation of `ZeroClipboard.getData`.\n * @private\n */\n var _getData = function(format) {\n if (typeof format === \"undefined\") {\n return _deepCopy(_clipData);\n } else if (typeof format === \"string\" && _hasOwn.call(_clipData, format)) {\n return _clipData[format];\n }\n };\n /**\n * The underlying implementation of `ZeroClipboard.focus`/`ZeroClipboard.activate`.\n * @private\n */\n var _focus = function(element) {\n if (!(element && element.nodeType === 1)) {\n return;\n }\n if (_currentElement) {\n _removeClass(_currentElement, _globalConfig.activeClass);\n if (_currentElement !== element) {\n _removeClass(_currentElement, _globalConfig.hoverClass);\n }\n }\n _currentElement = element;\n _addClass(element, _globalConfig.hoverClass);\n var newTitle = element.getAttribute(\"title\") || _globalConfig.title;\n if (typeof newTitle === \"string\" && newTitle) {\n var htmlBridge = _getHtmlBridge(_flashState.bridge);\n if (htmlBridge) {\n htmlBridge.setAttribute(\"title\", newTitle);\n }\n }\n var useHandCursor = _globalConfig.forceHandCursor === true || _getStyle(element, \"cursor\") === \"pointer\";\n _setHandCursor(useHandCursor);\n _reposition();\n };\n /**\n * The underlying implementation of `ZeroClipboard.blur`/`ZeroClipboard.deactivate`.\n * @private\n */\n var _blur = function() {\n var htmlBridge = _getHtmlBridge(_flashState.bridge);\n if (htmlBridge) {\n htmlBridge.removeAttribute(\"title\");\n htmlBridge.style.left = \"0px\";\n htmlBridge.style.top = \"-9999px\";\n htmlBridge.style.width = \"1px\";\n htmlBridge.style.height = \"1px\";\n }\n if (_currentElement) {\n _removeClass(_currentElement, _globalConfig.hoverClass);\n _removeClass(_currentElement, _globalConfig.activeClass);\n _currentElement = null;\n }\n };\n /**\n * The underlying implementation of `ZeroClipboard.activeElement`.\n * @private\n */\n var _activeElement = function() {\n return _currentElement || null;\n };\n /**\n * Check if a value is a valid HTML4 `ID` or `Name` token.\n * @private\n */\n var _isValidHtml4Id = function(id) {\n return typeof id === \"string\" && id && /^[A-Za-z][A-Za-z0-9_:\\-\\.]*$/.test(id);\n };\n /**\n * Create or update an `event` object, based on the `eventType`.\n * @private\n */\n var _createEvent = function(event) {\n var eventType;\n if (typeof event === \"string\" && event) {\n eventType = event;\n event = {};\n } else if (typeof event === \"object\" && event && typeof event.type === \"string\" && event.type) {\n eventType = event.type;\n }\n if (!eventType) {\n return;\n }\n eventType = eventType.toLowerCase();\n if (!event.target && (/^(copy|aftercopy|_click)$/.test(eventType) || eventType === \"error\" && event.name === \"clipboard-error\")) {\n event.target = _copyTarget;\n }\n _extend(event, {\n type: eventType,\n target: event.target || _currentElement || null,\n relatedTarget: event.relatedTarget || null,\n currentTarget: _flashState && _flashState.bridge || null,\n timeStamp: event.timeStamp || _now() || null\n });\n var msg = _eventMessages[event.type];\n if (event.type === \"error\" && event.name && msg) {\n msg = msg[event.name];\n }\n if (msg) {\n event.message = msg;\n }\n if (event.type === \"ready\") {\n _extend(event, {\n target: null,\n version: _flashState.version\n });\n }\n if (event.type === \"error\") {\n if (_flashStateErrorNameMatchingRegex.test(event.name)) {\n _extend(event, {\n target: null,\n minimumVersion: _minimumFlashVersion\n });\n }\n if (_flashStateEnabledErrorNameMatchingRegex.test(event.name)) {\n _extend(event, {\n version: _flashState.version\n });\n }\n if (event.name === \"flash-insecure\") {\n _extend(event, {\n pageProtocol: _window.location.protocol,\n swfProtocol: _getSwfPathProtocol()\n });\n }\n }\n if (event.type === \"copy\") {\n event.clipboardData = {\n setData: ZeroClipboard.setData,\n clearData: ZeroClipboard.clearData\n };\n }\n if (event.type === \"aftercopy\") {\n event = _mapClipResultsFromFlash(event, _clipDataFormatMap);\n }\n if (event.target && !event.relatedTarget) {\n event.relatedTarget = _getRelatedTarget(event.target);\n }\n return _addMouseData(event);\n };\n /**\n * Get a relatedTarget from the target's `data-clipboard-target` attribute\n * @private\n */\n var _getRelatedTarget = function(targetEl) {\n var relatedTargetId = targetEl && targetEl.getAttribute && targetEl.getAttribute(\"data-clipboard-target\");\n return relatedTargetId ? _document.getElementById(relatedTargetId) : null;\n };\n /**\n * Add element and position data to `MouseEvent` instances\n * @private\n */\n var _addMouseData = function(event) {\n if (event && /^_(?:click|mouse(?:over|out|down|up|move))$/.test(event.type)) {\n var srcElement = event.target;\n var fromElement = event.type === \"_mouseover\" && event.relatedTarget ? event.relatedTarget : undefined;\n var toElement = event.type === \"_mouseout\" && event.relatedTarget ? event.relatedTarget : undefined;\n var pos = _getElementPosition(srcElement);\n var screenLeft = _window.screenLeft || _window.screenX || 0;\n var screenTop = _window.screenTop || _window.screenY || 0;\n var scrollLeft = _document.body.scrollLeft + _document.documentElement.scrollLeft;\n var scrollTop = _document.body.scrollTop + _document.documentElement.scrollTop;\n var pageX = pos.left + (typeof event._stageX === \"number\" ? event._stageX : 0);\n var pageY = pos.top + (typeof event._stageY === \"number\" ? event._stageY : 0);\n var clientX = pageX - scrollLeft;\n var clientY = pageY - scrollTop;\n var screenX = screenLeft + clientX;\n var screenY = screenTop + clientY;\n var moveX = typeof event.movementX === \"number\" ? event.movementX : 0;\n var moveY = typeof event.movementY === \"number\" ? event.movementY : 0;\n delete event._stageX;\n delete event._stageY;\n _extend(event, {\n srcElement: srcElement,\n fromElement: fromElement,\n toElement: toElement,\n screenX: screenX,\n screenY: screenY,\n pageX: pageX,\n pageY: pageY,\n clientX: clientX,\n clientY: clientY,\n x: clientX,\n y: clientY,\n movementX: moveX,\n movementY: moveY,\n offsetX: 0,\n offsetY: 0,\n layerX: 0,\n layerY: 0\n });\n }\n return event;\n };\n /**\n * Determine if an event's registered handlers should be execute synchronously or asynchronously.\n *\n * @returns {boolean}\n * @private\n */\n var _shouldPerformAsync = function(event) {\n var eventType = event && typeof event.type === \"string\" && event.type || \"\";\n return !/^(?:(?:before)?copy|destroy)$/.test(eventType);\n };\n /**\n * Control if a callback should be executed asynchronously or not.\n *\n * @returns `undefined`\n * @private\n */\n var _dispatchCallback = function(func, context, args, async) {\n if (async) {\n _setTimeout(function() {\n func.apply(context, args);\n }, 0);\n } else {\n func.apply(context, args);\n }\n };\n /**\n * Handle the actual dispatching of events to client instances.\n *\n * @returns `undefined`\n * @private\n */\n var _dispatchCallbacks = function(event) {\n if (!(typeof event === \"object\" && event && event.type)) {\n return;\n }\n var async = _shouldPerformAsync(event);\n var wildcardTypeHandlers = _handlers[\"*\"] || [];\n var specificTypeHandlers = _handlers[event.type] || [];\n var handlers = wildcardTypeHandlers.concat(specificTypeHandlers);\n if (handlers && handlers.length) {\n var i, len, func, context, eventCopy, originalContext = this;\n for (i = 0, len = handlers.length; i < len; i++) {\n func = handlers[i];\n context = originalContext;\n if (typeof func === \"string\" && typeof _window[func] === \"function\") {\n func = _window[func];\n }\n if (typeof func === \"object\" && func && typeof func.handleEvent === \"function\") {\n context = func;\n func = func.handleEvent;\n }\n if (typeof func === \"function\") {\n eventCopy = _extend({}, event);\n _dispatchCallback(func, context, [ eventCopy ], async);\n }\n }\n }\n return this;\n };\n /**\n * Check an `error` event's `name` property to see if Flash has\n * already loaded, which rules out possible `iframe` sandboxing.\n * @private\n */\n var _getSandboxStatusFromErrorEvent = function(event) {\n var isSandboxed = null;\n if (_pageIsFramed === false || event && event.type === \"error\" && event.name && _errorsThatOnlyOccurAfterFlashLoads.indexOf(event.name) !== -1) {\n isSandboxed = false;\n }\n return isSandboxed;\n };\n /**\n * Preprocess any special behaviors, reactions, or state changes after receiving this event.\n * Executes only once per event emitted, NOT once per client.\n * @private\n */\n var _preprocessEvent = function(event) {\n var element = event.target || _currentElement || null;\n var sourceIsSwf = event._source === \"swf\";\n delete event._source;\n switch (event.type) {\n case \"error\":\n var isSandboxed = event.name === \"flash-sandboxed\" || _getSandboxStatusFromErrorEvent(event);\n if (typeof isSandboxed === \"boolean\") {\n _flashState.sandboxed = isSandboxed;\n }\n if (event.name === \"browser-unsupported\") {\n _extend(_flashState, {\n disabled: false,\n outdated: false,\n unavailable: false,\n degraded: false,\n deactivated: false,\n overdue: false,\n ready: false\n });\n } else if (_flashStateErrorNames.indexOf(event.name) !== -1) {\n _extend(_flashState, {\n disabled: event.name === \"flash-disabled\",\n outdated: event.name === \"flash-outdated\",\n insecure: event.name === \"flash-insecure\",\n unavailable: event.name === \"flash-unavailable\",\n degraded: event.name === \"flash-degraded\",\n deactivated: event.name === \"flash-deactivated\",\n overdue: event.name === \"flash-overdue\",\n ready: false\n });\n } else if (event.name === \"version-mismatch\") {\n _zcSwfVersion = event.swfVersion;\n _extend(_flashState, {\n disabled: false,\n outdated: false,\n insecure: false,\n unavailable: false,\n degraded: false,\n deactivated: false,\n overdue: false,\n ready: false\n });\n }\n _clearTimeoutsAndPolling();\n break;\n\n case \"ready\":\n _zcSwfVersion = event.swfVersion;\n var wasDeactivated = _flashState.deactivated === true;\n _extend(_flashState, {\n sandboxed: false,\n disabled: false,\n outdated: false,\n insecure: false,\n unavailable: false,\n degraded: false,\n deactivated: false,\n overdue: wasDeactivated,\n ready: !wasDeactivated\n });\n _clearTimeoutsAndPolling();\n break;\n\n case \"beforecopy\":\n _copyTarget = element;\n break;\n\n case \"copy\":\n var textContent, htmlContent, targetEl = event.relatedTarget;\n if (!(_clipData[\"text/html\"] || _clipData[\"text/plain\"]) && targetEl && (htmlContent = targetEl.value || targetEl.outerHTML || targetEl.innerHTML) && (textContent = targetEl.value || targetEl.textContent || targetEl.innerText)) {\n event.clipboardData.clearData();\n event.clipboardData.setData(\"text/plain\", textContent);\n if (htmlContent !== textContent) {\n event.clipboardData.setData(\"text/html\", htmlContent);\n }\n } else if (!_clipData[\"text/plain\"] && event.target && (textContent = event.target.getAttribute(\"data-clipboard-text\"))) {\n event.clipboardData.clearData();\n event.clipboardData.setData(\"text/plain\", textContent);\n }\n break;\n\n case \"aftercopy\":\n _queueEmitClipboardErrors(event);\n ZeroClipboard.clearData();\n if (element && element !== _safeActiveElement() && element.focus) {\n element.focus();\n }\n break;\n\n case \"_mouseover\":\n ZeroClipboard.focus(element);\n if (_globalConfig.bubbleEvents === true && sourceIsSwf) {\n if (element && element !== event.relatedTarget && !_containedBy(event.relatedTarget, element)) {\n _fireMouseEvent(_extend({}, event, {\n type: \"mouseenter\",\n bubbles: false,\n cancelable: false\n }));\n }\n _fireMouseEvent(_extend({}, event, {\n type: \"mouseover\"\n }));\n }\n break;\n\n case \"_mouseout\":\n ZeroClipboard.blur();\n if (_globalConfig.bubbleEvents === true && sourceIsSwf) {\n if (element && element !== event.relatedTarget && !_containedBy(event.relatedTarget, element)) {\n _fireMouseEvent(_extend({}, event, {\n type: \"mouseleave\",\n bubbles: false,\n cancelable: false\n }));\n }\n _fireMouseEvent(_extend({}, event, {\n type: \"mouseout\"\n }));\n }\n break;\n\n case \"_mousedown\":\n _addClass(element, _globalConfig.activeClass);\n if (_globalConfig.bubbleEvents === true && sourceIsSwf) {\n _fireMouseEvent(_extend({}, event, {\n type: event.type.slice(1)\n }));\n }\n break;\n\n case \"_mouseup\":\n _removeClass(element, _globalConfig.activeClass);\n if (_globalConfig.bubbleEvents === true && sourceIsSwf) {\n _fireMouseEvent(_extend({}, event, {\n type: event.type.slice(1)\n }));\n }\n break;\n\n case \"_click\":\n _copyTarget = null;\n if (_globalConfig.bubbleEvents === true && sourceIsSwf) {\n _fireMouseEvent(_extend({}, event, {\n type: event.type.slice(1)\n }));\n }\n break;\n\n case \"_mousemove\":\n if (_globalConfig.bubbleEvents === true && sourceIsSwf) {\n _fireMouseEvent(_extend({}, event, {\n type: event.type.slice(1)\n }));\n }\n break;\n }\n if (/^_(?:click|mouse(?:over|out|down|up|move))$/.test(event.type)) {\n return true;\n }\n };\n /**\n * Check an \"aftercopy\" event for clipboard errors and emit a corresponding \"error\" event.\n * @private\n */\n var _queueEmitClipboardErrors = function(aftercopyEvent) {\n if (aftercopyEvent.errors && aftercopyEvent.errors.length > 0) {\n var errorEvent = _deepCopy(aftercopyEvent);\n _extend(errorEvent, {\n type: \"error\",\n name: \"clipboard-error\"\n });\n delete errorEvent.success;\n _setTimeout(function() {\n ZeroClipboard.emit(errorEvent);\n }, 0);\n }\n };\n /**\n * Dispatch a synthetic MouseEvent.\n *\n * @returns `undefined`\n * @private\n */\n var _fireMouseEvent = function(event) {\n if (!(event && typeof event.type === \"string\" && event)) {\n return;\n }\n var e, target = event.target || null, doc = target && target.ownerDocument || _document, defaults = {\n view: doc.defaultView || _window,\n canBubble: true,\n cancelable: true,\n detail: event.type === \"click\" ? 1 : 0,\n button: typeof event.which === \"number\" ? event.which - 1 : typeof event.button === \"number\" ? event.button : doc.createEvent ? 0 : 1\n }, args = _extend(defaults, event);\n if (!target) {\n return;\n }\n if (doc.createEvent && target.dispatchEvent) {\n args = [ args.type, args.canBubble, args.cancelable, args.view, args.detail, args.screenX, args.screenY, args.clientX, args.clientY, args.ctrlKey, args.altKey, args.shiftKey, args.metaKey, args.button, args.relatedTarget ];\n e = doc.createEvent(\"MouseEvents\");\n if (e.initMouseEvent) {\n e.initMouseEvent.apply(e, args);\n e._source = \"js\";\n target.dispatchEvent(e);\n }\n }\n };\n /**\n * Continuously poll the DOM until either:\n * (a) the fallback content becomes visible, or\n * (b) we receive an event from SWF (handled elsewhere)\n *\n * IMPORTANT:\n * This is NOT a necessary check but it can result in significantly faster\n * detection of bad `swfPath` configuration and/or network/server issues [in\n * supported browsers] than waiting for the entire `flashLoadTimeout` duration\n * to elapse before detecting that the SWF cannot be loaded. The detection\n * duration can be anywhere from 10-30 times faster [in supported browsers] by\n * using this approach.\n *\n * @returns `undefined`\n * @private\n */\n var _watchForSwfFallbackContent = function() {\n var maxWait = _globalConfig.flashLoadTimeout;\n if (typeof maxWait === \"number\" && maxWait >= 0) {\n var pollWait = Math.min(1e3, maxWait / 10);\n var fallbackContentId = _globalConfig.swfObjectId + \"_fallbackContent\";\n _swfFallbackCheckInterval = _setInterval(function() {\n var el = _document.getElementById(fallbackContentId);\n if (_isElementVisible(el)) {\n _clearTimeoutsAndPolling();\n _flashState.deactivated = null;\n ZeroClipboard.emit({\n type: \"error\",\n name: \"swf-not-found\"\n });\n }\n }, pollWait);\n }\n };\n /**\n * Create the HTML bridge element to embed the Flash object into.\n * @private\n */\n var _createHtmlBridge = function() {\n var container = _document.createElement(\"div\");\n container.id = _globalConfig.containerId;\n container.className = _globalConfig.containerClass;\n container.style.position = \"absolute\";\n container.style.left = \"0px\";\n container.style.top = \"-9999px\";\n container.style.width = \"1px\";\n container.style.height = \"1px\";\n container.style.zIndex = \"\" + _getSafeZIndex(_globalConfig.zIndex);\n return container;\n };\n /**\n * Get the HTML element container that wraps the Flash bridge object/element.\n * @private\n */\n var _getHtmlBridge = function(flashBridge) {\n var htmlBridge = flashBridge && flashBridge.parentNode;\n while (htmlBridge && htmlBridge.nodeName === \"OBJECT\" && htmlBridge.parentNode) {\n htmlBridge = htmlBridge.parentNode;\n }\n return htmlBridge || null;\n };\n /**\n *\n * @private\n */\n var _escapeXmlValue = function(val) {\n if (typeof val !== \"string\" || !val) {\n return val;\n }\n return val.replace(/[\"&'<>]/g, function(chr) {\n switch (chr) {\n case '\"':\n return \""\";\n\n case \"&\":\n return \"&\";\n\n case \"'\":\n return \"'\";\n\n case \"<\":\n return \"<\";\n\n case \">\":\n return \">\";\n\n default:\n return chr;\n }\n });\n };\n /**\n * Create the SWF object.\n *\n * @returns The SWF object reference.\n * @private\n */\n var _embedSwf = function() {\n var len, flashBridge = _flashState.bridge, container = _getHtmlBridge(flashBridge);\n if (!flashBridge) {\n var allowScriptAccess = _determineScriptAccess(_window.location.host, _globalConfig);\n var allowNetworking = allowScriptAccess === \"never\" ? \"none\" : \"all\";\n var flashvars = _vars(_extend({\n jsVersion: ZeroClipboard.version\n }, _globalConfig));\n var swfUrl = _globalConfig.swfPath + _cacheBust(_globalConfig.swfPath, _globalConfig);\n if (_pageIsXhtml) {\n swfUrl = _escapeXmlValue(swfUrl);\n }\n container = _createHtmlBridge();\n var divToBeReplaced = _document.createElement(\"div\");\n container.appendChild(divToBeReplaced);\n _document.body.appendChild(container);\n var tmpDiv = _document.createElement(\"div\");\n var usingActiveX = _flashState.pluginType === \"activex\";\n tmpDiv.innerHTML = '<object id=\"' + _globalConfig.swfObjectId + '\" name=\"' + _globalConfig.swfObjectId + '\" ' + 'width=\"100%\" height=\"100%\" ' + (usingActiveX ? 'classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\"' : 'type=\"application/x-shockwave-flash\" data=\"' + swfUrl + '\"') + \">\" + (usingActiveX ? '<param name=\"movie\" value=\"' + swfUrl + '\"/>' : \"\") + '<param name=\"allowScriptAccess\" value=\"' + allowScriptAccess + '\"/>' + '<param name=\"allowNetworking\" value=\"' + allowNetworking + '\"/>' + '<param name=\"menu\" value=\"false\"/>' + '<param name=\"wmode\" value=\"transparent\"/>' + '<param name=\"flashvars\" value=\"' + flashvars + '\"/>' + '<div id=\"' + _globalConfig.swfObjectId + '_fallbackContent\"> </div>' + \"</object>\";\n flashBridge = tmpDiv.firstChild;\n tmpDiv = null;\n _unwrap(flashBridge).ZeroClipboard = ZeroClipboard;\n container.replaceChild(flashBridge, divToBeReplaced);\n _watchForSwfFallbackContent();\n }\n if (!flashBridge) {\n flashBridge = _document[_globalConfig.swfObjectId];\n if (flashBridge && (len = flashBridge.length)) {\n flashBridge = flashBridge[len - 1];\n }\n if (!flashBridge && container) {\n flashBridge = container.firstChild;\n }\n }\n _flashState.bridge = flashBridge || null;\n return flashBridge;\n };\n /**\n * Destroy the SWF object.\n * @private\n */\n var _unembedSwf = function() {\n var flashBridge = _flashState.bridge;\n if (flashBridge) {\n var htmlBridge = _getHtmlBridge(flashBridge);\n if (htmlBridge) {\n if (_flashState.pluginType === \"activex\" && \"readyState\" in flashBridge) {\n flashBridge.style.display = \"none\";\n (function removeSwfFromIE() {\n if (flashBridge.readyState === 4) {\n for (var prop in flashBridge) {\n if (typeof flashBridge[prop] === \"function\") {\n flashBridge[prop] = null;\n }\n }\n if (flashBridge.parentNode) {\n flashBridge.parentNode.removeChild(flashBridge);\n }\n if (htmlBridge.parentNode) {\n htmlBridge.parentNode.removeChild(htmlBridge);\n }\n } else {\n _setTimeout(removeSwfFromIE, 10);\n }\n })();\n } else {\n if (flashBridge.parentNode) {\n flashBridge.parentNode.removeChild(flashBridge);\n }\n if (htmlBridge.parentNode) {\n htmlBridge.parentNode.removeChild(htmlBridge);\n }\n }\n }\n _clearTimeoutsAndPolling();\n _flashState.ready = null;\n _flashState.bridge = null;\n _flashState.deactivated = null;\n _flashState.insecure = null;\n _zcSwfVersion = undefined;\n }\n };\n /**\n * Map the data format names of the \"clipData\" to Flash-friendly names.\n *\n * @returns A new transformed object.\n * @private\n */\n var _mapClipDataToFlash = function(clipData) {\n var newClipData = {}, formatMap = {};\n if (!(typeof clipData === \"object\" && clipData)) {\n return;\n }\n for (var dataFormat in clipData) {\n if (dataFormat && _hasOwn.call(clipData, dataFormat) && typeof clipData[dataFormat] === \"string\" && clipData[dataFormat]) {\n switch (dataFormat.toLowerCase()) {\n case \"text/plain\":\n case \"text\":\n case \"air:text\":\n case \"flash:text\":\n newClipData.text = clipData[dataFormat];\n formatMap.text = dataFormat;\n break;\n\n case \"text/html\":\n case \"html\":\n case \"air:html\":\n case \"flash:html\":\n newClipData.html = clipData[dataFormat];\n formatMap.html = dataFormat;\n break;\n\n case \"application/rtf\":\n case \"text/rtf\":\n case \"rtf\":\n case \"richtext\":\n case \"air:rtf\":\n case \"flash:rtf\":\n newClipData.rtf = clipData[dataFormat];\n formatMap.rtf = dataFormat;\n break;\n\n default:\n break;\n }\n }\n }\n return {\n data: newClipData,\n formatMap: formatMap\n };\n };\n /**\n * Map the data format names from Flash-friendly names back to their original \"clipData\" names (via a format mapping).\n *\n * @returns A new transformed object.\n * @private\n */\n var _mapClipResultsFromFlash = function(clipResults, formatMap) {\n if (!(typeof clipResults === \"object\" && clipResults && typeof formatMap === \"object\" && formatMap)) {\n return clipResults;\n }\n var newResults = {};\n for (var prop in clipResults) {\n if (_hasOwn.call(clipResults, prop)) {\n if (prop === \"errors\") {\n newResults[prop] = clipResults[prop] ? clipResults[prop].slice() : [];\n for (var i = 0, len = newResults[prop].length; i < len; i++) {\n newResults[prop][i].format = formatMap[newResults[prop][i].format];\n }\n } else if (prop !== \"success\" && prop !== \"data\") {\n newResults[prop] = clipResults[prop];\n } else {\n newResults[prop] = {};\n var tmpHash = clipResults[prop];\n for (var dataFormat in tmpHash) {\n if (dataFormat && _hasOwn.call(tmpHash, dataFormat) && _hasOwn.call(formatMap, dataFormat)) {\n newResults[prop][formatMap[dataFormat]] = tmpHash[dataFormat];\n }\n }\n }\n }\n }\n return newResults;\n };\n /**\n * Will look at a path, and will create a \"?noCache={time}\" or \"&noCache={time}\"\n * query param string to return. Does NOT append that string to the original path.\n * This is useful because ExternalInterface often breaks when a Flash SWF is cached.\n *\n * @returns The `noCache` query param with necessary \"?\"/\"&\" prefix.\n * @private\n */\n var _cacheBust = function(path, options) {\n var cacheBust = options == null || options && options.cacheBust === true;\n if (cacheBust) {\n return (path.indexOf(\"?\") === -1 ? \"?\" : \"&\") + \"noCache=\" + _now();\n } else {\n return \"\";\n }\n };\n /**\n * Creates a query string for the FlashVars param.\n * Does NOT include the cache-busting query param.\n *\n * @returns FlashVars query string\n * @private\n */\n var _vars = function(options) {\n var i, len, domain, domains, str = \"\", trustedOriginsExpanded = [];\n if (options.trustedDomains) {\n if (typeof options.trustedDomains === \"string\") {\n domains = [ options.trustedDomains ];\n } else if (typeof options.trustedDomains === \"object\" && \"length\" in options.trustedDomains) {\n domains = options.trustedDomains;\n }\n }\n if (domains && domains.length) {\n for (i = 0, len = domains.length; i < len; i++) {\n if (_hasOwn.call(domains, i) && domains[i] && typeof domains[i] === \"string\") {\n domain = _extractDomain(domains[i]);\n if (!domain) {\n continue;\n }\n if (domain === \"*\") {\n trustedOriginsExpanded.length = 0;\n trustedOriginsExpanded.push(domain);\n break;\n }\n trustedOriginsExpanded.push.apply(trustedOriginsExpanded, [ domain, \"//\" + domain, _window.location.protocol + \"//\" + domain ]);\n }\n }\n }\n if (trustedOriginsExpanded.length) {\n str += \"trustedOrigins=\" + _encodeURIComponent(trustedOriginsExpanded.join(\",\"));\n }\n if (options.forceEnhancedClipboard === true) {\n str += (str ? \"&\" : \"\") + \"forceEnhancedClipboard=true\";\n }\n if (typeof options.swfObjectId === \"string\" && options.swfObjectId) {\n str += (str ? \"&\" : \"\") + \"swfObjectId=\" + _encodeURIComponent(options.swfObjectId);\n }\n if (typeof options.jsVersion === \"string\" && options.jsVersion) {\n str += (str ? \"&\" : \"\") + \"jsVersion=\" + _encodeURIComponent(options.jsVersion);\n }\n return str;\n };\n /**\n * Extract the domain (e.g. \"github.com\") from an origin (e.g. \"https://github.com\") or\n * URL (e.g. \"https://github.com/zeroclipboard/zeroclipboard/\").\n *\n * @returns the domain\n * @private\n */\n var _extractDomain = function(originOrUrl) {\n if (originOrUrl == null || originOrUrl === \"\") {\n return null;\n }\n originOrUrl = originOrUrl.replace(/^\\s+|\\s+$/g, \"\");\n if (originOrUrl === \"\") {\n return null;\n }\n var protocolIndex = originOrUrl.indexOf(\"//\");\n originOrUrl = protocolIndex === -1 ? originOrUrl : originOrUrl.slice(protocolIndex + 2);\n var pathIndex = originOrUrl.indexOf(\"/\");\n originOrUrl = pathIndex === -1 ? originOrUrl : protocolIndex === -1 || pathIndex === 0 ? null : originOrUrl.slice(0, pathIndex);\n if (originOrUrl && originOrUrl.slice(-4).toLowerCase() === \".swf\") {\n return null;\n }\n return originOrUrl || null;\n };\n /**\n * Set `allowScriptAccess` based on `trustedDomains` and `window.location.host` vs. `swfPath`.\n *\n * @returns The appropriate script access level.\n * @private\n */\n var _determineScriptAccess = function() {\n var _extractAllDomains = function(origins) {\n var i, len, tmp, resultsArray = [];\n if (typeof origins === \"string\") {\n origins = [ origins ];\n }\n if (!(typeof origins === \"object\" && origins && typeof origins.length === \"number\")) {\n return resultsArray;\n }\n for (i = 0, len = origins.length; i < len; i++) {\n if (_hasOwn.call(origins, i) && (tmp = _extractDomain(origins[i]))) {\n if (tmp === \"*\") {\n resultsArray.length = 0;\n resultsArray.push(\"*\");\n break;\n }\n if (resultsArray.indexOf(tmp) === -1) {\n resultsArray.push(tmp);\n }\n }\n }\n return resultsArray;\n };\n return function(currentDomain, configOptions) {\n var swfDomain = _extractDomain(configOptions.swfPath);\n if (swfDomain === null) {\n swfDomain = currentDomain;\n }\n var trustedDomains = _extractAllDomains(configOptions.trustedDomains);\n var len = trustedDomains.length;\n if (len > 0) {\n if (len === 1 && trustedDomains[0] === \"*\") {\n return \"always\";\n }\n if (trustedDomains.indexOf(currentDomain) !== -1) {\n if (len === 1 && currentDomain === swfDomain) {\n return \"sameDomain\";\n }\n return \"always\";\n }\n }\n return \"never\";\n };\n }();\n /**\n * Get the currently active/focused DOM element.\n *\n * @returns the currently active/focused element, or `null`\n * @private\n */\n var _safeActiveElement = function() {\n try {\n return _document.activeElement;\n } catch (err) {\n return null;\n }\n };\n /**\n * Add a class to an element, if it doesn't already have it.\n *\n * @returns The element, with its new class added.\n * @private\n */\n var _addClass = function(element, value) {\n var c, cl, className, classNames = [];\n if (typeof value === \"string\" && value) {\n classNames = value.split(/\\s+/);\n }\n if (element && element.nodeType === 1 && classNames.length > 0) {\n className = (\" \" + (element.className || \"\") + \" \").replace(/[\\t\\r\\n\\f]/g, \" \");\n for (c = 0, cl = classNames.length; c < cl; c++) {\n if (className.indexOf(\" \" + classNames[c] + \" \") === -1) {\n className += classNames[c] + \" \";\n }\n }\n className = className.replace(/^\\s+|\\s+$/g, \"\");\n if (className !== element.className) {\n element.className = className;\n }\n }\n return element;\n };\n /**\n * Remove a class from an element, if it has it.\n *\n * @returns The element, with its class removed.\n * @private\n */\n var _removeClass = function(element, value) {\n var c, cl, className, classNames = [];\n if (typeof value === \"string\" && value) {\n classNames = value.split(/\\s+/);\n }\n if (element && element.nodeType === 1 && classNames.length > 0) {\n if (element.className) {\n className = (\" \" + element.className + \" \").replace(/[\\t\\r\\n\\f]/g, \" \");\n for (c = 0, cl = classNames.length; c < cl; c++) {\n className = className.replace(\" \" + classNames[c] + \" \", \" \");\n }\n className = className.replace(/^\\s+|\\s+$/g, \"\");\n if (className !== element.className) {\n element.className = className;\n }\n }\n }\n return element;\n };\n /**\n * Attempt to interpret the element's CSS styling. If `prop` is `\"cursor\"`,\n * then we assume that it should be a hand (\"pointer\") cursor if the element\n * is an anchor element (\"a\" tag).\n *\n * @returns The computed style property.\n * @private\n */\n var _getStyle = function(el, prop) {\n var value = _getComputedStyle(el, null).getPropertyValue(prop);\n if (prop === \"cursor\") {\n if (!value || value === \"auto\") {\n if (el.nodeName === \"A\") {\n return \"pointer\";\n }\n }\n }\n return value;\n };\n /**\n * Get the absolutely positioned coordinates of a DOM element.\n *\n * @returns Object containing the element's position, width, and height.\n * @private\n */\n var _getElementPosition = function(el) {\n var pos = {\n left: 0,\n top: 0,\n width: 0,\n height: 0\n };\n if (el.getBoundingClientRect) {\n var elRect = el.getBoundingClientRect();\n var pageXOffset = _window.pageXOffset;\n var pageYOffset = _window.pageYOffset;\n var leftBorderWidth = _document.documentElement.clientLeft || 0;\n var topBorderWidth = _document.documentElement.clientTop || 0;\n var leftBodyOffset = 0;\n var topBodyOffset = 0;\n if (_getStyle(_document.body, \"position\") === \"relative\") {\n var bodyRect = _document.body.getBoundingClientRect();\n var htmlRect = _document.documentElement.getBoundingClientRect();\n leftBodyOffset = bodyRect.left - htmlRect.left || 0;\n topBodyOffset = bodyRect.top - htmlRect.top || 0;\n }\n pos.left = elRect.left + pageXOffset - leftBorderWidth - leftBodyOffset;\n pos.top = elRect.top + pageYOffset - topBorderWidth - topBodyOffset;\n pos.width = \"width\" in elRect ? elRect.width : elRect.right - elRect.left;\n pos.height = \"height\" in elRect ? elRect.height : elRect.bottom - elRect.top;\n }\n return pos;\n };\n /**\n * Determine is an element is visible somewhere within the document (page).\n *\n * @returns Boolean\n * @private\n */\n var _isElementVisible = function(el) {\n if (!el) {\n return false;\n }\n var styles = _getComputedStyle(el, null);\n if (!styles) {\n return false;\n }\n var hasCssHeight = _parseFloat(styles.height) > 0;\n var hasCssWidth = _parseFloat(styles.width) > 0;\n var hasCssTop = _parseFloat(styles.top) >= 0;\n var hasCssLeft = _parseFloat(styles.left) >= 0;\n var cssKnows = hasCssHeight && hasCssWidth && hasCssTop && hasCssLeft;\n var rect = cssKnows ? null : _getElementPosition(el);\n var isVisible = styles.display !== \"none\" && styles.visibility !== \"collapse\" && (cssKnows || !!rect && (hasCssHeight || rect.height > 0) && (hasCssWidth || rect.width > 0) && (hasCssTop || rect.top >= 0) && (hasCssLeft || rect.left >= 0));\n return isVisible;\n };\n /**\n * Clear all existing timeouts and interval polling delegates.\n *\n * @returns `undefined`\n * @private\n */\n var _clearTimeoutsAndPolling = function() {\n _clearTimeout(_flashCheckTimeout);\n _flashCheckTimeout = 0;\n _clearInterval(_swfFallbackCheckInterval);\n _swfFallbackCheckInterval = 0;\n };\n /**\n * Reposition the Flash object to cover the currently activated element.\n *\n * @returns `undefined`\n * @private\n */\n var _reposition = function() {\n var htmlBridge;\n if (_currentElement && (htmlBridge = _getHtmlBridge(_flashState.bridge))) {\n var pos = _getElementPosition(_currentElement);\n _extend(htmlBridge.style, {\n width: pos.width + \"px\",\n height: pos.height + \"px\",\n top: pos.top + \"px\",\n left: pos.left + \"px\",\n zIndex: \"\" + _getSafeZIndex(_globalConfig.zIndex)\n });\n }\n };\n /**\n * Sends a signal to the Flash object to display the hand cursor if `true`.\n *\n * @returns `undefined`\n * @private\n */\n var _setHandCursor = function(enabled) {\n if (_flashState.ready === true) {\n if (_flashState.bridge && typeof _flashState.bridge.setHandCursor === \"function\") {\n _flashState.bridge.setHandCursor(enabled);\n } else {\n _flashState.ready = false;\n }\n }\n };\n /**\n * Get a safe value for `zIndex`\n *\n * @returns an integer, or \"auto\"\n * @private\n */\n var _getSafeZIndex = function(val) {\n if (/^(?:auto|inherit)$/.test(val)) {\n return val;\n }\n var zIndex;\n if (typeof val === \"number\" && !_isNaN(val)) {\n zIndex = val;\n } else if (typeof val === \"string\") {\n zIndex = _getSafeZIndex(_parseInt(val, 10));\n }\n return typeof zIndex === \"number\" ? zIndex : \"auto\";\n };\n /**\n * Ensure OS-compliant line endings, i.e. \"\\r\\n\" on Windows, \"\\n\" elsewhere\n *\n * @returns string\n * @private\n */\n var _fixLineEndings = function(content) {\n var replaceRegex = /(\\r\\n|\\r|\\n)/g;\n if (typeof content === \"string\" && _globalConfig.fixLineEndings === true) {\n if (_isWindows()) {\n if (/((^|[^\\r])\\n|\\r([^\\n]|$))/.test(content)) {\n content = content.replace(replaceRegex, \"\\r\\n\");\n }\n } else if (/\\r/.test(content)) {\n content = content.replace(replaceRegex, \"\\n\");\n }\n }\n return content;\n };\n /**\n * Attempt to detect if ZeroClipboard is executing inside of a sandboxed iframe.\n * If it is, Flash Player cannot be used, so ZeroClipboard is dead in the water.\n *\n * @see {@link http://lists.w3.org/Archives/Public/public-whatwg-archive/2014Dec/0002.html}\n * @see {@link https://github.com/zeroclipboard/zeroclipboard/issues/511}\n * @see {@link http://zeroclipboard.org/test-iframes.html}\n *\n * @returns `true` (is sandboxed), `false` (is not sandboxed), or `null` (uncertain)\n * @private\n */\n var _detectSandbox = function(doNotReassessFlashSupport) {\n var effectiveScriptOrigin, frame, frameError, previousState = _flashState.sandboxed, isSandboxed = null;\n doNotReassessFlashSupport = doNotReassessFlashSupport === true;\n if (_pageIsFramed === false) {\n isSandboxed = false;\n } else {\n try {\n frame = window.frameElement || null;\n } catch (e) {\n frameError = {\n name: e.name,\n message: e.message\n };\n }\n if (frame && frame.nodeType === 1 && frame.nodeName === \"IFRAME\") {\n try {\n isSandboxed = frame.hasAttribute(\"sandbox\");\n } catch (e) {\n isSandboxed = null;\n }\n } else {\n try {\n effectiveScriptOrigin = document.domain || null;\n } catch (e) {\n effectiveScriptOrigin = null;\n }\n if (effectiveScriptOrigin === null || frameError && frameError.name === \"SecurityError\" && /(^|[\\s\\(\\[@])sandbox(es|ed|ing|[\\s\\.,!\\)\\]@]|$)/.test(frameError.message.toLowerCase())) {\n isSandboxed = true;\n }\n }\n }\n _flashState.sandboxed = isSandboxed;\n if (previousState !== isSandboxed && !doNotReassessFlashSupport) {\n _detectFlashSupport(_ActiveXObject);\n }\n return isSandboxed;\n };\n /**\n * Detect the Flash Player status, version, and plugin type.\n *\n * @see {@link https://code.google.com/p/doctype-mirror/wiki/ArticleDetectFlash#The_code}\n * @see {@link http://stackoverflow.com/questions/12866060/detecting-pepper-ppapi-flash-with-javascript}\n *\n * @returns `undefined`\n * @private\n */\n var _detectFlashSupport = function(ActiveXObject) {\n var plugin, ax, mimeType, hasFlash = false, isActiveX = false, isPPAPI = false, flashVersion = \"\";\n /**\n * Derived from Apple's suggested sniffer.\n * @param {String} desc e.g. \"Shockwave Flash 7.0 r61\"\n * @returns {String} \"7.0.61\"\n * @private\n */\n function parseFlashVersion(desc) {\n var matches = desc.match(/[\\d]+/g);\n matches.length = 3;\n return matches.join(\".\");\n }\n function isPepperFlash(flashPlayerFileName) {\n return !!flashPlayerFileName && (flashPlayerFileName = flashPlayerFileName.toLowerCase()) && (/^(pepflashplayer\\.dll|libpepflashplayer\\.so|pepperflashplayer\\.plugin)$/.test(flashPlayerFileName) || flashPlayerFileName.slice(-13) === \"chrome.plugin\");\n }\n function inspectPlugin(plugin) {\n if (plugin) {\n hasFlash = true;\n if (plugin.version) {\n flashVersion = parseFlashVersion(plugin.version);\n }\n if (!flashVersion && plugin.description) {\n flashVersion = parseFlashVersion(plugin.description);\n }\n if (plugin.filename) {\n isPPAPI = isPepperFlash(plugin.filename);\n }\n }\n }\n if (_navigator.plugins && _navigator.plugins.length) {\n plugin = _navigator.plugins[\"Shockwave Flash\"];\n inspectPlugin(plugin);\n if (_navigator.plugins[\"Shockwave Flash 2.0\"]) {\n hasFlash = true;\n flashVersion = \"2.0.0.11\";\n }\n } else if (_navigator.mimeTypes && _navigator.mimeTypes.length) {\n mimeType = _navigator.mimeTypes[\"application/x-shockwave-flash\"];\n plugin = mimeType && mimeType.enabledPlugin;\n inspectPlugin(plugin);\n } else if (typeof ActiveXObject !== \"undefined\") {\n isActiveX = true;\n try {\n ax = new ActiveXObject(\"ShockwaveFlash.ShockwaveFlash.7\");\n hasFlash = true;\n flashVersion = parseFlashVersion(ax.GetVariable(\"$version\"));\n } catch (e1) {\n try {\n ax = new ActiveXObject(\"ShockwaveFlash.ShockwaveFlash.6\");\n hasFlash = true;\n flashVersion = \"6.0.21\";\n } catch (e2) {\n try {\n ax = new ActiveXObject(\"ShockwaveFlash.ShockwaveFlash\");\n hasFlash = true;\n flashVersion = parseFlashVersion(ax.GetVariable(\"$version\"));\n } catch (e3) {\n isActiveX = false;\n }\n }\n }\n }\n _flashState.disabled = hasFlash !== true;\n _flashState.outdated = flashVersion && _parseFloat(flashVersion) < _parseFloat(_minimumFlashVersion);\n _flashState.version = flashVersion || \"0.0.0\";\n _flashState.pluginType = isPPAPI ? \"pepper\" : isActiveX ? \"activex\" : hasFlash ? \"netscape\" : \"unknown\";\n };\n /**\n * Invoke the Flash detection algorithms immediately upon inclusion so we're not waiting later.\n */\n _detectFlashSupport(_ActiveXObject);\n /**\n * Always assess the `sandboxed` state of the page at important Flash-related moments.\n */\n _detectSandbox(true);\n /**\n * A shell constructor for `ZeroClipboard` client instances.\n *\n * @constructor\n */\n var ZeroClipboard = function() {\n if (!(this instanceof ZeroClipboard)) {\n return new ZeroClipboard();\n }\n if (typeof ZeroClipboard._createClient === \"function\") {\n ZeroClipboard._createClient.apply(this, _args(arguments));\n }\n };\n /**\n * The ZeroClipboard library's version number.\n *\n * @static\n * @readonly\n * @property {string}\n */\n ZeroClipboard.version = \"2.3.0\";\n /**\n * Update or get a copy of the ZeroClipboard global configuration.\n * Returns a copy of the current/updated configuration.\n *\n * @returns Object\n * @static\n */\n ZeroClipboard.config = function() {\n return _config.apply(this, _args(arguments));\n };\n /**\n * Diagnostic method that describes the state of the browser, Flash Player, and ZeroClipboard.\n *\n * @returns Object\n * @static\n */\n ZeroClipboard.state = function() {\n return _state.apply(this, _args(arguments));\n };\n /**\n * Check if Flash is unusable for any reason: disabled, outdated, deactivated, etc.\n *\n * @returns Boolean\n * @static\n */\n ZeroClipboard.isFlashUnusable = function() {\n return _isFlashUnusable.apply(this, _args(arguments));\n };\n /**\n * Register an event listener.\n *\n * @returns `ZeroClipboard`\n * @static\n */\n ZeroClipboard.on = function() {\n return _on.apply(this, _args(arguments));\n };\n /**\n * Unregister an event listener.\n * If no `listener` function/object is provided, it will unregister all listeners for the provided `eventType`.\n * If no `eventType` is provided, it will unregister all listeners for every event type.\n *\n * @returns `ZeroClipboard`\n * @static\n */\n ZeroClipboard.off = function() {\n return _off.apply(this, _args(arguments));\n };\n /**\n * Retrieve event listeners for an `eventType`.\n * If no `eventType` is provided, it will retrieve all listeners for every event type.\n *\n * @returns array of listeners for the `eventType`; if no `eventType`, then a map/hash object of listeners for all event types; or `null`\n */\n ZeroClipboard.handlers = function() {\n return _listeners.apply(this, _args(arguments));\n };\n /**\n * Event emission receiver from the Flash object, forwarding to any registered JavaScript event listeners.\n *\n * @returns For the \"copy\" event, returns the Flash-friendly \"clipData\" object; otherwise `undefined`.\n * @static\n */\n ZeroClipboard.emit = function() {\n return _emit.apply(this, _args(arguments));\n };\n /**\n * Create and embed the Flash object.\n *\n * @returns The Flash object\n * @static\n */\n ZeroClipboard.create = function() {\n return _create.apply(this, _args(arguments));\n };\n /**\n * Self-destruct and clean up everything, including the embedded Flash object.\n *\n * @returns `undefined`\n * @static\n */\n ZeroClipboard.destroy = function() {\n return _destroy.apply(this, _args(arguments));\n };\n /**\n * Set the pending data for clipboard injection.\n *\n * @returns `undefined`\n * @static\n */\n ZeroClipboard.setData = function() {\n return _setData.apply(this, _args(arguments));\n };\n /**\n * Clear the pending data for clipboard injection.\n * If no `format` is provided, all pending data formats will be cleared.\n *\n * @returns `undefined`\n * @static\n */\n ZeroClipboard.clearData = function() {\n return _clearData.apply(this, _args(arguments));\n };\n /**\n * Get a copy of the pending data for clipboard injection.\n * If no `format` is provided, a copy of ALL pending data formats will be returned.\n *\n * @returns `String` or `Object`\n * @static\n */\n ZeroClipboard.getData = function() {\n return _getData.apply(this, _args(arguments));\n };\n /**\n * Sets the current HTML object that the Flash object should overlay. This will put the global\n * Flash object on top of the current element; depending on the setup, this may also set the\n * pending clipboard text data as well as the Flash object's wrapping element's title attribute\n * based on the underlying HTML element and ZeroClipboard configuration.\n *\n * @returns `undefined`\n * @static\n */\n ZeroClipboard.focus = ZeroClipboard.activate = function() {\n return _focus.apply(this, _args(arguments));\n };\n /**\n * Un-overlays the Flash object. This will put the global Flash object off-screen; depending on\n * the setup, this may also unset the Flash object's wrapping element's title attribute based on\n * the underlying HTML element and ZeroClipboard configuration.\n *\n * @returns `undefined`\n * @static\n */\n ZeroClipboard.blur = ZeroClipboard.deactivate = function() {\n return _blur.apply(this, _args(arguments));\n };\n /**\n * Returns the currently focused/\"activated\" HTML element that the Flash object is wrapping.\n *\n * @returns `HTMLElement` or `null`\n * @static\n */\n ZeroClipboard.activeElement = function() {\n return _activeElement.apply(this, _args(arguments));\n };\n /**\n * Keep track of the ZeroClipboard client instance counter.\n */\n var _clientIdCounter = 0;\n /**\n * Keep track of the state of the client instances.\n *\n * Entry structure:\n * _clientMeta[client.id] = {\n * instance: client,\n * elements: [],\n * handlers: {},\n * coreWildcardHandler: function(event) { return client.emit(event); }\n * };\n */\n var _clientMeta = {};\n /**\n * Keep track of the ZeroClipboard clipped elements counter.\n */\n var _elementIdCounter = 0;\n /**\n * Keep track of the state of the clipped element relationships to clients.\n *\n * Entry structure:\n * _elementMeta[element.zcClippingId] = [client1.id, client2.id];\n */\n var _elementMeta = {};\n /**\n * Keep track of the state of the mouse event handlers for clipped elements.\n *\n * Entry structure:\n * _mouseHandlers[element.zcClippingId] = {\n * mouseover: function(event) {},\n * mouseout: function(event) {},\n * mouseenter: function(event) {},\n * mouseleave: function(event) {},\n * mousemove: function(event) {}\n * };\n */\n var _mouseHandlers = {};\n /**\n * Extending the ZeroClipboard configuration defaults for the Client module.\n */\n _extend(_globalConfig, {\n autoActivate: true\n });\n /**\n * The real constructor for `ZeroClipboard` client instances.\n * @private\n */\n var _clientConstructor = function(elements) {\n var meta, client = this;\n client.id = \"\" + _clientIdCounter++;\n meta = {\n instance: client,\n elements: [],\n handlers: {},\n coreWildcardHandler: function(event) {\n return client.emit(event);\n }\n };\n _clientMeta[client.id] = meta;\n if (elements) {\n client.clip(elements);\n }\n ZeroClipboard.on(\"*\", meta.coreWildcardHandler);\n ZeroClipboard.on(\"destroy\", function() {\n client.destroy();\n });\n ZeroClipboard.create();\n };\n /**\n * The underlying implementation of `ZeroClipboard.Client.prototype.on`.\n * @private\n */\n var _clientOn = function(eventType, listener) {\n var i, len, events, added = {}, client = this, meta = _clientMeta[client.id], handlers = meta && meta.handlers;\n if (!meta) {\n throw new Error(\"Attempted to add new listener(s) to a destroyed ZeroClipboard client instance\");\n }\n if (typeof eventType === \"string\" && eventType) {\n events = eventType.toLowerCase().split(/\\s+/);\n } else if (typeof eventType === \"object\" && eventType && !(\"length\" in eventType) && typeof listener === \"undefined\") {\n _keys(eventType).forEach(function(key) {\n var listener = eventType[key];\n if (typeof listener === \"function\") {\n client.on(key, listener);\n }\n });\n }\n if (events && events.length && listener) {\n for (i = 0, len = events.length; i < len; i++) {\n eventType = events[i].replace(/^on/, \"\");\n added[eventType] = true;\n if (!handlers[eventType]) {\n handlers[eventType] = [];\n }\n handlers[eventType].push(listener);\n }\n if (added.ready && _flashState.ready) {\n this.emit({\n type: \"ready\",\n client: this\n });\n }\n if (added.error) {\n for (i = 0, len = _flashStateErrorNames.length; i < len; i++) {\n if (_flashState[_flashStateErrorNames[i].replace(/^flash-/, \"\")]) {\n this.emit({\n type: \"error\",\n name: _flashStateErrorNames[i],\n client: this\n });\n break;\n }\n }\n if (_zcSwfVersion !== undefined && ZeroClipboard.version !== _zcSwfVersion) {\n this.emit({\n type: \"error\",\n name: \"version-mismatch\",\n jsVersion: ZeroClipboard.version,\n swfVersion: _zcSwfVersion\n });\n }\n }\n }\n return client;\n };\n /**\n * The underlying implementation of `ZeroClipboard.Client.prototype.off`.\n * @private\n */\n var _clientOff = function(eventType, listener) {\n var i, len, foundIndex, events, perEventHandlers, client = this, meta = _clientMeta[client.id], handlers = meta && meta.handlers;\n if (!handlers) {\n return client;\n }\n if (arguments.length === 0) {\n events = _keys(handlers);\n } else if (typeof eventType === \"string\" && eventType) {\n events = eventType.split(/\\s+/);\n } else if (typeof eventType === \"object\" && eventType && !(\"length\" in eventType) && typeof listener === \"undefined\") {\n _keys(eventType).forEach(function(key) {\n var listener = eventType[key];\n if (typeof listener === \"function\") {\n client.off(key, listener);\n }\n });\n }\n if (events && events.length) {\n for (i = 0, len = events.length; i < len; i++) {\n eventType = events[i].toLowerCase().replace(/^on/, \"\");\n perEventHandlers = handlers[eventType];\n if (perEventHandlers && perEventHandlers.length) {\n if (listener) {\n foundIndex = perEventHandlers.indexOf(listener);\n while (foundIndex !== -1) {\n perEventHandlers.splice(foundIndex, 1);\n foundIndex = perEventHandlers.indexOf(listener, foundIndex);\n }\n } else {\n perEventHandlers.length = 0;\n }\n }\n }\n }\n return client;\n };\n /**\n * The underlying implementation of `ZeroClipboard.Client.prototype.handlers`.\n * @private\n */\n var _clientListeners = function(eventType) {\n var copy = null, handlers = _clientMeta[this.id] && _clientMeta[this.id].handlers;\n if (handlers) {\n if (typeof eventType === \"string\" && eventType) {\n copy = handlers[eventType] ? handlers[eventType].slice(0) : [];\n } else {\n copy = _deepCopy(handlers);\n }\n }\n return copy;\n };\n /**\n * The underlying implementation of `ZeroClipboard.Client.prototype.emit`.\n * @private\n */\n var _clientEmit = function(event) {\n var eventCopy, client = this;\n if (_clientShouldEmit.call(client, event)) {\n if (typeof event === \"object\" && event && typeof event.type === \"string\" && event.type) {\n event = _extend({}, event);\n }\n eventCopy = _extend({}, _createEvent(event), {\n client: client\n });\n _clientDispatchCallbacks.call(client, eventCopy);\n }\n return client;\n };\n /**\n * The underlying implementation of `ZeroClipboard.Client.prototype.clip`.\n * @private\n */\n var _clientClip = function(elements) {\n if (!_clientMeta[this.id]) {\n throw new Error(\"Attempted to clip element(s) to a destroyed ZeroClipboard client instance\");\n }\n elements = _prepClip(elements);\n for (var i = 0; i < elements.length; i++) {\n if (_hasOwn.call(elements, i) && elements[i] && elements[i].nodeType === 1) {\n if (!elements[i].zcClippingId) {\n elements[i].zcClippingId = \"zcClippingId_\" + _elementIdCounter++;\n _elementMeta[elements[i].zcClippingId] = [ this.id ];\n if (_globalConfig.autoActivate === true) {\n _addMouseHandlers(elements[i]);\n }\n } else if (_elementMeta[elements[i].zcClippingId].indexOf(this.id) === -1) {\n _elementMeta[elements[i].zcClippingId].push(this.id);\n }\n var clippedElements = _clientMeta[this.id] && _clientMeta[this.id].elements;\n if (clippedElements.indexOf(elements[i]) === -1) {\n clippedElements.push(elements[i]);\n }\n }\n }\n return this;\n };\n /**\n * The underlying implementation of `ZeroClipboard.Client.prototype.unclip`.\n * @private\n */\n var _clientUnclip = function(elements) {\n var meta = _clientMeta[this.id];\n if (!meta) {\n return this;\n }\n var clippedElements = meta.elements;\n var arrayIndex;\n if (typeof elements === \"undefined\") {\n elements = clippedElements.slice(0);\n } else {\n elements = _prepClip(elements);\n }\n for (var i = elements.length; i--; ) {\n if (_hasOwn.call(elements, i) && elements[i] && elements[i].nodeType === 1) {\n arrayIndex = 0;\n while ((arrayIndex = clippedElements.indexOf(elements[i], arrayIndex)) !== -1) {\n clippedElements.splice(arrayIndex, 1);\n }\n var clientIds = _elementMeta[elements[i].zcClippingId];\n if (clientIds) {\n arrayIndex = 0;\n while ((arrayIndex = clientIds.indexOf(this.id, arrayIndex)) !== -1) {\n clientIds.splice(arrayIndex, 1);\n }\n if (clientIds.length === 0) {\n if (_globalConfig.autoActivate === true) {\n _removeMouseHandlers(elements[i]);\n }\n delete elements[i].zcClippingId;\n }\n }\n }\n }\n return this;\n };\n /**\n * The underlying implementation of `ZeroClipboard.Client.prototype.elements`.\n * @private\n */\n var _clientElements = function() {\n var meta = _clientMeta[this.id];\n return meta && meta.elements ? meta.elements.slice(0) : [];\n };\n /**\n * The underlying implementation of `ZeroClipboard.Client.prototype.destroy`.\n * @private\n */\n var _clientDestroy = function() {\n var meta = _clientMeta[this.id];\n if (!meta) {\n return;\n }\n this.unclip();\n this.off();\n ZeroClipboard.off(\"*\", meta.coreWildcardHandler);\n delete _clientMeta[this.id];\n };\n /**\n * Inspect an Event to see if the Client (`this`) should honor it for emission.\n * @private\n */\n var _clientShouldEmit = function(event) {\n if (!(event && event.type)) {\n return false;\n }\n if (event.client && event.client !== this) {\n return false;\n }\n var meta = _clientMeta[this.id];\n var clippedEls = meta && meta.elements;\n var hasClippedEls = !!clippedEls && clippedEls.length > 0;\n var goodTarget = !event.target || hasClippedEls && clippedEls.indexOf(event.target) !== -1;\n var goodRelTarget = event.relatedTarget && hasClippedEls && clippedEls.indexOf(event.relatedTarget) !== -1;\n var goodClient = event.client && event.client === this;\n if (!meta || !(goodTarget || goodRelTarget || goodClient)) {\n return false;\n }\n return true;\n };\n /**\n * Handle the actual dispatching of events to a client instance.\n *\n * @returns `undefined`\n * @private\n */\n var _clientDispatchCallbacks = function(event) {\n var meta = _clientMeta[this.id];\n if (!(typeof event === \"object\" && event && event.type && meta)) {\n return;\n }\n var async = _shouldPerformAsync(event);\n var wildcardTypeHandlers = meta && meta.handlers[\"*\"] || [];\n var specificTypeHandlers = meta && meta.handlers[event.type] || [];\n var handlers = wildcardTypeHandlers.concat(specificTypeHandlers);\n if (handlers && handlers.length) {\n var i, len, func, context, eventCopy, originalContext = this;\n for (i = 0, len = handlers.length; i < len; i++) {\n func = handlers[i];\n context = originalContext;\n if (typeof func === \"string\" && typeof _window[func] === \"function\") {\n func = _window[func];\n }\n if (typeof func === \"object\" && func && typeof func.handleEvent === \"function\") {\n context = func;\n func = func.handleEvent;\n }\n if (typeof func === \"function\") {\n eventCopy = _extend({}, event);\n _dispatchCallback(func, context, [ eventCopy ], async);\n }\n }\n }\n };\n /**\n * Prepares the elements for clipping/unclipping.\n *\n * @returns An Array of elements.\n * @private\n */\n var _prepClip = function(elements) {\n if (typeof elements === \"string\") {\n elements = [];\n }\n return typeof elements.length !== \"number\" ? [ elements ] : elements;\n };\n /**\n * Add a `mouseover` handler function for a clipped element.\n *\n * @returns `undefined`\n * @private\n */\n var _addMouseHandlers = function(element) {\n if (!(element && element.nodeType === 1)) {\n return;\n }\n var _suppressMouseEvents = function(event) {\n if (!(event || (event = _window.event))) {\n return;\n }\n if (event._source !== \"js\") {\n event.stopImmediatePropagation();\n event.preventDefault();\n }\n delete event._source;\n };\n var _elementMouseOver = function(event) {\n if (!(event || (event = _window.event))) {\n return;\n }\n _suppressMouseEvents(event);\n ZeroClipboard.focus(element);\n };\n element.addEventListener(\"mouseover\", _elementMouseOver, false);\n element.addEventListener(\"mouseout\", _suppressMouseEvents, false);\n element.addEventListener(\"mouseenter\", _suppressMouseEvents, false);\n element.addEventListener(\"mouseleave\", _suppressMouseEvents, false);\n element.addEventListener(\"mousemove\", _suppressMouseEvents, false);\n _mouseHandlers[element.zcClippingId] = {\n mouseover: _elementMouseOver,\n mouseout: _suppressMouseEvents,\n mouseenter: _suppressMouseEvents,\n mouseleave: _suppressMouseEvents,\n mousemove: _suppressMouseEvents\n };\n };\n /**\n * Remove a `mouseover` handler function for a clipped element.\n *\n * @returns `undefined`\n * @private\n */\n var _removeMouseHandlers = function(element) {\n if (!(element && element.nodeType === 1)) {\n return;\n }\n var mouseHandlers = _mouseHandlers[element.zcClippingId];\n if (!(typeof mouseHandlers === \"object\" && mouseHandlers)) {\n return;\n }\n var key, val, mouseEvents = [ \"move\", \"leave\", \"enter\", \"out\", \"over\" ];\n for (var i = 0, len = mouseEvents.length; i < len; i++) {\n key = \"mouse\" + mouseEvents[i];\n val = mouseHandlers[key];\n if (typeof val === \"function\") {\n element.removeEventListener(key, val, false);\n }\n }\n delete _mouseHandlers[element.zcClippingId];\n };\n /**\n * Creates a new ZeroClipboard client instance.\n * Optionally, auto-`clip` an element or collection of elements.\n *\n * @constructor\n */\n ZeroClipboard._createClient = function() {\n _clientConstructor.apply(this, _args(arguments));\n };\n /**\n * Register an event listener to the client.\n *\n * @returns `this`\n */\n ZeroClipboard.prototype.on = function() {\n return _clientOn.apply(this, _args(arguments));\n };\n /**\n * Unregister an event handler from the client.\n * If no `listener` function/object is provided, it will unregister all handlers for the provided `eventType`.\n * If no `eventType` is provided, it will unregister all handlers for every event type.\n *\n * @returns `this`\n */\n ZeroClipboard.prototype.off = function() {\n return _clientOff.apply(this, _args(arguments));\n };\n /**\n * Retrieve event listeners for an `eventType` from the client.\n * If no `eventType` is provided, it will retrieve all listeners for every event type.\n *\n * @returns array of listeners for the `eventType`; if no `eventType`, then a map/hash object of listeners for all event types; or `null`\n */\n ZeroClipboard.prototype.handlers = function() {\n return _clientListeners.apply(this, _args(arguments));\n };\n /**\n * Event emission receiver from the Flash object for this client's registered JavaScript event listeners.\n *\n * @returns For the \"copy\" event, returns the Flash-friendly \"clipData\" object; otherwise `undefined`.\n */\n ZeroClipboard.prototype.emit = function() {\n return _clientEmit.apply(this, _args(arguments));\n };\n /**\n * Register clipboard actions for new element(s) to the client.\n *\n * @returns `this`\n */\n ZeroClipboard.prototype.clip = function() {\n return _clientClip.apply(this, _args(arguments));\n };\n /**\n * Unregister the clipboard actions of previously registered element(s) on the page.\n * If no elements are provided, ALL registered elements will be unregistered.\n *\n * @returns `this`\n */\n ZeroClipboard.prototype.unclip = function() {\n return _clientUnclip.apply(this, _args(arguments));\n };\n /**\n * Get all of the elements to which this client is clipped.\n *\n * @returns array of clipped elements\n */\n ZeroClipboard.prototype.elements = function() {\n return _clientElements.apply(this, _args(arguments));\n };\n /**\n * Self-destruct and clean up everything for a single client.\n * This will NOT destroy the embedded Flash object.\n *\n * @returns `undefined`\n */\n ZeroClipboard.prototype.destroy = function() {\n return _clientDestroy.apply(this, _args(arguments));\n };\n /**\n * Stores the pending plain text to inject into the clipboard.\n *\n * @returns `this`\n */\n ZeroClipboard.prototype.setText = function(text) {\n if (!_clientMeta[this.id]) {\n throw new Error(\"Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance\");\n }\n ZeroClipboard.setData(\"text/plain\", text);\n return this;\n };\n /**\n * Stores the pending HTML text to inject into the clipboard.\n *\n * @returns `this`\n */\n ZeroClipboard.prototype.setHtml = function(html) {\n if (!_clientMeta[this.id]) {\n throw new Error(\"Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance\");\n }\n ZeroClipboard.setData(\"text/html\", html);\n return this;\n };\n /**\n * Stores the pending rich text (RTF) to inject into the clipboard.\n *\n * @returns `this`\n */\n ZeroClipboard.prototype.setRichText = function(richText) {\n if (!_clientMeta[this.id]) {\n throw new Error(\"Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance\");\n }\n ZeroClipboard.setData(\"application/rtf\", richText);\n return this;\n };\n /**\n * Stores the pending data to inject into the clipboard.\n *\n * @returns `this`\n */\n ZeroClipboard.prototype.setData = function() {\n if (!_clientMeta[this.id]) {\n throw new Error(\"Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance\");\n }\n ZeroClipboard.setData.apply(this, _args(arguments));\n return this;\n };\n /**\n * Clears the pending data to inject into the clipboard.\n * If no `format` is provided, all pending data formats will be cleared.\n *\n * @returns `this`\n */\n ZeroClipboard.prototype.clearData = function() {\n if (!_clientMeta[this.id]) {\n throw new Error(\"Attempted to clear pending clipboard data from a destroyed ZeroClipboard client instance\");\n }\n ZeroClipboard.clearData.apply(this, _args(arguments));\n return this;\n };\n /**\n * Gets a copy of the pending data to inject into the clipboard.\n * If no `format` is provided, a copy of ALL pending data formats will be returned.\n *\n * @returns `String` or `Object`\n */\n ZeroClipboard.prototype.getData = function() {\n if (!_clientMeta[this.id]) {\n throw new Error(\"Attempted to get pending clipboard data from a destroyed ZeroClipboard client instance\");\n }\n return ZeroClipboard.getData.apply(this, _args(arguments));\n };\n if (typeof define === \"function\" && define.amd) {\n define(function() {\n return ZeroClipboard;\n });\n } else if (typeof module === \"object\" && module && typeof module.exports === \"object\" && module.exports) {\n module.exports = ZeroClipboard;\n } else {\n window.ZeroClipboard = ZeroClipboard;\n }\n})(function() {\n return this || window;\n}());\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/zeroclipboard/dist/ZeroClipboard.js\n// module id = 438\n// module chunks = 0"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;A;;;;;;;;;ACtDA;AA+BA;AAwBA;AA+BA;AA0BA;AAmCA;AAWA;AAcA;AAoBA;AAwIA;AAUA;AAUA;AAIA;AAsBA;AAcA;AAeA;AAyBA;AAqCA;AAoDA;AAeA;AAgBA;AAcA;AAaA;AAkDA;AA4BA;AAsCA;AAUA;AAUA;AAqBA;AAUA;AAIA;AAQA;AAcA;AA6BA;AAuBA;AAoBA;AA8DA;AAcA;AAUA;AAOA;AAWA;AAcA;AAeA;AAaA;AACA;AAr+BA;AACA;AAAA;AACA;AACA;;;;;;;AAOA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAGA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;;;ACt+BA;AAUA;AAUA;AAmCA;AAwBA;AAyBA;AAyBA;AAmBA;AAWA;AAWA;AAUA;AAcA;AAUA;AA5MA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AAAA;AAAA;AAAA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AAAA;AAAA;AAAA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9MA;AAyCA;AAcA;AAcA;AA2BA;AAcA;AAiBA;AA4DA;AAUA;AAIA;AAgBA;AAmBA;AAuBA;AA4BA;AA+BA;AACA;AAvUA;AACA;;;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AAJA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AADA;AAIA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AATA;AACA;AAWA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;ACxUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1CA;AACA;AACA;AAkQA;AACA;AApQA;AACA;AAAA;AACA;AAAA;AACA;;;AACA;;;;;AAKA;AACA;AACA;;;;;;;AAMA;AACA;;;;AAIA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AAQA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA;AAgBA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AALA;AACA;AAOA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;;;;;;AChQA;AAkBA;AAuBA;AAqBA;AApEA;;;;;;AAMA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtEA;AACA;;;AAAA;AACA;AAAA;AACA;;;AACA;AACA;AACA;;;;;;AATA;;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;;;;;;;;;;AClFA;AAWA;AASA;AAgBA;AAcA;AAcA;AAUA;AACA;AAlFA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;;;;;;;ACnFA;AACA;AAAA;AACA;;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AAqBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;AAOA;AACA;AAEA;;;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;AAkBA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA;AAAA;AACA;AADA;AACA;AAAA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AAaA;AAAA;AACA;AADA;AACA;AAAA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AAcA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AAaA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AAcA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AAqBA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;ACpyDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACRA;AACA;;;AAAA;AACA;;;AACA;AACA;;;AAAA;AACA;;;AACA;AACA;;;AAAA;AACA;;;AACA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AACA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;;;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpDA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AACA;AACA;AACA;AACA;;;;AAGA;AACA;;;AAGA;AAAA;AACA;AADA;AACA;AAAA;;;;;AAKA;AACA;AADA;AAGA;AACA;AADA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AAGA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;AC1LA;AACA;AACA;AACA;;;;;;;;;;;;ACAA;AACA;AAAA;AACA;;;;;AALA;;;AAMA;AAAA;AACA;AAGA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;ACjEA;AAcA;AAuCA;AASA;AACA;AApHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1CA;AACA;AA4CA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AA8BA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AChIA;AACA;AACA;;;;;;;;;;;;;ACKA;AA6BA;AAUA;AASA;AACA;AAvDA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA;AACA;AAgBA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;;;;;;AChDA;AAUA;AAoBA;AAgBA;AAYA;AAkBA;AACA;AAtFA;AACA;AAAA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AAFA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;AAQA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;;ACrFA;AAOA;AAIA;AAIA;AAIA;AAIA;AAaA;AAeA;AAgBA;AAeA;AA2BA;AAgBA;AAKA;AA2CA;AACA;AAlLA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtLA;AACA;AACA;AACA;AACA;;;;;AAPA;;;AAYA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;;;;;;ACrDA;AACA;AACA;AACA;AACA;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACfA;AACA;AACA;AACA;;;;;;ACHA;AACA;AACA;AACA;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACLA;AACA;AAGA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;;;;;AACA;AACA;AACA;;;;;;;AAMA;;;;;AA2DA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AA1GA;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AAQA;;;AAqDA;AAAA;AACA;AAAA;AACA;AADA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AAKA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;AAGA;;;;;;;;;;AChRA;AAMA;AAMA;AAMA;AAIA;AACA;AAzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;;;;;;;;;;;;;ACKA;AASA;AAIA;AASA;AA8BA;AAiBA;AAzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACvHA;AAWA;AAkDA;AA6BA;AA2BA;AAeA;AA4BA;AA2CA;AACA;AApNA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AAAA;AACA;AAAA;AACA;AACA;AADA;AAGA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AAAA;AAAA;AAAA;AACA;AADA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;AAsBA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;AAsBA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACtOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACnBA;AACA;AACA;AACA;AACA;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACNA;AACA;AACA;AACA;AACA;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACPA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACJA;;;;;;AAMA;AACA;;;;AAIA;AAAA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;AChGA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChRA;AACA;AAaA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlEA;AACA;AAoEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AAvCA;AACA;AAyCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AACA;AAPA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjBA;AACA;AAmBA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC1YA;AACA;;;;;;ACDA;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACpDA;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACNA;AACA;AACA;AACA;AACA;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACl2IA;AAoBA;AAoBA;AAwBA;AAwBA;AAeA;AAsCA;AACA;AA1JA;AACA;;;AAAA;AACA;;;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACnMA;AACA;;;;AAYA;;;;AAZA;AACA;;;;AAYA;;;;AAZA;AACA;;;;AAYA;;;;AAZA;AACA;;;;AAYA;;;;AAZA;AACA;;;;AAYA;;;;AAZA;AACA;;;;AAYA;;;;AAZA;AACA;;;;AAYA;;;;AAZA;AACA;;;;AAYA;;;;AAZA;AACA;;;;AAYA;;;;AAZA;AACA;;;;AAYA;;;;AAZA;AACA;;;;AAYA;;;;AAZA;AACA;;;;AAYA;;;AA2BA;AAgBA;AACA;AArEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA;AACA;AAIA;AACA;AAcA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;ACxEA;AACA;AACA;AACA;AACA;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACxBA;;;;;;ACAA;;;;;;ACAA;AACA;AACA;AACA;AACA;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACLA;AACA;;;;;;;AACA;;;;;AAKA;AACA;;;;;;;AAOA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AAIA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AACA;AAdA;AAgBA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;AC7aA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AACA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AACA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;;;AACA;AACA;AACA;AACA;AAHA;;;;AAMA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AAJA;AACA;AAMA;AACA;AACA;AACA;AACA;AAJA;AACA;AAMA;AACA;AACA;AACA;AACA;AAJA;AACA;AAMA;AACA;AACA;AACA;AAHA;AACA;AAKA;AACA;AACA;AACA;AAHA;AACA;AAKA;AACA;AACA;AACA;AACA;AAJA;AACA;AAMA;AACA;AACA;AACA;AACA;AAFA;AADA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AACA;AAWA;;;;;;;;;;;;;;;ACrDA;AACA;AAxDA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;;;;;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AACA;AAUA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhGA;AACA;AAkGA;AACA;AACA;AACA;AACA;AACA;AAAA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;;;;;;;;AAaA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAKA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA7JA;AA+JA;AAzbA;AACA;AA2bA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AACA;AAIA;;;;;AAKA;AAAA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;;;AAGA;AACA;AACA;AACA;AACA;AAAA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;AAGA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;AAKA;AACA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAAA;;;AAGA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;AAGA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAtYA;AACA;AAwYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAlBA;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAbA;AAAA;AACA;AAeA;AACA;AACA;AADA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAIA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AAAA;AAAA;AAAA;AACA;AAIA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AAiBA;AAAA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AAiBA;AAAA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;;AASA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AAAA;AAAA;AACA;AACA;;;;;;;;;AASA;AAAA;AAAA;AACA;AACA;;;;;;;;;;;AAWA;AAAA;AAAA;AACA;AACA;;;;;;;;;;;AAWA;AAAA;AAAA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;;;AAUA;AACA;AAAA;AACA;AAEA;AACA;AAIA;AACA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AAcA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AAAA;AACA;AADA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AAYA;AAAA;AACA;AADA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AAAA;AACA;AAEA;AACA;AACA;AANA;AACA;AADA;AACA;AAMA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AAaA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AAYA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;;;;;;;;;;AC/uGA;AAVA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACZA;AACA;AAVA;AACA;AAAA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpBA;AACA;AAAA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;;;AAGA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AACA;AADA;AAAA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;;;AAGA;AACA;AACA;AApCA;AACA;AAsCA;AACA;AACA;AAFA;AACA;AAIA;;;;;;;;;;ACpDA;AAFA;AACA;AACA;AACA;AACA;AADA;AAGA;;;;;;;;;;;;;ACNA;AACA;AAAA;AACA;;;AACA;;;;AAIA;AACA;AAAA;AACA;AAAA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;;AAMA;AACA;;;;;;AAMA;AACA;AADA;AAGA;AACA;AACA;;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;;ACrVA;AAIA;AACA;AA7GA;AACA;;;AAAA;AACA;;;;;AACA;;;;AAIA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9HA;AACA;AAAA;AACA;AAAA;AACA;;;;;AACA;;;;AAIA;;;;AACA;;;;;AAKA;AACA;AACA;;;AAEA;AAAA;AACA;AAAA;;;;;;AAMA;AACA;;;;;AAKA;AACA;;;;;;AAMA;AACA;;;;;;AAMA;AACA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;AAEA;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;ACxLA;AACA;AACA;AACA;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACNA;AACA;AACA;AACA;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACXA;AACA;AACA;AACA;AACA;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACNA;AACA;AACA;AACA;AACA;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5wCA;;;;;;;;;;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvFA;AACA;AAyFA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;;;;;;AAMA;AACA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AADA;AAIA;AACA;AACA;AACA;AAEA;AACA;AADA;AAIA;AACA;AA1BA;AA4BA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAGA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AArCA;AAuCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhBA;AAkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlCA;AAoCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AAKA;AACA;AAtBA;AAwBA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnnBA;AACA;AAQA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;;;;;AACA;;;AAGA;AACA;;;;AAIA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AALA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAGA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAHA;AAKA;AAAA;AAAA;AALA;AACA;AAGA;AAAA;AAEA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AACA;AAMA;AACA;AACA;AACA;AACA;AAJA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;;;ACjfA;AACA;AACA;;;;;;;AAMA;;;;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AAUA;AACA;AAAA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA;AACA;AASA;;;;;AAKA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;;;ACtRA;AACA;AACA;;;;;;;AAMA;;;;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AASA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA;AACA;AASA;;;;;AAKA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;ACrJA;AACA;AAKA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;;;;;AACA;;;AAGA;AACA;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AAQA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AAMA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;AC1QA;AACA;AAKA;AACA;AAAA;AACA;AAAA;AACA;;;;;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AAsBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC1RA;;;AAGA;AACA;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;;;AChFA;;;AAGA;AACA;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;AChFA;AACA;AAKA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;;;;;AACA;;;AAGA;AACA;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AAbA;AACA;AAkBA;AACA;AACA;AACA;AAFA;AAIA;AACA;AADA;AAGA;AACA;AADA;AAGA;AACA;AADA;AAXA;AACA;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAFA;AAIA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AADA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;AC5vBA;AACA;AAMA;AACA;;;AACA;;;AAGA;AACA;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AAJA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAWA;;;;;;AAGA;;;;;;;;;;;;;ACxQA;AACA;AAAA;AACA;;;AACA;;;AAGA;AACA;;;;AAIA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhFA;AACA;AAkFA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAOA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AAUA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;;;AC9KA;AACA;AAUA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;;;;;;;AACA;;;AAGA;AACA;;;;AAIA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGA;AAEA;AACA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAEA;AAEA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;ACpoBA;AACA;AAOA;AACA;;;;;;;AACA;AACA;AACA;;;;AAGA;AACA;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACppBA;AACA;AAOA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;;;;;AACA;;;AAGA;AACA;;;AAGA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AAGA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AAAA;AAKA;AACA;AACA;;;;;;;;;;AAOA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AAAA;AAIA;AAAA;AAEA;AACA;AACA;;;;;;;;;;;AAQA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AAGA;AAEA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AAGA;AAEA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;ACzeA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AAuBA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;;;AAWA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;;AAOA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;AAsBA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AAuBA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;AAMA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AAqBA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA;AACA;AACA;;;;;;;;;;;;;;;;;;AAkBA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AACA;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AAqBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AAuBA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;;;;;;AAMA;AAl2DA;AACA;AAo2DA;;;;;;;;;;;AC96DA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAUA;AACA;AAAA;AACA;;;;;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA9BA;AACA;AAgCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAFA;AAAA;AAAA;AAAA;AAAA;AACA;AAGA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/ZA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;;;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnBA;AACA;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzLA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;;AAOA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;;AAOA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;AAGA;AACA;AACA;AApIA;AACA;AAsIA;AACA;AACA;AAFA;AACA;AAIA;;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAzBA;AACA;AA2BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChDA;AACA;AAAA;AACA;;;AACA;;;;;;AAMA;AACA;AAAA;AACA;AAAA;AACA;AACA;AAAA;AAEA;AAAA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AAAA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;;;AAOA;AAAA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;AC9GA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;;;AACA;;;;AAIA;AACA;AAAA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AAAA;AAAA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;AC/DA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAIA;AACA;AAAA;AACA;AAAA;;;;;AAKA;AACA;;;;;;AAMA;AACA;;;;;AAKA;AACA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AAFA;AAIA;;;;;;AAGA;;;;;;;;;;;;;ACrKA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;;;AACA;;;;AAIA;AACA;AAAA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AAAA;AAAA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;;;;;AAIA;AACA;AAAA;AACA;AAAA;;;;;AAKA;AACA;;;;;;AAMA;AACA;;;;;AAKA;AACA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AAFA;AAIA;;;;;;AAGA;;;;;;;;;;;;;;;ACnKA;;;;;;;;AAQA;;;;;;AAMA;AACA;AACA;AAAA;;;;AAIA;AACA;;;;AAIA;AACA;;;;AAIA;AACA;AACA;AAEA;;;;;;;;AAMA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAEA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAEA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5JA;AACA;AA1GA;AACA;;;AACA;;;;AAIA;;;AACA;AACA;AACA;;;AAEA;AAAA;AACA;AADA;AACA;AAAA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;AAGA;AACA;;;;;;AAMA;AACA;;;;;;AAMA;AACA;;;;;;AAMA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AClEA;AAuBA;AACA;AArEA;AACA;;;;;AACA;;;;;;;;AAQA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;;;;;;;;;;AAUA;AAAA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AClFA;;;;;;ACAA;AACA;AACA;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACPA;AACA;AACA;AACA;AACA;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACrEA;AACA;AACA;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACXA;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AChBA;AACA;AACA;AACA;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACRA;AACA;AACA;AACA;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACTA;AACA;AACA;AACA;;;;;;ACHA;AACA;AACA;AACA;;;;;;ACHA;AACA;AACA;AACA;;;;;;ACHA;AACA;AACA;;;;;;ACFA;AACA;AACA;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC1SA;AACA;AACA;AACA;AACA;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC1OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrCA;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AAJA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA;AACA;AACA;AACA;AACA;AACA;AAhBA;AAkBA;AACA;AACA;AACA;AACA;AACA;AAvBA;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAtEA;AAwEA;AACA;AAzEA;AACA;AA2EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA7HA;AA+HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAZA;AAcA;AACA;AACA;AACA;AACA;;;;;;;;;ACvLA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;;;;;;;ACxTA;AACA;AAAA;AACA;;;;;;;;;;;AACA;;;;;;AAMA;;;AACA;;;AAGA;AAAA;AACA;AADA;AACA;AAEA;AACA;AACA;AACA;AACA;AAPA;AAQA;AACA;;;;AAEA;AACA;AACA;;;;;;;;;;;;;AC1BA;AACA;AAWA;AACA;;;;;;;;;;;AACA;;;AAGA;;;AACA;;;AAGA;AAAA;AACA;AADA;AACA;AACA;AAFA;AAGA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;AC/SA;AACA;AAWA;AACA;;;;;;;;;;;AACA;;;AAGA;;;AACA;;;AAGA;AAAA;AACA;AADA;AACA;AACA;AAFA;AAGA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;AC/VA;AACA;AAKA;AACA;;;;;;;;;;;AACA;;;AAGA;;;AACA;;;AAGA;AAAA;AACA;AADA;AACA;AACA;AAFA;AAGA;AACA;AACA;;;;;;;;;AAKA;AACA;AAEA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;;;AC7EA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;;;;;AACA;;;AAGA;AACA;;;;AAIA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;AC9NA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;;;AACA;;;;;;;;;;;AAWA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AAAA;AAAA;AAAA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AAGA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;;;AAKA;AAAA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC12BA;AACA;AAAA;AACA;AAAA;AACA;;;AACA;;;;AAIA;AACA;AAAA;AACA;AADA;AACA;AAAA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAOA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AASA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;ACjNA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAtJA;AAwJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxaA;AACA;AAAA;AACA;;;AAAA;AACA;;;;;;;;;AACA;;;;;AAKA;;;;;;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;;;AChCA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;;;;;;;;;AACA;;;;;;AAMA;;;AACA;;;;AAIA;AAAA;AACA;AADA;AACA;AAEA;AACA;AACA;AALA;AAMA;AACA;;;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AAAA;AAAA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;;;ACtPA;AACA;AAAA;AACA;;;AAAA;AACA;;;;;;;;;;;AACA;;;;;;AAMA;;;;;;;;;;;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AAAA;AACA;AAAA;AACA;AAWA;AACA;AAAA;AACA;;;AAAA;AACA;;;;;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAAA;AAAA;AAGA;AACA;AAFA;AACA;AAIA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AChUA;AACA;;;AAAA;AACA;AAAA;AACA;;;;;;;;;;;AACA;;;;;;AAMA;;;;;;;;;;;;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;;;AC5BA;AACA;AAAA;AACA;AAAA;AACA;;;;;;;;;;;AACA;;;;;;AAMA;;;;;;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;AC5BA;AACA;AAWA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;;;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AArBA;AAuBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjBA;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AAzBA;AACA;AA2BA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC9PA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClDA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;;;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;AADA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACnKA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;;;;;;;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA;;;;;AACA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AAAA;AACA;AADA;AACA;AACA;AACA;;;;;;;AAOA;AARA;AAUA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;AAKA;AAAA;AAAA;AACA;;;;;AAKA;AACA;;;;;AAKA;AACA;AACA;AACA;AAAA;AAAA;AA5CA;AA6CA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AAAA;AACA;AADA;AACA;AADA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AAFA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AADA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;;;AC5fA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;;;;;;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA;;;;;AACA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AAAA;AACA;AACA;;;;;AAFA;AACA;AAMA;AACA;;;;;AAKA;AACA;;;;;AAKA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;;;;;AAKA;AACA;;;;;AAKA;AACA;AACA;AACA;AAAA;AAAA;AA5CA;AA6CA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AAAA;AACA;AADA;AACA;AADA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;;;AChfA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AAcA;;;AACA;AAAA;AACA;AACA;;;;;AAFA;AACA;AAMA;AACA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;AAKA;AA3CA;AA4CA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA;AAAA;AAAA;AAAA;AACA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAWA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AAIA;AAIA;AACA;AACA;;;;;;;;;AAMA;AACA;AAIA;AAIA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;ACrgBA;AAyCA;AA8CA;AACA;AA1GA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AAFA;AACA;AAIA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AAKA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACjJA;AACA;;;AAAA;AACA;AAIA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;;;;;;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA;;;AAEA;AAAA;AACA;AADA;AACA;AACA;AACA;AACA;AAJA;AAKA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AACA;AACA;AAEA;AACA;AADA;AAGA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;ACrqBA;AACA;;;AACA;;;;;;AAMA;;;AACA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AACA;AACA;;;AAEA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;;;AC3LA;AACA;AASA;AACA;AAEA;AACA;AAEA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;AACA;AACA;;;;;;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA;;;AACA;AAAA;AACA;AACA;;;;;AAFA;AACA;AAMA;AACA;;;;;;AAMA;AACA;;;;;AAKA;AACA;;;;AAIA;AACA;;;;AAIA;AACA;;;;AAIA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AAFA;AA3CA;AA+CA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AAAA;AACA;AAAA;AACA;AADA;AAGA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AADA;AACA;AAGA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AACA;AAGA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAFA;AAKA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AAGA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AANA;AASA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AANA;AASA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAtBA;AAyBA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;ACttBA;AACA;AAAA;AACA;;;AACA;;;;;;AAMA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AADA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC7FA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAaA;AACA;;;;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;;;;;;AACA;;;;;AAKA;AACA;AAaA;;;AAEA;AAAA;AACA;AACA;;;;;AAFA;AACA;AAMA;AACA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;AAKA;AAzBA;AA0BA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AADA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA;AAAA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AADA;AACA;AAGA;AACA;AACA;;;;;;;;;;;;;ACpUA;AACA;AAAA;AACA;AAAA;AACA;;;AAKA;;;;;;AAMA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AAAA;AACA;AAAA;AACA;;;;;;AAGA;AAAA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpHA;AACA;;;AAAA;AACA;AAOA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;;;AACA;;;;AAIA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AALA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAKA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAFA;AAIA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAtBA;AAwBA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1DA;AA4DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;AC1qBA;AACA;AANA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAAA;AA7BA;AAgCA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAAA;AA7BA;AAgCA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAAA;AA7BA;AAgCA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAAA;AA7BA;AAgCA;AADA;AAIA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAAA;AA5BA;AA+BA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAAA;AA7BA;AAgCA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAAA;AA7BA;AA9LA;AANA;AAsOA;;;;;;;;;;;ACxOA;AACA;AALA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AArBA;AAuBA;;;;;;;;;;;ACxBA;AACA;AALA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvBA;AAyBA;;;;;;;;;;;AC1BA;AACA;AALA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxBA;AA0BA;;;;;;;;;;;AC3BA;AACA;AALA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvBA;AAyBA;;;;;;;;;;AC5BA;AAFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAWA;;;;;;;;;;;ACVA;AACA;AALA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAnBA;AAqBA;;;;;;;;;;;ACtBA;AACA;AALA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjBA;AAmBA;;;;;;;;;;;ACpBA;AACA;AALA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA;AAgBA;;;;;;;;;;;ACjBA;AACA;AALA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA;AAgBA;;;;;;;;;;ACnBA;AAFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAWA;;;;;;;;;ACdA;AACA;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AADA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AADA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACrHA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;;;;;;;AACA;;;;;;;;AAQA;;;AACA;;;AAGA;AAAA;AACA;AACA;;;;;AAFA;AACA;AAMA;AACA;;;;;AAKA;AACA;;;;;AAKA;AAnBA;AAoBA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AALA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAYA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;AC7MA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;;;;AAIA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AAAA;AACA;AAEA;AACA;;;;;;;AAOA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjXA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AACA;AACA;;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;;;;;AAKA;AACA;AACA;AADA;AAGA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AAHA;AAKA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA7BA;AA+BA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAbA;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAbA;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAhEA;AANA;AAmFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1hBA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrHA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC/CA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAvBA;AAyBA;;;;;;;;;;AC1BA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAvBA;AAyBA;;;;;;;;;;;;;;;AC1BA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;AACA;AACA;;;;;;;;;AACA;AACA;;;;;;;;AAOA;;;AACA;AAAA;AACA;AADA;AACA;AAEA;AACA;AACA;AAFA;AAIA;;;;;AAKA;AACA;;;AAGA;AAhBA;AAiBA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AAKA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;AAIA;AACA;AACA;;;;;;;;;;;;;;;AC3PA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;AACA;AACA;;;;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAmBA;;;AACA;AAAA;AACA;AAEA;;;AAHA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AANA;AACA;AAaA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;AAKA;AAjDA;AAkDA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AArBA;AAAA;AACA;AAsBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;ACtuBA;AACA;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACjEA;AACA;;;AAAA;AACA;;;;;;;;;AACA;AACA;AACA;;;;;AAIA;;;;;;;;;;;;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;;;ACpBA;AACA;;;AAAA;AACA;;;;;;;;;AACA;AACA;AACA;;;;;AAIA;;;;;;;;;;;;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;;;ACpBA;AACA;;;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;;;;;;;AACA;AACA;AACA;;;;;;;;;;AAUA;;;AAEA;AAAA;AACA;AADA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApBA;AAqBA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;;;ACpgBA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;AACA;AACA;;;;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAmBA;;;AACA;AAAA;AACA;AAEA;;;AAHA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AAJA;AACA;AAWA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;AAKA;AA/CA;AAgDA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA;AAAA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApBA;AAAA;AACA;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;ACpvBA;AACA;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACjEA;AACA;;;AAAA;AACA;;;;;;;;;AACA;AACA;AACA;;;;;AAIA;;;;;;;;;;;;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;;;ACpBA;AACA;;;AAAA;AACA;;;;;;;;;AACA;AACA;AACA;;;;;AAIA;;;;;;;;;;;;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;;;;;;;;;;;;;;;ACpBA;AACA;;;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;;;;;;;AACA;AACA;AACA;;;;;;;;;;AAUA;;;AAEA;AAAA;AACA;AADA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApBA;AAqBA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAIA;AACA;AACA;;;;;;;;;;;ACrcA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AALA;AAOA;AACA;AACA;AACA;AACA;AAXA;AAaA;AACA;AACA;AACA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlBA;AACA;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjBA;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACznBA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;;;;;;;AACA;;;;AAIA;;;AACA;;;AAGA;AAAA;AACA;AACA;;;AAFA;AACA;AAIA;AACA;;;;;AAKA;AACA;;;AAGA;AAfA;AAgBA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AACA;AAKA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AAIA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AAxBA;AA0BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AA1CA;AA4CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AA5CA;AA8CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AAnBA;AAqBA;AACA;AACA;AAnJA;AACA;AAqJA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;AC/WA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;;;AACA;;;;;AAKA;AACA;AAAA;AACA;AAAA;;;;;AAKA;AACA;;;;;AAKA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;;;;;;;AC7FA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;;;;;;;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;;;AACA;AAAA;AACA;AACA;;;;;AAFA;AACA;AAMA;AAPA;AAQA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjBA;AACA;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AAAA;;;;;;;;;;;;;ACrLA;AAqDA;AACA;AA9DA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AAAA;AAAA;AACA;AAOA;AACA;AACA;AAFA;AAIA;;;;;;;;;;;ACzEA;AACA;;;AAAA;AACA;AAAA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAHA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjJA;AACA;;;AAAA;AACA;AAAA;AACA;;;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAvBA;AA0BA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACtIA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;;;;;;;AACA;;;;;AAKA;;;AACA;AAAA;AACA;AAEA;;;;;AAHA;AACA;AAOA;AACA;;;;;AAKA;AACA;;;;;;AAMA;AACA;;;;;;AAMA;AA5BA;AA6BA;AACA;AACA;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AAJA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;;;;;;;;;ACnLA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AACA;;;;;;;;;;;;;;AAVA;;;AAwBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrnBA;AACA;AAAA;AACA;AALA;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvVA;AACA;AAAA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;;;AAAA;AACA;AAAA;AACA;;;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/CA;AACA;AAAA;AACA;AAAA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AAAA;AACA;AAAA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/CA;AACA;AAWA;AACA;;;AAAA;AACA;AAAA;AACA;;;;;AACA;;;;AAIA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAFA;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAFA;AAeA;AACA;AACA;AACA;AAJA;AAOA;AACA;AACA;AACA;AAFA;AAFA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlUA;AACA;AAoUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACzwBA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrDA;AACA;;;AAAA;AACA;AAAA;AACA;;;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC5EA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;;;;;AACA;AACA;AAGA;AAHA;AACA;AAKA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AClEA;AACA;;;;;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/JA;AACA;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpSA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;;;;;;;;ACrCA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7OA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3GA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/GA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA;AASA;AACA;AADA;AAGA;AACA;AACA;AACA;AAHA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AALA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AAIA;AADA;AAKA;AACA;AACA;AACA;AACA;AADA;AAHA;AAOA;AAlBA;AACA;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AANA;AAQA;AACA;AAZA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClTA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AALA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxDA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AAIA;AACA;AACA;AACA;;;;;;;;;ACPA;AACA;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxDA;AACA;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5FA;AACA;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnFA;AACA;;;;;AAAA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3KA;AACA;AAAA;AACA;;;;;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvGA;AACA;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClHA;AACA;;;;;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACTA;AACA;AACA;AACA;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACtPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxqCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;A","sourceRoot":""}
|