Files
seal/static/js/plugins/handsontable/handsontable.full.min.js
2019-07-09 17:41:03 +08:00

53 lines
1.3 MiB
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*!
* Copyright (c) Handsoncode sp. z o.o.
*
* This Handsontable Pro is a commercial software distributed by Handsoncode sp. z o. o., a limited liability
* company registered under the laws of Poland, with its registered office in Gdynia, Poland, at 96/98 Aleja Zwycięstwa,
* postal code 81-451, entered into the Entrepreneurs Register of the National Court Register under number 0000538651,
* share capital: PLN 62,800.00., hereinafter referred to as "HANDSONCODE".
*
* By installing, copying, or otherwise using this software, you agree to be bound by the terms
* of its General Software License Terms ("Terms") outlined in a file "handsontable-pro-general-terms.pdf"
* available in the main directory of the software repository.
* This software is copyrighted and protected by copyright laws and international treaties.
*
* You shall obtain a commercial license for this software at handsontable.com.
*
* YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT USE OF THE SOFTWARE IS AT YOUR OWN RISK AND THAT THE SOFTWARE
* IS PROVIDED "AS IS" WITHOUT ANY WARRANTIES OR CONDITIONS WHATSOEVER. HANDSONCODE EXPRESSLY DISCLAIMS ANY WARRANTY,
* EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGMENT. HANDSONCODE DOES NOT WARRANT THAT THE SOFTWARE AND ITS FUNCTIONALITY,
* RELIABILITY AND PERFORMANCE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE WILL BE
* UNINTERRUPTED OR ERROR FREE.
*
* Version: 6.2.2
* Release date: 19/12/2018 (built at 19/12/2018 13:21:59)
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Handsontable",[],t):"object"==typeof exports?exports.Handsontable=t():e.Handsontable=t()}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=467)}([function(e,t,n){var r=n(11),o=n(22),i=n(31),a=n(25),s=n(43),l=function(e,t,n){var u,c,f,h,d=e&l.F,p=e&l.G,g=e&l.S,v=e&l.P,y=e&l.B,m=p?r:g?r[t]||(r[t]={}):(r[t]||{}).prototype,w=p?o:o[t]||(o[t]={}),b=w.prototype||(w.prototype={});for(u in p&&(n=t),n)f=((c=!d&&m&&void 0!==m[u])?m:n)[u],h=y&&c?s(f,r):v&&"function"==typeof f?s(Function.call,f):f,m&&a(m,u,f,e&l.U),w[u]!=f&&i(w,u,h),v&&b[u]!=f&&(b[u]=f)};r.core=o,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){"use strict";function r(e,t,n,r){var o=-1,i=e,a=n;Array.isArray(e)||(i=Array.from(e));var s=i.length;for(r&&s&&(a=i[o+=1]),o+=1;o<s;)a=t(a,i[o],o,i),o+=1;return a}function o(e,t){var n=0,r=e;Array.isArray(e)||(r=Array.from(e));for(var o=r.length;n<o&&!1!==t(r[n],n,r);)n+=1;return e}function i(e){return r(e,function(e,t){return e+t},0)}t.__esModule=!0,t.to2dArray=function(e){var t=e.length,n=0;for(;n<t;)e[n]=[e[n]],n+=1},t.extendArray=function(e,t){var n=t.length,r=0;for(;r<n;)e.push(t[r]),r+=1},t.pivot=function(e){var t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;for(var n=e.length,r=e[0].length,o=0;o<n;o++)for(var i=0;i<r;i++)t[i]||(t[i]=[]),t[i][o]=e[o][i];return t},t.arrayReduce=r,t.arrayFilter=function(e,t){var n=0,r=e;Array.isArray(e)||(r=Array.from(e));var o=r.length,i=[],a=-1;for(;n<o;){var s=r[n];t(s,n,r)&&(i[a+=1]=s),n+=1}return i},t.arrayMap=function(e,t){var n=0,r=e;Array.isArray(e)||(r=Array.from(e));var o=r.length,i=[],a=-1;for(;n<o;){var s=r[n];i[a+=1]=t(s,n,r),n+=1}return i},t.arrayEach=o,t.arraySum=i,t.arrayMax=function(e){return r(e,function(e,t){return e>t?e:t},Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return r(e,function(e,t){return e<t?e:t},Array.isArray(e)?e[0]:void 0)},t.arrayAvg=function(e){if(!e.length)return 0;return i(e)/e.length},t.arrayFlatten=function e(t){return r(t,function(t,n){return t.concat(Array.isArray(n)?e(n):n)},[])},t.arrayUnique=function(e){var t=[];return o(e,function(e){-1===t.indexOf(e)&&t.push(e)}),t}},function(e,t,n){"use strict";t.__esModule=!0,t.duckSchema=function e(t){var n;Array.isArray(t)?n=[]:(n={},l(t,function(t,r){"__children"!==r&&(t&&"object"===i(t)&&!Array.isArray(t)?n[r]=e(t):Array.isArray(t)?t.length&&"object"===i(t[0])&&!Array.isArray(t[0])?n[r]=[e(t[0])]:n[r]=[]:n[r]=null)}));return n},t.inherit=function(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e},t.extend=function(e,t){return l(t,function(t,n){e[n]=t}),e},t.deepExtend=function e(t,n){l(n,function(r,o){n[o]&&"object"===i(n[o])?(t[o]||(Array.isArray(n[o])?t[o]=[]:"[object Date]"===Object.prototype.toString.call(n[o])?t[o]=n[o]:t[o]={}),e(t[o],n[o])):t[o]=n[o]})},t.deepClone=a,t.clone=function(e){var t={};return l(e,function(e,n){t[n]=e}),t},t.mixin=function(e){e.MIXINS||(e.MIXINS=[]);for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return(0,r.arrayEach)(n,function(t){e.MIXINS.push(t.MIXIN_NAME),l(t,function(t,n){if(void 0!==e.prototype[n])throw new Error("Mixin conflict. Property '".concat(n,"' already exist and cannot be overwritten."));"function"==typeof t?e.prototype[n]=t:Object.defineProperty(e.prototype,n,{get:function(e,t){var n="_".concat(e);return function(){return void 0===this[n]&&(this[n]=function(e){var t=e;return(Array.isArray(t)||s(t))&&(t=a(t)),t}(t)),this[n]}}(n,t),set:function(e){var t="_".concat(e);return function(e){this[t]=e}}(n),configurable:!0})})}),e},t.isObjectEqual=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},t.isObject=s,t.defineGetter=function(e,t,n,r){r.value=n,r.writable=!1!==r.writable,r.enumerable=!1!==r.enumerable,r.configurable=!1!==r.configurable,Object.defineProperty(e,t,r)},t.objectEach=l,t.getProperty=function(e,t){var n=t.split("."),r=e;return l(n,function(e){if(void 0===(r=r[e]))return r=void 0,!1}),r},t.deepObjectSize=function(e){if(!s(e))return 0;return function e(t){var n=0;return s(t)?l(t,function(t){n+=e(t)}):n+=1,n}(e)},t.createObjectPropListener=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r="_".concat(n),i=(o(t={_touched:!1},r,e),o(t,"isTouched",function(){return this._touched}),t);return Object.defineProperty(i,n,{get:function(){return this[r]},set:function(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),i},t.hasOwnProperty=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var r=n(1);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){return"object"===i(e)?JSON.parse(JSON.stringify(e)):e}function s(e){return"[object Object]"===Object.prototype.toString.call(e)}function l(e,t){for(var n in e)if((!e.hasOwnProperty||e.hasOwnProperty&&Object.prototype.hasOwnProperty.call(e,n))&&!1===t(e[n],n,e))break;return e}},function(e,t,n){"use strict";t.__esModule=!0,t.getParent=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=null,o=e;for(;null!==o;){if(n===t){r=o;break}o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o=o.host:(n+=1,o=o.parentNode)}return r},t.closest=u,t.closestDown=function(e,t,n){var r=[],o=e;for(;o&&(o=u(o,t,n))&&(!n||n.contains(o));)r.push(o),o=o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o.host:o.parentNode;var i=r.length;return i?r[i-1]:null},t.isChildOf=function(e,t){var n=e.parentNode,r=[];"string"==typeof t?r=Array.prototype.slice.call(document.querySelectorAll(t),0):r.push(t);for(;null!==n;){if(r.indexOf(n)>-1)return!0;n=n.parentNode}return!1},t.isChildOfWebComponentTable=function(e){var t="hot-table",n=!1,r=c(e);function o(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName===t.toUpperCase()}for(;null!==r;){if(o(r)){n=!0;break}if(r.host&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n=o(r.host))break;r=r.host}r=r.parentNode}return n},t.polymerWrap=c,t.polymerUnwrap=f,t.index=function(e){var t=0,n=e;if(n.previousSibling)for(;n=n.previousSibling;)t+=1;return t},t.overlayContainsElement=function(e,t){var n=document.querySelector(".ht_clone_".concat(e));return n?n.contains(t):null},t.hasClass=function(e,t){return r(e,t)},t.addClass=function(e,t){return o(e,t)},t.removeClass=function(e,t){return i(e,t)},t.removeTextNodes=function e(t,n){if(3===t.nodeType)n.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1)for(var r=t.childNodes,o=r.length-1;o>=0;o--)e(r[o],t)},t.empty=g,t.fastInnerHTML=function(e,t){v.test(t)?e.innerHTML=t:w(e,t)},t.fastInnerText=w,t.isVisible=function e(t){var n=t;for(;f(n)!==document.documentElement;){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n.host){if(n.host.impl)return e(n.host.impl);if(n.host)return e(n.host);throw new Error("Lost in Web Components world")}return!1}if("none"===n.style.display)return!1;n=n.parentNode}return!0},t.offset=function(e){var t,n,r,o,i=document.documentElement,a=e;if((0,s.hasCaptionProblem)()&&a.firstChild&&"CAPTION"===a.firstChild.nodeName)return{top:(o=a.getBoundingClientRect()).top+(window.pageYOffset||i.scrollTop)-(i.clientTop||0),left:o.left+(window.pageXOffset||i.scrollLeft)-(i.clientLeft||0)};t=a.offsetLeft,n=a.offsetTop,r=a;for(;(a=a.offsetParent)&&a!==document.body;)t+=a.offsetLeft,n+=a.offsetTop,r=a;r&&"fixed"===r.style.position&&(t+=window.pageXOffset||i.scrollLeft,n+=window.pageYOffset||i.scrollTop);return{left:t,top:n}},t.getWindowScrollTop=b,t.getWindowScrollLeft=C,t.getScrollTop=function(e){if(e===window)return b();return e.scrollTop},t.getScrollLeft=function(e){if(e===window)return C();return e.scrollLeft},t.getScrollableElement=function(e){var t,n,r,o=["auto","scroll"],i=e.parentNode,a="",s="",l="",u="";for(;i&&i.style&&document.body!==i;){if(t=i.style.overflow,n=i.style.overflowX,r=i.style.overflowY,"scroll"===t||"scroll"===n||"scroll"===r)return i;if(window.getComputedStyle&&(a=window.getComputedStyle(i),s=a.getPropertyValue("overflow"),l=a.getPropertyValue("overflow-y"),u=a.getPropertyValue("overflow-x"),"scroll"===s||"scroll"===u||"scroll"===l))return i;if(i.clientHeight<=i.scrollHeight+1&&(-1!==o.indexOf(r)||-1!==o.indexOf(t)||-1!==o.indexOf(s)||-1!==o.indexOf(l)))return i;if(i.clientWidth<=i.scrollWidth+1&&(-1!==o.indexOf(n)||-1!==o.indexOf(t)||-1!==o.indexOf(s)||-1!==o.indexOf(u)))return i;i=i.parentNode}return window},t.getTrimmingContainer=function(e){var t=e.parentNode;for(;t&&t.style&&document.body!==t;){if("visible"!==t.style.overflow&&""!==t.style.overflow)return t;var n=E(t),r=["scroll","hidden","auto"],o=n.getPropertyValue("overflow"),i=n.getPropertyValue("overflow-y"),a=n.getPropertyValue("overflow-x");if(r.includes(o)||r.includes(i)||r.includes(a))return t;t=t.parentNode}return window},t.getStyle=function(e,t){if(!e)return;if(e===window)return"width"===t?window.innerWidth+"px":"height"===t?window.innerHeight+"px":void 0;var n,r=e.style[t];if(""!==r&&void 0!==r)return r;if(""!==(n=E(e))[t]&&void 0!==n[t])return n[t]},t.getComputedStyle=E,t.outerWidth=function(e){return e.offsetWidth},t.outerHeight=function(e){if((0,s.hasCaptionProblem)()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName)return e.offsetHeight+e.firstChild.offsetHeight;return e.offsetHeight},t.innerHeight=function(e){return e.clientHeight||e.innerHeight},t.innerWidth=function(e){return e.clientWidth||e.innerWidth},t.addEvent=function(e,t,n){window.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},t.removeEvent=function(e,t,n){window.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;if(document.selection){e.focus();var t=document.selection.createRange();if(null==t)return 0;var n=e.createTextRange(),r=n.duplicate();return n.moveToBookmark(t.getBookmark()),r.setEndPoint("EndToStart",n),r.text.length}return 0},t.getSelectionEndPosition=function(e){if(e.selectionEnd)return e.selectionEnd;if(document.selection){var t=document.selection.createRange();if(null==t)return 0;var n=e.createTextRange();return n.text.indexOf(t.text)+t.text.length}return 0},t.getSelectionText=function(){var e="";window.getSelection?e=window.getSelection().toString():document.selection&&"Control"!==document.selection.type&&(e=document.selection.createRange().text);return e},t.setCaretPosition=function(e,t,n){void 0===n&&(n=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(i){var r=e.parentNode,o=r.style.display;r.style.display="block",e.setSelectionRange(t,n),r.style.display=o}}else if(e.createTextRange){var i=e.createTextRange();i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i.select()}},t.getScrollbarWidth=function(){void 0===y&&(y=function(){var e=document.createElement("div");e.style.height="200px",e.style.width="100%";var t=document.createElement("div");t.style.boxSizing="content-box",t.style.height="150px",t.style.left="0px",t.style.overflow="hidden",t.style.position="absolute",t.style.top="0px",t.style.width="200px",t.style.visibility="hidden",t.appendChild(e),(document.body||document.documentElement).appendChild(t);var n=e.offsetWidth;t.style.overflow="scroll";var r=e.offsetWidth;n==r&&(r=t.clientWidth);return(document.body||document.documentElement).removeChild(t),n-r}());return y},t.hasVerticalScrollbar=function(e){return e.offsetWidth!==e.clientWidth},t.hasHorizontalScrollbar=function(e){return e.offsetHeight!==e.clientHeight},t.setOverlayPosition=function(e,t,n){(0,a.isIE8)()||(0,a.isIE9)()?(e.style.top=n,e.style.left=t):(0,a.isSafari)()?e.style["-webkit-transform"]="translate3d("+t+","+n+",0)":e.style.transform="translate3d("+t+","+n+",0)"},t.getCssTransform=function(e){var t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];if(e.style["-webkit-transform"]&&""!==(t=e.style["-webkit-transform"]))return["-webkit-transform",t];return-1},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform?e.style.transform="":e.style["-webkit-transform"]&&""!==e.style["-webkit-transform"]&&(e.style["-webkit-transform"]="")},t.isInput=O,t.isOutsideInput=function(e){return O(e)&&-1==e.className.indexOf("handsontableInput")&&-1==e.className.indexOf("copyPaste")},t.HTML_CHARACTERS=void 0;var r,o,i,a=n(48),s=n(49);function l(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function u(e,t,n){for(var r=e;null!==r&&r!==n;){if(r.nodeType===Node.ELEMENT_NODE&&(t.indexOf(r.nodeName)>-1||t.indexOf(r)>-1))return r;r=r.host&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r.host:r.parentNode}return null}function c(e){return"undefined"!=typeof Polymer&&"function"==typeof wrap?wrap(e):e}function f(e){return"undefined"!=typeof Polymer&&"function"==typeof unwrap?unwrap(e):e}function h(e){var t=[];if(!e||!e.length)return t;for(var n=0;e[n];)t.push(e[n]),n+=1;return t}if(!!document.documentElement.classList){var d=function(){var e=document.createElement("div");return e.classList.add("test","test2"),e.classList.contains("test2")}();r=function(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)},o=function(e,t){var n,r=t;if("string"==typeof r&&(r=r.split(" ")),(r=h(r)).length>0)if(d)(n=e.classList).add.apply(n,l(r));else for(var o=0;r&&r[o];)e.classList.add(r[o]),o+=1},i=function(e,t){var n,r=t;if("string"==typeof r&&(r=r.split(" ")),(r=h(r)).length>0)if(d)(n=e.classList).remove.apply(n,l(r));else for(var o=0;r&&r[o];)e.classList.remove(r[o]),o+=1}}else{var p=function(e){return new RegExp("(\\s|^)".concat(e,"(\\s|$)"))};r=function(e,t){return void 0!==e.className&&p(t).test(e.className)},o=function(e,t){var n=0,r=e.className,o=t;if("string"==typeof o&&(o=o.split(" ")),""===r)r=o.join(" ");else for(;o&&o[n];)p(o[n]).test(r)||(r+=" ".concat(o[n])),n+=1;e.className=r},i=function(e,t){var n=0,r=e.className,o=t;for("string"==typeof o&&(o=o.split(" "));o&&o[n];)r=r.replace(p(o[n])," ").trim(),n+=1;e.className!==r&&(e.className=r)}}function g(e){for(var t;t=e.lastChild;)e.removeChild(t)}var v=/(<(.*)>|&(.*);)/;t.HTML_CHARACTERS=v;var y,m=!!document.createTextNode("test").textContent;function w(e,t){var n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?m?n.textContent=t:n.data=t:(g(e),e.appendChild(document.createTextNode(t)))}function b(){var e=window.scrollY;return void 0===e&&(e=document.documentElement.scrollTop),e}function C(){var e=window.scrollX;return void 0===e&&(e=document.documentElement.scrollLeft),e}function E(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}function O(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}},function(e,t,n){"use strict";t.__esModule=!0,t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=t.FILTERS_BUTTONS_CANCEL=t.FILTERS_BUTTONS_OK=t.FILTERS_BUTTONS_CLEAR=t.FILTERS_BUTTONS_SELECT_ALL=t.FILTERS_VALUES_BLANK_CELLS=t.FILTERS_LABELS_DISJUNCTION=t.FILTERS_LABELS_CONJUNCTION=t.FILTERS_DIVS_FILTER_BY_VALUE=t.FILTERS_DIVS_FILTER_BY_CONDITION=t.FILTERS_CONDITIONS_YESTERDAY=t.FILTERS_CONDITIONS_TOMORROW=t.FILTERS_CONDITIONS_TODAY=t.FILTERS_CONDITIONS_BEFORE=t.FILTERS_CONDITIONS_AFTER=t.FILTERS_CONDITIONS_NOT_BETWEEN=t.FILTERS_CONDITIONS_BETWEEN=t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=t.FILTERS_CONDITIONS_LESS_THAN=t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=t.FILTERS_CONDITIONS_GREATER_THAN=t.FILTERS_CONDITIONS_BY_VALUE=t.FILTERS_CONDITIONS_NOT_CONTAIN=t.FILTERS_CONDITIONS_CONTAINS=t.FILTERS_CONDITIONS_ENDS_WITH=t.FILTERS_CONDITIONS_BEGINS_WITH=t.FILTERS_CONDITIONS_NOT_EQUAL=t.FILTERS_CONDITIONS_EQUAL=t.FILTERS_CONDITIONS_NOT_EMPTY=t.FILTERS_CONDITIONS_EMPTY=t.FILTERS_CONDITIONS_NONE=t.FILTERS_CONDITIONS_NAMESPACE=t.FILTERS_NAMESPACE=t.CONTEXTMENU_ITEMS_SHOW_ROW=t.CONTEXTMENU_ITEMS_HIDE_ROW=t.CONTEXTMENU_ITEMS_SHOW_COLUMN=t.CONTEXTMENU_ITEMS_HIDE_COLUMN=t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=t.CONTEXTMENU_ITEMS_BORDERS_LEFT=t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=t.CONTEXTMENU_ITEMS_BORDERS_TOP=t.CONTEXTMENU_ITEMS_BORDERS=t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=t.CONTEXTMENU_ITEMS_ALIGNMENT=t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=t.CONTEXTMENU_ITEMS_EDIT_COMMENT=t.CONTEXTMENU_ITEMS_ADD_COMMENT=t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=t.CONTEXTMENU_ITEMS_MERGE_CELLS=t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=t.CONTEXTMENU_ITEMS_CUT=t.CONTEXTMENU_ITEMS_COPY=t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=t.CONTEXTMENU_ITEMS_READ_ONLY=t.CONTEXTMENU_ITEMS_REDO=t.CONTEXTMENU_ITEMS_UNDO=t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=t.CONTEXTMENU_ITEMS_REMOVE_ROW=t.CONTEXTMENU_ITEMS_INSERT_RIGHT=t.CONTEXTMENU_ITEMS_INSERT_LEFT=t.CONTEXTMENU_ITEMS_ROW_BELOW=t.CONTEXTMENU_ITEMS_ROW_ABOVE=t.CONTEXT_MENU_ITEMS_NAMESPACE=void 0;t.CONTEXT_MENU_ITEMS_NAMESPACE="ContextMenu:items";var r="".concat("ContextMenu:items",".insertRowAbove");t.CONTEXTMENU_ITEMS_ROW_ABOVE=r;var o="".concat("ContextMenu:items",".insertRowBelow");t.CONTEXTMENU_ITEMS_ROW_BELOW=o;var i="".concat("ContextMenu:items",".insertColumnOnTheLeft");t.CONTEXTMENU_ITEMS_INSERT_LEFT=i;var a="".concat("ContextMenu:items",".insertColumnOnTheRight");t.CONTEXTMENU_ITEMS_INSERT_RIGHT=a;var s="".concat("ContextMenu:items",".removeRow");t.CONTEXTMENU_ITEMS_REMOVE_ROW=s;var l="".concat("ContextMenu:items",".removeColumn");t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=l;var u="".concat("ContextMenu:items",".undo");t.CONTEXTMENU_ITEMS_UNDO=u;var c="".concat("ContextMenu:items",".redo");t.CONTEXTMENU_ITEMS_REDO=c;var f="".concat("ContextMenu:items",".readOnly");t.CONTEXTMENU_ITEMS_READ_ONLY=f;var h="".concat("ContextMenu:items",".clearColumn");t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=h;var d="".concat("ContextMenu:items",".copy");t.CONTEXTMENU_ITEMS_COPY=d;var p="".concat("ContextMenu:items",".cut");t.CONTEXTMENU_ITEMS_CUT=p;var g="".concat("ContextMenu:items",".freezeColumn");t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=g;var v="".concat("ContextMenu:items",".unfreezeColumn");t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=v;var y="".concat("ContextMenu:items",".mergeCells");t.CONTEXTMENU_ITEMS_MERGE_CELLS=y;var m="".concat("ContextMenu:items",".unmergeCells");t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=m;var w="".concat("ContextMenu:items",".addComment");t.CONTEXTMENU_ITEMS_ADD_COMMENT=w;var b="".concat("ContextMenu:items",".editComment");t.CONTEXTMENU_ITEMS_EDIT_COMMENT=b;var C="".concat("ContextMenu:items",".removeComment");t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=C;var E="".concat("ContextMenu:items",".readOnlyComment");t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=E;var O="".concat("ContextMenu:items",".align");t.CONTEXTMENU_ITEMS_ALIGNMENT=O;var S="".concat("ContextMenu:items",".align.left");t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=S;var _="".concat("ContextMenu:items",".align.center");t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=_;var T="".concat("ContextMenu:items",".align.right");t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=T;var R="".concat("ContextMenu:items",".align.justify");t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=R;var M="".concat("ContextMenu:items",".align.top");t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=M;var k="".concat("ContextMenu:items",".align.middle");t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=k;var N="".concat("ContextMenu:items",".align.bottom");t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=N;var A="".concat("ContextMenu:items",".borders");t.CONTEXTMENU_ITEMS_BORDERS=A;var I="".concat("ContextMenu:items",".borders.top");t.CONTEXTMENU_ITEMS_BORDERS_TOP=I;var D="".concat("ContextMenu:items",".borders.right");t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=D;var P="".concat("ContextMenu:items",".borders.bottom");t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=P;var x="".concat("ContextMenu:items",".borders.left");t.CONTEXTMENU_ITEMS_BORDERS_LEFT=x;var L="".concat("ContextMenu:items",".borders.remove");t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=L;var H="".concat("ContextMenu:items",".nestedHeaders.insertChildRow");t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=H;var j="".concat("ContextMenu:items",".nestedHeaders.detachFromParent");t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=j;var F="".concat("ContextMenu:items",".hideColumn");t.CONTEXTMENU_ITEMS_HIDE_COLUMN=F;var V="".concat("ContextMenu:items",".showColumn");t.CONTEXTMENU_ITEMS_SHOW_COLUMN=V;var B="".concat("ContextMenu:items",".hideRow");t.CONTEXTMENU_ITEMS_HIDE_ROW=B;var U="".concat("ContextMenu:items",".showRow");t.CONTEXTMENU_ITEMS_SHOW_ROW=U;t.FILTERS_NAMESPACE="Filters:";var W="".concat("Filters:","conditions");t.FILTERS_CONDITIONS_NAMESPACE=W;var Y="".concat(W,".none");t.FILTERS_CONDITIONS_NONE=Y;var $="".concat(W,".isEmpty");t.FILTERS_CONDITIONS_EMPTY=$;var G="".concat(W,".isNotEmpty");t.FILTERS_CONDITIONS_NOT_EMPTY=G;var z="".concat(W,".isEqualTo");t.FILTERS_CONDITIONS_EQUAL=z;var X="".concat(W,".isNotEqualTo");t.FILTERS_CONDITIONS_NOT_EQUAL=X;var K="".concat(W,".beginsWith");t.FILTERS_CONDITIONS_BEGINS_WITH=K;var q="".concat(W,".endsWith");t.FILTERS_CONDITIONS_ENDS_WITH=q;var Z="".concat(W,".contains");t.FILTERS_CONDITIONS_CONTAINS=Z;var Q="".concat(W,".doesNotContain");t.FILTERS_CONDITIONS_NOT_CONTAIN=Q;var J="".concat(W,".byValue");t.FILTERS_CONDITIONS_BY_VALUE=J;var ee="".concat(W,".greaterThan");t.FILTERS_CONDITIONS_GREATER_THAN=ee;var te="".concat(W,".greaterThanOrEqualTo");t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=te;var ne="".concat(W,".lessThan");t.FILTERS_CONDITIONS_LESS_THAN=ne;var re="".concat(W,".lessThanOrEqualTo");t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=re;var oe="".concat(W,".isBetween");t.FILTERS_CONDITIONS_BETWEEN=oe;var ie="".concat(W,".isNotBetween");t.FILTERS_CONDITIONS_NOT_BETWEEN=ie;var ae="".concat(W,".after");t.FILTERS_CONDITIONS_AFTER=ae;var se="".concat(W,".before");t.FILTERS_CONDITIONS_BEFORE=se;var le="".concat(W,".today");t.FILTERS_CONDITIONS_TODAY=le;var ue="".concat(W,".tomorrow");t.FILTERS_CONDITIONS_TOMORROW=ue;var ce="".concat(W,".yesterday");t.FILTERS_CONDITIONS_YESTERDAY=ce;var fe="".concat("Filters:","labels.filterByCondition");t.FILTERS_DIVS_FILTER_BY_CONDITION=fe;var he="".concat("Filters:","labels.filterByValue");t.FILTERS_DIVS_FILTER_BY_VALUE=he;var de="".concat("Filters:","labels.conjunction");t.FILTERS_LABELS_CONJUNCTION=de;var pe="".concat("Filters:","labels.disjunction");t.FILTERS_LABELS_DISJUNCTION=pe;var ge="".concat("Filters:","values.blankCells");t.FILTERS_VALUES_BLANK_CELLS=ge;var ve="".concat("Filters:","buttons.selectAll");t.FILTERS_BUTTONS_SELECT_ALL=ve;var ye="".concat("Filters:","buttons.clear");t.FILTERS_BUTTONS_CLEAR=ye;var me="".concat("Filters:","buttons.ok");t.FILTERS_BUTTONS_OK=me;var we="".concat("Filters:","buttons.cancel");t.FILTERS_BUTTONS_CANCEL=we;var be="".concat("Filters:","buttons.placeholder.search");t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=be;var Ce="".concat("Filters:","buttons.placeholder.value");t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=Ce;var Ee="".concat("Filters:","buttons.placeholder.secondValue");t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=Ee},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.__esModule=!0,t.isNumeric=function(e){var t=r(e);return"number"==t?!isNaN(e)&&isFinite(e):"string"==t?!!e.length&&(1==e.length?/\d/.test(e):/^\s*[+-]?\s*(?:(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/i.test(e)):"object"==t&&!(!e||"number"!=typeof e.valueOf()||e instanceof Date)},t.rangeEach=function(e,t,n){var r=-1;"function"==typeof t?(n=t,t=e):r=e-1;for(;++r<=t&&!1!==n(r););},t.rangeEachReverse=function(e,t,n){var r=e+1;"function"==typeof t&&(n=t,t=0);for(;--r>=t&&!1!==n(r););},t.valueAccordingPercent=function(e,t){return t=parseInt(t.toString().replace("%",""),10),t=parseInt(e*t/100,10)}},function(e,t,n){"use strict";t.__esModule=!0,t.registerPlugin=function(e,t){var n=(0,i.toUpperCaseFirst)(e);r.default.getSingleton().add("construct",function(){a.has(this)||a.set(this,{});var e=a.get(this);e[n]||(e[n]=new t(this))}),r.default.getSingleton().add("afterDestroy",function(){if(a.has(this)){var e=a.get(this);(0,o.objectEach)(e,function(e){return e.destroy()}),a.delete(this)}})},t.getPlugin=function(e,t){if("string"!=typeof t)throw Error('Only strings can be passed as "plugin" parameter');var n=(0,i.toUpperCaseFirst)(t);if(!a.has(e)||!a.get(e)[n])return;return a.get(e)[n]},t.getRegistredPluginNames=function(e){return a.has(e)?Object.keys(a.get(e)):[]},t.getPluginName=function(e,t){var n=null;a.has(e)&&(0,o.objectEach)(a.get(e),function(e,r){e===t&&(n=r)});return n};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(23)),o=n(2),i=n(42);var a=new WeakMap},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(2),o=n(1),i=n(75),a=n(6);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=new WeakMap,u=null,c=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(0,r.defineGetter)(this,"hot",t,{writable:!1}),(0,r.defineGetter)(this,"t",(0,i.getTranslator)(t),{writable:!1}),l.set(this,{hooks:{}}),u=null,this.pluginName=null,this.pluginsInitializedCallbacks=[],this.isPluginsReady=!1,this.enabled=!1,this.initialized=!1,this.hot.addHook("afterPluginsInitialized",function(){return n.onAfterPluginsInitialized()}),this.hot.addHook("afterUpdateSettings",function(e){return n.onUpdateSettings(e)}),this.hot.addHook("beforeInit",function(){return n.init()})}return function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(e,[{key:"init",value:function(){this.pluginName=(0,a.getPluginName)(this.hot,this),this.isEnabled&&this.isEnabled()&&this.enablePlugin(),u||(u=(0,a.getRegistredPluginNames)(this.hot)),u.indexOf(this.pluginName)>=0&&u.splice(u.indexOf(this.pluginName),1),u.length||this.hot.runHooks("afterPluginsInitialized"),this.initialized=!0}},{key:"enablePlugin",value:function(){this.enabled=!0}},{key:"disablePlugin",value:function(){this.eventManager&&this.eventManager.clear(),this.clearHooks(),this.enabled=!1}},{key:"addHook",value:function(e,t){l.get(this).hooks[e]=l.get(this).hooks[e]||[];var n=l.get(this).hooks[e];this.hot.addHook(e,t),n.push(t),l.get(this).hooks[e]=n}},{key:"removeHooks",value:function(e){var t=this;(0,o.arrayEach)(l.get(this).hooks[e]||[],function(n){t.hot.removeHook(e,n)})}},{key:"clearHooks",value:function(){var e=this,t=l.get(this).hooks;(0,r.objectEach)(t,function(t,n){return e.removeHooks(n)}),t.length=0}},{key:"callOnPluginsReady",value:function(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}},{key:"onAfterPluginsInitialized",value:function(){(0,o.arrayEach)(this.pluginsInitializedCallbacks,function(e){return e()}),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}},{key:"onUpdateSettings",value:function(){this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&this.updatePlugin())}},{key:"updatePlugin",value:function(){}},{key:"destroy",value:function(){var e=this;this.eventManager&&this.eventManager.destroy(),this.clearHooks(),(0,r.objectEach)(this,function(t,n){"hot"!==n&&"t"!==n&&(e[n]=null)}),delete this.t,delete this.hot}}]),e}();t.default=c},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(12);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";t.__esModule=!0,t.getListenersCounter=function(){return l},t.default=void 0;var r=n(3),o=n(2),i=n(49),a=n(16);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=0,u=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t||this,this.context.eventListeners||(this.context.eventListeners=[])}return function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(e,[{key:"addEventListener",value:function(e,t,n){var r=this,o=this.context;function i(e){n.call(this,c(o,e))}return this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:i}),e.addEventListener(t,i,!1),l+=1,function(){r.removeEventListener(e,t,n)}}},{key:"removeEventListener",value:function(e,t,n){for(var r,o=this.context.eventListeners.length;o;)if(o-=1,(r=this.context.eventListeners[o]).event===t&&r.element===e){if(n&&n!==r.callback)continue;this.context.eventListeners.splice(o,1),r.element.removeEventListener(r.event,r.callbackProxy,!1),l-=1}}},{key:"clearEvents",value:function(){if(this.context)for(var e=this.context.eventListeners.length;e;){e-=1;var t=this.context.eventListeners[e];t&&this.removeEventListener(t.element,t.event,t.callback)}}},{key:"clear",value:function(){this.clearEvents()}},{key:"destroy",value:function(){this.clearEvents(),this.context=null}},{key:"fireEvent",value:function(e,t){var n,r={bubbles:!0,cancelable:"mousemove"!==t,view:window,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};document.createEvent?(n=document.createEvent("MouseEvents")).initMouseEvent(t,r.bubbles,r.cancelable,r.view,r.detail,r.screenX,r.screenY,r.clientX,r.clientY,r.ctrlKey,r.altKey,r.shiftKey,r.metaKey,r.button,r.relatedTarget||document.body.parentNode):n=document.createEventObject(),e.dispatchEvent?e.dispatchEvent(n):e.fireEvent("on".concat(t),n)}}]),e}();function c(e,t){var n,s,l,c,f;t.isTargetWebComponent=!1,t.realTarget=t.target;var h=t.stopImmediatePropagation;if(t.stopImmediatePropagation=function(){h.apply(this),(0,a.stopImmediatePropagation)(this)},!u.isHotTableEnv)return t;for(f=(t=(0,r.polymerWrap)(t)).path?t.path.length:0;f;){if(f-=1,"HOT-TABLE"===t.path[f].nodeName)n=!0;else if(n&&t.path[f].shadowRoot){c=t.path[f];break}0!==f||c||(c=t.path[f])}return c||(c=t.target),t.isTargetWebComponent=!0,(0,i.isWebComponentSupportedNatively)()?t.realTarget=t.srcElement||t.toElement:((0,o.hasOwnProperty)(e,"hot")||e.isHotTableEnv||e.wtTable)&&((0,o.hasOwnProperty)(e,"hot")?s=e.hot?e.hot.view.wt.wtTable.TABLE:null:e.isHotTableEnv?s=e.view.activeWt.wtTable.TABLE.parentNode.parentNode:e.wtTable&&(s=e.wtTable.TABLE.parentNode.parentNode),l=(0,r.closest)(t.target,["HOT-TABLE"],s),t.realTarget=l&&s.querySelector("HOT-TABLE")||t.target),Object.defineProperty(t,"target",{get:function(){return(0,r.polymerWrap)(c)},enumerable:!0,configurable:!0}),t}var f=u;t.default=f},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";t.__esModule=!0,n(106);var r=_(n(177));t.ViewportColumnsCalculator=r.default;var o=_(n(178));t.ViewportRowsCalculator=o.default;var i=_(n(83));t.CellCoords=i.default;var a=_(n(179));t.CellRange=a.default;var s=_(n(180));t.ColumnFilter=s.default;var l=_(n(181));t.RowFilter=l.default;var u=_(n(636));t.DebugOverlay=u.default;var c=_(n(638));t.LeftOverlay=c.default;var f=_(n(639));t.TopOverlay=f.default;var h=_(n(640));t.TopLeftCornerOverlay=h.default;var d=_(n(641));t.BottomOverlay=d.default;var p=_(n(642));t.BottomLeftCornerOverlay=p.default;var g=_(n(310));t.Border=g.default;var v=_(n(182));t.default=v.default,t.Core=v.default;var y=_(n(303));t.Event=y.default;var m=_(n(304));t.Overlays=m.default;var w=_(n(305));t.Scroll=w.default;var b=_(n(643));t.Selection=b.default;var C=_(n(306));t.Settings=C.default;var E=_(n(307));t.Table=E.default;var O=_(n(308));t.TableRenderer=O.default;var S=_(n(309));function _(e){return e&&e.__esModule?e:{default:e}}t.Viewport=S.default},function(e,t,n){"use strict";t.__esModule=!0,t.stringify=function(e){var t;switch(a(e)){case"string":case"number":t="".concat(e);break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t},t.isDefined=function(e){return void 0!==e},t.isUndefined=s,t.isEmpty=l,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t._injectProductInfo=function(e,t){var n="",a=!0,s=function(e){var t=[][u],n=t;if(e[u]!==d("Z"))return!1;for(var r="",o="B<H4P+".split(""),i=d(o.shift());i;i=d(o.shift()||"A"))--i<""[u]?n|=(f("".concat(f(c(r)+(c(h(e,Math.abs(i),2))+[]).padStart(2,"0"))))%97||2)>>1:r=h(e,i,i?1===o[u]?9:8:6);return n===t}(e=p(e||"")),m=v(),w=l(e)||"trial"===e;if(w||s)if(s){var b=Math.floor((0,r.default)("19/12/2018","DD/MM/YYYY").toDate().getTime()/864e5),C=g(e);(C>45e3||C!==parseInt(C,10))&&(n="The license key provided to Handsontable Pro is invalid. Make sure you pass it correctly."),n||(b>C+1&&(n=(0,o.toSingleLine)(i())),a=b>C+15)}else n="Evaluation version of Handsontable Pro. Not licensed for use in a production environment.";else n="The license key provided to Handsontable Pro is invalid. Make sure you pass it correctly.";m&&(n=!1,a=!1);n&&!y&&(console[w?"info":"warn"](n),y=!0);if(a&&t.parentNode){var E=document.createElement("div");E.id="hot-display-license-info",E.appendChild(document.createTextNode("Evaluation version of Handsontable Pro.")),E.appendChild(document.createElement("br")),E.appendChild(document.createTextNode("Not licensed for production use.")),t.parentNode.insertBefore(E,t.nextSibling)}};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(36)),o=n(37);function i(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n Your license key of Handsontable Pro has expired. \n Renew your maintenance plan at https://handsontable.com or downgrade to the previous version of the software.\n "]);return i=function(){return e},e}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e){return void 0===e}function l(e){return null===e||""===e||s(e)}var u="length",c=function(e){return parseInt(e,16)},f=function(e){return parseInt(e,10)},h=function(e,t,n){return e.substr(t,n)},d=function(e){return e.codePointAt(0)-65},p=function(e){return"".concat(e).replace(/\-/g,"")},g=function(e){return c(h(p(e),c("12"),d("F")))/(c(h(p(e),d("B"),~~![][u]))||9)},v=function(){return"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host)},y=!1},function(e,t,n){"use strict";t.__esModule=!0,t.getCondition=function(e,t){if(!r[e])throw Error('Filter condition "'.concat(e,'" does not exist.'));var n=r[e],o=n.condition,i=n.descriptor,a=t;i.inputValuesDecorator&&(a=i.inputValuesDecorator(a));return function(e){return o.apply(e.meta.instance,[].concat([e],[a]))}},t.getConditionDescriptor=function(e){if(!r[e])throw Error('Filter condition "'.concat(e,'" does not exist.'));return r[e].descriptor},t.registerCondition=function(e,t,n){n.key=e,r[e]={condition:t,descriptor:n}},t.conditions=void 0;var r={};t.conditions=r},function(e,t,n){"use strict";t.__esModule=!0,t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0},t.isImmediatePropagationStopped=function(e){return!1===e.isImmediatePropagationEnabled},t.stopPropagation=function(e){"function"==typeof e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.pageX=function(e){if(e.pageX)return e.pageX;return e.clientX+(0,r.getWindowScrollLeft)()},t.pageY=function(e){if(e.pageY)return e.pageY;return e.clientY+(0,r.getWindowScrollTop)()},t.isRightClick=function(e){return 2===e.button},t.isLeftClick=function(e){return 0===e.button};var r=n(3)},function(e,t,n){var r=n(108)("wks"),o=n(60),i=n(11).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(38),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(9),o=n(147),i=n(52),a=Object.defineProperty;t.f=n(21)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";t.__esModule=!0,t.getRenderer=function(e){if("function"==typeof e)return e;if(!g(e))throw Error('No registered renderer found under "'.concat(e,'" name'));return p(e)},t.getRegisteredRenderers=t.getRegisteredRendererNames=t.hasRenderer=t.registerRenderer=void 0;var r=f(n(54)),o=f(n(655)),i=f(n(656)),a=f(n(657)),s=f(n(658)),l=f(n(659)),u=f(n(660)),c=f(n(661));function f(e){return e&&e.__esModule?e:{default:e}}var h=(0,r.default)("renderers"),d=h.register,p=h.getItem,g=h.hasItem,v=h.getNames,y=h.getValues;t.getRegisteredRenderers=y,t.getRegisteredRendererNames=v,t.hasRenderer=g,t.registerRenderer=d,d("base",o.default),d("autocomplete",i.default),d("checkbox",a.default),d("html",s.default),d("numeric",l.default),d("password",u.default),d("text",c.default)},function(e,t,n){e.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var n=e.exports={version:"2.6.1"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1),o=n(2);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}var s=["afterCellMetaReset","afterChange","afterChangesObserved","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","afterRender","beforeRenderer","afterRenderer","afterScrollHorizontally","afterScrollVertically","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeRender","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyCol","unmodifyCol","unmodifyRow","modifyColHeader","modifyColWidth","modifyRow","modifyRowHeader","modifyRowHeight","modifyData","modifyRowData","modifyGetCellCoords","persistentStateLoad","persistentStateReset","persistentStateSave","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnMove","afterColumnMove","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","modifyColumnHeaderHeight","beforeUndo","afterUndo","beforeRedo","afterRedo","modifyRowHeaderWidth","beforeAutofillInsidePopulate","modifyTransformStart","modifyTransformEnd","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","skipLengthCache","afterTrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","hiddenRow","hiddenColumn","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten"],l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.globalBucket=this.createEmptyBucket()}return a(e,null,[{key:"getSingleton",value:function(){return u}}]),a(e,[{key:"createEmptyBucket",value:function(){var e=Object.create(null);return(0,r.arrayEach)(s,function(t){return e[t]=[]}),e}},{key:"getBucket",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}},{key:"add",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))(0,r.arrayEach)(t,function(t){return n.add(e,t,o)});else{var i=this.getBucket(o);if(void 0===i[e]&&(this.register(e),i[e]=[]),t.skip=!1,-1===i[e].indexOf(t)){var a=!1;t.initialHook&&(0,r.arrayEach)(i[e],function(n,r){if(n.initialHook)return i[e][r]=t,a=!0,!1}),a||i[e].push(t)}}return this}},{key:"once",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?(0,r.arrayEach)(t,function(t){return n.once(e,t,o)}):(t.runOnce=!0,this.add(e,t,o))}},{key:"remove",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.getBucket(n);return void 0!==r[e]&&r[e].indexOf(t)>=0&&(t.skip=!0,!0)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getBucket(t);return!(void 0===n[e]||!n[e].length)}},{key:"run",value:function(e,t,n,r,o,i,a,s){var l=this.globalBucket[t],u=l?l.length:0,c=0;if(u)for(;c<u;)if(l[c]&&!l[c].skip){var f=l[c].call(e,n,r,o,i,a,s);void 0!==f&&(n=f),l[c]&&l[c].runOnce&&this.remove(t,l[c]),c+=1}else c+=1;var h=this.getBucket(e)[t],d=h?h.length:0,p=0;if(d)for(;p<d;)if(h[p]&&!h[p].skip){var g=h[p].call(e,n,r,o,i,a,s);void 0!==g&&(n=g),h[p]&&h[p].runOnce&&this.remove(t,h[p],e),p+=1}else p+=1;return n}},{key:"destroy",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,o.objectEach)(this.getBucket(e),function(e,t,n){return n[t].length=0})}},{key:"register",value:function(e){this.isRegistered(e)||s.push(e)}},{key:"deregister",value:function(e){this.isRegistered(e)&&s.splice(s.indexOf(e),1)}},{key:"isRegistered",value:function(e){return s.indexOf(e)>=0}},{key:"getRegistered",value:function(){return s}}]),e}(),u=new l;var c=l;t.default=c},function(e,t,n){"use strict";t.__esModule=!0,t.isPrintableChar=function(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90},t.isMetaKey=function(e){return-1!==[o.ARROW_DOWN,o.ARROW_UP,o.ARROW_LEFT,o.ARROW_RIGHT,o.HOME,o.END,o.DELETE,o.BACKSPACE,o.F1,o.F2,o.F3,o.F4,o.F5,o.F6,o.F7,o.F8,o.F9,o.F10,o.F11,o.F12,o.TAB,o.PAGE_DOWN,o.PAGE_UP,o.ENTER,o.ESCAPE,o.SHIFT,o.CAPS_LOCK,o.ALT].indexOf(e)},t.isCtrlKey=function(e){var t=[];window.navigator.platform.includes("Mac")?t.push(o.COMMAND_LEFT,o.COMMAND_RIGHT,o.COMMAND_FIREFOX):t.push(o.CONTROL);return t.includes(e)},t.isCtrlMetaKey=function(e){return[o.CONTROL,o.COMMAND_LEFT,o.COMMAND_RIGHT,o.COMMAND_FIREFOX].includes(e)},t.isKey=function(e,t){var n=t.split("|"),i=!1;return(0,r.arrayEach)(n,function(t){if(e===o[t])return i=!0,!1}),i},t.KEY_CODES=void 0;var r=n(1),o={MOUSE_LEFT:1,MOUSE_RIGHT:3,MOUSE_MIDDLE:2,BACKSPACE:8,COMMA:188,INSERT:45,DELETE:46,END:35,ENTER:13,ESCAPE:27,CONTROL:17,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,ALT:18,HOME:36,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,SPACE:32,SHIFT:16,CAPS_LOCK:20,TAB:9,ARROW_RIGHT:39,ARROW_LEFT:37,ARROW_UP:38,ARROW_DOWN:40,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,A:65,C:67,D:68,F:70,L:76,O:79,P:80,S:83,V:86,X:88};t.KEY_CODES=o},function(e,t,n){var r=n(11),o=n(31),i=n(30),a=n(60)("src"),s=Function.toString,l=(""+s).split("toString");n(22).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(u&&(i(n,a)||o(n,a,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(e,t,n){var r=n(46);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(0),o=n(8),i=n(46),a=/"/g,s=function(e,t,n,r){var o=String(i(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,"&quot;")+'"'),s+">"+o+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*o(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){"use strict";t.__esModule=!0,t.RegisteredEditor=O,t.getEditorInstance=t._getEditorInstance=function(e,t){var n;if("function"==typeof e)v.get(e)||S(null,e),n=v.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');n=w(e)}if(!n)throw Error('No editor registered under name "'.concat(e,'"'));return n.getInstance(t)},t.registerEditor=S,t.getEditor=function(e){if(!b(e))throw Error('No registered editor found under "'.concat(e,'" name'));return w(e).getConstructor()},t.getRegisteredEditors=t.getRegisteredEditorNames=t.hasEditor=void 0;var r=g(n(54)),o=g(n(23)),i=g(n(82)),a=g(n(311)),s=g(n(645)),l=g(n(646)),u=g(n(651)),c=g(n(312)),f=g(n(652)),h=g(n(653)),d=g(n(654)),p=g(n(84));function g(e){return e&&e.__esModule?e:{default:e}}var v=new WeakMap,y=(0,r.default)("editors"),m=y.register,w=y.getItem,b=y.hasItem,C=y.getNames,E=y.getValues;function O(e){var t={},n=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new n(e)),t[e.guid]},o.default.getSingleton().add("afterDestroy",function(){t[this.guid]=null})}function S(e,t){var n=new O(t);"string"==typeof e&&m(e,n),v.set(t,n)}t.getRegisteredEditors=E,t.getRegisteredEditorNames=C,t.hasEditor=b,S("base",i.default),S("autocomplete",a.default),S("checkbox",s.default),S("date",l.default),S("dropdown",u.default),S("handsontable",c.default),S("numeric",f.default),S("password",h.default),S("select",d.default),S("text",p.default)},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1),o=n(2),i={_localHooks:Object.create(null),addLocalHook:function(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks:function(e){for(var t=this,n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];this._localHooks[e]&&(0,r.arrayEach)(this._localHooks[e],function(e){return e.apply(t,o)})},clearLocalHooks:function(){return this._localHooks={},this}};(0,o.defineGetter)(i,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});var a=i;t.default=a},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(19),o=n(59);e.exports=n(21)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(78),o=n(46);e.exports=function(e){return r(o(e))}},function(e,t,n){"use strict";t.__esModule=!0,t.log=function(){var e;(0,r.isDefined)(console)&&(e=console).log.apply(e,arguments)},t.warn=function(){var e;(0,r.isDefined)(console)&&(e=console).warn.apply(e,arguments)},t.info=function(){var e;(0,r.isDefined)(console)&&(e=console).info.apply(e,arguments)},t.error=function(){var e;(0,r.isDefined)(console)&&(e=console).error.apply(e,arguments)};var r=n(14)},function(e,t,n){"use strict";t.__esModule=!0,t.normalizeSelection=function(e){return(0,r.arrayMap)(e,function(e){return{start:e.getTopLeftCorner(),end:e.getBottomRightCorner()}})},t.isSeparator=function(e){return(0,o.hasClass)(e,"htSeparator")},t.hasSubMenu=function(e){return(0,o.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,o.hasClass)(e,"htDisabled")},t.isSelectionDisabled=function(e){return(0,o.hasClass)(e,"htSelectionDisabled")},t.getValidSelection=function(e){var t=e.getSelected();if(!t)return null;if(t[0]<0)return null;return t},t.prepareVerticalAlignClass=a,t.prepareHorizontalAlignClass=s,t.getAlignmentClasses=function(e,t){var n={};return(0,r.arrayEach)(e,function(e){for(var r=e.from,o=e.to,i=r.row;i<=o.row;i++)for(var a=r.col;a<=o.col;a++)n[i]||(n[i]=[]),n[i][a]=t(i,a)}),n},t.align=function(e,t,n,o,i){(0,r.arrayEach)(e,function(e){var r=e.from,a=e.to;if(r.row===a.row&&r.col===a.col)l(r.row,r.col,t,n,o,i);else for(var s=r.row;s<=a.row;s++)for(var u=r.col;u<=a.col;u++)l(s,u,t,n,o,i)})},t.checkSelectionConsistency=function(e,t){var n=!1;Array.isArray(e)&&(0,r.arrayEach)(e,function(e){return e.forAll(function(e,r){if(t(e,r))return n=!0,!1}),n});return n},t.markLabelAsSelected=function(e){return'<span class="selected">'.concat(String.fromCharCode(10003),"</span>").concat(e)},t.isItemHidden=function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))},t.filterSeparators=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.KEY,n=e.slice(0);return n=function(e){var t=[];return(0,r.arrayEach)(e,function(e,n){n>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)}),t}(n=function(e,t){var n=e.slice(0);return n.reverse(),(n=u(n,t)).reverse(),n}(n=u(n,t),t))};var r=n(1),o=n(3),i=n(139);function a(e,t){if(-1!==e.indexOf(t))return e;var n=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","");return"".concat(n," ").concat(t)}function s(e,t){if(-1!==e.indexOf(t))return e;var n=e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","");return"".concat(n," ").concat(t)}function l(e,t,n,r,o,i){var l=o(e,t),u=r;l.className&&(u="vertical"===n?a(l.className,r):s(l.className,r)),i(e,t,"className",u)}function u(e,t){for(var n=e.slice(0);0<n.length&&n[0].name===t;)n.shift();return n}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){(function(e){!function(t,n){e.exports=n()}(0,function(){"use strict";var t,r;function o(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e,t){for(var n in t)f(t,n)&&(e[n]=t[n]);return f(t,"toString")&&(e.toString=t.toString),f(t,"valueOf")&&(e.valueOf=t.valueOf),e}function d(e,t,n,r){return Nt(e,t,n,r,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function g(e){if(null==e._isValid){var t=p(e),n=r.call(t.parsedDateParts,function(e){return null!=e}),o=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function v(e){var t=d(NaN);return null!=e?h(p(t),e):p(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var y=o.momentProperties=[];function m(e,t){var n,r,o;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=p(t)),s(t._locale)||(e._locale=t._locale),y.length>0)for(n=0;n<y.length;n++)s(o=t[r=y[n]])||(e[r]=o);return e}var w=!1;function b(e){m(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===w&&(w=!0,o.updateOffset(this),w=!1)}function C(e){return e instanceof b||null!=e&&null!=e._isAMomentObject}function E(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function O(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=E(t)),n}function S(e,t,n){var r,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&O(e[r])!==O(t[r]))&&a++;return a+i}function _(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function T(e,t){var n=!0;return h(function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),n){for(var r,i=[],a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(var s in r+="\n["+a+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[a];i.push(r)}_(e+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var R,M={};function k(e,t){null!=o.deprecationHandler&&o.deprecationHandler(e,t),M[e]||(_(t),M[e]=!0)}function N(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function A(e,t){var n,r=h({},e);for(n in t)f(t,n)&&(a(e[n])&&a(t[n])?(r[n]={},h(r[n],e[n]),h(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)f(e,n)&&!f(t,n)&&a(e[n])&&(r[n]=h({},r[n]));return r}function I(e){null!=e&&this.set(e)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,R=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)f(e,t)&&n.push(t);return n};var D={};function P(e,t){var n=e.toLowerCase();D[n]=D[n+"s"]=D[t]=e}function x(e){return"string"==typeof e?D[e]||D[e.toLowerCase()]:void 0}function L(e){var t,n,r={};for(n in e)f(e,n)&&(t=x(n))&&(r[t]=e[n]);return r}var H={};function j(e,t){H[e]=t}function F(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var V=/(\[[^\[]*\])|(\\)?([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,B=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,U={},W={};function Y(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(W[e]=o),t&&(W[t[0]]=function(){return F(o.apply(this,arguments),t[1],t[2])}),n&&(W[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function $(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function G(e,t){return e.isValid()?(t=z(t,e.localeData()),U[t]=U[t]||function(e){var t,n,r=e.match(V);for(t=0,n=r.length;t<n;t++)W[r[t]]?r[t]=W[r[t]]:r[t]=$(r[t]);return function(t){var o,i="";for(o=0;o<n;o++)i+=N(r[o])?r[o].call(t,e):r[o];return i}}(t),U[t](e)):e.localeData().invalidDate()}function z(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(B.lastIndex=0;n>=0&&B.test(e);)e=e.replace(B,r),B.lastIndex=0,n-=1;return e}var X=/\d/,K=/\d\d/,q=/\d{3}/,Z=/\d{4}/,Q=/[+-]?\d{6}/,J=/\d\d?/,ee=/\d\d\d\d?/,te=/\d\d\d\d\d\d?/,ne=/\d{1,3}/,re=/\d{1,4}/,oe=/[+-]?\d{1,6}/,ie=/\d+/,ae=/[+-]?\d+/,se=/Z|[+-]\d\d:?\d\d/gi,le=/Z|[+-]\d\d(?::?\d\d)?/gi,ue=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ce={};function fe(e,t,n){ce[e]=N(t)?t:function(e,r){return e&&n?n:t}}function he(e,t){return f(ce,e)?ce[e](t._strict,t._locale):new RegExp(function(e){return de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,o){return t||n||r||o}))}(e))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pe={};function ge(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),l(t)&&(r=function(e,n){n[t]=O(e)}),n=0;n<e.length;n++)pe[e[n]]=r}function ve(e,t){ge(e,function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)})}function ye(e,t,n){null!=t&&f(pe,e)&&pe[e](t,n._a,n,e)}var me=0,we=1,be=2,Ce=3,Ee=4,Oe=5,Se=6,_e=7,Te=8;function Re(e){return Me(e)?366:365}function Me(e){return e%4==0&&e%100!=0||e%400==0}Y("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),Y(0,["YY",2],0,function(){return this.year()%100}),Y(0,["YYYY",4],0,"year"),Y(0,["YYYYY",5],0,"year"),Y(0,["YYYYYY",6,!0],0,"year"),P("year","y"),j("year",1),fe("Y",ae),fe("YY",J,K),fe("YYYY",re,Z),fe("YYYYY",oe,Q),fe("YYYYYY",oe,Q),ge(["YYYYY","YYYYYY"],me),ge("YYYY",function(e,t){t[me]=2===e.length?o.parseTwoDigitYear(e):O(e)}),ge("YY",function(e,t){t[me]=o.parseTwoDigitYear(e)}),ge("Y",function(e,t){t[me]=parseInt(e,10)}),o.parseTwoDigitYear=function(e){return O(e)+(O(e)>68?1900:2e3)};var ke,Ne=Ae("FullYear",!0);function Ae(e,t){return function(n){return null!=n?(De(this,e,n),o.updateOffset(this,t),this):Ie(this,e)}}function Ie(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function De(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Me(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Pe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=function(e,t){return(e%t+t)%t}(t,12);return e+=(t-n)/12,1===n?Me(e)?29:28:31-n%7%2}ke=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},Y("M",["MM",2],"Mo",function(){return this.month()+1}),Y("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Y("MMMM",0,0,function(e){return this.localeData().months(this,e)}),P("month","M"),j("month",8),fe("M",J),fe("MM",J,K),fe("MMM",function(e,t){return t.monthsShortRegex(e)}),fe("MMMM",function(e,t){return t.monthsRegex(e)}),ge(["M","MM"],function(e,t){t[we]=O(e)-1}),ge(["MMM","MMMM"],function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[we]=o:p(n).invalidMonth=e});var xe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Le="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var He="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function je(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=O(t);else if(!l(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Pe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Fe(e){return null!=e?(je(this,e),o.updateOffset(this,!0),this):Ie(this,"Month")}var Ve=ue;var Be=ue;function Ue(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],i=[];for(t=0;t<12;t++)n=d([2e3,t]),r.push(this.monthsShort(n,"")),o.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));for(r.sort(e),o.sort(e),i.sort(e),t=0;t<12;t++)r[t]=de(r[t]),o[t]=de(o[t]);for(t=0;t<24;t++)i[t]=de(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function We(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ye(e,t,n){var r=7+t-n;return-((7+We(e,0,r).getUTCDay()-t)%7)+r-1}function $e(e,t,n,r,o){var i,a,s=1+7*(t-1)+(7+n-r)%7+Ye(e,r,o);return s<=0?a=Re(i=e-1)+s:s>Re(e)?(i=e+1,a=s-Re(e)):(i=e,a=s),{year:i,dayOfYear:a}}function Ge(e,t,n){var r,o,i=Ye(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?r=a+ze(o=e.year()-1,t,n):a>ze(e.year(),t,n)?(r=a-ze(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function ze(e,t,n){var r=Ye(e,t,n),o=Ye(e+1,t,n);return(Re(e)-r+o)/7}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),j("week",5),j("isoWeek",5),fe("w",J),fe("ww",J,K),fe("W",J),fe("WW",J,K),ve(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=O(e)});Y("d",0,"do","day"),Y("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Y("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Y("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),j("day",11),j("weekday",11),j("isoWeekday",11),fe("d",J),fe("e",J),fe("E",J),fe("dd",function(e,t){return t.weekdaysMinRegex(e)}),fe("ddd",function(e,t){return t.weekdaysShortRegex(e)}),fe("dddd",function(e,t){return t.weekdaysRegex(e)}),ve(["dd","ddd","dddd"],function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:p(n).invalidWeekday=e}),ve(["d","e","E"],function(e,t,n,r){t[r]=O(e)});var Xe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ke="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Ze=ue;var Qe=ue;var Je=ue;function et(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=d([2e3,1]).day(t),r=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),i=this.weekdays(n,""),a.push(r),s.push(o),l.push(i),u.push(r),u.push(o),u.push(i);for(a.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=de(s[t]),l[t]=de(l[t]),u[t]=de(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function tt(){return this.hours()%12||12}function nt(e,t){Y(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function rt(e,t){return t._meridiemParse}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,tt),Y("k",["kk",2],0,function(){return this.hours()||24}),Y("hmm",0,0,function(){return""+tt.apply(this)+F(this.minutes(),2)}),Y("hmmss",0,0,function(){return""+tt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),Y("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),Y("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),nt("a",!0),nt("A",!1),P("hour","h"),j("hour",13),fe("a",rt),fe("A",rt),fe("H",J),fe("h",J),fe("k",J),fe("HH",J,K),fe("hh",J,K),fe("kk",J,K),fe("hmm",ee),fe("hmmss",te),fe("Hmm",ee),fe("Hmmss",te),ge(["H","HH"],Ce),ge(["k","kk"],function(e,t,n){var r=O(e);t[Ce]=24===r?0:r}),ge(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ge(["h","hh"],function(e,t,n){t[Ce]=O(e),p(n).bigHour=!0}),ge("hmm",function(e,t,n){var r=e.length-2;t[Ce]=O(e.substr(0,r)),t[Ee]=O(e.substr(r)),p(n).bigHour=!0}),ge("hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[Ce]=O(e.substr(0,r)),t[Ee]=O(e.substr(r,2)),t[Oe]=O(e.substr(o)),p(n).bigHour=!0}),ge("Hmm",function(e,t,n){var r=e.length-2;t[Ce]=O(e.substr(0,r)),t[Ee]=O(e.substr(r))}),ge("Hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[Ce]=O(e.substr(0,r)),t[Ee]=O(e.substr(r,2)),t[Oe]=O(e.substr(o))});var ot,it=Ae("Hours",!0),at={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Le,monthsShort:He,week:{dow:0,doy:6},weekdays:Xe,weekdaysMin:qe,weekdaysShort:Ke,meridiemParse:/[ap]\.?m?\.?/i},st={},lt={};function ut(e){return e?e.toLowerCase().replace("_","-"):e}function ct(t){var r=null;if(!st[t]&&void 0!==e&&e&&e.exports)try{r=ot._abbr;n(637)("./"+t),ft(r)}catch(e){}return st[t]}function ft(e,t){var n;return e&&(n=s(t)?dt(e):ht(e,t))&&(ot=n),ot._abbr}function ht(e,t){if(null!==t){var n=at;if(t.abbr=e,null!=st[e])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=st[e]._config;else if(null!=t.parentLocale){if(null==st[t.parentLocale])return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;n=st[t.parentLocale]._config}return st[e]=new I(A(n,t)),lt[e]&&lt[e].forEach(function(e){ht(e.name,e.config)}),ft(e),st[e]}return delete st[e],null}function dt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ot;if(!i(e)){if(t=ct(e))return t;e=[e]}return function(e){for(var t,n,r,o,i=0;i<e.length;){for(t=(o=ut(e[i]).split("-")).length,n=(n=ut(e[i+1]))?n.split("-"):null;t>0;){if(r=ct(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&S(o,n,!0)>=t-1)break;t--}i++}return null}(e)}function pt(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[we]<0||n[we]>11?we:n[be]<1||n[be]>Pe(n[me],n[we])?be:n[Ce]<0||n[Ce]>24||24===n[Ce]&&(0!==n[Ee]||0!==n[Oe]||0!==n[Se])?Ce:n[Ee]<0||n[Ee]>59?Ee:n[Oe]<0||n[Oe]>59?Oe:n[Se]<0||n[Se]>999?Se:-1,p(e)._overflowDayOfYear&&(t<me||t>be)&&(t=be),p(e)._overflowWeeks&&-1===t&&(t=_e),p(e)._overflowWeekday&&-1===t&&(t=Te),p(e).overflow=t),e}function gt(e,t,n){return null!=e?e:null!=t?t:n}function vt(e){var t,n,r,i,a,s=[];if(!e._d){for(r=function(e){var t=new Date(o.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[be]&&null==e._a[we]&&function(e){var t,n,r,o,i,a,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,a=4,n=gt(t.GG,e._a[me],Ge(At(),1,4).year),r=gt(t.W,1),((o=gt(t.E,1))<1||o>7)&&(l=!0);else{i=e._locale._week.dow,a=e._locale._week.doy;var u=Ge(At(),i,a);n=gt(t.gg,e._a[me],u.year),r=gt(t.w,u.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(l=!0)):o=i}r<1||r>ze(n,i,a)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(s=$e(n,r,o,i,a),e._a[me]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=gt(e._a[me],r[me]),(e._dayOfYear>Re(a)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=We(a,0,e._dayOfYear),e._a[we]=n.getUTCMonth(),e._a[be]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ce]&&0===e._a[Ee]&&0===e._a[Oe]&&0===e._a[Se]&&(e._nextDay=!0,e._a[Ce]=0),e._d=(e._useUTC?We:function(e,t,n,r,o,i,a){var s=new Date(e,t,n,r,o,i,a);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ce]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(p(e).weekdayMismatch=!0)}}var yt=/^\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)?)?$/,mt=/^\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)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,bt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Ct=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Et=/^\/?Date\((\-?\d+)/i;function Ot(e){var t,n,r,o,i,a,s=e._i,l=yt.exec(s)||mt.exec(s);if(l){for(p(e).iso=!0,t=0,n=bt.length;t<n;t++)if(bt[t][1].exec(l[1])){o=bt[t][0],r=!1!==bt[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=Ct.length;t<n;t++)if(Ct[t][1].exec(l[3])){i=(l[2]||" ")+Ct[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!wt.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=o+(i||"")+(a||""),Mt(e)}else e._isValid=!1}var St=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function _t(e,t,n,r,o,i){var a=[function(e){var t=parseInt(e,10);if(t<=49)return 2e3+t;if(t<=999)return 1900+t;return t}(e),He.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return i&&a.push(parseInt(i,10)),a}var Tt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Rt(e){var t=St.exec(function(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e._i));if(t){var n=_t(t[4],t[3],t[2],t[5],t[6],t[7]);if(!function(e,t,n){return!e||Ke.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(p(n).weekdayMismatch=!0,n._isValid=!1,!1)}(t[1],n,e))return;e._a=n,e._tzm=function(e,t,n){if(e)return Tt[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}(t[8],t[9],t[10]),e._d=We.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0}else e._isValid=!1}function Mt(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],p(e).empty=!0;var t,n,r,i,a,s=""+e._i,l=s.length,u=0;for(r=z(e._f,e._locale).match(V)||[],t=0;t<r.length;t++)i=r[t],(n=(s.match(he(i,e))||[])[0])&&((a=s.substr(0,s.indexOf(n))).length>0&&p(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),u+=n.length),W[i]?(n?p(e).empty=!1:p(e).unusedTokens.push(i),ye(i,n,e)):e._strict&&!n&&p(e).unusedTokens.push(i);p(e).charsLeftOver=l-u,s.length>0&&p(e).unusedInput.push(s),e._a[Ce]<=12&&!0===p(e).bigHour&&e._a[Ce]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[Ce]=function(e,t,n){var r;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[Ce],e._meridiem),vt(e),pt(e)}else Rt(e);else Ot(e)}function kt(e){var t=e._i,n=e._f;return e._locale=e._locale||dt(e._l),null===t||void 0===n&&""===t?v({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),C(t)?new b(pt(t)):(u(t)?e._d=t:i(n)?function(e){var t,n,r,o,i;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<e._f.length;o++)i=0,t=m({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],Mt(t),g(t)&&(i+=p(t).charsLeftOver,i+=10*p(t).unusedTokens.length,p(t).score=i,(null==r||i<r)&&(r=i,n=t));h(e,n||t)}(e):n?Mt(e):function(e){var t=e._i;s(t)?e._d=new Date(o.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=Et.exec(e._i);null===t?(Ot(e),!1===e._isValid&&(delete e._isValid,Rt(e),!1===e._isValid&&(delete e._isValid,o.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=c(t.slice(0),function(e){return parseInt(e,10)}),vt(e)):a(t)?function(e){if(!e._d){var t=L(e._i);e._a=c([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),vt(e)}}(e):l(t)?e._d=new Date(t):o.createFromInputFallback(e)}(e),g(e)||(e._d=null),e))}function Nt(e,t,n,r,o){var s={};return!0!==n&&!1!==n||(r=n,n=void 0),(a(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||i(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=n,s._i=e,s._f=t,s._strict=r,function(e){var t=new b(pt(kt(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}(s)}function At(e,t,n,r){return Nt(e,t,n,r,!1)}o.createFromInputFallback=T("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),o.ISO_8601=function(){},o.RFC_2822=function(){};var It=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=At.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),Dt=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=At.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:v()});function Pt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return At();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var xt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Lt(e){var t=L(e),n=t.year||0,r=t.quarter||0,o=t.month||0,i=t.week||0,a=t.day||0,s=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===ke.call(xt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<xt.length;++r)if(e[xt[r]]){if(n)return!1;parseFloat(e[xt[r]])!==O(e[xt[r]])&&(n=!0)}return!0}(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+a+7*i,this._months=+o+3*r+12*n,this._data={},this._locale=dt(),this._bubble()}function Ht(e){return e instanceof Lt}function jt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,t){Y(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),fe("Z",le),fe("ZZ",le),ge(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Bt(le,e)});var Vt=/([\+\-]|\d\d)/gi;function Bt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Vt)||["-",0,0],o=60*r[1]+O(r[2]);return 0===o?0:"+"===r[0]?o:-o}function Ut(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(C(e)||u(e)?e.valueOf():At(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),o.updateOffset(n,!1),n):At(e).local()}function Wt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Yt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}o.updateOffset=function(){};var $t=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Gt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function zt(e,t){var n,r,o,i=e,a=null;return Ht(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(i={},t?i[t]=e:i.milliseconds=e):(a=$t.exec(e))?(n="-"===a[1]?-1:1,i={y:0,d:O(a[be])*n,h:O(a[Ce])*n,m:O(a[Ee])*n,s:O(a[Oe])*n,ms:O(jt(1e3*a[Se]))*n}):(a=Gt.exec(e))?(n="-"===a[1]?-1:(a[1],1),i={y:Xt(a[2],n),M:Xt(a[3],n),w:Xt(a[4],n),d:Xt(a[5],n),h:Xt(a[6],n),m:Xt(a[7],n),s:Xt(a[8],n)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(o=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Ut(t,e),e.isBefore(t)?n=Kt(e,t):((n=Kt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(At(i.from),At(i.to)),(i={}).ms=o.milliseconds,i.M=o.months),r=new Lt(i),Ht(e)&&f(e,"_locale")&&(r._locale=e._locale),r}function Xt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Kt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function qt(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(k(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),Zt(this,zt(n="string"==typeof n?+n:n,r),e),this}}function Zt(e,t,n,r){var i=t._milliseconds,a=jt(t._days),s=jt(t._months);e.isValid()&&(r=null==r||r,s&&je(e,Ie(e,"Month")+s*n),a&&De(e,"Date",Ie(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&o.updateOffset(e,a||s))}zt.fn=Lt.prototype,zt.invalid=function(){return zt(NaN)};var Qt=qt(1,"add"),Jt=qt(-1,"subtract");function en(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function tn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=dt(e))&&(this._locale=t),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var nn=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function rn(){return this._locale}function on(e,t){Y(0,[e,e.length],0,t)}function an(e,t,n,r,o){var i;return null==e?Ge(this,r,o).year:(t>(i=ze(e,r,o))&&(t=i),function(e,t,n,r,o){var i=$e(e,t,n,r,o),a=We(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,r,o))}Y(0,["gg",2],0,function(){return this.weekYear()%100}),Y(0,["GG",2],0,function(){return this.isoWeekYear()%100}),on("gggg","weekYear"),on("ggggg","weekYear"),on("GGGG","isoWeekYear"),on("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),j("weekYear",1),j("isoWeekYear",1),fe("G",ae),fe("g",ae),fe("GG",J,K),fe("gg",J,K),fe("GGGG",re,Z),fe("gggg",re,Z),fe("GGGGG",oe,Q),fe("ggggg",oe,Q),ve(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=O(e)}),ve(["gg","GG"],function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)}),Y("Q",0,"Qo","quarter"),P("quarter","Q"),j("quarter",7),fe("Q",X),ge("Q",function(e,t){t[we]=3*(O(e)-1)}),Y("D",["DD",2],"Do","date"),P("date","D"),j("date",9),fe("D",J),fe("DD",J,K),fe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ge(["D","DD"],be),ge("Do",function(e,t){t[be]=O(e.match(J)[0])});var sn=Ae("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),j("dayOfYear",4),fe("DDD",ne),fe("DDDD",q),ge(["DDD","DDDD"],function(e,t,n){n._dayOfYear=O(e)}),Y("m",["mm",2],0,"minute"),P("minute","m"),j("minute",14),fe("m",J),fe("mm",J,K),ge(["m","mm"],Ee);var ln=Ae("Minutes",!1);Y("s",["ss",2],0,"second"),P("second","s"),j("second",15),fe("s",J),fe("ss",J,K),ge(["s","ss"],Oe);var un,cn=Ae("Seconds",!1);for(Y("S",0,0,function(){return~~(this.millisecond()/100)}),Y(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,function(){return 10*this.millisecond()}),Y(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),Y(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),Y(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),Y(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),Y(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),P("millisecond","ms"),j("millisecond",16),fe("S",ne,X),fe("SS",ne,K),fe("SSS",ne,q),un="SSSS";un.length<=9;un+="S")fe(un,ie);function fn(e,t){t[Se]=O(1e3*("0."+e))}for(un="S";un.length<=9;un+="S")ge(un,fn);var hn=Ae("Milliseconds",!1);Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");var dn=b.prototype;function pn(e){return e}dn.add=Qt,dn.calendar=function(e,t){var n=e||At(),r=Ut(n,this).startOf("day"),i=o.calendarFormat(this,r)||"sameElse",a=t&&(N(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,At(n)))},dn.clone=function(){return new b(this)},dn.diff=function(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=Ut(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=x(t)){case"year":i=en(this,r)/12;break;case"month":i=en(this,r);break;case"quarter":i=en(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-o)/864e5;break;case"week":i=(this-r-o)/6048e5;break;default:i=this-r}return n?i:E(i)},dn.endOf=function(e){return void 0===(e=x(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},dn.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)},dn.from=function(e,t){return this.isValid()&&(C(e)&&e.isValid()||At(e).isValid())?zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.fromNow=function(e){return this.from(At(),e)},dn.to=function(e,t){return this.isValid()&&(C(e)&&e.isValid()||At(e).isValid())?zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.toNow=function(e){return this.to(At(),e)},dn.get=function(e){return N(this[e=x(e)])?this[e]():this},dn.invalidAt=function(){return p(this).overflow},dn.isAfter=function(e,t){var n=C(e)?e:At(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=x(s(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},dn.isBefore=function(e,t){var n=C(e)?e:At(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=x(s(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},dn.isBetween=function(e,t,n,r){return("("===(r=r||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===r[1]?this.isBefore(t,n):!this.isAfter(t,n))},dn.isSame=function(e,t){var n,r=C(e)?e:At(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=x(t||"millisecond"))?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},dn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},dn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},dn.isValid=function(){return g(this)},dn.lang=nn,dn.locale=tn,dn.localeData=rn,dn.max=Dt,dn.min=It,dn.parsingFlags=function(){return h({},p(this))},dn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:H[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=L(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(N(this[e=x(e)]))return this[e](t);return this},dn.startOf=function(e){switch(e=x(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},dn.subtract=Jt,dn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},dn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},dn.toDate=function(){return new Date(this.valueOf())},dn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?G(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):N(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",G(n,"Z")):G(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},dn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+o)},dn.toJSON=function(){return this.isValid()?this.toISOString():null},dn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},dn.unix=function(){return Math.floor(this.valueOf()/1e3)},dn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},dn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},dn.year=Ne,dn.isLeapYear=function(){return Me(this.year())},dn.weekYear=function(e){return an.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},dn.isoWeekYear=function(e){return an.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},dn.quarter=dn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},dn.month=Fe,dn.daysInMonth=function(){return Pe(this.year(),this.month())},dn.week=dn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},dn.isoWeek=dn.isoWeeks=function(e){var t=Ge(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},dn.weeksInYear=function(){var e=this.localeData()._week;return ze(this.year(),e.dow,e.doy)},dn.isoWeeksInYear=function(){return ze(this.year(),1,4)},dn.date=sn,dn.day=dn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},dn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},dn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},dn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},dn.hour=dn.hours=it,dn.minute=dn.minutes=ln,dn.second=dn.seconds=cn,dn.millisecond=dn.milliseconds=hn,dn.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Bt(le,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Wt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Zt(this,zt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Wt(this)},dn.utc=function(e){return this.utcOffset(0,e)},dn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Wt(this),"m")),this},dn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Bt(se,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},dn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?At(e).utcOffset():0,(this.utcOffset()-e)%60==0)},dn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},dn.isLocal=function(){return!!this.isValid()&&!this._isUTC},dn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},dn.isUtc=Yt,dn.isUTC=Yt,dn.zoneAbbr=function(){return this._isUTC?"UTC":""},dn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},dn.dates=T("dates accessor is deprecated. Use date instead.",sn),dn.months=T("months accessor is deprecated. Use month instead",Fe),dn.years=T("years accessor is deprecated. Use year instead",Ne),dn.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),dn.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(m(e,this),(e=kt(e))._a){var t=e._isUTC?d(e._a):At(e._a);this._isDSTShifted=this.isValid()&&S(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var gn=I.prototype;function vn(e,t,n,r){var o=dt(),i=d().set(r,t);return o[n](i,e)}function yn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return vn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=vn(e,r,n,"month");return o}function mn(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var o,i=dt(),a=e?i._week.dow:0;if(null!=n)return vn(t,(n+a)%7,r,"day");var s=[];for(o=0;o<7;o++)s[o]=vn(t,(o+a)%7,r,"day");return s}gn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return N(r)?r.call(t,n):r},gn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},gn.invalidDate=function(){return this._invalidDate},gn.ordinal=function(e){return this._ordinal.replace("%d",e)},gn.preparse=pn,gn.postformat=pn,gn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return N(o)?o(e,t,n,r):o.replace(/%d/i,e)},gn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return N(n)?n(t):n.replace(/%s/i,t)},gn.set=function(e){var t,n;for(n in e)N(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},gn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||xe).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},gn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[xe.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},gn.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return function(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=ke.call(this._shortMonthsParse,a))?o:null:-1!==(o=ke.call(this._longMonthsParse,a))?o:null:"MMM"===t?-1!==(o=ke.call(this._shortMonthsParse,a))?o:-1!==(o=ke.call(this._longMonthsParse,a))?o:null:-1!==(o=ke.call(this._longMonthsParse,a))?o:-1!==(o=ke.call(this._shortMonthsParse,a))?o:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},gn.monthsRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||Ue.call(this),e?this._monthsStrictRegex:this._monthsRegex):(f(this,"_monthsRegex")||(this._monthsRegex=Be),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},gn.monthsShortRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||Ue.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(f(this,"_monthsShortRegex")||(this._monthsShortRegex=Ve),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},gn.week=function(e){return Ge(e,this._week.dow,this._week.doy).week},gn.firstDayOfYear=function(){return this._week.doy},gn.firstDayOfWeek=function(){return this._week.dow},gn.weekdays=function(e,t){return e?i(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:i(this._weekdays)?this._weekdays:this._weekdays.standalone},gn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},gn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},gn.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return function(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=ke.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=ke.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=ke.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=ke.call(this._weekdaysParse,a))?o:-1!==(o=ke.call(this._shortWeekdaysParse,a))?o:-1!==(o=ke.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=ke.call(this._shortWeekdaysParse,a))?o:-1!==(o=ke.call(this._weekdaysParse,a))?o:-1!==(o=ke.call(this._minWeekdaysParse,a))?o:null:-1!==(o=ke.call(this._minWeekdaysParse,a))?o:-1!==(o=ke.call(this._weekdaysParse,a))?o:-1!==(o=ke.call(this._shortWeekdaysParse,a))?o:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},gn.weekdaysRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=Ze),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},gn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},gn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},gn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},gn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ft("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===O(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=T("moment.lang is deprecated. Use moment.locale instead.",ft),o.langData=T("moment.langData is deprecated. Use moment.localeData instead.",dt);var wn=Math.abs;function bn(e,t,n,r){var o=zt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function Cn(e){return e<0?Math.floor(e):Math.ceil(e)}function En(e){return 4800*e/146097}function On(e){return 146097*e/4800}function Sn(e){return function(){return this.as(e)}}var _n=Sn("ms"),Tn=Sn("s"),Rn=Sn("m"),Mn=Sn("h"),kn=Sn("d"),Nn=Sn("w"),An=Sn("M"),In=Sn("y");function Dn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=Dn("milliseconds"),xn=Dn("seconds"),Ln=Dn("minutes"),Hn=Dn("hours"),jn=Dn("days"),Fn=Dn("months"),Vn=Dn("years");var Bn=Math.round,Un={ss:44,s:45,m:45,h:22,d:26,M:11};var Wn=Math.abs;function Yn(e){return(e>0)-(e<0)||+e}function $n(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Wn(this._milliseconds)/1e3,r=Wn(this._days),o=Wn(this._months);t=E((e=E(n/60))/60),n%=60,e%=60;var i=E(o/12),a=o%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",f=this.asSeconds();if(!f)return"P0D";var h=f<0?"-":"",d=Yn(this._months)!==Yn(f)?"-":"",p=Yn(this._days)!==Yn(f)?"-":"",g=Yn(this._milliseconds)!==Yn(f)?"-":"";return h+"P"+(i?d+i+"Y":"")+(a?d+a+"M":"")+(s?p+s+"D":"")+(l||u||c?"T":"")+(l?g+l+"H":"")+(u?g+u+"M":"")+(c?g+c+"S":"")}var Gn=Lt.prototype;return Gn.isValid=function(){return this._isValid},Gn.abs=function(){var e=this._data;return this._milliseconds=wn(this._milliseconds),this._days=wn(this._days),this._months=wn(this._months),e.milliseconds=wn(e.milliseconds),e.seconds=wn(e.seconds),e.minutes=wn(e.minutes),e.hours=wn(e.hours),e.months=wn(e.months),e.years=wn(e.years),this},Gn.add=function(e,t){return bn(this,e,t,1)},Gn.subtract=function(e,t){return bn(this,e,t,-1)},Gn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=x(e))||"year"===e)return t=this._days+r/864e5,n=this._months+En(t),"month"===e?n:n/12;switch(t=this._days+Math.round(On(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Gn.asMilliseconds=_n,Gn.asSeconds=Tn,Gn.asMinutes=Rn,Gn.asHours=Mn,Gn.asDays=kn,Gn.asWeeks=Nn,Gn.asMonths=An,Gn.asYears=In,Gn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*O(this._months/12):NaN},Gn._bubble=function(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,l=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*Cn(On(s)+a),a=0,s=0),l.milliseconds=i%1e3,e=E(i/1e3),l.seconds=e%60,t=E(e/60),l.minutes=t%60,n=E(t/60),l.hours=n%24,s+=o=E(En(a+=E(n/24))),a-=Cn(On(o)),r=E(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},Gn.clone=function(){return zt(this)},Gn.get=function(e){return e=x(e),this.isValid()?this[e+"s"]():NaN},Gn.milliseconds=Pn,Gn.seconds=xn,Gn.minutes=Ln,Gn.hours=Hn,Gn.days=jn,Gn.weeks=function(){return E(this.days()/7)},Gn.months=Fn,Gn.years=Vn,Gn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=zt(e).abs(),o=Bn(r.as("s")),i=Bn(r.as("m")),a=Bn(r.as("h")),s=Bn(r.as("d")),l=Bn(r.as("M")),u=Bn(r.as("y")),c=o<=Un.ss&&["s",o]||o<Un.s&&["ss",o]||i<=1&&["m"]||i<Un.m&&["mm",i]||a<=1&&["h"]||a<Un.h&&["hh",a]||s<=1&&["d"]||s<Un.d&&["dd",s]||l<=1&&["M"]||l<Un.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=t,c[3]=+e>0,c[4]=n,function(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Gn.toISOString=$n,Gn.toString=$n,Gn.toJSON=$n,Gn.locale=tn,Gn.localeData=rn,Gn.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$n),Gn.lang=nn,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),fe("x",ae),fe("X",/[+-]?\d+(\.\d{1,3})?/),ge("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ge("x",function(e,t,n){n._d=new Date(O(e))}),o.version="2.20.1",function(e){t=e}(At),o.fn=dn,o.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},o.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},o.now=function(){return Date.now?Date.now():+new Date},o.utc=d,o.unix=function(e){return At(1e3*e)},o.months=function(e,t){return yn(e,t,"months")},o.isDate=u,o.locale=ft,o.invalid=v,o.duration=zt,o.isMoment=C,o.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},o.parseZone=function(){return At.apply(null,arguments).parseZone()},o.localeData=dt,o.isDuration=Ht,o.monthsShort=function(e,t){return yn(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},o.defineLocale=ht,o.updateLocale=function(e,t){if(null!=t){var n,r,o=at;null!=(r=ct(e))&&(o=r._config),(n=new I(t=A(o,t))).parentLocale=st[e],st[e]=n,ft(e)}else null!=st[e]&&(null!=st[e].parentLocale?st[e]=st[e].parentLocale:null!=st[e]&&delete st[e]);return st[e]},o.locales=function(){return R(st)},o.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},o.normalizeUnits=x,o.relativeTimeRounding=function(e){return void 0===e?Bn:"function"==typeof e&&(Bn=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==Un[e]&&(void 0===t?Un[e]:(Un[e]=t,"s"===e&&(Un.ss=t-1),!0))},o.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},o.prototype=dn,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},o}),window.moment=n(36)}).call(t,n(183)(e))},function(e,t,n){"use strict";t.__esModule=!0,t.toSingleLine=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return(0,r.arrayReduce)(e,function(e,t,r){var o=t.replace(/(?:\r?\n\s+)/g,""),i=n[r]?n[r]:"";return e+o+i},"").trim()};var r=n(1)},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(79),o=n(59),i=n(32),a=n(52),s=n(30),l=n(147),u=Object.getOwnPropertyDescriptor;t.f=n(21)?u:function(e,t){if(e=i(e),t=a(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(0),o=n(22),i=n(8);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(e,t,n){var r=n(43),o=n(78),i=n(26),a=n(18),s=n(559);e.exports=function(e,t){var n=1==e,l=2==e,u=3==e,c=4==e,f=6==e,h=5==e||f,d=t||s;return function(t,s,p){for(var g,v,y=i(t),m=o(y),w=r(s,p,3),b=a(m.length),C=0,E=n?d(t,b):l?d(t,0):void 0;b>C;C++)if((h||C in m)&&(v=w(g=m[C],C,y),e))if(n)E[C]=v;else if(v)switch(e){case 3:return!0;case 5:return g;case 6:return C;case 2:E.push(g)}else if(c)return!1;return f?-1:u||c?c:E}}},function(e,t,n){"use strict";t.__esModule=!0,t.toUpperCaseFirst=function(e){return e[0].toUpperCase()+e.substr(1)},t.equalsIgnoreCase=function(){for(var e=[],t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var i=n.length;for(;i;){i-=1;var a=(0,r.stringify)(n[i]).toLowerCase();-1===e.indexOf(a)&&e.push(a)}return 1===e.length},t.randomString=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()},t.isPercentValue=function(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)},t.substitute=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"".concat(e).replace(/(?:\\)?\[([^[\]]+)]/g,function(e,n){return"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[n]?"":t[n]})},t.stripTags=function(e){return"".concat(e).replace(o,"")};var r=n(14);var o=/<\/?\w+\/?>|<\w+[\s|/][^>]*>/gi},function(e,t,n){var r=n(44);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";if(n(21)){var r=n(61),o=n(11),i=n(8),a=n(0),s=n(100),l=n(133),u=n(43),c=n(72),f=n(59),h=n(31),d=n(73),p=n(38),g=n(18),v=n(173),y=n(63),m=n(52),w=n(30),b=n(80),C=n(12),E=n(26),O=n(125),S=n(64),_=n(66),T=n(65).f,R=n(127),M=n(60),k=n(17),N=n(41),A=n(90),I=n(81),D=n(129),P=n(69),x=n(93),L=n(71),H=n(128),j=n(164),F=n(19),V=n(39),B=F.f,U=V.f,W=o.RangeError,Y=o.TypeError,$=o.Uint8Array,G=Array.prototype,z=l.ArrayBuffer,X=l.DataView,K=N(0),q=N(2),Z=N(3),Q=N(4),J=N(5),ee=N(6),te=A(!0),ne=A(!1),re=D.values,oe=D.keys,ie=D.entries,ae=G.lastIndexOf,se=G.reduce,le=G.reduceRight,ue=G.join,ce=G.sort,fe=G.slice,he=G.toString,de=G.toLocaleString,pe=k("iterator"),ge=k("toStringTag"),ve=M("typed_constructor"),ye=M("def_constructor"),me=s.CONSTR,we=s.TYPED,be=s.VIEW,Ce=N(1,function(e,t){return Te(I(e,e[ye]),t)}),Ee=i(function(){return 1===new $(new Uint16Array([1]).buffer)[0]}),Oe=!!$&&!!$.prototype.set&&i(function(){new $(1).set({})}),Se=function(e,t){var n=p(e);if(n<0||n%t)throw W("Wrong offset!");return n},_e=function(e){if(C(e)&&we in e)return e;throw Y(e+" is not a typed array!")},Te=function(e,t){if(!(C(e)&&ve in e))throw Y("It is not a typed array constructor!");return new e(t)},Re=function(e,t){return Me(I(e,e[ye]),t)},Me=function(e,t){for(var n=0,r=t.length,o=Te(e,r);r>n;)o[n]=t[n++];return o},ke=function(e,t,n){B(e,t,{get:function(){return this._d[n]}})},Ne=function(e){var t,n,r,o,i,a,s=E(e),l=arguments.length,c=l>1?arguments[1]:void 0,f=void 0!==c,h=R(s);if(void 0!=h&&!O(h)){for(a=h.call(s),r=[],t=0;!(i=a.next()).done;t++)r.push(i.value);s=r}for(f&&l>2&&(c=u(c,arguments[2],2)),t=0,n=g(s.length),o=Te(this,n);n>t;t++)o[t]=f?c(s[t],t):s[t];return o},Ae=function(){for(var e=0,t=arguments.length,n=Te(this,t);t>e;)n[e]=arguments[e++];return n},Ie=!!$&&i(function(){de.call(new $(1))}),De=function(){return de.apply(Ie?fe.call(_e(this)):_e(this),arguments)},Pe={copyWithin:function(e,t){return j.call(_e(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return Q(_e(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return H.apply(_e(this),arguments)},filter:function(e){return Re(this,q(_e(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return J(_e(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(_e(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){K(_e(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(_e(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(_e(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ue.apply(_e(this),arguments)},lastIndexOf:function(e){return ae.apply(_e(this),arguments)},map:function(e){return Ce(_e(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(_e(this),arguments)},reduceRight:function(e){return le.apply(_e(this),arguments)},reverse:function(){for(var e,t=_e(this).length,n=Math.floor(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this},some:function(e){return Z(_e(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return ce.call(_e(this),e)},subarray:function(e,t){var n=_e(this),r=n.length,o=y(e,r);return new(I(n,n[ye]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,g((void 0===t?r:y(t,r))-o))}},xe=function(e,t){return Re(this,fe.call(_e(this),e,t))},Le=function(e){_e(this);var t=Se(arguments[1],1),n=this.length,r=E(e),o=g(r.length),i=0;if(o+t>n)throw W("Wrong length!");for(;i<o;)this[t+i]=r[i++]},He={entries:function(){return ie.call(_e(this))},keys:function(){return oe.call(_e(this))},values:function(){return re.call(_e(this))}},je=function(e,t){return C(e)&&e[we]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},Fe=function(e,t){return je(e,t=m(t,!0))?f(2,e[t]):U(e,t)},Ve=function(e,t,n){return!(je(e,t=m(t,!0))&&C(n)&&w(n,"value"))||w(n,"get")||w(n,"set")||n.configurable||w(n,"writable")&&!n.writable||w(n,"enumerable")&&!n.enumerable?B(e,t,n):(e[t]=n.value,e)};me||(V.f=Fe,F.f=Ve),a(a.S+a.F*!me,"Object",{getOwnPropertyDescriptor:Fe,defineProperty:Ve}),i(function(){he.call({})})&&(he=de=function(){return ue.call(this)});var Be=d({},Pe);d(Be,He),h(Be,pe,He.values),d(Be,{slice:xe,set:Le,constructor:function(){},toString:he,toLocaleString:De}),ke(Be,"buffer","b"),ke(Be,"byteOffset","o"),ke(Be,"byteLength","l"),ke(Be,"length","e"),B(Be,ge,{get:function(){return this[we]}}),e.exports=function(e,t,n,l){var u=e+((l=!!l)?"Clamped":"")+"Array",f="get"+e,d="set"+e,p=o[u],y=p||{},m=p&&_(p),w=!p||!s.ABV,E={},O=p&&p.prototype,R=function(e,n){B(e,n,{get:function(){return function(e,n){var r=e._d;return r.v[f](n*t+r.o,Ee)}(this,n)},set:function(e){return function(e,n,r){var o=e._d;l&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),o.v[d](n*t+o.o,r,Ee)}(this,n,e)},enumerable:!0})};w?(p=n(function(e,n,r,o){c(e,p,u,"_d");var i,a,s,l,f=0,d=0;if(C(n)){if(!(n instanceof z||"ArrayBuffer"==(l=b(n))||"SharedArrayBuffer"==l))return we in n?Me(p,n):Ne.call(p,n);i=n,d=Se(r,t);var y=n.byteLength;if(void 0===o){if(y%t)throw W("Wrong length!");if((a=y-d)<0)throw W("Wrong length!")}else if((a=g(o)*t)+d>y)throw W("Wrong length!");s=a/t}else s=v(n),i=new z(a=s*t);for(h(e,"_d",{b:i,o:d,l:a,e:s,v:new X(i)});f<s;)R(e,f++)}),O=p.prototype=S(Be),h(O,"constructor",p)):i(function(){p(1)})&&i(function(){new p(-1)})&&x(function(e){new p,new p(null),new p(1.5),new p(e)},!0)||(p=n(function(e,n,r,o){var i;return c(e,p,u),C(n)?n instanceof z||"ArrayBuffer"==(i=b(n))||"SharedArrayBuffer"==i?void 0!==o?new y(n,Se(r,t),o):void 0!==r?new y(n,Se(r,t)):new y(n):we in n?Me(p,n):Ne.call(p,n):new y(v(n))}),K(m!==Function.prototype?T(y).concat(T(m)):T(y),function(e){e in p||h(p,e,y[e])}),p.prototype=O,r||(O.constructor=p));var M=O[pe],k=!!M&&("values"==M.name||void 0==M.name),N=He.values;h(p,ve,!0),h(O,we,u),h(O,be,!0),h(O,ye,p),(l?new p(1)[ge]==u:ge in O)||B(O,ge,{get:function(){return u}}),E[u]=p,a(a.G+a.W+a.F*(p!=y),E),a(a.S,u,{BYTES_PER_ELEMENT:t}),a(a.S+a.F*i(function(){y.of.call(p,1)}),u,{from:Ne,of:Ae}),"BYTES_PER_ELEMENT"in O||h(O,"BYTES_PER_ELEMENT",t),a(a.P,u,Pe),L(u),a(a.P+a.F*Oe,u,{set:Le}),a(a.P+a.F*!k,u,He),r||O.toString==he||(O.toString=he),a(a.P+a.F*i(function(){new p(1).slice()}),u,{slice:xe}),a(a.P+a.F*(i(function(){return[1,2].toLocaleString()!=new p([1,2]).toLocaleString()})||!i(function(){O.toLocaleString.call([1,2])})),u,{toLocaleString:De}),P[u]=k?M:N,r||k||h(O,pe,N)}}else e.exports=function(){}},function(e,t,n){"use strict";t.__esModule=!0,t.setBrowserMeta=a,t.isChrome=function(){return i.chrome.value},t.isEdge=function(){return i.edge.value},t.isIE=function(){return i.ie.value},t.isIE8=function(){return i.ie8.value},t.isIE9=function(){return i.ie9.value},t.isMSBrowser=function(){return i.ie.value||i.edge.value},t.isMobileBrowser=function(){return i.mobile.value},t.isSafari=function(){return i.safari.value};var r=n(2),o=function(e){var t={value:!1,test:function(n,r){t.value=e(n,r)}};return t},i={chrome:o(function(e,t){return/Chrome/.test(e)&&/Google/.test(t)}),edge:o(function(e){return/Edge/.test(e)}),ie:o(function(e){return/Trident/.test(e)}),ie8:o(function(){return!document.createTextNode("test").textContent}),ie9:o(function(){return!!document.documentMode}),mobile:o(function(e){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)}),safari:o(function(e,t){return/Safari/.test(e)&&/Apple Computer/.test(t)})};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.userAgent,n=void 0===t?navigator.userAgent:t,o=e.vendor,a=void 0===o?navigator.vendor:o;(0,r.objectEach)(i,function(e){(0,e.test)(n,a)})}a()},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.__esModule=!0,t.requestAnimationFrame=function(e){return l.call(window,e)},t.cancelAnimationFrame=function(e){u.call(window,e)},t.isTouchSupported=function(){return"ontouchstart"in window},t.isWebComponentSupportedNatively=function(){var e=document.createElement("div");return!(!e.createShadowRoot||!e.createShadowRoot.toString().match(/\[native code\]/))},t.hasCaptionProblem=function(){void 0===o&&function(){var e=document.createElement("TABLE");e.style.borderSpacing="0",e.style.borderWidth="0",e.style.padding="0";var t=document.createElement("TBODY");e.appendChild(t),t.appendChild(document.createElement("TR")),t.firstChild.appendChild(document.createElement("TD")),t.firstChild.firstChild.innerHTML="<tr><td>t<br>t</td></tr>";var n=document.createElement("CAPTION");n.innerHTML="c<br>c<br>c<br>c",n.style.padding="0",n.style.margin="0",e.insertBefore(n,t),document.body.appendChild(e),o=e.offsetHeight<2*e.lastChild.offsetHeight,document.body.removeChild(e)}();return o},t.getComparisonFunction=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i)return i;i="object"===("undefined"==typeof Intl?"undefined":r(Intl))?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?function(e,t){return"".concat(e).localeCompare(t)}:function(e,t){return e===t?0:e>t?-1:1};return i};for(var o,i,a=0,s=["ms","moz","webkit","o"],l=window.requestAnimationFrame,u=window.cancelAnimationFrame,c=0;c<s.length&&!l;++c)l=window["".concat(s[c],"RequestAnimationFrame")],u=window["".concat(s[c],"CancelAnimationFrame")]||window["".concat(s[c],"CancelRequestAnimationFrame")];l||(l=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-a)),r=window.setTimeout(function(){e(t+n)},n);return a=t+n,r}),u||(u=function(e){clearTimeout(e)})},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(2),i=n(1),a=l(n(10)),s=l(n(182));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}var f={},h=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(0,o.defineGetter)(this,"wot",t,{writable:!1}),this.instance=this.wot,this.type="",this.mainTableScrollableElement=null,this.TABLE=this.wot.wtTable.TABLE,this.hider=this.wot.wtTable.hider,this.spreader=this.wot.wtTable.spreader,this.holder=this.wot.wtTable.holder,this.wtRootElement=this.wot.wtTable.wtRootElement,this.trimmingContainer=(0,r.getTrimmingContainer)(this.hider.parentNode.parentNode),this.areElementSizesAdjusted=!1,this.updateStateOfRendering()}return c(e,null,[{key:"registerOverlay",value:function(t,n){if(-1===e.CLONE_TYPES.indexOf(t))throw new Error("Unsupported overlay (".concat(t,")."));f[t]=n}},{key:"createOverlay",value:function(e,t){return new f[e](t)}},{key:"hasOverlay",value:function(e){return void 0!==f[e]}},{key:"isOverlayTypeOf",value:function(e,t){return!(!e||!f[t])&&e instanceof f[t]}},{key:"CLONE_TOP",get:function(){return"top"}},{key:"CLONE_BOTTOM",get:function(){return"bottom"}},{key:"CLONE_LEFT",get:function(){return"left"}},{key:"CLONE_TOP_LEFT_CORNER",get:function(){return"top_left_corner"}},{key:"CLONE_BOTTOM_LEFT_CORNER",get:function(){return"bottom_left_corner"}},{key:"CLONE_DEBUG",get:function(){return"debug"}},{key:"CLONE_TYPES",get:function(){return[e.CLONE_TOP,e.CLONE_BOTTOM,e.CLONE_LEFT,e.CLONE_TOP_LEFT_CORNER,e.CLONE_BOTTOM_LEFT_CORNER,e.CLONE_DEBUG]}}]),c(e,[{key:"updateStateOfRendering",value:function(){var e=this.needFullRender;this.needFullRender=this.shouldBeRendered();var t=e!==this.needFullRender;return t&&!this.needFullRender&&this.reset(),t}},{key:"shouldBeRendered",value:function(){return!0}},{key:"updateTrimmingContainer",value:function(){this.trimmingContainer=(0,r.getTrimmingContainer)(this.hider.parentNode.parentNode)}},{key:"updateMainScrollableElement",value:function(){this.mainTableScrollableElement=(0,r.getScrollableElement)(this.wot.wtTable.TABLE)}},{key:"makeClone",value:function(t){if(-1===e.CLONE_TYPES.indexOf(t))throw new Error('Clone type "'.concat(t,'" is not supported.'));var n=document.createElement("DIV"),o=document.createElement("TABLE");n.className="ht_clone_".concat(t," handsontable"),n.style.position="absolute",n.style.top=0,n.style.left=0,n.style.overflow="hidden",o.className=this.wot.wtTable.TABLE.className,n.appendChild(o),this.type=t,this.wot.wtTable.wtRootElement.parentNode.appendChild(n);var i=this.wot.getSetting("preventOverflow");return!0===i||"horizontal"===i&&this.type===e.CLONE_TOP||"vertical"===i&&this.type===e.CLONE_LEFT?this.mainTableScrollableElement=window:this.mainTableScrollableElement=(0,r.getScrollableElement)(this.wot.wtTable.TABLE),new s.default({cloneSource:this.wot,cloneOverlay:this,table:o})}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}},{key:"reset",value:function(){if(this.clone){var e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,n=e.style,r=t.style,o=e.parentNode.style;(0,i.arrayEach)([n,r,o],function(e){e.width="",e.height=""})}}},{key:"destroy",value:function(){new a.default(this.clone).destroy()}}]),e}();t.default=h},function(e,t,n){"use strict";t.__esModule=!0,t.isFunction=function(e){return"function"==typeof e},t.throttle=o,t.throttleAfterHits=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=o(e,t),i=n;function a(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return i?(i-=1,e.apply(this,n)):r.apply(this,n)}return a.clearHits=function(){i=n},a},t.debounce=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=null;return function(){for(var o=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];r&&clearTimeout(r);return r=setTimeout(function(){t=e.apply(o,a)},n),t}},t.pipe=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=t[0],i=t.slice(1);return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.arrayReduce)(i,function(e,t){return t(e)},o.apply(this,t))}},t.partial=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return e.apply(this,n.concat(r))}},t.curry=function(e){var t=e.length;return function n(r){return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=r.concat(i);return s.length>=t?e.apply(this,s):n(s)}}([])},t.curryRight=function(e){var t=e.length;return function n(r){return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=r.concat(i.reverse());return s.length>=t?e.apply(this,s):n(s)}}([])};var r=n(1);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=0,r={lastCallThrottled:!0},o=null;return function(){for(var i=this,a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var u=Date.now(),c=!1;r.lastCallThrottled=!0,n||(n=u,c=!0);var f=t-(u-n);return c?(r.lastCallThrottled=!1,e.apply(this,s)):(o&&clearTimeout(o),o=setTimeout(function(){r.lastCallThrottled=!1,e.apply(i,s),n=0,o=void 0},f)),r}}},function(e,t,n){var r=n(12);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(60)("meta"),o=n(12),i=n(30),a=n(19).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(8)(function(){return l(Object.preventExtensions({}))}),c=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return u&&f.NEED&&l(e)&&!i(e,r)&&c(e),e}}},function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}t.__esModule=!0,t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";o.has(e)||o.set(e,new Map);var t=o.get(e);return{register:function(e,n){t.set(e,n)},getItem:function(e){return t.get(e)},hasItem:function(e){return t.has(e)},getNames:function(){return r(t.keys())},getValues:function(){return r(t.values())}}},t.collection=void 0;var o=new Map;t.collection=o},function(e,t,n){"use strict";t.__esModule=!0,t.getValidator=function(e){if("function"==typeof e)return e;if(!h(e))throw Error('No registered validator found under "'.concat(e,'" name'));return f(e)},t.getRegisteredValidators=t.getRegisteredValidatorNames=t.hasValidator=t.registerValidator=void 0;var r=l(n(54)),o=l(n(662)),i=l(n(663)),a=l(n(664)),s=l(n(665));function l(e){return e&&e.__esModule?e:{default:e}}var u=(0,r.default)("validators"),c=u.register,f=u.getItem,h=u.hasItem,d=u.getNames,p=u.getValues;t.getRegisteredValidators=p,t.getRegisteredValidatorNames=d,t.hasValidator=h,t.registerValidator=c,c("autocomplete",o.default),c("date",i.default),c("numeric",a.default),c("time",s.default)},function(e,t,n){"use strict";t.__esModule=!0,t.predefinedItems=function(){var e={};return(0,r.objectEach)(b,function(t,n){e[n]=t()}),e},t.addItem=function(e,t){-1===w.indexOf(e)&&(b[e]=t)},t.ITEMS=t.UNDO=t.SEPARATOR=t.ROW_BELOW=t.ROW_ABOVE=t.REMOVE_ROW=t.REMOVE_COLUMN=t.REDO=t.READ_ONLY=t.COLUMN_RIGHT=t.COLUMN_LEFT=t.CLEAR_COLUMN=t.ALIGNMENT=void 0;var r=n(2),o=y(n(717));t.ALIGNMENT=o.KEY;var i=y(n(718));t.CLEAR_COLUMN=i.KEY;var a=y(n(719));t.COLUMN_LEFT=a.KEY;var s=y(n(720));t.COLUMN_RIGHT=s.KEY;var l=y(n(721));t.READ_ONLY=l.KEY;var u=y(n(722));t.REDO=u.KEY;var c=y(n(723));t.REMOVE_COLUMN=c.KEY;var f=y(n(724));t.REMOVE_ROW=f.KEY;var h=y(n(725));t.ROW_ABOVE=h.KEY;var d=y(n(726));t.ROW_BELOW=d.KEY;var p=y(n(139));t.SEPARATOR=p.KEY;var g,v=y(n(727));function y(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.UNDO=v.KEY;var w=[h.KEY,d.KEY,a.KEY,s.KEY,i.KEY,f.KEY,c.KEY,v.KEY,u.KEY,l.KEY,o.KEY,p.KEY];t.ITEMS=w;var b=(m(g={},p.KEY,p.default),m(g,h.KEY,h.default),m(g,d.KEY,d.default),m(g,a.KEY,a.default),m(g,s.KEY,s.default),m(g,i.KEY,i.default),m(g,f.KEY,f.default),m(g,c.KEY,c.default),m(g,v.KEY,v.default),m(g,u.KEY,u.default),m(g,l.KEY,l.default),m(g,o.KEY,o.default),g)},function(e,t,n){"use strict";function r(e){return"string"==typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}t.__esModule=!0,t.isFormulaExpression=function(e){return"string"==typeof e&&e.length>=2&&"="===e.charAt(0)},t.isFormulaExpressionEscaped=r,t.unescapeFormulaExpression=function(e){return r(e)?e.substr(1):e},t.toUpperCaseFormula=function(e){var t=/(\\"|"(?:\\"|[^"])*"|(\+))|(\\'|'(?:\\'|[^'])*'|(\+))/g,n=e.match(t)||[],r=-1;return e.toUpperCase().replace(t,function(){return n[r+=1]})},t.cellCoordFactory=function(e,t){return function(n){return{row:"row"===e?t:n.row,column:"column"===e?t:n.column}}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(88),o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(n(465));function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=[1,2,3],d=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=s(this,l(t).call(this,e,n))).precedents=[],r.value=null,r.error=null,r.state=t.STATE_UP_TO_DATE,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,i.default),c(t,null,[{key:"STATE_OUT_OFF_DATE",get:function(){return 1}},{key:"STATE_COMPUTING",get:function(){return 2}},{key:"STATE_UP_TO_DATE",get:function(){return 3}}]),c(t,[{key:"setValue",value:function(e){this.value=e}},{key:"getValue",value:function(){return this.value}},{key:"setError",value:function(e){this.error=e}},{key:"getError",value:function(){return this.error}},{key:"hasError",value:function(){return null!==this.error}},{key:"setState",value:function(e){if(-1===h.indexOf(e))throw Error("Unrecognized state: ".concat(e));this.state=e}},{key:"isState",value:function(e){return this.state===e}},{key:"addPrecedent",value:function(e){if(this.isEqual(e))throw Error(r.ERROR_REF);this.hasPrecedent(e)||this.precedents.push(e)}},{key:"removePrecedent",value:function(e){if(this.isEqual(e))throw Error(r.ERROR_REF);this.precedents=(0,o.arrayFilter)(this.precedents,function(t){return!t.isEqual(e)})}},{key:"clearPrecedents",value:function(){this.precedents.length=0}},{key:"getPrecedents",value:function(){return this.precedents}},{key:"hasPrecedents",value:function(){return this.precedents.length>0}},{key:"hasPrecedent",value:function(e){return(0,o.arrayFilter)(this.precedents,function(t){return t.isEqual(e)}).length>0}}]),t}();t.default=d},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=!1},function(e,t,n){var r=n(149),o=n(111);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(38),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},function(e,t,n){var r=n(9),o=n(150),i=n(111),a=n(110)("IE_PROTO"),s=function(){},l=function(){var e,t=n(107)("iframe"),r=i.length;for(t.style.display="none",n(113).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;r--;)delete l.prototype[i[r]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[a]=e):n=l(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(149),o=n(111).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(30),o=n(26),i=n(110)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(449);t.registerRootComparator=r.registerRootComparator,t.getRootComparator=r.getRootComparator,t.getCompareFunctionFactory=r.getCompareFunctionFactory;var o=n(709);t.FIRST_AFTER_SECOND=o.FIRST_AFTER_SECOND,t.FIRST_BEFORE_SECOND=o.FIRST_BEFORE_SECOND,t.DO_NOT_SWAP=o.DO_NOT_SWAP,t.sort=o.sort},function(e,t,n){var r=n(19).f,o=n(30),i=n(17)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t){e.exports={}},function(e,t,n){var r=n(17)("unscopables"),o=Array.prototype;void 0==o[r]&&n(31)(o,r,{}),e.exports=function(e){o[r][e]=!0}},function(e,t,n){"use strict";var r=n(11),o=n(19),i=n(21),a=n(17)("species");e.exports=function(e){var t=r[e];i&&t&&!t[a]&&o.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(25);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){var r=n(12);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){"use strict";t.__esModule=!0,t.registerIdentity=function(e,t){s.set(e,t)},t.getTranslator=function(e){var t,n=e instanceof r.default?e:u(e);l.has(n)?t=l.get(n):(t=new a(n),l.set(n,t));return t},t.getIdentity=u,t.RecordTranslator=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(135)),o=n(2);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(e,[{key:"toVisualRow",value:function(e){return this.hot.runHooks("unmodifyRow",e)}},{key:"toVisualColumn",value:function(e){return this.hot.runHooks("unmodifyCol",e)}},{key:"toVisual",value:function(e,t){return(0,o.isObject)(e)?{row:this.toVisualRow(e.row),column:this.toVisualColumn(e.column)}:[this.toVisualRow(e),this.toVisualColumn(t)]}},{key:"toPhysicalRow",value:function(e){return this.hot.runHooks("modifyRow",e)}},{key:"toPhysicalColumn",value:function(e){return this.hot.runHooks("modifyCol",e)}},{key:"toPhysical",value:function(e,t){return(0,o.isObject)(e)?{row:this.toPhysicalRow(e.row),column:this.toPhysicalColumn(e.column)}:[this.toPhysicalRow(e),this.toPhysicalColumn(t)]}}]),e}();t.RecordTranslator=a;var s=new WeakMap,l=new WeakMap;function u(e){if(!s.has(e))throw Error("Record translator was not registered for this object identity");return s.get(e)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1),o=n(2),i=n(5);function a(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var s={_arrayMap:[],getValueByIndex:function(e){var t=null;return e<this._arrayMap.length&&(t=this._arrayMap[e]),t},getIndexByValue:function(e){var t;return-1===(t=this._arrayMap.indexOf(e))?null:t},insertItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=(0,r.arrayMax)(this._arrayMap)+1,a=[];return(0,i.rangeEach)(n-1,function(n){a.push(t._arrayMap.splice(e+n,0,o+n))}),a},removeItems:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[];if(Array.isArray(e)){var r=[].concat(this._arrayMap);e.sort(function(e,t){return t-e});for(var o=0,i=e.length;o<i;o++){var a=e[o];this._arrayMap.splice(a,1),n.push(r[a])}}else n=this._arrayMap.splice(e,t);return n},unshiftItems:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.removeItems(e,t);this._arrayMap=(0,r.arrayMap)(this._arrayMap,function(e){var t=e,o=function(e){return(0,r.arrayReduce)(n,function(t,n){var r=t;return e>n&&(r+=1),r},0)}(t);return o&&(t-=o),t})},shiftItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._arrayMap=(0,r.arrayMap)(this._arrayMap,function(t){var r=t;return r>=e&&(r+=n),r}),(0,i.rangeEach)(n-1,function(n){t._arrayMap.splice(e+n,0,e+n)})},swapIndexes:function(e,t){var n;(n=this._arrayMap).splice.apply(n,[t,0].concat(a(this._arrayMap.splice(e,1))))},clearMap:function(){this._arrayMap.length=0}};(0,o.defineGetter)(s,"MIXIN_NAME","arrayMapper",{writable:!1,enumerable:!1});var l=s;t.default=l},function(e,t,n){"use strict";t.__esModule=!0,t.createId=i,t.createDefaultCustomBorder=a,t.createSingleEmptyBorder=s,t.createDefaultHtBorder=l,t.createEmptyBorders=function(e,t){return{id:i(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},right:{hide:!0},bottom:{hide:!0},left:{hide:!0}}},t.extendDefaultBorder=function(e,t){(0,r.hasOwnProperty)(t,"border")&&(e.border=t.border);(0,r.hasOwnProperty)(t,"top")&&(t.top?((0,r.isObject)(t.top)||(t.top={width:1,color:"#000"}),e.top=t.top):(t.top={hide:!0},e.top=t.top));(0,r.hasOwnProperty)(t,"right")&&(t.right?((0,r.isObject)(t.right)||(t.right={width:1,color:"#000"}),e.right=t.right):(t.right={hide:!0},e.right=t.right));(0,r.hasOwnProperty)(t,"bottom")&&(t.bottom?((0,r.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}),e.bottom=t.bottom):(t.bottom={hide:!0},e.bottom=t.bottom));(0,r.hasOwnProperty)(t,"left")&&(t.left?((0,r.isObject)(t.left)||(t.left={width:1,color:"#000"}),e.left=t.left):(t.left={hide:!0},e.left=t.left));return e},t.checkSelectionBorders=function(e,t){var n=!1;return(0,o.arrayEach)(e.getSelectedRange(),function(o){o.forAll(function(o,i){var a=e.getCellMeta(o,i).borders;if(a){if(!t)return n=!0,!1;if(!(0,r.hasOwnProperty)(a[t],"hide")||!1===a[t].hide)return n=!0,!1}})}),n},t.markSelected=function(e){return'<span class="selected">'.concat(String.fromCharCode(10003),"</span>").concat(e)};var r=n(2),o=n(1);function i(e,t){return"border_row".concat(e,"col").concat(t)}function a(){return{width:1,color:"#000"}}function s(){return{hide:!0}}function l(){return{width:1,color:"#000",cornerVisible:!1}}},function(e,t,n){var r=n(45);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(45),o=n(17)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(9),o=n(44),i=n(17)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[i])?t:o(n)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EditorState=void 0;var r=n(13),o=n(14),i={VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"};function a(e){this.instance=e,this.state=i.VIRGIN,this._opened=!1,this._fullEditMode=!1,this._closeCallback=null,this.init()}t.EditorState=i,a.prototype._fireCallbacks=function(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)},a.prototype.init=function(){},a.prototype.getValue=function(){throw Error("Editor getValue() method unimplemented")},a.prototype.setValue=function(){throw Error("Editor setValue() method unimplemented")},a.prototype.open=function(){throw Error("Editor open() method unimplemented")},a.prototype.close=function(){throw Error("Editor close() method unimplemented")},a.prototype.prepare=function(e,t,n,r,o,a){this.TD=r,this.row=e,this.col=t,this.prop=n,this.originalValue=o,this.cellProperties=a,this.state=i.VIRGIN},a.prototype.extend=function(){var e=this.constructor;return function(e,t){function n(){}return n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e,e}(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.apply(this,n)},e)},a.prototype.saveValue=function(e,t){var n,r;t?((n=this.instance.getSelectedLast())[0]>n[2]&&(r=n[0],n[0]=n[2],n[2]=r),n[1]>n[3]&&(r=n[1],n[1]=n[3],n[3]=r)):n=[this.row,this.col,null,null],this.instance.populateFromArray(n[0],n[1],e,n[2],n[3],"edit")},a.prototype.beginEditing=function(e,t){if(this.state===i.VIRGIN){if(this.instance.view.scrollViewport(new r.CellCoords(this.row,this.col)),this.state=i.EDITING,this.isInFullEditMode()){var n="string"==typeof e?e:(0,o.stringify)(this.originalValue);this.setValue(n)}this.open(t),this._opened=!0,this.focus(),this.instance.view.render(),this.instance.runHooks("afterBeginEditing",this.row,this.col)}},a.prototype.finishEditing=function(e,t,n){var r,o=this;if(n){var a=this._closeCallback;this._closeCallback=function(e){a&&a(e),n(e),o.instance.view.render()}}if(!this.isWaiting())if(this.state!==i.VIRGIN){if(this.state===i.EDITING){if(e)return this.cancelChanges(),void this.instance.view.render();var s=this.getValue();r=this.instance.getSettings().trimWhitespace?[["string"==typeof s?String.prototype.trim.call(s||""):s]]:[[s]],this.state=i.WAITING,this.saveValue(r,t),this.instance.getCellValidator(this.cellProperties)?this.instance.addHookOnce("postAfterValidate",function(e){o.state=i.FINISHED,o.discardEditor(e)}):(this.state=i.FINISHED,this.discardEditor(!0))}}else this.instance._registerTimeout(function(){o._fireCallbacks(!0)})},a.prototype.cancelChanges=function(){this.state=i.FINISHED,this.discardEditor()},a.prototype.discardEditor=function(e){this.state===i.FINISHED&&(!1===e&&!0!==this.cellProperties.allowInvalid?(this.instance.selectCell(this.row,this.col),this.focus(),this.state=i.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this._fullEditMode=!1,this.state=i.VIRGIN,this._fireCallbacks(!0)))},a.prototype.enableFullEditMode=function(){this._fullEditMode=!0},a.prototype.isInFullEditMode=function(){return this._fullEditMode},a.prototype.isOpened=function(){return this._opened},a.prototype.isWaiting=function(){return this.state===i.WAITING},a.prototype.checkEditorSection=function(){var e=this.instance.countRows(),t="";return this.row<this.instance.getSettings().fixedRowsTop?t=this.col<this.instance.getSettings().fixedColumnsLeft?"top-left-corner":"top":this.instance.getSettings().fixedRowsBottom&&this.row>=e-this.instance.getSettings().fixedRowsBottom?t=this.col<this.instance.getSettings().fixedColumnsLeft?"bottom-left-corner":"bottom":this.col<this.instance.getSettings().fixedColumnsLeft&&(t="left"),t};var s=a;t.default=s},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}t.__esModule=!0,t.default=void 0;var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.row=null,this.col=null,void 0!==t&&void 0!==n&&(this.row=t,this.col=n)}return function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(e,[{key:"isValid",value:function(e){return!(this.row<0||this.col<0)&&!(this.row>=e.getSetting("totalRows")||this.col>=e.getSetting("totalColumns"))}},{key:"isEqual",value:function(e){return e===this||this.row===e.row&&this.col===e.col}},{key:"isSouthEastOf",value:function(e){return this.row>=e.row&&this.col>=e.col}},{key:"isNorthWestOf",value:function(e){return this.row<=e.row&&this.col<=e.col}},{key:"isSouthWestOf",value:function(e){return this.row>=e.row&&this.col<=e.col}},{key:"isNorthEastOf",value:function(e){return this.row<=e.row&&this.col>=e.col}},{key:"toObject",value:function(){return{row:this.row,col:this.col}}}]),e}();t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=c(n(644)),i=n(48),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(82)),s=c(n(10)),l=n(24),u=n(16);function c(e){return e&&e.__esModule?e:{default:e}}var f=a.default.prototype.extend();f.prototype.init=function(){var e=this;this.createElements(),this.eventManager=new s.default(this),this.bindEvents(),this.autoResize=(0,o.default)(),this.holderZIndex=-1,this.instance.addHook("afterDestroy",function(){e.destroy()})},f.prototype.prepare=function(e,t,n,r,o,s){for(var l=this,u=this.state,c=arguments.length,f=new Array(c>6?c-6:0),h=6;h<c;h++)f[h-6]=arguments[h];if(a.default.prototype.prepare.apply(this,[e,t,n,r,o,s].concat(f)),!s.readOnly){this.refreshDimensions(!0);var d=s.allowInvalid,p=s.fragmentSelection;d&&(this.TEXTAREA.value=""),u!==a.EditorState.FINISHED&&this.hideEditableElement(),!p&&!(0,i.isMobileBrowser)()&&this.instance._registerImmediate(function(){return l.focus()})}},f.prototype.hideEditableElement=function(){this.textareaParentStyle.top="-9999px",this.textareaParentStyle.left="-9999px",this.textareaParentStyle.zIndex="-1",this.textareaParentStyle.position="fixed"},f.prototype.showEditableElement=function(){this.textareaParentStyle.zIndex=this.holderZIndex>=0?this.holderZIndex:"",this.textareaParentStyle.position=""},f.prototype.getValue=function(){return this.TEXTAREA.value},f.prototype.setValue=function(e){this.TEXTAREA.value=e},f.prototype.beginEditing=function(){if(this.state===a.EditorState.VIRGIN){this.TEXTAREA.value="";for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];a.default.prototype.beginEditing.apply(this,t)}};var h=function(e){var t=this.getActiveEditor(),n=(e.ctrlKey||e.metaKey)&&!e.altKey;if(e.target===t.TEXTAREA&&!(0,u.isImmediatePropagationStopped)(e)){switch(e.keyCode){case l.KEY_CODES.ARROW_RIGHT:case l.KEY_CODES.ARROW_LEFT:t.isInFullEditMode()&&(!t.isWaiting()&&!t.allowKeyEventPropagation||!t.isWaiting()&&t.allowKeyEventPropagation&&!t.allowKeyEventPropagation(e.keyCode))&&(0,u.stopImmediatePropagation)(e);break;case l.KEY_CODES.ARROW_UP:case l.KEY_CODES.ARROW_DOWN:t.isInFullEditMode()&&(!t.isWaiting()&&!t.allowKeyEventPropagation||!t.isWaiting()&&t.allowKeyEventPropagation&&!t.allowKeyEventPropagation(e.keyCode))&&(0,u.stopImmediatePropagation)(e);break;case l.KEY_CODES.ENTER:var o=this.selection.isMultiple();if(n&&!o||e.altKey){if(t.isOpened()){var i=(0,r.getCaretPosition)(t.TEXTAREA),a=t.getValue(),s="".concat(a.slice(0,i),"\n").concat(a.slice(i));t.setValue(s),(0,r.setCaretPosition)(t.TEXTAREA,i+1)}else t.beginEditing("".concat(t.originalValue,"\n"));(0,u.stopImmediatePropagation)(e)}e.preventDefault();break;case l.KEY_CODES.BACKSPACE:case l.KEY_CODES.DELETE:case l.KEY_CODES.HOME:case l.KEY_CODES.END:(0,u.stopImmediatePropagation)(e)}-1===[l.KEY_CODES.ARROW_UP,l.KEY_CODES.ARROW_RIGHT,l.KEY_CODES.ARROW_DOWN,l.KEY_CODES.ARROW_LEFT].indexOf(e.keyCode)&&t.autoResize.resize(String.fromCharCode(e.keyCode))}};f.prototype.open=function(){this.refreshDimensions(),this.showEditableElement(),this.instance.addHook("beforeKeyDown",h)},f.prototype.close=function(){this.autoResize.unObserve(),document.activeElement===this.TEXTAREA&&this.instance.listen(),this.hideEditableElement(),this.instance.removeHook("beforeKeyDown",h)},f.prototype.focus=function(){this.TEXTAREA.select(),(0,r.setCaretPosition)(this.TEXTAREA,this.TEXTAREA.value.length)},f.prototype.createElements=function(){this.TEXTAREA=document.createElement("TEXTAREA"),this.TEXTAREA.tabIndex=-1,(0,r.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.TEXTAREA_PARENT=document.createElement("DIV"),(0,r.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.textareaParentStyle.zIndex="-1",this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.instance.rootElement.appendChild(this.TEXTAREA_PARENT)},f.prototype.getEditedCell=function(){var e;switch(this.checkEditorSection()){case"top":e=this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=101;break;case"top-left-corner":e=this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=103;break;case"bottom-left-corner":e=this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=103;break;case"left":e=this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=102;break;case"bottom":e=this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=102;break;default:e=this.instance.getCell(this.row,this.col),this.holderZIndex=-1}return-1!==e&&-2!==e?e:void 0},f.prototype.refreshValue=function(){var e=this.instance.toPhysicalRow(this.row),t=this.instance.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()},f.prototype.refreshDimensions=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state===a.EditorState.EDITING||e)if(this.TD=this.getEditedCell(),this.TD){var t,n=(0,r.offset)(this.TD),o=(0,r.offset)(this.instance.rootElement),i=this.instance.view.wt.wtOverlays.topOverlay.mainTableScrollableElement,s=this.instance.view.wt.wtOverlays.leftOverlay.mainTableScrollableElement,l=this.instance.countRows(),u=i!==window?i.scrollTop:0,c=s!==window?s.scrollLeft:0,f=this.checkEditorSection(),h=["","left"].includes(f)?u:0,d=["","top","bottom"].includes(f)?c:0,p=n.top===o.top?0:1,g=this.instance.getSettings(),v=this.instance.hasColHeaders(),y=this.TD.style.backgroundColor,m=n.top-o.top-p-h,w=n.left-o.left-1-d;switch(f){case"top":t=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":t=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":t=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":t=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":t=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode)}(v&&0===this.instance.getSelectedLast()[0]||g.fixedRowsBottom&&this.instance.getSelectedLast()[0]===l-g.fixedRowsBottom)&&(m+=1),0===this.instance.getSelectedLast()[1]&&(w+=1),t&&-1!==t?this.textareaParentStyle[t[0]]=t[1]:(0,r.resetCssTransform)(this.TEXTAREA_PARENT),this.textareaParentStyle.top="".concat(m,"px"),this.textareaParentStyle.left="".concat(w,"px"),this.showEditableElement();var b=this.instance.view.wt.wtViewport.rowsRenderCalculator.startPosition,C=this.instance.view.wt.wtViewport.columnsRenderCalculator.startPosition,E=this.instance.view.wt.wtOverlays.leftOverlay.getScrollPosition(),O=this.instance.view.wt.wtOverlays.topOverlay.getScrollPosition(),S=(0,r.getScrollbarWidth)(),_=this.TD.offsetTop+b-O,T=this.TD.offsetLeft+C-E,R=(0,r.innerWidth)(this.TD)-8,M=(0,r.hasVerticalScrollbar)(i)?S:0,k=(0,r.hasHorizontalScrollbar)(s)?S:0,N=this.instance.view.maximumVisibleElementWidth(T)-9-M,A=this.TD.scrollHeight+1,I=Math.max(this.instance.view.maximumVisibleElementHeight(_)-k,23),D=(0,r.getComputedStyle)(this.TD);this.TEXTAREA.style.fontSize=D.fontSize,this.TEXTAREA.style.fontFamily=D.fontFamily,this.TEXTAREA.style.backgroundColor=y,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(A,I),maxHeight:I,minWidth:Math.min(R,N),maxWidth:N},!0)}else e||this.close(!0)},f.prototype.bindEvents=function(){var e=this;this.eventManager.addEventListener(this.TEXTAREA,"cut",function(e){(0,u.stopPropagation)(e)}),this.eventManager.addEventListener(this.TEXTAREA,"paste",function(e){(0,u.stopPropagation)(e)}),this.instance.addHook("afterScrollHorizontally",function(){e.refreshDimensions()}),this.instance.addHook("afterScrollVertically",function(){e.refreshDimensions()}),this.instance.addHook("afterColumnResize",function(){e.refreshDimensions(),e.focus()}),this.instance.addHook("afterRowResize",function(){e.refreshDimensions(),e.focus()}),this.instance.addHook("afterDestroy",function(){e.eventManager.destroy()})},f.prototype.destroy=function(){this.eventManager.destroy()};var d=f;t.default=d},function(e,t,n){"use strict";t.__esModule=!0,t.sortComparison=function(e,t){if("number"==typeof e&&"number"==typeof t)return e-t;return i(e,t)},t.toVisualValue=a,t.createArrayAssertion=u,t.toEmptyString=function(e){return null===e||void 0===e?"":e},t.unifyColumnValues=function(e){var t=e;t=l?Array.from(new Set(t)):(0,o.arrayUnique)(t);return t=t.sort(function(e,t){return"number"==typeof e&&"number"==typeof t?e-t:e===t?0:e>t?1:-1})},t.intersectValues=function(e,t,n,r){var i,s=[],l=e===t;l||(i=u(t));return(0,o.arrayEach)(e,function(e){var t=!1;(l||i(e))&&(t=!0);var o={checked:t,value:e,visualValue:a(e,n)};r&&r(o),s.push(o)}),s};var r=n(49),o=n(1),i=(0,r.getComparisonFunction)();function a(e,t){var n=e;return""===n&&(n="(".concat(t,")")),n}var s=new Set([1]).has(1),l=s&&"function"==typeof Array.from;function u(e){var t=e;return s&&(t=new Set(t)),function(e){return s?t.has(e):!!~t.indexOf(e)}}},function(e,t,n){"use strict";t.__esModule=!0,t.getOperationFunc=function(e){if(!r[e])throw Error('Operation with id "'.concat(e,'" does not exist.'));var t=r[e].func;return function(e,n){return t(e,n)}},t.getOperationName=function(e){return r[e].name},t.registerOperation=function(e,t,n){r[e]={name:t,func:n}},t.operations=void 0;var r={};t.operations=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(2),o=u(n(29)),i=u(n(10)),a=n(3),s=n(1),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}var h=["click","input","keydown","keypress","keyup","focus","blur","change"],d=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this.eventManager=new i.default(this),this.options=(0,r.extend)(e.DEFAULTS,n),this._element=document.createElement(this.options.wrapIt?"div":this.options.tagName),this.buildState=!1}return f(e,null,[{key:"DEFAULTS",get:function(){return(0,r.clone)({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}}]),f(e,[{key:"setValue",value:function(e){this.options.value=e,this.update()}},{key:"getValue",value:function(){return this.options.value}},{key:"isBuilt",value:function(){return"built"===this.buildState}},{key:"translateIfPossible",value:function(e){return"string"==typeof e&&e.startsWith(l.FILTERS_NAMESPACE)?this.hot.getTranslatedPhrase(e):e}},{key:"build",value:function(){var e=this,t=function(t,n){e.eventManager.addEventListener(t,n,function(t){return e.runLocalHooks(n,t,e)})};if(this.buildState||(this.buildState="building"),this.options.className&&(0,a.addClass)(this._element,this.options.className),this.options.children.length)(0,s.arrayEach)(this.options.children,function(t){return e._element.appendChild(t.element)});else if(this.options.wrapIt){var n=document.createElement(this.options.tagName);(0,r.objectEach)(this.options,function(t,r){void 0!==n[r]&&"className"!==r&&"tagName"!==r&&"children"!==r&&(n[r]=e.translateIfPossible(t))}),this._element.appendChild(n),(0,s.arrayEach)(h,function(e){return t(n,e)})}else(0,s.arrayEach)(h,function(n){return t(e._element,n)})}},{key:"update",value:function(){}},{key:"reset",value:function(){this.options.value="",this.update()}},{key:"show",value:function(){this.element.style.display=""}},{key:"hide",value:function(){this.element.style.display="none"}},{key:"focus",value:function(){}},{key:"destroy",value:function(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}},{key:"element",get:function(){return"building"===this.buildState?this._element:"built"===this.buildState?(this.update(),this._element):(this.buildState="building",this.build(),this.buildState="built",this._element)}}]),e}();(0,r.mixin)(d,o.default);var p=d;t.default=p},function(module,exports,__webpack_require__){!function(e,t){module.exports=t()}("undefined"!=typeof self&&self,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t){t.nil=new Error("#NULL!"),t.div0=new Error("#DIV/0!"),t.value=new Error("#VALUE!"),t.ref=new Error("#REF!"),t.name=new Error("#NAME?"),t.num=new Error("#NUM!"),t.na=new Error("#N/A"),t.error=new Error("#ERROR!"),t.data=new Error("#GETTING_DATA")},function(e,t,n){var r=n(0);t.flattenShallow=function(e){return e&&e.reduce?e.reduce(function(e,t){var n=Array.isArray(e),r=Array.isArray(t);return n&&r?e.concat(t):n?(e.push(t),e):r?[e].concat(t):[e,t]}):e},t.isFlat=function(e){if(!e)return!1;for(var t=0;t<e.length;++t)if(Array.isArray(e[t]))return!1;return!0},t.flatten=function(){for(var e=t.argsToArray.apply(null,arguments);!t.isFlat(e);)e=t.flattenShallow(e);return e},t.argsToArray=function(e){var n=[];return t.arrayEach(e,function(e){n.push(e)}),n},t.numbers=function(){return this.flatten.apply(null,arguments).filter(function(e){return"number"==typeof e})},t.cleanFloat=function(e){return Math.round(1e14*e)/1e14},t.parseBool=function(e){if("boolean"==typeof e)return e;if(e instanceof Error)return e;if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=e.toUpperCase();if("TRUE"===t)return!0;if("FALSE"===t)return!1}return e instanceof Date&&!isNaN(e)||r.value},t.parseNumber=function(e){return void 0===e||""===e?r.value:isNaN(e)?r.value:parseFloat(e)},t.parseNumberArray=function(e){var n,o;if(!e||0===(n=e.length))return r.value;for(;n--;){if((o=t.parseNumber(e[n]))===r.value)return o;e[n]=o}return e},t.parseMatrix=function(e){var n;if(!e||0===e.length)return r.value;for(var o=0;o<e.length;o++)if(n=t.parseNumberArray(e[o]),e[o]=n,n instanceof Error)return n;return e};var o=new Date(1900,0,1);t.parseDate=function(e){if(!isNaN(e)){if(e instanceof Date)return new Date(e);var t=parseInt(e,10);return t<0?r.num:t<=60?new Date(o.getTime()+864e5*(t-1)):new Date(o.getTime()+864e5*(t-2))}return"string"!=typeof e||(e=new Date(e),isNaN(e))?r.value:e},t.parseDateArray=function(e){for(var t,n=e.length;n--;){if((t=this.parseDate(e[n]))===r.value)return t;e[n]=t}return e},t.anyIsError=function(){for(var e=arguments.length;e--;)if(arguments[e]instanceof Error)return!0;return!1},t.arrayValuesToNumbers=function(e){for(var t,n=e.length;n--;)if("number"!=typeof(t=e[n]))if(!0!==t)if(!1!==t){if("string"==typeof t){var r=this.parseNumber(t);r instanceof Error?e[n]=0:e[n]=r}}else e[n]=0;else e[n]=1;return e},t.rest=function(e,t){return t=t||1,e&&"function"==typeof e.slice?e.slice(t):e},t.initial=function(e,t){return t=t||1,e&&"function"==typeof e.slice?e.slice(0,e.length-t):e},t.arrayEach=function(e,t){for(var n=-1,r=e.length;++n<r&&!1!==t(e[n],n,e););return e},t.transpose=function(e){return e?e[0].map(function(t,n){return e.map(function(e){return e[n]})}):r.value}},function(e,t,n){"use strict";var r;t.__esModule=!0,t.default=function(e){var t=void 0;e=(e+"").replace(/#|!|\?/g,""),h[e]&&(t=h[e]);return t||null},t.isValidStrict=function(e){var t=!1;for(var n in h)if(Object.prototype.hasOwnProperty.call(h,n)&&h[n]===e){t=!0;break}return t};var o=t.ERROR="ERROR",i=t.ERROR_DIV_ZERO="DIV/0",a=t.ERROR_NAME="NAME",s=t.ERROR_NOT_AVAILABLE="N/A",l=t.ERROR_NULL="NULL",u=t.ERROR_NUM="NUM",c=t.ERROR_REF="REF",f=t.ERROR_VALUE="VALUE",h=((r={})[o]="#ERROR!",r[i]="#DIV/0!",r[a]="#NAME?",r[s]="#N/A",r[l]="#NULL!",r[u]="#NUM!",r[c]="#REF!",r[f]="#VALUE!",r)},function(e,t,n){"use strict";function r(e){var t=void 0;return"number"==typeof e?t=e:"string"==typeof e&&(t=e.indexOf(".")>-1?parseFloat(e):parseInt(e,10)),t}t.__esModule=!0,t.toNumber=r,t.invertNumber=function(e){return-1*r(e)}},function(module,exports,__webpack_require__){var utils=__webpack_require__(1),error=__webpack_require__(0),statistical=__webpack_require__(5),information=__webpack_require__(7);exports.ABS=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.abs(e)},exports.ACOS=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.acos(e);return isNaN(t)&&(t=error.num),t},exports.ACOSH=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.log(e+Math.sqrt(e*e-1));return isNaN(t)&&(t=error.num),t},exports.ACOT=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.atan(1/e)},exports.ACOTH=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=.5*Math.log((e+1)/(e-1));return isNaN(t)&&(t=error.num),t},exports.AGGREGATE=function(e,t,n,r){if(e=utils.parseNumber(e),t=utils.parseNumber(e),utils.anyIsError(e,t))return error.value;switch(e){case 1:return statistical.AVERAGE(n);case 2:return statistical.COUNT(n);case 3:return statistical.COUNTA(n);case 4:return statistical.MAX(n);case 5:return statistical.MIN(n);case 6:return exports.PRODUCT(n);case 7:return statistical.STDEV.S(n);case 8:return statistical.STDEV.P(n);case 9:return exports.SUM(n);case 10:return statistical.VAR.S(n);case 11:return statistical.VAR.P(n);case 12:return statistical.MEDIAN(n);case 13:return statistical.MODE.SNGL(n);case 14:return statistical.LARGE(n,r);case 15:return statistical.SMALL(n,r);case 16:return statistical.PERCENTILE.INC(n,r);case 17:return statistical.QUARTILE.INC(n,r);case 18:return statistical.PERCENTILE.EXC(n,r);case 19:return statistical.QUARTILE.EXC(n,r)}},exports.ARABIC=function(e){if(!/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/.test(e))return error.value;var t=0;return e.replace(/[MDLV]|C[MD]?|X[CL]?|I[XV]?/g,function(e){t+={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1}[e]}),t},exports.ASIN=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.asin(e);return isNaN(t)&&(t=error.num),t},exports.ASINH=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.log(e+Math.sqrt(e*e+1))},exports.ATAN=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.atan(e)},exports.ATAN2=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:Math.atan2(e,t)},exports.ATANH=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.log((1+e)/(1-e))/2;return isNaN(t)&&(t=error.num),t},exports.BASE=function(e,t,n){if(n=n||0,e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n))return error.value;n=void 0===n?0:n;var r=e.toString(t);return new Array(Math.max(n+1-r.length,0)).join("0")+r},exports.CEILING=function(e,t,n){if(t=void 0===t?1:Math.abs(t),n=n||0,e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n))return error.value;if(0===t)return 0;var r=-Math.floor(Math.log(t)/Math.log(10));return e>=0?exports.ROUND(Math.ceil(e/t)*t,r):0===n?-exports.ROUND(Math.floor(Math.abs(e)/t)*t,r):-exports.ROUND(Math.ceil(Math.abs(e)/t)*t,r)},exports.CEILING.MATH=exports.CEILING,exports.CEILING.PRECISE=exports.CEILING,exports.COMBIN=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:exports.FACT(e)/(exports.FACT(t)*exports.FACT(e-t))},exports.COMBINA=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:0===e&&0===t?1:exports.COMBIN(e+t-1,e-1)},exports.COS=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.cos(e)},exports.COSH=function(e){return(e=utils.parseNumber(e))instanceof Error?e:(Math.exp(e)+Math.exp(-e))/2},exports.COT=function(e){return(e=utils.parseNumber(e))instanceof Error?e:1/Math.tan(e)},exports.COTH=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.exp(2*e);return(t+1)/(t-1)},exports.CSC=function(e){return(e=utils.parseNumber(e))instanceof Error?e:1/Math.sin(e)},exports.CSCH=function(e){return(e=utils.parseNumber(e))instanceof Error?e:2/(Math.exp(e)-Math.exp(-e))},exports.DECIMAL=function(e,t){return arguments.length<1?error.value:parseInt(e,t)},exports.DEGREES=function(e){return(e=utils.parseNumber(e))instanceof Error?e:180*e/Math.PI},exports.EVEN=function(e){return(e=utils.parseNumber(e))instanceof Error?e:exports.CEILING(e,-2,-1)},exports.EXP=function(e){return arguments.length<1?error.na:"number"!=typeof e||arguments.length>1?error.error:e=Math.exp(e)};var MEMOIZED_FACT=[];exports.FACT=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.floor(e);return 0===t||1===t?1:MEMOIZED_FACT[t]>0?MEMOIZED_FACT[t]:(MEMOIZED_FACT[t]=exports.FACT(t-1)*t,MEMOIZED_FACT[t])},exports.FACTDOUBLE=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.floor(e);return t<=0?1:t*exports.FACTDOUBLE(t-2)},exports.FLOOR=function(e,t){if(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;if(0===t)return 0;if(!(e>0&&t>0||e<0&&t<0))return error.num;t=Math.abs(t);var n=-Math.floor(Math.log(t)/Math.log(10));return e>=0?exports.ROUND(Math.floor(e/t)*t,n):-exports.ROUND(Math.ceil(Math.abs(e)/t),n)},exports.FLOOR.MATH=function(e,t,n){if(t=void 0===t?1:t,n=void 0===n?0:n,e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n))return error.value;if(0===t)return 0;t=t?Math.abs(t):1;var r=-Math.floor(Math.log(t)/Math.log(10));return e>=0?exports.ROUND(Math.floor(e/t)*t,r):0===n||void 0===n?-exports.ROUND(Math.ceil(Math.abs(e)/t)*t,r):-exports.ROUND(Math.floor(Math.abs(e)/t)*t,r)},exports.FLOOR.PRECISE=exports.FLOOR.MATH,exports.GCD=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=e.length,n=e[0],r=n<0?-n:n,o=1;o<t;o++){for(var i=e[o],a=i<0?-i:i;r&&a;)r>a?r%=a:a%=r;r+=a}return r},exports.INT=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.floor(e)},exports.ISO={CEILING:exports.CEILING},exports.LCM=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t,n,r,o,i=1;void 0!==(r=e.pop());)for(;r>1;){if(r%2){for(t=3,n=Math.floor(Math.sqrt(r));t<=n&&r%t;t+=2);o=t<=n?t:r}else o=2;for(r/=o,i*=o,t=e.length;t;e[--t]%o==0&&1==(e[t]/=o)&&e.splice(t,1));}return i},exports.LN=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.log(e)},exports.LN10=function(){return Math.log(10)},exports.LN2=function(){return Math.log(2)},exports.LOG10E=function(){return Math.LOG10E},exports.LOG2E=function(){return Math.LOG2E},exports.LOG=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:(t=void 0===t?10:t,Math.log(e)/Math.log(t))},exports.LOG10=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.log(e)/Math.log(10)},exports.MOD=function(e,t){if(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;if(0===t)return error.div0;var n=Math.abs(e%t);return t>0?n:-n},exports.MROUND=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:e*t<0?error.num:Math.round(e/t)*t},exports.MULTINOMIAL=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=0,n=1,r=0;r<e.length;r++)t+=e[r],n*=exports.FACT(e[r]);return exports.FACT(t)/n},exports.ODD=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.ceil(Math.abs(e));return t=1&t?t:t+1,e>0?t:-t},exports.PI=function(){return Math.PI},exports.E=function(){return Math.E},exports.POWER=function(e,t){if(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;var n=Math.pow(e,t);return isNaN(n)?error.num:n},exports.PRODUCT=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=1,n=0;n<e.length;n++)t*=e[n];return t},exports.QUOTIENT=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:parseInt(e/t,10)},exports.RADIANS=function(e){return(e=utils.parseNumber(e))instanceof Error?e:e*Math.PI/180},exports.RAND=function(){return Math.random()},exports.RANDBETWEEN=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:e+Math.ceil((t-e+1)*Math.random())-1},exports.ROMAN=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;for(var t=String(e).split(""),n=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],r="",o=3;o--;)r=(n[+t.pop()+10*o]||"")+r;return new Array(+t.join("")+1).join("M")+r},exports.ROUND=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:Math.round(e*Math.pow(10,t))/Math.pow(10,t)},exports.ROUNDDOWN=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:(e>0?1:-1)*Math.floor(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)},exports.ROUNDUP=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:(e>0?1:-1)*Math.ceil(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)},exports.SEC=function(e){return(e=utils.parseNumber(e))instanceof Error?e:1/Math.cos(e)},exports.SECH=function(e){return(e=utils.parseNumber(e))instanceof Error?e:2/(Math.exp(e)+Math.exp(-e))},exports.SERIESSUM=function(e,t,n,r){if(e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),r=utils.parseNumberArray(r),utils.anyIsError(e,t,n,r))return error.value;for(var o=r[0]*Math.pow(e,t),i=1;i<r.length;i++)o+=r[i]*Math.pow(e,t+i*n);return o},exports.SIGN=function(e){return(e=utils.parseNumber(e))instanceof Error?e:e<0?-1:0===e?0:1},exports.SIN=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.sin(e)},exports.SINH=function(e){return(e=utils.parseNumber(e))instanceof Error?e:(Math.exp(e)-Math.exp(-e))/2},exports.SQRT=function(e){return(e=utils.parseNumber(e))instanceof Error?e:e<0?error.num:Math.sqrt(e)},exports.SQRTPI=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.sqrt(e*Math.PI)},exports.SQRT1_2=function(){return 1/Math.sqrt(2)},exports.SQRT2=function(){return Math.sqrt(2)},exports.SUBTOTAL=function(e,t){if((e=utils.parseNumber(e))instanceof Error)return e;switch(e){case 1:return statistical.AVERAGE(t);case 2:return statistical.COUNT(t);case 3:return statistical.COUNTA(t);case 4:return statistical.MAX(t);case 5:return statistical.MIN(t);case 6:return exports.PRODUCT(t);case 7:return statistical.STDEV.S(t);case 8:return statistical.STDEV.P(t);case 9:return exports.SUM(t);case 10:return statistical.VAR.S(t);case 11:return statistical.VAR.P(t);case 101:return statistical.AVERAGE(t);case 102:return statistical.COUNT(t);case 103:return statistical.COUNTA(t);case 104:return statistical.MAX(t);case 105:return statistical.MIN(t);case 106:return exports.PRODUCT(t);case 107:return statistical.STDEV.S(t);case 108:return statistical.STDEV.P(t);case 109:return exports.SUM(t);case 110:return statistical.VAR.S(t);case 111:return statistical.VAR.P(t)}},exports.ADD=function(e,t){return 2!==arguments.length?error.na:(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:e+t)},exports.MINUS=function(e,t){return 2!==arguments.length?error.na:(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:e-t)},exports.DIVIDE=function(e,t){return 2!==arguments.length?error.na:(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:0===t?error.div0:e/t)},exports.MULTIPLY=function(e,t){return 2!==arguments.length?error.na:(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:e*t)},exports.GTE=function(e,t){return 2!==arguments.length?error.na:(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.error:e>=t)},exports.LT=function(e,t){return 2!==arguments.length?error.na:(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.error:e<t)},exports.LTE=function(e,t){return 2!==arguments.length?error.na:(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.error:e<=t)},exports.EQ=function(e,t){return 2!==arguments.length?error.na:e===t},exports.NE=function(e,t){return 2!==arguments.length?error.na:e!==t},exports.POW=function(e,t){return 2!==arguments.length?error.na:(e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.error:exports.POWER(e,t))},exports.SUM=function(){var e=0;return utils.arrayEach(utils.argsToArray(arguments),function(t){if("number"==typeof t)e+=t;else if("string"==typeof t){var n=parseFloat(t);!isNaN(n)&&(e+=n)}else Array.isArray(t)&&(e+=exports.SUM.apply(null,t))}),e},exports.SUMIF=function(range,criteria){if(range=utils.parseNumberArray(utils.flatten(range)),range instanceof Error)return range;for(var result=0,i=0;i<range.length;i++)result+=eval(range[i]+criteria)?range[i]:0;return result},exports.SUMIFS=function(){var args=utils.argsToArray(arguments),range=utils.parseNumberArray(utils.flatten(args.shift()));if(range instanceof Error)return range;for(var criteria=args,n_range_elements=range.length,n_criterias=criteria.length,result=0,i=0;i<n_range_elements;i++){for(var el=range[i],condition="",c=0;c<n_criterias;c++)condition+=el+criteria[c],c!==n_criterias-1&&(condition+="&&");eval(condition)&&(result+=el)}return result},exports.SUMPRODUCT=function(){if(!arguments||0===arguments.length)return error.value;for(var e,t,n,r,o=arguments.length+1,i=0,a=0;a<arguments[0].length;a++)if(arguments[0][a]instanceof Array)for(var s=0;s<arguments[0][a].length;s++){for(e=1,t=1;t<o;t++){if((r=utils.parseNumber(arguments[t-1][a][s]))instanceof Error)return r;e*=r}i+=e}else{for(e=1,t=1;t<o;t++){if((n=utils.parseNumber(arguments[t-1][a]))instanceof Error)return n;e*=n}i+=e}return i},exports.SUMSQ=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=0,n=e.length,r=0;r<n;r++)t+=information.ISNUMBER(e[r])?e[r]*e[r]:0;return t},exports.SUMX2MY2=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;for(var n=0,r=0;r<e.length;r++)n+=e[r]*e[r]-t[r]*t[r];return n},exports.SUMX2PY2=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;var n=0;e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t));for(var r=0;r<e.length;r++)n+=e[r]*e[r]+t[r]*t[r];return n},exports.SUMXMY2=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;var n=0;e=utils.flatten(e),t=utils.flatten(t);for(var r=0;r<e.length;r++)n+=Math.pow(e[r]-t[r],2);return n},exports.TAN=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.tan(e)},exports.TANH=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.exp(2*e);return(t-1)/(t+1)},exports.TRUNC=function(e,t){return t=void 0===t?0:t,e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:(e>0?1:-1)*Math.floor(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)}},function(module,exports,__webpack_require__){var mathTrig=__webpack_require__(4),text=__webpack_require__(6),jStat=__webpack_require__(11).jStat,utils=__webpack_require__(1),error=__webpack_require__(0),misc=__webpack_require__(12),SQRT2PI=2.5066282746310002;exports.AVEDEV=function(){var e=utils.parseNumberArray(utils.flatten(arguments));return e instanceof Error?e:jStat.sum(jStat(e).subtract(jStat.mean(e)).abs()[0])/e.length},exports.AVERAGE=function(){for(var e,t=utils.numbers(utils.flatten(arguments)),n=t.length,r=0,o=0,i=0;i<n;i++)r+=t[i],o+=1;return e=r/o,isNaN(e)&&(e=error.num),e},exports.AVERAGEA=function(){for(var e,t=utils.flatten(arguments),n=t.length,r=0,o=0,i=0;i<n;i++){var a=t[i];"number"==typeof a&&(r+=a),!0===a&&r++,null!==a&&o++}return e=r/o,isNaN(e)&&(e=error.num),e},exports.AVERAGEIF=function(range,criteria,average_range){if(arguments.length<=1)return error.na;if(average_range=average_range||range,range=utils.flatten(range),average_range=utils.parseNumberArray(utils.flatten(average_range)),average_range instanceof Error)return average_range;for(var average_count=0,result=0,i=0;i<range.length;i++)eval(range[i]+criteria)&&(result+=average_range[i],average_count++);return result/average_count},exports.AVERAGEIFS=function(){for(var args=utils.argsToArray(arguments),criteria=(args.length-1)/2,range=utils.flatten(args[0]),count=0,result=0,i=0;i<range.length;i++){for(var condition="",j=0;j<criteria;j++)condition+=args[2*j+1][i]+args[2*j+2],j!==criteria-1&&(condition+="&&");eval(condition)&&(result+=range[i],count++)}var average=result/count;return isNaN(average)?0:average},exports.BETA={},exports.BETA.DIST=function(e,t,n,r,o,i){return arguments.length<4?error.value:(o=void 0===o?0:o,i=void 0===i?1:i,e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),o=utils.parseNumber(o),i=utils.parseNumber(i),utils.anyIsError(e,t,n,o,i)?error.value:(e=(e-o)/(i-o),r?jStat.beta.cdf(e,t,n):jStat.beta.pdf(e,t,n)))},exports.BETA.INV=function(e,t,n,r,o){return r=void 0===r?0:r,o=void 0===o?1:o,e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),r=utils.parseNumber(r),o=utils.parseNumber(o),utils.anyIsError(e,t,n,r,o)?error.value:jStat.beta.inv(e,t,n)*(o-r)+r},exports.BINOM={},exports.BINOM.DIST=function(e,t,n,r){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),r=utils.parseNumber(r),utils.anyIsError(e,t,n,r)?error.value:r?jStat.binomial.cdf(e,t,n):jStat.binomial.pdf(e,t,n)},exports.BINOM.DIST.RANGE=function(e,t,n,r){if(r=void 0===r?n:r,e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),r=utils.parseNumber(r),utils.anyIsError(e,t,n,r))return error.value;for(var o=0,i=n;i<=r;i++)o+=mathTrig.COMBIN(e,i)*Math.pow(t,i)*Math.pow(1-t,e-i);return o},exports.BINOM.INV=function(e,t,n){if(e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n))return error.value;for(var r=0;r<=e;){if(jStat.binomial.cdf(r,e,t)>=n)return r;r++}},exports.CHISQ={},exports.CHISQ.DIST=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:n?jStat.chisquare.cdf(e,t):jStat.chisquare.pdf(e,t)},exports.CHISQ.DIST.RT=function(e,t){return!e|!t?error.na:e<1||t>Math.pow(10,10)?error.num:"number"!=typeof e||"number"!=typeof t?error.value:1-jStat.chisquare.cdf(e,t)},exports.CHISQ.INV=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:jStat.chisquare.inv(e,t)},exports.CHISQ.INV.RT=function(e,t){return!e|!t?error.na:e<0||e>1||t<1||t>Math.pow(10,10)?error.num:"number"!=typeof e||"number"!=typeof t?error.value:jStat.chisquare.inv(1-e,t)},exports.CHISQ.TEST=function(e,t){if(2!==arguments.length)return error.na;if(!(e instanceof Array&&t instanceof Array))return error.value;if(e.length!==t.length)return error.value;if(e[0]&&t[0]&&e[0].length!==t[0].length)return error.value;var n,r,o,i=e.length;for(r=0;r<i;r++)e[r]instanceof Array||(n=e[r],e[r]=[],e[r].push(n)),t[r]instanceof Array||(n=t[r],t[r]=[],t[r].push(n));var a=e[0].length,s=1===a?i-1:(i-1)*(a-1),l=0,u=Math.PI;for(r=0;r<i;r++)for(o=0;o<a;o++)l+=Math.pow(e[r][o]-t[r][o],2)/t[r][o];return Math.round(1e6*function(e,t){var n=Math.exp(-.5*e);t%2==1&&(n*=Math.sqrt(2*e/u));for(var r=t;r>=2;)n=n*e/r,r-=2;for(var o=n,i=t;o>1e-10*n;)n+=o=o*e/(i+=2);return 1-n}(l,s))/1e6},exports.COLUMN=function(e,t){return 2!==arguments.length?error.na:t<0?error.num:e instanceof Array&&"number"==typeof t?0!==e.length?jStat.col(e,t):void 0:error.value},exports.COLUMNS=function(e){return 1!==arguments.length?error.na:e instanceof Array?0===e.length?0:jStat.cols(e):error.value},exports.CONFIDENCE={},exports.CONFIDENCE.NORM=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:jStat.normalci(1,e,t,n)[1]-1},exports.CONFIDENCE.T=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:jStat.tci(1,e,t,n)[1]-1},exports.CORREL=function(e,t){return e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t)?error.value:jStat.corrcoeff(e,t)},exports.COUNT=function(){return utils.numbers(utils.flatten(arguments)).length},exports.COUNTA=function(){var e=utils.flatten(arguments);return e.length-exports.COUNTBLANK(e)},exports.COUNTIN=function(e,t){var n=0;e=utils.flatten(e);for(var r=0;r<e.length;r++)e[r]===t&&n++;return n},exports.COUNTBLANK=function(){for(var e,t=utils.flatten(arguments),n=0,r=0;r<t.length;r++)null!==(e=t[r])&&""!==e||n++;return n},exports.COUNTIF=function(range,criteria){range=utils.flatten(range),/[<>=!]/.test(criteria)||(criteria='=="'+criteria+'"');for(var matches=0,i=0;i<range.length;i++)"string"!=typeof range[i]?eval(range[i]+criteria)&&matches++:eval('"'+range[i]+'"'+criteria)&&matches++;return matches},exports.COUNTIFS=function(){for(var args=utils.argsToArray(arguments),results=new Array(utils.flatten(args[0]).length),i=0;i<results.length;i++)results[i]=!0;for(i=0;i<args.length;i+=2){var range=utils.flatten(args[i]),criteria=args[i+1];/[<>=!]/.test(criteria)||(criteria='=="'+criteria+'"');for(var j=0;j<range.length;j++)"string"!=typeof range[j]?results[j]=results[j]&&eval(range[j]+criteria):results[j]=results[j]&&eval('"'+range[j]+'"'+criteria)}var result=0;for(i=0;i<results.length;i++)results[i]&&result++;return result},exports.COUNTUNIQUE=function(){return misc.UNIQUE.apply(null,utils.flatten(arguments)).length},exports.COVARIANCE={},exports.COVARIANCE.P=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;for(var n=jStat.mean(e),r=jStat.mean(t),o=0,i=e.length,a=0;a<i;a++)o+=(e[a]-n)*(t[a]-r);return o/i},exports.COVARIANCE.S=function(e,t){return e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t)?error.value:jStat.covariance(e,t)},exports.DEVSQ=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=jStat.mean(e),n=0,r=0;r<e.length;r++)n+=Math.pow(e[r]-t,2);return n},exports.EXPON={},exports.EXPON.DIST=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:n?jStat.exponential.cdf(e,t):jStat.exponential.pdf(e,t)},exports.F={},exports.F.DIST=function(e,t,n,r){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:r?jStat.centralF.cdf(e,t,n):jStat.centralF.pdf(e,t,n)},exports.F.DIST.RT=function(e,t,n){return 3!==arguments.length?error.na:e<0||t<1||n<1?error.num:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?error.value:1-jStat.centralF.cdf(e,t,n)},exports.F.INV=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:e<=0||e>1?error.num:jStat.centralF.inv(e,t,n)},exports.F.INV.RT=function(e,t,n){return 3!==arguments.length?error.na:e<0||e>1||t<1||t>Math.pow(10,10)||n<1||n>Math.pow(10,10)?error.num:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?error.value:jStat.centralF.inv(1-e,t,n)},exports.F.TEST=function(e,t){if(!e||!t)return error.na;if(!(e instanceof Array&&t instanceof Array))return error.na;if(e.length<2||t.length<2)return error.div0;var n=function(e,t){for(var n=0,r=0;r<e.length;r++)n+=Math.pow(e[r]-t,2);return n},r=mathTrig.SUM(e)/e.length,o=mathTrig.SUM(t)/t.length;return n(e,r)/(e.length-1)/(n(t,o)/(t.length-1))},exports.FISHER=function(e){return(e=utils.parseNumber(e))instanceof Error?e:Math.log((1+e)/(1-e))/2},exports.FISHERINV=function(e){if((e=utils.parseNumber(e))instanceof Error)return e;var t=Math.exp(2*e);return(t-1)/(t+1)},exports.FORECAST=function(e,t,n){if(e=utils.parseNumber(e),t=utils.parseNumberArray(utils.flatten(t)),n=utils.parseNumberArray(utils.flatten(n)),utils.anyIsError(e,t,n))return error.value;for(var r=jStat.mean(n),o=jStat.mean(t),i=n.length,a=0,s=0,l=0;l<i;l++)a+=(n[l]-r)*(t[l]-o),s+=Math.pow(n[l]-r,2);var u=a/s;return o-u*r+u*e},exports.FREQUENCY=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;for(var n=e.length,r=t.length,o=[],i=0;i<=r;i++){o[i]=0;for(var a=0;a<n;a++)0===i?e[a]<=t[0]&&(o[0]+=1):i<r?e[a]>t[i-1]&&e[a]<=t[i]&&(o[i]+=1):i===r&&e[a]>t[r-1]&&(o[r]+=1)}return o},exports.GAMMA=function(e){return(e=utils.parseNumber(e))instanceof Error?e:0===e?error.num:parseInt(e,10)===e&&e<0?error.num:jStat.gammafn(e)},exports.GAMMA.DIST=function(e,t,n,r){return 4!==arguments.length?error.na:e<0||t<=0||n<=0?error.value:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?error.value:r?jStat.gamma.cdf(e,t,n,!0):jStat.gamma.pdf(e,t,n,!1)},exports.GAMMA.INV=function(e,t,n){return 3!==arguments.length?error.na:e<0||e>1||t<=0||n<=0?error.num:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?error.value:jStat.gamma.inv(e,t,n)},exports.GAMMALN=function(e){return(e=utils.parseNumber(e))instanceof Error?e:jStat.gammaln(e)},exports.GAMMALN.PRECISE=function(e){return 1!==arguments.length?error.na:e<=0?error.num:"number"!=typeof e?error.value:jStat.gammaln(e)},exports.GAUSS=function(e){return(e=utils.parseNumber(e))instanceof Error?e:jStat.normal.cdf(e,0,1)-.5},exports.GEOMEAN=function(){var e=utils.parseNumberArray(utils.flatten(arguments));return e instanceof Error?e:jStat.geomean(e)},exports.GROWTH=function(e,t,n,r){if((e=utils.parseNumberArray(e))instanceof Error)return e;var o;if(void 0===t)for(t=[],o=1;o<=e.length;o++)t.push(o);if(void 0===n)for(n=[],o=1;o<=e.length;o++)n.push(o);if(t=utils.parseNumberArray(t),n=utils.parseNumberArray(n),utils.anyIsError(t,n))return error.value;void 0===r&&(r=!0);var i,a,s=e.length,l=0,u=0,c=0,f=0;for(o=0;o<s;o++){var h=t[o],d=Math.log(e[o]);l+=h,u+=d,c+=h*d,f+=h*h}l/=s,u/=s,c/=s,f/=s,r?a=u-(i=(c-l*u)/(f-l*l))*l:(i=c/f,a=0);var p=[];for(o=0;o<n.length;o++)p.push(Math.exp(a+i*n[o]));return p},exports.HARMEAN=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=e.length,n=0,r=0;r<t;r++)n+=1/e[r];return t/n},exports.HYPGEOM={},exports.HYPGEOM.DIST=function(e,t,n,r,o){if(e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),r=utils.parseNumber(r),utils.anyIsError(e,t,n,r))return error.value;function i(e,t,n,r){return mathTrig.COMBIN(n,e)*mathTrig.COMBIN(r-n,t-e)/mathTrig.COMBIN(r,t)}return o?function(e,t,n,r){for(var o=0,a=0;a<=e;a++)o+=i(a,t,n,r);return o}(e,t,n,r):i(e,t,n,r)},exports.INTERCEPT=function(e,t){return e=utils.parseNumberArray(e),t=utils.parseNumberArray(t),utils.anyIsError(e,t)?error.value:e.length!==t.length?error.na:exports.FORECAST(0,e,t)},exports.KURT=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=jStat.mean(e),n=e.length,r=0,o=0;o<n;o++)r+=Math.pow(e[o]-t,4);return n*(n+1)/((n-1)*(n-2)*(n-3))*(r/=Math.pow(jStat.stdev(e,!0),4))-3*(n-1)*(n-1)/((n-2)*(n-3))},exports.LARGE=function(e,t){return e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),utils.anyIsError(e,t)?e:e.sort(function(e,t){return t-e})[t-1]},exports.LINEST=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;for(var n=jStat.mean(e),r=jStat.mean(t),o=t.length,i=0,a=0,s=0;s<o;s++)i+=(t[s]-r)*(e[s]-n),a+=Math.pow(t[s]-r,2);var l=i/a;return[l,n-l*r]},exports.LOGEST=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;for(var n=0;n<e.length;n++)e[n]=Math.log(e[n]);var r=exports.LINEST(e,t);return r[0]=Math.round(1e6*Math.exp(r[0]))/1e6,r[1]=Math.round(1e6*Math.exp(r[1]))/1e6,r},exports.LOGNORM={},exports.LOGNORM.DIST=function(e,t,n,r){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:r?jStat.lognormal.cdf(e,t,n):jStat.lognormal.pdf(e,t,n)},exports.LOGNORM.INV=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:jStat.lognormal.inv(e,t,n)},exports.MAX=function(){var e=utils.numbers(utils.flatten(arguments));return 0===e.length?0:Math.max.apply(Math,e)},exports.MAXA=function(){var e=utils.arrayValuesToNumbers(utils.flatten(arguments));return 0===e.length?0:Math.max.apply(Math,e)},exports.MEDIAN=function(){var e=utils.arrayValuesToNumbers(utils.flatten(arguments)),t=jStat.median(e);return isNaN(t)&&(t=error.num),t},exports.MIN=function(){var e=utils.numbers(utils.flatten(arguments));return 0===e.length?0:Math.min.apply(Math,e)},exports.MINA=function(){var e=utils.arrayValuesToNumbers(utils.flatten(arguments));return 0===e.length?0:Math.min.apply(Math,e)},exports.MODE={},exports.MODE.MULT=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t,n=e.length,r={},o=[],i=0,a=0;a<n;a++)r[t=e[a]]=r[t]?r[t]+1:1,r[t]>i&&(i=r[t],o=[]),r[t]===i&&(o[o.length]=t);return o},exports.MODE.SNGL=function(){var e=utils.parseNumberArray(utils.flatten(arguments));return e instanceof Error?e:exports.MODE.MULT(e).sort(function(e,t){return e-t})[0]},exports.NEGBINOM={},exports.NEGBINOM.DIST=function(e,t,n,r){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:r?jStat.negbin.cdf(e,t,n):jStat.negbin.pdf(e,t,n)},exports.NORM={},exports.NORM.DIST=function(e,t,n,r){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:n<=0?error.num:r?jStat.normal.cdf(e,t,n):jStat.normal.pdf(e,t,n)},exports.NORM.INV=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:jStat.normal.inv(e,t,n)},exports.NORM.S={},exports.NORM.S.DIST=function(e,t){return(e=utils.parseNumber(e))instanceof Error?error.value:t?jStat.normal.cdf(e,0,1):jStat.normal.pdf(e,0,1)},exports.NORM.S.INV=function(e){return(e=utils.parseNumber(e))instanceof Error?error.value:jStat.normal.inv(e,0,1)},exports.PEARSON=function(e,t){if(t=utils.parseNumberArray(utils.flatten(t)),e=utils.parseNumberArray(utils.flatten(e)),utils.anyIsError(t,e))return error.value;for(var n=jStat.mean(e),r=jStat.mean(t),o=e.length,i=0,a=0,s=0,l=0;l<o;l++)i+=(e[l]-n)*(t[l]-r),a+=Math.pow(e[l]-n,2),s+=Math.pow(t[l]-r,2);return i/Math.sqrt(a*s)},exports.PERCENTILE={},exports.PERCENTILE.EXC=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;var n=(e=e.sort(function(e,t){return e-t})).length;if(t<1/(n+1)||t>1-1/(n+1))return error.num;var r=t*(n+1)-1,o=Math.floor(r);return utils.cleanFloat(r===o?e[r]:e[o]+(r-o)*(e[o+1]-e[o]))},exports.PERCENTILE.INC=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;var n=t*((e=e.sort(function(e,t){return e-t})).length-1),r=Math.floor(n);return utils.cleanFloat(n===r?e[n]:e[r]+(n-r)*(e[r+1]-e[r]))},exports.PERCENTRANK={},exports.PERCENTRANK.EXC=function(e,t,n){if(n=void 0===n?3:n,e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n))return error.value;e=e.sort(function(e,t){return e-t});for(var r=misc.UNIQUE.apply(null,e),o=e.length,i=r.length,a=Math.pow(10,n),s=0,l=!1,u=0;!l&&u<i;)t===r[u]?(s=(e.indexOf(r[u])+1)/(o+1),l=!0):t>=r[u]&&(t<r[u+1]||u===i-1)&&(s=(e.indexOf(r[u])+1+(t-r[u])/(r[u+1]-r[u]))/(o+1),l=!0),u++;return Math.floor(s*a)/a},exports.PERCENTRANK.INC=function(e,t,n){if(n=void 0===n?3:n,e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n))return error.value;e=e.sort(function(e,t){return e-t});for(var r=misc.UNIQUE.apply(null,e),o=e.length,i=r.length,a=Math.pow(10,n),s=0,l=!1,u=0;!l&&u<i;)t===r[u]?(s=e.indexOf(r[u])/(o-1),l=!0):t>=r[u]&&(t<r[u+1]||u===i-1)&&(s=(e.indexOf(r[u])+(t-r[u])/(r[u+1]-r[u]))/(o-1),l=!0),u++;return Math.floor(s*a)/a},exports.PERMUT=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:mathTrig.FACT(e)/mathTrig.FACT(e-t)},exports.PERMUTATIONA=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:Math.pow(e,t)},exports.PHI=function(e){return(e=utils.parseNumber(e))instanceof Error?error.value:Math.exp(-.5*e*e)/SQRT2PI},exports.POISSON={},exports.POISSON.DIST=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:n?jStat.poisson.cdf(e,t):jStat.poisson.pdf(e,t)},exports.PROB=function(e,t,n,r){if(void 0===n)return 0;if(r=void 0===r?n:r,e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),n=utils.parseNumber(n),r=utils.parseNumber(r),utils.anyIsError(e,t,n,r))return error.value;if(n===r)return e.indexOf(n)>=0?t[e.indexOf(n)]:0;for(var o=e.sort(function(e,t){return e-t}),i=o.length,a=0,s=0;s<i;s++)o[s]>=n&&o[s]<=r&&(a+=t[e.indexOf(o[s])]);return a},exports.QUARTILE={},exports.QUARTILE.EXC=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;switch(t){case 1:return exports.PERCENTILE.EXC(e,.25);case 2:return exports.PERCENTILE.EXC(e,.5);case 3:return exports.PERCENTILE.EXC(e,.75);default:return error.num}},exports.QUARTILE.INC=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;switch(t){case 1:return exports.PERCENTILE.INC(e,.25);case 2:return exports.PERCENTILE.INC(e,.5);case 3:return exports.PERCENTILE.INC(e,.75);default:return error.num}},exports.RANK={},exports.RANK.AVG=function(e,t,n){if(e=utils.parseNumber(e),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;t=utils.flatten(t);for(var r=(n=n||!1)?function(e,t){return e-t}:function(e,t){return t-e},o=(t=t.sort(r)).length,i=0,a=0;a<o;a++)t[a]===e&&i++;return i>1?(2*t.indexOf(e)+i+1)/2:t.indexOf(e)+1},exports.RANK.EQ=function(e,t,n){if(e=utils.parseNumber(e),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;var r=(n=n||!1)?function(e,t){return e-t}:function(e,t){return t-e};return(t=t.sort(r)).indexOf(e)+1},exports.ROW=function(e,t){return 2!==arguments.length?error.na:t<0?error.num:e instanceof Array&&"number"==typeof t?0!==e.length?jStat.row(e,t):void 0:error.value},exports.ROWS=function(e){return 1!==arguments.length?error.na:e instanceof Array?0===e.length?0:jStat.rows(e):error.value},exports.RSQ=function(e,t){return e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t)?error.value:Math.pow(exports.PEARSON(e,t),2)},exports.SKEW=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=jStat.mean(e),n=e.length,r=0,o=0;o<n;o++)r+=Math.pow(e[o]-t,3);return n*r/((n-1)*(n-2)*Math.pow(jStat.stdev(e,!0),3))},exports.SKEW.P=function(){var e=utils.parseNumberArray(utils.flatten(arguments));if(e instanceof Error)return e;for(var t=jStat.mean(e),n=e.length,r=0,o=0,i=0;i<n;i++)o+=Math.pow(e[i]-t,3),r+=Math.pow(e[i]-t,2);return r/=n,(o/=n)/Math.pow(r,1.5)},exports.SLOPE=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;for(var n=jStat.mean(t),r=jStat.mean(e),o=t.length,i=0,a=0,s=0;s<o;s++)i+=(t[s]-n)*(e[s]-r),a+=Math.pow(t[s]-n,2);return i/a},exports.SMALL=function(e,t){return e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),utils.anyIsError(e,t)?e:e.sort(function(e,t){return e-t})[t-1]},exports.STANDARDIZE=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:(e-t)/n},exports.STDEV={},exports.STDEV.P=function(){var e=exports.VAR.P.apply(this,arguments),t=Math.sqrt(e);return isNaN(t)&&(t=error.num),t},exports.STDEV.S=function(){var e=exports.VAR.S.apply(this,arguments);return Math.sqrt(e)},exports.STDEVA=function(){var e=exports.VARA.apply(this,arguments);return Math.sqrt(e)},exports.STDEVPA=function(){var e=exports.VARPA.apply(this,arguments),t=Math.sqrt(e);return isNaN(t)&&(t=error.num),t},exports.STEYX=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;for(var n=jStat.mean(t),r=jStat.mean(e),o=t.length,i=0,a=0,s=0,l=0;l<o;l++)i+=Math.pow(e[l]-r,2),a+=(t[l]-n)*(e[l]-r),s+=Math.pow(t[l]-n,2);return Math.sqrt((i-a*a/s)/(o-2))},exports.TRANSPOSE=function(e){return e?jStat.transpose(e):error.na},exports.T=text.T,exports.T.DIST=function(e,t,n){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:n?jStat.studentt.cdf(e,t):jStat.studentt.pdf(e,t)},exports.T.DIST["2T"]=function(e,t){return 2!==arguments.length?error.na:e<0||t<1?error.num:"number"!=typeof e||"number"!=typeof t?error.value:2*(1-jStat.studentt.cdf(e,t))},exports.T.DIST.RT=function(e,t){return 2!==arguments.length?error.na:e<0||t<1?error.num:"number"!=typeof e||"number"!=typeof t?error.value:1-jStat.studentt.cdf(e,t)},exports.T.INV=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),utils.anyIsError(e,t)?error.value:jStat.studentt.inv(e,t)},exports.T.INV["2T"]=function(e,t){return e=utils.parseNumber(e),t=utils.parseNumber(t),e<=0||e>1||t<1?error.num:utils.anyIsError(e,t)?error.value:Math.abs(jStat.studentt.inv(e/2,t))},exports.T.TEST=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),utils.anyIsError(e,t))return error.value;var n,r=jStat.mean(e),o=jStat.mean(t),i=0,a=0;for(n=0;n<e.length;n++)i+=Math.pow(e[n]-r,2);for(n=0;n<t.length;n++)a+=Math.pow(t[n]-o,2);i/=e.length-1,a/=t.length-1;var s=Math.abs(r-o)/Math.sqrt(i/e.length+a/t.length);return exports.T.DIST["2T"](s,e.length+t.length-2)},exports.TREND=function(e,t,n){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumberArray(utils.flatten(t)),n=utils.parseNumberArray(utils.flatten(n)),utils.anyIsError(e,t,n))return error.value;var r=exports.LINEST(e,t),o=r[0],i=r[1],a=[];return n.forEach(function(e){a.push(o*e+i)}),a},exports.TRIMMEAN=function(e,t){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;var n=mathTrig.FLOOR(e.length*t,2)/2;return jStat.mean(utils.initial(utils.rest(e.sort(function(e,t){return e-t}),n),n))},exports.VAR={},exports.VAR.P=function(){for(var e,t=utils.numbers(utils.flatten(arguments)),n=t.length,r=0,o=exports.AVERAGE(t),i=0;i<n;i++)r+=Math.pow(t[i]-o,2);return e=r/n,isNaN(e)&&(e=error.num),e},exports.VAR.S=function(){for(var e=utils.numbers(utils.flatten(arguments)),t=e.length,n=0,r=exports.AVERAGE(e),o=0;o<t;o++)n+=Math.pow(e[o]-r,2);return n/(t-1)},exports.VARA=function(){for(var e=utils.flatten(arguments),t=e.length,n=0,r=0,o=exports.AVERAGEA(e),i=0;i<t;i++){var a=e[i];n+="number"==typeof a?Math.pow(a-o,2):!0===a?Math.pow(1-o,2):Math.pow(0-o,2),null!==a&&r++}return n/(r-1)},exports.VARPA=function(){for(var e,t=utils.flatten(arguments),n=t.length,r=0,o=0,i=exports.AVERAGEA(t),a=0;a<n;a++){var s=t[a];r+="number"==typeof s?Math.pow(s-i,2):!0===s?Math.pow(1-i,2):Math.pow(0-i,2),null!==s&&o++}return e=r/o,isNaN(e)&&(e=error.num),e},exports.WEIBULL={},exports.WEIBULL.DIST=function(e,t,n,r){return e=utils.parseNumber(e),t=utils.parseNumber(t),n=utils.parseNumber(n),utils.anyIsError(e,t,n)?error.value:r?1-Math.exp(-Math.pow(e/n,t)):Math.pow(e,t-1)*Math.exp(-Math.pow(e/n,t))*t/Math.pow(n,t)},exports.Z={},exports.Z.TEST=function(e,t,n){if(e=utils.parseNumberArray(utils.flatten(e)),t=utils.parseNumber(t),utils.anyIsError(e,t))return error.value;n=n||exports.STDEV.S(e);var r=e.length;return 1-exports.NORM.S.DIST((exports.AVERAGE(e)-t)/(n/Math.sqrt(r)),!0)}},function(e,t,n){var r=n(1),o=n(0),i=n(9);t.ASC=function(){throw new Error("ASC is not implemented")},t.BAHTTEXT=function(){throw new Error("BAHTTEXT is not implemented")},t.CHAR=function(e){return(e=r.parseNumber(e))instanceof Error?e:String.fromCharCode(e)},t.CLEAN=function(e){return(e=e||"").replace(/[\0-\x1F]/g,"")},t.CODE=function(e){var t=(e=e||"").charCodeAt(0);return isNaN(t)&&(t=o.na),t},t.CONCATENATE=function(){for(var e=r.flatten(arguments),t=0;(t=e.indexOf(!0))>-1;)e[t]="TRUE";for(var n=0;(n=e.indexOf(!1))>-1;)e[n]="FALSE";return e.join("")},t.DBCS=function(){throw new Error("DBCS is not implemented")},t.DOLLAR=function(e,t){if(t=void 0===t?2:t,e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t))return o.value;var n="";return t<=0?(e=Math.round(e*Math.pow(10,t))/Math.pow(10,t),n="($0,0)"):t>0&&(n="($0,0."+new Array(t+1).join("0")+")"),i(e).format(n)},t.EXACT=function(e,t){return 2!==arguments.length?o.na:e===t},t.FIND=function(e,t,n){return arguments.length<2?o.na:(n=void 0===n?0:n,t?t.indexOf(e,n-1)+1:null)},t.FIXED=function(e,t,n){if(t=void 0===t?2:t,n=void 0!==n&&n,e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t))return o.value;var a=n?"0":"0,0";return t<=0?e=Math.round(e*Math.pow(10,t))/Math.pow(10,t):t>0&&(a+="."+new Array(t+1).join("0")),i(e).format(a)},t.HTML2TEXT=function(e){var t="";return e&&(e instanceof Array?e.forEach(function(e){""!==t&&(t+="\n"),t+=e.replace(/<(?:.|\n)*?>/gm,"")}):t=e.replace(/<(?:.|\n)*?>/gm,"")),t},t.LEFT=function(e,t){return t=void 0===t?1:t,(t=r.parseNumber(t))instanceof Error||"string"!=typeof e?o.value:e?e.substring(0,t):null},t.LEN=function(e){return 0===arguments.length?o.error:"string"==typeof e?e?e.length:0:e.length?e.length:o.value},t.LOWER=function(e){return"string"!=typeof e?o.value:e?e.toLowerCase():e},t.MID=function(e,t,n){if(t=r.parseNumber(t),n=r.parseNumber(n),r.anyIsError(t,n)||"string"!=typeof e)return n;var o=t-1,i=o+n;return e.substring(o,i)},t.NUMBERVALUE=function(e,t,n){return t=void 0===t?".":t,n=void 0===n?",":n,Number(e.replace(t,".").replace(n,""))},t.PRONETIC=function(){throw new Error("PRONETIC is not implemented")},t.PROPER=function(e){return void 0===e||0===e.length?o.value:(!0===e&&(e="TRUE"),!1===e&&(e="FALSE"),isNaN(e)&&"number"==typeof e?o.value:("number"==typeof e&&(e=""+e),e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})))},t.REGEXEXTRACT=function(e,t){if(arguments.length<2)return o.na;var n=e.match(new RegExp(t));return n?n[n.length>1?n.length-1:0]:null},t.REGEXMATCH=function(e,t,n){if(arguments.length<2)return o.na;var r=e.match(new RegExp(t));return n?r:!!r},t.REGEXREPLACE=function(e,t,n){return arguments.length<3?o.na:e.replace(new RegExp(t),n)},t.REPLACE=function(e,t,n,i){return t=r.parseNumber(t),n=r.parseNumber(n),r.anyIsError(t,n)||"string"!=typeof e||"string"!=typeof i?o.value:e.substr(0,t-1)+i+e.substr(t-1+n)},t.REPT=function(e,t){return(t=r.parseNumber(t))instanceof Error?t:new Array(t+1).join(e)},t.RIGHT=function(e,t){return t=void 0===t?1:t,(t=r.parseNumber(t))instanceof Error?t:e?e.substring(e.length-t):o.na},t.SEARCH=function(e,t,n){var r;return"string"!=typeof e||"string"!=typeof t?o.value:(n=void 0===n?0:n,0===(r=t.toLowerCase().indexOf(e.toLowerCase(),n-1)+1)?o.value:r)},t.SPLIT=function(e,t){return e.split(t)},t.SUBSTITUTE=function(e,t,n,r){if(arguments.length<2)return o.na;if(!(e&&t&&n))return e;if(void 0===r)return e.replace(new RegExp(t,"g"),n);for(var i=0,a=0;e.indexOf(t,i)>0;)if(i=e.indexOf(t,i+1),++a===r)return e.substring(0,i)+n+e.substring(i+t.length)},t.T=function(e){return"string"==typeof e?e:""},t.TEXT=function(e,t){return e=r.parseNumber(e),r.anyIsError(e)?o.na:i(e).format(t)},t.TRIM=function(e){return"string"!=typeof e?o.value:e.replace(/ +/g," ").trim()},t.UNICHAR=t.CHAR,t.UNICODE=t.CODE,t.UPPER=function(e){return"string"!=typeof e?o.value:e.toUpperCase()},t.VALUE=function(e){if("string"!=typeof e)return o.value;var t=i().unformat(e);return void 0===t?0:t}},function(e,t,n){var r=n(0);t.CELL=function(){throw new Error("CELL is not implemented")},t.ERROR={},t.ERROR.TYPE=function(e){switch(e){case r.nil:return 1;case r.div0:return 2;case r.value:return 3;case r.ref:return 4;case r.name:return 5;case r.num:return 6;case r.na:return 7;case r.data:return 8}return r.na},t.INFO=function(){throw new Error("INFO is not implemented")},t.ISBLANK=function(e){return null===e},t.ISBINARY=function(e){return/^[01]{1,10}$/.test(e)},t.ISERR=function(e){return[r.value,r.ref,r.div0,r.num,r.name,r.nil].indexOf(e)>=0||"number"==typeof e&&(isNaN(e)||!isFinite(e))},t.ISERROR=function(e){return t.ISERR(e)||e===r.na},t.ISEVEN=function(e){return!(1&Math.floor(Math.abs(e)))},t.ISFORMULA=function(){throw new Error("ISFORMULA is not implemented")},t.ISLOGICAL=function(e){return!0===e||!1===e},t.ISNA=function(e){return e===r.na},t.ISNONTEXT=function(e){return"string"!=typeof e},t.ISNUMBER=function(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)},t.ISODD=function(e){return!!(1&Math.floor(Math.abs(e)))},t.ISREF=function(){throw new Error("ISREF is not implemented")},t.ISTEXT=function(e){return"string"==typeof e},t.N=function(e){return this.ISNUMBER(e)?e:e instanceof Date?e.getTime():!0===e?1:!1===e?0:this.ISERROR(e)?e:0},t.NA=function(){return r.na},t.SHEET=function(){throw new Error("SHEET is not implemented")},t.SHEETS=function(){throw new Error("SHEETS is not implemented")},t.TYPE=function(e){return this.ISNUMBER(e)?1:this.ISTEXT(e)?2:this.ISLOGICAL(e)?4:this.ISERROR(e)?16:Array.isArray(e)?64:void 0}},function(e,t,n){var r=n(0),o=n(1),i=new Date(1900,0,1),a=[void 0,0,1,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,1,2,3,4,5,6,0],s=[[],[1,2,3,4,5,6,7],[7,1,2,3,4,5,6],[6,0,1,2,3,4,5],[],[],[],[],[],[],[],[7,1,2,3,4,5,6],[6,7,1,2,3,4,5],[5,6,7,1,2,3,4],[4,5,6,7,1,2,3],[3,4,5,6,7,1,2],[2,3,4,5,6,7,1],[1,2,3,4,5,6,7]],l=[[],[6,0],[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],void 0,void 0,void 0,[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]];function u(e){return 1===new Date(e,1,29).getMonth()}function c(e,t){return Math.ceil((t-e)/1e3/60/60/24)}function f(e){return(e-i)/864e5+(e>-22038912e5?2:1)}t.DATE=function(e,t,n){return e=o.parseNumber(e),t=o.parseNumber(t),n=o.parseNumber(n),o.anyIsError(e,t,n)?r.value:e<0||t<0||n<0?r.num:new Date(e,t-1,n)},t.DATEVALUE=function(e){if("string"!=typeof e)return r.value;var t=Date.parse(e);return isNaN(t)?r.value:t<=-22038912e5?(t-i)/864e5+1:(t-i)/864e5+2},t.DAY=function(e){var t=o.parseDate(e);return t instanceof Error?t:t.getDate()},t.DAYS=function(e,t){return e=o.parseDate(e),t=o.parseDate(t),e instanceof Error?e:t instanceof Error?t:f(e)-f(t)},t.DAYS360=function(e,t,n){if(n=o.parseBool(n),e=o.parseDate(e),t=o.parseDate(t),e instanceof Error)return e;if(t instanceof Error)return t;if(n instanceof Error)return n;var r,i,a=e.getMonth(),s=t.getMonth();if(n)r=31===e.getDate()?30:e.getDate(),i=31===t.getDate()?30:t.getDate();else{var l=new Date(e.getFullYear(),a+1,0).getDate(),u=new Date(t.getFullYear(),s+1,0).getDate();r=e.getDate()===l?30:e.getDate(),t.getDate()===u?r<30?(s++,i=1):i=30:i=t.getDate()}return 360*(t.getFullYear()-e.getFullYear())+30*(s-a)+(i-r)},t.EDATE=function(e,t){return(e=o.parseDate(e))instanceof Error?e:isNaN(t)?r.value:(t=parseInt(t,10),e.setMonth(e.getMonth()+t),f(e))},t.EOMONTH=function(e,t){return(e=o.parseDate(e))instanceof Error?e:isNaN(t)?r.value:(t=parseInt(t,10),f(new Date(e.getFullYear(),e.getMonth()+t+1,0)))},t.HOUR=function(e){return(e=o.parseDate(e))instanceof Error?e:e.getHours()},t.INTERVAL=function(e){if("number"!=typeof e&&"string"!=typeof e)return r.value;e=parseInt(e,10);var t=Math.floor(e/94608e4);e%=94608e4;var n=Math.floor(e/2592e3);e%=2592e3;var o=Math.floor(e/86400);e%=86400;var i=Math.floor(e/3600);e%=3600;var a=Math.floor(e/60),s=e%=60;return"P"+(t=t>0?t+"Y":"")+(n=n>0?n+"M":"")+(o=o>0?o+"D":"")+"T"+(i=i>0?i+"H":"")+(a=a>0?a+"M":"")+(s=s>0?s+"S":"")},t.ISOWEEKNUM=function(e){if((e=o.parseDate(e))instanceof Error)return e;e.setHours(0,0,0),e.setDate(e.getDate()+4-(e.getDay()||7));var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e-t)/864e5+1)/7)},t.MINUTE=function(e){return(e=o.parseDate(e))instanceof Error?e:e.getMinutes()},t.MONTH=function(e){return(e=o.parseDate(e))instanceof Error?e:e.getMonth()+1},t.NETWORKDAYS=function(e,t,n){return this.NETWORKDAYS.INTL(e,t,1,n)},t.NETWORKDAYS.INTL=function(e,t,n,i){if((e=o.parseDate(e))instanceof Error)return e;if((t=o.parseDate(t))instanceof Error)return t;if(!((n=void 0===n?l[1]:l[n])instanceof Array))return r.value;void 0===i?i=[]:i instanceof Array||(i=[i]);for(var a=0;a<i.length;a++){var s=o.parseDate(i[a]);if(s instanceof Error)return s;i[a]=s}var u=(t-e)/864e5+1,c=u,f=e;for(a=0;a<u;a++){var h=(new Date).getTimezoneOffset()>0?f.getUTCDay():f.getDay(),d=!1;h!==n[0]&&h!==n[1]||(d=!0);for(var p=0;p<i.length;p++){var g=i[p];if(g.getDate()===f.getDate()&&g.getMonth()===f.getMonth()&&g.getFullYear()===f.getFullYear()){d=!0;break}}d&&c--,f.setDate(f.getDate()+1)}return c},t.NOW=function(){return new Date},t.SECOND=function(e){return(e=o.parseDate(e))instanceof Error?e:e.getSeconds()},t.TIME=function(e,t,n){return e=o.parseNumber(e),t=o.parseNumber(t),n=o.parseNumber(n),o.anyIsError(e,t,n)?r.value:e<0||t<0||n<0?r.num:(3600*e+60*t+n)/86400},t.TIMEVALUE=function(e){return(e=o.parseDate(e))instanceof Error?e:(3600*e.getHours()+60*e.getMinutes()+e.getSeconds())/86400},t.TODAY=function(){return new Date},t.WEEKDAY=function(e,t){if((e=o.parseDate(e))instanceof Error)return e;void 0===t&&(t=1);var n=e.getDay();return s[t][n]},t.WEEKNUM=function(e,t){if((e=o.parseDate(e))instanceof Error)return e;if(void 0===t&&(t=1),21===t)return this.ISOWEEKNUM(e);var n=a[t],r=new Date(e.getFullYear(),0,1),i=r.getDay()<n?1:0;return r-=24*Math.abs(r.getDay()-n)*60*60*1e3,Math.floor((e-r)/864e5/7+1)+i},t.WORKDAY=function(e,t,n){return this.WORKDAY.INTL(e,t,1,n)},t.WORKDAY.INTL=function(e,t,n,i){if((e=o.parseDate(e))instanceof Error)return e;if((t=o.parseNumber(t))instanceof Error)return t;if(t<0)return r.num;if(!((n=void 0===n?l[1]:l[n])instanceof Array))return r.value;void 0===i?i=[]:i instanceof Array||(i=[i]);for(var a=0;a<i.length;a++){var s=o.parseDate(i[a]);if(s instanceof Error)return s;i[a]=s}for(var u=0;u<t;){e.setDate(e.getDate()+1);var c=e.getDay();if(c!==n[0]&&c!==n[1]){for(var f=0;f<i.length;f++){var h=i[f];if(h.getDate()===e.getDate()&&h.getMonth()===e.getMonth()&&h.getFullYear()===e.getFullYear()){u--;break}}u++}}return e},t.YEAR=function(e){return(e=o.parseDate(e))instanceof Error?e:e.getFullYear()},t.YEARFRAC=function(e,t,n){if((e=o.parseDate(e))instanceof Error)return e;if((t=o.parseDate(t))instanceof Error)return t;n=n||0;var r=e.getDate(),i=e.getMonth()+1,a=e.getFullYear(),s=t.getDate(),l=t.getMonth()+1,f=t.getFullYear();switch(n){case 0:return 31===r&&31===s?(r=30,s=30):31===r?r=30:30===r&&31===s&&(s=30),(s+30*l+360*f-(r+30*i+360*a))/360;case 1:var h=365;if(a===f||a+1===f&&(i>l||i===l&&r>=s))return(a===f&&u(a)||function(e,t){var n=e.getFullYear(),r=new Date(n,2,1);if(u(n)&&e<r&&t>=r)return!0;var o=t.getFullYear(),i=new Date(o,2,1);return u(o)&&t>=i&&e<i}(e,t)||1===l&&29===s)&&(h=366),c(e,t)/h;var d=f-a+1,p=(new Date(f+1,0,1)-new Date(a,0,1))/1e3/60/60/24/d;return c(e,t)/p;case 2:return c(e,t)/360;case 3:return c(e,t)/365;case 4:return(s+30*l+360*f-(r+30*i+360*a))/360}}},function(e,t,n){(function(r){var o;
/*!
* numbro.js
* version : 1.11.1
* author : Företagsplatsen AB
* license : MIT
* http://www.foretagsplatsen.se
*/
/*!
* numbro.js
* version : 1.11.1
* author : Företagsplatsen AB
* license : MIT
* http://www.foretagsplatsen.se
*/
(function(){"use strict";var i,a=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],s=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],l={general:{scale:1024,suffixes:s,marker:"bd"},binary:{scale:1024,suffixes:a,marker:"b"},decimal:{scale:1e3,suffixes:s,marker:"d"}},u=[l.general,l.binary,l.decimal],c={},f=c,h="en-US",d=null,p="0,0",g="0$",v=void 0!==e&&e.exports;function y(e){this._value=e}function m(e){return 0===e?1:Math.floor(Math.log(Math.abs(e))/Math.LN10)+1}function w(e){var t,n="";for(t=0;t<e;t++)n+="0";return n}function b(e,t,n,r){var o,i,a=Math.pow(10,t);return e.toString().indexOf("e")>-1?"-"===(i=function(e,t){var n,r,o,i,a,s;return n=(s=e.toString()).split("e")[0],i=s.split("e")[1],r=n.split(".")[0],o=n.split(".")[1]||"",+i>0?s=r+o+w(i-o.length):(a=+r<0?"-0":"0",t>0&&(a+="."),s=a+(w(-1*i-1)+Math.abs(r)+o).substr(0,t)),+i>0&&t>0&&(s+="."+w(t)),s}(e,t)).charAt(0)&&+i>=0&&(i=i.substr(1)):i=(n(e+"e+"+t)/a).toFixed(t),r&&(o=new RegExp("0{1,"+r+"}$"),i=i.replace(o,"")),i}function C(e,t,n){var r=t.replace(/\{[^\{\}]*\}/g,"");return r.indexOf("$")>-1?O(e,c[h].currency.symbol,t,n):r.indexOf("%")>-1?function(e,t,n){var r,o="",i=100*e._value;t.indexOf(" %")>-1?(o=" ",t=t.replace(" %","")):t=t.replace("%","");(r=_(i,t,n)).indexOf(")")>-1?((r=r.split("")).splice(-1,0,o+"%"),r=r.join("")):r=r+o+"%";return r}(e,t,n):r.indexOf(":")>-1?function(e){var t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return t+":"+(n<10?"0"+n:n)+":"+(r<10?"0"+r:r)}(e):_(e._value,t,n)}function E(e,t){var n,r,o,i,l,u=t,f=!1;if(t.indexOf(":")>-1)e._value=function(e){var t=e.split(":"),n=0;3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1]));return Number(n)}(t);else if(t===d)e._value=0;else{for("."!==c[h].delimiters.decimal&&(t=t.replace(/\./g,"").replace(c[h].delimiters.decimal,".")),n=new RegExp("[^a-zA-Z]"+c[h].abbreviations.thousand+"(?:\\)|(\\"+c[h].currency.symbol+")?(?:\\))?)?$"),r=new RegExp("[^a-zA-Z]"+c[h].abbreviations.million+"(?:\\)|(\\"+c[h].currency.symbol+")?(?:\\))?)?$"),o=new RegExp("[^a-zA-Z]"+c[h].abbreviations.billion+"(?:\\)|(\\"+c[h].currency.symbol+")?(?:\\))?)?$"),i=new RegExp("[^a-zA-Z]"+c[h].abbreviations.trillion+"(?:\\)|(\\"+c[h].currency.symbol+")?(?:\\))?)?$"),l=1;l<a.length&&!f;++l)t.indexOf(a[l])>-1?f=Math.pow(1024,l):t.indexOf(s[l])>-1&&(f=Math.pow(1e3,l));var p=t.replace(/[^0-9\.]+/g,"");""===p?e._value=NaN:(e._value=(f||1)*(u.match(n)?Math.pow(10,3):1)*(u.match(r)?Math.pow(10,6):1)*(u.match(o)?Math.pow(10,9):1)*(u.match(i)?Math.pow(10,12):1)*(t.indexOf("%")>-1?.01:1)*((t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1)*Number(p),e._value=f?Math.ceil(e._value):e._value)}return e._value}function O(e,t,n,r){var o,i,a=n,s=a.indexOf("$"),l=a.indexOf("("),u=a.indexOf("+"),f=a.indexOf("-"),d="",p="";if(-1===a.indexOf("$")?"infix"===c[h].currency.position?(p=t,c[h].currency.spaceSeparated&&(p=" "+p+" ")):c[h].currency.spaceSeparated&&(d=" "):a.indexOf(" $")>-1?(d=" ",a=a.replace(" $","")):a.indexOf("$ ")>-1?(d=" ",a=a.replace("$ ","")):a=a.replace("$",""),i=_(e._value,a,r,p),-1===n.indexOf("$"))switch(c[h].currency.position){case"postfix":i.indexOf(")")>-1?((i=i.split("")).splice(-1,0,d+t),i=i.join("")):i=i+d+t;break;case"infix":break;case"prefix":i.indexOf("(")>-1||i.indexOf("-")>-1?(i=i.split(""),o=Math.max(l,f)+1,i.splice(o,0,t+d),i=i.join("")):i=t+d+i;break;default:throw Error('Currency position should be among ["prefix", "infix", "postfix"]')}else s<=1?i.indexOf("(")>-1||i.indexOf("+")>-1||i.indexOf("-")>-1?(i=i.split(""),o=1,(s<l||s<u||s<f)&&(o=0),i.splice(o,0,t+d),i=i.join("")):i=t+d+i:i.indexOf(")")>-1?((i=i.split("")).splice(-1,0,d+t),i=i.join("")):i=i+d+t;return i}function S(e,t,n){var r,o,i,a=t[0],s=Math.abs(e);if(s>=n){for(r=1;r<t.length;++r)if(o=Math.pow(n,r),i=Math.pow(n,r+1),s>=o&&s<i){a=t[r],e/=o;break}a===t[0]&&(e/=Math.pow(n,t.length-1),a=t[t.length-1])}return{value:e,suffix:a}}function _(e,t,n,r){var o,i,a,s,l,f,p,g,v,y,C,E,O,_,T,R=!1,M=!1,k=!1,N="",A=!1,I=!1,D=!1,P=!1,x=!1,L="",H="",j=Math.abs(e),F="",V=!1,B=!1;if(0===e&&null!==d)return d;if(!isFinite(e))return""+e;if(0===t.indexOf("{")){var U=t.indexOf("}");if(-1===U)throw Error('Format should also contain a "}"');y=t.slice(1,U),t=t.slice(U+1)}else y="";if(t.indexOf("}")===t.length-1&&t.length){var W=t.indexOf("{");if(-1===W)throw Error('Format should also contain a "{"');C=t.slice(W+1,-1),t=t.slice(0,W+1)}else C="";for(O=null===(T=-1===t.indexOf(".")?t.match(/([0-9]+).*/):t.match(/([0-9]+)\..*/))?-1:T[1].length,-1!==t.indexOf("-")&&(V=!0),t.indexOf("(")>-1?(R=!0,t=t.slice(1,-1)):t.indexOf("+")>-1&&(M=!0,t=t.replace(/\+/g,"")),t.indexOf("a")>-1&&(g=t.split(".")[0].match(/[0-9]+/g)||["0"],g=parseInt(g[0],10),A=t.indexOf("aK")>=0,I=t.indexOf("aM")>=0,D=t.indexOf("aB")>=0,P=t.indexOf("aT")>=0,x=A||I||D||P,t.indexOf(" a")>-1?(N=" ",t=t.replace(" a","")):t=t.replace("a",""),l=0===(l=(a=m(e))%3)?3:l,g&&0!==j&&(f=3*~~((Math.min(g,a)-l)/3),j/=Math.pow(10,f)),a!==g&&(j>=Math.pow(10,12)&&!x||P?(N+=c[h].abbreviations.trillion,e/=Math.pow(10,12)):j<Math.pow(10,12)&&j>=Math.pow(10,9)&&!x||D?(N+=c[h].abbreviations.billion,e/=Math.pow(10,9)):j<Math.pow(10,9)&&j>=Math.pow(10,6)&&!x||I?(N+=c[h].abbreviations.million,e/=Math.pow(10,6)):(j<Math.pow(10,6)&&j>=Math.pow(10,3)&&!x||A)&&(N+=c[h].abbreviations.thousand,e/=Math.pow(10,3))),s=m(e),g&&s<g&&-1===t.indexOf(".")&&(t+="[.]",t+=w(g-s))),_=0;_<u.length;++_)if(o=u[_],t.indexOf(o.marker)>-1){t.indexOf(" "+o.marker)>-1&&(L=" "),t=t.replace(L+o.marker,""),e=(i=S(e,o.suffixes,o.scale)).value,L+=i.suffix;break}if(t.indexOf("o")>-1&&(t.indexOf(" o")>-1?(H=" ",t=t.replace(" o","")):t=t.replace("o",""),c[h].ordinal&&(H+=c[h].ordinal(e))),t.indexOf("[.]")>-1&&(k=!0,t=t.replace("[.]",".")),v=t.split(".")[1],E=t.indexOf(","),v){var Y=[];if(-1!==v.indexOf("*")?(Y=(F=e.toString()).split(".")).length>1&&(F=b(e,Y[1].length,n)):F=v.indexOf("[")>-1?b(e,(v=(v=v.replace("]","")).split("["))[0].length+v[1].length,n,v[1].length):b(e,v.length,n),p=(Y=F.split("."))[0],Y.length>1&&Y[1].length)F=(r?N+r:c[h].delimiters.decimal)+Y[1];else F="";k&&0===Number(F.slice(1))&&(F="")}else p=b(e,0,n);return p.indexOf("-")>-1&&(p=p.slice(1),B=!0),p.length<O&&(p=w(O-p.length)+p),E>-1&&(p=p.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+c[h].delimiters.thousands)),0===t.indexOf(".")&&(p=""),y+(t.indexOf("(")<t.indexOf("-")?(R&&B?"(":"")+(V&&B||!R&&B?"-":""):(V&&B||!R&&B?"-":"")+(R&&B?"(":""))+(!B&&M&&0!==e?"+":"")+p+F+(H||"")+(N&&!r?N:"")+(L||"")+(R&&B?")":"")+C}function T(e,t){c[e]=t}function R(e){h=e;var t=c[e].defaults;t&&t.format&&i.defaultFormat(t.format),t&&t.currencyFormat&&i.defaultCurrencyFormat(t.currencyFormat)}function M(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)}function k(){return Array.prototype.slice.call(arguments).reduce(function(e,t){var n=M(e),r=M(t);return n>r?n:r},-1/0)}(i=function(e){return e=i.isNumbro(e)?e.value():"string"==typeof e||"number"==typeof e?i.fn.unformat(e):NaN,new y(Number(e))}).version="1.11.1",i.isNumbro=function(e){return e instanceof y},i.setLanguage=function(e,t){console.warn("`setLanguage` is deprecated since version 1.6.0. Use `setCulture` instead");var n=e,r=e.split("-")[0],o=null;f[n]||(Object.keys(f).forEach(function(e){o||e.split("-")[0]!==r||(o=e)}),n=o||t||"en-US"),R(n)},i.setCulture=function(e,t){var n=e,r=e.split("-")[1],o=null;c[n]||(r&&Object.keys(c).forEach(function(e){o||e.split("-")[1]!==r||(o=e)}),n=o||t||"en-US"),R(n)},i.language=function(e,t){if(console.warn("`language` is deprecated since version 1.6.0. Use `culture` instead"),!e)return h;if(e&&!t){if(!f[e])throw new Error("Unknown language : "+e);R(e)}return!t&&f[e]||T(e,t),i},i.culture=function(e,t){if(!e)return h;if(e&&!t){if(!c[e])throw new Error("Unknown culture : "+e);R(e)}return!t&&c[e]||T(e,t),i},i.languageData=function(e){if(console.warn("`languageData` is deprecated since version 1.6.0. Use `cultureData` instead"),!e)return f[h];if(!f[e])throw new Error("Unknown language : "+e);return f[e]},i.cultureData=function(e){if(!e)return c[h];if(!c[e])throw new Error("Unknown culture : "+e);return c[e]},i.culture("en-US",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00"}}),i.languages=function(){return console.warn("`languages` is deprecated since version 1.6.0. Use `cultures` instead"),f},i.cultures=function(){return c},i.zeroFormat=function(e){d="string"==typeof e?e:null},i.defaultFormat=function(e){p="string"==typeof e?e:"0.0"},i.defaultCurrencyFormat=function(e){g="string"==typeof e?e:"0$"},i.validate=function(e,t){var n,r,o,a,s,l,u,c;if("string"!=typeof e&&(e+="",console.warn&&console.warn("Numbro.js: Value is not string. It has been co-erced to: ",e)),(e=(e=e.trim()).replace(/^[+-]?/,"")).match(/^\d+$/))return!0;if(""===e)return!1;try{u=i.cultureData(t)}catch(e){u=i.cultureData(i.culture())}return o=u.currency.symbol,s=u.abbreviations,n=u.delimiters.decimal,r="."===u.delimiters.thousands?"\\.":u.delimiters.thousands,(null===(c=e.match(/^[^\d\.\,]+/))||(e=e.substr(1),c[0]===o))&&((null===(c=e.match(/[^\d]+$/))||(e=e.slice(0,-1),c[0]===s.thousand||c[0]===s.million||c[0]===s.billion||c[0]===s.trillion))&&(l=new RegExp(r+"{2}"),!e.match(/[^\d.,]/g)&&(!((a=e.split(n)).length>2)&&(a.length<2?!!a[0].match(/^\d+.*\d$/)&&!a[0].match(l):""===a[0]?!a[0].match(l)&&!!a[1].match(/^\d+$/):1===a[0].length?!!a[0].match(/^\d+$/)&&!a[0].match(l)&&!!a[1].match(/^\d+$/):!!a[0].match(/^\d+.*\d$/)&&!a[0].match(l)&&!!a[1].match(/^\d+$/)))))},i.loadLanguagesInNode=function(){console.warn("`loadLanguagesInNode` is deprecated since version 1.6.0. Use `loadCulturesInNode` instead"),i.loadCulturesInNode()},i.loadCulturesInNode=function(){var e=n(27);for(var t in e)t&&i.culture(t,e[t])},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(e,t){if(null===this||void 0===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var n,r,o=this.length>>>0,i=!1;for(1<arguments.length&&(r=t,i=!0),n=0;o>n;++n)this.hasOwnProperty(n)&&(i?r=e(r,this[n],n,this):(r=this[n],i=!0));if(!i)throw new TypeError("Reduce of empty array with no initial value");return r}),i.fn=y.prototype={clone:function(){return i(this)},format:function(e,t){return C(this,e||p,void 0!==t?t:Math.round)},formatCurrency:function(e,t){return O(this,c[h].currency.symbol,e||g,void 0!==t?t:Math.round)},formatForeignCurrency:function(e,t,n){return function(e,t,n,r){return O(e,t,n,r)}(this,e,t||g,void 0!==n?n:Math.round)},unformat:function(e){if("number"==typeof e)return e;if("string"==typeof e){var t=E(this,e);return isNaN(t)?void 0:t}},binaryByteUnits:function(){return S(this._value,l.binary.suffixes,l.binary.scale).suffix},byteUnits:function(){return S(this._value,l.general.suffixes,l.general.scale).suffix},decimalByteUnits:function(){return S(this._value,l.decimal.suffixes,l.decimal.scale).suffix},value:function(){return this._value},valueOf:function(){return this._value},set:function(e){return this._value=Number(e),this},add:function(e){var t=k.call(null,this._value,e);return this._value=[this._value,e].reduce(function(e,n){return e+t*n},0)/t,this},subtract:function(e){var t=k.call(null,this._value,e);return this._value=[e].reduce(function(e,n){return e-t*n},this._value*t)/t,this},multiply:function(e){return this._value=[this._value,e].reduce(function(e,t){var n=k(e,t),r=e*n;return r*=t*n,r/=n*n},1),this},divide:function(e){return this._value=[this._value,e].reduce(function(e,t){var n=k(e,t);return e*n/(t*n)}),this},difference:function(e){return Math.abs(i(this._value).subtract(e).value())}},void 0!==r&&void 0===r.browser&&r.title&&(-1!==r.title.indexOf("node")||r.title.indexOf("meteor-tool")>0||"grunt"===r.title||"gulp"===r.title)&&i.loadCulturesInNode(),v?e.exports=i:("undefined"==typeof ender&&(this.numbro=i),void 0===(o=function(){return i}.apply(t,[]))||(e.exports=o))}).call("undefined"==typeof window?this:window)}).call(t,n(10))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,u=[],c=!1,f=-1;function h(){c&&l&&(c=!1,l.length?u=l.concat(u):f=-1,u.length&&d())}function d(){if(!c){var e=s(h);c=!0;for(var t=u.length;t;){for(l=u,u=[];++f<t;)l&&l[f].run();f=-1,t=u.length}l=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||c||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){var e=function(e,t){var n=Array.prototype.concat,r=Array.prototype.slice,o=Object.prototype.toString;function a(t,n){var r=t>n?t:n;return e.pow(10,17-~~(e.log(r>0?r:-r)*e.LOG10E))}var s=Array.isArray||function(e){return"[object Array]"===o.call(e)};function l(e){return"[object Function]"===o.call(e)}function u(e){return"number"==typeof e&&e==e}function c(){return new c._init(arguments)}function f(){return 0}function h(){return 1}function d(e,t){return e===t?1:0}c.fn=c.prototype,c._init=function(e){if(s(e[0]))if(s(e[0][0])){l(e[1])&&(e[0]=c.map(e[0],e[1]));for(var t=0;t<e[0].length;t++)this[t]=e[0][t];this.length=e[0].length}else this[0]=l(e[1])?c.map(e[0],e[1]):e[0],this.length=1;else if(u(e[0]))this[0]=c.seq.apply(null,e),this.length=1;else{if(e[0]instanceof c)return c(e[0].toArray());this[0]=[],this.length=1}return this},c._init.prototype=c.prototype,c._init.constructor=c,c.utils={calcRdx:a,isArray:s,isFunction:l,isNumber:u,toVector:function(e){return n.apply([],e)}},c.extend=function(e){var t;if(1===arguments.length){for(t in e)c[t]=e[t];return this}for(var n=1;n<arguments.length;n++)for(t in arguments[n])e[t]=arguments[n][t];return e},c.rows=function(e){return e.length||1},c.cols=function(e){return e[0].length||1},c.dimensions=function(e){return{rows:c.rows(e),cols:c.cols(e)}},c.row=function(e,t){return s(t)?t.map(function(t){return c.row(e,t)}):e[t]},c.rowa=function(e,t){return c.row(e,t)},c.col=function(e,t){if(s(t)){var n=c.arange(e.length).map(function(e){return new Array(t.length)});return t.forEach(function(t,r){c.arange(e.length).forEach(function(o){n[o][r]=e[o][t]})}),n}for(var r=new Array(e.length),o=0;o<e.length;o++)r[o]=[e[o][t]];return r},c.cola=function(e,t){return c.col(e,t).map(function(e){return e[0]})},c.diag=function(e){for(var t=c.rows(e),n=new Array(t),r=0;r<t;r++)n[r]=[e[r][r]];return n},c.antidiag=function(e){for(var t=c.rows(e)-1,n=new Array(t),r=0;t>=0;t--,r++)n[r]=[e[r][t]];return n},c.transpose=function(e){var t,n,r,o,i=[];s(e[0])||(e=[e]),n=e.length,r=e[0].length;for(var a=0;a<r;a++){for(t=new Array(n),o=0;o<n;o++)t[o]=e[o][a];i.push(t)}return 1===i.length?i[0]:i},c.map=function(e,t,n){var r,o,i,a,l;for(s(e[0])||(e=[e]),o=e.length,i=e[0].length,a=n?e:new Array(o),r=0;r<o;r++)for(a[r]||(a[r]=new Array(i)),l=0;l<i;l++)a[r][l]=t(e[r][l],r,l);return 1===a.length?a[0]:a},c.cumreduce=function(e,t,n){var r,o,i,a,l;for(s(e[0])||(e=[e]),o=e.length,i=e[0].length,a=n?e:new Array(o),r=0;r<o;r++)for(a[r]||(a[r]=new Array(i)),i>0&&(a[r][0]=e[r][0]),l=1;l<i;l++)a[r][l]=t(a[r][l-1],e[r][l]);return 1===a.length?a[0]:a},c.alter=function(e,t){return c.map(e,t,!0)},c.create=function(e,t,n){var r,o=new Array(e);l(t)&&(n=t,t=e);for(var i=0;i<e;i++)for(o[i]=new Array(t),r=0;r<t;r++)o[i][r]=n(i,r);return o},c.zeros=function(e,t){return u(t)||(t=e),c.create(e,t,f)},c.ones=function(e,t){return u(t)||(t=e),c.create(e,t,h)},c.rand=function(t,n){return u(n)||(n=t),c.create(t,n,e.random)},c.identity=function(e,t){return u(t)||(t=e),c.create(e,t,d)},c.symmetric=function(e){var t,n,r=e.length;if(e.length!==e[0].length)return!1;for(t=0;t<r;t++)for(n=0;n<r;n++)if(e[n][t]!==e[t][n])return!1;return!0},c.clear=function(e){return c.alter(e,f)},c.seq=function(e,t,n,r){l(r)||(r=!1);var o,i=[],s=a(e,t),u=(t*s-e*s)/((n-1)*s),c=e;for(o=0;c<=t&&o<n;c=(e*s+u*s*++o)/s)i.push(r?r(c,o):c);return i},c.arange=function(e,n,r){var o=[];if(r=r||1,n===t&&(n=e,e=0),e===n||0===r)return[];if(e<n&&r<0)return[];if(e>n&&r>0)return[];if(r>0)for(i=e;i<n;i+=r)o.push(i);else for(i=e;i>n;i+=r)o.push(i);return o},c.slice=function(){function e(e,n,r,o){var i,a=[],s=e.length;if(n===t&&r===t&&o===t)return c.copy(e);if(n=n||0,r=r||e.length,n=n>=0?n:s+n,r=r>=0?r:s+r,o=o||1,n===r||0===o)return[];if(n<r&&o<0)return[];if(n>r&&o>0)return[];if(o>0)for(i=n;i<r;i+=o)a.push(e[i]);else for(i=n;i>r;i+=o)a.push(e[i]);return a}return function(t,n){if(u((n=n||{}).row))return u(n.col)?t[n.row][n.col]:e(c.rowa(t,n.row),(o=n.col||{}).start,o.end,o.step);if(u(n.col))return e(c.cola(t,n.col),(r=n.row||{}).start,r.end,r.step);var r=n.row||{},o=n.col||{};return e(t,r.start,r.end,r.step).map(function(t){return e(t,o.start,o.end,o.step)})}}(),c.sliceAssign=function(n,r,o){if(u(r.row)){if(u(r.col))return n[r.row][r.col]=o;r.col=r.col||{},r.col.start=r.col.start||0,r.col.end=r.col.end||n[0].length,r.col.step=r.col.step||1;var i=c.arange(r.col.start,e.min(n.length,r.col.end),r.col.step),a=r.row;return i.forEach(function(e,t){n[a][e]=o[t]}),n}if(u(r.col)){r.row=r.row||{},r.row.start=r.row.start||0,r.row.end=r.row.end||n.length,r.row.step=r.row.step||1;var s=c.arange(r.row.start,e.min(n[0].length,r.row.end),r.row.step),l=r.col;return s.forEach(function(e,t){n[e][l]=o[t]}),n}o[0].length===t&&(o=[o]),r.row.start=r.row.start||0,r.row.end=r.row.end||n.length,r.row.step=r.row.step||1,r.col.start=r.col.start||0,r.col.end=r.col.end||n[0].length,r.col.step=r.col.step||1;s=c.arange(r.row.start,e.min(n.length,r.row.end),r.row.step),i=c.arange(r.col.start,e.min(n[0].length,r.col.end),r.col.step);return s.forEach(function(e,t){i.forEach(function(r,i){n[e][r]=o[t][i]})}),n},c.diagonal=function(e){var t=c.zeros(e.length,e.length);return e.forEach(function(e,n){t[n][n]=e}),t},c.copy=function(e){return e.map(function(e){return u(e)?e:e.map(function(e){return e})})};var p=c.prototype;return p.length=0,p.push=Array.prototype.push,p.sort=Array.prototype.sort,p.splice=Array.prototype.splice,p.slice=Array.prototype.slice,p.toArray=function(){return this.length>1?r.call(this):r.call(this)[0]},p.map=function(e,t){return c(c.map(this,e,t))},p.cumreduce=function(e,t){return c(c.cumreduce(this,e,t))},p.alter=function(e){return c.alter(this,e),this},function(e){for(var t=0;t<e.length;t++)!function(e){p[e]=function(t){var n,r=this;return t?(setTimeout(function(){t.call(r,p[e].call(r))}),this):(n=c[e](this),s(n)?c(n):n)}}(e[t])}("transpose clear symmetric rows cols dimensions diag antidiag".split(" ")),function(e){for(var t=0;t<e.length;t++)!function(e){p[e]=function(t,n){var r=this;return n?(setTimeout(function(){n.call(r,p[e].call(r,t))}),this):c(c[e](this,t))}}(e[t])}("row col".split(" ")),function(e){for(var t=0;t<e.length;t++)!function(e){p[e]=new Function("return jStat(jStat."+e+".apply(null, arguments));")}(e[t])}("create zeros ones rand identity".split(" ")),c}(Math);return function(e,t){var n=e.utils.isFunction;function r(e,t){return e-t}function o(e,n,r){return t.max(n,t.min(e,r))}e.sum=function(e){for(var t=0,n=e.length;--n>=0;)t+=e[n];return t},e.sumsqrd=function(e){for(var t=0,n=e.length;--n>=0;)t+=e[n]*e[n];return t},e.sumsqerr=function(t){for(var n,r=e.mean(t),o=0,i=t.length;--i>=0;)o+=(n=t[i]-r)*n;return o},e.sumrow=function(e){for(var t=0,n=e.length;--n>=0;)t+=e[n];return t},e.product=function(e){for(var t=1,n=e.length;--n>=0;)t*=e[n];return t},e.min=function(e){for(var t=e[0],n=0;++n<e.length;)e[n]<t&&(t=e[n]);return t},e.max=function(e){for(var t=e[0],n=0;++n<e.length;)e[n]>t&&(t=e[n]);return t},e.unique=function(e){for(var t={},n=[],r=0;r<e.length;r++)t[e[r]]||(t[e[r]]=!0,n.push(e[r]));return n},e.mean=function(t){return e.sum(t)/t.length},e.meansqerr=function(t){return e.sumsqerr(t)/t.length},e.geomean=function(n){return t.pow(e.product(n),1/n.length)},e.median=function(e){var t=e.length,n=e.slice().sort(r);return 1&t?n[t/2|0]:(n[t/2-1]+n[t/2])/2},e.cumsum=function(t){return e.cumreduce(t,function(e,t){return e+t})},e.cumprod=function(t){return e.cumreduce(t,function(e,t){return e*t})},e.diff=function(e){for(var t=[],n=e.length,r=1;r<n;r++)t.push(e[r]-e[r-1]);return t},e.rank=function(e){for(var t=e.length,n=e.slice().sort(r),o=new Array(t),i=0;i<t;i++){var a=n.indexOf(e[i]),s=n.lastIndexOf(e[i]);if(a===s)var l=a;else l=(a+s)/2;o[i]=l+1}return o},e.mode=function(e){for(var t=e.length,n=e.slice().sort(r),o=1,i=0,a=0,s=[],l=0;l<t;l++)n[l]===n[l+1]?o++:(o>i?(s=[n[l]],i=o,a=0):o===i&&(s.push(n[l]),a++),o=1);return 0===a?s[0]:s},e.range=function(t){return e.max(t)-e.min(t)},e.variance=function(t,n){return e.sumsqerr(t)/(t.length-(n?1:0))},e.pooledvariance=function(t){return t.reduce(function(t,n){return t+e.sumsqerr(n)},0)/(t.reduce(function(e,t){return e+t.length},0)-t.length)},e.deviation=function(t){for(var n=e.mean(t),r=t.length,o=new Array(r),i=0;i<r;i++)o[i]=t[i]-n;return o},e.stdev=function(n,r){return t.sqrt(e.variance(n,r))},e.pooledstdev=function(n){return t.sqrt(e.pooledvariance(n))},e.meandev=function(n){for(var r=e.mean(n),o=[],i=n.length-1;i>=0;i--)o.push(t.abs(n[i]-r));return e.mean(o)},e.meddev=function(n){for(var r=e.median(n),o=[],i=n.length-1;i>=0;i--)o.push(t.abs(n[i]-r));return e.median(o)},e.coeffvar=function(t){return e.stdev(t)/e.mean(t)},e.quartiles=function(e){var n=e.length,o=e.slice().sort(r);return[o[t.round(n/4)-1],o[t.round(n/2)-1],o[t.round(3*n/4)-1]]},e.quantiles=function(e,n,i,a){var s,l,u,c,f=e.slice().sort(r),h=[n.length],d=e.length;void 0===i&&(i=3/8),void 0===a&&(a=3/8);for(var p=0;p<n.length;p++)c=o((l=d*(s=n[p])+(i+s*(1-i-a)))-(u=t.floor(o(l,1,d-1))),0,1),h[p]=(1-c)*f[u-1]+c*f[u];return h},e.percentile=function(e,t){var n=e.slice().sort(r),o=t*(n.length-1),i=parseInt(o),a=o-i;return i+1<n.length?n[i]*(1-a)+n[i+1]*a:n[i]},e.percentileOfScore=function(e,t,n){var r,o=0,i=e.length,a=!1;"strict"===n&&(a=!0);for(var s=0;s<i;s++)r=e[s],(a&&r<t||!a&&r<=t)&&o++;return o/i},e.histogram=function(n,r){for(var o=e.min(n),i=r||4,a=(e.max(n)-o)/i,s=n.length,l=(r=[],0);l<i;l++)r[l]=0;for(l=0;l<s;l++)r[t.min(t.floor((n[l]-o)/a),i-1)]+=1;return r},e.covariance=function(t,n){for(var r=e.mean(t),o=e.mean(n),i=t.length,a=new Array(i),s=0;s<i;s++)a[s]=(t[s]-r)*(n[s]-o);return e.sum(a)/(i-1)},e.corrcoeff=function(t,n){return e.covariance(t,n)/e.stdev(t,1)/e.stdev(n,1)},e.spearmancoeff=function(t,n){return t=e.rank(t),n=e.rank(n),e.corrcoeff(t,n)},e.stanMoment=function(n,r){for(var o=e.mean(n),i=e.stdev(n),a=n.length,s=0,l=0;l<a;l++)s+=t.pow((n[l]-o)/i,r);return s/n.length},e.skewness=function(t){return e.stanMoment(t,3)},e.kurtosis=function(t){return e.stanMoment(t,4)-3};var i=e.prototype;!function(t){for(var r=0;r<t.length;r++)!function(t){i[t]=function(r,o){var a=[],s=0,l=this;if(n(r)&&(o=r,r=!1),o)return setTimeout(function(){o.call(l,i[t].call(l,r))}),this;if(this.length>1){for(l=!0===r?this:this.transpose();s<l.length;s++)a[s]=e[t](l[s]);return a}return e[t](this[0],r)}}(t[r])}("cumsum cumprod".split(" ")),function(t){for(var r=0;r<t.length;r++)!function(t){i[t]=function(r,o){var a=[],s=0,l=this;if(n(r)&&(o=r,r=!1),o)return setTimeout(function(){o.call(l,i[t].call(l,r))}),this;if(this.length>1){for("sumrow"!==t&&(l=!0===r?this:this.transpose());s<l.length;s++)a[s]=e[t](l[s]);return!0===r?e[t](e.utils.toVector(a)):a}return e[t](this[0],r)}}(t[r])}("sum sumsqrd sumsqerr sumrow product min max unique mean meansqerr geomean median diff rank mode range variance deviation stdev meandev meddev coeffvar quartiles histogram skewness kurtosis".split(" ")),function(t){for(var r=0;r<t.length;r++)!function(t){i[t]=function(){var r=[],o=0,a=this,s=Array.prototype.slice.call(arguments);if(n(s[s.length-1])){var l=s[s.length-1],u=s.slice(0,s.length-1);return setTimeout(function(){l.call(a,i[t].apply(a,u))}),this}l=void 0;var c=function(n){return e[t].apply(a,[n].concat(s))};if(this.length>1){for(a=a.transpose();o<a.length;o++)r[o]=c(a[o]);return r}return c(this[0])}}(t[r])}("quantiles percentileOfScore".split(" "))}(e,Math),function(e,t){e.gammaln=function(e){var n,r,o,i=0,a=[76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],s=1.000000000190015;for(o=(r=n=e)+5.5,o-=(n+.5)*t.log(o);i<6;i++)s+=a[i]/++r;return t.log(2.5066282746310007*s/n)-o},e.gammafn=function(e){var n,r,o,i=[-1.716185138865495,24.76565080557592,-379.80425647094563,629.3311553128184,866.9662027904133,-31451.272968848367,-36144.413418691176,66456.14382024054],a=[-30.8402300119739,315.35062697960416,-1015.1563674902192,-3107.771671572311,22538.11842098015,4755.846277527881,-134659.9598649693,-115132.2596755535],s=!1,l=0,u=0,c=0,f=e;if(f<=0){if(!(o=f%1+3.6e-16))return 1/0;s=(1&f?-1:1)*t.PI/t.sin(t.PI*o),f=1-f}r=f,n=f<1?f++:(f-=l=(0|f)-1)-1;for(var h=0;h<8;++h)c=(c+i[h])*n,u=u*n+a[h];if(o=c/u+1,r<f)o/=r;else if(r>f)for(h=0;h<l;++h)o*=f,f++;return s&&(o=s/o),o},e.gammap=function(t,n){return e.lowRegGamma(t,n)*e.gammafn(t)},e.lowRegGamma=function(n,r){var o,i=e.gammaln(n),a=n,s=1/n,l=s,u=r+1-n,c=1/1e-30,f=1/u,h=f,d=1,p=-~(8.5*t.log(n>=1?n:1/n)+.4*n+17);if(r<0||n<=0)return NaN;if(r<n+1){for(;d<=p;d++)s+=l*=r/++a;return s*t.exp(-r+n*t.log(r)-i)}for(;d<=p;d++)h*=(f=1/(f=(o=-d*(d-n))*f+(u+=2)))*(c=u+o/c);return 1-h*t.exp(-r+n*t.log(r)-i)},e.factorialln=function(t){return t<0?NaN:e.gammaln(t+1)},e.factorial=function(t){return t<0?NaN:e.gammafn(t+1)},e.combination=function(n,r){return n>170||r>170?t.exp(e.combinationln(n,r)):e.factorial(n)/e.factorial(r)/e.factorial(n-r)},e.combinationln=function(t,n){return e.factorialln(t)-e.factorialln(n)-e.factorialln(t-n)},e.permutation=function(t,n){return e.factorial(t)/e.factorial(t-n)},e.betafn=function(n,r){if(!(n<=0||r<=0))return n+r>170?t.exp(e.betaln(n,r)):e.gammafn(n)*e.gammafn(r)/e.gammafn(n+r)},e.betaln=function(t,n){return e.gammaln(t)+e.gammaln(n)-e.gammaln(t+n)},e.betacf=function(e,n,r){var o,i,a,s,l=1,u=n+r,c=n+1,f=n-1,h=1,d=1-u*e/c;for(t.abs(d)<1e-30&&(d=1e-30),s=d=1/d;l<=100&&(d=1+(i=l*(r-l)*e/((f+(o=2*l))*(n+o)))*d,t.abs(d)<1e-30&&(d=1e-30),h=1+i/h,t.abs(h)<1e-30&&(h=1e-30),s*=(d=1/d)*h,d=1+(i=-(n+l)*(u+l)*e/((n+o)*(c+o)))*d,t.abs(d)<1e-30&&(d=1e-30),h=1+i/h,t.abs(h)<1e-30&&(h=1e-30),s*=a=(d=1/d)*h,!(t.abs(a-1)<3e-7));l++);return s},e.gammapinv=function(n,r){var o,i,a,s,l,u,c=0,f=r-1,h=e.gammaln(r);if(n>=1)return t.max(100,r+100*t.sqrt(r));if(n<=0)return 0;for(r>1?(l=t.log(f),u=t.exp(f*(l-1)-h),s=n<.5?n:1-n,o=(2.30753+.27061*(i=t.sqrt(-2*t.log(s))))/(1+i*(.99229+.04481*i))-i,n<.5&&(o=-o),o=t.max(.001,r*t.pow(1-1/(9*r)-o/(3*t.sqrt(r)),3))):o=n<(i=1-r*(.253+.12*r))?t.pow(n/i,1/r):1-t.log(1-(n-i)/(1-i));c<12;c++){if(o<=0)return 0;if((o-=i=(a=(e.lowRegGamma(r,o)-n)/(i=r>1?u*t.exp(-(o-f)+f*(t.log(o)-l)):t.exp(-o+f*t.log(o)-h)))/(1-.5*t.min(1,a*((r-1)/o-1))))<=0&&(o=.5*(o+i)),t.abs(i)<1e-8*o)break}return o},e.erf=function(e){var n,r,o,i,a=[-1.3026537197817094,.6419697923564902,.019476473204185836,-.00956151478680863,-.000946595344482036,.000366839497852761,42523324806907e-18,-20278578112534e-18,-1624290004647e-18,130365583558e-17,1.5626441722e-8,-8.5238095915e-8,6.529054439e-9,5.059343495e-9,-9.91364156e-10,-2.27365122e-10,9.6467911e-11,2.394038e-12,-6.886027e-12,8.94487e-13,3.13092e-13,-1.12708e-13,3.81e-16,7.106e-15,-1.523e-15,-9.4e-17,1.21e-16,-2.8e-17],s=a.length-1,l=!1,u=0,c=0;for(e<0&&(e=-e,l=!0),r=4*(n=2/(2+e))-2;s>0;s--)o=u,u=r*u-c+a[s],c=o;return i=n*t.exp(-e*e+.5*(a[0]+r*u)-c),l?i-1:1-i},e.erfc=function(t){return 1-e.erf(t)},e.erfcinv=function(n){var r,o,i,a,s=0;if(n>=2)return-100;if(n<=0)return 100;for(a=n<1?n:2-n,r=-.70711*((2.30753+.27061*(i=t.sqrt(-2*t.log(a/2))))/(1+i*(.99229+.04481*i))-i);s<2;s++)r+=(o=e.erfc(r)-a)/(1.1283791670955126*t.exp(-r*r)-r*o);return n<1?r:-r},e.ibetainv=function(n,r,o){var i,a,s,l,u,c,f,h,d,p,g=r-1,v=o-1,y=0;if(n<=0)return 0;if(n>=1)return 1;for(r>=1&&o>=1?(s=n<.5?n:1-n,c=(2.30753+.27061*(l=t.sqrt(-2*t.log(s))))/(1+l*(.99229+.04481*l))-l,n<.5&&(c=-c),f=(c*c-3)/6,h=2/(1/(2*r-1)+1/(2*o-1)),d=c*t.sqrt(f+h)/h-(1/(2*o-1)-1/(2*r-1))*(f+5/6-2/(3*h)),c=r/(r+o*t.exp(2*d))):(i=t.log(r/(r+o)),a=t.log(o/(r+o)),c=n<(l=t.exp(r*i)/r)/(d=l+(u=t.exp(o*a)/o))?t.pow(r*d*n,1/r):1-t.pow(o*d*(1-n),1/o)),p=-e.gammaln(r)-e.gammaln(o)+e.gammaln(r+o);y<10;y++){if(0===c||1===c)return c;if((c-=l=(u=(e.ibeta(c,r,o)-n)/(l=t.exp(g*t.log(c)+v*t.log(1-c)+p)))/(1-.5*t.min(1,u*(g/c-v/(1-c)))))<=0&&(c=.5*(c+l)),c>=1&&(c=.5*(c+l+1)),t.abs(l)<1e-8*c&&y>0)break}return c},e.ibeta=function(n,r,o){var i=0===n||1===n?0:t.exp(e.gammaln(r+o)-e.gammaln(r)-e.gammaln(o)+r*t.log(n)+o*t.log(1-n));return!(n<0||n>1)&&(n<(r+1)/(r+o+2)?i*e.betacf(n,r,o)/r:1-i*e.betacf(1-n,o,r)/o)},e.randn=function(n,r){var o,i,a,s,l;if(r||(r=n),n)return e.create(n,r,function(){return e.randn()});do{o=t.random(),i=1.7156*(t.random()-.5),l=(a=o-.449871)*a+(s=t.abs(i)+.386595)*(.196*s-.25472*a)}while(l>.27597&&(l>.27846||i*i>-4*t.log(o)*o*o));return i/o},e.randg=function(n,r,o){var i,a,s,l,u,c,f=n;if(o||(o=r),n||(n=1),r)return(c=e.zeros(r,o)).alter(function(){return e.randg(n)}),c;n<1&&(n+=1),i=n-1/3,a=1/t.sqrt(9*i);do{do{l=1+a*(u=e.randn())}while(l<=0);l*=l*l,s=t.random()}while(s>1-.331*t.pow(u,4)&&t.log(s)>.5*u*u+i*(1-l+t.log(l)));if(n==f)return i*l;do{s=t.random()}while(0===s);return t.pow(s,1/f)*i*l},function(t){for(var n=0;n<t.length;n++)!function(t){e.fn[t]=function(){return e(e.map(this,function(n){return e[t](n)}))}}(t[n])}("gammaln gammafn factorial factorialln".split(" ")),function(t){for(var n=0;n<t.length;n++)!function(t){e.fn[t]=function(){return e(e[t].apply(null,arguments))}}(t[n])}("randn".split(" "))}(e,Math),function(e,t){function n(n,r,o){var i=[.9815606342467192,.9041172563704749,.7699026741943047,.5873179542866175,.3678314989981802,.1252334085114689],a=[.04717533638651183,.10693932599531843,.16007832854334622,.20316742672306592,.2334925365383548,.24914704581340277],s=.5*n;if(s>=8)return 1;var l,u=2*e.normal.cdf(s,0,1,1,0)-1;u=u>=t.exp(-50/o)?t.pow(u,o):0;for(var c=s,f=(8-s)/(l=n>3?2:3),h=c+f,d=0,p=o-1,g=1;g<=l;g++){for(var v=0,y=.5*(h+c),m=.5*(h-c),w=1;w<=12;w++){var b,C=y+m*(6<w?i[(b=12-w+1)-1]:-i[(b=w)-1]),E=C*C;if(E>60)break;var O=.5*(2*e.normal.cdf(C,0,1,1,0))-.5*(2*e.normal.cdf(C,n,1,1,0));O>=t.exp(-30/p)&&(v+=O=a[b-1]*t.exp(-.5*E)*t.pow(O,p))}d+=v*=2*m*o/t.sqrt(2*t.PI),c=h,h+=f}return(u+=d)<=t.exp(-30/r)?0:(u=t.pow(u,r))>=1?1:u}!function(t){for(var n=0;n<t.length;n++)!function(t){e[t]=function(e,t,n){return this instanceof arguments.callee?(this._a=e,this._b=t,this._c=n,this):new arguments.callee(e,t,n)},e.fn[t]=function(n,r,o){var i=e[t](n,r,o);return i.data=this,i},e[t].prototype.sample=function(n){var r=this._a,o=this._b,i=this._c;return n?e.alter(n,function(){return e[t].sample(r,o,i)}):e[t].sample(r,o,i)},function(n){for(var r=0;r<n.length;r++)!function(n){e[t].prototype[n]=function(r){var o=this._a,i=this._b,a=this._c;return r||0===r||(r=this.data),"number"!=typeof r?e.fn.map.call(r,function(r){return e[t][n](r,o,i,a)}):e[t][n](r,o,i,a)}}(n[r])}("pdf cdf inv".split(" ")),function(n){for(var r=0;r<n.length;r++)!function(n){e[t].prototype[n]=function(){return e[t][n](this._a,this._b,this._c)}}(n[r])}("mean median mode variance".split(" "))}(t[n])}("beta centralF cauchy chisquare exponential gamma invgamma kumaraswamy laplace lognormal noncentralt normal pareto studentt weibull uniform binomial negbin hypgeom poisson triangular tukey arcsine".split(" ")),e.extend(e.beta,{pdf:function(n,r,o){return n>1||n<0?0:1==r&&1==o?1:r<512&&o<512?t.pow(n,r-1)*t.pow(1-n,o-1)/e.betafn(r,o):t.exp((r-1)*t.log(n)+(o-1)*t.log(1-n)-e.betaln(r,o))},cdf:function(t,n,r){return t>1||t<0?1*(t>1):e.ibeta(t,n,r)},inv:function(t,n,r){return e.ibetainv(t,n,r)},mean:function(e,t){return e/(e+t)},median:function(t,n){return e.ibetainv(.5,t,n)},mode:function(e,t){return(e-1)/(e+t-2)},sample:function(t,n){var r=e.randg(t);return r/(r+e.randg(n))},variance:function(e,n){return e*n/(t.pow(e+n,2)*(e+n+1))}}),e.extend(e.centralF,{pdf:function(n,r,o){var i;return n<0?0:r<=2?0===n&&r<2?1/0:0===n&&2===r?1:1/e.betafn(r/2,o/2)*t.pow(r/o,r/2)*t.pow(n,r/2-1)*t.pow(1+r/o*n,-(r+o)/2):(i=r*n/(o+n*r),r*(o/(o+n*r))/2*e.binomial.pdf((r-2)/2,(r+o-2)/2,i))},cdf:function(t,n,r){return t<0?0:e.ibeta(n*t/(n*t+r),n/2,r/2)},inv:function(t,n,r){return r/(n*(1/e.ibetainv(t,n/2,r/2)-1))},mean:function(e,t){return t>2?t/(t-2):void 0},mode:function(e,t){return e>2?t*(e-2)/(e*(t+2)):void 0},sample:function(t,n){return 2*e.randg(t/2)/t/(2*e.randg(n/2)/n)},variance:function(e,t){if(!(t<=4))return 2*t*t*(e+t-2)/(e*(t-2)*(t-2)*(t-4))}}),e.extend(e.cauchy,{pdf:function(e,n,r){return r<0?0:r/(t.pow(e-n,2)+t.pow(r,2))/t.PI},cdf:function(e,n,r){return t.atan((e-n)/r)/t.PI+.5},inv:function(e,n,r){return n+r*t.tan(t.PI*(e-.5))},median:function(e,t){return e},mode:function(e,t){return e},sample:function(n,r){return e.randn()*t.sqrt(1/(2*e.randg(.5)))*r+n}}),e.extend(e.chisquare,{pdf:function(n,r){return n<0?0:0===n&&2===r?.5:t.exp((r/2-1)*t.log(n)-n/2-r/2*t.log(2)-e.gammaln(r/2))},cdf:function(t,n){return t<0?0:e.lowRegGamma(n/2,t/2)},inv:function(t,n){return 2*e.gammapinv(t,.5*n)},mean:function(e){return e},median:function(e){return e*t.pow(1-2/(9*e),3)},mode:function(e){return e-2>0?e-2:0},sample:function(t){return 2*e.randg(t/2)},variance:function(e){return 2*e}}),e.extend(e.exponential,{pdf:function(e,n){return e<0?0:n*t.exp(-n*e)},cdf:function(e,n){return e<0?0:1-t.exp(-n*e)},inv:function(e,n){return-t.log(1-e)/n},mean:function(e){return 1/e},median:function(e){return 1/e*t.log(2)},mode:function(e){return 0},sample:function(e){return-1/e*t.log(t.random())},variance:function(e){return t.pow(e,-2)}}),e.extend(e.gamma,{pdf:function(n,r,o){return n<0?0:0===n&&1===r?1/o:t.exp((r-1)*t.log(n)-n/o-e.gammaln(r)-r*t.log(o))},cdf:function(t,n,r){return t<0?0:e.lowRegGamma(n,t/r)},inv:function(t,n,r){return e.gammapinv(t,n)*r},mean:function(e,t){return e*t},mode:function(e,t){if(e>1)return(e-1)*t},sample:function(t,n){return e.randg(t)*n},variance:function(e,t){return e*t*t}}),e.extend(e.invgamma,{pdf:function(n,r,o){return n<=0?0:t.exp(-(r+1)*t.log(n)-o/n-e.gammaln(r)+r*t.log(o))},cdf:function(t,n,r){return t<=0?0:1-e.lowRegGamma(n,r/t)},inv:function(t,n,r){return r/e.gammapinv(1-t,n)},mean:function(e,t){return e>1?t/(e-1):void 0},mode:function(e,t){return t/(e+1)},sample:function(t,n){return n/e.randg(t)},variance:function(e,t){if(!(e<=2))return t*t/((e-1)*(e-1)*(e-2))}}),e.extend(e.kumaraswamy,{pdf:function(e,n,r){return 0===e&&1===n?r:1===e&&1===r?n:t.exp(t.log(n)+t.log(r)+(n-1)*t.log(e)+(r-1)*t.log(1-t.pow(e,n)))},cdf:function(e,n,r){return e<0?0:e>1?1:1-t.pow(1-t.pow(e,n),r)},inv:function(e,n,r){return t.pow(1-t.pow(1-e,1/r),1/n)},mean:function(t,n){return n*e.gammafn(1+1/t)*e.gammafn(n)/e.gammafn(1+1/t+n)},median:function(e,n){return t.pow(1-t.pow(2,-1/n),1/e)},mode:function(e,n){if(e>=1&&n>=1&&1!==e&&1!==n)return t.pow((e-1)/(e*n-1),1/e)},variance:function(e,t){throw new Error("variance not yet implemented")}}),e.extend(e.lognormal,{pdf:function(e,n,r){return e<=0?0:t.exp(-t.log(e)-.5*t.log(2*t.PI)-t.log(r)-t.pow(t.log(e)-n,2)/(2*r*r))},cdf:function(n,r,o){return n<0?0:.5+.5*e.erf((t.log(n)-r)/t.sqrt(2*o*o))},inv:function(n,r,o){return t.exp(-1.4142135623730951*o*e.erfcinv(2*n)+r)},mean:function(e,n){return t.exp(e+n*n/2)},median:function(e,n){return t.exp(e)},mode:function(e,n){return t.exp(e-n*n)},sample:function(n,r){return t.exp(e.randn()*r+n)},variance:function(e,n){return(t.exp(n*n)-1)*t.exp(2*e+n*n)}}),e.extend(e.noncentralt,{pdf:function(n,r,o){return t.abs(o)<1e-14?e.studentt.pdf(n,r):t.abs(n)<1e-14?t.exp(e.gammaln((r+1)/2)-o*o/2-.5*t.log(t.PI*r)-e.gammaln(r/2)):r/n*(e.noncentralt.cdf(n*t.sqrt(1+2/r),r+2,o)-e.noncentralt.cdf(n,r,o))},cdf:function(n,r,o){if(t.abs(o)<1e-14)return e.studentt.cdf(n,r);var i=!1;n<0&&(i=!0,o=-o);for(var a=e.normal.cdf(-o,0,1),s=1e-14+1,l=s,u=n*n/(n*n+r),c=0,f=t.exp(-o*o/2),h=t.exp(-o*o/2-.5*t.log(2)-e.gammaln(1.5))*o;c<200||l>1e-14||s>1e-14;)l=s,c>0&&(f*=o*o/(2*c),h*=o*o/(2*(c+.5))),a+=.5*(s=f*e.beta.cdf(u,c+.5,r/2)+h*e.beta.cdf(u,c+1,r/2)),c++;return i?1-a:a}}),e.extend(e.normal,{pdf:function(e,n,r){return t.exp(-.5*t.log(2*t.PI)-t.log(r)-t.pow(e-n,2)/(2*r*r))},cdf:function(n,r,o){return.5*(1+e.erf((n-r)/t.sqrt(2*o*o)))},inv:function(t,n,r){return-1.4142135623730951*r*e.erfcinv(2*t)+n},mean:function(e,t){return e},median:function(e,t){return e},mode:function(e,t){return e},sample:function(t,n){return e.randn()*n+t},variance:function(e,t){return t*t}}),e.extend(e.pareto,{pdf:function(e,n,r){return e<n?0:r*t.pow(n,r)/t.pow(e,r+1)},cdf:function(e,n,r){return e<n?0:1-t.pow(n/e,r)},inv:function(e,n,r){return n/t.pow(1-e,1/r)},mean:function(e,n){if(!(n<=1))return n*t.pow(e,n)/(n-1)},median:function(e,n){return e*(n*t.SQRT2)},mode:function(e,t){return e},variance:function(e,n){if(!(n<=2))return e*e*n/(t.pow(n-1,2)*(n-2))}}),e.extend(e.studentt,{pdf:function(n,r){return r=r>1e100?1e100:r,1/(t.sqrt(r)*e.betafn(.5,r/2))*t.pow(1+n*n/r,-(r+1)/2)},cdf:function(n,r){var o=r/2;return e.ibeta((n+t.sqrt(n*n+r))/(2*t.sqrt(n*n+r)),o,o)},inv:function(n,r){var o=e.ibetainv(2*t.min(n,1-n),.5*r,.5);return o=t.sqrt(r*(1-o)/o),n>.5?o:-o},mean:function(e){return e>1?0:void 0},median:function(e){return 0},mode:function(e){return 0},sample:function(n){return e.randn()*t.sqrt(n/(2*e.randg(n/2)))},variance:function(e){return e>2?e/(e-2):e>1?1/0:void 0}}),e.extend(e.weibull,{pdf:function(e,n,r){return e<0||n<0||r<0?0:r/n*t.pow(e/n,r-1)*t.exp(-t.pow(e/n,r))},cdf:function(e,n,r){return e<0?0:1-t.exp(-t.pow(e/n,r))},inv:function(e,n,r){return n*t.pow(-t.log(1-e),1/r)},mean:function(t,n){return t*e.gammafn(1+1/n)},median:function(e,n){return e*t.pow(t.log(2),1/n)},mode:function(e,n){return n<=1?0:e*t.pow((n-1)/n,1/n)},sample:function(e,n){return e*t.pow(-t.log(t.random()),1/n)},variance:function(n,r){return n*n*e.gammafn(1+2/r)-t.pow(e.weibull.mean(n,r),2)}}),e.extend(e.uniform,{pdf:function(e,t,n){return e<t||e>n?0:1/(n-t)},cdf:function(e,t,n){return e<t?0:e<n?(e-t)/(n-t):1},inv:function(e,t,n){return t+e*(n-t)},mean:function(e,t){return.5*(e+t)},median:function(t,n){return e.mean(t,n)},mode:function(e,t){throw new Error("mode is not yet implemented")},sample:function(e,n){return e/2+n/2+(n/2-e/2)*(2*t.random()-1)},variance:function(e,n){return t.pow(n-e,2)/12}}),e.extend(e.binomial,{pdf:function(n,r,o){return 0===o||1===o?r*o===n?1:0:e.combination(r,n)*t.pow(o,n)*t.pow(1-o,r-n)},cdf:function(t,n,r){var o=[],i=0;if(t<0)return 0;if(t<n){for(;i<=t;i++)o[i]=e.binomial.pdf(i,n,r);return e.sum(o)}return 1}}),e.extend(e.negbin,{pdf:function(n,r,o){return n===n>>>0&&(n<0?0:e.combination(n+r-1,r-1)*t.pow(1-o,n)*t.pow(o,r))},cdf:function(t,n,r){var o=0,i=0;if(t<0)return 0;for(;i<=t;i++)o+=e.negbin.pdf(i,n,r);return o}}),e.extend(e.hypgeom,{pdf:function(n,r,o,i){if(n!=n|0)return!1;if(n<0||n<o-(r-i))return 0;if(n>i||n>o)return 0;if(2*o>r)return 2*i>r?e.hypgeom.pdf(r-o-i+n,r,r-o,r-i):e.hypgeom.pdf(i-n,r,r-o,i);if(2*i>r)return e.hypgeom.pdf(o-n,r,o,r-i);if(o<i)return e.hypgeom.pdf(n,r,i,o);for(var a=1,s=0,l=0;l<n;l++){for(;a>1&&s<i;)a*=1-o/(r-s),s++;a*=(i-l)*(o-l)/((l+1)*(r-o-i+l+1))}for(;s<i;s++)a*=1-o/(r-s);return t.min(1,t.max(0,a))},cdf:function(n,r,o,i){if(n<0||n<o-(r-i))return 0;if(n>=i||n>=o)return 1;if(2*o>r)return 2*i>r?e.hypgeom.cdf(r-o-i+n,r,r-o,r-i):1-e.hypgeom.cdf(i-n-1,r,r-o,i);if(2*i>r)return 1-e.hypgeom.cdf(o-n-1,r,o,r-i);if(o<i)return e.hypgeom.cdf(n,r,i,o);for(var a=1,s=1,l=0,u=0;u<n;u++){for(;a>1&&l<i;){var c=1-o/(r-l);s*=c,a*=c,l++}a+=s*=(i-u)*(o-u)/((u+1)*(r-o-i+u+1))}for(;l<i;l++)a*=1-o/(r-l);return t.min(1,t.max(0,a))}}),e.extend(e.poisson,{pdf:function(n,r){return r<0||n%1!=0||n<0?0:t.pow(r,n)*t.exp(-r)/e.factorial(n)},cdf:function(t,n){var r=[],o=0;if(t<0)return 0;for(;o<=t;o++)r.push(e.poisson.pdf(o,n));return e.sum(r)},mean:function(e){return e},variance:function(e){return e},sample:function(e){var n=1,r=0,o=t.exp(-e);do{r++,n*=t.random()}while(n>o);return r-1}}),e.extend(e.triangular,{pdf:function(e,t,n,r){return n<=t||r<t||r>n?NaN:e<t||e>n?0:e<r?2*(e-t)/((n-t)*(r-t)):e===r?2/(n-t):2*(n-e)/((n-t)*(n-r))},cdf:function(e,n,r,o){return r<=n||o<n||o>r?NaN:e<=n?0:e>=r?1:e<=o?t.pow(e-n,2)/((r-n)*(o-n)):1-t.pow(r-e,2)/((r-n)*(r-o))},inv:function(e,n,r,o){return r<=n||o<n||o>r?NaN:e<=(o-n)/(r-n)?n+(r-n)*t.sqrt(e*((o-n)/(r-n))):n+(r-n)*(1-t.sqrt((1-e)*(1-(o-n)/(r-n))))},mean:function(e,t,n){return(e+t+n)/3},median:function(e,n,r){return r<=(e+n)/2?n-t.sqrt((n-e)*(n-r))/t.sqrt(2):r>(e+n)/2?e+t.sqrt((n-e)*(r-e))/t.sqrt(2):void 0},mode:function(e,t,n){return n},sample:function(e,n,r){var o=t.random();return o<(r-e)/(n-e)?e+t.sqrt(o*(n-e)*(r-e)):n-t.sqrt((1-o)*(n-e)*(n-r))},variance:function(e,t,n){return(e*e+t*t+n*n-e*t-e*n-t*n)/18}}),e.extend(e.arcsine,{pdf:function(e,n,r){return r<=n?NaN:e<=n||e>=r?0:2/t.PI*t.pow(t.pow(r-n,2)-t.pow(2*e-n-r,2),-.5)},cdf:function(e,n,r){return e<n?0:e<r?2/t.PI*t.asin(t.sqrt((e-n)/(r-n))):1},inv:function(e,n,r){return n+(.5-.5*t.cos(t.PI*e))*(r-n)},mean:function(e,t){return t<=e?NaN:(e+t)/2},median:function(e,t){return t<=e?NaN:(e+t)/2},mode:function(e,t){throw new Error("mode is not yet implemented")},sample:function(n,r){return(n+r)/2+(r-n)/2*t.sin(2*t.PI*e.uniform.sample(0,1))},variance:function(e,n){return n<=e?NaN:t.pow(n-e,2)/8}}),e.extend(e.laplace,{pdf:function(e,n,r){return r<=0?0:t.exp(-t.abs(e-n)/r)/(2*r)},cdf:function(e,n,r){return r<=0?0:e<n?.5*t.exp((e-n)/r):1-.5*t.exp(-(e-n)/r)},mean:function(e,t){return e},median:function(e,t){return e},mode:function(e,t){return e},variance:function(e,t){return 2*t*t},sample:function(e,n){var r=t.random()-.5;return e-n*function(e){return e/t.abs(e)}(r)*t.log(1-2*t.abs(r))}}),e.extend(e.tukey,{cdf:function(r,o,i){var a=o,s=[.9894009349916499,.9445750230732326,.8656312023878318,.755404408355003,.6178762444026438,.45801677765722737,.2816035507792589,.09501250983763744],l=[.027152459411754096,.062253523938647894,.09515851168249279,.12462897125553388,.14959598881657674,.16915651939500254,.18260341504492358,.1894506104550685];if(r<=0)return 0;if(i<2||a<2)return NaN;if(!Number.isFinite(r))return 1;if(i>25e3)return n(r,1,a);var u,c=.5*i,f=c*t.log(i)-i*t.log(2)-e.gammaln(c),h=c-1,d=.25*i;u=i<=100?1:i<=800?.5:i<=5e3?.25:.125,f+=t.log(u);for(var p=0,g=1;g<=50;g++){for(var v=0,y=(2*g-1)*u,m=1;m<=16;m++){var w,b;if(8<m?(w=m-8-1,b=f+h*t.log(y+s[w]*u)-(s[w]*u+y)*d):(w=m-1,b=f+h*t.log(y-s[w]*u)+(s[w]*u-y)*d),b>=-30)v+=n(8<m?r*t.sqrt(.5*(s[w]*u+y)):r*t.sqrt(.5*(-s[w]*u+y)),1,a)*l[w]*t.exp(b)}if(g*u>=1&&v<=1e-14)break;p+=v}if(v>1e-14)throw new Error("tukey.cdf failed to converge");return p>1&&(p=1),p},inv:function(n,r,o){var i=r;if(o<2||i<2)return NaN;if(n<0||n>1)return NaN;if(0===n)return 0;if(1===n)return 1/0;var a,s=function(e,n,r){var o=.5-.5*e,i=t.sqrt(t.log(1/(o*o))),a=i+((((-453642210148e-16*i-.204231210125)*i-.342242088547)*i-1)*i+.322232421088)/((((.0038560700634*i+.10353775285)*i+.531103462366)*i+.588581570495)*i+.099348462606);r<120&&(a+=(a*a*a+a)/r/4);var s=.8832-.2368*a;return r<120&&(s+=-1.214/r+1.208*a/r),a*(s*t.log(n-1)+1.4142)}(n,i,o),l=e.tukey.cdf(s,r,o)-n;a=l>0?t.max(0,s-1):s+1;for(var u,c=e.tukey.cdf(a,r,o)-n,f=1;f<50;f++){if(u=a-c*(a-s)/(c-l),l=c,s=a,u<0&&(u=0,c=-n),c=e.tukey.cdf(u,r,o)-n,a=u,t.abs(a-s)<1e-4)return u}throw new Error("tukey.inv failed to converge")}})}(e,Math),function(e,t){var n=Array.prototype.push,o=e.utils.isArray;function a(t){return o(t)||t instanceof e}e.extend({add:function(t,n){return a(n)?(a(n[0])||(n=[n]),e.map(t,function(e,t,r){return e+n[t][r]})):e.map(t,function(e){return e+n})},subtract:function(t,n){return a(n)?(a(n[0])||(n=[n]),e.map(t,function(e,t,r){return e-n[t][r]||0})):e.map(t,function(e){return e-n})},divide:function(t,n){return a(n)?(a(n[0])||(n=[n]),e.multiply(t,e.inv(n))):e.map(t,function(e){return e/n})},multiply:function(t,n){var r,o,i,s,l,u,c,f;if(void 0===t.length&&void 0===n.length)return t*n;if(l=t.length,u=t[0].length,c=e.zeros(l,i=a(n)?n[0].length:u),f=0,a(n)){for(;f<i;f++)for(r=0;r<l;r++){for(s=0,o=0;o<u;o++)s+=t[r][o]*n[o][f];c[r][f]=s}return 1===l&&1===f?c[0][0]:c}return e.map(t,function(e){return e*n})},outer:function(t,n){return e.multiply(t.map(function(e){return[e]}),[n])},dot:function(t,n){a(t[0])||(t=[t]),a(n[0])||(n=[n]);for(var r,o,i=1===t[0].length&&1!==t.length?e.transpose(t):t,s=1===n[0].length&&1!==n.length?e.transpose(n):n,l=[],u=0,c=i.length,f=i[0].length;u<c;u++){for(l[u]=[],r=0,o=0;o<f;o++)r+=i[u][o]*s[u][o];l[u]=r}return 1===l.length?l[0]:l},pow:function(n,r){return e.map(n,function(e){return t.pow(e,r)})},exp:function(n){return e.map(n,function(e){return t.exp(e)})},log:function(n){return e.map(n,function(e){return t.log(e)})},abs:function(n){return e.map(n,function(e){return t.abs(e)})},norm:function(e,n){var r=0,o=0;for(isNaN(n)&&(n=2),a(e[0])&&(e=e[0]);o<e.length;o++)r+=t.pow(t.abs(e[o]),n);return t.pow(r,1/n)},angle:function(n,r){return t.acos(e.dot(n,r)/(e.norm(n)*e.norm(r)))},aug:function(e,t){for(var r=[],o=0;o<e.length;o++)r.push(e[o].slice());for(o=0;o<r.length;o++)n.apply(r[o],t[o]);return r},inv:function(t){for(var n,r=t.length,o=t[0].length,i=e.identity(r,o),a=e.gauss_jordan(t,i),s=[],l=0;l<r;l++)for(s[l]=[],n=o;n<a[0].length;n++)s[l][n-o]=a[l][n];return s},det:function(e){var t,n=e.length,r=2*n,o=new Array(r),i=n-1,a=r-1,s=i-n+1,l=a,u=0,c=0;if(2===n)return e[0][0]*e[1][1]-e[0][1]*e[1][0];for(;u<r;u++)o[u]=1;for(u=0;u<n;u++){for(t=0;t<n;t++)o[s<0?s+n:s]*=e[u][t],o[l<n?l+n:l]*=e[u][t],s++,l--;s=--i-n+1,l=--a}for(u=0;u<n;u++)c+=o[u];for(;u<r;u++)c-=o[u];return c},gauss_elimination:function(n,r){var o,i,a,s,l=0,u=0,c=n.length,f=n[0].length,h=1,d=0,p=[];o=(n=e.aug(n,r))[0].length;for(l=0;l<c;l++){for(i=n[l][l],u=l,s=l+1;s<f;s++)i<t.abs(n[s][l])&&(i=n[s][l],u=s);if(u!=l)for(s=0;s<o;s++)a=n[l][s],n[l][s]=n[u][s],n[u][s]=a;for(u=l+1;u<c;u++)for(h=n[u][l]/n[l][l],s=l;s<o;s++)n[u][s]=n[u][s]-h*n[l][s]}for(l=c-1;l>=0;l--){for(d=0,u=l+1;u<=c-1;u++)d+=p[u]*n[l][u];p[l]=(n[l][o-1]-d)/n[l][l]}return p},gauss_jordan:function(n,r){for(var o=e.aug(n,r),i=o.length,a=o[0].length,s=0,l=0;l<i;l++){for(var u=l,c=l+1;c<i;c++)t.abs(o[c][l])>t.abs(o[u][l])&&(u=c);var f=o[l];o[l]=o[u],o[u]=f;for(c=l+1;c<i;c++){s=o[c][l]/o[l][l];for(var h=l;h<a;h++)o[c][h]-=o[l][h]*s}}for(l=i-1;l>=0;l--){s=o[l][l];for(c=0;c<l;c++)for(h=a-1;h>l-1;h--)o[c][h]-=o[l][h]*o[c][l]/s;o[l][l]/=s;for(h=i;h<a;h++)o[l][h]/=s}return o},triaUpSolve:function(t,n){var r,o=t[0].length,i=e.zeros(1,o)[0],a=!1;return void 0!=n[0].length&&(n=n.map(function(e){return e[0]}),a=!0),e.arange(o-1,-1,-1).forEach(function(a){r=e.arange(a+1,o).map(function(e){return i[e]*t[a][e]}),i[a]=(n[a]-e.sum(r))/t[a][a]}),a?i.map(function(e){return[e]}):i},triaLowSolve:function(t,n){var r,o=t[0].length,i=e.zeros(1,o)[0],a=!1;return void 0!=n[0].length&&(n=n.map(function(e){return e[0]}),a=!0),e.arange(o).forEach(function(o){r=e.arange(o).map(function(e){return t[o][e]*i[e]}),i[o]=(n[o]-e.sum(r))/t[o][o]}),a?i.map(function(e){return[e]}):i},lu:function(t){var n,r=t.length,o=e.identity(r),a=e.zeros(t.length,t[0].length);return e.arange(r).forEach(function(e){a[0][e]=t[0][e]}),e.arange(1,r).forEach(function(s){e.arange(s).forEach(function(r){n=e.arange(r).map(function(e){return o[s][e]*a[e][r]}),o[s][r]=(t[s][r]-e.sum(n))/a[r][r]}),e.arange(s,r).forEach(function(r){n=e.arange(s).map(function(e){return o[s][e]*a[e][r]}),a[s][r]=t[i][r]-e.sum(n)})}),[o,a]},cholesky:function(n){var r,o=n.length,i=e.zeros(n.length,n[0].length);return e.arange(o).forEach(function(a){r=e.arange(a).map(function(e){return t.pow(i[a][e],2)}),i[a][a]=t.sqrt(n[a][a]-e.sum(r)),e.arange(a+1,o).forEach(function(t){r=e.arange(a).map(function(e){return i[a][e]*i[t][e]}),i[t][a]=(n[a][t]-e.sum(r))/i[a][a]})}),i},gauss_jacobi:function(n,r,o,i){for(var a,s,l,u,c=0,f=0,h=n.length,d=[],p=[],g=[];c<h;c++)for(d[c]=[],p[c]=[],g[c]=[],f=0;f<h;f++)c>f?(d[c][f]=n[c][f],p[c][f]=g[c][f]=0):c<f?(p[c][f]=n[c][f],d[c][f]=g[c][f]=0):(g[c][f]=n[c][f],d[c][f]=p[c][f]=0);for(l=e.multiply(e.multiply(e.inv(g),e.add(d,p)),-1),s=e.multiply(e.inv(g),r),a=o,u=e.add(e.multiply(l,o),s),c=2;t.abs(e.norm(e.subtract(u,a)))>i;)a=u,u=e.add(e.multiply(l,a),s),c++;return u},gauss_seidel:function(n,r,o,i){for(var a,s,l,u,c,f=0,h=n.length,d=[],p=[],g=[];f<h;f++)for(d[f]=[],p[f]=[],g[f]=[],a=0;a<h;a++)f>a?(d[f][a]=n[f][a],p[f][a]=g[f][a]=0):f<a?(p[f][a]=n[f][a],d[f][a]=g[f][a]=0):(g[f][a]=n[f][a],d[f][a]=p[f][a]=0);for(u=e.multiply(e.multiply(e.inv(e.add(g,d)),p),-1),l=e.multiply(e.inv(e.add(g,d)),r),s=o,c=e.add(e.multiply(u,o),l),f=2;t.abs(e.norm(e.subtract(c,s)))>i;)s=c,c=e.add(e.multiply(u,s),l),f+=1;return c},SOR:function(n,r,o,i,a){for(var s,l,u,c,f,h=0,d=n.length,p=[],g=[],v=[];h<d;h++)for(p[h]=[],g[h]=[],v[h]=[],s=0;s<d;s++)h>s?(p[h][s]=n[h][s],g[h][s]=v[h][s]=0):h<s?(g[h][s]=n[h][s],p[h][s]=v[h][s]=0):(v[h][s]=n[h][s],p[h][s]=g[h][s]=0);for(c=e.multiply(e.inv(e.add(v,e.multiply(p,a))),e.subtract(e.multiply(v,1-a),e.multiply(g,a))),u=e.multiply(e.multiply(e.inv(e.add(v,e.multiply(p,a))),r),a),l=o,f=e.add(e.multiply(c,o),u),h=2;t.abs(e.norm(e.subtract(f,l)))>i;)l=f,f=e.add(e.multiply(c,l),u),h++;return f},householder:function(n){for(var r,o,i,a,s=n.length,l=n[0].length,u=0,c=[],f=[];u<s-1;u++){for(r=0,a=u+1;a<l;a++)r+=n[a][u]*n[a][u];for(r=(n[u+1][u]>0?-1:1)*t.sqrt(r),o=t.sqrt((r*r-n[u+1][u]*r)/2),(c=e.zeros(s,1))[u+1][0]=(n[u+1][u]-r)/(2*o),i=u+2;i<s;i++)c[i][0]=n[i][u]/(2*o);f=e.subtract(e.identity(s,l),e.multiply(e.multiply(c,e.transpose(c)),2)),n=e.multiply(f,e.multiply(n,f))}return n},QR:function(){var n=e.sum,o=e.arange;return function(i){var a,s,l,u=i.length,c=i[0].length;for(i=e.copy(i),r=e.zeros(c,c),s=0;s<c;s++){for(r[s][s]=t.sqrt(n(o(u).map(function(e){return i[e][s]*i[e][s]}))),a=0;a<u;a++)i[a][s]=i[a][s]/r[s][s];for(l=s+1;l<c;l++)for(r[s][l]=n(o(u).map(function(e){return i[e][s]*i[e][l]})),a=0;a<u;a++)i[a][l]=i[a][l]-i[a][s]*r[s][l]}return[i,r]}}(),lstsq:function(t,n){return function(t,n){var r=!1;void 0===n[0].length&&(n=n.map(function(e){return[e]}),r=!0);var o=e.QR(t),i=o[0],a=o[1],s=t[0].length,l=e.slice(i,{col:{end:s}}),u=function(t){var n=(t=e.copy(t)).length,r=e.identity(n);return e.arange(n-1,-1,-1).forEach(function(n){e.sliceAssign(r,{row:n},e.divide(e.slice(r,{row:n}),t[n][n])),e.sliceAssign(t,{row:n},e.divide(e.slice(t,{row:n}),t[n][n])),e.arange(n).forEach(function(o){var i=e.multiply(t[o][n],-1),a=e.slice(t,{row:o}),s=e.multiply(e.slice(t,{row:n}),i);e.sliceAssign(t,{row:o},e.add(a,s));var l=e.slice(r,{row:o}),u=e.multiply(e.slice(r,{row:n}),i);e.sliceAssign(r,{row:o},e.add(l,u))})}),r}(e.slice(a,{row:{end:s}})),c=e.transpose(l);void 0===c[0].length&&(c=[c]);var f=e.multiply(e.multiply(u,c),n);return void 0===f.length&&(f=[[f]]),r?f.map(function(e){return e[0]}):f}}(),jacobi:function(n){for(var r,o,i,a,s,l,u=1,c=n.length,f=e.identity(c,c),h=[];1===u;){0,a=n[0][1],o=0,i=1;for(var d=0;d<c;d++)for(r=0;r<c;r++)d!=r&&a<t.abs(n[d][r])&&(a=t.abs(n[d][r]),o=d,i=r);s=n[o][o]===n[i][i]?n[o][i]>0?t.PI/4:-t.PI/4:t.atan(2*n[o][i]/(n[o][o]-n[i][i]))/2,(l=e.identity(c,c))[o][o]=t.cos(s),l[o][i]=-t.sin(s),l[i][o]=t.sin(s),l[i][i]=t.cos(s),f=e.multiply(f,l),n=e.multiply(e.multiply(e.inv(l),n),l),u=0;for(d=1;d<c;d++)for(r=1;r<c;r++)d!=r&&t.abs(n[d][r])>.001&&(u=1)}for(d=0;d<c;d++)h.push(n[d][d]);return[f,h]},rungekutta:function(e,t,n,r,o,i){var a,s,l;if(2===i)for(;r<=n;)o=o+((a=t*e(r,o))+(s=t*e(r+t,o+a)))/2,r+=t;if(4===i)for(;r<=n;)o=o+((a=t*e(r,o))+2*(s=t*e(r+t/2,o+a/2))+2*(l=t*e(r+t/2,o+s/2))+t*e(r+t,o+l))/6,r+=t;return o},romberg:function(e,n,r,o){for(var i,a,s,l,u,c=0,f=(r-n)/2,h=[],d=[],p=[];c<o/2;){for(u=e(n),s=n,l=0;s<=r;s+=f,l++)h[l]=s;for(i=h.length,s=1;s<i-1;s++)u+=(s%2!=0?4:2)*e(h[s]);u=f/3*(u+e(r)),p[c]=u,f/=2,c++}for(a=p.length,i=1;1!==a;){for(s=0;s<a-1;s++)d[s]=(t.pow(4,i)*p[s+1]-p[s])/(t.pow(4,i)-1);a=d.length,p=d,d=[],i++}return p},richardson:function(e,n,r,o){function i(e,t){for(var n,r=0,o=e.length;r<o;r++)e[r]===t&&(n=r);return n}e.length;for(var a,s,l,u,c,f=t.abs(r-e[i(e,r)+1]),h=0,d=[],p=[];o>=f;)a=i(e,r+o),s=i(e,r),d[h]=(n[a]-2*n[s]+n[2*s-a])/(o*o),o/=2,h++;for(u=d.length,l=1;1!=u;){for(c=0;c<u-1;c++)p[c]=(t.pow(4,l)*d[c+1]-d[c])/(t.pow(4,l)-1);u=p.length,d=p,p=[],l++}return d},simpson:function(e,t,n,r){for(var o,i=(n-t)/r,a=e(t),s=[],l=t,u=0,c=1;l<=n;l+=i,u++)s[u]=l;for(o=s.length;c<o-1;c++)a+=(c%2!=0?4:2)*e(s[c]);return i/3*(a+e(n))},hermite:function(e,t,n,r){for(var o,i=e.length,a=0,s=0,l=[],u=[],c=[],f=[];s<i;s++){for(l[s]=1,o=0;o<i;o++)s!=o&&(l[s]*=(r-e[o])/(e[s]-e[o]));for(u[s]=0,o=0;o<i;o++)s!=o&&(u[s]+=1/(e[s]-e[o]));c[s]=(1-2*(r-e[s])*u[s])*(l[s]*l[s]),f[s]=(r-e[s])*(l[s]*l[s]),a+=c[s]*t[s]+f[s]*n[s]}return a},lagrange:function(e,t,n){for(var r,o,i=0,a=0,s=e.length;a<s;a++){for(o=t[a],r=0;r<s;r++)a!=r&&(o*=(n-e[r])/(e[a]-e[r]));i+=o}return i},cubic_spline:function(t,n,r){for(var o,i,a=t.length,s=0,l=[],u=[],c=[],f=[],h=[],d=[];s<a-1;s++)f[s]=t[s+1]-t[s];c[0]=0;for(s=1;s<a-1;s++)c[s]=3/f[s]*(n[s+1]-n[s])-3/f[s-1]*(n[s]-n[s-1]);for(s=1;s<a-1;s++)l[s]=[],u[s]=[],l[s][s-1]=f[s-1],l[s][s]=2*(f[s-1]+f[s]),l[s][s+1]=f[s],u[s][0]=c[s];for(i=e.multiply(e.inv(l),u),o=0;o<a-1;o++)h[o]=(n[o+1]-n[o])/f[o]-f[o]*(i[o+1][0]+2*i[o][0])/3,d[o]=(i[o+1][0]-i[o][0])/(3*f[o]);for(o=0;o<a&&!(t[o]>r);o++);return n[o-=1]+(r-t[o])*h[o]+e.sq(r-t[o])*i[o]+(r-t[o])*e.sq(r-t[o])*d[o]},gauss_quadrature:function(){throw new Error("gauss_quadrature not yet implemented")},PCA:function(t){var n,r,o,i,a,s=t.length,l=t[0].length,u=0,c=[],f=[],h=[],d=[],p=[],g=[],v=[];for(u=0;u<s;u++)c[u]=e.sum(t[u])/l;for(u=0;u<l;u++)for(p[u]=[],n=0;n<s;n++)p[u][n]=t[n][u]-c[n];p=e.transpose(p);for(u=0;u<s;u++)for(g[u]=[],n=0;n<s;n++)g[u][n]=e.dot([p[u]],[p[n]])/(l-1);a=(o=e.jacobi(g))[0],f=o[1],v=e.transpose(a);for(u=0;u<f.length;u++)for(n=u;n<f.length;n++)f[u]<f[n]&&(r=f[u],f[u]=f[n],f[n]=r,h=v[u],v[u]=v[n],v[n]=h);i=e.transpose(p);for(u=0;u<s;u++)for(d[u]=[],n=0;n<i.length;n++)d[u][n]=e.dot([v[u]],[i[n]]);return[t,f,v,d]}}),function(t){for(var n=0;n<t.length;n++)!function(t){e.fn[t]=function(n,r){var o=this;return r?(setTimeout(function(){r.call(o,e.fn[t].call(o,n))},15),this):"number"==typeof e[t](this,n)?e[t](this,n):e(e[t](this,n))}}(t[n])}("add divide multiply subtract dot pow exp log abs norm angle".split(" "))}(e,Math),function(e,t){var n=[].slice,r=e.utils.isNumber,o=e.utils.isArray;function i(e,n,r,o){if(e>1||r>1||e<=0||r<=0)throw new Error("Proportions should be greater than 0 and less than 1");var i=(e*n+r*o)/(n+o);return(e-r)/t.sqrt(i*(1-i)*(1/n+1/o))}e.extend({zscore:function(){var t=n.call(arguments);return r(t[1])?(t[0]-t[1])/t[2]:(t[0]-e.mean(t[1]))/e.stdev(t[1],t[2])},ztest:function(){var r,i=n.call(arguments);return o(i[1])?(r=e.zscore(i[0],i[1],i[3]),1===i[2]?e.normal.cdf(-t.abs(r),0,1):2*e.normal.cdf(-t.abs(r),0,1)):i.length>2?(r=e.zscore(i[0],i[1],i[2]),1===i[3]?e.normal.cdf(-t.abs(r),0,1):2*e.normal.cdf(-t.abs(r),0,1)):(r=i[0],1===i[1]?e.normal.cdf(-t.abs(r),0,1):2*e.normal.cdf(-t.abs(r),0,1))}}),e.extend(e.fn,{zscore:function(e,t){return(e-this.mean())/this.stdev(t)},ztest:function(n,r,o){var i=t.abs(this.zscore(n,o));return 1===r?e.normal.cdf(-i,0,1):2*e.normal.cdf(-i,0,1)}}),e.extend({tscore:function(){var r=n.call(arguments);return 4===r.length?(r[0]-r[1])/(r[2]/t.sqrt(r[3])):(r[0]-e.mean(r[1]))/(e.stdev(r[1],!0)/t.sqrt(r[1].length))},ttest:function(){var o,i=n.call(arguments);return 5===i.length?(o=t.abs(e.tscore(i[0],i[1],i[2],i[3])),1===i[4]?e.studentt.cdf(-o,i[3]-1):2*e.studentt.cdf(-o,i[3]-1)):r(i[1])?(o=t.abs(i[0]),1==i[2]?e.studentt.cdf(-o,i[1]-1):2*e.studentt.cdf(-o,i[1]-1)):(o=t.abs(e.tscore(i[0],i[1])),1==i[2]?e.studentt.cdf(-o,i[1].length-1):2*e.studentt.cdf(-o,i[1].length-1))}}),e.extend(e.fn,{tscore:function(e){return(e-this.mean())/(this.stdev(!0)/t.sqrt(this.cols()))},ttest:function(n,r){return 1===r?1-e.studentt.cdf(t.abs(this.tscore(n)),this.cols()-1):2*e.studentt.cdf(-t.abs(this.tscore(n)),this.cols()-1)}}),e.extend({anovafscore:function(){var r,o,i,a,s,l,u,c=n.call(arguments);if(1===c.length){s=new Array(c[0].length);for(var f=0;f<c[0].length;f++)s[f]=c[0][f];c=s}if(2===c.length)return e.variance(c[0])/e.variance(c[1]);o=new Array;for(f=0;f<c.length;f++)o=o.concat(c[f]);i=e.mean(o),r=0;for(f=0;f<c.length;f++)r+=c[f].length*t.pow(e.mean(c[f])-i,2);r/=c.length-1,l=0;for(f=0;f<c.length;f++)for(a=e.mean(c[f]),u=0;u<c[f].length;u++)l+=t.pow(c[f][u]-a,2);return r/(l/=o.length-c.length)},anovaftest:function(){var t,o,i,a=n.call(arguments);if(r(a[0]))return 1-e.centralF.cdf(a[0],a[1],a[2]);anovafscore=e.anovafscore(a),t=a.length-1,i=0;for(var s=0;s<a.length;s++)i+=a[s].length;return o=i-t-1,1-e.centralF.cdf(anovafscore,t,o)},ftest:function(t,n,r){return 1-e.centralF.cdf(t,n,r)}}),e.extend(e.fn,{anovafscore:function(){return e.anovafscore(this.toArray())},anovaftes:function(){for(var t=0,n=0;n<this.length;n++)t+=this[n].length;return e.ftest(this.anovafscore(),this.length-1,t-this.length)}}),e.extend({qscore:function(){var o,i,a,s,l,u=n.call(arguments);return r(u[0])?(o=u[0],i=u[1],a=u[2],s=u[3],l=u[4]):(o=e.mean(u[0]),i=e.mean(u[1]),a=u[0].length,s=u[1].length,l=u[2]),t.abs(o-i)/(l*t.sqrt((1/a+1/s)/2))},qtest:function(){var t,r=n.call(arguments);3===r.length?(t=r[0],r=r.slice(1)):7===r.length?(t=e.qscore(r[0],r[1],r[2],r[3],r[4]),r=r.slice(5)):(t=e.qscore(r[0],r[1],r[2]),r=r.slice(3));var o=r[0],i=r[1];return 1-e.tukey.cdf(t,i,o-i)},tukeyhsd:function(t){for(var n=e.pooledstdev(t),r=t.map(function(t){return e.mean(t)}),o=t.reduce(function(e,t){return e+t.length},0),i=[],a=0;a<t.length;++a)for(var s=a+1;s<t.length;++s){var l=e.qtest(r[a],r[s],t[a].length,t[s].length,n,o,t.length);i.push([[a,s],l])}return i}}),e.extend({normalci:function(){var r,o=n.call(arguments),i=new Array(2);return r=4===o.length?t.abs(e.normal.inv(o[1]/2,0,1)*o[2]/t.sqrt(o[3])):t.abs(e.normal.inv(o[1]/2,0,1)*e.stdev(o[2])/t.sqrt(o[2].length)),i[0]=o[0]-r,i[1]=o[0]+r,i},tci:function(){var r,o=n.call(arguments),i=new Array(2);return r=4===o.length?t.abs(e.studentt.inv(o[1]/2,o[3]-1)*o[2]/t.sqrt(o[3])):t.abs(e.studentt.inv(o[1]/2,o[2].length-1)*e.stdev(o[2],!0)/t.sqrt(o[2].length)),i[0]=o[0]-r,i[1]=o[0]+r,i},significant:function(e,t){return e<t}}),e.extend(e.fn,{normalci:function(t,n){return e.normalci(t,n,this.toArray())},tci:function(t,n){return e.tci(t,n,this.toArray())}}),e.extend(e.fn,{oneSidedDifferenceOfProportions:function(t,n,r,o){var a=i(t,n,r,o);return e.ztest(a,1)},twoSidedDifferenceOfProportions:function(t,n,r,o){var a=i(t,n,r,o);return e.ztest(a,2)}})}(e,Math),e.models=function(){function t(t,n){var r=t.length,o=n[0].length-1,i=r-o-1,a=e.lstsq(n,t),s=e.multiply(n,a.map(function(e){return[e]})).map(function(e){return e[0]}),l=e.subtract(t,s),u=e.mean(t),c=e.sum(s.map(function(e){return Math.pow(e-u,2)})),f=e.sum(t.map(function(e,t){return Math.pow(e-s[t],2)})),h=c+f;return{exog:n,endog:t,nobs:r,df_model:o,df_resid:i,coef:a,predict:s,resid:l,ybar:u,SST:h,SSE:c,SSR:f,R2:c/h}}function n(n){var r=function(n){var r=n[0].length;return e.arange(r).map(function(o){var i=e.arange(r).filter(function(e){return e!==o});return t(e.col(n,o).map(function(e){return e[0]}),e.col(n,i))})}(n.exog),o=Math.sqrt(n.SSR/n.df_resid),i=r.map(function(e){var t=e.SST,n=e.R2;return o/Math.sqrt(t*(1-n))}),a=n.coef.map(function(e,t){return(e-0)/i[t]}),s=a.map(function(t){var r=e.studentt.cdf(t,n.df_resid);return 2*(r>.5?1-r:r)}),l=e.studentt.inv(.975,n.df_resid),u=n.coef.map(function(e,t){var n=l*i[t];return[e-n,e+n]});return{se:i,t:a,p:s,sigmaHat:o,interval95:u}}return{ols:function(r,o){var i=t(r,o),a=n(i),s=function(t){var n=t.R2/t.df_model/((1-t.R2)/t.df_resid);return{F_statistic:n,pvalue:1-function(t,n,r){return e.beta.cdf(t/(r/n+t),n/2,r/2)}(n,t.df_model,t.df_resid)}}(i),l=1-(1-i.R2)*((i.nobs-1)/i.df_resid);return i.t=a,i.f=s,i.adjust_R2=l,i}}}(),e.jStat=e,e})},function(e,t,n){var r=n(1),o=n(9),i=n(0);t.UNIQUE=function(){for(var e=[],t=0;t<arguments.length;++t){for(var n=!1,r=arguments[t],o=0;o<e.length&&!(n=e[o]===r);++o);n||e.push(r)}return e},t.FLATTEN=r.flatten,t.ARGS2ARRAY=function(){return Array.prototype.slice.call(arguments,0)},t.REFERENCE=function(e,t){if(!arguments.length)return i.error;try{for(var n=t.split("."),r=e,o=0;o<n.length;++o){var a=n[o];if("]"===a[a.length-1]){var s=a.indexOf("["),l=a.substring(s+1,a.length-1);r=r[a.substring(0,s)][l]}else r=r[a]}return r}catch(e){}},t.JOIN=function(e,t){return e.join(t)},t.NUMBERS=function(){return r.flatten(arguments).filter(function(e){return"number"==typeof e})},t.NUMERAL=function(e,t){return o(e).format(t)}},function(e,t,n){var r=n(0),o=n(11).jStat,i=n(6),a=n(1),s=n(28);function l(e){return/^[01]{1,10}$/.test(e)}t.BESSELI=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:s.besseli(e,t)},t.BESSELJ=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:s.besselj(e,t)},t.BESSELK=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:s.besselk(e,t)},t.BESSELY=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:s.bessely(e,t)},t.BIN2DEC=function(e){if(!l(e))return r.num;var t=parseInt(e,2),n=e.toString();return 10===n.length&&"1"===n.substring(0,1)?parseInt(n.substring(1),2)-512:t},t.BIN2HEX=function(e,t){if(!l(e))return r.num;var n=e.toString();if(10===n.length&&"1"===n.substring(0,1))return(0xfffffffe00+parseInt(n.substring(1),2)).toString(16);var o=parseInt(e,2).toString(16);return void 0===t?o:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=o.length?i.REPT("0",t-o.length)+o:r.num},t.BIN2OCT=function(e,t){if(!l(e))return r.num;var n=e.toString();if(10===n.length&&"1"===n.substring(0,1))return(1073741312+parseInt(n.substring(1),2)).toString(8);var o=parseInt(e,2).toString(8);return void 0===t?o:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=o.length?i.REPT("0",t-o.length)+o:r.num},t.BITAND=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e<0||t<0?r.num:Math.floor(e)!==e||Math.floor(t)!==t?r.num:e>0xffffffffffff||t>0xffffffffffff?r.num:e&t},t.BITLSHIFT=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e<0?r.num:Math.floor(e)!==e?r.num:e>0xffffffffffff?r.num:Math.abs(t)>53?r.num:t>=0?e<<t:e>>-t},t.BITOR=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e<0||t<0?r.num:Math.floor(e)!==e||Math.floor(t)!==t?r.num:e>0xffffffffffff||t>0xffffffffffff?r.num:e|t},t.BITRSHIFT=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e<0?r.num:Math.floor(e)!==e?r.num:e>0xffffffffffff?r.num:Math.abs(t)>53?r.num:t>=0?e>>t:e<<-t},t.BITXOR=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e<0||t<0?r.num:Math.floor(e)!==e||Math.floor(t)!==t?r.num:e>0xffffffffffff||t>0xffffffffffff?r.num:e^t},t.COMPLEX=function(e,t,n){if(e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t))return e;if("i"!==(n=void 0===n?"i":n)&&"j"!==n)return r.value;if(0===e&&0===t)return 0;if(0===e)return 1===t?n:t.toString()+n;if(0===t)return e.toString();var o=t>0?"+":"";return e.toString()+o+(1===t?n:t.toString()+n)},t.CONVERT=function(e,t,n){if((e=a.parseNumber(e))instanceof Error)return e;for(var o,i=[["a.u. of action","?",null,"action",!1,!1,1.05457168181818e-34],["a.u. of charge","e",null,"electric_charge",!1,!1,1.60217653141414e-19],["a.u. of energy","Eh",null,"energy",!1,!1,4.35974417757576e-18],["a.u. of length","a?",null,"length",!1,!1,5.29177210818182e-11],["a.u. of mass","m?",null,"mass",!1,!1,9.10938261616162e-31],["a.u. of time","?/Eh",null,"time",!1,!1,2.41888432650516e-17],["admiralty knot","admkn",null,"speed",!1,!0,.514773333],["ampere","A",null,"electric_current",!0,!1,1],["ampere per meter","A/m",null,"magnetic_field_intensity",!0,!1,1],["ångström","Å",["ang"],"length",!1,!0,1e-10],["are","ar",null,"area",!1,!0,100],["astronomical unit","ua",null,"length",!1,!1,1.49597870691667e-11],["bar","bar",null,"pressure",!1,!1,1e5],["barn","b",null,"area",!1,!1,1e-28],["becquerel","Bq",null,"radioactivity",!0,!1,1],["bit","bit",["b"],"information",!1,!0,1],["btu","BTU",["btu"],"energy",!1,!0,1055.05585262],["byte","byte",null,"information",!1,!0,8],["candela","cd",null,"luminous_intensity",!0,!1,1],["candela per square metre","cd/m?",null,"luminance",!0,!1,1],["coulomb","C",null,"electric_charge",!0,!1,1],["cubic ångström","ang3",["ang^3"],"volume",!1,!0,1e-30],["cubic foot","ft3",["ft^3"],"volume",!1,!0,.028316846592],["cubic inch","in3",["in^3"],"volume",!1,!0,16387064e-12],["cubic light-year","ly3",["ly^3"],"volume",!1,!0,8.46786664623715e-47],["cubic metre","m?",null,"volume",!0,!0,1],["cubic mile","mi3",["mi^3"],"volume",!1,!0,4168181825.44058],["cubic nautical mile","Nmi3",["Nmi^3"],"volume",!1,!0,6352182208],["cubic Pica","Pica3",["Picapt3","Pica^3","Picapt^3"],"volume",!1,!0,7.58660370370369e-8],["cubic yard","yd3",["yd^3"],"volume",!1,!0,.764554857984],["cup","cup",null,"volume",!1,!0,.0002365882365],["dalton","Da",["u"],"mass",!1,!1,1.66053886282828e-27],["day","d",["day"],"time",!1,!0,86400],["degree","°",null,"angle",!1,!1,.0174532925199433],["degrees Rankine","Rank",null,"temperature",!1,!0,.555555555555556],["dyne","dyn",["dy"],"force",!1,!0,1e-5],["electronvolt","eV",["ev"],"energy",!1,!0,1.60217656514141],["ell","ell",null,"length",!1,!0,1.143],["erg","erg",["e"],"energy",!1,!0,1e-7],["farad","F",null,"electric_capacitance",!0,!1,1],["fluid ounce","oz",null,"volume",!1,!0,295735295625e-16],["foot","ft",null,"length",!1,!0,.3048],["foot-pound","flb",null,"energy",!1,!0,1.3558179483314],["gal","Gal",null,"acceleration",!1,!1,.01],["gallon","gal",null,"volume",!1,!0,.003785411784],["gauss","G",["ga"],"magnetic_flux_density",!1,!0,1],["grain","grain",null,"mass",!1,!0,647989e-10],["gram","g",null,"mass",!1,!0,.001],["gray","Gy",null,"absorbed_dose",!0,!1,1],["gross registered ton","GRT",["regton"],"volume",!1,!0,2.8316846592],["hectare","ha",null,"area",!1,!0,1e4],["henry","H",null,"inductance",!0,!1,1],["hertz","Hz",null,"frequency",!0,!1,1],["horsepower","HP",["h"],"power",!1,!0,745.69987158227],["horsepower-hour","HPh",["hh","hph"],"energy",!1,!0,2684519.538],["hour","h",["hr"],"time",!1,!0,3600],["imperial gallon (U.K.)","uk_gal",null,"volume",!1,!0,.00454609],["imperial hundredweight","lcwt",["uk_cwt","hweight"],"mass",!1,!0,50.802345],["imperial quart (U.K)","uk_qt",null,"volume",!1,!0,.0011365225],["imperial ton","brton",["uk_ton","LTON"],"mass",!1,!0,1016.046909],["inch","in",null,"length",!1,!0,.0254],["international acre","uk_acre",null,"area",!1,!0,4046.8564224],["IT calorie","cal",null,"energy",!1,!0,4.1868],["joule","J",null,"energy",!0,!0,1],["katal","kat",null,"catalytic_activity",!0,!1,1],["kelvin","K",["kel"],"temperature",!0,!0,1],["kilogram","kg",null,"mass",!0,!0,1],["knot","kn",null,"speed",!1,!0,.514444444444444],["light-year","ly",null,"length",!1,!0,9460730472580800],["litre","L",["l","lt"],"volume",!1,!0,.001],["lumen","lm",null,"luminous_flux",!0,!1,1],["lux","lx",null,"illuminance",!0,!1,1],["maxwell","Mx",null,"magnetic_flux",!1,!1,1e-18],["measurement ton","MTON",null,"volume",!1,!0,1.13267386368],["meter per hour","m/h",["m/hr"],"speed",!1,!0,.00027777777777778],["meter per second","m/s",["m/sec"],"speed",!0,!0,1],["meter per second squared","m?s??",null,"acceleration",!0,!1,1],["parsec","pc",["parsec"],"length",!1,!0,0x6da012f958ee1c],["meter squared per second","m?/s",null,"kinematic_viscosity",!0,!1,1],["metre","m",null,"length",!0,!0,1],["miles per hour","mph",null,"speed",!1,!0,.44704],["millimetre of mercury","mmHg",null,"pressure",!1,!1,133.322],["minute","?",null,"angle",!1,!1,.000290888208665722],["minute","min",["mn"],"time",!1,!0,60],["modern teaspoon","tspm",null,"volume",!1,!0,5e-6],["mole","mol",null,"amount_of_substance",!0,!1,1],["morgen","Morgen",null,"area",!1,!0,2500],["n.u. of action","?",null,"action",!1,!1,1.05457168181818e-34],["n.u. of mass","m?",null,"mass",!1,!1,9.10938261616162e-31],["n.u. of speed","c?",null,"speed",!1,!1,299792458],["n.u. of time","?/(me?c??)",null,"time",!1,!1,1.28808866778687e-21],["nautical mile","M",["Nmi"],"length",!1,!0,1852],["newton","N",null,"force",!0,!0,1],["œrsted","Oe ",null,"magnetic_field_intensity",!1,!1,79.5774715459477],["ohm","Ω",null,"electric_resistance",!0,!1,1],["ounce mass","ozm",null,"mass",!1,!0,.028349523125],["pascal","Pa",null,"pressure",!0,!1,1],["pascal second","Pa?s",null,"dynamic_viscosity",!0,!1,1],["pferdestärke","PS",null,"power",!1,!0,735.49875],["phot","ph",null,"illuminance",!1,!1,1e-4],["pica (1/6 inch)","pica",null,"length",!1,!0,.00035277777777778],["pica (1/72 inch)","Pica",["Picapt"],"length",!1,!0,.00423333333333333],["poise","P",null,"dynamic_viscosity",!1,!1,.1],["pond","pond",null,"force",!1,!0,.00980665],["pound force","lbf",null,"force",!1,!0,4.4482216152605],["pound mass","lbm",null,"mass",!1,!0,.45359237],["quart","qt",null,"volume",!1,!0,.000946352946],["radian","rad",null,"angle",!0,!1,1],["second","?",null,"angle",!1,!1,484813681109536e-20],["second","s",["sec"],"time",!0,!0,1],["short hundredweight","cwt",["shweight"],"mass",!1,!0,45.359237],["siemens","S",null,"electrical_conductance",!0,!1,1],["sievert","Sv",null,"equivalent_dose",!0,!1,1],["slug","sg",null,"mass",!1,!0,14.59390294],["square ångström","ang2",["ang^2"],"area",!1,!0,1e-20],["square foot","ft2",["ft^2"],"area",!1,!0,.09290304],["square inch","in2",["in^2"],"area",!1,!0,64516e-8],["square light-year","ly2",["ly^2"],"area",!1,!0,8.95054210748189e31],["square meter","m?",null,"area",!0,!0,1],["square mile","mi2",["mi^2"],"area",!1,!0,2589988.110336],["square nautical mile","Nmi2",["Nmi^2"],"area",!1,!0,3429904],["square Pica","Pica2",["Picapt2","Pica^2","Picapt^2"],"area",!1,!0,1792111111111e-17],["square yard","yd2",["yd^2"],"area",!1,!0,.83612736],["statute mile","mi",null,"length",!1,!0,1609.344],["steradian","sr",null,"solid_angle",!0,!1,1],["stilb","sb",null,"luminance",!1,!1,1e-4],["stokes","St",null,"kinematic_viscosity",!1,!1,1e-4],["stone","stone",null,"mass",!1,!0,6.35029318],["tablespoon","tbs",null,"volume",!1,!0,147868e-10],["teaspoon","tsp",null,"volume",!1,!0,492892e-11],["tesla","T",null,"magnetic_flux_density",!0,!0,1],["thermodynamic calorie","c",null,"energy",!1,!0,4.184],["ton","ton",null,"mass",!1,!0,907.18474],["tonne","t",null,"mass",!1,!1,1e3],["U.K. pint","uk_pt",null,"volume",!1,!0,.00056826125],["U.S. bushel","bushel",null,"volume",!1,!0,.03523907],["U.S. oil barrel","barrel",null,"volume",!1,!0,.158987295],["U.S. pint","pt",["us_pt"],"volume",!1,!0,.000473176473],["U.S. survey mile","survey_mi",null,"length",!1,!0,1609.347219],["U.S. survey/statute acre","us_acre",null,"area",!1,!0,4046.87261],["volt","V",null,"voltage",!0,!1,1],["watt","W",null,"power",!0,!0,1],["watt-hour","Wh",["wh"],"energy",!1,!0,3600],["weber","Wb",null,"magnetic_flux",!0,!1,1],["yard","yd",null,"length",!1,!0,.9144],["year","yr",null,"time",!1,!0,31557600]],s={Yi:["yobi",80,1.2089258196146292e24,"Yi","yotta"],Zi:["zebi",70,0x400000000000000000,"Zi","zetta"],Ei:["exbi",60,0x1000000000000000,"Ei","exa"],Pi:["pebi",50,0x4000000000000,"Pi","peta"],Ti:["tebi",40,1099511627776,"Ti","tera"],Gi:["gibi",30,1073741824,"Gi","giga"],Mi:["mebi",20,1048576,"Mi","mega"],ki:["kibi",10,1024,"ki","kilo"]},l={Y:["yotta",1e24,"Y"],Z:["zetta",1e21,"Z"],E:["exa",1e18,"E"],P:["peta",1e15,"P"],T:["tera",1e12,"T"],G:["giga",1e9,"G"],M:["mega",1e6,"M"],k:["kilo",1e3,"k"],h:["hecto",100,"h"],e:["dekao",10,"e"],d:["deci",.1,"d"],c:["centi",.01,"c"],m:["milli",.001,"m"],u:["micro",1e-6,"u"],n:["nano",1e-9,"n"],p:["pico",1e-12,"p"],f:["femto",1e-15,"f"],a:["atto",1e-18,"a"],z:["zepto",1e-21,"z"],y:["yocto",1e-24,"y"]},u=null,c=null,f=t,h=n,d=1,p=1,g=0;g<i.length;g++)o=null===i[g][2]?[]:i[g][2],(i[g][1]===f||o.indexOf(f)>=0)&&(u=i[g]),(i[g][1]===h||o.indexOf(h)>=0)&&(c=i[g]);if(null===u){var v=s[t.substring(0,2)],y=l[t.substring(0,1)];"da"===t.substring(0,2)&&(y=["dekao",10,"da"]),v?(d=v[2],f=t.substring(2)):y&&(d=y[1],f=t.substring(y[2].length));for(var m=0;m<i.length;m++)o=null===i[m][2]?[]:i[m][2],(i[m][1]===f||o.indexOf(f)>=0)&&(u=i[m])}if(null===c){var w=s[n.substring(0,2)],b=l[n.substring(0,1)];"da"===n.substring(0,2)&&(b=["dekao",10,"da"]),w?(p=w[2],h=n.substring(2)):b&&(p=b[1],h=n.substring(b[2].length));for(var C=0;C<i.length;C++)o=null===i[C][2]?[]:i[C][2],(i[C][1]===h||o.indexOf(h)>=0)&&(c=i[C])}return null===u||null===c?r.na:u[3]!==c[3]?r.na:e*u[6]*d/(c[6]*p)},t.DEC2BIN=function(e,t){if((e=a.parseNumber(e))instanceof Error)return e;if(!/^-?[0-9]{1,3}$/.test(e)||e<-512||e>511)return r.num;if(e<0)return"1"+i.REPT("0",9-(512+e).toString(2).length)+(512+e).toString(2);var n=parseInt(e,10).toString(2);return void 0===t?n:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=n.length?i.REPT("0",t-n.length)+n:r.num},t.DEC2HEX=function(e,t){if((e=a.parseNumber(e))instanceof Error)return e;if(!/^-?[0-9]{1,12}$/.test(e)||e<-549755813888||e>549755813887)return r.num;if(e<0)return(1099511627776+e).toString(16);var n=parseInt(e,10).toString(16);return void 0===t?n:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=n.length?i.REPT("0",t-n.length)+n:r.num},t.DEC2OCT=function(e,t){if((e=a.parseNumber(e))instanceof Error)return e;if(!/^-?[0-9]{1,9}$/.test(e)||e<-536870912||e>536870911)return r.num;if(e<0)return(1073741824+e).toString(8);var n=parseInt(e,10).toString(8);return void 0===t?n:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=n.length?i.REPT("0",t-n.length)+n:r.num},t.DELTA=function(e,t){return t=void 0===t?0:t,e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e===t?1:0},t.ERF=function(e,t){return t=void 0===t?0:t,e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:o.erf(e)},t.ERF.PRECISE=function(){throw new Error("ERF.PRECISE is not implemented")},t.ERFC=function(e){return isNaN(e)?r.value:o.erfc(e)},t.ERFC.PRECISE=function(){throw new Error("ERFC.PRECISE is not implemented")},t.GESTEP=function(e,t){return t=t||0,e=a.parseNumber(e),a.anyIsError(t,e)?e:e>=t?1:0},t.HEX2BIN=function(e,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return r.num;var n=10===e.length&&"f"===e.substring(0,1).toLowerCase(),o=n?parseInt(e,16)-1099511627776:parseInt(e,16);if(o<-512||o>511)return r.num;if(n)return"1"+i.REPT("0",9-(512+o).toString(2).length)+(512+o).toString(2);var a=o.toString(2);return void 0===t?a:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=a.length?i.REPT("0",t-a.length)+a:r.num},t.HEX2DEC=function(e){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return r.num;var t=parseInt(e,16);return t>=549755813888?t-1099511627776:t},t.HEX2OCT=function(e,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return r.num;var n=parseInt(e,16);if(n>536870911&&n<0xffe0000000)return r.num;if(n>=0xffe0000000)return(n-0xffc0000000).toString(8);var o=n.toString(8);return void 0===t?o:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=o.length?i.REPT("0",t-o.length)+o:r.num},t.IMABS=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.value:Math.sqrt(Math.pow(n,2)+Math.pow(o,2))},t.IMAGINARY=function(e){if(void 0===e||!0===e||!1===e)return r.value;if(0===e||"0"===e)return 0;if(["i","j"].indexOf(e)>=0)return 1;var t=(e=e.replace("+i","+1i").replace("-i","-1i").replace("+j","+1j").replace("-j","-1j")).indexOf("+"),n=e.indexOf("-");0===t&&(t=e.indexOf("+",1)),0===n&&(n=e.indexOf("-",1));var o=e.substring(e.length-1,e.length),i="i"===o||"j"===o;return t>=0||n>=0?i?t>=0?isNaN(e.substring(0,t))||isNaN(e.substring(t+1,e.length-1))?r.num:Number(e.substring(t+1,e.length-1)):isNaN(e.substring(0,n))||isNaN(e.substring(n+1,e.length-1))?r.num:-Number(e.substring(n+1,e.length-1)):r.num:i?isNaN(e.substring(0,e.length-1))?r.num:e.substring(0,e.length-1):isNaN(e)?r.num:0},t.IMARGUMENT=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.value:0===n&&0===o?r.div0:0===n&&o>0?Math.PI/2:0===n&&o<0?-Math.PI/2:0===o&&n>0?0:0===o&&n<0?-Math.PI:n>0?Math.atan(o/n):n<0&&o>=0?Math.atan(o/n)+Math.PI:Math.atan(o/n)-Math.PI},t.IMCONJUGATE=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",0!==o?t.COMPLEX(n,-o,i):e},t.IMCOS=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.cos(n)*(Math.exp(o)+Math.exp(-o))/2,-Math.sin(n)*(Math.exp(o)-Math.exp(-o))/2,i)},t.IMCOSH=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.cos(o)*(Math.exp(n)+Math.exp(-n))/2,Math.sin(o)*(Math.exp(n)-Math.exp(-n))/2,i)},t.IMCOT=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.value:t.IMDIV(t.IMCOS(e),t.IMSIN(e))},t.IMDIV=function(e,n){var o=t.IMREAL(e),i=t.IMAGINARY(e),s=t.IMREAL(n),l=t.IMAGINARY(n);if(a.anyIsError(o,i,s,l))return r.value;var u=e.substring(e.length-1),c=n.substring(n.length-1),f="i";if("j"===u?f="j":"j"===c&&(f="j"),0===s&&0===l)return r.num;var h=s*s+l*l;return t.COMPLEX((o*s+i*l)/h,(i*s-o*l)/h,f)},t.IMEXP=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);i="i"===i||"j"===i?i:"i";var s=Math.exp(n);return t.COMPLEX(s*Math.cos(o),s*Math.sin(o),i)},t.IMLN=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.log(Math.sqrt(n*n+o*o)),Math.atan(o/n),i)},t.IMLOG10=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.log(Math.sqrt(n*n+o*o))/Math.log(10),Math.atan(o/n)/Math.log(10),i)},t.IMLOG2=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.log(Math.sqrt(n*n+o*o))/Math.log(2),Math.atan(o/n)/Math.log(2),i)},t.IMPOWER=function(e,n){n=a.parseNumber(n);var o=t.IMREAL(e),i=t.IMAGINARY(e);if(a.anyIsError(n,o,i))return r.value;var s=e.substring(e.length-1);s="i"===s||"j"===s?s:"i";var l=Math.pow(t.IMABS(e),n),u=t.IMARGUMENT(e);return t.COMPLEX(l*Math.cos(n*u),l*Math.sin(n*u),s)},t.IMPRODUCT=function(){var e=arguments[0];if(!arguments.length)return r.value;for(var n=1;n<arguments.length;n++){var o=t.IMREAL(e),i=t.IMAGINARY(e),s=t.IMREAL(arguments[n]),l=t.IMAGINARY(arguments[n]);if(a.anyIsError(o,i,s,l))return r.value;e=t.COMPLEX(o*s-i*l,o*l+i*s)}return e},t.IMREAL=function(e){if(void 0===e||!0===e||!1===e)return r.value;if(0===e||"0"===e)return 0;if(["i","+i","1i","+1i","-i","-1i","j","+j","1j","+1j","-j","-1j"].indexOf(e)>=0)return 0;var t=e.indexOf("+"),n=e.indexOf("-");0===t&&(t=e.indexOf("+",1)),0===n&&(n=e.indexOf("-",1));var o=e.substring(e.length-1,e.length),i="i"===o||"j"===o;return t>=0||n>=0?i?t>=0?isNaN(e.substring(0,t))||isNaN(e.substring(t+1,e.length-1))?r.num:Number(e.substring(0,t)):isNaN(e.substring(0,n))||isNaN(e.substring(n+1,e.length-1))?r.num:Number(e.substring(0,n)):r.num:i?isNaN(e.substring(0,e.length-1))?r.num:0:isNaN(e)?r.num:e},t.IMSEC=function(e){if(!0===e||!1===e)return r.value;var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.value:t.IMDIV("1",t.IMCOS(e))},t.IMSECH=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.value:t.IMDIV("1",t.IMCOSH(e))},t.IMSIN=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.sin(n)*(Math.exp(o)+Math.exp(-o))/2,Math.cos(n)*(Math.exp(o)-Math.exp(-o))/2,i)},t.IMSINH=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.cos(o)*(Math.exp(n)-Math.exp(-n))/2,Math.sin(o)*(Math.exp(n)+Math.exp(-n))/2,i)},t.IMSQRT=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);i="i"===i||"j"===i?i:"i";var s=Math.sqrt(t.IMABS(e)),l=t.IMARGUMENT(e);return t.COMPLEX(s*Math.cos(l/2),s*Math.sin(l/2),i)},t.IMCSC=function(e){if(!0===e||!1===e)return r.value;var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.num:t.IMDIV("1",t.IMSIN(e))},t.IMCSCH=function(e){if(!0===e||!1===e)return r.value;var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.num:t.IMDIV("1",t.IMSINH(e))},t.IMSUB=function(e,t){var n=this.IMREAL(e),o=this.IMAGINARY(e),i=this.IMREAL(t),s=this.IMAGINARY(t);if(a.anyIsError(n,o,i,s))return r.value;var l=e.substring(e.length-1),u=t.substring(t.length-1),c="i";return"j"===l?c="j":"j"===u&&(c="j"),this.COMPLEX(n-i,o-s,c)},t.IMSUM=function(){if(!arguments.length)return r.value;for(var e=a.flatten(arguments),t=e[0],n=1;n<e.length;n++){var o=this.IMREAL(t),i=this.IMAGINARY(t),s=this.IMREAL(e[n]),l=this.IMAGINARY(e[n]);if(a.anyIsError(o,i,s,l))return r.value;t=this.COMPLEX(o+s,i+l)}return t},t.IMTAN=function(e){if(!0===e||!1===e)return r.value;var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.value:this.IMDIV(this.IMSIN(e),this.IMCOS(e))},t.OCT2BIN=function(e,t){if(!/^[0-7]{1,10}$/.test(e))return r.num;var n=10===e.length&&"7"===e.substring(0,1),o=n?parseInt(e,8)-1073741824:parseInt(e,8);if(o<-512||o>511)return r.num;if(n)return"1"+i.REPT("0",9-(512+o).toString(2).length)+(512+o).toString(2);var a=o.toString(2);return void 0===t?a:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=a.length?i.REPT("0",t-a.length)+a:r.num},t.OCT2DEC=function(e){if(!/^[0-7]{1,10}$/.test(e))return r.num;var t=parseInt(e,8);return t>=536870912?t-1073741824:t},t.OCT2HEX=function(e,t){if(!/^[0-7]{1,10}$/.test(e))return r.num;var n=parseInt(e,8);if(n>=536870912)return"ff"+(n+3221225472).toString(16);var o=n.toString(16);return void 0===t?o:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=o.length?i.REPT("0",t-o.length)+o:r.num}},function(e,t,n){"use strict";t.__esModule=!0;t.default=["ABS","ACCRINT","ACOS","ACOSH","ACOT","ACOTH","ADD","AGGREGATE","AND","ARABIC","ARGS2ARRAY","ASIN","ASINH","ATAN","ATAN2","ATANH","AVEDEV","AVERAGE","AVERAGEA","AVERAGEIF","AVERAGEIFS","BASE","BESSELI","BESSELJ","BESSELK","BESSELY","BETA.DIST","BETA.INV","BETADIST","BETAINV","BIN2DEC","BIN2HEX","BIN2OCT","BINOM.DIST","BINOM.DIST.RANGE","BINOM.INV","BINOMDIST","BITAND","BITLSHIFT","BITOR","BITRSHIFT","BITXOR","CEILING","CEILINGMATH","CEILINGPRECISE","CHAR","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV","CHISQ.INV.RT","CHOOSE","CHOOSE","CLEAN","CODE","COLUMN","COLUMNS","COMBIN","COMBINA","COMPLEX","CONCATENATE","CONFIDENCE","CONFIDENCE.NORM","CONFIDENCE.T","CONVERT","CORREL","COS","COSH","COT","COTH","COUNT","COUNTA","COUNTBLANK","COUNTIF","COUNTIFS","COUNTIN","COUNTUNIQUE","COVARIANCE.P","COVARIANCE.S","CSC","CSCH","CUMIPMT","CUMPRINC","DATE","DATEVALUE","DAY","DAYS","DAYS360","DB","DDB","DEC2BIN","DEC2HEX","DEC2OCT","DECIMAL","DEGREES","DELTA","DEVSQ","DIVIDE","DOLLAR","DOLLARDE","DOLLARFR","E","EDATE","EFFECT","EOMONTH","EQ","ERF","ERFC","EVEN","EXACT","EXP","EXPON.DIST","EXPONDIST","F.DIST","F.DIST.RT","F.INV","F.INV.RT","FACT","FACTDOUBLE","FALSE","FDIST","FDISTRT","FIND","FINV","FINVRT","FISHER","FISHERINV","FIXED","FLATTEN","FLOOR","FORECAST","FREQUENCY","FV","FVSCHEDULE","GAMMA","GAMMA.DIST","GAMMA.INV","GAMMADIST","GAMMAINV","GAMMALN","GAMMALN.PRECISE","GAUSS","GCD","GEOMEAN","GESTEP","GROWTH","GTE","HARMEAN","HEX2BIN","HEX2DEC","HEX2OCT","HOUR","HTML2TEXT","HYPGEOM.DIST","HYPGEOMDIST","IF","IMABS","IMAGINARY","IMARGUMENT","IMCONJUGATE","IMCOS","IMCOSH","IMCOT","IMCSC","IMCSCH","IMDIV","IMEXP","IMLN","IMLOG10","IMLOG2","IMPOWER","IMPRODUCT","IMREAL","IMSEC","IMSECH","IMSIN","IMSINH","IMSQRT","IMSUB","IMSUM","IMTAN","INT","INTERCEPT","INTERVAL","IPMT","IRR","ISBINARY","ISBLANK","ISEVEN","ISLOGICAL","ISNONTEXT","ISNUMBER","ISODD","ISODD","ISOWEEKNUM","ISPMT","ISTEXT","JOIN","KURT","LARGE","LCM","LEFT","LEN","LINEST","LN","LOG","LOG10","LOGEST","LOGNORM.DIST","LOGNORM.INV","LOGNORMDIST","LOGNORMINV","LOWER","LT","LTE","MATCH","MAX","MAXA","MEDIAN","MID","MIN","MINA","MINUS","MINUTE","MIRR","MOD","MODE.MULT","MODE.SNGL","MODEMULT","MODESNGL","MONTH","MROUND","MULTINOMIAL","MULTIPLY","NE","NEGBINOM.DIST","NEGBINOMDIST","NETWORKDAYS","NOMINAL","NORM.DIST","NORM.INV","NORM.S.DIST","NORM.S.INV","NORMDIST","NORMINV","NORMSDIST","NORMSINV","NOT","NOW","NPER","NPV","NUMBERS","NUMERAL","OCT2BIN","OCT2DEC","OCT2HEX","ODD","OR","PDURATION","PEARSON","PERCENTILEEXC","PERCENTILEINC","PERCENTRANKEXC","PERCENTRANKINC","PERMUT","PERMUTATIONA","PHI","PI","PMT","POISSON.DIST","POISSONDIST","POW","POWER","PPMT","PROB","PRODUCT","PROPER","PV","QUARTILE.EXC","QUARTILE.INC","QUARTILEEXC","QUARTILEINC","QUOTIENT","RADIANS","RAND","RANDBETWEEN","RANK.AVG","RANK.EQ","RANKAVG","RANKEQ","RATE","REFERENCE","REGEXEXTRACT","REGEXMATCH","REGEXREPLACE","REPLACE","REPT","RIGHT","ROMAN","ROUND","ROUNDDOWN","ROUNDUP","ROW","ROWS","RRI","RSQ","SEARCH","SEC","SECH","SECOND","SERIESSUM","SIGN","SIN","SINH","SKEW","SKEW.P","SKEWP","SLN","SLOPE","SMALL","SPLIT","SPLIT","SQRT","SQRTPI","STANDARDIZE","STDEV.P","STDEV.S","STDEVA","STDEVP","STDEVPA","STDEVS","STEYX","SUBSTITUTE","SUBTOTAL","SUM","SUMIF","SUMIFS","SUMPRODUCT","SUMSQ","SUMX2MY2","SUMX2PY2","SUMXMY2","SWITCH","SYD","T","T.DIST","T.DIST.2T","T.DIST.RT","T.INV","T.INV.2T","TAN","TANH","TBILLEQ","TBILLPRICE","TBILLYIELD","TDIST","TDIST2T","TDISTRT","TEXT","TIME","TIMEVALUE","TINV","TINV2T","TODAY","TRANSPOSE","TREND","TRIM","TRIMMEAN","TRUE","TRUNC","UNICHAR","UNICODE","UNIQUE","UPPER","VALUE","VAR.P","VAR.S","VARA","VARP","VARPA","VARS","WEEKDAY","WEEKNUM","WEIBULL.DIST","WEIBULLDIST","WORKDAY","XIRR","XNPV","XOR","YEAR","YEARFRAC"]},function(e,t,n){"use strict";function r(e){var t=parseInt(e,10);return t=isNaN(t)?-1:Math.max(t-1,-1)}function o(e){var t="";return e>=0&&(t=""+(e+1)),t}t.__esModule=!0,t.rowLabelToIndex=r,t.rowIndexToLabel=o,t.columnLabelToIndex=s,t.columnIndexToLabel=l,t.extractLabel=function(e){if("string"!=typeof e||!u.test(e))return[];var t=e.toUpperCase().match(u),n=t[1],o=t[2],i=t[3],a=t[4];return[{index:r(a),label:a,isAbsolute:"$"===i},{index:s(o),label:o,isAbsolute:"$"===n}]},t.toLabel=function(e,t){var n=(e.isAbsolute?"$":"")+o(e.index);return(t.isAbsolute?"$":"")+l(t.index)+n};var i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",a=i.length;function s(e){var t=0;if("string"==typeof e)for(var n=0,r=(e=e.toUpperCase()).length-1;n<e.length;n+=1,r-=1)t+=Math.pow(a,r)*(i.indexOf(e[n])+1);return--t}function l(e){for(var t="";e>=0;)t=String.fromCharCode(e%a+97)+t,e=Math.floor(e/a)-1;return t.toUpperCase()}var u=/^([$])?([A-Za-z]+)([$])?([0-9]+)$/},function(e,t,n){"use strict";t.__esModule=!0,t.rowLabelToIndex=t.rowIndexToLabel=t.columnLabelToIndex=t.columnIndexToLabel=t.toLabel=t.extractLabel=t.error=t.Parser=t.ERROR_VALUE=t.ERROR_REF=t.ERROR_NUM=t.ERROR_NULL=t.ERROR_NOT_AVAILABLE=t.ERROR_NAME=t.ERROR_DIV_ZERO=t.ERROR=t.SUPPORTED_FORMULAS=void 0;var r=l(n(17)),o=l(n(14)),i=n(2),a=l(i),s=n(15);function l(e){return e&&e.__esModule?e:{default:e}}t.SUPPORTED_FORMULAS=o.default,t.ERROR=i.ERROR,t.ERROR_DIV_ZERO=i.ERROR_DIV_ZERO,t.ERROR_NAME=i.ERROR_NAME,t.ERROR_NOT_AVAILABLE=i.ERROR_NOT_AVAILABLE,t.ERROR_NULL=i.ERROR_NULL,t.ERROR_NUM=i.ERROR_NUM,t.ERROR_REF=i.ERROR_REF,t.ERROR_VALUE=i.ERROR_VALUE,t.Parser=r.default,t.error=a.default,t.extractLabel=s.extractLabel,t.toLabel=s.toLabel,t.columnIndexToLabel=s.columnIndexToLabel,t.columnLabelToIndex=s.columnLabelToIndex,t.rowIndexToLabel=s.rowIndexToLabel,t.rowLabelToIndex=s.rowLabelToIndex},function(e,t,n){"use strict";t.__esModule=!0;var r=f(n(18)),o=f(n(19)),i=n(41),a=n(43),s=n(3),l=n(2),u=f(l),c=n(15);function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return n.parser=new i.Parser,n.parser.yy={toNumber:s.toNumber,trimEdges:a.trimEdges,invertNumber:s.invertNumber,throwError:function(e){return n._throwError(e)},callVariable:function(e){return n._callVariable(e)},evaluateByOperator:o.default,callFunction:function(e,t){return n._callFunction(e,t)},cellValue:function(e){return n._callCellValue(e)},rangeValue:function(e,t){return n._callRangeValue(e,t)}},n.variables=Object.create(null),n.functions=Object.create(null),n.setVariable("TRUE",!0).setVariable("FALSE",!1).setVariable("NULL",null),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.parse=function(e){var t=null,n=null;try{t=""===e?"":this.parser.parse(e)}catch(e){var r=(0,u.default)(e.message);n=r||(0,u.default)(l.ERROR)}return t instanceof Error&&(n=(0,u.default)(t.message)||(0,u.default)(l.ERROR),t=null),{error:n,result:t}},t.prototype.setVariable=function(e,t){return this.variables[e]=t,this},t.prototype.getVariable=function(e){return this.variables[e]},t.prototype._callVariable=function(e){var t=this.getVariable(e);if(this.emit("callVariable",e,function(e){void 0!==e&&(t=e)}),void 0===t)throw Error(l.ERROR_NAME);return t},t.prototype.setFunction=function(e,t){return this.functions[e]=t,this},t.prototype.getFunction=function(e){return this.functions[e]},t.prototype._callFunction=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this.getFunction(e),r=void 0;return n&&(r=n(t)),this.emit("callFunction",e,t,function(e){void 0!==e&&(r=e)}),void 0===r?(0,o.default)(e,t):r},t.prototype._callCellValue=function(e){e=e.toUpperCase();var t=(0,c.extractLabel)(e),n=t[0],r=t[1],o=void 0;return this.emit("callCellValue",{label:e,row:n,column:r},function(e){o=e}),o},t.prototype._callRangeValue=function(e,t){e=e.toUpperCase(),t=t.toUpperCase();var n=(0,c.extractLabel)(e),r=n[0],o=n[1],i=(0,c.extractLabel)(t),a=i[0],s=i[1],l={},u={};r.index<=a.index?(l.row=r,u.row=a):(l.row=a,u.row=r),o.index<=s.index?(l.column=o,u.column=s):(l.column=s,u.column=o),l.label=(0,c.toLabel)(l.row,l.column),u.label=(0,c.toLabel)(u.row,u.column);var f=[];return this.emit("callRangeValue",l,u,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];f=e}),f},t.prototype._throwError=function(e){if((0,l.isValidStrict)(e))throw Error(e);throw Error(l.ERROR)},t}(r.default);t.default=h},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,a=r.length;i<a;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=n},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e=e.toUpperCase(),!m[e])throw Error(v.ERROR_NAME);return m[e].apply(m,t)},t.registerOperation=w;var r=y(n(20)),o=y(n(21)),i=y(n(22)),a=y(n(23)),s=y(n(24)),l=y(n(33)),u=y(n(34)),c=y(n(35)),f=y(n(36)),h=y(n(37)),d=y(n(38)),p=y(n(39)),g=y(n(40)),v=n(2);function y(e){return e&&e.__esModule?e:{default:e}}var m=Object.create(null);function w(e,t){Array.isArray(e)||(e=[e.toUpperCase()]),e.forEach(function(e){t.isFactory?m[e]=t(e):m[e]=t})}w(r.default.SYMBOL,r.default),w(o.default.SYMBOL,o.default),w(i.default.SYMBOL,i.default),w(a.default.SYMBOL,a.default),w(g.default.SYMBOL,g.default),w(s.default.SYMBOL,s.default),w(l.default.SYMBOL,l.default),w(u.default.SYMBOL,u.default),w(c.default.SYMBOL,c.default),w(f.default.SYMBOL,f.default),w(d.default.SYMBOL,d.default),w(p.default.SYMBOL,p.default),w(h.default.SYMBOL,h.default)},function(e,t,n){"use strict";t.__esModule=!0,t.SYMBOL=void 0,t.default=a;var r=n(3),o=n(2),i=t.SYMBOL="+";function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var a=n.reduce(function(e,t){return e+(0,r.toNumber)(t)},(0,r.toNumber)(e));if(isNaN(a))throw Error(o.ERROR_VALUE);return a}a.SYMBOL=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=o;var r=t.SYMBOL="&";function o(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){return e+t.toString()},"")}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.SYMBOL=void 0,t.default=a;var r=n(3),o=n(2),i=t.SYMBOL="/";function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var a=n.reduce(function(e,t){return e/(0,r.toNumber)(t)},(0,r.toNumber)(e));if(a===1/0)throw Error(o.ERROR_DIV_ZERO);if(isNaN(a))throw Error(o.ERROR_VALUE);return a}a.SYMBOL=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=o;var r=t.SYMBOL="=";function o(e,t){return e===t}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.SYMBOL=void 0,t.default=s;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(25)),o=function(e){return e&&e.__esModule?e:{default:e}}(n(14)),i=n(2);var a=t.SYMBOL=o.default;function s(e){return function(){var t=(e=e.toUpperCase()).split("."),n=!1,o=void 0;if(1===t.length)r[t[0]]&&(n=!0,o=r[t[0]].apply(r,arguments));else{for(var a=t.length,s=0,l=r;s<a;)if(l=l[t[s]],s++,!l){l=null;break}l&&(n=!0,o=l.apply(void 0,arguments))}if(!n)throw Error(i.ERROR_NAME);return o}}s.isFactory=!0,s.SYMBOL=a},function(e,t,n){var r=[n(26),n(29),n(13),n(30),n(4),n(6),n(8),n(31),n(7),n(32),n(5),n(12)];for(var o in r){var i=r[o];for(var a in i)t[a]=t[a]||i[a]}},function(e,t,n){var r=n(4),o=n(5),i=n(13),a=n(8);function s(e,t){if(t)for(var n in t)e[n]=t[n];return e}t.BETADIST=o.BETA.DIST,t.BETAINV=o.BETA.INV,t.BINOMDIST=o.BINOM.DIST,t.CEILING=t.ISOCEILING=s(r.CEILING.MATH,r.CEILING),t.CEILINGMATH=r.CEILING.MATH,t.CEILINGPRECISE=r.CEILING.PRECISE,t.CHIDIST=o.CHISQ.DIST,t.CHIDISTRT=o.CHISQ.DIST.RT,t.CHIINV=o.CHISQ.INV,t.CHIINVRT=o.CHISQ.INV.RT,t.CHITEST=o.CHISQ.TEST,t.CONFIDENCE=s(o.CONFIDENCE.NORM,o.CONFIDENCE),t.COVAR=o.COVARIANCE.P,t.COVARIANCEP=o.COVARIANCE.P,t.COVARIANCES=o.COVARIANCE.S,t.CRITBINOM=o.BINOM.INV,t.EXPONDIST=o.EXPON.DIST,t.ERFCPRECISE=i.ERFC.PRECISE,t.ERFPRECISE=i.ERF.PRECISE,t.FDIST=o.F.DIST,t.FDISTRT=o.F.DIST.RT,t.FINVRT=o.F.INV.RT,t.FINV=o.F.INV,t.FLOOR=s(r.FLOOR.MATH,r.FLOOR),t.FLOORMATH=r.FLOOR.MATH,t.FLOORPRECISE=r.FLOOR.PRECISE,t.FTEST=o.F.TEST,t.GAMMADIST=o.GAMMA.DIST,t.GAMMAINV=o.GAMMA.INV,t.GAMMALNPRECISE=o.GAMMALN.PRECISE,t.HYPGEOMDIST=o.HYPGEOM.DIST,t.LOGINV=o.LOGNORM.INV,t.LOGNORMINV=o.LOGNORM.INV,t.LOGNORMDIST=o.LOGNORM.DIST,t.MODE=s(o.MODE.SNGL,o.MODE),t.MODEMULT=o.MODE.MULT,t.MODESNGL=o.MODE.SNGL,t.NEGBINOMDIST=o.NEGBINOM.DIST,t.NETWORKDAYSINTL=a.NETWORKDAYS.INTL,t.NORMDIST=o.NORM.DIST,t.NORMINV=o.NORM.INV,t.NORMSDIST=o.NORM.S.DIST,t.NORMSINV=o.NORM.S.INV,t.PERCENTILE=s(o.PERCENTILE.EXC,o.PERCENTILE),t.PERCENTILEEXC=o.PERCENTILE.EXC,t.PERCENTILEINC=o.PERCENTILE.INC,t.PERCENTRANK=s(o.PERCENTRANK.INC,o.PERCENTRANK),t.PERCENTRANKEXC=o.PERCENTRANK.EXC,t.PERCENTRANKINC=o.PERCENTRANK.INC,t.POISSON=s(o.POISSON.DIST,o.POISSON),t.POISSONDIST=o.POISSON.DIST,t.QUARTILE=s(o.QUARTILE.INC,o.QUARTILE),t.QUARTILEEXC=o.QUARTILE.EXC,t.QUARTILEINC=o.QUARTILE.INC,t.RANK=s(o.RANK.EQ,o.RANK),t.RANKAVG=o.RANK.AVG,t.RANKEQ=o.RANK.EQ,t.SKEWP=o.SKEW.P,t.STDEV=s(o.STDEV.S,o.STDEV),t.STDEVP=o.STDEV.P,t.STDEVS=o.STDEV.S,t.TDIST=o.T.DIST,t.TDISTRT=o.T.DIST.RT,t.TINV=o.T.INV,t.TTEST=o.T.TEST,t.VAR=s(o.VAR.S,o.VAR),t.VARP=o.VAR.P,t.VARS=o.VAR.S,t.WEIBULL=s(o.WEIBULL.DIST,o.WEIBULL),t.WEIBULLDIST=o.WEIBULL.DIST,t.WORKDAYINTL=a.WORKDAY.INTL,t.ZTEST=o.Z.TEST},function(e,t){},function(e,t,n){var r=Math;function o(e,t){return e.reduce(function(e,n){return t*e+n},0)}function i(e,t,n,r,o){o||(o=-1);var i,a=2/e;if(0===t)return n;if(1===t)return r;for(var s=1;s!=t;++s)i=r*s*a+o*n,n=r,r=i;return r}function a(e,t,n,r,o){return function(a,s){if(0===s)return e(a);if(1===s)return t(a);if(s<0)throw n+": Order ("+s+") must be nonnegative";if(1==r&&0===a)throw n+": Undefined when x == 0";if(2==r&&a<=0)throw n+": Undefined when x <= 0";return i(a,s,e(a),t(a),o)}}var s=function(){var e=[57568490574,-13362590354,651619640.7,-11214424.18,77392.33017,-184.9052456].reverse(),t=[57568490411,1029532985,9494680.718,59272.64853,267.8532712,1].reverse(),n=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),a=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34935152e-8].reverse(),s=.636619772;function l(i){var l,u,c,f=i*i,h=r.abs(i)-.785398164;return r.abs(i)<8?l=(u=o(e,f))/(c=o(t,f)):(u=o(n,f=64/f),c=o(a,f),l=r.sqrt(s/r.abs(i))*(r.cos(h)*u-r.sin(h)*c*8/r.abs(i))),l}var u=[72362614232,-7895059235,242396853.1,-2972611.439,15704.4826,-30.16036606].reverse(),c=[144725228442,2300535178,18583304.74,99447.43394,376.9991397,1].reverse(),f=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),h=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();function d(e){var t,n,i,a=e*e,l=r.abs(e)-2.356194491;return Math.abs(e)<8?t=(n=e*o(u,a))/(i=o(c,a)):(n=o(f,a=64/a),i=o(h,a),t=r.sqrt(s/r.abs(e))*(r.cos(l)*n-r.sin(l)*i*8/r.abs(e)),e<0&&(t=-t)),t}return function(e,t){if(0===(t=Math.round(t)))return l(r.abs(e));if(1===t)return d(r.abs(e));if(t<0)throw"BESSELJ: Order ("+t+") must be nonnegative";if(0===r.abs(e))return 0;var n,o,a,s,u,c,f,h=2/r.abs(e);if(r.abs(e)>t)n=i(e,t,l(r.abs(e)),d(r.abs(e)),-1);else{for(a=0,u=n=s=0,c=1,o=2*r.floor((t+r.floor(r.sqrt(40*t)))/2);o>0;o--)f=o*h*c-u,u=c,c=f,r.abs(c)>1e10&&(c*=1e-10,u*=1e-10,n*=1e-10,s*=1e-10),a&&(s+=c),a=!a,o==t&&(n=u);n/=s=2*s-c}return e<0&&t%2?-n:n}}(),l=function(){var e=[-2957821389,7062834065,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),t=[40076544269,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),n=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),i=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34945152e-8].reverse(),l=.636619772;var u=[-4900604943e3,127527439e4,-51534381390,734926455.1,-4237922.726,8511.937935].reverse(),c=[249958057e5,424441966400,3733650367,22459040.02,102042.605,354.9632885,1].reverse(),f=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),h=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();return a(function(a){var u,c,f,h=a*a,d=a-.785398164;return a<8?u=(c=o(e,h))/(f=o(t,h))+l*s(a,0)*r.log(a):(c=o(n,h=64/h),f=o(i,h),u=r.sqrt(l/a)*(r.sin(d)*c+r.cos(d)*f*8/a)),u},function(e){var t,n,i,a=e*e,d=e-2.356194491;return e<8?t=(n=e*o(u,a))/(i=o(c,a))+l*(s(e,1)*r.log(e)-1/e):(n=o(f,a=64/a),i=o(h,a),t=r.sqrt(l/e)*(r.sin(d)*n+r.cos(d)*i*8/e)),t},"BESSELY",1,-1)}(),u=function(){var e=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),t=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse();var n=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),i=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse();return function a(s,l){if(0===(l=Math.round(l)))return function(n){return n<=3.75?o(e,n*n/14.0625):r.exp(r.abs(n))/r.sqrt(r.abs(n))*o(t,3.75/r.abs(n))}(s);if(1==l)return function(e){return e<3.75?e*o(n,e*e/14.0625):(e<0?-1:1)*r.exp(r.abs(e))/r.sqrt(r.abs(e))*o(i,3.75/r.abs(e))}(s);if(l<0)throw"BESSELI Order ("+l+") must be nonnegative";if(0===r.abs(s))return 0;var u,c,f,h,d,p=2/r.abs(s);for(f=u=0,h=1,c=2*r.round((l+r.round(r.sqrt(40*l)))/2);c>0;c--)d=c*p*h+f,f=h,h=d,r.abs(h)>1e10&&(h*=1e-10,f*=1e-10,u*=1e-10),c==l&&(u=f);return u*=a(s,0)/h,s<0&&l%2?-u:u}}(),c=function(){var e=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),t=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse();var n=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),i=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse();return a(function(n){return n<=2?-r.log(n/2)*u(n,0)+o(e,n*n/4):r.exp(-n)/r.sqrt(n)*o(t,2/n)},function(e){return e<=2?r.log(e/2)*u(e,1)+1/e*o(n,e*e/4):r.exp(-e)/r.sqrt(e)*o(i,2/e)},"BESSELK",2,1)}();t.besselj=s,t.bessely=l,t.besseli=u,t.besselk=c},function(module,exports,__webpack_require__){var error=__webpack_require__(0),stats=__webpack_require__(5),maths=__webpack_require__(4),utils=__webpack_require__(1);function compact(e){var t=[];return utils.arrayEach(e,function(e){e&&t.push(e)}),t}function findResultIndex(database,criterias){for(var matches={},i=1;i<database[0].length;++i)matches[i]=!0;var maxCriteriaLength=criterias[0].length;for(i=1;i<criterias.length;++i)criterias[i].length>maxCriteriaLength&&(maxCriteriaLength=criterias[i].length);for(var k=1;k<database.length;++k)for(var l=1;l<database[k].length;++l){for(var currentCriteriaResult=!1,hasMatchingCriteria=!1,j=0;j<criterias.length;++j){var criteria=criterias[j];if(!(criteria.length<maxCriteriaLength)){var criteriaField=criteria[0];if(database[k][0]===criteriaField){hasMatchingCriteria=!0;for(var p=1;p<criteria.length;++p)currentCriteriaResult=currentCriteriaResult||eval(database[k][l]+criteria[p])}}}hasMatchingCriteria&&(matches[l]=matches[l]&&currentCriteriaResult)}for(var result=[],n=0;n<database[0].length;++n)matches[n]&&result.push(n-1);return result}exports.FINDFIELD=function(e,t){var n=null;return utils.arrayEach(e,function(e,r){if(e[0]===t)return n=r,!1}),null==n?error.value:n},exports.DAVERAGE=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=0;return utils.arrayEach(r,function(e){a+=o[e]}),0===r.length?error.div0:a/r.length},exports.DCOUNT=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=[];return utils.arrayEach(r,function(e){a.push(o[e])}),stats.COUNT(a)},exports.DCOUNTA=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=[];return utils.arrayEach(r,function(e){a.push(o[e])}),stats.COUNTA(a)},exports.DGET=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);return 0===r.length?error.value:r.length>1?error.num:o[r[0]]},exports.DMAX=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=o[r[0]];return utils.arrayEach(r,function(e){a<o[e]&&(a=o[e])}),a},exports.DMIN=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=o[r[0]];return utils.arrayEach(r,function(e){a>o[e]&&(a=o[e])}),a},exports.DPRODUCT=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=[];utils.arrayEach(r,function(e){a.push(o[e])}),a=compact(a);var s=1;return utils.arrayEach(a,function(e){s*=e}),s},exports.DSTDEV=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=[];return utils.arrayEach(r,function(e){a.push(o[e])}),a=compact(a),stats.STDEV.S(a)},exports.DSTDEVP=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=[];return utils.arrayEach(r,function(e){a.push(o[e])}),a=compact(a),stats.STDEV.P(a)},exports.DSUM=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=[];return utils.arrayEach(r,function(e){a.push(o[e])}),maths.SUM(a)},exports.DVAR=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=[];return utils.arrayEach(r,function(e){a.push(o[e])}),stats.VAR.S(a)},exports.DVARP=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return error.value;var r=findResultIndex(e,n),o=[];if("string"==typeof t){var i=exports.FINDFIELD(e,t);o=utils.rest(e[i])}else o=utils.rest(e[t]);var a=[];return utils.arrayEach(r,function(e){a.push(o[e])}),stats.VAR.P(a)}},function(e,t,n){var r=n(0),o=n(1),i=n(7);t.AND=function(){for(var e=o.flatten(arguments),t=!0,n=0;n<e.length;n++)e[n]||(t=!1);return t},t.CHOOSE=function(){if(arguments.length<2)return r.na;var e=arguments[0];return e<1||e>254?r.value:arguments.length<e+1?r.value:arguments[e]},t.FALSE=function(){return!1},t.IF=function(e,t,n){return e?t:n},t.IFERROR=function(e,t){return i.ISERROR(e)?t:e},t.IFNA=function(e,t){return e===r.na?t:e},t.NOT=function(e){return!e},t.OR=function(){for(var e=o.flatten(arguments),t=!1,n=0;n<e.length;n++)e[n]&&(t=!0);return t},t.TRUE=function(){return!0},t.XOR=function(){for(var e=o.flatten(arguments),t=0,n=0;n<e.length;n++)e[n]&&t++;return!!(1&Math.floor(Math.abs(t)))},t.SWITCH=function(){var e;if(arguments.length>0){var t=arguments[0],n=arguments.length-1,o=Math.floor(n/2),i=!1,a=n%2!=0,s=n%2==0?null:arguments[arguments.length-1];if(o)for(var l=0;l<o;l++)if(t===arguments[2*l+1]){e=arguments[2*l+2],i=!0;break}i||(e=a?s:r.na)}else e=r.value;return e}},function(e,t,n){var r=n(0),o=n(8),i=n(1);function a(e){return e&&e.getTime&&!isNaN(e.getTime())}function s(e){return e instanceof Date?e:new Date(e)}t.ACCRINT=function(e,t,n,i,l,u,c){return e=s(e),t=s(t),n=s(n),a(e)&&a(t)&&a(n)?i<=0||l<=0?r.num:-1===[1,2,4].indexOf(u)?r.num:-1===[0,1,2,3,4].indexOf(c)?r.num:n<=e?r.num:(l=l||0,c=c||0,l*i*o.YEARFRAC(e,n,c)):r.value},t.ACCRINTM=function(){throw new Error("ACCRINTM is not implemented")},t.AMORDEGRC=function(){throw new Error("AMORDEGRC is not implemented")},t.AMORLINC=function(){throw new Error("AMORLINC is not implemented")},t.COUPDAYBS=function(){throw new Error("COUPDAYBS is not implemented")},t.COUPDAYS=function(){throw new Error("COUPDAYS is not implemented")},t.COUPDAYSNC=function(){throw new Error("COUPDAYSNC is not implemented")},t.COUPNCD=function(){throw new Error("COUPNCD is not implemented")},t.COUPNUM=function(){throw new Error("COUPNUM is not implemented")},t.COUPPCD=function(){throw new Error("COUPPCD is not implemented")},t.CUMIPMT=function(e,n,o,a,s,l){if(e=i.parseNumber(e),n=i.parseNumber(n),o=i.parseNumber(o),i.anyIsError(e,n,o))return r.value;if(e<=0||n<=0||o<=0)return r.num;if(a<1||s<1||a>s)return r.num;if(0!==l&&1!==l)return r.num;var u=t.PMT(e,n,o,0,l),c=0;1===a&&0===l&&(c=-o,a++);for(var f=a;f<=s;f++)c+=1===l?t.FV(e,f-2,u,o,1)-u:t.FV(e,f-1,u,o,0);return c*=e},t.CUMPRINC=function(e,n,o,a,s,l){if(e=i.parseNumber(e),n=i.parseNumber(n),o=i.parseNumber(o),i.anyIsError(e,n,o))return r.value;if(e<=0||n<=0||o<=0)return r.num;if(a<1||s<1||a>s)return r.num;if(0!==l&&1!==l)return r.num;var u=t.PMT(e,n,o,0,l),c=0;1===a&&(c=0===l?u+o*e:u,a++);for(var f=a;f<=s;f++)c+=l>0?u-(t.FV(e,f-2,u,o,1)-u)*e:u-t.FV(e,f-1,u,o,0)*e;return c},t.DB=function(e,t,n,o,a){if(a=void 0===a?12:a,e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),i.anyIsError(e,t,n,o,a))return r.value;if(e<0||t<0||n<0||o<0)return r.num;if(-1===[1,2,3,4,5,6,7,8,9,10,11,12].indexOf(a))return r.num;if(o>n)return r.num;if(t>=e)return 0;for(var s=(1-Math.pow(t/e,1/n)).toFixed(3),l=e*s*a/12,u=l,c=0,f=o===n?n-1:o,h=2;h<=f;h++)u+=c=(e-u)*s;return 1===o?l:o===n?(e-u)*s:c},t.DDB=function(e,t,n,o,a){if(a=void 0===a?2:a,e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),i.anyIsError(e,t,n,o,a))return r.value;if(e<0||t<0||n<0||o<0||a<=0)return r.num;if(o>n)return r.num;if(t>=e)return 0;for(var s=0,l=0,u=1;u<=o;u++)s+=l=Math.min(a/n*(e-s),e-t-s);return l},t.DISC=function(){throw new Error("DISC is not implemented")},t.DOLLARDE=function(e,t){if(e=i.parseNumber(e),t=i.parseNumber(t),i.anyIsError(e,t))return r.value;if(t<0)return r.num;if(t>=0&&t<1)return r.div0;t=parseInt(t,10);var n=parseInt(e,10);n+=e%1*Math.pow(10,Math.ceil(Math.log(t)/Math.LN10))/t;var o=Math.pow(10,Math.ceil(Math.log(t)/Math.LN2)+1);return n=Math.round(n*o)/o},t.DOLLARFR=function(e,t){if(e=i.parseNumber(e),t=i.parseNumber(t),i.anyIsError(e,t))return r.value;if(t<0)return r.num;if(t>=0&&t<1)return r.div0;t=parseInt(t,10);var n=parseInt(e,10);return n+=e%1*Math.pow(10,-Math.ceil(Math.log(t)/Math.LN10))*t},t.DURATION=function(){throw new Error("DURATION is not implemented")},t.EFFECT=function(e,t){return e=i.parseNumber(e),t=i.parseNumber(t),i.anyIsError(e,t)?r.value:e<=0||t<1?r.num:(t=parseInt(t,10),Math.pow(1+e/t,t)-1)},t.FV=function(e,t,n,o,a){if(o=o||0,a=a||0,e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),i.anyIsError(e,t,n,o,a))return r.value;var s;if(0===e)s=o+n*t;else{var l=Math.pow(1+e,t);s=1===a?o*l+n*(1+e)*(l-1)/e:o*l+n*(l-1)/e}return-s},t.FVSCHEDULE=function(e,t){if(e=i.parseNumber(e),t=i.parseNumberArray(i.flatten(t)),i.anyIsError(e,t))return r.value;for(var n=t.length,o=e,a=0;a<n;a++)o*=1+t[a];return o},t.INTRATE=function(){throw new Error("INTRATE is not implemented")},t.IPMT=function(e,n,o,a,s,l){if(s=s||0,l=l||0,e=i.parseNumber(e),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),s=i.parseNumber(s),l=i.parseNumber(l),i.anyIsError(e,n,o,a,s,l))return r.value;var u=t.PMT(e,o,a,s,l);return(1===n?1===l?0:-a:1===l?t.FV(e,n-2,u,a,1)-u:t.FV(e,n-1,u,a,0))*e},t.IRR=function(e,t){if(t=t||0,e=i.parseNumberArray(i.flatten(e)),t=i.parseNumber(t),i.anyIsError(e,t))return r.value;for(var n=function(e,t,n){for(var r=n+1,o=e[0],i=1;i<e.length;i++)o+=e[i]/Math.pow(r,(t[i]-t[0])/365);return o},o=function(e,t,n){for(var r=n+1,o=0,i=1;i<e.length;i++){var a=(t[i]-t[0])/365;o-=a*e[i]/Math.pow(r,a+1)}return o},a=[],s=!1,l=!1,u=0;u<e.length;u++)a[u]=0===u?0:a[u-1]+365,e[u]>0&&(s=!0),e[u]<0&&(l=!0);if(!s||!l)return r.num;var c,f,h,d=t=void 0===t?.1:t,p=!0;do{c=d-(h=n(e,a,d))/o(e,a,d),f=Math.abs(c-d),d=c,p=f>1e-10&&Math.abs(h)>1e-10}while(p);return d},t.ISPMT=function(e,t,n,o){return e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),i.anyIsError(e,t,n,o)?r.value:o*e*(t/n-1)},t.MDURATION=function(){throw new Error("MDURATION is not implemented")},t.MIRR=function(e,n,o){if(e=i.parseNumberArray(i.flatten(e)),n=i.parseNumber(n),o=i.parseNumber(o),i.anyIsError(e,n,o))return r.value;for(var a=e.length,s=[],l=[],u=0;u<a;u++)e[u]<0?s.push(e[u]):l.push(e[u]);var c=-t.NPV(o,l)*Math.pow(1+o,a-1),f=t.NPV(n,s)*(1+n);return Math.pow(c/f,1/(a-1))-1},t.NOMINAL=function(e,t){return e=i.parseNumber(e),t=i.parseNumber(t),i.anyIsError(e,t)?r.value:e<=0||t<1?r.num:(t=parseInt(t,10),(Math.pow(e+1,1/t)-1)*t)},t.NPER=function(e,t,n,o,a){if(a=void 0===a?0:a,o=void 0===o?0:o,e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),i.anyIsError(e,t,n,o,a))return r.value;var s=t*(1+e*a)-o*e,l=n*e+t*(1+e*a);return Math.log(s/l)/Math.log(1+e)},t.NPV=function(){var e=i.parseNumberArray(i.flatten(arguments));if(e instanceof Error)return e;for(var t=e[0],n=0,r=1;r<e.length;r++)n+=e[r]/Math.pow(1+t,r);return n},t.ODDFPRICE=function(){throw new Error("ODDFPRICE is not implemented")},t.ODDFYIELD=function(){throw new Error("ODDFYIELD is not implemented")},t.ODDLPRICE=function(){throw new Error("ODDLPRICE is not implemented")},t.ODDLYIELD=function(){throw new Error("ODDLYIELD is not implemented")},t.PDURATION=function(e,t,n){return e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),i.anyIsError(e,t,n)?r.value:e<=0?r.num:(Math.log(n)-Math.log(t))/Math.log(1+e)},t.PMT=function(e,t,n,o,a){if(o=o||0,a=a||0,e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),i.anyIsError(e,t,n,o,a))return r.value;var s;if(0===e)s=(n+o)/t;else{var l=Math.pow(1+e,t);s=1===a?(o*e/(l-1)+n*e/(1-1/l))/(1+e):o*e/(l-1)+n*e/(1-1/l)}return-s},t.PPMT=function(e,n,o,a,s,l){return s=s||0,l=l||0,e=i.parseNumber(e),o=i.parseNumber(o),a=i.parseNumber(a),s=i.parseNumber(s),l=i.parseNumber(l),i.anyIsError(e,o,a,s,l)?r.value:t.PMT(e,o,a,s,l)-t.IPMT(e,n,o,a,s,l)},t.PRICE=function(){throw new Error("PRICE is not implemented")},t.PRICEDISC=function(){throw new Error("PRICEDISC is not implemented")},t.PRICEMAT=function(){throw new Error("PRICEMAT is not implemented")},t.PV=function(e,t,n,o,a){return o=o||0,a=a||0,e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),i.anyIsError(e,t,n,o,a)?r.value:0===e?-n*t-o:((1-Math.pow(1+e,t))/e*n*(1+e*a)-o)/Math.pow(1+e,t)},t.RATE=function(e,t,n,o,a,s){if(s=void 0===s?.01:s,o=void 0===o?0:o,a=void 0===a?0:a,e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),s=i.parseNumber(s),i.anyIsError(e,t,n,o,a,s))return r.value;var l,u,c,f=0,h=0,d=0,p=s;for(Math.abs(p)<1e-10?n*(1+e*p)+t*(1+p*a)*e+o:n*(h=Math.exp(e*Math.log(1+p)))+t*(1/p+a)*(h-1)+o,l=n+t*e+o,u=n*h+t*(1/p+a)*(h-1)+o,d=c=0,f=p;Math.abs(l-u)>1e-10&&d<50;)p=(u*c-l*f)/(u-l),c=f,f=p,l=u,u=Math.abs(p)<1e-10?n*(1+e*p)+t*(1+p*a)*e+o:n*(h=Math.exp(e*Math.log(1+p)))+t*(1/p+a)*(h-1)+o,++d;return p},t.RECEIVED=function(){throw new Error("RECEIVED is not implemented")},t.RRI=function(e,t,n){return e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),i.anyIsError(e,t,n)?r.value:0===e||0===t?r.num:Math.pow(n/t,1/e)-1},t.SLN=function(e,t,n){return e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),i.anyIsError(e,t,n)?r.value:0===n?r.num:(e-t)/n},t.SYD=function(e,t,n,o){return e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),i.anyIsError(e,t,n,o)?r.value:0===n?r.num:o<1||o>n?r.num:(e-t)*(n-(o=parseInt(o,10))+1)*2/(n*(n+1))},t.TBILLEQ=function(e,t,n){return e=i.parseDate(e),t=i.parseDate(t),n=i.parseNumber(n),i.anyIsError(e,t,n)?r.value:n<=0?r.num:e>t?r.num:t-e>31536e6?r.num:365*n/(360-n*o.DAYS360(e,t,!1))},t.TBILLPRICE=function(e,t,n){return e=i.parseDate(e),t=i.parseDate(t),n=i.parseNumber(n),i.anyIsError(e,t,n)?r.value:n<=0?r.num:e>t?r.num:t-e>31536e6?r.num:100*(1-n*o.DAYS360(e,t,!1)/360)},t.TBILLYIELD=function(e,t,n){return e=i.parseDate(e),t=i.parseDate(t),n=i.parseNumber(n),i.anyIsError(e,t,n)?r.value:n<=0?r.num:e>t?r.num:t-e>31536e6?r.num:360*(100-n)/(n*o.DAYS360(e,t,!1))},t.VDB=function(){throw new Error("VDB is not implemented")},t.XNPV=function(e,t,n){if(e=i.parseNumber(e),t=i.parseNumberArray(i.flatten(t)),n=i.parseDateArray(i.flatten(n)),i.anyIsError(e,t,n))return r.value;for(var a=0,s=0;s<t.length;s++)a+=t[s]/Math.pow(1+e,o.DAYS(n[s],n[0])/365);return a},t.YIELD=function(){throw new Error("YIELD is not implemented")},t.YIELDDISC=function(){throw new Error("YIELDDISC is not implemented")},t.YIELDMAT=function(){throw new Error("YIELDMAT is not implemented")}},function(e,t,n){var r=n(0),o=n(1);t.MATCH=function(e,t,n){if(!e&&!t)return r.na;if(2===arguments.length&&(n=1),!(t instanceof Array))return r.na;if(-1!==n&&0!==n&&1!==n)return r.na;for(var o,i,a=0;a<t.length;a++)if(1===n){if(t[a]===e)return a+1;t[a]<e&&(i?t[a]>i&&(o=a+1,i=t[a]):(o=a+1,i=t[a]))}else if(0===n){if("string"==typeof e){if(e=e.replace(/\?/g,"."),t[a].toLowerCase().match(e.toLowerCase()))return a+1}else if(t[a]===e)return a+1}else if(-1===n){if(t[a]===e)return a+1;t[a]>e&&(i?t[a]<i&&(o=a+1,i=t[a]):(o=a+1,i=t[a]))}return o||r.na},t.VLOOKUP=function(e,t,n,o){if(!e||!t||!n)return r.na;o=o||!1;for(var i=0;i<t.length;i++){var a=t[i];if(!o&&a[0]===e||a[0]===e||o&&"string"==typeof a[0]&&-1!==a[0].toLowerCase().indexOf(e.toLowerCase()))return n<a.length+1?a[n-1]:r.ref}return r.na},t.HLOOKUP=function(e,t,n,i){if(!e||!t||!n)return r.na;i=i||!1;for(var a=o.transpose(t),s=0;s<a.length;s++){var l=a[s];if(!i&&l[0]===e||l[0]===e||i&&"string"==typeof l[0]&&-1!==l[0].toLowerCase().indexOf(e.toLowerCase()))return n<l.length+1?l[n-1]:r.ref}return r.na}},function(e,t,n){"use strict";t.__esModule=!0,t.default=o;var r=t.SYMBOL=">";function o(e,t){return e>t}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=o;var r=t.SYMBOL=">=";function o(e,t){return e>=t}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=o;var r=t.SYMBOL="<";function o(e,t){return e<t}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=o;var r=t.SYMBOL="<=";function o(e,t){return e<=t}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.SYMBOL=void 0,t.default=a;var r=n(3),o=n(2),i=t.SYMBOL="-";function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var a=n.reduce(function(e,t){return e-(0,r.toNumber)(t)},(0,r.toNumber)(e));if(isNaN(a))throw Error(o.ERROR_VALUE);return a}a.SYMBOL=i},function(e,t,n){"use strict";t.__esModule=!0,t.SYMBOL=void 0,t.default=a;var r=n(3),o=n(2),i=t.SYMBOL="*";function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var a=n.reduce(function(e,t){return e*(0,r.toNumber)(t)},(0,r.toNumber)(e));if(isNaN(a))throw Error(o.ERROR_VALUE);return a}a.SYMBOL=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=o;var r=t.SYMBOL="<>";function o(e,t){return e!==t}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.SYMBOL=void 0,t.default=a;var r=n(3),o=n(2),i=t.SYMBOL="^";function a(e,t){var n=Math.pow((0,r.toNumber)(e),(0,r.toNumber)(t));if(isNaN(n))throw Error(o.ERROR_VALUE);return n}a.SYMBOL=i},function(module,exports,__webpack_require__){(function(module,process){var grammarParser=function(){var o=function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},$V0=[1,5],$V1=[1,8],$V2=[1,6],$V3=[1,7],$V4=[1,9],$V5=[1,14],$V6=[1,15],$V7=[1,16],$V8=[1,12],$V9=[1,13],$Va=[1,17],$Vb=[1,19],$Vc=[1,20],$Vd=[1,21],$Ve=[1,22],$Vf=[1,23],$Vg=[1,24],$Vh=[1,25],$Vi=[1,26],$Vj=[1,27],$Vk=[1,28],$Vl=[5,9,10,11,13,14,15,16,17,18,19,20,29,30],$Vm=[5,9,10,11,13,14,15,16,17,18,19,20,29,30,32],$Vn=[5,9,10,11,13,14,15,16,17,18,19,20,29,30,34],$Vo=[5,10,11,13,14,15,16,17,29,30],$Vp=[5,10,13,14,15,16,29,30],$Vq=[5,10,11,13,14,15,16,17,18,19,29,30],$Vr=[13,29,30],parser={trace:function(){},yy:{},symbols_:{error:2,expressions:3,expression:4,EOF:5,variableSequence:6,number:7,STRING:8,"&":9,"=":10,"+":11,"(":12,")":13,"<":14,">":15,NOT:16,"-":17,"*":18,"/":19,"^":20,FUNCTION:21,expseq:22,cell:23,ABSOLUTE_CELL:24,RELATIVE_CELL:25,MIXED_CELL:26,":":27,ARRAY:28,";":29,",":30,VARIABLE:31,DECIMAL:32,NUMBER:33,"%":34,ERROR:35,$accept:0,$end:1},terminals_:{5:"EOF",8:"STRING",9:"&",10:"=",11:"+",12:"(",13:")",14:"<",15:">",16:"NOT",17:"-",18:"*",19:"/",20:"^",21:"FUNCTION",24:"ABSOLUTE_CELL",25:"RELATIVE_CELL",26:"MIXED_CELL",27:":",28:"ARRAY",29:";",30:",",31:"VARIABLE",32:"DECIMAL",33:"NUMBER",34:"%",35:"ERROR"},productions_:[0,[3,2],[4,1],[4,1],[4,1],[4,3],[4,3],[4,3],[4,3],[4,4],[4,4],[4,4],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,2],[4,2],[4,3],[4,4],[4,1],[4,1],[4,2],[23,1],[23,1],[23,1],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[22,1],[22,1],[22,3],[22,3],[6,1],[6,3],[7,1],[7,3],[7,2],[2,1]],performAction:function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return $$[$0-1];case 2:this.$=yy.callVariable($$[$0][0]);break;case 3:this.$=yy.toNumber($$[$0]);break;case 4:this.$=yy.trimEdges($$[$0]);break;case 5:this.$=yy.evaluateByOperator("&",[$$[$0-2],$$[$0]]);break;case 6:this.$=yy.evaluateByOperator("=",[$$[$0-2],$$[$0]]);break;case 7:this.$=yy.evaluateByOperator("+",[$$[$0-2],$$[$0]]);break;case 8:this.$=$$[$0-1];break;case 9:this.$=yy.evaluateByOperator("<=",[$$[$0-3],$$[$0]]);break;case 10:this.$=yy.evaluateByOperator(">=",[$$[$0-3],$$[$0]]);break;case 11:this.$=yy.evaluateByOperator("<>",[$$[$0-3],$$[$0]]);break;case 12:this.$=yy.evaluateByOperator("NOT",[$$[$0-2],$$[$0]]);break;case 13:this.$=yy.evaluateByOperator(">",[$$[$0-2],$$[$0]]);break;case 14:this.$=yy.evaluateByOperator("<",[$$[$0-2],$$[$0]]);break;case 15:this.$=yy.evaluateByOperator("-",[$$[$0-2],$$[$0]]);break;case 16:this.$=yy.evaluateByOperator("*",[$$[$0-2],$$[$0]]);break;case 17:this.$=yy.evaluateByOperator("/",[$$[$0-2],$$[$0]]);break;case 18:this.$=yy.evaluateByOperator("^",[$$[$0-2],$$[$0]]);break;case 19:var n1=yy.invertNumber($$[$0]);this.$=n1,isNaN(this.$)&&(this.$=0);break;case 20:var n1=yy.toNumber($$[$0]);this.$=n1,isNaN(this.$)&&(this.$=0);break;case 21:this.$=yy.callFunction($$[$0-2]);break;case 22:this.$=yy.callFunction($$[$0-3],$$[$0-1]);break;case 26:case 27:case 28:this.$=yy.cellValue($$[$0]);break;case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:this.$=yy.rangeValue($$[$0-2],$$[$0]);break;case 38:case 42:this.$=[$$[$0]];break;case 39:var result=[],arr=eval("["+yytext+"]");arr.forEach(function(e){result.push(e)}),this.$=result;break;case 40:case 41:$$[$0-2].push($$[$0]),this.$=$$[$0-2];break;case 43:this.$=Array.isArray($$[$0-2])?$$[$0-2]:[$$[$0-2]],this.$.push($$[$0]);break;case 44:this.$=$$[$0];break;case 45:this.$=1*($$[$0-2]+"."+$$[$0]);break;case 46:this.$=.01*$$[$0-1];break;case 47:this.$=yy.throwError($$[$0])}},table:[{2:11,3:1,4:2,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{1:[3]},{5:[1,18],9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk},o($Vl,[2,2],{32:[1,29]}),o($Vl,[2,3],{34:[1,30]}),o($Vl,[2,4]),{2:11,4:31,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:32,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:33,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{12:[1,34]},o($Vl,[2,23]),o($Vl,[2,24],{2:35,35:$Va}),o($Vm,[2,42]),o($Vn,[2,44],{32:[1,36]}),o($Vl,[2,26],{27:[1,37]}),o($Vl,[2,27],{27:[1,38]}),o($Vl,[2,28],{27:[1,39]}),o([5,9,10,11,13,14,15,16,17,18,19,20,29,30,35],[2,47]),{1:[2,1]},{2:11,4:40,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:41,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:42,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:45,6:3,7:4,8:$V0,10:[1,43],11:$V1,12:$V2,15:[1,44],17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:47,6:3,7:4,8:$V0,10:[1,46],11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:48,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:49,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:50,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:51,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:52,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{31:[1,53]},o($Vn,[2,46]),{9:$Vb,10:$Vc,11:$Vd,13:[1,54],14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk},o($Vo,[2,19],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),o($Vo,[2,20],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),{2:11,4:57,6:3,7:4,8:$V0,11:$V1,12:$V2,13:[1,55],17:$V3,21:$V4,22:56,23:10,24:$V5,25:$V6,26:$V7,28:[1,58],31:$V8,33:$V9,35:$Va},o($Vl,[2,25]),{33:[1,59]},{24:[1,60],25:[1,61],26:[1,62]},{24:[1,63],25:[1,64],26:[1,65]},{24:[1,66],25:[1,67],26:[1,68]},o($Vl,[2,5]),o([5,10,13,29,30],[2,6],{9:$Vb,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vo,[2,7],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),{2:11,4:69,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:70,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},o($Vp,[2,14],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),{2:11,4:71,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},o($Vp,[2,13],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o([5,10,13,16,29,30],[2,12],{9:$Vb,11:$Vd,14:$Ve,15:$Vf,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vo,[2,15],{9:$Vb,18:$Vi,19:$Vj,20:$Vk}),o($Vq,[2,16],{9:$Vb,20:$Vk}),o($Vq,[2,17],{9:$Vb,20:$Vk}),o([5,10,11,13,14,15,16,17,18,19,20,29,30],[2,18],{9:$Vb}),o($Vm,[2,43]),o($Vl,[2,8]),o($Vl,[2,21]),{13:[1,72],29:[1,73],30:[1,74]},o($Vr,[2,38],{9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vr,[2,39]),o($Vn,[2,45]),o($Vl,[2,29]),o($Vl,[2,30]),o($Vl,[2,31]),o($Vl,[2,32]),o($Vl,[2,33]),o($Vl,[2,34]),o($Vl,[2,35]),o($Vl,[2,36]),o($Vl,[2,37]),o($Vp,[2,9],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vp,[2,11],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vp,[2,10],{9:$Vb,11:$Vd,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vl,[2,22]),{2:11,4:75,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},{2:11,4:76,6:3,7:4,8:$V0,11:$V1,12:$V2,17:$V3,21:$V4,23:10,24:$V5,25:$V6,26:$V7,31:$V8,33:$V9,35:$Va},o($Vr,[2,40],{9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk}),o($Vr,[2,41],{9:$Vb,10:$Vc,11:$Vd,14:$Ve,15:$Vf,16:$Vg,17:$Vh,18:$Vi,19:$Vj,20:$Vk})],defaultActions:{18:[2,1]},parseError:function(e,t){if(!t.recoverable){function n(e,t){this.message=e,this.hash=t}throw n.prototype=Error,new n(e,t)}this.trace(e)},parse:function(e){var t=this,n=[0],r=[null],o=[],i=this.table,a="",s=0,l=0,u=0,c=2,f=o.slice.call(arguments,1),h=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);h.setInput(e,d.yy),d.yy.lexer=h,d.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var g=h.yylloc;o.push(g);var v=h.options&&h.options.ranges;function y(e){n.length=n.length-2*e,r.length=r.length-e,o.length=o.length-e}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,w,b,C,E,O,S,_,T,R=function(){var e;return"number"!=typeof(e=h.lex()||1)&&(e=t.symbols_[e]||e),e},M={};;){if(b=n[n.length-1],this.defaultActions[b]?C=this.defaultActions[b]:(null!==m&&void 0!==m||(m=R()),C=i[b]&&i[b][m]),void 0===C||!C.length||!C[0]){var k,N="";function A(e){for(var t=n.length-1,r=0;;){if(c.toString()in i[e])return r;if(0===e||t<2)return!1;e=n[t-=2],++r}}if(u)1!==w&&(k=A(b));else{for(O in k=A(b),T=[],i[b])this.terminals_[O]&&O>c&&T.push("'"+this.terminals_[O]+"'");N=h.showPosition?"Parse error on line "+(s+1)+":\n"+h.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(N,{text:h.match,token:this.terminals_[m]||m,line:h.yylineno,loc:g,expected:T,recoverable:!1!==k})}if(3==u){if(1===m||1===w)throw new Error(N||"Parsing halted while starting to recover from another error.");l=h.yyleng,a=h.yytext,s=h.yylineno,g=h.yylloc,m=R()}if(!1===k)throw new Error(N||"Parsing halted. No suitable error recovery rule available.");y(k),w=m==c?null:m,m=c,b=n[n.length-1],C=i[b]&&i[b][c],u=3}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+m);switch(C[0]){case 1:n.push(m),r.push(h.yytext),o.push(h.yylloc),n.push(C[1]),m=null,w?(m=w,w=null):(l=h.yyleng,a=h.yytext,s=h.yylineno,g=h.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[C[1]][1],M.$=r[r.length-S],M._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},v&&(M._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[a,l,s,d.yy,C[1],r,o].concat(f))))return E;S&&(n=n.slice(0,-1*S*2),r=r.slice(0,-1*S),o=o.slice(0,-1*S)),n.push(this.productions_[C[1]][0]),r.push(M.$),o.push(M._$),_=i[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0}},lexer={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var o=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r,o;if(this.options.backtrack_lexer&&(o={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(o.yylloc.range=this.yylloc.range.slice(0))),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var i in o)this[i]=o[i];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),i=0;i<o.length;i++)if((n=this._input.match(this.rules[o[i]]))&&(!t||n[0].length>t[0].length)){if(t=n,r=i,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,o[i])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,o[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,r){switch(n){case 0:break;case 1:case 2:return 8;case 3:return 21;case 4:return 35;case 5:return 24;case 6:case 7:return 26;case 8:return 25;case 9:return 21;case 10:case 11:return 31;case 12:return 33;case 13:return 28;case 14:return 9;case 15:return" ";case 16:return 32;case 17:return 27;case 18:return 29;case 19:return 30;case 20:return 18;case 21:return 19;case 22:return 17;case 23:return 11;case 24:return 20;case 25:return 12;case 26:return 13;case 27:return 15;case 28:return 14;case 29:return 16;case 30:return'"';case 31:return"'";case 32:return"!";case 33:return 10;case 34:return 34;case 35:return"#";case 36:return 5}},rules:[/^(?:\s+)/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:[A-Za-z]{1,}[A-Za-z_0-9\.]+(?=[(]))/,/^(?:#[A-Z0-9\/]+(!|\?)?)/,/^(?:\$[A-Za-z]+\$[0-9]+)/,/^(?:\$[A-Za-z]+[0-9]+)/,/^(?:[A-Za-z]+\$[0-9]+)/,/^(?:[A-Za-z]+[0-9]+)/,/^(?:[A-Za-z\.]+(?=[(]))/,/^(?:[A-Za-z]{1,}[A-Za-z_0-9]+)/,/^(?:[A-Za-z_]+)/,/^(?:[0-9]+)/,/^(?:\[(.*)?\])/,/^(?:&)/,/^(?: )/,/^(?:[.])/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\/)/,/^(?:-)/,/^(?:\+)/,/^(?:\^)/,/^(?:\()/,/^(?:\))/,/^(?:>)/,/^(?:<)/,/^(?:NOT\b)/,/^(?:")/,/^(?:')/,/^(?:!)/,/^(?:=)/,/^(?:%)/,/^(?:[#])/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],inclusive:!0}}};function Parser(){this.yy={}}return parser.lexer=lexer,Parser.prototype=parser,parser.Parser=Parser,new Parser}();exports.parser=grammarParser,exports.Parser=grammarParser.Parser,exports.parse=function(){return grammarParser.parse.apply(grammarParser,arguments)},void 0!==module&&__webpack_require__.c[__webpack_require__.s]===module&&exports.main(process.argv.slice(1))}).call(exports,__webpack_require__(42)(module),__webpack_require__(10))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";t.__esModule=!0,t.trimEdges=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e=e.substring(t,e.length-t)}}])})},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(88),o=n(1),i=n(2),a=function(e){return e&&e.__esModule?e:{default:e}}(n(29)),s=n(57);function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var c=/^\$?[A-Z]+\$?\d+$/,f=/\$?[A-Z]+\$?\d+/,h=/(?:[^0-9A-Z$: ]|^)\s*(\$?[A-Z]+\$?\d+)\s*(?![0-9A-Z_: ])/g,d=/\$?[A-Z]+\$?\d+\s*:\s*\$?[A-Z]+\$?\d+/g,p=/((?:[^0-9A-Z$: ]|^)\s*(\$?[A-Z]+\$?\d+)\s*(?![0-9A-Z_: ]))|(\$?[A-Z]+\$?\d+\s*:\s*\$?[A-Z]+\$?\d+)/g,g=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.expression="",this.cells=[],this.customModifier=null,"string"==typeof t&&this.setExpression(t)}return function(e,t,n){t&&u(e.prototype,t),n&&u(e,n)}(e,[{key:"setExpression",value:function(e){return this.cells.length=0,this.expression=(0,s.toUpperCaseFormula)(e),this._extractCells(),this._extractCellsRange(),this}},{key:"useCustomModifier",value:function(e){this.customModifier=e}},{key:"translate",value:function(e){var t=this,n=e.row,r=e.column,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.arrayEach)(this.cells,function(e){null!==n&&void 0!==n&&t._translateCell(e,"row",n,i.row),null!==r&&void 0!==r&&t._translateCell(e,"column",r,i.column)}),this}},{key:"toString",value:function(){var e=this,t=this.expression.replace(p,function(t,n,o){var i=-1===t.indexOf(":"),a=t,s=t,l=null;i&&(s=c.test(n)?n:o);var u=e._searchCell(s);return u&&(l=u.refError?(0,r.error)(r.ERROR_REF):u.toLabel(),a=i?t.replace(s,l):l),a});return t.startsWith("=")||(t="=".concat(t)),t}},{key:"_translateCell",value:function(e,t,n,r){var o=e.start,i=e.end,a=o[t].index,s=i[t].index,u=n,c=n,f=!1;if(this.customModifier){var h=l(this.customModifier(e,t,n,r),3);u=h[0],c=h[1],f=h[2]}else o[t].isAbsolute&&(u=0),i[t].isAbsolute&&(c=0);u&&!f&&(a+u<0&&(f=!0),o[t].index=Math.max(a+u,0)),c&&!f&&(s+c<0&&(f=!0),i[t].index=Math.max(s+c,0)),f&&(e.refError=!0)}},{key:"_extractCells",value:function(){var e=this,t=this.expression.match(h);t&&(0,o.arrayEach)(t,function(t){var n=t.match(f);if(n){var o=l((0,r.extractLabel)(n[0]),2),i=o[0],a=o[1];e.cells.push(e._createCell({row:i,column:a},{row:i,column:a},n[0]))}})}},{key:"_extractCellsRange",value:function(){var e=this,t=this.expression.match(d);t&&(0,o.arrayEach)(t,function(t){var n=l(t.split(":"),2),o=n[0],i=n[1],a=l((0,r.extractLabel)(o),2),s=a[0],u=a[1],c=l((0,r.extractLabel)(i),2),f={row:s,column:u},h={row:c[0],column:c[1]};e.cells.push(e._createCell(f,h,t))})}},{key:"_searchCell",value:function(e){return l((0,o.arrayFilter)(this.cells,function(t){return t.origLabel===e}),1)[0]||null}},{key:"_createCell",value:function(e,t,n){return{start:e,end:t,origLabel:n,type:-1===n.indexOf(":")?"cell":"range",refError:!1,toLabel:function(){var e=(0,r.toLabel)(this.start.row,this.start.column);return"range"===this.type&&(e+=":".concat((0,r.toLabel)(this.end.row,this.end.column))),e}}}}]),e}();(0,i.mixin)(g,a.default);var v=g;t.default=v},function(e,t,n){var r=n(32),o=n(18),i=n(63);e.exports=function(e){return function(t,n,a){var s,l=r(t),u=o(l.length),c=i(a,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(0),o=n(46),i=n(8),a=n(115),s="["+a+"]",l=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),c=function(e,t,n){var o={},s=i(function(){return!!a[e]()||"…"!="…"[e]()}),l=o[e]=s?t(f):a[e];n&&(o[n]=l),r(r.P+r.F*s,"String",o)},f=c.trim=function(e,t){return e=String(o(e)),1&t&&(e=e.replace(l,"")),2&t&&(e=e.replace(u,"")),e};e.exports=c},function(e,t,n){var r=n(17)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(9);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r=n(80),o=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,n){"use strict";n(166);var r=n(25),o=n(31),i=n(8),a=n(46),s=n(17),l=n(130),u=s("species"),c=!i(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),f=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var h=s(e),d=!i(function(){var t={};return t[h]=function(){return 7},7!=""[e](t)}),p=d?!i(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[u]=function(){return n}),n[h](""),!t}):void 0;if(!d||!p||"replace"===e&&!c||"split"===e&&!f){var g=/./[h],v=n(a,h,""[e],function(e,t,n,r,o){return t.exec===l?d&&!o?{done:!0,value:g.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),y=v[0],m=v[1];r(String.prototype,e,y),o(RegExp.prototype,h,2==t?function(e,t){return m.call(e,this,t)}:function(e){return m.call(e,this)})}}},function(e,t,n){var r=n(43),o=n(162),i=n(125),a=n(9),s=n(18),l=n(127),u={},c={};(t=e.exports=function(e,t,n,f,h){var d,p,g,v,y=h?function(){return e}:l(e),m=r(n,f,t?2:1),w=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(i(y)){for(d=s(e.length);d>w;w++)if((v=t?m(a(p=e[w])[0],p[1]):m(e[w]))===u||v===c)return v}else for(g=y.call(e);!(p=g.next()).done;)if((v=o(g,m,p.value,t))===u||v===c)return v}).BREAK=u,t.RETURN=c},function(e,t,n){var r=n(11).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){"use strict";var r=n(11),o=n(0),i=n(25),a=n(73),s=n(53),l=n(97),u=n(72),c=n(12),f=n(8),h=n(93),d=n(68),p=n(116);e.exports=function(e,t,n,g,v,y){var m=r[e],w=m,b=v?"set":"add",C=w&&w.prototype,E={},O=function(e){var t=C[e];i(C,e,"delete"==e?function(e){return!(y&&!c(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return y&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof w&&(y||C.forEach&&!f(function(){(new w).entries().next()}))){var S=new w,_=S[b](y?{}:-0,1)!=S,T=f(function(){S.has(1)}),R=h(function(e){new w(e)}),M=!y&&f(function(){for(var e=new w,t=5;t--;)e[b](t,t);return!e.has(-0)});R||((w=t(function(t,n){u(t,w,e);var r=p(new m,t,w);return void 0!=n&&l(n,v,r[b],r),r})).prototype=C,C.constructor=w),(T||M)&&(O("delete"),O("has"),v&&O("get")),(M||_)&&O(b),y&&C.clear&&delete C.clear}else w=g.getConstructor(t,e,v,b),a(w.prototype,n),s.NEED=!0;return d(w,e),E[e]=w,o(o.G+o.W+o.F*(w!=m),E),y||g.setStrong(w,e,v),w}},function(e,t,n){for(var r,o=n(11),i=n(31),a=n(60),s=a("typed_array"),l=a("view"),u=!(!o.ArrayBuffer||!o.DataView),c=u,f=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<9;)(r=o[h[f++]])?(i(r.prototype,s,!0),i(r.prototype,l,!0)):c=!1;e.exports={ABV:u,CONSTR:c,TYPED:s,VIEW:l}},function(e,t,n){"use strict";t.__esModule=!0,t.spreadsheetColumnLabel=s,t.spreadsheetColumnIndex=function(e){var t=0;if(e)for(var n=0,r=e.length-1;n<e.length;n+=1,r-=1)t+=Math.pow(a,r)*(i.indexOf(e[n])+1);return t-=1},t.createSpreadsheetData=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,o=[];for(e=0;e<n;e++){var i=[];for(t=0;t<r;t++)i.push(s(t)+(e+1));o.push(i)}return o},t.createSpreadsheetObjectData=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,o=[];for(e=0;e<n;e++){var i={};for(t=0;t<r;t++)i["prop".concat(t)]=s(t)+(e+1);o.push(i)}return o},t.createEmptySpreadsheetData=function(e,t){for(var n,r=[],o=0;o<e;o++){n=[];for(var i=0;i<t;i++)n.push("");r.push(n)}return r},t.translateRowsToColumns=function(e){var t,n,r,o,i=[],a=0;for(t=0,n=e.length;t<n;t++)for(r=0,o=e[t].length;r<o;r++)r===a&&(i.push([]),a+=1),i[r].push(e[t][r]);return i},t.cellMethodLookupFactory=function(e,t){var n=void 0===t||t;return function(t,i){return function t(i){if(i){if((0,o.hasOwnProperty)(i,e)&&void 0!==i[e])return i[e];if((0,o.hasOwnProperty)(i,"type")&&i.type){if("string"!=typeof i.type)throw new Error("Cell type must be a string ");var a=(0,r.getCellType)(i.type);if((0,o.hasOwnProperty)(a,e))return a[e];if(n)return}return t(Object.getPrototypeOf(i))}}("number"==typeof t?this.getCellMeta(t,i):t)}};var r=n(134),o=n(2),i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",a=i.length;function s(e){for(var t,n=e+1,r="";n>0;)t=(n-1)%a,r=String.fromCharCode(65+t)+r,n=parseInt((n-t)/a,10);return r}},function(e,t,n){"use strict";t.__esModule=!0,t.registerLanguageDictionary=p,t.getLanguageDictionary=function(e){if(!g(e))return null;return(0,r.deepClone)(f(e))},t.hasLanguageDictionary=g,t.getDefaultLanguageDictionary=function(){return a.default},t.getLanguagesDictionaries=function(){return d()},t.DEFAULT_LANGUAGE_CODE=void 0;var r=n(2),o=n(444),i=s(n(54)),a=s(n(681));function s(e){return e&&e.__esModule?e:{default:e}}var l=a.default.languageCode;t.DEFAULT_LANGUAGE_CODE=l;var u=(0,i.default)("languagesDictionaries"),c=u.register,f=u.getItem,h=u.hasItem,d=u.getValues;function p(e,t){var n=e,i=t;return(0,r.isObject)(e)&&(n=(i=e).languageCode),function(e,t){e!==l&&(0,o.extendNotExistingKeys)(t,f(l))}(n,i),c(n,(0,r.deepClone)(i)),(0,r.deepClone)(i)}function g(e){return h(e)}p(a.default)},function(e,t,n){"use strict";t.__esModule=!0,t._getRefCount=function(){return s},t._resetState=l,t.isPressed=function(e){return Array.from(a.values()).some(function(t){return(0,o.isKey)(t,e)})},t.isPressedCtrlKey=function(){return Array.from(a.values()).some(function(e){return(0,o.isCtrlMetaKey)(e)})},t.startObserving=function(){0===s&&(i.addEventListener(document,"keydown",function(e){a.has(e.keyCode)||a.add(e.keyCode)}),i.addEventListener(document,"keyup",function(e){a.has(e.keyCode)&&a.delete(e.keyCode)}),i.addEventListener(document,"visibilitychange",function(){document.hidden&&a.clear()}),i.addEventListener(window,"blur",function(){a.clear()}));s+=1},t.stopObserving=function(){s>0&&(s-=1);0===s&&l()};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(10)),o=n(24);var i=new r.default,a=new Set,s=0;function l(){i.clearEvents(),a.clear(),s=0}},function(e,t,n){"use strict";t.__esModule=!0,t.detectSelectionType=v,t.normalizeSelectionFactory=y,t.transformSelectionToColumnDistance=function(e){var t=v(e);if(t===l||t===u)return[];var n=y(t),r=new Set;(0,o.arrayEach)(e,function(e){var t=n(e),i=a(t,4),s=i[1],l=i[3],u=l-s+1;(0,o.arrayEach)(Array.from(new Array(u),function(e,t){return s+t}),function(e){r.has(e)||r.add(e)})});var i=Array.from(r).sort(function(e,t){return e-t});return(0,o.arrayReduce)(i,function(e,t,n,r){return 0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e},[])},t.transformSelectionToRowDistance=function(e){var t=v(e);if(t===l||t===u)return[];var n=y(t),r=new Set;(0,o.arrayEach)(e,function(e){var t=n(e),i=a(t,3),s=i[0],l=i[2],u=l-s+1;(0,o.arrayEach)(Array.from(new Array(u),function(e,t){return s+t}),function(e){r.has(e)||r.add(e)})});var i=Array.from(r).sort(function(e,t){return e-t});return(0,o.arrayReduce)(i,function(e,t,n,r){return 0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e},[])},t.isValidCoord=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;return"number"==typeof e&&e>=0&&e<t},t.SELECTION_TYPES=t.SELECTION_TYPE_OBJECT=t.SELECTION_TYPE_ARRAY=t.SELECTION_TYPE_EMPTY=t.SELECTION_TYPE_UNRECOGNIZED=void 0;var r=n(13),o=n(1),i=n(14);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var l=0;t.SELECTION_TYPE_UNRECOGNIZED=l;var u=1;t.SELECTION_TYPE_EMPTY=u;var c=2;t.SELECTION_TYPE_ARRAY=c;var f=3;t.SELECTION_TYPE_OBJECT=f;var h=[f,c];t.SELECTION_TYPES=h;var d=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],p=Symbol("root"),g=Symbol("child");function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;if(t!==p&&t!==g)throw new Error("The second argument is used internally only and cannot be overwritten.");var n=Array.isArray(e),o=t===p,i=l;if(n){var a=e[0];if(0===e.length)i=u;else if(o&&a instanceof r.CellRange)i=f;else if(o&&Array.isArray(a))i=v(a,g);else if(e.length>=2&&e.length<=4){!e.some(function(e,t){return!d[t].includes(s(e))})&&(i=c)}}return i}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.keepDirection,r=void 0!==n&&n,o=t.propToCol;if(!h.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(t){var n=e===f,a=n?t.from.row:t[0],s=n?t.from.col:t[1],l=n?t.to.row:t[2],u=n?t.to.col:t[3];if("function"==typeof o&&("string"==typeof s&&(s=o(s)),"string"==typeof u&&(u=o(u))),(0,i.isUndefined)(l)&&(l=a),(0,i.isUndefined)(u)&&(u=s),!r){var c=a,h=s,d=l,p=u;a=Math.min(c,d),s=Math.min(h,p),l=Math.max(c,d),u=Math.max(h,p)}return[a,s,l,u]}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1),o=n(2),i=s(n(29)),a=s(n(799));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this.elements=[],this.hidden=!1}return function(e,t,n){t&&l(e.prototype,t),n&&l(e,n)}(e,[{key:"reset",value:function(){(0,r.arrayEach)(this.elements,function(e){return e.reset()})}},{key:"hide",value:function(){this.hidden=!0}},{key:"show",value:function(){this.hidden=!1}},{key:"isHidden",value:function(){return this.hidden}},{key:"destroy",value:function(){this.clearLocalHooks(),(0,r.arrayEach)(this.elements,function(e){return e.destroy()}),this.elements=null,this.hot=null}}]),e}();(0,o.mixin)(u,i.default),(0,o.mixin)(u,a.default);var c=u;t.default=c},function(e,t,n){"use strict";n(468),n(611),n(613),n(615),n(617),n(619),n(621),n(623),n(625),n(627),n(631)},function(e,t,n){var r=n(12),o=n(11).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var r=n(22),o=n(11),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(61)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){t.f=n(17)},function(e,t,n){var r=n(108)("keys"),o=n(60);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(45);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(11).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(12),o=n(9),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(43)(Function.call,n(39).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},function(e,t){e.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},function(e,t,n){var r=n(12),o=n(114).set;e.exports=function(e,t,n){var i,a=t.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(e,i),e}},function(e,t,n){"use strict";var r=n(38),o=n(46);e.exports=function(e){var t=String(o(this)),n="",i=r(e);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(38),o=n(46);e.exports=function(e){return function(t,n){var i,a,s=String(o(t)),l=r(n),u=s.length;return l<0||l>=u?e?"":void 0:(i=s.charCodeAt(l))<55296||i>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):i:e?s.slice(l,l+2):a-56320+(i-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(61),o=n(0),i=n(25),a=n(31),s=n(69),l=n(161),u=n(68),c=n(66),f=n(17)("iterator"),h=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,t,n,p,g,v,y){l(n,t,p);var m,w,b,C=function(e){if(!h&&e in _)return _[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",O="values"==g,S=!1,_=e.prototype,T=_[f]||_["@@iterator"]||g&&_[g],R=T||C(g),M=g?O?C("entries"):R:void 0,k="Array"==t&&_.entries||T;if(k&&(b=c(k.call(new e)))!==Object.prototype&&b.next&&(u(b,E,!0),r||"function"==typeof b[f]||a(b,f,d)),O&&T&&"values"!==T.name&&(S=!0,R=function(){return T.call(this)}),r&&!y||!h&&!S&&_[f]||a(_,f,R),s[t]=R,s[E]=d,g)if(m={values:O?R:C("values"),keys:v?R:C("keys"),entries:M},y)for(w in m)w in _||i(_,w,m[w]);else o(o.P+o.F*(h||S),t,m);return m}},function(e,t,n){var r=n(123),o=n(46);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(e))}},function(e,t,n){var r=n(12),o=n(45),i=n(17)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(17)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){var r=n(69),o=n(17)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){"use strict";var r=n(19),o=n(59);e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},function(e,t,n){var r=n(80),o=n(17)("iterator"),i=n(69);e.exports=n(22).getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){"use strict";var r=n(26),o=n(63),i=n(18);e.exports=function(e){for(var t=r(this),n=i(t.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,u=void 0===l?n:o(l,n);u>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(70),o=n(165),i=n(69),a=n(32);e.exports=n(121)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var r=n(94),o=RegExp.prototype.exec,i=String.prototype.replace,a=o,s=function(){var e=/a/,t=/b*/g;return o.call(e,"a"),o.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),l=void 0!==/()??/.exec("")[1];(s||l)&&(a=function(e){var t,n,a,u,c=this;return l&&(n=new RegExp("^"+c.source+"$(?!\\s)",r.call(c))),s&&(t=c.lastIndex),a=o.call(c,e),s&&a&&(c.lastIndex=c.global?a.index+a[0].length:t),l&&a&&a.length>1&&i.call(a[0],n,function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(a[u]=void 0)}),a}),e.exports=a},function(e,t,n){"use strict";var r=n(120)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r,o,i,a=n(43),s=n(155),l=n(113),u=n(107),c=n(11),f=c.process,h=c.setImmediate,d=c.clearImmediate,p=c.MessageChannel,g=c.Dispatch,v=0,y={},m=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},w=function(e){m.call(e.data)};h&&d||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++v]=function(){s("function"==typeof e?e:Function(e),t)},r(v),v},d=function(e){delete y[e]},"process"==n(45)(f)?r=function(e){f.nextTick(a(m,e,1))}:g&&g.now?r=function(e){g.now(a(m,e,1))}:p?(i=(o=new p).port2,o.port1.onmessage=w,r=a(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",w,!1)):r="onreadystatechange"in u("script")?function(e){l.appendChild(u("script")).onreadystatechange=function(){l.removeChild(this),m.call(e)}}:function(e){setTimeout(a(m,e,1),0)}),e.exports={set:h,clear:d}},function(e,t,n){"use strict";var r=n(11),o=n(21),i=n(61),a=n(100),s=n(31),l=n(73),u=n(8),c=n(72),f=n(38),h=n(18),d=n(173),p=n(65).f,g=n(19).f,v=n(128),y=n(68),m="prototype",w="Wrong index!",b=r.ArrayBuffer,C=r.DataView,E=r.Math,O=r.RangeError,S=r.Infinity,_=b,T=E.abs,R=E.pow,M=E.floor,k=E.log,N=E.LN2,A=o?"_b":"buffer",I=o?"_l":"byteLength",D=o?"_o":"byteOffset";function P(e,t,n){var r,o,i,a=new Array(n),s=8*n-t-1,l=(1<<s)-1,u=l>>1,c=23===t?R(2,-24)-R(2,-77):0,f=0,h=e<0||0===e&&1/e<0?1:0;for((e=T(e))!=e||e===S?(o=e!=e?1:0,r=l):(r=M(k(e)/N),e*(i=R(2,-r))<1&&(r--,i*=2),(e+=r+u>=1?c/i:c*R(2,1-u))*i>=2&&(r++,i/=2),r+u>=l?(o=0,r=l):r+u>=1?(o=(e*i-1)*R(2,t),r+=u):(o=e*R(2,u-1)*R(2,t),r=0));t>=8;a[f++]=255&o,o/=256,t-=8);for(r=r<<t|o,s+=t;s>0;a[f++]=255&r,r/=256,s-=8);return a[--f]|=128*h,a}function x(e,t,n){var r,o=8*n-t-1,i=(1<<o)-1,a=i>>1,s=o-7,l=n-1,u=e[l--],c=127&u;for(u>>=7;s>0;c=256*c+e[l],l--,s-=8);for(r=c&(1<<-s)-1,c>>=-s,s+=t;s>0;r=256*r+e[l],l--,s-=8);if(0===c)c=1-a;else{if(c===i)return r?NaN:u?-S:S;r+=R(2,t),c-=a}return(u?-1:1)*r*R(2,c-t)}function L(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function H(e){return[255&e]}function j(e){return[255&e,e>>8&255]}function F(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function V(e){return P(e,52,8)}function B(e){return P(e,23,4)}function U(e,t,n){g(e[m],t,{get:function(){return this[n]}})}function W(e,t,n,r){var o=d(+n);if(o+t>e[I])throw O(w);var i=e[A]._b,a=o+e[D],s=i.slice(a,a+t);return r?s:s.reverse()}function Y(e,t,n,r,o,i){var a=d(+n);if(a+t>e[I])throw O(w);for(var s=e[A]._b,l=a+e[D],u=r(+o),c=0;c<t;c++)s[l+c]=u[i?c:t-c-1]}if(a.ABV){if(!u(function(){b(1)})||!u(function(){new b(-1)})||u(function(){return new b,new b(1.5),new b(NaN),"ArrayBuffer"!=b.name})){for(var $,G=(b=function(e){return c(this,b),new _(d(e))})[m]=_[m],z=p(_),X=0;z.length>X;)($=z[X++])in b||s(b,$,_[$]);i||(G.constructor=b)}var K=new C(new b(2)),q=C[m].setInt8;K.setInt8(0,2147483648),K.setInt8(1,2147483649),!K.getInt8(0)&&K.getInt8(1)||l(C[m],{setInt8:function(e,t){q.call(this,e,t<<24>>24)},setUint8:function(e,t){q.call(this,e,t<<24>>24)}},!0)}else b=function(e){c(this,b,"ArrayBuffer");var t=d(e);this._b=v.call(new Array(t),0),this[I]=t},C=function(e,t,n){c(this,C,"DataView"),c(e,b,"DataView");var r=e[I],o=f(t);if(o<0||o>r)throw O("Wrong offset!");if(o+(n=void 0===n?r-o:h(n))>r)throw O("Wrong length!");this[A]=e,this[D]=o,this[I]=n},o&&(U(b,"byteLength","_l"),U(C,"buffer","_b"),U(C,"byteLength","_l"),U(C,"byteOffset","_o")),l(C[m],{getInt8:function(e){return W(this,1,e)[0]<<24>>24},getUint8:function(e){return W(this,1,e)[0]},getInt16:function(e){var t=W(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=W(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return L(W(this,4,e,arguments[1]))},getUint32:function(e){return L(W(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return x(W(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return x(W(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){Y(this,1,e,H,t)},setUint8:function(e,t){Y(this,1,e,H,t)},setInt16:function(e,t){Y(this,2,e,j,t,arguments[2])},setUint16:function(e,t){Y(this,2,e,j,t,arguments[2])},setInt32:function(e,t){Y(this,4,e,F,t,arguments[2])},setUint32:function(e,t){Y(this,4,e,F,t,arguments[2])},setFloat32:function(e,t){Y(this,4,e,B,t,arguments[2])},setFloat64:function(e,t){Y(this,8,e,V,t,arguments[2])}});y(b,"ArrayBuffer"),y(C,"DataView"),s(C[m],a.VIEW,!0),t.ArrayBuffer=b,t.DataView=C},function(e,t,n){"use strict";t.__esModule=!0,t.registerCellType=O,t.getCellType=function(e){if(!b(e))throw Error('You declared cell type "'.concat(e,'" 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 registered by "Handsontable.cellTypes.registerCellType" method'));return w(e)},t.getRegisteredCellTypes=t.getRegisteredCellTypeNames=t.hasCellType=void 0;var r=v(n(54)),o=n(28),i=n(20),a=n(55),s=v(n(666)),l=v(n(667)),u=v(n(668)),c=v(n(669)),f=v(n(670)),h=v(n(671)),d=v(n(672)),p=v(n(673)),g=v(n(674));function v(e){return e&&e.__esModule?e:{default:e}}var y=(0,r.default)("cellTypes"),m=y.register,w=y.getItem,b=y.hasItem,C=y.getNames,E=y.getValues;function O(e,t){var n=t.editor,r=t.renderer,s=t.validator;n&&(0,o.registerEditor)(e,n),r&&(0,i.registerRenderer)(e,r),s&&(0,a.registerValidator)(e,s),m(e,t)}t.getRegisteredCellTypes=E,t.getRegisteredCellTypeNames=C,t.hasCellType=b,O("autocomplete",s.default),O("checkbox",l.default),O("date",u.default),O("dropdown",c.default),O("handsontable",f.default),O("numeric",h.default),O("password",d.default),O("text",p.default),O("time",g.default)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n,P,V,B,U,W=this,Y=arguments.length>2&&void 0!==arguments[2]&&arguments[2],$=!1,G=this,z=function(){},X=new f.default(G);(0,h.extend)(z.prototype,R.default.prototype),(0,h.extend)(z.prototype,t),(0,h.extend)(z.prototype,re(t)),(0,A.applyLanguageSetting)(z.prototype,t.language),(0,S.hasValidParameter)(Y)&&(0,S.registerAsRootInstance)(this);(0,I.startObserving)(),this.isDestroyed=!1,this.rootElement=e,this.isHotTableEnv=(0,r.isChildOfWebComponentTable)(this.rootElement),f.default.isHotTableEnv=this.isHotTableEnv,this.container=document.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,S.isRootInstance)(this)&&(0,s._injectProductInfo)(t.licenseKey,e);this.guid="ht_".concat((0,m.randomString)());var K=(0,O.getTranslator)(G);V=new C.default(G),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);n={cellSettings:[],columnSettings:[],columnsSettingConflicts:["data","width","language"],settings:new z,selRange:null,isPopulated:null,scrollable:null,firstRun:!0};var q=new D.Selection(n.settings,{countCols:function(){return G.countCols()},countRows:function(){return G.countRows()},propToCol:function(e){return P.propToCol(e)},isEditorOpened:function(){return!!G.getActiveEditor()&&G.getActiveEditor().isOpened()}});function Z(e){var t=(0,A.normalizeLanguageCode)(e);(0,N.hasLanguageDictionary)(t)?(G.runHooks("beforeLanguageChange",t),z.prototype.language=t,G.runHooks("afterLanguageChange",t)):(0,A.warnUserAboutLanguageRegistration)(e)}function Q(){var e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue:function(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue:function(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty:function(){},checkIfQueueIsEmpty:function(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function J(e){var t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function ee(e,t,n){var o=new Q,s=function(e){return e.length>0&&/^\s*[+-.]?\s*(?:(?:\d+(?:(\.|,)\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/.test(e)};o.onQueueEmpty=function(){var r;e.length&&(r=G.runHooks("beforeChange",e,t||"edit"),(0,i.isFunction)(r)?(0,a.warn)("Your beforeChange callback returns a function. It's not supported since Handsontable 0.12.1 (and the returned function will not be executed)."):!1===r&&e.splice(0,e.length));n()};for(var l=e.length-1;l>=0;l--)if(null===e[l])e.splice(l,1);else{var u=H(e[l],4),c=u[0],f=u[1],h=u[3],d=P.propToCol(f),p=G.getCellMeta(c,d);"numeric"===p.type&&"string"==typeof h&&s(h)&&(e[l][3]=J(h)),G.getCellValidator(p)&&(o.addValidatorToQueue(),G.validateCell(e[l][3],p,function(t,n){return function(i){if("boolean"!=typeof i)throw new Error("Validation error: result is not boolean");if(!1===i&&!1===n.allowInvalid){e.splice(t,1),n.valid=!0;var a=G.getCell(n.visualRow,n.visualCol);null!==a&&(0,r.removeClass)(a,G.getSettings().invalidCellClassName)}o.removeValidatorFormQueue()}}(l,p),t))}o.checkIfQueueIsEmpty()}function te(e,t){var r=e.length-1;if(!(r<0)){for(;r>=0;r--){var o=!1;if(null!==e[r]){if(null!==e[r][2]&&void 0!==e[r][2]||null!==e[r][3]&&void 0!==e[r][3]){if(n.settings.allowInsertRow)for(;e[r][0]>G.countRows()-1;){var i=P.createRow(void 0,void 0,t);if(0===i){o=!0;break}}if(!o){if("array"===G.dataType&&(!n.settings.columns||0===n.settings.columns.length)&&n.settings.allowInsertColumn)for(;P.propToCol(e[r][1])>G.countCols()-1;)P.createCol(void 0,void 0,t);P.set(e[r][0],e[r][1],e[r][3])}}}else e.splice(r,1)}G.forceFullRender=!0,B.adjustRowsAndCols(),G.runHooks("beforeChangeRender",e,t),U.lockEditor(),G._refreshBorders(null),U.unlockEditor(),G.view.wt.wtOverlays.adjustElementsSize(),G.runHooks("afterChange",e,t||"edit");var a=G.getActiveEditor();a&&(0,s.isDefined)(a.refreshValue)&&a.refreshValue()}}function ne(e,t,n){return"object"===L(e)?e:[[e,t,n]]}function re(e){if((0,h.hasOwnProperty)(e,"type")){var t,n={};for(var r in"object"===L(e.type)?t=e.type:"string"==typeof e.type&&(t=(0,M.getCellType)(e.type)),t)(0,h.hasOwnProperty)(t,r)&&!(0,h.hasOwnProperty)(e,r)&&(n[r]=t[r]);return n}}this.selection=q,this.selection.addLocalHook("beforeSetRangeStart",function(e){W.runHooks("beforeSetRangeStart",e)}),this.selection.addLocalHook("beforeSetRangeStartOnly",function(e){W.runHooks("beforeSetRangeStartOnly",e)}),this.selection.addLocalHook("beforeSetRangeEnd",function(e){W.runHooks("beforeSetRangeEnd",e),e.row<0&&(e.row=W.view.wt.wtTable.getFirstVisibleRow()),e.col<0&&(e.col=W.view.wt.wtTable.getFirstVisibleColumn())}),this.selection.addLocalHook("afterSetRangeEnd",function(e){var t=(0,h.createObjectPropListener)(!1),n=W.selection.getSelectedRange(),o=n.current(),i=o.from,a=o.to,s=n.size()-1;W.runHooks("afterSelection",i.row,i.col,a.row,a.col,t,s),W.runHooks("afterSelectionByProp",i.row,G.colToProp(i.col),a.row,G.colToProp(a.col),t,s);var l=W.selection.isSelectedByAnyHeader(),u=W.selection.selectedRange.current(),c=!0;$&&(c=!1),t.isTouched()&&(c=!t.value);var f=W.selection.isSelectedByRowHeader(),d=W.selection.isSelectedByColumnHeader();!1!==c&&(l?f?W.view.scrollViewportVertically(e.row):d&&W.view.scrollViewportHorizontally(e.col):u&&!W.selection.isMultiple()?W.view.scrollViewport(u.from):W.view.scrollViewport(e)),f&&d?(0,r.addClass)(W.rootElement,["ht__selection--rows","ht__selection--columns"]):f?((0,r.removeClass)(W.rootElement,"ht__selection--columns"),(0,r.addClass)(W.rootElement,"ht__selection--rows")):d?((0,r.removeClass)(W.rootElement,"ht__selection--rows"),(0,r.addClass)(W.rootElement,"ht__selection--columns")):(0,r.removeClass)(W.rootElement,["ht__selection--rows","ht__selection--columns"]),W._refreshBorders(null)}),this.selection.addLocalHook("afterSelectionFinished",function(e){var t=e.length-1,n=e[t],r=n.from,o=n.to;W.runHooks("afterSelectionEnd",r.row,r.col,o.row,o.col,t),W.runHooks("afterSelectionEndByProp",r.row,G.colToProp(r.col),o.row,G.colToProp(o.col),t)}),this.selection.addLocalHook("afterIsMultipleSelection",function(e){var t=W.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)}),this.selection.addLocalHook("beforeModifyTransformStart",function(e){W.runHooks("modifyTransformStart",e)}),this.selection.addLocalHook("afterModifyTransformStart",function(e,t,n){W.runHooks("afterModifyTransformStart",e,t,n)}),this.selection.addLocalHook("beforeModifyTransformEnd",function(e){W.runHooks("modifyTransformEnd",e)}),this.selection.addLocalHook("afterModifyTransformEnd",function(e,t,n){W.runHooks("afterModifyTransformEnd",e,t,n)}),this.selection.addLocalHook("afterDeselect",function(){U.destroyEditor(),W._refreshBorders(),(0,r.removeClass)(W.rootElement,["ht__selection--rows","ht__selection--columns"]),W.runHooks("afterDeselect")}),this.selection.addLocalHook("insertRowRequire",function(e){W.alter("insert_row",e,1,"auto")}),this.selection.addLocalHook("insertColRequire",function(e){W.alter("insert_col",e,1,"auto")}),B={alter:function(e,t){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;function l(e,t,n,r){var o=(0,d.arrayMap)(new Array(n),function(){return function(){var e;"array"===r?e=[]:"object"===r&&(e={});return e}()});o.unshift(t,0),e.splice.apply(e,j(o))}var u=function(e){if(0===e.length)return[];var t=j(e);t.sort(function(e,t){var n=H(e,1),r=n[0],o=H(t,1),i=o[0];return r===i?0:r>i?1:-1});var n=(0,d.arrayReduce)(t,function(e,t){var n=H(t,2),r=n[0],o=n[1],i=e[e.length-1],a=H(i,2),s=a[0],l=a[1],u=s+l;if(r<=u){var c=Math.max(o-(u-r),0);i[1]+=c}else e.push([r,o]);return e},[t[0]]);return n};switch(e){case"insert_row":var c=G.countSourceRows();if(G.getSettings().maxRows===c)return;t=(0,s.isDefined)(t)?t:c,r=P.createRow(t,o,i),l(n.cellSettings,t,o,"array"),r&&(q.isSelected()&&q.selectedRange.current().from.row>=t?(q.selectedRange.current().from.row+=r,q.transformEnd(r,0)):G._refreshBorders());break;case"insert_col":r=P.createCol(t,o,i);for(var f=0,h=G.countSourceRows();f<h;f++)n.cellSettings[f]&&l(n.cellSettings[f],t,o);if(r){if(Array.isArray(G.getSettings().colHeaders)){var p=[t,0];p.length+=r,Array.prototype.splice.apply(G.getSettings().colHeaders,p)}q.isSelected()&&q.selectedRange.current().from.col>=t?(q.selectedRange.current().from.col+=r,q.transformEnd(0,r)):G._refreshBorders()}break;case"remove_row":var g=function(e){var t=0;(0,d.arrayEach)(e,function(e){var r=H(e,2),a=r[0],l=r[1],u=(0,s.isEmpty)(a)?G.countRows()-1:Math.max(a-t,0);Number.isInteger(a)&&(a=Math.max(a-t,0)),P.removeRow(a,l,i),n.cellSettings.splice(u,o);var c=G.countRows(),f=G.getSettings().fixedRowsTop;f>=u+1&&(G.getSettings().fixedRowsTop-=Math.min(l,f-u));var h=G.getSettings().fixedRowsBottom;h&&u>=c-h&&(G.getSettings().fixedRowsBottom-=Math.min(l,h)),t+=l})};Array.isArray(t)?g(u(t)):g([[t,o]]),B.adjustRowsAndCols(),G._refreshBorders();break;case"remove_col":var v=function(e){var t=0;(0,d.arrayEach)(e,function(e){var r=H(e,2),o=r[0],a=r[1],l=(0,s.isEmpty)(o)?G.countCols()-1:Math.max(o-t,0),u=K.toPhysicalColumn(l);Number.isInteger(o)&&(o=Math.max(o-t,0)),P.removeCol(o,a,i);for(var c=0,f=G.countSourceRows();c<f;c++)n.cellSettings[c]&&n.cellSettings[c].splice(u,a);var h=G.getSettings().fixedColumnsLeft;h>=l+1&&(G.getSettings().fixedColumnsLeft-=Math.min(a,h-l)),Array.isArray(G.getSettings().colHeaders)&&(void 0===u&&(u=-1),G.getSettings().colHeaders.splice(u,a)),t+=a})};Array.isArray(t)?v(u(t)):v([[t,o]]),B.adjustRowsAndCols(),G._refreshBorders();break;default:throw new Error('There is no such action "'.concat(e,'"'))}a||B.adjustRowsAndCols()},adjustRowsAndCols:function(){if(n.settings.minRows){var e=G.countRows();if(e<n.settings.minRows)for(var t=0,r=n.settings.minRows;t<r-e;t++)P.createRow(G.countRows(),1,"auto")}if(n.settings.minSpareRows){var o=G.countEmptyRows(!0);if(o<n.settings.minSpareRows)for(;o<n.settings.minSpareRows&&G.countSourceRows()<n.settings.maxRows;o++)P.createRow(G.countRows(),1,"auto")}var i;if((n.settings.minCols||n.settings.minSpareCols)&&(i=G.countEmptyCols(!0)),n.settings.minCols&&!n.settings.columns&&G.countCols()<n.settings.minCols)for(;G.countCols()<n.settings.minCols;i++)P.createCol(G.countCols(),1,"auto");if(n.settings.minSpareCols&&!n.settings.columns&&"array"===G.dataType&&i<n.settings.minSpareCols)for(;i<n.settings.minSpareCols&&G.countCols()<n.settings.maxCols;i++)P.createCol(G.countCols(),1,"auto");var a=G.countRows(),s=G.countCols();0!==a&&0!==s||q.deselect(),q.isSelected()&&(0,d.arrayEach)(q.selectedRange,function(e){var t=!1,n=e.from.row,r=e.from.col,o=e.to.row,i=e.to.col;n>a-1?(t=!0,o>(n=a-1)&&(o=n)):o>a-1&&(t=!0,n>(o=a-1)&&(n=o)),r>s-1?(t=!0,i>(r=s-1)&&(i=r)):i>s-1&&(t=!0,r>(i=s-1)&&(r=i)),t&&G.selectCell(n,r,o,i)}),G.view&&G.view.wt.wtOverlays.adjustElementsSize()},populateFromArray:function(e,t,r,o,i,a,l){var u,c,f,d,p,g,v,y,m=[],w={};if(0===(c=t.length))return!1;switch(i){case"shift_down":for(p=r?r.col-e.col+1:0,g=r?r.row-e.row+1:0,t=(0,E.translateRowsToColumns)(t),f=0,d=t.length,v=Math.max(d,p);f<v;f++)if(f<d){var b;for(u=0,c=t[f].length;u<g-c;u++)t[f].push(t[f][u%c]);t[f].unshift(e.col+f,e.row,0),(b=G).spliceCol.apply(b,j(t[f]))}else{var C;t[f%d][0]=e.col+f,(C=G).spliceCol.apply(C,j(t[f%d]))}break;case"shift_right":for(p=r?r.col-e.col+1:0,g=r?r.row-e.row+1:0,u=0,c=t.length,y=Math.max(c,g);u<y;u++)if(u<c){var O;for(f=0,d=t[u].length;f<p-d;f++)t[u].push(t[u][f%d]);t[u].unshift(e.row+u,e.col,0),(O=G).spliceRow.apply(O,j(t[u]))}else{var S;t[u%c][0]=e.row+u,(S=G).spliceRow.apply(S,j(t[u%c]))}break;case"overwrite":default:w.row=e.row,w.col=e.col;var _,T={row:r&&e?r.row-e.row+1:1,col:r&&e?r.col-e.col+1:1},R=0,M=0,k=!0,N=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=t[e%t.length];return null!==n?r[n%r.length]:r},A=t.length,I=r?r.row-e.row+1:0;for(c=r?I:Math.max(A,I),u=0;u<c&&!(r&&w.row>r.row&&I>A||!n.settings.allowInsertRow&&w.row>G.countRows()-1||w.row>=n.settings.maxRows);u++){var D=u-R,P=N(D).length,x=r?r.col-e.col+1:0;if(d=r?x:Math.max(P,x),w.col=e.col,_=G.getCellMeta(w.row,w.col),"CopyPaste.paste"!==o&&"Autofill.autofill"!==o||!_.skipRowOnPaste){for(M=0,f=0;f<d&&!(r&&w.col>r.col&&x>P||!n.settings.allowInsertColumn&&w.col>G.countCols()-1||w.col>=n.settings.maxCols);f++)if(_=G.getCellMeta(w.row,w.col),"CopyPaste.paste"!==o&&"Autofill.fill"!==o||!_.skipColumnOnPaste)if(_.readOnly)w.col+=1;else{var H=f-M,F=N(D,H),V=G.getDataAtCell(w.row,w.col),B={row:D,col:H};if("Autofill.fill"===o){var U=G.runHooks("beforeAutofillInsidePopulate",B,a,t,l,{},T);U&&(F=(0,s.isUndefined)(U.value)?F:U.value)}if(null!==F&&"object"===L(F))if(null===V||"object"!==L(V))k=!1;else{var W=(0,h.duckSchema)(V[0]||V),Y=(0,h.duckSchema)(F[0]||F);(0,h.isObjectEqual)(W,Y)?F=(0,h.deepClone)(F):k=!1}else null!==V&&"object"===L(V)&&(k=!1);k&&m.push([w.row,w.col,F]),k=!0,w.col+=1}else M+=1,w.col+=1,d+=1;w.row+=1}else R+=1,w.row+=1,c+=1}G.setDataAtCell(m,null,null,o||"populateFromArray")}}},this.init=function(){V.setData(n.settings.data),G.runHooks("beforeInit"),(0,l.isMobileBrowser)()&&(0,r.addClass)(G.rootElement,"mobile"),this.updateSettings(n.settings,!0),this.view=new b.default(this),U=c.default.getInstance(G,n,q,P),this.forceFullRender=!0,G.runHooks("init"),this.view.render(),"object"===L(n.firstRun)&&(G.runHooks("afterChange",n.firstRun[0],n.firstRun[1]),n.firstRun=!1),G.runHooks("afterInit")},this.validateCell=function(e,t,n,r){var o=G.getCellValidator(t);function a(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(r&&!0!==t.hidden){var o=t.visualCol,i=t.visualRow,a=G.getCell(i,o,!0);a&&"TH"!==a.nodeName&&G.view.wt.wtSettings.settings.cellRenderer(i,o,a),n(e)}else n(e)}(0,s.isRegExp)(o)&&(o=function(e){return function(t,n){n(e.test(t))}}(o)),(0,i.isFunction)(o)?(e=G.runHooks("beforeValidate",e,t.visualRow,t.prop,r),G._registerTimeout(setTimeout(function(){o.call(t,e,function(n){n=G.runHooks("afterValidate",n,e,t.visualRow,t.prop,r),t.valid=n,a(n),G.runHooks("postAfterValidate",n,e,t.visualRow,t.prop,r)})},0))):G._registerTimeout(setTimeout(function(){t.valid=!0,a(t.valid,!1)},0))},this.setDataAtCell=function(e,t,n,r){var o,i,a,s=ne(e,t,n),l=[],u=r;for(o=0,i=s.length;o<i;o++){if("object"!==L(s[o]))throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof s[o][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");a=P.colToProp(s[o][1]),l.push([s[o][0],a,V.getAtCell(K.toPhysicalRow(s[o][0]),s[o][1]),s[o][2]])}u||"object"!==L(e)||(u=t),G.runHooks("afterSetDataAtCell",l,u),ee(l,u,function(){te(l,u)})},this.setDataAtRowProp=function(e,t,n,r){var o,i,a=ne(e,t,n),s=[],l=r;for(o=0,i=a.length;o<i;o++)s.push([a[o][0],a[o][1],V.getAtCell(K.toPhysicalRow(a[o][0]),a[o][1]),a[o][2]]);l||"object"!==L(e)||(l=t),G.runHooks("afterSetDataAtRowProp",s,l),ee(s,l,function(){te(s,l)})},this.listen=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(e){var t=!document.activeElement||document.activeElement&&void 0===document.activeElement.nodeName;document.activeElement&&document.activeElement!==document.body&&!t?document.activeElement.blur():t&&document.body.focus()}G&&!G.isListening()&&(F=G.guid,G.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(F=null,G.runHooks("afterUnlisten"))},this.isListening=function(){return F===G.guid},this.destroyEditor=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];G._refreshBorders(e,t)},this.populateFromArray=function(e,t,n,r,o,i,a,s,l){if("object"!==L(n)||"object"!==L(n[0]))throw new Error("populateFromArray parameter `input` must be an array of arrays");var u="number"==typeof r?new _.CellCoords(r,o):null;return B.populateFromArray(new _.CellCoords(e,t),n,u,i,a,s,l)},this.spliceCol=function(e,t,n){for(var r,o=arguments.length,i=new Array(o>3?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];return(r=P).spliceCol.apply(r,[e,t,n].concat(i))},this.spliceRow=function(e,t,n){for(var r,o=arguments.length,i=new Array(o>3?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];return(r=P).spliceRow.apply(r,[e,t,n].concat(i))},this.getSelected=function(){if(q.isSelected())return(0,d.arrayMap)(q.getSelectedRange(),function(e){var t=e.from,n=e.to;return[t.row,t.col,n.row,n.col]})},this.getSelectedLast=function(){var e,t=this.getSelected();return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedRange=function(){if(q.isSelected())return Array.from(q.getSelectedRange())},this.getSelectedRangeLast=function(){var e,t=this.getSelectedRange();return t&&t.length>0&&(e=t[t.length-1]),e},this.emptySelectedCells=function(){var e=this;if(q.isSelected()){var t=[];(0,d.arrayEach)(q.getSelectedRange(),function(n){var r=n.getTopLeftCorner(),o=n.getBottomRightCorner();(0,w.rangeEach)(r.row,o.row,function(n){(0,w.rangeEach)(r.col,o.col,function(r){e.getCellMeta(n,r).readOnly||t.push([n,r,""])})})}),t.length>0&&this.setDataAtCell(t)}},this.render=function(){G.view&&(G.renderCall=!0,G.forceFullRender=!0,U.lockEditor(),G._refreshBorders(null),U.unlockEditor())},this.loadData=function(e){if(Array.isArray(n.settings.dataSchema)?G.dataType="array":(0,i.isFunction)(n.settings.dataSchema)?G.dataType="function":G.dataType="object",P&&P.destroy(),P=new u.default(G,n,z),"object"===L(e)&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error("loadData only accepts array of objects or array of arrays (".concat(L(e)," given)"));var t,r=P.getSchema();e=[];var o=0,a=0;for(o=0,a=n.settings.startRows;o<a;o++)if("object"!==G.dataType&&"function"!==G.dataType||!n.settings.dataSchema)if("array"===G.dataType)t=(0,h.deepClone)(r[0]),e.push(t);else{t=[];for(var s=0,l=n.settings.startCols;s<l;s++)t.push(null);e.push(t)}else t=(0,h.deepClone)(r),e.push(t)}n.isPopulated=!1,z.prototype.data=e,Array.isArray(e[0])&&(G.dataType="array"),P.dataSource=e,V.data=e,V.dataType=G.dataType,V.colToProp=P.colToProp.bind(P),V.propToCol=P.propToCol.bind(P),n.cellSettings.length=0,B.adjustRowsAndCols(),G.runHooks("afterLoadData",n.firstRun),n.firstRun?n.firstRun=[null,"loadData"]:(G.runHooks("afterChange",null,"loadData"),G.render()),n.isPopulated=!0},this.getData=function(e,t,n,r){return(0,s.isUndefined)(e)?P.getAll():P.getRange(new _.CellCoords(e,t),new _.CellCoords(n,r),P.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,n,r){return P.getCopyableText(new _.CellCoords(e,t),new _.CellCoords(n,r))},this.getCopyableData=function(e,t){return P.getCopyable(e,P.colToProp(t))},this.getSchema=function(){return P.getSchema()},this.updateSettings=function(e){var t,a,l,u=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=!1;if((0,s.isDefined)(e.rows))throw new Error('"rows" setting is no longer supported. do you mean startRows, minRows or maxRows?');if((0,s.isDefined)(e.cols))throw new Error('"cols" setting is no longer supported. do you mean startCols, minCols or maxCols?');for(t in e)"data"!==t&&("language"!==t?T.default.getSingleton().getRegistered().indexOf(t)>-1?((0,i.isFunction)(e[t])||Array.isArray(e[t]))&&(e[t].initialHook=!0,G.addHook(t,e[t])):!u&&(0,h.hasOwnProperty)(e,t)&&(z.prototype[t]=e[t]):Z(e.language));void 0===e.data&&void 0===n.settings.data?G.loadData(null):void 0!==e.data?G.loadData(e.data):void 0!==e.columns&&P.createMap(),l=G.countCols();var f,d,p=e.columns||z.prototype.columns;if(p&&(0,i.isFunction)(p)&&(l=G.countSourceCols(),c=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||(n.cellSettings.length=0),l>0)for(t=0,a=0;t<l;t++)c&&!p(t)||(n.columnSettings[a]=(0,o.columnFactory)(z,n.columnsSettingConflicts),f=n.columnSettings[a].prototype,p&&(d=c?p(t):p[a])&&((0,h.extend)(f,d),(0,h.extend)(f,re(d))),a+=1);(0,s.isDefined)(e.cell)&&(0,h.objectEach)(e.cell,function(e){G.setCellMetaObject(e.row,e.col,e)}),G.runHooks("afterCellMetaReset"),(0,s.isDefined)(e.className)&&(z.prototype.className&&(0,r.removeClass)(G.rootElement,z.prototype.className),e.className&&(0,r.addClass)(G.rootElement,e.className));var g=G.rootElement.style.height;""!==g&&(g=parseInt(G.rootElement.style.height,10));var v=e.height;if((0,i.isFunction)(v)&&(v=v()),u){var y=G.rootElement.getAttribute("style");y&&G.rootElement.setAttribute("data-initialstyle",G.rootElement.getAttribute("style"))}if(null===v){var m=G.rootElement.getAttribute("data-initialstyle");m&&(m.indexOf("height")>-1||m.indexOf("overflow")>-1)?G.rootElement.setAttribute("style",m):(G.rootElement.style.height="",G.rootElement.style.overflow="")}else void 0!==v&&(G.rootElement.style.height="".concat(v,"px"),G.rootElement.style.overflow="hidden");if(void 0!==e.width){var w=e.width;(0,i.isFunction)(w)&&(w=w()),G.rootElement.style.width="".concat(w,"px")}u||(P.clearLengthCache(),G.view&&G.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked(),G.runHooks("afterUpdateSettings",e)),B.adjustRowsAndCols(),G.view&&!n.firstRun&&(G.forceFullRender=!0,U.lockEditor(),G._refreshBorders(null),U.unlockEditor()),u||!G.view||""!==g&&""!==v&&void 0!==v||g===v||G.view.wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){var e=G.getSelectedLast();if(z.prototype.getValue){if((0,i.isFunction)(z.prototype.getValue))return z.prototype.getValue.call(G);if(e)return G.getData()[e[0][0]][z.prototype.getValue]}else if(e)return G.getDataAtCell(e[0],e[1])},this.getSettings=function(){return n.settings},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,n,r,o){B.alter(e,t,n,r,o)},this.getCell=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return G.view.getCellAtCoords(new _.CellCoords(e,t),n)},this.getCoords=function(e){return this.view.wt.wtTable.getCoords.call(this.view.wt.wtTable,e)},this.colToProp=function(e){return P.colToProp(e)},this.propToCol=function(e){return P.propToCol(e)},this.toVisualRow=function(e){return K.toVisualRow(e)},this.toVisualColumn=function(e){return K.toVisualColumn(e)},this.toPhysicalRow=function(e){return K.toPhysicalRow(e)},this.toPhysicalColumn=function(e){return K.toPhysicalColumn(e)},this.getDataAtCell=function(e,t){return P.get(e,P.colToProp(t))},this.getDataAtRowProp=function(e,t){return P.get(e,t)},this.getDataAtCol=function(e){var t;return(t=[]).concat.apply(t,j(P.getRange(new _.CellCoords(0,e),new _.CellCoords(n.settings.data.length-1,e),P.DESTINATION_RENDERER)))},this.getDataAtProp=function(e){var t,r=P.getRange(new _.CellCoords(0,P.propToCol(e)),new _.CellCoords(n.settings.data.length-1,P.propToCol(e)),P.DESTINATION_RENDERER);return(t=[]).concat.apply(t,j(r))},this.getSourceData=function(e,t,n,r){return void 0===e?V.getData():V.getByRange(new _.CellCoords(e,t),new _.CellCoords(n,r))},this.getSourceDataArray=function(e,t,n,r){return void 0===e?V.getData(!0):V.getByRange(new _.CellCoords(e,t),new _.CellCoords(n,r),!0)},this.getSourceDataAtCol=function(e){return V.getAtColumn(e)},this.getSourceDataAtRow=function(e){return V.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return V.getAtCell(e,t)},this.getDataAtRow=function(e){var t=P.getRange(new _.CellCoords(e,0),new _.CellCoords(e,this.countCols()-1),P.DESTINATION_RENDERER);return t[0]||[]},this.getDataType=function(e,t,n,r){var o=this,i=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,n,r],a=i[0],s=i[1],l=i[2],u=i[3],c=null,f=null;void 0===l&&(l=a),void 0===u&&(u=s);var h="mixed";return(0,w.rangeEach)(Math.min(a,l),Math.max(a,l),function(e){var t=!0;return(0,w.rangeEach)(Math.min(s,u),Math.max(s,u),function(n){var r=o.getCellMeta(e,n);return f=r.type,c?t=c===f:c=f,t}),h=t?f:"mixed",t}),h},this.removeCellMeta=function(e,t,r){var o=K.toPhysical(e,t),i=H(o,2),a=i[0],s=i[1],l=n.cellSettings[a][s][r],u=G.runHooks("beforeRemoveCellMeta",e,t,r,l);!1!==u&&(delete n.cellSettings[a][s][r],G.runHooks("afterRemoveCellMeta",e,t,r,l)),l=null},this.spliceCellsMeta=function(e,t){for(var r,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];(r=n.cellSettings).splice.apply(r,[e,t].concat(i))},this.setCellMetaObject=function(e,t,n){var r=this;"object"===L(n)&&(0,h.objectEach)(n,function(n,o){r.setCellMeta(e,t,o,n)})},this.setCellMeta=function(e,t,r,i){var a=K.toPhysical(e,t),s=H(a,2),l=s[0],u=s[1];n.columnSettings[u]||(n.columnSettings[u]=(0,o.columnFactory)(z,n.columnsSettingConflicts)),n.cellSettings[l]||(n.cellSettings[l]=[]),n.cellSettings[l][u]||(n.cellSettings[l][u]=new n.columnSettings[u]),n.cellSettings[l][u][r]=i,G.runHooks("afterSetCellMeta",e,t,r,i)},this.getCellsMeta=function(){return(0,d.arrayFlatten)(n.cellSettings)},this.getCellMeta=function(e,t){var r=P.colToProp(t),i=K.toPhysical(e,t),a=H(i,2),s=a[0],l=a[1],u=s;null===u&&(u=e),n.columnSettings[l]||(n.columnSettings[l]=(0,o.columnFactory)(z,n.columnsSettingConflicts)),n.cellSettings[u]||(n.cellSettings[u]=[]),n.cellSettings[u][l]||(n.cellSettings[u][l]=new n.columnSettings[l]);var c=n.cellSettings[u][l];if(c.row=u,c.col=l,c.visualRow=e,c.visualCol=t,c.prop=r,c.instance=G,G.runHooks("beforeGetCellMeta",e,t,c),(0,h.extend)(c,re(c)),c.cells){var f=c.cells.call(c,u,l,r);f&&((0,h.extend)(c,f),(0,h.extend)(c,re(f)))}return G.runHooks("afterGetCellMeta",e,t,c),c},this.getCellMetaAtRow=function(e){return n.cellSettings[e]},this.isColumnModificationAllowed=function(){return!("object"===G.dataType||G.getSettings().columns)};var oe=(0,E.cellMethodLookupFactory)("renderer");this.getCellRenderer=function(e,t){return(0,v.getRenderer)(oe.call(this,e,t))},this.getCellEditor=(0,E.cellMethodLookupFactory)("editor");var ie=(0,E.cellMethodLookupFactory)("validator");this.getCellValidator=function(e,t){var n=ie.call(this,e,t);return"string"==typeof n&&(n=(0,y.getValidator)(n)),n},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,n){var r=new Q;e&&(r.onQueueEmpty=e);for(var o=G.countRows()-1;o>=0;)if(void 0===t||-1!==t.indexOf(o)){for(var i=G.countCols()-1;i>=0;)void 0===n||-1!==n.indexOf(i)?(r.addValidatorToQueue(),G.validateCell(G.getDataAtCell(o,i),G.getCellMeta(o,i),function(e){if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(r.valid=!1),r.removeValidatorFormQueue()},"validateCells"),i-=1):i-=1;o-=1}else o-=1;r.checkIfQueueIsEmpty()},this.getRowHeader=function(e){var t=n.settings.rowHeaders,r=e;return void 0!==r&&(r=G.runHooks("modifyRowHeader",r)),void 0===r?(t=[],(0,w.rangeEach)(G.countRows()-1,function(e){t.push(G.getRowHeader(e))})):Array.isArray(t)&&void 0!==t[r]?t=t[r]:(0,i.isFunction)(t)?t=t(r):t&&"string"!=typeof t&&"number"!=typeof t&&(t=r+1),t},this.hasRowHeaders=function(){return!!n.settings.rowHeaders},this.hasColHeaders=function(){if(void 0!==n.settings.colHeaders&&null!==n.settings.colHeaders)return!!n.settings.colHeaders;for(var e=0,t=G.countCols();e<t;e++)if(G.getColHeader(e))return!0;return!1},this.getColHeader=function(e){var t=n.settings.columns&&(0,i.isFunction)(n.settings.columns),r=G.runHooks("modifyColHeader",e),o=n.settings.colHeaders;if(void 0===r){for(var a=[],s=t?G.countSourceCols():G.countCols(),l=0;l<s;l++)a.push(G.getColHeader(l));o=a}else{var u=r,c=G.runHooks("modifyCol",u),f=function(e){for(var t=[],n=G.countSourceCols(),r=0;r<n;r++)(0,i.isFunction)(G.getSettings().columns)&&G.getSettings().columns(r)&&t.push(r);return t[e]}(c);!1===n.settings.colHeaders?o=null:n.settings.columns&&(0,i.isFunction)(n.settings.columns)&&n.settings.columns(f)&&n.settings.columns(f).title?o=n.settings.columns(f).title:n.settings.columns&&n.settings.columns[c]&&n.settings.columns[c].title?o=n.settings.columns[c].title:Array.isArray(n.settings.colHeaders)&&void 0!==n.settings.colHeaders[c]?o=n.settings.colHeaders[c]:(0,i.isFunction)(n.settings.colHeaders)?o=n.settings.colHeaders(c):n.settings.colHeaders&&"string"!=typeof n.settings.colHeaders&&"number"!=typeof n.settings.colHeaders&&(o=(0,E.spreadsheetColumnLabel)(u))}return o},this._getColWidthFromSettings=function(e){var t=G.getCellMeta(0,e),r=t.width;if(void 0!==r&&r!==n.settings.width||(r=t.colWidths),void 0!==r&&null!==r){switch(L(r)){case"object":r=r[e];break;case"function":r=r(e)}"string"==typeof r&&(r=parseInt(r,10))}return r},this.getColWidth=function(e){var t=G._getColWidthFromSettings(e);return void 0===(t=G.runHooks("modifyColWidth",t,e))&&(t=_.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){var t=n.settings.rowHeights;if(void 0!==t&&null!==t){switch(L(t)){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){var t=G._getRowHeightFromSettings(e);return t=G.runHooks("modifyRowHeight",t,e)},this.countSourceRows=function(){var e=G.runHooks("modifySourceLength");return e||(G.getSourceData()?G.getSourceData().length:0)},this.countSourceCols=function(){var e=G.getSourceData()&&G.getSourceData()[0]?G.getSourceData()[0]:[];return(0,h.isObject)(e)?(0,h.deepObjectSize)(e):e.length||0},this.countRows=function(){return P.getLength()},this.countCols=function(){var e=this.getSettings().maxCols,t=!1,r=0;if("array"===G.dataType&&(t=n.settings.data&&n.settings.data[0]&&n.settings.data[0].length),t&&(r=n.settings.data[0].length),n.settings.columns){var o=(0,i.isFunction)(n.settings.columns);if(o)if("array"===G.dataType){for(var a=0,s=0;s<r;s++)n.settings.columns(s)&&(a+=1);r=a}else"object"!==G.dataType&&"function"!==G.dataType||(r=P.colToPropCache.length);else r=n.settings.columns.length}else"object"!==G.dataType&&"function"!==G.dataType||(r=P.colToPropCache.length);return Math.min(e,r)},this.rowOffset=function(){return G.view.wt.wtTable.getFirstRenderedRow()},this.colOffset=function(){return G.view.wt.wtTable.getFirstRenderedColumn()},this.countRenderedRows=function(){return G.view.wt.drawn?G.view.wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return G.view.wt.drawn?G.view.wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return G.view.wt.drawn?G.view.wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return G.view.wt.drawn?G.view.wt.wtTable.getVisibleColumnsCount():-1},this.countEmptyRows=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,w.rangeEachReverse)(G.countRows()-1,function(n){if(G.isEmptyRow(n))t+=1;else if(!0===e)return!1}),t},this.countEmptyCols=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(G.countRows()<1)return 0;var t=0;return(0,w.rangeEachReverse)(G.countCols()-1,function(n){if(G.isEmptyCol(n))t+=1;else if(!0===e)return!1}),t},this.isEmptyRow=function(e){return n.settings.isEmptyRow.call(G,e)},this.isEmptyCol=function(e){return n.settings.isEmptyCol.call(G,e)},this.selectCell=function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,s.isUndefined)(e)&&!(0,s.isUndefined)(t)&&this.selectCells([[e,t,n,r]],o,i)},this.selectCells=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===t&&($=!0);var r=q.selectCells(e);return r&&n&&G.listen(),$=!1,r},this.selectCellByProp=function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return(0,a.warn)((0,p.toSingleLine)(x())),this.selectCells([[e,t,n,r]],o,i)},this.selectColumns=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return q.selectColumns(e,t)},this.selectRows=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return q.selectRows(e,t)},this.deselectCell=function(){q.deselect()},this.selectAll=function(){$=!0,q.selectAll(),$=!1},this.scrollViewportTo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=!n,i=!r,a=!1;return void 0!==e&&void 0!==t&&(a=G.view.scrollViewport(new _.CellCoords(e,t),o,r,n,i)),"number"==typeof e&&"number"!=typeof t&&(a=G.view.scrollViewportVertically(e,o,n)),"number"==typeof t&&"number"!=typeof e&&(a=G.view.scrollViewportHorizontally(t,r,i)),a},this.destroy=function(){if(G._clearTimeouts(),G._clearImmediates(),G.view&&G.view.destroy(),V&&V.destroy(),V=null,(0,I.stopObserving)(),(0,S.isRootInstance)(G)){var e=document.querySelector("#hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,r.empty)(G.rootElement),X.destroy(),U&&U.destroy(),G.runHooks("afterDestroy"),T.default.getSingleton().destroy(G),(0,h.objectEach)(G,function(e,t,n){(0,i.isFunction)(e)?n[t]=function(e){return function(){throw new Error('The "'.concat(e,'" method cannot be called because this Handsontable instance has been destroyed'))}}(t):"guid"!==t&&(n[t]=null)}),G.isDestroyed=!0,P&&P.destroy(),P=null,n=null,B=null,q=null,U=null,G=null,z=null},this.getActiveEditor=function(){return U.getActiveEditor()},this.getPlugin=function(e){return(0,g.getPlugin)(this,e)},this.getInstance=function(){return G},this.addHook=function(e,t){T.default.getSingleton().add(e,t,G)},this.hasHook=function(e){return T.default.getSingleton().has(e,G)},this.addHookOnce=function(e,t){T.default.getSingleton().once(e,t,G)},this.removeHook=function(e,t){T.default.getSingleton().remove(e,t,G)},this.runHooks=function(e,t,n,r,o,i,a){return T.default.getSingleton().run(G,e,t,n,r,o,i,a)},this.getTranslatedPhrase=function(e,t){return(0,k.getTranslatedPhrase)(n.settings.language,e,t)},this.timeouts=[],this._registerTimeout=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e;"function"==typeof n&&(n=setTimeout(n,t)),this.timeouts.push(n)},this._clearTimeouts=function(){(0,d.arrayEach)(this.timeouts,function(e){clearTimeout(e)})},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,d.arrayEach)(this.immediates,function(e){clearImmediate(e)})},this._refreshBorders=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];U.destroyEditor(e),G.view.render(),t&&q.isSelected()&&U.prepareEditor()},T.default.getSingleton().run(G,"construct")};var r=n(3),o=n(136),i=n(51),a=n(33),s=n(14),l=n(48),u=P(n(675)),c=P(n(678)),f=P(n(10)),h=n(2),d=n(1),p=n(37),g=n(6),v=n(20),y=n(55),m=n(42),w=n(5),b=P(n(679)),C=P(n(680)),E=n(101),O=n(75),S=n(441),_=n(13),T=P(n(23)),R=P(n(442)),M=n(134),k=n(443),N=n(102),A=n(444),I=n(103),D=n(445);function P(e){return e&&e.__esModule?e:{default:e}}function x(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["Deprecation warning: This method is going to be removed in the next release.\n If you want to select a cell using props, please use the `selectCell` method."],["Deprecation warning: This method is going to be removed in the next release.\n If you want to select a cell using props, please use the \\`selectCell\\` method."]);return x=function(){return e},e}function L(e){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function j(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var F=null},function(e,t,n){"use strict";t.__esModule=!0,t.columnFactory=function(e,t){function n(){}(0,r.inherit)(n,e);for(var o=0,i=t.length;o<i;o++)n.prototype[t[o]]=void 0;return n};var r=n(2)},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(1);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this.container=null,this.injected=!1,this.rows=[],this.columns=[],this.samples=null,this.settings={useHeaders:!0}}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(e,[{key:"addRow",value:function(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));var n={row:e};this.rows.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}},{key:"addColumnHeadersRow",value:function(e){var t=this.hot.getColHeader(0);if(null!==t&&void 0!==t){var n={row:-1};this.rows.push(n),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.table.tHead.appendChild(this.createColumnHeadersRow()),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}}},{key:"addColumn",value:function(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));var n={col:e};this.columns.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}},{key:"getHeights",value:function(e){this.injected||this.injectTable(),(0,o.arrayEach)(this.rows,function(t){e(t.row,(0,r.outerHeight)(t.table)-1)})}},{key:"getWidths",value:function(e){this.injected||this.injectTable(),(0,o.arrayEach)(this.columns,function(t){e(t.col,(0,r.outerWidth)(t.table))})}},{key:"setSettings",value:function(e){this.settings=e}},{key:"setSetting",value:function(e,t){this.settings||(this.settings={}),this.settings[e]=t}},{key:"getSettings",value:function(){return this.settings}},{key:"getSetting",value:function(e){return this.settings?this.settings[e]:null}},{key:"createColGroupsCol",value:function(){var e=this,t=document.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1)),this.samples.forEach(function(n){(0,o.arrayEach)(n.strings,function(n){t.appendChild(e.createColElement(n.col))})}),t}},{key:"createRow",value:function(e){var t=this,n=document,r=n.createDocumentFragment(),i=n.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,i),r.appendChild(i)),this.samples.forEach(function(i){(0,o.arrayEach)(i.strings,function(o){var i=o.col,a=t.hot.getCellMeta(e,i);a.col=i,a.row=e;var s=t.hot.getCellRenderer(a),l=n.createElement("td");s(t.hot,l,e,i,t.hot.colToProp(i),o.value,a),r.appendChild(l)})}),r}},{key:"createColumnHeadersRow",value:function(){var e=this,t=document,n=t.createDocumentFragment();if(this.hot.hasRowHeaders()){var r=t.createElement("th");this.hot.view.appendColHeader(-1,r),n.appendChild(r)}return this.samples.forEach(function(r){(0,o.arrayEach)(r.strings,function(r){var o=r.col,i=t.createElement("th");e.hot.view.appendColHeader(o,i),n.appendChild(i)})}),n}},{key:"createCol",value:function(e){var t=this,n=document,r=n.createDocumentFragment();return this.samples.forEach(function(i){(0,o.arrayEach)(i.strings,function(o){var i=o.row,a=t.hot.getCellMeta(i,e);a.col=e,a.row=i;var s=t.hot.getCellRenderer(a),l=n.createElement("td"),u=n.createElement("tr");l.setAttribute("ghost-table",1),s(t.hot,l,i,e,t.hot.colToProp(e),o.value,a),u.appendChild(l),r.appendChild(u)})}),r}},{key:"clean",value:function(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}},{key:"injectTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}},{key:"removeTable",value:function(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}},{key:"createColElement",value:function(e){var t=document.createElement("col");return t.style.width="".concat(this.hot.view.wt.wtTable.getStretchedColumnWidth(e),"px"),t}},{key:"createTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document,n=t.createDocumentFragment(),o=t.createElement("table"),i=t.createElement("thead"),a=t.createElement("tbody"),s=t.createElement("colgroup"),l=t.createElement("tr"),u=t.createElement("th");return this.isVertical()&&o.appendChild(s),this.isHorizontal()&&(l.appendChild(u),i.appendChild(l),o.style.tableLayout="auto",o.style.width="auto"),o.appendChild(i),this.isVertical()&&a.appendChild(l),o.appendChild(a),(0,r.addClass)(o,e),n.appendChild(o),{fragment:n,table:o,tHead:i,tBody:a,colGroup:s,tr:l,th:u}}},{key:"createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document,n=t.createDocumentFragment(),o=t.createElement("div"),i="htGhostTable htAutoSize ".concat(e.trim());return(0,r.addClass)(o,i),n.appendChild(o),{fragment:n,container:o}}},{key:"isVertical",value:function(){return!(!this.rows.length||this.columns.length)}},{key:"isHorizontal",value:function(){return!(!this.columns.length||this.rows.length)}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.areValidSortStates=function(e){if(!1===Array.isArray(e)||!1===e.every(function(e){return(0,o.isObject)(e)}))return!1;var t=e.map(function(e){var t=e.column;return t});return new Set(t).size===t.length&&e.every(u)},t.getNextSortOrder=function(e){if(e===s)return;if(e===a)return s;return a},t.getHeaderSpanElement=function(e){return e.querySelector(".".concat(l))},t.isFirstLevelColumnHeader=function(e,t){if(e<0||!t.parentNode)return!1;var n=t.parentNode.parentNode.childNodes;if(Array.from(n).indexOf(t.parentNode)-n.length!=-1)return!1;return!0},t.wasHeaderClickedProperly=function(e,t,n){return-1===e&&t>=0&&!1===(0,i.isRightClick)(n)},t.HEADER_SPAN_CLASS=t.DESC_SORT_STATE=t.ASC_SORT_STATE=void 0;var r=n(14),o=n(2),i=n(16),a="asc";t.ASC_SORT_STATE=a;var s="desc";t.DESC_SORT_STATE=s;var l="colHeader";function u(e){if((0,r.isUndefined)(e))return!1;var t=e.column,n=e.sortOrder;return Number.isInteger(t)&&[a,s].includes(n)}t.HEADER_SPAN_CLASS=l},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{name:r}},t.KEY=void 0;var r="---------";t.KEY=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=v(n(135)),o=n(3),i=n(1),a=v(n(728)),s=v(n(10)),l=n(2),u=n(14),c=n(51),f=n(34),h=n(24),d=v(n(29)),p=n(56),g=n(16);function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var m=215,w=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this.options=n||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:m},this.eventManager=new s.default(this),this.container=this.createContainer(this.options.name),this.hotMenu=null,this.hotSubMenus={},this.parentMenu=this.options.parent||null,this.menuItems=null,this.origOutsideClickDeselects=null,this.keyEvent=!1,this.offset={above:0,below:0,left:0,right:0},this._afterScrollCallback=null,this.registerEvents()}return function(e,t,n){t&&y(e.prototype,t),n&&y(e,n)}(e,[{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(document.documentElement,"mousedown",function(t){return e.onDocumentMouseDown(t)})}},{key:"setMenuItems",value:function(e){this.menuItems=e}},{key:"setOffset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.offset[e]=t}},{key:"isSubMenu",value:function(){return null!==this.parentMenu}},{key:"open",value:function(){var e=this;this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";var t=(0,c.debounce)(function(t){return e.openSubMenu(t)},300),n=this.options.minWidth||m,o=(0,i.arrayFilter)(this.menuItems,function(t){return(0,f.isItemHidden)(t,e.hot)}),a={data:o=(0,f.filterSeparators)(o,p.SEPARATOR),colHeaders:!1,autoColumnSize:!0,modifyColWidth:function(e){return(0,u.isDefined)(e)&&e<n?n:e},autoRowSize:!1,readOnly:!0,copyPaste:!1,columns:[{data:"name",renderer:function(t,n,r,o,i,a){return e.menuItemRenderer(t,n,r,o,i,a)}}],renderAllRows:!0,fragmentSelection:"cell",disableVisualSelection:"area",beforeKeyDown:function(t){return e.onBeforeKeyDown(t)},afterOnCellMouseOver:function(n,r){e.isAllSubMenusClosed()?t(r.row):e.openSubMenu(r.row)},rowHeights:function(e){return o[e].name===p.SEPARATOR?1:23}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new r.default(this.container,a),this.hotMenu.addHook("afterInit",function(){return e.onAfterInit()}),this.hotMenu.addHook("afterSelection",function(){return e.onAfterSelection.apply(e,arguments)}),this.hotMenu.init(),this.hotMenu.listen(),this.blockMainTableCallbacks(),this.runLocalHooks("afterOpen")}},{key:"close",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isOpened()&&(e&&this.parentMenu?this.parentMenu.close():(this.closeAllSubMenus(),this.container.style.display="none",this.releaseMainTableCallbacks(),this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.parentMenu&&this.parentMenu.hotMenu.listen()))}},{key:"openSubMenu",value:function(t){if(!this.hotMenu)return!1;var n=this.hotMenu.getCell(t,0);if(this.closeAllSubMenus(),!n||!(0,f.hasSubMenu)(n))return!1;var r=this.hotMenu.getSourceDataAtRow(t),o=new e(this.hot,{parent:this,name:r.name,className:this.options.className,keepInViewport:!0});return o.setMenuItems(r.submenu.items),o.open(),o.setPosition(n.getBoundingClientRect()),this.hotSubMenus[r.key]=o,o}},{key:"closeSubMenu",value:function(e){var t=this.hotMenu.getSourceDataAtRow(e),n=this.hotSubMenus[t.key];n&&(n.destroy(),delete this.hotSubMenus[t.key])}},{key:"closeAllSubMenus",value:function(){var e=this;(0,i.arrayEach)(this.hotMenu.getData(),function(t,n){return e.closeSubMenu(n)})}},{key:"isAllSubMenusClosed",value:function(){return 0===Object.keys(this.hotSubMenus).length}},{key:"destroy",value:function(){this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy()}},{key:"isOpened",value:function(){return null!==this.hotMenu}},{key:"executeCommand",value:function(e){if(this.isOpened()&&this.hotMenu.getSelectedLast()){var t=this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]);if(this.runLocalHooks("select",t,e),!1!==t.isCommand&&t.name!==p.SEPARATOR){var n=this.hot.getSelectedRange(),r=n?(0,f.normalizeSelection)(n):[],o=!0;(!0===t.disabled||"function"==typeof t.disabled&&!0===t.disabled.call(this.hot)||t.submenu)&&(o=!1),this.runLocalHooks("executeCommand",t.key,r,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,r,e),o&&this.close(!0)}}}},{key:"setPosition",value:function(e){var t=new a.default(e);this.options.keepInViewport?(t.fitsBelow(this.container)?this.setPositionBelowCursor(t):t.fitsAbove(this.container)?this.setPositionAboveCursor(t):this.setPositionBelowCursor(t),t.fitsOnRight(this.container)?this.setPositionOnRightOfCursor(t):this.setPositionOnLeftOfCursor(t)):(this.setPositionBelowCursor(t),this.setPositionOnRightOfCursor(t))}},{key:"setPositionAboveCursor",value:function(e){var t=this.offset.above+e.top-this.container.offsetHeight;this.isSubMenu()&&(t=e.top+e.cellHeight-this.container.offsetHeight+3),this.container.style.top="".concat(t,"px")}},{key:"setPositionBelowCursor",value:function(e){var t=this.offset.below+e.top;this.isSubMenu()&&(t=e.top-1),this.container.style.top="".concat(t,"px")}},{key:"setPositionOnRightOfCursor",value:function(e){var t;t=this.isSubMenu()?1+e.left+e.cellWidth:this.offset.right+1+e.left,this.container.style.left="".concat(t,"px")}},{key:"setPositionOnLeftOfCursor",value:function(e){var t=this.offset.left+e.left-this.container.offsetWidth+(0,o.getScrollbarWidth)()+4;this.container.style.left="".concat(t,"px")}},{key:"selectFirstCell",value:function(){var e=this.hotMenu.getCell(0,0);(0,f.isSeparator)(e)||(0,f.isDisabled)(e)||(0,f.isSelectionDisabled)(e)?this.selectNextCell(0,0):this.hotMenu.selectCell(0,0)}},{key:"selectLastCell",value:function(){var e=this.hotMenu.countRows()-1,t=this.hotMenu.getCell(e,0);(0,f.isSeparator)(t)||(0,f.isDisabled)(t)||(0,f.isSelectionDisabled)(t)?this.selectPrevCell(e,0):this.hotMenu.selectCell(e,0)}},{key:"selectNextCell",value:function(e,t){var n=e+1,r=n<this.hotMenu.countRows()?this.hotMenu.getCell(n,t):null;r&&((0,f.isSeparator)(r)||(0,f.isDisabled)(r)||(0,f.isSelectionDisabled)(r)?this.selectNextCell(n,t):this.hotMenu.selectCell(n,t))}},{key:"selectPrevCell",value:function(e,t){var n=e-1,r=n>=0?this.hotMenu.getCell(n,t):null;r&&((0,f.isSeparator)(r)||(0,f.isDisabled)(r)||(0,f.isSelectionDisabled)(r)?this.selectPrevCell(n,t):this.hotMenu.selectCell(n,t))}},{key:"menuItemRenderer",value:function(e,t,n,r,i,a){var s=this,u=e.getSourceDataAtRow(n),c=document.createElement("div"),f=function(e){return e.disableSelection},h=a;"function"==typeof h&&(h=h.call(this.hot)),(0,o.empty)(t),(0,o.addClass)(c,"htItemWrapper"),t.appendChild(c),!function(e){return new RegExp(p.SEPARATOR,"i").test(e.name)}(u)?"function"==typeof u.renderer?((0,o.addClass)(t,"htCustomMenuRenderer"),t.appendChild(u.renderer(e,c,n,r,i,h))):(0,o.fastInnerHTML)(c,h):(0,o.addClass)(t,"htSeparator"),!function(e){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(s.hot)}(u)?f(u)?((0,o.addClass)(t,"htSelectionDisabled"),this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()})):!function(e){return(0,l.hasOwnProperty)(e,"submenu")}(u)?((0,o.removeClass)(t,"htSubmenu"),(0,o.removeClass)(t,"htDisabled"),f(u)?this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()}):this.eventManager.addEventListener(t,"mouseenter",function(){return e.selectCell(n,r,void 0,void 0,!1,!1)})):((0,o.addClass)(t,"htSubmenu"),f(u)?this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()}):this.eventManager.addEventListener(t,"mouseenter",function(){return e.selectCell(n,r,void 0,void 0,!1,!1)})):((0,o.addClass)(t,"htDisabled"),this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()}))}},{key:"createContainer",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t?((0,c.isFunction)(t)&&(t=null===(t=t.call(this.hot))||(0,u.isUndefined)(t)?"":t.toString()),t=t.replace(/[^A-z0-9]/g,"_"),t="".concat(this.options.className,"Sub_").concat(t),e=document.querySelector(".".concat(this.options.className,".").concat(t))):e=document.querySelector(".".concat(this.options.className)),e||(e=document.createElement("div"),(0,o.addClass)(e,"htMenu ".concat(this.options.className)),t&&(0,o.addClass)(e,t),document.getElementsByTagName("body")[0].appendChild(e)),e}},{key:"blockMainTableCallbacks",value:function(){this._afterScrollCallback=function(){},this.hot.addHook("afterScrollVertically",this._afterScrollCallback),this.hot.addHook("afterScrollHorizontally",this._afterScrollCallback)}},{key:"releaseMainTableCallbacks",value:function(){this._afterScrollCallback&&(this.hot.removeHook("afterScrollVertically",this._afterScrollCallback),this.hot.removeHook("afterScrollHorizontally",this._afterScrollCallback),this._afterScrollCallback=null)}},{key:"onBeforeKeyDown",value:function(e){var t=this.hotMenu.getSelectedLast(),n=!1;switch(this.keyEvent=!0,e.keyCode){case h.KEY_CODES.ESCAPE:this.close(),n=!0;break;case h.KEY_CODES.ENTER:t&&(this.hotMenu.getSourceDataAtRow(t[0]).submenu?n=!0:(this.executeCommand(e),this.close(!0)));break;case h.KEY_CODES.ARROW_DOWN:t?this.selectNextCell(t[0],t[1]):this.selectFirstCell(),n=!0;break;case h.KEY_CODES.ARROW_UP:t?this.selectPrevCell(t[0],t[1]):this.selectLastCell(),n=!0;break;case h.KEY_CODES.ARROW_RIGHT:if(t){var r=this.openSubMenu(t[0]);r&&r.selectFirstCell()}n=!0;break;case h.KEY_CODES.ARROW_LEFT:t&&this.isSubMenu()&&(this.close(),this.parentMenu&&this.parentMenu.hotMenu.listen(),n=!0)}n&&(e.preventDefault(),(0,g.stopImmediatePropagation)(e)),this.keyEvent=!1}},{key:"onAfterInit",value:function(){var e=this.hotMenu.getSettings().data,t=this.hotMenu.view.wt.wtTable.hider.style,n=this.hotMenu.view.wt.wtTable.holder.style,r=parseInt(t.width,10),o=(0,i.arrayReduce)(e,function(e,t){return e+(t.name===p.SEPARATOR?1:26)},0);n.width="".concat(r+22,"px"),n.height="".concat(o+4,"px"),t.height=n.height}},{key:"onAfterSelection",value:function(e,t,n,r,o){!1===this.keyEvent&&(o.value=!0)}},{key:"onDocumentMouseDown",value:function(e){this.isOpened()&&(this.container&&(0,o.isChildOf)(e.target,this.container)&&this.executeCommand(e),this.options.standalone&&this.hotMenu&&!(0,o.isChildOf)(e.target,this.hotMenu.rootElement)?this.close(!0):(this.isAllSubMenusClosed()||this.isSubMenu())&&!(0,o.isChildOf)(e.target,".htMenu")&&(0,o.isChildOf)(e.target,document)&&this.close(!0))}}]),e}();(0,l.mixin)(w,d.default);var b=w;t.default=b},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(13),o=n(37);function i(){var e=u(["The merged cell declared at [",", ",'] has "rowspan" or "colspan" declared as \n "0", which is not supported. It cannot be added to the collection.']);return i=function(){return e},e}function a(){var e=u(["The merged cell declared at [",", ",'] has both "rowspan" \n and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.']);return a=function(){return e},e}function s(){var e=u(["The merged cell declared at [",", ","] is positioned (or positioned partially) \n outside of the table range. It was not added to the table, please fix your setup."]);return s=function(){return e},e}function l(){var e=u(["The merged cell declared with {row: ",", col: ",", rowspan: \n ",", colspan: ","} contains negative values, which is not supported. It \n will not be added to the collection."]);return l=function(){return e},e}function u(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var f=function(){function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.row=t,this.col=n,this.rowspan=r,this.colspan=o,this.removed=!1}return function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(e,[{key:"normalize",value:function(e){var t=e.countRows(),n=e.countCols();this.row<0?this.row=0:this.row>t-1&&(this.row=t-1),this.col<0?this.col=0:this.col>n-1&&(this.col=n-1),this.row+this.rowspan>t-1&&(this.rowspan=t-this.row),this.col+this.colspan>n-1&&(this.colspan=n-this.col)}},{key:"includes",value:function(e,t){return this.row<=e&&this.col<=t&&this.row+this.rowspan-1>=e&&this.col+this.colspan-1>=t}},{key:"includesHorizontally",value:function(e){return this.col<=e&&this.col+this.colspan-1>=e}},{key:"includesVertically",value:function(e){return this.row<=e&&this.row+this.rowspan-1>=e}},{key:"shift",value:function(e,t){var n=e[0]||e[1],r=t+Math.abs(e[0]||e[1])-1,o=e[0]?"colspan":"rowspan",i=e[0]?"col":"row",a=Math.min(t,r),s=Math.max(t,r),l=this[i],u=this[i]+this[o]-1;if(l>=t&&(this[i]+=n),n>0)t<=u&&t>l&&(this[o]+=n);else if(n<0){if(a<=l&&s>=u)return this.removed=!0,!1;if(l>=a&&l<=s){var c=s-l+1,f=Math.abs(n)-c;this[i]-=f+n,this[o]-=c}else if(l<=a&&u>=s)this[o]+=n;else if(l<=a&&u>=a&&u<s){var h=u-a+1;this[o]-=h}}return!0}},{key:"isFarther",value:function(e,t){return!e||("down"===t?e.row+e.rowspan-1<this.row+this.rowspan-1:"up"===t?e.row>this.row:"right"===t?e.col+e.colspan-1<this.col+this.colspan-1:"left"===t?e.col>this.col:null)}},{key:"getLastRow",value:function(){return this.row+this.rowspan-1}},{key:"getLastColumn",value:function(){return this.col+this.colspan-1}},{key:"getRange",value:function(){return new r.CellRange(new r.CellCoords(this.row,this.col),new r.CellCoords(this.row,this.col),new r.CellCoords(this.getLastRow(),this.getLastColumn()))}}],[{key:"NEGATIVE_VALUES_WARNING",value:function(e){return(0,o.toSingleLine)(l(),e.row,e.col,e.rowspan,e.colspan)}},{key:"IS_OUT_OF_BOUNDS_WARNING",value:function(e){return(0,o.toSingleLine)(s(),e.row,e.col)}},{key:"IS_SINGLE_CELL",value:function(e){return(0,o.toSingleLine)(a(),e.row,e.col)}},{key:"ZERO_SPAN_WARNING",value:function(e){return(0,o.toSingleLine)(i(),e.row,e.col)}},{key:"containsNegativeValues",value:function(e){return e.row<0||e.col<0||e.rowspan<0||e.colspan<0}},{key:"isSingleCell",value:function(e){return 1===e.colspan&&1===e.rowspan}},{key:"containsZeroSpan",value:function(e){return 0===e.colspan||0===e.rowspan}},{key:"isOutOfBounds",value:function(e,t,n){return e.row<0||e.col<0||e.row>=t||e.row+e.rowspan-1>=t||e.col>=n||e.col+e.colspan-1>=n}}]),e}();t.default=f},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){var t=[],n=e;L[n]||(n=x);return(0,o.arrayEach)(L[n],function(e){var n;n=e===i.SEPARATOR?{name:i.SEPARATOR}:(0,r.clone)((0,a.getConditionDescriptor)(e)),t.push(n)}),t},t.TYPES=t.TYPE_DATE=t.TYPE_TEXT=t.TYPE_NUMERIC=void 0;var r=n(2),o=n(1),i=n(56),a=n(15),s=n(800);t.CONDITION_NONE=s.CONDITION_NAME;var l=n(455);t.CONDITION_EMPTY=l.CONDITION_NAME;var u=n(801);t.CONDITION_NOT_EMPTY=u.CONDITION_NAME;var c=n(456);t.CONDITION_EQUAL=c.CONDITION_NAME;var f=n(802);t.CONDITION_NOT_EQUAL=f.CONDITION_NAME;var h=n(803);t.CONDITION_GREATER_THAN=h.CONDITION_NAME;var d=n(804);t.CONDITION_GREATER_THAN_OR_EQUAL=d.CONDITION_NAME;var p=n(805);t.CONDITION_LESS_THAN=p.CONDITION_NAME;var g=n(806);t.CONDITION_LESS_THAN_OR_EQUAL=g.CONDITION_NAME;var v=n(457);t.CONDITION_BETWEEN=v.CONDITION_NAME;var y=n(807);t.CONDITION_NOT_BETWEEN=y.CONDITION_NAME;var m=n(808);t.CONDITION_BEGINS_WITH=m.CONDITION_NAME;var w=n(809);t.CONDITION_ENDS_WITH=w.CONDITION_NAME;var b=n(460);t.CONDITION_CONTAINS=b.CONDITION_NAME;var C=n(810);t.CONDITION_NOT_CONTAINS=C.CONDITION_NAME;var E=n(459);t.CONDITION_DATE_BEFORE=E.CONDITION_NAME;var O=n(458);t.CONDITION_DATE_AFTER=O.CONDITION_NAME;var S=n(811);t.CONDITION_TOMORROW=S.CONDITION_NAME;var _=n(812);t.CONDITION_TODAY=_.CONDITION_NAME;var T=n(813);t.CONDITION_YESTERDAY=T.CONDITION_NAME;var R=n(814);t.CONDITION_BY_VALUE=R.CONDITION_NAME;var M=n(815);t.CONDITION_TRUE=M.CONDITION_NAME;var k=n(816);t.CONDITION_FALSE=k.CONDITION_NAME;var N=n(143);t.OPERATION_AND=N.OPERATION_ID;var A=n(461);t.OPERATION_OR=A.OPERATION_ID;var I,D=n(462);function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.OPERATION_OR_THEN_VARIABLE=D.OPERATION_ID;t.TYPE_NUMERIC="numeric";var x="text";t.TYPE_TEXT=x;t.TYPE_DATE="date";var L=(P(I={},"numeric",[s.CONDITION_NAME,i.SEPARATOR,l.CONDITION_NAME,u.CONDITION_NAME,i.SEPARATOR,c.CONDITION_NAME,f.CONDITION_NAME,i.SEPARATOR,h.CONDITION_NAME,d.CONDITION_NAME,p.CONDITION_NAME,g.CONDITION_NAME,v.CONDITION_NAME,y.CONDITION_NAME]),P(I,x,[s.CONDITION_NAME,i.SEPARATOR,l.CONDITION_NAME,u.CONDITION_NAME,i.SEPARATOR,c.CONDITION_NAME,f.CONDITION_NAME,i.SEPARATOR,m.CONDITION_NAME,w.CONDITION_NAME,i.SEPARATOR,b.CONDITION_NAME,C.CONDITION_NAME]),P(I,"date",[s.CONDITION_NAME,i.SEPARATOR,l.CONDITION_NAME,u.CONDITION_NAME,i.SEPARATOR,c.CONDITION_NAME,f.CONDITION_NAME,i.SEPARATOR,E.CONDITION_NAME,O.CONDITION_NAME,v.CONDITION_NAME,i.SEPARATOR,S.CONDITION_NAME,_.CONDITION_NAME,T.CONDITION_NAME]),I);t.TYPES=L},function(e,t,n){"use strict";t.__esModule=!0,t.operationResult=a,t.SHORT_NAME_FOR_COMPONENT=t.OPERATION_ID=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(86);t.OPERATION_ID="conjunction";var i=r.FILTERS_LABELS_CONJUNCTION;function a(e,t){return e.every(function(e){return e.func(t)})}t.SHORT_NAME_FOR_COMPONENT=i,(0,o.registerOperation)("conjunction",i,a)},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n(87));function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t,n){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var d=new WeakMap,p=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?h(e):t}(this,l(t).call(this,e,(0,o.extend)(t.DEFAULTS,n))),d.set(h(h(r)),{}),r.registerHooks(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,i.default),c(t,null,[{key:"DEFAULTS",get:function(){return(0,o.clone)({placeholder:"",type:"text",tagName:"input"})}}]),c(t,[{key:"registerHooks",value:function(){var e=this;this.addLocalHook("click",function(){return e.onClick()}),this.addLocalHook("keyup",function(t){return e.onKeyup(t)})}},{key:"build",value:function(){s(l(t.prototype),"build",this).call(this);var e=d.get(this),n=document.createElement("div");e.input=this._element.firstChild,(0,r.addClass)(this._element,"htUIInput"),(0,r.addClass)(n,"htUIInputIcon"),this._element.appendChild(n),this.update()}},{key:"update",value:function(){if(this.isBuilt()){var e=d.get(this).input;e.type=this.options.type,e.placeholder=this.translateIfPossible(this.options.placeholder),e.value=this.translateIfPossible(this.options.value)}}},{key:"focus",value:function(){this.isBuilt()&&d.get(this).input.focus()}},{key:"onClick",value:function(){}},{key:"onKeyup",value:function(e){this.options.value=e.target.value}}]),t}();t.default=p},function(e,t,n){"use strict";t.__esModule=!0,t.getMixedMonthObject=function(e,t){return{name:e,days:r,daysBeforeFullWeeks:0,daysAfterFullWeeks:0,fullWeeks:1,index:t}},t.getMixedMonthName=function(e,t){var n=null,r=o(t[e].name),i=e>0?o(t[e-1].name):null,a=o(t[0].name),s=o(t[t.length-1].name);n=e>0?"".concat(i,"/").concat(r):e===t.length-1?"".concat(r,"/").concat(a):"".concat(s,"/").concat(r);return n},t.getShorthand=o,t.getStartDate=function(e){return i(Array.isArray(e)?e[1]:e.startDate)},t.getEndDate=function(e){return i(Array.isArray(e)?e[2]:e.endDate)},t.getAdditionalData=function(e){return Array.isArray(e)?e[3]:e.additionalData},t.setStartDate=function(e,t){Array.isArray(e)?e[1]=t:e.startDate=t},t.setEndDate=function(e,t){Array.isArray(e)?e[2]=t:e.endDate=t},t.parseDate=i,t.getDateYear=function(e){var t=i(e);return t?t.getFullYear():null},t.WEEK_LENGTH=t.DEC_LENGTH=void 0;t.DEC_LENGTH=31;var r=7;function o(e){return e.substring(0,3)}function i(e){var t=e;return null===t?null:t instanceof Date||"Invalid Date"!==(t=new Date(t)).toString()?t:null}t.WEEK_LENGTH=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=n,this.plugin=t};t.default=r},function(e,t,n){e.exports=!n(21)&&!n(8)(function(){return 7!=Object.defineProperty(n(107)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(11),o=n(22),i=n(61),a=n(109),s=n(19).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){var r=n(30),o=n(32),i=n(90)(!1),a=n(110)("IE_PROTO");e.exports=function(e,t){var n,s=o(e),l=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~i(u,n)||u.push(n));return u}},function(e,t,n){var r=n(19),o=n(9),i=n(62);e.exports=n(21)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),s=a.length,l=0;s>l;)r.f(e,n=a[l++],t[n]);return e}},function(e,t,n){var r=n(32),o=n(65).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(e){return a.slice()}}(e):o(r(e))}},function(e,t,n){"use strict";var r=n(62),o=n(91),i=n(79),a=n(26),s=n(78),l=Object.assign;e.exports=!l||n(8)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r})?function(e,t){for(var n=a(e),l=arguments.length,u=1,c=o.f,f=i.f;l>u;)for(var h,d=s(arguments[u++]),p=c?r(d).concat(c(d)):r(d),g=p.length,v=0;g>v;)f.call(d,h=p[v++])&&(n[h]=d[h]);return n}:l},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var r=n(44),o=n(12),i=n(155),a=[].slice,s={};e.exports=Function.bind||function(e){var t=r(this),n=a.call(arguments,1),l=function(){var r=n.concat(a.call(arguments));return this instanceof l?function(e,t,n){if(!(t in s)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";s[t]=Function("F,a","return new F("+r.join(",")+")")}return s[t](e,n)}(t,r.length,r):i(t,r,e)};return o(t.prototype)&&(l.prototype=t.prototype),l}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(11).parseInt,o=n(92).trim,i=n(115),a=/^[-+]?0[xX]/;e.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(e,t){var n=o(String(e),3);return r(n,t>>>0||(a.test(n)?16:10))}:r},function(e,t,n){var r=n(11).parseFloat,o=n(92).trim;e.exports=1/r(n(115)+"-0")!=-1/0?function(e){var t=o(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){var r=n(45);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){var r=n(12),o=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&o(e)===e}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){"use strict";var r=n(64),o=n(59),i=n(68),a={};n(31)(a,n(17)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(9);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(44),o=n(26),i=n(78),a=n(18);e.exports=function(e,t,n,s,l){r(t);var u=o(e),c=i(u),f=a(u.length),h=l?f-1:0,d=l?-1:1;if(n<2)for(;;){if(h in c){s=c[h],h+=d;break}if(h+=d,l?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;l?h>=0:f>h;h+=d)h in c&&(s=t(s,c[h],h,u));return s}},function(e,t,n){"use strict";var r=n(26),o=n(63),i=n(18);e.exports=[].copyWithin||function(e,t){var n=r(this),a=i(n.length),s=o(e,a),l=o(t,a),u=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===u?a:o(u,a))-l,a-s),f=1;for(l<s&&s<l+c&&(f=-1,l+=c-1,s+=c-1);c-- >0;)l in n?n[s]=n[l]:delete n[s],s+=f,l+=f;return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r=n(130);n(0)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(e,t,n){n(21)&&"g"!=/./g.flags&&n(19).f(RegExp.prototype,"flags",{configurable:!0,get:n(94)})},function(e,t,n){"use strict";var r,o,i,a,s=n(61),l=n(11),u=n(43),c=n(80),f=n(0),h=n(12),d=n(44),p=n(72),g=n(97),v=n(81),y=n(132).set,m=n(580)(),w=n(169),b=n(581),C=n(98),E=n(170),O=l.TypeError,S=l.process,_=S&&S.versions,T=_&&_.v8||"",R=l.Promise,M="process"==c(S),k=function(){},N=o=w.f,A=!!function(){try{var e=R.resolve(1),t=(e.constructor={})[n(17)("species")]=function(e){e(k,k)};return(M||"function"==typeof PromiseRejectionEvent)&&e.then(k)instanceof t&&0!==T.indexOf("6.6")&&-1===C.indexOf("Chrome/66")}catch(e){}}(),I=function(e){var t;return!(!h(e)||"function"!=typeof(t=e.then))&&t},D=function(e,t){if(!e._n){e._n=!0;var n=e._c;m(function(){for(var r=e._v,o=1==e._s,i=0,a=function(t){var n,i,a,s=o?t.ok:t.fail,l=t.resolve,u=t.reject,c=t.domain;try{s?(o||(2==e._h&&L(e),e._h=1),!0===s?n=r:(c&&c.enter(),n=s(r),c&&(c.exit(),a=!0)),n===t.promise?u(O("Promise-chain cycle")):(i=I(n))?i.call(n,l,u):l(n)):u(r)}catch(e){c&&!a&&c.exit(),u(e)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&P(e)})}},P=function(e){y.call(l,function(){var t,n,r,o=e._v,i=x(e);if(i&&(t=b(function(){M?S.emit("unhandledRejection",o,e):(n=l.onunhandledrejection)?n({promise:e,reason:o}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",o)}),e._h=M||x(e)?2:1),e._a=void 0,i&&t.e)throw t.v})},x=function(e){return 1!==e._h&&0===(e._a||e._c).length},L=function(e){y.call(l,function(){var t;M?S.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})})},H=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),D(t,!0))},j=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw O("Promise can't be resolved itself");(t=I(e))?m(function(){var r={_w:n,_d:!1};try{t.call(e,u(j,r,1),u(H,r,1))}catch(e){H.call(r,e)}}):(n._v=e,n._s=1,D(n,!1))}catch(e){H.call({_w:n,_d:!1},e)}}};A||(R=function(e){p(this,R,"Promise","_h"),d(e),r.call(this);try{e(u(j,this,1),u(H,this,1))}catch(e){H.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(73)(R.prototype,{then:function(e,t){var n=N(v(this,R));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=M?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&D(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=u(j,e,1),this.reject=u(H,e,1)},w.f=N=function(e){return e===R||e===a?new i(e):o(e)}),f(f.G+f.W+f.F*!A,{Promise:R}),n(68)(R,"Promise"),n(71)("Promise"),a=n(22).Promise,f(f.S+f.F*!A,"Promise",{reject:function(e){var t=N(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(s||!A),"Promise",{resolve:function(e){return E(s&&this===a?R:this,e)}}),f(f.S+f.F*!(A&&n(93)(function(e){R.all(e).catch(k)})),"Promise",{all:function(e){var t=this,n=N(t),r=n.resolve,o=n.reject,i=b(function(){var n=[],i=0,a=1;g(e,!1,function(e){var s=i++,l=!1;n.push(void 0),a++,t.resolve(e).then(function(e){l||(l=!0,n[s]=e,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(e){var t=this,n=N(t),r=n.reject,o=b(function(){g(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},function(e,t,n){"use strict";var r=n(44);e.exports.f=function(e){return new function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)}(e)}},function(e,t,n){var r=n(9),o=n(12),i=n(169);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(19).f,o=n(64),i=n(73),a=n(43),s=n(72),l=n(97),u=n(121),c=n(165),f=n(71),h=n(21),d=n(53).fastKey,p=n(74),g=h?"_s":"size",v=function(e,t){var n,r=d(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,u){var c=e(function(e,r){s(e,c,t,"_i"),e._t=t,e._i=o(null),e._f=void 0,e._l=void 0,e[g]=0,void 0!=r&&l(r,n,e[u],e)});return i(c.prototype,{clear:function(){for(var e=p(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[g]=0},delete:function(e){var n=p(this,t),r=v(n,e);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[g]--}return!!r},forEach:function(e){p(this,t);for(var n,r=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!v(p(this,t),e)}}),h&&r(c.prototype,"size",{get:function(){return p(this,t)[g]}}),c},def:function(e,t,n){var r,o,i=v(e,t);return i?i.v=n:(e._l=i={i:o=d(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=i),r&&(r.n=i),e[g]++,"F"!==o&&(e._i[o]=i)),e},getEntry:v,setStrong:function(e,t,n){u(e,t,function(e,n){this._t=p(e,t),this._k=n,this._l=void 0},function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?c(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,c(1))},n?"entries":"values",!n,!0),f(t)}}},function(e,t,n){"use strict";var r=n(73),o=n(53).getWeak,i=n(9),a=n(12),s=n(72),l=n(97),u=n(41),c=n(30),f=n(74),h=u(5),d=u(6),p=0,g=function(e){return e._l||(e._l=new v)},v=function(){this.a=[]},y=function(e,t){return h(e.a,function(e){return e[0]===t})};v.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var n=y(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=d(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,i){var u=e(function(e,r){s(e,u,t,"_i"),e._t=t,e._i=p++,e._l=void 0,void 0!=r&&l(r,n,e[i],e)});return r(u.prototype,{delete:function(e){if(!a(e))return!1;var n=o(e);return!0===n?g(f(this,t)).delete(e):n&&c(n,this._i)&&delete n[this._i]},has:function(e){if(!a(e))return!1;var n=o(e);return!0===n?g(f(this,t)).has(e):n&&c(n,this._i)}}),u},def:function(e,t,n){var r=o(i(t),!0);return!0===r?g(e).set(t,n):r[e._i]=n,e},ufstore:g}},function(e,t,n){var r=n(38),o=n(18);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=o(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){var r=n(65),o=n(91),i=n(9),a=n(11).Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.f(i(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(18),o=n(117),i=n(46);e.exports=function(e,t,n,a){var s=String(i(e)),l=s.length,u=void 0===n?" ":String(n),c=r(t);if(c<=l||""==u)return s;var f=c-l,h=o.call(u,Math.ceil(f/u.length));return h.length>f&&(h=h.slice(0,f)),a?h+s:s+h}},function(e,t,n){var r=n(62),o=n(32),i=n(79).f;e.exports=function(e){return function(t){for(var n,a=o(t),s=r(a),l=s.length,u=0,c=[];l>u;)i.call(a,n=s[u++])&&c.push(e?[n,a[n]]:a[n]);return c}}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}t.__esModule=!0,t.default=void 0;var i=new WeakMap,a=function(){function e(t,n,r,o,a,s,l){var u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:function(e){return e};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i.set(this,{viewportWidth:t,scrollOffset:n,totalColumns:r,columnWidthFn:o,overrideFn:a,onlyFullyVisible:s,stretchingColumnWidthFn:u}),this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.stretchAllRatio=0,this.stretchLastWidth=0,this.stretch=l,this.totalTargetWidth=0,this.needVerifyLastColumnWidth=!0,this.stretchAllColumnsWidth=[],this.calculate()}return o(e,null,[{key:"DEFAULT_WIDTH",get:function(){return 50}}]),o(e,[{key:"calculate",value:function(){for(var e,t=0,n=!0,r=[],o=i.get(this),a=o.onlyFullyVisible,s=o.overrideFn,l=o.scrollOffset,u=o.totalColumns,c=o.viewportWidth,f=0;f<u;f++){if(e=this._getColumnWidth(f),t<=l&&!a&&(this.startColumn=f),t>=l&&t+e<=l+(l>0?c+1:c)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=f),this.endColumn=f),r.push(t),t+=e,a||(this.endColumn=f),t>=l+c){n=!1;break}}if(this.endColumn===u-1&&n)for(this.startColumn=this.endColumn;this.startColumn>0;){var h=r[this.endColumn]+e-r[this.startColumn-1];if((h<=c||!a)&&(this.startColumn-=1),h>c)break}null!==this.startColumn&&s&&s(this),this.startPosition=r[this.startColumn],void 0===this.startPosition&&(this.startPosition=null),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}},{key:"refreshStretching",value:function(e){if("none"!==this.stretch){var t=e;this.totalTargetWidth=t;for(var n=i.get(this),r=n.totalColumns,o=0,a=0;a<r;a++){var s=this._getColumnWidth(a),l=n.stretchingColumnWidthFn(void 0,a);"number"==typeof l?t-=l:o+=s}var u=t-o;if("all"===this.stretch&&u>0)this.stretchAllRatio=t/o,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===this.stretch&&t!==1/0){var c=this._getColumnWidth(r-1),f=u+c;this.stretchLastWidth=f>=0?f:c}}}},{key:"getStretchedColumnWidth",value:function(e,t){var n=null;return"all"===this.stretch&&0!==this.stretchAllRatio?n=this._getStretchedAllColumnWidth(e,t):"last"===this.stretch&&0!==this.stretchLastWidth&&(n=this._getStretchedLastColumnWidth(e)),n}},{key:"_getStretchedAllColumnWidth",value:function(e,t){var n=0,r=i.get(this),o=r.totalColumns;if(!this.stretchAllColumnsWidth[e]){var a=Math.round(t*this.stretchAllRatio),s=r.stretchingColumnWidthFn(a,e);this.stretchAllColumnsWidth[e]=void 0===s?a:isNaN(s)?this._getColumnWidth(e):s}if(this.stretchAllColumnsWidth.length===o&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(var l=0;l<this.stretchAllColumnsWidth.length;l++)n+=this.stretchAllColumnsWidth[l];n!==this.totalTargetWidth&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=this.totalTargetWidth-n)}return this.stretchAllColumnsWidth[e]}},{key:"_getStretchedLastColumnWidth",value:function(e){return e===i.get(this).totalColumns-1?this.stretchLastWidth:null}},{key:"_getColumnWidth",value:function(t){var n=i.get(this).columnWidthFn(t);return isNaN(n)&&(n=e.DEFAULT_WIDTH),n}}]),e}();t.default=a},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}t.__esModule=!0,t.default=void 0;var i=new WeakMap,a=function(){function e(t,n,r,o,a,s,l){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i.set(this,{viewportHeight:t,scrollOffset:n,totalRows:r,rowHeightFn:o,overrideFn:a,onlyFullyVisible:s,horizontalScrollbarHeight:l}),this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.calculate()}return o(e,null,[{key:"DEFAULT_HEIGHT",get:function(){return 23}}]),o(e,[{key:"calculate",value:function(){for(var t,n=0,r=!0,o=[],a=i.get(this),s=a.onlyFullyVisible,l=a.overrideFn,u=a.rowHeightFn,c=a.scrollOffset,f=a.totalRows,h=a.viewportHeight,d=a.horizontalScrollbarHeight||0,p=0;p<f;p++)if(t=u(p),isNaN(t)&&(t=e.DEFAULT_HEIGHT),n<=c&&!s&&(this.startRow=p),n>=c&&n+t<=c+h-d&&(null===this.startRow&&(this.startRow=p),this.endRow=p),o.push(n),n+=t,s||(this.endRow=p),n>=c+h-d){r=!1;break}if(this.endRow===f-1&&r)for(this.startRow=this.endRow;this.startRow>0;){var g=o[this.endRow]+t-o[this.startRow-1];if((g<=h-d||!s)&&(this.startRow-=1),g>=h-d)break}null!==this.startRow&&l&&l(this),this.startPosition=o[this.startRow],void 0===this.startPosition&&(this.startPosition=null),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(83));function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.highlight=t,this.from=n,this.to=r}return function(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}(e,[{key:"setHighlight",value:function(e){return this.highlight=e,this}},{key:"setFrom",value:function(e){return this.from=e,this}},{key:"setTo",value:function(e){return this.to=e,this}},{key:"isValid",value:function(e){return this.from.isValid(e)&&this.to.isValid(e)}},{key:"isSingle",value:function(){return this.from.row===this.to.row&&this.from.col===this.to.col}},{key:"getHeight",value:function(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}},{key:"getWidth",value:function(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}},{key:"includes",value:function(e){var t=e.row,n=e.col,r=this.getTopLeftCorner(),o=this.getBottomRightCorner();return r.row<=t&&o.row>=t&&r.col<=n&&o.col>=n}},{key:"includesRange",value:function(e){return this.includes(e.getTopLeftCorner())&&this.includes(e.getBottomRightCorner())}},{key:"isEqual",value:function(e){return Math.min(this.from.row,this.to.row)===Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(e.from.col,e.to.col)}},{key:"overlaps",value:function(e){return e.isSouthEastOf(this.getTopLeftCorner())&&e.isNorthWestOf(this.getBottomRightCorner())}},{key:"isSouthEastOf",value:function(e){return this.getTopLeftCorner().isSouthEastOf(e)||this.getBottomRightCorner().isSouthEastOf(e)}},{key:"isNorthWestOf",value:function(e){return this.getTopLeftCorner().isNorthWestOf(e)||this.getBottomRightCorner().isNorthWestOf(e)}},{key:"isOverlappingHorizontally",value:function(e){return this.getTopRightCorner().col>=e.getTopLeftCorner().col&&this.getTopRightCorner().col<=e.getTopRightCorner().col||this.getTopLeftCorner().col<=e.getTopRightCorner().col&&this.getTopLeftCorner().col>=e.getTopLeftCorner().col}},{key:"isOverlappingVertically",value:function(e){return this.getBottomRightCorner().row>=e.getTopRightCorner().row&&this.getBottomRightCorner().row<=e.getBottomRightCorner().row||this.getTopRightCorner().row<=e.getBottomRightCorner().row&&this.getTopRightCorner().row>=e.getTopRightCorner().row}},{key:"expand",value:function(e){var t=this.getTopLeftCorner(),n=this.getBottomRightCorner();return(e.row<t.row||e.col<t.col||e.row>n.row||e.col>n.col)&&(this.from=new r.default(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=new r.default(Math.max(n.row,e.row),Math.max(n.col,e.col)),!0)}},{key:"expandByRange",value:function(e){if(this.includesRange(e)||!this.overlaps(e))return!1;var t=this.getTopLeftCorner(),n=this.getBottomRightCorner(),o=this.getDirection(),i=e.getTopLeftCorner(),a=e.getBottomRightCorner(),s=Math.min(t.row,i.row),l=Math.min(t.col,i.col),u=Math.max(n.row,a.row),c=Math.max(n.col,a.col),f=new r.default(s,l),h=new r.default(u,c);return this.from=f,this.to=h,this.setDirection(o),this.highlight.row===this.getBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally(),!0}},{key:"getDirection",value:function(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0}},{key:"setDirection",value:function(e){switch(e){case"NW-SE":var t=[this.getTopLeftCorner(),this.getBottomRightCorner()];this.from=t[0],this.to=t[1];break;case"NE-SW":var n=[this.getTopRightCorner(),this.getBottomLeftCorner()];this.from=n[0],this.to=n[1];break;case"SE-NW":var r=[this.getBottomRightCorner(),this.getTopLeftCorner()];this.from=r[0],this.to=r[1];break;case"SW-NE":var o=[this.getBottomLeftCorner(),this.getTopRightCorner()];this.from=o[0],this.to=o[1]}}},{key:"getVerticalDirection",value:function(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}},{key:"getHorizontalDirection",value:function(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}},{key:"flipDirectionVertically",value:function(){switch(this.getDirection()){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE")}}},{key:"flipDirectionHorizontally",value:function(){switch(this.getDirection()){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW")}}},{key:"getTopLeftCorner",value:function(){return new r.default(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"getBottomRightCorner",value:function(){return new r.default(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getTopRightCorner",value:function(){return new r.default(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getBottomLeftCorner",value:function(){return new r.default(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"isCorner",value:function(e,t){return!!(t&&t.includes(e)&&(this.getTopLeftCorner().isEqual(new r.default(t.from.row,t.from.col))||this.getTopRightCorner().isEqual(new r.default(t.from.row,t.to.col))||this.getBottomLeftCorner().isEqual(new r.default(t.to.row,t.from.col))||this.getBottomRightCorner().isEqual(new r.default(t.to.row,t.to.col))))||(e.isEqual(this.getTopLeftCorner())||e.isEqual(this.getTopRightCorner())||e.isEqual(this.getBottomLeftCorner())||e.isEqual(this.getBottomRightCorner()))}},{key:"getOppositeCorner",value:function(e,t){if(!(e instanceof r.default))return!1;if(t&&t.includes(e)){if(this.getTopLeftCorner().isEqual(new r.default(t.from.row,t.from.col)))return this.getBottomRightCorner();if(this.getTopRightCorner().isEqual(new r.default(t.from.row,t.to.col)))return this.getBottomLeftCorner();if(this.getBottomLeftCorner().isEqual(new r.default(t.to.row,t.from.col)))return this.getTopRightCorner();if(this.getBottomRightCorner().isEqual(new r.default(t.to.row,t.to.col)))return this.getTopLeftCorner()}return e.isEqual(this.getBottomRightCorner())?this.getTopLeftCorner():e.isEqual(this.getTopLeftCorner())?this.getBottomRightCorner():e.isEqual(this.getTopRightCorner())?this.getBottomLeftCorner():e.isEqual(this.getBottomLeftCorner())?this.getTopRightCorner():void 0}},{key:"getBordersSharedWith",value:function(e){if(!this.includesRange(e))return[];var t=Math.min(this.from.row,this.to.row),n=Math.max(this.from.row,this.to.row),r=Math.min(this.from.col,this.to.col),o=Math.max(this.from.col,this.to.col),i=Math.min(e.from.row,e.to.row),a=Math.max(e.from.row,e.to.row),s=Math.min(e.from.col,e.to.col),l=Math.max(e.from.col,e.to.col),u=[];return t===i&&u.push("top"),o===l&&u.push("right"),n===a&&u.push("bottom"),r===s&&u.push("left"),u}},{key:"getInner",value:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),n=[],o=e.row;o<=t.row;o++)for(var i=e.col;i<=t.col;i++)this.from.row===o&&this.from.col===i||this.to.row===o&&this.to.col===i||n.push(new r.default(o,i));return n}},{key:"getAll",value:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),n=[],o=e.row;o<=t.row;o++)for(var i=e.col;i<=t.col;i++)e.row===o&&e.col===i?n.push(e):t.row===o&&t.col===i?n.push(t):n.push(new r.default(o,i));return n}},{key:"forAll",value:function(e){for(var t=this.getTopLeftCorner(),n=this.getBottomRightCorner(),r=t.row;r<=n.row;r++)for(var o=t.col;o<=n.col;o++){if(!1===e(r,o))return}}},{key:"toObject",value:function(){return{from:this.from.toObject(),to:this.to.toObject()}}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}t.__esModule=!0,t.default=void 0;var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.offset=t,this.total=n,this.countTH=r}return function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(e,[{key:"offsetted",value:function(e){return e+this.offset}},{key:"unOffsetted",value:function(e){return e-this.offset}},{key:"renderedToSource",value:function(e){return this.offsetted(e)}},{key:"sourceToRendered",value:function(e){return this.unOffsetted(e)}},{key:"offsettedTH",value:function(e){return e-this.countTH}},{key:"unOffsettedTH",value:function(e){return e+this.countTH}},{key:"visibleRowHeadedColumnToSourceColumn",value:function(e){return this.renderedToSource(this.offsettedTH(e))}},{key:"sourceColumnToVisibleRowHeadedColumn",value:function(e){return this.unOffsettedTH(this.sourceToRendered(e))}}]),e}();t.default=o},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}t.__esModule=!0,t.default=void 0;var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.offset=t,this.total=n,this.countTH=r}return function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(e,[{key:"offsetted",value:function(e){return e+this.offset}},{key:"unOffsetted",value:function(e){return e-this.offset}},{key:"renderedToSource",value:function(e){return this.offsetted(e)}},{key:"sourceToRendered",value:function(e){return this.unOffsetted(e)}},{key:"offsettedTH",value:function(e){return e-this.countTH}},{key:"unOffsettedTH",value:function(e){return e+this.countTH}},{key:"visibleColHeadedRowToSourceRow",value:function(e){return this.renderedToSource(this.offsettedTH(e))}},{key:"sourceRowToVisibleColHeadedRow",value:function(e){return this.unOffsettedTH(this.sourceToRendered(e))}}]),e}();t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(2),i=n(42),a=h(n(303)),s=h(n(304)),l=h(n(305)),u=h(n(306)),c=h(n(307)),f=h(n(309));function h(e){return e&&e.__esModule?e:{default:e}}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var p=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=[];if(this.guid="wt_".concat((0,i.randomString)()),t.cloneSource?(this.cloneSource=t.cloneSource,this.cloneOverlay=t.cloneOverlay,this.wtSettings=t.cloneSource.wtSettings,this.wtTable=new c.default(this,t.table,t.wtRootElement),this.wtScroll=new l.default(this),this.wtViewport=t.cloneSource.wtViewport,this.wtEvent=new a.default(this),this.selections=this.cloneSource.selections):(this.wtSettings=new u.default(this,t),this.wtTable=new c.default(this,t.table),this.wtScroll=new l.default(this),this.wtViewport=new f.default(this),this.wtEvent=new a.default(this),this.selections=this.getSetting("selections"),this.wtOverlays=new s.default(this),this.exportSettingsAsClassNames()),this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(var o=0,h=this.wtTable.THEAD.childNodes[0].childNodes.length;o<h;o++)n.push(this.wtTable.THEAD.childNodes[0].childNodes[o].innerHTML);this.getSetting("columnHeaders").length||this.update("columnHeaders",[function(e,t){(0,r.fastInnerText)(t,n[e])}])}this.drawn=!1,this.drawInterrupted=!1}return function(e,t,n){t&&d(e.prototype,t),n&&d(e,n)}(e,[{key:"draw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,e||(0,r.isVisible)(this.wtTable.TABLE)?this.wtTable.draw(e):this.drawInterrupted=!0,this}},{key:"getCell",value:function(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return this.wtTable.getCell(e);var t=this.wtSettings.getSetting("totalRows"),n=this.wtSettings.getSetting("fixedRowsTop"),r=this.wtSettings.getSetting("fixedRowsBottom"),o=this.wtSettings.getSetting("fixedColumnsLeft");if(e.row<n&&e.col<o)return this.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell(e);if(e.row<n)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<o&&e.row>=t-r){if(this.wtOverlays.bottomLeftCornerOverlay&&this.wtOverlays.bottomLeftCornerOverlay.clone)return this.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<o)return this.wtOverlays.leftOverlay.clone.wtTable.getCell(e);if(e.row<t&&e.row>t-r&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}},{key:"update",value:function(e,t){return this.wtSettings.update(e,t)}},{key:"scrollViewport",value:function(e,t,n,r,o){return this.wtScroll.scrollViewport(e,t,n,r,o)}},{key:"scrollViewportHorizontally",value:function(e,t,n){return this.wtScroll.scrollViewportHorizontally(e,t,n)}},{key:"scrollViewportVertically",value:function(e,t,n){return this.wtScroll.scrollViewportVertically(e,t,n)}},{key:"getViewport",value:function(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}},{key:"getOverlayName",value:function(){return this.cloneOverlay?this.cloneOverlay.type:"master"}},{key:"isOverlayName",value:function(e){return!!this.cloneOverlay&&this.cloneOverlay.type===e}},{key:"exportSettingsAsClassNames",value:function(){var e=this,t=[],n=[];(0,o.objectEach)({rowHeaders:["array"],columnHeaders:["array"]},function(r,o){r.indexOf("array")>-1&&e.getSetting(o).length&&n.push("ht".concat((0,i.toUpperCaseFirst)(o))),t.push("ht".concat((0,i.toUpperCaseFirst)(o)))}),(0,r.removeClass)(this.wtTable.wtRootElement.parentNode,t),(0,r.addClass)(this.wtTable.wtRootElement.parentNode,n)}},{key:"getSetting",value:function(e,t,n,r,o){return this.wtSettings.getSetting(e,t,n,r,o)}},{key:"hasSetting",value:function(e){return this.wtSettings.has(e)}},{key:"destroy",value:function(){this.wtOverlays.destroy(),this.wtEvent.destroy()}}]),e}();t.default=p},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(51),i=n(49),a=n(48),s=function(e){return e&&e.__esModule?e:{default:e}}(n(10));function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=new WeakMap,c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.instance=t,this.eventManager=new s.default(t),u.set(this,{selectedCellBeforeTouchEnd:void 0,dblClickTimeout:[null,null],dblClickOrigin:[null,null]}),this.registerEvents()}return function(e,t,n){t&&l(e.prototype,t),n&&l(e,n)}(e,[{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(this.instance.wtTable.holder,"contextmenu",function(t){return e.onContextMenu(t)}),this.eventManager.addEventListener(this.instance.wtTable.TABLE,"mouseover",function(t){return e.onMouseOver(t)}),this.eventManager.addEventListener(this.instance.wtTable.TABLE,"mouseout",function(t){return e.onMouseOut(t)});var t=function(){e.eventManager.addEventListener(e.instance.wtTable.holder,"touchstart",function(t){return e.onTouchStart(t)}),e.eventManager.addEventListener(e.instance.wtTable.holder,"touchend",function(t){return e.onTouchEnd(t)}),e.instance.momentumScrolling||(e.instance.momentumScrolling={}),e.eventManager.addEventListener(e.instance.wtTable.holder,"scroll",function(){clearTimeout(e.instance.momentumScrolling._timeout),e.instance.momentumScrolling.ongoing||e.instance.getSetting("onBeforeTouchScroll"),e.instance.momentumScrolling.ongoing=!0,e.instance.momentumScrolling._timeout=setTimeout(function(){e.instance.touchApplied||(e.instance.momentumScrolling.ongoing=!1,e.instance.getSetting("onAfterMomentumScroll"))},200)})};(0,a.isMobileBrowser)()?t():((0,i.isTouchSupported)()&&t(),e.eventManager.addEventListener(e.instance.wtTable.holder,"mouseup",function(t){return e.onMouseUp(t)}),e.eventManager.addEventListener(e.instance.wtTable.holder,"mousedown",function(t){return e.onMouseDown(t)})),this.eventManager.addEventListener(window,"resize",function(){"none"!==e.instance.getSetting("stretchH")&&e.instance.draw()})}},{key:"selectedCellWasTouched",value:function(e){var t=u.get(this),n=this.parentCell(e).coords;if(t.selectedCellBeforeTouchEnd&&n){var r=[n.row,t.selectedCellBeforeTouchEnd.from.row],o=r[0],i=r[1],a=[n.col,t.selectedCellBeforeTouchEnd.from.col];return o===i&&a[0]===a[1]}return!1}},{key:"parentCell",value:function(e){var t={},n=this.instance.wtTable.TABLE,o=(0,r.closestDown)(e,["TD","TH"],n);return o?(t.coords=this.instance.wtTable.getCoords(o),t.TD=o):(0,r.hasClass)(e,"wtBorder")&&(0,r.hasClass)(e,"current")?(t.coords=this.instance.selections.getCell().cellRange.highlight,t.TD=this.instance.wtTable.getCell(t.coords)):(0,r.hasClass)(e,"wtBorder")&&(0,r.hasClass)(e,"area")&&this.instance.selections.createOrGetArea().cellRange&&(t.coords=this.instance.selections.createOrGetArea().cellRange.to,t.TD=this.instance.wtTable.getCell(t.coords)),t}},{key:"onMouseDown",value:function(e){var t=u.get(this),n=document.activeElement,i=(0,o.partial)(r.getParent,e.realTarget),a=e.realTarget;if(a!==n&&i(0)!==n&&i(1)!==n){var s=this.parentCell(a);(0,r.hasClass)(a,"corner")?this.instance.getSetting("onCellCornerMouseDown",e,a):s.TD&&this.instance.hasSetting("onCellMouseDown")&&this.instance.getSetting("onCellMouseDown",e,s.coords,s.TD,this.instance),2!==e.button&&s.TD&&(t.dblClickOrigin[0]=s.TD,clearTimeout(t.dblClickTimeout[0]),t.dblClickTimeout[0]=setTimeout(function(){t.dblClickOrigin[0]=null},1e3))}}},{key:"onContextMenu",value:function(e){if(this.instance.hasSetting("onCellContextMenu")){var t=this.parentCell(e.realTarget);t.TD&&this.instance.getSetting("onCellContextMenu",e,t.coords,t.TD,this.instance)}}},{key:"onMouseOver",value:function(e){if(this.instance.hasSetting("onCellMouseOver")){var t=this.instance.wtTable.TABLE,n=(0,r.closestDown)(e.realTarget,["TD","TH"],t),o=this.instance.cloneSource||this.instance;n&&n!==o.lastMouseOver&&(0,r.isChildOf)(n,t)&&(o.lastMouseOver=n,this.instance.getSetting("onCellMouseOver",e,this.instance.wtTable.getCoords(n),n,this.instance))}}},{key:"onMouseOut",value:function(e){if(this.instance.hasSetting("onCellMouseOut")){var t=this.instance.wtTable.TABLE,n=(0,r.closestDown)(e.realTarget,["TD","TH"],t),o=(0,r.closestDown)(e.relatedTarget,["TD","TH"],t);n&&n!==o&&(0,r.isChildOf)(n,t)&&this.instance.getSetting("onCellMouseOut",e,this.instance.wtTable.getCoords(n),n,this.instance)}}},{key:"onMouseUp",value:function(e){if(2!==e.button){var t=u.get(this),n=this.parentCell(e.realTarget);n.TD&&this.instance.hasSetting("onCellMouseUp")&&this.instance.getSetting("onCellMouseUp",e,n.coords,n.TD,this.instance),n.TD===t.dblClickOrigin[0]&&n.TD===t.dblClickOrigin[1]?((0,r.hasClass)(e.realTarget,"corner")?this.instance.getSetting("onCellCornerDblClick",e,n.coords,n.TD,this.instance):this.instance.getSetting("onCellDblClick",e,n.coords,n.TD,this.instance),t.dblClickOrigin[0]=null,t.dblClickOrigin[1]=null):n.TD===t.dblClickOrigin[0]&&(t.dblClickOrigin[1]=n.TD,clearTimeout(t.dblClickTimeout[1]),t.dblClickTimeout[1]=setTimeout(function(){t.dblClickOrigin[1]=null},500))}}},{key:"onTouchStart",value:function(e){u.get(this).selectedCellBeforeTouchEnd=this.instance.selections.getCell().cellRange,this.instance.touchApplied=!0,this.onMouseDown(e)}},{key:"onTouchEnd",value:function(e){var t=e.target;this.instance.touchApplied=!1,!1===this.selectedCellWasTouched(t)&&["A","BUTTON","INPUT"].includes(t.tagName)&&e.preventDefault(),this.onMouseUp(e)}},{key:"destroy",value:function(){var e=u.get(this);clearTimeout(e.dblClickTimeout[0]),clearTimeout(e.dblClickTimeout[1]),this.eventManager.destroy()}}]),e}();t.default=c},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(1),i=n(24),a=n(48),s=u(n(10)),l=u(n(50));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var f=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=parseInt(getComputedStyle(document.body).lineHeight,10),o=1.2*parseInt(getComputedStyle(document.body).fontSize,10);this.wot=t,this.instance=this.wot,this.eventManager=new s.default(this.wot),this.wot.update("scrollbarWidth",(0,r.getScrollbarWidth)()),this.wot.update("scrollbarHeight",(0,r.getScrollbarWidth)()),this.scrollableElement=(0,r.getScrollableElement)(this.wot.wtTable.TABLE),this.prepareOverlays(),this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.overlayScrollPositions={master:{top:0,left:0},top:{top:null,left:0},bottom:{top:null,left:0},left:{top:0,left:null}},this.pendingScrollCallbacks={master:{top:0,left:0},top:{left:0},bottom:{left:0},left:{top:0}},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.delegatedScrollCallback=!1,this.registeredListeners=[],this.browserLineHeight=n||o,this.registerListeners()}return function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(e,[{key:"prepareOverlays",value:function(){var e=!1;return this.topOverlay?e=this.topOverlay.updateStateOfRendering()||e:this.topOverlay=l.default.createOverlay(l.default.CLONE_TOP,this.wot),l.default.hasOverlay(l.default.CLONE_BOTTOM)||(this.bottomOverlay={needFullRender:!1,updateStateOfRendering:function(){return!1}}),l.default.hasOverlay(l.default.CLONE_BOTTOM_LEFT_CORNER)||(this.bottomLeftCornerOverlay={needFullRender:!1,updateStateOfRendering:function(){return!1}}),this.bottomOverlay?e=this.bottomOverlay.updateStateOfRendering()||e:this.bottomOverlay=l.default.createOverlay(l.default.CLONE_BOTTOM,this.wot),this.leftOverlay?e=this.leftOverlay.updateStateOfRendering()||e:this.leftOverlay=l.default.createOverlay(l.default.CLONE_LEFT,this.wot),this.topOverlay.needFullRender&&this.leftOverlay.needFullRender&&(this.topLeftCornerOverlay?e=this.topLeftCornerOverlay.updateStateOfRendering()||e:this.topLeftCornerOverlay=l.default.createOverlay(l.default.CLONE_TOP_LEFT_CORNER,this.wot)),this.bottomOverlay.needFullRender&&this.leftOverlay.needFullRender&&(this.bottomLeftCornerOverlay?e=this.bottomLeftCornerOverlay.updateStateOfRendering()||e:this.bottomLeftCornerOverlay=l.default.createOverlay(l.default.CLONE_BOTTOM_LEFT_CORNER,this.wot)),this.wot.getSetting("debug")&&!this.debug&&(this.debug=l.default.createOverlay(l.default.CLONE_DEBUG,this.wot)),e}},{key:"refreshAll",value:function(){this.wot.drawn&&(this.wot.wtTable.holder.parentNode?(this.wot.draw(!0),this.verticalScrolling&&this.leftOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1):this.destroy())}},{key:"registerListeners",value:function(){var e=this,t=this.topOverlay.mainTableScrollableElement,n=this.leftOverlay.mainTableScrollableElement,r=[];for(r.push([document.documentElement,"keydown",function(t){return e.onKeyDown(t)}]),r.push([document.documentElement,"keyup",function(){return e.onKeyUp()}]),r.push([document,"visibilitychange",function(){return e.onKeyUp()}]),r.push([t,"scroll",function(t){return e.onTableScroll(t)}]),t!==n&&r.push([n,"scroll",function(t){return e.onTableScroll(t)}]),window.devicePixelRatio&&window.devicePixelRatio>1||!(0,a.isChrome)()?r.push([this.instance.wtTable.wtRootElement.parentNode,"wheel",function(t){return e.onCloneWheel(t)}]):(this.topOverlay.needFullRender&&r.push([this.topOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.bottomOverlay.needFullRender&&r.push([this.bottomOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.leftOverlay.needFullRender&&r.push([this.leftOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.needFullRender&&r.push([this.topLeftCornerOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.needFullRender&&r.push([this.bottomLeftCornerOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}])),this.topOverlay.trimmingContainer!==window&&this.leftOverlay.trimmingContainer!==window&&r.push([window,"wheel",function(t){var n,r=t.wheelDeltaY||t.deltaY,o=t.wheelDeltaX||t.deltaX;e.topOverlay.clone.wtTable.holder.contains(t.realTarget)?n="top":e.bottomOverlay.clone&&e.bottomOverlay.clone.wtTable.holder.contains(t.realTarget)?n="bottom":e.leftOverlay.clone.wtTable.holder.contains(t.realTarget)?n="left":e.topLeftCornerOverlay&&e.topLeftCornerOverlay.clone&&e.topLeftCornerOverlay.clone.wtTable.holder.contains(t.realTarget)?n="topLeft":e.bottomLeftCornerOverlay&&e.bottomLeftCornerOverlay.clone&&e.bottomLeftCornerOverlay.clone.wtTable.holder.contains(t.realTarget)&&(n="bottomLeft"),("top"===n&&0!==r||"left"===n&&0!==o||"bottom"===n&&0!==r||("topLeft"===n||"bottomLeft"===n)&&(0!==r||0!==o))&&t.preventDefault()}]);r.length;){var o=r.pop();this.eventManager.addEventListener(o[0],o[1],o[2]),this.registeredListeners.push(o)}}},{key:"deregisterListeners",value:function(){for(;this.registeredListeners.length;){var e=this.registeredListeners.pop();this.eventManager.removeEventListener(e[0],e[1],e[2])}}},{key:"onTableScroll",value:function(e){var t=this.leftOverlay.mainTableScrollableElement,n=this.topOverlay.mainTableScrollableElement,r=e.target;this.keyPressed&&(n!==window&&r!==window&&!e.target.contains(n)||t!==window&&r!==window&&!e.target.contains(t))||this.syncScrollPositions(e)}},{key:"onCloneWheel",value:function(e){this.scrollableElement!==window&&e.preventDefault();var t=this.leftOverlay.mainTableScrollableElement,n=this.topOverlay.mainTableScrollableElement,r=e.target,o=n!==window&&r!==window&&!e.target.contains(n),i=t!==window&&r!==window&&!e.target.contains(t);this.keyPressed&&(o||i)||this.translateMouseWheelToScroll(e)}},{key:"onKeyDown",value:function(e){this.keyPressed=(0,i.isKey)(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}},{key:"onKeyUp",value:function(){this.keyPressed=!1}},{key:"translateMouseWheelToScroll",value:function(e){var t=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,n=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;return 1===e.deltaMode&&(n+=n*this.browserLineHeight,t+=t*this.browserLineHeight),this.scrollVertically(t),this.scrollHorizontally(n),!1}},{key:"scrollVertically",value:function(e){if(0===e)return 0;this.scrollableElement.scrollTop+=e}},{key:"scrollHorizontally",value:function(e){if(0===e)return 0;this.scrollableElement.scrollLeft+=e}},{key:"syncScrollPositions",value:function(){if(!this.destroyed){var e=this.topOverlay.clone.wtTable.holder,t=this.leftOverlay.clone.wtTable.holder,n=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop],r=n[0],o=n[1];if(this.horizontalScrolling=e.scrollLeft!==r,this.verticalScrolling=t.scrollTop!==o,this.horizontalScrolling){e.scrollLeft=r;var i=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;i&&(i.scrollLeft=r)}this.verticalScrolling&&(t.scrollTop=o),this.refreshAll()}}},{key:"syncScrollWithMaster",value:function(){var e=this.topOverlay.mainTableScrollableElement,t=e.scrollLeft,n=e.scrollTop;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.leftOverlay.needFullRender&&(this.leftOverlay.clone.wtTable.holder.scrollTop=n)}},{key:"updateMainScrollableElements",value:function(){this.deregisterListeners(),this.leftOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement(),this.scrollableElement=(0,r.getScrollableElement)(this.wot.wtTable.TABLE),this.registerListeners()}},{key:"destroy",value:function(){this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.leftOverlay.destroy(),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.destroy(),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.destroy(),this.debug&&this.debug.destroy(),this.destroyed=!0}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted){var t=this.wot.wtTable.wtRootElement.parentNode||this.wot.wtTable.wtRootElement,n=t.clientWidth,r=t.clientHeight;n===this.spreaderLastSize.width&&r===this.spreaderLastSize.height||(this.spreaderLastSize.width=n,this.spreaderLastSize.height=r,this.adjustElementsSize())}this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.leftOverlay.refresh(e),this.topOverlay.refresh(e),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.refresh(e),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.refresh(e),this.debug&&this.debug.refresh(e)}},{key:"adjustElementsSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.wot.getSetting("totalColumns"),n=this.wot.getSetting("totalRows"),r=this.wot.wtViewport.getRowHeaderWidth(),o=this.wot.wtViewport.getColumnHeaderHeight(),i=this.wot.wtTable.hider.style;i.width="".concat(r+this.leftOverlay.sumCellSizes(0,t),"px"),i.height="".concat(o+this.topOverlay.sumCellSizes(0,n)+1,"px"),this.topOverlay.adjustElementsSize(e),this.leftOverlay.adjustElementsSize(e),this.bottomOverlay.clone&&this.bottomOverlay.adjustElementsSize(e)}},{key:"applyToDOM",value:function(){this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted||this.adjustElementsSize(),this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.leftOverlay.applyToDOM()}},{key:"getParentOverlay",value:function(e){if(!e)return null;var t=[this.topOverlay,this.leftOverlay,this.bottomOverlay,this.topLeftCornerOverlay,this.bottomLeftCornerOverlay],n=null;return(0,o.arrayEach)(t,function(t){t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(n=t.clone)}),n}}]),e}();t.default=f},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(5);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.wot=t,this.instance=t}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(e,[{key:"scrollViewport",value:function(e,t,n,r,o){var i=this.scrollViewportHorizontally(e.col,n,o),a=this.scrollViewportVertically(e.row,t,r);return i||a}},{key:"scrollViewportHorizontally",value:function(e,t,n){if(!this.wot.drawn)return!1;var r=this._getVariables(),o=r.fixedColumnsLeft,i=r.leftOverlay,a=r.totalColumns,s=!1;return e>=0&&e<=Math.max(a-1,0)&&(e>=o&&(e<this.getFirstVisibleColumn()||n)?s=i.scrollTo(e):(e>this.getLastVisibleColumn()||t)&&(s=i.scrollTo(e,!0))),s}},{key:"scrollViewportVertically",value:function(e,t,n){if(!this.wot.drawn)return!1;var r=this._getVariables(),o=r.fixedRowsBottom,i=r.fixedRowsTop,a=r.topOverlay,s=r.totalRows,l=!1;return e>=0&&e<=Math.max(s-1,0)&&(e>=i&&(e<this.getFirstVisibleRow()||t)?l=a.scrollTo(e):(e>this.getLastVisibleRow()&&e<s-o||n)&&(l=a.scrollTo(e,!0))),l}},{key:"getFirstVisibleRow",value:function(){var e=this._getVariables(),t=e.topOverlay,n=e.wtTable,i=e.wtViewport,a=e.totalRows,s=e.fixedRowsTop,l=n.getFirstVisibleRow();if(t.mainTableScrollableElement===window){var u=(0,r.offset)(n.wtRootElement),c=(0,r.innerHeight)(n.hider),f=(0,r.innerHeight)(window),h=(0,r.getScrollTop)(window);if(u.top+c-f<=h){var d=i.getColumnHeaderHeight();d+=t.sumCellSizes(0,s),(0,o.rangeEachReverse)(a,1,function(e){if(d+=t.sumCellSizes(e-1,e),u.top+c-d<=h)return l=e,!1})}}return l}},{key:"getLastVisibleRow",value:function(){var e=this._getVariables(),t=e.topOverlay,n=e.wtTable,i=e.wtViewport,a=e.totalRows,s=n.getLastVisibleRow();if(t.mainTableScrollableElement===window){var l=(0,r.offset)(n.wtRootElement),u=(0,r.innerHeight)(window),c=(0,r.getScrollTop)(window);if(l.top>c){var f=i.getColumnHeaderHeight();(0,o.rangeEach)(1,a,function(e){if(f+=t.sumCellSizes(e-1,e),l.top+f-c>=u)return s=e-2,!1})}}return s}},{key:"getFirstVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,i=e.wtViewport,a=e.totalColumns,s=n.getFirstVisibleColumn();if(t.mainTableScrollableElement===window){var l=(0,r.offset)(n.wtRootElement),u=(0,r.innerWidth)(n.hider),c=(0,r.innerWidth)(window),f=(0,r.getScrollLeft)(window);if(l.left+u-c<=f){var h=i.getRowHeaderWidth();(0,o.rangeEachReverse)(a,1,function(e){if(h+=t.sumCellSizes(e-1,e),l.left+u-h<=f)return s=e,!1})}}return s}},{key:"getLastVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,i=e.wtViewport,a=e.totalColumns,s=n.getLastVisibleColumn();if(t.mainTableScrollableElement===window){var l=(0,r.offset)(n.wtRootElement),u=(0,r.innerWidth)(window),c=(0,r.getScrollLeft)(window);if(l.left>c){var f=i.getRowHeaderWidth();(0,o.rangeEach)(1,a,function(e){if(f+=t.sumCellSizes(e-1,e),l.left+f-c>=u)return s=e-2,!1})}}return s}},{key:"_getVariables",value:function(){var e=this.wot;return{topOverlay:e.wtOverlays.topOverlay,leftOverlay:e.wtOverlays.leftOverlay,wtTable:e.wtTable,wtViewport:e.wtViewport,totalRows:e.getSetting("totalRows"),totalColumns:e.getSetting("totalColumns"),fixedRowsTop:e.getSetting("fixedRowsTop"),fixedRowsBottom:e.getSetting("fixedRowsBottom"),fixedColumnsLeft:e.getSetting("fixedColumnsLeft")}}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(2);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(t,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.wot=t,this.instance=t,this.defaults={table:void 0,debug:!1,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:function(){return!1},data:void 0,freezeOverlays:!1,fixedColumnsLeft:0,fixedRowsTop:0,fixedRowsBottom:0,minSpareRows:0,rowHeaders:function(){return[]},columnHeaders:function(){return[]},totalRows:void 0,totalColumns:void 0,cellRenderer:function(e,t,n){var o=i.getSetting("data",e,t);(0,r.fastInnerText)(n,void 0===o||null===o?"":o)},columnWidth:function(){},rowHeight:function(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onScrollVertically:null,onScrollHorizontally:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:function(e){return e},onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,scrollbarWidth:10,scrollbarHeight:10,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null},this.settings={},(0,o.objectEach)(this.defaults,function(e,t){if(void 0!==n[t])i.settings[t]=n[t];else{if(void 0===e)throw new Error('A required setting "'.concat(t,'" was not provided'));i.settings[t]=e}})}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(e,[{key:"update",value:function(e,t){var n=this;return void 0===t?(0,o.objectEach)(e,function(e,t){n.settings[t]=e}):this.settings[e]=t,this.wot}},{key:"getSetting",value:function(e,t,n,r,o){return"function"==typeof this.settings[e]?this.settings[e](t,n,r,o):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}},{key:"has",value:function(e){return!!this.settings[e]}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(51),i=c(n(83)),a=c(n(180)),s=c(n(181)),l=c(n(308)),u=c(n(50));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var g=function(){function e(t,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.wot=t,this.instance=this.wot,this.TABLE=n,this.TBODY=null,this.THEAD=null,this.COLGROUP=null,this.tableOffset=0,this.holderOffset=0,(0,r.removeTextNodes)(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.colgroupChildrenLength=this.COLGROUP.childNodes.length,this.theadChildrenLength=this.THEAD.firstChild?this.THEAD.firstChild.childNodes.length:0,this.tbodyChildrenLength=this.TBODY.childNodes.length,this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;var i=this.wot.wtSettings.settings.rowHeaderWidth;this.wot.wtSettings.settings.rowHeaderWidth=function(){return o._modifyRowHeaderWidth(i)}}return function(e,t,n){t&&p(e.prototype,t),n&&p(e,n)}(e,[{key:"fixTableDomTree",value:function(){this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=document.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=document.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=document.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD)),this.wot.getSetting("columnHeaders").length&&!this.THEAD.childNodes.length&&this.THEAD.appendChild(document.createElement("TR"))}},{key:"createSpreader",value:function(e){var t,n=e.parentNode;return n&&1===n.nodeType&&(0,r.hasClass)(n,"wtHolder")||((t=document.createElement("div")).className="wtSpreader",n&&n.insertBefore(t,e),t.appendChild(e)),t.style.position="relative",t}},{key:"createHider",value:function(e){var t,n=e.parentNode;return n&&1===n.nodeType&&(0,r.hasClass)(n,"wtHolder")||((t=document.createElement("div")).className="wtHider",n&&n.insertBefore(t,e),t.appendChild(e)),t}},{key:"createHolder",value:function(e){var t,n=e.parentNode;return n&&1===n.nodeType&&(0,r.hasClass)(n,"wtHolder")||((t=document.createElement("div")).style.position="relative",t.className="wtHolder",n&&n.insertBefore(t,e),this.isWorkingOnClone()||(t.parentNode.className+="ht_master handsontable"),t.appendChild(e)),t}},{key:"alignOverlaysWithTrimmingContainer",value:function(){var e=(0,r.getTrimmingContainer)(this.wtRootElement);this.isWorkingOnClone()||(this.holder.parentNode.style.position="relative",e===window?this.wot.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible"):(this.holder.style.width=(0,r.getStyle)(e,"width"),this.holder.style.height=(0,r.getStyle)(e,"height"),this.holder.style.overflow=""))}},{key:"isWorkingOnClone",value:function(){return!!this.wot.cloneSource}},{key:"draw",value:function(e){var t,n,o=this.wot,i=o.wtOverlays,l=o.wtViewport,c=this.instance.getSetting("totalRows"),f=this.wot.getSetting("rowHeaders").length,h=this.wot.getSetting("columnHeaders").length,d=!1,p=e;if(!this.isWorkingOnClone()&&(this.holderOffset=(0,r.offset)(this.holder),p=l.createRenderCalculators(p),f&&!this.wot.getSetting("fixedColumnsLeft"))){var g=i.leftOverlay.getScrollPosition(),v=this.correctHeaderWidth;this.correctHeaderWidth=g>0,v!==this.correctHeaderWidth&&(p=!1)}(this.isWorkingOnClone()||(d=i.prepareOverlays()),p)?(this.isWorkingOnClone()||l.createVisibleCalculators(),i&&i.refresh(!0)):(this.isWorkingOnClone()?this.tableOffset=this.wot.cloneSource.wtTable.tableOffset:this.tableOffset=(0,r.offset)(this.TABLE),t=u.default.isOverlayTypeOf(this.wot.cloneOverlay,u.default.CLONE_DEBUG)||u.default.isOverlayTypeOf(this.wot.cloneOverlay,u.default.CLONE_TOP)||u.default.isOverlayTypeOf(this.wot.cloneOverlay,u.default.CLONE_TOP_LEFT_CORNER)?0:u.default.isOverlayTypeOf(this.instance.cloneOverlay,u.default.CLONE_BOTTOM)||u.default.isOverlayTypeOf(this.instance.cloneOverlay,u.default.CLONE_BOTTOM_LEFT_CORNER)?Math.max(c-this.wot.getSetting("fixedRowsBottom"),0):l.rowsRenderCalculator.startRow,n=u.default.isOverlayTypeOf(this.wot.cloneOverlay,u.default.CLONE_DEBUG)||u.default.isOverlayTypeOf(this.wot.cloneOverlay,u.default.CLONE_LEFT)||u.default.isOverlayTypeOf(this.wot.cloneOverlay,u.default.CLONE_TOP_LEFT_CORNER)||u.default.isOverlayTypeOf(this.wot.cloneOverlay,u.default.CLONE_BOTTOM_LEFT_CORNER)?0:l.columnsRenderCalculator.startColumn,this.rowFilter=new s.default(t,c,h),this.columnFilter=new a.default(n,this.wot.getSetting("totalColumns"),f),this.alignOverlaysWithTrimmingContainer(),this._doDraw());return this.refreshSelections(p),this.isWorkingOnClone()||(i.topOverlay.resetFixedPosition(),i.bottomOverlay.clone&&i.bottomOverlay.resetFixedPosition(),i.leftOverlay.resetFixedPosition(),i.topLeftCornerOverlay&&i.topLeftCornerOverlay.resetFixedPosition(),i.bottomLeftCornerOverlay&&i.bottomLeftCornerOverlay.clone&&i.bottomLeftCornerOverlay.resetFixedPosition()),d&&i.syncScrollWithMaster(),this.wot.drawn=!0,this}},{key:"_doDraw",value:function(){new l.default(this).render()}},{key:"removeClassFromCells",value:function(e){for(var t=this.TABLE.querySelectorAll(".".concat(e)),n=0,o=t.length;n<o;n++)(0,r.removeClass)(t[n],e)}},{key:"refreshSelections",value:function(e){if(this.wot.selections){var t=Array.from(this.wot.selections),n=t.length;if(e){for(var r=[],o=0;o<n;o++){for(var i=t[o].settings,a=i.highlightHeaderClassName,s=i.highlightRowClassName,l=i.highlightColumnClassName,u=t[o].classNames,c=u.length,f=0;f<c;f++)r.includes(u[f])||r.push(u[f]);a&&!r.includes(a)&&r.push(a),s&&!r.includes(s)&&r.push(s),l&&!r.includes(l)&&r.push(l)}var h=this.wot.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(h))for(var d=0;d<h.length;d++)r.push(h[d]);for(var p=r.length,g=0;g<p;g++)this.removeClassFromCells(r[g])}for(var v=0;v<n;v++)t[v].draw(this.wot,e)}}},{key:"getCell",value:function(e){var t=e.row,n=e.col,r=this.wot.getSetting("onModifyGetCellCoords",t,n);if(r&&Array.isArray(r)){var o=d(r,2);t=o[0],n=o[1]}if(this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;var i=this.TBODY.childNodes[this.rowFilter.sourceToRendered(t)];return i?i.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(n)]:void 0}},{key:"getColumnHeader",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.THEAD.childNodes[t];if(n)return n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}},{key:"getRowHeader",value:function(e){if(0===this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0))return null;var t=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)];return t?t.childNodes[0]:void 0}},{key:"getCoords",value:function(e){var t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,r.closest)(t,["TD","TH"])),null===t)return null;var n=t.parentNode,o=n.parentNode,a=(0,r.index)(n),s=t.cellIndex;return(0,r.overlayContainsElement)(u.default.CLONE_TOP_LEFT_CORNER,t)||(0,r.overlayContainsElement)(u.default.CLONE_TOP,t)?"THEAD"===o.nodeName&&(a-=o.childNodes.length):a=o===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(a):this.rowFilter.renderedToSource(a),s=(0,r.overlayContainsElement)(u.default.CLONE_TOP_LEFT_CORNER,t)||(0,r.overlayContainsElement)(u.default.CLONE_LEFT,t)?this.columnFilter.offsettedTH(s):this.columnFilter.visibleRowHeadedColumnToSourceColumn(s),new i.default(a,s)}},{key:"getTrForRow",value:function(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}},{key:"getFirstRenderedRow",value:function(){return this.wot.wtViewport.rowsRenderCalculator.startRow}},{key:"getFirstVisibleRow",value:function(){return this.wot.wtViewport.rowsVisibleCalculator.startRow}},{key:"getFirstRenderedColumn",value:function(){return this.wot.wtViewport.columnsRenderCalculator.startColumn}},{key:"getFirstVisibleColumn",value:function(){return this.wot.wtViewport.columnsVisibleCalculator.startColumn}},{key:"getLastRenderedRow",value:function(){return this.wot.wtViewport.rowsRenderCalculator.endRow}},{key:"getLastVisibleRow",value:function(){return this.wot.wtViewport.rowsVisibleCalculator.endRow}},{key:"getLastRenderedColumn",value:function(){return this.wot.wtViewport.columnsRenderCalculator.endColumn}},{key:"getLastVisibleColumn",value:function(){return this.wot.wtViewport.columnsVisibleCalculator.endColumn}},{key:"isRowBeforeRenderedRows",value:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)<0&&e>=0}},{key:"isRowAfterViewport",value:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)>this.getLastVisibleRow()}},{key:"isRowAfterRenderedRows",value:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)>this.getLastRenderedRow()}},{key:"isColumnBeforeViewport",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}},{key:"isColumnAfterViewport",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)>this.getLastVisibleColumn()}},{key:"isLastRowFullyVisible",value:function(){return this.getLastVisibleRow()===this.getLastRenderedRow()}},{key:"isLastColumnFullyVisible",value:function(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}},{key:"getRenderedColumnsCount",value:function(){var e=this.wot.wtViewport.columnsRenderCalculator.count,t=this.wot.getSetting("totalColumns");if(this.wot.isOverlayName(u.default.CLONE_DEBUG))e=t;else if(this.wot.isOverlayName(u.default.CLONE_LEFT)||this.wot.isOverlayName(u.default.CLONE_TOP_LEFT_CORNER)||this.wot.isOverlayName(u.default.CLONE_BOTTOM_LEFT_CORNER))return Math.min(this.wot.getSetting("fixedColumnsLeft"),t);return e}},{key:"getRenderedRowsCount",value:function(){var e=this.wot.wtViewport.rowsRenderCalculator.count,t=this.wot.getSetting("totalRows");return this.wot.isOverlayName(u.default.CLONE_DEBUG)?e=t:this.wot.isOverlayName(u.default.CLONE_TOP)||this.wot.isOverlayName(u.default.CLONE_TOP_LEFT_CORNER)?e=Math.min(this.wot.getSetting("fixedRowsTop"),t):(this.wot.isOverlayName(u.default.CLONE_BOTTOM)||this.wot.isOverlayName(u.default.CLONE_BOTTOM_LEFT_CORNER))&&(e=Math.min(this.wot.getSetting("fixedRowsBottom"),t)),e}},{key:"getVisibleRowsCount",value:function(){return this.wot.wtViewport.rowsVisibleCalculator.count}},{key:"allRowsInViewport",value:function(){return this.wot.getSetting("totalRows")===this.getVisibleRowsCount()}},{key:"getRowHeight",value:function(e){var t=this.wot.wtSettings.settings.rowHeight(e),n=this.wot.wtViewport.oversizedRows[e];return void 0!==n&&(t=void 0===t?n:Math.max(t,n)),t}},{key:"getColumnHeaderHeight",value:function(e){var t=this.wot.wtSettings.settings.defaultRowHeight,n=this.wot.wtViewport.oversizedColumnHeaders[e];return void 0!==n&&(t=t?Math.max(t,n):n),t}},{key:"getVisibleColumnsCount",value:function(){return this.wot.wtViewport.columnsVisibleCalculator.count}},{key:"allColumnsInViewport",value:function(){return this.wot.getSetting("totalColumns")===this.getVisibleColumnsCount()}},{key:"getColumnWidth",value:function(e){var t=this.wot.wtSettings.settings.columnWidth;return"function"==typeof t?t=t(e):"object"===h(t)&&(t=t[e]),t||this.wot.wtSettings.settings.defaultColumnWidth}},{key:"getStretchedColumnWidth",value:function(e){var t=this.getColumnWidth(e),n=null===t||void 0===t?this.instance.wtSettings.settings.defaultColumnWidth:t,r=this.wot.wtViewport.columnsRenderCalculator;if(r){var o=r.getStretchedColumnWidth(e,n);o&&(n=o)}return n}},{key:"_modifyRowHeaderWidth",value:function(e){var t=(0,o.isFunction)(e)?e():null;return Array.isArray(t)?(t=f(t))[t.length-1]=this._correctRowHeaderWidth(t[t.length-1]):t=this._correctRowHeaderWidth(t),t}},{key:"_correctRowHeaderWidth",value:function(e){var t=e;return"number"!=typeof e&&(t=this.wot.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}}]),e}();t.default=g},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(33),i=n(37),a=function(e){return e&&e.__esModule?e:{default:e}}(n(50));function s(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['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.']);return s=function(){return e},e}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=!1;function c(e,t){var n=document.createElement("TH");return t.insertBefore(n,e),t.removeChild(e),n}function f(e,t){var n=document.createElement("TD");return t.insertBefore(n,e),t.removeChild(e),n}var h=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.wtTable=t,this.wot=t.instance,this.instance=t.instance,this.rowFilter=t.rowFilter,this.columnFilter=t.columnFilter,this.TABLE=t.TABLE,this.THEAD=t.THEAD,this.TBODY=t.TBODY,this.COLGROUP=t.COLGROUP,this.rowHeaders=[],this.rowHeaderCount=0,this.columnHeaders=[],this.columnHeaderCount=0,this.fixedRowsTop=0,this.fixedRowsBottom=0}return function(e,t,n){t&&l(e.prototype,t),n&&l(e,n)}(e,[{key:"render",value:function(){if(!this.wtTable.isWorkingOnClone()){var e={};if(this.wot.getSetting("beforeDraw",!0,e),!0===e.skipRender)return}this.rowHeaders=this.wot.getSetting("rowHeaders"),this.rowHeaderCount=this.rowHeaders.length,this.fixedRowsTop=this.wot.getSetting("fixedRowsTop"),this.fixedRowsBottom=this.wot.getSetting("fixedRowsBottom"),this.columnHeaders=this.wot.getSetting("columnHeaders"),this.columnHeaderCount=this.columnHeaders.length;var t,n=this.wtTable.getRenderedColumnsCount(),o=this.wtTable.getRenderedRowsCount(),i=this.wot.getSetting("totalColumns"),s=this.wot.getSetting("totalRows"),l=!1;if((a.default.isOverlayTypeOf(this.wot.cloneOverlay,a.default.CLONE_BOTTOM)||a.default.isOverlayTypeOf(this.wot.cloneOverlay,a.default.CLONE_BOTTOM_LEFT_CORNER))&&(this.columnHeaders=[],this.columnHeaderCount=0),i>=0&&(this.adjustAvailableNodes(),l=!0,this.renderColumnHeaders(),this.renderRows(s,o,n),this.wtTable.isWorkingOnClone()||(t=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null),this.adjustColumnWidths(n),this.markOversizedColumnHeaders(),this.adjustColumnHeaderHeights()),l||this.adjustAvailableNodes(),this.removeRedundantRows(o),this.wtTable.isWorkingOnClone()&&!this.wot.isOverlayName(a.default.CLONE_BOTTOM)||this.markOversizedRows(),this.wtTable.isWorkingOnClone())this.wot.isOverlayName(a.default.CLONE_BOTTOM)&&this.wot.cloneSource.wtOverlays.adjustElementsSize();else{this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays.refresh(!1),this.wot.wtOverlays.applyToDOM();var u=(0,r.outerWidth)(this.wtTable.hider),c=(0,r.outerWidth)(this.wtTable.TABLE);if(0!==u&&c!==u&&this.adjustColumnWidths(n),t!==this.wot.wtViewport.getWorkspaceWidth()){this.wot.wtViewport.containerWidth=null;var f=this.wtTable.getFirstRenderedColumn(),h=this.wtTable.getLastRenderedColumn(),d=this.wot.getSetting("defaultColumnWidth"),p=this.wot.getSetting("rowHeaderWidth");if(null!==(p=this.instance.getSetting("onModifyRowHeaderWidth",p))&&void 0!==p)for(var g=0;g<this.rowHeaderCount;g++){var v=Array.isArray(p)?p[g]:p;v=null===v||void 0===v?d:v,this.COLGROUP.childNodes[g].style.width="".concat(v,"px")}for(var y=f;y<h;y++){var m=this.wtTable.getStretchedColumnWidth(y),w=this.columnFilter.sourceToRendered(y);this.COLGROUP.childNodes[w+this.rowHeaderCount].style.width="".concat(m,"px")}}this.wot.getSetting("onDraw",!0)}}},{key:"removeRedundantRows",value:function(e){for(;this.wtTable.tbodyChildrenLength>e;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength-=1}},{key:"renderRows",value:function(e,t,n){for(var r,l=0,c=this.rowFilter.renderedToSource(l),f=this.wtTable.isWorkingOnClone();c<e&&c>=0&&(!u&&l>1e3&&(u=!0,(0,o.warn)((0,i.toSingleLine)(s()))),void 0===t||l!==t);){if(r=this.getOrCreateTrForRow(l,r),this.renderRowHeaders(c,r),this.adjustColumns(r,n+this.rowHeaderCount),this.renderCells(c,r,n),f&&!this.wot.isOverlayName(a.default.CLONE_BOTTOM)||this.resetOversizedRow(c),r.firstChild){var h=this.wot.wtTable.getRowHeight(c);h?(h-=1,r.firstChild.style.height="".concat(h,"px")):r.firstChild.style.height=""}l+=1,c=this.rowFilter.renderedToSource(l)}}},{key:"resetOversizedRow",value:function(e){this.wot.getSetting("externalRowCalculator")||this.wot.wtViewport.oversizedRows&&this.wot.wtViewport.oversizedRows[e]&&(this.wot.wtViewport.oversizedRows[e]=void 0)}},{key:"markOversizedRows",value:function(){if(!this.wot.getSetting("externalRowCalculator")){var e,t,n,o,i,a=this.instance.wtTable.TBODY.childNodes.length;if(a*this.instance.wtSettings.settings.defaultRowHeight!==(0,r.innerHeight)(this.instance.wtTable.TBODY)-1||this.instance.getSetting("fixedRowsBottom"))for(;a;)a-=1,n=this.instance.wtTable.rowFilter.renderedToSource(a),e=this.instance.wtTable.getRowHeight(n),t=(i=(o=this.instance.wtTable.getTrForRow(n)).querySelector("th"))?(0,r.innerHeight)(i):(0,r.innerHeight)(o)-1,(!e&&this.instance.wtSettings.settings.defaultRowHeight<t||e<t)&&(t+=1,this.instance.wtViewport.oversizedRows[n]=t)}}},{key:"markOversizedColumnHeaders",value:function(){var e=this.wot.getOverlayName();if(this.columnHeaderCount&&!this.wot.wtViewport.hasOversizedColumnHeadersMarked[e]&&!this.wtTable.isWorkingOnClone()){for(var t=this.wtTable.getRenderedColumnsCount(),n=0;n<this.columnHeaderCount;n++)for(var r=-1*this.rowHeaderCount;r<t;r++)this.markIfOversizedColumnHeader(r);this.wot.wtViewport.hasOversizedColumnHeadersMarked[e]=!0}}},{key:"adjustColumnHeaderHeights",value:function(){for(var e=this.wot.getSetting("columnHeaders"),t=this.wot.wtTable.THEAD.childNodes,n=this.wot.wtViewport.oversizedColumnHeaders,r=0,o=e.length;r<o;r++)if(n[r]){if(!t[r]||0===t[r].childNodes.length)return;t[r].childNodes[0].style.height="".concat(n[r],"px")}}},{key:"markIfOversizedColumnHeader",value:function(e){for(var t,n,o,i=this.wot.wtTable.columnFilter.renderedToSource(e),a=this.columnHeaderCount,s=this.wot.wtSettings.settings.defaultRowHeight,l=this.wot.getSetting("columnHeaderHeight")||[];a;)a-=1,t=this.wot.wtTable.getColumnHeaderHeight(a),(n=this.wot.wtTable.getColumnHeader(i,a))&&(o=(0,r.innerHeight)(n),(!t&&s<o||t<o)&&(this.wot.wtViewport.oversizedColumnHeaders[a]=o),Array.isArray(l)?null!==l[a]&&void 0!==l[a]&&(this.wot.wtViewport.oversizedColumnHeaders[a]=l[a]):isNaN(l)||(this.wot.wtViewport.oversizedColumnHeaders[a]=l),this.wot.wtViewport.oversizedColumnHeaders[a]<(l[a]||l)&&(this.wot.wtViewport.oversizedColumnHeaders[a]=l[a]||l))}},{key:"renderCells",value:function(e,t,n){for(var o,i,a=0;a<n;a++)i=this.columnFilter.renderedToSource(a),"TH"===(o=0===a?t.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(i)]:o.nextSibling).nodeName&&(o=f(o,t)),(0,r.hasClass)(o,"hide")||(o.className=""),o.removeAttribute("style"),this.wot.wtSettings.settings.cellRenderer(e,i,o);return o}},{key:"adjustColumnWidths",value:function(e){var t=0,n=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,o=this.wot.getSetting("defaultColumnWidth"),i=this.wot.getSetting("rowHeaderWidth");if(n.offsetHeight<n.scrollHeight&&(t=(0,r.getScrollbarWidth)()),this.wot.wtViewport.columnsRenderCalculator.refreshStretching(this.wot.wtViewport.getViewportWidth()-t),null!==(i=this.instance.getSetting("onModifyRowHeaderWidth",i))&&void 0!==i)for(var a=0;a<this.rowHeaderCount;a++){var s=Array.isArray(i)?i[a]:i;s=null===s||void 0===s?o:s,this.COLGROUP.childNodes[a].style.width="".concat(s,"px")}for(var l=0;l<e;l++){var u=this.wtTable.getStretchedColumnWidth(this.columnFilter.renderedToSource(l));this.COLGROUP.childNodes[l+this.rowHeaderCount].style.width="".concat(u,"px")}}},{key:"appendToTbody",value:function(e){this.TBODY.appendChild(e),this.wtTable.tbodyChildrenLength+=1}},{key:"getOrCreateTrForRow",value:function(e,t){var n;return e>=this.wtTable.tbodyChildrenLength?(n=this.createRow(),this.appendToTbody(n)):n=0===e?this.TBODY.firstChild:t.nextSibling,n.className&&n.removeAttribute("class"),n}},{key:"createRow",value:function(){for(var e=document.createElement("TR"),t=0;t<this.rowHeaderCount;t++)e.appendChild(document.createElement("TH"));return e}},{key:"renderRowHeader",value:function(e,t,n){n.className="",n.removeAttribute("style"),this.rowHeaders[t](e,n,t)}},{key:"renderRowHeaders",value:function(e,t){for(var n=t.firstChild,r=0;r<this.rowHeaderCount;r++)n?"TD"===n.nodeName&&(n=c(n,t)):(n=document.createElement("TH"),t.appendChild(n)),this.renderRowHeader(e,r,n),n=n.nextSibling}},{key:"adjustAvailableNodes",value:function(){this.adjustColGroups(),this.adjustThead()}},{key:"renderColumnHeaders",value:function(){if(this.columnHeaderCount)for(var e=this.wtTable.getRenderedColumnsCount(),t=0;t<this.columnHeaderCount;t++)for(var n=this.getTrForColumnHeaders(t),r=-1*this.rowHeaderCount;r<e;r++){var o=this.columnFilter.renderedToSource(r);this.renderColumnHeader(t,o,n.childNodes[r+this.rowHeaderCount])}}},{key:"adjustColGroups",value:function(){for(var e=this.wtTable.getRenderedColumnsCount();this.wtTable.colgroupChildrenLength<e+this.rowHeaderCount;)this.COLGROUP.appendChild(document.createElement("COL")),this.wtTable.colgroupChildrenLength+=1;for(;this.wtTable.colgroupChildrenLength>e+this.rowHeaderCount;)this.COLGROUP.removeChild(this.COLGROUP.lastChild),this.wtTable.colgroupChildrenLength-=1;this.rowHeaderCount&&(0,r.addClass)(this.COLGROUP.childNodes[0],"rowHeader")}},{key:"adjustThead",value:function(){var e=this.wtTable.getRenderedColumnsCount(),t=this.THEAD.firstChild;if(this.columnHeaders.length){for(var n=0,o=this.columnHeaders.length;n<o;n++){for((t=this.THEAD.childNodes[n])||(t=document.createElement("TR"),this.THEAD.appendChild(t)),this.theadChildrenLength=t.childNodes.length;this.theadChildrenLength<e+this.rowHeaderCount;)t.appendChild(document.createElement("TH")),this.theadChildrenLength+=1;for(;this.theadChildrenLength>e+this.rowHeaderCount;)t.removeChild(t.lastChild),this.theadChildrenLength-=1}var i=this.THEAD.childNodes.length;if(i>this.columnHeaders.length)for(var a=this.columnHeaders.length;a<i;a++)this.THEAD.removeChild(this.THEAD.lastChild)}else t&&(0,r.empty)(t)}},{key:"getTrForColumnHeaders",value:function(e){return this.THEAD.childNodes[e]}},{key:"renderColumnHeader",value:function(e,t,n){return n.className="",n.removeAttribute("style"),this.columnHeaders[e](t,n,e)}},{key:"adjustColumns",value:function(e,t){for(var n=e.childNodes.length;n<t;){var r=document.createElement("TD");e.appendChild(r),n+=1}for(;n>t;)e.removeChild(e.lastChild),n-=1}},{key:"removeRedundantColumns",value:function(e){for(;this.wtTable.tbodyChildrenLength>e;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength-=1}}]),e}();t.default=h},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(2),i=l(n(10)),a=l(n(177)),s=l(n(178));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var c=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.wot=t,this.instance=this.wot,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=new i.default(this.wot),this.eventManager.addEventListener(window,"resize",function(){n.clientHeight=n.getWorkspaceHeight()})}return function(e,t,n){t&&u(e.prototype,t),n&&u(e,n)}(e,[{key:"getWorkspaceHeight",value:function(){var e=this.instance.wtOverlays.topOverlay.trimmingContainer;return e===window?document.documentElement.clientHeight:(0,r.outerHeight)(e)>0&&e.clientHeight>0?e.clientHeight:1/0}},{key:"getWorkspaceWidth",value:function(){var e,t,n=this.wot.getSetting("totalColumns"),o=this.instance.wtOverlays.leftOverlay.trimmingContainer,i=this.wot.getSetting("stretchH"),a=document.documentElement.offsetWidth;return this.wot.getSetting("preventOverflow")?(0,r.outerWidth)(this.instance.wtTable.wtRootElement):(e=this.wot.getSetting("freezeOverlays")?Math.min(a-this.getWorkspaceOffset().left,a):Math.min(this.getContainerFillWidth(),a-this.getWorkspaceOffset().left,a),o===window&&n>0&&this.sumColumnWidths(0,n-1)>e?document.documentElement.clientWidth:o===window||"scroll"!==(t=(0,r.getStyle)(this.instance.wtOverlays.leftOverlay.trimmingContainer,"overflow"))&&"hidden"!==t&&"auto"!==t?"none"!==i&&i?e:Math.max(e,(0,r.outerWidth)(this.instance.wtTable.TABLE)):Math.max(e,o.clientWidth))}},{key:"hasVerticalScroll",value:function(){return this.getWorkspaceActualHeight()>this.getWorkspaceHeight()}},{key:"hasHorizontalScroll",value:function(){return this.getWorkspaceActualWidth()>this.getWorkspaceWidth()}},{key:"sumColumnWidths",value:function(e,t){for(var n=this.wot.wtTable,r=0,o=e;o<t;)r+=n.getColumnWidth(o),o+=1;return r}},{key:"getContainerFillWidth",value:function(){if(this.containerWidth)return this.containerWidth;var e=this.instance.wtTable.holder,t=document.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);var n=t.offsetWidth;return this.containerWidth=n,e.removeChild(t),n}},{key:"getWorkspaceOffset",value:function(){return(0,r.offset)(this.wot.wtTable.TABLE)}},{key:"getWorkspaceActualHeight",value:function(){return(0,r.outerHeight)(this.wot.wtTable.TABLE)}},{key:"getWorkspaceActualWidth",value:function(){return(0,r.outerWidth)(this.wot.wtTable.TABLE)||(0,r.outerWidth)(this.wot.wtTable.TBODY)||(0,r.outerWidth)(this.wot.wtTable.THEAD)}},{key:"getColumnHeaderHeight",value:function(){return isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,r.outerHeight)(this.wot.wtTable.THEAD)),this.columnHeaderHeight}},{key:"getViewportHeight",value:function(){var e=this.getWorkspaceHeight();if(e===1/0)return e;var t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}},{key:"getRowHeaderWidth",value:function(){var e=this.instance.getSetting("rowHeaderWidth"),t=this.instance.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(var n=0,o=t.length;n<o;n++)this.rowHeaderWidth+=e[n]||e}if(this.wot.cloneSource)return this.wot.cloneSource.wtViewport.getRowHeaderWidth();if(isNaN(this.rowHeaderWidth))if(t.length){var i=this.instance.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(var a=0,s=t.length;a<s;a++)i?(this.rowHeaderWidth+=(0,r.outerWidth)(i),i=i.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.instance.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}},{key:"getViewportWidth",value:function(){var e=this.getWorkspaceWidth();if(e===1/0)return e;var t=this.getRowHeaderWidth();return t>0?e-t:e}},{key:"createRowsCalculator",value:function(){var e,t,n,o=this,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.rowHeaderWidth=NaN,e=this.wot.wtSettings.settings.renderAllRows&&!i?1/0:this.getViewportHeight();var a=this.wot.wtOverlays.topOverlay.getScrollPosition()-this.wot.wtOverlays.topOverlay.getTableParentOffset();a<0&&(a=0);var l=this.wot.getSetting("fixedRowsTop"),u=this.wot.getSetting("fixedRowsBottom"),c=this.wot.getSetting("totalRows");return l&&(a+=n=this.wot.wtOverlays.topOverlay.sumCellSizes(0,l),e-=n),u&&this.wot.wtOverlays.bottomOverlay.clone&&(e-=n=this.wot.wtOverlays.bottomOverlay.sumCellSizes(c-u,c)),t=this.wot.wtTable.holder.clientHeight===this.wot.wtTable.holder.offsetHeight?0:(0,r.getScrollbarWidth)(),new s.default(e,a,this.wot.getSetting("totalRows"),function(e){return o.wot.wtTable.getRowHeight(e)},i?null:this.wot.wtSettings.settings.viewportRowCalculatorOverride,i,t)}},{key:"createColumnsCalculator",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.getViewportWidth(),o=this.wot.wtOverlays.leftOverlay.getScrollPosition()-this.wot.wtOverlays.leftOverlay.getTableParentOffset();this.columnHeaderHeight=NaN,o<0&&(o=0);var i=this.wot.getSetting("fixedColumnsLeft");if(i){var s=this.wot.wtOverlays.leftOverlay.sumCellSizes(0,i);o+=s,n-=s}return this.wot.wtTable.holder.clientWidth!==this.wot.wtTable.holder.offsetWidth&&(n-=(0,r.getScrollbarWidth)()),new a.default(n,o,this.wot.getSetting("totalColumns"),function(t){return e.wot.wtTable.getColumnWidth(t)},t?null:this.wot.wtSettings.settings.viewportColumnCalculatorOverride,t,this.wot.getSetting("stretchH"),function(t,n){return e.wot.getSetting("onBeforeStretchingColumnWidth",t,n)})}},{key:"createRenderCalculators",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){var t=this.createRowsCalculator(!0),n=this.createColumnsCalculator(!0);this.areAllProposedVisibleRowsAlreadyRendered(t)&&this.areAllProposedVisibleColumnsAlreadyRendered(n)||(e=!1)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(),this.columnsRenderCalculator=this.createColumnsCalculator()),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e}},{key:"createVisibleCalculators",value:function(){this.rowsVisibleCalculator=this.createRowsCalculator(!0),this.columnsVisibleCalculator=this.createColumnsCalculator(!0)}},{key:"areAllProposedVisibleRowsAlreadyRendered",value:function(e){return!!this.rowsVisibleCalculator&&(!(e.startRow<this.rowsRenderCalculator.startRow||e.startRow===this.rowsRenderCalculator.startRow&&e.startRow>0)&&!(e.endRow>this.rowsRenderCalculator.endRow||e.endRow===this.rowsRenderCalculator.endRow&&e.endRow<this.wot.getSetting("totalRows")-1))}},{key:"areAllProposedVisibleColumnsAlreadyRendered",value:function(e){return!!this.columnsVisibleCalculator&&(!(e.startColumn<this.columnsRenderCalculator.startColumn||e.startColumn===this.columnsRenderCalculator.startColumn&&e.startColumn>0)&&!(e.endColumn>this.columnsRenderCalculator.endColumn||e.endColumn===this.columnsRenderCalculator.endColumn&&e.endColumn<this.wot.getSetting("totalColumns")-1))}},{key:"resetHasOversizedColumnHeadersMarked",value:function(){(0,o.objectEach)(this.hasOversizedColumnHeadersMarked,function(e,t,n){n[t]=void 0})}}]),e}();t.default=c},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(16),i=n(2),a=n(48),s=u(n(10)),l=u(n(83));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var h=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n&&(this.eventManager=new s.default(t),this.instance=t,this.wot=t,this.settings=n,this.mouseDown=!1,this.main=null,this.top=null,this.left=null,this.bottom=null,this.right=null,this.topStyle=null,this.leftStyle=null,this.bottomStyle=null,this.rightStyle=null,this.cornerDefaultStyle={width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"},this.corner=null,this.cornerStyle=null,this.createBorders(n),this.registerListeners())}return function(e,t,n){t&&f(e.prototype,t),n&&f(e,n)}(e,[{key:"registerListeners",value:function(){var e=this;this.eventManager.addEventListener(document.body,"mousedown",function(){return e.onMouseDown()}),this.eventManager.addEventListener(document.body,"mouseup",function(){return e.onMouseUp()});for(var t=function(t,n){e.eventManager.addEventListener(e.main.childNodes[t],"mouseenter",function(n){return e.onMouseEnter(n,e.main.childNodes[t])})},n=0,r=this.main.childNodes.length;n<r;n++)t(n)}},{key:"onMouseDown",value:function(){this.mouseDown=!0}},{key:"onMouseUp",value:function(){this.mouseDown=!1}},{key:"onMouseEnter",value:function(e,t){if(this.mouseDown&&this.wot.getSetting("hideBorderOnMouseDownOver")){e.preventDefault(),(0,o.stopImmediatePropagation)(e);var n=this,r=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(document.body,"mousemove",function e(o){(function(e){return e.clientY<Math.floor(r.top)||e.clientY>Math.ceil(r.top+r.height)||e.clientX<Math.floor(r.left)||e.clientX>Math.ceil(r.left+r.width)||void 0})(o)&&(n.eventManager.removeEventListener(document.body,"mousemove",e),t.style.display="block")})}}},{key:"createBorders",value:function(e){this.main=document.createElement("div");var t=["top","left","bottom","right","corner"],n=this.main.style;n.position="absolute",n.top=0,n.left=0;for(var r=0;r<5;r++){var o=t[r],i=document.createElement("div");i.className="wtBorder ".concat(this.settings.className||""),this.settings[o]&&this.settings[o].hide&&(i.className+=" hidden"),(n=i.style).backgroundColor=this.settings[o]&&this.settings[o].color?this.settings[o].color:e.border.color,n.height=this.settings[o]&&this.settings[o].width?"".concat(this.settings[o].width,"px"):"".concat(e.border.width,"px"),n.width=this.settings[o]&&this.settings[o].width?"".concat(this.settings[o].width,"px"):"".concat(e.border.width,"px"),this.main.appendChild(i)}this.top=this.main.childNodes[0],this.left=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.right=this.main.childNodes[3],this.topStyle=this.top.style,this.leftStyle=this.left.style,this.bottomStyle=this.bottom.style,this.rightStyle=this.right.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,a.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear();var s=this.wot.wtTable.bordersHolder;s||((s=document.createElement("div")).className="htBorders",this.wot.wtTable.bordersHolder=s,this.wot.wtTable.spreader.appendChild(s)),s.appendChild(this.main)}},{key:"createMultipleSelectorHandles",value:function(){var e=this;this.selectionHandles={topLeft:document.createElement("DIV"),topLeftHitArea:document.createElement("DIV"),bottomRight:document.createElement("DIV"),bottomRightHitArea:document.createElement("DIV")};this.selectionHandles.topLeft.className="topLeftSelectionHandle",this.selectionHandles.topLeftHitArea.className="topLeftSelectionHandle-HitArea",this.selectionHandles.bottomRight.className="bottomRightSelectionHandle",this.selectionHandles.bottomRightHitArea.className="bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={topLeft:this.selectionHandles.topLeft.style,topLeftHitArea:this.selectionHandles.topLeftHitArea.style,bottomRight:this.selectionHandles.bottomRight.style,bottomRightHitArea:this.selectionHandles.bottomRightHitArea.style};var t={position:"absolute",height:"".concat(40,"px"),width:"".concat(40,"px"),"border-radius":"".concat(parseInt(40/1.5,10),"px")};(0,i.objectEach)(t,function(t,n){e.selectionHandles.styles.bottomRightHitArea[n]=t,e.selectionHandles.styles.topLeftHitArea[n]=t});var n={position:"absolute",height:"".concat(10,"px"),width:"".concat(10,"px"),"border-radius":"".concat(parseInt(10/1.5,10),"px"),background:"#F5F5FF",border:"1px solid #4285c8"};(0,i.objectEach)(n,function(t,n){e.selectionHandles.styles.bottomRight[n]=t,e.selectionHandles.styles.topLeft[n]=t}),this.main.appendChild(this.selectionHandles.topLeft),this.main.appendChild(this.selectionHandles.bottomRight),this.main.appendChild(this.selectionHandles.topLeftHitArea),this.main.appendChild(this.selectionHandles.bottomRightHitArea)}},{key:"isPartRange",value:function(e,t){var n=this.wot.selections.createOrGetArea();return!(!n.cellRange||e===n.cellRange.to.row&&t===n.cellRange.to.col)}},{key:"updateMultipleSelectionHandlesPosition",value:function(e,t,n,r,o,i){var a=parseInt(this.selectionHandles.styles.topLeft.width,10),s=parseInt(this.selectionHandles.styles.topLeftHitArea.width,10);this.selectionHandles.styles.topLeft.top="".concat(parseInt(n-a,10),"px"),this.selectionHandles.styles.topLeft.left="".concat(parseInt(r-a,10),"px"),this.selectionHandles.styles.topLeftHitArea.top="".concat(parseInt(n-s/4*3,10),"px"),this.selectionHandles.styles.topLeftHitArea.left="".concat(parseInt(r-s/4*3,10),"px"),this.selectionHandles.styles.bottomRight.top="".concat(parseInt(n+i,10),"px"),this.selectionHandles.styles.bottomRight.left="".concat(parseInt(r+o,10),"px"),this.selectionHandles.styles.bottomRightHitArea.top="".concat(parseInt(n+i-s/4,10),"px"),this.selectionHandles.styles.bottomRightHitArea.left="".concat(parseInt(r+o-s/4,10),"px"),this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(this.selectionHandles.styles.topLeft.display="block",this.selectionHandles.styles.topLeftHitArea.display="block",this.isPartRange(e,t)?(this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"):(this.selectionHandles.styles.bottomRight.display="block",this.selectionHandles.styles.bottomRightHitArea.display="block")):(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.topLeftHitArea.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsLeft")?(this.selectionHandles.styles.topLeft.zIndex="9999",this.selectionHandles.styles.topLeftHitArea.zIndex="9999"):(this.selectionHandles.styles.topLeft.zIndex="",this.selectionHandles.styles.topLeftHitArea.zIndex="")}},{key:"appear",value:function(e){if(!this.disabled){for(var t,n,o,i,s=this.wot.wtTable.getRenderedRowsCount(),u=0;u<s;u+=1){var f=this.wot.wtTable.rowFilter.renderedToSource(u);if(f>=e[0]&&f<=e[2]){t=f;break}}for(var h=s-1;h>=0;h-=1){var d=this.wot.wtTable.rowFilter.renderedToSource(h);if(d>=e[0]&&d<=e[2]){n=d;break}}for(var p=this.wot.wtTable.getRenderedColumnsCount(),g=0;g<p;g+=1){var v=this.wot.wtTable.columnFilter.renderedToSource(g);if(v>=e[1]&&v<=e[3]){o=v;break}}for(var y=p-1;y>=0;y-=1){var m=this.wot.wtTable.columnFilter.renderedToSource(y);if(m>=e[1]&&m<=e[3]){i=m;break}}if(void 0!==t&&void 0!==o){var w=this.wot.wtTable.getCell(new l.default(t,o)),b=t!==n||o!==i,C=b?this.wot.wtTable.getCell(new l.default(n,i)):w,E=(0,r.offset)(w),O=b?(0,r.offset)(C):E,S=(0,r.offset)(this.wot.wtTable.TABLE),_=E.top,T=E.left,R=T-S.left-1,M=O.left+(0,r.outerWidth)(C)-T;if(this.isEntireColumnSelected(t,n)){var k=this.getDimensionsFromHeader("columns",o,i,S),N=null;if(k){var A=c(k,3);N=A[0],R=A[1],M=A[2]}N&&(w=N)}var I=_-S.top-1,D=O.top+(0,r.outerHeight)(C)-_;if(this.isEntireRowSelected(o,i)){var P=this.getDimensionsFromHeader("rows",t,n,S),x=null;if(P){var L=c(P,3);x=L[0],I=L[1],D=L[2]}x&&(w=x)}var H=(0,r.getComputedStyle)(w);parseInt(H.borderTopWidth,10)>0&&(I+=1,D=D>0?D-1:0),parseInt(H.borderLeftWidth,10)>0&&(R+=1,M=M>0?M-1:0),this.topStyle.top="".concat(I,"px"),this.topStyle.left="".concat(R,"px"),this.topStyle.width="".concat(M,"px"),this.topStyle.display="block",this.leftStyle.top="".concat(I,"px"),this.leftStyle.left="".concat(R,"px"),this.leftStyle.height="".concat(D,"px"),this.leftStyle.display="block";var j=Math.floor(this.settings.border.width/2);this.bottomStyle.top="".concat(I+D-j,"px"),this.bottomStyle.left="".concat(R,"px"),this.bottomStyle.width="".concat(M,"px"),this.bottomStyle.display="block",this.rightStyle.top="".concat(I,"px"),this.rightStyle.left="".concat(R+M-j,"px"),this.rightStyle.height="".concat(D+1,"px"),this.rightStyle.display="block";var F=this.settings.border.cornerVisible;F="function"==typeof F?F(this.settings.layerLevel):F;var V=this.wot.getSetting("onModifyGetCellCoords",n,i),B=n,U=i;if(V&&Array.isArray(V)){var W=c(V,4);B=W[2],U=W[3]}if((0,a.isMobileBrowser)()||!F||this.isPartRange(B,U))this.cornerStyle.display="none";else{this.cornerStyle.top="".concat(I+D-4,"px"),this.cornerStyle.left="".concat(R+M-4,"px"),this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";var Y=(0,r.getTrimmingContainer)(this.wot.wtTable.TABLE),$=Y===window;if($&&(Y=document.documentElement),i===this.wot.getSetting("totalColumns")-1)($?C.getBoundingClientRect().left:C.offsetLeft)+(0,r.outerWidth)(C)+parseInt(this.cornerDefaultStyle.width,10)/2>=(0,r.innerWidth)(Y)&&(this.cornerStyle.left="".concat(Math.floor(R+M-3-parseInt(this.cornerDefaultStyle.width,10)/2),"px"),this.cornerStyle.borderRightWidth=0);if(n===this.wot.getSetting("totalRows")-1)($?C.getBoundingClientRect().top:C.offsetTop)+(0,r.outerHeight)(C)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,r.innerHeight)(Y)&&(this.cornerStyle.top="".concat(Math.floor(I+D-3-parseInt(this.cornerDefaultStyle.height,10)/2),"px"),this.cornerStyle.borderBottomWidth=0);this.cornerStyle.display="block"}(0,a.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(n,i,I,R,M,D)}else this.disappear()}}},{key:"isEntireColumnSelected",value:function(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}},{key:"isEntireRowSelected",value:function(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}},{key:"getDimensionsFromHeader",value:function(e,t,n,o){var i=this,a=this.wot.wtTable.wtRootElement.parentNode,s=null,l=null,u=null,c=null,f=null,h=null,d=null,p=null;switch(e){case"rows":s=function(){var e;return(e=i.wot.wtTable).getRowHeader.apply(e,arguments)},l=function(){return r.outerHeight.apply(void 0,arguments)},u="ht__selection--rows",h="top";break;case"columns":s=function(){var e;return(e=i.wot.wtTable).getColumnHeader.apply(e,arguments)},l=function(){return r.outerWidth.apply(void 0,arguments)},u="ht__selection--columns",h="left"}if(a.className.includes(u)){var g=this.wot.getSetting("columnHeaders").length;if(d=s(t,g-1),p=s(n,g-1),!d||!p)return!1;var v=(0,r.offset)(d),y=(0,r.offset)(p);return d&&p&&(c=v[h]-o[h]-1,f=y[h]+l(p)-v[h]),[d,c,f]}return!1}},{key:"changeBorderStyle",value:function(e,t){var n=this[e].style,o=t[e];!o||o.hide?(0,r.addClass)(this[e],"hidden"):((0,r.hasClass)(this[e],"hidden")&&(0,r.removeClass)(this[e],"hidden"),n.backgroundColor=o.color,"top"!==e&&"bottom"!==e||(n.height="".concat(o.width,"px")),"right"!==e&&"left"!==e||(n.width="".concat(o.width,"px")))}},{key:"changeBorderToDefaultStyle",value:function(e){var t=1,n="#000",r=this[e].style;r.backgroundColor=n,r.width="".concat(t,"px"),r.height="".concat(t,"px")}},{key:"toggleHiddenClass",value:function(e,t){this.changeBorderToDefaultStyle(e),t?(0,r.addClass)(this[e],"hidden"):(0,r.removeClass)(this[e],"hidden")}},{key:"disappear",value:function(){this.topStyle.display="none",this.leftStyle.display="none",this.bottomStyle.display="none",this.rightStyle.display="none",this.cornerStyle.display="none",(0,a.isMobileBrowser)()&&(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none")}}]),e}();t.default=h},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(24),o=n(14),i=n(42),a=n(1),s=n(3),l=function(e){return e&&e.__esModule?e:{default:e}}(n(312));var u=l.default.prototype.extend();u.prototype.init=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];l.default.prototype.init.apply(this,t),this.query=null,this.strippedChoices=[],this.rawChoices=[]},u.prototype.getValue=function(){var e=this,t=this.rawChoices.find(function(t){return e.stripValueIfNeeded(t)===e.TEXTAREA.value});return(0,o.isDefined)(t)?t:this.TEXTAREA.value},u.prototype.createElements=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];l.default.prototype.createElements.apply(this,t),(0,s.addClass)(this.htContainer,"autocompleteEditor"),(0,s.addClass)(this.htContainer,-1===window.navigator.platform.indexOf("Mac")?"":"htMacScroll")};var c=!1;function f(e){c=!1;var t=this.getActiveEditor();if((0,r.isPrintableChar)(e.keyCode)||e.keyCode===r.KEY_CODES.BACKSPACE||e.keyCode===r.KEY_CODES.DELETE||e.keyCode===r.KEY_CODES.INSERT){var n=0;if(e.keyCode===r.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;t.isOpened()||(n+=10),t.htEditor&&t.instance._registerTimeout(function(){t.queryChoices(t.TEXTAREA.value),c=!0},n)}}u.prototype.prepare=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];l.default.prototype.prepare.apply(this,t)},u.prototype.open=function(){this.instance.addHook("beforeKeyDown",f),this.TEXTAREA_PARENT.style.overflow="auto";for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];l.default.prototype.open.apply(this,t),this.TEXTAREA_PARENT.style.overflow="";var r=this.htEditor.getInstance(),i=this,a=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown;this.showEditableElement(),this.focus(),r.updateSettings({colWidths:a?[(0,s.outerWidth)(this.TEXTAREA)-2]:void 0,width:a?(0,s.outerWidth)(this.TEXTAREA)+(0,s.getScrollbarWidth)()+2:void 0,afterRenderer:function(e,t,n,r,a){var s,l,u=i.cellProperties,c=u.filteringCaseSensitive,f=u.allowHtml,h=(0,o.stringify)(a);h&&!f&&-1!==(s=!0===c?h.indexOf(this.query):h.toLowerCase().indexOf(i.query.toLowerCase()))&&(l=h.substr(s,i.query.length),h=h.replace(l,"<strong>".concat(l,"</strong>"))),e.innerHTML=h},autoColumnSize:!0,modifyColWidth:function(e,t){var n=this.getPlugin("autoColumnSize").widths,r=e;return n[t]&&(r=n[t]),a?r:r+15}}),this.htEditor.view.wt.wtTable.holder.parentNode.style["padding-right"]="".concat((0,s.getScrollbarWidth)()+2,"px"),c&&(c=!1),i.instance._registerTimeout(function(){i.queryChoices(i.TEXTAREA.value)})},u.prototype.queryChoices=function(e){var t=this;this.query=e;var n=this.cellProperties.source;"function"==typeof n?n.call(this.cellProperties,e,function(e){t.rawChoices=e,t.updateChoicesList(t.stripValuesIfNeeded(e))}):Array.isArray(n)?(this.rawChoices=n,this.updateChoicesList(this.stripValuesIfNeeded(n))):this.updateChoicesList([])},u.prototype.updateChoicesList=function(e){var t=(0,s.getCaretPosition)(this.TEXTAREA),n=(0,s.getSelectionEndPosition)(this.TEXTAREA),r=this.cellProperties.sortByRelevance,o=this.cellProperties.filter,i=null,l=null,c=e;r&&(i=u.sortByRelevance(this.stripValueIfNeeded(this.getValue()),c,this.cellProperties.filteringCaseSensitive));var f=Array.isArray(i)?i.length:0;if(!1===o)f&&(l=i[0]);else{for(var h=[],d=0,p=c.length;d<p&&!(r&&f<=d);d++)f?h.push(c[i[d]]):h.push(c[d]);l=0,c=h}this.strippedChoices=c,this.htEditor.loadData((0,a.pivot)([c])),this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(l),this.instance.listen(!1),(0,s.setCaretPosition)(this.TEXTAREA,t,t===n?void 0:n)},u.prototype.flipDropdownIfNeeded=function(){var e=(0,s.offset)(this.TEXTAREA),t=(0,s.outerHeight)(this.TEXTAREA),n=this.getDropdownHeight(),r=(0,s.getTrimmingContainer)(this.instance.view.wt.wtTable.TABLE),o=r.scrollTop,i=(0,s.outerHeight)(this.instance.view.wt.wtTable.THEAD),a={row:0,col:0};r!==window&&(a=(0,s.offset)(r));var l=e.top-a.top-i+o,u=r.scrollHeight-l-i-t,c=n>u&&l>u;return c?this.flipDropdown(n):this.unflipDropdown(),this.limitDropdownIfNeeded(c?l:u,n),c},u.prototype.limitDropdownIfNeeded=function(e,t){if(t>e){var n,r=0,o=0,i=0;do{r+=i=this.htEditor.getRowHeight(o)||this.htEditor.view.wt.wtSettings.settings.defaultRowHeight,o+=1}while(r<e);n=r-i,this.htEditor.flipped&&(this.htEditor.rootElement.style.top="".concat(parseInt(this.htEditor.rootElement.style.top,10)+t-n,"px")),this.setDropdownHeight(r-i)}},u.prototype.flipDropdown=function(e){var t=this.htEditor.rootElement.style;t.position="absolute",t.top="".concat(-e,"px"),this.htEditor.flipped=!0},u.prototype.unflipDropdown=function(){var e=this.htEditor.rootElement.style;"absolute"===e.position&&(e.position="",e.top=""),this.htEditor.flipped=void 0},u.prototype.updateDropdownHeight=function(){var e=this.htEditor.getColWidth(0)+(0,s.getScrollbarWidth)()+2,t=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view.wt.wtTable.alignOverlaysWithTrimmingContainer()},u.prototype.setDropdownHeight=function(e){this.htEditor.updateSettings({height:e})},u.prototype.finishEditing=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];l.default.prototype.finishEditing.apply(this,[e].concat(n))},u.prototype.highlightBestMatchingChoice=function(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()},u.sortByRelevance=function(e,t,n){var r,a,s,l,u=[],c=e.length,f=[],h=t.length;if(0===c){for(l=0;l<h;l++)f.push(l);return f}for(l=0;l<h;l++)r=(0,i.stripTags)((0,o.stringify)(t[l])),-1!==(a=n?r.indexOf(e):r.toLowerCase().indexOf(e.toLowerCase()))&&(s=r.length-a-c,u.push({baseIndex:l,index:a,charsLeft:s,value:r}));for(u.sort(function(e,t){if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0}),l=0,h=u.length;l<h;l++)f.push(u[l].baseIndex);return f},u.prototype.getDropdownHeight=function(){var e=this.htEditor.getInstance().getRowHeight(0)||23,t=this.cellProperties.visibleRows;return this.strippedChoices.length>=t?t*e:this.strippedChoices.length*e+8},u.prototype.stripValueIfNeeded=function(e){return this.stripValuesIfNeeded([e])[0]},u.prototype.stripValuesIfNeeded=function(e){var t=this.cellProperties.allowHtml,n=(0,a.arrayMap)(e,function(e){return(0,o.stringify)(e)});return(0,a.arrayMap)(n,function(e){return t?e:(0,i.stripTags)(e)})},u.prototype.allowKeyEventPropagation=function(e){var t=this.htEditor.getSelectedRangeLast(),n=t?t.from.row:-1,o=!1;return e===r.KEY_CODES.ARROW_DOWN&&n>0&&n<this.htEditor.countRows()-1&&(o=!0),e===r.KEY_CODES.ARROW_UP&&n>-1&&(o=!0),o},u.prototype.close=function(){this.instance.removeHook("beforeKeyDown",f);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];l.default.prototype.close.apply(this,t)},u.prototype.discardEditor=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];l.default.prototype.discardEditor.apply(this,t),this.instance.view.render()};var h=u;t.default=h},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(24),o=n(2),i=n(3),a=n(16),s=function(e){return e&&e.__esModule?e:{default:e}}(n(84));var l=s.default.prototype.extend();l.prototype.createElements=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];s.default.prototype.createElements.apply(this,t);var r=document.createElement("DIV");r.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(r),this.htContainer=r,this.assignHooks()},l.prototype.prepare=function(e,t,n,r,i,a){for(var l=arguments.length,u=new Array(l>6?l-6:0),c=6;c<l;c++)u[c-6]=arguments[c];s.default.prototype.prepare.apply(this,[e,t,n,r,i,a].concat(u));var f=this,h={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,afterOnCellMouseDown:function(e,t){var n=this.getSourceData(t.row,t.col);void 0!==n&&f.setValue(n),f.instance.destroyEditor()}};this.cellProperties.handsontable&&(0,o.extend)(h,a.handsontable),this.htOptions=h};var u=function(e){if(!(0,a.isImmediatePropagationStopped)(e)){var t,n,o=this.getActiveEditor(),i=o.htEditor.getInstance();if(e.keyCode===r.KEY_CODES.ARROW_DOWN)if(i.getSelectedLast()||i.flipped){if(i.getSelectedLast())if(i.flipped)t=i.getSelectedLast()[0]+1;else if(!i.flipped){var s=i.countRows()-1;n=i.getSelectedLast()[0],t=Math.min(s,n+1)}}else t=0;else e.keyCode===r.KEY_CODES.ARROW_UP&&(!i.getSelectedLast()&&i.flipped?t=i.countRows()-1:i.getSelectedLast()&&(i.flipped?(n=i.getSelectedLast()[0],t=Math.max(0,n-1)):t=(n=i.getSelectedLast()[0])-1));void 0!==t&&(t<0||i.flipped&&t>i.countRows()-1?i.deselectCell():i.selectCell(t,0),i.getData().length&&(e.preventDefault(),(0,a.stopImmediatePropagation)(e),o.instance.listen(),o.TEXTAREA.focus()))}};l.prototype.open=function(){this.instance.addHook("beforeKeyDown",u);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];s.default.prototype.open.apply(this,t),this.htEditor&&this.htEditor.destroy(),"none"===this.htContainer.style.display&&(this.htContainer.style.display=""),this.htEditor=new this.instance.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),(0,i.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length)},l.prototype.close=function(){this.htEditor.rootElement.style.display="none",this.instance.removeHook("beforeKeyDown",u);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];s.default.prototype.close.apply(this,t)},l.prototype.focus=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];s.default.prototype.focus.apply(this,t)},l.prototype.beginEditing=function(){var e=this.instance.getSettings().onBeginEditing;if(!e||!1!==e()){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];s.default.prototype.beginEditing.apply(this,n)}},l.prototype.finishEditing=function(){if(this.htEditor&&this.htEditor.isListening()&&this.instance.listen(),this.htEditor&&this.htEditor.getSelectedLast()){var e=this.htEditor.getInstance().getValue();void 0!==e&&this.setValue(e)}for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return s.default.prototype.finishEditing.apply(this,n)},l.prototype.assignHooks=function(){var e=this;this.instance.addHook("afterDestroy",function(){e.htEditor&&e.htEditor.destroy()})};var c=l;t.default=c},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){var r;!function(t){e.exports=t()}(function(){return function e(t,n,o){function i(s,l){if(!n[s]){if(!t[s]){if(!l&&("function"==typeof r&&r))return r(s,!0);if(a)return a(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){return i(t[s][1][e]||e)},c,c.exports,e,t,n,o)}return n[s].exports}for(var a="function"==typeof r&&r,s=0;s<o.length;s++)i(o[s]);return i}({1:[function(e,t,n){!function(e){"use strict";function n(e){var t=0|e;return e>0||e===t?t:t-1}function r(e){for(var t,n,r=1,o=e.length,i=e[0]+"";r<o;){for(t=e[r++]+"",n=b-t.length;n--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function o(e,t){var n,r,o=e.c,i=t.c,a=e.s,s=t.s,l=e.e,u=t.e;if(!a||!s)return null;if(n=o&&!o[0],r=i&&!i[0],n||r)return n?r?0:-s:a;if(a!=s)return a;if(n=a<0,r=l==u,!o||!i)return r?0:!o^n?1:-1;if(!r)return l>u^n?1:-1;for(s=(l=o.length)<(u=i.length)?l:u,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^n?1:-1;return l==u?0:l>u^n?1:-1}function i(e,t,n){return(e=c(e))>=t&&e<=n}function a(e){return"[object Array]"==Object.prototype.toString.call(e)}function s(e,t,n){for(var r,o,i=[0],a=0,s=e.length;a<s;){for(o=i.length;o--;i[o]*=t);for(i[r=0]+=m.indexOf(e.charAt(a++));r<i.length;r++)i[r]>n-1&&(null==i[r+1]&&(i[r+1]=0),i[r+1]+=i[r]/n|0,i[r]%=n)}return i.reverse()}function l(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function u(e,t){var n,r;if(t<0){for(r="0.";++t;r+="0");e=r+e}else if(++t>(n=e.length)){for(r="0",t-=n;--t;r+="0");e+=r}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}function c(e){return(e=parseFloat(e))<0?d(e):p(e)}var f,h=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,d=Math.ceil,p=Math.floor,g=" not a boolean or binary digit",v="rounding mode",y="number type has more than 15 significant digits",m="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",w=1e14,b=14,C=9007199254740991,E=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],O=1e7,S=1e9;(f=function e(t){function f(e,t){var n,r,o,i,a,s,l=this;if(!(l instanceof f))return W&&N(26,"constructor call without new",e),new f(e,t);if(null!=t&&Y(t,2,64,P,"base")){if(s=e+"",10==(t|=0))return A(l=new f(e instanceof f?e:s),H+l.e+1,j);if((i="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(n="["+m.slice(0,t)+"]+")+"(?:\\."+n+")?$",t<37?"i":"").test(s))return D(l,s,i,t);i?(l.s=1/e<0?(s=s.slice(1),-1):1,W&&s.replace(/^0\.0*|\./,"").length>15&&N(P,y,e),i=!1):l.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1,s=_(s,10,t,l.s)}else{if(e instanceof f)return l.s=e.s,l.e=e.e,l.c=(e=e.c)?e.slice():e,void(P=0);if((i="number"==typeof e)&&0*e==0){if(l.s=1/e<0?(e=-e,-1):1,e===~~e){for(r=0,o=e;o>=10;o/=10,r++);return l.e=r,l.c=[e],void(P=0)}s=e+""}else{if(!h.test(s=e+""))return D(l,s,i);l.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1}}for((r=s.indexOf("."))>-1&&(s=s.replace(".","")),(o=s.search(/e/i))>0?(r<0&&(r=o),r+=+s.slice(o+1),s=s.substring(0,o)):r<0&&(r=s.length),o=0;48===s.charCodeAt(o);o++);for(a=s.length;48===s.charCodeAt(--a););if(s=s.slice(o,a+1))if(a=s.length,i&&W&&a>15&&(e>C||e!==p(e))&&N(P,y,l.s*e),(r=r-o-1)>U)l.c=l.e=null;else if(r<B)l.c=[l.e=0];else{if(l.e=r,l.c=[],o=(r+1)%b,r<0&&(o+=b),o<a){for(o&&l.c.push(+s.slice(0,o)),a-=b;o<a;)l.c.push(+s.slice(o,o+=b));s=s.slice(o),o=b-s.length}else o-=a;for(;o--;s+="0");l.c.push(+s)}else l.c=[l.e=0];P=0}function _(e,t,n,o){var i,a,l,c,h,d,p,g=e.indexOf("."),v=H,y=j;for(n<37&&(e=e.toLowerCase()),g>=0&&(l=z,z=0,e=e.replace(".",""),h=(p=new f(n)).pow(e.length-g),z=l,p.c=s(u(r(h.c),h.e),10,t),p.e=p.c.length),a=l=(d=s(e,n,t)).length;0==d[--l];d.pop());if(!d[0])return"0";if(g<0?--a:(h.c=d,h.e=a,h.s=o,d=(h=I(h,p,v,y,t)).c,c=h.r,a=h.e),g=d[i=a+v+1],l=t/2,c=c||i<0||null!=d[i+1],c=y<4?(null!=g||c)&&(0==y||y==(h.s<0?3:2)):g>l||g==l&&(4==y||c||6==y&&1&d[i-1]||y==(h.s<0?8:7)),i<1||!d[0])e=c?u("1",-v):"0";else{if(d.length=i,c)for(--t;++d[--i]>t;)d[i]=0,i||(++a,d=[1].concat(d));for(l=d.length;!d[--l];);for(g=0,e="";g<=l;e+=m.charAt(d[g++]));e=u(e,a)}return e}function T(e,t,n,o){var i,a,s,c,h;if(n=null!=n&&Y(n,0,8,o,v)?0|n:j,!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)h=r(e.c),h=19==o||24==o&&s<=F?l(h,s):u(h,s);else if(a=(e=A(new f(e),t,n)).e,c=(h=r(e.c)).length,19==o||24==o&&(t<=a||a<=F)){for(;c<t;h+="0",c++);h=l(h,a)}else if(t-=s,h=u(h,a),a+1>c){if(--t>0)for(h+=".";t--;h+="0");}else if((t+=a-c)>0)for(a+1==c&&(h+=".");t--;h+="0");return e.s<0&&i?"-"+h:h}function R(e,t){var n,r,o=0;for(a(e[0])&&(e=e[0]),n=new f(e[0]);++o<e.length;){if(!(r=new f(e[o])).s){n=r;break}t.call(n,r)&&(n=r)}return n}function M(e,t,n,r,o){return(e<t||e>n||e!=c(e))&&N(r,(o||"decimal places")+(e<t||e>n?" out of range":" not an integer"),e),!0}function k(e,t,n){for(var r=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,r++);return(n=r+n*b-1)>U?e.c=e.e=null:n<B?e.c=[e.e=0]:(e.e=n,e.c=t),e}function N(e,t,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][e]+"() "+t+": "+n);throw r.name="BigNumber Error",P=0,r}function A(e,t,n,r){var o,i,a,s,l,u,c,f=e.c,h=E;if(f){e:{for(o=1,s=f[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=b,a=t,c=(l=f[u=0])/h[o-a-1]%10|0;else if((u=d((i+1)/b))>=f.length){if(!r)break e;for(;f.length<=u;f.push(0));l=c=0,o=1,a=(i%=b)-b+1}else{for(l=s=f[u],o=1;s>=10;s/=10,o++);c=(a=(i%=b)-b+o)<0?0:l/h[o-a-1]%10|0}if(r=r||t<0||null!=f[u+1]||(a<0?l:l%h[o-a-1]),r=n<4?(c||r)&&(0==n||n==(e.s<0?3:2)):c>5||5==c&&(4==n||r||6==n&&(i>0?a>0?l/h[o-a]:0:f[u-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,r?(t-=e.e+1,f[0]=h[(b-t%b)%b],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=u,s=1,u--):(f.length=u+1,s=h[b-i],f[u]=a>0?p(l/h[o-a]%h[a])*s:0),r)for(;;){if(0==u){for(i=1,a=f[0];a>=10;a/=10,i++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(e.e++,f[0]==w&&(f[0]=1));break}if(f[u]+=s,f[u]!=w)break;f[u--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>U?e.c=e.e=null:e.e<B&&(e.c=[e.e=0])}return e}var I,D,P=0,x=f.prototype,L=new f(1),H=20,j=4,F=-7,V=21,B=-1e7,U=1e7,W=!0,Y=M,$=!1,G=1,z=0,X={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0};return f.another=e,f.ROUND_UP=0,f.ROUND_DOWN=1,f.ROUND_CEIL=2,f.ROUND_FLOOR=3,f.ROUND_HALF_UP=4,f.ROUND_HALF_DOWN=5,f.ROUND_HALF_EVEN=6,f.ROUND_HALF_CEIL=7,f.ROUND_HALF_FLOOR=8,f.EUCLID=9,f.config=f.set=function(){var e,t,n=0,r={},o=arguments,s=o[0],l=s&&"object"==typeof s?function(){if(s.hasOwnProperty(t))return null!=(e=s[t])}:function(){if(o.length>n)return null!=(e=o[n++])};return l(t="DECIMAL_PLACES")&&Y(e,0,S,2,t)&&(H=0|e),r[t]=H,l(t="ROUNDING_MODE")&&Y(e,0,8,2,t)&&(j=0|e),r[t]=j,l(t="EXPONENTIAL_AT")&&(a(e)?Y(e[0],-S,0,2,t)&&Y(e[1],0,S,2,t)&&(F=0|e[0],V=0|e[1]):Y(e,-S,S,2,t)&&(F=-(V=0|(e<0?-e:e)))),r[t]=[F,V],l(t="RANGE")&&(a(e)?Y(e[0],-S,-1,2,t)&&Y(e[1],1,S,2,t)&&(B=0|e[0],U=0|e[1]):Y(e,-S,S,2,t)&&(0|e?B=-(U=0|(e<0?-e:e)):W&&N(2,t+" cannot be zero",e))),r[t]=[B,U],l(t="ERRORS")&&(e===!!e||1===e||0===e?(P=0,Y=(W=!!e)?M:i):W&&N(2,t+g,e)),r[t]=W,l(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?$=!0:W?N(2,"crypto unavailable",e?void 0:crypto):$=!1:$=!1:W&&N(2,t+g,e)),r[t]=$,l(t="MODULO_MODE")&&Y(e,0,9,2,t)&&(G=0|e),r[t]=G,l(t="POW_PRECISION")&&Y(e,0,S,2,t)&&(z=0|e),r[t]=z,l(t="FORMAT")&&("object"==typeof e?X=e:W&&N(2,t+" not an object",e)),r[t]=X,r},f.max=function(){return R(arguments,x.lt)},f.min=function(){return R(arguments,x.gt)},f.random=function(){var e=9007199254740992*Math.random()&2097151?function(){return p(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var n,r,o,i,a,s=0,l=[],u=new f(L);if(t=null!=t&&Y(t,0,S,14)?0|t:H,i=d(t/b),$)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(i*=2));s<i;)(a=131072*n[s]+(n[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[s]=r[0],n[s+1]=r[1]):(l.push(a%1e14),s+=2);s=i/2}else if(crypto.randomBytes){for(n=crypto.randomBytes(i*=7);s<i;)(a=281474976710656*(31&n[s])+1099511627776*n[s+1]+4294967296*n[s+2]+16777216*n[s+3]+(n[s+4]<<16)+(n[s+5]<<8)+n[s+6])>=9e15?crypto.randomBytes(7).copy(n,s):(l.push(a%1e14),s+=7);s=i/7}else $=!1,W&&N(14,"crypto unavailable",crypto);if(!$)for(;s<i;)(a=e())<9e15&&(l[s++]=a%1e14);for(i=l[--s],t%=b,i&&t&&(a=E[b-t],l[s]=p(i/a)*a);0===l[s];l.pop(),s--);if(s<0)l=[o=0];else{for(o=-1;0===l[0];l.splice(0,1),o-=b);for(s=1,a=l[0];a>=10;a/=10,s++);s<b&&(o-=b-s)}return u.e=o,u.c=l,u}}(),I=function(){function e(e,t,n){var r,o,i,a,s=0,l=e.length,u=t%O,c=t/O|0;for(e=e.slice();l--;)s=((o=u*(i=e[l]%O)+(r=c*i+(a=e[l]/O|0)*u)%O*O+s)/n|0)+(r/O|0)+c*a,e[l]=o%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,n,r){for(var o=0;n--;)e[n]-=o,o=e[n]<t[n]?1:0,e[n]=o*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(o,i,a,s,l){var u,c,h,d,g,v,y,m,C,E,O,S,_,T,R,M,k,N=o.s==i.s?1:-1,I=o.c,D=i.c;if(!(I&&I[0]&&D&&D[0]))return new f(o.s&&i.s&&(I?!D||I[0]!=D[0]:D)?I&&0==I[0]||!D?0*N:N/0:NaN);for(C=(m=new f(N)).c=[],N=a+(c=o.e-i.e)+1,l||(l=w,c=n(o.e/b)-n(i.e/b),N=N/b|0),h=0;D[h]==(I[h]||0);h++);if(D[h]>(I[h]||0)&&c--,N<0)C.push(1),d=!0;else{for(T=I.length,M=D.length,h=0,N+=2,(g=p(l/(D[0]+1)))>1&&(D=e(D,g,l),I=e(I,g,l),M=D.length,T=I.length),_=M,O=(E=I.slice(0,M)).length;O<M;E[O++]=0);k=D.slice(),k=[0].concat(k),R=D[0],D[1]>=l/2&&R++;do{if(g=0,(u=t(D,E,M,O))<0){if(S=E[0],M!=O&&(S=S*l+(E[1]||0)),(g=p(S/R))>1)for(g>=l&&(g=l-1),y=(v=e(D,g,l)).length,O=E.length;1==t(v,E,y,O);)g--,r(v,M<y?k:D,y,l),y=v.length,u=1;else 0==g&&(u=g=1),y=(v=D.slice()).length;if(y<O&&(v=[0].concat(v)),r(E,v,O,l),O=E.length,-1==u)for(;t(D,E,M,O)<1;)g++,r(E,M<O?k:D,O,l),O=E.length}else 0===u&&(g++,E=[0]);C[h++]=g,E[0]?E[O++]=I[_]||0:(E=[I[_]],O=1)}while((_++<T||null!=E[0])&&N--);d=null!=E[0],C[0]||C.splice(0,1)}if(l==w){for(h=1,N=C[0];N>=10;N/=10,h++);A(m,a+(m.e=h+c*b-1)+1,s,d)}else m.e=c,m.r=+d;return m}}(),D=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,o=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(i,a,s,l){var u,c=s?a:a.replace(o,"");if(r.test(c))i.s=isNaN(c)?null:c<0?-1:1;else{if(!s&&(c=c.replace(e,function(e,t,n){return u="x"==(n=n.toLowerCase())?16:"b"==n?2:8,l&&l!=u?e:t}),l&&(u=l,c=c.replace(t,"$1").replace(n,"0.$1")),a!=c))return new f(c,u);W&&N(P,"not a"+(l?" base "+l:"")+" number",a),i.s=null}i.c=i.e=null,P=0}}(),x.absoluteValue=x.abs=function(){var e=new f(this);return e.s<0&&(e.s=1),e},x.ceil=function(){return A(new f(this),this.e+1,2)},x.comparedTo=x.cmp=function(e,t){return P=1,o(this,new f(e,t))},x.decimalPlaces=x.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=((t=r.length-1)-n(this.e/b))*b,t=r[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},x.dividedBy=x.div=function(e,t){return P=3,I(this,new f(e,t),H,j)},x.dividedToIntegerBy=x.divToInt=function(e,t){return P=4,I(this,new f(e,t),0,1)},x.equals=x.eq=function(e,t){return P=5,0===o(this,new f(e,t))},x.floor=function(){return A(new f(this),this.e+1,3)},x.greaterThan=x.gt=function(e,t){return P=6,o(this,new f(e,t))>0},x.greaterThanOrEqualTo=x.gte=function(e,t){return P=7,1===(t=o(this,new f(e,t)))||0===t},x.isFinite=function(){return!!this.c},x.isInteger=x.isInt=function(){return!!this.c&&n(this.e/b)>this.c.length-2},x.isNaN=function(){return!this.s},x.isNegative=x.isNeg=function(){return this.s<0},x.isZero=function(){return!!this.c&&0==this.c[0]},x.lessThan=x.lt=function(e,t){return P=8,o(this,new f(e,t))<0},x.lessThanOrEqualTo=x.lte=function(e,t){return P=9,-1===(t=o(this,new f(e,t)))||0===t},x.minus=x.sub=function(e,t){var r,o,i,a,s=this,l=s.s;if(P=10,t=(e=new f(e,t)).s,!l||!t)return new f(NaN);if(l!=t)return e.s=-t,s.plus(e);var u=s.e/b,c=e.e/b,h=s.c,d=e.c;if(!u||!c){if(!h||!d)return h?(e.s=-t,e):new f(d?s:NaN);if(!h[0]||!d[0])return d[0]?(e.s=-t,e):new f(h[0]?s:3==j?-0:0)}if(u=n(u),c=n(c),h=h.slice(),l=u-c){for((a=l<0)?(l=-l,i=h):(c=u,i=d),i.reverse(),t=l;t--;i.push(0));i.reverse()}else for(o=(a=(l=h.length)<(t=d.length))?l:t,l=t=0;t<o;t++)if(h[t]!=d[t]){a=h[t]<d[t];break}if(a&&(i=h,h=d,d=i,e.s=-e.s),(t=(o=d.length)-(r=h.length))>0)for(;t--;h[r++]=0);for(t=w-1;o>l;){if(h[--o]<d[o]){for(r=o;r&&!h[--r];h[r]=t);--h[r],h[o]+=w}h[o]-=d[o]}for(;0==h[0];h.splice(0,1),--c);return h[0]?k(e,h,c):(e.s=3==j?-1:1,e.c=[e.e=0],e)},x.modulo=x.mod=function(e,t){var n,r,o=this;return P=11,e=new f(e,t),!o.c||!e.s||e.c&&!e.c[0]?new f(NaN):!e.c||o.c&&!o.c[0]?new f(o):(9==G?(r=e.s,e.s=1,n=I(o,e,0,3),e.s=r,n.s*=r):n=I(o,e,0,G),o.minus(n.times(e)))},x.negated=x.neg=function(){var e=new f(this);return e.s=-e.s||null,e},x.plus=x.add=function(e,t){var r,o=this,i=o.s;if(P=12,t=(e=new f(e,t)).s,!i||!t)return new f(NaN);if(i!=t)return e.s=-t,o.minus(e);var a=o.e/b,s=e.e/b,l=o.c,u=e.c;if(!a||!s){if(!l||!u)return new f(i/0);if(!l[0]||!u[0])return u[0]?e:new f(l[0]?o:0*i)}if(a=n(a),s=n(s),l=l.slice(),i=a-s){for(i>0?(s=a,r=u):(i=-i,r=l),r.reverse();i--;r.push(0));r.reverse()}for((i=l.length)-(t=u.length)<0&&(r=u,u=l,l=r,t=i),i=0;t;)i=(l[--t]=l[t]+u[t]+i)/w|0,l[t]=w===l[t]?0:l[t]%w;return i&&(l=[i].concat(l),++s),k(e,l,s)},x.precision=x.sd=function(e){var t,n,r=this,o=r.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(W&&N(13,"argument"+g,e),e!=!!e&&(e=null)),!o)return null;if(t=(n=o.length-1)*b+1,n=o[n]){for(;n%10==0;n/=10,t--);for(n=o[0];n>=10;n/=10,t++);}return e&&r.e+1>t&&(t=r.e+1),t},x.round=function(e,t){var n=new f(this);return(null==e||Y(e,0,S,15))&&A(n,~~e+this.e+1,null!=t&&Y(t,0,8,15,v)?0|t:j),n},x.shift=function(e){var t=this;return Y(e,-C,C,16,"argument")?t.times("1e"+c(e)):new f(t.c&&t.c[0]&&(e<-C||e>C)?t.s*(e<0?0:1/0):t)},x.squareRoot=x.sqrt=function(){var e,t,o,i,a,s=this,l=s.c,u=s.s,c=s.e,h=H+4,d=new f("0.5");if(1!==u||!l||!l[0])return new f(!u||u<0&&(!l||l[0])?NaN:l?s:1/0);if(0==(u=Math.sqrt(+s))||u==1/0?(((t=r(l)).length+c)%2==0&&(t+="0"),u=Math.sqrt(t),c=n((c+1)/2)-(c<0||c%2),o=new f(t=u==1/0?"1e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):o=new f(u+""),o.c[0])for((u=(c=o.e)+h)<3&&(u=0);;)if(a=o,o=d.times(a.plus(I(s,a,h,1))),r(a.c).slice(0,u)===(t=r(o.c)).slice(0,u)){if(o.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(A(o,o.e+H+2,1),e=!o.times(o).eq(s));break}if(!i&&(A(a,a.e+H+2,0),a.times(a).eq(s))){o=a;break}h+=4,u+=4,i=1}return A(o,o.e+H+1,j,e)},x.times=x.mul=function(e,t){var r,o,i,a,s,l,u,c,h,d,p,g,v,y,m,C=this,E=C.c,S=(P=17,e=new f(e,t)).c;if(!(E&&S&&E[0]&&S[0]))return!C.s||!e.s||E&&!E[0]&&!S||S&&!S[0]&&!E?e.c=e.e=e.s=null:(e.s*=C.s,E&&S?(e.c=[0],e.e=0):e.c=e.e=null),e;for(o=n(C.e/b)+n(e.e/b),e.s*=C.s,(u=E.length)<(d=S.length)&&(v=E,E=S,S=v,i=u,u=d,d=i),i=u+d,v=[];i--;v.push(0));for(y=w,m=O,i=d;--i>=0;){for(r=0,p=S[i]%m,g=S[i]/m|0,a=i+(s=u);a>i;)r=((c=p*(c=E[--s]%m)+(l=g*c+(h=E[s]/m|0)*p)%m*m+v[a]+r)/y|0)+(l/m|0)+g*h,v[a--]=c%y;v[a]=r}return r?++o:v.splice(0,1),k(e,v,o)},x.toDigits=function(e,t){var n=new f(this);return e=null!=e&&Y(e,1,S,18,"precision")?0|e:null,t=null!=t&&Y(t,0,8,18,v)?0|t:j,e?A(n,e,t):n},x.toExponential=function(e,t){return T(this,null!=e&&Y(e,0,S,19)?1+~~e:null,t,19)},x.toFixed=function(e,t){return T(this,null!=e&&Y(e,0,S,20)?~~e+this.e+1:null,t,20)},x.toFormat=function(e,t){var n=T(this,null!=e&&Y(e,0,S,21)?~~e+this.e+1:null,t,21);if(this.c){var r,o=n.split("."),i=+X.groupSize,a=+X.secondaryGroupSize,s=X.groupSeparator,l=o[0],u=o[1],c=this.s<0,f=c?l.slice(1):l,h=f.length;if(a&&(r=i,i=a,a=r,h-=r),i>0&&h>0){for(r=h%i||i,l=f.substr(0,r);r<h;r+=i)l+=s+f.substr(r,i);a>0&&(l+=s+f.slice(r)),c&&(l="-"+l)}n=u?l+X.decimalSeparator+((a=+X.fractionGroupSize)?u.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+X.fractionGroupSeparator):u):l}return n},x.toFraction=function(e){var t,n,o,i,a,s,l,u,c,h=W,d=this,p=d.c,g=new f(L),v=n=new f(L),y=l=new f(L);if(null!=e&&(W=!1,s=new f(e),W=h,(h=s.isInt())&&!s.lt(L)||(W&&N(22,"max denominator "+(h?"out of range":"not an integer"),e),e=!h&&s.c&&A(s,s.e+1,1).gte(L)?s:null)),!p)return d.toString();for(c=r(p),i=g.e=c.length-d.e-1,g.c[0]=E[(a=i%b)<0?b+a:a],e=!e||s.cmp(g)>0?i>0?g:v:s,a=U,U=1/0,s=new f(c),l.c[0]=0;u=I(s,g,0,1),1!=(o=n.plus(u.times(y))).cmp(e);)n=y,y=o,v=l.plus(u.times(o=v)),l=o,g=s.minus(u.times(o=g)),s=o;return o=I(e.minus(n),y,0,1),l=l.plus(o.times(v)),n=n.plus(o.times(y)),l.s=v.s=d.s,t=I(v,y,i*=2,j).minus(d).abs().cmp(I(l,n,i,j).minus(d).abs())<1?[v.toString(),y.toString()]:[l.toString(),n.toString()],U=a,t},x.toNumber=function(){return+this},x.toPower=x.pow=function(e,t){var n,r,o,i=p(e<0?-e:+e),a=this;if(null!=t&&(P=23,t=new f(t)),!Y(e,-C,C,23,"exponent")&&(!isFinite(e)||i>C&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return n=Math.pow(+a,e),new f(t?n%t:n);for(t?e>1&&a.gt(L)&&a.isInt()&&t.gt(L)&&t.isInt()?a=a.mod(t):(o=t,t=null):z&&(n=d(z/b+2)),r=new f(L);;){if(i%2){if(!(r=r.times(a)).c)break;n?r.c.length>n&&(r.c.length=n):t&&(r=r.mod(t))}if(!(i=p(i/2)))break;a=a.times(a),n?a.c&&a.c.length>n&&(a.c.length=n):t&&(a=a.mod(t))}return t?r:(e<0&&(r=L.div(r)),o?r.mod(o):n?A(r,z,j):r)},x.toPrecision=function(e,t){return T(this,null!=e&&Y(e,1,S,24,"precision")?0|e:null,t,24)},x.toString=function(e){var t,n=this,o=n.s,i=n.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(t=r(n.c),t=null!=e&&Y(e,2,64,25,"base")?_(u(t,i),0|e,10,o):i<=F||i>=V?l(t,i):u(t,i),o<0&&n.c[0]&&(t="-"+t)),t},x.truncated=x.trunc=function(){return A(new f(this),this.e+1,1)},x.valueOf=x.toJSON=function(){var e,t=this,n=t.e;return null===n?t.toString():(e=r(t.c),e=n<=F||n>=V?l(e,n):u(e,n),t.s<0?"-"+e:e)},x.isBigNumber=!0,null!=t&&f.config(t),f}()).default=f.BigNumber=f,void 0!==t&&t.exports?t.exports=f:(e||(e="undefined"!=typeof self?self:Function("return this")()),e.BigNumber=f)}(this)},{}],2:[function(e,t,n){"use strict";t.exports={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}},{}],3:[function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];if("string"==typeof t&&(t=g.parseFormat(t)),!p.validateFormat(t))return"ERROR: invalid format";var r=t.prefix||"",i=t.postfix||"",a=function(e,t,n){switch(t.output){case"currency":return t=f(t,d.currentCurrencyDefaultFormat()),function(e,t,n){var r=n.currentCurrency(),o=Object.assign({},m,t),i=void 0,a="",s=!!o.totalLength||!!o.forceAverage||o.average,l=t.currencyPosition||r.position,u=t.currencySymbol||r.symbol;o.spaceSeparated&&(a=" "),"infix"===l&&(i=a+u+a);var f=c({instance:e,providedFormat:t,state:n,decimalSeparator:i});return"prefix"===l&&(f=e._value<0&&"sign"===o.negative?"-"+a+u+f.slice(1):u+a+f),l&&"postfix"!==l||(f=f+(a=s?"":a)+u),f}(e,t,d);case"percent":return t=f(t,d.currentPercentageDefaultFormat()),function(e,t,n,r){var o=t.prefixSymbol,i=c({instance:r(100*e._value),providedFormat:t,state:n}),a=Object.assign({},m,t);return o?"%"+(a.spaceSeparated?" ":"")+i:i+(a.spaceSeparated?" ":"")+"%"}(e,t,d,n);case"byte":return t=f(t,d.currentByteDefaultFormat()),function(e,t,n,r){var i=t.base||"binary",a=y[i],s=o(e._value,a.suffixes,a.scale),l=s.value,u=s.suffix;return c({instance:r(l),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()})+(n.currentAbbreviations().spaced?" ":"")+u}(e,t,d,n);case"time":return t=f(t,d.currentTimeDefaultFormat()),function(e){var t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return t+":"+(n<10?"0":"")+n+":"+(r<10?"0":"")+r}(e);case"ordinal":return t=f(t,d.currentOrdinalDefaultFormat()),function(e,t,n){var r=n.currentOrdinal(),o=Object.assign({},m,t),i=c({instance:e,providedFormat:t,state:n}),a=r(e._value);return i+(o.spaceSeparated?" ":"")+a}(e,t,d);case"number":default:return c({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return function(e,t){return e+t}(a=function(e,t){return t+e}(a,r),i)}function o(e,t,n){var r=t[0],o=Math.abs(e);if(o>=n){for(var i=1;i<t.length;++i){var a=Math.pow(n,i),s=Math.pow(n,i+1);if(o>=a&&o<s){r=t[i],e/=a;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function i(e){var t=e.value,n=e.characteristicPrecision,r=void 0===n?0:n,o=t.toExponential().split("e"),i=h(o,2),a=i[0],s=i[1],l=+a;return r?(1<r&&(l*=Math.pow(10,r-1),s=(s=+s-(r-1))>=0?"+"+s:s),{value:l,abbreviation:"e"+s}):{value:l,abbreviation:"e"+s}}function a(e){for(var t="",n=0;n<e;n++)t+="0";return t}function s(e,t){return-1!==e.toString().indexOf("e")?function(e,t){var n=e.toString(),r=n.split("e"),o=h(r,2),i=o[0],s=o[1],l=i.split("."),u=h(l,2),c=u[0],f=u[1],d=void 0===f?"":f;if(+s>0)n=c+d+a(s-d.length);else{var p=".";p=+c<0?"-0"+p:"0"+p;var g=(a(-s-1)+Math.abs(c)+d).substr(0,t);g.length<t&&(g+=a(t-g.length)),n=p+g}return+s>0&&t>0&&(n+="."+a(t)),n}(e,t):(Math.round(+(e+"e+"+t))/Math.pow(10,t)).toFixed(t)}function l(e,t,n,r,o){if(-1===r)return e;var i=s(t,r),a=i.toString().split("."),l=h(a,2),u=l[0],c=l[1],f=void 0===c?"":c;if(f.match(/^0+$/)&&(n||o))return u;var d=f.match(/0+$/);return o&&d?u+"."+f.toString().slice(0,d.index):i.toString()}function u(e,t,n,r){var o=e,i=o.toString().split("."),a=h(i,2),s=a[0],l=a[1];if(s.match(/^-?0$/)&&n)return l?s.replace("0","")+"."+l:s.replace("0","");if(s.length<r)for(var u=r-s.length,c=0;c<u;c++)o="0"+o;return o.toString()}function c(e){var t=e.instance,n=e.providedFormat,r=e.state,o=void 0===r?d:r,a=e.decimalSeparator,s=e.defaults,c=void 0===s?o.currentDefaults():s,f=t._value;if(0===f&&o.hasZeroFormat())return o.getZeroFormat();if(!isFinite(f))return f.toString();var h=Object.assign({},m,c,n),p=h.totalLength,g=p?0:h.characteristic,v=h.optionalCharacteristic,y=h.forceAverage,w=!!p||!!y||h.average,b=p?-1:w&&void 0===n.mantissa?0:h.mantissa,C=!p&&(void 0===n.optionalMantissa?-1===b:h.optionalMantissa),E=h.trimMantissa,O=h.thousandSeparated,S=h.spaceSeparated,_=h.negative,T=h.forceSign,R=h.exponential,M="";if(w){var k=function(e){var t=e.value,n=e.forceAverage,r=e.abbreviations,o=e.spaceSeparated,i=void 0!==o&&o,a=e.totalLength,s=void 0===a?0:a,l="",u=Math.abs(t),c=-1;if(u>=Math.pow(10,12)&&!n||"trillion"===n?(l=r.trillion,t/=Math.pow(10,12)):u<Math.pow(10,12)&&u>=Math.pow(10,9)&&!n||"billion"===n?(l=r.billion,t/=Math.pow(10,9)):u<Math.pow(10,9)&&u>=Math.pow(10,6)&&!n||"million"===n?(l=r.million,t/=Math.pow(10,6)):(u<Math.pow(10,6)&&u>=Math.pow(10,3)&&!n||"thousand"===n)&&(l=r.thousand,t/=Math.pow(10,3)),l&&(l=(i?" ":"")+l),s){var f=t.toString().split(".")[0];c=Math.max(s-f.length,0)}return{value:t,abbreviation:l,mantissaPrecision:c}}({value:f,forceAverage:y,abbreviations:o.currentAbbreviations(),spaceSeparated:S,totalLength:p});f=k.value,M+=k.abbreviation,p&&(b=k.mantissaPrecision)}if(R){var N=i({value:f,characteristicPrecision:g});f=N.value,M=N.abbreviation+M}var A=l(f.toString(),f,C,b,E);return A=function(e,t,n,r,o){var i=r.currentDelimiters(),a=i.thousands;o=o||i.decimal;var s=i.thousandsSize||3,l=e.toString(),u=l.split(".")[0],c=l.split(".")[1];return n&&(t<0&&(u=u.slice(1)),function(e,t){for(var n=[],r=0,o=e;o>0;o--)r===t&&(n.unshift(o),r=0),r++;return n}(u.length,s).forEach(function(e,t){u=u.slice(0,e+t)+a+u.slice(e+t)}),t<0&&(u="-"+u)),c?u+o+c:u}(A=u(A,0,v,g),f,O,o,a),(w||R)&&(A=function(e,t){return e+t}(A,M)),(T||f<0)&&(A=function(e,t,n){return 0===t?e:0==+e?e.replace("-",""):t>0?"+"+e:"sign"===n?e:"("+e.replace("-","")+")"}(A,f,_)),A}function f(e,t){if(!e)return t;var n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}var h=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=e("./globalState"),p=e("./validating"),g=e("./parsing"),v=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],y={general:{scale:1024,suffixes:v,marker:"bd"},binary:{scale:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],marker:"b"},decimal:{scale:1e3,suffixes:v,marker:"d"}},m={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1};t.exports=function(e){return{format:function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return r.apply(void 0,n.concat([e]))},getByteUnit:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=y.general;return o(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getBinaryByteUnit:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=y.binary;return o(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getDecimalByteUnit:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=y.decimal;return o(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},formatOrDefault:f}}},{"./globalState":4,"./parsing":8,"./validating":10}],4:[function(e,t,n){"use strict";function r(e){u=e}function o(){return c[u]}var i=e("./en-US"),a=e("./validating"),s=e("./parsing"),l={},u=void 0,c={},f=null,h={};l.languages=function(){return Object.assign({},c)},l.currentLanguage=function(){return u},l.currentCurrency=function(){return o().currency},l.currentAbbreviations=function(){return o().abbreviations},l.currentDelimiters=function(){return o().delimiters},l.currentOrdinal=function(){return o().ordinal},l.currentDefaults=function(){return Object.assign({},o().defaults,h)},l.currentOrdinalDefaultFormat=function(){return Object.assign({},l.currentDefaults(),o().ordinalFormat)},l.currentByteDefaultFormat=function(){return Object.assign({},l.currentDefaults(),o().byteFormat)},l.currentPercentageDefaultFormat=function(){return Object.assign({},l.currentDefaults(),o().percentageFormat)},l.currentCurrencyDefaultFormat=function(){return Object.assign({},l.currentDefaults(),o().currencyFormat)},l.currentTimeDefaultFormat=function(){return Object.assign({},l.currentDefaults(),o().timeFormat)},l.setDefaults=function(e){e=s.parseFormat(e),a.validateFormat(e)&&(h=e)},l.getZeroFormat=function(){return f},l.setZeroFormat=function(e){return f="string"==typeof e?e:null},l.hasZeroFormat=function(){return null!==f},l.languageData=function(e){if(e){if(c[e])return c[e];throw new Error('Unknown tag "'+e+'"')}return o()},l.registerLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!a.validateLanguage(e))throw new Error("Invalid language data");c[e.languageTag]=e,t&&r(e.languageTag)},l.setLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.languageTag;if(!c[e]){var n=e.split("-")[0],o=Object.keys(c).find(function(e){return e.split("-")[0]===n});return c[o]?void r(o):void r(t)}r(e)},l.registerLanguage(i),u=i.languageTag,t.exports=l},{"./en-US":2,"./parsing":8,"./validating":10}],5:[function(e,t,n){"use strict";function r(t,n){t.forEach(function(t){var r=void 0;try{r=e("../languages/"+t)}catch(e){console.error('Unable to load "'+t+'". No matching language file found.')}r&&n.registerLanguage(r)})}t.exports=function(e){return{loadLanguagesInNode:function(t){return r(t,e)}}}},{}],6:[function(e,t,n){"use strict";function r(e,t,n){var r=new o(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new o(i),e._value=r.minus(i).toNumber(),e}var o=e("bignumber.js");t.exports=function(e){return{add:function(t,n){return function(e,t,n){var r=new o(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new o(i),e._value=r.add(i).toNumber(),e}(t,n,e)},subtract:function(t,n){return r(t,n,e)},multiply:function(t,n){return function(e,t,n){var r=new o(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new o(i),e._value=r.times(i).toNumber(),e}(t,n,e)},divide:function(t,n){return function(e,t,n){var r=new o(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new o(i),e._value=r.dividedBy(i).toNumber(),e}(t,n,e)},set:function(t,n){return function(e,t,n){var r=t;return n.isNumbro(t)&&(r=t._value),e._value=r,e}(t,n,e)},difference:function(t,n){return function(e,t,n){var o=n(e._value);return r(o,t,n),Math.abs(o._value)}(t,n,e)}}}},{"bignumber.js":1}],7:[function(e,t,n){"use strict";function r(e){var t=e;return o.isNumbro(e)?t=e._value:"string"==typeof e?t=o.unformat(e):isNaN(e)&&(t=NaN),t}function o(e){return new d(r(e))}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=e("./globalState"),s=e("./validating"),l=e("./loading")(o),u=e("./unformatting"),c=e("./formatting")(o),f=e("./manipulating")(o),h=e("./parsing"),d=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._value=t}return i(e,[{key:"clone",value:function(){return o(this._value)}},{key:"format",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return c.format(this,e)}},{key:"formatCurrency",value:function(e){return"string"==typeof e&&(e=h.parseFormat(e)),(e=c.formatOrDefault(e,a.currentCurrencyDefaultFormat())).output="currency",c.format(this,e)}},{key:"formatTime",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.output="time",c.format(this,e)}},{key:"binaryByteUnits",value:function(){return c.getBinaryByteUnit(this)}},{key:"decimalByteUnits",value:function(){return c.getDecimalByteUnit(this)}},{key:"byteUnits",value:function(){return c.getByteUnit(this)}},{key:"difference",value:function(e){return f.difference(this,e)}},{key:"add",value:function(e){return f.add(this,e)}},{key:"subtract",value:function(e){return f.subtract(this,e)}},{key:"multiply",value:function(e){return f.multiply(this,e)}},{key:"divide",value:function(e){return f.divide(this,e)}},{key:"set",value:function(e){return f.set(this,r(e))}},{key:"value",value:function(){return this._value}},{key:"valueOf",value:function(){return this._value}}]),e}();o.version="2.1.1",o.isNumbro=function(e){return e instanceof d},o.language=a.currentLanguage,o.registerLanguage=a.registerLanguage,o.setLanguage=a.setLanguage,o.languages=a.languages,o.languageData=a.languageData,o.zeroFormat=a.setZeroFormat,o.defaultFormat=a.currentDefaults,o.setDefaults=a.setDefaults,o.defaultCurrencyFormat=a.currentCurrencyDefaultFormat,o.validate=s.validate,o.loadLanguagesInNode=l.loadLanguagesInNode,o.unformat=u.unformat,t.exports=o},{"./formatting":3,"./globalState":4,"./loading":5,"./manipulating":6,"./parsing":8,"./unformatting":9,"./validating":10}],8:[function(e,t,n){"use strict";t.exports={parseFormat:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(function(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",void(t.base="general")):-1!==e.indexOf("b")?(t.output="byte",void(t.base="binary")):-1!==e.indexOf("d")?(t.output="byte",void(t.base="decimal")):void(-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time");t.output="percent"}else t.output="currency"}(e=function(e,t){var n=e.match(/{([^}]*)}$/);return n?(t.postfix=n[1],e.slice(0,-n[0].length)):e}(e=function(e,t){var n=e.match(/^{([^}]*)}/);return n?(t.prefix=n[1],e.slice(n[0].length)):e}(e,t),t),t),function(e,t){var n=e.match(/[1-9]+[0-9]*/);n&&(t.totalLength=+n[0])}(e,t),function(e,t){var n=e.split(".")[0].match(/0+/);n&&(t.characteristic=n[0].length)}(e,t),function(e,t){if(-1!==e.indexOf(".")){var n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,t),function(e,t){-1!==e.indexOf("a")&&(t.average=!0)}(e,t),function(e,t){-1!==e.indexOf("K")?t.forceAverage="thousand":-1!==e.indexOf("M")?t.forceAverage="million":-1!==e.indexOf("B")?t.forceAverage="billion":-1!==e.indexOf("T")&&(t.forceAverage="trillion")}(e,t),function(e,t){var n=e.split(".")[1];if(n){var r=n.match(/0+/);r&&(t.mantissa=r[0].length)}}(e,t),function(e,t){e.match(/\[\.]/)?t.optionalMantissa=!0:e.match(/\./)&&(t.optionalMantissa=!1)}(e,t),function(e,t){-1!==e.indexOf(",")&&(t.thousandSeparated=!0)}(e,t),function(e,t){-1!==e.indexOf(" ")&&(t.spaceSeparated=!0)}(e,t),function(e,t){e.match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),e.match(/^\+?-/)&&(t.negative="sign")}(e,t),function(e,t){e.match(/^\+/)&&(t.forceSign=!0)}(e,t),t)}}},{}],9:[function(e,t,n){"use strict";function r(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments[3],a=arguments[4],l=arguments[5],u=arguments[6];if(!isNaN(+e))return+e;var c="",f=e.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(f!==e)return-1*o(f,t,n,i,a,l,u);for(var h=0;h<s.length;h++){var d=s[h];if((c=e.replace(d.key,""))!==e)return o(c,t,n,i,a,l,u)*d.factor}if((c=e.replace("%",""))!==e)return o(c,t,n,i,a,l,u)/100;var p=parseFloat(e);if(!isNaN(p)){var g=i(p);if(g&&"."!==g&&(c=e.replace(new RegExp(r(g)+"$"),""))!==e)return o(c,t,n,i,a,l,u);var v={};Object.keys(l).forEach(function(e){v[l[e]]=e});for(var y=Object.keys(v).sort().reverse(),m=y.length,w=0;w<m;w++){var b=y[w],C=v[b];if((c=e.replace(b,""))!==e){var E=void 0;switch(C){case"thousand":E=Math.pow(10,3);break;case"million":E=Math.pow(10,6);break;case"billion":E=Math.pow(10,9);break;case"trillion":E=Math.pow(10,12)}return o(c,t,n,i,a,l,u)*E}}}}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=e.replace(n,"");return(o=o.replace(new RegExp("([0-9])"+r(t.thousands)+"([0-9])","g"),"$1$2")).replace(t.decimal,".")}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3],a=arguments[4],s=arguments[5],l=arguments[6];if(""!==e)return isNaN(+e)?e===a?0:o(i(e,t,n),t,n,r,a,s,l):+e}var s=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];t.exports={unformat:function(t,n){var r=e("./globalState"),o=r.currentDelimiters(),i=r.currentCurrency().symbol,s=r.currentOrdinal(),l=r.getZeroFormat(),u=r.currentAbbreviations(),c=void 0;if("string"==typeof t)c=function(e,t){if(!e.indexOf(":")||":"===t.thousands)return!1;var n=e.split(":");if(3!==n.length)return!1;var r=+n[0],o=+n[1],i=+n[2];return!isNaN(r)&&!isNaN(o)&&!isNaN(i)}(t,o)?function(e){var t=e.split(":"),n=+t[0],r=+t[1];return+t[2]+60*r+3600*n}(t):a(t,o,i,s,l,u,n);else{if("number"!=typeof t)return;c=t}if(void 0!==c)return c}}},{"./globalState":4}],10:[function(e,t,n){"use strict";function r(e){return!!s.unformat(e)}function o(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=Object.keys(e).map(function(r){if(!t[r])return console.error(n+" Invalid key: "+r),!1;var i=e[r],s=t[r];if("string"==typeof s&&(s={type:s}),"format"===s.type){if(!o(i,u,"[Validate "+r+"]",!0))return!1}else if((void 0===i?"undefined":a(i))!==s.type)return console.error(n+" "+r+' type mismatched: "'+s.type+'" expected, "'+(void 0===i?"undefined":a(i))+'" provided'),!1;if(s.restrictions&&s.restrictions.length)for(var l=s.restrictions.length,c=0;c<l;c++){var f=s.restrictions[c],h=f.restriction,d=f.message;if(!h(i,e))return console.error(n+" "+r+" invalid value: "+d),!1}return s.restriction&&!s.restriction(i,e)?(console.error(n+" "+r+" invalid value: "+s.message),!1):s.validValues&&-1===s.validValues.indexOf(i)?(console.error(n+" "+r+" invalid value: must be among "+JSON.stringify(s.validValues)+', "'+i+'" provided'),!1):!(s.children&&!o(i,s.children,"[Validate "+r+"]"))});return r||i.push.apply(i,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Object.keys(t).map(function(r){var o=t[r];if("string"==typeof o&&(o={type:o}),o.mandatory){var i=o.mandatory;if("function"==typeof i&&(i=i(e)),i&&void 0===e[r])return console.error(n+' Missing mandatory key "'+r+'"'),!1}return!0}))),i.reduce(function(e,t){return e&&t},!0)}function i(e){return o(e,u,"[Validate format]")}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=e("./unformatting"),l=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,u={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:function(e,t){return"byte"===t.output},message:"`base` must be provided only when the output is `byte`",mandatory:function(e){return"byte"===e.output}},characteristic:{type:"number",restriction:function(e){return e>=0},message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:function(e){return e>=0},message:"value must be positive"},{restriction:function(e,t){return!t.exponential},message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:function(e){return e>=0},message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:function(e,t){return"percent"===t.output},message:"`prefixSymbol` can be provided only when the output is `percent`"}},c={languageTag:{type:"string",mandatory:!0,restriction:function(e){return e.match(l)},message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",ordinal:{type:"function",mandatory:!0},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};t.exports={validate:function(e,t){var n=r(e),o=i(t);return n&&o},validateFormat:i,validateInput:r,validateLanguage:function(e){return o(e,c,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7)}),window.numbro=n(437)},function(e,t,n){"use strict";t.__esModule=!0,t.getNormalizedDate=function(e){var t=new Date(e);if(!isNaN(new Date("".concat(e,"T00:00")).getDate()))return new Date(t.getTime()+6e4*t.getTimezoneOffset());return t}},function(e,t,n){"use strict";!function(e){function n(e){return e.split('"').length-1}var r={parse:function(e){var t,r,o,i,a,s,l,u=[],c=0;for((o=e.replace(/\r\n|\r/g,"\n").split("\n")).length>1&&""===o[o.length-1]&&o.pop(),t=0,r=o.length;t<r;t+=1){for(o[t]=o[t].split("\t"),i=0,a=o[t].length;i<a;i+=1)u[c]||(u[c]=[]),s&&0===i?(l=u[c].length-1,u[c][l]=u[c][l]+"\n"+o[t][0],s&&1&n(o[t][0])&&(s=!1,u[c][l]=u[c][l].substring(0,u[c][l].length-1).replace(/""/g,'"'))):i===a-1&&0===o[t][i].indexOf('"')&&1&n(o[t][i])?(u[c].push(o[t][i].substring(1).replace(/""/g,'"')),s=!0):(u[c].push(o[t][i].replace(/""/g,'"')),s=!1);s||(c+=1)}return u},stringify:function(e){var t,n,r,o,i,a="";for(t=0,n=e.length;t<n;t+=1){for(o=e[t].length,r=0;r<o;r+=1)r>0&&(a+="\t"),"string"==typeof(i=e[t][r])?i.indexOf("\n")>-1?a+='"'+i.replace(/"/g,'""')+'"':a+=i:a+=null===i||void 0===i?"":i;t!==n-1&&(a+="\n")}return a}};t.parse=r.parse,t.stringify=r.stringify}(window)},function(e,t,n){"use strict";t.__esModule=!0,t.mouseDown=i,t.mouseOver=a,t.handleMouseEvent=function(e,t){var n=t.coords,o=t.selection,i=t.controller;s.get(e.type)({coords:n,selection:o,controller:i,isShiftKey:e.shiftKey,isLeftClick:(0,r.isLeftClick)(e)||"touchstart"===e.type,isRightClick:(0,r.isRightClick)(e)})};var r=n(16),o=n(13);function i(e){var t=e.isShiftKey,n=e.isLeftClick,r=e.isRightClick,i=e.coords,a=e.selection,s=e.controller,l=a.isSelected()?a.getSelectedRange().current():null,u=a.isSelectedByCorner(),c=a.isSelectedByRowHeader();if(t&&l)i.row>=0&&i.col>=0&&!s.cells?a.setRangeEnd(i):(u||c)&&i.row>=0&&i.col>=0&&!s.cells?a.setRangeEnd(new o.CellCoords(i.row,i.col)):u&&i.row<0&&!s.column?a.setRangeEnd(new o.CellCoords(l.to.row,i.col)):c&&i.col<0&&!s.row?a.setRangeEnd(new o.CellCoords(i.row,l.to.col)):(!u&&!c&&i.col<0||u&&i.col<0)&&!s.row?a.selectRows(l.from.row,i.row):(!u&&!c&&i.row<0||c&&i.row<0)&&!s.column&&a.selectColumns(l.from.col,i.col);else{var f=new o.CellCoords(i.row,i.col);f.row<0&&(f.row=0),f.col<0&&(f.col=0);var h=!a.inInSelection(f),d=n||r&&h;i.row<0&&i.col>=0&&!s.column?d&&a.selectColumns(i.col):i.col<0&&i.row>=0&&!s.row?d&&a.selectRows(i.row):i.col>=0&&i.row>=0&&!s.cells?d&&a.setRangeStart(i):i.col<0&&i.row<0&&a.setRangeStart(i)}}function a(e){var t=e.isLeftClick,n=e.coords,r=e.selection,i=e.controller;if(t){var a=r.isSelectedByRowHeader(),s=r.isSelectedByColumnHeader(),l=r.tableProps.countCols(),u=r.tableProps.countRows();s&&!i.column?r.setRangeEnd(new o.CellCoords(u-1,n.col)):a&&!i.row?r.setRangeEnd(new o.CellCoords(n.row,l-1)):i.cell||r.setRangeEnd(n)}}var s=new Map([["mousedown",i],["mouseover",a],["touchstart",i]])},function(e,t,n){"use strict";t.__esModule=!0,t.registerAsRootInstance=function(e){r.set(e,!0)},t.hasValidParameter=function(e){return e===o},t.isRootInstance=function(e){return r.has(e)},t.rootInstanceSymbol=t.holder=void 0;var r=new WeakMap;t.holder=r;var o=Symbol("rootInstance");t.rootInstanceSymbol=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(14),o=n(2);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(){}a.prototype={licenseKey:"trial",data:void 0,dataSchema:void 0,width:void 0,height:void 0,startRows:5,startCols:5,rowHeaders:void 0,colHeaders:null,colWidths:void 0,rowHeights:void 0,columns:void 0,cells:void 0,cell:[],comments:!1,customBorders:!1,minRows:0,minCols:0,maxRows:1/0,maxCols:1/0,minSpareRows:0,minSpareCols:0,allowInsertRow:!0,allowInsertColumn:!0,allowRemoveRow:!0,allowRemoveColumn:!0,selectionMode:"multiple",fillHandle:{autoInsertRow:!1},fixedRowsTop:0,fixedRowsBottom:0,fixedColumnsLeft:0,outsideClickDeselects:!0,enterBeginsEditing:!0,enterMoves:{row:1,col:0},tabMoves:{row:0,col:1},autoWrapRow:!0,autoWrapCol:!0,persistentState:void 0,currentRowClassName:void 0,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",activeHeaderClassName:"ht__active_highlight",className:void 0,tableClassName:void 0,stretchH:"none",isEmptyRow:function(e){var t,n,a,s;for(t=0,n=this.countCols();t<n;t++)if(""!==(a=this.getDataAtCell(e,t))&&null!==a&&(0,r.isDefined)(a))return"object"===i(a)&&(s=this.getCellMeta(e,t),(0,o.isObjectEqual)(this.getSchema()[s.prop],a));return!0},isEmptyCol:function(e){var t,n,o;for(t=0,n=this.countRows();t<n;t++)if(""!==(o=this.getDataAtCell(t,e))&&null!==o&&(0,r.isDefined)(o))return!1;return!0},observeDOMVisibility:!0,allowInvalid:!0,allowEmpty:!0,invalidCellClassName:"htInvalid",placeholder:void 0,placeholderCellClassName:"htPlaceholder",readOnlyCellClassName:"htDimmed",renderer:void 0,commentedCellClassName:"htCommentCell",fragmentSelection:!1,readOnly:!1,skipColumnOnPaste:!1,search:!1,type:"text",copyable:!0,editor:void 0,visibleRows:10,trimDropdown:!0,debug:!1,wordWrap:!0,noWordWrapClassName:"htNoWrap",contextMenu:void 0,copyPaste:!0,undo:void 0,columnSorting:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,mergeCells:!1,multiColumnSorting:void 0,viewportRowRenderingOffset:"auto",viewportColumnRenderingOffset:"auto",validator:void 0,disableVisualSelection:!1,manualColumnFreeze:void 0,trimWhitespace:!0,source:void 0,title:void 0,checkedTemplate:void 0,uncheckedTemplate:void 0,label:void 0,numericFormat:void 0,language:"en-US",selectOptions:void 0,autoColumnSize:void 0,autoRowSize:void 0,dateFormat:"DD/MM/YYYY",correctFormat:!1,defaultDate:void 0,strict:void 0,allowHtml:!1,renderAllRows:void 0,preventOverflow:!1,bindRowsWithHeaders:void 0,collapsibleColumns:void 0,columnSummary:void 0,dropdownMenu:void 0,filters:void 0,formulas:void 0,ganttChart:void 0,headerTooltips:void 0,hiddenColumns:void 0,hiddenRows:void 0,nestedHeaders:void 0,trimRows:void 0,rowHeaderWidth:void 0,columnHeaderHeight:void 0,observeChanges:void 0,sortByRelevance:!0,filter:!0,filteringCaseSensitive:!1,dragToScroll:!0,nestedRows:void 0};var s=a;t.default=s},function(e,t,n){"use strict";t.__esModule=!0,t.getTranslatedPhrase=function(e,t,n){var s=(0,o.getLanguageDictionary)(e);if(null===s)return null;var l=s[t];if((0,a.isUndefined)(l))return null;var u=function(e,t){var n=e;return(0,r.arrayEach)((0,i.getPhraseFormatters)(),function(r){n=r(e,t)}),n}(l,n);if(Array.isArray(u))return u[0];return u};var r=n(1),o=n(102),i=n(682),a=n(14)},function(e,t,n){"use strict";t.__esModule=!0,t.extendNotExistingKeys=function(e,t){return(0,o.objectEach)(t,function(t,n){(0,r.isUndefined)(e[n])&&(e[n]=t)}),e},t.createCellHeadersRange=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,o=n,i=r;if(e>t){var a=[i,o];o=a[0],i=a[1]}return"".concat(o,"-").concat(i)},t.normalizeLanguageCode=u,t.applyLanguageSetting=function(e,t){var n=u(t);(0,s.hasLanguageDictionary)(n)?e.language=n:(e.language=s.DEFAULT_LANGUAGE_CODE,c(t))},t.warnUserAboutLanguageRegistration=c;var r=n(14),o=n(2),i=n(33),a=n(37),s=n(102);function l(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['Language with code "','" was not found. You should register particular language \n before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.']);return l=function(){return e},e}function u(e){var t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/.exec(e);return t?"".concat(t[1].toLowerCase(),"-").concat(t[2].toUpperCase()):e}function c(e){(0,r.isDefined)(e)&&(0,i.error)((0,a.toSingleLine)(l(),e))}},function(e,t,n){"use strict";t.__esModule=!0;var r=s(n(446));t.Highlight=r.default;var o=s(n(691));t.Selection=o.default;var i=n(440);t.handleMouseEvent=i.handleMouseEvent;var a=n(104);function s(e){return e&&e.__esModule?e:{default:e}}t.detectSelectionType=a.detectSelectionType,t.normalizeSelectionFactory=a.normalizeSelectionFactory},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.CUSTOM_SELECTION=t.HEADER_TYPE=t.FILL_TYPE=t.CELL_TYPE=t.AREA_TYPE=t.ACTIVE_HEADER_TYPE=void 0;var r=n(684),o=n(1);function i(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){s(e,t,n[t])})}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}t.ACTIVE_HEADER_TYPE="active-header";t.AREA_TYPE="area";var u="cell";t.CELL_TYPE=u;var c="fill";t.FILL_TYPE=c;t.HEADER_TYPE="header";t.CUSTOM_SELECTION="custom-selection";var f=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.layerLevel=0,this.cell=(0,r.createHighlight)(u,t),this.fill=(0,r.createHighlight)(c,t),this.areas=new Map,this.headers=new Map,this.activeHeaders=new Map,this.customSelections=[]}return function(e,t,n){t&&l(e.prototype,t),n&&l(e,n)}(e,[{key:"isEnabledFor",value:function(e){var t="current"===e?u:e,n=this.options.disableHighlight;return"string"==typeof n&&(n=[n]),!1===n||Array.isArray(n)&&!n.includes(t)}},{key:"useLayerLevel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}},{key:"getCell",value:function(){return this.cell}},{key:"getFill",value:function(){return this.fill}},{key:"createOrGetArea",value:function(){var e,t=this.layerLevel;return this.areas.has(t)?e=this.areas.get(t):(e=(0,r.createHighlight)("area",a({layerLevel:t},this.options)),this.areas.set(t,e)),e}},{key:"getAreas",value:function(){return i(this.areas.values())}},{key:"createOrGetHeader",value:function(){var e,t=this.layerLevel;return this.headers.has(t)?e=this.headers.get(t):(e=(0,r.createHighlight)("header",a({},this.options)),this.headers.set(t,e)),e}},{key:"getHeaders",value:function(){return i(this.headers.values())}},{key:"createOrGetActiveHeader",value:function(){var e,t=this.layerLevel;return this.activeHeaders.has(t)?e=this.activeHeaders.get(t):(e=(0,r.createHighlight)("active-header",a({},this.options)),this.activeHeaders.set(t,e)),e}},{key:"getActiveHeaders",value:function(){return i(this.activeHeaders.values())}},{key:"getCustomSelections",value:function(){return i(this.customSelections.values())}},{key:"addCustomSelection",value:function(e){this.customSelections.push((0,r.createHighlight)("custom-selection",a({},e)))}},{key:"clear",value:function(){this.cell.clear(),this.fill.clear(),(0,o.arrayEach)(this.areas.values(),function(e){e.clear()}),(0,o.arrayEach)(this.headers.values(),function(e){e.clear()}),(0,o.arrayEach)(this.activeHeaders.values(),function(e){e.clear()})}},{key:Symbol.iterator,value:function(){return[this.cell,this.fill].concat(i(this.areas.values()),i(this.headers.values()),i(this.activeHeaders.values()),i(this.customSelections))[Symbol.iterator]()}}]),e}();t.default=f},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(2),o=n(5),i=n(14);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.samples=null,this.dataFactory=t,this.customSampleCount=null,this.allowDuplicates=!1}return s(e,null,[{key:"SAMPLE_COUNT",get:function(){return 3}}]),s(e,[{key:"getSampleCount",value:function(){return this.customSampleCount?this.customSampleCount:e.SAMPLE_COUNT}},{key:"setSampleCount",value:function(e){this.customSampleCount=e}},{key:"setAllowDuplicates",value:function(e){this.allowDuplicates=e}},{key:"generateRowSamples",value:function(e,t){return this.generateSamples("row",t,e)}},{key:"generateColumnSamples",value:function(e,t){return this.generateSamples("col",t,e)}},{key:"generateSamples",value:function(e,t,n){var r=this,i=new Map,a="number"==typeof n?{from:n,to:n}:n,s=a.from,l=a.to;return(0,o.rangeEach)(s,l,function(n){var o=r.generateSample(e,t,n);i.set(n,o)}),i}},{key:"generateSample",value:function(e,t,n){var a=this;if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");var s=new Map,l="row"===e?"col":"row",u=[];return(0,o.rangeEach)(t.from,t.to,function(t){var o,c="row"===e?a.dataFactory(n,t):a.dataFactory(t,n),f=c.value,h=c.bundleCountSeed,d=h>0;o=(0,r.isObject)(f)?Object.keys(f).length:Array.isArray(f)?f.length:(0,i.stringify)(f).length,d&&(o+=h),s.has(o)||s.set(o,{needed:a.getSampleCount(),strings:[]});var p=s.get(o);p.needed&&((!(u.indexOf(f)>-1)||a.allowDuplicates||d)&&(p.strings.push(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({value:f},l,t)),u.push(f),p.needed-=1))}),s}}]),e}();t.default=l},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(14),i=n(2),a=n(1),s=n(5),l=m(n(7)),u=n(6),c=m(n(23)),f=n(103),h=n(702),d=n(138),p=n(703),g=m(n(704)),v=n(705),y=n(67);function m(e){return e&&e.__esModule?e:{default:e}}function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){E(e,t,n[t])})}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,t,n){return(_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=T(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var k="columnSorting";(0,y.registerRootComparator)(k,v.rootComparator),c.default.getSingleton().register("beforeColumnSort"),c.default.getSingleton().register("afterColumnSort");var N=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?M(e):t}(this,T(t).call(this,e))).columnStatesManager=new h.ColumnStatesManager,n.rowsMapper=new g.default(M(M(n))),n.blockPluginTranslation=!0,n.columnMetaCache=new Map,n.pluginKey=k,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&R(e,t)}(t,l.default),function(e,t,n){t&&S(e.prototype,t),n&&S(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[this.pluginKey]}},{key:"enablePlugin",value:function(){var e=this;this.enabled||((0,o.isUndefined)(this.hot.getSettings().observeChanges)&&this.enableObserveChangesPlugin(),this.addHook("afterTrimRow",function(){return e.sortByPresetSortStates()}),this.addHook("afterUntrimRow",function(){return e.sortByPresetSortStates()}),this.addHook("modifyRow",function(t,n){return e.onModifyRow(t,n)}),this.addHook("unmodifyRow",function(t,n){return e.onUnmodifyRow(t,n)}),this.addHook("afterGetColHeader",function(t,n){return e.onAfterGetColHeader(t,n)}),this.addHook("beforeOnCellMouseDown",function(t,n,r,o){return e.onBeforeOnCellMouseDown(t,n,r,o)}),this.addHook("afterOnCellMouseDown",function(t,n){return e.onAfterOnCellMouseDown(t,n)}),this.addHook("afterCreateRow",function(t,n){return e.onAfterCreateRow(t,n)}),this.addHook("afterRemoveRow",function(t,n){return e.onAfterRemoveRow(t,n)}),this.addHook("afterInit",function(){return e.loadOrSortBySettings()}),this.addHook("afterLoadData",function(t){return e.onAfterLoadData(t)}),this.addHook("afterCreateCol",function(){return e.onAfterCreateCol()}),this.addHook("afterRemoveCol",function(){return e.onAfterRemoveCol()}),this.hot.view&&this.loadOrSortBySettings(),_(T(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){var e=this,n=function(t,n){var r=(0,d.getHeaderSpanElement)(n);!1!==(0,d.isFirstLevelColumnHeader)(t,n)&&null!==r&&e.updateHeaderClasses(r)};this.hot.addHook("afterGetColHeader",n),this.hot.addHookOnce("afterRender",function(){e.hot.removeHook("afterGetColHeader",n)}),this.rowsMapper.clearMap(),_(T(t.prototype),"disablePlugin",this).call(this)}},{key:"sort",value:function(e){var t=this,n=this.getSortConfig(),r=this.getNormalizedSortConfigs(e),o=this.areValidSortConfigs(r);if(!1!==this.hot.runHooks("beforeColumnSort",n,r,o)){if(o){var i=(0,a.arrayMap)(r,function(e){return function(e){var n=e.column,r=O(e,["column"]);return C({column:t.hot.toPhysicalColumn(n)},r)}(e)});this.columnStatesManager.setSortStates(i),this.sortByPresetSortStates(),this.saveAllSortSettings(),this.hot.render(),this.hot.view.wt.draw(!0)}this.hot.runHooks("afterColumnSort",n,this.getSortConfig(),o)}}},{key:"clearSort",value:function(){this.sort([])}},{key:"isSorted",value:function(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}},{key:"getSortConfig",value:function(e){var t=this,n=function(e){var n=e.column,r=O(e,["column"]);return C({column:t.hot.toVisualColumn(n)},r)};if((0,o.isDefined)(e)){var r=this.hot.toPhysicalColumn(e),i=this.columnStatesManager.getColumnSortState(r);return(0,o.isDefined)(i)?n(i):void 0}var s=this.columnStatesManager.getSortStates();return(0,a.arrayMap)(s,function(e){return n(e)})}},{key:"setSortConfig",value:function(e){var t=this,n=this.getNormalizedSortConfigs(e);if(this.areValidSortConfigs(n)){var r=(0,a.arrayMap)(n,function(e){return function(e){var n=e.column,r=O(e,["column"]);return C({column:t.hot.toPhysicalColumn(n)},r)}(e)});this.columnStatesManager.setSortStates(r)}}},{key:"getNormalizedSortConfigs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.slice(0,1):[e].slice(0,1)}},{key:"areValidSortConfigs",value:function(e){if(!1===Array.isArray(e))return!1;var t=e.map(function(e){return e.column}),n=this.hot.countCols(),r=t.every(function(e){return e<=n&&e>=0});return(0,d.areValidSortStates)(e)&&r}},{key:"saveAllSortSettings",value:function(){var e=this.columnStatesManager.getAllColumnsProperties();e.initialConfig=this.columnStatesManager.getSortStates(),this.hot.runHooks("persistentStateSave","columnSorting",e)}},{key:"getAllSavedSortSettings",value:function(){var e=this,t={};this.hot.runHooks("persistentStateLoad","columnSorting",t);var n=t.value;return(0,o.isDefined)(n)&&Array.isArray(n.initialConfig)&&(n.initialConfig=(0,a.arrayMap)(n.initialConfig,function(t){var n=t.column,r=O(t,["column"]);return C({column:e.hot.toVisualColumn(n)},r)})),n}},{key:"getColumnNextConfig",value:function(e){var t=this.hot.toPhysicalColumn(e);if(this.columnStatesManager.isColumnSorted(t)){var n=this.getSortConfig(e),r=(0,d.getNextSortOrder)(n.sortOrder);return(0,o.isDefined)(r)?(n.sortOrder=r,n):void 0}var i=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e<i)return{column:e,sortOrder:(0,d.getNextSortOrder)()}}},{key:"getNextSortConfig",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"append",n=this.hot.toPhysicalColumn(e),r=this.columnStatesManager.getIndexOfColumnInSortQueue(n),i=this.columnStatesManager.isColumnSorted(n),a=this.getSortConfig(),s=this.getColumnNextConfig(e);if(i){if((0,o.isUndefined)(s))return[].concat(b(a.slice(0,r)),b(a.slice(r+1)));if("append"===t)return[].concat(b(a.slice(0,r)),b(a.slice(r+1)),[s]);if("replace"===t)return[].concat(b(a.slice(0,r)),[s],b(a.slice(r+1)))}return(0,o.isDefined)(s)?a.concat(s):a}},{key:"setMergedPluginSettings",value:function(e){var t=this.hot.toPhysicalColumn(e),n=this.hot.getSettings()[this.pluginKey],r=this.columnStatesManager.getAllColumnsProperties(),o=this.hot.getCellMeta(0,e),i=Object.getPrototypeOf(o),a=Object.hasOwnProperty.call(i,this.pluginKey)?i[this.pluginKey]:{};this.columnMetaCache.set(t,Object.assign(r,n,a))}},{key:"getFirstCellSettings",value:function(e){var t=this.blockPluginTranslation;this.blockPluginTranslation=!0,(0===this.columnMetaCache.size||this.columnMetaCache.size<this.hot.countCols())&&this.rebuildColumnMetaCache();var n=this.hot.getCellMeta(0,e);this.blockPluginTranslation=t;var r=Object.create(n);return r[this.pluginKey]=this.columnMetaCache.get(this.hot.toPhysicalColumn(e)),r}},{key:"rebuildColumnMetaCache",value:function(){var e=this,t=this.hot.countCols();0===t?this.columnMetaCache.clear():(0,s.rangeEach)(t-1,function(t){return e.setMergedPluginSettings(t)})}},{key:"getNumberOfRowsToSort",value:function(e){var t=this.hot.getSettings();return t.maxRows<=e?t.maxRows:e-t.minSpareRows}},{key:"sortByPresetSortStates",value:function(){var e=this;if(this.columnStatesManager.isListOfSortedColumnsEmpty())this.rowsMapper.clearMap();else{var t=[],n=this.columnStatesManager.getSortedColumns(),r=this.hot.countRows();this.blockPluginTranslation=!0;for(var o=function(t){return(0,a.arrayMap)(n,function(n){return e.hot.getDataAtCell(t,e.hot.toVisualColumn(n))})},i=0;i<this.getNumberOfRowsToSort(r);i+=1)t.push([i].concat(o(i)));(0,y.sort)(t,this.pluginKey,(0,a.arrayMap)(n,function(t){return e.columnStatesManager.getSortOrderOfColumn(t)}),(0,a.arrayMap)(n,function(t){return e.getFirstCellSettings(e.hot.toVisualColumn(t))}));for(var s=t.length;s<r;s+=1)t.push([s].concat(o(s)));this.blockPluginTranslation=!1,this.rowsMapper._arrayMap=(0,a.arrayMap)(t,function(e){return e[0]})}}},{key:"loadOrSortBySettings",value:function(){this.columnMetaCache.clear();var e=this.getAllSavedSortSettings();if((0,i.isObject)(e))this.sortBySettings(e);else{var t=this.hot.getSettings()[this.pluginKey];this.sortBySettings(t)}}},{key:"sortBySettings",value:function(e){if((0,i.isObject)(e)){this.columnStatesManager.updateAllColumnsProperties(e);var t=e.initialConfig;(Array.isArray(t)||(0,i.isObject)(t))&&this.sort(t)}else this.hot.render()}},{key:"enableObserveChangesPlugin",value:function(){var e=this;this.hot._registerTimeout(setTimeout(function(){e.hot.updateSettings({observeChanges:!0})},0))}},{key:"onModifyRow",value:function(e,t){if(!1===this.blockPluginTranslation&&t!==this.pluginName&&this.isSorted()){var n=this.rowsMapper.getValueByIndex(e);e=null===n?e:n}return e}},{key:"onUnmodifyRow",value:function(e,t){return!1===this.blockPluginTranslation&&t!==this.pluginName&&this.isSorted()&&(e=this.rowsMapper.getIndexByValue(e)),e}},{key:"onAfterGetColHeader",value:function(e,t){var n=(0,d.getHeaderSpanElement)(t);if(!1!==(0,d.isFirstLevelColumnHeader)(e,t)&&null!==n){var r=this.hot.toPhysicalColumn(e),o=this.getFirstCellSettings(e)[this.pluginKey],i=o.indicator,a=o.headerAction;this.updateHeaderClasses(n,this.columnStatesManager,r,i,a)}}},{key:"updateHeaderClasses",value:function(e){if((0,r.removeClass)(e,(0,p.getClassedToRemove)(e)),!1!==this.enabled){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];(0,r.addClass)(e,p.getClassesToAdd.apply(void 0,n))}}},{key:"onUpdateSettings",value:function(e){_(T(t.prototype),"onUpdateSettings",this).call(this),this.columnMetaCache.clear(),(0,o.isDefined)(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}},{key:"onAfterLoadData",value:function(e){this.rowsMapper.clearMap(),this.columnMetaCache.clear(),!0===e&&this.hot.view&&this.loadOrSortBySettings()}},{key:"onAfterCreateRow",value:function(e,t){this.rowsMapper.shiftItems(e,t)}},{key:"onAfterRemoveRow",value:function(e,t){this.rowsMapper.unshiftItems(e,t)}},{key:"onAfterCreateCol",value:function(){this.columnMetaCache.clear()}},{key:"onAfterRemoveCol",value:function(){this.columnMetaCache.clear()}},{key:"wasClickableHeaderClicked",value:function(e,t){return this.getFirstCellSettings(t)[this.pluginKey].headerAction&&"SPAN"===e.realTarget.nodeName}},{key:"onBeforeOnCellMouseDown",value:function(e,t,n,r){!1!==(0,d.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(0,f.isPressedCtrlKey)()&&(r.column=!0)}},{key:"onAfterOnCellMouseDown",value:function(e,t){!1!==(0,d.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&((0,f.isPressedCtrlKey)()&&(this.hot.deselectCell(),this.hot.selectColumns(t.col)),this.sort(this.getColumnNextConfig(t.col)))}},{key:"destroy",value:function(){this.rowsMapper.destroy(),this.columnStatesManager.destroy(),_(T(t.prototype),"destroy",this).call(this)}}]),t}();(0,u.registerPlugin)(k,N);var A=N;t.default=A},function(e,t,n){"use strict";t.__esModule=!0,t.getCompareFunctionFactory=function(e){if(c(e))return u(e);return u(r.COLUMN_DATA_TYPE)},t.getRootComparator=t.registerRootComparator=void 0;var r=n(706),o=n(707),i=n(708),a=function(e){return e&&e.__esModule?e:{default:e}}(n(54));var s=(0,a.default)("sorting.compareFunctionFactory"),l=s.register,u=s.getItem,c=s.hasItem,f=(0,a.default)("sorting.mainSortComparator"),h=f.register,d=f.getItem;t.getRootComparator=d,t.registerRootComparator=h,l(o.COLUMN_DATA_TYPE,o.compareFunctionFactory),l(i.COLUMN_DATA_TYPE,i.compareFunctionFactory),l(r.COLUMN_DATA_TYPE,r.compareFunctionFactory)},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1),o=n(2);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this.commands={},this.commonCallback=null}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(e,[{key:"registerCommand",value:function(e,t){this.commands[e]=t}},{key:"setCommonCallback",value:function(e){this.commonCallback=e}},{key:"execute",value:function(e){for(var t=this,n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];var s=e.split(":"),l=s[0],u=2===s.length?s[1]:null,c=this.commands[l];if(!c)throw new Error("Menu command '".concat(l,"' not exists."));if(u&&c.submenu&&(c=function(e,t){var n;return(0,r.arrayEach)(t,function(t){var r=t.key?t.key.split(":"):null;if(Array.isArray(r)&&r[1]===e)return n=t,!1}),n}(u,c.submenu.items)),!0!==c.disabled&&("function"!=typeof c.disabled||!0!==c.disabled.call(this.hot))&&!(0,o.hasOwnProperty)(c,"submenu")){var f=[];"function"==typeof c.callback&&f.push(c.callback),"function"==typeof this.commonCallback&&f.push(this.commonCallback),i.unshift(s.join(":")),(0,r.arrayEach)(f,function(e){return e.apply(t.hot,i)})}}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(2),o=n(1),i=n(56);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this.predefinedItems=(0,i.predefinedItems)(),this.defaultOrderPattern=n}return function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(e,[{key:"setPredefinedItems",value:function(e){var t=this,n={};this.defaultOrderPattern.length=0,(0,r.objectEach)(e,function(e,r){var o="";e.name===i.SEPARATOR?(n[i.SEPARATOR]=e,o=i.SEPARATOR):isNaN(parseInt(r,10))?(e.key=void 0===e.key?r:e.key,n[r]=e,o=e.key):(n[e.key]=e,o=e.key),t.defaultOrderPattern.push(o)}),this.predefinedItems=n}},{key:"getItems",value:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[],s=e;s&&s.items?s=s.items:Array.isArray(s)||(s=t);(0,r.isObject)(s)?(0,r.objectEach)(s,function(e,t){var o=n["string"==typeof e?e:t];o||(o=e),(0,r.isObject)(e)?(0,r.extend)(o,e):"string"==typeof o&&(o={name:o}),void 0===o.key&&(o.key=t),a.push(o)}):(0,o.arrayEach)(s,function(e,t){var o=n[e];!o&&i.ITEMS.indexOf(e)>=0||(o||(o={name:e,key:"".concat(t)}),(0,r.isObject)(e)&&(0,r.extend)(o,e),void 0===o.key&&(o.key=t),a.push(o))});return a}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}]),e}();t.default=s},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(5);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=0,a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this._element=null,this.state=i}return function(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}(e,[{key:"appendTo",value:function(e){e.appendChild(this._element),this.state=2}},{key:"build",value:function(){this._element=document.createElement("div"),this.state=1}},{key:"destroy",value:function(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=i}},{key:"isAppended",value:function(){return 2===this.state}},{key:"isBuilt",value:function(){return this.state>=1}},{key:"setPosition",value:function(e,t){(0,r.isNumeric)(e)&&(this._element.style.top=e+"px"),(0,r.isNumeric)(t)&&(this._element.style.left=t+"px")}},{key:"getPosition",value:function(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}},{key:"setSize",value:function(e,t){(0,r.isNumeric)(e)&&(this._element.style.width=e+"px"),(0,r.isNumeric)(t)&&(this._element.style.height=t+"px")}},{key:"getSize",value:function(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}},{key:"setOffset",value:function(e,t){(0,r.isNumeric)(e)&&(this._element.style.marginTop=e+"px"),(0,r.isNumeric)(t)&&(this._element.style.marginLeft=t+"px")}},{key:"getOffset",value:function(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}]),e}();t.default=a},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}t.__esModule=!0,t.default=void 0;var o=0,i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this._element=null,this.state=o}return function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(e,[{key:"appendTo",value:function(e){e.appendChild(this._element),this.state=2}},{key:"build",value:function(){this._element=document.createElement("div"),this.state=1}},{key:"destroy",value:function(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=o}},{key:"isAppended",value:function(){return 2===this.state}},{key:"isBuilt",value:function(){return this.state>=1}},{key:"setPosition",value:function(e,t){void 0!==e&&(this._element.style.top=e+"px"),void 0!==t&&(this._element.style.left=t+"px")}},{key:"getPosition",value:function(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}},{key:"setSize",value:function(e,t){e&&(this._element.style.width=e+"px"),t&&(this._element.style.height=t+"px")}},{key:"getSize",value:function(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}},{key:"setOffset",value:function(e,t){e&&(this._element.style.marginTop=e+"px"),t&&(this._element.style.marginLeft=t+"px")}},{key:"getOffset",value:function(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}]),e}();t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.applySpanProperties=function(e,t,n,r){t?t.row===n&&t.col===r?(e.setAttribute("rowspan",t.rowspan.toString()),e.setAttribute("colspan",t.colspan.toString())):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="none"):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="")}},function(e,t,n){"use strict";t.__esModule=!0,t.condition=i,t.CONDITION_NAME=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(15);function i(e){return""===e.value||null===e.value||void 0===e.value}t.CONDITION_NAME="empty",(0,o.registerCondition)("empty",i,{name:r.FILTERS_CONDITIONS_EMPTY,inputsCount:0,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=s,t.CONDITION_NAME=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(14),i=n(15);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e,t){var n=a(t,1)[0];return(0,o.stringify)(e.value).toLowerCase()===(0,o.stringify)(n)}t.CONDITION_NAME="eq",(0,i.registerCondition)("eq",s,{name:r.FILTERS_CONDITIONS_EQUAL,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=l,t.CONDITION_NAME=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(15),i=n(458),a=n(459);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(e,t){var n=s(t,2),r=n[0],l=n[1];if("numeric"===e.meta.type){var u=parseFloat(r,10),c=parseFloat(l,10);r=Math.min(u,c),l=Math.max(u,c)}else if("date"===e.meta.type){var f=(0,o.getCondition)(a.CONDITION_NAME,[l]),h=(0,o.getCondition)(i.CONDITION_NAME,[r]);return f(e)&&h(e)}return e.value>=r&&e.value<=l}t.CONDITION_NAME="between",(0,o.registerCondition)("between",l,{name:r.FILTERS_CONDITIONS_BETWEEN,inputsCount:2,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=s,t.CONDITION_NAME=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(36)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),i=n(15);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e,t){var n=a(t,1)[0],o=(0,r.default)(e.value,e.meta.dateFormat),i=(0,r.default)(n,e.meta.dateFormat);return!(!o.isValid()||!i.isValid())&&o.diff(i)>=0}t.CONDITION_NAME="date_after",(0,i.registerCondition)("date_after",s,{name:o.FILTERS_CONDITIONS_AFTER,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=s,t.CONDITION_NAME=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(36)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),i=n(15);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e,t){var n=a(t,1)[0],o=(0,r.default)(e.value,e.meta.dateFormat),i=(0,r.default)(n,e.meta.dateFormat);return!(!o.isValid()||!i.isValid())&&o.diff(i)<=0}t.CONDITION_NAME="date_before",(0,i.registerCondition)("date_before",s,{name:o.FILTERS_CONDITIONS_BEFORE,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=s,t.CONDITION_NAME=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(14),i=n(15);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e,t){var n=a(t,1)[0];return(0,o.stringify)(e.value).toLowerCase().indexOf((0,o.stringify)(n))>=0}t.CONDITION_NAME="contains",(0,i.registerCondition)("contains",s,{name:r.FILTERS_CONDITIONS_CONTAINS,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.operationResult=a,t.SHORT_NAME_FOR_COMPONENT=t.OPERATION_ID=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(86);t.OPERATION_ID="disjunction";var i=r.FILTERS_LABELS_DISJUNCTION;function a(e,t){return e.some(function(e){return e.func(t)})}t.SHORT_NAME_FOR_COMPONENT=i,(0,o.registerOperation)("disjunction",i,a)},function(e,t,n){"use strict";t.__esModule=!0,t.operationResult=a,t.SHORT_NAME_FOR_COMPONENT=t.OPERATION_ID=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(86);t.OPERATION_ID="disjunctionWithExtraCondition";var i=r.FILTERS_LABELS_DISJUNCTION;function a(e,t){if(e.length<3)throw Error("Operation doesn't work on less then three conditions.");return e.slice(0,e.length-1).some(function(e){return e.func(t)})&&e[e.length-1].func(t)}t.SHORT_NAME_FOR_COMPONENT=i,(0,o.registerOperation)("disjunctionWithExtraCondition",i,a)},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1),o=n(2),i=n(37),a=function(e){return e&&e.__esModule?e:{default:e}}(n(29)),s=n(15),l=n(143),u=n(86);function c(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["The column of index "," has been already applied with a `","` \n filter operation. Use `removeConditions` to clear the current conditions and then add new ones. \n Mind that you cannot mix different types of operations (for instance, if you use `conjunction`, \n use it consequently for a particular column)."],["The column of index "," has been already applied with a \\`","\\` \n filter operation. Use \\`removeConditions\\` to clear the current conditions and then add new ones. \n Mind that you cannot mix different types of operations (for instance, if you use \\`conjunction\\`, \n use it consequently for a particular column)."]);return c=function(){return e},e}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.conditions=this.initConditionsCollection(),this.columnTypes={},this.orderStack=[]}return function(e,t,n){t&&f(e.prototype,t),n&&f(e,n)}(e,[{key:"isEmpty",value:function(){return!this.orderStack.length}},{key:"isMatch",value:function(e,t){var n=this,r=!0;if(void 0===t)(0,o.objectEach)(this.columnTypes,function(t,o){return r=n.isMatchInConditions(n.conditions[t][o],e,t)});else{var i=this.columnTypes[t];r=this.isMatchInConditions(this.getConditions(t),e,i)}return r}},{key:"isMatchInConditions",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.OPERATION_ID;return!e.length||(0,u.getOperationFunc)(n)(e,t)}},{key:"addCondition",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.OPERATION_ID,o=(0,r.arrayMap)(t.args,function(e){return"string"==typeof e?e.toLowerCase():e}),a=t.name||t.command.key;this.runLocalHooks("beforeAdd",e),-1===this.orderStack.indexOf(e)&&this.orderStack.push(e);var u=this.columnTypes[e];if(u){if(u!==n)throw Error((0,i.toSingleLine)(c(),e,u))}else{if(!this.conditions[n])throw new Error("Unexpected operation named `".concat(n,"`. Possible ones are `disjunction` and `conjunction`."));this.columnTypes[e]=n}this.getConditions(e).push({name:a,args:o,func:(0,s.getCondition)(a,o)}),this.runLocalHooks("afterAdd",e)}},{key:"getConditions",value:function(e){var t=this.columnTypes[e];return t?(this.conditions[t][e]||(this.conditions[t][e]=[]),this.conditions[t][e]):[]}},{key:"exportAllConditions",value:function(){var e=this,t=[];return(0,r.arrayEach)(this.orderStack,function(n){var o=(0,r.arrayMap)(e.getConditions(n),function(e){return{name:e.name,args:e.args}}),i=e.columnTypes[n];t.push({column:n,operation:i,conditions:o})}),t}},{key:"importAllConditions",value:function(e){var t=this;this.clean(),(0,r.arrayEach)(e,function(e){t.orderStack.push(e.column),(0,r.arrayEach)(e.conditions,function(n){return t.addCondition(e.column,n)})})}},{key:"removeConditions",value:function(e){this.runLocalHooks("beforeRemove",e),this.orderStack.indexOf(e)>=0&&this.orderStack.splice(this.orderStack.indexOf(e),1),this.clearConditions(e),this.runLocalHooks("afterRemove",e)}},{key:"clearConditions",value:function(e){this.runLocalHooks("beforeClear",e),this.getConditions(e).length=0,delete this.columnTypes[e],this.runLocalHooks("afterClear",e)}},{key:"hasConditions",value:function(e,t){if(!this.columnTypes[e])return!1;var n=this.getConditions(e);return t?(0,r.arrayFilter)(n,function(e){return e.name===t}).length>0:n.length>0}},{key:"clean",value:function(){this.runLocalHooks("beforeClean"),this.columnTypes=Object.create(null),this.orderStack.length=0,this.conditions=this.initConditionsCollection(),this.runLocalHooks("afterClean")}},{key:"destroy",value:function(){this.clearLocalHooks(),this.conditions=null,this.orderStack=null,this.columnTypes=null}},{key:"initConditionsCollection",value:function(){var e=Object.create(null);return(0,o.objectEach)(u.operations,function(t,n){e[n]=Object.create(null)}),e}}]),e}();(0,o.mixin)(h,a.default);var d=h;t.default=d},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return[]};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.conditionCollection=t,this.columnDataFactory=n}return function(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}(e,[{key:"filter",value:function(){var e=this,t=[];return this.conditionCollection.isEmpty()||(0,r.arrayEach)(this.conditionCollection.orderStack,function(n,r){var o=e.columnDataFactory(n);r&&(o=e._getIntersectData(o,t)),t=e.filterByColumn(n,o)}),t}},{key:"filterByColumn",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=[];return(0,r.arrayEach)(n,function(n){void 0!==n&&t.conditionCollection.isMatch(n,e)&&o.push(n)}),o}},{key:"_getIntersectData",value:function(e,t){var n=[];return(0,r.arrayEach)(t,function(t){var r=t.meta.visualRow;void 0!==e[r]&&(n[r]=e[r])}),n}}]),e}();t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(2),o=n(88);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var o=(0,r.isObject)(t),i=(0,r.isObject)(n);this._row=o?t.index:t,this.rowAbsolute=!o||t.isAbsolute,this._column=i?n.index:n,this.columnAbsolute=!i||n.isAbsolute,this.rowOffset=0,this.columnOffset=0,Object.defineProperty(this,"row",{get:function(){return this.rowOffset+this._row},set:function(e){this._row=e},enumerable:!0,configurable:!0}),Object.defineProperty(this,"column",{get:function(){return this.columnOffset+this._column},set:function(e){this._column=e},enumerable:!0,configurable:!0})}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(e,[{key:"translateTo",value:function(e,t){this.row=this.row+e,this.column=this.column+t}},{key:"isEqual",value:function(e){return e.row===this.row&&e.column===this.column}},{key:"toString",value:function(){return(0,o.toLabel)({index:this.row,isAbsolute:this.rowAbsolute},{index:this.column,isAbsolute:this.columnAbsolute})}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1),o=n(5),i=n(3),a=function(e){return e&&e.__esModule?e:{default:e}}(n(146));function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=l(this,u(t).call(this,e,n))).dataManager=r.plugin.dataManager,r.collapsingUI=r.plugin.collapsingUI,r.rowHeaderWidthCache=null,r.trimRowsPlugin=e.trimRowsPlugin,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(t,a.default),f(t,null,[{key:"CSS_CLASSES",get:function(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",indicator:"ht_nestingLevel",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}}]),f(t,[{key:"appendLevelIndicators",value:function(e,n){var a=this.trimRowsPlugin.rowsMapper.getValueByIndex(e),s=this.dataManager.getRowLevel(a),l=this.dataManager.getDataObject(a),u=n.getElementsByTagName("DIV")[0],c=u.querySelector("span.rowHeader"),f=u.querySelectorAll('[class^="ht_nesting"]');if((0,r.arrayEach)(f,function(e){e&&u.removeChild(e)}),(0,i.addClass)(n,t.CSS_CLASSES.indicatorContainer),s){var h=c.cloneNode(!0);u.innerHTML="",(0,o.rangeEach)(0,s-1,function(){var e=document.createElement("SPAN");(0,i.addClass)(e,t.CSS_CLASSES.emptyIndicator),u.appendChild(e)}),u.appendChild(h)}if(this.dataManager.hasChildren(l)){var d=document.createElement("DIV");(0,i.addClass)(n,t.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(a)?(0,i.addClass)(d,"".concat(t.CSS_CLASSES.button," ").concat(t.CSS_CLASSES.expandButton)):(0,i.addClass)(d,"".concat(t.CSS_CLASSES.button," ").concat(t.CSS_CLASSES.collapseButton)),u.appendChild(d)}}},{key:"updateRowHeaderWidth",value:function(e){var t=e;t||(t=this.dataManager.cache.levelCount),this.rowHeaderWidthCache=Math.max(50,11+10*t+25),this.hot.render()}}]),t}();t.default=d},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,n(106);var r=function(e){return e&&e.__esModule?e:{default:e}}(n(632));!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(776));r.default.baseVersion="6.2.2";var o=r.default;t.default=o},function(e,t,n){n(469),n(471),n(472),n(473),n(474),n(475),n(476),n(477),n(478),n(479),n(480),n(481),n(482),n(483),n(484),n(485),n(486),n(487),n(488),n(489),n(490),n(491),n(492),n(493),n(494),n(495),n(496),n(497),n(498),n(499),n(500),n(501),n(502),n(503),n(504),n(505),n(506),n(507),n(508),n(509),n(510),n(511),n(512),n(514),n(515),n(516),n(517),n(518),n(519),n(520),n(521),n(522),n(523),n(524),n(525),n(526),n(527),n(528),n(529),n(530),n(531),n(532),n(533),n(534),n(535),n(536),n(537),n(538),n(539),n(540),n(541),n(542),n(543),n(544),n(545),n(546),n(547),n(549),n(550),n(552),n(553),n(554),n(555),n(556),n(557),n(558),n(561),n(562),n(563),n(564),n(565),n(566),n(567),n(568),n(569),n(570),n(571),n(572),n(573),n(129),n(574),n(166),n(575),n(167),n(576),n(577),n(578),n(579),n(168),n(582),n(583),n(584),n(585),n(586),n(587),n(588),n(589),n(590),n(591),n(592),n(593),n(594),n(595),n(596),n(597),n(598),n(599),n(600),n(601),n(602),n(603),n(604),n(605),n(606),n(607),n(608),n(609),n(610),e.exports=n(22)},function(e,t,n){"use strict";var r=n(11),o=n(30),i=n(21),a=n(0),s=n(25),l=n(53).KEY,u=n(8),c=n(108),f=n(68),h=n(60),d=n(17),p=n(109),g=n(148),v=n(470),y=n(112),m=n(9),w=n(12),b=n(32),C=n(52),E=n(59),O=n(64),S=n(151),_=n(39),T=n(19),R=n(62),M=_.f,k=T.f,N=S.f,A=r.Symbol,I=r.JSON,D=I&&I.stringify,P=d("_hidden"),x=d("toPrimitive"),L={}.propertyIsEnumerable,H=c("symbol-registry"),j=c("symbols"),F=c("op-symbols"),V=Object.prototype,B="function"==typeof A,U=r.QObject,W=!U||!U.prototype||!U.prototype.findChild,Y=i&&u(function(){return 7!=O(k({},"a",{get:function(){return k(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=M(V,t);r&&delete V[t],k(e,t,n),r&&e!==V&&k(V,t,r)}:k,$=function(e){var t=j[e]=O(A.prototype);return t._k=e,t},G=B&&"symbol"==typeof A.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof A},z=function(e,t,n){return e===V&&z(F,t,n),m(e),t=C(t,!0),m(n),o(j,t)?(n.enumerable?(o(e,P)&&e[P][t]&&(e[P][t]=!1),n=O(n,{enumerable:E(0,!1)})):(o(e,P)||k(e,P,E(1,{})),e[P][t]=!0),Y(e,t,n)):k(e,t,n)},X=function(e,t){m(e);for(var n,r=v(t=b(t)),o=0,i=r.length;i>o;)z(e,n=r[o++],t[n]);return e},K=function(e){var t=L.call(this,e=C(e,!0));return!(this===V&&o(j,e)&&!o(F,e))&&(!(t||!o(this,e)||!o(j,e)||o(this,P)&&this[P][e])||t)},q=function(e,t){if(e=b(e),t=C(t,!0),e!==V||!o(j,t)||o(F,t)){var n=M(e,t);return!n||!o(j,t)||o(e,P)&&e[P][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=N(b(e)),r=[],i=0;n.length>i;)o(j,t=n[i++])||t==P||t==l||r.push(t);return r},Q=function(e){for(var t,n=e===V,r=N(n?F:b(e)),i=[],a=0;r.length>a;)!o(j,t=r[a++])||n&&!o(V,t)||i.push(j[t]);return i};B||(s((A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(n){this===V&&t.call(F,n),o(this,P)&&o(this[P],e)&&(this[P][e]=!1),Y(this,e,E(1,n))};return i&&W&&Y(V,e,{configurable:!0,set:t}),$(e)}).prototype,"toString",function(){return this._k}),_.f=q,T.f=z,n(65).f=S.f=Z,n(79).f=K,n(91).f=Q,i&&!n(61)&&s(V,"propertyIsEnumerable",K,!0),p.f=function(e){return $(d(e))}),a(a.G+a.W+a.F*!B,{Symbol:A});for(var J="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;J.length>ee;)d(J[ee++]);for(var te=R(d.store),ne=0;te.length>ne;)g(te[ne++]);a(a.S+a.F*!B,"Symbol",{for:function(e){return o(H,e+="")?H[e]:H[e]=A(e)},keyFor:function(e){if(!G(e))throw TypeError(e+" is not a symbol!");for(var t in H)if(H[t]===e)return t},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!B,"Object",{create:function(e,t){return void 0===t?O(e):X(O(e),t)},defineProperty:z,defineProperties:X,getOwnPropertyDescriptor:q,getOwnPropertyNames:Z,getOwnPropertySymbols:Q}),I&&a(a.S+a.F*(!B||u(function(){var e=A();return"[null]"!=D([e])||"{}"!=D({a:e})||"{}"!=D(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(w(t)||void 0!==e)&&!G(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!G(t))return t}),r[1]=t,D.apply(I,r)}}),A.prototype[x]||n(31)(A.prototype,x,A.prototype.valueOf),f(A,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(e,t,n){var r=n(62),o=n(91),i=n(79);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var a,s=n(e),l=i.f,u=0;s.length>u;)l.call(e,a=s[u++])&&t.push(a);return t}},function(e,t,n){var r=n(0);r(r.S,"Object",{create:n(64)})},function(e,t,n){var r=n(0);r(r.S+r.F*!n(21),"Object",{defineProperty:n(19).f})},function(e,t,n){var r=n(0);r(r.S+r.F*!n(21),"Object",{defineProperties:n(150)})},function(e,t,n){var r=n(32),o=n(39).f;n(40)("getOwnPropertyDescriptor",function(){return function(e,t){return o(r(e),t)}})},function(e,t,n){var r=n(26),o=n(66);n(40)("getPrototypeOf",function(){return function(e){return o(r(e))}})},function(e,t,n){var r=n(26),o=n(62);n(40)("keys",function(){return function(e){return o(r(e))}})},function(e,t,n){n(40)("getOwnPropertyNames",function(){return n(151).f})},function(e,t,n){var r=n(12),o=n(53).onFreeze;n(40)("freeze",function(e){return function(t){return e&&r(t)?e(o(t)):t}})},function(e,t,n){var r=n(12),o=n(53).onFreeze;n(40)("seal",function(e){return function(t){return e&&r(t)?e(o(t)):t}})},function(e,t,n){var r=n(12),o=n(53).onFreeze;n(40)("preventExtensions",function(e){return function(t){return e&&r(t)?e(o(t)):t}})},function(e,t,n){var r=n(12);n(40)("isFrozen",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(12);n(40)("isSealed",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(12);n(40)("isExtensible",function(e){return function(t){return!!r(t)&&(!e||e(t))}})},function(e,t,n){var r=n(0);r(r.S+r.F,"Object",{assign:n(152)})},function(e,t,n){var r=n(0);r(r.S,"Object",{is:n(153)})},function(e,t,n){var r=n(0);r(r.S,"Object",{setPrototypeOf:n(114).set})},function(e,t,n){"use strict";var r=n(80),o={};o[n(17)("toStringTag")]="z",o+""!="[object z]"&&n(25)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(e,t,n){var r=n(0);r(r.P,"Function",{bind:n(154)})},function(e,t,n){var r=n(19).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(21)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(12),o=n(66),i=n(17)("hasInstance"),a=Function.prototype;i in a||n(19).f(a,i,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=o(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(0),o=n(156);r(r.G+r.F*(parseInt!=o),{parseInt:o})},function(e,t,n){var r=n(0),o=n(157);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},function(e,t,n){"use strict";var r=n(11),o=n(30),i=n(45),a=n(116),s=n(52),l=n(8),u=n(65).f,c=n(39).f,f=n(19).f,h=n(92).trim,d=r.Number,p=d,g=d.prototype,v="Number"==i(n(64)(g)),y="trim"in String.prototype,m=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,r,o,i=(t=y?t.trim():h(t,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+t}for(var a,l=t.slice(2),u=0,c=l.length;u<c;u++)if((a=l.charCodeAt(u))<48||a>o)return NaN;return parseInt(l,r)}}return+t};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof d&&(v?l(function(){g.valueOf.call(n)}):"Number"!=i(n))?a(new p(m(t)),n,d):m(t)};for(var w,b=n(21)?u(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),C=0;b.length>C;C++)o(p,w=b[C])&&!o(d,w)&&f(d,w,c(p,w));d.prototype=g,g.constructor=d,n(25)(r,"Number",d)}},function(e,t,n){"use strict";var r=n(0),o=n(38),i=n(158),a=n(117),s=1..toFixed,l=Math.floor,u=[0,0,0,0,0,0],c="Number.toFixed: incorrect invocation!",f=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*u[n],u[n]=r%1e7,r=l(r/1e7)},h=function(e){for(var t=6,n=0;--t>=0;)n+=u[t],u[t]=l(n/e),n=n%e*1e7},d=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==u[e]){var n=String(u[e]);t=""===t?n:t+a.call("0",7-n.length)+n}return t},p=function(e,t,n){return 0===t?n:t%2==1?p(e,t-1,n*e):p(e*e,t/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(8)(function(){s.call({})})),"Number",{toFixed:function(e){var t,n,r,s,l=i(this,c),u=o(e),g="",v="0";if(u<0||u>20)throw RangeError(c);if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(g="-",l=-l),l>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(l*p(2,69,1))-69)<0?l*p(2,-t,1):l/p(2,t,1),n*=4503599627370496,(t=52-t)>0){for(f(0,n),r=u;r>=7;)f(1e7,0),r-=7;for(f(p(10,r,1),0),r=t-1;r>=23;)h(1<<23),r-=23;h(1<<r),f(1,1),h(2),v=d()}else f(0,n),f(1<<-t,0),v=d()+a.call("0",u);return v=u>0?g+((s=v.length)<=u?"0."+a.call("0",u-s)+v:v.slice(0,s-u)+"."+v.slice(s-u)):g+v}})},function(e,t,n){"use strict";var r=n(0),o=n(8),i=n(158),a=1..toPrecision;r(r.P+r.F*(o(function(){return"1"!==a.call(1,void 0)})||!o(function(){a.call({})})),"Number",{toPrecision:function(e){var t=i(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},function(e,t,n){var r=n(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(0),o=n(11).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&o(e)}})},function(e,t,n){var r=n(0);r(r.S,"Number",{isInteger:n(159)})},function(e,t,n){var r=n(0);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(0),o=n(159),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return o(e)&&i(e)<=9007199254740991}})},function(e,t,n){var r=n(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(0),o=n(157);r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},function(e,t,n){var r=n(0),o=n(156);r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},function(e,t,n){var r=n(0),o=n(160),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:o(e-1+i(e-1)*i(e+1))}})},function(e,t,n){var r=n(0),o=Math.asinh;r(r.S+r.F*!(o&&1/o(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var r=n(0),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(0),o=n(118);r(r.S,"Math",{cbrt:function(e){return o(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(0);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(0),o=Math.exp;r(r.S,"Math",{cosh:function(e){return(o(e=+e)+o(-e))/2}})},function(e,t,n){var r=n(0),o=n(119);r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},function(e,t,n){var r=n(0);r(r.S,"Math",{fround:n(513)})},function(e,t,n){var r=n(118),o=Math.pow,i=o(2,-52),a=o(2,-23),s=o(2,127)*(2-a),l=o(2,-126);e.exports=Math.fround||function(e){var t,n,o=Math.abs(e),u=r(e);return o<l?u*function(e){return e+1/i-1/i}(o/l/a)*l*a:(n=(t=(1+a/i)*o)-(t-o))>s||n!=n?u*(1/0):u*n}},function(e,t,n){var r=n(0),o=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,i=0,a=0,s=arguments.length,l=0;a<s;)l<(n=o(arguments[a++]))?(i=i*(r=l/n)*r+1,l=n):i+=n>0?(r=n/l)*r:n;return l===1/0?1/0:l*Math.sqrt(i)}})},function(e,t,n){var r=n(0),o=Math.imul;r(r.S+r.F*n(8)(function(){return-5!=o(4294967295,5)||2!=o.length}),"Math",{imul:function(e,t){var n=+e,r=+t,o=65535&n,i=65535&r;return 0|o*i+((65535&n>>>16)*i+o*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){var r=n(0);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(0);r(r.S,"Math",{log1p:n(160)})},function(e,t,n){var r=n(0);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(0);r(r.S,"Math",{sign:n(118)})},function(e,t,n){var r=n(0),o=n(119),i=Math.exp;r(r.S+r.F*n(8)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(o(e)-o(-e))/2:(i(e-1)-i(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(0),o=n(119),i=Math.exp;r(r.S,"Math",{tanh:function(e){var t=o(e=+e),n=o(-e);return t==1/0?1:n==1/0?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){var r=n(0);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(0),o=n(63),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],o(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(0),o=n(32),i=n(18);r(r.S,"String",{raw:function(e){for(var t=o(e.raw),n=i(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(e,t,n){"use strict";n(92)("trim",function(e){return function(){return e(this,3)}})},function(e,t,n){"use strict";var r=n(120)(!0);n(121)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";var r=n(0),o=n(120)(!1);r(r.P,"String",{codePointAt:function(e){return o(this,e)}})},function(e,t,n){"use strict";var r=n(0),o=n(18),i=n(122),a="".endsWith;r(r.P+r.F*n(124)("endsWith"),"String",{endsWith:function(e){var t=i(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=o(t.length),s=void 0===n?r:Math.min(o(n),r),l=String(e);return a?a.call(t,l,s):t.slice(s-l.length,s)===l}})},function(e,t,n){"use strict";var r=n(0),o=n(122);r(r.P+r.F*n(124)("includes"),"String",{includes:function(e){return!!~o(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(0);r(r.P,"String",{repeat:n(117)})},function(e,t,n){"use strict";var r=n(0),o=n(18),i=n(122),a="".startsWith;r(r.P+r.F*n(124)("startsWith"),"String",{startsWith:function(e){var t=i(this,e,"startsWith"),n=o(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return a?a.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(27)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},function(e,t,n){"use strict";n(27)("big",function(e){return function(){return e(this,"big","","")}})},function(e,t,n){"use strict";n(27)("blink",function(e){return function(){return e(this,"blink","","")}})},function(e,t,n){"use strict";n(27)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t,n){"use strict";n(27)("fixed",function(e){return function(){return e(this,"tt","","")}})},function(e,t,n){"use strict";n(27)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},function(e,t,n){"use strict";n(27)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},function(e,t,n){"use strict";n(27)("italics",function(e){return function(){return e(this,"i","","")}})},function(e,t,n){"use strict";n(27)("link",function(e){return function(t){return e(this,"a","href",t)}})},function(e,t,n){"use strict";n(27)("small",function(e){return function(){return e(this,"small","","")}})},function(e,t,n){"use strict";n(27)("strike",function(e){return function(){return e(this,"strike","","")}})},function(e,t,n){"use strict";n(27)("sub",function(e){return function(){return e(this,"sub","","")}})},function(e,t,n){"use strict";n(27)("sup",function(e){return function(){return e(this,"sup","","")}})},function(e,t,n){var r=n(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(0),o=n(26),i=n(52);r(r.P+r.F*n(8)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=o(this),n=i(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(0),o=n(548);r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},function(e,t,n){"use strict";var r=n(8),o=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(e){return e>9?e:"0"+e};e.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-5e13-1))})||!r(function(){i.call(new Date(NaN))})?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},function(e,t,n){var r=Date.prototype,o=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(25)(r,"toString",function(){var e=i.call(this);return e==e?o.call(this):"Invalid Date"})},function(e,t,n){var r=n(17)("toPrimitive"),o=Date.prototype;r in o||n(31)(o,r,n(551))},function(e,t,n){"use strict";var r=n(9),o=n(52);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return o(r(this),"number"!=e)}},function(e,t,n){var r=n(0);r(r.S,"Array",{isArray:n(112)})},function(e,t,n){"use strict";var r=n(43),o=n(0),i=n(26),a=n(162),s=n(125),l=n(18),u=n(126),c=n(127);o(o.S+o.F*!n(93)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,o,f,h=i(e),d="function"==typeof this?this:Array,p=arguments.length,g=p>1?arguments[1]:void 0,v=void 0!==g,y=0,m=c(h);if(v&&(g=r(g,p>2?arguments[2]:void 0,2)),void 0==m||d==Array&&s(m))for(n=new d(t=l(h.length));t>y;y++)u(n,y,v?g(h[y],y):h[y]);else for(f=m.call(h),n=new d;!(o=f.next()).done;y++)u(n,y,v?a(f,g,[o.value,y],!0):o.value);return n.length=y,n}})},function(e,t,n){"use strict";var r=n(0),o=n(126);r(r.S+r.F*n(8)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)o(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(0),o=n(32),i=[].join;r(r.P+r.F*(n(78)!=Object||!n(35)(i)),"Array",{join:function(e){return i.call(o(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(0),o=n(113),i=n(45),a=n(63),s=n(18),l=[].slice;r(r.P+r.F*n(8)(function(){o&&l.call(o)}),"Array",{slice:function(e,t){var n=s(this.length),r=i(this);if(t=void 0===t?n:t,"Array"==r)return l.call(this,e,t);for(var o=a(e,n),u=a(t,n),c=s(u-o),f=new Array(c),h=0;h<c;h++)f[h]="String"==r?this.charAt(o+h):this[o+h];return f}})},function(e,t,n){"use strict";var r=n(0),o=n(44),i=n(26),a=n(8),s=[].sort,l=[1,2,3];r(r.P+r.F*(a(function(){l.sort(void 0)})||!a(function(){l.sort(null)})||!n(35)(s)),"Array",{sort:function(e){return void 0===e?s.call(i(this)):s.call(i(this),o(e))}})},function(e,t,n){"use strict";var r=n(0),o=n(41)(0),i=n(35)([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(e){return o(this,e,arguments[1])}})},function(e,t,n){var r=n(560);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(12),o=n(112),i=n(17)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){"use strict";var r=n(0),o=n(41)(1);r(r.P+r.F*!n(35)([].map,!0),"Array",{map:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),o=n(41)(2);r(r.P+r.F*!n(35)([].filter,!0),"Array",{filter:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),o=n(41)(3);r(r.P+r.F*!n(35)([].some,!0),"Array",{some:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),o=n(41)(4);r(r.P+r.F*!n(35)([].every,!0),"Array",{every:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),o=n(163);r(r.P+r.F*!n(35)([].reduce,!0),"Array",{reduce:function(e){return o(this,e,arguments.length,arguments[1],!1)}})},function(e,t,n){"use strict";var r=n(0),o=n(163);r(r.P+r.F*!n(35)([].reduceRight,!0),"Array",{reduceRight:function(e){return o(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(0),o=n(90)(!1),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(35)(i)),"Array",{indexOf:function(e){return a?i.apply(this,arguments)||0:o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),o=n(32),i=n(38),a=n(18),s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(l||!n(35)(s)),"Array",{lastIndexOf:function(e){if(l)return s.apply(this,arguments)||0;var t=o(this),n=a(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(0);r(r.P,"Array",{copyWithin:n(164)}),n(70)("copyWithin")},function(e,t,n){var r=n(0);r(r.P,"Array",{fill:n(128)}),n(70)("fill")},function(e,t,n){"use strict";var r=n(0),o=n(41)(5),i=!0;"find"in[]&&Array(1).find(function(){i=!1}),r(r.P+r.F*i,"Array",{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(70)("find")},function(e,t,n){"use strict";var r=n(0),o=n(41)(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(70)(i)},function(e,t,n){n(71)("Array")},function(e,t,n){var r=n(11),o=n(116),i=n(19).f,a=n(65).f,s=n(123),l=n(94),u=r.RegExp,c=u,f=u.prototype,h=/a/g,d=/a/g,p=new u(h)!==h;if(n(21)&&(!p||n(8)(function(){return d[n(17)("match")]=!1,u(h)!=h||u(d)==d||"/a/i"!=u(h,"i")}))){u=function(e,t){var n=this instanceof u,r=s(e),i=void 0===t;return!n&&r&&e.constructor===u&&i?e:o(p?new c(r&&!i?e.source:e,t):c((r=e instanceof u)?e.source:e,r&&i?l.call(e):t),n?this:f,u)};for(var g=function(e){e in u||i(u,e,{configurable:!0,get:function(){return c[e]},set:function(t){c[e]=t}})},v=a(c),y=0;v.length>y;)g(v[y++]);f.constructor=u,u.prototype=f,n(25)(r,"RegExp",u)}n(71)("RegExp")},function(e,t,n){"use strict";n(167);var r=n(9),o=n(94),i=n(21),a=/./.toString,s=function(e){n(25)(RegExp.prototype,"toString",e,!0)};n(8)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?s(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!i&&e instanceof RegExp?o.call(e):void 0)}):"toString"!=a.name&&s(function(){return a.call(this)})},function(e,t,n){"use strict";var r=n(9),o=n(18),i=n(131),a=n(95);n(96)("match",1,function(e,t,n,s){return[function(n){var r=e(this),o=void 0==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var l=r(e),u=String(this);if(!l.global)return a(l,u);var c=l.unicode;l.lastIndex=0;for(var f,h=[],d=0;null!==(f=a(l,u));){var p=String(f[0]);h[d]=p,""===p&&(l.lastIndex=i(u,o(l.lastIndex),c)),d++}return 0===d?null:h}]})},function(e,t,n){"use strict";var r=n(9),o=n(26),i=n(18),a=n(38),s=n(131),l=n(95),u=Math.max,c=Math.min,f=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g,p=function(e){return void 0===e?e:String(e)};n(96)("replace",2,function(e,t,n,g){return[function(r,o){var i=e(this),a=void 0==r?void 0:r[t];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(e,t){var o=g(n,e,this,t);if(o.done)return o.value;var f=r(e),h=String(this),d="function"==typeof t;d||(t=String(t));var y=f.global;if(y){var m=f.unicode;f.lastIndex=0}for(var w=[];;){var b=l(f,h);if(null===b)break;if(w.push(b),!y)break;""===String(b[0])&&(f.lastIndex=s(h,i(f.lastIndex),m))}for(var C="",E=0,O=0;O<w.length;O++){b=w[O];for(var S=String(b[0]),_=u(c(a(b.index),h.length),0),T=[],R=1;R<b.length;R++)T.push(p(b[R]));var M=b.groups;if(d){var k=[S].concat(T,_,h);void 0!==M&&k.push(M);var N=String(t.apply(void 0,k))}else N=v(S,h,_,T,M,t);_>=E&&(C+=h.slice(E,_)+N,E=_+S.length)}return C+h.slice(E)}];function v(e,t,r,i,a,s){var l=r+e.length,u=i.length,c=d;return void 0!==a&&(a=o(a),c=h),n.call(s,c,function(n,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(l);case"<":s=a[o.slice(1,-1)];break;default:var c=+o;if(0===c)return o;if(c>u){var h=f(c/10);return 0===h?o:h<=u?void 0===i[h-1]?o.charAt(1):i[h-1]+o.charAt(1):o}s=i[c-1]}return void 0===s?"":s})}})},function(e,t,n){"use strict";var r=n(9),o=n(153),i=n(95);n(96)("search",1,function(e,t,n,a){return[function(n){var r=e(this),o=void 0==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=a(n,e,this);if(t.done)return t.value;var s=r(e),l=String(this),u=s.lastIndex;o(u,0)||(s.lastIndex=0);var c=i(s,l);return o(s.lastIndex,u)||(s.lastIndex=u),null===c?-1:c.index}]})},function(e,t,n){"use strict";var r=n(123),o=n(9),i=n(81),a=n(131),s=n(18),l=n(95),u=n(130),c=Math.min,f=[].push,h=!!function(){try{return new RegExp("x","y")}catch(e){}}();n(96)("split",2,function(e,t,n,d){var p;return p="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var o=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(o,e,t);for(var i,a,s,l=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,d=void 0===t?4294967295:t>>>0,p=new RegExp(e.source,c+"g");(i=u.call(p,o))&&!((a=p.lastIndex)>h&&(l.push(o.slice(h,i.index)),i.length>1&&i.index<o.length&&f.apply(l,i.slice(1)),s=i[0].length,h=a,l.length>=d));)p.lastIndex===i.index&&p.lastIndex++;return h===o.length?!s&&p.test("")||l.push(""):l.push(o.slice(h)),l.length>d?l.slice(0,d):l}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var o=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,o,r):p.call(String(o),n,r)},function(e,t){var r=d(p,e,this,t,p!==n);if(r.done)return r.value;var u=o(e),f=String(this),g=i(u,RegExp),v=u.unicode,y=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(h?"y":"g"),m=new g(h?u:"^(?:"+u.source+")",y),w=void 0===t?4294967295:t>>>0;if(0===w)return[];if(0===f.length)return null===l(m,f)?[f]:[];for(var b=0,C=0,E=[];C<f.length;){m.lastIndex=h?C:0;var O,S=l(m,h?f:f.slice(C));if(null===S||(O=c(s(m.lastIndex+(h?0:C)),f.length))===b)C=a(f,C,v);else{if(E.push(f.slice(b,C)),E.length===w)return E;for(var _=1;_<=S.length-1;_++)if(E.push(S[_]),E.length===w)return E;C=b=O}}return E.push(f.slice(b)),E}]})},function(e,t,n){var r=n(11),o=n(132).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,l="process"==n(45)(a);e.exports=function(){var e,t,n,u=function(){var r,o;for(l&&(r=a.domain)&&r.exit();e;){o=e.fn,e=e.next;try{o()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(l)n=function(){a.nextTick(u)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var c=s.resolve(void 0);n=function(){c.then(u)}}else n=function(){o.call(r,u)};else{var f=!0,h=document.createTextNode("");new i(u).observe(h,{characterData:!0}),n=function(){h.data=f=!f}}return function(r){var o={fn:r,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){"use strict";var r=n(171),o=n(74);e.exports=n(99)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(o(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(o(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(171),o=n(74);e.exports=n(99)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(o(this,"Set"),e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r,o=n(41)(0),i=n(25),a=n(53),s=n(152),l=n(172),u=n(12),c=n(8),f=n(74),h=a.getWeak,d=Object.isExtensible,p=l.ufstore,g={},v=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(e){if(u(e)){var t=h(e);return!0===t?p(f(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return l.def(f(this,"WeakMap"),e,t)}},m=e.exports=n(99)("WeakMap",v,y,l,!0,!0);c(function(){return 7!=(new m).set((Object.freeze||Object)(g),7).get(g)})&&(s((r=l.getConstructor(v,"WeakMap")).prototype,y),a.NEED=!0,o(["delete","has","get","set"],function(e){var t=m.prototype,n=t[e];i(t,e,function(t,o){if(u(t)&&!d(t)){this._f||(this._f=new r);var i=this._f[e](t,o);return"set"==e?this:i}return n.call(this,t,o)})}))},function(e,t,n){"use strict";var r=n(172),o=n(74);n(99)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(o(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(0),o=n(100),i=n(133),a=n(9),s=n(63),l=n(18),u=n(12),c=n(11).ArrayBuffer,f=n(81),h=i.ArrayBuffer,d=i.DataView,p=o.ABV&&c.isView,g=h.prototype.slice,v=o.VIEW;r(r.G+r.W+r.F*(c!==h),{ArrayBuffer:h}),r(r.S+r.F*!o.CONSTR,"ArrayBuffer",{isView:function(e){return p&&p(e)||u(e)&&v in e}}),r(r.P+r.U+r.F*n(8)(function(){return!new h(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(e,t){if(void 0!==g&&void 0===t)return g.call(a(this),e);for(var n=a(this).byteLength,r=s(e,n),o=s(void 0===t?n:t,n),i=new(f(this,h))(l(o-r)),u=new d(this),c=new d(i),p=0;r<o;)c.setUint8(p++,u.getUint8(r++));return i}}),n(71)("ArrayBuffer")},function(e,t,n){var r=n(0);r(r.G+r.W+r.F*!n(100).ABV,{DataView:n(133).DataView})},function(e,t,n){n(47)("Int8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(47)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(47)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}},!0)},function(e,t,n){n(47)("Int16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(47)("Uint16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(47)("Int32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(47)("Uint32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(47)("Float32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(47)("Float64",8,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){var r=n(0),o=n(44),i=n(9),a=(n(11).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n(8)(function(){a(function(){})}),"Reflect",{apply:function(e,t,n){var r=o(e),l=i(n);return a?a(r,t,l):s.call(r,t,l)}})},function(e,t,n){var r=n(0),o=n(64),i=n(44),a=n(9),s=n(12),l=n(8),u=n(154),c=(n(11).Reflect||{}).construct,f=l(function(){function e(){}return!(c(function(){},[],e)instanceof e)}),h=!l(function(){c(function(){})});r(r.S+r.F*(f||h),"Reflect",{construct:function(e,t){i(e),a(t);var n=arguments.length<3?e:i(arguments[2]);if(h&&!f)return c(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(u.apply(e,r))}var l=n.prototype,d=o(s(l)?l:Object.prototype),p=Function.apply.call(e,d,t);return s(p)?p:d}})},function(e,t,n){var r=n(19),o=n(0),i=n(9),a=n(52);o(o.S+o.F*n(8)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(e,t,n){i(e),t=a(t,!0),i(n);try{return r.f(e,t,n),!0}catch(e){return!1}}})},function(e,t,n){var r=n(0),o=n(39).f,i=n(9);r(r.S,"Reflect",{deleteProperty:function(e,t){var n=o(i(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var r=n(0),o=n(9),i=function(e){this._t=o(e),this._i=0;var t,n=this._k=[];for(t in e)n.push(t)};n(161)(i,"Object",function(){var e,t=this._k;do{if(this._i>=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}}),r(r.S,"Reflect",{enumerate:function(e){return new i(e)}})},function(e,t,n){var r=n(39),o=n(66),i=n(30),a=n(0),s=n(12),l=n(9);a(a.S,"Reflect",{get:function e(t,n){var a,u,c=arguments.length<3?t:arguments[2];return l(t)===c?t[n]:(a=r.f(t,n))?i(a,"value")?a.value:void 0!==a.get?a.get.call(c):void 0:s(u=o(t))?e(u,n,c):void 0}})},function(e,t,n){var r=n(39),o=n(0),i=n(9);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(i(e),t)}})},function(e,t,n){var r=n(0),o=n(66),i=n(9);r(r.S,"Reflect",{getPrototypeOf:function(e){return o(i(e))}})},function(e,t,n){var r=n(0);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(0),o=n(9),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return o(e),!i||i(e)}})},function(e,t,n){var r=n(0);r(r.S,"Reflect",{ownKeys:n(174)})},function(e,t,n){var r=n(0),o=n(9),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){o(e);try{return i&&i(e),!0}catch(e){return!1}}})},function(e,t,n){var r=n(19),o=n(39),i=n(66),a=n(30),s=n(0),l=n(59),u=n(9),c=n(12);s(s.S,"Reflect",{set:function e(t,n,s){var f,h,d=arguments.length<4?t:arguments[3],p=o.f(u(t),n);if(!p){if(c(h=i(t)))return e(h,n,s,d);p=l(0)}if(a(p,"value")){if(!1===p.writable||!c(d))return!1;if(f=o.f(d,n)){if(f.get||f.set||!1===f.writable)return!1;f.value=s,r.f(d,n,f)}else r.f(d,n,l(0,s));return!0}return void 0!==p.set&&(p.set.call(d,s),!0)}})},function(e,t,n){var r=n(0),o=n(114);o&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){o.check(e,t);try{return o.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){n(612),e.exports=n(22).Array.includes},function(e,t,n){"use strict";var r=n(0),o=n(90)(!0);r(r.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(70)("includes")},function(e,t,n){n(614),e.exports=n(22).String.padStart},function(e,t,n){"use strict";var r=n(0),o=n(175),i=n(98);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padStart:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){n(616),e.exports=n(22).String.padEnd},function(e,t,n){"use strict";var r=n(0),o=n(175),i=n(98);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padEnd:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){n(618),e.exports=n(109).f("asyncIterator")},function(e,t,n){n(148)("asyncIterator")},function(e,t,n){n(620),e.exports=n(22).Object.getOwnPropertyDescriptors},function(e,t,n){var r=n(0),o=n(174),i=n(32),a=n(39),s=n(126);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=i(e),l=a.f,u=o(r),c={},f=0;u.length>f;)void 0!==(n=l(r,t=u[f++]))&&s(c,t,n);return c}})},function(e,t,n){n(622),e.exports=n(22).Object.values},function(e,t,n){var r=n(0),o=n(176)(!1);r(r.S,"Object",{values:function(e){return o(e)}})},function(e,t,n){n(624),e.exports=n(22).Object.entries},function(e,t,n){var r=n(0),o=n(176)(!0);r(r.S,"Object",{entries:function(e){return o(e)}})},function(e,t,n){"use strict";n(168),n(626),e.exports=n(22).Promise.finally},function(e,t,n){"use strict";var r=n(0),o=n(22),i=n(11),a=n(81),s=n(170);r(r.P+r.R,"Promise",{finally:function(e){var t=a(this,o.Promise||i.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then(function(){return n})}:e,n?function(n){return s(t,e()).then(function(){throw n})}:e)}})},function(e,t,n){n(628),n(629),n(630),e.exports=n(22)},function(e,t,n){var r=n(11),o=n(0),i=n(98),a=[].slice,s=/MSIE .\./.test(i),l=function(e){return function(t,n){var r=arguments.length>2,o=!!r&&a.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,o)}:t,n)}};o(o.G+o.B+o.F*s,{setTimeout:l(r.setTimeout),setInterval:l(r.setInterval)})},function(e,t,n){var r=n(0),o=n(132);r(r.G+r.B,{setImmediate:o.set,clearImmediate:o.clear})},function(e,t,n){for(var r=n(129),o=n(62),i=n(25),a=n(11),s=n(31),l=n(69),u=n(17),c=u("iterator"),f=u("toStringTag"),h=l.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=o(d),g=0;g<p.length;g++){var v,y=p[g],m=d[y],w=a[y],b=w&&w.prototype;if(b&&(b[c]||s(b,c,h),b[f]||s(b,f,y),l[y]=h,m))for(v in r)b[v]||i(b,v,r[v],!0)}},function(e,t){!function(t){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag",u="object"==typeof e,c=t.regeneratorRuntime;if(c)u&&(e.exports=c);else{(c=t.regeneratorRuntime=u?e.exports:{}).wrap=b;var f="suspendedStart",h="suspendedYield",d="executing",p="completed",g={},v={};v[a]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(A([])));m&&m!==r&&o.call(m,a)&&(v=m);var w=S.prototype=E.prototype=Object.create(v);O.prototype=w.constructor=S,S.constructor=O,S[l]=O.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===O||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(w),e},c.awrap=function(e){return{__await:e}},_(T.prototype),T.prototype[s]=function(){return this},c.AsyncIterator=T,c.async=function(e,t,n,r){var o=new T(b(e,t,n,r));return c.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},_(w),w[l]="Generator",w[a]=function(){return this},w.toString=function(){return"[object Generator]"},c.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},c.values=A,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,o){return s.type="throw",s.arg=e,t.next=r,o&&(t.method="next",t.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:A(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),g}}}function b(e,t,n,r){var o=t&&t.prototype instanceof E?t:E,i=Object.create(o.prototype),a=new N(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw i;return I()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=R(a,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var l=C(e,t,n);if("normal"===l.type){if(r=n.done?p:h,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=p,n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function C(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function E(){}function O(){}function S(){}function _(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function T(e){var t;this._invoke=function(n,r){function i(){return new Promise(function(t,i){!function t(n,r,i,a){var s=C(e[n],e,r);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(u).then(function(e){l.value=e,i(l)},a)}a(s.arg)}(n,r,t,i)})}return t=t?t.then(i,i):i()}}function R(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,R(e,t),"throw"===t.method))return g;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=C(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,g;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,g):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function A(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(o.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=n,t.done=!0,t};return i.next=i}}return{next:I}}function I(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,n(106),n(633),n(634),n(635);var r=n(28),o=n(20),i=n(55),a=n(134),s=P(n(135)),l=P(n(694)),u=D(n(10)),c=P(n(23)),f=P(n(137)),h=D(n(1)),d=D(n(48)),p=D(n(101)),g=D(n(438)),v=D(n(49)),y=D(n(51)),m=D(n(14)),w=D(n(5)),b=D(n(2)),C=D(n(136)),E=D(n(42)),O=D(n(24)),S=D(n(3)),_=D(n(16)),T=D(n(695)),R=n(6),M=P(n(442)),k=n(441),N=n(443),A=D(n(4)),I=n(102);function D(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function x(e,t){var n=new s.default(e,t||{},k.rootInstanceSymbol);return n.init(),n}(0,l.default)(x),x.Core=s.default,x.DefaultSettings=M.default,x.EventManager=u.default,x._getListenersCounter=u.getListenersCounter,x.buildDate="19/12/2018 13:21:59",x.packageName="handsontable-pro",x.version="6.2.2";x.baseVersion="6.2.2",x.hooks=c.default.getSingleton(),x.__GhostTable=f.default;var L=[h,d,p,g,v,y,m,w,b,C,E,O],H=[S,_];x.helper={},x.dom={},h.arrayEach(L,function(e){h.arrayEach(Object.getOwnPropertyNames(e),function(t){"_"!==t.charAt(0)&&(x.helper[t]=e[t])})}),h.arrayEach(H,function(e){h.arrayEach(Object.getOwnPropertyNames(e),function(t){"_"!==t.charAt(0)&&(x.dom[t]=e[t])})}),x.cellTypes={},h.arrayEach((0,a.getRegisteredCellTypeNames)(),function(e){x.cellTypes[e]=(0,a.getCellType)(e)}),x.cellTypes.registerCellType=a.registerCellType,x.cellTypes.getCellType=a.getCellType,x.editors={},h.arrayEach((0,r.getRegisteredEditorNames)(),function(e){x.editors["".concat(E.toUpperCaseFirst(e),"Editor")]=(0,r.getEditor)(e)}),x.editors.registerEditor=r.registerEditor,x.editors.getEditor=r.getEditor,x.renderers={},h.arrayEach((0,o.getRegisteredRendererNames)(),function(e){var t=(0,o.getRenderer)(e);"base"===e&&(x.renderers.cellDecorator=t),x.renderers["".concat(E.toUpperCaseFirst(e),"Renderer")]=t}),x.renderers.registerRenderer=o.registerRenderer,x.renderers.getRenderer=o.getRenderer,x.validators={},h.arrayEach((0,i.getRegisteredValidatorNames)(),function(e){x.validators["".concat(E.toUpperCaseFirst(e),"Validator")]=(0,i.getValidator)(e)}),x.validators.registerValidator=i.registerValidator,x.validators.getValidator=i.getValidator,x.plugins={},h.arrayEach(Object.getOwnPropertyNames(T),function(e){var t=T[e];"Base"===e?x.plugins["".concat(e,"Plugin")]=t:x.plugins[e]=t}),x.plugins.registerPlugin=R.registerPlugin,x.languages={},x.languages.dictionaryKeys=A,x.languages.getLanguageDictionary=I.getLanguageDictionary,x.languages.getLanguagesDictionaries=I.getLanguagesDictionaries,x.languages.registerLanguageDictionary=I.registerLanguageDictionary,x.languages.getTranslatedPhrase=function(){return N.getTranslatedPhrase.apply(void 0,arguments)};var j=x;t.default=j},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(n(50));function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=a(this,s(t).call(this,e))).clone=n.makeClone(o.default.CLONE_DEBUG),n.clone.wtTable.holder.style.opacity=.4,n.clone.wtTable.holder.style.textShadow="0 0 2px #ff0000",(0,r.addClass)(n.clone.wtTable.holder.parentNode,"wtDebugVisible"),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(t,o.default),t}();o.default.registerOverlay(o.default.CLONE_DEBUG,u);var c=u;t.default=c},function(e,t,n){var r={"./af":184,"./af.js":184,"./ar":185,"./ar-dz":186,"./ar-dz.js":186,"./ar-kw":187,"./ar-kw.js":187,"./ar-ly":188,"./ar-ly.js":188,"./ar-ma":189,"./ar-ma.js":189,"./ar-sa":190,"./ar-sa.js":190,"./ar-tn":191,"./ar-tn.js":191,"./ar.js":185,"./az":192,"./az.js":192,"./be":193,"./be.js":193,"./bg":194,"./bg.js":194,"./bm":195,"./bm.js":195,"./bn":196,"./bn.js":196,"./bo":197,"./bo.js":197,"./br":198,"./br.js":198,"./bs":199,"./bs.js":199,"./ca":200,"./ca.js":200,"./cs":201,"./cs.js":201,"./cv":202,"./cv.js":202,"./cy":203,"./cy.js":203,"./da":204,"./da.js":204,"./de":205,"./de-at":206,"./de-at.js":206,"./de-ch":207,"./de-ch.js":207,"./de.js":205,"./dv":208,"./dv.js":208,"./el":209,"./el.js":209,"./en-au":210,"./en-au.js":210,"./en-ca":211,"./en-ca.js":211,"./en-gb":212,"./en-gb.js":212,"./en-ie":213,"./en-ie.js":213,"./en-nz":214,"./en-nz.js":214,"./eo":215,"./eo.js":215,"./es":216,"./es-do":217,"./es-do.js":217,"./es-us":218,"./es-us.js":218,"./es.js":216,"./et":219,"./et.js":219,"./eu":220,"./eu.js":220,"./fa":221,"./fa.js":221,"./fi":222,"./fi.js":222,"./fo":223,"./fo.js":223,"./fr":224,"./fr-ca":225,"./fr-ca.js":225,"./fr-ch":226,"./fr-ch.js":226,"./fr.js":224,"./fy":227,"./fy.js":227,"./gd":228,"./gd.js":228,"./gl":229,"./gl.js":229,"./gom-latn":230,"./gom-latn.js":230,"./gu":231,"./gu.js":231,"./he":232,"./he.js":232,"./hi":233,"./hi.js":233,"./hr":234,"./hr.js":234,"./hu":235,"./hu.js":235,"./hy-am":236,"./hy-am.js":236,"./id":237,"./id.js":237,"./is":238,"./is.js":238,"./it":239,"./it.js":239,"./ja":240,"./ja.js":240,"./jv":241,"./jv.js":241,"./ka":242,"./ka.js":242,"./kk":243,"./kk.js":243,"./km":244,"./km.js":244,"./kn":245,"./kn.js":245,"./ko":246,"./ko.js":246,"./ky":247,"./ky.js":247,"./lb":248,"./lb.js":248,"./lo":249,"./lo.js":249,"./lt":250,"./lt.js":250,"./lv":251,"./lv.js":251,"./me":252,"./me.js":252,"./mi":253,"./mi.js":253,"./mk":254,"./mk.js":254,"./ml":255,"./ml.js":255,"./mr":256,"./mr.js":256,"./ms":257,"./ms-my":258,"./ms-my.js":258,"./ms.js":257,"./mt":259,"./mt.js":259,"./my":260,"./my.js":260,"./nb":261,"./nb.js":261,"./ne":262,"./ne.js":262,"./nl":263,"./nl-be":264,"./nl-be.js":264,"./nl.js":263,"./nn":265,"./nn.js":265,"./pa-in":266,"./pa-in.js":266,"./pl":267,"./pl.js":267,"./pt":268,"./pt-br":269,"./pt-br.js":269,"./pt.js":268,"./ro":270,"./ro.js":270,"./ru":271,"./ru.js":271,"./sd":272,"./sd.js":272,"./se":273,"./se.js":273,"./si":274,"./si.js":274,"./sk":275,"./sk.js":275,"./sl":276,"./sl.js":276,"./sq":277,"./sq.js":277,"./sr":278,"./sr-cyrl":279,"./sr-cyrl.js":279,"./sr.js":278,"./ss":280,"./ss.js":280,"./sv":281,"./sv.js":281,"./sw":282,"./sw.js":282,"./ta":283,"./ta.js":283,"./te":284,"./te.js":284,"./tet":285,"./tet.js":285,"./th":286,"./th.js":286,"./tl-ph":287,"./tl-ph.js":287,"./tlh":288,"./tlh.js":288,"./tr":289,"./tr.js":289,"./tzl":290,"./tzl.js":290,"./tzm":291,"./tzm-latn":292,"./tzm-latn.js":292,"./tzm.js":291,"./uk":293,"./uk.js":293,"./ur":294,"./ur.js":294,"./uz":295,"./uz-latn":296,"./uz-latn.js":296,"./uz.js":295,"./vi":297,"./vi.js":297,"./x-pseudo":298,"./x-pseudo.js":298,"./yo":299,"./yo.js":299,"./zh-cn":300,"./zh-cn.js":300,"./zh-hk":301,"./zh-hk.js":301,"./zh-tw":302,"./zh-tw.js":302};function o(e){return n(i(e))}function i(e){var t=r[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=637},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(n(50));function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=s(this,l(t).call(this,e))).clone=n.makeClone(o.default.CLONE_LEFT),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,o.default),function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(t,[{key:"shouldBeRendered",value:function(){return!(!this.wot.getSetting("fixedColumnsLeft")&&!this.wot.getSetting("rowHeaders").length)}},{key:"resetFixedPosition",value:function(){if(this.needFullRender&&this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=0,n=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==window||n&&"horizontal"===n)t=this.getScrollPosition(),(0,r.resetCssTransform)(e);else{var o,i,a=this.wot.wtTable.hider.getBoundingClientRect(),s=Math.ceil(a.left),l=Math.ceil(a.right);i=""===(i=this.wot.wtTable.hider.style.top)?0:i,t=o=s<0&&l-e.offsetWidth>0?-s:0,o+="px",(0,r.setOverlayPosition)(e,o,i)}this.adjustHeaderBordersPosition(t),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){var t=!1;return this.mainTableScrollableElement===window&&window.scrollX!==e?(window.scrollTo(e,(0,r.getWindowScrollTop)()),t=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,t=!0),t}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollVertically")}},{key:"sumCellSizes",value:function(e,t){for(var n=this.wot.wtSettings.defaultColumnWidth,r=e,o=0;r<t;)o+=this.wot.wtTable.getStretchedColumnWidth(r)||n,r+=1;return o}},{key:"adjustElementsSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),e||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot.wtTable.holder,t=e.clientHeight===e.offsetHeight?0:(0,r.getScrollbarWidth)(),n=this.clone.wtTable.holder.parentNode.style,o=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==window||"vertical"===o){var i=this.wot.wtViewport.getWorkspaceHeight()-t;i=Math.min(i,(0,r.innerHeight)(this.wot.wtTable.wtRootElement)),n.height="".concat(i,"px")}else n.height="";this.clone.wtTable.holder.style.height=n.height;var a=(0,r.outerWidth)(this.clone.wtTable.TABLE);n.width="".concat(0===a?a:a+4,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=(0,r.getScrollbarWidth)();this.clone.wtTable.hider.style.height=this.hider.style.height,this.clone.wtTable.holder.style.height=this.clone.wtTable.holder.parentNode.style.height,0===e&&(e=30),this.clone.wtTable.holder.style.width="".concat(parseInt(this.clone.wtTable.holder.parentNode.style.width,10)+e,"px")}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalColumns");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style.left="".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition,"px");else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style.left="0"}this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top="".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition,"px"):this.clone.wtTable.spreader.style.top=""}},{key:"scrollTo",value:function(e,t){var n=this.getTableParentOffset(),o=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,i=0;return t&&o.offsetWidth!==o.clientWidth&&(i=(0,r.getScrollbarWidth)()),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportWidth()):n+=this.sumCellSizes(this.wot.getSetting("fixedColumnsLeft"),e),n+=i,this.setScrollPosition(n)}},{key:"getTableParentOffset",value:function(){var e=0;return this.wot.getSetting("preventOverflow")||this.trimmingContainer!==window||(e=this.wot.wtTable.holderOffset.left),e}},{key:"getScrollPosition",value:function(){return(0,r.getScrollLeft)(this.mainTableScrollableElement)}},{key:"adjustHeaderBordersPosition",value:function(e){var t=this.wot.wtTable.holder.parentNode,n=this.wot.getSetting("rowHeaders"),o=this.wot.getSetting("fixedColumnsLeft");if(this.wot.getSetting("totalRows")?(0,r.removeClass)(t,"emptyRows"):(0,r.addClass)(t,"emptyRows"),o&&!n.length)(0,r.addClass)(t,"innerBorderLeft");else if(!o&&n.length){var i=(0,r.hasClass)(t,"innerBorderLeft");e?(0,r.addClass)(t,"innerBorderLeft"):(0,r.removeClass)(t,"innerBorderLeft"),(!i&&e||i&&!e)&&this.wot.wtOverlays.adjustElementsSize()}}}]),t}();o.default.registerOverlay(o.default.CLONE_LEFT,c);var f=c;t.default=f},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(n(50));function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=l(this,u(t).call(this,e))).clone=n.makeClone(i.default.CLONE_TOP),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,i.default),function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(t,[{key:"shouldBeRendered",value:function(){return!(!this.wot.getSetting("fixedRowsTop")&&!this.wot.getSetting("columnHeaders").length)}},{key:"resetFixedPosition",value:function(){if(this.needFullRender&&this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=0,n=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==window||n&&"vertical"===n)t=this.getScrollPosition(),(0,r.resetCssTransform)(e);else{var o,i,a=this.wot.wtTable.hider.getBoundingClientRect(),s=Math.ceil(a.top),l=Math.ceil(a.bottom);o=""===(o=this.wot.wtTable.hider.style.left)?0:o,t=i=s<0&&l-e.offsetHeight>0?-s:0,i+="px",(0,r.setOverlayPosition)(e,o,i)}this.adjustHeaderBordersPosition(t),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){var t=!1;return this.mainTableScrollableElement===window&&window.scrollY!==e?(window.scrollTo((0,r.getWindowScrollLeft)(),e),t=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,t=!0),t}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollHorizontally")}},{key:"sumCellSizes",value:function(e,t){for(var n=this.wot.wtSettings.settings.defaultRowHeight,r=e,o=0;r<t;){var i=this.wot.wtTable.getRowHeight(r);o+=void 0===i?n:i,r+=1}return o}},{key:"adjustElementsSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),e||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot.wtTable.holder,t=e.clientWidth===e.offsetWidth?0:(0,r.getScrollbarWidth)(),n=this.clone.wtTable.holder.parentNode.style,o=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==window||"horizontal"===o){var i=this.wot.wtViewport.getWorkspaceWidth()-t;i=Math.min(i,(0,r.innerWidth)(this.wot.wtTable.wtRootElement)),n.width="".concat(i,"px")}else n.width="";this.clone.wtTable.holder.style.width=n.width;var a=(0,r.outerHeight)(this.clone.wtTable.TABLE);n.height="".concat(0===a?a:a+4,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=(0,r.getScrollbarWidth)();this.clone.wtTable.hider.style.width=this.hider.style.width,this.clone.wtTable.holder.style.width=this.clone.wtTable.holder.parentNode.style.width,0===e&&(e=30),this.clone.wtTable.holder.style.height="".concat(parseInt(this.clone.wtTable.holder.parentNode.style.height,10)+e,"px")}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalRows");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top="".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition,"px");else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.left="".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition,"px"):this.clone.wtTable.spreader.style.left=""}},{key:"scrollTo",value:function(e,t){var n=this.getTableParentOffset(),o=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,i=0;if(t&&o.offsetHeight!==o.clientHeight&&(i=(0,r.getScrollbarWidth)()),t){var a=this.wot.getSetting("fixedRowsBottom"),s=this.wot.getSetting("totalRows");n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportHeight()-this.sumCellSizes(s-a,s),n+=1}else n+=this.sumCellSizes(this.wot.getSetting("fixedRowsTop"),e);return n+=i,this.setScrollPosition(n)}},{key:"getTableParentOffset",value:function(){return this.mainTableScrollableElement===window?this.wot.wtTable.holderOffset.top:0}},{key:"getScrollPosition",value:function(){return(0,r.getScrollTop)(this.mainTableScrollableElement)}},{key:"redrawSelectionBorders",value:function(e){if(e&&e.cellRange){var t=e.getBorder(this.wot),n=e.getCorners();t.disappear(),t.appear(n)}}},{key:"redrawAllSelectionsBorders",value:function(){var e=this,t=this.wot.selections;this.redrawSelectionBorders(t.getCell()),(0,o.arrayEach)(t.getAreas(),function(t){e.redrawSelectionBorders(t)}),this.redrawSelectionBorders(t.getFill()),this.wot.wtTable.wot.wtOverlays.leftOverlay.refresh()}},{key:"adjustHeaderBordersPosition",value:function(e){var t=this.wot.wtTable.holder.parentNode;if(this.wot.getSetting("totalColumns")?(0,r.removeClass)(t,"emptyColumns"):(0,r.addClass)(t,"emptyColumns"),0===this.wot.getSetting("fixedRowsTop")&&this.wot.getSetting("columnHeaders").length>0){var n=(0,r.hasClass)(t,"innerBorderTop");e||0===this.wot.getSetting("totalRows")?(0,r.addClass)(t,"innerBorderTop"):(0,r.removeClass)(t,"innerBorderTop"),(!n&&e||n&&!e)&&(this.wot.wtOverlays.adjustElementsSize(),this.redrawAllSelectionsBorders())}if(0===this.wot.getSetting("rowHeaders").length){var o=this.clone.wtTable.THEAD.querySelectorAll("th:nth-of-type(2)");if(o)for(var i=0;i<o.length;i++)o[i].style["border-left-width"]=0}}}]),t}();i.default.registerOverlay(i.default.CLONE_TOP,f);var h=f;t.default=h},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(n(50));function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=s(this,l(t).call(this,e))).clone=n.makeClone(o.default.CLONE_TOP_LEFT_CORNER),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,o.default),function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(t,[{key:"shouldBeRendered",value:function(){return!(!this.wot.getSetting("fixedRowsTop")&&!this.wot.getSetting("columnHeaders").length||!this.wot.getSetting("fixedColumnsLeft")&&!this.wot.getSetting("rowHeaders").length)}},{key:"resetFixedPosition",value:function(){if(this.updateTrimmingContainer(),this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=(0,r.outerHeight)(this.clone.wtTable.TABLE),n=(0,r.outerWidth)(this.clone.wtTable.TABLE),o=this.wot.getSetting("preventOverflow");if(this.trimmingContainer===window){var i=this.wot.wtTable.hider.getBoundingClientRect(),a=Math.ceil(i.top),s=Math.ceil(i.left),l=Math.ceil(i.bottom),u=Math.ceil(i.right),c="0",f="0";o&&"vertical"!==o||s<0&&u-e.offsetWidth>0&&(c="".concat(-s,"px")),o&&"horizontal"!==o||a<0&&l-e.offsetHeight>0&&(f="".concat(-a,"px")),(0,r.setOverlayPosition)(e,c,f)}else(0,r.resetCssTransform)(e);e.style.height="".concat(0===t?t:t+4,"px"),e.style.width="".concat(0===n?n:n+4,"px")}}}]),t}();o.default.registerOverlay(o.default.CLONE_TOP_LEFT_CORNER,c);var f=c;t.default=f},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(n(50));function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=s(this,l(t).call(this,e))).clone=n.makeClone(o.default.CLONE_BOTTOM),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,o.default),function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(t,[{key:"repositionOverlay",value:function(){var e=(0,r.getScrollbarWidth)(),t=this.clone.wtTable.holder.parentNode;this.wot.wtTable.holder.clientHeight===this.wot.wtTable.holder.offsetHeight&&(e=0),t.style.top="",t.style.bottom="".concat(e,"px")}},{key:"shouldBeRendered",value:function(){return!!this.wot.getSetting("fixedRowsBottom")}},{key:"resetFixedPosition",value:function(){if(this.needFullRender&&this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=0;if(e.style.top="",this.wot.wtOverlays.leftOverlay.trimmingContainer===window){var n,o,i=this.wot.wtTable.hider.getBoundingClientRect(),a=Math.ceil(i.bottom),s=document.body.offsetHeight;n=""===(n=this.wot.wtTable.hider.style.left)?0:n,t=o=a>s?a-s:0,o+="px",e.style.top="",e.style.left=n,e.style.bottom=o}else t=this.getScrollPosition(),(0,r.resetCssTransform)(e),this.repositionOverlay();this.adjustHeaderBordersPosition(t)}}},{key:"setScrollPosition",value:function(e){this.mainTableScrollableElement===window?window.scrollTo((0,r.getWindowScrollLeft)(),e):this.mainTableScrollableElement.scrollTop=e}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollVertically")}},{key:"sumCellSizes",value:function(e,t){for(var n=e,r=0,o=this.wot.wtSettings.settings.defaultRowHeight;n<t;){var i=this.wot.wtTable.getRowHeight(n);r+=void 0===i?o:i,n+=1}return r}},{key:"adjustElementsSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),e||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot.wtTable.holder,t=e.clientWidth===e.offsetWidth?0:(0,r.getScrollbarWidth)(),n=this.clone.wtTable.holder.parentNode.style;this.trimmingContainer===window?n.width="":n.width="".concat(this.wot.wtViewport.getWorkspaceWidth()-t,"px"),this.clone.wtTable.holder.style.width=n.width;var o=(0,r.outerHeight)(this.clone.wtTable.TABLE);n.height="".concat(o,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=(0,r.getScrollbarWidth)();this.clone.wtTable.hider.style.width=this.hider.style.width,this.clone.wtTable.holder.style.width=this.clone.wtTable.holder.parentNode.style.width,0===e&&(e=30),this.clone.wtTable.holder.style.height="".concat(parseInt(this.clone.wtTable.holder.parentNode.style.height,10)+e,"px")}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalRows");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top="".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition,"px");else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.left="".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition,"px"):this.clone.wtTable.spreader.style.left=""}},{key:"scrollTo",value:function(e,t){var n=this.getTableParentOffset(),o=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,i=0;t&&o.offsetHeight!==o.clientHeight&&(i=(0,r.getScrollbarWidth)()),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportHeight(),n+=1):n+=this.sumCellSizes(this.wot.getSetting("fixedRowsBottom"),e),n+=i,this.setScrollPosition(n)}},{key:"getTableParentOffset",value:function(){return this.mainTableScrollableElement===window?this.wot.wtTable.holderOffset.top:0}},{key:"getScrollPosition",value:function(){return(0,r.getScrollTop)(this.mainTableScrollableElement)}},{key:"adjustHeaderBordersPosition",value:function(e){if(0===this.wot.getSetting("fixedRowsBottom")&&this.wot.getSetting("columnHeaders").length>0){var t=this.wot.wtTable.holder.parentNode,n=(0,r.hasClass)(t,"innerBorderTop");e?(0,r.addClass)(t,"innerBorderTop"):(0,r.removeClass)(t,"innerBorderTop"),(!n&&e||n&&!e)&&this.wot.wtOverlays.adjustElementsSize()}if(0===this.wot.getSetting("rowHeaders").length){var o=this.clone.wtTable.THEAD.querySelector("th:nth-of-type(2)");o&&(o.style["border-left-width"]=0)}}}]),t}();o.default.registerOverlay(o.default.CLONE_BOTTOM,c);var f=c;t.default=f},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(n(50));function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=s(this,l(t).call(this,e))).clone=n.makeClone(o.default.CLONE_BOTTOM_LEFT_CORNER),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,o.default),function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(t,[{key:"shouldBeRendered",value:function(){return!(!this.wot.getSetting("fixedRowsBottom")||!this.wot.getSetting("fixedColumnsLeft")&&!this.wot.getSetting("rowHeaders").length)}},{key:"repositionOverlay",value:function(){var e=(0,r.getScrollbarWidth)(),t=this.clone.wtTable.holder.parentNode;this.wot.wtTable.holder.clientHeight===this.wot.wtTable.holder.offsetHeight&&(e=0),t.style.top="",t.style.bottom="".concat(e,"px")}},{key:"resetFixedPosition",value:function(){if(this.updateTrimmingContainer(),this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=(0,r.outerHeight)(this.clone.wtTable.TABLE),n=(0,r.outerWidth)(this.clone.wtTable.TABLE);if(e.style.top="",this.trimmingContainer===window){var o,i,a=this.wot.wtTable.hider.getBoundingClientRect(),s=Math.ceil(a.bottom),l=Math.ceil(a.left),u=document.body.offsetHeight;o=l<0?-l:0,i=s>u?s-u:0,i+="px",o+="px",e.style.top="",e.style.left=o,e.style.bottom=i}else(0,r.resetCssTransform)(e),this.repositionOverlay();e.style.height="".concat(t,"px"),e.style.width="".concat(n,"px")}}}]),t}();o.default.registerOverlay(o.default.CLONE_BOTTOM_LEFT_CORNER,c);var f=c;t.default=f},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=s(n(310)),i=s(n(83)),a=s(n(179));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var f=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.settings=t,this.cellRange=n||null,this.instanceBorders={},this.classNames=[this.settings.className],this.classNameGenerator=this.linearClassNameGenerator(this.settings.className,this.settings.layerLevel)}return function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(e,[{key:"getBorder",value:function(e){return this.instanceBorders[e.guid]||(this.instanceBorders[e.guid]=new o.default(e,this.settings)),this.instanceBorders[e.guid]}},{key:"isEmpty",value:function(){return null===this.cellRange}},{key:"add",value:function(e){return this.isEmpty()?this.cellRange=new a.default(e):this.cellRange.expand(e),this}},{key:"replace",value:function(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}},{key:"clear",value:function(){return this.cellRange=null,this}},{key:"getCorners",value:function(){var e=this.cellRange.getTopLeftCorner(),t=this.cellRange.getBottomRightCorner();return[e.row,e.col,t.row,t.col]}},{key:"addClassAtCoords",value:function(e,t,n,o){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=e.wtTable.getCell(new i.default(t,n));if("object"===u(s)){var l=o;a&&(l=this.classNameGenerator(s),this.classNames.includes(l)||this.classNames.push(l)),(0,r.addClass)(s,l)}return this}},{key:"linearClassNameGenerator",value:function(e,t){return function n(o){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0===t||0===i)return e;var a=i>=0?i:t,s=e,l=0===(a-=1)?e:"".concat(e,"-").concat(a);if((0,r.hasClass)(o,l)){var u=a+1;s="".concat(e,"-").concat(u)}else s=n(o,a);return s}}},{key:"draw",value:function(e){if(this.isEmpty())this.settings.border&&this.getBorder(e).disappear();else{for(var t=e.wtTable.getRenderedRowsCount(),n=e.wtTable.getRenderedColumnsCount(),o=this.getCorners(),i=l(o,4),a=i[0],s=i[1],u=i[2],c=i[3],f=0;f<n;f+=1){var h=e.wtTable.columnFilter.renderedToSource(f);if(h>=s&&h<=c){var d=e.wtTable.getColumnHeader(h);if(d){var p=[];this.settings.highlightHeaderClassName&&p.push(this.settings.highlightHeaderClassName),this.settings.highlightColumnClassName&&p.push(this.settings.highlightColumnClassName),(0,r.addClass)(d,p)}}}for(var g=0;g<t;g+=1){var v=e.wtTable.rowFilter.renderedToSource(g);if(v>=a&&v<=u){var y=e.wtTable.getRowHeader(v);if(y){var m=[];this.settings.highlightHeaderClassName&&m.push(this.settings.highlightHeaderClassName),this.settings.highlightRowClassName&&m.push(this.settings.highlightRowClassName),(0,r.addClass)(y,m)}}for(var w=0;w<n;w+=1){var b=e.wtTable.columnFilter.renderedToSource(w);v>=a&&v<=u&&b>=s&&b<=c?this.settings.className&&this.addClassAtCoords(e,v,b,this.settings.className,this.settings.markIntersections):v>=a&&v<=u?this.settings.highlightRowClassName&&this.addClassAtCoords(e,v,b,this.settings.highlightRowClassName):b>=s&&b<=c&&this.settings.highlightColumnClassName&&this.addClassAtCoords(e,v,b,this.settings.highlightColumnClassName);var C=e.getSetting("onAfterDrawSelection",v,b,o,this.settings.layerLevel);"string"==typeof C&&this.addClassAtCoords(e,v,b,C)}}e.getSetting("onBeforeDrawBorders",o,this.settings.className),this.settings.border&&this.getBorder(e).appear(o)}}}]),e}();t.default=f},function(e,t,n){"use strict";e.exports=function(){var e,t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},n=document.body,r=document.createTextNode(""),o=document.createElement("SPAN"),i=function(e,t,n){e.addEventListener(t,n,!1)},a=function(e,t,n){e.removeEventListener(t,n,!1)},s=function(i){var a,s;i?/^[a-zA-Z \.,\\\/\|0-9]$/.test(i)||(i="."):i="",void 0!==r.textContent?r.textContent=e.value+i:r.data=e.value+i,o.style.fontSize=c(e).fontSize,o.style.fontFamily=c(e).fontFamily,o.style.whiteSpace="pre",n.appendChild(o),a=o.clientWidth+2,n.removeChild(o),e.style.height=t.minHeight+"px",t.minWidth>a?e.style.width=t.minWidth+"px":a>t.maxWidth?e.style.width=t.maxWidth+"px":e.style.width=a+"px",s=e.scrollHeight?e.scrollHeight-1:0,t.minHeight>s?e.style.height=t.minHeight+"px":t.maxHeight<s?(e.style.height=t.maxHeight+"px",e.style.overflowY="visible"):e.style.height=s+"px"},l=function(){window.setTimeout(s,0)},u=function(n,a,u){e=n,function(n){if(n&&n.minHeight)if("inherit"==n.minHeight)t.minHeight=e.clientHeight;else{var i=parseInt(n.minHeight);isNaN(i)||(t.minHeight=i)}if(n&&n.maxHeight)if("inherit"==n.maxHeight)t.maxHeight=e.clientHeight;else{var a=parseInt(n.maxHeight);isNaN(a)||(t.maxHeight=a)}if(n&&n.minWidth)if("inherit"==n.minWidth)t.minWidth=e.clientWidth;else{var s=parseInt(n.minWidth);isNaN(s)||(t.minWidth=s)}if(n&&n.maxWidth)if("inherit"==n.maxWidth)t.maxWidth=e.clientWidth;else{var l=parseInt(n.maxWidth);isNaN(l)||(t.maxWidth=l)}o.firstChild||(o.className="autoResize",o.style.display="inline-block",o.appendChild(r))}(a),"TEXTAREA"==e.nodeName&&(e.style.resize="none",e.style.overflowY="",e.style.height=t.minHeight+"px",e.style.minWidth=t.minWidth+"px",e.style.maxWidth=t.maxWidth+"px",e.style.overflowY="hidden"),u&&(i(e,"change",s),i(e,"cut",l),i(e,"paste",l),i(e,"drop",l),i(e,"keydown",l),i(e,"focus",s),i(e,"compositionstart",l),i(e,"compositionupdate",l),i(e,"compositionend",l)),s()};function c(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}return{init:function(e,t,n){u(e,t,n)},unObserve:function(){a(e,"change",s),a(e,"cut",l),a(e,"paste",l),a(e,"drop",l),a(e,"keydown",l),a(e,"focus",s),a(e,"compositionstart",l),a(e,"compositionupdate",l),a(e,"compositionend",l)},resize:s}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(82)),o=n(3);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),s(this,l(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,r.default),function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(t,[{key:"beginEditing",value:function(e,t){if(t&&"mouseup"===t.type){var n=this.TD.querySelector('input[type="checkbox"]');(0,o.hasClass)(n,"htBadValue")||n.click()}}},{key:"finishEditing",value:function(){}},{key:"init",value:function(){}},{key:"open",value:function(){}},{key:"close",value:function(){}},{key:"getValue",value:function(){}},{key:"setValue",value:function(){}},{key:"focus",value:function(){}}]),t}();t.default=c},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=f(n(36)),o=f(n(647));n(650);var i=n(3),a=n(2),s=f(n(10)),l=n(24),u=n(16),c=f(n(84));function f(e){return e&&e.__esModule?e:{default:e}}function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e,t,n){return(g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=p(this,v(t).call(this,e))).defaultDateFormat="DD/MM/YYYY",n.isCellEdited=!1,n.parentDestroyed=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(t,c.default),function(e,t,n){t&&d(e.prototype,t),n&&d(e,n)}(t,[{key:"init",value:function(){var e=this;if("function"!=typeof r.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof o.default)throw new Error("You need to include Pikaday to your project.");g(v(t.prototype),"init",this).call(this),this.instance.addHook("afterDestroy",function(){e.parentDestroyed=!0,e.destroyElements()})}},{key:"createElements",value:function(){g(v(t.prototype),"createElements",this).call(this),this.datePicker=document.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,(0,i.addClass)(this.datePicker,"htDatepickerHolder"),document.body.appendChild(this.datePicker),this.$datePicker=new o.default(this.getDatePickerConfig()),new s.default(this).addEventListener(this.datePicker,"mousedown",function(e){return(0,u.stopPropagation)(e)}),this.hideDatepicker()}},{key:"destroyElements",value:function(){this.$datePicker.destroy()}},{key:"prepare",value:function(e,n,r,o,i,a){g(v(t.prototype),"prepare",this).call(this,e,n,r,o,i,a)}},{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;g(v(t.prototype),"open",this).call(this),this.showDatepicker(e)}},{key:"close",value:function(){var e=this;this._opened=!1,this.instance._registerTimeout(function(){e.instance._refreshBorders()}),g(v(t.prototype),"close",this).call(this)}},{key:"finishEditing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){var r=this.originalValue;void 0!==r&&this.setValue(r)}this.hideDatepicker(),g(v(t.prototype),"finishEditing",this).call(this,e,n)}},{key:"showDatepicker",value:function(e){this.$datePicker.config(this.getDatePickerConfig());var t,n=this.TD.getBoundingClientRect(),o=this.cellProperties.dateFormat||this.defaultDateFormat,a=this.$datePicker.config(),s=this.instance.view.isMouseDown(),u=!!e&&(0,l.isMetaKey)(e.keyCode);this.datePickerStyle.top="".concat(window.pageYOffset+n.top+(0,i.outerHeight)(this.TD),"px"),this.datePickerStyle.left="".concat(window.pageXOffset+n.left,"px"),this.$datePicker._onInputFocus=function(){},a.format=o,this.originalValue?(t=this.originalValue,(0,r.default)(t,o,!0).isValid()&&this.$datePicker.setMoment((0,r.default)(t,o),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),u||s||this.setValue("")):this.cellProperties.defaultDate?(t=this.cellProperties.defaultDate,a.defaultDate=t,(0,r.default)(t,o,!0).isValid()&&this.$datePicker.setMoment((0,r.default)(t,o),!0),u||s||this.setValue("")):this.$datePicker.gotoToday(),this.datePickerStyle.display="block",this.$datePicker.show()}},{key:"hideDatepicker",value:function(){this.datePickerStyle.display="none",this.$datePicker.hide()}},{key:"getDatePickerConfig",value:function(){var e=this,t=this.TEXTAREA,n={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,a.deepExtend)(n,this.cellProperties.datePickerConfig);var o=n.onSelect,i=n.onClose;return n.field=t,n.trigger=t,n.container=this.datePicker,n.bound=!1,n.format=n.format||this.defaultDateFormat,n.reposition=n.reposition||!1,n.onSelect=function(t){var n=t;isNaN(n.getTime())||(n=(0,r.default)(n).format(e.cellProperties.dateFormat||e.defaultDateFormat)),e.setValue(n),e.hideDatepicker(),o&&o()},n.onClose=function(){e.parentDestroyed||e.finishEditing(!1),i&&i()},n}}]),t}();t.default=m},function(e,t,n){
/*!
* Pikaday
*
* Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
*/
!function(t,r){"use strict";var o;try{o=n(648)}catch(e){}e.exports=r(o)}(0,function(e){"use strict";var t="function"==typeof e,n=!!window.addEventListener,r=window.document,o=window.setTimeout,i=function(e,t,r,o){n?e.addEventListener(t,r,!!o):e.attachEvent("on"+t,r)},a=function(e,t,r,o){n?e.removeEventListener(t,r,!!o):e.detachEvent("on"+t,r)},s=function(e,t,n){var o;r.createEvent?((o=r.createEvent("HTMLEvents")).initEvent(t,!0,!1),o=g(o,n),e.dispatchEvent(o)):r.createEventObject&&(o=r.createEventObject(),o=g(o,n),e.fireEvent("on"+t,o))},l=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},u=function(e){return/Array/.test(Object.prototype.toString.call(e))},c=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},f=function(e){var t=e.getDay();return 0===t||6===t},h=function(e,t){return[31,function(e){return e%4==0&&e%100!=0||e%400==0}(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},d=function(e){c(e)&&e.setHours(0,0,0,0)},p=function(e,t){return e.getTime()===t.getTime()},g=function(e,t,n){var r,o;for(r in t)(o=void 0!==e[r])&&"object"==typeof t[r]&&null!==t[r]&&void 0===t[r].nodeName?c(t[r])?n&&(e[r]=new Date(t[r].getTime())):u(t[r])?n&&(e[r]=t[r].slice(0)):e[r]=g({},t[r],n):!n&&o||(e[r]=t[r]);return e},v=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},y={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},m=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},w=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button></td>"},b=function(e,t,n){var r=new Date(n,0,1);return'<td class="pika-week">'+Math.ceil(((new Date(n,t,e)-r)/864e5+r.getDay()+1)/7)+"</td>"},C=function(e,t){return"<tr>"+(t?e.reverse():e).join("")+"</tr>"},E=function(e,t,n,r,o,i){var a,s,l,c,f,h=e._o,d=n===h.minYear,p=n===h.maxYear,g='<div id="'+i+'" class="pika-title" role="heading" aria-live="assertive">',v=!0,y=!0;for(l=[],a=0;a<12;a++)l.push('<option value="'+(n===o?a-t:12+a-t)+'"'+(a===r?' selected="selected"':"")+(d&&a<h.minMonth||p&&a>h.maxMonth?'disabled="disabled"':"")+">"+h.i18n.months[a]+"</option>");for(c='<div class="pika-label">'+h.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",u(h.yearRange)?(a=h.yearRange[0],s=h.yearRange[1]+1):(a=n-h.yearRange,s=1+n+h.yearRange),l=[];a<s&&a<=h.maxYear;a++)a>=h.minYear&&l.push('<option value="'+a+'"'+(a===n?' selected="selected"':"")+">"+a+"</option>");return f='<div class="pika-label">'+n+h.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",h.showMonthAfterYear?g+=f+c:g+=c+f,d&&(0===r||h.minMonth>=r)&&(v=!1),p&&(11===r||h.maxMonth<=r)&&(y=!1),0===t&&(g+='<button class="pika-prev'+(v?"":" is-disabled")+'" type="button">'+h.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(g+='<button class="pika-next'+(y?"":" is-disabled")+'" type="button">'+h.i18n.nextMonth+"</button>"),g+"</div>"},O=function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+function(e){var t,n=[];for(e.showWeekNumber&&n.push("<th></th>"),t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+m(e,t)+'">'+m(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"}(e)+function(e){return"<tbody>"+e.join("")+"</tbody>"}(t)+"</table>"},S=function(a){var s=this,u=s.config(a);s._onMouseDown=function(e){if(s._v){var t=(e=e||window.event).target||e.srcElement;if(t)if(l(t,"is-disabled")||(!l(t,"pika-button")||l(t,"is-empty")||l(t.parentNode,"is-disabled")?l(t,"pika-prev")?s.prevMonth():l(t,"pika-next")&&s.nextMonth():(s.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),u.bound&&o(function(){s.hide(),u.field&&u.field.blur()},100))),l(t,"pika-select"))s._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},s._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(l(t,"pika-select-month")?s.gotoMonth(t.value):l(t,"pika-select-year")&&s.gotoYear(t.value))},s._onKeyChange=function(e){if(e=e||window.event,s.isVisible())switch(e.keyCode){case 13:case 27:u.field.blur();break;case 37:e.preventDefault(),s.adjustDate("subtract",1);break;case 38:s.adjustDate("subtract",7);break;case 39:s.adjustDate("add",1);break;case 40:s.adjustDate("add",7)}},s._onInputChange=function(n){var r;n.firedBy!==s&&(r=t?(r=e(u.field.value,u.format,u.formatStrict))&&r.isValid()?r.toDate():null:new Date(Date.parse(u.field.value)),c(r)&&s.setDate(r),s._v||s.show())},s._onInputFocus=function(){s.show()},s._onInputClick=function(){s.show()},s._onInputBlur=function(){var e=r.activeElement;do{if(l(e,"pika-single"))return}while(e=e.parentNode);s._c||(s._b=o(function(){s.hide()},50)),s._c=!1},s._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,r=t;if(t){!n&&l(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),i(t,"change",s._onChange)));do{if(l(r,"pika-single")||r===u.trigger)return}while(r=r.parentNode);s._v&&t!==u.trigger&&r!==u.trigger&&s.hide()}},s.el=r.createElement("div"),s.el.className="pika-single"+(u.isRTL?" is-rtl":"")+(u.theme?" "+u.theme:""),i(s.el,"mousedown",s._onMouseDown,!0),i(s.el,"touchend",s._onMouseDown,!0),i(s.el,"change",s._onChange),i(r,"keydown",s._onKeyChange),u.field&&(u.container?u.container.appendChild(s.el):u.bound?r.body.appendChild(s.el):u.field.parentNode.insertBefore(s.el,u.field.nextSibling),i(u.field,"change",s._onInputChange),u.defaultDate||(t&&u.field.value?u.defaultDate=e(u.field.value,u.format).toDate():u.defaultDate=new Date(Date.parse(u.field.value)),u.setDefaultDate=!0));var f=u.defaultDate;c(f)?u.setDefaultDate?s.setDate(f,!0):s.gotoDate(f):s.gotoDate(new Date),u.bound?(this.hide(),s.el.className+=" is-bound",i(u.trigger,"click",s._onInputClick),i(u.trigger,"focus",s._onInputFocus),i(u.trigger,"blur",s._onInputBlur)):this.show()};return S.prototype={config:function(e){this._o||(this._o=g({},y,!0));var t=g(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,c(t.minDate)||(t.minDate=!1),c(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),u(t.yearRange)){var r=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||r,t.yearRange[1]=parseInt(t.yearRange[1],10)||r}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||y.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(n){return c(this._d)?t?e(this._d).format(n||this._o.format):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,r){t&&e.isMoment(n)&&this.setDate(n.toDate(),r)},getDate:function(){return c(this._d)?new Date(this._d.getTime()):new Date},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",s(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),c(e)){var n=this._o.minDate,r=this._o.maxDate;c(n)&&e<n?e=n:c(r)&&e>r&&(e=r),this._d=new Date(e.getTime()),d(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),s(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(c(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),o=e.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),t=o<n.getTime()||r.getTime()<o}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(n,r){var o,i=this.getDate(),a=24*parseInt(r)*60*60*1e3;"add"===n?o=new Date(i.valueOf()+a):"subtract"===n&&(o=new Date(i.valueOf()-a)),t&&("add"===n?o=e(i).add(r,"days").toDate():"subtract"===n&&(o=e(i).subtract(r,"days").toDate())),this.setDate(o)},adjustCalendars:function(){this.calendars[0]=v(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=v({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){e instanceof Date?(d(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=y.minDate,this._o.minYear=y.minYear,this._o.minMonth=y.minMonth,this._o.startRange=y.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(d(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=y.maxDate,this._o.maxYear=y.maxYear,this._o.maxMonth=y.maxMonth,this._o.endRange=y.endRange),this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(this._v||e){var t,n=this._o,r=n.minYear,i=n.maxYear,a=n.minMonth,s=n.maxMonth,l="";this._y<=r&&(this._y=r,!isNaN(a)&&this._m<a&&(this._m=a)),this._y>=i&&(this._y=i,!isNaN(s)&&this._m>s&&(this._m=s)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var u=0;u<n.numberOfMonths;u++)l+='<div class="pika-lendar">'+E(this,u,this.calendars[u].year,this.calendars[u].month,this.calendars[0].year,t)+this.render(this.calendars[u].year,this.calendars[u].month,t)+"</div>";this.el.innerHTML=l,n.bound&&"hidden"!==n.field.type&&o(function(){n.trigger.focus()},1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label","Use the arrow keys to pick a date")}},adjustPosition:function(){var e,t,n,o,i,a,s,l,u,c;if(!this._o.container){if(this.el.style.position="absolute",t=e=this._o.trigger,n=this.el.offsetWidth,o=this.el.offsetHeight,i=window.innerWidth||r.documentElement.clientWidth,a=window.innerHeight||r.documentElement.clientHeight,s=window.pageYOffset||r.body.scrollTop||r.documentElement.scrollTop,"function"==typeof e.getBoundingClientRect)l=(c=e.getBoundingClientRect()).left+window.pageXOffset,u=c.bottom+window.pageYOffset;else for(l=t.offsetLeft,u=t.offsetTop+t.offsetHeight;t=t.offsetParent;)l+=t.offsetLeft,u+=t.offsetTop;(this._o.reposition&&l+n>i||this._o.position.indexOf("right")>-1&&l-n+e.offsetWidth>0)&&(l=l-n+e.offsetWidth),(this._o.reposition&&u+o>a+s||this._o.position.indexOf("top")>-1&&u-o-e.offsetHeight>0)&&(u=u-o-e.offsetHeight),this.el.style.left=l+"px",this.el.style.top=u+"px"}},render:function(e,t,n){var r=this._o,o=new Date,i=h(e,t),a=new Date(e,t,1).getDay(),s=[],l=[];d(o),r.firstDay>0&&(a-=r.firstDay)<0&&(a+=7);for(var u=0===t?11:t-1,g=11===t?0:t+1,v=0===t?e-1:e,y=11===t?e+1:e,m=h(v,u),E=i+a,S=E;S>7;)S-=7;E+=7-S;for(var _=0,T=0;_<E;_++){var R=new Date(e,t,_-a+1),M=!!c(this._d)&&p(R,this._d),k=p(R,o),N=_<a||_>=i+a,A=_-a+1,I=t,D=e,P=r.startRange&&p(r.startRange,R),x=r.endRange&&p(r.endRange,R),L=r.startRange&&r.endRange&&r.startRange<R&&R<r.endRange,H=r.minDate&&R<r.minDate||r.maxDate&&R>r.maxDate||r.disableWeekends&&f(R)||r.disableDayFn&&r.disableDayFn(R);N&&(_<a?(A=m+A,I=u,D=v):(A-=i,I=g,D=y));var j={day:A,month:I,year:D,isSelected:M,isToday:k,isDisabled:H,isEmpty:N,isStartRange:P,isEndRange:x,isInRange:L,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths};l.push(w(j)),7==++T&&(r.showWeekNumber&&l.unshift(b(_-a,t,e)),s.push(C(l,r.isRTL)),l=[],T=0)}return O(r,s,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(!function(e,t){e.className=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}((" "+e.className+" ").replace(" "+t+" "," "))}(this.el,"is-hidden"),this._v=!0,this.draw(),this._o.bound&&(i(r,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e=this._v;!1!==e&&(this._o.bound&&a(r,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",function(e,t){l(e,t)||(e.className=""===e.className?t:e.className+" "+t)}(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),a(this.el,"mousedown",this._onMouseDown,!0),a(this.el,"touchend",this._onMouseDown,!0),a(this.el,"change",this._onChange),this._o.field&&(a(this._o.field,"change",this._onInputChange),this._o.bound&&(a(this._o.trigger,"click",this._onInputClick),a(this._o.trigger,"focus",this._onInputFocus),a(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},S})},function(e,t,n){(function(e){!function(t,n){e.exports=n()}(0,function(){"use strict";var t,r;function o(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e,t){for(var n in t)f(t,n)&&(e[n]=t[n]);return f(t,"toString")&&(e.toString=t.toString),f(t,"valueOf")&&(e.valueOf=t.valueOf),e}function d(e,t,n,r){return Nt(e,t,n,r,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function g(e){if(null==e._isValid){var t=p(e),n=r.call(t.parsedDateParts,function(e){return null!=e}),o=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function v(e){var t=d(NaN);return null!=e?h(p(t),e):p(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var y=o.momentProperties=[];function m(e,t){var n,r,o;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=p(t)),s(t._locale)||(e._locale=t._locale),y.length>0)for(n=0;n<y.length;n++)s(o=t[r=y[n]])||(e[r]=o);return e}var w=!1;function b(e){m(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===w&&(w=!0,o.updateOffset(this),w=!1)}function C(e){return e instanceof b||null!=e&&null!=e._isAMomentObject}function E(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function O(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=E(t)),n}function S(e,t,n){var r,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&O(e[r])!==O(t[r]))&&a++;return a+i}function _(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function T(e,t){var n=!0;return h(function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),n){for(var r,i=[],a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(var s in r+="\n["+a+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[a];i.push(r)}_(e+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var R,M={};function k(e,t){null!=o.deprecationHandler&&o.deprecationHandler(e,t),M[e]||(_(t),M[e]=!0)}function N(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function A(e,t){var n,r=h({},e);for(n in t)f(t,n)&&(a(e[n])&&a(t[n])?(r[n]={},h(r[n],e[n]),h(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)f(e,n)&&!f(t,n)&&a(e[n])&&(r[n]=h({},r[n]));return r}function I(e){null!=e&&this.set(e)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,R=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)f(e,t)&&n.push(t);return n};var D={};function P(e,t){var n=e.toLowerCase();D[n]=D[n+"s"]=D[t]=e}function x(e){return"string"==typeof e?D[e]||D[e.toLowerCase()]:void 0}function L(e){var t,n,r={};for(n in e)f(e,n)&&(t=x(n))&&(r[t]=e[n]);return r}var H={};function j(e,t){H[e]=t}function F(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var V=/(\[[^\[]*\])|(\\)?([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,B=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,U={},W={};function Y(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(W[e]=o),t&&(W[t[0]]=function(){return F(o.apply(this,arguments),t[1],t[2])}),n&&(W[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function $(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function G(e,t){return e.isValid()?(t=z(t,e.localeData()),U[t]=U[t]||function(e){var t,n,r=e.match(V);for(t=0,n=r.length;t<n;t++)W[r[t]]?r[t]=W[r[t]]:r[t]=$(r[t]);return function(t){var o,i="";for(o=0;o<n;o++)i+=N(r[o])?r[o].call(t,e):r[o];return i}}(t),U[t](e)):e.localeData().invalidDate()}function z(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(B.lastIndex=0;n>=0&&B.test(e);)e=e.replace(B,r),B.lastIndex=0,n-=1;return e}var X=/\d/,K=/\d\d/,q=/\d{3}/,Z=/\d{4}/,Q=/[+-]?\d{6}/,J=/\d\d?/,ee=/\d\d\d\d?/,te=/\d\d\d\d\d\d?/,ne=/\d{1,3}/,re=/\d{1,4}/,oe=/[+-]?\d{1,6}/,ie=/\d+/,ae=/[+-]?\d+/,se=/Z|[+-]\d\d:?\d\d/gi,le=/Z|[+-]\d\d(?::?\d\d)?/gi,ue=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ce={};function fe(e,t,n){ce[e]=N(t)?t:function(e,r){return e&&n?n:t}}function he(e,t){return f(ce,e)?ce[e](t._strict,t._locale):new RegExp(function(e){return de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,o){return t||n||r||o}))}(e))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pe={};function ge(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),l(t)&&(r=function(e,n){n[t]=O(e)}),n=0;n<e.length;n++)pe[e[n]]=r}function ve(e,t){ge(e,function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)})}function ye(e,t,n){null!=t&&f(pe,e)&&pe[e](t,n._a,n,e)}var me=0,we=1,be=2,Ce=3,Ee=4,Oe=5,Se=6,_e=7,Te=8;function Re(e){return Me(e)?366:365}function Me(e){return e%4==0&&e%100!=0||e%400==0}Y("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),Y(0,["YY",2],0,function(){return this.year()%100}),Y(0,["YYYY",4],0,"year"),Y(0,["YYYYY",5],0,"year"),Y(0,["YYYYYY",6,!0],0,"year"),P("year","y"),j("year",1),fe("Y",ae),fe("YY",J,K),fe("YYYY",re,Z),fe("YYYYY",oe,Q),fe("YYYYYY",oe,Q),ge(["YYYYY","YYYYYY"],me),ge("YYYY",function(e,t){t[me]=2===e.length?o.parseTwoDigitYear(e):O(e)}),ge("YY",function(e,t){t[me]=o.parseTwoDigitYear(e)}),ge("Y",function(e,t){t[me]=parseInt(e,10)}),o.parseTwoDigitYear=function(e){return O(e)+(O(e)>68?1900:2e3)};var ke,Ne=Ae("FullYear",!0);function Ae(e,t){return function(n){return null!=n?(De(this,e,n),o.updateOffset(this,t),this):Ie(this,e)}}function Ie(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function De(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Me(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Pe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=function(e,t){return(e%t+t)%t}(t,12);return e+=(t-n)/12,1===n?Me(e)?29:28:31-n%7%2}ke=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},Y("M",["MM",2],"Mo",function(){return this.month()+1}),Y("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Y("MMMM",0,0,function(e){return this.localeData().months(this,e)}),P("month","M"),j("month",8),fe("M",J),fe("MM",J,K),fe("MMM",function(e,t){return t.monthsShortRegex(e)}),fe("MMMM",function(e,t){return t.monthsRegex(e)}),ge(["M","MM"],function(e,t){t[we]=O(e)-1}),ge(["MMM","MMMM"],function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[we]=o:p(n).invalidMonth=e});var xe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Le="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var He="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function je(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=O(t);else if(!l(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Pe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Fe(e){return null!=e?(je(this,e),o.updateOffset(this,!0),this):Ie(this,"Month")}var Ve=ue;var Be=ue;function Ue(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],i=[];for(t=0;t<12;t++)n=d([2e3,t]),r.push(this.monthsShort(n,"")),o.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));for(r.sort(e),o.sort(e),i.sort(e),t=0;t<12;t++)r[t]=de(r[t]),o[t]=de(o[t]);for(t=0;t<24;t++)i[t]=de(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function We(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ye(e,t,n){var r=7+t-n;return-((7+We(e,0,r).getUTCDay()-t)%7)+r-1}function $e(e,t,n,r,o){var i,a,s=1+7*(t-1)+(7+n-r)%7+Ye(e,r,o);return s<=0?a=Re(i=e-1)+s:s>Re(e)?(i=e+1,a=s-Re(e)):(i=e,a=s),{year:i,dayOfYear:a}}function Ge(e,t,n){var r,o,i=Ye(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?r=a+ze(o=e.year()-1,t,n):a>ze(e.year(),t,n)?(r=a-ze(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function ze(e,t,n){var r=Ye(e,t,n),o=Ye(e+1,t,n);return(Re(e)-r+o)/7}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),j("week",5),j("isoWeek",5),fe("w",J),fe("ww",J,K),fe("W",J),fe("WW",J,K),ve(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=O(e)});Y("d",0,"do","day"),Y("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Y("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Y("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),j("day",11),j("weekday",11),j("isoWeekday",11),fe("d",J),fe("e",J),fe("E",J),fe("dd",function(e,t){return t.weekdaysMinRegex(e)}),fe("ddd",function(e,t){return t.weekdaysShortRegex(e)}),fe("dddd",function(e,t){return t.weekdaysRegex(e)}),ve(["dd","ddd","dddd"],function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:p(n).invalidWeekday=e}),ve(["d","e","E"],function(e,t,n,r){t[r]=O(e)});var Xe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ke="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Ze=ue;var Qe=ue;var Je=ue;function et(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=d([2e3,1]).day(t),r=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),i=this.weekdays(n,""),a.push(r),s.push(o),l.push(i),u.push(r),u.push(o),u.push(i);for(a.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=de(s[t]),l[t]=de(l[t]),u[t]=de(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function tt(){return this.hours()%12||12}function nt(e,t){Y(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function rt(e,t){return t._meridiemParse}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,tt),Y("k",["kk",2],0,function(){return this.hours()||24}),Y("hmm",0,0,function(){return""+tt.apply(this)+F(this.minutes(),2)}),Y("hmmss",0,0,function(){return""+tt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),Y("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),Y("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),nt("a",!0),nt("A",!1),P("hour","h"),j("hour",13),fe("a",rt),fe("A",rt),fe("H",J),fe("h",J),fe("k",J),fe("HH",J,K),fe("hh",J,K),fe("kk",J,K),fe("hmm",ee),fe("hmmss",te),fe("Hmm",ee),fe("Hmmss",te),ge(["H","HH"],Ce),ge(["k","kk"],function(e,t,n){var r=O(e);t[Ce]=24===r?0:r}),ge(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ge(["h","hh"],function(e,t,n){t[Ce]=O(e),p(n).bigHour=!0}),ge("hmm",function(e,t,n){var r=e.length-2;t[Ce]=O(e.substr(0,r)),t[Ee]=O(e.substr(r)),p(n).bigHour=!0}),ge("hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[Ce]=O(e.substr(0,r)),t[Ee]=O(e.substr(r,2)),t[Oe]=O(e.substr(o)),p(n).bigHour=!0}),ge("Hmm",function(e,t,n){var r=e.length-2;t[Ce]=O(e.substr(0,r)),t[Ee]=O(e.substr(r))}),ge("Hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[Ce]=O(e.substr(0,r)),t[Ee]=O(e.substr(r,2)),t[Oe]=O(e.substr(o))});var ot,it=Ae("Hours",!0),at={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Le,monthsShort:He,week:{dow:0,doy:6},weekdays:Xe,weekdaysMin:qe,weekdaysShort:Ke,meridiemParse:/[ap]\.?m?\.?/i},st={},lt={};function ut(e){return e?e.toLowerCase().replace("_","-"):e}function ct(t){var r=null;if(!st[t]&&void 0!==e&&e&&e.exports)try{r=ot._abbr;n(649)("./"+t),ft(r)}catch(e){}return st[t]}function ft(e,t){var n;return e&&((n=s(t)?dt(e):ht(e,t))?ot=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ot._abbr}function ht(e,t){if(null!==t){var n,r=at;if(t.abbr=e,null!=st[e])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])r=st[t.parentLocale]._config;else{if(null==(n=ct(t.parentLocale)))return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return st[e]=new I(A(r,t)),lt[e]&&lt[e].forEach(function(e){ht(e.name,e.config)}),ft(e),st[e]}return delete st[e],null}function dt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ot;if(!i(e)){if(t=ct(e))return t;e=[e]}return function(e){for(var t,n,r,o,i=0;i<e.length;){for(t=(o=ut(e[i]).split("-")).length,n=(n=ut(e[i+1]))?n.split("-"):null;t>0;){if(r=ct(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&S(o,n,!0)>=t-1)break;t--}i++}return ot}(e)}function pt(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[we]<0||n[we]>11?we:n[be]<1||n[be]>Pe(n[me],n[we])?be:n[Ce]<0||n[Ce]>24||24===n[Ce]&&(0!==n[Ee]||0!==n[Oe]||0!==n[Se])?Ce:n[Ee]<0||n[Ee]>59?Ee:n[Oe]<0||n[Oe]>59?Oe:n[Se]<0||n[Se]>999?Se:-1,p(e)._overflowDayOfYear&&(t<me||t>be)&&(t=be),p(e)._overflowWeeks&&-1===t&&(t=_e),p(e)._overflowWeekday&&-1===t&&(t=Te),p(e).overflow=t),e}function gt(e,t,n){return null!=e?e:null!=t?t:n}function vt(e){var t,n,r,i,a,s=[];if(!e._d){for(r=function(e){var t=new Date(o.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[be]&&null==e._a[we]&&function(e){var t,n,r,o,i,a,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,a=4,n=gt(t.GG,e._a[me],Ge(At(),1,4).year),r=gt(t.W,1),((o=gt(t.E,1))<1||o>7)&&(l=!0);else{i=e._locale._week.dow,a=e._locale._week.doy;var u=Ge(At(),i,a);n=gt(t.gg,e._a[me],u.year),r=gt(t.w,u.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(l=!0)):o=i}r<1||r>ze(n,i,a)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(s=$e(n,r,o,i,a),e._a[me]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=gt(e._a[me],r[me]),(e._dayOfYear>Re(a)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=We(a,0,e._dayOfYear),e._a[we]=n.getUTCMonth(),e._a[be]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ce]&&0===e._a[Ee]&&0===e._a[Oe]&&0===e._a[Se]&&(e._nextDay=!0,e._a[Ce]=0),e._d=(e._useUTC?We:function(e,t,n,r,o,i,a){var s=new Date(e,t,n,r,o,i,a);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ce]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(p(e).weekdayMismatch=!0)}}var yt=/^\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)?)?$/,mt=/^\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)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,bt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Ct=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Et=/^\/?Date\((\-?\d+)/i;function Ot(e){var t,n,r,o,i,a,s=e._i,l=yt.exec(s)||mt.exec(s);if(l){for(p(e).iso=!0,t=0,n=bt.length;t<n;t++)if(bt[t][1].exec(l[1])){o=bt[t][0],r=!1!==bt[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=Ct.length;t<n;t++)if(Ct[t][1].exec(l[3])){i=(l[2]||" ")+Ct[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!wt.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=o+(i||"")+(a||""),Mt(e)}else e._isValid=!1}var St=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function _t(e,t,n,r,o,i){var a=[function(e){var t=parseInt(e,10);if(t<=49)return 2e3+t;if(t<=999)return 1900+t;return t}(e),He.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return i&&a.push(parseInt(i,10)),a}var Tt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Rt(e){var t=St.exec(function(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}(e._i));if(t){var n=_t(t[4],t[3],t[2],t[5],t[6],t[7]);if(!function(e,t,n){return!e||Ke.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(p(n).weekdayMismatch=!0,n._isValid=!1,!1)}(t[1],n,e))return;e._a=n,e._tzm=function(e,t,n){if(e)return Tt[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}(t[8],t[9],t[10]),e._d=We.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0}else e._isValid=!1}function Mt(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],p(e).empty=!0;var t,n,r,i,a,s=""+e._i,l=s.length,u=0;for(r=z(e._f,e._locale).match(V)||[],t=0;t<r.length;t++)i=r[t],(n=(s.match(he(i,e))||[])[0])&&((a=s.substr(0,s.indexOf(n))).length>0&&p(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),u+=n.length),W[i]?(n?p(e).empty=!1:p(e).unusedTokens.push(i),ye(i,n,e)):e._strict&&!n&&p(e).unusedTokens.push(i);p(e).charsLeftOver=l-u,s.length>0&&p(e).unusedInput.push(s),e._a[Ce]<=12&&!0===p(e).bigHour&&e._a[Ce]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[Ce]=function(e,t,n){var r;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[Ce],e._meridiem),vt(e),pt(e)}else Rt(e);else Ot(e)}function kt(e){var t=e._i,n=e._f;return e._locale=e._locale||dt(e._l),null===t||void 0===n&&""===t?v({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),C(t)?new b(pt(t)):(u(t)?e._d=t:i(n)?function(e){var t,n,r,o,i;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<e._f.length;o++)i=0,t=m({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],Mt(t),g(t)&&(i+=p(t).charsLeftOver,i+=10*p(t).unusedTokens.length,p(t).score=i,(null==r||i<r)&&(r=i,n=t));h(e,n||t)}(e):n?Mt(e):function(e){var t=e._i;s(t)?e._d=new Date(o.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=Et.exec(e._i);null===t?(Ot(e),!1===e._isValid&&(delete e._isValid,Rt(e),!1===e._isValid&&(delete e._isValid,o.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=c(t.slice(0),function(e){return parseInt(e,10)}),vt(e)):a(t)?function(e){if(!e._d){var t=L(e._i);e._a=c([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),vt(e)}}(e):l(t)?e._d=new Date(t):o.createFromInputFallback(e)}(e),g(e)||(e._d=null),e))}function Nt(e,t,n,r,o){var s={};return!0!==n&&!1!==n||(r=n,n=void 0),(a(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||i(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=n,s._i=e,s._f=t,s._strict=r,function(e){var t=new b(pt(kt(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}(s)}function At(e,t,n,r){return Nt(e,t,n,r,!1)}o.createFromInputFallback=T("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),o.ISO_8601=function(){},o.RFC_2822=function(){};var It=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=At.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),Dt=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=At.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:v()});function Pt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return At();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var xt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Lt(e){var t=L(e),n=t.year||0,r=t.quarter||0,o=t.month||0,i=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===ke.call(xt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<xt.length;++r)if(e[xt[r]]){if(n)return!1;parseFloat(e[xt[r]])!==O(e[xt[r]])&&(n=!0)}return!0}(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+a+7*i,this._months=+o+3*r+12*n,this._data={},this._locale=dt(),this._bubble()}function Ht(e){return e instanceof Lt}function jt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,t){Y(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),fe("Z",le),fe("ZZ",le),ge(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Bt(le,e)});var Vt=/([\+\-]|\d\d)/gi;function Bt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Vt)||["-",0,0],o=60*r[1]+O(r[2]);return 0===o?0:"+"===r[0]?o:-o}function Ut(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(C(e)||u(e)?e.valueOf():At(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),o.updateOffset(n,!1),n):At(e).local()}function Wt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Yt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}o.updateOffset=function(){};var $t=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Gt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function zt(e,t){var n,r,o,i=e,a=null;return Ht(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(i={},t?i[t]=e:i.milliseconds=e):(a=$t.exec(e))?(n="-"===a[1]?-1:1,i={y:0,d:O(a[be])*n,h:O(a[Ce])*n,m:O(a[Ee])*n,s:O(a[Oe])*n,ms:O(jt(1e3*a[Se]))*n}):(a=Gt.exec(e))?(n="-"===a[1]?-1:1,i={y:Xt(a[2],n),M:Xt(a[3],n),w:Xt(a[4],n),d:Xt(a[5],n),h:Xt(a[6],n),m:Xt(a[7],n),s:Xt(a[8],n)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(o=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Ut(t,e),e.isBefore(t)?n=Kt(e,t):((n=Kt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(At(i.from),At(i.to)),(i={}).ms=o.milliseconds,i.M=o.months),r=new Lt(i),Ht(e)&&f(e,"_locale")&&(r._locale=e._locale),r}function Xt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Kt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function qt(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(k(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),Zt(this,zt(n="string"==typeof n?+n:n,r),e),this}}function Zt(e,t,n,r){var i=t._milliseconds,a=jt(t._days),s=jt(t._months);e.isValid()&&(r=null==r||r,s&&je(e,Ie(e,"Month")+s*n),a&&De(e,"Date",Ie(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&o.updateOffset(e,a||s))}zt.fn=Lt.prototype,zt.invalid=function(){return zt(NaN)};var Qt=qt(1,"add"),Jt=qt(-1,"subtract");function en(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function tn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=dt(e))&&(this._locale=t),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var nn=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function rn(){return this._locale}function on(e,t){Y(0,[e,e.length],0,t)}function an(e,t,n,r,o){var i;return null==e?Ge(this,r,o).year:(t>(i=ze(e,r,o))&&(t=i),function(e,t,n,r,o){var i=$e(e,t,n,r,o),a=We(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,r,o))}Y(0,["gg",2],0,function(){return this.weekYear()%100}),Y(0,["GG",2],0,function(){return this.isoWeekYear()%100}),on("gggg","weekYear"),on("ggggg","weekYear"),on("GGGG","isoWeekYear"),on("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),j("weekYear",1),j("isoWeekYear",1),fe("G",ae),fe("g",ae),fe("GG",J,K),fe("gg",J,K),fe("GGGG",re,Z),fe("gggg",re,Z),fe("GGGGG",oe,Q),fe("ggggg",oe,Q),ve(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=O(e)}),ve(["gg","GG"],function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)}),Y("Q",0,"Qo","quarter"),P("quarter","Q"),j("quarter",7),fe("Q",X),ge("Q",function(e,t){t[we]=3*(O(e)-1)}),Y("D",["DD",2],"Do","date"),P("date","D"),j("date",9),fe("D",J),fe("DD",J,K),fe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ge(["D","DD"],be),ge("Do",function(e,t){t[be]=O(e.match(J)[0])});var sn=Ae("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),j("dayOfYear",4),fe("DDD",ne),fe("DDDD",q),ge(["DDD","DDDD"],function(e,t,n){n._dayOfYear=O(e)}),Y("m",["mm",2],0,"minute"),P("minute","m"),j("minute",14),fe("m",J),fe("mm",J,K),ge(["m","mm"],Ee);var ln=Ae("Minutes",!1);Y("s",["ss",2],0,"second"),P("second","s"),j("second",15),fe("s",J),fe("ss",J,K),ge(["s","ss"],Oe);var un,cn=Ae("Seconds",!1);for(Y("S",0,0,function(){return~~(this.millisecond()/100)}),Y(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,function(){return 10*this.millisecond()}),Y(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),Y(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),Y(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),Y(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),Y(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),P("millisecond","ms"),j("millisecond",16),fe("S",ne,X),fe("SS",ne,K),fe("SSS",ne,q),un="SSSS";un.length<=9;un+="S")fe(un,ie);function fn(e,t){t[Se]=O(1e3*("0."+e))}for(un="S";un.length<=9;un+="S")ge(un,fn);var hn=Ae("Milliseconds",!1);Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");var dn=b.prototype;function pn(e){return e}dn.add=Qt,dn.calendar=function(e,t){var n=e||At(),r=Ut(n,this).startOf("day"),i=o.calendarFormat(this,r)||"sameElse",a=t&&(N(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,At(n)))},dn.clone=function(){return new b(this)},dn.diff=function(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=Ut(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=x(t)){case"year":i=en(this,r)/12;break;case"month":i=en(this,r);break;case"quarter":i=en(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-o)/864e5;break;case"week":i=(this-r-o)/6048e5;break;default:i=this-r}return n?i:E(i)},dn.endOf=function(e){return void 0===(e=x(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},dn.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)},dn.from=function(e,t){return this.isValid()&&(C(e)&&e.isValid()||At(e).isValid())?zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.fromNow=function(e){return this.from(At(),e)},dn.to=function(e,t){return this.isValid()&&(C(e)&&e.isValid()||At(e).isValid())?zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.toNow=function(e){return this.to(At(),e)},dn.get=function(e){return N(this[e=x(e)])?this[e]():this},dn.invalidAt=function(){return p(this).overflow},dn.isAfter=function(e,t){var n=C(e)?e:At(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=x(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},dn.isBefore=function(e,t){var n=C(e)?e:At(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=x(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},dn.isBetween=function(e,t,n,r){var o=C(e)?e:At(e),i=C(t)?t:At(t);return!!(this.isValid()&&o.isValid()&&i.isValid())&&("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(i,n):!this.isAfter(i,n))},dn.isSame=function(e,t){var n,r=C(e)?e:At(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=x(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},dn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},dn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},dn.isValid=function(){return g(this)},dn.lang=nn,dn.locale=tn,dn.localeData=rn,dn.max=Dt,dn.min=It,dn.parsingFlags=function(){return h({},p(this))},dn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:H[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=L(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(N(this[e=x(e)]))return this[e](t);return this},dn.startOf=function(e){switch(e=x(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},dn.subtract=Jt,dn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},dn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},dn.toDate=function(){return new Date(this.valueOf())},dn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?G(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):N(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",G(n,"Z")):G(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},dn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+o)},dn.toJSON=function(){return this.isValid()?this.toISOString():null},dn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},dn.unix=function(){return Math.floor(this.valueOf()/1e3)},dn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},dn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},dn.year=Ne,dn.isLeapYear=function(){return Me(this.year())},dn.weekYear=function(e){return an.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},dn.isoWeekYear=function(e){return an.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},dn.quarter=dn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},dn.month=Fe,dn.daysInMonth=function(){return Pe(this.year(),this.month())},dn.week=dn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},dn.isoWeek=dn.isoWeeks=function(e){var t=Ge(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},dn.weeksInYear=function(){var e=this.localeData()._week;return ze(this.year(),e.dow,e.doy)},dn.isoWeeksInYear=function(){return ze(this.year(),1,4)},dn.date=sn,dn.day=dn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},dn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},dn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},dn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},dn.hour=dn.hours=it,dn.minute=dn.minutes=ln,dn.second=dn.seconds=cn,dn.millisecond=dn.milliseconds=hn,dn.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Bt(le,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Wt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Zt(this,zt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Wt(this)},dn.utc=function(e){return this.utcOffset(0,e)},dn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Wt(this),"m")),this},dn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Bt(se,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},dn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?At(e).utcOffset():0,(this.utcOffset()-e)%60==0)},dn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},dn.isLocal=function(){return!!this.isValid()&&!this._isUTC},dn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},dn.isUtc=Yt,dn.isUTC=Yt,dn.zoneAbbr=function(){return this._isUTC?"UTC":""},dn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},dn.dates=T("dates accessor is deprecated. Use date instead.",sn),dn.months=T("months accessor is deprecated. Use month instead",Fe),dn.years=T("years accessor is deprecated. Use year instead",Ne),dn.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),dn.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(m(e,this),(e=kt(e))._a){var t=e._isUTC?d(e._a):At(e._a);this._isDSTShifted=this.isValid()&&S(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var gn=I.prototype;function vn(e,t,n,r){var o=dt(),i=d().set(r,t);return o[n](i,e)}function yn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return vn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=vn(e,r,n,"month");return o}function mn(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var o,i=dt(),a=e?i._week.dow:0;if(null!=n)return vn(t,(n+a)%7,r,"day");var s=[];for(o=0;o<7;o++)s[o]=vn(t,(o+a)%7,r,"day");return s}gn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return N(r)?r.call(t,n):r},gn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},gn.invalidDate=function(){return this._invalidDate},gn.ordinal=function(e){return this._ordinal.replace("%d",e)},gn.preparse=pn,gn.postformat=pn,gn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return N(o)?o(e,t,n,r):o.replace(/%d/i,e)},gn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return N(n)?n(t):n.replace(/%s/i,t)},gn.set=function(e){var t,n;for(n in e)N(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},gn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||xe).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},gn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[xe.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},gn.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return function(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=ke.call(this._shortMonthsParse,a))?o:null:-1!==(o=ke.call(this._longMonthsParse,a))?o:null:"MMM"===t?-1!==(o=ke.call(this._shortMonthsParse,a))?o:-1!==(o=ke.call(this._longMonthsParse,a))?o:null:-1!==(o=ke.call(this._longMonthsParse,a))?o:-1!==(o=ke.call(this._shortMonthsParse,a))?o:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},gn.monthsRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||Ue.call(this),e?this._monthsStrictRegex:this._monthsRegex):(f(this,"_monthsRegex")||(this._monthsRegex=Be),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},gn.monthsShortRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||Ue.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(f(this,"_monthsShortRegex")||(this._monthsShortRegex=Ve),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},gn.week=function(e){return Ge(e,this._week.dow,this._week.doy).week},gn.firstDayOfYear=function(){return this._week.doy},gn.firstDayOfWeek=function(){return this._week.dow},gn.weekdays=function(e,t){return e?i(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:i(this._weekdays)?this._weekdays:this._weekdays.standalone},gn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},gn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},gn.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return function(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=ke.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=ke.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=ke.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=ke.call(this._weekdaysParse,a))?o:-1!==(o=ke.call(this._shortWeekdaysParse,a))?o:-1!==(o=ke.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=ke.call(this._shortWeekdaysParse,a))?o:-1!==(o=ke.call(this._weekdaysParse,a))?o:-1!==(o=ke.call(this._minWeekdaysParse,a))?o:null:-1!==(o=ke.call(this._minWeekdaysParse,a))?o:-1!==(o=ke.call(this._weekdaysParse,a))?o:-1!==(o=ke.call(this._shortWeekdaysParse,a))?o:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},gn.weekdaysRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=Ze),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},gn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},gn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},gn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},gn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ft("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===O(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=T("moment.lang is deprecated. Use moment.locale instead.",ft),o.langData=T("moment.langData is deprecated. Use moment.localeData instead.",dt);var wn=Math.abs;function bn(e,t,n,r){var o=zt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function Cn(e){return e<0?Math.floor(e):Math.ceil(e)}function En(e){return 4800*e/146097}function On(e){return 146097*e/4800}function Sn(e){return function(){return this.as(e)}}var _n=Sn("ms"),Tn=Sn("s"),Rn=Sn("m"),Mn=Sn("h"),kn=Sn("d"),Nn=Sn("w"),An=Sn("M"),In=Sn("y");function Dn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=Dn("milliseconds"),xn=Dn("seconds"),Ln=Dn("minutes"),Hn=Dn("hours"),jn=Dn("days"),Fn=Dn("months"),Vn=Dn("years");var Bn=Math.round,Un={ss:44,s:45,m:45,h:22,d:26,M:11};var Wn=Math.abs;function Yn(e){return(e>0)-(e<0)||+e}function $n(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Wn(this._milliseconds)/1e3,r=Wn(this._days),o=Wn(this._months);t=E((e=E(n/60))/60),n%=60,e%=60;var i=E(o/12),a=o%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",f=this.asSeconds();if(!f)return"P0D";var h=f<0?"-":"",d=Yn(this._months)!==Yn(f)?"-":"",p=Yn(this._days)!==Yn(f)?"-":"",g=Yn(this._milliseconds)!==Yn(f)?"-":"";return h+"P"+(i?d+i+"Y":"")+(a?d+a+"M":"")+(s?p+s+"D":"")+(l||u||c?"T":"")+(l?g+l+"H":"")+(u?g+u+"M":"")+(c?g+c+"S":"")}var Gn=Lt.prototype;return Gn.isValid=function(){return this._isValid},Gn.abs=function(){var e=this._data;return this._milliseconds=wn(this._milliseconds),this._days=wn(this._days),this._months=wn(this._months),e.milliseconds=wn(e.milliseconds),e.seconds=wn(e.seconds),e.minutes=wn(e.minutes),e.hours=wn(e.hours),e.months=wn(e.months),e.years=wn(e.years),this},Gn.add=function(e,t){return bn(this,e,t,1)},Gn.subtract=function(e,t){return bn(this,e,t,-1)},Gn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=x(e))||"year"===e)return t=this._days+r/864e5,n=this._months+En(t),"month"===e?n:n/12;switch(t=this._days+Math.round(On(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Gn.asMilliseconds=_n,Gn.asSeconds=Tn,Gn.asMinutes=Rn,Gn.asHours=Mn,Gn.asDays=kn,Gn.asWeeks=Nn,Gn.asMonths=An,Gn.asYears=In,Gn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*O(this._months/12):NaN},Gn._bubble=function(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,l=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*Cn(On(s)+a),a=0,s=0),l.milliseconds=i%1e3,e=E(i/1e3),l.seconds=e%60,t=E(e/60),l.minutes=t%60,n=E(t/60),l.hours=n%24,s+=o=E(En(a+=E(n/24))),a-=Cn(On(o)),r=E(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},Gn.clone=function(){return zt(this)},Gn.get=function(e){return e=x(e),this.isValid()?this[e+"s"]():NaN},Gn.milliseconds=Pn,Gn.seconds=xn,Gn.minutes=Ln,Gn.hours=Hn,Gn.days=jn,Gn.weeks=function(){return E(this.days()/7)},Gn.months=Fn,Gn.years=Vn,Gn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=zt(e).abs(),o=Bn(r.as("s")),i=Bn(r.as("m")),a=Bn(r.as("h")),s=Bn(r.as("d")),l=Bn(r.as("M")),u=Bn(r.as("y")),c=o<=Un.ss&&["s",o]||o<Un.s&&["ss",o]||i<=1&&["m"]||i<Un.m&&["mm",i]||a<=1&&["h"]||a<Un.h&&["hh",a]||s<=1&&["d"]||s<Un.d&&["dd",s]||l<=1&&["M"]||l<Un.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=t,c[3]=+e>0,c[4]=n,function(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Gn.toISOString=$n,Gn.toString=$n,Gn.toJSON=$n,Gn.locale=tn,Gn.localeData=rn,Gn.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$n),Gn.lang=nn,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),fe("x",ae),fe("X",/[+-]?\d+(\.\d{1,3})?/),ge("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ge("x",function(e,t,n){n._d=new Date(O(e))}),o.version="2.23.0",function(e){t=e}(At),o.fn=dn,o.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},o.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},o.now=function(){return Date.now?Date.now():+new Date},o.utc=d,o.unix=function(e){return At(1e3*e)},o.months=function(e,t){return yn(e,t,"months")},o.isDate=u,o.locale=ft,o.invalid=v,o.duration=zt,o.isMoment=C,o.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},o.parseZone=function(){return At.apply(null,arguments).parseZone()},o.localeData=dt,o.isDuration=Ht,o.monthsShort=function(e,t){return yn(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},o.defineLocale=ht,o.updateLocale=function(e,t){if(null!=t){var n,r,o=at;null!=(r=ct(e))&&(o=r._config),(n=new I(t=A(o,t))).parentLocale=st[e],st[e]=n,ft(e)}else null!=st[e]&&(null!=st[e].parentLocale?st[e]=st[e].parentLocale:null!=st[e]&&delete st[e]);return st[e]},o.locales=function(){return R(st)},o.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},o.normalizeUnits=x,o.relativeTimeRounding=function(e){return void 0===e?Bn:"function"==typeof e&&(Bn=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==Un[e]&&(void 0===t?Un[e]:(Un[e]=t,"s"===e&&(Un.ss=t-1),!0))},o.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},o.prototype=dn,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o})}).call(t,n(183)(e))},function(e,t,n){var r={"./af":313,"./af.js":313,"./ar":314,"./ar-dz":315,"./ar-dz.js":315,"./ar-kw":316,"./ar-kw.js":316,"./ar-ly":317,"./ar-ly.js":317,"./ar-ma":318,"./ar-ma.js":318,"./ar-sa":319,"./ar-sa.js":319,"./ar-tn":320,"./ar-tn.js":320,"./ar.js":314,"./az":321,"./az.js":321,"./be":322,"./be.js":322,"./bg":323,"./bg.js":323,"./bm":324,"./bm.js":324,"./bn":325,"./bn.js":325,"./bo":326,"./bo.js":326,"./br":327,"./br.js":327,"./bs":328,"./bs.js":328,"./ca":329,"./ca.js":329,"./cs":330,"./cs.js":330,"./cv":331,"./cv.js":331,"./cy":332,"./cy.js":332,"./da":333,"./da.js":333,"./de":334,"./de-at":335,"./de-at.js":335,"./de-ch":336,"./de-ch.js":336,"./de.js":334,"./dv":337,"./dv.js":337,"./el":338,"./el.js":338,"./en-au":339,"./en-au.js":339,"./en-ca":340,"./en-ca.js":340,"./en-gb":341,"./en-gb.js":341,"./en-ie":342,"./en-ie.js":342,"./en-il":343,"./en-il.js":343,"./en-nz":344,"./en-nz.js":344,"./eo":345,"./eo.js":345,"./es":346,"./es-do":347,"./es-do.js":347,"./es-us":348,"./es-us.js":348,"./es.js":346,"./et":349,"./et.js":349,"./eu":350,"./eu.js":350,"./fa":351,"./fa.js":351,"./fi":352,"./fi.js":352,"./fo":353,"./fo.js":353,"./fr":354,"./fr-ca":355,"./fr-ca.js":355,"./fr-ch":356,"./fr-ch.js":356,"./fr.js":354,"./fy":357,"./fy.js":357,"./gd":358,"./gd.js":358,"./gl":359,"./gl.js":359,"./gom-latn":360,"./gom-latn.js":360,"./gu":361,"./gu.js":361,"./he":362,"./he.js":362,"./hi":363,"./hi.js":363,"./hr":364,"./hr.js":364,"./hu":365,"./hu.js":365,"./hy-am":366,"./hy-am.js":366,"./id":367,"./id.js":367,"./is":368,"./is.js":368,"./it":369,"./it.js":369,"./ja":370,"./ja.js":370,"./jv":371,"./jv.js":371,"./ka":372,"./ka.js":372,"./kk":373,"./kk.js":373,"./km":374,"./km.js":374,"./kn":375,"./kn.js":375,"./ko":376,"./ko.js":376,"./ku":377,"./ku.js":377,"./ky":378,"./ky.js":378,"./lb":379,"./lb.js":379,"./lo":380,"./lo.js":380,"./lt":381,"./lt.js":381,"./lv":382,"./lv.js":382,"./me":383,"./me.js":383,"./mi":384,"./mi.js":384,"./mk":385,"./mk.js":385,"./ml":386,"./ml.js":386,"./mn":387,"./mn.js":387,"./mr":388,"./mr.js":388,"./ms":389,"./ms-my":390,"./ms-my.js":390,"./ms.js":389,"./mt":391,"./mt.js":391,"./my":392,"./my.js":392,"./nb":393,"./nb.js":393,"./ne":394,"./ne.js":394,"./nl":395,"./nl-be":396,"./nl-be.js":396,"./nl.js":395,"./nn":397,"./nn.js":397,"./pa-in":398,"./pa-in.js":398,"./pl":399,"./pl.js":399,"./pt":400,"./pt-br":401,"./pt-br.js":401,"./pt.js":400,"./ro":402,"./ro.js":402,"./ru":403,"./ru.js":403,"./sd":404,"./sd.js":404,"./se":405,"./se.js":405,"./si":406,"./si.js":406,"./sk":407,"./sk.js":407,"./sl":408,"./sl.js":408,"./sq":409,"./sq.js":409,"./sr":410,"./sr-cyrl":411,"./sr-cyrl.js":411,"./sr.js":410,"./ss":412,"./ss.js":412,"./sv":413,"./sv.js":413,"./sw":414,"./sw.js":414,"./ta":415,"./ta.js":415,"./te":416,"./te.js":416,"./tet":417,"./tet.js":417,"./tg":418,"./tg.js":418,"./th":419,"./th.js":419,"./tl-ph":420,"./tl-ph.js":420,"./tlh":421,"./tlh.js":421,"./tr":422,"./tr.js":422,"./tzl":423,"./tzl.js":423,"./tzm":424,"./tzm-latn":425,"./tzm-latn.js":425,"./tzm.js":424,"./ug-cn":426,"./ug-cn.js":426,"./uk":427,"./uk.js":427,"./ur":428,"./ur.js":428,"./uz":429,"./uz-latn":430,"./uz-latn.js":430,"./uz.js":429,"./vi":431,"./vi.js":431,"./x-pseudo":432,"./x-pseudo.js":432,"./yo":433,"./yo.js":433,"./zh-cn":434,"./zh-cn.js":434,"./zh-hk":435,"./zh-hk.js":435,"./zh-tw":436,"./zh-tw.js":436};function o(e){return n(i(e))}function i(e){var t=r[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=649},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=i(n(311)),o=i(n(23));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),l(this,c(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,r.default),function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(t,[{key:"prepare",value:function(e,n,r,o,i,a){u(c(t.prototype),"prepare",this).call(this,e,n,r,o,i,a),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}]),t}();o.default.getSingleton().add("beforeValidate",function(e,t,n){var r=this.getCellMeta(t,this.propToCol(n));r.editor===h&&void 0===r.strict&&(r.filter=!1,r.strict=!0)});var d=h;t.default=d},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(84));function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,a(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(t,r.default),t}();t.default=l},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(n(84));function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),s(this,u(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,o.default),function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(t,[{key:"createElements",value:function(){l(u(t.prototype),"createElements",this).call(this),this.TEXTAREA=document.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,(0,r.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}]),t}();t.default=f},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(16),i=n(24),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(82)),s=n(2);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var u=a.default.prototype.extend();u.prototype.init=function(){this.select=document.createElement("SELECT"),(0,r.addClass)(this.select,"htSelectEditor"),this.select.style.display="none",this.instance.rootElement.appendChild(this.select),this.registerHooks()},u.prototype.registerHooks=function(){var e=this;this.instance.addHook("afterScrollHorizontally",function(){return e.refreshDimensions()}),this.instance.addHook("afterScrollVertically",function(){return e.refreshDimensions()}),this.instance.addHook("afterColumnResize",function(){return e.refreshDimensions()}),this.instance.addHook("afterRowResize",function(){return e.refreshDimensions()})},u.prototype.prepare=function(){for(var e=this,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];a.default.prototype.prepare.apply(this,n);var i,l=this.cellProperties.selectOptions;i="function"==typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),(0,r.empty)(this.select),(0,s.objectEach)(i,function(t,n){var o=document.createElement("OPTION");o.value=n,(0,r.fastInnerHTML)(o,t),e.select.appendChild(o)})},u.prototype.prepareOptions=function(e){var t={};if(Array.isArray(e))for(var n=0,r=e.length;n<r;n++)t[e[n]]=e[n];else"object"===l(e)&&(t=e);return t},u.prototype.getValue=function(){return this.select.value},u.prototype.setValue=function(e){this.select.value=e};var c=function(e){var t=this.getActiveEditor(),n=t.select.selectedIndex-1,r=t.select.selectedIndex+1;switch(e.keyCode){case i.KEY_CODES.ARROW_UP:n>=0&&(t.select[n].selected=!0),(0,o.stopImmediatePropagation)(e),e.preventDefault();break;case i.KEY_CODES.ARROW_DOWN:r<=t.select.length-1&&(t.select[r].selected=!0),(0,o.stopImmediatePropagation)(e),e.preventDefault()}};u.prototype.open=function(){this._opened=!0,this.refreshDimensions(),this.select.style.display="",this.instance.addHook("beforeKeyDown",c)},u.prototype.close=function(){this._opened=!1,this.select.style.display="none",this.instance.removeHook("beforeKeyDown",c)},u.prototype.focus=function(){this.select.focus()},u.prototype.refreshValue=function(){var e=this.instance.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()},u.prototype.refreshDimensions=function(){if(this.state===a.EditorState.EDITING)if(this.TD=this.getEditedCell(),this.TD){var e,t=(0,r.offset)(this.TD),n=(0,r.offset)(this.instance.rootElement),o=(0,r.getScrollableElement)(this.TD),i=this.checkEditorSection(),s=(0,r.outerWidth)(this.TD)+1,l=(0,r.outerHeight)(this.TD)+1,u=t.top-n.top-1-(o.scrollTop||0),c=t.left-n.left-1-(o.scrollLeft||0);switch(i){case"top":e=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":e=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":e=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":e=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":e=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode)}0===this.instance.getSelectedLast()[0]&&(u+=1),0===this.instance.getSelectedLast()[1]&&(c+=1);var f=this.select.style;e&&-1!==e?f[e[0]]=e[1]:(0,r.resetCssTransform)(this.select);var h=(0,r.getComputedStyle)(this.TD);parseInt(h.borderTopWidth,10)>0&&(l-=1),parseInt(h.borderLeftWidth,10)>0&&(s-=1),f.height="".concat(l,"px"),f.minWidth="".concat(s,"px"),f.top="".concat(u,"px"),f.left="".concat(c,"px"),f.margin="0px"}else this.close()},u.prototype.getEditedCell=function(){var e;switch(this.checkEditorSection()){case"top":e=this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=101;break;case"corner":e=this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=103;break;case"left":e=this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=102;break;default:e=this.instance.getCell(this.row,this.col),this.select.style.zIndex=""}return-1!==e&&-2!==e?e:void 0};var f=u;t.default=f},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3);var o=function(e,t,n,o,i,a,s){var l=[],u=[];s.className&&(t.className?t.className="".concat(t.className," ").concat(s.className):t.className=s.className),s.readOnly&&l.push(s.readOnlyCellClassName),!1===s.valid&&s.invalidCellClassName?l.push(s.invalidCellClassName):u.push(s.invalidCellClassName),!1===s.wordWrap&&s.noWordWrapClassName&&l.push(s.noWordWrapClassName),!a&&s.placeholder&&l.push(s.placeholderCellClassName),(0,r.removeClass)(t,u),(0,r.addClass)(t,l)};t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(n(10)),i=n(13),a=n(20);document.createElement("DIV").className="htAutocompleteWrapper";var s=document.createElement("DIV");s.className="htAutocompleteArrow",s.appendChild(document.createTextNode(String.fromCharCode(9660)));var l=function(e,t,n,l,u,c,f){for(var h=f.allowHtml?"html":"text",d=s.cloneNode(!0),p=arguments.length,g=new Array(p>7?p-7:0),v=7;v<p;v++)g[v-7]=arguments[v];if((0,a.getRenderer)(h).apply(this,[e,t,n,l,u,c,f].concat(g)),t.firstChild||t.appendChild(document.createTextNode(String.fromCharCode(160))),t.insertBefore(d,t.firstChild),(0,r.addClass)(t,"htAutocomplete"),!e.acArrowListener){var y=new o.default(e);e.acArrowListener=function(o){(0,r.hasClass)(o.target,"htAutocompleteArrow")&&e.view.wt.getSetting("onCellDblClick",null,new i.CellCoords(n,l),t)},y.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",function(){y.destroy()})}};t.default=l},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(42),i=function(e){return e&&e.__esModule?e:{default:e}}(n(10)),a=n(24),s=n(51),l=n(16),u=n(20);var c=new WeakMap,f=new WeakMap,h="htBadValue";function d(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}var p=function(e,t,n,p,g,v,y){for(var m=arguments.length,w=new Array(m>7?m-7:0),b=7;b<m;b++)w[b-7]=arguments[b];(0,u.getRenderer)("base").apply(this,[e,t,n,p,g,v,y].concat(w)),function(e){var t=f.get(e);t||((t=new i.default(e)).addEventListener(e.rootElement,"click",function(t){return function(e,t){if(!d(e.target))return!1;var n=parseInt(e.target.getAttribute("data-row"),10),r=parseInt(e.target.getAttribute("data-col"),10);t.getCellMeta(n,r).readOnly&&e.preventDefault()}(t,e)}),t.addEventListener(e.rootElement,"mouseup",function(t){return function(e,t){d(e.target)&&setTimeout(t.listen,10)}(t,e)}),t.addEventListener(e.rootElement,"change",function(t){return function(e,t){if(!d(e.target))return!1;var n=parseInt(e.target.getAttribute("data-row"),10),r=parseInt(e.target.getAttribute("data-col"),10),o=t.getCellMeta(n,r);if(!o.readOnly){var i=null;i=e.target.checked?void 0===o.uncheckedTemplate||o.checkedTemplate:void 0!==o.uncheckedTemplate&&o.uncheckedTemplate,t.setDataAtCell(n,r,i)}}(t,e)}),f.set(e,t))}(e);var C=function(){var e=document.createElement("input");return e.className="htCheckboxRendererInput",e.type="checkbox",e.setAttribute("autocomplete","off"),e.setAttribute("tabindex","-1"),e.cloneNode(!1)}(),E=y.label,O=!1;if(void 0===y.checkedTemplate&&(y.checkedTemplate=!0),void 0===y.uncheckedTemplate&&(y.uncheckedTemplate=!1),(0,r.empty)(t),v===y.checkedTemplate||(0,o.equalsIgnoreCase)(v,y.checkedTemplate)?C.checked=!0:v===y.uncheckedTemplate||(0,o.equalsIgnoreCase)(v,y.uncheckedTemplate)?C.checked=!1:null===v?(0,r.addClass)(C,"noValue"):(C.style.display="none",(0,r.addClass)(C,h),O=!0),C.setAttribute("data-row",n),C.setAttribute("data-col",p),!O&&E){var S="";E.value?S="function"==typeof E.value?E.value.call(this,n,p,g,v):E.value:E.property&&(S=e.getDataAtRowProp(n,E.property));var _=function(e){var t=document.createElement("label");return t.className="htCheckboxRendererLabel",t.appendChild(document.createTextNode(e)),t.cloneNode(!0)}(S);"before"===E.position?_.appendChild(C):_.insertBefore(C,_.firstChild),C=_}function T(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=e.getSelectedRangeLast();if(n){for(var r=n.getTopLeftCorner(),o=r.row,i=r.col,a=n.getBottomRightCorner(),s=a.row,l=a.col,u=[],c=o;c<=s;c+=1)for(var f=i;f<=l;f+=1){var h=e.getCellMeta(c,f);if("checkbox"!==h.type)return;if(!0!==h.readOnly){void 0===h.checkedTemplate&&(h.checkedTemplate=!0),void 0===h.uncheckedTemplate&&(h.uncheckedTemplate=!1);var d=e.getDataAtCell(c,f);!1===t?[h.checkedTemplate,h.checkedTemplate.toString()].includes(d)?u.push([c,f,h.uncheckedTemplate]):[h.uncheckedTemplate,h.uncheckedTemplate.toString(),null,void 0].includes(d)&&u.push([c,f,h.checkedTemplate]):u.push([c,f,h.uncheckedTemplate])}}u.length>0&&e.setDataAtCell(u)}}t.appendChild(C),O&&t.appendChild(document.createTextNode("#bad-value#")),c.has(e)||(c.set(e,!0),e.addHook("beforeKeyDown",function(t){var n=(0,s.partial)(a.isKey,t.keyCode);!e.getSettings().enterBeginsEditing&&n("ENTER")||(n("".concat("SPACE|ENTER","|").concat("DELETE|BACKSPACE"))&&!(0,l.isImmediatePropagationStopped)(t)&&function(t){var n=e.getSelectedRangeLast();if(n)for(var r=n.getTopLeftCorner(),o=n.getBottomRightCorner(),i=r.row;i<=o.row;i++)for(var a=r.col;a<=o.col;a++){var s=e.getCellMeta(i,a);if("checkbox"!==s.type)return;var l=e.getCell(i,a);if(null===l||void 0===l)t(i,a,s);else{var u=l.querySelectorAll("input[type=checkbox]");u.length>0&&!s.readOnly&&t(u)}}}(function(){(0,l.stopImmediatePropagation)(t),t.preventDefault()}),n("SPACE|ENTER")&&T(),n("DELETE|BACKSPACE")&&T(!0))}))};t.default=p},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(20);var i=function(e,t,n,i,a,s){for(var l=arguments.length,u=new Array(l>6?l-6:0),c=6;c<l;c++)u[c-6]=arguments[c];(0,o.getRenderer)("base").apply(this,[e,t,n,i,a,s].concat(u)),(0,r.fastInnerHTML)(t,null===s||void 0===s?"":s)};t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(437)),o=n(20),i=n(5);var a=function(e,t,n,a,s,l,u){var c=l;if((0,i.isNumeric)(c)){var f=u.numericFormat,h=f&&f.culture||"-",d=f&&f.pattern,p=u.className||"",g=p.length?p.split(" "):[];if(void 0!==h&&!r.default.languages()[h]){var v=h.replace("-",""),y=r.default.allLanguages?r.default.allLanguages[h]:r.default[v];y&&r.default.registerLanguage(y)}r.default.setLanguage(h),c=(0,r.default)(c).format(d||"0"),g.indexOf("htLeft")<0&&g.indexOf("htCenter")<0&&g.indexOf("htRight")<0&&g.indexOf("htJustify")<0&&g.push("htRight"),g.indexOf("htNumeric")<0&&g.push("htNumeric"),u.className=g.join(" ")}(0,o.getRenderer)("text")(e,t,n,a,s,c,u)};t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(20),i=n(5);var a=function(e,t,n,a,s,l,u){for(var c=arguments.length,f=new Array(c>7?c-7:0),h=7;h<c;h++)f[h-7]=arguments[h];(0,o.getRenderer)("text").apply(this,[e,t,n,a,s,l,u].concat(f));var d=u.hashLength||t.innerHTML.length,p=u.hashSymbol||"*",g="";(0,i.rangeEach)(d-1,function(){g+=p}),(0,r.fastInnerHTML)(t,g)};t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(14),i=n(20);var a=function(e,t,n,a,s,l,u){for(var c=arguments.length,f=new Array(c>7?c-7:0),h=7;h<c;h++)f[h-7]=arguments[h];(0,i.getRenderer)("base").apply(this,[e,t,n,a,s,l,u].concat(f));var d=l;if(!d&&u.placeholder&&(d=u.placeholder),d=(0,o.stringify)(d),e.getSettings().trimWhitespace||(d=d.replace(/ /g,String.fromCharCode(160))),u.rendererTemplate){(0,r.empty)(t);var p=document.createElement("TEMPLATE");p.setAttribute("bind","{{}}"),p.innerHTML=u.rendererTemplate,HTMLTemplateElement.decorate(p),p.model=e.getSourceDataAtRow(n),t.appendChild(p)}else(0,r.fastInnerText)(t,d)};t.default=a},function(e,t,n){"use strict";function r(e,t){var n=e;return function(e){for(var r=!1,o=0,i=e.length;o<i;o++)if(n===e[o]){r=!0;break}t(r)}}t.__esModule=!0,t.default=function(e,t){var n=e;null!==n&&void 0!==n||(n="");if(this.allowEmpty&&""===n)return void t(!0);this.strict&&this.source?"function"==typeof this.source?this.source(n,r(n,t)):r(n,t)(this.source):t(!0)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n=(0,i.getEditorInstance)("date",this.instance),o=e,s=!0;null!==o&&void 0!==o||(o="");var l=(0,r.default)(new Date(o)).isValid()||(0,r.default)(o,this.dateFormat||n.defaultDateFormat,!0).isValid(),u=(0,r.default)(o,this.dateFormat||n.defaultDateFormat,!0).isValid();this.allowEmpty&&""===o&&(l=!0,u=!0);l||(s=!1);!l&&u&&(s=!0);if(l&&!u)if(!0===this.correctFormat){var c=a(o,this.dateFormat),f=this.instance.runHooks("unmodifyRow",this.row),h=this.instance.runHooks("unmodifyCol",this.col);this.instance.setDataAtCell(f,h,c,"dateValidator"),s=!0}else s=!1;t(s)},t.correctFormat=a;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(36)),o=n(438),i=n(28);function a(e,t){var n=(0,r.default)((0,o.getNormalizedDate)(e)),i=(0,r.default)(e,t),a=e.search(/[A-z]/g)>-1;return(n.isValid()&&n.format("x")===i.format("x")||!i.isValid()||a?n:i).format(t)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n=e;null!==n&&void 0!==n||(n="");this.allowEmpty&&""===n?t(!0):t(""!==n&&(0,r.isNumeric)(e))};var r=n(5)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n=this.timeFormat||"h:mm:ss a",i=!0,a=e;null===a&&(a="");a=/^\d{3,}$/.test(a)?parseInt(a,10):a;var s=/^\d{1,2}$/.test(a);s&&(a+=":00");var l=(0,r.default)(a,o,!0).isValid()?(0,r.default)(a):(0,r.default)(a,n),u=l.isValid(),c=(0,r.default)(a,n,!0).isValid()&&!s;this.allowEmpty&&""===a&&(u=!0,c=!0);u||(i=!1);!u&&c&&(i=!0);if(u&&!c)if(!0===this.correctFormat){var f=l.format(n),h=this.instance.runHooks("unmodifyRow",this.row),d=this.instance.runHooks("unmodifyCol",this.col);this.instance.setDataAtCell(h,d,f,"timeValidator"),i=!0}else i=!1;t(i)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(36));var o=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"]},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(28),o=n(20),i=n(55),a={editor:(0,r.getEditor)("autocomplete"),renderer:(0,o.getRenderer)("autocomplete"),validator:(0,i.getValidator)("autocomplete")};t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(28),o=n(20),i={editor:(0,r.getEditor)("checkbox"),renderer:(0,o.getRenderer)("checkbox")};t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(28),o=n(20),i=n(55),a={editor:(0,r.getEditor)("date"),renderer:(0,o.getRenderer)("autocomplete"),validator:(0,i.getValidator)("date")};t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(28),o=n(20),i=n(55),a={editor:(0,r.getEditor)("dropdown"),renderer:(0,o.getRenderer)("autocomplete"),validator:(0,i.getValidator)("autocomplete")};t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(28),o=n(20),i={editor:(0,r.getEditor)("handsontable"),renderer:(0,o.getRenderer)("autocomplete")};t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(28),o=n(20),i=n(55),a={editor:(0,r.getEditor)("numeric"),renderer:(0,o.getRenderer)("numeric"),validator:(0,i.getValidator)("numeric"),dataType:"number"};t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(28),o=n(20),i={editor:(0,r.getEditor)("password"),renderer:(0,o.getRenderer)("password"),copyable:!1};t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(28),o=n(20),i={editor:(0,r.getEditor)("text"),renderer:(0,o.getRenderer)("text")};t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(28),o=n(20),i=n(55),a={editor:(0,r.getEditor)("text"),renderer:(0,o.getRenderer)("text"),validator:(0,i.getValidator)("time")};t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=f(n(439)),o=n(101),i=n(136),a=n(2),s=n(1),l=f(n(676)),u=n(5),c=f(n(677));function f(e){return e&&e.__esModule?e:{default:e}}function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t,n){var r=this;this.instance=e,this.priv=t,this.GridSettings=n,this.dataSource=this.instance.getSettings().data,this.cachedLength=null,this.skipCache=!1,this.latestSourceRowsCount=0,this.dataSource&&this.dataSource[0]?this.duckSchema=this.recursiveDuckSchema(this.dataSource[0]):this.duckSchema={},this.createMap(),this.interval=l.default.create(function(){return r.clearLengthCache()},"15fps"),this.instance.addHook("skipLengthCache",function(e){return r.onSkipLengthCache(e)}),this.onSkipLengthCache(500)}d.prototype.DESTINATION_RENDERER=1,d.prototype.DESTINATION_CLIPBOARD_GENERATOR=2,d.prototype.recursiveDuckSchema=function(e){return(0,a.duckSchema)(e)},d.prototype.recursiveDuckColumns=function(e,t,n){var r,o=this,i=t,s=n;return void 0===i&&(i=0,s=""),"object"!==h(e)||Array.isArray(e)||(0,a.objectEach)(e,function(e,t){null===e?(r=s+t,o.colToPropCache.push(r),o.propToColCache.set(r,i),i+=1):i=o.recursiveDuckColumns(e,i,"".concat(t,"."))}),i},d.prototype.createMap=function(){var e,t=this.getSchema();if(void 0===t)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");this.colToPropCache=[],this.propToColCache=new c.default;var n=this.instance.getSettings().columns;if(n){var r=this.instance.getSettings().maxCols,o=Math.min(r,n.length),i=0,s=!1,l=(0,a.deepObjectSize)(t);for("function"==typeof n&&(o=l>0?l:this.instance.countSourceCols(),s=!0),e=0;e<o;e++){var u=s?n(e):n[e];if((0,a.isObject)(u)){if(void 0!==u.data){var f=s?i:e;this.colToPropCache[f]=u.data,this.propToColCache.set(u.data,f)}i+=1}}}else this.recursiveDuckColumns(t)},d.prototype.colToProp=function(e){var t=this.instance.runHooks("modifyCol",e);return!isNaN(t)&&this.colToPropCache&&void 0!==this.colToPropCache[t]?this.colToPropCache[t]:t},d.prototype.propToCol=function(e){var t;return t=void 0===this.propToColCache.get(e)?e:this.propToColCache.get(e),t=this.instance.runHooks("unmodifyCol",t)},d.prototype.getSchema=function(){var e=this.instance.getSettings().dataSchema;return e?"function"==typeof e?e():e:this.duckSchema},d.prototype.createRow=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0,o=0,i=e;if(("number"!=typeof i||i>=this.instance.countSourceRows())&&(i=this.instance.countSourceRows()),!1===this.instance.runHooks("beforeCreateRow",i,n,r))return 0;for(var s=this.instance.getSettings().maxRows,l=this.instance.countCols(),c=function(){var e=null;"array"===t.instance.dataType?t.instance.getSettings().dataSchema?e=(0,a.deepClone)(t.getSchema()):(e=[],(0,u.rangeEach)(l-1,function(){return e.push(null)})):"function"===t.instance.dataType?e=t.instance.getSettings().dataSchema(i):(e={},(0,a.deepExtend)(e,t.getSchema())),i===t.instance.countSourceRows()?t.dataSource.push(e):t.spliceData(i,0,e),o+=1};o<n&&this.instance.countSourceRows()<s;)c();return this.instance.runHooks("afterCreateRow",i,o,r),this.instance.forceFullRender=!0,o},d.prototype.createCol=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;if(!this.instance.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");var r,o,a=this.instance.countSourceRows(),s=this.dataSource,l=this.instance.countCols(),u="number"!=typeof e||e>=l?l:e,c=0;this.instance.runHooks("beforeCreateCol",u,t,n),o=u;for(var f=this.instance.getSettings().maxCols;c<t&&this.instance.countCols()<f;){if(r=(0,i.columnFactory)(this.GridSettings,this.priv.columnsSettingConflicts),"number"!=typeof u||u>=this.instance.countCols()){if(a>0)for(var h=0;h<a;h++)void 0===s[h]&&(s[h]=[]),s[h].push(null);else s.push([null]);this.priv.columnSettings.push(r)}else{for(var d=0;d<a;d++)s[d].splice(o,0,null);this.priv.columnSettings.splice(o,0,r)}c+=1,o+=1}return this.instance.runHooks("afterCreateCol",u,c,n),this.instance.forceFullRender=!0,c},d.prototype.removeRow=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0,r="number"!=typeof e?-t:e,o=this.instance.runHooks("modifyRemovedAmount",t,r);r=(this.instance.countSourceRows()+r)%this.instance.countSourceRows();var i=this.visualRowsToPhysical(r,o);if(!1!==this.instance.runHooks("beforeRemoveRow",r,o,i,n)){var a=this.dataSource,s=this.filterData(r,o);s&&(a.length=0,Array.prototype.push.apply(a,s)),this.instance.runHooks("afterRemoveRow",r,o,i,n),this.instance.forceFullRender=!0}},d.prototype.removeCol=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;if("object"===this.instance.dataType||this.instance.getSettings().columns)throw new Error("cannot remove column with object data source or columns option specified");var r="number"!=typeof e?-t:e;r=(this.instance.countCols()+r)%this.instance.countCols();var o=this.visualColumnsToPhysical(r,t),i=o.slice(0).sort(function(e,t){return t-e});if(!1!==this.instance.runHooks("beforeRemoveCol",r,t,o,n)){for(var a=!0,s=i.length,l=this.dataSource,u=0;u<s;u++)a&&o[0]!==o[u]-u&&(a=!1);if(a)for(var c=0,f=this.instance.countSourceRows();c<f;c++)l[c].splice(o[0],t);else{for(var h=0,d=this.instance.countSourceRows();h<d;h++)for(var p=0;p<s;p++)l[h].splice(i[p],1);for(var g=0;g<s;g++)this.priv.columnSettings.splice(o[g],1)}this.instance.runHooks("afterRemoveCol",r,t,o,n),this.instance.forceFullRender=!0}},d.prototype.spliceCol=function(e,t,n){for(var r=this.instance.getDataAtCol(e),o=r.slice(t,t+n),i=r.slice(t+n),a=arguments.length,l=new Array(a>3?a-3:0),u=3;u<a;u++)l[u-3]=arguments[u];(0,s.extendArray)(l,i);for(var c=0;c<n;)l.push(null),c+=1;return(0,s.to2dArray)(l),this.instance.populateFromArray(t,e,l,null,null,"spliceCol"),o},d.prototype.spliceRow=function(e,t,n){for(var r=this.instance.getSourceDataAtRow(e),o=r.slice(t,t+n),i=r.slice(t+n),a=arguments.length,l=new Array(a>3?a-3:0),u=3;u<a;u++)l[u-3]=arguments[u];(0,s.extendArray)(l,i);for(var c=0;c<n;)l.push(null),c+=1;return this.instance.populateFromArray(e,t,[l],null,null,"spliceRow"),o},d.prototype.spliceData=function(e,t,n){!1!==this.instance.runHooks("beforeDataSplice",e,t,n)&&this.dataSource.splice(e,t,n)},d.prototype.filterData=function(e,t){var n=this.visualRowsToPhysical(e,t);if(!1!==this.instance.runHooks("beforeDataFilter",e,t,n))return this.dataSource.filter(function(e,t){return-1===n.indexOf(t)})},d.prototype.get=function(e,t){var n=this.instance.runHooks("modifyRow",e),r=this.dataSource[n],o=this.instance.runHooks("modifyRowData",n),i=null;if((r=isNaN(o)?o:r)&&r.hasOwnProperty&&(0,a.hasOwnProperty)(r,t))i=r[t];else if("string"==typeof t&&t.indexOf(".")>-1){var s=t.split("."),l=r;if(!l)return null;for(var u=0,c=s.length;u<c;u++)if(void 0===(l=l[s[u]]))return null;i=l}else"function"==typeof t&&(i=t(this.dataSource.slice(n,n+1)[0]));if(this.instance.hasHook("modifyData")){var f=(0,a.createObjectPropListener)(i);this.instance.runHooks("modifyData",n,this.propToCol(t),f,"get"),f.isTouched()&&(i=f.value)}return i};var p=(0,o.cellMethodLookupFactory)("copyable",!1);d.prototype.getCopyable=function(e,t){return p.call(this.instance,e,this.propToCol(t))?this.get(e,t):""},d.prototype.set=function(e,t,n,r){var o=this.instance.runHooks("modifyRow",e,r||"datamapGet"),i=n,s=this.dataSource[o],l=this.instance.runHooks("modifyRowData",o);if(s=isNaN(l)?l:s,this.instance.hasHook("modifyData")){var u=(0,a.createObjectPropListener)(i);this.instance.runHooks("modifyData",o,this.propToCol(t),u,"set"),u.isTouched()&&(i=u.value)}if(s&&s.hasOwnProperty&&(0,a.hasOwnProperty)(s,t))s[t]=i;else if("string"==typeof t&&t.indexOf(".")>-1){var c,f=t.split("."),h=s,d=0;for(d=0,c=f.length-1;d<c;d++)void 0===h[f[d]]&&(h[f[d]]={}),h=h[f[d]];h[f[d]]=i}else"function"==typeof t?t(this.dataSource.slice(o,o+1)[0],i):s[t]=i},d.prototype.visualRowsToPhysical=function(e,t){for(var n,r=this.instance.countSourceRows(),o=[],i=(r+e)%r,a=t;i<r&&a;)n=this.instance.runHooks("modifyRow",i),o.push(n),a-=1,i+=1;return o},d.prototype.visualColumnsToPhysical=function(e,t){for(var n=this.instance.countCols(),r=(n+e)%n,o=[],i=t;r<n&&i;){var a=this.instance.runHooks("modifyCol",r);o.push(a),i-=1,r+=1}return o},d.prototype.clear=function(){for(var e=0;e<this.instance.countSourceRows();e++)for(var t=0;t<this.instance.countCols();t++)this.set(e,this.colToProp(t),"")},d.prototype.clearLengthCache=function(){this.cachedLength=null},d.prototype.getLength=function(){var e,t=this,n=this.instance.getSettings().maxRows;e=n<0||0===n?0:n||1/0;var r=this.instance.countSourceRows();if(this.instance.hasHook("modifyRow")){var o=this.skipCache;this.interval.start(),r!==this.latestSourceRowsCount&&(o=!0),this.latestSourceRowsCount=r,null===this.cachedLength||o?((0,u.rangeEach)(r-1,function(e){null===t.instance.runHooks("modifyRow",e)&&(r-=1)}),this.cachedLength=r):r=this.cachedLength}else this.interval.stop();return Math.min(r,e)},d.prototype.getAll=function(){var e={row:0,col:0},t={row:Math.max(this.instance.countSourceRows()-1,0),col:Math.max(this.instance.countCols()-1,0)};return e.row-t.row!=0||this.instance.countSourceRows()?this.getRange(e,t,d.prototype.DESTINATION_RENDERER):[]},d.prototype.getRange=function(e,t,n){var r,o,i,a=[],s=this.instance.getSettings().maxRows,l=this.instance.getSettings().maxCols;if(0===s||0===l)return[];var u=n===this.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,c=Math.min(Math.max(s-1,0),Math.max(e.row,t.row)),f=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(r=Math.min(e.row,t.row);r<=c;r++){i=[];var h=this.instance.runHooks("modifyRow",r);for(o=Math.min(e.col,t.col);o<=f&&null!==h;o++)i.push(u.call(this,r,this.colToProp(o)));null!==h&&a.push(i)}return a},d.prototype.getText=function(e,t){return r.default.stringify(this.getRange(e,t,this.DESTINATION_RENDERER))},d.prototype.getCopyableText=function(e,t){return r.default.stringify(this.getRange(e,t,this.DESTINATION_CLIPBOARD_GENERATOR))},d.prototype.onSkipLengthCache=function(e){var t=this;this.skipCache=!0,setTimeout(function(){t.skipCache=!1},e)},d.prototype.destroy=function(){this.interval.stop(),this.interval=null,this.instance=null,this.priv=null,this.GridSettings=null,this.dataSource=null,this.cachedLength=null,this.duckSchema=null};var g=d;t.default=g},function(e,t,n){"use strict";t.__esModule=!0,t.parseDelay=s,t.default=void 0;var r=n(49);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}var a=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.timer=null,this.func=t,this.delay=s(n),this.stopped=!0,this._then=null,this._callback=function(){return r.__callback()}}return i(e,null,[{key:"create",value:function(t,n){return new e(t,n)}}]),i(e,[{key:"start",value:function(){return this.stopped&&(this._then=Date.now(),this.stopped=!1,this.timer=(0,r.requestAnimationFrame)(this._callback)),this}},{key:"stop",value:function(){return this.stopped||(this.stopped=!0,(0,r.cancelAnimationFrame)(this.timer),this.timer=null),this}},{key:"__callback",value:function(){if(this.timer=(0,r.requestAnimationFrame)(this._callback),this.delay){var e=Date.now(),t=e-this._then;t>this.delay&&(this._then=e-t%this.delay,this.func())}else this.func()}}]),e}();function s(e){var t=e;return"string"==typeof t&&/fps$/.test(t)&&(t=1e3/parseInt(t.replace("fps","")||0,10)),t}t.default=a},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.__esModule=!0,t.default=void 0;var o=function(){var e={arrayMap:[],weakMap:new WeakMap};return{get:function(r){return t(r)?e.arrayMap[r]:n(r)?e.weakMap.get(r):void 0},set:function(r,o){if(t(r))e.arrayMap[r]=o;else{if(!n(r))throw new Error("Invalid key type");e.weakMap.set(r,o)}},delete:function(r){t(r)?delete e.arrayMap[r]:n(r)&&e.weakMap.delete(r)}};function t(e){return null!==e&&!function(e){return e!=e}(e)&&("string"==typeof e||"number"==typeof e)}function n(e){return null!==e&&("object"===r(e)||"function"==typeof e)}};t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(13),o=n(24),i=n(16),a=n(28),s=function(e){return e&&e.__esModule?e:{default:e}}(n(10)),l=n(82);function u(e,t,n){var u,c=this,f=new s.default(e),h=!1,d=!1;function p(e){var r="function"==typeof t.settings.enterMoves?t.settings.enterMoves(event):t.settings.enterMoves;e?n.transformStart(-r.row,-r.col):n.transformStart(r.row,r.col,!0)}function g(a){if(e.isListening()&&(e.runHooks("beforeKeyDown",a),!h&&229!==a.keyCode&&!(0,i.isImmediatePropagationStopped)(a)&&(t.lastKeyCode=a.keyCode,n.isSelected()))){var s=(a.ctrlKey||a.metaKey)&&!a.altKey;if(!u||u.isWaiting()||(0,o.isMetaKey)(a.keyCode)||(0,o.isCtrlMetaKey)(a.keyCode)||s||c.isEditorOpened()){var f,d=a.shiftKey?n.setRangeEnd:n.setRangeStart;switch(a.keyCode){case o.KEY_CODES.A:!c.isEditorOpened()&&s&&(e.selectAll(),a.preventDefault(),(0,i.stopPropagation)(a));break;case o.KEY_CODES.ARROW_UP:c.isEditorOpened()&&!u.isWaiting()&&c.closeEditorAndSaveChanges(s),function(e){e?n.transformEnd(-1,0):n.transformStart(-1,0)}(a.shiftKey),a.preventDefault(),(0,i.stopPropagation)(a);break;case o.KEY_CODES.ARROW_DOWN:c.isEditorOpened()&&!u.isWaiting()&&c.closeEditorAndSaveChanges(s),function(e){e?n.transformEnd(1,0):n.transformStart(1,0)}(a.shiftKey),a.preventDefault(),(0,i.stopPropagation)(a);break;case o.KEY_CODES.ARROW_RIGHT:c.isEditorOpened()&&!u.isWaiting()&&c.closeEditorAndSaveChanges(s),function(e){e?n.transformEnd(0,1):n.transformStart(0,1)}(a.shiftKey),a.preventDefault(),(0,i.stopPropagation)(a);break;case o.KEY_CODES.ARROW_LEFT:c.isEditorOpened()&&!u.isWaiting()&&c.closeEditorAndSaveChanges(s),function(e){e?n.transformEnd(0,-1):n.transformStart(0,-1)}(a.shiftKey),a.preventDefault(),(0,i.stopPropagation)(a);break;case o.KEY_CODES.TAB:f="function"==typeof t.settings.tabMoves?t.settings.tabMoves(a):t.settings.tabMoves,a.shiftKey?n.transformStart(-f.row,-f.col):n.transformStart(f.row,f.col,!0),a.preventDefault(),(0,i.stopPropagation)(a);break;case o.KEY_CODES.BACKSPACE:case o.KEY_CODES.DELETE:e.emptySelectedCells(),c.prepareEditor(),a.preventDefault();break;case o.KEY_CODES.F2:u&&u.enableFullEditMode(),c.openEditor(null,a),a.preventDefault();break;case o.KEY_CODES.ENTER:c.isEditorOpened()?(u&&u.state!==l.EditorState.WAITING&&c.closeEditorAndSaveChanges(s),p(a.shiftKey)):e.getSettings().enterBeginsEditing?(u&&u.enableFullEditMode(),c.openEditor(null,a)):p(a.shiftKey),a.preventDefault(),(0,i.stopImmediatePropagation)(a);break;case o.KEY_CODES.ESCAPE:c.isEditorOpened()&&(c.closeEditorAndRestoreOriginalValue(s),u.focus()),a.preventDefault();break;case o.KEY_CODES.HOME:a.ctrlKey||a.metaKey?d.call(n,new r.CellCoords(0,n.selectedRange.current().from.col)):d.call(n,new r.CellCoords(n.selectedRange.current().from.row,0)),a.preventDefault(),(0,i.stopPropagation)(a);break;case o.KEY_CODES.END:a.ctrlKey||a.metaKey?d.call(n,new r.CellCoords(e.countRows()-1,n.selectedRange.current().from.col)):d.call(n,new r.CellCoords(n.selectedRange.current().from.row,e.countCols()-1)),a.preventDefault(),(0,i.stopPropagation)(a);break;case o.KEY_CODES.PAGE_UP:n.transformStart(-e.countVisibleRows(),0),a.preventDefault(),(0,i.stopPropagation)(a);break;case o.KEY_CODES.PAGE_DOWN:n.transformStart(e.countVisibleRows(),0),a.preventDefault(),(0,i.stopPropagation)(a)}}else c.openEditor("",a)}}this.lockEditor=function(){d=!0},this.unlockEditor=function(){d=!1},this.destroyEditor=function(e){d||this.closeEditor(e)},this.getActiveEditor=function(){return u},this.prepareEditor=function(){if(!d)if(u&&u.isWaiting())this.closeEditor(!1,!1,function(e){e&&c.prepareEditor()});else{var t=e.selection.selectedRange.current().highlight.row,n=e.selection.selectedRange.current().highlight.col,r=e.colToProp(n),o=e.getCell(t,n),i=e.getSourceDataAtCell(e.runHooks("modifyRow",t),n),s=e.getCellMeta(t,n),l=e.getCellEditor(s);l?(u=(0,a.getEditorInstance)(l,e)).prepare(t,n,r,o,i,s):u=void 0}},this.isEditorOpened=function(){return u&&u.isOpened()},this.openEditor=function(e,t){u&&(u.cellProperties.readOnly?t&&t.keyCode===o.KEY_CODES.ENTER&&p():u.beginEditing(e,t))},this.closeEditor=function(e,t,n){u?u.finishEditing(e,t,n):n&&n(!1)},this.closeEditorAndSaveChanges=function(e){return this.closeEditor(!1,e)},this.closeEditorAndRestoreOriginalValue=function(e){return this.closeEditor(!0,e)},this.destroy=function(){h=!0},e.addHook("afterDocumentKeyDown",g),f.addEventListener(document.documentElement,"keydown",function(t){h||e.runHooks("afterDocumentKeyDown",t)}),f.addEventListener(document.documentElement,"compositionstart",function(t){!h&&u&&!u.isOpened()&&e.isListening()&&c.openEditor("",t)}),e.view.wt.update("onCellDblClick",function(e,t,n){"TD"===n.nodeName&&(u&&u.enableFullEditMode(),c.openEditor(null,e))})}var c=new WeakMap;u.getInstance=function(e,t,n,r){var o=c.get(e);return o||(o=new u(e,t,n,r),c.set(e,o)),o};var f=u;t.default=f},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=l(n(10)),i=n(16),a=l(n(13)),s=n(440);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var c=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()};function f(e){var t=this,n=this;this.eventManager=new o.default(e),this.instance=e,this.settings=e.getSettings(),this.selectionMouseDown=!1;var l=e.rootElement.getAttribute("style");l&&e.rootElement.setAttribute("data-originalstyle",l),(0,r.addClass)(e.rootElement,"handsontable");var u,f=document.createElement("TABLE");(0,r.addClass)(f,"htCore"),e.getSettings().tableClassName&&(0,r.addClass)(f,e.getSettings().tableClassName),this.THEAD=document.createElement("THEAD"),f.appendChild(this.THEAD),this.TBODY=document.createElement("TBODY"),f.appendChild(this.TBODY),e.table=f,e.container.insertBefore(f,e.container.firstChild),this.eventManager.addEventListener(e.rootElement,"mousedown",function(e){t.selectionMouseDown=!0,n.isTextSelectionAllowed(e.target)||(c(),e.preventDefault(),window.focus())}),this.eventManager.addEventListener(e.rootElement,"mouseup",function(){t.selectionMouseDown=!1}),this.eventManager.addEventListener(e.rootElement,"mousemove",function(e){t.selectionMouseDown&&!n.isTextSelectionAllowed(e.target)&&(t.settings.fragmentSelection&&c(),e.preventDefault())}),this.eventManager.addEventListener(document.documentElement,"keyup",function(t){e.selection.isInProgress()&&!t.shiftKey&&e.selection.finish()}),this.isMouseDown=function(){return u},this.eventManager.addEventListener(document.documentElement,"mouseup",function(t){e.selection.isInProgress()&&(0,i.isLeftClick)(t)&&e.selection.finish(),u=!1,((0,r.isOutsideInput)(document.activeElement)||!e.selection.isSelected()&&!(0,i.isRightClick)(t))&&e.unlisten()}),this.eventManager.addEventListener(document.documentElement,"contextmenu",function(t){e.selection.isInProgress()&&(0,i.isRightClick)(t)&&(e.selection.finish(),u=!1)}),this.eventManager.addEventListener(document.documentElement,"touchend",function(){e.selection.isInProgress()&&e.selection.finish(),u=!1}),this.eventManager.addEventListener(document.documentElement,"mousedown",function(t){var o=t.target,i=t.x||t.clientX,a=t.y||t.clientY,s=t.target;if(!u&&e.rootElement){if(s===e.view.wt.wtTable.holder){var l=(0,r.getScrollbarWidth)();if(document.elementFromPoint(i+l,a)!==e.view.wt.wtTable.holder||document.elementFromPoint(i,a+l)!==e.view.wt.wtTable.holder)return}else for(;s!==document.documentElement;){if(null===s){if(t.isTargetWebComponent)break;return}if(s===e.rootElement)return;s=s.parentNode}("function"==typeof n.settings.outsideClickDeselects?n.settings.outsideClickDeselects(o):n.settings.outsideClickDeselects)?e.deselectCell():e.destroyEditor(!1,!1)}}),this.eventManager.addEventListener(f,"selectstart",function(e){n.settings.fragmentSelection||(0,r.isInput)(e.target)||e.preventDefault()});var h={debug:function(){return n.settings.debug},externalRowCalculator:this.instance.getPlugin("autoRowSize")&&this.instance.getPlugin("autoRowSize").isEnabled(),table:f,preventOverflow:function(){return t.settings.preventOverflow},stretchH:function(){return n.settings.stretchH},data:e.getDataAtCell,totalRows:function(){return e.countRows()},totalColumns:function(){return e.countCols()},fixedColumnsLeft:function(){return n.settings.fixedColumnsLeft},fixedRowsTop:function(){return n.settings.fixedRowsTop},fixedRowsBottom:function(){return n.settings.fixedRowsBottom},minSpareRows:function(){return n.settings.minSpareRows},renderAllRows:n.settings.renderAllRows,rowHeaders:function(){var t=[];return e.hasRowHeaders()&&t.push(function(e,t){return n.appendRowHeader(e,t)}),e.runHooks("afterGetRowHeaderRenderers",t),t},columnHeaders:function(){var t=[];return e.hasColHeaders()&&t.push(function(e,t){n.appendColHeader(e,t)}),e.runHooks("afterGetColumnHeaderRenderers",t),t},columnWidth:e.getColWidth,rowHeight:e.getRowHeight,cellRenderer:function(e,t,r){var o=n.instance.getCellMeta(e,t),i=n.instance.colToProp(t),a=n.instance.getDataAtRowProp(e,i);n.instance.hasHook("beforeValueRender")&&(a=n.instance.runHooks("beforeValueRender",a,o)),n.instance.runHooks("beforeRenderer",r,e,t,i,a,o),n.instance.getCellRenderer(o)(n.instance,r,e,t,i,a,o),n.instance.runHooks("afterRenderer",r,e,t,i,a,o)},selections:n.instance.selection.highlight,hideBorderOnMouseDownOver:function(){return n.settings.fragmentSelection},onCellMouseDown:function(t,r,o,a){var l={row:!1,column:!1,cell:!1};e.listen(),n.activeWt=a,u=!0,e.runHooks("beforeOnCellMouseDown",t,r,o,l),(0,i.isImmediatePropagationStopped)(t)||((0,s.handleMouseEvent)(t,{coords:r,selection:e.selection,controller:l}),e.runHooks("afterOnCellMouseDown",t,r,o),n.activeWt=n.wt)},onCellContextMenu:function(t,r,o,a){n.activeWt=a,u=!1,e.selection.isInProgress()&&e.selection.finish(),e.runHooks("beforeOnCellContextMenu",t,r,o),(0,i.isImmediatePropagationStopped)(t)||(e.runHooks("afterOnCellContextMenu",t,r,o),n.activeWt=n.wt)},onCellMouseOut:function(t,r,o,a){n.activeWt=a,e.runHooks("beforeOnCellMouseOut",t,r,o),(0,i.isImmediatePropagationStopped)(t)||(e.runHooks("afterOnCellMouseOut",t,r,o),n.activeWt=n.wt)},onCellMouseOver:function(t,r,o,a){var l={row:!1,column:!1,cell:!1};n.activeWt=a,e.runHooks("beforeOnCellMouseOver",t,r,o,l),(0,i.isImmediatePropagationStopped)(t)||(u&&(0,s.handleMouseEvent)(t,{coords:r,selection:e.selection,controller:l}),e.runHooks("afterOnCellMouseOver",t,r,o),n.activeWt=n.wt)},onCellMouseUp:function(t,r,o,i){n.activeWt=i,e.runHooks("beforeOnCellMouseUp",t,r,o),e.runHooks("afterOnCellMouseUp",t,r,o),n.activeWt=n.wt},onCellCornerMouseDown:function(t){t.preventDefault(),e.runHooks("afterOnCellCornerMouseDown",t)},onCellCornerDblClick:function(t){t.preventDefault(),e.runHooks("afterOnCellCornerDblClick",t)},beforeDraw:function(e,t){n.beforeRender(e,t)},onDraw:function(e){n.onDraw(e)},onScrollVertically:function(){e.runHooks("afterScrollVertically")},onScrollHorizontally:function(){e.runHooks("afterScrollHorizontally")},onBeforeRemoveCellClassNames:function(){return e.runHooks("beforeRemoveCellClassNames")},onAfterDrawSelection:function(t,n,r,o){return e.runHooks("afterDrawSelection",t,n,r,o)},onBeforeDrawBorders:function(t,n){e.runHooks("beforeDrawBorders",t,n)},onBeforeTouchScroll:function(){e.runHooks("beforeTouchScroll")},onAfterMomentumScroll:function(){e.runHooks("afterMomentumScroll")},onBeforeStretchingColumnWidth:function(t,n){return e.runHooks("beforeStretchingColumnWidth",t,n)},onModifyRowHeaderWidth:function(t){return e.runHooks("modifyRowHeaderWidth",t)},onModifyGetCellCoords:function(t,n,r){return e.runHooks("modifyGetCellCoords",t,n,r)},viewportRowCalculatorOverride:function(t){var r=e.countRows(),o=n.settings.viewportRowRenderingOffset;if("auto"===o&&n.settings.fixedRowsTop&&(o=10),"number"==typeof o&&(t.startRow=Math.max(t.startRow-o,0),t.endRow=Math.min(t.endRow+o,r-1)),"auto"===o){var i=t.startRow+t.endRow-t.startRow,a=Math.ceil(i/r*12);t.startRow=Math.max(t.startRow-a,0),t.endRow=Math.min(t.endRow+a,r-1)}e.runHooks("afterViewportRowCalculatorOverride",t)},viewportColumnCalculatorOverride:function(t){var r=e.countCols(),o=n.settings.viewportColumnRenderingOffset;if("auto"===o&&n.settings.fixedColumnsLeft&&(o=10),"number"==typeof o&&(t.startColumn=Math.max(t.startColumn-o,0),t.endColumn=Math.min(t.endColumn+o,r-1)),"auto"===o){var i=t.startColumn+t.endColumn-t.startColumn,a=Math.ceil(i/r*12);t.startRow=Math.max(t.startColumn-a,0),t.endColumn=Math.min(t.endColumn+a,r-1)}e.runHooks("afterViewportColumnCalculatorOverride",t)},rowHeaderWidth:function(){return n.settings.rowHeaderWidth},columnHeaderHeight:function(){var t=e.runHooks("modifyColumnHeaderHeight");return n.settings.columnHeaderHeight||t}};e.runHooks("beforeInitWalkontable",h),this.wt=new a.default(h),this.activeWt=this.wt,this.eventManager.addEventListener(n.wt.wtTable.spreader,"mousedown",function(e){e.target===n.wt.wtTable.spreader&&3===e.which&&(0,i.stopPropagation)(e)}),this.eventManager.addEventListener(n.wt.wtTable.spreader,"contextmenu",function(e){e.target===n.wt.wtTable.spreader&&3===e.which&&(0,i.stopPropagation)(e)}),this.eventManager.addEventListener(document.documentElement,"click",function(){n.settings.observeDOMVisibility&&n.wt.drawInterrupted&&(n.instance.forceFullRender=!0,n.render())})}f.prototype.isTextSelectionAllowed=function(e){if((0,r.isInput)(e))return!0;var t=(0,r.isChildOf)(e,this.instance.view.wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||(!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell()))},f.prototype.isSelectedOnlyCell=function(){var e=u(this.instance.getSelectedLast()||[],4),t=e[0],n=e[1],r=e[2],o=e[3];return void 0!==t&&t===r&&n===o},f.prototype.isCellEdited=function(){var e=this.instance.getActiveEditor();return e&&e.isOpened()},f.prototype.beforeRender=function(e,t){e&&this.instance.runHooks("beforeRender",this.instance.forceFullRender,t)},f.prototype.onDraw=function(e){e&&this.instance.runHooks("afterRender",this.instance.forceFullRender)},f.prototype.render=function(){this.wt.draw(!this.instance.forceFullRender),this.instance.forceFullRender=!1,this.instance.renderCall=!1},f.prototype.getCellAtCoords=function(e,t){var n=this.wt.getCell(e,t);return n<0?null:n},f.prototype.scrollViewport=function(e,t,n,r,o){return this.wt.scrollViewport(e,t,n,r,o)},f.prototype.scrollViewportHorizontally=function(e,t,n){return this.wt.scrollViewportHorizontally(e,t,n)},f.prototype.scrollViewportVertically=function(e,t,n){return this.wt.scrollViewportVertically(e,t,n)},f.prototype.appendRowHeader=function(e,t){if(t.firstChild){var n=t.firstChild;if(!(0,r.hasClass)(n,"relative"))return(0,r.empty)(t),void this.appendRowHeader(e,t);this.updateCellHeader(n.querySelector(".rowHeader"),e,this.instance.getRowHeader)}else{var o=document.createElement("div"),i=document.createElement("span");o.className="relative",i.className="rowHeader",this.updateCellHeader(i,e,this.instance.getRowHeader),o.appendChild(i),t.appendChild(o)}this.instance.runHooks("afterGetRowHeader",e,t)},f.prototype.appendColHeader=function(e,t){if(t.firstChild){var n=t.firstChild;(0,r.hasClass)(n,"relative")?this.updateCellHeader(n.querySelector(".colHeader"),e,this.instance.getColHeader):((0,r.empty)(t),this.appendColHeader(e,t))}else{var o=document.createElement("div"),i=document.createElement("span");o.className="relative",i.className="colHeader",this.updateCellHeader(i,e,this.instance.getColHeader),o.appendChild(i),t.appendChild(o)}this.instance.runHooks("afterGetColHeader",e,t)},f.prototype.updateCellHeader=function(e,t,n){var o=t,i=this.wt.wtOverlays.getParentOverlay(e)||this.wt;e.parentNode&&((0,r.hasClass)(e,"colHeader")?o=i.wtTable.columnFilter.sourceToRendered(t):(0,r.hasClass)(e,"rowHeader")&&(o=i.wtTable.rowFilter.sourceToRendered(t))),o>-1?(0,r.fastInnerHTML)(e,n(t)):((0,r.fastInnerText)(e,String.fromCharCode(160)),(0,r.addClass)(e,"cornerHeader"))},f.prototype.maximumVisibleElementWidth=function(e){var t=this.wt.wtViewport.getWorkspaceWidth()-e;return t>0?t:0},f.prototype.maximumVisibleElementHeight=function(e){var t=this.wt.wtViewport.getWorkspaceHeight()-e;return t>0?t:0},f.prototype.mainViewIsActive=function(){return this.wt===this.activeWt},f.prototype.destroy=function(){this.wt.destroy(),this.eventManager.destroy()};var h=f;t.default=h},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(2),o=n(1),i=n(5);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this.data=n,this.dataType="array",this.colToProp=function(){},this.propToCol=function(){}}return function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(e,[{key:"getData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data;return e&&(t=this.getByRange({row:0,col:0},{row:Math.max(this.countRows()-1,0),col:Math.max(this.countColumns()-1,0)},!0)),t}},{key:"setData",value:function(e){this.data=e}},{key:"getAtColumn",value:function(e){var t=this,n=[];return(0,o.arrayEach)(this.data,function(o){var i,a=t.colToProp(e);i="string"==typeof a?(0,r.getProperty)(o,a):"function"==typeof a?a(o):o[a],n.push(i)}),n}},{key:"getAtRow",value:function(e){return this.data[e]}},{key:"getAtCell",value:function(e,t){var n=null,o=this.hot.runHooks("modifyRowData",e),i=isNaN(o)?o:this.data[e];if(i){var a=this.colToProp(t);n="string"==typeof a?(0,r.getProperty)(i,a):"function"==typeof a?a(this.data.slice(e,e+1)[0]):i[a]}return n}},{key:"getByRange",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=Math.min(e.row,t.row),a=Math.min(e.col,t.col),s=Math.max(e.row,t.row),l=Math.max(e.col,t.col),u=[];return(0,i.rangeEach)(o,s,function(e){var t,o=n.getAtRow(e);"array"===n.dataType?t=o.slice(a,l+1):"object"===n.dataType&&(t=r?[]:{},(0,i.rangeEach)(a,l,function(e){var i=n.colToProp(e);r?t.push(o[i]):t[i]=o[i]})),u.push(t)}),u}},{key:"countRows",value:function(){return Array.isArray(this.data)?this.data.length:0}},{key:"countColumns",value:function(){var e=0;return Array.isArray(this.data)&&("array"===this.dataType?e=this.data[0].length:"object"===this.dataType&&(e=Object.keys(this.data[0]).length)),e}},{key:"destroy",value:function(){this.data=null,this.hot=null}}]),e}();t.default=s},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4));function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=(i(r={languageCode:"en-US"},o.CONTEXTMENU_ITEMS_ROW_ABOVE,"Insert row above"),i(r,o.CONTEXTMENU_ITEMS_ROW_BELOW,"Insert row below"),i(r,o.CONTEXTMENU_ITEMS_INSERT_LEFT,"Insert column left"),i(r,o.CONTEXTMENU_ITEMS_INSERT_RIGHT,"Insert column right"),i(r,o.CONTEXTMENU_ITEMS_REMOVE_ROW,["Remove row","Remove rows"]),i(r,o.CONTEXTMENU_ITEMS_REMOVE_COLUMN,["Remove column","Remove columns"]),i(r,o.CONTEXTMENU_ITEMS_UNDO,"Undo"),i(r,o.CONTEXTMENU_ITEMS_REDO,"Redo"),i(r,o.CONTEXTMENU_ITEMS_READ_ONLY,"Read only"),i(r,o.CONTEXTMENU_ITEMS_CLEAR_COLUMN,"Clear column"),i(r,o.CONTEXTMENU_ITEMS_ALIGNMENT,"Alignment"),i(r,o.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT,"Left"),i(r,o.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER,"Center"),i(r,o.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT,"Right"),i(r,o.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY,"Justify"),i(r,o.CONTEXTMENU_ITEMS_ALIGNMENT_TOP,"Top"),i(r,o.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE,"Middle"),i(r,o.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM,"Bottom"),i(r,o.CONTEXTMENU_ITEMS_FREEZE_COLUMN,"Freeze column"),i(r,o.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN,"Unfreeze column"),i(r,o.CONTEXTMENU_ITEMS_BORDERS,"Borders"),i(r,o.CONTEXTMENU_ITEMS_BORDERS_TOP,"Top"),i(r,o.CONTEXTMENU_ITEMS_BORDERS_RIGHT,"Right"),i(r,o.CONTEXTMENU_ITEMS_BORDERS_BOTTOM,"Bottom"),i(r,o.CONTEXTMENU_ITEMS_BORDERS_LEFT,"Left"),i(r,o.CONTEXTMENU_ITEMS_REMOVE_BORDERS,"Remove border(s)"),i(r,o.CONTEXTMENU_ITEMS_ADD_COMMENT,"Add comment"),i(r,o.CONTEXTMENU_ITEMS_EDIT_COMMENT,"Edit comment"),i(r,o.CONTEXTMENU_ITEMS_REMOVE_COMMENT,"Delete comment"),i(r,o.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT,"Read-only comment"),i(r,o.CONTEXTMENU_ITEMS_MERGE_CELLS,"Merge cells"),i(r,o.CONTEXTMENU_ITEMS_UNMERGE_CELLS,"Unmerge cells"),i(r,o.CONTEXTMENU_ITEMS_COPY,"Copy"),i(r,o.CONTEXTMENU_ITEMS_CUT,"Cut"),i(r,o.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD,"Insert child row"),i(r,o.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD,"Detach from parent"),i(r,o.CONTEXTMENU_ITEMS_HIDE_COLUMN,["Hide column","Hide columns"]),i(r,o.CONTEXTMENU_ITEMS_SHOW_COLUMN,["Show column","Show columns"]),i(r,o.CONTEXTMENU_ITEMS_HIDE_ROW,["Hide row","Hide rows"]),i(r,o.CONTEXTMENU_ITEMS_SHOW_ROW,["Show row","Show rows"]),i(r,o.FILTERS_CONDITIONS_NONE,"None"),i(r,o.FILTERS_CONDITIONS_EMPTY,"Is empty"),i(r,o.FILTERS_CONDITIONS_NOT_EMPTY,"Is not empty"),i(r,o.FILTERS_CONDITIONS_EQUAL,"Is equal to"),i(r,o.FILTERS_CONDITIONS_NOT_EQUAL,"Is not equal to"),i(r,o.FILTERS_CONDITIONS_BEGINS_WITH,"Begins with"),i(r,o.FILTERS_CONDITIONS_ENDS_WITH,"Ends with"),i(r,o.FILTERS_CONDITIONS_CONTAINS,"Contains"),i(r,o.FILTERS_CONDITIONS_NOT_CONTAIN,"Does not contain"),i(r,o.FILTERS_CONDITIONS_GREATER_THAN,"Greater than"),i(r,o.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,"Greater than or equal to"),i(r,o.FILTERS_CONDITIONS_LESS_THAN,"Less than"),i(r,o.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,"Less than or equal to"),i(r,o.FILTERS_CONDITIONS_BETWEEN,"Is between"),i(r,o.FILTERS_CONDITIONS_NOT_BETWEEN,"Is not between"),i(r,o.FILTERS_CONDITIONS_AFTER,"After"),i(r,o.FILTERS_CONDITIONS_BEFORE,"Before"),i(r,o.FILTERS_CONDITIONS_TODAY,"Today"),i(r,o.FILTERS_CONDITIONS_TOMORROW,"Tomorrow"),i(r,o.FILTERS_CONDITIONS_YESTERDAY,"Yesterday"),i(r,o.FILTERS_VALUES_BLANK_CELLS,"Blank cells"),i(r,o.FILTERS_DIVS_FILTER_BY_CONDITION,"Filter by condition"),i(r,o.FILTERS_DIVS_FILTER_BY_VALUE,"Filter by value"),i(r,o.FILTERS_LABELS_CONJUNCTION,"And"),i(r,o.FILTERS_LABELS_DISJUNCTION,"Or"),i(r,o.FILTERS_BUTTONS_SELECT_ALL,"Select all"),i(r,o.FILTERS_BUTTONS_CLEAR,"Clear"),i(r,o.FILTERS_BUTTONS_OK,"OK"),i(r,o.FILTERS_BUTTONS_CANCEL,"Cancel"),i(r,o.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,"Search"),i(r,o.FILTERS_BUTTONS_PLACEHOLDER_VALUE,"Value"),i(r,o.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE,"Second value"),r);t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.registerPhraseFormatter=t.register=u,t.getPhraseFormatters=t.getAll=function(){return l()};var r=i(n(54)),o=i(n(683));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("phraseFormatters"),s=a.register,l=a.getValues;function u(e,t){s(e,t)}u("pluralize",o.default)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(Array.isArray(e)&&Number.isInteger(t))return e[t];return e}},function(e,t,n){"use strict";t.__esModule=!0,t.createHighlight=function(e,t){return d(e)(t)};var r=c(n(54)),o=c(n(685)),i=c(n(686)),a=c(n(687)),s=c(n(688)),l=c(n(689)),u=c(n(690));function c(e){return e&&e.__esModule?e:{default:e}}var f=(0,r.default)("highlight/types"),h=f.register,d=f.getItem;h("active-header",o.default),h("area",i.default),h("cell",a.default),h("custom-selection",s.default),h("fill",l.default),h("header",u.default)},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(13);var o=function(e){var t=e.activeHeaderClassName;return new r.Selection({highlightHeaderClassName:t})};t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(13);var o=function(e){var t=e.layerLevel,n=e.areaCornerVisible;return new r.Selection({className:"area",markIntersections:!0,layerLevel:Math.min(t,7),border:{width:1,color:"#4b89ff",cornerVisible:n}})};t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(13);var o=function(e){var t=e.cellCornerVisible;return new r.Selection({className:"current",border:{width:2,color:"#4b89ff",cornerVisible:t}})};t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(13);var o=function(e){var t=e.border,n=e.cellRange;return new r.Selection(t,n)};t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(13);var o=function(){return new r.Selection({className:"fill",border:{width:1,color:"#ff0000"}})};t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(13);var o=function(e){var t=e.headerClassName,n=e.rowClassName,o=e.columnClassName;return new r.Selection({className:"highlight",highlightHeaderClassName:t,highlightRowClassName:n,highlightColumnClassName:o})};t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(446)),o=p(n(692)),i=n(13),a=n(103),s=n(2),l=n(14),u=n(1),c=p(n(29)),f=p(n(693)),h=n(104),d=n(37);function p(e){return e&&e.__esModule?e:{default:e}}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function v(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["Unsupported format of the selection ranges was passed. To select cells pass \n the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd, columnEnd/columnPropEnd]]) \n or as an array of CellRange objects."]);return v=function(){return e},e}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var m=function(){function e(t,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.settings=t,this.tableProps=n,this.inProgress=!1,this.selectedByCorner=!1,this.selectedByRowHeader=new Set,this.selectedByColumnHeader=new Set,this.selectedRange=new o.default,this.highlight=new r.default({headerClassName:t.currentHeaderClassName,activeHeaderClassName:t.activeHeaderClassName,rowClassName:t.currentRowClassName,columnClassName:t.currentColClassName,disableHighlight:this.settings.disableVisualSelection,cellCornerVisible:function(){return i.isCellCornerVisible.apply(i,arguments)},areaCornerVisible:function(){return i.isAreaCornerVisible.apply(i,arguments)}}),this.transformation=new f.default(this.selectedRange,{countRows:function(){return i.tableProps.countRows()},countCols:function(){return i.tableProps.countCols()},fixedRowsBottom:function(){return t.fixedRowsBottom},minSpareRows:function(){return t.minSpareRows},minSpareCols:function(){return t.minSpareCols},autoWrapRow:function(){return t.autoWrapRow},autoWrapCol:function(){return t.autoWrapCol}}),this.transformation.addLocalHook("beforeTransformStart",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.runLocalHooks.apply(i,["beforeModifyTransformStart"].concat(t))}),this.transformation.addLocalHook("afterTransformStart",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.runLocalHooks.apply(i,["afterModifyTransformStart"].concat(t))}),this.transformation.addLocalHook("beforeTransformEnd",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.runLocalHooks.apply(i,["beforeModifyTransformEnd"].concat(t))}),this.transformation.addLocalHook("afterTransformEnd",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.runLocalHooks.apply(i,["afterModifyTransformEnd"].concat(t))}),this.transformation.addLocalHook("insertRowRequire",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.runLocalHooks.apply(i,["insertRowRequire"].concat(t))}),this.transformation.addLocalHook("insertColRequire",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.runLocalHooks.apply(i,["insertColRequire"].concat(t))})}return function(e,t,n){t&&y(e.prototype,t),n&&y(e,n)}(e,[{key:"getSelectedRange",value:function(){return this.selectedRange}},{key:"begin",value:function(){this.inProgress=!0}},{key:"finish",value:function(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1}},{key:"isInProgress",value:function(){return this.inProgress}},{key:"setRangeStart",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="multiple"===this.settings.selectionMode,o=(0,l.isUndefined)(t)?(0,a.isPressedCtrlKey)():t,i=e.row<0,s=e.col<0,u=i&&s;i&&(e.row=0),s&&(e.col=0),this.selectedByCorner=u,this.runLocalHooks("beforeSetRangeStart".concat(n?"Only":""),e),(!r||r&&!o&&(0,l.isUndefined)(t))&&this.selectedRange.clear(),this.selectedRange.add(e),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),!u&&s&&this.selectedByRowHeader.add(this.getLayerLevel()),!u&&i&&this.selectedByColumnHeader.add(this.getLayerLevel()),n||this.setRangeEnd(e)}},{key:"setRangeStartOnly",value:function(e,t){this.setRangeStart(e,t,!0)}},{key:"setRangeEnd",value:function(e){if(!this.selectedRange.isEmpty()){this.runLocalHooks("beforeSetRangeEnd",e),this.begin();var t=this.selectedRange.current();"single"!==this.settings.selectionMode&&t.setTo(new i.CellCoords(e.row,e.col)),this.highlight.getCell().clear(),this.highlight.isEnabledFor(r.CELL_TYPE)&&this.highlight.getCell().add(this.selectedRange.current().highlight);var n=this.getLayerLevel();n<this.highlight.layerLevel&&((0,u.arrayEach)(this.highlight.getAreas(),function(e){e.clear()}),(0,u.arrayEach)(this.highlight.getHeaders(),function(e){e.clear()}),(0,u.arrayEach)(this.highlight.getActiveHeaders(),function(e){e.clear()})),this.highlight.useLayerLevel(n);var o=this.highlight.createOrGetArea(),a=this.highlight.createOrGetHeader(),s=this.highlight.createOrGetActiveHeader();if(o.clear(),a.clear(),s.clear(),this.highlight.isEnabledFor(r.AREA_TYPE)&&(this.isMultiple()||n>=1)&&(o.add(t.from).add(t.to),1===n&&(this.highlight.useLayerLevel(n-1).createOrGetArea().add(this.selectedRange.previous().from),this.highlight.useLayerLevel(n))),this.highlight.isEnabledFor(r.HEADER_TYPE)&&("single"===this.settings.selectionMode?a.add(t.highlight):a.add(t.from).add(t.to)),this.isSelectedByRowHeader())this.tableProps.countCols()===t.getWidth()&&s.add(new i.CellCoords(t.from.row,-1)).add(new i.CellCoords(t.to.row,-1));if(this.isSelectedByColumnHeader())this.tableProps.countRows()===t.getHeight()&&s.add(new i.CellCoords(-1,t.from.col)).add(new i.CellCoords(-1,t.to.col));this.runLocalHooks("afterSetRangeEnd",e)}}},{key:"isMultiple",value:function(){var e=(0,s.createObjectPropListener)(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}},{key:"transformStart",value:function(e,t,n){this.setRangeStart(this.transformation.transformStart(e,t,n))}},{key:"transformEnd",value:function(e,t){this.setRangeEnd(this.transformation.transformEnd(e,t))}},{key:"getLayerLevel",value:function(){return this.selectedRange.size()-1}},{key:"isSelected",value:function(){return!this.selectedRange.isEmpty()}},{key:"isSelectedByRowHeader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e)}},{key:"isSelectedByColumnHeader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e)}},{key:"isSelectedByAnyHeader",value:function(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)}},{key:"isSelectedByCorner",value:function(){return this.selectedByCorner}},{key:"inInSelection",value:function(e){return this.selectedRange.includes(e)}},{key:"isCellCornerVisible",value:function(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}},{key:"isAreaCornerVisible",value:function(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&(this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple())}},{key:"clear",value:function(){this.selectedRange.clear(),this.highlight.clear()}},{key:"deselect",value:function(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}},{key:"selectAll",value:function(){this.clear(),this.setRangeStart(new i.CellCoords(-1,-1)),this.selectedByRowHeader.add(this.getLayerLevel()),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(new i.CellCoords(this.tableProps.countRows()-1,this.tableProps.countCols()-1))}},{key:"selectCells",value:function(e){var t=this,n=(0,h.detectSelectionType)(e);if(n===h.SELECTION_TYPE_EMPTY)return!1;if(n===h.SELECTION_TYPE_UNRECOGNIZED)throw new Error((0,d.toSingleLine)(v()));var r=(0,h.normalizeSelectionFactory)(n,{propToCol:function(e){return t.tableProps.propToCol(e)},keepDirection:!0}),o=this.tableProps.countRows(),a=this.tableProps.countCols(),s=!e.some(function(e){var t=g(r(e),4),n=t[0],i=t[1],s=t[2],l=t[3];return!((0,h.isValidCoord)(n,o)&&(0,h.isValidCoord)(i,a)&&(0,h.isValidCoord)(s,o)&&(0,h.isValidCoord)(l,a))});return s&&(this.clear(),(0,u.arrayEach)(e,function(e){var n=g(r(e),4),o=n[0],a=n[1],s=n[2],l=n[3];t.setRangeStartOnly(new i.CellCoords(o,a),!1),t.setRangeEnd(new i.CellCoords(s,l)),t.finish()})),s}},{key:"selectColumns",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n="string"==typeof e?this.tableProps.propToCol(e):e,r="string"==typeof t?this.tableProps.propToCol(t):t,o=this.tableProps.countCols(),a=(0,h.isValidCoord)(n,o)&&(0,h.isValidCoord)(r,o);return a&&(this.setRangeStartOnly(new i.CellCoords(-1,n)),this.setRangeEnd(new i.CellCoords(this.tableProps.countRows()-1,r)),this.finish()),a}},{key:"selectRows",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.tableProps.countRows(),r=(0,h.isValidCoord)(e,n)&&(0,h.isValidCoord)(t,n);return r&&(this.setRangeStartOnly(new i.CellCoords(e,-1)),this.setRangeEnd(new i.CellCoords(t,this.tableProps.countCols()-1)),this.finish()),r}}]),e}();(0,s.mixin)(m,c.default);var w=m;t.default=w},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(13);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.ranges=[]}return function(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}(e,[{key:"isEmpty",value:function(){return 0===this.size()}},{key:"set",value:function(e){return this.clear(),this.ranges.push(new r.CellRange(e)),this}},{key:"add",value:function(e){return this.ranges.push(new r.CellRange(e)),this}},{key:"current",value:function(){return this.peekByIndex(0)}},{key:"previous",value:function(){return this.peekByIndex(-1)}},{key:"includes",value:function(e){return this.ranges.some(function(t){return t.includes(e)})}},{key:"clear",value:function(){return this.ranges.length=0,this}},{key:"size",value:function(){return this.ranges.length}},{key:"peekByIndex",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=this.size()+t-1;return n>=0&&(e=this.ranges[n]),e}},{key:Symbol.iterator,value:function(){return this.ranges[Symbol.iterator]()}}]),e}();t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(13),o=n(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n(29));function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.range=t,this.options=n}return function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(e,[{key:"transformStart",value:function(e,t,n){var o=new r.CellCoords(e,t);this.runLocalHooks("beforeTransformStart",o);var i=this.options.countRows(),a=this.options.countCols(),s=this.options.fixedRowsBottom(),l=this.options.minSpareRows(),u=this.options.minSpareCols(),c=this.options.autoWrapRow(),f=this.options.autoWrapCol(),h=this.range.current().highlight;h.row+e>i-1?n&&l>0&&!(s&&h.row>=i-s-1)?(this.runLocalHooks("insertRowRequire",i),i=this.options.countRows()):f&&(o.row=1-i,o.col=h.col+o.col===a-1?1-a:1):f&&h.row+o.row<0&&h.col+o.col>=0&&(o.row=i-1,o.col=h.col+o.col===0?a-1:-1),h.col+o.col>a-1?n&&u>0?(this.runLocalHooks("insertColRequire",a),a=this.options.countCols()):c&&(o.row=h.row+o.row===i-1?1-i:1,o.col=1-a):c&&h.col+o.col<0&&h.row+o.row>=0&&(o.row=h.row+o.row===0?i-1:-1,o.col=a-1);var d=new r.CellCoords(h.row+o.row,h.col+o.col),p=0,g=0;return d.row<0?(p=-1,d.row=0):d.row>0&&d.row>=i&&(p=1,d.row=i-1),d.col<0?(g=-1,d.col=0):d.col>0&&d.col>=a&&(g=1,d.col=a-1),this.runLocalHooks("afterTransformStart",d,p,g),d}},{key:"transformEnd",value:function(e,t){var n=new r.CellCoords(e,t);this.runLocalHooks("beforeTransformEnd",n);var o=this.options.countRows(),i=this.options.countCols(),a=this.range.current(),s=new r.CellCoords(a.to.row+n.row,a.to.col+n.col),l=0,u=0;return s.row<0?(l=-1,s.row=0):s.row>0&&s.row>=o&&(l=1,s.row=o-1),s.col<0?(u=-1,s.col=0):s.col>0&&s.col>=i&&(u=1,s.col=i-1),this.runLocalHooks("afterTransformEnd",s,l,u),s}}]),e}();(0,o.mixin)(s,i.default);var l=s;t.default=l},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){var t="undefined"!=typeof window&&window.jQuery;if(!t)return;t.fn.handsontable=function(t){var n,r=this.first(),o=r.data("handsontable");if("string"!=typeof t){var i=t||{};return o?o.updateSettings(i):(o=new e.Core(r[0],i),r.data("handsontable",o),o.init()),r}if(o){if(void 0===o[t])throw new Error("Handsontable do not provide action: ".concat(t));for(var a,s=arguments.length,l=new Array(s>1?s-1:0),u=1;u<s;u++)l[u-1]=arguments[u];n=(a=o[t]).call.apply(a,[o].concat(l)),"destroy"===t&&r.removeData()}return n}}},function(e,t,n){"use strict";t.__esModule=!0;var r=_(n(696));t.PersistentState=r.default;var o=_(n(698));t.AutoColumnSize=o.default;var i=_(n(699));t.AutoFill=i.default;var a=_(n(701));t.AutoRowSize=a.default;var s=_(n(448));t.ColumnSorting=s.default;var l=_(n(712));t.Comments=l.default;var u=_(n(716));t.ContextMenu=u.default;var c=_(n(730));t.CopyPaste=c.default;var f=_(n(738));t.CustomBorders=f.default;var h=_(n(745));t.DragToScroll=h.default;var d=_(n(746));t.ManualColumnFreeze=d.default;var p=_(n(750));t.ManualColumnMove=p.default;var g=_(n(755));t.ManualColumnResize=g.default;var v=_(n(756));t.ManualRowMove=v.default;var y=_(n(761));t.ManualRowResize=y.default;var m=_(n(762));t.MergeCells=m.default;var w=_(n(768));t.MultipleSelectionHandles=w.default;var b=_(n(769));t.ObserveChanges=b.default;var C=_(n(773));t.Search=C.default;var E=_(n(774));t.TouchScroll=E.default;var O=_(n(775));t.UndoRedo=O.default;var S=_(n(7));function _(e){return e&&e.__esModule?e:{default:e}}t.Base=S.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(7)),o=n(6),i=s(n(697)),a=s(n(23));function s(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e,t,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}a.default.getSingleton().register("persistentStateSave"),a.default.getSingleton().register("persistentStateLoad"),a.default.getSingleton().register("persistentStateReset");var p=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=c(this,h(t).call(this,e))).storage=void 0,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(t,r.default),function(e,t,n){t&&u(e.prototype,t),n&&u(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().persistentState}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.storage||(this.storage=new i.default(this.hot.rootElement.id)),this.addHook("persistentStateSave",function(t,n){return e.saveValue(t,n)}),this.addHook("persistentStateLoad",function(t,n){return e.loadValue(t,n)}),this.addHook("persistentStateReset",function(){return e.resetValue()}),f(h(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.storage=void 0,f(h(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),f(h(t.prototype),"updatePlugin",this).call(this)}},{key:"loadValue",value:function(e,t){t.value=this.storage.loadValue(e)}},{key:"saveValue",value:function(e,t){this.storage.saveValue(e,t)}},{key:"resetValue",value:function(e){void 0===e?this.storage.resetAll():this.storage.reset(e)}},{key:"destroy",value:function(){f(h(t.prototype),"destroy",this).call(this)}}]),t}();(0,o.registerPlugin)("persistentState",p);var g=p;t.default=g},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.prefix=t,this.savedKeys=[],this.loadSavedKeys()}return function(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}(e,[{key:"saveValue",value:function(e,t){window.localStorage.setItem("".concat(this.prefix,"_").concat(e),JSON.stringify(t)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}},{key:"loadValue",value:function(e,t){var n=void 0===e?t:e,r=window.localStorage.getItem("".concat(this.prefix,"_").concat(n));return null===r?void 0:JSON.parse(r)}},{key:"reset",value:function(e){window.localStorage.removeItem("".concat(this.prefix,"_").concat(e))}},{key:"resetAll",value:function(){var e=this;(0,r.arrayEach)(this.savedKeys,function(t,n){window.localStorage.removeItem("".concat(e.prefix,"_").concat(e.savedKeys[n]))}),this.clearSavedKeys()}},{key:"loadSavedKeys",value:function(){var e=window.localStorage.getItem("".concat(this.prefix,"__persistentStateKeys")),t="string"==typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}},{key:"saveSavedKeys",value:function(){window.localStorage.setItem("".concat(this.prefix,"__persistentStateKeys"),JSON.stringify(this.savedKeys))}},{key:"clearSavedKeys",value:function(){this.savedKeys.length=0,this.saveSavedKeys()}}]),e}();t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=p(n(7)),o=n(1),i=n(49),a=n(3),s=p(n(137)),l=n(2),u=n(5),c=n(6),f=p(n(447)),h=n(42),d=n(13);function p(e){return e&&e.__esModule?e:{default:e}}function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function y(e,t,n){return(y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),e}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var O=new WeakMap,S=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?E(e):t}(this,m(t).call(this,e)),O.set(E(E(n)),{cachedColumnHeaders:[]}),n.widths=[],n.ghostTable=new s.default(n.hot),n.samplesGenerator=new f.default(function(e,t){var r=n.hot.getCellMeta(e,t),o="";r.spanned||(o=n.hot.getDataAtCell(e,t));var i=0;if(r.label){var a=r.label,s=a.value,l=a.property,u="";s?u="function"==typeof s?s(e,t,n.hot.colToProp(t),o):s:l&&(u=n.hot.getDataAtRowProp(e,l)),i=u.length}return{value:o,bundleCountSeed:i}}),n.firstCalculation=!0,n.inProgress=!1,n.addHook("beforeColumnResize",function(e,t,r){return n.onBeforeColumnResize(e,t,r)}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}(t,r.default),b(t,null,[{key:"CALCULATION_STEP",get:function(){return 50}},{key:"SYNC_CALCULATION_LIMIT",get:function(){return 50}}]),b(t,[{key:"isEnabled",value:function(){return!1!==this.hot.getSettings().autoColumnSize&&!this.hot.getSettings().colWidths}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){var n=this.hot.getSettings().autoColumnSize;n&&null!==n.useHeaders&&void 0!==n.useHeaders&&this.ghostTable.setSetting("useHeaders",n.useHeaders),this.setSamplingOptions(),this.addHook("afterLoadData",function(){return e.onAfterLoadData()}),this.addHook("beforeChange",function(t){return e.onBeforeChange(t)}),this.addHook("beforeRender",function(t){return e.onBeforeRender(t)}),this.addHook("modifyColWidth",function(t,n){return e.getColumnWidth(n,t)}),this.addHook("afterInit",function(){return e.onAfterInit()}),y(m(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){var e=this.findColumnsWhereHeaderWasChanged();e.length&&this.clearCache(e),y(m(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){y(m(t.prototype),"disablePlugin",this).call(this)}},{key:"calculateColumnsWidth",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i="number"==typeof t?{from:t,to:t}:t,a="number"==typeof n?{from:n,to:n}:n;(0,u.rangeEach)(i.from,i.to,function(t){if(r||void 0===e.widths[t]&&!e.hot._getColWidthFromSettings(t)){var n=e.samplesGenerator.generateColumnSamples(t,a);(0,o.arrayEach)(n,function(t){var n=v(t,2),r=n[0],o=n[1];return e.ghostTable.addColumn(r,o)})}}),this.ghostTable.columns.length&&(this.ghostTable.getWidths(function(t,n){e.widths[t]=n}),this.ghostTable.clean())}},{key:"calculateAllColumnsWidth",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},r=0,o=this.hot.countCols()-1,a=null;this.inProgress=!0;var s=this.getSyncCalculationLimit();this.firstCalculation&&s>=0&&(this.calculateColumnsWidth({from:0,to:s},n),this.firstCalculation=!1,r=s+1),r<o?function s(){if(!e.hot)return(0,i.cancelAnimationFrame)(a),void(e.inProgress=!1);e.calculateColumnsWidth({from:r,to:Math.min(r+t.CALCULATION_STEP,o)},n),(r=r+t.CALCULATION_STEP+1)<o?a=(0,i.requestAnimationFrame)(s):((0,i.cancelAnimationFrame)(a),e.inProgress=!1,e.hot.view.wt.wtOverlays.adjustElementsSize(!0),e.hot.view.wt.wtOverlays.leftOverlay.needFullRender&&e.hot.view.wt.wtOverlays.leftOverlay.clone.draw())}():this.inProgress=!1}},{key:"setSamplingOptions",value:function(){var e=this.hot.getSettings().autoColumnSize,t=e&&(0,l.hasOwnProperty)(e,"samplingRatio")?this.hot.getSettings().autoColumnSize.samplingRatio:void 0,n=e&&(0,l.hasOwnProperty)(e,"allowSampleDuplicates")?this.hot.getSettings().autoColumnSize.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),n&&this.samplesGenerator.setAllowDuplicates(n)}},{key:"recalculateAllColumnsWidth",value:function(){this.hot.view&&(0,a.isVisible)(this.hot.view.wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllColumnsWidth())}},{key:"getSyncCalculationLimit",value:function(){var e=t.SYNC_CALCULATION_LIMIT,n=this.hot.countCols()-1;return(0,l.isObject)(this.hot.getSettings().autoColumnSize)&&(e=this.hot.getSettings().autoColumnSize.syncLimit,(0,h.isPercentValue)(e)?e=(0,u.valueAccordingPercent)(n,e):e>>=0),Math.min(e,n)}},{key:"getColumnWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t;return void 0===r&&(r=this.widths[e],n&&"number"==typeof r&&(r=Math.max(r,d.ViewportColumnsCalculator.DEFAULT_WIDTH))),r}},{key:"getFirstVisibleColumn",value:function(){var e=this.hot.view.wt;return e.wtViewport.columnsVisibleCalculator?e.wtTable.getFirstVisibleColumn():e.wtViewport.columnsRenderCalculator?e.wtTable.getFirstRenderedColumn():-1}},{key:"getLastVisibleColumn",value:function(){var e=this.hot.view.wt;return e.wtViewport.columnsVisibleCalculator?e.wtTable.getLastVisibleColumn():e.wtViewport.columnsRenderCalculator?e.wtTable.getLastRenderedColumn():-1}},{key:"findColumnsWhereHeaderWasChanged",value:function(){var e=this.hot.getColHeader(),t=O.get(this).cachedColumnHeaders;return(0,o.arrayReduce)(e,function(e,n,r){var o=t.length;return(o-1<r||t[r]!==n)&&e.push(r),o-1<r?t.push(n):t[r]=n,e},[])}},{key:"clearCache",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.length?(0,o.arrayEach)(t,function(t){e.widths[t]=void 0}):this.widths.length=0}},{key:"isNeedRecalculate",value:function(){return!!(0,o.arrayFilter)(this.widths,function(e){return void 0===e}).length}},{key:"onBeforeRender",value:function(){var e=this.hot.renderCall,t=this.hot.countRows(),n=this.getFirstVisibleColumn(),r=this.getLastVisibleColumn();null!==n&&null!==r&&t&&(this.calculateColumnsWidth({from:n,to:r},void 0,e),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllColumnsWidth())}},{key:"onAfterLoadData",value:function(){var e=this;this.hot.view?this.recalculateAllColumnsWidth():setTimeout(function(){e.hot&&e.recalculateAllColumnsWidth()},0)}},{key:"onBeforeChange",value:function(e){var t=this,n=(0,o.arrayMap)(e,function(e){var n=v(e,2)[1];return t.hot.propToCol(n)});this.clearCache(n)}},{key:"onBeforeColumnResize",value:function(e,t,n){var r=t;return n&&(this.calculateColumnsWidth(e,void 0,!0),r=this.getColumnWidth(e,void 0,!1)),r}},{key:"onAfterInit",value:function(){O.get(this).cachedColumnHeaders=this.hot.getColHeader()}},{key:"destroy",value:function(){this.ghostTable.clean(),y(m(t.prototype),"destroy",this).call(this)}}]),t}();(0,c.registerPlugin)("autoColumnSize",S);var _=S;t.default=_},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(7)),o=c(n(23)),i=n(3),a=c(n(10)),s=n(6),l=n(13),u=n(700);function c(e){return e&&e.__esModule?e:{default:e}}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}o.default.getSingleton().register("modifyAutofillRange"),o.default.getSingleton().register("beforeAutofill");var m=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?y(e):t}(this,g(t).call(this,e))).eventManager=new a.default(y(y(n))),n.addingStarted=!1,n.mouseDownOnCellCorner=!1,n.mouseDragOutside=!1,n.handleDraggedCells=0,n.directions=[],n.autoInsertRow=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(t,r.default),function(e,t,n){t&&d(e.prototype,t),n&&d(e,n)}(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().fillHandle}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",function(t){return e.onAfterCellCornerMouseDown(t)}),this.addHook("afterOnCellCornerDblClick",function(t){return e.onCellCornerDblClick(t)}),this.addHook("beforeOnCellMouseOver",function(t,n){return e.onBeforeCellMouseOver(n)}),p(g(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),p(g(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.clearMappedSettings(),p(g(t.prototype),"disablePlugin",this).call(this)}},{key:"getSelectionData",value:function(){var e={from:this.hot.getSelectedRangeLast().from,to:this.hot.getSelectedRangeLast().to};return this.hot.getData(e.from.row,e.from.col,e.to.row,e.to.col)}},{key:"fillIn",value:function(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;var e=this.hot.selection.highlight.getFill().getCorners();this.resetSelectionOfDraggedArea();var t=this.getCornersOfSelectedCells();e=this.hot.runHooks("modifyAutofillRange",e,t);var n=(0,u.getDragDirectionAndRange)(t,e),r=n.directionOfDrag,o=n.startOfDragCoords,i=n.endOfDragCoords;if(o&&o.row>-1&&o.col>-1){var a=this.getSelectionData();this.hot.runHooks("beforeAutofill",o,i,a);var s=(0,u.getDeltas)(o,i,a,r),l=a;if(["up","left"].indexOf(r)>-1){l=[];var c=null,f=null;if("up"===r){f=(c=i.row-o.row+1)%a.length;for(var h=0;h<c;h++)l.push(a[(h+(a.length-f))%a.length])}else{f=(c=i.col-o.col+1)%a[0].length;for(var d=0;d<a.length;d++){l.push([]);for(var p=0;p<c;p++)l[d].push(a[d][(p+(a[d].length-f))%a[d].length])}}}this.hot.populateFromArray(o.row,o.col,l,i.row,i.col,"".concat(this.pluginName,".fill"),null,r,s),this.setSelection(e)}else this.hot._refreshBorders();return!0}},{key:"reduceSelectionAreaIfNeeded",value:function(e){return e.row<0&&(e.row=0),e.col<0&&(e.col=0),e}},{key:"getCoordsOfDragAndDropBorders",value:function(e){var t,n=this.hot.getSelectedRangeLast().getTopLeftCorner(),r=this.hot.getSelectedRangeLast().getBottomRightCorner();if(this.directions.includes(u.DIRECTIONS.vertical)&&(r.row<e.row||n.row>e.row))t=new l.CellCoords(e.row,r.col);else{if(!this.directions.includes(u.DIRECTIONS.horizontal))return;t=new l.CellCoords(r.row,e.col)}return this.reduceSelectionAreaIfNeeded(t)}},{key:"showBorder",value:function(e){var t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}},{key:"addRow",value:function(){var e=this;this.hot._registerTimeout(setTimeout(function(){e.hot.alter("insert_row",void 0,1,"".concat(e.pluginName,".fill")),e.addingStarted=!1},200))}},{key:"addNewRowIfNeeded",value:function(){if(this.hot.selection.highlight.getFill().cellRange&&!1===this.addingStarted&&this.autoInsertRow){var e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getCorners(),n=this.hot.countRows();e[2]<n-1&&t[2]===n-1&&(this.addingStarted=!0,this.addRow())}}},{key:"getCornersOfSelectedCells",value:function(){return this.hot.selection.isMultiple()?this.hot.selection.highlight.createOrGetArea().getCorners():this.hot.selection.highlight.getCell().getCorners()}},{key:"getIndexOfLastAdjacentFilledInRow",value:function(e){for(var t,n=this.hot.getData(),r=this.hot.countRows(),o=e[2]+1;o<r;o++){for(var i=e[1];i<=e[3];i++){if(n[o][i])return-1}var a=n[o][e[1]-1],s=n[o][e[3]+1];(a||s)&&(t=o)}return t}},{key:"addSelectionFromStartAreaToSpecificRowIndex",value:function(e,t){this.hot.selection.highlight.getFill().clear().add(new l.CellCoords(e[0],e[1])).add(new l.CellCoords(t,e[3]))}},{key:"setSelection",value:function(e){var t;(t=this.hot).selectCell.apply(t,h(e).concat([!1,!1]))}},{key:"selectAdjacent",value:function(){var e=this.getCornersOfSelectedCells(),t=this.getIndexOfLastAdjacentFilledInRow(e);return-1!==t&&void 0!==t&&(this.addSelectionFromStartAreaToSpecificRowIndex(e,t),!0)}},{key:"resetSelectionOfDraggedArea",value:function(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}},{key:"redrawBorders",value:function(e){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(e),this.hot.view.render()}},{key:"getIfMouseWasDraggedOutside",value:function(e){var t=(0,i.offset)(this.hot.table).top-(window.pageYOffset||document.documentElement.scrollTop)+(0,i.outerHeight)(this.hot.table),n=(0,i.offset)(this.hot.table).left-(window.pageXOffset||document.documentElement.scrollLeft)+(0,i.outerWidth)(this.hot.table);return e.clientY>t&&e.clientX<=n}},{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(document.documentElement,"mouseup",function(){return e.onMouseUp()}),this.eventManager.addEventListener(document.documentElement,"mousemove",function(t){return e.onMouseMove(t)})}},{key:"onCellCornerDblClick",value:function(){this.selectAdjacent()&&this.fillIn()}},{key:"onAfterCellCornerMouseDown",value:function(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}},{key:"onBeforeCellMouseOver",value:function(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}},{key:"onMouseUp",value:function(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}},{key:"onMouseMove",value:function(e){var t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&t?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}},{key:"clearMappedSettings",value:function(){this.directions.length=0,this.autoInsertRow=!1}},{key:"mapSettings",value:function(){var e=(0,u.getMappedFillHandleSetting)(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}},{key:"destroy",value:function(){p(g(t.prototype),"destroy",this).call(this)}}]),t}();(0,s.registerPlugin)("autofill",m);var w=m;t.default=w},function(e,t,n){"use strict";t.__esModule=!0,t.getDeltas=function(e,t,n,r){var o=n.length,i=n?n[0].length:0,a=[],s=t.row-e.row,l=t.col-e.col;if(-1!==["down","up"].indexOf(r)){for(var u=[],c=0;c<=l;c++){var f=parseInt(n[0][c],10),h=parseInt(n[o-1][c],10),d=("down"===r?h-f:f-h)/(o-1)||0;u.push(d)}a.push(u)}if(-1!==["right","left"].indexOf(r))for(var p=0;p<=s;p++){var g=parseInt(n[p][0],10),v=parseInt(n[p][i-1],10),y=("right"===r?v-g:g-v)/(i-1)||0;a.push([y])}return a},t.getDragDirectionAndRange=function(e,t){var n,r,o;t[0]===e[0]&&t[1]<e[1]?(o="left",n=new i.CellCoords(t[0],t[1]),r=new i.CellCoords(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(o="right",n=new i.CellCoords(t[0],e[3]+1),r=new i.CellCoords(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(o="up",n=new i.CellCoords(t[0],t[1]),r=new i.CellCoords(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(o="down",n=new i.CellCoords(e[2]+1,t[1]),r=new i.CellCoords(t[2],t[3]));return{directionOfDrag:o,startOfDragCoords:n,endOfDragCoords:r}},t.getMappedFillHandleSetting=function(e){var t={};!0===e?(t.directions=Object.keys(a),t.autoInsertRow=!0):(0,r.isObject)(e)?((0,o.isDefined)(e.autoInsertRow)?e.direction===a.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,(0,o.isDefined)(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(a)):"string"==typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1);return t},t.DIRECTIONS=void 0;var r=n(2),o=n(14),i=n(13),a={horizontal:"horizontal",vertical:"vertical"};t.DIRECTIONS=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=d(n(7)),o=n(1),i=n(49),a=n(3),s=d(n(137)),l=n(2),u=n(5),c=n(6),f=d(n(447)),h=n(42);function d(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function v(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e,t,n){return(y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),e}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=v(this,m(t).call(this,e))).heights=[],n.ghostTable=new s.default(n.hot),n.samplesGenerator=new f.default(function(e,t){var r;return e>=0?r=n.hot.getDataAtCell(e,t):-1===e&&(r=n.hot.getColHeader(t)),{value:r}}),n.firstCalculation=!0,n.inProgress=!1,n.addHook("beforeRowResize",function(e,t,r){return n.onBeforeRowResize(e,t,r)}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}(t,r.default),b(t,null,[{key:"CALCULATION_STEP",get:function(){return 50}},{key:"SYNC_CALCULATION_LIMIT",get:function(){return 500}}]),b(t,[{key:"isEnabled",value:function(){return!0===this.hot.getSettings().autoRowSize||(0,l.isObject)(this.hot.getSettings().autoRowSize)}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",function(){return e.onAfterLoadData()}),this.addHook("beforeChange",function(t){return e.onBeforeChange(t)}),this.addHook("beforeColumnMove",function(){return e.recalculateAllRowsHeight()}),this.addHook("beforeColumnResize",function(){return e.recalculateAllRowsHeight()}),this.addHook("beforeColumnSort",function(){return e.clearCache()}),this.addHook("beforeRender",function(t){return e.onBeforeRender(t)}),this.addHook("beforeRowMove",function(t,n){return e.onBeforeRowMove(t,n)}),this.addHook("modifyRowHeight",function(t,n){return e.getRowHeight(n,t)}),this.addHook("modifyColumnHeaderHeight",function(){return e.getColumnHeaderHeight()}),y(m(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){y(m(t.prototype),"disablePlugin",this).call(this)}},{key:"calculateRowsHeight",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i="number"==typeof t?{from:t,to:t}:t,a="number"==typeof n?{from:n,to:n}:n;if(null!==this.hot.getColHeader(0)){var s=this.samplesGenerator.generateRowSamples(-1,a);this.ghostTable.addColumnHeadersRow(s.get(-1))}(0,u.rangeEach)(i.from,i.to,function(t){if(r||void 0===e.heights[t]){var n=e.samplesGenerator.generateRowSamples(t,a);(0,o.arrayEach)(n,function(t){var n=g(t,2),r=n[0],o=n[1];return e.ghostTable.addRow(r,o)})}}),this.ghostTable.rows.length&&(this.ghostTable.getHeights(function(t,n){e.heights[t]=n}),this.ghostTable.clean())}},{key:"calculateAllRowsHeight",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},r=0,o=this.hot.countRows()-1,a=null;this.inProgress=!0;var s=this.getSyncCalculationLimit();this.firstCalculation&&s>=0&&(this.calculateRowsHeight({from:0,to:s},n),this.firstCalculation=!1,r=s+1),r<o?function s(){if(!e.hot)return(0,i.cancelAnimationFrame)(a),void(e.inProgress=!1);e.calculateRowsHeight({from:r,to:Math.min(r+t.CALCULATION_STEP,o)},n),(r=r+t.CALCULATION_STEP+1)<o?a=(0,i.requestAnimationFrame)(s):((0,i.cancelAnimationFrame)(a),e.inProgress=!1,e.hot.view.wt.wtOverlays.adjustElementsSize(!0),e.hot.view.wt.wtOverlays.leftOverlay.needFullRender&&e.hot.view.wt.wtOverlays.leftOverlay.clone.draw())}():(this.inProgress=!1,this.hot.view.wt.wtOverlays.adjustElementsSize(!1))}},{key:"setSamplingOptions",value:function(){var e=this.hot.getSettings().autoRowSize,t=e&&(0,l.hasOwnProperty)(e,"samplingRatio")?this.hot.getSettings().autoRowSize.samplingRatio:void 0,n=e&&(0,l.hasOwnProperty)(e,"allowSampleDuplicates")?this.hot.getSettings().autoRowSize.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),n&&this.samplesGenerator.setAllowDuplicates(n)}},{key:"recalculateAllRowsHeight",value:function(){(0,a.isVisible)(this.hot.view.wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllRowsHeight())}},{key:"getSyncCalculationLimit",value:function(){var e=t.SYNC_CALCULATION_LIMIT,n=this.hot.countRows()-1;return(0,l.isObject)(this.hot.getSettings().autoRowSize)&&(e=this.hot.getSettings().autoRowSize.syncLimit,(0,h.isPercentValue)(e)?e=(0,u.valueAccordingPercent)(n,e):e>>=0),Math.min(e,n)}},{key:"getRowHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=t;return void 0!==this.heights[e]&&this.heights[e]>(t||0)&&(n=this.heights[e]),n}},{key:"getColumnHeaderHeight",value:function(){return this.heights[-1]}},{key:"getFirstVisibleRow",value:function(){var e=this.hot.view.wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getFirstVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getFirstRenderedRow():-1}},{key:"getLastVisibleRow",value:function(){var e=this.hot.view.wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getLastVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getLastRenderedRow():-1}},{key:"clearCache",value:function(){this.heights.length=0,this.heights[-1]=void 0}},{key:"clearCacheByRange",value:function(e){var t=this,n="number"==typeof e?{from:e,to:e}:e,r=n.from,o=n.to;(0,u.rangeEach)(Math.min(r,o),Math.max(r,o),function(e){t.heights[e]=void 0})}},{key:"isNeedRecalculate",value:function(){return!!(0,o.arrayFilter)(this.heights,function(e){return void 0===e}).length}},{key:"onBeforeRender",value:function(){var e=this.hot.renderCall,t=this.hot.getSettings().fixedRowsBottom,n=this.getFirstVisibleRow(),r=this.getLastVisibleRow();if(null!==n&&null!==r){if(this.calculateRowsHeight({from:n,to:r},void 0,e),t){var o=this.hot.countRows()-1;this.calculateRowsHeight({from:o-t,to:o})}this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()}}},{key:"onBeforeRowMove",value:function(e,t){this.clearCacheByRange({from:e,to:t}),this.calculateAllRowsHeight()}},{key:"onBeforeRowResize",value:function(e,t,n){var r=t;return n&&(this.calculateRowsHeight(e,void 0,!0),r=this.getRowHeight(e)),r}},{key:"onAfterLoadData",value:function(){var e=this;this.hot.view?this.recalculateAllRowsHeight():setTimeout(function(){e.hot&&e.recalculateAllRowsHeight()},0)}},{key:"onBeforeChange",value:function(e){var t=null;1===e.length?t=e[0][0]:e.length>1&&(t={from:e[0][0],to:e[e.length-1][0]}),null!==t&&this.clearCacheByRange(t)}},{key:"destroy",value:function(){this.ghostTable.clean(),y(m(t.prototype),"destroy",this).call(this)}}]),t}();(0,c.registerPlugin)("autoRowSize",E);var O=E;t.default=O},function(e,t,n){"use strict";t.__esModule=!0,t.ColumnStatesManager=void 0;var r=n(2),o=n(1);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"],s=!1,l=!0,u=!0,c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sortedColumnsStates=[],this.sortEmptyCells=s,this.indicator=l,this.headerAction=u,this.compareFunctionFactory=void 0}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(e,[{key:"updateAllColumnsProperties",value:function(e){var t=this;(0,r.isObject)(e)&&(0,r.objectEach)(e,function(e,n){a.includes(n)&&(t[n]=e)})}},{key:"getAllColumnsProperties",value:function(){var e={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"==typeof this.compareFunctionFactory&&(e.compareFunctionFactory=this.compareFunctionFactory),e}},{key:"getFirstSortedColumn",value:function(){var e;return this.getNumberOfSortedColumns()>0&&(e=this.sortedColumnsStates[0].column),e}},{key:"getSortOrderOfColumn",value:function(e){var t,n=this.sortedColumnsStates.find(function(t){var n=t.column;return e===n});return(0,r.isObject)(n)&&(t=n.sortOrder),t}},{key:"getSortedColumns",value:function(){return(0,o.arrayMap)(this.sortedColumnsStates,function(e){return e.column})}},{key:"getIndexOfColumnInSortQueue",value:function(e){return this.getSortedColumns().indexOf(e)}},{key:"getNumberOfSortedColumns",value:function(){return this.sortedColumnsStates.length}},{key:"isListOfSortedColumnsEmpty",value:function(){return 0===this.getNumberOfSortedColumns()}},{key:"isColumnSorted",value:function(e){return this.getSortedColumns().includes(e)}},{key:"getSortStates",value:function(){return(0,r.deepClone)(this.sortedColumnsStates)}},{key:"getColumnSortState",value:function(e){if(this.isColumnSorted(e))return(0,r.deepClone)(this.sortedColumnsStates[this.getIndexOfColumnInSortQueue(e)])}},{key:"setSortStates",value:function(e){this.sortedColumnsStates=e}},{key:"destroy",value:function(){this.sortedColumnsStates.length=0,this.sortedColumnsStates=null}}]),e}();t.ColumnStatesManager=c},function(e,t,n){"use strict";t.__esModule=!0,t.getClassesToAdd=function(e,t,n,r){var l=[i];r&&l.push(a);if(!1===n)l.push(o);else if(e.isColumnSorted(t)){var u=e.getSortOrderOfColumn(t);l.push(s.get(u))}return l},t.getClassedToRemove=function(){return Array.from(s.values()).concat(a,o,i)};var r=n(138),o="indicatorDisabled",i="columnSorting",a="sortAction",s=new Map([[r.ASC_SORT_STATE,"ascending"],[r.DESC_SORT_STATE,"descending"]])},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(76)),o=n(2),i=n(5);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(e,[{key:"createMap",value:function(e){var t=this,n=void 0===e?this._arrayMap.length:e;this._arrayMap.length=0,(0,i.rangeEach)(n-1,function(e){t._arrayMap[e]=e})}},{key:"destroy",value:function(){this._arrayMap=null}}]),e}();(0,o.mixin)(s,r.default);var l=s;t.default=l},function(e,t,n){"use strict";t.__esModule=!0,t.rootComparator=function(e,t){return function(n,i){var a=o(n),s=a.slice(1),l=o(i),u=l.slice(1);return function(n){var o=e[n],i=t[n],a=s[n],l=u[n],c=i.columnSorting,f=c.compareFunctionFactory?c.compareFunctionFactory:(0,r.getCompareFunctionFactory)(i.type),h=f(o,i,c)(a,l);return h}(0)}};var r=n(67);function o(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}},function(e,t,n){"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,n){return function(t,i){var a=n.sortEmptyCells;return"string"==typeof t&&(t=t.toLowerCase()),"string"==typeof i&&(i=i.toLowerCase()),t===i?o.DO_NOT_SWAP:(0,r.isEmpty)(t)?(0,r.isEmpty)(i)?o.DO_NOT_SWAP:a&&"asc"===e?o.FIRST_BEFORE_SECOND:o.FIRST_AFTER_SECOND:(0,r.isEmpty)(i)?a&&"asc"===e?o.FIRST_AFTER_SECOND:o.FIRST_BEFORE_SECOND:isNaN(t)&&!isNaN(i)?"asc"===e?o.FIRST_AFTER_SECOND:o.FIRST_BEFORE_SECOND:!isNaN(t)&&isNaN(i)?"asc"===e?o.FIRST_BEFORE_SECOND:o.FIRST_AFTER_SECOND:(isNaN(t)||isNaN(i)||(t=parseFloat(t),i=parseFloat(i)),t<i?"asc"===e?o.FIRST_BEFORE_SECOND:o.FIRST_AFTER_SECOND:t>i?"asc"===e?o.FIRST_AFTER_SECOND:o.FIRST_BEFORE_SECOND:o.DO_NOT_SWAP)}},t.COLUMN_DATA_TYPE=void 0;var r=n(14),o=n(67);t.COLUMN_DATA_TYPE="default"},function(e,t,n){"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,n){return function(t,i){var a=parseFloat(t),s=parseFloat(i),l=n.sortEmptyCells;if(a===s||isNaN(a)&&isNaN(s))return o.DO_NOT_SWAP;if(l){if((0,r.isEmpty)(t))return"asc"===e?o.FIRST_BEFORE_SECOND:o.FIRST_AFTER_SECOND;if((0,r.isEmpty)(i))return"asc"===e?o.FIRST_AFTER_SECOND:o.FIRST_BEFORE_SECOND}return isNaN(a)?o.FIRST_AFTER_SECOND:isNaN(s)?o.FIRST_BEFORE_SECOND:a<s?"asc"===e?o.FIRST_BEFORE_SECOND:o.FIRST_AFTER_SECOND:a>s?"asc"===e?o.FIRST_AFTER_SECOND:o.FIRST_BEFORE_SECOND:o.DO_NOT_SWAP}},t.COLUMN_DATA_TYPE=void 0;var r=n(14),o=n(67);t.COLUMN_DATA_TYPE="numeric"},function(e,t,n){"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,n){return function(a,s){var l=n.sortEmptyCells;if(a===s)return i.DO_NOT_SWAP;if((0,o.isEmpty)(a))return(0,o.isEmpty)(s)?i.DO_NOT_SWAP:l&&"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND;if((0,o.isEmpty)(s))return l&&"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND;var u=t.dateFormat,c=(0,r.default)(a,u),f=(0,r.default)(s,u);return c.isValid()?f.isValid()?f.isAfter(c)?"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:f.isBefore(c)?"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:i.DO_NOT_SWAP:i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND}},t.COLUMN_DATA_TYPE=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(36)),o=n(14),i=n(67);t.COLUMN_DATA_TYPE="date"},function(e,t,n){"use strict";t.__esModule=!0,t.sort=function(e,t){for(var n=(0,o.getRootComparator)(t),i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];(0,r.default)(e,n.apply(void 0,a))},t.FIRST_AFTER_SECOND=t.FIRST_BEFORE_SECOND=t.DO_NOT_SWAP=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(710)),o=n(449);t.DO_NOT_SWAP=0;t.FIRST_BEFORE_SECOND=-1;t.FIRST_AFTER_SECOND=1},function(e,t,n){"use strict";t.__esModule=!0,t.default=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(Math.abs(a-i)<=1)return[];var s=Math.ceil((i+a)/2);e(t,n,i,s);e(t,n,s,a);return function(e,t,n,o,i){for(var a=new r.default,s=new r.default,l=o-n,u=i-o,c=Math.max(l,u),f=i-n,h=0;h<c;h+=1)h<l&&a.push(e[n+h]),h<u&&s.push(e[o+h]);var d=0;for(;d<f;)a.first&&s.first?t(a.first.data,s.first.data)>0?e[n+d]=s.shift().data:e[n+d]=a.shift().data:a.first?e[n+d]=a.shift().data:e[n+d]=s.shift().data,d+=1;return e}(t,n,i,s,a)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(711));var o=function(e,t){var n=e.toString(),r=t.toString();return n===r?0:n<r?-1:1}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0,t.default=t.NodeStructure=void 0;var i=function e(t){o(this,e),this.data=t,this.next=null,this.prev=null};t.NodeStructure=i;var a=function(){function e(){o(this,e),this.first=null,this.last=null}return function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(e,[{key:"push",value:function(e){var t=new i(e);if(null===this.first)this.first=t,this.last=t;else{var n=this.last;this.last=t,t.prev=n,n.next=t}}},{key:"unshift",value:function(e){var t=new i(e);if(null===this.first)this.first=t,this.last=t;else{var n=this.first;this.first=t,t.next=n,n.prev=t}}},{key:"inorder",value:function(e){for(var t=this.first;t;)e(t),t=t.next}},{key:"remove",value:function(e){if(null===this.first)return!1;for(var t,n,r=this.first;r;){if(r.data===e)return t=r.next,n=r.prev,t&&(t.prev=n),n&&(n.next=t),r===this.first&&(this.first=t),r===this.last&&(this.last=n),!0;r=r.next}return!1}},{key:"hasCycle",value:function(){for(var e=this.first,t=this.first;;){if(null===e)return!1;if(null===(e=e.next))return!1;if((e=e.next)===(t=t.next))return!0}}},{key:"pop",value:function(){if(null===this.last)return null;var e=this.last;return this.last=this.last.prev,e}},{key:"shift",value:function(){if(null===this.first)return null;var e=this.first;return this.first=this.first.next,e}},{key:"recursiveReverse",value:function(){if(this.first){!function e(t,n){n&&(e(n,n.next),n.next=t)}(this.first,this.first.next),this.first.next=null;var e=this.first;this.first=this.last,this.last=e}}},{key:"reverse",value:function(){if(this.first&&this.first.next){for(var e,t=this.first.next,n=this.first;t;)e=t.next,t.next=n,n.prev=t,n=t,t=e;this.first.next=null,this.last.prev=null,e=this.first,this.first=n,this.last=e}}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(2),i=d(n(10)),a=n(13),s=n(6),l=d(n(7)),u=d(n(713)),c=n(34),f=d(n(714)),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4));function d(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t,n){return(y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(715);var C=new WeakMap,E=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?b(e):t}(this,m(t).call(this,e))).editor=null,n.displaySwitch=null,n.eventManager=null,n.range={},n.mouseDown=!1,n.contextMenuEvent=!1,n.timer=null,C.set(b(b(n)),{tempEditorDimensions:{},cellBelowCursor:null}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(t,l.default),function(e,t,n){t&&v(e.prototype,t),n&&v(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().comments}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.editor||(this.editor=new u.default),this.eventManager||(this.eventManager=new i.default(this)),this.displaySwitch||(this.displaySwitch=new f.default(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",function(t){return e.addToContextMenu(t)}),this.addHook("afterRenderer",function(t,n,r,o,i,a){return e.onAfterRenderer(t,a)}),this.addHook("afterScrollHorizontally",function(){return e.hide()}),this.addHook("afterScrollVertically",function(){return e.hide()}),this.addHook("afterBeginEditing",function(){return e.onAfterBeginEditing()}),this.displaySwitch.addLocalHook("hide",function(){return e.hide()}),this.displaySwitch.addLocalHook("show",function(t,n){return e.showAtCell(t,n)}),this.registerListeners(),y(m(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),y(m(t.prototype),"updatePlugin",this).call(this),this.displaySwitch.updateDelay(this.getDisplayDelaySetting())}},{key:"disablePlugin",value:function(){y(m(t.prototype),"disablePlugin",this).call(this)}},{key:"registerListeners",value:function(){var e=this;this.eventManager.addEventListener(document,"mouseover",function(t){return e.onMouseOver(t)}),this.eventManager.addEventListener(document,"mousedown",function(t){return e.onMouseDown(t)}),this.eventManager.addEventListener(document,"mouseup",function(){return e.onMouseUp()}),this.eventManager.addEventListener(this.editor.getInputElement(),"blur",function(){return e.onEditorBlur()}),this.eventManager.addEventListener(this.editor.getInputElement(),"mousedown",function(t){return e.onEditorMouseDown(t)}),this.eventManager.addEventListener(this.editor.getInputElement(),"mouseup",function(t){return e.onEditorMouseUp(t)})}},{key:"setRange",value:function(e){this.range=e}},{key:"clearRange",value:function(){this.range={}}},{key:"targetIsCellWithComment",value:function(e){var t=(0,r.closest)(e.target,"TD","TBODY");return!!(t&&(0,r.hasClass)(t,"htCommentCell")&&(0,r.closest)(t,[this.hot.rootElement]))}},{key:"targetIsCommentTextArea",value:function(e){return this.editor.getInputElement()===e.target}},{key:"setComment",value:function(e){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var t=this.editor.getValue(),n="";null!==e&&void 0!==e?n=e:null!==t&&void 0!==t&&(n=t);var r=this.range.from.row,o=this.range.from.col;this.updateCommentMeta(r,o,g({},"value",n)),this.hot.render()}},{key:"setCommentAtCell",value:function(e,t,n){this.setRange({from:new a.CellCoords(e,t)}),this.setComment(n)}},{key:"removeComment",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,"comment",void 0),e&&this.hot.render(),this.hide()}},{key:"removeCommentAtCell",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:new a.CellCoords(e,t)}),this.removeComment(n)}},{key:"getComment",value:function(){var e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,"value")}},{key:"getCommentAtCell",value:function(e,t){return this.getCommentMeta(e,t,"value")}},{key:"show",value:function(){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var e=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return this.refreshEditor(!0),this.editor.setValue(e.comment?e.comment.value:""),this.editor.hidden&&this.editor.show(),!0}},{key:"showAtCell",value:function(e,t){return this.setRange({from:new a.CellCoords(e,t)}),this.show()}},{key:"hide",value:function(){this.editor.hidden||this.editor.hide()}},{key:"refreshEditor",value:function(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&this.editor.isVisible()){var e=(0,r.getScrollableElement)(this.hot.view.wt.wtTable.TABLE),t=this.hot.view.wt.wtTable.getCell(this.range.from),n=this.range.from.row,o=this.range.from.col,i=(0,r.offset)(t),a=this.hot.view.wt.wtTable.getStretchedColumnWidth(o),s=i.top<0?0:i.top,l=i.left;this.hot.view.wt.wtViewport.hasVerticalScroll()&&e!==window&&(s-=this.hot.view.wt.wtOverlays.topOverlay.getScrollPosition()),this.hot.view.wt.wtViewport.hasHorizontalScroll()&&e!==window&&(l-=this.hot.view.wt.wtOverlays.leftOverlay.getScrollPosition());var u=l+a,c=s,f=this.getCommentMeta(n,o,"style"),h=this.getCommentMeta(n,o,"readOnly");f?this.editor.setSize(f.width,f.height):this.editor.resetSize(),this.editor.setReadOnlyState(h),this.editor.setPosition(u,c)}}},{key:"checkSelectionCommentsConsistency",value:function(){var e=this.hot.getSelectedRangeLast();if(!e)return!1;var t=!1,n=e.from;return this.getCommentMeta(n.row,n.col,"value")&&(t=!0),t}},{key:"updateCommentMeta",value:function(e,t,n){var r,i=this.hot.getCellMeta(e,t).comment;i?(r=(0,o.deepClone)(i),(0,o.deepExtend)(r,n)):r=n,this.hot.setCellMeta(e,t,"comment",r)}},{key:"getCommentMeta",value:function(e,t,n){var r=this.hot.getCellMeta(e,t);if(r.comment)return r.comment[n]}},{key:"onMouseDown",value:function(e){if(this.mouseDown=!0,this.hot.view&&this.hot.view.wt){if(!this.contextMenuEvent&&!this.targetIsCommentTextArea(e)){var t=(0,r.closest)(e.target,"TD","TBODY"),n=null;t&&(n=this.hot.view.wt.wtTable.getCoords(t)),(!t||this.range.from&&n&&(this.range.from.row!==n.row||this.range.from.col!==n.col))&&this.hide()}this.contextMenuEvent=!1}}},{key:"onMouseOver",value:function(e){var t=C.get(this);if(t.cellBelowCursor=document.elementFromPoint(e.clientX,e.clientY),!(this.mouseDown||this.editor.isFocused()||(0,r.hasClass)(e.target,"wtBorder")||t.cellBelowCursor!==e.target)&&this.editor)if(this.targetIsCellWithComment(e)){var n=this.hot.view.wt.wtTable.getCoords(e.target),o={from:new a.CellCoords(n.row,n.col)};this.displaySwitch.show(o)}else(0,r.isChildOf)(e.target,document)&&!this.targetIsCommentTextArea(e)&&this.displaySwitch.hide()}},{key:"onMouseUp",value:function(){this.mouseDown=!1}},{key:"onAfterRenderer",value:function(e,t){t.comment&&t.comment.value&&(0,r.addClass)(e,t.commentedCellClassName)}},{key:"onEditorBlur",value:function(){this.setComment()}},{key:"onEditorMouseDown",value:function(e){C.get(this).tempEditorDimensions={width:(0,r.outerWidth)(e.target),height:(0,r.outerHeight)(e.target)}}},{key:"onEditorMouseUp",value:function(e){var t=C.get(this),n=(0,r.outerWidth)(e.target),o=(0,r.outerHeight)(e.target);n===t.tempEditorDimensions.width+1&&o===t.tempEditorDimensions.height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,g({},"style",{width:n,height:o}))}},{key:"onContextMenuAddComment",value:function(){var e=this;this.displaySwitch.cancelHiding();var t=this.hot.getSelectedRangeLast();this.contextMenuEvent=!0,this.setRange({from:t.from}),this.show(),setTimeout(function(){e.hot&&(e.hot.deselectCell(),e.editor.focus())},10)}},{key:"onContextMenuRemoveComment",value:function(){var e=this.hot.getSelectedRangeLast(),t=e.from,n=e.to;this.contextMenuEvent=!0;for(var r=t.row;r<=n.row;r++)for(var o=t.col;o<=n.col;o++)this.removeCommentAtCell(r,o,!1);this.hot.render()}},{key:"onContextMenuMakeReadOnly",value:function(){var e=this.hot.getSelectedRangeLast(),t=e.from,n=e.to;this.contextMenuEvent=!0;for(var r=t.row;r<=n.row;r++)for(var o=t.col;o<=n.col;o++){var i=!!this.getCommentMeta(r,o,"readOnly");this.updateCommentMeta(r,o,g({},"readOnly",!i))}}},{key:"addToContextMenu",value:function(e){var t=this;e.items.push({name:"---------"},{key:"commentsAddEdit",name:function(){return t.checkSelectionCommentsConsistency()?t.hot.getTranslatedPhrase(h.CONTEXTMENU_ITEMS_EDIT_COMMENT):t.hot.getTranslatedPhrase(h.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback:function(){return t.onContextMenuAddComment()},disabled:function(){return!(this.getSelectedLast()&&!this.selection.isSelectedByCorner())}},{key:"commentsRemove",name:function(){return this.getTranslatedPhrase(h.CONTEXTMENU_ITEMS_REMOVE_COMMENT)},callback:function(){return t.onContextMenuRemoveComment()},disabled:function(){return t.hot.selection.isSelectedByCorner()}},{key:"commentsReadOnly",name:function(){var e=this,t=this.getTranslatedPhrase(h.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return(0,c.checkSelectionConsistency)(this.getSelectedRangeLast(),function(t,n){var r=e.getCellMeta(t,n).comment;if(r&&(r=r.readOnly),r)return!0})&&(t=(0,c.markLabelAsSelected)(t)),t},callback:function(){return t.onContextMenuMakeReadOnly()},disabled:function(){return t.hot.selection.isSelectedByCorner()||!t.checkSelectionCommentsConsistency()}})}},{key:"getDisplayDelaySetting",value:function(){var e=this.hot.getSettings().comments;if((0,o.isObject)(e))return e.displayDelay}},{key:"onAfterBeginEditing",value:function(){this.hide()}},{key:"destroy",value:function(){this.editor&&this.editor.destroy(),this.displaySwitch&&this.displaySwitch.destroy(),y(m(t.prototype),"destroy",this).call(this)}}]),t}();(0,s.registerPlugin)("comments",E);var O=E;t.default=O},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.hidden=!0,this.hide()}return i(e,null,[{key:"CLASS_EDITOR_CONTAINER",get:function(){return"htCommentsContainer"}},{key:"CLASS_EDITOR",get:function(){return"htComments"}},{key:"CLASS_INPUT",get:function(){return"htCommentTextArea"}},{key:"CLASS_CELL",get:function(){return"htCommentCell"}}]),i(e,[{key:"setPosition",value:function(e,t){this.editorStyle.left="".concat(e,"px"),this.editorStyle.top="".concat(t,"px")}},{key:"setSize",value:function(e,t){if(e&&t){var n=this.getInputElement();n.style.width="".concat(e,"px"),n.style.height="".concat(t,"px")}}},{key:"resetSize",value:function(){var e=this.getInputElement();e.style.width="",e.style.height=""}},{key:"setReadOnlyState",value:function(e){this.getInputElement().readOnly=e}},{key:"show",value:function(){this.editorStyle.display="block",this.hidden=!1}},{key:"hide",value:function(){this.editorStyle.display="none",this.hidden=!0}},{key:"isVisible",value:function(){return"block"===this.editorStyle.display}},{key:"setValue",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"";this.getInputElement().value=e}},{key:"getValue",value:function(){return this.getInputElement().value}},{key:"isFocused",value:function(){return document.activeElement===this.getInputElement()}},{key:"focus",value:function(){this.getInputElement().focus()}},{key:"createEditor",value:function(){var t=document.createElement("div"),n=document.createElement("textarea"),o=document.querySelector(".".concat(e.CLASS_EDITOR_CONTAINER));return o||(o=document.createElement("div"),(0,r.addClass)(o,e.CLASS_EDITOR_CONTAINER),document.body.appendChild(o)),(0,r.addClass)(t,e.CLASS_EDITOR),(0,r.addClass)(n,e.CLASS_INPUT),t.appendChild(n),o.appendChild(t),t}},{key:"getInputElement",value:function(){return this.editor.querySelector(".".concat(e.CLASS_INPUT))}},{key:"destroy",value:function(){this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(51),o=n(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n(29));function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.wasLastActionShow=!0,this.showDebounced=null,this.hidingTimer=null,this.updateDelay(t)}return function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(e,[{key:"hide",value:function(){var e=this;this.wasLastActionShow=!1,this.hidingTimer=setTimeout(function(){!1===e.wasLastActionShow&&e.runLocalHooks("hide")},250)}},{key:"show",value:function(e){this.wasLastActionShow=!0,this.showDebounced(e)}},{key:"cancelHiding",value:function(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}},{key:"updateDelay",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=(0,r.debounce)(function(t){e.wasLastActionShow&&e.runLocalHooks("show",t.from.row,t.from.col)},t)}},{key:"destroy",value:function(){this.clearLocalHooks()}}]),e}();(0,o.mixin)(s,i.default);var l=s;t.default=l},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=p(n(7)),o=p(n(23)),i=n(1),a=p(n(450)),s=p(n(10)),l=p(n(451)),u=p(n(140)),c=n(6),f=n(16),h=n(3),d=n(56);function p(e){return e&&e.__esModule?e:{default:e}}function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t,n){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),e}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(729),o.default.getSingleton().register("afterContextMenuDefaultOptions"),o.default.getSingleton().register("beforeContextMenuShow"),o.default.getSingleton().register("afterContextMenuShow"),o.default.getSingleton().register("afterContextMenuHide"),o.default.getSingleton().register("afterContextMenuExecute");var E=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?C(e):t}(this,y(t).call(this,e))).eventManager=new s.default(C(C(n))),n.commandExecutor=new a.default(n.hot),n.itemsFactory=null,n.menu=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(t,r.default),w(t,null,[{key:"DEFAULT_ITEMS",get:function(){return[d.ROW_ABOVE,d.ROW_BELOW,d.SEPARATOR,d.COLUMN_LEFT,d.COLUMN_RIGHT,d.SEPARATOR,d.REMOVE_ROW,d.REMOVE_COLUMN,d.SEPARATOR,d.UNDO,d.REDO,d.SEPARATOR,d.READ_ONLY,d.SEPARATOR,d.ALIGNMENT]}}]),w(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().contextMenu}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){this.itemsFactory=new l.default(this.hot,t.DEFAULT_ITEMS);var n=this.hot.getSettings().contextMenu,r={items:this.itemsFactory.getItems(n)};"function"==typeof n.callback&&this.commandExecutor.setCommonCallback(n.callback),v(y(t.prototype),"enablePlugin",this).call(this);var o=function(){if(e.hot){e.hot.runHooks("afterContextMenuDefaultOptions",r),e.itemsFactory.setPredefinedItems(r.items);var t=e.itemsFactory.getItems(n);e.menu=new u.default(e.hot,{className:"htContextMenu",keepInViewport:!0}),e.hot.runHooks("beforeContextMenuSetItems",t),e.menu.setMenuItems(t),e.menu.addLocalHook("beforeOpen",function(){return e.onMenuBeforeOpen()}),e.menu.addLocalHook("afterOpen",function(){return e.onMenuAfterOpen()}),e.menu.addLocalHook("afterClose",function(){return e.onMenuAfterClose()}),e.menu.addLocalHook("executeCommand",function(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.executeCommand).call.apply(t,[e].concat(r))}),e.addHook("afterOnCellContextMenu",function(t){return e.onAfterOnCellContextMenu(t)}),(0,i.arrayEach)(t,function(t){return e.commandExecutor.registerCommand(t.key,t)})}};this.callOnPluginsReady(function(){e.isPluginsReady?setTimeout(o,0):o()})}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),v(y(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),v(y(t.prototype),"disablePlugin",this).call(this)}},{key:"open",value:function(e){this.menu&&(this.menu.open(),this.menu.setPosition({top:parseInt((0,f.pageY)(e),10)-(0,h.getWindowScrollTop)(),left:parseInt((0,f.pageX)(e),10)-(0,h.getWindowScrollLeft)()}),this.menu.hotMenu.isHotTableEnv=this.hot.isHotTableEnv)}},{key:"close",value:function(){this.menu&&this.menu.close()}},{key:"executeCommand",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=this.commandExecutor).execute.apply(t,[e].concat(r))}},{key:"onAfterOnCellContextMenu",value:function(e){var t=this.hot.getSettings(),n=t.rowHeaders,r=t.colHeaders;var o=e.realTarget;this.close(),(0,h.hasClass)(o,"handsontableInput")||(e.preventDefault(),(0,f.stopPropagation)(e),(n||r||function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(o)||(0,h.hasClass)(o,"current")&&(0,h.hasClass)(o,"wtBorder"))&&this.open(e))}},{key:"onMenuBeforeOpen",value:function(){this.hot.runHooks("beforeContextMenuShow",this)}},{key:"onMenuAfterOpen",value:function(){this.hot.runHooks("afterContextMenuShow",this)}},{key:"onMenuAfterClose",value:function(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}},{key:"destroy",value:function(){this.close(),this.menu&&this.menu.destroy(),v(y(t.prototype),"destroy",this).call(this)}}]),t}();E.SEPARATOR={name:d.SEPARATOR},(0,c.registerPlugin)("contextMenu",E);var O=E;t.default=O},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{key:a,name:function(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT)},disabled:function(){return!(this.getSelectedRange()&&!this.selection.isSelectedByCorner())},submenu:{items:[{key:"".concat(a,":left"),name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT),n=(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htLeft"))return!0});return n&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,r.getAlignmentClasses)(t,function(t,n){return e.getCellMeta(t,n).className});this.runHooks("beforeCellAlignment",n,t,"horizontal","htLeft"),(0,r.align)(t,"horizontal","htLeft",function(t,n){return e.getCellMeta(t,n)},function(t,n,r,o){return e.setCellMeta(t,n,r,o)}),this.render()},disabled:!1},{key:"".concat(a,":center"),name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER),n=(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htCenter"))return!0});return n&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,r.getAlignmentClasses)(t,function(t,n){return e.getCellMeta(t,n).className});this.runHooks("beforeCellAlignment",n,t,"horizontal","htCenter"),(0,r.align)(t,"horizontal","htCenter",function(t,n){return e.getCellMeta(t,n)},function(t,n,r,o){return e.setCellMeta(t,n,r,o)}),this.render()},disabled:!1},{key:"".concat(a,":right"),name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT),n=(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htRight"))return!0});return n&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,r.getAlignmentClasses)(t,function(t,n){return e.getCellMeta(t,n).className});this.runHooks("beforeCellAlignment",n,t,"horizontal","htRight"),(0,r.align)(t,"horizontal","htRight",function(t,n){return e.getCellMeta(t,n)},function(t,n,r,o){return e.setCellMeta(t,n,r,o)}),this.render()},disabled:!1},{key:"".concat(a,":justify"),name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY),n=(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htJustify"))return!0});return n&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,r.getAlignmentClasses)(t,function(t,n){return e.getCellMeta(t,n).className});this.runHooks("beforeCellAlignment",n,t,"horizontal","htJustify"),(0,r.align)(t,"horizontal","htJustify",function(t,n){return e.getCellMeta(t,n)},function(t,n,r,o){return e.setCellMeta(t,n,r,o)}),this.render()},disabled:!1},{name:o.KEY},{key:"".concat(a,":top"),name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_TOP),n=(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htTop"))return!0});return n&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,r.getAlignmentClasses)(t,function(t,n){return e.getCellMeta(t,n).className});this.runHooks("beforeCellAlignment",n,t,"vertical","htTop"),(0,r.align)(t,"vertical","htTop",function(t,n){return e.getCellMeta(t,n)},function(t,n,r,o){return e.setCellMeta(t,n,r,o)}),this.render()},disabled:!1},{key:"".concat(a,":middle"),name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE),n=(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htMiddle"))return!0});return n&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,r.getAlignmentClasses)(t,function(t,n){return e.getCellMeta(t,n).className});this.runHooks("beforeCellAlignment",n,t,"vertical","htMiddle"),(0,r.align)(t,"vertical","htMiddle",function(t,n){return e.getCellMeta(t,n)},function(t,n,r,o){return e.setCellMeta(t,n,r,o)}),this.render()},disabled:!1},{key:"".concat(a,":bottom"),name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM),n=(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htBottom"))return!0});return n&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,r.getAlignmentClasses)(t,function(t,n){return e.getCellMeta(t,n).className});this.runHooks("beforeCellAlignment",n,t,"vertical","htBottom"),(0,r.align)(t,"vertical","htBottom",function(t,n){return e.getCellMeta(t,n)},function(t,n,r,o){return e.setCellMeta(t,n,r,o)}),this.render()},disabled:!1}]}}},t.KEY=void 0;var r=n(34),o=n(139),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4));var a="alignment";t.KEY=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{key:i,name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_CLEAR_COLUMN)},callback:function(e,t){var n=t[0].start.col;this.countRows()&&this.populateFromArray(0,n,[[null]],Math.max(t[0].start.row,t[0].end.row),n,"ContextMenu.clearColumn")},disabled:function(){var e=(0,r.getValidSelection)(this);if(!e)return!0;var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(e[0],3),n=t[0],o=t[1],i=t[2],a=[n,0,i,this.countCols()-1],s=a.join(",")===e.join(",");return o<0||this.countCols()>=this.getSettings().maxCols||s}}},t.KEY=void 0;var r=n(34),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4));var i="clear_column";t.KEY=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{key:i,name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_INSERT_LEFT)},callback:function(e,t){var n=t[Math.max(t.length-1,0)];this.alter("insert_col",n.start.col,1,"ContextMenu.columnLeft")},disabled:function(){var e=(0,r.getValidSelection)(this);if(!e)return!0;if(!this.isColumnModificationAllowed())return!0;var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(e[0],3),n=t[0],o=t[1],i=t[2],a=[n,0,i,this.countCols()-1],s=a.join(",")===e.join(","),l=1===this.countCols();return o<0||this.countCols()>=this.getSettings().maxCols||!l&&s},hidden:function(){return!this.getSettings().allowInsertColumn}}},t.KEY=void 0;var r=n(34),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4));var i="col_left";t.KEY=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{key:i,name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_INSERT_RIGHT)},callback:function(e,t){var n=t[Math.max(t.length-1,0)];this.alter("insert_col",n.end.col+1,1,"ContextMenu.columnRight")},disabled:function(){var e=(0,r.getValidSelection)(this);if(!e)return!0;if(!this.isColumnModificationAllowed())return!0;var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(e[0],3),n=t[0],o=t[1],i=t[2],a=[n,0,i,this.countCols()-1],s=a.join(",")===e.join(","),l=1===this.countCols();return o<0||this.countCols()>=this.getSettings().maxCols||!l&&s},hidden:function(){return!this.getSettings().allowInsertColumn}}},t.KEY=void 0;var r=n(34),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4));var i="col_right";t.KEY=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{key:a,name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_READ_ONLY),n=(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){return e.getCellMeta(t,n).readOnly});return n&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,r.checkSelectionConsistency)(t,function(t,n){return e.getCellMeta(t,n).readOnly});(0,o.arrayEach)(t,function(t){t.forAll(function(t,r){e.setCellMeta(t,r,"readOnly",!n)})}),this.render()},disabled:function(){return!(this.getSelectedRange()&&!this.selection.isSelectedByCorner())}}},t.KEY=void 0;var r=n(34),o=n(1),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4));var a="make_read_only";t.KEY=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{key:o,name:function(){return this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_REDO)},callback:function(){this.redo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isRedoAvailable()}}},t.KEY=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4));var o="redo";t.KEY=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{key:a,name:function(){var e=this.getSelected(),t=0;if(e)if(e.length>1)t=1;else{var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(e[0],4),r=n[1],o=n[3];r-o!=0&&(t=1)}return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_REMOVE_COLUMN,t)},callback:function(){this.alter("remove_col",(0,o.transformSelectionToColumnDistance)(this.getSelected()),null,"ContextMenu.removeColumn")},disabled:function(){var e=(0,r.getValidSelection)(this),t=this.countCols();return!e||(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner()||!this.isColumnModificationAllowed()||!t)},hidden:function(){return!this.getSettings().allowRemoveColumn}}},t.KEY=void 0;var r=n(34),o=n(104),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4));var a="remove_col";t.KEY=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{key:a,name:function(){var e=this.getSelected(),t=0;if(e)if(e.length>1)t=1;else{var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(e[0],3),r=n[0],o=n[2];r-o!=0&&(t=1)}return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_REMOVE_ROW,t)},callback:function(){this.alter("remove_row",(0,o.transformSelectionToRowDistance)(this.getSelected()),1,"ContextMenu.removeRow")},disabled:function(){var e=(0,r.getValidSelection)(this),t=this.countRows();return!e||(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner()||!t)},hidden:function(){return!this.getSettings().allowRemoveRow}}},t.KEY=void 0;var r=n(34),o=n(104),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4));var a="remove_row";t.KEY=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{key:i,name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ROW_ABOVE)},callback:function(e,t){var n=t[Math.max(t.length-1,0)];this.alter("insert_row",n.start.row,1,"ContextMenu.rowAbove")},disabled:function(){var e=(0,r.getValidSelection)(this);return!e||(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows)},hidden:function(){return!this.getSettings().allowInsertRow}}},t.KEY=void 0;var r=n(34),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4));var i="row_above";t.KEY=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{key:i,name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ROW_BELOW)},callback:function(e,t){var n=t[Math.max(t.length-1,0)];this.alter("insert_row",n.end.row+1,1,"ContextMenu.rowBelow")},disabled:function(){var e=(0,r.getValidSelection)(this);return!e||(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows)},hidden:function(){return!this.getSettings().allowInsertRow}}},t.KEY=void 0;var r=n(34),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4));var i="row_below";t.KEY=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{key:o,name:function(){return this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_UNDO)},callback:function(){this.undo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isUndoAvailable()}}},t.KEY=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4));var o="undo";t.KEY=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(16);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n,i,a,s,l,u,c=(0,r.getWindowScrollTop)(),f=(0,r.getWindowScrollLeft)();this.type=this.getSourceType(t),"literal"===this.type?(n=parseInt(t.top,10),a=parseInt(t.left,10),l=t.height||0,u=t.width||0,i=n,s=a,n+=c,a+=f):"event"===this.type&&(n=parseInt((0,o.pageY)(t),10),a=parseInt((0,o.pageX)(t),10),l=t.target.clientHeight,u=t.target.clientWidth,i=n-c,s=a-f),this.top=n,this.topRelative=i,this.left=a,this.leftRelative=s,this.scrollTop=c,this.scrollLeft=f,this.cellHeight=l,this.cellWidth=u}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(e,[{key:"getSourceType",value:function(e){var t="literal";return e instanceof Event&&(t="event"),t}},{key:"fitsAbove",value:function(e){return this.topRelative>=e.offsetHeight}},{key:"fitsBelow",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.innerHeight;return this.topRelative+e.offsetHeight<=t}},{key:"fitsOnRight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}},{key:"fitsOnLeft",value:function(e){return this.leftRelative>=e.offsetWidth}}]),e}();t.default=a},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=g(n(7)),o=g(n(23)),i=g(n(439)),a=n(1),s=n(5),l=n(3),u=n(6),c=g(n(731)),f=g(n(732)),h=g(n(733)),d=n(735),p=n(736);function g(e){return e&&e.__esModule?e:{default:e}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t,n){return(w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=b(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(737),o.default.getSingleton().register("afterCopyLimit"),o.default.getSingleton().register("modifyCopyableRange"),o.default.getSingleton().register("beforeCut"),o.default.getSingleton().register("afterCut"),o.default.getSingleton().register("beforePaste"),o.default.getSingleton().register("afterPaste"),o.default.getSingleton().register("beforeCopy"),o.default.getSingleton().register("afterCopy");var O=1e3,S=1e3,_=new WeakMap,T=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==y(t)&&"function"!=typeof t?E(e):t}(this,b(t).call(this,e))).columnsLimit=S,n.copyableRanges=[],n.pasteMode="overwrite",n.rowsLimit=O,_.set(E(E(n)),{isTriggeredByCopy:!1,isTriggeredByCut:!1,isBeginEditing:!1,isFragmentSelectionEnabled:!1}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}(t,r.default),function(e,t,n){t&&m(e.prototype,t),n&&m(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().copyPaste}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){var n=this.hot.getSettings();_.get(this).isFragmentSelectionEnabled=n.fragmentSelection,"object"===y(n.copyPaste)&&(this.pasteMode=n.copyPaste.pasteMode||this.pasteMode,this.rowsLimit=n.copyPaste.rowsLimit||this.rowsLimit,this.columnsLimit=n.copyPaste.columnsLimit||this.columnsLimit),this.addHook("afterContextMenuDefaultOptions",function(t){return e.onAfterContextMenuDefaultOptions(t)}),this.addHook("afterOnCellMouseUp",function(){return e.onAfterOnCellMouseUp()}),this.addHook("afterSelectionEnd",function(){return e.onAfterSelectionEnd()}),this.addHook("beforeKeyDown",function(){return e.onBeforeKeyDown()}),this.focusableElement=(0,d.createElement)(),this.focusableElement.addLocalHook("copy",function(t){return e.onCopy(t)}).addLocalHook("cut",function(t){return e.onCut(t)}).addLocalHook("paste",function(t){return e.onPaste(t)}),w(b(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.getOrCreateFocusableElement(),w(b(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.focusableElement&&(0,d.destroyElement)(this.focusableElement),w(b(t.prototype),"disablePlugin",this).call(this)}},{key:"copy",value:function(){_.get(this).isTriggeredByCopy=!0,this.getOrCreateFocusableElement(),this.focusableElement.focus(),document.execCommand("copy")}},{key:"cut",value:function(){_.get(this).isTriggeredByCut=!0,this.getOrCreateFocusableElement(),this.focusableElement.focus(),document.execCommand("cut")}},{key:"getRangedCopyableData",value:function(e){var t=this,n=[],r=[],o=[];return(0,a.arrayEach)(e,function(e){(0,s.rangeEach)(e.startRow,e.endRow,function(e){-1===r.indexOf(e)&&r.push(e)}),(0,s.rangeEach)(e.startCol,e.endCol,function(e){-1===o.indexOf(e)&&o.push(e)})}),(0,a.arrayEach)(r,function(e){var r=[];(0,a.arrayEach)(o,function(n){r.push(t.hot.getCopyableData(e,n))}),n.push(r)}),i.default.stringify(n)}},{key:"getRangedData",value:function(e){var t=this,n=[],r=[],o=[];return(0,a.arrayEach)(e,function(e){(0,s.rangeEach)(e.startRow,e.endRow,function(e){-1===r.indexOf(e)&&r.push(e)}),(0,s.rangeEach)(e.startCol,e.endCol,function(e){-1===o.indexOf(e)&&o.push(e)})}),(0,a.arrayEach)(r,function(e){var r=[];(0,a.arrayEach)(o,function(n){r.push(t.hot.getCopyableData(e,n))}),n.push(r)}),n}},{key:"paste",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e||t){var n=new h.default;e&&n.clipboardData.setData("text/plain",e),t&&n.clipboardData.setData("text/html",t),this.getOrCreateFocusableElement(),this.onPaste(n)}}},{key:"setCopyableText",value:function(){var e=this.hot.getSelectedRangeLast();if(e){var t=e.getTopLeftCorner(),n=e.getBottomRightCorner(),r=t.row,o=t.col,i=n.row,a=n.col,s=Math.min(i,r+this.rowsLimit-1),l=Math.min(a,o+this.columnsLimit-1);this.copyableRanges.length=0,this.copyableRanges.push({startRow:r,startCol:o,endRow:s,endCol:l}),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges),i===s&&a===l||this.hot.runHooks("afterCopyLimit",i-r+1,a-o+1,this.rowsLimit,this.columnsLimit)}}},{key:"getOrCreateFocusableElement",value:function(){var e=this.hot.getActiveEditor(),t=e?e.TEXTAREA:void 0;t?this.focusableElement.setFocusableElement(t):this.focusableElement.useSecondaryElement()}},{key:"isEditorOpened",value:function(){var e=this.hot.getActiveEditor();return e&&e.isOpened()}},{key:"populateValues",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedLast();if(e.length){for(var n=e.length-1,r=e[0].length-1,o=Math.min(t[0],t[2]),i=Math.max(t[0],t[2],n+o),a=Math.min(t[1],t[3]),s=Math.max(t[1],t[3],r+a),l=[],u=o,c=0;u<=i;u+=1){for(var f=[],h=a,d=0;h<=s;h+=1)f.push(e[c][d]),d=d===r?0:d+=1;l.push(f),c=c===n?0:c+=1}return this.hot.populateFromArray(o,a,l,void 0,void 0,"CopyPaste.paste",this.pasteMode),[o,a,i,s]}}},{key:"onCopy",value:function(e){var t=_.get(this);if((this.hot.isListening()||t.isTriggeredByCopy)&&!this.isEditorOpened()){this.setCopyableText(),t.isTriggeredByCopy=!1;var n=this.getRangedData(this.copyableRanges);if(!!this.hot.runHooks("beforeCopy",n,this.copyableRanges)){var r=i.default.stringify(n);if(e&&e.clipboardData){var o=(0,p.arrayToTable)(n);e.clipboardData.setData("text/plain",r),e.clipboardData.setData("text/html",o)}else"undefined"==typeof ClipboardEvent&&window.clipboardData.setData("Text",r);this.hot.runHooks("afterCopy",n,this.copyableRanges)}e.preventDefault()}}},{key:"onCut",value:function(e){var t=_.get(this);if((this.hot.isListening()||t.isTriggeredByCut)&&!this.isEditorOpened()){this.setCopyableText(),t.isTriggeredByCut=!1;var n=this.getRangedData(this.copyableRanges);if(!!this.hot.runHooks("beforeCut",n,this.copyableRanges)){var r=i.default.stringify(n);if(e&&e.clipboardData){var o=(0,p.arrayToTable)(n);e.clipboardData.setData("text/plain",r),e.clipboardData.setData("text/html",o)}else"undefined"==typeof ClipboardEvent&&window.clipboardData.setData("Text",r);this.hot.emptySelectedCells(),this.hot.runHooks("afterCut",n,this.copyableRanges)}e.preventDefault()}}},{key:"onPaste",value:function(e){if(this.hot.isListening()&&!this.isEditorOpened()){var t;if(e&&e.preventDefault&&e.preventDefault(),e&&void 0!==e.clipboardData){var n=e.clipboardData.getData("text/html");t=n&&/(<table)|(<TABLE)/.test(n)?(0,p.tableToArray)(n):e.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==window.clipboardData&&(t=window.clipboardData.getData("Text"));var r="string"!=typeof t?t:i.default.parse(t);if(0!==r.length&&!1!==this.hot.runHooks("beforePaste",r,this.copyableRanges)){var o=v(this.populateValues(r),4),a=o[0],s=o[1],l=o[2],u=o[3];this.hot.selectCell(a,s,Math.min(this.hot.countRows()-1,l),Math.min(this.hot.countCols()-1,u)),this.hot.runHooks("afterPaste",r,this.copyableRanges)}}}},{key:"onAfterContextMenuDefaultOptions",value:function(e){e.items.push({name:"---------"},(0,c.default)(this),(0,f.default)(this))}},{key:"onAfterOnCellMouseUp",value:function(){this.hot.isListening()&&!this.isEditorOpened()&&(this.getOrCreateFocusableElement(),this.focusableElement.focus())}},{key:"onAfterSelectionEnd",value:function(){var e=_.get(this).isFragmentSelectionEnabled;this.isEditorOpened()||(this.getOrCreateFocusableElement(),e&&this.focusableElement.getFocusableElement()!==document.activeElement&&(0,l.getSelectionText)()||(this.setCopyableText(),this.focusableElement.focus()))}},{key:"onBeforeKeyDown",value:function(){if(this.hot.isListening()&&!this.isEditorOpened()){var e=document.activeElement,t=this.hot.getActiveEditor();!t||e!==this.focusableElement.getFocusableElement()&&e!==t.select||(this.getOrCreateFocusableElement(),this.focusableElement.focus())}}},{key:"destroy",value:function(){this.focusableElement&&((0,d.destroyElement)(this.focusableElement),this.focusableElement=null),w(b(t.prototype),"destroy",this).call(this)}}]),t}();(0,u.registerPlugin)("CopyPaste",T);var R=T;t.default=R},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy",name:function(){return this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_COPY)},callback:function(){e.copy()},disabled:function(){var e=this.getSelected();return!e||e.length>1},hidden:!1}};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4))},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"cut",name:function(){return this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_CUT)},callback:function(){e.cut()},disabled:function(){var e=this.getSelected();return!e||e.length>1},hidden:!1}};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(734));t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clipboardData=new r.default}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}t.__esModule=!0,t.default=void 0;var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data={}}return function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(e,[{key:"setData",value:function(e,t){this.data[e]=t}},{key:"getData",value:function(e){return this.data[e]||void 0}}]),e}();t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.createElement=function(){var e=new u;return c+=1,e},t.deactivateElement=f,t.destroyElement=function(e){if(!(e instanceof u))return;c>0&&(c-=1);f(e),c<=0&&(c=0,h&&h.parentNode&&(h.parentNode.removeChild(h),h=null),e.mainElement=null)};var r=s(n(10)),o=s(n(29)),i=n(2),a=n(48);function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mainElement=null,this.eventManager=new r.default(this),this.listenersCount=new WeakSet}return function(e,t,n){t&&l(e.prototype,t),n&&l(e,n)}(e,[{key:"useSecondaryElement",value:function(){var e=function(){if(h)return h.parentElement||document.body.appendChild(h),h;var e=document.createElement("textarea");return h=e,e.id="HandsontableCopyPaste",e.className="copyPaste",e.tabIndex=-1,e.autocomplete="off",e.wrap="hard",e.value=" ",document.body.appendChild(e),e}();this.listenersCount.has(e)||(this.listenersCount.add(e),p(this.eventManager,e,this)),this.mainElement=e}},{key:"setFocusableElement",value:function(e){this.listenersCount.has(e)||(this.listenersCount.add(e),p(this.eventManager,e,this)),this.mainElement=e}},{key:"getFocusableElement",value:function(){return this.mainElement}},{key:"focus",value:function(){this.mainElement.value=" ",(0,a.isMobileBrowser)()||this.mainElement.select()}}]),e}();(0,i.mixin)(u,o.default);var c=0;function f(e){e.eventManager.clear()}var h,d=function(e,t){return function(n){return t.runLocalHooks(e,n)}};function p(e,t,n){e.addEventListener(t,"copy",d("copy",n)),e.addEventListener(t,"cut",d("cut",n)),e.addEventListener(t,"paste",d("paste",n))}},function(e,t,n){"use strict";t.__esModule=!0,t.arrayToTable=function(e){var t=e.length,n=["<table>"],o=document.createElement("div");document.documentElement.appendChild(o);for(var i=0;i<t;i+=1){var a=e[i],s=a.length,l=[];0===i&&n.push("<tbody>");for(var u=0;u<s;u+=1)o.innerText="".concat((0,r.isEmpty)(a[u])?"":a[u]),l.push("<td>".concat(o.innerHTML,"</td>"));n.push.apply(n,["<tr>"].concat(l,["</tr>"])),i+1===t&&n.push("</tbody>")}return document.documentElement.removeChild(o),n.push("</table>"),n.join("")},t.tableToArray=function(e){var t=[],n=e;if("string"==typeof n){var r=document.createElement("div");r.innerHTML=n.replace(/\n/g,""),n=r.querySelector("table")}if(n&&function(e){return"table"===(e&&e.nodeName||"").toLowerCase()}(n)){for(var o=n.rows,i=o&&o.length,a=[],s=0;s<i;s+=1){for(var l=o[s].cells,u=l.length,c=[],f=0;f<u;f+=1){var h=l[f];h.innerHTML=h.innerHTML.trim().replace(/<br(.|)>(\n?)/,"\n");var d=h.innerText;c.push(d)}a.push(c)}t.push.apply(t,a)}return t};var r=n(14)},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(7)),o=n(6),i=n(2),a=n(5),s=n(1),l=n(13),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),c=n(739),f=n(77),h=n(445);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e,t,n){return(y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var b=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=v(this,m(t).call(this,e))).savedBorders=[],n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(t,r.default),function(e,t,n){t&&g(e.prototype,t),n&&g(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().customBorders}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("afterContextMenuDefaultOptions",function(t){return e.onAfterContextMenuDefaultOptions(t)}),this.addHook("afterInit",function(){return e.onAfterInit()}),y(m(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.hideBorders(),y(m(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),y(m(t.prototype),"updatePlugin",this).call(this)}},{key:"setBorders",value:function(e,t){var n=this,r=t?Object.keys(t):["top","right","bottom","left"],o=(0,h.detectSelectionType)(e),i=(0,h.normalizeSelectionFactory)(o);(0,s.arrayEach)(e,function(e){for(var o=p(i(e),4),a=o[0],l=o[1],u=o[2],c=o[3],f=function(e){for(var o=function(o){(0,s.arrayEach)(r,function(r){n.prepareBorderFromCustomAdded(e,o,t,r)})},i=l;i<=c;i+=1)o(i)},h=a;h<=u;h+=1)f(h)})}},{key:"getBorders",value:function(e){var t=this;if(!Array.isArray(e))return this.savedBorders;var n=(0,h.detectSelectionType)(e),r=(0,h.normalizeSelectionFactory)(n),o=[];return(0,s.arrayEach)(e,function(e){for(var n=p(r(e),4),i=n[0],a=n[1],l=n[2],u=n[3],c=function(e){for(var n=function(n){(0,s.arrayEach)(t.savedBorders,function(t){t.row===e&&t.col===n&&o.push(t)})},r=a;r<=u;r+=1)n(r)},f=i;f<=l;f+=1)c(f)}),o}},{key:"clearBorders",value:function(e){var t=this;e?this.setBorders(e):((0,s.arrayEach)(this.savedBorders,function(e){t.clearBordersFromSelectionSettings(e.id),t.clearNullCellRange(),t.hot.removeCellMeta(e.row,e.col,"borders")}),this.savedBorders.length=0)}},{key:"insertBorderIntoSettings",value:function(e,t){this.checkSavedBorders(e)||this.savedBorders.push(e);var n={row:e.row,col:e.col},r=new l.CellRange(n,n,n);this.checkCustomSelections(e,r,t)||(this.hot.selection.highlight.addCustomSelection({border:e,cellRange:r}),this.hot.view.wt.draw(!0))}},{key:"prepareBorderFromCustomAdded",value:function(e,t,n,r){var o=(0,f.createEmptyBorders)(e,t);n&&(o=(0,f.extendDefaultBorder)(o,n),(0,s.arrayEach)(this.hot.selection.highlight.customSelections,function(e){if(o.id===e.settings.id)return Object.assign(e.settings,n),o=e.settings,!1})),this.hot.setCellMeta(e,t,"borders",o),this.insertBorderIntoSettings(o,r)}},{key:"prepareBorderFromCustomAddedRange",value:function(e){var t=this,n=e.range;(0,a.rangeEach)(n.from.row,n.to.row,function(r){(0,a.rangeEach)(n.from.col,n.to.col,function(o){var a=(0,f.createEmptyBorders)(r,o),s=0;r===n.from.row&&(s+=1,(0,i.hasOwnProperty)(e,"top")&&(a.top=e.top)),r===n.to.row&&(s+=1,(0,i.hasOwnProperty)(e,"bottom")&&(a.bottom=e.bottom)),o===n.from.col&&(s+=1,(0,i.hasOwnProperty)(e,"left")&&(a.left=e.left)),o===n.to.col&&(s+=1,(0,i.hasOwnProperty)(e,"right")&&(a.right=e.right)),s>0&&(t.hot.setCellMeta(r,o,"borders",a),t.insertBorderIntoSettings(a))})})}},{key:"removeAllBorders",value:function(e,t){var n=(0,f.createId)(e,t);this.spliceBorder(n),this.clearBordersFromSelectionSettings(n),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}},{key:"setBorder",value:function(e,t,n,r){var o=this.hot.getCellMeta(e,t).borders;(o&&void 0!==o.border||(o=(0,f.createEmptyBorders)(e,t)),r)?(o[n]=(0,f.createSingleEmptyBorder)(),4===this.countHide(o)?this.removeAllBorders(e,t):(this.checkCustomSelectionsFromContextMenu(o,n,r)||this.insertBorderIntoSettings(o),this.hot.setCellMeta(e,t,"borders",o))):(o[n]=(0,f.createDefaultCustomBorder)(),this.checkCustomSelectionsFromContextMenu(o,n,r)||this.insertBorderIntoSettings(o),this.hot.setCellMeta(e,t,"borders",o))}},{key:"prepareBorder",value:function(e,t,n){var r=this;(0,s.arrayEach)(e,function(e){var o=e.start,i=e.end;if(o.row===i.row&&o.col===i.col)"noBorders"===t?r.removeAllBorders(o.row,o.col):r.setBorder(o.row,o.col,t,n);else switch(t){case"noBorders":(0,a.rangeEach)(o.col,i.col,function(e){(0,a.rangeEach)(o.row,i.row,function(t){r.removeAllBorders(t,e)})});break;case"top":(0,a.rangeEach)(o.col,i.col,function(e){r.setBorder(o.row,e,t,n)});break;case"right":(0,a.rangeEach)(o.row,i.row,function(e){r.setBorder(e,i.col,t,n)});break;case"bottom":(0,a.rangeEach)(o.col,i.col,function(e){r.setBorder(i.row,e,t,n)});break;case"left":(0,a.rangeEach)(o.row,i.row,function(e){r.setBorder(e,o.col,t,n)})}})}},{key:"createCustomBorders",value:function(e){var t=this;(0,s.arrayEach)(e,function(e){e.range?t.prepareBorderFromCustomAddedRange(e):t.prepareBorderFromCustomAdded(e.row,e.col,e)})}},{key:"countHide",value:function(e){var t=Object.values(e);return(0,s.arrayReduce)(t,function(e,t){var n=e;return t.hide&&(n+=1),n},0)}},{key:"clearBordersFromSelectionSettings",value:function(e){var t=(0,s.arrayMap)(this.hot.selection.highlight.customSelections,function(e){return e.settings.id}).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear(),this.hot.view.wt.draw(!0)}},{key:"clearNullCellRange",value:function(){var e=this;(0,s.arrayEach)(this.hot.selection.highlight.customSelections,function(t,n){if(null===t.cellRange)return e.hot.selection.highlight.customSelections.splice(n,1),!1})}},{key:"hideBorders",value:function(){var e=this;(0,s.arrayEach)(this.savedBorders,function(t){e.clearBordersFromSelectionSettings(t.id)})}},{key:"spliceBorder",value:function(e){var t=(0,s.arrayMap)(this.savedBorders,function(e){return e.id}).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}},{key:"checkSavedBorders",value:function(e){var t=this,n=!1;return 4===this.countHide(e)?(this.spliceBorder(e.id),n=!0):(0,s.arrayEach)(this.savedBorders,function(r,o){if(e.id===r.id)return t.savedBorders[o]=e,n=!0,!1}),n}},{key:"checkCustomSelectionsFromContextMenu",value:function(e,t,n){var r=!1;return(0,s.arrayEach)(this.hot.selection.highlight.customSelections,function(o){if(e.id===o.settings.id)return(0,i.objectEach)(o.instanceBorders,function(e){e.toggleHiddenClass(t,n)}),r=!0,!1}),r}},{key:"checkCustomSelections",value:function(e,t,n){var r=!1;return 4===this.countHide(e)?(this.removeAllBorders(e.row,e.col),this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),r=!0):(0,s.arrayEach)(this.hot.selection.highlight.customSelections,function(o){if(e.id===o.settings.id)return o.cellRange=t,n&&(0,i.objectEach)(o.instanceBorders,function(t){t.changeBorderStyle(n,e)}),r=!0,!1}),r}},{key:"changeBorderSettings",value:function(){var e=this.hot.getSettings().customBorders;Array.isArray(e)?(e.length||(this.savedBorders=e),this.createCustomBorders(e)):void 0!==e&&this.createCustomBorders(this.savedBorders)}},{key:"onAfterContextMenuDefaultOptions",value:function(e){this.hot.getSettings().customBorders&&e.items.push({name:"---------"},{key:"borders",name:function(){return this.getTranslatedPhrase(u.CONTEXTMENU_ITEMS_BORDERS)},disabled:function(){return this.selection.isSelectedByCorner()},submenu:{items:[(0,c.top)(this),(0,c.right)(this),(0,c.bottom)(this),(0,c.left)(this),(0,c.noBorders)(this)]}})}},{key:"onAfterInit",value:function(){this.changeBorderSettings()}},{key:"destroy",value:function(){y(m(t.prototype),"destroy",this).call(this)}}]),t}();(0,o.registerPlugin)("customBorders",b);var C=b;t.default=C},function(e,t,n){"use strict";t.__esModule=!0;var r=l(n(740));t.bottom=r.default;var o=l(n(741));t.left=o.default;var i=l(n(742));t.noBorders=i.default;var a=l(n(743));t.right=a.default;var s=l(n(744));function l(e){return e&&e.__esModule?e:{default:e}}t.top=s.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:bottom",name:function(){var e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_BORDERS_BOTTOM),t=(0,o.checkSelectionBorders)(this,"bottom");return t&&(e=(0,o.markSelected)(e)),e},callback:function(t,n){var r=(0,o.checkSelectionBorders)(this,"bottom");e.prepareBorder(n,"bottom",r)}}};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(77)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:left",name:function(){var e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_BORDERS_LEFT),t=(0,o.checkSelectionBorders)(this,"left");return t&&(e=(0,o.markSelected)(e)),e},callback:function(t,n){var r=(0,o.checkSelectionBorders)(this,"left");e.prepareBorder(n,"left",r)}}};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(77)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:no_borders",name:function(){return this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback:function(t,n){e.prepareBorder(n,"noBorders")},disabled:function(){return!(0,o.checkSelectionBorders)(this)}}};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(77)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:right",name:function(){var e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_BORDERS_RIGHT),t=(0,o.checkSelectionBorders)(this,"right");return t&&(e=(0,o.markSelected)(e)),e},callback:function(t,n){var r=(0,o.checkSelectionBorders)(this,"right");e.prepareBorder(n,"right",r)}}};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(77)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:top",name:function(){var e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_BORDERS_TOP),t=(0,o.checkSelectionBorders)(this,"top");return t&&(e=(0,o.markSelected)(e)),e},callback:function(t,n){var r=(0,o.checkSelectionBorders)(this,"top");e.prepareBorder(n,"top",r)}}};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(77)},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=a(n(7)),o=a(n(10)),i=n(6);function a(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var d=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?h(e):t}(this,c(t).call(this,e))).eventManager=new o.default(h(h(n))),n.boundaries=null,n.callback=null,n.listening=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,r.default),function(e,t,n){t&&l(e.prototype,t),n&&l(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().dragToScroll}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("afterOnCellMouseDown",function(){return e.setupListening()}),this.addHook("afterOnCellCornerMouseDown",function(){return e.setupListening()}),this.registerEvents(),u(c(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),u(c(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.unregisterEvents(),u(c(t.prototype),"disablePlugin",this).call(this)}},{key:"setBoundaries",value:function(e){this.boundaries=e}},{key:"setCallback",value:function(e){this.callback=e}},{key:"check",value:function(e,t){var n=0,r=0;t<this.boundaries.top?r=t-this.boundaries.top:t>this.boundaries.bottom&&(r=t-this.boundaries.bottom),e<this.boundaries.left?n=e-this.boundaries.left:e>this.boundaries.right&&(n=e-this.boundaries.right),this.callback(n,r)}},{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(document,"mouseup",function(){return e.onMouseUp()}),this.eventManager.addEventListener(document,"mousemove",function(t){return e.onMouseMove(t)})}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"setupListening",value:function(){var e=this.hot.view.wt.wtTable.holder;e!==window&&(this.setBoundaries(e.getBoundingClientRect()),this.setCallback(function(t,n){t<0?e.scrollLeft-=50:t>0&&(e.scrollLeft+=50),n<0?e.scrollTop-=20:n>0&&(e.scrollTop+=20)}),this.listening=!0)}},{key:"onMouseMove",value:function(e){this.listening&&this.check(e.clientX,e.clientY)}},{key:"onMouseUp",value:function(){this.listening=!1}},{key:"destroy",value:function(){u(c(t.prototype),"destroy",this).call(this)}}]),t}();(0,i.registerPlugin)("dragToScroll",d);var p=d;t.default=p},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=l(n(7)),o=n(6),i=n(1),a=l(n(747)),s=l(n(748));function l(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(749);var g=new WeakMap,v=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}(this,h(t).call(this,e)),g.set(p(p(n)),{moveByFreeze:!1,afterFirstUse:!1}),n.frozenColumnsBasePositions=[],n.manualColumnMovePlugin=void 0,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(t,r.default),function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().manualColumnFreeze}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("afterContextMenuDefaultOptions",function(t){return e.addContextMenuEntry(t)}),this.addHook("afterInit",function(){return e.onAfterInit()}),this.addHook("beforeColumnMove",function(t,n){return e.onBeforeColumnMove(t,n)}),f(h(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){var e=g.get(this);e.afterFirstUse=!1,e.moveByFreeze=!1,f(h(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),f(h(t.prototype),"updatePlugin",this).call(this)}},{key:"freezeColumn",value:function(e){var t=g.get(this),n=this.hot.getSettings();t.afterFirstUse||(t.afterFirstUse=!0),n.fixedColumnsLeft===this.hot.countCols()||e<=n.fixedColumnsLeft-1||(t.moveByFreeze=!0,e!==this.getMovePlugin().columnsMapper.getValueByIndex(e)&&(this.frozenColumnsBasePositions[n.fixedColumnsLeft]=e),this.getMovePlugin().moveColumn(e,n.fixedColumnsLeft),n.fixedColumnsLeft+=1)}},{key:"unfreezeColumn",value:function(e){var t=g.get(this),n=this.hot.getSettings();if(t.afterFirstUse||(t.afterFirstUse=!0),!(n.fixedColumnsLeft<=0||e>n.fixedColumnsLeft-1)){var r=this.getBestColumnReturnPosition(e);t.moveByFreeze=!0,n.fixedColumnsLeft-=1,this.getMovePlugin().moveColumn(e,r+1)}}},{key:"getMovePlugin",value:function(){return this.manualColumnMovePlugin||(this.manualColumnMovePlugin=this.hot.getPlugin("manualColumnMove")),this.manualColumnMovePlugin}},{key:"getBestColumnReturnPosition",value:function(e){var t,n=this.getMovePlugin(),r=this.hot.getSettings().fixedColumnsLeft,o=n.columnsMapper.getValueByIndex(r);if(null===this.frozenColumnsBasePositions[e]||void 0===this.frozenColumnsBasePositions[e])for(t=n.columnsMapper.getValueByIndex(e);null!==o&&o<=t;)r+=1,o=n.columnsMapper.getValueByIndex(r);else{for(t=this.frozenColumnsBasePositions[e],this.frozenColumnsBasePositions[e]=void 0;null!==o&&o<=t;)r+=1,o=n.columnsMapper.getValueByIndex(r);r=o}return r-1}},{key:"addContextMenuEntry",value:function(e){e.items.push({name:"---------"},(0,a.default)(this),(0,s.default)(this))}},{key:"onAfterInit",value:function(){this.getMovePlugin().isEnabled()||this.getMovePlugin().enablePlugin()}},{key:"onBeforeColumnMove",value:function(e,t){var n=g.get(this);if(n.afterFirstUse&&!n.moveByFreeze){var r=this.hot.getSettings().fixedColumnsLeft,o=t<r;if(o||(0,i.arrayEach)(e,function(e){if(e<r)return o=!0,!1}),o)return!1}n.moveByFreeze&&(n.moveByFreeze=!1)}},{key:"destroy",value:function(){f(h(t.prototype),"destroy",this).call(this)}}]),t}();(0,o.registerPlugin)("manualColumnFreeze",v);var y=v;t.default=y},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"freeze_column",name:function(){return this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_FREEZE_COLUMN)},callback:function(t,n){var r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(n,1),o=r[0].start.col;e.freezeColumn(o),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),t=!1;return void 0===e?t=!0:e.length>1?t=!0:(e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsLeft-1)&&(t=!0),t}}};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4))},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"unfreeze_column",name:function(){return this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN)},callback:function(t,n){var r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(n,1),o=r[0].start.col;e.unfreezeColumn(o),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),t=!1;return void 0===e?t=!0:e.length>1?t=!0:(e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsLeft)&&(t=!0),t}}};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4))},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=d(n(7)),o=d(n(23)),i=n(1),a=n(3),s=n(5),l=d(n(10)),u=n(6),c=d(n(751)),f=d(n(752)),h=d(n(753));function d(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t,n){return(y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(754),o.default.getSingleton().register("beforeColumnMove"),o.default.getSingleton().register("afterColumnMove"),o.default.getSingleton().register("unmodifyCol");var C=new WeakMap,E=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?b(e):t}(this,m(t).call(this,e)),C.set(b(b(n)),{columnsToMove:[],countCols:0,fixedColumns:0,pressed:void 0,disallowMoving:void 0,target:{eventPageX:void 0,coords:void 0,TD:void 0,col:void 0}}),n.removedColumns=[],n.columnsMapper=new c.default(b(b(n))),n.eventManager=new l.default(b(b(n))),n.backlight=new f.default(e),n.guideline=new h.default(e),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(t,r.default),function(e,t,n){t&&v(e.prototype,t),n&&v(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().manualColumnMove}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",function(t,n,r,o){return e.onBeforeOnCellMouseDown(t,n,r,o)}),this.addHook("beforeOnCellMouseOver",function(t,n,r,o){return e.onBeforeOnCellMouseOver(t,n,r,o)}),this.addHook("afterScrollVertically",function(){return e.onAfterScrollVertically()}),this.addHook("modifyCol",function(t,n){return e.onModifyCol(t,n)}),this.addHook("beforeRemoveCol",function(t,n){return e.onBeforeRemoveCol(t,n)}),this.addHook("afterRemoveCol",function(){return e.onAfterRemoveCol()}),this.addHook("afterCreateCol",function(t,n){return e.onAfterCreateCol(t,n)}),this.addHook("afterLoadData",function(){return e.onAfterLoadData()}),this.addHook("unmodifyCol",function(t){return e.onUnmodifyCol(t)}),this.registerEvents(),(0,a.addClass)(this.hot.rootElement,"ht__manualColumnMove"),y(m(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.onAfterPluginsInitialized(),y(m(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){var e=this.hot.getSettings().manualColumnMove;Array.isArray(e)&&this.columnsMapper.clearMap(),(0,a.removeClass)(this.hot.rootElement,"ht__manualColumnMove"),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),y(m(t.prototype),"disablePlugin",this).call(this)}},{key:"moveColumn",value:function(e,t){this.moveColumns([e],t)}},{key:"moveColumns",value:function(e,t){var n=this,r=g(e),o=C.get(this),a=this.hot.runHooks("beforeColumnMove",r,t);o.disallowMoving=!a,!1!==a&&((0,i.arrayEach)(e,function(e,t,r){r[t]=n.columnsMapper.getValueByIndex(e)}),(0,i.arrayEach)(e,function(e,r){var o=n.columnsMapper.getIndexByValue(e);o!==t&&n.columnsMapper.moveColumn(o,t+r)}),this.columnsMapper.clearNull()),this.hot.runHooks("afterColumnMove",r,t)}},{key:"changeSelection",value:function(e,t){this.hot.selectColumns(e,t)}},{key:"getColumnsWidth",value:function(e,t){for(var n=0,r=e;r<t;r++){n+=r<0?this.hot.view.wt.wtViewport.getRowHeaderWidth()||0:this.hot.view.wt.wtTable.getStretchedColumnWidth(r)||0}return n}},{key:"initialSettings",value:function(){var e=this.hot.getSettings().manualColumnMove;Array.isArray(e)?this.moveColumns(e,0):void 0!==e&&this.persistentStateLoad()}},{key:"isFixedColumnsLeft",value:function(e){return e<this.hot.getSettings().fixedColumnsLeft}},{key:"persistentStateSave",value:function(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.columnsMapper._arrayMap)}},{key:"persistentStateLoad",value:function(){var e={};this.hot.runHooks("persistentStateLoad","manualColumnMove",e),e.value&&(this.columnsMapper._arrayMap=e.value)}},{key:"prepareColumnsToMoving",value:function(e,t){var n=[];return(0,s.rangeEach)(e,t,function(e){n.push(e)}),n}},{key:"refreshPositions",value:function(){var e=C.get(this),t=this.hot.view.wt.wtTable.getFirstVisibleColumn(),n=this.hot.view.wt.wtTable.getLastVisibleColumn(),r=this.hot.view.wt.wtTable,o=this.hot.view.wt.wtOverlays.scrollableElement,i="number"==typeof o.scrollX?o.scrollX:o.scrollLeft,a=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,e.coordsColumn),s=e.target.eventPageX-(e.rootElementOffset-(void 0===o.scrollX?i:0)),l=r.hider.offsetWidth,u=r.TBODY.offsetLeft,c=this.backlight.getOffset().left,f=this.backlight.getSize().width,h=0;if(e.rootElementOffset+r.holder.offsetWidth+i<e.target.eventPageX&&e.coordsColumn<e.countCols&&(e.coordsColumn+=1),e.hasRowHeaders&&(h=this.hot.view.wt.wtOverlays.leftOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsLeft(e.coordsColumn)&&(a+=i),a+=h,e.coordsColumn<0)e.fixedColumns>0?e.target.col=0:e.target.col=t>0?t-1:t;else if(e.target.TD.offsetWidth/2+a<=s){var d=e.coordsColumn>=e.countCols?e.countCols-1:e.coordsColumn;e.target.col=d+1,a+=e.target.TD.offsetWidth,e.target.col>n&&n<e.countCols&&this.hot.scrollViewportTo(void 0,n+1,void 0,!0)}else e.target.col=e.coordsColumn,e.target.col<=t&&e.target.col>=e.fixedColumns&&t>0&&this.hot.scrollViewportTo(void 0,t-1);e.target.col<=t&&e.target.col>=e.fixedColumns&&t>0&&this.hot.scrollViewportTo(void 0,t-1);var p=s,g=a;s+f+c>=l?p=l-f-c:s+c<u+h&&(p=u+h+Math.abs(c)),a>=l-1?g=l-1:0===g?g=1:void 0!==o.scrollX&&e.coordsColumn<e.fixedColumns&&(g-=e.rootElementOffset<=o.scrollX?e.rootElementOffset:0),this.backlight.setPosition(null,p),this.guideline.setPosition(null,g)}},{key:"updateColumnsMapper",value:function(){var e=this.hot.countSourceCols(),t=this.columnsMapper._arrayMap.length;if(0===t)this.columnsMapper.createMap(e||this.hot.getSettings().startCols);else if(t<e){var n=e-t;this.columnsMapper.insertItems(t,n)}else if(t>e){var r=e-1,o=[];(0,i.arrayEach)(this.columnsMapper._arrayMap,function(e,t){e>r&&o.push(t)}),this.columnsMapper.removeItems(o)}}},{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(document.documentElement,"mousemove",function(t){return e.onMouseMove(t)}),this.eventManager.addEventListener(document.documentElement,"mouseup",function(){return e.onMouseUp()})}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"onBeforeOnCellMouseDown",value:function(e,t,n,r){var o=this.hot.view.wt.wtTable,i=this.hot.selection.isSelectedByColumnHeader(),s=this.hot.getSelectedRangeLast(),l=C.get(this),u=e.realTarget.className.indexOf("sortAction")>-1;if(!s||!i||l.pressed||0!==e.button||u)return l.pressed=!1,l.columnsToMove.length=0,void(0,a.removeClass)(this.hot.rootElement,["on-moving--columns","show-ui"]);var c=this.guideline.isBuilt()&&!this.guideline.isAppended(),f=this.backlight.isBuilt()&&!this.backlight.isAppended();c&&f&&(this.guideline.appendTo(o.hider),this.backlight.appendTo(o.hider));var h=s.from,d=s.to,p=Math.min(h.col,d.col),g=Math.max(h.col,d.col);if(t.row<0&&t.col>=p&&t.col<=g){r.column=!0,l.pressed=!0,l.target.eventPageX=e.pageX,l.coordsColumn=t.col,l.target.TD=n,l.target.col=t.col,l.columnsToMove=this.prepareColumnsToMoving(p,g),l.hasRowHeaders=!!this.hot.getSettings().rowHeaders,l.countCols=this.hot.countCols(),l.fixedColumns=this.hot.getSettings().fixedColumnsLeft,l.rootElementOffset=(0,a.offset)(this.hot.rootElement).left;var v=l.hasRowHeaders?-1:0,y=o.holder.scrollTop+o.getColumnHeaderHeight(0)+1,m=t.col<l.fixedColumns,w=this.hot.view.wt.wtOverlays.scrollableElement,b=w.scrollX?w.scrollX-l.rootElementOffset:0,E=e.layerX-(m?b:0),O=Math.abs(this.getColumnsWidth(p,t.col)+E);this.backlight.setPosition(y,this.getColumnsWidth(v,p)+O),this.backlight.setSize(this.getColumnsWidth(p,g+1),o.hider.offsetHeight-y),this.backlight.setOffset(null,-1*O),(0,a.addClass)(this.hot.rootElement,"on-moving--columns")}else(0,a.removeClass)(this.hot.rootElement,"after-selection--columns"),l.pressed=!1,l.columnsToMove.length=0}},{key:"onMouseMove",value:function(e){var t=C.get(this);if(t.pressed){if(e.realTarget===this.backlight.element){var n=this.backlight.getSize().width;this.backlight.setSize(0),setTimeout(function(){this.backlight.setPosition(n)})}t.target.eventPageX=e.pageX,this.refreshPositions()}}},{key:"onBeforeOnCellMouseOver",value:function(e,t,n,r){var o=this.hot.getSelectedRangeLast(),i=C.get(this);o&&i.pressed&&(i.columnsToMove.indexOf(t.col)>-1?(0,a.removeClass)(this.hot.rootElement,"show-ui"):(0,a.addClass)(this.hot.rootElement,"show-ui"),r.row=!0,r.column=!0,r.cell=!0,i.coordsColumn=t.col,i.target.TD=n)}},{key:"onMouseUp",value:function(){var e=C.get(this);if(e.coordsColumn=void 0,e.pressed=!1,e.backlightWidth=0,(0,a.removeClass)(this.hot.rootElement,["on-moving--columns","show-ui","after-selection--columns"]),this.hot.selection.isSelectedByColumnHeader()&&(0,a.addClass)(this.hot.rootElement,"after-selection--columns"),!(e.columnsToMove.length<1||void 0===e.target.col||e.columnsToMove.indexOf(e.target.col)>-1)){if(this.moveColumns(e.columnsToMove,e.target.col),this.persistentStateSave(),this.hot.render(),this.hot.view.wt.wtOverlays.adjustElementsSize(!0),!e.disallowMoving){var t=this.columnsMapper.getIndexByValue(e.columnsToMove[0]),n=this.columnsMapper.getIndexByValue(e.columnsToMove[e.columnsToMove.length-1]);this.changeSelection(t,n)}e.columnsToMove.length=0}}},{key:"onAfterScrollVertically",value:function(){var e=this.hot.view.wt.wtTable,t=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;this.backlight.setPosition(t),this.backlight.setSize(null,e.hider.offsetHeight-t)}},{key:"onAfterCreateCol",value:function(e,t){this.columnsMapper.shiftItems(e,t)}},{key:"onBeforeRemoveCol",value:function(e,t){var n=this;this.removedColumns.length=0,!1!==e&&(0,s.rangeEach)(e,e+t-1,function(e){n.removedColumns.push(n.hot.runHooks("modifyCol",e,n.pluginName))})}},{key:"onAfterRemoveCol",value:function(){this.columnsMapper.unshiftItems(this.removedColumns)}},{key:"onAfterLoadData",value:function(){this.updateColumnsMapper()}},{key:"onModifyCol",value:function(e,t){var n=e;if(t!==this.pluginName){var r=this.columnsMapper.getValueByIndex(n);n=null===r?n:r}return n}},{key:"onUnmodifyCol",value:function(e){var t=this.columnsMapper.getIndexByValue(e);return null===t?e:t}},{key:"onAfterPluginsInitialized",value:function(){this.updateColumnsMapper(),this.initialSettings(),this.backlight.build(),this.guideline.build()}},{key:"destroy",value:function(){this.backlight.destroy(),this.guideline.destroy(),y(m(t.prototype),"destroy",this).call(this)}}]),t}();(0,u.registerPlugin)("ManualColumnMove",E);var O=E;t.default=O},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(76)),o=n(1),i=n(2),a=n(5);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.manualColumnMove=t}return function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(e,[{key:"createMap",value:function(e){var t=this,n=void 0===e?this._arrayMap.length:e;this._arrayMap.length=0,(0,a.rangeEach)(n-1,function(e){t._arrayMap[e]=e})}},{key:"destroy",value:function(){this._arrayMap=null}},{key:"moveColumn",value:function(e,t){var n=this._arrayMap[e];this._arrayMap[e]=null,this._arrayMap.splice(t,0,n)}},{key:"clearNull",value:function(){this._arrayMap=(0,o.arrayFilter)(this._arrayMap,function(e){return null!==e})}}]),e}();(0,i.mixin)(l,r.default);var u=l;t.default=u},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(452)),o=n(3);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),s(this,u(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,r.default),function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(t,[{key:"build",value:function(){l(u(t.prototype),"build",this).call(this),(0,o.addClass)(this._element,"ht__manualColumnMove--backlight")}}]),t}();t.default=f},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(452)),o=n(3);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),s(this,u(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,r.default),function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(t,[{key:"build",value:function(){l(u(t.prototype),"build",this).call(this),(0,o.addClass)(this._element,"ht__manualColumnMove--guideline")}}]),t}();t.default=f},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(7)),o=n(3),i=c(n(10)),a=n(16),s=n(1),l=n(5),u=n(6);function c(e){return e&&e.__esModule?e:{default:e}}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var y=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?v(e):t}(this,p(t).call(this,e))).currentTH=null,n.currentCol=null,n.selectedCols=[],n.currentWidth=null,n.newSize=null,n.startY=null,n.startWidth=null,n.startOffset=null,n.handle=document.createElement("DIV"),n.guide=document.createElement("DIV"),n.eventManager=new i.default(v(v(n))),n.pressed=null,n.dblclick=0,n.autoresizeTimeout=null,n.manualColumnWidths=[],(0,o.addClass)(n.handle,"manualColumnResizer"),(0,o.addClass)(n.guide,"manualColumnResizerGuide"),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(t,r.default),function(e,t,n){t&&h(e.prototype,t),n&&h(e,n)}(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().manualColumnResize}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){this.manualColumnWidths=[];var n=this.hot.getSettings().manualColumnResize,r=this.loadManualColumnWidths();this.addHook("modifyColWidth",function(t,n){return e.onModifyColWidth(t,n)}),this.addHook("beforeStretchingColumnWidth",function(t,n){return e.onBeforeStretchingColumnWidth(t,n)}),this.addHook("beforeColumnResize",function(t,n,r){return e.onBeforeColumnResize(t,n,r)}),void 0!==r?this.manualColumnWidths=r:Array.isArray(n)?this.manualColumnWidths=n:this.manualColumnWidths=[],this.bindEvents(),d(p(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){var e=this.hot.getSettings().manualColumnResize;Array.isArray(e)?this.manualColumnWidths=e:e||(this.manualColumnWidths=[])}},{key:"disablePlugin",value:function(){d(p(t.prototype),"disablePlugin",this).call(this)}},{key:"saveManualColumnWidths",value:function(){this.hot.runHooks("persistentStateSave","manualColumnWidths",this.manualColumnWidths)}},{key:"loadManualColumnWidths",value:function(){var e={};return this.hot.runHooks("persistentStateLoad","manualColumnWidths",e),e.value}},{key:"setupHandlePosition",value:function(e){var t=this;if(!e.parentNode)return!1;this.currentTH=e;var n=this.hot.view.wt.wtTable.getCoords(e).col,r=(0,o.outerHeight)(this.currentTH);if(n>=0){var i=this.currentTH.getBoundingClientRect();if(this.currentCol=n,this.selectedCols=[],this.hot.selection.isSelected()&&this.hot.selection.isSelectedByColumnHeader()){var a=this.hot.getSelectedRangeLast(),s=a.from,u=a.to,c=s.col,f=u.col;c>=f&&(c=u.col,f=s.col),this.currentCol>=c&&this.currentCol<=f?(0,l.rangeEach)(c,f,function(e){return t.selectedCols.push(e)}):this.selectedCols.push(this.currentCol)}else this.selectedCols.push(this.currentCol);this.startOffset=i.left-6,this.startWidth=parseInt(i.width,10),this.handle.style.top="".concat(i.top,"px"),this.handle.style.left="".concat(this.startOffset+this.startWidth,"px"),this.handle.style.height="".concat(r,"px"),this.hot.rootElement.appendChild(this.handle)}}},{key:"refreshHandlePosition",value:function(){this.handle.style.left="".concat(this.startOffset+this.currentWidth,"px")}},{key:"setupGuidePosition",value:function(){var e=parseInt((0,o.outerHeight)(this.handle),10),t=parseInt(this.handle.style.top,10)+e,n=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);(0,o.addClass)(this.handle,"active"),(0,o.addClass)(this.guide,"active"),this.guide.style.top="".concat(t,"px"),this.guide.style.left=this.handle.style.left,this.guide.style.height="".concat(n-e,"px"),this.hot.rootElement.appendChild(this.guide)}},{key:"refreshGuidePosition",value:function(){this.guide.style.left=this.handle.style.left}},{key:"hideHandleAndGuide",value:function(){(0,o.removeClass)(this.handle,"active"),(0,o.removeClass)(this.guide,"active")}},{key:"checkIfColumnHeader",value:function(e){if(e!==this.hot.rootElement){var t=e.parentNode;return"THEAD"===t.tagName||this.checkIfColumnHeader(t)}return!1}},{key:"getTHFromTargetElement",value:function(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getTHFromTargetElement(e.parentNode):null}},{key:"onMouseOver",value:function(e){if(this.checkIfColumnHeader(e.target)){var t=this.getTHFromTargetElement(e.target);if(!t)return;var n=t.getAttribute("colspan");!t||null!==n&&1!==n||this.pressed||this.setupHandlePosition(t)}}},{key:"afterMouseDownTimeout",value:function(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(n,r){var o=e.hot.runHooks("beforeColumnResize",n,e.newSize,!0);void 0!==o&&(e.newSize=o),"all"===e.hot.getSettings().stretchH?e.clearManualSize(n):e.setManualSize(n,e.newSize),r&&t(),e.saveManualColumnWidths(),e.hot.runHooks("afterColumnResize",n,e.newSize,!0)};this.dblclick>=2&&(this.selectedCols.length>1?((0,s.arrayEach)(this.selectedCols,function(e){n(e)}),t()):(0,s.arrayEach)(this.selectedCols,function(e){n(e,!0)}));this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(e){var t=this;(0,o.hasClass)(e.target,"manualColumnResizer")&&(this.setupGuidePosition(),this.pressed=this.hot,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout(function(){return t.afterMouseDownTimeout()},500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startX=(0,a.pageX)(e),this.newSize=this.startWidth)}},{key:"onMouseMove",value:function(e){var t=this;this.pressed&&(this.currentWidth=this.startWidth+((0,a.pageX)(e)-this.startX),(0,s.arrayEach)(this.selectedCols,function(e){t.newSize=t.setManualSize(e,t.currentWidth)}),this.refreshHandlePosition(),this.refreshGuidePosition())}},{key:"onMouseUp",value:function(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(n,r){e.hot.runHooks("beforeColumnResize",n,e.newSize,!1),r&&t(),e.saveManualColumnWidths(),e.hot.runHooks("afterColumnResize",n,e.newSize)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startWidth)this.selectedCols.length>1?((0,s.arrayEach)(this.selectedCols,function(e){n(e)}),t()):(0,s.arrayEach)(this.selectedCols,function(e){n(e,!0)});this.setupHandlePosition(this.currentTH)}}},{key:"bindEvents",value:function(){var e=this;this.eventManager.addEventListener(this.hot.rootElement,"mouseover",function(t){return e.onMouseOver(t)}),this.eventManager.addEventListener(this.hot.rootElement,"mousedown",function(t){return e.onMouseDown(t)}),this.eventManager.addEventListener(window,"mousemove",function(t){return e.onMouseMove(t)}),this.eventManager.addEventListener(window,"mouseup",function(){return e.onMouseUp()})}},{key:"setManualSize",value:function(e,t){var n=Math.max(t,20),r=this.hot.runHooks("modifyCol",e);return this.manualColumnWidths[r]=n,n}},{key:"clearManualSize",value:function(e){var t=this.hot.runHooks("modifyCol",e);this.manualColumnWidths[t]=void 0}},{key:"onModifyColWidth",value:function(e,t){var n=e;if(this.enabled){var r=this.hot.runHooks("modifyCol",t),o=this.manualColumnWidths[r];this.hot.getSettings().manualColumnResize&&o&&(n=o)}return n}},{key:"onBeforeStretchingColumnWidth",value:function(e,t){var n=this.manualColumnWidths[t];return void 0===n&&(n=e),n}},{key:"onBeforeColumnResize",value:function(){this.hot.view.wt.wtViewport.hasOversizedColumnHeadersMarked={}}}]),t}();(0,u.registerPlugin)("manualColumnResize",y);var m=y;t.default=m},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=d(n(7)),o=d(n(23)),i=n(1),a=n(3),s=n(5),l=d(n(10)),u=n(6),c=d(n(757)),f=d(n(758)),h=d(n(759));function d(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t,n){return(y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(760),o.default.getSingleton().register("beforeRowMove"),o.default.getSingleton().register("afterRowMove"),o.default.getSingleton().register("unmodifyRow");var C=new WeakMap,E=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?b(e):t}(this,m(t).call(this,e)),C.set(b(b(n)),{rowsToMove:[],pressed:void 0,disallowMoving:void 0,target:{eventPageY:void 0,coords:void 0,TD:void 0,row:void 0}}),n.removedRows=[],n.rowsMapper=new c.default(b(b(n))),n.eventManager=new l.default(b(b(n))),n.backlight=new f.default(e),n.guideline=new h.default(e),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(t,r.default),function(e,t,n){t&&v(e.prototype,t),n&&v(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().manualRowMove}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",function(t,n,r,o){return e.onBeforeOnCellMouseDown(t,n,r,o)}),this.addHook("beforeOnCellMouseOver",function(t,n,r,o){return e.onBeforeOnCellMouseOver(t,n,r,o)}),this.addHook("afterScrollHorizontally",function(){return e.onAfterScrollHorizontally()}),this.addHook("modifyRow",function(t,n){return e.onModifyRow(t,n)}),this.addHook("beforeRemoveRow",function(t,n){return e.onBeforeRemoveRow(t,n)}),this.addHook("afterRemoveRow",function(){return e.onAfterRemoveRow()}),this.addHook("afterCreateRow",function(t,n){return e.onAfterCreateRow(t,n)}),this.addHook("afterLoadData",function(){return e.onAfterLoadData()}),this.addHook("beforeColumnSort",function(t,n){return e.onBeforeColumnSort(t,n)}),this.addHook("unmodifyRow",function(t){return e.onUnmodifyRow(t)}),this.registerEvents(),(0,a.addClass)(this.hot.rootElement,"ht__manualRowMove"),y(m(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.onAfterPluginsInitialized(),y(m(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){var e=this.hot.getSettings().manualRowMove;Array.isArray(e)&&this.rowsMapper.clearMap(),(0,a.removeClass)(this.hot.rootElement,"ht__manualRowMove"),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),y(m(t.prototype),"disablePlugin",this).call(this)}},{key:"moveRow",value:function(e,t){this.moveRows([e],t)}},{key:"moveRows",value:function(e,t){var n=this,r=g(e),o=C.get(this),a=this.hot.runHooks("beforeRowMove",r,t);o.disallowMoving=!1===a,o.disallowMoving||((0,i.arrayEach)(e,function(e,t,r){r[t]=n.rowsMapper.getValueByIndex(e)}),(0,i.arrayEach)(e,function(e,r){var o=n.rowsMapper.getIndexByValue(e);o!==t&&n.rowsMapper.moveRow(o,t+r)}),this.rowsMapper.clearNull()),this.hot.runHooks("afterRowMove",r,t)}},{key:"changeSelection",value:function(e,t){this.hot.selectRows(e,t)}},{key:"getRowsHeight",value:function(e,t){for(var n=0,r=e;r<t;r++){n+=this.hot.view.wt.wtTable.getRowHeight(r)||23}return n}},{key:"initialSettings",value:function(){var e=this.hot.getSettings().manualRowMove;if(Array.isArray(e))this.moveRows(e,0);else if(void 0!==e){var t=this.persistentStateLoad();t.length&&this.moveRows(t,0)}}},{key:"isFixedRowTop",value:function(e){return e<this.hot.getSettings().fixedRowsTop}},{key:"isFixedRowBottom",value:function(e){return e>this.hot.getSettings().fixedRowsBottom}},{key:"persistentStateSave",value:function(){this.hot.runHooks("persistentStateSave","manualRowMove",this.rowsMapper._arrayMap)}},{key:"persistentStateLoad",value:function(){var e={};return this.hot.runHooks("persistentStateLoad","manualRowMove",e),e.value?e.value:[]}},{key:"prepareRowsToMoving",value:function(){var e=this.hot.getSelectedRangeLast(),t=[];if(!e)return t;var n=e.from,r=e.to,o=Math.min(n.row,r.row),i=Math.max(n.row,r.row);return(0,s.rangeEach)(o,i,function(e){t.push(e)}),t}},{key:"refreshPositions",value:function(){var e=C.get(this),t=e.target.coords,n=this.hot.view.wt.wtTable.getFirstVisibleRow(),r=this.hot.view.wt.wtTable.getLastVisibleRow(),o=this.hot.getSettings().fixedRowsTop,i=this.hot.countRows();t.row<o&&n>0&&this.hot.scrollViewportTo(n-1),t.row>=r&&r<i&&this.hot.scrollViewportTo(r+1,void 0,!0);var s=this.hot.view.wt.wtTable,l=e.target.TD,u=(0,a.offset)(this.hot.rootElement),c=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,t.row),f=e.target.eventPageY-u.top+s.holder.scrollTop,h=s.hider.offsetHeight,d=s.TBODY.offsetTop,p=this.backlight.getOffset().top,g=this.backlight.getSize().height;this.isFixedRowTop(t.row)&&(c+=s.holder.scrollTop),t.row<0?e.target.row=n>0?n-1:n:l.offsetHeight/2+c<=f?(e.target.row=t.row+1,c+=0===t.row?l.offsetHeight-1:l.offsetHeight):e.target.row=t.row;var v=f,y=c;f+g+p>=h?v=h-g-p:f+p<d&&(v=d+Math.abs(p)),c>=h-1&&(y=h-1);var m=0;this.hot.view.wt.wtOverlays.topOverlay&&(m=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.TABLE.offsetHeight),t.row>=o&&y-s.holder.scrollTop<m&&this.hot.scrollViewportTo(t.row),this.backlight.setPosition(v),this.guideline.setPosition(y)}},{key:"updateRowsMapper",value:function(){var e=this.hot.countSourceRows(),t=this.rowsMapper._arrayMap.length;if(0===t)this.rowsMapper.createMap(e||this.hot.getSettings().startRows);else if(t<e){var n=e-t;this.rowsMapper.insertItems(t,n)}else if(t>e){var r=e-1,o=[];(0,i.arrayEach)(this.rowsMapper._arrayMap,function(e,t){e>r&&o.push(t)}),this.rowsMapper.removeItems(o)}}},{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(document.documentElement,"mousemove",function(t){return e.onMouseMove(t)}),this.eventManager.addEventListener(document.documentElement,"mouseup",function(){return e.onMouseUp()})}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"onBeforeColumnSort",value:function(e,t){C.get(this).disallowMoving=void 0!==t}},{key:"onBeforeOnCellMouseDown",value:function(e,t,n,r){var o=this.hot.view.wt.wtTable,i=this.hot.selection.isSelectedByRowHeader(),s=this.hot.getSelectedRangeLast(),l=C.get(this);if(!s||!i||l.pressed||0!==e.button)return l.pressed=!1,l.rowsToMove.length=0,void(0,a.removeClass)(this.hot.rootElement,["on-moving--rows","show-ui"]);var u=this.guideline.isBuilt()&&!this.guideline.isAppended(),c=this.backlight.isBuilt()&&!this.backlight.isAppended();u&&c&&(this.guideline.appendTo(o.hider),this.backlight.appendTo(o.hider));var f=s.from,h=s.to,d=Math.min(f.row,h.row),p=Math.max(f.row,h.row);if(t.col<0&&t.row>=d&&t.row<=p){r.row=!0,l.pressed=!0,l.target.eventPageY=e.pageY,l.target.coords=t,l.target.TD=n,l.rowsToMove=this.prepareRowsToMoving();var g=o.holder.scrollLeft+this.hot.view.wt.wtViewport.getRowHeaderWidth();this.backlight.setPosition(null,g),this.backlight.setSize(o.hider.offsetWidth-g,this.getRowsHeight(d,p+1)),this.backlight.setOffset(-1*(this.getRowsHeight(d,t.row)+e.layerY),null),(0,a.addClass)(this.hot.rootElement,"on-moving--rows"),this.refreshPositions()}else(0,a.removeClass)(this.hot.rootElement,"after-selection--rows"),l.pressed=!1,l.rowsToMove.length=0}},{key:"onMouseMove",value:function(e){var t=C.get(this);if(t.pressed){if(e.realTarget===this.backlight.element){var n=this.backlight.getSize().height;this.backlight.setSize(null,0),setTimeout(function(){this.backlight.setPosition(null,n)})}t.target.eventPageY=e.pageY,this.refreshPositions()}}},{key:"onBeforeOnCellMouseOver",value:function(e,t,n,r){var o=this.hot.getSelectedRangeLast(),i=C.get(this);o&&i.pressed&&(i.rowsToMove.indexOf(t.row)>-1?(0,a.removeClass)(this.hot.rootElement,"show-ui"):(0,a.addClass)(this.hot.rootElement,"show-ui"),r.row=!0,r.column=!0,r.cell=!0,i.target.coords=t,i.target.TD=n)}},{key:"onMouseUp",value:function(){var e=C.get(this),t=e.target.row,n=e.rowsToMove.length;if(e.pressed=!1,e.backlightHeight=0,(0,a.removeClass)(this.hot.rootElement,["on-moving--rows","show-ui","after-selection--rows"]),this.hot.selection.isSelectedByRowHeader()&&(0,a.addClass)(this.hot.rootElement,"after-selection--rows"),!(n<1||void 0===t||e.rowsToMove.indexOf(t)>-1||e.rowsToMove[n-1]===t-1)){if(this.moveRows(e.rowsToMove,t),this.persistentStateSave(),this.hot.render(),!e.disallowMoving){var r=this.rowsMapper.getIndexByValue(e.rowsToMove[0]),o=this.rowsMapper.getIndexByValue(e.rowsToMove[n-1]);this.changeSelection(r,o)}e.rowsToMove.length=0}}},{key:"onAfterScrollHorizontally",value:function(){var e=this.hot.view.wt.wtTable,t=this.hot.view.wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;this.backlight.setPosition(null,t),this.backlight.setSize(e.hider.offsetWidth-t)}},{key:"onAfterCreateRow",value:function(e,t){this.rowsMapper.shiftItems(e,t)}},{key:"onBeforeRemoveRow",value:function(e,t){var n=this;this.removedRows.length=0,!1!==e&&(0,s.rangeEach)(e,e+t-1,function(e){n.removedRows.push(n.hot.runHooks("modifyRow",e,n.pluginName))})}},{key:"onAfterRemoveRow",value:function(){this.rowsMapper.unshiftItems(this.removedRows)}},{key:"onAfterLoadData",value:function(){this.updateRowsMapper()}},{key:"onModifyRow",value:function(e,t){var n=e;if(t!==this.pluginName){var r=this.rowsMapper.getValueByIndex(n);n=null===r?n:r}return n}},{key:"onUnmodifyRow",value:function(e){var t=this.rowsMapper.getIndexByValue(e);return null===t?e:t}},{key:"onAfterPluginsInitialized",value:function(){this.updateRowsMapper(),this.initialSettings(),this.backlight.build(),this.guideline.build()}},{key:"destroy",value:function(){this.backlight.destroy(),this.guideline.destroy(),this.rowsMapper.destroy(),y(m(t.prototype),"destroy",this).call(this)}}]),t}();(0,u.registerPlugin)("ManualRowMove",E);var O=E;t.default=O},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(76)),o=n(1),i=n(2),a=n(5);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.manualRowMove=t}return function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(e,[{key:"createMap",value:function(e){var t=this,n=void 0===e?this._arrayMap.length:e;this._arrayMap.length=0,(0,a.rangeEach)(n-1,function(e){t._arrayMap[e]=e})}},{key:"destroy",value:function(){this._arrayMap=null}},{key:"moveRow",value:function(e,t){var n=this._arrayMap[e];this._arrayMap[e]=null,this._arrayMap.splice(t,0,n)}},{key:"clearNull",value:function(){this._arrayMap=(0,o.arrayFilter)(this._arrayMap,function(e){return null!==e})}}]),e}();(0,i.mixin)(l,r.default);var u=l;t.default=u},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(453)),o=n(3);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),s(this,u(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,r.default),function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(t,[{key:"build",value:function(){l(u(t.prototype),"build",this).call(this),(0,o.addClass)(this._element,"ht__manualRowMove--backlight")}}]),t}();t.default=f},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(453)),o=n(3);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),s(this,u(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,r.default),function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(t,[{key:"build",value:function(){l(u(t.prototype),"build",this).call(this),(0,o.addClass)(this._element,"ht__manualRowMove--guideline")}}]),t}();t.default=f},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(7)),o=n(3),i=c(n(10)),a=n(16),s=n(1),l=n(5),u=n(6);function c(e){return e&&e.__esModule?e:{default:e}}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var y=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?v(e):t}(this,p(t).call(this,e))).currentTH=null,n.currentRow=null,n.selectedRows=[],n.currentHeight=null,n.newSize=null,n.startY=null,n.startHeight=null,n.startOffset=null,n.handle=document.createElement("DIV"),n.guide=document.createElement("DIV"),n.eventManager=new i.default(v(v(n))),n.pressed=null,n.dblclick=0,n.autoresizeTimeout=null,n.manualRowHeights=[],(0,o.addClass)(n.handle,"manualRowResizer"),(0,o.addClass)(n.guide,"manualRowResizerGuide"),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(t,r.default),function(e,t,n){t&&h(e.prototype,t),n&&h(e,n)}(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().manualRowResize}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){this.manualRowHeights=[];var n=this.hot.getSettings().manualRowResize,r=this.loadManualRowHeights();void 0!==r?this.manualRowHeights=r:Array.isArray(n)?this.manualRowHeights=n:this.manualRowHeights=[],this.addHook("modifyRowHeight",function(t,n){return e.onModifyRowHeight(t,n)}),this.bindEvents(),d(p(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){var e=this.hot.getSettings().manualRowResize;Array.isArray(e)?this.manualRowHeights=e:e||(this.manualRowHeights=[])}},{key:"disablePlugin",value:function(){d(p(t.prototype),"disablePlugin",this).call(this)}},{key:"saveManualRowHeights",value:function(){this.hot.runHooks("persistentStateSave","manualRowHeights",this.manualRowHeights)}},{key:"loadManualRowHeights",value:function(){var e={};return this.hot.runHooks("persistentStateLoad","manualRowHeights",e),e.value}},{key:"setupHandlePosition",value:function(e){var t=this;this.currentTH=e;var n=this.hot.view.wt.wtTable.getCoords(e).row,r=(0,o.outerWidth)(this.currentTH);if(n>=0){var i=this.currentTH.getBoundingClientRect();if(this.currentRow=n,this.selectedRows=[],this.hot.selection.isSelected()&&this.hot.selection.isSelectedByRowHeader()){var a=this.hot.getSelectedRangeLast(),s=a.from,u=a.to,c=s.row,f=u.row;c>=f&&(c=u.row,f=s.row),this.currentRow>=c&&this.currentRow<=f?(0,l.rangeEach)(c,f,function(e){return t.selectedRows.push(e)}):this.selectedRows.push(this.currentRow)}else this.selectedRows.push(this.currentRow);this.startOffset=i.top-6,this.startHeight=parseInt(i.height,10),this.handle.style.left="".concat(i.left,"px"),this.handle.style.top="".concat(this.startOffset+this.startHeight,"px"),this.handle.style.width="".concat(r,"px"),this.hot.rootElement.appendChild(this.handle)}}},{key:"refreshHandlePosition",value:function(){this.handle.style.top="".concat(this.startOffset+this.currentHeight,"px")}},{key:"setupGuidePosition",value:function(){var e=parseInt((0,o.outerWidth)(this.handle),10),t=parseInt(this.handle.style.left,10)+e,n=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);(0,o.addClass)(this.handle,"active"),(0,o.addClass)(this.guide,"active"),this.guide.style.top=this.handle.style.top,this.guide.style.left="".concat(t,"px"),this.guide.style.width="".concat(n-e,"px"),this.hot.rootElement.appendChild(this.guide)}},{key:"refreshGuidePosition",value:function(){this.guide.style.top=this.handle.style.top}},{key:"hideHandleAndGuide",value:function(){(0,o.removeClass)(this.handle,"active"),(0,o.removeClass)(this.guide,"active")}},{key:"checkIfRowHeader",value:function(e){if(e!==this.hot.rootElement){var t=e.parentNode;return"TBODY"===t.tagName||this.checkIfRowHeader(t)}return!1}},{key:"getTHFromTargetElement",value:function(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getTHFromTargetElement(e.parentNode):null}},{key:"onMouseOver",value:function(e){if(this.checkIfRowHeader(e.target)){var t=this.getTHFromTargetElement(e.target);t&&(this.pressed||this.setupHandlePosition(t))}}},{key:"afterMouseDownTimeout",value:function(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(n,r){var o=e.hot.runHooks("beforeRowResize",n,e.newSize,!0);void 0!==o&&(e.newSize=o),e.setManualSize(n,e.newSize),r&&t(),e.hot.runHooks("afterRowResize",n,e.newSize,!0)};this.dblclick>=2&&(this.selectedRows.length>1?((0,s.arrayEach)(this.selectedRows,function(e){n(e)}),t()):(0,s.arrayEach)(this.selectedRows,function(e){n(e,!0)}));this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(e){var t=this;(0,o.hasClass)(e.target,"manualRowResizer")&&(this.setupGuidePosition(),this.pressed=this.hot,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout(function(){return t.afterMouseDownTimeout()},500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startY=(0,a.pageY)(e),this.newSize=this.startHeight)}},{key:"onMouseMove",value:function(e){var t=this;this.pressed&&(this.currentHeight=this.startHeight+((0,a.pageY)(e)-this.startY),(0,s.arrayEach)(this.selectedRows,function(e){t.newSize=t.setManualSize(e,t.currentHeight)}),this.refreshHandlePosition(),this.refreshGuidePosition())}},{key:"onMouseUp",value:function(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(n,r){e.hot.runHooks("beforeRowResize",n,e.newSize),r&&t(),e.saveManualRowHeights(),e.hot.runHooks("afterRowResize",n,e.newSize,!1)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startHeight)this.selectedRows.length>1?((0,s.arrayEach)(this.selectedRows,function(e){n(e)}),t()):(0,s.arrayEach)(this.selectedRows,function(e){n(e,!0)});this.setupHandlePosition(this.currentTH)}}},{key:"bindEvents",value:function(){var e=this;this.eventManager.addEventListener(this.hot.rootElement,"mouseover",function(t){return e.onMouseOver(t)}),this.eventManager.addEventListener(this.hot.rootElement,"mousedown",function(t){return e.onMouseDown(t)}),this.eventManager.addEventListener(window,"mousemove",function(t){return e.onMouseMove(t)}),this.eventManager.addEventListener(window,"mouseup",function(){return e.onMouseUp()})}},{key:"setManualSize",value:function(e,t){var n=this.hot.runHooks("modifyRow",e);return this.manualRowHeights[n]=t,t}},{key:"onModifyRowHeight",value:function(e,t){if(this.enabled){var n=this.hot.getPlugin("autoRowSize"),r=n?n.heights[t]:null,o=this.hot.runHooks("modifyRow",t),i=this.manualRowHeights[o];if(void 0!==i&&(i===r||i>(e||0)))return i}return e}}]),t}();(0,u.registerPlugin)("manualRowResize",y);var m=y;t.default=m},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=m(n(7)),o=m(n(23)),i=n(6),a=n(16),s=n(13),l=m(n(763)),u=m(n(141)),c=m(n(764)),f=m(n(765)),h=m(n(766)),d=n(1),p=n(2),g=n(33),v=n(5),y=n(454);function m(e){return e&&e.__esModule?e:{default:e}}function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function C(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t,n){return(O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=S(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(767),o.default.getSingleton().register("beforeMergeCells"),o.default.getSingleton().register("afterMergeCells"),o.default.getSingleton().register("beforeUnmergeCells"),o.default.getSingleton().register("afterUnmergeCells");var R=new WeakMap,M=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?T(e):t}(this,S(t).call(this,e)),R.set(T(T(n)),{lastDesiredCoords:null}),n.mergedCellsCollection=null,n.autofillCalculations=null,n.selectionCalculations=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}(t,r.default),function(e,t,n){t&&E(e.prototype,t),n&&E(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().mergeCells}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.mergedCellsCollection=new l.default(this),this.autofillCalculations=new c.default(this),this.selectionCalculations=new f.default(this),this.addHook("afterInit",function(){return e.onAfterInit.apply(e,arguments)}),this.addHook("beforeKeyDown",function(){return e.onBeforeKeyDown.apply(e,arguments)}),this.addHook("modifyTransformStart",function(){return e.onModifyTransformStart.apply(e,arguments)}),this.addHook("afterModifyTransformStart",function(){return e.onAfterModifyTransformStart.apply(e,arguments)}),this.addHook("modifyTransformEnd",function(){return e.onModifyTransformEnd.apply(e,arguments)}),this.addHook("modifyGetCellCoords",function(){return e.onModifyGetCellCoords.apply(e,arguments)}),this.addHook("beforeSetRangeEnd",function(){return e.onBeforeSetRangeEnd.apply(e,arguments)}),this.addHook("afterIsMultipleSelection",function(){return e.onAfterIsMultipleSelection.apply(e,arguments)}),this.addHook("afterRenderer",function(){return e.onAfterRenderer.apply(e,arguments)}),this.addHook("afterContextMenuDefaultOptions",function(){return e.addMergeActionsToContextMenu.apply(e,arguments)}),this.addHook("afterGetCellMeta",function(){return e.onAfterGetCellMeta.apply(e,arguments)}),this.addHook("afterViewportRowCalculatorOverride",function(){return e.onAfterViewportRowCalculatorOverride.apply(e,arguments)}),this.addHook("afterViewportColumnCalculatorOverride",function(){return e.onAfterViewportColumnCalculatorOverride.apply(e,arguments)}),this.addHook("modifyAutofillRange",function(){return e.onModifyAutofillRange.apply(e,arguments)}),this.addHook("afterCreateCol",function(){return e.onAfterCreateCol.apply(e,arguments)}),this.addHook("afterRemoveCol",function(){return e.onAfterRemoveCol.apply(e,arguments)}),this.addHook("afterCreateRow",function(){return e.onAfterCreateRow.apply(e,arguments)}),this.addHook("afterRemoveRow",function(){return e.onAfterRemoveRow.apply(e,arguments)}),this.addHook("afterChange",function(){return e.onAfterChange.apply(e,arguments)}),this.addHook("beforeDrawBorders",function(){return e.onBeforeDrawAreaBorders.apply(e,arguments)}),this.addHook("afterDrawSelection",function(){return e.onAfterDrawSelection.apply(e,arguments)}),this.addHook("beforeRemoveCellClassNames",function(){return e.onBeforeRemoveCellClassNames.apply(e,arguments)}),O(S(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.clearCollections(),this.hot.render(),O(S(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){var e=this.hot.getSettings().mergeCells;this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(e),O(S(t.prototype),"updatePlugin",this).call(this)}},{key:"validateSetting",value:function(e){var t=!0;return!!e&&(u.default.containsNegativeValues(e)?((0,g.warn)(u.default.NEGATIVE_VALUES_WARNING(e)),t=!1):u.default.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?((0,g.warn)(u.default.IS_OUT_OF_BOUNDS_WARNING(e)),t=!1):u.default.isSingleCell(e)?((0,g.warn)(u.default.IS_SINGLE_CELL(e)),t=!1):u.default.containsZeroSpan(e)&&((0,g.warn)(u.default.ZERO_SPAN_WARNING(e)),t=!1),t)}},{key:"generateFromSettings",value:function(e){var t=this;if(Array.isArray(e)){var n,r=[];(0,d.arrayEach)(e,function(e){if(t.validateSetting(e)){var n=new s.CellCoords(e.row,e.col),o=new s.CellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),i=new s.CellRange(n,n,o);r.push(t.mergeRange(i,!0,!0))}}),r=r.filter(function(e){return!0!==e});var o=this.getBulkCollectionData(r);(n=this.hot).populateFromArray.apply(n,C(o))}}},{key:"getBulkCollectionData",value:function(e){var t,n=this.getBulkCollectionDataRange(e),r=(t=this.hot).getData.apply(t,C(n)).splice(0);return(0,d.arrayEach)(e,function(e){var t=b(e,3),o=t[0],i=t[1],a=t[2];(0,d.arrayEach)(a,function(e,t){(0,d.arrayEach)(e,function(e,a){r[o-n[0]+t][i-n[1]+a]=e})})}),[n[0],n[1],r]}},{key:"getBulkCollectionDataRange",value:function(e){var t=[0,0],n=[0,0],r=null,o=null,i=null;return(0,d.arrayEach)(e,function(e){r=e[0],o=e[1],i=e[2],t[0]=Math.min(r,t[0]),t[1]=Math.min(o,t[1]),n[0]=Math.max(r+i.length-1,n[0]),n[1]=Math.max(o+i[0].length-1,n[1])}),[].concat(t,n)}},{key:"clearCollections",value:function(){this.mergedCellsCollection.clear()}},{key:"canMergeRange",value:function(e){return!!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])||this.validateSetting(e)}},{key:"toggleMergeOnSelection",value:function(){var e=this.hot.getSelectedRangeLast();if(e){e.setDirection("NW-SE");var t=e.from,n=e.to;this.toggleMerge(e),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}}},{key:"mergeSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(e){e.setDirection("NW-SE");var t=e.from,n=e.to;this.unmergeRange(e,!0),this.mergeRange(e),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}}},{key:"unmergeSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(e){var t=e.from,n=e.to;this.unmergeRange(e,!0),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}}},{key:"mergeRange",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=e.getTopLeftCorner(),i=e.getBottomRightCorner(),a={row:o.row,col:o.col,rowspan:i.row-o.row+1,colspan:i.col-o.col+1},s=[],l=null;return!!this.canMergeRange(a,n)&&(this.hot.runHooks("beforeMergeCells",e,n),(0,v.rangeEach)(0,a.rowspan-1,function(e){(0,v.rangeEach)(0,a.colspan-1,function(n){var r=null;s[e]||(s[e]=[]),0===e&&0===n?r=t.hot.getDataAtCell(a.row,a.col):t.hot.setCellMeta(a.row+e,a.col+n,"hidden",!0),s[e][n]=r})}),this.hot.setCellMeta(a.row,a.col,"spanned",!0),!this.mergedCellsCollection.add(a)||(r?l=[a.row,a.col,s]:this.hot.populateFromArray(a.row,a.col,s,void 0,void 0,this.pluginName),this.hot.runHooks("afterMergeCells",e,a,n),l))}},{key:"unmergeRange",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.mergedCellsCollection.getWithinRange(e);r&&(this.hot.runHooks("beforeUnmergeCells",e,n),(0,d.arrayEach)(r,function(e){t.mergedCellsCollection.remove(e.row,e.col),(0,v.rangeEach)(0,e.rowspan-1,function(n){(0,v.rangeEach)(0,e.colspan-1,function(r){t.hot.removeCellMeta(e.row+n,e.col+r,"hidden")})}),t.hot.removeCellMeta(e.row,e.col,"spanned")}),this.hot.render(),this.hot.runHooks("afterUnmergeCells",e,n))}},{key:"toggleMerge",value:function(e){var t=this.mergedCellsCollection.get(e.from.row,e.from.col);t.row===e.from.row&&t.col===e.from.col&&t.row+t.rowspan-1===e.to.row&&t.col+t.colspan-1===e.to.col?this.unmergeRange(e):this.mergeSelection(e)}},{key:"merge",value:function(e,t,n,r){var o=new s.CellCoords(e,t),i=new s.CellCoords(n,r);this.mergeRange(new s.CellRange(o,o,i))}},{key:"unmerge",value:function(e,t,n,r){var o=new s.CellCoords(e,t),i=new s.CellCoords(n,r);this.unmergeRange(new s.CellRange(o,o,i))}},{key:"onAfterInit",value:function(){this.generateFromSettings(this.hot.getSettings().mergeCells),this.hot.render()}},{key:"onBeforeKeyDown",value:function(e){(e.ctrlKey||e.metaKey)&&!e.altKey&&77===e.keyCode&&(this.toggleMerge(this.hot.getSelectedRangeLast()),this.hot.render(),(0,a.stopImmediatePropagation)(e))}},{key:"onAfterIsMultipleSelection",value:function(e){if(e)for(var t=this.mergedCellsCollection.mergedCells,n=this.hot.getSelectedRangeLast(),r=0;r<t.length;r+=1)if(n.highlight.row===t[r].row&&n.highlight.col===t[r].col&&n.to.row===t[r].row+t[r].rowspan-1&&n.to.col===t[r].col+t[r].colspan-1)return!1;return e}},{key:"onModifyTransformStart",value:function(e){var t,n=R.get(this),r=this.hot.getSelectedRangeLast(),o={row:e.row,col:e.col},i=new s.CellCoords(r.highlight.row,r.highlight.col),a=this.mergedCellsCollection.get(i.row,i.col);if(n.lastDesiredCoords||(n.lastDesiredCoords=new s.CellCoords(null,null)),a){var l=new s.CellCoords(a.row,a.col),u=new s.CellCoords(a.row+a.rowspan-1,a.col+a.colspan-1);new s.CellRange(l,l,u).includes(n.lastDesiredCoords)||(n.lastDesiredCoords=new s.CellCoords(null,null)),o.row=n.lastDesiredCoords.row?n.lastDesiredCoords.row-i.row:o.row,o.col=n.lastDesiredCoords.col?n.lastDesiredCoords.col-i.col:o.col,e.row>0?o.row=a.row+a.rowspan-1-i.row+e.row:e.row<0&&(o.row=i.row-a.row+e.row),e.col>0?o.col=a.col+a.colspan-1-i.col+e.col:e.col<0&&(o.col=i.col-a.col+e.col)}t=new s.CellCoords(r.highlight.row+o.row,r.highlight.col+o.col);var c=this.mergedCellsCollection.get(t.row,t.col);c&&(n.lastDesiredCoords=t,o={row:c.row-i.row,col:c.col-i.col}),0!==o.row&&(e.row=o.row),0!==o.col&&(e.col=o.col)}},{key:"onModifyTransformEnd",value:function(e){var t=this,n=this.hot.getSelectedRangeLast(),r=(0,p.clone)(e),o=this.selectionCalculations.getUpdatedSelectionRange(n,e),i=(0,p.clone)(r),a=this.mergedCellsCollection.getWithinRange(o,!0);do{i=(0,p.clone)(r),this.selectionCalculations.getUpdatedSelectionRange(n,r),(0,d.arrayEach)(a,function(e){t.selectionCalculations.snapDelta(r,n,e)})}while(r.row!==i.row||r.col!==i.col);e.row=r.row,e.col=r.col}},{key:"onModifyGetCellCoords",value:function(e,t){var n=this.mergedCellsCollection.get(e,t);return n?[n.row,n.col,n.row+n.rowspan-1,n.col+n.colspan-1]:void 0}},{key:"addMergeActionsToContextMenu",value:function(e){e.items.push({name:"---------"},(0,h.default)(this))}},{key:"onAfterRenderer",value:function(e,t,n){var r=this.mergedCellsCollection.get(t,n);(0,y.applySpanProperties)(e,r,t,n)}},{key:"onBeforeSetRangeEnd",value:function(e){var t=this.hot.getSelectedRangeLast();t.highlight=new s.CellCoords(t.highlight.row,t.highlight.col),t.to=e;var n=!1;if(!(0===t.from.row&&t.to.row===this.hot.countRows()-1||0===t.from.col&&t.to.col===this.hot.countCols()-1))do{n=!1;for(var r=0;r<this.mergedCellsCollection.mergedCells.length;r+=1){var o=this.mergedCellsCollection.mergedCells[r].getRange();t.expandByRange(o)&&(e.row=t.to.row,e.col=t.to.col,n=!0)}}while(n)}},{key:"onAfterGetCellMeta",value:function(e,t,n){var r=this.mergedCellsCollection.get(e,t);!r||r.row===e&&r.col===t||(n.copyable=!1)}},{key:"onAfterViewportRowCalculatorOverride",value:function(e){var t,n=this,r=this.hot.countCols();(0,v.rangeEach)(0,r-1,function(r){if((t=n.mergedCellsCollection.get(e.startRow,r))&&t.row<e.startRow)return e.startRow=t.row,n.onAfterViewportRowCalculatorOverride.call(n,e);if(t=n.mergedCellsCollection.get(e.endRow,r)){var o=t.row+t.rowspan-1;if(o>e.endRow)return e.endRow=o,n.onAfterViewportRowCalculatorOverride.call(n,e)}return!0})}},{key:"onAfterViewportColumnCalculatorOverride",value:function(e){var t,n=this,r=this.hot.countRows();(0,v.rangeEach)(0,r-1,function(r){if((t=n.mergedCellsCollection.get(r,e.startColumn))&&t.col<e.startColumn)return e.startColumn=t.col,n.onAfterViewportColumnCalculatorOverride.call(n,e);if(t=n.mergedCellsCollection.get(r,e.endColumn)){var o=t.col+t.colspan-1;if(o>e.endColumn)return e.endColumn=o,n.onAfterViewportColumnCalculatorOverride.call(n,e)}return!0})}},{key:"onModifyAutofillRange",value:function(e,t){this.autofillCalculations.correctSelectionAreaSize(t);var n=this.autofillCalculations.getDirection(t,e),r=e;if(this.autofillCalculations.dragAreaOverlapsCollections(t,r,n))return r=t;var o=this.mergedCellsCollection.getWithinRange({from:{row:t[0],col:t[1]},to:{row:t[2],col:t[3]}});return o?r=this.autofillCalculations.snapDragArea(t,r,n,o):r}},{key:"onAfterCreateCol",value:function(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}},{key:"onAfterRemoveCol",value:function(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}},{key:"onAfterCreateRow",value:function(e,t,n){"auto"!==n&&this.mergedCellsCollection.shiftCollections("down",e,t)}},{key:"onAfterRemoveRow",value:function(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}},{key:"onAfterChange",value:function(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}},{key:"onBeforeDrawAreaBorders",value:function(e,t){if(t&&"area"===t){var n=this.hot.getSelectedRangeLast(),r=this.mergedCellsCollection.getWithinRange(n);(0,d.arrayEach)(r,function(t){n.getBottomRightCorner().row===t.getLastRow()&&n.getBottomRightCorner().col===t.getLastColumn()&&(e[2]=t.row,e[3]=t.col)})}}},{key:"onAfterModifyTransformStart",value:function(e,t,n){if(this.enabled){var r=this.mergedCellsCollection.get(e.row,e.col);if(r){var o=t>0,i=t<0,a=n<0,s=n>0,l=r.row+r.rowspan-1==this.hot.countRows()-1,u=0===r.row,c=r.col+r.colspan-1==this.hot.countCols()-1,f=0===r.col;(o&&l||i&&u||s&&c||a&&f)&&(e.row=r.row,e.col=r.col)}}}},{key:"onAfterDrawSelection",value:function(e,t,n,r){return this.selectionCalculations.getSelectedMergedCellClassName(e,t,n,r)}},{key:"onBeforeRemoveCellClassNames",value:function(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}}]),t}();(0,i.registerPlugin)("mergeCells",M);var k=M;t.default=k},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(141)),o=n(13),i=n(5),a=n(33),s=n(1),l=n(454),u=n(37);function c(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["The merged cell declared at [",", ","], overlaps with the other declared merged \n cell. The overlapping merged cell was not added to the table, please fix your setup."]);return c=function(){return e},e}function f(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.plugin=t,this.mergedCells=[],this.hot=t.hot}return function(e,t,n){t&&h(e.prototype,t),n&&h(e,n)}(e,[{key:"get",value:function(e,t){var n=this.mergedCells,r=!1;return(0,s.arrayEach)(n,function(n){return!(n.row<=e&&n.row+n.rowspan-1>=e&&n.col<=t&&n.col+n.colspan-1>=t)||(r=n,!1)}),r}},{key:"getByRange",value:function(e){var t=this.mergedCells,n=!1;return(0,s.arrayEach)(t,function(t){return!(t.row<=e.from.row&&t.row+t.rowspan-1>=e.to.row&&t.col<=e.from.col&&t.col+t.colspan-1>=e.to.col)||(n=t)}),n}},{key:"getWithinRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.mergedCells,r=[],i=e;if(!i.includesRange){var a=new o.CellCoords(i.from.row,i.from.col),l=new o.CellCoords(i.to.row,i.to.col);i=new o.CellRange(a,a,l)}return(0,s.arrayEach)(n,function(e){var n=new o.CellCoords(e.row,e.col),a=new o.CellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),s=new o.CellRange(n,n,a);t?i.overlaps(s)&&r.push(e):i.includesRange(s)&&r.push(e)}),!!r.length&&r}},{key:"add",value:function(t){var n=this.mergedCells,o=t.row,i=t.col,s=t.rowspan,l=t.colspan,u=new r.default(o,i,s,l),c=this.get(o,i),f=this.isOverlapping(u);return c||f?((0,a.warn)(e.IS_OVERLAPPING_WARNING(u)),!1):(this.hot&&u.normalize(this.hot),n.push(u),u)}},{key:"remove",value:function(e,t){var n=this.mergedCells,r=this.get(e,t),o=r?this.mergedCells.indexOf(r):null;return!(!r||!1===o)&&(n.splice(o,1),r)}},{key:"clear",value:function(){var e=this,t=this.mergedCells,n=[],r=[];(0,s.arrayEach)(t,function(t){var r=e.hot.getCell(t.row,t.col);r&&n.push([r,e.get(t.row,t.col),t.row,t.col])}),this.mergedCells.length=0,(0,s.arrayEach)(n,function(t,o){(0,i.rangeEach)(0,t.rowspan-1,function(n){(0,i.rangeEach)(0,t.colspan-1,function(o){if(0!==o||0!==n){var i=e.hot.getCell(t.row+n,t.col+o);i&&r.push([i,null,null,null])}})}),n[o][1]=null}),(0,s.arrayEach)(n,function(e){l.applySpanProperties.apply(void 0,f(e))}),(0,s.arrayEach)(r,function(e){l.applySpanProperties.apply(void 0,f(e))})}},{key:"isOverlapping",value:function(e){var t=new o.CellRange(null,new o.CellCoords(e.row,e.col),new o.CellCoords(e.row+e.rowspan-1,e.col+e.colspan-1)),n=!1;return(0,s.arrayEach)(this.mergedCells,function(e){return!new o.CellRange(null,new o.CellCoords(e.row,e.col),new o.CellCoords(e.row+e.rowspan-1,e.col+e.colspan-1)).overlaps(t)||(n=!0,!1)}),n}},{key:"isMergedParent",value:function(e,t){var n=this.mergedCells,r=!1;return(0,s.arrayEach)(n,function(n){return n.row!==e||n.col!==t||(r=!0,!1)}),r}},{key:"shiftCollections",value:function(e,t,n){var r=this,o=[0,0];switch(e){case"right":o[0]+=n;break;case"left":o[0]-=n;break;case"down":o[1]+=n;break;case"up":o[1]-=n}(0,s.arrayEach)(this.mergedCells,function(e){e.shift(o,t)}),(0,i.rangeEachReverse)(this.mergedCells.length-1,0,function(e){var t=r.mergedCells[e];t&&t.removed&&r.mergedCells.splice(r.mergedCells.indexOf(t),1)})}}],[{key:"IS_OVERLAPPING_WARNING",value:function(e){return(0,u.toSingleLine)(c(),e.row,e.col)}}]),e}();t.default=d},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(2),o=n(13),i=n(1);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.plugin=t,this.mergedCellsCollection=this.plugin.mergedCellsCollection,this.currentFillData=null}return function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(e,[{key:"correctSelectionAreaSize",value:function(e){if(e[0]===e[2]&&e[1]===e[3]){var t=this.mergedCellsCollection.get(e[0],e[1]);t&&(e[2]=e[0]+t.rowspan-1,e[3]=e[1]+t.colspan-1)}}},{key:"getDirection",value:function(e,t){return t[0]===e[0]&&t[1]===e[1]&&t[3]===e[3]?"down":t[2]===e[2]&&t[1]===e[1]&&t[3]===e[3]?"up":t[1]===e[1]&&t[2]===e[2]?"right":"left"}},{key:"snapDragArea",value:function(e,t,n,r){var o=t.slice(0),i=this.getAutofillSize(e,t,n),s=a(e,4),l=s[0],u=s[1],c=s[2],f=s[3],h=["up","down"].indexOf(n)>-1?c-l+1:f-u+1,d=i-Math.floor(i/h)*h,p=this.getFarthestCollection(e,t,n,r);if(p)if("down"===n){var g=p.row+p.rowspan-l-d;o[2]+g>=this.plugin.hot.countRows()?o[2]-=d:o[2]+=d?g:0}else if("right"===n){var v=p.col+p.colspan-u-d;o[3]+v>=this.plugin.hot.countCols()?o[3]-=d:o[3]+=d?v:0}else if("up"===n){var y=c-d-p.row+1;o[0]+y<0?o[0]+=d:o[0]-=d?y:0}else if("left"===n){var m=f-d-p.col+1;o[1]+m<0?o[1]+=d:o[1]-=d?m:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:n,foundMergedCells:r,fillSize:i,dragArea:o,cycleLength:h}),o}},{key:"updateCurrentFillCache",value:function(e){this.currentFillData||(this.currentFillData={}),(0,r.extend)(this.currentFillData,e)}},{key:"getAutofillSize",value:function(e,t,n){var r=a(e,4),o=r[0],i=r[1],s=r[2],l=r[3],u=a(t,4),c=u[0],f=u[1],h=u[2],d=u[3];switch(n){case"up":return o-c;case"down":return h-s;case"left":return i-f;case"right":return d-l;default:return null}}},{key:"getDragArea",value:function(e,t,n){var r=a(e,4),o=r[0],i=r[1],s=r[2],l=r[3],u=a(t,4),c=u[0],f=u[1],h=u[2],d=u[3];switch(n){case"up":return[c,f,o-1,l];case"down":return[s+1,i,h,l];case"left":return[c,f,s,i-1];case"right":return[o,l+1,h,d];default:return null}}},{key:"getFarthestCollection",value:function(e,t,n,r){var o=a(e,4),s=o[0],l=o[1],u=o[2],c=o[3],f=["up","down"].indexOf(n)>-1,h=f?u:c,d=f?s:l,p=this.getAutofillSize(e,t,n),g=f?u-s+1:c-l+1,v=p-Math.floor(p/g)*g,y=null,m=null,w=null;switch(n){case"up":y="includesVertically",w=h-v+1;break;case"left":y="includesHorizontally",w=h-v+1;break;case"down":y="includesVertically",w=d+v-1;break;case"right":y="includesHorizontally",w=d+v-1}return(0,i.arrayEach)(r,function(e){e[y](w)&&e.isFarther(m,n)&&(m=e)}),m}},{key:"recreateAfterDataPopulation",value:function(e){if(this.currentFillData){var t=this.getRangeFromChanges(e),n=this.currentFillData.foundMergedCells,r=this.currentFillData.dragDirection,o=function(e,n){switch(r){case"up":return e.row-n>=t.from.row;case"down":return e.row+e.rowspan-1+n<=t.to.row;case"left":return e.col-n>=t.from.column;case"right":return e.col+e.colspan-1+n<=t.to.column;default:return null}},i=0,a=null,s=1;do{for(var l=0;l<n.length;l+=1){if(o(a=n[l],i=s*this.currentFillData.cycleLength))switch(r){case"up":this.plugin.mergedCellsCollection.add({row:a.row-i,rowspan:a.rowspan,col:a.col,colspan:a.colspan});break;case"down":this.plugin.mergedCellsCollection.add({row:a.row+i,rowspan:a.rowspan,col:a.col,colspan:a.colspan});break;case"left":this.plugin.mergedCellsCollection.add({row:a.row,rowspan:a.rowspan,col:a.col-i,colspan:a.colspan});break;case"right":this.plugin.mergedCellsCollection.add({row:a.row,rowspan:a.rowspan,col:a.col+i,colspan:a.colspan})}l===n.length-1&&(s+=1)}}while(o(a,i));this.currentFillData=null,this.plugin.hot.render()}}},{key:"getRangeFromChanges",value:function(e){var t=this,n={min:null,max:null},r={min:null,max:null};return(0,i.arrayEach)(e,function(e){var o=e[0],i=t.plugin.hot.propToCol(e[1]);(null===n.min||o<n.min)&&(n.min=o),(null===n.max||o>n.max)&&(n.max=o),(null===r.min||i<r.min)&&(r.min=i),(null===r.max||i>r.max)&&(r.max=i)}),{from:{row:n.min,column:r.min},to:{row:n.max,column:r.max}}}},{key:"dragAreaOverlapsCollections",value:function(e,t,n){var r=a(this.getDragArea(e,t,n),4),i=r[0],s=r[1],l=r[2],u=r[3],c=new o.CellCoords(i,s),f=new o.CellCoords(l,u),h=new o.CellRange(c,c,f);return!!this.mergedCellsCollection.getWithinRange(h,!0)}}]),e}();t.default=l},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(13);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.plugin=t,this.fullySelectedMergedCellClassName="fullySelectedMergedCell"}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(e,[{key:"snapDelta",value:function(e,t,n){var r=t.to,o=r.row+e.row,i=r.col+e.col;e.row?this.jumpOverMergedCell(e,n,o):e.col&&this.jumpOverMergedCell(e,n,i)}},{key:"jumpOverMergedCell",value:function(e,t,n){var r=e.row||e.col,o=null,i=null,a=null;e.row?(o=t.includesVertically(n),i=t.row,a=t.getLastRow()):e.col&&(o=t.includesHorizontally(n),i=t.col,a=t.getLastColumn()),0!==r&&(r>0?o&&n!==i&&(r+=a-n+1):o&&n!==a&&(r-=n-i+1),e.row?e.row=r:e.col&&(e.col=r))}},{key:"getUpdatedSelectionRange",value:function(e,t){return new r.CellRange(e.highlight,e.from,new r.CellCoords(e.to.row+t.row,e.to.col+t.col))}},{key:"getSelectedMergedCellClassName",value:function(e,t,n,r){var i=o(n,4),a=i[0],s=i[1],l=i[2],u=i[3];if(void 0!==r&&e>=a&&e<=l&&t>=s&&t<=u){if(!this.plugin.mergedCellsCollection.isMergedParent(e,t))return;var c=this.plugin.mergedCellsCollection.get(e,t);if(!c)return;if(c.row+c.rowspan-1<=l&&c.col+c.colspan-1<=u)return"".concat(this.fullySelectedMergedCellClassName,"-").concat(r);if(this.plugin.selectionCalculations.isMergeCellFullySelected(c,this.plugin.hot.getSelectedRange()))return"".concat(this.fullySelectedMergedCellClassName,"-multiple")}}},{key:"isMergeCellFullySelected",value:function(e,t){var n=[];if(!t||!e)return!1;for(var o=0;o<e.rowspan;o+=1)for(var i=0;i<e.colspan;i+=1)n.push(new r.CellCoords(e.row+o,e.col+i));for(var a=0;a<n.length;a+=1){for(var s=[],l=0;l<t.length;l+=1)s[l]=t[l].includes(n[a]);if(!s.includes(!0))return!1}return!0}},{key:"getSelectedMergedCellClassNameToRemove",value:function(){for(var e=[],t=0;t<=7;t+=1)e.push("".concat(this.fullySelectedMergedCellClassName,"-").concat(t));return e.push("".concat(this.fullySelectedMergedCellClassName,"-multiple")),e}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"mergeCells",name:function(){var t=this.getSelectedLast();if(t){var n=e.mergedCellsCollection.get(t[0],t[1]);if(n.row===t[0]&&n.col===t[1]&&n.row+n.rowspan-1===t[2]&&n.col+n.colspan-1===t[3])return this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_UNMERGE_CELLS)}return this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_MERGE_CELLS)},callback:function(){e.toggleMergeOnSelection()},disabled:function(){var e=this.getSelectedLast();if(!e)return!0;var t=o.default.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1});return t||this.selection.isSelectedByCorner()},hidden:!1}};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=function(e){return e&&e.__esModule?e:{default:e}}(n(141))},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(48),i=u(n(7)),a=u(n(10)),s=n(6),l=n(13);function u(e){return e&&e.__esModule?e:{default:e}}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e,t,n){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=h(this,p(t).call(this,e))).dragged=[],n.eventManager=null,n.lastSetCell=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(t,i.default),function(e,t,n){t&&f(e.prototype,t),n&&f(e,n)}(t,[{key:"isEnabled",value:function(){return(0,o.isMobileBrowser)()}},{key:"enablePlugin",value:function(){this.enabled||(this.eventManager||(this.eventManager=new a.default(this)),this.registerListeners(),d(p(t.prototype),"enablePlugin",this).call(this))}},{key:"registerListeners",value:function(){var e=this;function t(t){if(1===e.dragged.length)return e.dragged.splice(0,e.dragged.length),!0;var n=e.dragged.indexOf(t);if(-1===n)return!1;0===n?e.dragged=e.dragged.slice(0,1):1===n&&(e.dragged=e.dragged.slice(-1))}this.eventManager.addEventListener(this.hot.rootElement,"touchstart",function(t){var n;return(0,r.hasClass)(t.target,"topLeftSelectionHandle-HitArea")?(n=e.hot.getSelectedRangeLast(),e.dragged.push("topLeft"),e.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},t.preventDefault(),!1):(0,r.hasClass)(t.target,"bottomRightSelectionHandle-HitArea")?(n=e.hot.getSelectedRangeLast(),e.dragged.push("bottomRight"),e.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},t.preventDefault(),!1):void 0}),this.eventManager.addEventListener(this.hot.rootElement,"touchend",function(n){return(0,r.hasClass)(n.target,"topLeftSelectionHandle-HitArea")?(t.call(e,"topLeft"),e.touchStartRange=void 0,n.preventDefault(),!1):(0,r.hasClass)(n.target,"bottomRightSelectionHandle-HitArea")?(t.call(e,"bottomRight"),e.touchStartRange=void 0,n.preventDefault(),!1):void 0}),this.eventManager.addEventListener(this.hot.rootElement,"touchmove",function(t){var n,o,i,a,s,l,u=(0,r.getWindowScrollTop)(),c=(0,r.getWindowScrollLeft)();if(0!==e.dragged.length){var f=document.elementFromPoint(t.touches[0].screenX-c,t.touches[0].screenY-u);f&&f!==e.lastSetCell&&("TD"!==f.nodeName&&"TH"!==f.nodeName||(-1===(n=e.hot.getCoords(f)).col&&(n.col=0),i=(o=e.hot.getSelectedRangeLast()).getWidth(),a=o.getHeight(),s=o.getDirection(),1===i&&1===a&&e.hot.selection.setRangeEnd(n),null!==(l=e.getCurrentRangeCoords(o,n,e.touchStartRange.direction,s,e.dragged[0])).start&&e.hot.selection.setRangeStart(l.start),e.hot.selection.setRangeEnd(l.end),e.lastSetCell=f),t.preventDefault())}})}},{key:"getCurrentRangeCoords",value:function(e,t,n,r,o){var i=e.getTopLeftCorner(),a=e.getBottomRightCorner(),s=e.getBottomLeftCorner(),u=e.getTopRightCorner(),c={start:null,end:null};switch(n){case"NE-SW":switch(r){case"NE-SW":case"NW-SE":c="topLeft"===o?{start:new l.CellCoords(t.row,e.highlight.col),end:new l.CellCoords(s.row,t.col)}:{start:new l.CellCoords(e.highlight.row,t.col),end:new l.CellCoords(t.row,i.col)};break;case"SE-NW":"bottomRight"===o&&(c={start:new l.CellCoords(a.row,t.col),end:new l.CellCoords(t.row,i.col)})}break;case"NW-SE":switch(r){case"NE-SW":"topLeft"===o?c={start:t,end:s}:c.end=t;break;case"NW-SE":"topLeft"===o?c={start:t,end:a}:c.end=t;break;case"SE-NW":"topLeft"===o?c={start:t,end:i}:c.end=t;break;case"SW-NE":"topLeft"===o?c={start:t,end:u}:c.end=t}break;case"SW-NE":switch(r){case"NW-SE":c="bottomRight"===o?{start:new l.CellCoords(t.row,i.col),end:new l.CellCoords(s.row,t.col)}:{start:new l.CellCoords(i.row,t.col),end:new l.CellCoords(t.row,a.col)};break;case"SW-NE":c="topLeft"===o?{start:new l.CellCoords(e.highlight.row,t.col),end:new l.CellCoords(t.row,a.col)}:{start:new l.CellCoords(t.row,i.col),end:new l.CellCoords(i.row,t.col)};break;case"SE-NW":"bottomRight"===o?c={start:new l.CellCoords(t.row,u.col),end:new l.CellCoords(i.row,t.col)}:"topLeft"===o&&(c={start:s,end:t})}break;case"SE-NW":switch(r){case"NW-SE":case"NE-SW":case"SW-NE":"topLeft"===o&&(c.end=t);break;case"SE-NW":"topLeft"===o?c.end=t:c={start:t,end:i}}}return c}},{key:"isDragged",value:function(){return this.dragged.length>0}}]),t}();(0,s.registerPlugin)("multipleSelectionHandles",v);var y=v;t.default=y},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(7)),o=s(n(770)),i=n(1),a=n(6);function s(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e,t,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=c(this,h(t).call(this,e))).observer=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(t,r.default),function(e,t,n){t&&u(e.prototype,t),n&&u(e,n)}(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().observeChanges}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.observer||(this.observer=new o.default(this.hot.getSourceData()),this._exposePublicApi()),this.observer.addLocalHook("change",function(t){return e.onDataChange(t)}),this.addHook("afterCreateRow",function(){return e.onAfterTableAlter()}),this.addHook("afterRemoveRow",function(){return e.onAfterTableAlter()}),this.addHook("afterCreateCol",function(){return e.onAfterTableAlter()}),this.addHook("afterRemoveCol",function(){return e.onAfterTableAlter()}),this.addHook("afterChange",function(t,n){return e.onAfterTableAlter(n)}),this.addHook("afterLoadData",function(t){return e.onAfterLoadData(t)}),f(h(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.observer&&(this.observer.destroy(),this.observer=null,this._deletePublicApi()),f(h(t.prototype),"disablePlugin",this).call(this)}},{key:"onDataChange",value:function(e){var t=this;if(!this.observer.isPaused()){var n="".concat(this.pluginName,".change"),r={add:function(e){isNaN(e.col)?t.hot.runHooks("afterCreateRow",e.row,1,n):t.hot.runHooks("afterCreateCol",e.col,1,n)},remove:function(e){isNaN(e.col)?t.hot.runHooks("afterRemoveRow",e.row,1,n):t.hot.runHooks("afterRemoveCol",e.col,1,n)},replace:function(e){t.hot.runHooks("afterChange",[[e.row,e.col,null,e.value]],n)}};(0,i.arrayEach)(e,function(e){r[e.op]&&r[e.op](e)}),this.hot.render()}this.hot.runHooks("afterChangesObserved")}},{key:"onAfterTableAlter",value:function(e){var t=this;"loadData"!==e&&(this.observer.pause(),this.hot.addHookOnce("afterChangesObserved",function(){return t.observer.resume()}))}},{key:"onAfterLoadData",value:function(e){e||this.observer.setObservedData(this.hot.getSourceData())}},{key:"destroy",value:function(){this.observer&&(this.observer.destroy(),this._deletePublicApi()),f(h(t.prototype),"destroy",this).call(this)}},{key:"_exposePublicApi",value:function(){var e=this,t=this.hot;t.pauseObservingChanges=function(){return e.observer.pause()},t.resumeObservingChanges=function(){return e.observer.resume()},t.isPausedObservingChanges=function(){return e.observer.isPaused()}}},{key:"_deletePublicApi",value:function(){var e=this.hot;delete e.pauseObservingChanges,delete e.resumeObservingChanges,delete e.isPausedObservingChanges}}]),t}(),g=p;t.default=g,(0,a.registerPlugin)("observeChanges",p)},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(771)),o=s(n(29)),i=n(2),a=n(772);function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.observedData=null,this.observer=null,this.paused=!1,this.setObservedData(t)}return function(e,t,n){t&&l(e.prototype,t),n&&l(e,n)}(e,[{key:"setObservedData",value:function(e){var t=this;this.observer&&r.default.unobserve(this.observedData,this.observer),this.observedData=e,this.observer=r.default.observe(this.observedData,function(e){return t.onChange(e)})}},{key:"isPaused",value:function(){return this.paused}},{key:"pause",value:function(){this.paused=!0}},{key:"resume",value:function(){this.paused=!1}},{key:"onChange",value:function(e){this.runLocalHooks("change",(0,a.cleanPatches)(e))}},{key:"destroy",value:function(){r.default.unobserve(this.observedData,this.observer),this.observedData=null,this.observer=null}}]),e}();(0,i.mixin)(u,o.default);var c=u;t.default=c},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/*!
* https://github.com/Starcounter-Jack/JSON-Patch
* json-patch-duplex.js version: 0.5.7
* (c) 2013 Joachim Wester
* MIT license
*/var o,i=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=Error;!function(e){var t=function(e){if(u(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t};var n={add:function(e,t){return e[t]=this.value,!0},remove:function(e,t){return delete e[t],!0},replace:function(e,t){return e[t]=this.value,!0},move:function(e,t,n){var r={op:"_get",path:this.from};return y(n,[r]),y(n,[{op:"remove",path:this.from}]),y(n,[{op:"add",path:this.path,value:r.value}]),!0},copy:function(e,t,n){var r={op:"_get",path:this.from};return y(n,[r]),y(n,[{op:"add",path:this.path,value:r.value}]),!0},test:function(e,n){return function e(n,o){switch(r(n)){case"undefined":case"boolean":case"string":case"number":return n===o;case"object":if(null===n)return null===o;if(u(n)){if(!u(o)||n.length!==o.length)return!1;for(var i=0,a=n.length;i<a;i++)if(!e(n[i],o[i]))return!1;return!0}var s=t(o).length;if(t(n).length!==s)return!1;for(i=0;i<s;i++)if(!e(n[i],o[i]))return!1;return!0;default:return!1}}(e[n],this.value)},_get:function(e,t){this.value=e[t]}},o={add:function(e,t){return e.splice(t,0,this.value),!0},remove:function(e,t){return e.splice(t,1),!0},replace:function(e,t){return e[t]=this.value,!0},move:n.move,copy:n.copy,test:n.test,_get:n._get},s={add:function(e){for(var t in s.remove.call(this,e),this.value)this.value.hasOwnProperty(t)&&(e[t]=this.value[t]);return!0},remove:function(e){for(var t in e)e.hasOwnProperty(t)&&n.remove.call(this,e,t);return!0},replace:function(e){return y(e,[{op:"remove",path:this.path}]),y(e,[{op:"add",path:this.path,value:this.value}]),!0},move:n.move,copy:n.copy,test:function(e){return JSON.stringify(e)===JSON.stringify(this.value)},_get:function(e){this.value=e}};function l(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}var u,c=[],f=function(){return function(e){this.observers=[],this.obj=e}}(),h=function(){return function(e,t){this.callback=e,this.observer=t}}();function d(e){return"object"===r(e)?JSON.parse(JSON.stringify(e)):e}function p(e){for(var t,n=0,r=c.length;n<r;n++)if(c[n].obj===e.object){t=c[n];break}g(t.value,e.object,e.patches,""),e.patches.length&&y(t.value,e.patches);var o=e.patches;return o.length>0&&(e.patches=[],e.callback&&e.callback(o)),o}function g(e,n,o,i){for(var a=t(n),s=t(e),u=!1,c=s.length-1;c>=0;c--){var f=e[p=s[c]];if(n.hasOwnProperty(p)){var h=n[p];"object"==r(f)&&null!=f&&"object"==r(h)&&null!=h?g(f,h,o,i+"/"+l(p)):f!=h&&(!0,o.push({op:"replace",path:i+"/"+l(p),value:d(h)}))}else o.push({op:"remove",path:i+"/"+l(p)}),u=!0}if(u||a.length!=s.length)for(c=0;c<a.length;c++){var p=a[c];e.hasOwnProperty(p)||o.push({op:"add",path:i+"/"+l(p),value:d(n[p])})}}function v(e){for(var t,n=0,r=e.length;n<r;){if(!((t=e.charCodeAt(n))>=48&&t<=57))return!1;n++}return!0}function y(e,t,r){for(var i,a,l=!1,c=0,f=t.length;c<f;){i=t[c],c++;for(var h=(i.path||"").split("/"),d=e,p=1,g=h.length,y=void 0;;){if(a=h[p],r&&void 0===y&&(void 0===d[a]?y=h.slice(0,p).join("/"):p==g-1&&(y=i.path),void 0!==y&&this.validator(i,c-1,e,y)),p++,void 0===a&&p>=g){l=s[i.op].call(i,d,a,e);break}if(u(d)){if("-"===a)a=d.length;else{if(r&&!v(a))throw new m("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",c-1,i.path,i);a=parseInt(a,10)}if(p>=g){if(r&&"add"===i.op&&a>d.length)throw new m("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",c-1,i.path,i);l=o[i.op].call(i,d,a,e);break}}else if(a&&-1!=a.indexOf("~")&&(a=a.replace(/~1/g,"/").replace(/~0/g,"~")),p>=g){l=n[i.op].call(i,d,a,e);break}d=d[a]}}return l}e.unobserve=function(e,t){t.unobserve()},e.observe=function(e,t){var n,r=function(e){for(var t=0,n=c.length;t<n;t++)if(c[t].obj===e)return c[t]}(e);if(r?n=function(e,t){for(var n=0,r=e.observers.length;n<r;n++)if(e.observers[n].callback===t)return e.observers[n].observer}(r,t):(r=new f(e),c.push(r)),n)return n;if(n={},r.value=d(e),t){n.callback=t,n.next=null;var o=this.intervals||[100,1e3,1e4,6e4];if(void 0===o.push)throw new a("jsonpatch.intervals must be an array");var i=0,s=function(){p(n)},l=function(){clearTimeout(n.next),n.next=setTimeout(function(){s(),i=0,n.next=setTimeout(u,o[i++])},0)},u=function e(){s(),i==o.length&&(i=o.length-1),n.next=setTimeout(e,o[i++])};"undefined"!=typeof window&&(window.addEventListener?(window.addEventListener("mousedown",l),window.addEventListener("mouseup",l),window.addEventListener("keydown",l)):(document.documentElement.attachEvent("onmousedown",l),document.documentElement.attachEvent("onmouseup",l),document.documentElement.attachEvent("onkeydown",l))),n.next=setTimeout(u,o[i++])}return n.patches=[],n.object=e,n.unobserve=function(){p(n),clearTimeout(n.next),function(e,t){for(var n=0,r=e.observers.length;n<r;n++)if(e.observers[n].observer===t)return void e.observers.splice(n,1)}(r,n),0===r.observers.length&&c.splice(c.indexOf(r),1),"undefined"!=typeof window&&(window.removeEventListener?(window.removeEventListener("mousedown",l),window.removeEventListener("mouseup",l),window.removeEventListener("keydown",l)):(document.documentElement.detachEvent("onmousedown",l),document.documentElement.detachEvent("onmouseup",l),document.documentElement.detachEvent("onkeydown",l)))},r.observers.push(new h(t,n)),n},e.generate=p,u=Array.isArray?Array.isArray:function(e){return e.push&&"number"==typeof e.length},e.apply=y,e.compare=function(e,t){var n=[];return g(e,t,n,""),n};var m=function(e){function t(t,n,r,o,i){e.call(this,t),this.message=t,this.name=n,this.index=r,this.operation=o,this.tree=i}return i(t,e),t}(a);e.JsonPatchError=m,e.Error=m,e.validator=function(t,o,i,a){if("object"!==r(t)||null===t||u(t))throw new m("Operation is not an object","OPERATION_NOT_AN_OBJECT",o,t,i);if(!n[t.op])throw new m("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",o,t,i);if("string"!=typeof t.path)throw new m("Operation `path` property is not a string","OPERATION_PATH_INVALID",o,t,i);if(("move"===t.op||"copy"===t.op)&&"string"!=typeof t.from)throw new m("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",o,t,i);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&void 0===t.value)throw new m("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",o,t,i);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&function e(t){if(void 0===t)return!0;if("array"==typeof t||"object"==r(t))for(var n in t)if(e(t[n]))return!0;return!1}(t.value))throw new m("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",o,t,i);if(i)if("add"==t.op){var s=t.path.split("/").length,l=a.split("/").length;if(s!==l+1&&s!==l)throw new m("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",o,t,i)}else if("replace"===t.op||"remove"===t.op||"_get"===t.op){if(t.path!==a)throw new m("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",o,t,i)}else if("move"===t.op||"copy"===t.op){var c={op:"_get",path:t.from,value:void 0},f=e.validate([c],i);if(f&&"OPERATION_PATH_UNRESOLVABLE"===f.name)throw new m("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",o,t,i)}},e.validate=function(e,t){try{if(!u(e))throw new m("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)t=JSON.parse(JSON.stringify(t)),y.call(this,t,e,!0);else for(var n=0;n<e.length;n++)this.validator(e[n],n)}catch(e){if(e instanceof m)return e;throw e}}}(o||(o={})),t.apply=o.apply,t.observe=o.observe,t.unobserve=o.unobserve,t.generate=o.generate,t.compare=o.compare,t.validate=o.validate,t.validator=o.validator,t.JsonPatchError=o.JsonPatchError,t.Error=o.Error},function(e,t,n){"use strict";t.__esModule=!0,t.cleanPatches=function(e){var t=[],n=(0,r.arrayFilter)(e,function(e){return!/[/]length/gi.test(e.path)&&!!i(e.path)});return n=(0,r.arrayMap)(n,function(e){var t=i(e.path);return e.row=t.row,e.col=t.col,e}),n=(0,r.arrayFilter)(n,function(e){if(-1!==["add","remove"].indexOf(e.op)&&!isNaN(e.col)){if(-1!==t.indexOf(e.col))return!1;t.push(e.col)}return!0}),t.length=0,n},t.parsePath=i;var r=n(1);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(e){var t=e.match(/^\/(\d+)\/?(.*)?$/);if(!t)return null;var n=o(t,3),r=n[1],i=n[2];return{row:parseInt(r,10),col:/^\d*$/.test(i)?parseInt(i,10):i}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(7)),o=n(6),i=n(2),a=n(5),s=n(14);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e,t,n){return(h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g="htSearchResult",v=function(e,t,n,r,o){e.getCellMeta(t,n).isSearchResult=o},y=function(e,t){return!((0,s.isUndefined)(e)||null===e||!e.toLowerCase||0===e.length)&&(!(0,s.isUndefined)(t)&&null!==t&&-1!==t.toString().toLowerCase().indexOf(e.toLowerCase()))},m=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=f(this,d(t).call(this,e))).callback=v,n.queryMethod=y,n.searchResultClass=g,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(t,r.default),function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().search}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){var n=this.hot.getSettings().search;this.updatePluginSettings(n),this.addHook("beforeRenderer",function(){return e.onBeforeRenderer.apply(e,arguments)}),h(d(t.prototype),"enablePlugin",this).call(this)}}},{key:"disablePlugin",value:function(){var e=this,n=function(){return e.onBeforeRenderer.apply(e,arguments)};this.hot.addHook("beforeRenderer",n),this.hot.addHookOnce("afterRender",function(){e.hot.removeHook("beforeRenderer",n)}),h(d(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),h(d(t.prototype),"updatePlugin",this).call(this)}},{key:"query",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod(),o=this.hot.countRows(),i=this.hot.countCols(),s=[],l=this.hot;return(0,a.rangeEach)(0,o-1,function(o){(0,a.rangeEach)(0,i-1,function(i){var a=t.hot.getDataAtCell(o,i),u=t.hot.getCellMeta(o,i),c=u.search.callback||n,f=(u.search.queryMethod||r)(e,a);if(f){var h={row:o,col:i,data:a};s.push(h)}c&&c(l,o,i,a,f)})}),s}},{key:"getCallback",value:function(){return this.callback}},{key:"setCallback",value:function(e){this.callback=e}},{key:"getQueryMethod",value:function(){return this.queryMethod}},{key:"setQueryMethod",value:function(e){this.queryMethod=e}},{key:"getSearchResultClass",value:function(){return this.searchResultClass}},{key:"setSearchResultClass",value:function(e){this.searchResultClass=e}},{key:"updatePluginSettings",value:function(e){(0,i.isObject)(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}},{key:"onBeforeRenderer",value:function(e,t,n,r,o,i){var a,s=i.className||[],l=[];"string"==typeof s?l=s.split(" "):(a=l).push.apply(a,u(s));this.isEnabled()&&i.isSearchResult?l.includes(this.searchResultClass)||l.push("".concat(this.searchResultClass)):l.includes(this.searchResultClass)&&l.splice(l.indexOf(this.searchResultClass),1),i.className=l.join(" ")}},{key:"destroy",value:function(){h(d(t.prototype),"destroy",this).call(this)}}]),t}();(0,o.registerPlugin)("search",m);var w=m;t.default=w},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(n(7)),a=n(6),s=n(49);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e,t,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=c(this,h(t).call(this,e))).scrollbars=[],n.clones=[],n.lockedCollection=!1,n.freezeOverlays=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(t,i.default),function(e,t,n){t&&u(e.prototype,t),n&&u(e,n)}(t,[{key:"isEnabled",value:function(){return(0,s.isTouchSupported)()}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("afterRender",function(){return e.onAfterRender()}),this.registerEvents(),f(h(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.lockedCollection=!1,f(h(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){f(h(t.prototype),"disablePlugin",this).call(this)}},{key:"registerEvents",value:function(){var e=this;this.addHook("beforeTouchScroll",function(){return e.onBeforeTouchScroll()}),this.addHook("afterMomentumScroll",function(){return e.onAfterMomentumScroll()})}},{key:"onAfterRender",value:function(){if(!this.lockedCollection){var e=this.hot.view.wt.wtOverlays,t=e.topOverlay,n=e.bottomOverlay,r=e.leftOverlay,o=e.topLeftCornerOverlay,i=e.bottomLeftCornerOverlay;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(t),n.clone&&this.scrollbars.push(n),this.scrollbars.push(r),o&&this.scrollbars.push(o),i&&i.clone&&this.scrollbars.push(i),this.clones.length=0,t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),n.needFullRender&&this.clones.push(n.clone.wtTable.holder.parentNode),r.needFullRender&&this.clones.push(r.clone.wtTable.holder.parentNode),o&&this.clones.push(o.clone.wtTable.holder.parentNode),i&&i.clone&&this.clones.push(i.clone.wtTable.holder.parentNode)}}},{key:"onBeforeTouchScroll",value:function(){this.freezeOverlays=!0,(0,o.arrayEach)(this.clones,function(e){(0,r.addClass)(e,"hide-tween")})}},{key:"onAfterMomentumScroll",value:function(){var e=this;this.freezeOverlays=!1,(0,o.arrayEach)(this.clones,function(e){(0,r.removeClass)(e,"hide-tween"),(0,r.addClass)(e,"show-tween")}),setTimeout(function(){(0,o.arrayEach)(e.clones,function(e){(0,r.removeClass)(e,"show-tween")})},400),(0,o.arrayEach)(this.scrollbars,function(e){e.refresh(),e.resetFixedPosition()}),this.hot.view.wt.wtOverlays.syncScrollWithMaster()}}]),t}();(0,a.registerPlugin)("touchScroll",p);var g=p;t.default=g},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(23)),o=n(1),i=n(5),a=n(2),s=n(16),l=n(34);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),e}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,e.addHook("afterChange",function(e,n){e&&"UndoRedo.undo"!==n&&"UndoRedo.redo"!==n&&"MergeCells"!==n&&t.done(new y.ChangeAction(e))}),e.addHook("afterCreateRow",function(e,n,r){if("UndoRedo.undo"!==r&&"UndoRedo.undo"!==r&&"auto"!==r){var o=new y.CreateRowAction(e,n);t.done(o)}}),e.addHook("beforeRemoveRow",function(n,r,o,i){if("UndoRedo.undo"!==i&&"UndoRedo.redo"!==i&&"auto"!==i){var s=t.instance.getSourceDataArray(),l=(s.length+n)%s.length,u=e.toPhysicalRow(l),c=(0,a.deepClone)(s.slice(u,u+r));t.done(new y.RemoveRowAction(l,c))}}),e.addHook("afterCreateCol",function(e,n,r){"UndoRedo.undo"!==r&&"UndoRedo.redo"!==r&&"auto"!==r&&t.done(new y.CreateColumnAction(e,n))}),e.addHook("beforeRemoveCol",function(n,r,o,a){if("UndoRedo.undo"!==a&&"UndoRedo.redo"!==a&&"auto"!==a){var s=t.instance.getSourceDataArray(),l=(t.instance.countCols()+n)%t.instance.countCols(),u=[],c=[],f=[];(0,i.rangeEach)(s.length-1,function(t){var n=[],o=s[t];(0,i.rangeEach)(l,l+(r-1),function(t){n.push(o[e.runHooks("modifyCol",t)])}),u.push(n)}),(0,i.rangeEach)(r-1,function(t){f.push(e.runHooks("modifyCol",l+t))}),Array.isArray(e.getSettings().colHeaders)&&(0,i.rangeEach)(r-1,function(t){c.push(e.getSettings().colHeaders[e.runHooks("modifyCol",l+t)]||null)});var h=t.instance.getPlugin("manualColumnMove"),d=h.isEnabled()?h.columnsMapper.__arrayMap:[],p=new y.RemoveColumnAction(l,f,u,c,d);t.done(p)}}),e.addHook("beforeCellAlignment",function(e,n,r,o){var i=new y.CellAlignmentAction(e,n,r,o);t.done(i)}),e.addHook("beforeFilter",function(e){t.done(new y.FiltersAction(e))}),e.addHook("beforeRowMove",function(e,n){!1!==e&&t.done(new y.RowMoveAction(e,n))}),e.addHook("beforeMergeCells",function(n,r){r||t.done(new y.MergeCellsAction(e,n))}),e.addHook("afterUnmergeCells",function(n,r){r||t.done(new y.UnmergeCellsAction(e,n))})}y.prototype.done=function(e){this.ignoreNewActions||(this.doneActions.push(e),this.undoneActions.length=0)},y.prototype.undo=function(){if(this.isUndoAvailable()){var e=this.doneActions.pop(),t=(0,a.deepClone)(e),n=this.instance;if(!1===n.runHooks("beforeUndo",t))return;this.ignoreNewActions=!0;var r=this;e.undo(this.instance,function(){r.ignoreNewActions=!1,r.undoneActions.push(e)}),n.runHooks("afterUndo",t)}},y.prototype.redo=function(){if(this.isRedoAvailable()){var e=this.undoneActions.pop(),t=(0,a.deepClone)(e),n=this.instance;if(!1===n.runHooks("beforeRedo",t))return;this.ignoreNewActions=!0;var r=this;e.redo(this.instance,function(){r.ignoreNewActions=!1,r.doneActions.push(e)}),n.runHooks("afterRedo",t)}},y.prototype.isUndoAvailable=function(){return this.doneActions.length>0},y.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},y.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},y.Action=function(){},y.Action.prototype.undo=function(){},y.Action.prototype.redo=function(){},y.ChangeAction=function(e){this.changes=e,this.actionType="change"},(0,a.inherit)(y.ChangeAction,y.Action),y.ChangeAction.prototype.undo=function(e,t){for(var n=(0,a.deepClone)(this.changes),r=e.countEmptyRows(!0),o=e.countEmptyCols(!0),i=0,s=n.length;i<s;i++)n[i].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtRowProp(n,null,null,"UndoRedo.undo");for(var l=0,u=n.length;l<u;l++)e.getSettings().minSpareRows&&n[l][0]+1+e.getSettings().minSpareRows===e.countRows()&&r===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(n[l][0]+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&n[l][1]+1+e.getSettings().minSpareCols===e.countCols()&&o===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(n[l][1]+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())},y.ChangeAction.prototype.redo=function(e,t){for(var n=(0,a.deepClone)(this.changes),r=0,o=n.length;r<o;r++)n[r].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtRowProp(n,null,null,"UndoRedo.redo")},y.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},(0,a.inherit)(y.CreateRowAction,y.Action),y.CreateRowAction.prototype.undo=function(e,t){var n=e.countRows(),r=e.getSettings().minSpareRows;this.index>=n&&this.index-r<n&&(this.index-=r),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},y.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row",this.index,this.amount,"UndoRedo.redo")},y.RemoveRowAction=function(e,t){this.index=e,this.data=t,this.actionType="remove_row"},(0,a.inherit)(y.RemoveRowAction,y.Action),y.RemoveRowAction.prototype.undo=function(e,t){e.alter("insert_row",this.index,this.data.length,"UndoRedo.undo"),e.addHookOnce("afterRender",t),e.populateFromArray(this.index,0,this.data,void 0,void 0,"UndoRedo.undo")},y.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},y.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},(0,a.inherit)(y.CreateColumnAction,y.Action),y.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},y.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col",this.index,this.amount,"UndoRedo.redo")},y.RemoveColumnAction=function(e,t,n,r,o){this.index=e,this.indexes=t,this.data=n,this.amount=this.data[0].length,this.headers=r,this.columnPositions=o.slice(0),this.actionType="remove_col"},(0,a.inherit)(y.RemoveColumnAction,y.Action),y.RemoveColumnAction.prototype.undo=function(e,t){var n,r=this,a=this.indexes.slice(0).sort(),s=function(e,t,n){return n[r.indexes.indexOf(a[t])]},l=[];(0,i.rangeEach)(this.data.length-1,function(e){l[e]=(0,o.arrayMap)(r.data[e],s)});var u;u=(0,o.arrayMap)(this.headers,s);var c=[];e.runHooks("beforeCreateCol",this.indexes[0],this.indexes.length,"UndoRedo.undo"),(0,i.rangeEach)(this.data.length-1,function(t){n=e.getSourceDataAtRow(t),(0,i.rangeEach)(a.length-1,function(e){n.splice(a[e],0,l[t][e]),c.push([t,a[e],null,l[t][e]])})}),e.getPlugin("formulas")&&e.getPlugin("formulas").onAfterSetDataAtCell(c),void 0!==this.headers&&(0,i.rangeEach)(u.length-1,function(t){e.getSettings().colHeaders.splice(a[t],0,u[t])}),e.getPlugin("manualColumnMove")&&(e.getPlugin("manualColumnMove").columnsMapper.__arrayMap=this.columnPositions),e.addHookOnce("afterRender",t),e.runHooks("afterCreateCol",this.indexes[0],this.indexes.length,"UndoRedo.undo"),e.getPlugin("formulas")&&e.getPlugin("formulas").recalculateFull(),e.render()},y.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},y.CellAlignmentAction=function(e,t,n,r){this.stateBefore=e,this.range=t,this.type=n,this.alignment=r},y.CellAlignmentAction.prototype.undo=function(e,t){var n=this;(0,o.arrayEach)(this.range,function(t){for(var r=t.from,o=t.to,i=r.row;i<=o.row;i+=1)for(var a=r.col;a<=o.col;a+=1)e.setCellMeta(i,a,"className",n.stateBefore[i][a]||" htLeft")}),e.addHookOnce("afterRender",t),e.render()},y.CellAlignmentAction.prototype.redo=function(e,t){(0,l.align)(this.range,this.type,this.alignment,function(t,n){return e.getCellMeta(t,n)},function(t,n,r,o){return e.setCellMeta(t,n,r,o)}),e.addHookOnce("afterRender",t),e.render()},y.FiltersAction=function(e){this.conditionsStack=e,this.actionType="filter"},(0,a.inherit)(y.FiltersAction,y.Action),y.FiltersAction.prototype.undo=function(e,t){var n=e.getPlugin("filters");e.addHookOnce("afterRender",t),n.conditionCollection.importAllConditions(this.conditionsStack.slice(0,this.conditionsStack.length-1)),n.filter()},y.FiltersAction.prototype.redo=function(e,t){var n=e.getPlugin("filters");e.addHookOnce("afterRender",t),n.conditionCollection.importAllConditions(this.conditionsStack),n.filter()};var m=function(e){function t(e,n){var r;return c(this,t),(r=d(this,p(t).call(this))).cellRange=n,r.rangeData=e.getData(n.from.row,n.from.col,n.to.row,n.to.col),r}return g(t,y.Action),h(t,[{key:"undo",value:function(e,t){var n=e.getPlugin("mergeCells");e.addHookOnce("afterRender",t),n.unmergeRange(this.cellRange,!0),e.populateFromArray(this.cellRange.from.row,this.cellRange.from.col,this.rangeData,void 0,void 0,"MergeCells")}},{key:"redo",value:function(e,t){var n=e.getPlugin("mergeCells");e.addHookOnce("afterRender",t),n.mergeRange(this.cellRange)}}]),t}();y.MergeCellsAction=m;var w=function(e){function t(e,n){var r;return c(this,t),(r=d(this,p(t).call(this))).cellRange=n,r}return g(t,y.Action),h(t,[{key:"undo",value:function(e,t){var n=e.getPlugin("mergeCells");e.addHookOnce("afterRender",t),n.mergeRange(this.cellRange,!0)}},{key:"redo",value:function(e,t){var n=e.getPlugin("mergeCells");e.addHookOnce("afterRender",t),n.unmergeRange(this.cellRange,!0),e.render()}}]),t}();function b(){void 0===this.getSettings().undo||this.getSettings().undo?this.undoRedo||(this.undoRedo=new y(this),function(e){e.undo=function(){return e.undoRedo.undo()},e.redo=function(){return e.undoRedo.redo()},e.isUndoAvailable=function(){return e.undoRedo.isUndoAvailable()},e.isRedoAvailable=function(){return e.undoRedo.isRedoAvailable()},e.clearUndo=function(){return e.undoRedo.clear()}}(this),this.addHook("beforeKeyDown",C),this.addHook("afterChange",E)):this.undoRedo&&(delete this.undoRedo,function(e){delete e.undo,delete e.redo,delete e.isUndoAvailable,delete e.isRedoAvailable,delete e.clearUndo}(this),this.removeHook("beforeKeyDown",C),this.removeHook("afterChange",E))}function C(e){(e.ctrlKey||e.metaKey)&&!e.altKey&&(89===e.keyCode||e.shiftKey&&90===e.keyCode?(this.undoRedo.redo(),(0,s.stopImmediatePropagation)(e)):90===e.keyCode&&(this.undoRedo.undo(),(0,s.stopImmediatePropagation)(e)))}function E(e,t){if("loadData"===t)return this.undoRedo.clear()}y.UnmergeCellsAction=w,y.RowMoveAction=function(e,t){this.rows=e.slice(),this.target=t},(0,a.inherit)(y.RowMoveAction,y.Action),y.RowMoveAction.prototype.undo=function(e,t){var n=e.getPlugin("manualRowMove");e.addHookOnce("afterRender",t);for(var r=this.rows[0]<this.target?-1*this.rows.length:0,o=this.rows[0]>this.target?this.rows[0]+this.rows.length:this.rows[0],i=[],a=this.rows.length+r,s=r;s<a;s+=1)i.push(this.target+s);n.moveRows(i.slice(),o),e.render(),e.selectCell(this.rows[0],0,this.rows[this.rows.length-1],e.countCols()-1,!1,!1)},y.RowMoveAction.prototype.redo=function(e,t){var n=e.getPlugin("manualRowMove");e.addHookOnce("afterRender",t),n.moveRows(this.rows.slice(),this.target),e.render();var r=this.rows[0]<this.target?this.target-this.rows.length:this.target;e.selectCell(r,0,r+this.rows.length-1,e.countCols()-1,!1,!1)};var O=r.default.getSingleton();O.add("afterInit",b),O.add("afterUpdateSettings",b),O.register("beforeUndo"),O.register("afterUndo"),O.register("beforeRedo"),O.register("afterRedo");var S=y;t.default=S},function(e,t,n){"use strict";t.__esModule=!0;var r=m(n(777));t.BindRowsWithHeaders=r.default;var o=m(n(782));t.CollapsibleColumns=o.default;var i=m(n(783));t.ColumnSummary=i.default;var a=m(n(785));t.DropdownMenu=a.default;var s=m(n(787));t.ExportFile=s.default;var l=m(n(792));t.MultiColumnSorting=l.default;var u=m(n(797));t.Filters=u.default;var c=m(n(826));t.Formulas=c.default;var f=m(n(839));t.GanttChart=f.default;var h=m(n(843));t.HeaderTooltips=h.default;var d=m(n(844));t.NestedHeaders=d.default;var p=m(n(847));t.NestedRows=p.default;var g=m(n(852));t.HiddenColumns=g.default;var v=m(n(856));t.HiddenRows=v.default;var y=m(n(860));function m(e){return e&&e.__esModule?e:{default:e}}t.TrimRows=y.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(7)),o=n(5),i=n(6),a=s(n(778));function s(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e,t,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=c(this,h(t).call(this,e))).bindStrategy=new a.default,n.removedRows=[],n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(t,r.default),function(e,t,n){t&&u(e.prototype,t),n&&u(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().bindRowsWithHeaders}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){var n=this.hot.getSettings().bindRowsWithHeaders;"string"!=typeof n&&(n=a.default.DEFAULT_STRATEGY),this.bindStrategy.setStrategy(n),this.bindStrategy.createMap(this.hot.countSourceRows()),this.addHook("modifyRowHeader",function(t){return e.onModifyRowHeader(t)}),this.addHook("afterCreateRow",function(t,n){return e.onAfterCreateRow(t,n)}),this.addHook("beforeRemoveRow",function(t,n){return e.onBeforeRemoveRow(t,n)}),this.addHook("afterRemoveRow",function(){return e.onAfterRemoveRow()}),this.addHook("afterLoadData",function(t){return e.onAfterLoadData(t)}),f(h(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){f(h(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.removedRows.length=0,this.bindStrategy.clearMap(),f(h(t.prototype),"disablePlugin",this).call(this)}},{key:"onModifyRowHeader",value:function(e){return this.bindStrategy.translate(this.hot.runHooks("modifyRow",e))}},{key:"onAfterCreateRow",value:function(e,t){this.bindStrategy.createRow(e,t)}},{key:"onBeforeRemoveRow",value:function(e,t){var n=this;this.removedRows.length=0,!1!==e&&(0,o.rangeEach)(e,e+t-1,function(e){n.removedRows.push(n.hot.runHooks("modifyRow",e))})}},{key:"onAfterRemoveRow",value:function(){this.bindStrategy.removeRow(this.removedRows)}},{key:"onAfterLoadData",value:function(e){e||this.bindStrategy.createMap(this.hot.countSourceRows())}},{key:"destroy",value:function(){this.bindStrategy.destroy(),f(h(t.prototype),"destroy",this).call(this)}}]),t}();(0,i.registerPlugin)("bindRowsWithHeaders",p);var g=p;t.default=g},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(5),o=n(42),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(779));function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}var l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.strategy=null}return s(e,null,[{key:"DEFAULT_STRATEGY",get:function(){return"loose"}}]),s(e,[{key:"setStrategy",value:function(e){var t=i[(0,o.toUpperCaseFirst)(e)];if(!t)throw new Error('Bind strategy "'.concat(e,'" does not exist.'));this.strategy=new t}},{key:"createMap",value:function(e){var t=this.strategy,n=void 0===e?t._arrayMap.length:e;t._arrayMap.length=0,(0,r.rangeEach)(n-1,function(e){t._arrayMap.push(e)})}},{key:"createRow",value:function(){var e;(e=this.strategy).createRow.apply(e,arguments)}},{key:"removeRow",value:function(){var e;(e=this.strategy).removeRow.apply(e,arguments)}},{key:"translate",value:function(){var e;return(e=this.strategy).getValueByIndex.apply(e,arguments)}},{key:"clearMap",value:function(){this.strategy.clearMap()}},{key:"destroy",value:function(){this.strategy&&this.strategy.destroy(),this.strategy=null}}]),e}();t.default=l},function(e,t,n){"use strict";t.__esModule=!0;var r=i(n(780));t.Loose=r.default;var o=i(n(781));function i(e){return e&&e.__esModule?e:{default:e}}t.Strict=o.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(76)),o=n(2);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(e,[{key:"createRow",value:function(e,t){this.shiftItems(e,t)}},{key:"removeRow",value:function(e,t){this.unshiftItems(e,t)}},{key:"destroy",value:function(){this._arrayMap=null}}],[{key:"STRATEGY_NAME",get:function(){return"loose"}}]),e}();(0,o.mixin)(a,r.default);var s=a;t.default=s},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(76)),o=n(2);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(e,[{key:"createRow",value:function(e,t){this.insertItems(e,t)}},{key:"removeRow",value:function(e,t){this.removeItems(e,t)}},{key:"destroy",value:function(){this._arrayMap=null}}],[{key:"STRATEGY_NAME",get:function(){return"strict"}}]),e}();(0,o.mixin)(a,r.default);var s=a;t.default=s},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(2),o=n(1),i=n(5),a=n(33),s=n(3),l=h(n(10)),u=n(6),c=n(16),f=h(n(7));function h(e){return e&&e.__esModule?e:{default:e}}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e,t,n){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var w=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=g(this,y(t).call(this,e))).settings=null,n.buttonEnabledList={},n.hiddenColumnsPlugin=null,n.nestedHeadersPlugin=null,n.collapsedSections={},n.columnHeaderLevelCount=null,n.eventManager=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(t,f.default),function(e,t,n){t&&p(e.prototype,t),n&&p(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().collapsibleColumns}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.settings=this.hot.getSettings().collapsibleColumns,"boolean"!=typeof this.settings&&this.parseSettings(),this.hiddenColumnsPlugin=this.hot.getPlugin("hiddenColumns"),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.checkDependencies(),this.addHook("afterRender",function(){return e.onAfterRender()}),this.addHook("afterInit",function(){return e.onAfterInit()}),this.addHook("afterGetColHeader",function(t,n){return e.onAfterGetColHeader(t,n)}),this.addHook("beforeOnCellMouseDown",function(t,n,r){return e.onBeforeOnCellMouseDown(t,n,r)}),this.eventManager=new l.default(this.hot),v(y(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.settings=null,this.buttonEnabledList={},this.hiddenColumnsPlugin=null,this.collapsedSections={},this.clearButtons(),v(y(t.prototype),"disablePlugin",this).call(this)}},{key:"clearButtons",value:function(){if(this.hot.view){var e=this.hot.view.wt.getSetting("columnHeaders").length,t=this.hot.view.wt.wtTable.THEAD,n=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.THEAD,r=this.hot.view.wt.wtOverlays.topLeftCornerOverlay?this.hot.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.THEAD:null,o=function(e){e&&e.parentNode.removeChild(e)};(0,i.rangeEach)(0,e-1,function(e){var a=t.childNodes[e],s=n.childNodes[e],l=r?r.childNodes[e]:null;(0,i.rangeEach)(0,a.childNodes.length-1,function(e){var t=a.childNodes[e].querySelector(".collapsibleIndicator");o(t),s&&s.childNodes[e]&&(t=s.childNodes[e].querySelector(".collapsibleIndicator"),o(t)),r&&l&&l.childNodes[e]&&(t=l.childNodes[e].querySelector(".collapsibleIndicator"),o(t))})},!0)}}},{key:"parseSettings",value:function(){var e=this;(0,r.objectEach)(this.settings,function(t){e.buttonEnabledList[t.row]||(e.buttonEnabledList[t.row]={}),e.buttonEnabledList[t.row][t.col]=t.collapsible})}},{key:"meetsDependencies",value:function(){var e=this.hot.getSettings();return e.nestedHeaders&&e.hiddenColumns}},{key:"checkDependencies",value:function(){var e=this.hot.getSettings();this.meetsDependencies()||(e.nestedHeaders||(0,a.warn)("You need to configure the Nested Headers plugin in order to use collapsible headers."),e.hiddenColumns||(0,a.warn)("You need to configure the Hidden Columns plugin in order to use collapsible headers."))}},{key:"generateIndicator",value:function(e,t){var n=t.parentNode,r=n.parentNode,o=-1*r.childNodes.length+Array.prototype.indexOf.call(r.childNodes,n);if(Object.keys(this.buttonEnabledList).length>0&&(!this.buttonEnabledList[o]||!this.buttonEnabledList[o][e]))return null;var i=document.createElement("DIV");return(0,s.addClass)(i,"collapsibleIndicator"),this.collapsedSections[o]&&!0===this.collapsedSections[o][e]?((0,s.addClass)(i,"collapsed"),(0,s.fastInnerText)(i,"+")):((0,s.addClass)(i,"expanded"),(0,s.fastInnerText)(i,"-")),i}},{key:"markSectionAs",value:function(e,t,n,r){switch(this.collapsedSections[t]||(this.collapsedSections[t]={}),e){case"collapsed":this.collapsedSections[t][n]=!0;break;case"expanded":this.collapsedSections[t][n]=void 0}if(r)for(var o=this.nestedHeadersPlugin.colspanArray,i=this.nestedHeadersPlugin.rowCoordsToLevel(t),a=this.nestedHeadersPlugin.getChildHeaders(t,n),s=o[i+1],l=1;l<a.length;l++)s&&s[a[l]].colspan>1&&this.markSectionAs(e,t+1,a[l],!0)}},{key:"expandSection",value:function(e){this.markSectionAs("expanded",e.row,e.col,!0),this.toggleCollapsibleSection(e,"expand")}},{key:"collapseSection",value:function(e){this.markSectionAs("collapsed",e.row,e.col,!0),this.toggleCollapsibleSection(e,"collapse")}},{key:"toggleAllCollapsibleSections",value:function(e){var t=this,n=this.nestedHeadersPlugin.colspanArray;!0===this.settings?(0,o.arrayEach)(n,function(n,r){(0,o.arrayEach)(n,function(n,o){if(n.colspan>1){var i=t.nestedHeadersPlugin.levelToRowCoords(parseInt(r,10)),a=parseInt(o,10);t.markSectionAs("collapse"===e?"collapsed":"expanded",i,a,!0),t.toggleCollapsibleSection({row:i,col:a},e)}})}):(0,r.objectEach)(this.buttonEnabledList,function(n,o){(0,r.objectEach)(n,function(n,r){var i=parseInt(o,10),a=parseInt(r,10);t.markSectionAs("collapse"===e?"collapsed":"expanded",i,a,!0),t.toggleCollapsibleSection({row:i,col:a},e)})})}},{key:"collapseAll",value:function(){this.toggleAllCollapsibleSections("collapse")}},{key:"expandAll",value:function(){this.toggleAllCollapsibleSections("expand")}},{key:"toggleCollapsibleSection",value:function(e,t){var n=this;e.row&&(e.row=parseInt(e.row,10)),e.col&&(e.col=parseInt(e.col,10));for(var r=this.hiddenColumnsPlugin.hiddenColumns,o=this.nestedHeadersPlugin.colspanArray,a=this.nestedHeadersPlugin.rowCoordsToLevel(e.row),s=o[a][e.col].colspan,l=this.nestedHeadersPlugin.getChildHeaders(e.row,e.col),u=a+1,c=o[u],f=c&&c[l[0]].colspan||1;f===s&&u<this.columnHeaderLevelCount;)f=(c=o[u+=1])&&c[l[0]].colspan||1;(0,i.rangeEach)(f,s-1,function(o){var i=e.col+o;switch(t){case"collapse":n.hiddenColumnsPlugin.isHidden(i)||r.push(i);break;case"expand":n.hiddenColumnsPlugin.isHidden(i)&&r.splice(r.indexOf(i),1)}}),this.hot.render(),this.hot.view.wt.wtOverlays.adjustElementsSize(!0)}},{key:"onAfterGetColHeader",value:function(e,t){if(t.hasAttribute("colspan")&&t.getAttribute("colspan")>1&&e>=this.hot.getSettings().fixedColumnsLeft){var n=this.generateIndicator(e,t);null!==n&&t.querySelector("div:first-child").appendChild(n)}}},{key:"onBeforeOnCellMouseDown",value:function(e,t){if((0,s.hasClass)(e.target,"collapsibleIndicator"))return(0,s.hasClass)(e.target,"expanded")?(this.collapsedSections[t.row]||(this.collapsedSections[t.row]=[]),this.markSectionAs("collapsed",t.row,t.col,!0),this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection(t,"collapse")):(0,s.hasClass)(e.target,"collapsed")&&(this.markSectionAs("expanded",t.row,t.col,!0),this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection(t,"expand")),(0,c.stopImmediatePropagation)(e),!1}},{key:"onAfterInit",value:function(){this.columnHeaderLevelCount=this.hot.view.wt.getSetting("columnHeaders").length}},{key:"onAfterRender",value:function(){this.nestedHeadersPlugin.enabled&&this.hiddenColumnsPlugin.enabled||this.disablePlugin()}},{key:"destroy",value:function(){this.settings=null,this.buttonEnabledList=null,this.hiddenColumnsPlugin=null,this.nestedHeadersPlugin=null,this.collapsedSections=null,this.columnHeaderLevelCount=null,v(y(t.prototype),"destroy",this).call(this)}}]),t}();(0,u.registerPlugin)("collapsibleColumns",w);var b=w;t.default=b},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(7)),o=n(2),i=n(6),a=s(n(784));function s(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e,t,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=c(this,h(t).call(this,e))).endpoints=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(t,r.default),function(e,t,n){t&&u(e.prototype,t),n&&u(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().columnSummary}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.settings=this.hot.getSettings().columnSummary,this.endpoints=new a.default(this,this.settings),this.addHook("afterInit",function(){return e.onAfterInit.apply(e,arguments)}),this.addHook("afterChange",function(){return e.onAfterChange.apply(e,arguments)}),this.addHook("beforeCreateRow",function(t,n,r){return e.endpoints.resetSetupBeforeStructureAlteration("insert_row",t,n,null,r)}),this.addHook("beforeCreateCol",function(t,n,r){return e.endpoints.resetSetupBeforeStructureAlteration("insert_col",t,n,null,r)}),this.addHook("beforeRemoveRow",function(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.endpoints).resetSetupBeforeStructureAlteration.apply(t,["remove_row"].concat(r))}),this.addHook("beforeRemoveCol",function(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.endpoints).resetSetupBeforeStructureAlteration.apply(t,["remove_col"].concat(r))}),this.addHook("beforeRowMove",function(){return e.onBeforeRowMove.apply(e,arguments)}),this.addHook("afterCreateRow",function(t,n,r){return e.endpoints.resetSetupAfterStructureAlteration("insert_row",t,n,null,r)}),this.addHook("afterCreateCol",function(t,n,r){return e.endpoints.resetSetupAfterStructureAlteration("insert_col",t,n,null,r)}),this.addHook("afterRemoveRow",function(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.endpoints).resetSetupAfterStructureAlteration.apply(t,["remove_row"].concat(r))}),this.addHook("afterRemoveCol",function(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.endpoints).resetSetupAfterStructureAlteration.apply(t,["remove_col"].concat(r))}),this.addHook("afterRowMove",function(){return e.onAfterRowMove.apply(e,arguments)}),f(h(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.endpoints=null,this.settings=null,this.currentEndpoint=null}},{key:"calculate",value:function(e){switch(e.type.toLowerCase()){case"sum":e.result=this.calculateSum(e);break;case"min":case"max":e.result=this.calculateMinMax(e,e.type);break;case"count":e.result=this.countEntries(e);break;case"average":e.result=this.calculateAverage(e);break;case"custom":e.result=e.customFunction.call(this,e)}}},{key:"calculateSum",value:function(e){var t=this,n=0;return(0,o.objectEach)(e.ranges,function(r){n+=t.getPartialSum(r,e.sourceColumn)}),n}},{key:"getPartialSum",value:function(e,t){var n=0,r=e[1]||e[0],o=null,i=0;do{o=this.getCellValue(r,t)||0;var a=("".concat(o).split(".")[1]||[]).length||1;a>i&&(i=a),n+=o||0,r-=1}while(r>=e[0]);return Math.round(n*Math.pow(10,i))/Math.pow(10,i)}},{key:"calculateMinMax",value:function(e,t){var n=this,r=null;return(0,o.objectEach)(e.ranges,function(o){var i=n.getPartialMinMax(o,e.sourceColumn,t);if(null===r&&null!==i&&(r=i),null!==i)switch(t){case"min":r=Math.min(r,i);break;case"max":r=Math.max(r,i)}}),null===r?"Not enough data":r}},{key:"getPartialMinMax",value:function(e,t,n){var r,o=null,i=e[1]||e[0];do{if(r=this.getCellValue(i,t)||null,null===o)o=r;else if(null!==r)switch(n){case"min":o=Math.min(o,r);break;case"max":o=Math.max(o,r)}i-=1}while(i>=e[0]);return o}},{key:"countEmpty",value:function(e,t){var n=0,r=e[1]||e[0];do{this.getCellValue(r,t)||(n+=1),r-=1}while(r>=e[0]);return n}},{key:"countEntries",value:function(e){var t=this,n=0,r=e.ranges;return(0,o.objectEach)(r,function(r){var o=void 0===r[1]?1:r[1]-r[0]+1,i=t.countEmpty(r,e.sourceColumn);n+=o,n-=i}),n}},{key:"calculateAverage",value:function(e){return this.calculateSum(e)/this.countEntries(e)}},{key:"getCellValue",value:function(e,t){var n=this.endpoints.getVisualRowIndex(e),r=this.endpoints.getVisualColumnIndex(t),o=this.hot.getSourceDataAtCell(e,t);if((this.hot.getCellMeta(n,r).className||"").indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof o&&(o=o.replace(/,/,".")),o=parseFloat(o)),isNaN(o)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error("ColumnSummary plugin: cell at (".concat(e,", ").concat(t,") is not in a numeric format. Cannot do the calculation."));return o}},{key:"onAfterInit",value:function(){this.endpoints.endpoints=this.endpoints.parseSettings(),this.endpoints.refreshAllEndpoints(!0)}},{key:"onAfterChange",value:function(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}},{key:"onBeforeRowMove",value:function(e){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName)}},{key:"onAfterRowMove",value:function(e,t){this.endpoints.resetSetupAfterStructureAlteration("move_row",t,e.length,e,this.pluginName)}}]),t}();(0,i.registerPlugin)("columnSummary",p);var g=p;t.default=g},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1),o=n(33),i=n(75);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.plugin=t,this.hot=this.plugin.hot,this.endpoints=[],this.settings=n,this.settingsType="array",this.currentEndpoint=null,this.cellsToSetCache=[],this.recordTranslator=(0,i.getTranslator)(this.hot)}return function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(e,[{key:"getEndpoint",value:function(e){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}},{key:"getAllEndpoints",value:function(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}},{key:"fillMissingEndpointData",value:function(e){return this.parseSettings(e.call(this))}},{key:"parseSettings",value:function(e){var t=this,n=[],o=e;if(o||"function"!=typeof this.settings)return o||(o=this.settings),(0,r.arrayEach)(o,function(e){var r={};t.assignSetting(e,r,"ranges",[[0,t.hot.countRows()-1]]),t.assignSetting(e,r,"reversedRowCoords",!1),t.assignSetting(e,r,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),t.assignSetting(e,r,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),t.assignSetting(e,r,"sourceColumn",e.destinationColumn),t.assignSetting(e,r,"type","sum"),t.assignSetting(e,r,"forceNumeric",!1),t.assignSetting(e,r,"suppressDataTypeErrors",!0),t.assignSetting(e,r,"suppressDataTypeErrors",!0),t.assignSetting(e,r,"customFunction",null),t.assignSetting(e,r,"readOnly",!0),t.assignSetting(e,r,"roundFloat",!1),n.push(r)}),n;this.settingsType="function"}},{key:"assignSetting",value:function(e,t,n,r){if("ranges"!==n||void 0!==e[n]){if("ranges"!==n||0!==e[n].length)if(void 0===e[n]){if(r instanceof Error)throw r;t[n]=r}else"destinationRow"===n&&t.reversedRowCoords?t[n]=this.hot.countRows()-e[n]-1:t[n]=e[n]}else t[n]=r}},{key:"resetSetupBeforeStructureAlteration",value:function(e,t,n){if("function"===this.settingsType){var o=e.indexOf("row")>-1?"row":"col",i=this.getAllEndpoints();(0,r.arrayEach)(i,function(r){"row"===o&&r.destinationRow>=t&&("insert_row"===e?r.alterRowOffset=n:"remove_row"===e&&(r.alterRowOffset=-1*n)),"col"===o&&r.destinationColumn>=t&&("insert_col"===e?r.alterColumnOffset=n:"remove_col"===e&&(r.alterColumnOffset=-1*n))}),this.resetAllEndpoints(i,!1)}}},{key:"resetSetupAfterStructureAlteration",value:function(e,t,n,o,i){var a=this,s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"!==this.settingsType){var l=e.indexOf("row")>-1?"row":"col",u=e.indexOf("remove")>-1?-1:1,c=this.getAllEndpoints(),f=0===e.indexOf("move_row"),h=t;(0,r.arrayEach)(c,function(e){"row"===l&&e.destinationRow>=h&&(e.alterRowOffset=u*n),"col"===l&&e.destinationColumn>=h&&(e.alterColumnOffset=u*n)}),this.resetAllEndpoints(c,!f),f?(0,r.arrayEach)(c,function(e){a.extendEndpointRanges(e,h,o[0],o.length),a.recreatePhysicalRanges(e),a.clearOffsetInformation(e)}):(0,r.arrayEach)(c,function(e){a.shiftEndpointCoordinates(e,h)}),s&&this.refreshAllEndpoints()}else{this.hot.addHookOnce("beforeRender",function e(){return a.hot.removeHook("beforeRender",e),a.refreshAllEndpoints()})}}},{key:"clearOffsetInformation",value:function(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}},{key:"extendEndpointRanges",value:function(e,t,n,o){(0,r.arrayEach)(e.ranges,function(e){e[1]&&(t>=e[0]&&t<=e[1]?n>e[1]?e[1]+=o:n<e[0]&&(e[0]-=o):n>=e[0]&&n<=e[1]&&(e[1]-=o,t<=e[0]&&(e[0]+=1,e[1]+=1)))})}},{key:"recreatePhysicalRanges",value:function(e){var t=this,n=e.ranges,o=[],i=[];(0,r.arrayEach)(n,function(e){var n=[];if(e[1])for(var r=e[0];r<=e[1];r++)n.push(t.recordTranslator.toPhysicalRow(r));else n.push(t.recordTranslator.toPhysicalRow(e[0]));i.push(n)}),(0,r.arrayEach)(i,function(e){var t=[];(0,r.arrayEach)(e,function(n,r){0===r?t.push(n):e[r]!==e[r-1]+1&&(t.push(e[r-1]),o.push(t),(t=[]).push(n)),r===e.length-1&&(t.push(n),o.push(t))})}),e.ranges=o}},{key:"shiftEndpointCoordinates",value:function(e,t){e.alterRowOffset&&0!==e.alterRowOffset?(e.destinationRow+=e.alterRowOffset||0,(0,r.arrayEach)(e.ranges,function(n){(0,r.arrayEach)(n,function(r,o){r>=t&&(n[o]+=e.alterRowOffset||0)})})):e.alterColumnOffset&&0!==e.alterColumnOffset&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}},{key:"resetAllEndpoints",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=e;this.cellsToSetCache=[],o||(o=this.getAllEndpoints()),(0,r.arrayEach)(o,function(e){t.resetEndpointValue(e,n)}),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}},{key:"refreshAllEndpoints",value:function(){var e=this;this.cellsToSetCache=[],(0,r.arrayEach)(this.getAllEndpoints(),function(t){e.currentEndpoint=t,e.plugin.calculate(t),e.setEndpointValue(t,"init")}),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}},{key:"refreshChangedEndpoints",value:function(e){var t=this,n=[];this.cellsToSetCache=[],(0,r.arrayEach)(e,function(e,o,i){"".concat(e[2]||"")!=="".concat(e[3])&&(0,r.arrayEach)(t.getAllEndpoints(),function(e,r){t.hot.propToCol(i[o][1])===e.sourceColumn&&-1===n.indexOf(r)&&n.push(r)})}),(0,r.arrayEach)(n,function(e){t.refreshEndpoint(t.getEndpoint(e))}),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}},{key:"refreshEndpoint",value:function(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}},{key:"resetEndpointValue",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.alterRowOffset||0,r=e.alterColumnOffset||0,o=a(this.recordTranslator.toVisual(e.destinationRow,e.destinationColumn),2),i=o[0],s=o[1],l=this.hot.getCellMeta(i,s);l.readOnly=!1,l.className="",this.cellsToSetCache.push([this.recordTranslator.toVisualRow(e.destinationRow+(t?n:0)),this.recordTranslator.toVisualColumn(e.destinationColumn+(t?r:0)),""])}},{key:"setEndpointValue",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1*e.alterRowOffset||0,o=-1*e.alterColumnOffset||0,i=this.getVisualRowIndex(e.destinationRow),a=this.hot.getCellMeta(this.getVisualRowIndex(e.destinationRow+r),e.destinationColumn+o);i>this.hot.countRows()||e.destinationColumn>this.hot.countCols()?this.throwOutOfBoundsWarning():("init"!==t&&a.readOnly===e.readOnly||(a.readOnly=e.readOnly,a.className="columnSummaryResult"),e.roundFloat&&!isNaN(e.result)&&(e.result=e.result.toFixed(e.roundFloat)),n?this.hot.setDataAtCell(i,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([i,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0)}},{key:"getVisualRowIndex",value:function(e){return this.hot.runHooks("unmodifyRow",e,"columnSummary")}},{key:"getVisualColumnIndex",value:function(e){return this.hot.runHooks("unmodifyCol",e,"columnSummary")}},{key:"throwOutOfBoundsWarning",value:function(){(0,o.warn)("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}}]),e}();t.default=l},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=p(n(7)),o=n(1),i=p(n(450)),a=p(n(10)),s=n(3),l=p(n(451)),u=p(n(140)),c=n(6),f=p(n(23)),h=n(16),d=n(56);function p(e){return e&&e.__esModule?e:{default:e}}function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t,n){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),e}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(786),f.default.getSingleton().register("afterDropdownMenuDefaultOptions"),f.default.getSingleton().register("beforeDropdownMenuShow"),f.default.getSingleton().register("afterDropdownMenuShow"),f.default.getSingleton().register("afterDropdownMenuHide"),f.default.getSingleton().register("afterDropdownMenuExecute");var E=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?C(e):t}(this,y(t).call(this,e))).eventManager=new a.default(C(C(n))),n.commandExecutor=new i.default(n.hot),n.itemsFactory=null,n.menu=null,n.hot.addHook("afterGetColHeader",function(e,t){return n.onAfterGetColHeader(e,t)}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(t,r.default),w(t,null,[{key:"DEFAULT_ITEMS",get:function(){return[d.COLUMN_LEFT,d.COLUMN_RIGHT,d.SEPARATOR,d.REMOVE_COLUMN,d.SEPARATOR,d.CLEAR_COLUMN,d.SEPARATOR,d.READ_ONLY,d.SEPARATOR,d.ALIGNMENT]}}]),w(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().dropdownMenu}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){this.itemsFactory=new l.default(this.hot,t.DEFAULT_ITEMS);var n=this.hot.getSettings().dropdownMenu,r={items:this.itemsFactory.getItems(n)};this.registerEvents(),"function"==typeof n.callback&&this.commandExecutor.setCommonCallback(n.callback),v(y(t.prototype),"enablePlugin",this).call(this),this.callOnPluginsReady(function(){e.hot.runHooks("afterDropdownMenuDefaultOptions",r),e.itemsFactory.setPredefinedItems(r.items);var t=e.itemsFactory.getItems(n);e.menu&&e.menu.destroy(),e.menu=new u.default(e.hot,{className:"htDropdownMenu",keepInViewport:!0}),e.hot.runHooks("beforeDropdownMenuSetItems",t),e.menu.setMenuItems(t),e.menu.addLocalHook("beforeOpen",function(){return e.onMenuBeforeOpen()}),e.menu.addLocalHook("afterOpen",function(){return e.onMenuAfterOpen()}),e.menu.addLocalHook("afterClose",function(){return e.onMenuAfterClose()}),e.menu.addLocalHook("executeCommand",function(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.executeCommand).call.apply(t,[e].concat(r))}),(0,o.arrayEach)(t,function(t){return e.commandExecutor.registerCommand(t.key,t)})})}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),v(y(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.close(),this.menu&&this.menu.destroy(),v(y(t.prototype),"disablePlugin",this).call(this)}},{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(this.hot.rootElement,"click",function(t){return e.onTableClick(t)})}},{key:"open",value:function(e){this.menu&&(this.menu.open(),e.width&&this.menu.setOffset("left",e.width),this.menu.setPosition(e),this.menu.hotMenu.isHotTableEnv=this.hot.isHotTableEnv)}},{key:"close",value:function(){this.menu&&this.menu.close()}},{key:"executeCommand",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=this.commandExecutor).execute.apply(t,[e].concat(r))}},{key:"setListening",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}},{key:"onTableClick",value:function(e){if((0,h.stopPropagation)(e),(0,s.hasClass)(e.target,"changeType")&&!this.menu.isOpened()){var t=e.target.getBoundingClientRect();this.open({left:t.left,top:t.top+e.target.offsetHeight+3,width:t.width,height:t.height})}}},{key:"onAfterGetColHeader",value:function(e,t){var n=t.parentNode;if(n){var r=n.parentNode.childNodes,o=Array.prototype.indexOf.call(r,n);if(!(e<0||o!==r.length-1)){var i=t.querySelector(".".concat("changeType"));if(!this.enabled||!i)if(this.enabled){var a=document.createElement("button");a.className="changeType",a.onclick=function(){return!1},t.firstChild.insertBefore(a,t.firstChild.firstChild)}else i&&i.parentNode.removeChild(i)}}}},{key:"onMenuBeforeOpen",value:function(){this.hot.runHooks("beforeDropdownMenuShow",this)}},{key:"onMenuAfterOpen",value:function(){this.hot.runHooks("afterDropdownMenuShow",this)}},{key:"onMenuAfterClose",value:function(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}},{key:"destroy",value:function(){this.close(),this.menu&&this.menu.destroy(),v(y(t.prototype),"destroy",this).call(this)}}]),t}();E.SEPARATOR={name:d.SEPARATOR},(0,c.registerPlugin)("dropdownMenu",E);var O=E;t.default=O},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(7)),o=n(6),i=s(n(788)),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(789));function s(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),c(this,f(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(t,r.default),function(e,t,n){t&&u(e.prototype,t),n&&u(e,n)}(t,[{key:"isEnabled",value:function(){return!0}},{key:"exportAsString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(e,t).export()}},{key:"exportAsBlob",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(e,t))}},{key:"downloadFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._createTypeFormatter(e,t),r=this._createBlob(n),o=window.URL||window.webkitURL,i=document.createElement("a"),a="".concat(n.options.filename,".").concat(n.options.fileExtension);if(void 0!==i.download){var s=o.createObjectURL(r);i.style.display="none",i.setAttribute("href",s),i.setAttribute("download",a),document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click")),document.body.removeChild(i),setTimeout(function(){o.revokeObjectURL(s)},100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(r,a)}},{key:"_createTypeFormatter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!a.EXPORT_TYPES[e])throw new Error('Export format type "'.concat(e,'" is not supported.'));return(0,a.default)(e,new i.default(this.hot),t)}},{key:"_createBlob",value:function(e){var t=null;return"undefined"!=typeof Blob&&(t=new Blob([e.export()],{type:"".concat(e.options.mimeType,";charset=").concat(e.options.encoding)})),t}}]),t}();(0,o.registerPlugin)("exportFile",d);var p=d;t.default=p},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(5);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this.options={}}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(e,[{key:"setOptions",value:function(e){this.options=e}},{key:"getData",value:function(){var e=this,t=this._getDataRange(),n=t.startRow,o=t.startCol,i=t.endRow,a=t.endCol,s=this.options,l=[];return(0,r.rangeEach)(n,i,function(t){var n=[];!s.exportHiddenRows&&e._isHiddenRow(t)||((0,r.rangeEach)(o,a,function(r){!s.exportHiddenColumns&&e._isHiddenColumn(r)||n.push(e.hot.getDataAtCell(t,r))}),l.push(n))}),l}},{key:"getRowHeaders",value:function(){var e=this,t=[];if(this.options.rowHeaders){var n=this._getDataRange(),o=n.startRow,i=n.endRow,a=this.hot.getRowHeader();(0,r.rangeEach)(o,i,function(n){!e.options.exportHiddenRows&&e._isHiddenRow(n)||t.push(a[n])})}return t}},{key:"getColumnHeaders",value:function(){var e=this,t=[];if(this.options.columnHeaders){var n=this._getDataRange(),o=n.startCol,i=n.endCol,a=this.hot.getColHeader();(0,r.rangeEach)(o,i,function(n){!e.options.exportHiddenColumns&&e._isHiddenColumn(n)||t.push(a[n])})}return t}},{key:"_getDataRange",value:function(){var e=this.hot.countCols()-1,t=this.hot.countRows()-1,n=o(this.options.range,4),r=n[0],i=void 0===r?0:r,a=n[1],s=void 0===a?0:a,l=n[2],u=void 0===l?t:l,c=n[3],f=void 0===c?e:c;return{startRow:i=Math.max(i,0),startCol:s=Math.max(s,0),endRow:u=Math.min(u,t),endCol:f=Math.min(f,e)}}},{key:"_isHiddenRow",value:function(e){return this.hot.hasHook("hiddenRow")&&this.hot.runHooks("hiddenRow",e)}},{key:"_isHiddenColumn",value:function(e){return this.hot.hasHook("hiddenColumn")&&this.hot.runHooks("hiddenColumn",e)}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t,n){if("function"==typeof o[e])return new o[e](t,n);return null},t.EXPORT_TYPES=t.TYPE_PDF=t.TYPE_EXCEL=t.TYPE_CSV=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(790));t.TYPE_CSV="csv";t.TYPE_EXCEL="excel";t.TYPE_PDF="pdf";var o=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},"csv",r.default);t.EXPORT_TYPES=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1),o=n(14),i=function(e){return e&&e.__esModule?e:{default:e}}(n(791));function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=String.fromCharCode(13),h=String.fromCharCode(34),d=String.fromCharCode(10),p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),l(this,u(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,i.default),function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(t,[{key:"export",value:function(){var e=this,t=this.options,n=this.dataProvider.getData(),o=this.dataProvider.getColumnHeaders(),i=o.length>0,a=this.dataProvider.getRowHeaders(),s=a.length>0,l=t.bom?String.fromCharCode(65279):"";return i&&(o=(0,r.arrayMap)(o,function(t){return e._escapeCell(t,!0)}),s&&(l+=t.columnDelimiter),l+=o.join(t.columnDelimiter),l+=t.rowDelimiter),(0,r.arrayEach)(n,function(n,r){r>0&&(l+=t.rowDelimiter),s&&(l+=e._escapeCell(a[r])+t.columnDelimiter),l+=n.map(function(t){return e._escapeCell(t)}).join(t.columnDelimiter)}),l}},{key:"_escapeCell",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,o.stringify)(e);return""!==n&&(t||n.indexOf(f)>=0||n.indexOf(h)>=0||n.indexOf(d)>=0||n.indexOf(this.options.columnDelimiter)>=0)&&(n=n.replace(new RegExp('"',"g"),'""'),n='"'.concat(n,'"')),n}}],[{key:"DEFAULT_OPTIONS",get:function(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n"}}}]),t}();t.default=p},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(2),o=n(42);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}var s=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.dataProvider=t,this.options=this._mergeOptions(n),this.dataProvider.setOptions(this.options)}return a(e,null,[{key:"DEFAULT_OPTIONS",get:function(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}}]),a(e,[{key:"_mergeOptions",value:function(t){var n=(0,r.clone)(this.constructor.DEFAULT_OPTIONS),i=new Date;return n=(0,r.extend)((0,r.clone)(e.DEFAULT_OPTIONS),n),(n=(0,r.extend)(n,t)).filename=(0,o.substitute)(n.filename,{YYYY:i.getFullYear(),MM:"".concat(i.getMonth()+1).padStart(2,"0"),DD:"".concat(i.getDate()).padStart(2,"0")}),n}}]),e}();t.default=s},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(448)),o=n(67),i=n(138),a=n(6),s=n(103),l=n(3),u=n(793),c=n(794),f=n(795);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e,t,n){return(g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n(796);var m="multiColumnSorting";(0,o.registerRootComparator)(m,u.rootComparator);var w=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=p(this,v(t).call(this,e))).pluginKey=m,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(t,r.default),function(e,t,n){t&&d(e.prototype,t),n&&d(e,n)}(t,[{key:"isEnabled",value:function(){return g(v(t.prototype),"isEnabled",this).call(this)}},{key:"enablePlugin",value:function(){return!this.enabled&&this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings().columnSorting&&(0,c.warnAboutPluginsConflict)(),g(v(t.prototype),"enablePlugin",this).call(this)}},{key:"disablePlugin",value:function(){return g(v(t.prototype),"disablePlugin",this).call(this)}},{key:"sort",value:function(e){return g(v(t.prototype),"sort",this).call(this,e)}},{key:"clearSort",value:function(){return g(v(t.prototype),"clearSort",this).call(this)}},{key:"isSorted",value:function(){return g(v(t.prototype),"isSorted",this).call(this)}},{key:"getSortConfig",value:function(e){return g(v(t.prototype),"getSortConfig",this).call(this,e)}},{key:"setSortConfig",value:function(e){return g(v(t.prototype),"setSortConfig",this).call(this,e)}},{key:"getNormalizedSortConfigs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e:[e]}},{key:"updateHeaderClasses",value:function(e){for(var n,r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];(n=g(v(t.prototype),"updateHeaderClasses",this)).call.apply(n,[this,e].concat(o)),(0,l.removeClass)(e,(0,f.getClassedToRemove)(e)),!1!==this.enabled&&(0,l.addClass)(e,f.getClassesToAdd.apply(void 0,o))}},{key:"onUpdateSettings",value:function(e){return this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings().columnSorting&&(0,c.warnAboutPluginsConflict)(),g(v(t.prototype),"onUpdateSettings",this).call(this,e)}},{key:"onAfterOnCellMouseDown",value:function(e,t){!1!==(0,i.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&((0,s.isPressedCtrlKey)()?(this.hot.deselectCell(),this.hot.selectColumns(t.col),this.sort(this.getNextSortConfig(t.col,"append"))):this.sort(this.getColumnNextConfig(t.col)))}}]),t}();(0,a.registerPlugin)(m,w);var b=w;t.default=b},function(e,t,n){"use strict";t.__esModule=!0,t.rootComparator=function(e,t){return function(n,i){var a=o(n),s=a.slice(1),l=o(i),u=l.slice(1);return function n(o){var i=e[o],a=t[o],l=s[o],c=u[o],f=a.multiColumnSorting,h=f.compareFunctionFactory?f.compareFunctionFactory:(0,r.getCompareFunctionFactory)(a.type),d=h(i,a,f)(l,c);if(d===r.DO_NOT_SWAP){var p=o+1;if(void 0!==t[p])return n(p)}return d}(0)}};var r=n(67);function o(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}},function(e,t,n){"use strict";t.__esModule=!0,t.warnAboutPluginsConflict=function(){(0,r.warn)("Plugins `columnSorting` and `multiColumnSorting` should not be enabled simultaneously.")};var r=n(33)},function(e,t,n){"use strict";t.__esModule=!0,t.getClassesToAdd=function(e,t,n){var o=[];if(!1===n)return o;e.isColumnSorted(t)&&e.getNumberOfSortedColumns()>1&&o.push("".concat(r,"-").concat(e.getIndexOfColumnInSortQueue(t)+1));return o},t.getClassedToRemove=function(e){var t=e.className.split(" "),n=new RegExp("^".concat(r,"-[0-9]{1,2}$"));return t.filter(function(e){return n.test(e)})};var r="sort"},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=E(n(7)),o=n(1),i=n(37),a=n(33),s=n(5),l=E(n(10)),u=n(3),c=n(6),f=n(56),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),d=E(n(798)),p=E(n(818)),g=E(n(820)),v=E(n(823)),y=E(n(463)),m=E(n(464)),w=E(n(824)),b=n(85),C=n(142);function E(e){return e&&e.__esModule?e:{default:e}}function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["The filter conditions have been applied properly, but couldnt be displayed visually.\n The overall amount of conditions exceed the capability of the dropdown menu.\n For more details see the documentation."]);return S=function(){return e},e}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function T(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t,n){return(R="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=M(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(825);var A=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==O(t)&&"function"!=typeof t?N(e):t}(this,M(t).call(this,e))).eventManager=new l.default(N(N(n))),n.trimRowsPlugin=null,n.dropdownMenuPlugin=null,n.conditionCollection=null,n.conditionUpdateObserver=null,n.components=new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]]),n.lastSelectedColumn=null,n.hiddenRowsCache=new Map,n.hot.addHook("afterGetColHeader",function(e,t){return n.onAfterGetColHeader(e,t)}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(t,r.default),function(e,t,n){t&&T(e.prototype,t),n&&T(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().filters}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){this.trimRowsPlugin=this.hot.getPlugin("trimRows"),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");var n=function(t){return t.addLocalHook("accept",function(){return e.onActionBarSubmit("accept")}),t.addLocalHook("cancel",function(){return e.onActionBarSubmit("cancel")}),t.addLocalHook("change",function(n){return e.onComponentChange(t,n)}),t};if(!this.components.get("filter_by_condition")){var r=new d.default(this.hot,{id:"filter_by_condition",name:function(){return"".concat(e.hot.getTranslatedPhrase(h.FILTERS_DIVS_FILTER_BY_CONDITION),":")},addSeparator:!1});r.addLocalHook("afterClose",function(){return e.onSelectUIClosed()}),this.components.set("filter_by_condition",n(r))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new p.default(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){var o=new d.default(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0});o.addLocalHook("afterClose",function(){return e.onSelectUIClosed()}),this.components.set("filter_by_condition2",n(o))}this.components.get("filter_by_value")||this.components.set("filter_by_value",n(new g.default(this.hot,{id:"filter_by_value",name:function(){return"".concat(e.hot.getTranslatedPhrase(h.FILTERS_DIVS_FILTER_BY_VALUE),":")}}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",n(new v.default(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new y.default),this.conditionUpdateObserver||(this.conditionUpdateObserver=new w.default(this.conditionCollection,function(t){return e.getDataMapAtColumn(t)}),this.conditionUpdateObserver.addLocalHook("update",function(t){return e.updateComponents(t)})),this.components.forEach(function(e){e.show()}),this.registerEvents(),this.addHook("beforeDropdownMenuSetItems",function(t){return e.onBeforeDropdownMenuSetItems(t)}),this.addHook("afterDropdownMenuDefaultOptions",function(t){return e.onAfterDropdownMenuDefaultOptions(t)}),this.addHook("afterDropdownMenuShow",function(){return e.onAfterDropdownMenuShow()}),this.addHook("afterDropdownMenuHide",function(){return e.onAfterDropdownMenuHide()}),this.addHook("afterChange",function(t){return e.onAfterChange(t)}),this.hot.getSettings().trimRows=!0,this.trimRowsPlugin.enablePlugin(),this.hot.getSettings().dropdownMenu&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),R(M(t.prototype),"enablePlugin",this).call(this)}}},{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(this.hot.rootElement,"click",function(t){return e.onTableClick(t)})}},{key:"disablePlugin",value:function(){this.enabled&&(this.dropdownMenuPlugin.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach(function(e){e.hide()}),this.conditionCollection.clean(),this.trimRowsPlugin.untrimAll()),R(M(t.prototype),"disablePlugin",this).call(this)}},{key:"addCondition",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C.OPERATION_AND,o=this.t.toPhysicalColumn(e);this.conditionCollection.addCondition(o,{command:{key:t},args:n},r)}},{key:"removeConditions",value:function(e){var t=this.t.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}},{key:"clearConditions",value:function(e){if(void 0===e)this.conditionCollection.clean();else{var t=this.t.toPhysicalColumn(e);this.conditionCollection.clearConditions(t)}}},{key:"filter",value:function(){var e=this._createDataFilter(),t=!this.conditionCollection.isEmpty(),n=[],r=this.conditionCollection.exportAllConditions();if(!1!==this.hot.runHooks("beforeFilter",r))if(t){var i=[];this.trimRowsPlugin.trimmedRows.length=0,n=(0,o.arrayMap)(e.filter(),function(e){return e.meta.visualRow});var a=(0,b.createArrayAssertion)(n);(0,s.rangeEach)(this.hot.countSourceRows()-1,function(e){a(e)||i.push(e)}),this.trimRowsPlugin.trimRows(i),n.length||this.hot.deselectCell()}else this.trimRowsPlugin.untrimAll();this.hot.view.wt.wtOverlays.adjustElementsSize(!0),this.hot.render(),this.clearColumnSelection(),this.hot.runHooks("afterFilter",r)}},{key:"getSelectedColumn",value:function(){return this.lastSelectedColumn}},{key:"clearColumnSelection",value:function(){var e=_(this.hot.getSelectedLast()||[],2),t=e[0],n=e[1];void 0!==t&&void 0!==n&&this.hot.selectCell(t,n)}},{key:"getDataMapAtColumn",value:function(e){var t=this,n=this.t.toVisualColumn(e),r=[];return(0,o.arrayEach)(this.hot.getSourceDataAtCol(n),function(e,o){var i=t.hot.getCellMeta(o,n),a=i.row,s=i.col,l=i.visualCol,u=i.visualRow,c=i.type,f=i.instance,h=i.dateFormat;r.push({meta:{row:a,col:s,visualCol:l,visualRow:u,type:c,instance:f,dateFormat:h},value:(0,b.toEmptyString)(e)})}),r}},{key:"onAfterChange",value:function(e){var t=this;e&&(0,o.arrayEach)(e,function(e){var n=_(e,2)[1],r=t.hot.propToCol(n);t.conditionCollection.hasConditions(r)&&t.updateValueComponentCondition(r)})}},{key:"updateValueComponentCondition",value:function(e){var t=this.hot.getDataAtCol(e),n=(0,b.unifyColumnValues)(t);this.conditionUpdateObserver.updateStatesAtColumn(e,n)}},{key:"restoreComponents",value:function(e){var t=this.getSelectedColumn(),n=t&&t.physicalIndex;e.forEach(function(e){!1===e.isHidden()&&e.restoreState(n)})}},{key:"onAfterDropdownMenuShow",value:function(){this.restoreComponents([this.components.get("filter_by_condition"),this.components.get("filter_operators"),this.components.get("filter_by_condition2"),this.components.get("filter_by_value")])}},{key:"onAfterDropdownMenuHide",value:function(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}},{key:"onBeforeDropdownMenuSetItems",value:function(e){var t=(0,o.arrayMap)(e,function(e){return e.key});this.components.forEach(function(e){e[-1===t.indexOf(e.getMenuItemDescriptor().key)?"hide":"show"]()}),this.initHiddenRowsCache()}},{key:"onAfterDropdownMenuDefaultOptions",value:function(e){e.items.push({name:f.SEPARATOR}),this.components.forEach(function(t){e.items.push(t.getMenuItemDescriptor())})}},{key:"getOperationBasedOnArguments",value:function(e,t,n,r){var o=e;return o===C.OPERATION_OR&&t.command.key!==C.CONDITION_NONE&&n.command.key!==C.CONDITION_NONE&&r.command.key!==C.CONDITION_NONE?o=C.OPERATION_OR_THEN_VARIABLE:r.command.key!==C.CONDITION_NONE&&(t.command.key!==C.CONDITION_NONE&&n.command.key!==C.CONDITION_NONE||(o=C.OPERATION_AND)),o}},{key:"onActionBarSubmit",value:function(e){if("accept"===e){var t=this.getSelectedColumn(),n=t&&t.physicalIndex,r=this.components.get("filter_by_condition").getState(),o=this.components.get("filter_by_condition2").getState(),i=this.components.get("filter_by_value").getState(),a=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),r,o,i);this.conditionUpdateObserver.groupChanges(),this.conditionCollection.clearConditions(n),r.command.key===C.CONDITION_NONE&&o.command.key===C.CONDITION_NONE&&i.command.key===C.CONDITION_NONE?this.conditionCollection.removeConditions(n):(r.command.key!==C.CONDITION_NONE&&(this.conditionCollection.addCondition(n,r,a),o.command.key!==C.CONDITION_NONE&&this.conditionCollection.addCondition(n,o,a)),i.command.key!==C.CONDITION_NONE&&this.conditionCollection.addCondition(n,i,a)),this.conditionUpdateObserver.flush(),this.components.get("filter_operators").saveState(n),this.components.get("filter_by_value").saveState(n),this.saveHiddenRowsCache(n),this.trimRowsPlugin.trimmedRows.length=0,this.filter()}this.dropdownMenuPlugin.close()}},{key:"onComponentChange",value:function(e,t){e===this.components.get("filter_by_condition")&&(t.showOperators?this.showComponents(this.components.get("filter_by_condition2"),this.components.get("filter_operators")):this.hideComponents(this.components.get("filter_by_condition2"),this.components.get("filter_operators"))),e.constructor!==d.default||t.inputsCount||this.setListeningDropdownMenu()}},{key:"onSelectUIClosed",value:function(){this.setListeningDropdownMenu()}},{key:"setListeningDropdownMenu",value:function(){this.dropdownMenuPlugin.setListening()}},{key:"onAfterGetColHeader",value:function(e,t){var n=this.t.toPhysicalColumn(e);this.enabled&&this.conditionCollection.hasConditions(n)?(0,u.addClass)(t,"htFiltersActive"):(0,u.removeClass)(t,"htFiltersActive")}},{key:"onTableClick",value:function(e){var t=(0,u.closest)(e.target,"TH");if(t){var n=this.hot.getCoords(t).col,r=this.t.toPhysicalColumn(n);this.lastSelectedColumn={visualIndex:n,physicalIndex:r}}}},{key:"destroy",value:function(){this.enabled&&(this.components.forEach(function(e){e.destroy()}),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hiddenRowsCache.clear(),this.trimRowsPlugin.disablePlugin()),R(M(t.prototype),"destroy",this).call(this)}},{key:"_createDataFilter",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.conditionCollection;return new m.default(t,function(t){return e.getDataMapAtColumn(t)})}},{key:"updateComponents",value:function(e){if(this.dropdownMenuPlugin.enabled){var t=e.editedConditionStack.conditions,n=e.editedConditionStack.column,r=t.filter(function(e){return e.name===C.CONDITION_BY_VALUE}),o=t.filter(function(e){return e.name!==C.CONDITION_BY_VALUE}),s=this.conditionCollection.columnTypes[n];2===r.length||3===o.length?(0,a.warn)((0,i.toSingleLine)(S())):(o.length>0&&this.showComponentForParticularColumn(this.components.get("filter_operators"),n),this.components.get("filter_by_condition").updateState(o[0],n),this.components.get("filter_by_condition2").updateState(o[1],n),this.components.get("filter_by_value").updateState(e),this.components.get("filter_operators").updateState(s,n))}}},{key:"showComponentForParticularColumn",value:function(e,t){if(this.hiddenRowsCache.has(t)){var n=this.getIndexesOfComponents(e);this.removeIndexesFromHiddenRowsCache(t,n)}else this.hiddenRowsCache.set(t,[])}},{key:"removeIndexesFromHiddenRowsCache",value:function(e,t){var n=this.hiddenRowsCache.get(e);(0,o.arrayEach)(t,function(e){n.includes(e)&&n.splice(n.indexOf(e),1)})}},{key:"getIndexesOfComponents",value:function(){for(var e=this.dropdownMenuPlugin.menu,t=[],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(0,o.arrayEach)(r,function(n){(0,o.arrayEach)(e.menuItems,function(e,r){e.key===n.getMenuItemDescriptor().key&&t.push(r)})}),t}},{key:"changeComponentsVisibility",value:function(){for(var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.dropdownMenuPlugin.menu.hotMenu,n=t.getPlugin("hiddenRows"),r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];var a=this.getIndexesOfComponents.apply(this,o);e?n.showRows(a):n.hideRows(a),t.render()}},{key:"initHiddenRowsCache",value:function(){var e=this;this.dropdownMenuPlugin.menu.addLocalHook("afterOpen",function(){var t=e.lastSelectedColumn.physicalIndex;e.hiddenRowsCache.has(t)||e.hiddenRowsCache.set(t,e.getIndexesOfComponents(e.components.get("filter_operators"),e.components.get("filter_by_condition2"))),e.dropdownMenuPlugin.menu.hotMenu.updateSettings({hiddenRows:{rows:e.hiddenRowsCache.get(t)}})})}},{key:"saveHiddenRowsCache",value:function(e){this.hiddenRowsCache.set(e,this.dropdownMenuPlugin.menu.hotMenu.getPlugin("hiddenRows").hiddenRows)}},{key:"hideComponents",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.changeComponentsVisibility.apply(this,[!1].concat(t))}},{key:"showComponents",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.changeComponentsVisibility.apply(this,[!0].concat(t))}}]),t}();(0,c.registerPlugin)("filters",A);var I=A;t.default=I},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(16),i=n(1),a=n(24),s=n(2),l=g(n(4)),u=p(n(105)),c=g(n(142)),f=p(n(144)),h=p(n(817)),d=n(15);function p(e){return e&&e.__esModule?e:{default:e}}function g(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function b(e,t,n){return(b="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=C(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var O=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=w(this,C(t).call(this,e))).id=n.id,r.name=n.name,r.addSeparator=n.addSeparator,r.elements.push(new h.default(r.hot)),r.elements.push(new f.default(r.hot,{placeholder:l.FILTERS_BUTTONS_PLACEHOLDER_VALUE})),r.elements.push(new f.default(r.hot,{placeholder:l.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE})),r.registerHooks(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(t,u.default),function(e,t,n){t&&m(e.prototype,t),n&&m(e,n)}(t,[{key:"registerHooks",value:function(){var e=this;this.getSelectElement().addLocalHook("select",function(t){return e.onConditionSelect(t)}),this.getSelectElement().addLocalHook("afterClose",function(){return e.onSelectUIClosed()}),(0,i.arrayEach)(this.getInputElements(),function(t){t.addLocalHook("keydown",function(t){return e.onInputKeyDown(t)})})}},{key:"setState",value:function(e){var t=this;if(this.reset(),e){var n=(0,s.clone)(e.command);n.name.startsWith(l.FILTERS_CONDITIONS_NAMESPACE)&&(n.name=this.hot.getTranslatedPhrase(n.name)),this.getSelectElement().setValue(n),(0,i.arrayEach)(e.args,function(e,r){if(r>n.inputsCount-1)return!1;var o=t.getInputElement(r);o.setValue(e),o[n.inputsCount>r?"show":"hide"](),r||setTimeout(function(){return o.focus()},10)})}}},{key:"getState",value:function(){var e=this.getSelectElement().getValue()||(0,d.getConditionDescriptor)(c.CONDITION_NONE),t=[];return(0,i.arrayEach)(this.getInputElements(),function(n,r){e.inputsCount>r&&t.push(n.getValue())}),{command:e,args:t}}},{key:"updateState",value:function(e,t){var n=e?(0,d.getConditionDescriptor)(e.name):(0,d.getConditionDescriptor)(c.CONDITION_NONE);this.setCachedState(t,{command:n,args:e?e.args:[]}),e||(0,i.arrayEach)(this.getInputElements(),function(e){return e.setValue(null)})}},{key:"getSelectElement",value:function(){return this.elements.filter(function(e){return e instanceof h.default})[0]}},{key:"getInputElement",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[e]}},{key:"getInputElements",value:function(){return this.elements.filter(function(e){return e instanceof f.default})}},{key:"getMenuItemDescriptor",value:function(){var e=this;return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:function(){return e.isHidden()},renderer:function(t,n,o,a,s,l){(0,r.addClass)(n.parentNode,"htFiltersMenuCondition"),e.addSeparator&&(0,r.addClass)(n.parentNode,"border");var u=document.createElement("div");return(0,r.addClass)(u,"htFiltersMenuLabel"),u.textContent=l,n.appendChild(u),n.parentNode.hasAttribute("ghost-table")||(0,i.arrayEach)(e.elements,function(e){return n.appendChild(e.element)}),n}}}},{key:"reset",value:function(){var e,n=this.hot.getPlugin("filters").getSelectedColumn(),r=n&&n.visualIndex,o=(e=this.hot).getDataType.apply(e,y(this.hot.getSelectedLast()||[0,r])),a=(0,c.default)(o);(0,i.arrayEach)(this.getInputElements(),function(e){return e.hide()}),this.getSelectElement().setItems(a),b(C(t.prototype),"reset",this).call(this),this.getSelectElement().setValue(a[0])}},{key:"onConditionSelect",value:function(e){(0,i.arrayEach)(this.getInputElements(),function(t,n){t[e.inputsCount>n?"show":"hide"](),n||setTimeout(function(){return t.focus()},10)}),this.runLocalHooks("change",e)}},{key:"onSelectUIClosed",value:function(){this.runLocalHooks("afterClose")}},{key:"onInputKeyDown",value:function(e){(0,a.isKey)(e.keyCode,"ENTER")?(this.runLocalHooks("accept"),(0,o.stopImmediatePropagation)(e)):(0,a.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,o.stopImmediatePropagation)(e))}}]),t}();t.default=O},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=n(2);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(e,t){return e._states["state_"+t]},s=function(e,t,n){e._states["state_"+t]=n},l=(i(r={},"_states",{}),i(r,"getCachedState",function(e){return a(this,e)}),i(r,"setCachedState",function(e,t){s(this,e,t)}),i(r,"saveState",function(e){s(this,e,this.getState())}),i(r,"restoreState",function(e){this.setState(a(this,e))}),i(r,"hasSavedState",function(e){return void 0!==a(this,e)}),i(r,"clearState",function(e){s(this,e)}),i(r,"clearStates",function(){this._states={}}),r);(0,o.defineGetter)(l,"MIXIN_NAME","stateSaver",{writable:!1,enumerable:!1});var u=l;t.default=u},function(e,t,n){"use strict";t.__esModule=!0,t.condition=i,t.CONDITION_NAME=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(15);function i(){return!0}t.CONDITION_NAME="none",(0,o.registerCondition)("none",i,{name:r.FILTERS_CONDITIONS_NONE,inputsCount:0,showOperators:!1})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(15),i=n(455);function a(e,t){return!(0,o.getCondition)(i.CONDITION_NAME,t)(e)}t.CONDITION_NAME="not_empty",(0,o.registerCondition)("not_empty",a,{name:r.FILTERS_CONDITIONS_NOT_EMPTY,inputsCount:0,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(15),i=n(456);function a(e,t){return!(0,o.getCondition)(i.CONDITION_NAME,t)(e)}t.CONDITION_NAME="neq",(0,o.registerCondition)("neq",a,{name:r.FILTERS_CONDITIONS_NOT_EQUAL,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(15);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e,t){var n=i(t,1)[0];return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value>n}t.CONDITION_NAME="gt",(0,o.registerCondition)("gt",a,{name:r.FILTERS_CONDITIONS_GREATER_THAN,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(15);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e,t){var n=i(t,1)[0];return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value>=n}t.CONDITION_NAME="gte",(0,o.registerCondition)("gte",a,{name:r.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(15);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e,t){var n=i(t,1)[0];return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value<n}t.CONDITION_NAME="lt",(0,o.registerCondition)("lt",a,{name:r.FILTERS_CONDITIONS_LESS_THAN,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(15);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e,t){var n=i(t,1)[0];return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value<=n}t.CONDITION_NAME="lte",(0,o.registerCondition)("lte",a,{name:r.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(15),i=n(457);function a(e,t){return!(0,o.getCondition)(i.CONDITION_NAME,t)(e)}t.CONDITION_NAME="not_between",(0,o.registerCondition)("not_between",a,{name:r.FILTERS_CONDITIONS_NOT_BETWEEN,inputsCount:2,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=s,t.CONDITION_NAME=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(14),i=n(15);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e,t){var n=a(t,1)[0];return(0,o.stringify)(e.value).toLowerCase().startsWith((0,o.stringify)(n))}t.CONDITION_NAME="begins_with",(0,i.registerCondition)("begins_with",s,{name:r.FILTERS_CONDITIONS_BEGINS_WITH,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=s,t.CONDITION_NAME=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(14),i=n(15);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e,t){var n=a(t,1)[0];return(0,o.stringify)(e.value).toLowerCase().endsWith((0,o.stringify)(n))}t.CONDITION_NAME="ends_with",(0,i.registerCondition)("ends_with",s,{name:r.FILTERS_CONDITIONS_ENDS_WITH,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),o=n(15),i=n(460);function a(e,t){return!(0,o.getCondition)(i.CONDITION_NAME,t)(e)}t.CONDITION_NAME="not_contains",(0,o.registerCondition)("not_contains",a,{name:r.FILTERS_CONDITIONS_NOT_CONTAIN,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(36)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),i=n(15);function a(e){var t=(0,r.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,r.default)().subtract(-1,"days").startOf("day"),"d")}t.CONDITION_NAME="date_tomorrow",(0,i.registerCondition)("date_tomorrow",a,{name:o.FILTERS_CONDITIONS_TOMORROW,inputsCount:0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(36)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),i=n(15);function a(e){var t=(0,r.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,r.default)().startOf("day"),"d")}t.CONDITION_NAME="date_today",(0,i.registerCondition)("date_today",a,{name:o.FILTERS_CONDITIONS_TODAY,inputsCount:0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(36)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),i=n(15);function a(e){var t=(0,r.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,r.default)().subtract(1,"days").startOf("day"),"d")}t.CONDITION_NAME="date_yesterday",(0,i.registerCondition)("date_yesterday",a,{name:o.FILTERS_CONDITIONS_YESTERDAY,inputsCount:0})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var r=n(15),o=n(85);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e,t){return(0,i(t,1)[0])(e.value)}t.CONDITION_NAME="by_value",(0,r.registerCondition)("by_value",a,{name:"By value",inputsCount:0,inputValuesDecorator:function(e){var t=i(e,1)[0];return[(0,o.createArrayAssertion)(t)]},showOperators:!1})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=o,t.CONDITION_NAME=void 0;var r=n(15);function o(){return!0}t.CONDITION_NAME="true",(0,r.registerCondition)("true",o,{name:"True"})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=o,t.CONDITION_NAME=void 0;var r=n(15);function o(){return!1}t.CONDITION_NAME="false",(0,r.registerCondition)("false",o,{name:"False"})},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(140)),o=n(2),i=n(1),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),s=n(56),l=u(n(87));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var y=new WeakMap,m=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?v(e):t}(this,h(t).call(this,e,(0,o.extend)(t.DEFAULTS,n))),y.set(v(v(r)),{}),r.menu=null,r.items=[],r.registerHooks(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(t,l.default),p(t,null,[{key:"DEFAULTS",get:function(){return(0,o.clone)({className:"htUISelect",wrapIt:!1})}}]),p(t,[{key:"registerHooks",value:function(){var e=this;this.addLocalHook("click",function(){return e.onClick()})}},{key:"setItems",value:function(e){this.items=this.translateNames(e),this.menu&&this.menu.setMenuItems(this.items)}},{key:"translateNames",value:function(e){var t=this;return(0,i.arrayEach)(e,function(e){e.name=t.translateIfPossible(e.name)}),e}},{key:"build",value:function(){var e=this;f(h(t.prototype),"build",this).call(this),this.menu=new r.default(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0}),this.menu.setMenuItems(this.items);var n=new l.default(this.hot,{className:"htUISelectCaption"}),o=new l.default(this.hot,{className:"htUISelectDropdown"}),a=y.get(this);a.caption=n,a.captionElement=n.element,a.dropdown=o,(0,i.arrayEach)([n,o],function(t){return e._element.appendChild(t.element)}),this.menu.addLocalHook("select",function(t){return e.onMenuSelect(t)}),this.menu.addLocalHook("afterClose",function(){return e.onMenuClosed()}),this.update()}},{key:"update",value:function(){var e;this.isBuilt()&&(e=this.options.value?this.options.value.name:this.menu.hot.getTranslatedPhrase(a.FILTERS_CONDITIONS_NONE),y.get(this).captionElement.textContent=e,f(h(t.prototype),"update",this).call(this))}},{key:"openOptions",value:function(){var e=this.element.getBoundingClientRect();this.menu&&(this.menu.open(),this.menu.setPosition({left:e.left-5,top:e.top,width:e.width,height:e.height}))}},{key:"closeOptions",value:function(){this.menu&&this.menu.close()}},{key:"onMenuSelect",value:function(e){e.name!==s.SEPARATOR&&(this.options.value=e,this.closeOptions(),this.update(),this.runLocalHooks("select",this.options.value))}},{key:"onMenuClosed",value:function(){this.runLocalHooks("afterClose")}},{key:"onClick",value:function(){this.openOptions()}},{key:"destroy",value:function(){this.menu&&(this.menu.destroy(),this.menu=null);var e=y.get(this),n=e.caption,r=e.dropdown;n&&n.destroy(),r&&r.destroy(),f(h(t.prototype),"destroy",this).call(this)}}]),t}();t.default=m},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(1),i=n(37),a=h(n(105)),s=n(86),l=n(143),u=n(461),c=n(462),f=h(n(819));function h(e){return e&&e.__esModule?e:{default:e}}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["Radio button with index "," doesn't exist."]);return p=function(){return e},e}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var w=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=v(this,y(t).call(this,e))).id=n.id,r.name=n.name,r.buildOperatorsElement(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(t,a.default),function(e,t,n){t&&g(e.prototype,t),n&&g(e,n)}(t,[{key:"getMenuItemDescriptor",value:function(){var e=this;return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:function(){return e.isHidden()},renderer:function(t,n){return(0,r.addClass)(n.parentNode,"htFiltersMenuOperators"),n.parentNode.hasAttribute("ghost-table")||(0,o.arrayEach)(e.elements,function(e){return n.appendChild(e.element)}),n}}}},{key:"buildOperatorsElement",value:function(){var e=this,t=[l.OPERATION_ID,u.OPERATION_ID];(0,o.arrayEach)(t,function(n){var r=new f.default(e.hot,{name:"operator",label:{htmlFor:n,textContent:(0,s.getOperationName)(n)},value:n,checked:n===t[0],id:n});r.addLocalHook("change",function(t){return e.onRadioInputChange(t)}),e.elements.push(r)})}},{key:"setChecked",value:function(e){if(this.elements.length<e)throw Error((0,i.toSingleLine)(p(),e));(0,o.arrayEach)(this.elements,function(t,n){t.setChecked(n===e)})}},{key:"getActiveOperationId",value:function(){var e=this.elements.find(function(e){return e instanceof f.default&&e.isChecked()});return e?e.getValue():l.OPERATION_ID}},{key:"getState",value:function(){return this.getActiveOperationId()}},{key:"setState",value:function(e){this.reset(),e&&this.getActiveOperationId()!==e&&(0,o.arrayEach)(this.elements,function(t){t.setChecked(t.getValue()===e)})}},{key:"updateState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.OPERATION_ID,t=arguments.length>1?arguments[1]:void 0,n=e;n===c.OPERATION_ID&&(n=u.OPERATION_ID),this.setCachedState(t,n)}},{key:"reset",value:function(){this.setChecked(0)}},{key:"onRadioInputChange",value:function(e){this.setState(e.realTarget.value)}}]),t}();t.default=w},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(2),o=function(e){return e&&e.__esModule?e:{default:e}}(n(87));function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t,n){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var h=new WeakMap,d=function(e){function t(e,n){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),o=function(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?f(e):t}(this,s(t).call(this,e,(0,r.extend)(t.DEFAULTS,n))),h.set(f(f(o)),{}),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,o.default),u(t,null,[{key:"DEFAULTS",get:function(){return(0,r.clone)({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}}]),u(t,[{key:"build",value:function(){a(s(t.prototype),"build",this).call(this);var e=h.get(this);e.input=this._element.firstChild;var n=document.createElement("label");n.textContent=this.translateIfPossible(this.options.label.textContent),n.htmlFor=this.translateIfPossible(this.options.label.htmlFor),e.label=n,this._element.appendChild(n),this.update()}},{key:"update",value:function(){if(this.isBuilt()){var e=h.get(this);e.input.checked=this.options.checked,e.label.textContent=this.translateIfPossible(this.options.label.textContent)}}},{key:"isChecked",value:function(){return this.options.checked}},{key:"setChecked",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.options.checked=e,this.update()}},{key:"focus",value:function(){this.isBuilt()&&h.get(this).input.focus()}}]),t}();t.default=d},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(16),i=n(1),a=n(24),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),l=n(85),u=d(n(105)),c=d(n(821)),f=n(142),h=n(15);function d(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e,t,n){return(m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=w(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var C=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=y(this,w(t).call(this,e))).id=n.id,r.name=n.name,r.elements.push(new c.default(r.hot)),r.registerHooks(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(t,u.default),function(e,t,n){t&&v(e.prototype,t),n&&v(e,n)}(t,[{key:"registerHooks",value:function(){var e=this;this.getMultipleSelectElement().addLocalHook("keydown",function(t){return e.onInputKeyDown(t)})}},{key:"setState",value:function(e){if(this.reset(),e&&e.command.key===f.CONDITION_BY_VALUE){var t=this.getMultipleSelectElement();t.setItems(e.itemsSnapshot),t.setValue(e.args[0])}}},{key:"getState",value:function(){var e=this.getMultipleSelectElement(),t=e.getItems();return{command:{key:e.isSelectedAllValues()||!t.length?f.CONDITION_NONE:f.CONDITION_BY_VALUE},args:[e.getValue()],itemsSnapshot:t}}},{key:"updateState",value:function(e){var t=this,n=function(e,n,r,o,a){var u=g((0,i.arrayFilter)(n,function(e){return e.name===f.CONDITION_BY_VALUE}),1)[0],c={},d=t.hot.getTranslatedPhrase(s.FILTERS_VALUES_BLANK_CELLS);if(u){var p=(0,i.arrayMap)(o(e,a),function(e){return e.value});p=(0,l.unifyColumnValues)(p),r&&(u.args[0]=r);var v=[],y=(0,l.intersectValues)(p,u.args[0],d,function(e){e.checked&&v.push(e.value)});c.args=[v],c.command=(0,h.getConditionDescriptor)(f.CONDITION_BY_VALUE),c.itemsSnapshot=y}else c.args=[],c.command=(0,h.getConditionDescriptor)(f.CONDITION_NONE);t.setCachedState(e,c)};n(e.editedConditionStack.column,e.editedConditionStack.conditions,e.conditionArgsChange,e.filteredRowsFactory),e.dependentConditionStacks.length&&n(e.dependentConditionStacks[0].column,e.dependentConditionStacks[0].conditions,e.conditionArgsChange,e.filteredRowsFactory,e.editedConditionStack)}},{key:"getMultipleSelectElement",value:function(){return this.elements.filter(function(e){return e instanceof c.default})[0]}},{key:"getMenuItemDescriptor",value:function(){var e=this;return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:function(){return e.isHidden()},renderer:function(t,n,o,a,s,l){(0,r.addClass)(n.parentNode,"htFiltersMenuValue");var u=document.createElement("div");return(0,r.addClass)(u,"htFiltersMenuLabel"),u.textContent=l,n.appendChild(u),n.parentNode.hasAttribute("ghost-table")||(0,i.arrayEach)(e.elements,function(e){return n.appendChild(e.element)}),n}}}},{key:"reset",value:function(){var e=this.hot.getTranslatedPhrase(s.FILTERS_VALUES_BLANK_CELLS),n=(0,l.unifyColumnValues)(this._getColumnVisibleValues()),r=(0,l.intersectValues)(n,n,e);this.getMultipleSelectElement().setItems(r),m(w(t.prototype),"reset",this).call(this),this.getMultipleSelectElement().setValue(n)}},{key:"onInputKeyDown",value:function(e){(0,a.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,o.stopImmediatePropagation)(e))}},{key:"_getColumnVisibleValues",value:function(){var e=this.hot.getPlugin("filters").getSelectedColumn(),t=e&&e.visualIndex;return(0,i.arrayMap)(this.hot.getDataAtCol(t),function(e){return(0,l.toEmptyString)(e)})}}]),t}();t.default=C},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(2),i=n(1),a=n(24),s=n(51),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),u=n(16),c=p(n(87)),f=p(n(144)),h=p(n(822)),d=n(85);function p(e){return e&&e.__esModule?e:{default:e}}function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function y(e,t,n){return(y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),e}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var O=new WeakMap,S=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?E(e):t}(this,m(t).call(this,e,(0,o.extend)(t.DEFAULTS,n))),O.set(E(E(r)),{}),r.searchInput=new f.default(r.hot,{placeholder:l.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,className:"htUIMultipleSelectSearch"}),r.selectAllUI=new h.default(r.hot,{textContent:l.FILTERS_BUTTONS_SELECT_ALL,className:"htUISelectAll"}),r.clearAllUI=new h.default(r.hot,{textContent:l.FILTERS_BUTTONS_CLEAR,className:"htUIClearAll"}),r.items=[],r.itemsBox=null,r.registerHooks(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}(t,c.default),b(t,null,[{key:"DEFAULTS",get:function(){return(0,o.clone)({className:"htUIMultipleSelect",value:[]})}}]),b(t,[{key:"registerHooks",value:function(){var e=this;this.searchInput.addLocalHook("keydown",function(t){return e.onInputKeyDown(t)}),this.searchInput.addLocalHook("input",function(t){return e.onInput(t)}),this.selectAllUI.addLocalHook("click",function(t){return e.onSelectAllClick(t)}),this.clearAllUI.addLocalHook("click",function(t){return e.onClearAllClick(t)})}},{key:"setItems",value:function(e){this.items=e,this.itemsBox&&this.itemsBox.loadData(this.items)}},{key:"getItems",value:function(){return v(this.items)}},{key:"getValue",value:function(){return function(e){var t=[];return(0,i.arrayEach)(e,function(e){e.checked&&t.push(e.value)}),t}(this.items)}},{key:"isSelectedAllValues",value:function(){return this.items.length===this.getValue().length}},{key:"build",value:function(){var e=this;y(m(t.prototype),"build",this).call(this);var n=document.createElement("div"),o=new c.default(this.hot,{className:"htUISelectionControls",children:[this.selectAllUI,this.clearAllUI]});this._element.appendChild(this.searchInput.element),this._element.appendChild(o.element),this._element.appendChild(n);var i=function(t){e._element&&(e.itemsBox&&e.itemsBox.destroy(),(0,r.addClass)(t,"htUIMultipleSelectHot"),e.itemsBox=new e.hot.constructor(t,{data:e.items,columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:function(e,t,n,r,o,i){e.title=i.instance.getDataAtRowProp(t,i.label.property)},autoWrapCol:!0,height:110,colWidths:function(){return e.itemsBox.container.scrollWidth-(0,r.getScrollbarWidth)()},copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},beforeKeyDown:function(t){return e.onItemsBoxBeforeKeyDown(t)}}),e.itemsBox.init())};i(n),setTimeout(function(){return i(n)},100)}},{key:"reset",value:function(){this.searchInput.reset(),this.selectAllUI.reset(),this.clearAllUI.reset()}},{key:"update",value:function(){this.isBuilt()&&(this.itemsBox.loadData(function(e,t){var n=(0,d.createArrayAssertion)(t);return(0,i.arrayMap)(e,function(e){return e.checked=n(e.value),e})}(this.items,this.options.value)),y(m(t.prototype),"update",this).call(this))}},{key:"destroy",value:function(){this.itemsBox&&this.itemsBox.destroy(),this.searchInput.destroy(),this.clearAllUI.destroy(),this.selectAllUI.destroy(),this.searchInput=null,this.clearAllUI=null,this.selectAllUI=null,this.itemsBox=null,this.items=null,y(m(t.prototype),"destroy",this).call(this)}},{key:"onInput",value:function(e){var t,n=e.target.value.toLowerCase();t=""===n?v(this.items):(0,i.arrayFilter)(this.items,function(e){return"".concat(e.value).toLowerCase().indexOf(n)>=0}),this.itemsBox.loadData(t)}},{key:"onInputKeyDown",value:function(e){this.runLocalHooks("keydown",e,this),(0,s.partial)(a.isKey,e.keyCode)("ARROW_DOWN|TAB")&&!this.itemsBox.isListening()&&((0,u.stopImmediatePropagation)(e),this.itemsBox.listen(),this.itemsBox.selectCell(0,0))}},{key:"onItemsBoxBeforeKeyDown",value:function(e){var t=(0,s.partial)(a.isKey,e.keyCode);t("ESCAPE")&&this.runLocalHooks("keydown",e,this),t("ARROW_UP|ARROW_DOWN|ARROW_LEFT|ARROW_RIGHT|TAB|SPACE|ENTER")||((0,u.stopImmediatePropagation)(e),this.itemsBox.unlisten(),this.itemsBox.deselectCell(),this.searchInput.focus())}},{key:"onSelectAllClick",value:function(e){e.preventDefault(),(0,i.arrayEach)(this.itemsBox.getSourceData(),function(e){e.checked=!0}),this.itemsBox.render()}},{key:"onClearAllClick",value:function(e){e.preventDefault(),(0,i.arrayEach)(this.itemsBox.getSourceData(),function(e){e.checked=!1}),this.itemsBox.render()}}]),t}();t.default=S},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(2),o=function(e){return e&&e.__esModule?e:{default:e}}(n(87));function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t,n){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var h=new WeakMap,d=function(e){function t(e,n){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),o=function(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?f(e):t}(this,s(t).call(this,e,(0,r.extend)(t.DEFAULTS,n))),h.set(f(f(o)),{}),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,o.default),u(t,null,[{key:"DEFAULTS",get:function(){return(0,r.clone)({href:"#",tagName:"a"})}}]),u(t,[{key:"build",value:function(){a(s(t.prototype),"build",this).call(this),h.get(this).link=this._element.firstChild}},{key:"update",value:function(){this.isBuilt()&&(h.get(this).link.textContent=this.translateIfPossible(this.options.textContent))}}]),t}();t.default=d},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(1),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),a=l(n(105)),s=l(n(144));function l(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=c(this,f(t).call(this,e))).id=n.id,r.name=n.name,r.elements.push(new s.default(r.hot,{type:"button",value:i.FILTERS_BUTTONS_OK,className:"htUIButton htUIButtonOK",identifier:t.BUTTON_OK})),r.elements.push(new s.default(r.hot,{type:"button",value:i.FILTERS_BUTTONS_CANCEL,className:"htUIButton htUIButtonCancel",identifier:t.BUTTON_CANCEL})),r.registerHooks(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(t,a.default),d(t,null,[{key:"BUTTON_OK",get:function(){return"ok"}},{key:"BUTTON_CANCEL",get:function(){return"cancel"}}]),d(t,[{key:"registerHooks",value:function(){var e=this;(0,o.arrayEach)(this.elements,function(t){t.addLocalHook("click",function(t,n){return e.onButtonClick(t,n)})})}},{key:"getMenuItemDescriptor",value:function(){var e=this;return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:function(){return e.isHidden()},renderer:function(t,n){return(0,r.addClass)(n.parentNode,"htFiltersMenuActionBar"),n.parentNode.hasAttribute("ghost-table")||(0,o.arrayEach)(e.elements,function(e){return n.appendChild(e.element)}),n}}}},{key:"accept",value:function(){this.runLocalHooks("accept")}},{key:"cancel",value:function(){this.runLocalHooks("cancel")}},{key:"onButtonClick",value:function(e,n){n.options.identifier===t.BUTTON_OK?this.accept():this.cancel()}}]),t}();t.default=g},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1),o=n(2),i=n(51),a=c(n(29)),s=c(n(463)),l=c(n(464)),u=n(85);function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var h=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return[]};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.conditionCollection=t,this.columnDataFactory=r,this.changes=[],this.grouping=!1,this.latestEditedColumnPosition=-1,this.latestOrderStack=[],this.conditionCollection.addLocalHook("beforeRemove",function(e){return n._onConditionBeforeModify(e)}),this.conditionCollection.addLocalHook("afterAdd",function(e){return n.updateStatesAtColumn(e)}),this.conditionCollection.addLocalHook("afterClear",function(e){return n.updateStatesAtColumn(e)}),this.conditionCollection.addLocalHook("beforeClean",function(){return n._onConditionBeforeClean()}),this.conditionCollection.addLocalHook("afterClean",function(){return n._onConditionAfterClean()})}return function(e,t,n){t&&f(e.prototype,t),n&&f(e,n)}(e,[{key:"groupChanges",value:function(){this.grouping=!0}},{key:"flush",value:function(){var e=this;this.grouping=!1,(0,r.arrayEach)(this.changes,function(t){e.updateStatesAtColumn(t)}),this.changes.length=0}},{key:"_onConditionBeforeModify",value:function(e){this.latestEditedColumnPosition=this.conditionCollection.orderStack.indexOf(e)}},{key:"updateStatesAtColumn",value:function(e,t){var n=this;if(this.grouping)-1===this.changes.indexOf(e)&&this.changes.push(e);else{var o=this.conditionCollection.exportAllConditions(),a=this.conditionCollection.orderStack.indexOf(e);-1===a&&(a=this.latestEditedColumnPosition);var c=o.slice(0,a),f=o.slice(a);f.length&&f[0].column===e&&f.shift();var h=(0,i.curry)(function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=new s.default,a=[].concat(e,o);i.importAllConditions(a);var c,f=n.columnDataFactory(t);c=i.isEmpty()?f:new l.default(i,function(e){return n.columnDataFactory(e)}).filter(),c=(0,r.arrayMap)(c,function(e){return e.meta.visualRow});var h=(0,u.createArrayAssertion)(c);return(0,r.arrayFilter)(f,function(e){return h(e.meta.visualRow)})})(c),d=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:d},dependentConditionStacks:f,filteredRowsFactory:h,conditionArgsChange:t})}}},{key:"_onConditionBeforeClean",value:function(){this.latestOrderStack=[].concat(this.conditionCollection.orderStack)}},{key:"_onConditionAfterClean",value:function(){var e=this;(0,r.arrayEach)(this.latestOrderStack,function(t){e.updateStatesAtColumn(t)})}},{key:"destroy",value:function(){var e=this;this.clearLocalHooks(),(0,o.objectEach)(this,function(t,n){e[n]=null})}}]),e}();(0,o.mixin)(h,a.default);var d=h;t.default=d},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=h(n(7)),o=n(1),i=n(2),a=h(n(10)),s=n(6),l=n(57),u=h(n(827)),c=h(n(836)),f=h(n(837));function h(e){return e&&e.__esModule?e:{default:e}}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t,n){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var b=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?w(e):t}(this,y(t).call(this,e))).eventManager=new a.default(w(w(n))),n.dataProvider=new c.default(n.hot),n.sheet=new u.default(n.hot,n.dataProvider),n.undoRedoSnapshot=new f.default(n.sheet),n._skipRendering=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(t,r.default),function(e,t,n){t&&g(e.prototype,t),n&&g(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().formulas}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){var n=this.hot.getSettings().formulas;(0,i.isObject)(n)&&(0,i.isObject)(n.variables)&&(0,i.objectEach)(n.variables,function(t,n){return e.setVariable(n,t)}),this.addHook("afterColumnSort",function(){return e.onAfterColumnSort.apply(e,arguments)}),this.addHook("afterCreateCol",function(){return e.onAfterCreateCol.apply(e,arguments)}),this.addHook("afterCreateRow",function(){return e.onAfterCreateRow.apply(e,arguments)}),this.addHook("afterLoadData",function(){return e.onAfterLoadData()}),this.addHook("afterRemoveCol",function(){return e.onAfterRemoveCol.apply(e,arguments)}),this.addHook("afterRemoveRow",function(){return e.onAfterRemoveRow.apply(e,arguments)}),this.addHook("afterSetDataAtCell",function(){return e.onAfterSetDataAtCell.apply(e,arguments)}),this.addHook("afterSetDataAtRowProp",function(){return e.onAfterSetDataAtCell.apply(e,arguments)}),this.addHook("beforeColumnSort",function(){return e.onBeforeColumnSort.apply(e,arguments)}),this.addHook("beforeCreateCol",function(){return e.onBeforeCreateCol.apply(e,arguments)}),this.addHook("beforeCreateRow",function(){return e.onBeforeCreateRow.apply(e,arguments)}),this.addHook("beforeRemoveCol",function(){return e.onBeforeRemoveCol.apply(e,arguments)}),this.addHook("beforeRemoveRow",function(){return e.onBeforeRemoveRow.apply(e,arguments)}),this.addHook("beforeValidate",function(){return e.onBeforeValidate.apply(e,arguments)}),this.addHook("beforeValueRender",function(){return e.onBeforeValueRender.apply(e,arguments)}),this.addHook("modifyData",function(){return e.onModifyData.apply(e,arguments)}),this.sheet.addLocalHook("afterRecalculate",function(){return e.onSheetAfterRecalculate.apply(e,arguments)}),v(y(t.prototype),"enablePlugin",this).call(this)}}},{key:"disablePlugin",value:function(){v(y(t.prototype),"disablePlugin",this).call(this)}},{key:"getCellValue",value:function(e,t){var n=this.sheet.getCellAt(e,t);return n?n.getError()||n.getValue():void 0}},{key:"hasComputedCellValue",value:function(e,t){return null!==this.sheet.getCellAt(e,t)}},{key:"recalculate",value:function(){this.sheet.recalculate()}},{key:"recalculateFull",value:function(){this.sheet.recalculateFull()}},{key:"recalculateOptimized",value:function(){this.sheet.recalculateOptimized()}},{key:"setVariable",value:function(e,t){this.sheet.setVariable(e,t)}},{key:"getVariable",value:function(e){return this.sheet.getVariable(e)}},{key:"onSheetAfterRecalculate",value:function(e){if(this._skipRendering)this._skipRendering=!1;else{var t=this.hot;(0,o.arrayEach)(e,function(e){var n=e.row,r=e.column;t.validateCell(t.getDataAtCell(n,r),t.getCellMeta(n,r),function(){})}),t.render()}}},{key:"onModifyData",value:function(e,t,n,r){"get"===r&&this.hasComputedCellValue(e,t)?n.value=this.getCellValue(e,t):"set"===r&&(0,l.isFormulaExpression)(n.value)&&(n.value=(0,l.toUpperCaseFormula)(n.value))}},{key:"onBeforeValueRender",value:function(e){var t=e;return(0,l.isFormulaExpressionEscaped)(t)&&(t=(0,l.unescapeFormulaExpression)(t)),t}},{key:"onBeforeValidate",value:function(e,t,n){var r=this.hot.propToCol(n),o=e;return this.hasComputedCellValue(t,r)&&(o=this.getCellValue(t,r)),o}},{key:"onAfterSetDataAtCell",value:function(e,t){var n=this;"loadData"!==t&&(this.dataProvider.clearChanges(),(0,o.arrayEach)(e,function(e){var t=p(e,4),r=t[0],o=t[1],i=t[2],a=t[3],s=n.hot.propToCol(o),u=n.t.toPhysicalRow(r),c=a;(0,l.isFormulaExpression)(c)&&(c=(0,l.toUpperCaseFormula)(c)),n.dataProvider.collectChanges(u,s,c),i!==c&&n.sheet.applyChanges(u,s,c)}),this.recalculate())}},{key:"onBeforeCreateRow",value:function(e,t,n){"UndoRedo.undo"===n&&this.undoRedoSnapshot.restore()}},{key:"onAfterCreateRow",value:function(e,t,n){this.sheet.alterManager.triggerAlter("insert_row",e,t,"UndoRedo.undo"!==n)}},{key:"onBeforeRemoveRow",value:function(e,t){this.undoRedoSnapshot.save("row",e,t)}},{key:"onAfterRemoveRow",value:function(e,t){this.sheet.alterManager.triggerAlter("remove_row",e,t)}},{key:"onBeforeCreateCol",value:function(e,t,n){"UndoRedo.undo"===n&&this.undoRedoSnapshot.restore()}},{key:"onAfterCreateCol",value:function(e,t,n){this.sheet.alterManager.triggerAlter("insert_column",e,t,"UndoRedo.undo"!==n)}},{key:"onBeforeRemoveCol",value:function(e,t){this.undoRedoSnapshot.save("column",e,t)}},{key:"onAfterRemoveCol",value:function(e,t){this.sheet.alterManager.triggerAlter("remove_column",e,t)}},{key:"onBeforeColumnSort",value:function(e,t){this.sheet.alterManager.prepareAlter("column_sorting",e,t)}},{key:"onAfterColumnSort",value:function(e,t){this.sheet.alterManager.triggerAlter("column_sorting",e,t)}},{key:"onAfterLoadData",value:function(){this._skipRendering=!0,this.recalculateFull()}},{key:"destroy",value:function(){this.dataProvider.destroy(),this.dataProvider=null,this.sheet.destroy(),this.sheet=null,v(y(t.prototype),"destroy",this).call(this)}}]),t}();(0,s.registerPlugin)("formulas",b);var C=b;t.default=C},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(88),o=n(1),i=d(n(29)),a=n(75),s=n(2),l=d(n(58)),u=d(n(828)),c=n(57),f=d(n(829)),h=d(n(830));function d(e){return e&&e.__esModule?e:{default:e}}function p(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var v=3,y=function(){function e(t,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this.t=(0,a.getTranslator)(this.hot),this.dataProvider=n,this.parser=new r.Parser,this.matrix=new f.default(this.t),this.alterManager=new h.default(this),this._processingCell=null,this._state=v,this.parser.on("callCellValue",function(){return o._onCallCellValue.apply(o,arguments)}),this.parser.on("callRangeValue",function(){return o._onCallRangeValue.apply(o,arguments)}),this.alterManager.addLocalHook("afterAlter",function(){return o._onAfterAlter.apply(o,arguments)})}return function(e,t,n){t&&g(e.prototype,t),n&&g(e,n)}(e,[{key:"recalculate",value:function(){switch(this._state){case v:this.recalculateFull();break;case 2:this.recalculateOptimized()}}},{key:"recalculateOptimized",value:function(){var e=this,t=this.matrix.getOutOfDateCells();(0,o.arrayEach)(t,function(t){var n=e.dataProvider.getSourceDataAtCell(t.row,t.column);(0,c.isFormulaExpression)(n)&&e.parseExpression(t,n.substr(1))}),this._state=1,this.runLocalHooks("afterRecalculate",t,"optimized")}},{key:"recalculateFull",value:function(){var e=this,t=this.dataProvider.getSourceDataByRange();this.matrix.reset(),(0,o.arrayEach)(t,function(t,n){(0,o.arrayEach)(t,function(t,r){(0,c.isFormulaExpression)(t)&&e.parseExpression(new l.default(n,r),t.substr(1))})}),this._state=1,this.runLocalHooks("afterRecalculate",t,"full")}},{key:"setVariable",value:function(e,t){this.parser.setVariable(e,t)}},{key:"getVariable",value:function(e){return this.parser.getVariable(e)}},{key:"applyChanges",value:function(e,t,n){this.matrix.remove({row:e,column:t}),(0,c.isFormulaExpression)(n)&&this.parseExpression(new l.default(e,t),n.substr(1));var r=this.getCellDependencies.apply(this,p(this.t.toVisual(e,t)));(0,o.arrayEach)(r,function(e){e.setState(l.default.STATE_OUT_OFF_DATE)}),this._state=2}},{key:"parseExpression",value:function(e,t){e.setState(l.default.STATE_COMPUTING),this._processingCell=e;var n=this.parser.parse((0,c.toUpperCaseFormula)(t)),r=n.error,o=n.result;(0,c.isFormulaExpression)(o)?this.parseExpression(e,o.substr(1)):(e.setValue(o),e.setError(r),e.setState(l.default.STATE_UP_TO_DATE)),this.matrix.add(e),this._processingCell=null}},{key:"getCellAt",value:function(e,t){return this.matrix.getCellAt(e,t)}},{key:"getCellDependencies",value:function(e,t){return this.matrix.getDependencies({row:e,column:t})}},{key:"_onCallCellValue",value:function(e,t){var n=e.row,o=e.column,i=new u.default(n,o);if(!this.dataProvider.isInDataRange(i.row,i.column))throw Error(r.ERROR_REF);this.matrix.registerCellRef(i),this._processingCell.addPrecedent(i);var a=this.dataProvider.getRawDataAtCell(n.index,o.index);if((0,r.error)(a)){var s=this.matrix.getCellAt(n.index,o.index);if(s&&s.hasError())throw Error(a)}if((0,c.isFormulaExpression)(a)){var l=this.parser.parse(a.substr(1)),f=l.error,h=l.result;if(f)throw Error(f);t(h)}else t(a)}},{key:"_onCallRangeValue",value:function(e,t,n){var i=this,a=e.row,s=e.column,l=t.row,f=t.column,h=this.dataProvider.getRawDataByRange(a.index,s.index,l.index,f.index);n((0,o.arrayMap)(h,function(e,t){return function(e,t){return(0,o.arrayMap)(e,function(e,n){var o=a.index+t,l=s.index+n,f=new u.default(o,l);if(!i.dataProvider.isInDataRange(f.row,f.column))throw Error(r.ERROR_REF);i.matrix.registerCellRef(f),i._processingCell.addPrecedent(f);var h=e;if((0,r.error)(h)){var d=i.matrix.getCellAt(f.row,f.column);if(d&&d.hasError())throw Error(h)}if((0,c.isFormulaExpression)(h)){var p=i.parser.parse(h.substr(1)),g=p.error,v=p.result;if(g)throw Error(g);h=v}return h})}(e,t)}))}},{key:"_onAfterAlter",value:function(){this.recalculateOptimized()}},{key:"destroy",value:function(){this.hot=null,this.t=null,this.dataProvider.destroy(),this.dataProvider=null,this.alterManager.destroy(),this.alterManager=null,this.parser=null,this.matrix.reset(),this.matrix=null}}]),e}();(0,s.mixin)(y,i.default);var m=y;t.default=m},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(88),o=function(e){return e&&e.__esModule?e:{default:e}}(n(465));function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),s(this,l(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,o.default),function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(t,[{key:"toString",value:function(){return(0,r.toLabel)({index:this.row,isAbsolute:!1},{index:this.column,isAbsolute:!1})}}]),t}();t.default=c},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(n(58));function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=t,this.data=[],this.cellReferences=[]}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(e,[{key:"getCellAt",value:function(e,t){var n=null;return(0,r.arrayEach)(this.data,function(r){if(r.row===e&&r.column===t)return n=r,!1}),n}},{key:"getOutOfDateCells",value:function(){return(0,r.arrayFilter)(this.data,function(e){return e.isState(o.default.STATE_OUT_OFF_DATE)})}},{key:"add",value:function(e){(0,r.arrayFilter)(this.data,function(t){return t.isEqual(e)}).length||this.data.push(e)}},{key:"remove",value:function(e){var t=Array.isArray(e);this.data=(0,r.arrayFilter)(this.data,function(n){return!function(e,n){var o=!1;return t?(0,r.arrayEach)(n,function(t){if(e.isEqual(t))return o=!0,!1}):o=e.isEqual(n),o}(n,e)})}},{key:"getDependencies",value:function(e){var t=this,n=function(e){return(0,r.arrayReduce)(t.data,function(t,n){return n.hasPrecedent(e)&&-1===t.indexOf(n)&&t.push(n),t},[])};return function e(o){var i=n(o);return i.length&&(0,r.arrayEach)(i,function(n){n.hasPrecedents()&&(i=i.concat(e(t.t.toVisual(n))))}),i}(e)}},{key:"registerCellRef",value:function(e){(0,r.arrayFilter)(this.cellReferences,function(t){return t.isEqual(e)}).length||this.cellReferences.push(e)}},{key:"removeCellRefsAtRange",value:function(e,t){var n=e.row,o=e.column,i=t.row,a=t.column,s=[];return this.cellReferences=(0,r.arrayFilter)(this.cellReferences,function(e){return!function(e){return void 0===n||e.row>=n&&e.row<=i}(e)||!function(e){return void 0===o||e.column>=o&&e.column<=a}(e)||(s.push(e),!1)}),s}},{key:"reset",value:function(){this.data.length=0,this.cellReferences.length=0}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.registerOperation=v,t.default=void 0;var r=n(2),o=function(e){return e&&e.__esModule?e:{default:e}}(n(29)),i=c(n(831)),a=c(n(832)),s=c(n(833)),l=c(n(834)),u=c(n(835));function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var h=new Map;v(i.OPERATION_NAME,i),v(a.OPERATION_NAME,a),v(s.OPERATION_NAME,s),v(l.OPERATION_NAME,l),v(u.OPERATION_NAME,u);var d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sheet=t,this.hot=t.hot,this.dataProvider=t.dataProvider,this.matrix=t.matrix}return function(e,t,n){t&&f(e.prototype,t),n&&f(e,n)}(e,[{key:"prepareAlter",value:function(e){if(!h.has(e))throw Error('Alter operation "'.concat(e,'" not exist.'));for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];h.get(e).prepare.apply(this,n)}},{key:"triggerAlter",value:function(e){if(!h.has(e))throw Error('Alter operation "'.concat(e,'" not exist.'));for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];h.get(e).operate.apply(this,n),this.runLocalHooks.apply(this,["afterAlter"].concat(n))}},{key:"destroy",value:function(){this.sheet=null,this.hot=null,this.dataProvider=null,this.matrix=null}}]),e}();(0,r.mixin)(d,o.default);var p=d;t.default=p;var g=function(){};function v(e,t){h.has(e)||h.set(e,{prepare:t.prepare||g,operate:t.operate||g})}},function(e,t,n){"use strict";t.__esModule=!0,t.prepare=function(){var e=this.matrix,t=this.dataProvider;l=new WeakMap,(0,r.arrayEach)(e.data,function(e){l.set(e,t.t.toVisualRow(e.row))})},t.operate=function(){var e=this.matrix,t=this.dataProvider;e.cellReferences.length=0,(0,r.arrayEach)(e.data,function(e){e.setState(i.default.STATE_OUT_OFF_DATE),e.clearPrecedents();var n=e.row,r=e.column,s=t.getSourceDataAtCell(n,r);if((0,o.isFormulaExpression)(s)){var u=l.get(e),c=new a.default(s);c.translate({row:t.t.toVisualRow(n)-u}),t.updateSourceData(n,r,c.toString())}}),l=null},t.OPERATION_NAME=void 0;var r=n(1),o=n(57),i=s(n(58)),a=s(n(89));function s(e){return e&&e.__esModule?e:{default:e}}var l;t.OPERATION_NAME="column_sorting"},function(e,t,n){"use strict";t.__esModule=!0,t.operate=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=this.matrix,u=this.dataProvider,c=[0,t];(0,r.arrayEach)(s.cellReferences,function(t){t.column>=e&&t.translateTo.apply(t,c)}),(0,r.arrayEach)(s.data,function(r){var s=r.row,f=r.column;if(r.column>=e&&(r.translateTo.apply(r,c),r.setState(i.default.STATE_OUT_OFF_DATE)),n){var h=r.row,d=r.column,p=u.getSourceDataAtCell(h,d);if((0,o.isFormulaExpression)(p)){var g=(0,o.cellCoordFactory)("column",e),v=new a.default(p);v.useCustomModifier(l),v.translate({column:t},g({row:s,column:f})),u.updateSourceData(h,d,v.toString())}}})},t.OPERATION_NAME=void 0;var r=n(1),o=n(57),i=s(n(58)),a=s(n(89));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n,r){var o=e.start,i=e.end,a=o[t].index,s=i[t].index,l=n,u=n;return r>a&&(l=0),r>s&&(u=0),[l,u,!1]}t.OPERATION_NAME="insert_column"},function(e,t,n){"use strict";t.__esModule=!0,t.operate=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=this.matrix,u=this.dataProvider,c=[t,0];(0,r.arrayEach)(s.cellReferences,function(t){t.row>=e&&t.translateTo.apply(t,c)}),(0,r.arrayEach)(s.data,function(r){var s=r.row,f=r.column;if(r.row>=e&&(r.translateTo.apply(r,c),r.setState(i.default.STATE_OUT_OFF_DATE)),n){var h=r.row,d=r.column,p=u.getSourceDataAtCell(h,d);if((0,o.isFormulaExpression)(p)){var g=(0,o.cellCoordFactory)("row",e),v=new a.default(p);v.useCustomModifier(l),v.translate({row:t},g({row:s,column:f})),u.updateSourceData(h,d,v.toString())}}})},t.OPERATION_NAME=void 0;var r=n(1),o=n(57),i=s(n(58)),a=s(n(89));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n,r){var o=e.start,i=e.end,a=o[t].index,s=i[t].index,l=n,u=n;return r>a&&(l=0),r>s&&(u=0),[l,u,!1]}t.OPERATION_NAME="insert_row"},function(e,t,n){"use strict";t.__esModule=!0,t.operate=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=-t,u=this.matrix,c=this.dataProvider,f=this.sheet,h=[0,s],d=Math.abs(s)-1,p=u.removeCellRefsAtRange({column:e},{column:e+d}),g=[];(0,r.arrayEach)(u.data,function(t){(0,r.arrayEach)(p,function(e){t.hasPrecedent(e)&&(t.removePrecedent(e),t.setState(i.default.STATE_OUT_OFF_DATE),(0,r.arrayEach)(f.getCellDependencies(t.row,t.column),function(e){e.setState(i.default.STATE_OUT_OFF_DATE)}))}),t.column>=e&&t.column<=e+d&&g.push(t)}),u.remove(g),(0,r.arrayEach)(u.cellReferences,function(t){t.column>=e&&t.translateTo.apply(t,h)}),(0,r.arrayEach)(u.data,function(t){var r=t.row,u=t.column;if(t.column>=e&&(t.translateTo.apply(t,h),t.setState(i.default.STATE_OUT_OFF_DATE)),n){var f=t.row,d=t.column,p=c.getSourceDataAtCell(f,d);if((0,o.isFormulaExpression)(p)){var g=(0,o.cellCoordFactory)("column",e),v=new a.default(p);v.useCustomModifier(l),v.translate({column:s},g({row:r,column:u})),c.updateSourceData(f,d,v.toString())}}})},t.OPERATION_NAME=void 0;var r=n(1),o=n(57),i=s(n(58)),a=s(n(89));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n,r){var o=e.start,i=e.end,a=e.type,s=o[t].index,l=i[t].index,u=Math.abs(n)-1,c=n,f=n,h=!1;return s>=r&&l<=r+u&&(h=!0),h||"cell"!==a||r>=s&&(c=0,f=0),h||"range"!==a||(r>=s&&(c=0),r>l?f=0:l<=r+u&&(f-=Math.min(l-(r+u),0))),s+c<0&&(c-=s+c),[c,f,h]}t.OPERATION_NAME="remove_column"},function(e,t,n){"use strict";t.__esModule=!0,t.operate=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=-t,u=this.matrix,c=this.dataProvider,f=this.sheet,h=[s,0],d=Math.abs(s)-1,p=u.removeCellRefsAtRange({row:e},{row:e+d}),g=[];(0,r.arrayEach)(u.data,function(t){(0,r.arrayEach)(p,function(e){t.hasPrecedent(e)&&(t.removePrecedent(e),t.setState(i.default.STATE_OUT_OFF_DATE),(0,r.arrayEach)(f.getCellDependencies(t.row,t.column),function(e){e.setState(i.default.STATE_OUT_OFF_DATE)}))}),t.row>=e&&t.row<=e+d&&g.push(t)}),u.remove(g),(0,r.arrayEach)(u.cellReferences,function(t){t.row>=e&&t.translateTo.apply(t,h)}),(0,r.arrayEach)(u.data,function(t){var r=t.row,u=t.column;if(t.row>=e&&(t.translateTo.apply(t,h),t.setState(i.default.STATE_OUT_OFF_DATE)),n){var f=t.row,d=t.column,p=c.getSourceDataAtCell(f,d);if((0,o.isFormulaExpression)(p)){var g=(0,o.cellCoordFactory)("row",e),v=new a.default(p);v.useCustomModifier(l),v.translate({row:s},g({row:r,column:u})),c.updateSourceData(f,d,v.toString())}}})},t.OPERATION_NAME=void 0;var r=n(1),o=n(57),i=s(n(58)),a=s(n(89));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n,r){var o=e.start,i=e.end,a=e.type,s=o[t].index,l=i[t].index,u=Math.abs(n)-1,c=n,f=n,h=!1;return s>=r&&l<=r+u&&(h=!0),h||"cell"!==a||r>=s&&(c=0,f=0),h||"range"!==a||(r>=s&&(c=0),r>l?f=0:l<=r+u&&(f-=Math.min(l-(r+u),0))),s+c<0&&(c-=s+c),[c,f,h]}t.OPERATION_NAME="remove_row"},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1),o=n(5),i=n(2),a=n(75);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this.changes={},this.t=(0,a.getTranslator)(this.hot)}return function(e,t,n){t&&u(e.prototype,t),n&&u(e,n)}(e,[{key:"collectChanges",value:function(e,t,n){this.changes[this._coordId(e,t)]=n}},{key:"clearChanges",value:function(){this.changes={}}},{key:"isInDataRange",value:function(e,t){return e>=0&&e<this.hot.countRows()&&t>=0&&t<this.hot.countCols()}},{key:"getDataAtCell",value:function(e,t){var n=this._coordId.apply(this,l(this.t.toPhysical(e,t)));return(0,i.hasOwnProperty)(this.changes,n)?this.changes[n]:this.hot.getDataAtCell(e,t)}},{key:"getDataByRange",value:function(e,t,n,o){var a=this,s=this.hot.getData(e,t,n,o);return(0,r.arrayEach)(s,function(n,o){(0,r.arrayEach)(n,function(n,r){var u=a._coordId.apply(a,l(a.t.toPhysical(o+e,r+t)));(0,i.hasOwnProperty)(a.changes,u)&&(s[o][r]=a.changes[u])})}),s}},{key:"getSourceDataAtCell",value:function(e,t){var n=this._coordId(e,t);return(0,i.hasOwnProperty)(this.changes,n)?this.changes[n]:this.hot.getSourceDataAtCell(e,t)}},{key:"getSourceDataByRange",value:function(e,t,n,r){return this.hot.getSourceDataArray(e,t,n,r)}},{key:"getRawDataAtCell",value:function(e,t){return this.getSourceDataAtCell.apply(this,l(this.t.toPhysical(e,t)))}},{key:"getRawDataByRange",value:function(e,t,n,r){var a=this,l=[];return(0,o.rangeEach)(e,n,function(e){var n=[];(0,o.rangeEach)(t,r,function(t){var r=s(a.t.toPhysical(e,t),2),o=r[0],l=r[1],u=a._coordId(o,l);(0,i.hasOwnProperty)(a.changes,u)?n.push(a.changes[u]):n.push(a.getSourceDataAtCell(o,l))}),l.push(n)}),l}},{key:"updateSourceData",value:function(e,t,n){this.hot.getSourceData()[e][this.hot.colToProp(t)]=n}},{key:"_coordId",value:function(e,t){return"".concat(e,":").concat(t)}},{key:"destroy",value:function(){this.hot=null,this.changes=null,this.t=null}}]),e}();t.default=c},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1),o=a(n(838)),i=a(n(58));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sheet=t,this.stack=new o.default}return function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(e,[{key:"save",value:function(e,t,n){var o=this.sheet,i=o.matrix,a=o.dataProvider,s=[];(0,r.arrayEach)(i.data,function(r){var o=r.row,i=r.column;if(r[e]<t||r[e]>t+(n-1)){var l=a.getSourceDataAtCell(o,i);s.push({row:o,column:i,value:l})}}),this.stack.push({axis:e,index:t,amount:n,changes:s})}},{key:"restore",value:function(){var e=this.sheet,t=e.matrix,n=e.dataProvider,o=this.stack.pop(),a=o.axis,s=o.index,l=o.amount,u=o.changes;u&&(0,r.arrayEach)(u,function(e){e[a]>s+(l-1)&&(e[a]-=l);var r=e.row,o=e.column,u=e.value;n.getSourceDataAtCell(r,o)!==u&&(n.updateSourceData(r,o,u),t.getCellAt(r,o).setState(i.default.STATE_OUT_OFF_DATE))})}},{key:"destroy",value:function(){this.sheet=null,this.stack=null}}]),e}();t.default=l},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}t.__esModule=!0,t.default=void 0;var o=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.items=t}return function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(e,[{key:"push",value:function(){var e;(e=this.items).push.apply(e,arguments)}},{key:"pop",value:function(){return this.items.pop()}},{key:"peek",value:function(){return this.isEmpty()?void 0:this.items[this.items.length-1]}},{key:"isEmpty",value:function(){return!this.size()}},{key:"size",value:function(){return this.items.length}}]),e}();t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=h(n(7)),o=n(3),i=n(2),a=n(33),s=n(101),l=n(6),u=n(145),c=h(n(840)),f=h(n(841));function h(e){return e&&e.__esModule?e:{default:e}}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e,t,n){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n(842);var w=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=g(this,y(t).call(this,e))).settings={},n.dateCalculator=null,n.currentYear=null,n.monthList=[],n.monthHeadersArray=[],n.weekHeadersArray=[],n.rangeBars={},n.rangeList={},n.nestedHeadersPlugin=null,n.hotSource=null,n.overallWeekSectionCount=null,n.initialSettings=null,n.dataFeed=null,n.colorData={},n.rangeBarMeta=Object.create(null),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(t,r.default),function(e,t,n){t&&p(e.prototype,t),n&&p(e,n)}(t,[{key:"checkDependencies",value:function(){this.hot.getSettings().colHeaders||(0,a.warn)("You need to enable the colHeaders property in your Gantt Chart Handsontable in order for it to work properly.")}},{key:"isEnabled",value:function(){return!!this.hot.getSettings().ganttChart}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.checkDependencies(),this.parseSettings(),this.currentYear=this.settings.startYear||(new Date).getFullYear(),this.dateCalculator=new c.default({year:this.currentYear,allowSplitWeeks:this.settings.allowSplitWeeks,hideDaysBeforeFullWeeks:this.settings.hideDaysBeforeFullWeeks,hideDaysAfterFullWeeks:this.settings.hideDaysAfterFullWeeks}),this.dateCalculator.setFirstWeekDay(this.settings.firstWeekDay),this.monthList=this.dateCalculator.getMonthList(),this.monthHeadersArray=this.generateMonthHeaders(),this.weekHeadersArray=this.generateWeekHeaders(),this.overallWeekSectionCount=this.dateCalculator.countWeekSections(),this.assignGanttSettings(),this.nestedHeadersPlugin&&(this.applyDataSource(),this.colorData&&this.setRangeBarColors(this.colorData)),this.addHook("afterInit",function(){return e.onAfterInit()}),(0,o.addClass)(this.hot.rootElement,"ganttChart"),v(y(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.internalUpdateSettings||(this.dataFeed&&this.dataFeed.hotSource&&this.dataFeed.removeSourceHotHooks(this.dataFeed.hotSource),this.settings={},this.dataFeed={},this.currentYear=null,this.monthList=[],this.rangeBars={},this.rangeList={},this.rangeBarMeta={},this.hotSource=null,this.deassignGanttSettings(),(0,o.removeClass)(this.hot.rootElement,"ganttChart"),v(y(t.prototype),"disablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),v(y(t.prototype),"updatePlugin",this).call(this)}},{key:"parseSettings",value:function(){this.settings=this.hot.getSettings().ganttChart,"boolean"==typeof this.settings&&(this.settings={}),this.settings.firstWeekDay||(this.settings.firstWeekDay="monday"),void 0===this.settings.allowSplitWeeks&&(this.settings.allowSplitWeeks=!0),"function"!=typeof this.settings.weekHeaderGenerator&&(this.settings.weekHeaderGenerator=null)}},{key:"applyDataSource",value:function(){if(this.settings.dataSource){var e=this.settings.dataSource;e.instance?this.loadData(e.instance,e.startDateColumn,e.endDateColumn,e.additionalData,e.asyncUpdates):this.loadData(e)}}},{key:"loadData",value:function(e,t,n,r,o){this.dataFeed=new f.default(this.hot,e,t,n,r,o),this.hot.render()}},{key:"clearRangeBars",value:function(){this.rangeBars={}}},{key:"clearRangeList",value:function(){this.rangeList={}}},{key:"getRangeBarCoordinates",value:function(e){return this.rangeList[e]}},{key:"generateMonthHeaders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentYear;return this.dateCalculator.generateHeaderSet("months",this.settings.weekHeaderGenerator,e)}},{key:"generateWeekHeaders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentYear;return this.dateCalculator.generateHeaderSet("weeks",this.settings.weekHeaderGenerator,e)}},{key:"assignGanttSettings",value:function(){var e=this;this.initialSettings=(0,i.deepClone)(this.hot.getSettings());var t={data:(0,s.createEmptySpreadsheetData)(1,this.overallWeekSectionCount),readOnly:!0,renderer:function(t,n,r,o,i,a,s){return e.uniformBackgroundRenderer(t,n,r,o,i,a,s)},colWidths:60,hiddenColumns:!this.hot.getSettings().hiddenColumns||this.hot.getSettings().hiddenColumns,nestedHeaders:[this.monthHeadersArray.slice(),this.weekHeadersArray.slice()],collapsibleColumns:!this.hot.getSettings().collapsibleColumns||this.hot.getSettings().collapsibleColumns,columnSorting:!1,copyPaste:!1};this.internalUpdateSettings=!0,this.hot.updateSettings(t),this.internalUpdateSettings=void 0}},{key:"deassignGanttSettings",value:function(){this.internalUpdateSettings=!0,this.initialSettings&&this.hot.updateSettings(this.initialSettings),this.internalUpdateSettings=void 0}},{key:"cacheRangeBarMeta",value:function(e,t,n,r){this.rangeBarMeta[e]||(this.rangeBarMeta[e]={}),this.rangeBarMeta[e][t]||(this.rangeBarMeta[e][t]={}),this.rangeBarMeta[e][t][n]=r}},{key:"applyRangeBarMetaCache",value:function(){var e=this;(0,i.objectEach)(this.rangeBarMeta,function(t,n){(0,i.objectEach)(t,function(t,r){(0,i.objectEach)(t,function(t,o){e.hot.setCellMeta(n,r,o,t)})})})}},{key:"getAdjacentWeekColumn",value:function(e,t,n){var r=(0,u.parseDate)(e),o=!0===n?-7:7,i=r.setDate(r.getDate()+o);return this.dateCalculator.dateToColumn(i)}},{key:"addRangeBar",value:function(e,t,n,r){var o=this;null!==t&&null!==n&&this.prepareDaysInColumnsInfo((0,u.parseDate)(t),(0,u.parseDate)(n));var a=this.dateCalculator.dateToColumn(t),s=this.dateCalculator.dateToColumn(n),l=(0,u.getDateYear)(t),c=!1,f=!1;return null===a&&this.settings.hideDaysBeforeFullWeeks&&!1!==(a=this.getAdjacentWeekColumn(t,!0,!1))&&(c=!0),null===s&&this.settings.hideDaysAfterFullWeeks&&!1!==(s=this.getAdjacentWeekColumn(n,!1,!0))&&(f=!0),!(!this.dateCalculator.isValidRangeBarData(t,n)||!1===a||!1===s)&&(this.rangeBars[l]||(this.rangeBars[l]={}),this.rangeBars[l][e]||(this.rangeBars[l][e]={}),this.rangeBars[l][e][a]={barLength:s-a+1,partialStart:!c&&!this.dateCalculator.isOnTheEdgeOfWeek(t)[0],partialEnd:!f&&!this.dateCalculator.isOnTheEdgeOfWeek(n)[1],additionalData:{}},(0,i.objectEach)(r,function(t,n){o.rangeBars[l][e][a].additionalData[n]=t}),l===this.dateCalculator.getYear()&&(this.colorData[e]&&(this.rangeBars[l][e][a].colors=this.colorData[e]),this.rangeList[e]=[e,a],this.renderRangeBar(e,a,s,r)),[e,a])}},{key:"prepareDaysInColumnsInfo",value:function(e,t){for(var n=e.getFullYear();n<=t.getFullYear();n++)void 0===this.dateCalculator.daysInColumns[n]&&(this.dateCalculator.calculateWeekStructure(n),this.dateCalculator.generateHeaderSet("weeks",null,n))}},{key:"getRangeBarData",value:function(e,t){var n=this.dateCalculator.getYear(),r=this.getRangeBarCoordinates(e);if(!r)return!1;var o=this.rangeBars[n][r[0]][r[1]];return!(!o||e!==r[0]||!(t===r[1]||t>r[1]&&t<r[1]+o.barLength))&&o}},{key:"updateRangeBarData",value:function(e,t,n){var r=this.getRangeBarData(e,t);(0,i.objectEach)(n,function(e,t){r[t]!==e&&(r[t]=e)})}},{key:"renderRangeBar",value:function(e,t,n){for(var r=this.dateCalculator.getYear(),o=this.rangeBars[r][e][t],i=t;i<=n;i++){var a=this.hot.getCellMeta(e,i),s="".concat(a.className||""," rangeBar");(i===t&&o.partialStart||i===n&&o.partialEnd)&&(s+=" partial"),i===n&&(s+=" last"),this.hot.setCellMeta(e,i,"originalClassName",a.className),this.hot.setCellMeta(e,i,"className",s),this.hot.setCellMeta(e,i,"additionalData",o.additionalData),this.cacheRangeBarMeta(e,i,"originalClassName",a.className),this.cacheRangeBarMeta(e,i,"className",s),this.cacheRangeBarMeta(e,i,"additionalData",o.additionalData)}}},{key:"removeRangeBarByDate",value:function(e,t){var n=this.dateCalculator.dateToColumn(t);this.removeRangeBarByColumn(e,n)}},{key:"removeRangeBarByColumn",value:function(e,t){var n=this,r=this.dateCalculator.getYear(),o=this.rangeBars[r][e][t];o&&(this.unrenderRangeBar(e,t,t+o.barLength-1),this.rangeBars[r][e][t]=null,(0,i.objectEach)(this.rangeList,function(r,o){var i=parseInt(o,10);JSON.stringify(r)===JSON.stringify([e,t])&&(n.rangeList[i]=null)}))}},{key:"removeAllRangeBars",value:function(){var e=this;(0,i.objectEach)(this.rangeBars,function(t,n){(0,i.objectEach)(t,function(t,r){e.removeRangeBarByColumn(n,r)})})}},{key:"unrenderRangeBar",value:function(e,t,n){for(var r=t;r<=n;r++){var o=this.hot.getCellMeta(e,r);this.hot.setCellMeta(e,r,"className",o.originalClassName),this.hot.setCellMeta(e,r,"originalClassName",void 0),this.cacheRangeBarMeta(e,r,"className",o.originalClassName),this.cacheRangeBarMeta(e,r,"originalClassName",void 0)}this.hot.render()}},{key:"uniformBackgroundRenderer",value:function(e,t,n,r,o,a,s){var l=this.getRangeBarData(n,r),u=this.getRangeBarCoordinates(n);t.innerHTML="",s.className&&(t.className=s.className);var c="";(0,i.objectEach)(s.additionalData,function(e,t){c+="".concat(t,": ").concat(e,"\n")}),c=c.replace(/\n$/,""),t.title=c,l&&l.colors?r===u[1]&&l.partialStart||r===u[1]+l.barLength-1&&l.partialEnd?t.style.background=l.colors[1]:t.style.background=l.colors[0]:t.style.background=""}},{key:"setRangeBarColors",value:function(e){var t=this;this.colorData=e,(0,i.objectEach)(e,function(e,n){var r=t.getRangeBarCoordinates(n);r&&t.updateRangeBarData(r[0],r[1],{colors:e})}),this.hot.render()}},{key:"setYear",value:function(e){var t=(0,i.extend)(this.hot.getSettings().ganttChart,{startYear:e});this.hot.updateSettings({ganttChart:t})}},{key:"onAfterInit",value:function(){this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.applyDataSource()}},{key:"onUpdateSettings",value:function(){this.internalUpdateSettings?this.applyRangeBarMetaCache():v(y(t.prototype),"onUpdateSettings",this).call(this)}},{key:"destroy",value:function(){this.hotSource&&this.dataFeed.removeSourceHotHooks(this.hotSource),v(y(t.prototype),"destroy",this).call(this)}}]),t}();(0,l.registerPlugin)("ganttChart",w);var b=w;t.default=b},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(1),o=n(2),i=n(33),a=n(145);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=function(){function e(t){var n=t.year,r=t.allowSplitWeeks,o=void 0===r||r,i=t.hideDaysBeforeFullWeeks,a=void 0!==i&&i,s=t.hideDaysAfterFullWeeks,l=void 0!==s&&s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.year=n,this.firstWeekDay="monday",this.allowSplitWeeks=o,this.hideDaysBeforeFullWeeks=a,this.hideDaysAfterFullWeeks=l,this.weekSectionCount=0,this.monthListCache={},this.daysInColumns={},this.calculateWeekStructure()}return function(e,t,n){t&&l(e.prototype,t),n&&l(e,n)}(e,[{key:"setYear",value:function(e){this.year=e,this.monthListCache[e]=this.calculateMonthData(e),this.calculateWeekStructure(e)}},{key:"setFirstWeekDay",value:function(e){var t=e.toLowerCase();"monday"!==t&&"sunday"!==t&&(0,i.warn)("First day of the week must be set to either Monday or Sunday"),this.firstWeekDay=t,this.calculateWeekStructure()}},{key:"countWeekSections",value:function(){return this.weekSectionCount}},{key:"getFirstWeekDay",value:function(){return this.firstWeekDay}},{key:"getYear",value:function(){return this.year}},{key:"getMonthList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.year;return this.monthListCache[e]||(this.monthListCache[e]=this.calculateMonthData(e)),this.monthListCache[e]}},{key:"getFullMonthList",value:function(){return this.monthListCache}},{key:"dateToColumn",value:function(e){var t=(0,a.parseDate)(e);if(!t)return!1;var n=t.getMonth(),r=t.getDate()-1,o=t.getFullYear();return this.getWeekColumn(r,n,o)}},{key:"getWeekColumn",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getYear(),i=null,a=this.getMonthCacheArray(t,n);return(0,r.arrayEach)(a,function(t){if((0,o.objectEach)(t,function(t,n){if(t.indexOf(e+1)>-1)return i=parseInt(n,10),!1}),i)return!1}),i}},{key:"getMonthCacheArray",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getYear(),r=this.getMonthList(n),i=[];if(this.allowSplitWeeks)i.push(this.daysInColumns[n][e]);else{var a=-1;(0,o.objectEach)(this.daysInColumns[n],function(o,s){var l=r[s];if(Object.keys(o).length>1&&(a+=1),a===e)return l.daysBeforeFullWeeks>0&&i.push(t.daysInColumns[n][parseInt(s,10)-1]),i.push(o),l.daysAfterFullWeeks>0&&i.push(t.daysInColumns[n][parseInt(s,10)+1]),!1})}return i}},{key:"columnToDate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getYear(),n=null;(0,o.objectEach)(this.daysInColumns[t],function(t,r){if(t[e])return n=r,!1});var r=this.daysInColumns[t][n][e];if(1===r.length){var i=new Date(t,n,r[0]);return{start:i,end:i}}return{start:new Date(t,n,r[0]),end:new Date(t,n,r[r.length-1])}}},{key:"isOnTheEdgeOfWeek",value:function(e){var t=this,n=(0,a.parseDate)(e);if(!n)return null;var i=n.getMonth(),s=n.getDate()-1,l=n.getFullYear(),u=this.getMonthCacheArray(i,l),c=!1;return(0,r.arrayEach)(u,function(e){if((0,o.objectEach)(e,function(e){if(!t.allowSplitWeeks&&7!==e.length&&(0===s||s===new Date(n.getYear(),n.getMonth()+1,0).getDate()-1))return!0;var r=e.indexOf(s+1);return 0===r?(c=[1,0],!1):r===e.length-1?(c=[0,1],!1):void 0}),c)return!1}),c}},{key:"generateHeaderSet",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.year,i=this.getMonthList(r),a=[];return(0,o.objectEach)(i,function(o,i){var l=o.daysBeforeFullWeeks>0?1:0,u=o.daysAfterFullWeeks>0?1:0,c=n.hideDaysBeforeFullWeeks?0:l,f=n.hideDaysAfterFullWeeks?0:u,h=o.fullWeeks+(n.allowSplitWeeks?c+f:0),d=parseInt(i,10),p="";if("months"===e)a.push({label:o.name,colspan:h});else if("weeks"===e)for(var g=0;g<h;g++){var v=null,y=null;if(n.allowSplitWeeks||1!==o.fullWeeks){var m=s(n.getWeekColumnRange({monthObject:o,monthNumber:d,headerIndex:g,areDaysBeforeFullWeeksVisible:c,areDaysAfterFullWeeksVisible:f,headerCount:h,year:r}),2);v=m[0],y=m[1]}else{var w=s(n.getWeekColumnRange({monthObject:o,monthNumber:d,headerIndex:g,headerCount:h,areDaysBeforeFullWeeksVisible:c,areDaysAfterFullWeeksVisible:f,mixedMonth:!0,year:r}),2);v=w[0],y=w[1]}p=v===y?"".concat(v):"".concat(v," - ").concat(y),a.push(t?t.call(n,v,y):p),n.addDaysToCache(d,a.length-1,v,y,r)}}),a}},{key:"getWeekColumnRange",value:function(e){var t=e.monthObject,n=e.monthNumber,r=e.headerIndex,o=e.headerCount,i=e.areDaysBeforeFullWeeksVisible,s=e.areDaysAfterFullWeeksVisible,l=e.mixedMonth,u=void 0!==l&&l,c=e.year,f=void 0===c?this.year:c,h=this.getMonthList(f),d=this.allowSplitWeeks,p=null,g=null;return u?0===n?(g=h[n+1].daysBeforeFullWeeks,p=a.DEC_LENGTH-(a.WEEK_LENGTH-g)+1):n===h.length-1?(g=a.WEEK_LENGTH-h[n-1].daysAfterFullWeeks,p=h[n-1].days-h[n-1].daysAfterFullWeeks+1):(g=h[n+1].daysBeforeFullWeeks,p=h[n-1].days-(a.WEEK_LENGTH-g)+1):d&&i&&0===r?(p=r+1,g=t.daysBeforeFullWeeks):d&&s&&r===o-1?(p=t.days-t.daysAfterFullWeeks+1,g=t.days):(p=null,g=(p=d?t.daysBeforeFullWeeks+(r-i)*a.WEEK_LENGTH+1:t.daysBeforeFullWeeks+r*a.WEEK_LENGTH+1)+a.WEEK_LENGTH-1),[p,g]}},{key:"addDaysToCache",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.getYear();if(this.daysInColumns[o]||(this.daysInColumns[o]={}),this.daysInColumns[o][e]||(this.daysInColumns[o][e]={}),this.daysInColumns[o][e][t]||(this.daysInColumns[o][e][t]=[]),n<=r)for(var i=n;i<=r;i++)this.daysInColumns[o][e][t].push(i);else{for(var a=e-1>=0?this.countMonthDays(e):31,s=n;s<=a;s++)this.daysInColumns[o][e][t].push(s);for(var l=1;l<=r;l++)this.daysInColumns[o][e][t].push(l)}}},{key:"isValidRangeBarData",value:function(e,t){var n=(0,a.parseDate)(e),r=(0,a.parseDate)(t);return n&&r&&n.getTime()<=r.getTime()}},{key:"calculateMonthData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.year;return[{name:"January",days:31},{name:"February",days:new Date(e,2,0).getDate()},{name:"March",days:31},{name:"April",days:30},{name:"May",days:31},{name:"June",days:30},{name:"July",days:31},{name:"August",days:31},{name:"September",days:30},{name:"October",days:31},{name:"November",days:30},{name:"December",days:31}].slice(0)}},{key:"countMonths",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getYear();return this.monthListCache[e].length}},{key:"countMonthDays",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getYear();return this.monthListCache[t][e-1].days}},{key:"countMonthFullWeeks",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getYear();return this.monthListCache[t][e-1].fullWeeks}},{key:"calculateWeekStructure",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getYear();this.monthListCache[t]=this.calculateMonthData(t);var n=this.getFirstWeekDay(),o=this.getMonthList(t),i=[],s=this.hideDaysBeforeFullWeeks?0:1,l=this.hideDaysAfterFullWeeks?0:1,u=0,c=0;"monday"===n&&(u=1),(0,r.arrayEach)(o,function(n,r){var f=new Date(t,r,1).getDay(),h=0;if(n.daysBeforeFullWeeks=(7-f+u)%7,!e.allowSplitWeeks&&n.daysBeforeFullWeeks&&(i.push((0,a.getMixedMonthObject)((0,a.getMixedMonthName)(r,o),r)),h+=1),n.fullWeeks=Math.floor((n.days-n.daysBeforeFullWeeks)/7),n.daysAfterFullWeeks=n.days-n.daysBeforeFullWeeks-7*n.fullWeeks,e.allowSplitWeeks){var d=s*(n.daysBeforeFullWeeks?1:0),p=l*(n.daysAfterFullWeeks?1:0);c+=n.fullWeeks+d+p}else r===o.length-1&&n.daysAfterFullWeeks&&(i.push((0,a.getMixedMonthObject)((0,a.getMixedMonthName)(r,o),null)),h+=1),c+=n.fullWeeks+h}),(0,r.arrayEach)(i,function(n,r){var o=n.index;delete n.index,e.addMixedMonth(null===o?o:r+o,n,t)}),t===this.getYear()&&(this.weekSectionCount=c)}},{key:"addMixedMonth",value:function(e,t,n){null===e?this.monthListCache[n].push(t):this.monthListCache[n].splice(e,0,t)}}]),e}();t.default=u},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(2),o=n(1),i=n(5),a=n(145);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(t,n,r,o,i,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data=n,this.chartInstance=t,this.chartPlugin=this.chartInstance.getPlugin("ganttChart"),this.hotSource=null,this.sourceHooks={},this.ongoingAsync=!1,this.applyData(n,r,o,i,a||!1)}return function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(e,[{key:"applyData",value:function(e,t,n,r,o){if("[object Array]"===Object.prototype.toString.call(e))e.length>1&&this.chartInstance.alter("insert_row",0,e.length-1,"".concat(this.pluginName,".loadData")),this.loadData(e);else if(e instanceof this.chartInstance.constructor){var i=e.countRows();i>1&&this.chartInstance.alter("insert_row",0,i-1,"".concat(this.pluginName,".loadData")),this.bindWithHotInstance(e,t,n,r,o)}}},{key:"bindWithHotInstance",value:function(e,t,n,r,o){this.hotSource={instance:e,startColumn:t,endColumn:n,additionalData:r,asyncUpdates:o},this.addSourceHotHooks(),this.asyncCall(this.updateFromSource)}},{key:"asyncCall",value:function(e){var t=this;this.hotSource.asyncUpdates?(this.asyncStart(),setTimeout(function(){e.call(t),t.asyncEnd()},0)):e.call(this)}},{key:"asyncStart",value:function(){this.ongoingAsync=!0}},{key:"asyncEnd",value:function(){this.ongoingAsync=!1}},{key:"addSourceHotHooks",value:function(){var e=this;this.sourceHooks={afterLoadData:function(){return e.onAfterSourceLoadData()},afterChange:function(t){return e.onAfterSourceChange(t)},afterColumnSort:function(){return e.onAfterColumnSort()}},this.hotSource.instance.addHook("afterLoadData",this.sourceHooks.afterLoadData),this.hotSource.instance.addHook("afterChange",this.sourceHooks.afterChange),this.hotSource.instance.addHook("afterColumnSort",this.sourceHooks.afterColumnSort)}},{key:"removeSourceHotHooks",value:function(e){this.sourceHooks.afterLoadData&&e.instance.removeHook("afterLoadData",this.sourceHooks.afterLoadData),this.sourceHooks.afterChange&&e.instance.removeHook("afterChange",this.sourceHooks.afterChange),this.sourceHooks.afterColumnSort&&e.instance.removeHook("afterColumnSort",this.sourceHooks.afterColumnSort)}},{key:"getDataFromSource",value:function(e){var t,n={},o=this.hotSource,i=[];void 0===e?t=o.instance.getData(0,0,o.instance.countRows()-1,o.instance.countCols()-1):(t=[])[e]=o.instance.getDataAtRow(e);for(var a=function(e,a){n={};var s=t[e];if(null===s[o.startColumn]||""===s[o.startColumn])return"continue";(0,r.objectEach)(o.additionalData,function(e,t){n[t]=s[e]}),i.push([e,s[o.startColumn],s[o.endColumn],n,e])},s=e||0,l=t.length;s<(e?e+1:l);s++)a(s);return i}},{key:"updateFromSource",value:function(e){var t=this.getDataFromSource(e);!e&&isNaN(e)&&(this.chartPlugin.clearRangeBars(),this.chartPlugin.clearRangeList()),this.loadData(t),this.chartInstance.render()}},{key:"loadData",value:function(e){var t=this,n=[];(0,o.arrayEach)(e,function(e,r){e.row=r;var o=t.splitRangeIfNeeded(e);n=n.concat(o)}),(0,o.arrayEach)(n,function(e){t.chartPlugin.addRangeBar(e.row,(0,a.getStartDate)(e),(0,a.getEndDate)(e),(0,a.getAdditionalData)(e)),delete e.row})}},{key:"splitRangeIfNeeded",value:function(e){var t=[],n=new Date((0,a.getStartDate)(e)),o=new Date((0,a.getEndDate)(e));if("string"==typeof n||"string"==typeof o)return!1;var s=n.getFullYear(),l=o.getFullYear();return s===l?[e]:((0,i.rangeEach)(s,l,function(n){var o=(0,r.clone)(e);n!==s&&(0,a.setStartDate)(o,"01/01/".concat(n)),n!==l&&(0,a.setEndDate)(o,"12/31/".concat(n)),t.push(o)}),t)}},{key:"onAfterSourceChange",value:function(e){var t=this;this.asyncCall(function(){if(e){for(var n={},o=0,i=e.length;o<i;o++){var a=e[o],s=parseInt(a[0],10),l=parseInt(a[1],10);n[s]||(n[s]={}),n[s][l]=[a[2],a[3]]}(0,r.objectEach)(n,function(e,n){var r=parseInt(n,10);t.chartPlugin.getRangeBarCoordinates(r)&&t.chartPlugin.removeRangeBarByColumn(r,t.chartPlugin.rangeList[r][1]),t.updateFromSource(n)})}})}},{key:"onAfterSourceLoadData",value:function(){var e=this;this.asyncCall(function(){e.chartPlugin.removeAllRangeBars(),e.updateFromSource()})}},{key:"onAfterColumnSort",value:function(){var e=this;this.asyncCall(function(){e.chartPlugin.removeAllRangeBars(),e.updateFromSource()})}}]),e}();t.default=l},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(6),i=n(5),a=function(e){return e&&e.__esModule?e:{default:e}}(n(7));function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e,t,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=u(this,f(t).call(this,e))).settings=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(t,a.default),function(e,t,n){t&&l(e.prototype,t),n&&l(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().headerTooltips}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.settings=this.hot.getSettings().headerTooltips,this.parseSettings(),this.addHook("afterGetColHeader",function(t,n){return e.onAfterGetHeader(t,n)}),this.addHook("afterGetRowHeader",function(t,n){return e.onAfterGetHeader(t,n)}),c(f(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.settings=null,this.clearTitleAttributes(),c(f(t.prototype),"disablePlugin",this).call(this)}},{key:"parseSettings",value:function(){"boolean"==typeof this.settings&&(this.settings={rows:!0,columns:!0,onlyTrimmed:!1})}},{key:"clearTitleAttributes",value:function(){var e=this.hot.view.wt.getSetting("columnHeaders").length,t=this.hot.view.wt.wtTable.THEAD,n=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.THEAD,r=this.hot.view.wt.wtOverlays.topLeftCornerOverlay,o=r?r.clone.wtTable.THEAD:null;(0,i.rangeEach)(0,e-1,function(e){var r=t.childNodes[e],a=n.childNodes[e],s=o?o.childNodes[e]:null;(0,i.rangeEach)(0,r.childNodes.length-1,function(e){r.childNodes[e].removeAttribute("title"),a&&a.childNodes[e]&&a.childNodes[e].removeAttribute("title"),o&&s&&s.childNodes[e]&&s.childNodes[e].removeAttribute("title")})},!0)}},{key:"onAfterGetHeader",value:function(e,t){var n=t.querySelector("span"),o="THEAD"===t.parentNode.parentNode.nodeName;(o&&this.settings.columns||!o&&this.settings.rows)&&(this.settings.onlyTrimmed?(0,r.outerWidth)(n)>=(0,r.outerWidth)(t)&&0!==(0,r.outerWidth)(n)&&t.setAttribute("title",n.textContent):t.setAttribute("title",n.textContent))}},{key:"destroy",value:function(){this.settings=null,c(f(t.prototype),"destroy",this).call(this)}}]),t}();(0,o.registerPlugin)("headerTooltips",d);var p=d;t.default=p},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(5),i=n(1),a=n(2),s=n(37),l=n(33),u=n(6),c=d(n(7)),f=n(13),h=d(n(845));function d(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(){var e=y(["Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\n is currently not supported and might result in glitches."]);return g=function(){return e},e}function v(){var e=y(["You have declared a Nested Header overlapping the Fixed Columns section - it may lead to visual\n glitches. To prevent that kind of problems, split the nested headers between the fixed and non-fixed columns."]);return v=function(){return e},e}function y(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t,n){return(w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=b(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(846);var O=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?E(e):t}(this,b(t).call(this,e))).settings=[],n.columnHeaderLevelCount=0,n.colspanArray=[],n.ghostTable=new h.default(E(E(n))),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}(t,c.default),function(e,t,n){t&&m(e.prototype,t),n&&m(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().nestedHeaders}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.settings=this.hot.getSettings().nestedHeaders,this.addHook("afterGetColumnHeaderRenderers",function(t){return e.onAfterGetColumnHeaderRenderers(t)}),this.addHook("afterInit",function(){return e.onAfterInit()}),this.addHook("afterOnCellMouseDown",function(t,n){return e.onAfterOnCellMouseDown(t,n)}),this.addHook("beforeOnCellMouseOver",function(t,n,r,o){return e.onBeforeOnCellMouseOver(t,n,r,o)}),this.addHook("afterViewportColumnCalculatorOverride",function(t){return e.onAfterViewportColumnCalculatorOverride(t)}),this.addHook("modifyColWidth",function(t,n){return e.onModifyColWidth(t,n)}),this.setupColspanArray(),this.checkForFixedColumnsCollision(),this.columnHeaderLevelCount=this.hot.view?this.hot.view.wt.getSetting("columnHeaders").length:0,w(b(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.clearColspans(),this.settings=[],this.columnHeaderLevelCount=0,this.colspanArray=[],this.ghostTable.clear(),w(b(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),w(b(t.prototype),"updatePlugin",this).call(this),this.ghostTable.buildWidthsMapper()}},{key:"clearColspans",value:function(){if(this.hot.view)for(var e=this.hot.view.wt.getSetting("columnHeaders").length,t=this.hot.view.wt.wtTable.THEAD,n=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.THEAD,r=this.hot.view.wt.wtOverlays.topLeftCornerOverlay?this.hot.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.THEAD:null,o=0;o<e;o++){var i=t.childNodes[o];if(!i)break;for(var a=n.childNodes[o],s=r?r.childNodes[o]:null,l=0,u=i.childNodes.length;l<u;l++)i.childNodes[l].removeAttribute("colspan"),a&&a.childNodes[l]&&a.childNodes[l].removeAttribute("colspan"),r&&s&&s.childNodes[l]&&s.childNodes[l].removeAttribute("colspan")}}},{key:"checkForFixedColumnsCollision",value:function(){var e=this,t=this.hot.getSettings().fixedColumnsLeft;(0,i.arrayEach)(this.colspanArray,function(n,r){e.getNestedParent(r,t)!==t&&(0,l.warn)((0,s.toSingleLine)(v()))})}},{key:"checkForOverlappingHeaders",value:function(){var e=this;(0,i.arrayEach)(this.colspanArray,function(t,n){(0,i.arrayEach)(e.colspanArray[n],function(t,r){if(t.colspan>1){var o=e.levelToRowCoords(n),a=e.getChildHeaders(o,r);if(a.length>0){var u=0;return(0,i.arrayEach)(a,function(t){u+=e.getColspan(o+1,t)}),u>t.colspan&&(0,l.warn)((0,s.toSingleLine)(g())),!1}}})})}},{key:"setupColspanArray",value:function(){var e=this;(0,a.objectEach)(this.settings,function(t,n){(0,a.objectEach)(t,function(t,r,o){if(function(e,t){e[t]||(e[t]=[])}(e.colspanArray,n),void 0===o[r].colspan)e.colspanArray[n].push({label:o[r]||"",colspan:1,hidden:!1});else{var i=o[r].colspan||1;e.colspanArray[n].push({label:o[r].label||"",colspan:i,hidden:!1}),e.fillColspanArrayWithDummies(i,n)}})})}},{key:"fillColspanArrayWithDummies",value:function(e,t){var n=this;(0,o.rangeEach)(0,e-2,function(){n.colspanArray[t].push({label:"",colspan:1,hidden:!0})})}},{key:"headerRendererFactory",value:function(e){var t=this;return function(n,o){if(o.removeAttribute("colspan"),(0,r.removeClass)(o,"hiddenHeader"),t.colspanArray[e][n]&&t.colspanArray[e][n].colspan){var i=t.colspanArray[e][n].colspan,a=t.hot.getSettings().fixedColumnsLeft||0,s=t.hot.view.wt.wtOverlays.topLeftCornerOverlay,l=t.hot.view.wt.wtOverlays.leftOverlay,u=!!s&&s.clone.wtTable.THEAD.contains(o),c=!!l&&l.clone.wtTable.THEAD.contains(o);i>1&&o.setAttribute("colspan",u||c?Math.min(i,a-n):i),(u||c&&n===a-1)&&(0,r.addClass)(o,"overlayEdge")}t.colspanArray[e][n]&&t.colspanArray[e][n].hidden&&(0,r.addClass)(o,"hiddenHeader"),(0,r.empty)(o);var f=document.createElement("DIV");(0,r.addClass)(f,"relative");var h=document.createElement("SPAN");(0,r.addClass)(h,"colHeader"),(0,r.fastInnerHTML)(h,t.colspanArray[e][n]&&t.colspanArray[e][n].label||""),f.appendChild(h),o.appendChild(f),t.hot.runHooks("afterGetColHeader",n,o)}}},{key:"getColspan",value:function(e,t){var n=this.colspanArray[this.rowCoordsToLevel(e)][t];return n?n.colspan:1}},{key:"levelToRowCoords",value:function(e){return e-this.columnHeaderLevelCount}},{key:"rowCoordsToLevel",value:function(e){return e+this.columnHeaderLevelCount}},{key:"getNestedParent",value:function(e,t){if(e<0)return!1;var n=this.colspanArray[e][t]?this.colspanArray[e][t].colspan:1,r=!!this.colspanArray[e][t]&&this.colspanArray[e][t].hidden;if(n>1||1===n&&!1===r)return t;var o=t-1;do{if(this.colspanArray[e][o].colspan>1)break;o-=1}while(t>=0);return o}},{key:"getChildHeaders",value:function(e,t){var n=this.rowCoordsToLevel(e),r=this.colspanArray[n+1],i=this.getNestedParent(n,t),a=this.colspanArray[n][t].colspan,s=[];return r?((0,o.rangeEach)(i,i+a-1,function(e){r[e]&&r[e].colspan>1&&(a-=r[e].colspan-1),r[e]&&!r[e].hidden&&-1===s.indexOf(e)&&s.push(e)}),s):s}},{key:"fillTheRemainingColspans",value:function(){var e=this;(0,a.objectEach)(this.settings,function(t,n){(0,o.rangeEach)(e.colspanArray[n].length-1,e.hot.countCols()-1,function(r){e.colspanArray[n].push({label:t[r]||"",colspan:1,hidden:!1})},!0)})}},{key:"updateHeadersHighlight",value:function(){var e=this,t=this.hot.getSelectedLast();if(void 0!==t){var n=this.hot.view.wt.wtOverlays,a=this.hot.selection.isSelectedByColumnHeader(),s=Math.min(t[1],t[3]),l=Math.max(t[1],t[3]),u=a?-1:this.columnHeaderLevelCount-1,c=[],f=function(e){return function(t,n){return function(){return n(t,e)}}},h=f("ht__highlight"),d=f("ht__active_highlight");(0,o.rangeEach)(s,l,function(t){for(var o=function(o){var f=e.getNestedParent(o,t),p=[n.topOverlay?n.topOverlay.clone.wtTable.getColumnHeader(f,o):void 0,n.topLeftCornerOverlay?n.topLeftCornerOverlay.clone.wtTable.getColumnHeader(f,o):void 0],g=e.getColspan(o-e.columnHeaderLevelCount,f),v=f>=s&&f+g-1<=l;(0,i.arrayEach)(p,function(e){if(void 0===e)return!1;!a&&o<u||a&&!v?(c.push(h(e,r.removeClass)),a&&c.push(d(e,r.removeClass))):(c.push(h(e,r.addClass)),a&&c.push(d(e,r.addClass)))})},f=e.columnHeaderLevelCount-1;f>-1;f--)o(f)}),(0,i.arrayEach)(c,function(e){e()}),c.length=0}}},{key:"onAfterViewportColumnCalculatorOverride",value:function(e){var t=this,n=e.startColumn;(0,o.rangeEach)(0,Math.max(this.columnHeaderLevelCount-1,0),function(r){var o=t.getNestedParent(r,e.startColumn);o<e.startColumn&&(n=Math.min(n,o))}),e.startColumn=n}},{key:"onAfterOnCellMouseDown",value:function(e,t){if(t.row<0){var n=this.getColspan(t.row,t.col),r=t.col+n-1;if(n>1){var o=this.hot.countRows()-1;this.hot.selection.setRangeEnd(new f.CellCoords(o,r))}}}},{key:"onBeforeOnCellMouseOver",value:function(e,t,n,r){if(!(t.row>=0||t.col<0)&&this.hot.view.isMouseDown()){var o=this.hot.getSelectedRangeLast(),i=o.from,a=o.to,s=this.getColspan(t.row,t.col),l=t.col+s-1,u=!1;if(i.col<=a.col?(t.col<i.col&&l===a.col||t.col<i.col&&l<i.col||t.col<i.col&&l>=i.col&&l<a.col)&&(u=!0):(t.col<a.col&&l>i.col||t.col>i.col||t.col<=a.col&&l>i.col||t.col>a.col&&l>i.col)&&(u=!0),u){var c=[a.col,i.col];i.col=c[0],a.col=c[1]}if(s>1){var f;r.column=!0,r.cell=!0;var h=[];i.col===a.col&&(l<=i.col&&t.col<i.col?h.push(a.col,t.col):h.push(t.col<i.col?t.col:i.col,l>a.col?l:a.col)),i.col<a.col&&h.push(t.col<i.col?t.col:i.col,l),i.col>a.col&&h.push(i.col,t.col),(f=this.hot).selectColumns.apply(f,h)}}}},{key:"onAfterInit",value:function(){this.columnHeaderLevelCount=this.hot.view.wt.getSetting("columnHeaders").length,this.fillTheRemainingColspans(),this.checkForOverlappingHeaders(),this.ghostTable.buildWidthsMapper()}},{key:"onAfterGetColumnHeaderRenderers",value:function(e){if(e){e.length=0;for(var t=this.colspanArray.length-1;t>=0;t--)e.push(this.headerRendererFactory(t));e.reverse()}this.updateHeadersHighlight()}},{key:"onModifyColWidth",value:function(e,t){var n=this.ghostTable.widthsCache[t];return e>n?e:n}},{key:"destroy",value:function(){this.settings=null,this.columnHeaderLevelCount=null,this.colspanArray=null,w(b(t.prototype),"destroy",this).call(this)}}]),t}();(0,u.registerPlugin)("nestedHeaders",O);var S=O;t.default=S},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(2);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.nestedHeaders=t,this.container=void 0,this.widthsCache=[]}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(e,[{key:"buildWidthsMapper",value:function(){this.container=document.createElement("div"),this.buildGhostTable(this.container),this.nestedHeaders.hot.rootElement.appendChild(this.container);for(var e=this.container.querySelectorAll("tr:last-of-type th"),t=e.length,n=0;n<t;n++)this.widthsCache.push(e[n].offsetWidth);this.container.parentNode.removeChild(this.container),this.container=null,this.nestedHeaders.hot.render()}},{key:"buildGhostTable",value:function(e){for(var t=document,n=t.createDocumentFragment(),i=t.createElement("table"),a=!1,s=!!this.nestedHeaders.hot.getSettings().dropdownMenu,l=this.nestedHeaders.colspanArray.length,u=this.nestedHeaders.hot.countCols(),c=l-1,f=0;f<l;f++){var h=t.createElement("tr");a=!1;for(var d=0;d<u;d++){var p=t.createElement("th"),g=(0,o.clone)(this.nestedHeaders.colspanArray[f][d]);g&&!g.hidden&&(f===c&&(g.colspan>1&&(a=!0),s&&(g.label+='<button class="changeType"></button>')),(0,r.fastInnerHTML)(p,g.label),p.colSpan=g.colspan,h.appendChild(p))}i.appendChild(h)}if(a){for(var v=t.createElement("tr"),y=0;y<u;y++){var m=t.createElement("th");v.appendChild(m)}i.appendChild(v)}n.appendChild(i),e.appendChild(n)}},{key:"clear",value:function(){this.container=null,this.widthsCache.length=0}}]),e}();t.default=a},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=h(n(7)),o=n(6),i=n(5),a=n(1),s=n(13),l=h(n(848)),u=h(n(849)),c=h(n(466)),f=h(n(850));function h(e){return e&&e.__esModule?e:{default:e}}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t,n){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(851);var b=new WeakMap,C=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?w(e):t}(this,y(t).call(this,e))).sourceData=null,n.trimRowsPlugin=null,n.bindRowsWithHeadersPlugin=null,n.dataManager=null,n.headersUI=null,b.set(w(w(n)),{changeSelection:!1,movedToFirstChild:!1,movedToCollapsed:!1,skipRender:null}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(t,r.default),function(e,t,n){t&&g(e.prototype,t),n&&g(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().nestedRows}},{key:"enablePlugin",value:function(){var e=this;this.sourceData=this.hot.getSourceData(),this.trimRowsPlugin=this.hot.getPlugin("trimRows"),this.manualRowMovePlugin=this.hot.getPlugin("manualRowMove"),this.bindRowsWithHeadersPlugin=this.hot.getPlugin("bindRowsWithHeaders"),this.dataManager=new l.default(this,this.hot,this.sourceData),this.collapsingUI=new u.default(this,this.hot,this.trimRowsPlugin),this.headersUI=new c.default(this,this.hot),this.contextMenuUI=new f.default(this,this.hot),this.dataManager.rewriteCache(),this.addHook("afterInit",function(){return e.onAfterInit.apply(e,arguments)}),this.addHook("beforeRender",function(){return e.onBeforeRender.apply(e,arguments)}),this.addHook("modifyRowData",function(){return e.onModifyRowData.apply(e,arguments)}),this.addHook("modifySourceLength",function(){return e.onModifySourceLength.apply(e,arguments)}),this.addHook("beforeDataSplice",function(){return e.onBeforeDataSplice.apply(e,arguments)}),this.addHook("beforeDataFilter",function(){return e.onBeforeDataFilter.apply(e,arguments)}),this.addHook("afterContextMenuDefaultOptions",function(){return e.onAfterContextMenuDefaultOptions.apply(e,arguments)}),this.addHook("afterGetRowHeader",function(){return e.onAfterGetRowHeader.apply(e,arguments)}),this.addHook("beforeOnCellMouseDown",function(){return e.onBeforeOnCellMouseDown.apply(e,arguments)}),this.addHook("afterRemoveRow",function(){return e.onAfterRemoveRow.apply(e,arguments)}),this.addHook("modifyRemovedAmount",function(){return e.onModifyRemovedAmount.apply(e,arguments)}),this.addHook("beforeAddChild",function(){return e.onBeforeAddChild.apply(e,arguments)}),this.addHook("afterAddChild",function(){return e.onAfterAddChild.apply(e,arguments)}),this.addHook("beforeDetachChild",function(){return e.onBeforeDetachChild.apply(e,arguments)}),this.addHook("afterDetachChild",function(){return e.onAfterDetachChild.apply(e,arguments)}),this.addHook("modifyRowHeaderWidth",function(){return e.onModifyRowHeaderWidth.apply(e,arguments)}),this.addHook("afterCreateRow",function(){return e.onAfterCreateRow.apply(e,arguments)}),this.addHook("beforeRowMove",function(){return e.onBeforeRowMove.apply(e,arguments)}),this.addHook("afterRowMove",function(){return e.onAfterRowMove.apply(e,arguments)}),this.trimRowsPlugin.isEnabled()||(this.trimRowsPlugin.enablePlugin(),this.hot.getSettings().trimRows=!0),v(y(t.prototype),"enablePlugin",this).call(this)}},{key:"disablePlugin",value:function(){v(y(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),v(y(t.prototype),"updatePlugin",this).call(this)}},{key:"onBeforeRowMove",value:function(e,t){var n,r,o,i=b.get(this),a=e.length,s=[],l=this.dataManager.translateTrimmedRow(t),u=!0,c=null;for(n=0;n<a;n++)s.push(this.dataManager.translateTrimmedRow(e[n])),this.dataManager.isParent(s[n])&&(u=!1);if(s.indexOf(l)>-1||!u)return!1;if(r=this.dataManager.getRowParent(s[0]),null!==(c=this.dataManager.getRowParent(l))&&void 0!==c||(c=this.dataManager.getRowParent(l-1)),null!==c&&void 0!==c||(c=this.dataManager.getDataObject(l-1),i.movedToFirstChild=!0),!c)return!1;for(o=r===c,i.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(c),this.collapsingUI.collapsedRowsStash.stash(),o||(Math.max.apply(Math,s)<=l?this.collapsingUI.collapsedRowsStash.shiftStash(s[0],-1*e.length):this.collapsingUI.collapsedRowsStash.shiftStash(l,e.length)),i.changeSelection=!0,(s[a-1]<=l&&o||!0===i.movedToFirstChild)&&(e.reverse(),s.reverse(),!0!==i.movedToFirstChild&&(l-=1)),n=0;n<a;n++)this.dataManager.moveRow(s[n],l);if(s[s.length-1]<l)for(n=a-1;n>=0;n--)this.dataManager.moveCellMeta(s[n],l);else for(n=0;n<a;n++)this.dataManager.moveCellMeta(s[n],l);return(s[a-1]<=l&&o||this.dataManager.isParent(l))&&e.reverse(),this.dataManager.rewriteCache(),!1}},{key:"onAfterRowMove",value:function(e,t){var n=b.get(this);if(n.changeSelection){var r,o,i=e.length,a=0,l=0,u=null;if(this.collapsingUI.collapsedRowsStash.applyStash(),r=this.dataManager.translateTrimmedRow(t),n.movedToFirstChild)n.movedToFirstChild=!1,a=t,l=t+i-1,t>=Math.max.apply(Math,p(e))&&(a-=i,l-=i);else if(n.movedToCollapsed){var c=this.dataManager.getRowParent(r-1);null!==c&&void 0!==c||(c=this.dataManager.getDataObject(r-1)),l=a=this.dataManager.getRowIndex(c)}else e[i-1]<t?a=(l=t-1)-i+1:l=(a=t)+i-1;u=this.hot.selection,o=this.hot.countCols()-1,u.setRangeStart(new s.CellCoords(a,0)),u.setRangeEnd(new s.CellCoords(l,o),!0),n.changeSelection=!1}}},{key:"onBeforeOnCellMouseDown",value:function(e,t,n){this.collapsingUI.toggleState(e,t,n)}},{key:"onModifyRowData",value:function(e){return this.dataManager.getDataObject(e)}},{key:"onModifySourceLength",value:function(){return this.dataManager.countAllRows()}},{key:"onBeforeDataSplice",value:function(e,t,n){return this.dataManager.spliceData(e,t,n),!1}},{key:"onBeforeDataFilter",value:function(e,t){var n=[],r=this.dataManager.translateTrimmedRow(e),o=b.get(this);return(0,i.rangeEach)(r,r+t-1,function(e){n.push(e)}),this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(r,t),this.collapsingUI.collapsedRowsStash.shiftStash(r,-1*t),this.dataManager.filterData(e,t,n),o.skipRender=!0,!1}},{key:"onAfterContextMenuDefaultOptions",value:function(e){return this.contextMenuUI.appendOptions(e)}},{key:"onAfterGetRowHeader",value:function(e,t){this.headersUI.appendLevelIndicators(e,t)}},{key:"onModifyRowHeaderWidth",value:function(e){return this.headersUI.rowHeaderWidthCache||e}},{key:"onAfterRemoveRow",value:function(e,t,n,r){var o=this;if(r!==this.pluginName){var i=b.get(this);setTimeout(function(){i.skipRender=null,o.headersUI.updateRowHeaderWidth(),o.collapsingUI.collapsedRowsStash.applyStash()},0)}}},{key:"onModifyRemovedAmount",value:function(e,t){var n=this,r=[],o=0;return(0,i.rangeEach)(t,t+e-1,function(e){var t=!1,i=n.collapsingUI.translateTrimmedRow(e),s=n.dataManager.getDataObject(i);n.dataManager.hasChildren(s)&&(r.push(s),(0,a.arrayEach)(r,function(e){if(e.__children.indexOf(s)>-1)return t=!0,!1}),t||(o+=n.dataManager.countChildren(s))),t=!1,(0,a.arrayEach)(r,function(e){if(e.__children.indexOf(s)>-1)return t=!0,!1}),t&&(o-=1)}),e+o}},{key:"onBeforeAddChild",value:function(){this.collapsingUI.collapsedRowsStash.stash()}},{key:"onAfterAddChild",value:function(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}},{key:"onBeforeDetachChild",value:function(){this.collapsingUI.collapsedRowsStash.stash()}},{key:"onAfterDetachChild",value:function(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}},{key:"onAfterCreateRow",value:function(e,t,n){n!==this.pluginName&&this.dataManager.rewriteCache()}},{key:"onAfterInit",value:function(){this.bindRowsWithHeadersPlugin.bindStrategy.strategy&&this.bindRowsWithHeadersPlugin.bindStrategy.createMap(this.hot.countSourceRows());var e=Math.max.apply(Math,p(this.dataManager.cache.levels));e>0&&this.headersUI.updateRowHeaderWidth(e)}},{key:"onBeforeRender",value:function(e,t){b.get(this).skipRender&&(t.skipRender=!0)}}]),t}();(0,o.registerPlugin)("nestedRows",C);var E=C;t.default=E},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(5),o=n(2),i=n(1),a=n(75);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=n,this.data=r,this.plugin=t,this.parentReference=new WeakMap,this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},this.recordTranslator=(0,a.getTranslator)(this.hot)}return function(e,t,n){t&&l(e.prototype,t),n&&l(e,n)}(e,[{key:"rewriteCache",value:function(){var e=this;this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},(0,r.rangeEach)(0,this.data.length-1,function(t){e.cacheNode(e.data[t],0,null)})}},{key:"cacheNode",value:function(e,t,n){var r=this;this.cache.levels[t]||(this.cache.levels[t]=[],this.cache.levelCount+=1),this.cache.levels[t].push(e),this.cache.rows.push(e),this.cache.nodeInfo.set(e,{parent:n,row:this.cache.rows.length-1,level:t}),this.hasChildren(e)&&(0,i.arrayEach)(e.__children,function(n){r.cacheNode(n,t+1,e)})}},{key:"getDataObject",value:function(e){return null===e||void 0===e?null:this.cache.rows[e]}},{key:"readTreeNodes",value:function(e,t,n,r){var o=this,a=!1,s=t;if(isNaN(s)&&s.end)return s;var l=e;return l||(l={__children:this.data},a=!0,s-=1),null!==n&&void 0!==n&&s===n?{result:l,end:!0}:null!==r&&void 0!==r&&l===r?{result:s,end:!0}:(s+=1,l.__children&&(0,i.arrayEach)(l.__children,function(e){if(o.parentReference.set(e,a?null:l),s=o.readTreeNodes(e,s,n,r),isNaN(s)&&s.end)return!1}),s)}},{key:"updateParentReference",value:function(){this.readTreeNodes({__children:this.data},0,this.hot.countRows())}},{key:"mockParent",value:function(){var e=this.mockNode();return e.__children=this.data,e}},{key:"mockNode",value:function(){var e={};return(0,o.objectEach)(this.data[0],function(t,n){e[n]=null}),e}},{key:"getRowIndex",value:function(e){return null===e||void 0===e?null:this.cache.nodeInfo.get(e).row}},{key:"getRowIndexWithinParent",value:function(e){var t=null;t=isNaN(e)?e:this.getDataObject(e);var n=this.getRowParent(e);return null===n||void 0===n?this.data.indexOf(t):n.__children.indexOf(t)}},{key:"countAllRows",value:function(){var e={__children:this.data};return this.countChildren(e)}},{key:"countChildren",value:function(e){var t=this,n=0,r=e;return isNaN(r)||(r=this.getDataObject(r)),r&&r.__children?((0,i.arrayEach)(r.__children,function(e){n+=1,e.__children&&(n+=t.countChildren(e))}),n):0}},{key:"getRowParent",value:function(e){var t;return t=isNaN(e)?e:this.getDataObject(e),this.getRowObjectParent(t)}},{key:"getRowObjectParent",value:function(e){return"object"!==s(e)?null:this.cache.nodeInfo.get(e).parent}},{key:"getRowLevel",value:function(e){var t=null;return(t=isNaN(e)?e:this.getDataObject(e))?this.getRowObjectLevel(t):null}},{key:"getRowObjectLevel",value:function(e){return null===e||void 0===e?null:this.cache.nodeInfo.get(e).level}},{key:"hasChildren",value:function(e){var t=e;return isNaN(t)||(t=this.getDataObject(t)),!(!t.__children||!t.__children.length)}},{key:"isParent",value:function(e){var t=e;return isNaN(t)||(t=this.getDataObject(t)),!!(0,o.hasOwnProperty)(t,"__children")}},{key:"addChild",value:function(e,t){var n=t;this.hot.runHooks("beforeAddChild",e,n);var r=null;e&&(r=this.getRowIndex(e)),this.hot.runHooks("beforeCreateRow",r+this.countChildren(e)+1,1);var o=e;e||(o=this.mockParent()),o.__children||(o.__children=[]),n||(n=this.mockNode()),o.__children.push(n),this.rewriteCache();var i=this.getRowIndex(n);this.hot.runHooks("afterCreateRow",i,1),this.hot.runHooks("afterAddChild",e,n)}},{key:"addChildAtIndex",value:function(e,t,n,r){var o=n;this.hot.runHooks("beforeAddChild",e,o,t),this.hot.runHooks("beforeCreateRow",r+1,1);var i=e;e||(i=this.mockParent()),i.__children||(i.__children=[]),o||(o=this.mockNode()),i.__children.splice(t,null,o),this.rewriteCache(),this.hot.runHooks("afterCreateRow",r+1,1),this.hot.runHooks("afterAddChild",e,o,t)}},{key:"addSibling",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below",n=this.translateTrimmedRow(e),r=this.getRowParent(n),o=this.getRowIndexWithinParent(n);switch(t){case"below":this.addChildAtIndex(r,o+1,null,e);break;case"above":this.addChildAtIndex(r,o,null,e)}}},{key:"detachFromParent",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=null,i=[];Array.isArray(e)?((0,r.rangeEach)(e[0],e[2],function(e){var n=t.translateTrimmedRow(e);i.push(t.getDataObject(n))}),(0,r.rangeEach)(0,i.length-2,function(e){t.detachFromParent(i[e],!1)}),o=i[i.length-1]):o=e;var a=this.getRowIndex(o),s=this.getRowIndexWithinParent(o),l=this.getRowParent(o),u=this.getRowParent(l),c=this.getRowIndex(u),f=null;this.hot.runHooks("beforeDetachChild",l,o),null!==s&&void 0!==s&&(this.hot.runHooks("beforeRemoveRow",a,1,[a],this.plugin.pluginName),l.__children.splice(s,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",a,1,[a],this.plugin.pluginName),u?(f=c+this.countChildren(u),this.hot.runHooks("beforeCreateRow",f,1,this.plugin.pluginName),u.__children.push(o)):(f=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",f,1,this.plugin.pluginName),this.data.push(o))),this.rewriteCache(),this.hot.runHooks("afterCreateRow",f,1,this.plugin.pluginName),n&&this.hot.render(),this.hot.runHooks("afterDetachChild",l,o)}},{key:"filterData",value:function(e,t,n){var r=this,o=[];(0,i.arrayEach)(n,function(e){o.push(r.getDataObject(e))}),(0,i.arrayEach)(o,function(e){var t=r.getRowIndexWithinParent(e),n=r.getRowParent(e);null===n?r.data.splice(t,1):n.__children.splice(t,1)}),this.rewriteCache()}},{key:"spliceData",value:function(e,t,n){var r=this.translateTrimmedRow(e);if(null!==r&&void 0!==r){var o=this.getDataObject(r-1),i=null,a=null;o&&o.__children&&0===o.__children.length?(i=o,a=0):(i=this.getRowParent(r),a=this.getRowIndexWithinParent(r)),i?n?i.__children.splice(a,t,n):i.__children.splice(a,t):n?this.data.splice(a,t,n):this.data.splice(a,t),this.rewriteCache()}}},{key:"moveRow",value:function(e,t){var n=this.isParent(t),r=this.getRowParent(e),o=this.getRowIndexWithinParent(e),i=this.getRowParent(t);null!==i&&void 0!==i||(i=this.getRowParent(t-1)),null!==i&&void 0!==i||(i=this.getDataObject(t-1)),i?i.__children||(i.__children=[]):(i=this.getDataObject(t)).__children=[];var a=this.getRowParent(t-1),s=n?this.countChildren(a):this.getRowIndexWithinParent(t),l=r.__children.slice(o,o+1);r.__children.splice(o,1),i.__children.splice(s,0,l[0])}},{key:"moveCellMeta",value:function(e,t){var n=this.hot.getCellMetaAtRow(e);this.hot.spliceCellsMeta(t,0,n),this.hot.spliceCellsMeta(e+(e<t?0:1),1)}},{key:"translateTrimmedRow",value:function(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}}]),e}();t.default=u},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(16),o=n(1),i=n(5),a=n(3),s=u(n(146)),l=u(n(466));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=h(this,d(t).call(this,e,n))).trimRowsPlugin=e.trimRowsPlugin,r.dataManager=r.plugin.dataManager,r.collapsedRows=[],r.collapsedRowsStash={stash:function(){r.lastCollapsedRows=r.collapsedRows.slice(0),r.expandMultipleChildren(r.lastCollapsedRows,!1)},shiftStash:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=r.translateTrimmedRow(e);(0,o.arrayEach)(r.lastCollapsedRows,function(e,o){e>n-1&&(r.lastCollapsedRows[o]=e+t)})},applyStash:function(){r.hot.runHooks("skipLengthCache",100),r.collapseMultipleChildren(r.lastCollapsedRows,!0),r.lastCollapsedRows=void 0},trimStash:function(e,t){(0,i.rangeEach)(e,e+t-1,function(e){var t=r.lastCollapsedRows.indexOf(e);t>-1&&r.lastCollapsedRows.splice(t,1)})}},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(t,s.default),function(e,t,n){t&&f(e.prototype,t),n&&f(e,n)}(t,[{key:"collapseChildren",value:function(e){var t,n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=[],s=null,l=null;return isNaN(e)?(s=e,l=this.dataManager.getRowIndex(s)):(s=this.dataManager.getDataObject(e),l=e),this.dataManager.hasChildren(s)&&(0,o.arrayEach)(s.__children,function(e){a.push(n.dataManager.getRowIndex(e))}),t=this.collapseRows(a,!0,!1),i&&this.trimRowsPlugin.trimRows(t),r&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(l)&&this.collapsedRows.push(l),t}},{key:"collapseMultipleChildren",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=[];(0,o.arrayEach)(e,function(e){i=i.concat(t.collapseChildren(e,!1,!1))}),r&&this.trimRowsPlugin.trimRows(i),n&&this.renderAndAdjust()}},{key:"collapseRow",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.collapseRows([e],t)}},{key:"collapseRows",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[];return(0,o.arrayEach)(e,function(e){i.push(e),n&&t.collapseChildRows(e,i)}),r&&this.trimRowsPlugin.trimRows(i),i}},{key:"collapseChildRows",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=(arguments.length>2&&arguments[2],arguments.length>3&&void 0!==arguments[3]&&arguments[3]);if(this.dataManager.hasChildren(e)){var i=this.dataManager.getDataObject(e);(0,o.arrayEach)(i.__children,function(e){var r=t.dataManager.getRowIndex(e);n.push(r),t.collapseChildRows(r,n)})}r&&this.trimRowsPlugin.trimRows(n)}},{key:"expandRow",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.expandRows([e],t)}},{key:"expandRows",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[];return(0,o.arrayEach)(e,function(e){i.push(e),n&&t.expandChildRows(e,i)}),r&&this.trimRowsPlugin.untrimRows(i),i}},{key:"expandChildRows",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=(arguments.length>2&&arguments[2],arguments.length>3&&void 0!==arguments[3]&&arguments[3]);if(this.dataManager.hasChildren(e)){var i=this.dataManager.getDataObject(e);(0,o.arrayEach)(i.__children,function(e){if(!t.isAnyParentCollapsed(e)){var r=t.dataManager.getRowIndex(e);n.push(r),t.expandChildRows(r,n)}})}r&&this.trimRowsPlugin.untrimRows(n)}},{key:"expandChildren",value:function(e){var t,n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=[],s=null,l=null;return isNaN(e)?(s=e,l=this.dataManager.getRowIndex(e)):(s=this.dataManager.getDataObject(e),l=e),this.collapsedRows.splice(this.collapsedRows.indexOf(l),1),this.dataManager.hasChildren(s)&&(0,o.arrayEach)(s.__children,function(e){var t=n.dataManager.getRowIndex(e);a.push(t)}),t=this.expandRows(a,!0,!1),i&&this.trimRowsPlugin.untrimRows(t),r&&this.renderAndAdjust(),t}},{key:"expandMultipleChildren",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=[];(0,o.arrayEach)(e,function(e){i=i.concat(t.expandChildren(e,!1,!1))}),r&&this.trimRowsPlugin.untrimRows(i),n&&this.renderAndAdjust()}},{key:"collapseAll",value:function(){var e=this,t=this.hot.getSourceData(),n=[];(0,o.arrayEach)(t,function(t){e.dataManager.hasChildren(t)&&n.push(t)}),this.collapseMultipleChildren(n),this.renderAndAdjust()}},{key:"expandAll",value:function(){var e=this,t=this.hot.getSourceData(),n=[];(0,o.arrayEach)(t,function(t){e.dataManager.hasChildren(t)&&n.push(t)}),this.expandMultipleChildren(n),this.renderAndAdjust()}},{key:"areChildrenCollapsed",value:function(e){var t=this,n=null,r=!0;return n=isNaN(e)?e:this.dataManager.getDataObject(e),this.dataManager.hasChildren(n)&&(0,o.arrayEach)(n.__children,function(e){var n=t.dataManager.getRowIndex(e);if(!t.trimRowsPlugin.isTrimmed(n))return r=!1,!1}),r}},{key:"isAnyParentCollapsed",value:function(e){for(var t=e;null!==t;){t=this.dataManager.getRowParent(t);var n=this.dataManager.getRowIndex(t);if(this.collapsedRows.indexOf(n)>-1)return!0}return!1}},{key:"toggleState",value:function(e,t){if(!(t.col>=0)){var n=this.translateTrimmedRow(t.row);(0,a.hasClass)(e.target,l.default.CSS_CLASSES.button)&&(this.areChildrenCollapsed(n)?this.expandChildren(n):this.collapseChildren(n),(0,r.stopImmediatePropagation)(e))}}},{key:"translateTrimmedRow",value:function(e){return this.trimRowsPlugin.rowsMapper.getValueByIndex(e)}},{key:"renderAndAdjust",value:function(){this.hot.render(),this.hot.view.wt.wtOverlays.adjustElementsSize()}}]),t}();t.default=g},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(5),o=n(1),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4)),a=function(e){return e&&e.__esModule?e:{default:e}}(n(146));function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var h=new WeakMap,d=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?f(e):t}(this,u(t).call(this,e,n)),h.set(f(f(r)),{row_above:function(e,t){r.dataManager.addSibling(t.start.row,"above")},row_below:function(e,t){r.dataManager.addSibling(t.start.row,"below")}}),r.dataManager=r.plugin.dataManager,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,a.default),function(e,t,n){t&&l(e.prototype,t),n&&l(e,n)}(t,[{key:"appendOptions",value:function(e){var t=this,n=[{key:"add_child",name:function(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD)},callback:function(){var e=t.dataManager.translateTrimmedRow(t.hot.getSelectedLast()[0]),n=t.dataManager.getDataObject(e);t.dataManager.addChild(n)},disabled:function(){var e=t.hot.getSelectedLast();return!e||e[0]<0||t.hot.selection.isSelectedByColumnHeader()||t.hot.countRows()>=t.hot.getSettings().maxRows}},{key:"detach_from_parent",name:function(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD)},callback:function(){t.dataManager.detachFromParent(t.hot.getSelectedLast())},disabled:function(){var e=t.hot.getSelectedLast(),n=t.dataManager.translateTrimmedRow(e[0]);return!t.dataManager.getRowParent(n)||!e||e[0]<0||t.hot.selection.isSelectedByColumnHeader()||t.hot.countRows()>=t.hot.getSettings().maxRows}},{name:"---------"}];return(0,r.rangeEach)(0,e.items.length-1,function(t){if(0===t)return(0,o.arrayEach)(n,function(n,r){e.items.splice(t+r,0,n)}),!1}),this.modifyRowInsertingOptions(e)}},{key:"modifyRowInsertingOptions",value:function(e){var t=h.get(this);return(0,r.rangeEach)(0,e.items.length-1,function(n){var r=t[e.items[n].key];null!==r&&void 0!==r&&(e.items[n].callback=r)}),e}}]),t}();t.default=d},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=f(n(7)),o=n(3),i=n(5),a=n(1),s=n(6),l=n(56),u=f(n(853)),c=f(n(854));function f(e){return e&&e.__esModule?e:{default:e}}function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e,t,n){return(g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n(855);var m=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=p(this,v(t).call(this,e))).settings={},n.hiddenColumns=[],n.lastSelectedColumn=-1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(t,r.default),function(e,t,n){t&&d(e.prototype,t),n&&d(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().hiddenColumns}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.hot.hasColHeaders()?this.addHook("afterGetColHeader",function(t,n){return e.onAfterGetColHeader(t,n)}):this.addHook("afterRenderer",function(t,n,r){return e.onAfterGetColHeader(r,t)}),this.addHook("afterContextMenuDefaultOptions",function(t){return e.onAfterContextMenuDefaultOptions(t)}),this.addHook("afterGetCellMeta",function(t,n,r){return e.onAfterGetCellMeta(t,n,r)}),this.addHook("modifyColWidth",function(t,n){return e.onModifyColWidth(t,n)}),this.addHook("beforeSetRangeStartOnly",function(t){return e.onBeforeSetRangeStart(t)}),this.addHook("beforeSetRangeEnd",function(t){return e.onBeforeSetRangeEnd(t)}),this.addHook("hiddenColumn",function(t){return e.isHidden(t)}),this.addHook("beforeStretchingColumnWidth",function(t,n){return e.onBeforeStretchingColumnWidth(t,n)}),this.addHook("afterCreateCol",function(t,n){return e.onAfterCreateCol(t,n)}),this.addHook("afterRemoveCol",function(t,n){return e.onAfterRemoveCol(t,n)}),this.hot.view&&this.onAfterPluginsInitialized(),g(v(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),g(v(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.settings={},this.hiddenColumns=[],this.lastSelectedColumn=-1,this.hot.render(),g(v(t.prototype),"disablePlugin",this).call(this),this.resetCellsMeta()}},{key:"showColumns",value:function(e){var t=this;(0,a.arrayEach)(e,function(e){var n=parseInt(e,10);n=t.getLogicalColumnIndex(n),t.isHidden(n,!0)&&t.hiddenColumns.splice(t.hiddenColumns.indexOf(n),1)})}},{key:"showColumn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.showColumns(t)}},{key:"hideColumns",value:function(e){var t=this;(0,a.arrayEach)(e,function(e){var n=parseInt(e,10);n=t.getLogicalColumnIndex(n),t.isHidden(n,!0)||t.hiddenColumns.push(n)})}},{key:"hideColumn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.hideColumns(t)}},{key:"isHidden",value:function(e){var t=e;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||(t=this.getLogicalColumnIndex(t)),this.hiddenColumns.indexOf(t)>-1}},{key:"resetCellsMeta",value:function(){(0,a.arrayEach)(this.hot.getCellsMeta(),function(e){e&&(e.skipColumnOnPaste=!1,null!==e.baseRenderer&&(e.renderer=e.baseRenderer,e.baseRenderer=null))})}},{key:"getLogicalColumnIndex",value:function(e){return this.hot.runHooks("modifyCol",e)}},{key:"onBeforeStretchingColumnWidth",value:function(e,t){var n=e;return this.isHidden(t)&&(n=0),n}},{key:"onModifyColWidth",value:function(e,t){return this.isHidden(t)?.1:this.settings.indicators&&(this.isHidden(t+1)||this.isHidden(t-1))?e+(this.hot.hasColHeaders()?15:0):void 0}},{key:"onAfterGetCellMeta",value:function(e,t,n){var r=this.hot.runHooks("unmodifyCol",t);if(!1===this.settings.copyPasteEnabled&&this.isHidden(t)&&(n.skipColumnOnPaste=!0),this.isHidden(r)?(n.renderer!==w&&(n.baseRenderer=n.renderer),n.renderer=w):null!==n.baseRenderer&&(n.renderer=n.baseRenderer,n.baseRenderer=null),this.isHidden(n.visualCol-1)){var o=!0,i=n.visualCol-1;n.className=n.className||"",-1===n.className.indexOf("afterHiddenColumn")&&(n.className+=" afterHiddenColumn");do{if(!this.isHidden(i)){o=!1;break}i-=1}while(i>=0);o&&-1===n.className.indexOf("firstVisibleColumn")&&(n.className+=" firstVisibleColumn")}else if(n.className){var a=n.className.split(" ");if(a.length){var s=a.indexOf("afterHiddenColumn");s>-1&&a.splice(s,1);var l=a.indexOf("firstVisibleColumn");l>-1&&a.splice(l,1),n.className=a.join(" ")}}}},{key:"onModifyCopyableRange",value:function(e){var t=this,n=[],r=function(e,t,r,o){n.push({startRow:e,endRow:t,startCol:r,endCol:o})};return(0,a.arrayEach)(e,function(e){var n=!0,o=0;(0,i.rangeEach)(e.startCol,e.endCol,function(i){t.isHidden(i)?(n||r(e.startRow,e.endRow,o,i-1),n=!0):(n&&(o=i),i===e.endCol&&r(e.startRow,e.endRow,o,i),n=!1)})}),n}},{key:"onAfterGetColHeader",value:function(e,t){if(!this.isHidden(e)){var n=!0,r=e-1;do{if(!this.isHidden(r)){n=!1;break}r-=1}while(r>=0);n&&(0,o.addClass)(t,"firstVisibleColumn"),this.settings.indicators&&(this.isHidden(e-1)&&(0,o.addClass)(t,"afterHiddenColumn"),this.isHidden(e+1)&&e>-1&&(0,o.addClass)(t,"beforeHiddenColumn"))}}},{key:"onBeforeSetRangeStart",value:function(e){var t=this;if(!(e.col>0)){e.col=0;e.col=function e(n){var r=n,o=t.getLogicalColumnIndex(r);return t.isHidden(o,!0)&&(r=e(r+=1)),r}(e.col)}}},{key:"onBeforeSetRangeEnd",value:function(e){var t=this,n=this.hot.countCols();e.col=function r(o){var a=o,s=t.getLogicalColumnIndex(a);return t.isHidden(s,!0)&&(t.lastSelectedColumn>a||e.col===n-1?a>0?a=r(a-=1):(0,i.rangeEach)(0,t.lastSelectedColumn,function(e){if(!t.isHidden(e))return a=e,!1}):a=r(a+=1)),a}(e.col),this.lastSelectedColumn=e.col}},{key:"onAfterContextMenuDefaultOptions",value:function(e){e.items.push({name:l.SEPARATOR},(0,u.default)(this),(0,c.default)(this))}},{key:"onAfterCreateCol",value:function(e,t){var n=[];(0,a.arrayEach)(this.hiddenColumns,function(r){var o=r;o>=e&&(o+=t),n.push(o)}),this.hiddenColumns=n}},{key:"onAfterRemoveCol",value:function(e,t){var n=[];(0,a.arrayEach)(this.hiddenColumns,function(r){var o=r;o>=e&&(o-=t),n.push(o)}),this.hiddenColumns=n}},{key:"onAfterPluginsInitialized",value:function(){var e=this,t=this.hot.getSettings().hiddenColumns;"object"===h(t)&&(this.settings=t,void 0===t.copyPasteEnabled&&(t.copyPasteEnabled=!0),Array.isArray(t.columns)&&this.hideColumns(t.columns),t.copyPasteEnabled||this.addHook("modifyCopyableRange",function(t){return e.onModifyCopyableRange(t)}))}},{key:"destroy",value:function(){g(v(t.prototype),"destroy",this).call(this)}}]),t}();function w(e,t){t.textContent=""}(0,s.registerPlugin)("hiddenColumns",m);var b=m;t.default=b},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_columns_hide",name:function(){var e=this.getSelectedLast(),t=0;if(Array.isArray(e)){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(e,4),r=n[1],i=n[3];r-i!=0&&(t=1)}return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_HIDE_COLUMN,t)},callback:function(){var t=this.getSelectedRangeLast(),n=t.from,o=t.to,i=Math.min(n.col,o.col),a=Math.max(n.col,o.col);(0,r.rangeEach)(i,a,function(t){return e.hideColumn(t)}),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},disabled:!1,hidden:function(){return!this.selection.isSelectedByColumnHeader()}}};var r=n(5),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4))},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){var t=[],n=[];return{key:"hidden_columns_show",name:function(){var i=this.getSelectedLast(),a=0;if(Array.isArray(i)){var s=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(i,4),l=s[1],u=s[3];if(l>u){var c=[u,l];l=c[0],u=c[1]}var f=0;l===u?f=t.length+n.length:(0,r.rangeEach)(l,u,function(t){e.isHidden(t)&&(f+=1)}),a=f<=1?0:1}return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_SHOW_COLUMN,a)},callback:function(){var o=this.getSelectedRangeLast(),i=o.from,a=o.to,s=Math.min(i.col,a.col),l=Math.max(i.col,a.col);s===l?(t.length===s&&(e.showColumns(t),t.length=0),n.length===this.countSourceCols()-(s+1)&&(e.showColumns(n),n.length=0)):(0,r.rangeEach)(s,l,function(t){return e.showColumn(t)}),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},disabled:!1,hidden:function(){if(!e.hiddenColumns.length||!this.selection.isSelectedByColumnHeader())return!0;t.length=0,n.length=0;var o=this.getSelectedRangeLast(),i=o.from,a=o.to,s=Math.min(i.col,a.col),l=Math.max(i.col,a.col),u=!1;if(s===l){var c=this.countSourceCols();(0,r.rangeEach)(0,c,function(r){var o=t.length+n.length;if(o===e.hiddenColumns.length)return!1;r<s&&e.isHidden(r)?t.push(r):e.isHidden(r)&&n.push(r)}),c-=1,(t.length===s&&s>0||n.length===c-s&&s<c)&&(u=!0)}else(0,r.rangeEach)(s,l,function(t){if(e.isHidden(t))return u=!0,!1});return!u}}};var r=n(5),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4))},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(7)),o=n(3),i=n(5),a=n(1),s=n(6),l=c(n(857)),u=c(n(858));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e,t,n){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n(859);var y=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=d(this,g(t).call(this,e))).settings={},n.hiddenRows=[],n.lastSelectedRow=-1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(t,r.default),function(e,t,n){t&&h(e.prototype,t),n&&h(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().hiddenRows}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.hot.hasRowHeaders()?this.addHook("afterGetRowHeader",function(t,n){return e.onAfterGetRowHeader(t,n)}):this.addHook("afterRenderer",function(t,n){return e.onAfterGetRowHeader(n,t)}),this.addHook("afterContextMenuDefaultOptions",function(t){return e.onAfterContextMenuDefaultOptions(t)}),this.addHook("afterGetCellMeta",function(t,n,r){return e.onAfterGetCellMeta(t,n,r)}),this.addHook("modifyRowHeight",function(t,n){return e.onModifyRowHeight(t,n)}),this.addHook("beforeSetRangeStartOnly",function(t){return e.onBeforeSetRangeStartOnly(t)}),this.addHook("beforeSetRangeStart",function(t){return e.onBeforeSetRangeStart(t)}),this.addHook("beforeSetRangeEnd",function(t){return e.onBeforeSetRangeEnd(t)}),this.addHook("hiddenRow",function(t){return e.isHidden(t)}),this.addHook("afterCreateRow",function(t,n){return e.onAfterCreateRow(t,n)}),this.addHook("afterRemoveRow",function(t,n){return e.onAfterRemoveRow(t,n)}),this.hot.view&&this.onAfterPluginsInitialized(),p(g(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.onAfterPluginsInitialized(),p(g(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.settings={},this.hiddenRows=[],this.lastSelectedRow=-1,p(g(t.prototype),"disablePlugin",this).call(this),this.resetCellsMeta()}},{key:"showRows",value:function(e){var t=this;(0,a.arrayEach)(e,function(e){var n=parseInt(e,10);n=t.getLogicalRowIndex(n),t.isHidden(n,!0)&&t.hiddenRows.splice(t.hiddenRows.indexOf(n),1)})}},{key:"showRow",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.showRows(t)}},{key:"hideRows",value:function(e){var t=this;(0,a.arrayEach)(e,function(e){var n=parseInt(e,10);n=t.getLogicalRowIndex(n),t.isHidden(n,!0)||t.hiddenRows.push(n)})}},{key:"hideRow",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.hideRows(t)}},{key:"isHidden",value:function(e){var t=e;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||(t=this.getLogicalRowIndex(t)),this.hiddenRows.indexOf(t)>-1}},{key:"resetCellsMeta",value:function(){(0,a.arrayEach)(this.hot.getCellsMeta(),function(e){e&&(e.skipRowOnPaste=!1)})}},{key:"getLogicalRowIndex",value:function(e){return this.hot.runHooks("modifyRow",e)}},{key:"onAfterGetCellMeta",value:function(e,t,n){var r=this.hot.runHooks("unmodifyRow",e);if(!1===this.settings.copyPasteEnabled&&this.isHidden(r)?n.skipRowOnPaste=!0:n.skipRowOnPaste=!1,this.isHidden(r-1)){var o=!0,i=r-1;n.className=n.className||"",-1===n.className.indexOf("afterHiddenRow")&&(n.className+=" afterHiddenRow");do{if(!this.isHidden(i)){o=!1;break}i-=1}while(i>=0);o&&-1===n.className.indexOf("firstVisibleRow")&&(n.className+=" firstVisibleRow")}else if(n.className){var a=n.className.split(" ");if(a.length){var s=a.indexOf("afterHiddenRow");s>-1&&a.splice(s,1);var l=a.indexOf("firstVisibleRow");l>-1&&a.splice(l,1),n.className=a.join(" ")}}}},{key:"onAfterGetRowHeader",value:function(e,t){var n=t.parentNode;n&&(this.isHidden(e)?(0,o.addClass)(n,"hide"):(0,o.removeClass)(n,"hide"));var r=!0,i=e-1;do{if(!this.isHidden(i)){r=!1;break}i-=1}while(i>=0);r&&(0,o.addClass)(t,"firstVisibleRow"),this.settings.indicators&&this.hot.hasRowHeaders()&&(this.isHidden(e-1)&&(0,o.addClass)(t,"afterHiddenRow"),this.isHidden(e+1)&&(0,o.addClass)(t,"beforeHiddenRow"))}},{key:"onModifyRowHeight",value:function(e,t){return this.isHidden(t)?.1:e}},{key:"onModifyCopyableRange",value:function(e){var t=this,n=[],r=function(e,t,r,o){n.push({startRow:e,endRow:t,startCol:r,endCol:o})};return(0,a.arrayEach)(e,function(e){var n=!0,o=0;(0,i.rangeEach)(e.startRow,e.endRow,function(i){t.isHidden(i)?(n||r(o,i-1,e.startCol,e.endCol),n=!0):(n&&(o=i),i===e.endRow&&r(o,i,e.startCol,e.endCol),n=!1)})}),n}},{key:"onBeforeSetRangeStart",value:function(e){var t=this,n=this.hot.getSelectedLast()||!1,r=this.hot.countRows()-1;e.row=function e(o){var i=0,a=o;return n&&(i=a>n[0]?1:-1,t.lastSelectedRow=n[0]),r<a||a<0?t.lastSelectedRow:(t.isHidden(a)&&(a=e(a+i)),a)}(e.row)}},{key:"onBeforeSetRangeStartOnly",value:function(e){var t=this;if(!(e.row>0)){e.row=0;e.row=function e(n){var r=n;return t.isHidden(r)&&(r=e(r+=1)),r}(e.row)}}},{key:"onBeforeSetRangeEnd",value:function(e){var t=this,n=this.hot.countRows();e.row=function r(o){var a=o;return t.isHidden(a)&&(t.lastSelectedRow>a||e.row===n-1?a>0?a=r(a-=1):(0,i.rangeEach)(0,t.lastSelectedRow,function(e){if(!t.isHidden(e))return a=e,!1}):a=r(a+=1)),a}(e.row),this.lastSelectedRow=e.row}},{key:"onAfterContextMenuDefaultOptions",value:function(e){e.items.push({name:"---------"},(0,l.default)(this),(0,u.default)(this))}},{key:"onAfterCreateRow",value:function(e,t){var n=[];(0,a.arrayEach)(this.hiddenRows,function(r){var o=r;o>=e&&(o+=t),n.push(o)}),this.hiddenRows=n}},{key:"onAfterRemoveRow",value:function(e,t){var n=[];(0,a.arrayEach)(this.hiddenRows,function(r){var o=r;o>=e&&(o-=t),n.push(o)}),this.hiddenRows=n}},{key:"onAfterPluginsInitialized",value:function(){var e=this,t=this.hot.getSettings().hiddenRows;"object"===f(t)&&(this.settings=t,void 0===t.copyPasteEnabled&&(t.copyPasteEnabled=!0),Array.isArray(t.rows)&&this.hideRows(t.rows),t.copyPasteEnabled||this.addHook("modifyCopyableRange",function(t){return e.onModifyCopyableRange(t)}))}},{key:"destroy",value:function(){p(g(t.prototype),"destroy",this).call(this)}}]),t}();(0,s.registerPlugin)("hiddenRows",y);var m=y;t.default=m},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_rows_hide",name:function(){var e=this.getSelectedLast(),t=0;if(Array.isArray(e)){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(e,3),r=n[0],i=n[2];r-i!=0&&(t=1)}return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_HIDE_ROW,t)},callback:function(){var t=this.getSelectedRangeLast(),n=t.from,o=t.to,i=Math.min(n.row,o.row),a=Math.max(n.row,o.row);(0,r.rangeEach)(i,a,function(t){return e.hideRow(t)}),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},disabled:!1,hidden:function(){return!this.selection.isSelectedByRowHeader()}}};var r=n(5),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4))},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){var t=[],n=[];return{key:"hidden_rows_show",name:function(){var i=this.getSelectedLast(),a=0;if(Array.isArray(i)){var s=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(i,3),l=s[0],u=s[2];if(l>u){var c=[u,l];l=c[0],u=c[1]}var f=0;l===u?f=t.length+n.length:(0,r.rangeEach)(l,u,function(t){e.isHidden(t)&&(f+=1)}),a=f<=1?0:1}return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_SHOW_ROW,a)},callback:function(){var o=this.getSelectedRangeLast(),i=o.from,a=o.to,s=Math.min(i.row,a.row),l=Math.max(i.row,a.row);s===l?(t.length===s&&(e.showRows(t),t.length=0),n.length===this.countSourceRows()-(s+1)&&(e.showRows(n),n.length=0)):(0,r.rangeEach)(s,l,function(t){return e.showRow(t)}),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},disabled:!1,hidden:function(){if(!e.hiddenRows.length||!this.selection.isSelectedByRowHeader())return!0;t.length=0,n.length=0;var o=this.getSelectedRangeLast(),i=o.from,a=o.to,s=Math.min(i.row,a.row),l=Math.max(i.row,a.row),u=!1;if(s===l){var c=this.countSourceRows();(0,r.rangeEach)(0,c,function(r){var o=t.length+n.length;if(o===e.hiddenRows.length)return!1;r<s?e.isHidden(r)&&t.push(r):e.isHidden(r)&&n.push(r)}),c-=1,(t.length===s&&s>0||n.length===c-s&&s<c)&&(u=!0)}else(0,r.rangeEach)(s,l,function(t){if(e.isHidden(t))return u=!0,!1});return!u}}};var r=n(5),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(4))},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=l(n(7)),o=n(1),i=n(5),a=n(6),s=l(n(861));function l(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var g=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}(this,h(t).call(this,e))).trimmedRows=[],n.removedRows=[],n.rowsMapper=new s.default(p(p(n))),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(t,r.default),function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().trimRows}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){var n=this.hot.getSettings().trimRows;Array.isArray(n)&&(this.trimmedRows=n),this.rowsMapper.createMap(this.hot.countSourceRows()),this.addHook("modifyRow",function(t,n){return e.onModifyRow(t,n)}),this.addHook("unmodifyRow",function(t,n){return e.onUnmodifyRow(t,n)}),this.addHook("beforeCreateRow",function(t,n,r){return e.onBeforeCreateRow(t,n,r)}),this.addHook("afterCreateRow",function(t,n){return e.onAfterCreateRow(t,n)}),this.addHook("beforeRemoveRow",function(t,n){return e.onBeforeRemoveRow(t,n)}),this.addHook("afterRemoveRow",function(){return e.onAfterRemoveRow()}),this.addHook("afterLoadData",function(t){return e.onAfterLoadData(t)}),f(h(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){var e=this.hot.getSettings().trimRows;Array.isArray(e)&&(this.disablePlugin(),this.enablePlugin()),f(h(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.trimmedRows=[],this.removedRows.length=0,this.rowsMapper.clearMap(),f(h(t.prototype),"disablePlugin",this).call(this)}},{key:"trimRows",value:function(e){var t=this;(0,o.arrayEach)(e,function(e){var n=parseInt(e,10);t.isTrimmed(n)||t.trimmedRows.push(n)}),this.hot.runHooks("skipLengthCache",100),this.rowsMapper.createMap(this.hot.countSourceRows()),this.hot.runHooks("afterTrimRow",e)}},{key:"trimRow",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.trimRows(t)}},{key:"untrimRows",value:function(e){var t=this;(0,o.arrayEach)(e,function(e){var n=parseInt(e,10);t.isTrimmed(n)&&t.trimmedRows.splice(t.trimmedRows.indexOf(n),1)}),this.hot.runHooks("skipLengthCache",100),this.rowsMapper.createMap(this.hot.countSourceRows()),this.hot.runHooks("afterUntrimRow",e)}},{key:"untrimRow",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.untrimRows(t)}},{key:"isTrimmed",value:function(e){return this.trimmedRows.indexOf(e)>-1}},{key:"untrimAll",value:function(){this.untrimRows([].concat(this.trimmedRows))}},{key:"onModifyRow",value:function(e,t){var n=e;return t!==this.pluginName&&(n=this.rowsMapper.getValueByIndex(n)),n}},{key:"onUnmodifyRow",value:function(e,t){var n=e;return t!==this.pluginName&&(n=this.rowsMapper.getIndexByValue(n)),n}},{key:"onBeforeCreateRow",value:function(e,t,n){return!(this.isEnabled()&&this.trimmedRows.length>0&&"auto"===n)}},{key:"onAfterCreateRow",value:function(e,t){this.rowsMapper.shiftItems(e,t)}},{key:"onBeforeRemoveRow",value:function(e,t){var n=this;this.removedRows.length=0,!1!==e&&(0,i.rangeEach)(e,e+t-1,function(e){n.removedRows.push(n.hot.runHooks("modifyRow",e,n.pluginName))})}},{key:"onAfterRemoveRow",value:function(){this.rowsMapper.unshiftItems(this.removedRows)}},{key:"onAfterLoadData",value:function(e){e||this.rowsMapper.createMap(this.hot.countSourceRows())}},{key:"destroy",value:function(){this.rowsMapper.destroy(),f(h(t.prototype),"destroy",this).call(this)}}]),t}();(0,a.registerPlugin)("trimRows",g);var v=g;t.default=v},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(76)),o=n(2),i=n(5);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.trimRows=t}return function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(e,[{key:"createMap",value:function(e){var t=this,n=0,r=void 0===e?this._arrayMap.length:e;this._arrayMap.length=0,(0,i.rangeEach)(r-1,function(e){t.trimRows.isTrimmed(e)?n+=1:t._arrayMap[e-n]=e})}},{key:"destroy",value:function(){this._arrayMap=null}}]),e}();(0,o.mixin)(s,r.default);var l=s;t.default=l}]).default});