/
home
/
assocoweys
/
test
/
wp-content
/
plugins
/
visualizer
/
classes
/
Visualizer
/
Gutenberg
/
build
/
Upload File
HOME
(self.webpackChunkvisualizer_gutenberg_block=self.webpackChunkvisualizer_gutenberg_block||[]).push([[544],{3748:function(e,t,n){var o;"undefined"!=typeof self&&self,o=function(e,t,n){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},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=207)}([function(e,t,n){"use strict";t.__esModule=!0,t.HTML_CHARACTERS=void 0,t.getParent=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,o=null,r=e;null!==r;){if(n===t){o=r;break}r.host&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r=r.host:(n+=1,r=r.parentNode)}return o},t.closest=a,t.closestDown=function(e,t,n){for(var o=[],r=e;r&&(r=a(r,t,n))&&(!n||n.contains(r));)o.push(r),r=r.host&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r.host:r.parentNode;var i=o.length;return i?o[i-1]:null},t.isChildOf=function(e,t){var n=e.parentNode,o=[];for("string"==typeof t?o=Array.prototype.slice.call(document.querySelectorAll(t),0):o.push(t);null!==n;){if(o.indexOf(n)>-1)return!0;n=n.parentNode}return!1},t.isChildOfWebComponentTable=function(e){var t=!1,n=s(e);function o(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="hot-table".toUpperCase()}for(;null!==n;){if(o(n)){t=!0;break}if(n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(t=o(n.host))break;n=n.host}n=n.parentNode}return t},t.polymerWrap=s,t.polymerUnwrap=l,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_"+e);return n?n.contains(t):null},t.hasClass=function(e,t){return h(e,t)},t.addClass=function(e,t){return d(e,t)},t.removeClass=function(e,t){return f(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 o=t.childNodes,r=o.length-1;r>=0;r--)e(o[r],t)},t.empty=y,t.fastInnerHTML=function(e,t){w.test(t)?e.innerHTML=t:b(e,t)},t.fastInnerText=b,t.isVisible=function e(t){for(var n=t;l(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=document.documentElement,n=e,o=void 0,i=void 0,a=void 0,s=void 0;if((0,r.hasCaptionProblem)()&&n.firstChild&&"CAPTION"===n.firstChild.nodeName)return{top:(s=n.getBoundingClientRect()).top+(window.pageYOffset||t.scrollTop)-(t.clientTop||0),left:s.left+(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)};for(o=n.offsetLeft,i=n.offsetTop,a=n;(n=n.offsetParent)&&n!==document.body;)o+=n.offsetLeft,i+=n.offsetTop,a=n;return a&&"fixed"===a.style.position&&(o+=window.pageXOffset||t.scrollLeft,i+=window.pageYOffset||t.scrollTop),{left:o,top:i}},t.getWindowScrollTop=E,t.getWindowScrollLeft=S,t.getScrollTop=function(e){return e===window?E():e.scrollTop},t.getScrollLeft=function(e){return e===window?S():e.scrollLeft},t.getScrollableElement=function(e){for(var t=["auto","scroll"],n=e.parentNode,o=void 0,r=void 0,i=void 0,a="",s="",l="",u="";n&&n.style&&document.body!==n;){if(o=n.style.overflow,r=n.style.overflowX,i=n.style.overflowY,"scroll"===o||"scroll"===r||"scroll"===i)return n;if(window.getComputedStyle&&(s=(a=window.getComputedStyle(n)).getPropertyValue("overflow"),l=a.getPropertyValue("overflow-y"),u=a.getPropertyValue("overflow-x"),"scroll"===s||"scroll"===u||"scroll"===l))return n;if(n.clientHeight<=n.scrollHeight+1&&(-1!==t.indexOf(i)||-1!==t.indexOf(o)||-1!==t.indexOf(s)||-1!==t.indexOf(l)))return n;if(n.clientWidth<=n.scrollWidth+1&&(-1!==t.indexOf(r)||-1!==t.indexOf(o)||-1!==t.indexOf(s)||-1!==t.indexOf(u)))return n;n=n.parentNode}return window},t.getTrimmingContainer=function(e){for(var t=e.parentNode;t&&t.style&&document.body!==t;){if("visible"!==t.style.overflow&&""!==t.style.overflow)return t;if(window.getComputedStyle){var n=window.getComputedStyle(t);if("visible"!==n.getPropertyValue("overflow")&&""!==n.getPropertyValue("overflow"))return t}t=t.parentNode}return window},t.getStyle=function(e,t){if(e){if(e===window)return"width"===t?window.innerWidth+"px":"height"===t?window.innerHeight+"px":void 0;var n,o=e.style[t];return""!==o&&void 0!==o?o:""!==(n=O(e))[t]&&void 0!==n[t]?n[t]:void 0}},t.getComputedStyle=O,t.outerWidth=function(e){return e.offsetWidth},t.outerHeight=function(e){return(0,r.hasCaptionProblem)()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName?e.offsetHeight+e.firstChild.offsetHeight: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(),o=n.duplicate();return n.moveToBookmark(t.getBookmark()),o.setEndPoint("EndToStart",n),o.text.length}return 0},t.getSelectionEndPosition=function(e){if(e.selectionEnd)return e.selectionEnd;if(document.selection){var t=document.selection.createRange();return null==t?0:e.createTextRange().text.indexOf(t.text)+t.text.length}return 0},t.getSelectionText=function(){var e="";return window.getSelection?e=window.getSelection().toString():document.selection&&"Control"!==document.selection.type&&(e=document.selection.createRange().text),e},t.setCaretPosition=function(e,t,n){if(void 0===n&&(n=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(i){var o=e.parentNode,r=o.style.display;o.style.display="block",e.setSelectionRange(t,n),o.style.display=r}}else if(e.createTextRange){var i=e.createTextRange();i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i.select()}},t.getScrollbarWidth=function(){return void 0===m&&(m=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 o=e.offsetWidth;return n==o&&(o=t.clientWidth),(document.body||document.documentElement).removeChild(t),n-o}()),m},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,o.isIE8)()||(0,o.isIE9)()?(e.style.top=n,e.style.left=t):(0,o.isSafari)()?e.style["-webkit-transform"]="translate3d("+t+","+n+",0)":e.style.transform="translate3d("+t+","+n+",0)"},t.getCssTransform=function(e){var t=void 0;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:e.style["-webkit-transform"]&&""!==(t=e.style["-webkit-transform"])?["-webkit-transform",t]:-1},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=T,t.isOutsideInput=function(e){return T(e)&&-1==e.className.indexOf("handsontableInput")&&-1==e.className.indexOf("copyPaste")};var o=n(39),r=n(40);function i(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)}function a(e,t,n){for(var o=e;null!==o&&o!==n;){if(o.nodeType===Node.ELEMENT_NODE&&(t.indexOf(o.nodeName)>-1||t.indexOf(o)>-1))return o;o=o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o.host:o.parentNode}return null}function s(e){return"undefined"!=typeof Polymer&&"function"==typeof wrap?wrap(e):e}function l(e){return"undefined"!=typeof Polymer&&"function"==typeof unwrap?unwrap(e):e}var u,c=!!document.documentElement.classList,h=void 0,d=void 0,f=void 0;function p(e){var t=[];if(!e||!e.length)return t;for(var n=0;e[n];)t.push(e[n]),n+=1;return t}if(c){var g=((u=document.createElement("div")).classList.add("test","test2"),u.classList.contains("test2"));h=function(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)},d=function(e,t){var n,o=t;if("string"==typeof o&&(o=o.split(" ")),(o=p(o)).length>0)if(g)(n=e.classList).add.apply(n,i(o));else for(var r=0;o&&o[r];)e.classList.add(o[r]),r+=1},f=function(e,t){var n,o=t;if("string"==typeof o&&(o=o.split(" ")),(o=p(o)).length>0)if(g)(n=e.classList).remove.apply(n,i(o));else for(var r=0;o&&o[r];)e.classList.remove(o[r]),r+=1}}else{var v=function(e){return new RegExp("(\\s|^)"+e+"(\\s|$)")};h=function(e,t){return void 0!==e.className&&v(t).test(e.className)},d=function(e,t){var n=0,o=e.className,r=t;if("string"==typeof r&&(r=r.split(" ")),""===o)o=r.join(" ");else for(;r&&r[n];)v(r[n]).test(o)||(o+=" "+r[n]),n+=1;e.className=o},f=function(e,t){var n=0,o=e.className,r=t;for("string"==typeof r&&(r=r.split(" "));r&&r[n];)o=o.replace(v(r[n])," ").trim(),n+=1;e.className!==o&&(e.className=o)}}function y(e){for(var t=void 0;t=e.lastChild;)e.removeChild(t)}var m,w=t.HTML_CHARACTERS=/(<(.*)>|&(.*);)/,C=!!document.createTextNode("test").textContent;function b(e,t){var n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?C?n.textContent=t:n.data=t:(y(e),e.appendChild(document.createTextNode(t)))}function E(){var e=window.scrollY;return void 0===e&&(e=document.documentElement.scrollTop),e}function S(){var e=window.scrollX;return void 0===e&&(e=document.documentElement.scrollLeft),e}function O(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}function T(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}},function(e,t,n){"use strict";t.__esModule=!0;var 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};t.duckSchema=function e(t){var n=void 0;return Array.isArray(t)?n=[]:(n={},l(t,(function(t,r){"__children"!==r&&(t&&"object"===(void 0===t?"undefined":o(t))&&!Array.isArray(t)?n[r]=e(t):Array.isArray(t)?t.length&&"object"===o(t[0])&&!Array.isArray(t[0])?n[r]=[e(t[0])]:n[r]=[]:n[r]=null)}))),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,i){n[i]&&"object"===o(n[i])?(t[i]||(Array.isArray(n[i])?t[i]=[]:"[object Date]"===Object.prototype.toString.call(n[i])?t[i]=n[i]:t[i]={}),e(t[i],n[i])):t[i]=n[i]}))},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=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 '"+n+"' already exist and cannot be overwritten.");var o,r,i;"function"==typeof t?e.prototype[n]=t:Object.defineProperty(e.prototype,n,{get:(o=n,r=t,i="_"+o,function(){var e;return void 0===this[i]&&(this[i]=(e=r,(Array.isArray(e)||s(e))&&(e=a(e)),e)),this[i]}),set:function(e){var t="_"+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,o){o.value=n,o.writable=!1!==o.writable,o.enumerable=!1!==o.enumerable,o.configurable=!1!==o.configurable,Object.defineProperty(e,t,o)},t.objectEach=l,t.getProperty=function(e,t){var n=t.split("."),o=e;return l(n,(function(e){if(void 0===(o=o[e]))return o=void 0,!1})),o},t.deepObjectSize=function(e){return s(e)?function e(t){var n=0;return s(t)?l(t,(function(t){n+=e(t)})):n+=1,n}(e):0},t.createObjectPropListener=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",o="_"+n,r=(i(t={_touched:!1},o,e),i(t,"isTouched",(function(){return this._touched})),t);return Object.defineProperty(r,n,{get:function(){return this[o]},set:function(e){this._touched=!0,this[o]=e},enumerable:!0,configurable:!0}),r},t.hasOwnProperty=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var r=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}function a(e){return"object"===(void 0===e?"undefined":o(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";function o(e,t,n,o){var r=-1,i=e,a=n;Array.isArray(e)||(i=Array.from(e));var s=i.length;for(o&&s&&(a=i[r+=1]),r+=1;r<s;)a=t(a,i[r],r,i),r+=1;return a}function r(e,t){var n=0,o=e;Array.isArray(e)||(o=Array.from(e));for(var r=o.length;n<r&&!1!==t(o[n],n,o);)n+=1;return e}function i(e){return o(e,(function(e,t){return e+t}),0)}t.__esModule=!0,t.to2dArray=function(e){for(var t=e.length,n=0;n<t;)e[n]=[e[n]],n+=1},t.extendArray=function(e,t){for(var n=t.length,o=0;o<n;)e.push(t[o]),o+=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,o=e[0].length,r=0;r<n;r++)for(var i=0;i<o;i++)t[i]||(t[i]=[]),t[i][r]=e[r][i];return t},t.arrayReduce=o,t.arrayFilter=function(e,t){var n=0,o=e;Array.isArray(e)||(o=Array.from(e));for(var r=o.length,i=[],a=-1;n<r;){var s=o[n];t(s,n,o)&&(i[a+=1]=s),n+=1}return i},t.arrayMap=function(e,t){var n=0,o=e;Array.isArray(e)||(o=Array.from(e));for(var r=o.length,i=[],a=-1;n<r;){var s=o[n];i[a+=1]=t(s,n,o),n+=1}return i},t.arrayEach=r,t.arraySum=i,t.arrayMax=function(e){return o(e,(function(e,t){return e>t?e:t}),Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return o(e,(function(e,t){return e<t?e:t}),Array.isArray(e)?e[0]:void 0)},t.arrayAvg=function(e){return e.length?i(e)/e.length:0},t.arrayFlatten=function e(t){return o(t,(function(t,n){return t.concat(Array.isArray(n)?e(n):n)}),[])},t.arrayUnique=function(e){var t=[];return r(e,(function(e){-1===t.indexOf(e)&&t.push(e)})),t}},function(e,t,n){var o=n(15),r=n(37),i=n(29),a=n(28),s=n(30),l="prototype",u=function(e,t,n){var c,h,d,f,p=e&u.F,g=e&u.G,v=e&u.S,y=e&u.P,m=e&u.B,w=g?o:v?o[t]||(o[t]={}):(o[t]||{})[l],C=g?r:r[t]||(r[t]={}),b=C[l]||(C[l]={});for(c in g&&(n=t),n)d=((h=!p&&w&&void 0!==w[c])?w:n)[c],f=m&&h?s(d,o):y&&"function"==typeof d?s(Function.call,d):d,w&&a(w,c,d,e&u.U),C[c]!=d&&i(C,c,f),y&&b[c]!=d&&(b[c]=d)};o.core=r,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){"use strict";t.__esModule=!0,t.Viewport=t.TableRenderer=t.Table=t.Settings=t.Selection=t.Scroll=t.Overlays=t.Event=t.Core=t.default=t.Border=t.TopLeftCornerOverlay=t.TopOverlay=t.LeftOverlay=t.DebugOverlay=t.RowFilter=t.ColumnFilter=t.CellRange=t.CellCoords=t.ViewportRowsCalculator=t.ViewportColumnsCalculator=void 0,n(98),n(113),n(114),n(118),n(119),n(121),n(124),n(125),n(126),n(127),n(128),n(129),n(130),n(131),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(143),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(88),n(158),n(159),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(169),n(170),n(171),n(173),n(174),n(175);var o=S(n(176)),r=S(n(177)),i=S(n(56)),a=S(n(178)),s=S(n(179)),l=S(n(180)),u=S(n(229)),c=S(n(230)),h=S(n(231)),d=S(n(232)),f=S(n(189)),p=S(n(181)),g=S(n(182)),v=S(n(183)),y=S(n(184)),m=S(n(233)),w=S(n(185)),C=S(n(186)),b=S(n(187)),E=S(n(188));function S(e){return e&&e.__esModule?e:{default:e}}t.ViewportColumnsCalculator=o.default,t.ViewportRowsCalculator=r.default,t.CellCoords=i.default,t.CellRange=a.default,t.ColumnFilter=s.default,t.RowFilter=l.default,t.DebugOverlay=u.default,t.LeftOverlay=c.default,t.TopOverlay=h.default,t.TopLeftCornerOverlay=d.default,t.Border=f.default,t.default=p.default,t.Core=p.default,t.Event=g.default,t.Overlays=v.default,t.Scroll=y.default,t.Selection=m.default,t.Settings=w.default,t.Table=C.default,t.TableRenderer=b.default,t.Viewport=E.default},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.getListenersCounter=function(){return l};var r=n(0),i=n(1),a=n(40),s=n(13),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 o(e,[{key:"addEventListener",value:function(e,t,n){var o=this,r=this.context;function i(e){n.call(this,c(r,e))}return this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:i}),window.addEventListener?e.addEventListener(t,i,!1):e.attachEvent("on"+t,i),l+=1,function(){o.removeEventListener(e,t,n)}}},{key:"removeEventListener",value:function(e,t,n){for(var o=this.context.eventListeners.length,r=void 0;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.element.removeEventListener(r.event,r.callbackProxy,!1):r.element.detachEvent("on"+r.event,r.callbackProxy),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={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},o=void 0;document.createEvent?(o=document.createEvent("MouseEvents")).initMouseEvent(t,n.bubbles,n.cancelable,n.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.button,n.relatedTarget||document.body.parentNode):o=document.createEventObject(),e.dispatchEvent?e.dispatchEvent(o):e.fireEvent("on"+t,o)}}]),e}();function c(e,t){var n="HOT-TABLE",o=void 0,l=void 0,c=void 0,h=void 0,d=void 0;t.isTargetWebComponent=!1,t.realTarget=t.target;var f=t.stopImmediatePropagation;if(t.stopImmediatePropagation=function(){f.apply(this),(0,s.stopImmediatePropagation)(this)},!u.isHotTableEnv)return t;for(d=(t=(0,r.polymerWrap)(t)).path?t.path.length:0;d;){if(d-=1,t.path[d].nodeName===n)o=!0;else if(o&&t.path[d].shadowRoot){h=t.path[d];break}0!==d||h||(h=t.path[d])}return h||(h=t.target),t.isTargetWebComponent=!0,(0,a.isWebComponentSupportedNatively)()?t.realTarget=t.srcElement||t.toElement:((0,i.hasOwnProperty)(e,"hot")||e.isHotTableEnv||e.wtTable)&&((0,i.hasOwnProperty)(e,"hot")?l=e.hot?e.hot.view.wt.wtTable.TABLE:null:e.isHotTableEnv?l=e.view.activeWt.wtTable.TABLE.parentNode.parentNode:e.wtTable&&(l=e.wtTable.TABLE.parentNode.parentNode),c=(0,r.closest)(t.target,[n],l),t.realTarget=c&&l.querySelector(n)||t.target),Object.defineProperty(t,"target",{get:function(){return(0,r.polymerWrap)(h)},enumerable:!0,configurable:!0}),t}t.default=u},function(e,t,n){"use strict";t.__esModule=!0;var 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};t.isNumeric=function(e){var t=void 0===e?"undefined":o(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 o=-1;for("function"==typeof t?(n=t,t=e):o=e-1;++o<=t&&!1!==n(o););},t.rangeEachReverse=function(e,t,n){var o=e+1;for("function"==typeof t&&(n=t,t=0);--o>=t&&!1!==n(o););},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;var o=t.CONTEXT_MENU_ITEMS_NAMESPACE="ContextMenu:items",r=(t.CONTEXTMENU_ITEMS_ROW_ABOVE=o+".insertRowAbove",t.CONTEXTMENU_ITEMS_ROW_BELOW=o+".insertRowBelow",t.CONTEXTMENU_ITEMS_INSERT_LEFT=o+".insertColumnOnTheLeft",t.CONTEXTMENU_ITEMS_INSERT_RIGHT=o+".insertColumnOnTheRight",t.CONTEXTMENU_ITEMS_REMOVE_ROW=o+".removeRow",t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=o+".removeColumn",t.CONTEXTMENU_ITEMS_UNDO=o+".undo",t.CONTEXTMENU_ITEMS_REDO=o+".redo",t.CONTEXTMENU_ITEMS_READ_ONLY=o+".readOnly",t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=o+".clearColumn",t.CONTEXTMENU_ITEMS_COPY=o+".copy",t.CONTEXTMENU_ITEMS_CUT=o+".cut",t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=o+".freezeColumn",t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=o+".unfreezeColumn",t.CONTEXTMENU_ITEMS_MERGE_CELLS=o+".mergeCells",t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=o+".unmergeCells",t.CONTEXTMENU_ITEMS_ADD_COMMENT=o+".addComment",t.CONTEXTMENU_ITEMS_EDIT_COMMENT=o+".editComment",t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=o+".removeComment",t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=o+".readOnlyComment",t.CONTEXTMENU_ITEMS_ALIGNMENT=o+".align",t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=o+".align.left",t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=o+".align.center",t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=o+".align.right",t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=o+".align.justify",t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=o+".align.top",t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=o+".align.middle",t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=o+".align.bottom",t.CONTEXTMENU_ITEMS_BORDERS=o+".borders",t.CONTEXTMENU_ITEMS_BORDERS_TOP=o+".borders.top",t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=o+".borders.right",t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=o+".borders.bottom",t.CONTEXTMENU_ITEMS_BORDERS_LEFT=o+".borders.left",t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=o+".borders.remove",t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=o+".nestedHeaders.insertChildRow",t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=o+".nestedHeaders.detachFromParent",t.CONTEXTMENU_ITEMS_HIDE_COLUMN=o+".hideColumn",t.CONTEXTMENU_ITEMS_SHOW_COLUMN=o+".showColumn",t.CONTEXTMENU_ITEMS_HIDE_ROW=o+".hideRow",t.CONTEXTMENU_ITEMS_SHOW_ROW=o+".showRow",t.FILTERS_NAMESPACE="Filters:"),i=t.FILTERS_CONDITIONS_NAMESPACE=r+"conditions";t.FILTERS_CONDITIONS_NONE=i+".none",t.FILTERS_CONDITIONS_EMPTY=i+".isEmpty",t.FILTERS_CONDITIONS_NOT_EMPTY=i+".isNotEmpty",t.FILTERS_CONDITIONS_EQUAL=i+".isEqualTo",t.FILTERS_CONDITIONS_NOT_EQUAL=i+".isNotEqualTo",t.FILTERS_CONDITIONS_BEGINS_WITH=i+".beginsWith",t.FILTERS_CONDITIONS_ENDS_WITH=i+".endsWith",t.FILTERS_CONDITIONS_CONTAINS=i+".contains",t.FILTERS_CONDITIONS_NOT_CONTAIN=i+".doesNotContain",t.FILTERS_CONDITIONS_BY_VALUE=i+".byValue",t.FILTERS_CONDITIONS_GREATER_THAN=i+".greaterThan",t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=i+".greaterThanOrEqualTo",t.FILTERS_CONDITIONS_LESS_THAN=i+".lessThan",t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=i+".lessThanOrEqualTo",t.FILTERS_CONDITIONS_BETWEEN=i+".isBetween",t.FILTERS_CONDITIONS_NOT_BETWEEN=i+".isNotBetween",t.FILTERS_CONDITIONS_AFTER=i+".after",t.FILTERS_CONDITIONS_BEFORE=i+".before",t.FILTERS_CONDITIONS_TODAY=i+".today",t.FILTERS_CONDITIONS_TOMORROW=i+".tomorrow",t.FILTERS_CONDITIONS_YESTERDAY=i+".yesterday",t.FILTERS_DIVS_FILTER_BY_CONDITION=r+"labels.filterByCondition",t.FILTERS_DIVS_FILTER_BY_VALUE=r+"labels.filterByValue",t.FILTERS_LABELS_CONJUNCTION=r+"labels.conjunction",t.FILTERS_LABELS_DISJUNCTION=r+"labels.disjunction",t.FILTERS_VALUES_BLANK_CELLS=r+"values.blankCells",t.FILTERS_BUTTONS_SELECT_ALL=r+"buttons.selectAll",t.FILTERS_BUTTONS_CLEAR=r+"buttons.clear",t.FILTERS_BUTTONS_OK=r+"buttons.ok",t.FILTERS_BUTTONS_CANCEL=r+"buttons.cancel",t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=r+"buttons.placeholder.search",t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=r+"buttons.placeholder.value",t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=r+"buttons.placeholder.secondValue"},function(e,t,n){"use strict";t.__esModule=!0,t.getPluginName=t.getRegistredPluginNames=t.getPlugin=t.registerPlugin=void 0;var o,r=n(16),i=(o=r)&&o.__esModule?o:{default:o},a=n(1),s=n(33),l=new WeakMap;t.registerPlugin=function(e,t){var n=(0,s.toUpperCaseFirst)(e);i.default.getSingleton().add("construct",(function(){l.has(this)||l.set(this,{});var e=l.get(this);e[n]||(e[n]=new t(this))})),i.default.getSingleton().add("afterDestroy",(function(){if(l.has(this)){var e=l.get(this);(0,a.objectEach)(e,(function(e){return e.destroy()})),l.delete(this)}}))},t.getPlugin=function(e,t){if("string"!=typeof t)throw Error('Only strings can be passed as "plugin" parameter');var n=(0,s.toUpperCaseFirst)(t);if(l.has(e)&&l.get(e)[n])return l.get(e)[n]},t.getRegistredPluginNames=function(e){return l.has(e)?Object.keys(l.get(e)):[]},t.getPluginName=function(e,t){var n=null;return l.has(e)&&(0,a.objectEach)(l.get(e),(function(e,o){e===t&&(n=o)})),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;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(1),i=n(2),a=n(195),s=n(8),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,a.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(){return n.onUpdateSettings()})),this.hot.addHook("beforeInit",(function(){return n.init()}))}return o(e,[{key:"init",value:function(){this.pluginName=(0,s.getPluginName)(this.hot,this),this.isEnabled&&this.isEnabled()&&this.enablePlugin(),u||(u=(0,s.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,i.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,i.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,n){"use strict";t.__esModule=!0;var o,r,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},a=(o=["\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 "],r=["\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 "],Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(r)}})));t.stringify=function(e){var t=void 0;switch(void 0===e?"undefined":i(e)){case"string":case"number":t=""+e;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t},t.isDefined=function(e){return void 0!==e},t.isUndefined=h,t.isEmpty=d,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t._injectProductInfo=function(e,t){e=m(e||"");var n="",o=!0,r=function(e){var t=[][f],n=t;if(e[f]!==y("Z"))return!1;for(var o="",r="B<H4P+".split(""),i=y(r.shift());i;i=y(r.shift()||"A"))--i<""[f]?n|=(g(""+g(p(o)+(p(v(e,Math.abs(i),2))+[]).padStart(2,"0")))%97||2)>>1:o=v(e,i,i?1===r[f]?9:8:6);return n===t}(e),i=C(),s=d(e)||"trial"===e;if(s||r)if(r){var l=Math.floor((0,u.default)("12/09/2018","DD/MM/YYYY").toDate().getTime()/864e5),h=w(e);(h>45e3||h!==parseInt(h,10))&&(n="The license key provided to Handsontable Pro is invalid. Make sure you pass it correctly."),n||(l>h+1&&(n=(0,c.toSingleLine)(a)),o=l>h+15)}else n="Evaluation version of Handsontable Pro. Not licensed for use in a production environment.";else n="The license key provided to Handsontable Pro is invalid. Make sure you pass it correctly.";if(i&&(n=!1,o=!1),n&&!b&&(console[s?"info":"warn"](n),b=!0),o&&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 s,l=n(57),u=(s=l)&&s.__esModule?s:{default:s},c=n(42);function h(e){return void 0===e}function d(e){return null===e||""===e||h(e)}var f="length",p=function(e){return parseInt(e,16)},g=function(e){return parseInt(e,10)},v=function(e,t,n){return e.substr(t,n)},y=function(e){return e.codePointAt(0)-65},m=function(e){return(""+e).replace(/\-/g,"")},w=function(e){return p(v(m(e),p("12"),y("F")))/(p(v(m(e),y("B"),~~![][f]))||9)},C=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)},b=!1},function(e,t,n){var o=n(79)("wks"),r=n(50),i=n(15).Symbol,a="function"==typeof i;(e.exports=function(e){return o[e]||(o[e]=a&&i[e]||(a?i:r)("Symbol."+e))}).store=o},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){return e.pageX?e.pageX:e.clientX+(0,o.getWindowScrollLeft)()},t.pageY=function(e){return e.pageY?e.pageY:e.clientY+(0,o.getWindowScrollTop)()},t.isRightClick=function(e){return 2===e.button},t.isLeftClick=function(e){return 0===e.button};var o=n(0)},function(e,t,n){"use strict";t.__esModule=!0,t.getRegisteredRenderers=t.getRegisteredRendererNames=t.hasRenderer=t.getRenderer=t.registerRenderer=void 0;var o=h(n(38)),r=h(n(243)),i=h(n(244)),a=h(n(245)),s=h(n(246)),l=h(n(247)),u=h(n(249)),c=h(n(250));function h(e){return e&&e.__esModule?e:{default:e}}var d=(0,o.default)("renderers"),f=d.register,p=d.getItem,g=d.hasItem,v=d.getNames,y=d.getValues;f("base",r.default),f("autocomplete",i.default),f("checkbox",a.default),f("html",s.default),f("numeric",l.default),f("password",u.default),f("text",c.default),t.registerRenderer=f,t.getRenderer=function(e){if("function"==typeof e)return e;if(!g(e))throw Error('No registered renderer found under "'+e+'" name');return p(e)},t.hasRenderer=g,t.getRegisteredRendererNames=v,t.getRegisteredRenderers=y},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(2),i=n(1),a=["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","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","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"],s=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 o(e,null,[{key:"getSingleton",value:function(){return l}}]),o(e,[{key:"createEmptyBucket",value:function(){var e=Object.create(null);return(0,r.arrayEach)(a,(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,o){if(n.initialHook)return i[e][o]=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,o=this.getBucket(n);return void 0!==o[e]&&o[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,o,r,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 h=l[c].call(e,n,o,r,i,a,s);void 0!==h&&(n=h),l[c]&&l[c].runOnce&&this.remove(t,l[c]),c+=1}else c+=1;var d=this.getBucket(e)[t],f=d?d.length:0,p=0;if(f)for(;p<f;)if(d[p]&&!d[p].skip){var g=d[p].call(e,n,o,r,i,a,s);void 0!==g&&(n=g),d[p]&&d[p].runOnce&&this.remove(t,d[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,i.objectEach)(this.getBucket(e),(function(e,t,n){return n[t].length=0}))}},{key:"register",value:function(e){this.isRegistered(e)||a.push(e)}},{key:"deregister",value:function(e){this.isRegistered(e)&&a.splice(a.indexOf(e),1)}},{key:"isRegistered",value:function(e){return a.indexOf(e)>=0}},{key:"getRegistered",value:function(){return a}}]),e}(),l=new s;t.default=s},function(e,t,n){"use strict";t.__esModule=!0,t.getRegisteredEditors=t.getRegisteredEditorNames=t.hasEditor=t.getEditorInstance=t.getEditor=t.registerEditor=void 0,t.RegisteredEditor=S,t._getEditorInstance=O;var o=g(n(38)),r=g(n(16)),i=g(n(55)),a=g(n(190)),s=g(n(235)),l=g(n(236)),u=g(n(239)),c=g(n(191)),h=g(n(240)),d=g(n(241)),f=g(n(242)),p=g(n(59));function g(e){return e&&e.__esModule?e:{default:e}}var v=new WeakMap,y=(0,o.default)("editors"),m=y.register,w=y.getItem,C=y.hasItem,b=y.getNames,E=y.getValues;function S(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]},r.default.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function O(e,t){var n=void 0;if("function"==typeof e)v.get(e)||T(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 "'+e+'"');return n.getInstance(t)}function T(e,t){var n=new S(t);"string"==typeof e&&m(e,n),v.set(t,n)}T("base",i.default),T("autocomplete",a.default),T("checkbox",s.default),T("date",l.default),T("dropdown",u.default),T("handsontable",c.default),T("numeric",h.default),T("password",d.default),T("select",f.default),T("text",p.default),t.registerEditor=T,t.getEditor=function(e){if(!C(e))throw Error('No registered editor found under "'+e+'" name');return w(e).getConstructor()},t.getEditorInstance=O,t.hasEditor=C,t.getRegisteredEditorNames=b,t.getRegisteredEditors=E},function(e,t,n){var o=n(9);e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";t.__esModule=!0,t.normalizeSelection=function(e){return(0,o.arrayMap)(e,(function(e){return{start:e.getTopLeftCorner(),end:e.getBottomRightCorner()}}))},t.isSeparator=function(e){return(0,r.hasClass)(e,"htSeparator")},t.hasSubMenu=function(e){return(0,r.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,r.hasClass)(e,"htDisabled")},t.isSelectionDisabled=function(e){return(0,r.hasClass)(e,"htSelectionDisabled")},t.getValidSelection=function(e){var t=e.getSelected();return t?t[0]<0?null:t:null},t.prepareVerticalAlignClass=a,t.prepareHorizontalAlignClass=s,t.getAlignmentClasses=function(e,t){var n={};return(0,o.arrayEach)(e,(function(e){for(var o=e.from,r=e.to,i=o.row;i<=r.row;i++)for(var a=o.col;a<=r.col;a++)n[i]||(n[i]=[]),n[i][a]=t(i,a)})),n},t.align=function(e,t,n,r,i){(0,o.arrayEach)(e,(function(e){var o=e.from,a=e.to;if(o.row===a.row&&o.col===a.col)l(o.row,o.col,t,n,r,i);else for(var s=o.row;s<=a.row;s++)for(var u=o.col;u<=a.col;u++)l(s,u,t,n,r,i)}))},t.checkSelectionConsistency=function(e,t){var n=!1;return Array.isArray(e)&&(0,o.arrayEach)(e,(function(e){return e.forAll((function(e,o){if(t(e,o))return n=!0,!1})),n})),n},t.markLabelAsSelected=function(e){return'<span class="selected">'+String.fromCharCode(10003)+"</span>"+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,o.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 o=n(2),r=n(0),i=n(95);function a(e,t){return-1!==e.indexOf(t)?e:e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")+" "+t}function s(e,t){return-1!==e.indexOf(t)?e:e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")+" "+t}function l(e,t,n,o,r,i){var l=r(e,t),u=o;l.className&&(u="vertical"===n?a(l.className,o):s(l.className,o)),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){var o=n(18),r=n(100),i=n(75),a=Object.defineProperty;t.f=n(22)?Object.defineProperty:function(e,t,n){if(o(e),t=i(t,!0),o(n),r)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.KEY_CODES=void 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!==[r.ARROW_DOWN,r.ARROW_UP,r.ARROW_LEFT,r.ARROW_RIGHT,r.HOME,r.END,r.DELETE,r.BACKSPACE,r.F1,r.F2,r.F3,r.F4,r.F5,r.F6,r.F7,r.F8,r.F9,r.F10,r.F11,r.F12,r.TAB,r.PAGE_DOWN,r.PAGE_UP,r.ENTER,r.ESCAPE,r.SHIFT,r.CAPS_LOCK,r.ALT].indexOf(e)},t.isCtrlKey=function(e){var t=[];return window.navigator.platform.includes("Mac")?t.push(r.COMMAND_LEFT,r.COMMAND_RIGHT,r.COMMAND_FIREFOX):t.push(r.CONTROL),t.includes(e)},t.isCtrlMetaKey=function(e){return[r.CONTROL,r.COMMAND_LEFT,r.COMMAND_RIGHT,r.COMMAND_FIREFOX].includes(e)},t.isKey=function(e,t){var n=t.split("|"),i=!1;return(0,o.arrayEach)(n,(function(t){if(e===r[t])return i=!0,!1})),i};var o=n(2),r=t.KEY_CODES={MOUSE_LEFT:1,MOUSE_RIGHT:3,MOUSE_MIDDLE:2,BACKSPACE:8,COMMA:188,INSERT:45,DELETE:46,END:35,ENTER:13,ESCAPE:27,CONTROL:17,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,ALT:18,HOME:36,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,SPACE:32,SHIFT:16,CAPS_LOCK:20,TAB:9,ARROW_RIGHT:39,ARROW_LEFT:37,ARROW_UP:38,ARROW_DOWN:40,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,A:65,X:88,C:67,V:86}},function(e,t,n){e.exports=!n(23)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var o=n(77),r=n(36);e.exports=function(e){return o(r(e))}},function(e,t,n){var o=n(60),r=Math.min;e.exports=function(e){return e>0?r(o(e),9007199254740991):0}},function(e,t,n){var o=n(3),r=n(37),i=n(23);e.exports=function(e,t){var n=(r.Object||{})[e]||Object[e],a={};a[e]=t(n),o(o.S+o.F*i((function(){n(1)})),"Object",a)}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var o=n(15),r=n(29),i=n(27),a=n(50)("src"),s="toString",l=Function[s],u=(""+l).split(s);n(37).inspectSource=function(e){return l.call(e)},(e.exports=function(e,t,n,s){var l="function"==typeof n;l&&(i(n,"name")||r(n,"name",t)),e[t]!==n&&(l&&(i(n,a)||r(n,a,e[t]?""+e[t]:u.join(String(t)))),e===o?e[t]=n:s?e[t]?e[t]=n:r(e,t,n):(delete e[t],r(e,t,n)))})(Function.prototype,s,(function(){return"function"==typeof this&&this[a]||l.call(this)}))},function(e,t,n){var o=n(20),r=n(51);e.exports=n(22)?function(e,t,n){return o.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(63);e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var o=n(36);e.exports=function(e){return Object(o(e))}},function(e,t,n){var o=n(50)("meta"),r=n(9),i=n(27),a=n(20).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(23)((function(){return l(Object.preventExtensions({}))})),c=function(e){a(e,o,{value:{i:"O"+ ++s,w:{}}})},h=e.exports={KEY:o,NEED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,o)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[o].i},getWeak:function(e,t){if(!i(e,o)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[o].w},onFreeze:function(e){return u&&h.NEED&&l(e)&&!i(e,o)&&c(e),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=Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=n.length;i;){i-=1;var a=(0,o.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(""+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(""+e).replace(r,"")};var o=n(11),r=/<\/?\w+\/?>|<\w+[\s|/][^>]*>/gi},function(e,t,n){"use strict";t.__esModule=!0,t.getRegisteredValidators=t.getRegisteredValidatorNames=t.hasValidator=t.getValidator=t.registerValidator=void 0;var o=l(n(38)),r=l(n(251)),i=l(n(252)),a=l(n(253)),s=l(n(254));function l(e){return e&&e.__esModule?e:{default:e}}var u=(0,o.default)("validators"),c=u.register,h=u.getItem,d=u.hasItem,f=u.getNames,p=u.getValues;c("autocomplete",r.default),c("date",i.default),c("numeric",a.default),c("time",s.default),t.registerValidator=c,t.getValidator=function(e){if("function"==typeof e)return e;if(!d(e))throw Error('No registered validator found under "'+e+'" name');return h(e)},t.hasValidator=d,t.getRegisteredValidatorNames=f,t.getRegisteredValidators=p},function(e,t,n){var o=n(101),r=n(80);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";function o(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)}t.__esModule=!0,t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";r.has(e)||r.set(e,new Map);var t=r.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[].concat(o(t.keys()))},getValues:function(){return[].concat(o(t.values()))}}};var r=t.collection=new Map},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 o=n(1),r=function(e){var t={value:!1,test:function(n,o){t.value=e(n,o)}};return t},i={chrome:r((function(e,t){return/Chrome/.test(e)&&/Google/.test(t)})),edge:r((function(e){return/Edge/.test(e)})),ie:r((function(e){return/Trident/.test(e)})),ie8:r((function(){return!document.createTextNode("test").textContent})),ie9:r((function(){return!!document.documentMode})),mobile:r((function(e){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)})),safari:r((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,r=e.vendor,a=void 0===r?navigator.vendor:r;(0,o.objectEach)(i,(function(e){(0,e.test)(n,a)}))}a()},function(e,t,n){"use strict";t.__esModule=!0;var 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};t.requestAnimationFrame=function(e){return a.call(window,e)},t.cancelAnimationFrame=function(e){s.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(){return void 0===u&&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),u=e.offsetHeight<2*e.lastChild.offsetHeight,document.body.removeChild(e)}(),u},t.getComparisonFunction=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c||(c="object"===("undefined"==typeof Intl?"undefined":o(Intl))?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?function(e,t){return(""+e).localeCompare(t)}:function(e,t){return e===t?0:e>t?-1:1})};for(var r=0,i=["ms","moz","webkit","o"],a=window.requestAnimationFrame,s=window.cancelAnimationFrame,l=0;l<i.length&&!a;++l)a=window[i[l]+"RequestAnimationFrame"],s=window[i[l]+"CancelAnimationFrame"]||window[i[l]+"CancelRequestAnimationFrame"];a||(a=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-r)),o=window.setTimeout((function(){e(t+n)}),n);return r=t+n,o}),s||(s=function(e){clearTimeout(e)});var u=void 0,c=void 0},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(1),a=n(2),s=u(n(5)),l=u(n(181));function u(e){return e&&e.__esModule?e:{default:e}}var c={},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,i.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 o(e,null,[{key:"registerOverlay",value:function(t,n){if(-1===e.CLONE_TYPES.indexOf(t))throw new Error("Unsupported overlay ("+t+").");c[t]=n}},{key:"createOverlay",value:function(e,t){return new c[e](t)}},{key:"hasOverlay",value:function(e){return void 0!==c[e]}},{key:"isOverlayTypeOf",value:function(e,t){return!(!e||!c[t])&&e instanceof c[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]}}]),o(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 "'+t+'" is not supported.');var n=document.createElement("DIV"),o=document.createElement("TABLE");n.className="ht_clone_"+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 l.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,o=t.style,r=e.parentNode.style;(0,a.arrayEach)([n,o,r],(function(e){e.width="",e.height=""}))}}},{key:"destroy",value:function(){new s.default(this.clone).destroy()}}]),e}();t.default=h},function(e,t,n){"use strict";t.__esModule=!0,t.toSingleLine=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return(0,o.arrayReduce)(e,(function(e,t,o){return e+t.replace(/(?:\r?\n\s+)/g,"")+(n[o]?n[o]:"")}),"").trim()};var o=n(2)},function(e,t,n){"use strict";t.__esModule=!0,t.isFunction=function(e){return"function"==typeof e},t.throttle=r,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,o=r(e,t),i=n;function a(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return i?(i-=1,e.apply(this,n)):o.apply(this,n)}return a.clearHits=function(){i=n},a},t.debounce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=null,o=void 0;return function(){for(var r=this,i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];return n&&clearTimeout(n),n=setTimeout((function(){o=e.apply(r,a)}),t),o}},t.pipe=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=t.slice(1);return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,o.arrayReduce)(i,(function(e,t){return t(e)}),r.apply(this,t))}},t.partial=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return function(){for(var t=arguments.length,o=Array(t),r=0;r<t;r++)o[r]=arguments[r];return e.apply(this,n.concat(o))}},t.curry=function(e){var t=e.length;return function n(o){return function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];var s=o.concat(i);return s.length>=t?e.apply(this,s):n(s)}}([])},t.curryRight=function(e){var t=e.length;return function n(o){return function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];var s=o.concat(i.reverse());return s.length>=t?e.apply(this,s):n(s)}}([])};var o=n(2);function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=0,o={lastCallThrottled:!0},r=null;return function(){for(var i=this,a=arguments.length,s=Array(a),l=0;l<a;l++)s[l]=arguments[l];var u=Date.now(),c=!1;o.lastCallThrottled=!0,n||(n=u,c=!0);var h=t-(u-n);return c?(o.lastCallThrottled=!1,e.apply(this,s)):(r&&clearTimeout(r),r=setTimeout((function(){o.lastCallThrottled=!1,e.apply(i,s),n=0,r=void 0}),h)),o}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var o=n(9);e.exports=function(e,t){if(!o(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){var o=n(12)("unscopables"),r=Array.prototype;null==r[o]&&n(29)(r,o,{}),e.exports=function(e){r[o][e]=!0}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(2),r=n(1),i={_localHooks:Object.create(null),addLocalHook:function(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks:function(e){for(var t=this,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this._localHooks[e]&&(0,o.arrayEach)(this._localHooks[e],(function(e){return e.apply(t,r)}))},clearLocalHooks:function(){return this._localHooks={},this}};(0,r.defineGetter)(i,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1}),t.default=i},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){return(0,o.hasOwnProperty)(t,"border")&&(e.border=t.border),(0,o.hasOwnProperty)(t,"top")&&(t.top?((0,o.isObject)(t.top)||(t.top={width:1,color:"#000"}),e.top=t.top):(t.top={hide:!0},e.top=t.top)),(0,o.hasOwnProperty)(t,"right")&&(t.right?((0,o.isObject)(t.right)||(t.right={width:1,color:"#000"}),e.right=t.right):(t.right={hide:!0},e.right=t.right)),(0,o.hasOwnProperty)(t,"bottom")&&(t.bottom?((0,o.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}),e.bottom=t.bottom):(t.bottom={hide:!0},e.bottom=t.bottom)),(0,o.hasOwnProperty)(t,"left")&&(t.left?((0,o.isObject)(t.left)||(t.left={width:1,color:"#000"}),e.left=t.left):(t.left={hide:!0},e.left=t.left)),e},t.checkSelectionBorders=function(e,t){var n=!1;return(0,r.arrayEach)(e.getSelectedRange(),(function(r){r.forAll((function(r,i){var a=e.getCellMeta(r,i).borders;if(a){if(!t)return n=!0,!1;if(!(0,o.hasOwnProperty)(a[t],"hide")||!1===a[t].hide)return n=!0,!1}}))})),n},t.markSelected=function(e){return'<span class="selected">'+String.fromCharCode(10003)+"</span>"+e};var o=n(1),r=n(2);function i(e,t){return"border_row"+e+"col"+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){e.exports=!1},function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports={}},function(e,t,n){var o=n(20).f,r=n(27),i=n(12)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,i)&&o(e,i,{configurable:!0,value:t})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";t.__esModule=!0,t.EditorState=void 0;var o=n(4),r=n(11),i=t.EditorState={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()}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,o,r,a){this.TD=o,this.row=e,this.col=t,this.prop=n,this.originalValue=r,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=Array(t),o=0;o<t;o++)n[o]=arguments[o];e.apply(this,n)}),e)},a.prototype.saveValue=function(e,t){var n=void 0,o=void 0;t?((n=this.instance.getSelectedLast())[0]>n[2]&&(o=n[0],n[0]=n[2],n[2]=o),n[1]>n[3]&&(o=n[1],n[1]=n[3],n[3]=o)):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 o.CellCoords(this.row,this.col)),this.state=i.EDITING,this.isInFullEditMode()){var n="string"==typeof e?e:(0,r.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 o=this,r=void 0;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},t.default=a},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=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 o(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=r},function(t,n){t.exports=e},function(e,t,n){"use strict";t.__esModule=!0,t.log=function(){var e;(0,o.isDefined)(console)&&(e=console).log.apply(e,arguments)},t.warn=function(){var e;(0,o.isDefined)(console)&&(e=console).warn.apply(e,arguments)},t.info=function(){var e;(0,o.isDefined)(console)&&(e=console).info.apply(e,arguments)},t.error=function(){var e;(0,o.isDefined)(console)&&(e=console).error.apply(e,arguments)};var o=n(11)},function(e,t,n){"use strict";t.__esModule=!0;var o=n(0),r=c(n(234)),i=n(55),a=c(i),s=c(n(5)),l=n(21),u=n(13);function c(e){return e&&e.__esModule?e:{default:e}}var h=a.default.prototype.extend();h.prototype.init=function(){var e=this;this.createElements(),this.eventManager=new s.default(this),this.bindEvents(),this.autoResize=(0,r.default)(),this.holderZIndex=-1,this.instance.addHook("afterDestroy",(function(){e.destroy()}))},h.prototype.prepare=function(e,t,n,o,r,s){for(var l=this,u=this.state,c=arguments.length,h=Array(c>6?c-6:0),d=6;d<c;d++)h[d-6]=arguments[d];if(a.default.prototype.prepare.apply(this,[e,t,n,o,r,s].concat(h)),!s.readOnly){this.refreshDimensions(!0);var f=s.allowInvalid,p=s.fragmentSelection;f&&(this.TEXTAREA.value=""),u!==i.EditorState.FINISHED&&this.hideEditableElement(),!p&&this.instance._registerImmediate((function(){return l.focus()}))}},h.prototype.hideEditableElement=function(){this.textareaParentStyle.top="-9999px",this.textareaParentStyle.left="-9999px",this.textareaParentStyle.zIndex="-1",this.textareaParentStyle.position="fixed"},h.prototype.showEditableElement=function(){this.textareaParentStyle.zIndex=this.holderZIndex>=0?this.holderZIndex:"",this.textareaParentStyle.position=""},h.prototype.getValue=function(){return this.TEXTAREA.value},h.prototype.setValue=function(e){this.TEXTAREA.value=e},h.prototype.beginEditing=function(){if(this.state===i.EditorState.VIRGIN){this.TEXTAREA.value="";for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];a.default.prototype.beginEditing.apply(this,t)}};var d=function(e){var t=this.getActiveEditor(),n=(e.ctrlKey||e.metaKey)&&!e.altKey;if(e.target===t.TEXTAREA&&!(0,u.isImmediatePropagationStopped)(e))if(17!==e.keyCode&&224!==e.keyCode&&91!==e.keyCode&&93!==e.keyCode){switch(e.keyCode){case l.KEY_CODES.ARROW_RIGHT:case l.KEY_CODES.ARROW_LEFT: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 r=this.selection.isMultiple();if(n&&!r||e.altKey){if(t.isOpened()){var i=(0,o.getCaretPosition)(t.TEXTAREA),a=t.getValue(),s=a.slice(0,i)+"\n"+a.slice(i);t.setValue(s),(0,o.setCaretPosition)(t.TEXTAREA,i+1)}else t.beginEditing(t.originalValue+"\n");(0,u.stopImmediatePropagation)(e)}e.preventDefault();break;case l.KEY_CODES.A:case l.KEY_CODES.X:case l.KEY_CODES.C:case l.KEY_CODES.V:n&&(0,u.stopImmediatePropagation)(e);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))}else(0,u.stopImmediatePropagation)(e)};h.prototype.open=function(){this.refreshDimensions(),this.showEditableElement(),this.instance.addHook("beforeKeyDown",d)},h.prototype.close=function(){this.autoResize.unObserve(),document.activeElement===this.TEXTAREA&&this.instance.listen(),this.hideEditableElement(),this.instance.removeHook("beforeKeyDown",d)},h.prototype.focus=function(){this.TEXTAREA.select(),(0,o.setCaretPosition)(this.TEXTAREA,this.TEXTAREA.value.length)},h.prototype.createElements=function(){this.TEXTAREA=document.createElement("TEXTAREA"),this.TEXTAREA.tabIndex=-1,(0,o.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.TEXTAREA_PARENT=document.createElement("DIV"),(0,o.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)},h.prototype.getEditedCell=function(){var e=void 0;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},h.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()},h.prototype.refreshDimensions=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state===i.EditorState.EDITING||e)if(this.TD=this.getEditedCell(),this.TD){var t=(0,o.offset)(this.TD),n=(0,o.offset)(this.instance.rootElement),r=this.instance.view.wt.wtOverlays.topOverlay.mainTableScrollableElement,a=this.instance.countRows(),s=r!==window?r.scrollTop:0,l=r!==window?r.scrollLeft:0,u=this.checkEditorSection(),c=["","left"].includes(u)?s:0,h=["","top","bottom"].includes(u)?l:0,d=t.top===n.top?0:1,f=this.instance.getSettings(),p=this.instance.hasColHeaders(),g=this.TD.style.backgroundColor,v=t.top-n.top-d-c,y=t.left-n.left-1-h,m=void 0;switch(u){case"top":m=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":m=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":m=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":m=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":m=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode)}(p&&0===this.instance.getSelectedLast()[0]||f.fixedRowsBottom&&this.instance.getSelectedLast()[0]===a-f.fixedRowsBottom)&&(v+=1),0===this.instance.getSelectedLast()[1]&&(y+=1),m&&-1!==m?this.textareaParentStyle[m[0]]=m[1]:(0,o.resetCssTransform)(this.TEXTAREA_PARENT),this.textareaParentStyle.top=v+"px",this.textareaParentStyle.left=y+"px",this.showEditableElement();var w=this.instance.view.wt.wtViewport.rowsRenderCalculator.startPosition,C=this.instance.view.wt.wtViewport.columnsRenderCalculator.startPosition,b=this.instance.view.wt.wtOverlays.leftOverlay.getScrollPosition(),E=this.instance.view.wt.wtOverlays.topOverlay.getScrollPosition(),S=(0,o.getScrollbarWidth)(),O=this.TD.offsetTop+w-E,T=this.TD.offsetLeft+C-b,_=(0,o.innerWidth)(this.TD)-8,R=(0,o.hasVerticalScrollbar)(r)?S:0,k=(0,o.hasHorizontalScrollbar)(r)?S:0,M=this.instance.view.maximumVisibleElementWidth(T)-9-R,A=this.TD.scrollHeight+1,N=Math.max(this.instance.view.maximumVisibleElementHeight(O)-k,23),H=(0,o.getComputedStyle)(this.TD);this.TEXTAREA.style.fontSize=H.fontSize,this.TEXTAREA.style.fontFamily=H.fontFamily,this.TEXTAREA.style.backgroundColor=g||(0,o.getComputedStyle)(this.TEXTAREA).backgroundColor,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(A,N),maxHeight:N,minWidth:Math.min(_,M),maxWidth:M},!0)}else e||this.close(!0)},h.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()}))},h.prototype.destroy=function(){this.eventManager.destroy()},t.default=h},function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},function(e,t,n){var o=n(60),r=Math.max,i=Math.min;e.exports=function(e,t){return(e=o(e))<0?r(e+t,0):i(e,t)}},function(e,t,n){var o=n(28);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e,t,n,o){if(!(e instanceof t)||void 0!==o&&o in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var o=n(30),r=n(104),i=n(105),a=n(18),s=n(25),l=n(106),u={},c={};(t=e.exports=function(e,t,n,h,d){var f,p,g,v,y=d?function(){return e}:l(e),m=o(n,h,t?2:1),w=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(i(y)){for(f=s(e.length);f>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=r(g,m,p.value,t))===u||v===c)return v}).BREAK=u,t.RETURN=c},function(e,t,n){"use strict";var o=n(15),r=n(3),i=n(28),a=n(62),s=n(32),l=n(65),u=n(64),c=n(9),h=n(23),d=n(81),f=n(53),p=n(210);e.exports=function(e,t,n,g,v,y){var m=o[e],w=m,C=v?"set":"add",b=w&&w.prototype,E={},S=function(e){var t=b[e];i(b,e,"delete"==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||b.forEach&&!h((function(){(new w).entries().next()})))){var O=new w,T=O[C](y?{}:-0,1)!=O,_=h((function(){O.has(1)})),R=d((function(e){new w(e)})),k=!y&&h((function(){for(var e=new w,t=5;t--;)e[C](t,t);return!e.has(-0)}));R||((w=t((function(t,n){u(t,w,e);var o=p(new m,t,w);return null!=n&&l(n,v,o[C],o),o}))).prototype=b,b.constructor=w),(_||k)&&(S("delete"),S("has"),v&&S("get")),(k||T)&&S(C),y&&b.clear&&delete b.clear}else w=g.getConstructor(t,e,v,C),a(w.prototype,n),s.NEED=!0;return f(w,e),E[e]=w,r(r.G+r.W+r.F*(w!=m),E),y||g.setStrong(w,e,v),w}},function(e,t,n){var o=n(54),r=n(51),i=n(24),a=n(75),s=n(27),l=n(100),u=Object.getOwnPropertyDescriptor;t.f=n(22)?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 r(!o.f.call(e,t),e[t])}},function(e,t,n){var o=n(30),r=n(77),i=n(31),a=n(25),s=n(211);e.exports=function(e,t){var n=1==e,l=2==e,u=3==e,c=4==e,h=6==e,d=5==e||h,f=t||s;return function(t,s,p){for(var g,v,y=i(t),m=r(y),w=o(s,p,3),C=a(m.length),b=0,E=n?f(t,C):l?f(t,0):void 0;C>b;b++)if((d||b in m)&&(v=w(g=m[b],b,y),e))if(n)E[b]=v;else if(v)switch(e){case 3:return!0;case 5:return g;case 6:return b;case 2:E.push(g)}else if(c)return!1;return h?-1:u||c?c:E}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var o=n(29),r=n(28),i=n(23),a=n(36),s=n(12);e.exports=function(e,t,n){var l=s(e),u=n(a,l,""[e]),c=u[0],h=u[1];i((function(){var t={};return t[l]=function(){return 7},7!=""[e](t)}))&&(r(String.prototype,e,c),o(RegExp.prototype,l,2==t?function(e,t){return h.call(e,this,t)}:function(e){return h.call(e,this)}))}},function(e,t,n){"use strict";t.__esModule=!0,t.DEFAULT_LANGUAGE_CODE=t.getLanguagesDictionaries=t.getDefaultLanguageDictionary=t.hasLanguageDictionary=t.getLanguageDictionary=t.registerLanguageDictionary=void 0;var o=n(1),r=n(199),i=s(n(38)),a=s(n(270));function s(e){return e&&e.__esModule?e:{default:e}}var l=a.default.languageCode,u=(0,i.default)("languagesDictionaries"),c=u.register,h=u.getItem,d=u.hasItem,f=u.getValues;function p(e,t){var n=e,i=t;return(0,o.isObject)(e)&&(n=(i=e).languageCode),function(e,t){e!==l&&(0,r.extendNotExistingKeys)(t,h(l))}(n,i),c(n,(0,o.deepClone)(i)),(0,o.deepClone)(i)}function g(e){return d(e)}t.registerLanguageDictionary=p,t.getLanguageDictionary=function(e){return g(e)?(0,o.deepClone)(h(e)):null},t.hasLanguageDictionary=g,t.getDefaultLanguageDictionary=function(){return a.default},t.getLanguagesDictionaries=function(){return f()},t.DEFAULT_LANGUAGE_CODE=l,p(a.default)},function(e,t,n){"use strict";t.__esModule=!0,t.SELECTION_TYPES=t.SELECTION_TYPE_OBJECT=t.SELECTION_TYPE_ARRAY=t.SELECTION_TYPE_EMPTY=t.SELECTION_TYPE_UNRECOGNIZED=void 0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},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};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,a.arrayEach)(e,(function(e){var t=n(e),i=o(t,4),s=i[1],l=i[3]-s+1;(0,a.arrayEach)(Array.from(new Array(l),(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,a.arrayReduce)(i,(function(e,t,n,o){return 0!==n&&t===o[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,a.arrayEach)(e,(function(e){var t=n(e),i=o(t,3),s=i[0],l=i[2]-s+1;(0,a.arrayEach)(Array.from(new Array(l),(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,a.arrayReduce)(i,(function(e,t,n,o){return 0!==n&&t===o[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};var i=n(4),a=n(2),s=n(11),l=t.SELECTION_TYPE_UNRECOGNIZED=0,u=t.SELECTION_TYPE_EMPTY=1,c=t.SELECTION_TYPE_ARRAY=2,h=t.SELECTION_TYPE_OBJECT=3,d=t.SELECTION_TYPES=[h,c],f=[["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,a=l;if(n){var s=e[0];0===e.length?a=u:o&&s instanceof i.CellRange?a=h:o&&Array.isArray(s)?a=v(s,g):e.length>=2&&e.length<=4&&!e.some((function(e,t){return!f[t].includes(void 0===e?"undefined":r(e))}))&&(a=c)}return a}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.keepDirection,o=void 0!==n&&n,r=t.propToCol;if(!d.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(t){var n=e===h,i=n?t.from.row:t[0],a=n?t.from.col:t[1],l=n?t.to.row:t[2],u=n?t.to.col:t[3];if("function"==typeof r&&("string"==typeof a&&(a=r(a)),"string"==typeof u&&(u=r(u))),(0,s.isUndefined)(l)&&(l=i),(0,s.isUndefined)(u)&&(u=a),!o){var c=i,d=a,f=l,p=u;i=Math.min(c,f),a=Math.min(d,p),l=Math.max(c,f),u=Math.max(d,p)}return[i,a,l,u]}}},function(e,t,n){"use strict";t.__esModule=!0,t.FIRST_AFTER_SECOND=t.FIRST_BEFORE_SECOND=t.DO_NOT_SWAP=void 0,t.getSortFunctionForColumn=function(e){return e.sortFunction?e.sortFunction:"date"===e.type?o.default:"numeric"===e.type?i.default:r.default};var o=a(n(292)),r=a(n(293)),i=a(n(294));function a(e){return e&&e.__esModule?e:{default:e}}t.DO_NOT_SWAP=0,t.FIRST_BEFORE_SECOND=-1,t.FIRST_AFTER_SECOND=1},function(e,t,n){var o=n(9),r=n(15).document,i=o(r)&&o(r.createElement);e.exports=function(e){return i?r.createElement(e):{}}},function(e,t,n){var o=n(9);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var o=n(18),r=n(208),i=n(80),a=n(78)("IE_PROTO"),s=function(){},l="prototype",u=function(){var e,t=n(74)("iframe"),o=i.length;for(t.style.display="none",n(103).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;o--;)delete u[l][i[o]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[l]=o(e),n=new s,s[l]=null,n[a]=e):n=u(),void 0===t?n:r(n,t)}},function(e,t,n){var o=n(44);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==o(e)?e.split(""):Object(e)}},function(e,t,n){var o=n(79)("keys"),r=n(50);e.exports=function(e){return o[e]||(o[e]=r(e))}},function(e,t,n){var o=n(37),r=n(15),i="__core-js_shared__",a=r[i]||(r[i]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:o.version,mode:n(49)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var o=n(12)("iterator"),r=!1;try{var i=[7][o]();i.return=function(){r=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var i=[7],a=i[o]();a.next=function(){return{done:n=!0}},i[o]=function(){return a},e(i)}catch(e){}return n}},function(e,t,n){var o,r,i,a=n(30),s=n(214),l=n(103),u=n(74),c=n(15),h=c.process,d=c.setImmediate,f=c.clearImmediate,p=c.MessageChannel,g=c.Dispatch,v=0,y={},m="onreadystatechange",w=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},C=function(e){w.call(e.data)};d&&f||(d=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)},o(v),v},f=function(e){delete y[e]},"process"==n(44)(h)?o=function(e){h.nextTick(a(w,e,1))}:g&&g.now?o=function(e){g.now(a(w,e,1))}:p?(i=(r=new p).port2,r.port1.onmessage=C,o=a(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(o=function(e){c.postMessage(e+"","*")},c.addEventListener("message",C,!1)):o=m in u("script")?function(e){l.appendChild(u("script"))[m]=function(){l.removeChild(this),w.call(e)}}:function(e){setTimeout(a(w,e,1),0)}),e.exports={set:d,clear:f}},function(e,t,n){var o=n(15).navigator;e.exports=o&&o.userAgent||""},function(e,t,n){var o=n(101),r=n(80).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,r)}},function(e,t,n){var o=n(144),r=n(36);e.exports=function(e,t,n){if(o(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(r(e))}},function(e,t,n){var o=n(12)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){"use strict";var o=n(20),r=n(51);e.exports=function(e,t,n){t in e?o.f(e,t,r(0,n)):e[t]=n}},function(e,t,n){"use strict";var o=n(46),r=n(110),i=n(52),a=n(24);e.exports=n(108)(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,r(1)):r(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){"use strict";t.__esModule=!0,t.getRegisteredCellTypes=t.getRegisteredCellTypeNames=t.hasCellType=t.getCellType=t.registerCellType=void 0;var o=v(n(38)),r=n(17),i=n(14),a=n(34),s=v(n(255)),l=v(n(256)),u=v(n(257)),c=v(n(258)),h=v(n(259)),d=v(n(260)),f=v(n(261)),p=v(n(262)),g=v(n(263));function v(e){return e&&e.__esModule?e:{default:e}}var y=(0,o.default)("cellTypes"),m=y.register,w=y.getItem,C=y.hasItem,b=y.getNames,E=y.getValues;function S(e,t){var n=t.editor,o=t.renderer,s=t.validator;n&&(0,r.registerEditor)(e,n),o&&(0,i.registerRenderer)(e,o),s&&(0,a.registerValidator)(e,s),m(e,t)}S("autocomplete",s.default),S("checkbox",l.default),S("date",u.default),S("dropdown",c.default),S("handsontable",h.default),S("numeric",d.default),S("password",f.default),S("text",p.default),S("time",g.default),t.registerCellType=S,t.getCellType=function(e){if(!C(e))throw Error('You declared cell type "'+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.hasCellType=C,t.getRegisteredCellTypeNames=b,t.getRegisteredCellTypes=E},function(e,t,n){"use strict";t.__esModule=!0;var o,r,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},a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},s=(o=["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."],r=["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."],Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(r)}})));t.default=function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!1,F=this,V=function(){},U=new v.default(F),z=void 0,Y=void 0,G=void 0,K=void 0,X=void 0;(0,y.extend)(V.prototype,H.default.prototype),(0,y.extend)(V.prototype,t),(0,y.extend)(V.prototype,te(t)),(0,I.applyLanguageSetting)(V.prototype,t.language),(0,M.hasValidParameter)(o)&&(0,M.registerAsRootInstance)(this),(0,x.startObserving)(),this.isDestroyed=!1,this.rootElement=e,this.isHotTableEnv=(0,l.isChildOfWebComponentTable)(this.rootElement),v.default.isHotTableEnv=this.isHotTableEnv,this.container=document.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),this.guid="ht_"+(0,S.randomString)();var q=(0,k.getTranslator)(F);G=new _.default(F),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid),z={cellSettings:[],columnSettings:[],columnsSettingConflicts:["data","width","language"],settings:new V,selRange:null,isPopulated:null,scrollable:null,firstRun:!0};var Q=new j.Selection(z.settings,{countCols:function(){return F.countCols()},countRows:function(){return F.countRows()},propToCol:function(e){return Y.propToCol(e)},isEditorOpened:function(){return!!F.getActiveEditor()&&F.getActiveEditor().isOpened()}});function J(){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 Z(e,t,n){var o,r,i,s=new J;s.onQueueEmpty=function(){var o=void 0;e.length&&(o=F.runHooks("beforeChange",e,t||"edit"),(0,c.isFunction)(o)?(0,h.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===o&&e.splice(0,e.length)),n()};for(var u=e.length-1;u>=0;u--)if(null===e[u])e.splice(u,1);else{var d=a(e[u],4),f=d[0],p=d[1],g=d[3],v=Y.propToCol(p),y=F.getCellMeta(f,v);"numeric"===y.type&&"string"==typeof g&&(i=g).length>0&&/^-?[\d\s]*(\.|,)?\d*$/.test(i)&&(e[u][3]=(r=void 0,r=(o=g).replace(",","."),!1===isNaN(parseFloat(r))?parseFloat(r):o)),F.getCellValidator(y)&&(s.addValidatorToQueue(),F.validateCell(e[u][3],y,function(t,n){return function(o){if("boolean"!=typeof o)throw new Error("Validation error: result is not boolean");if(!1===o&&!1===n.allowInvalid){e.splice(t,1),n.valid=!0;var r=F.getCell(n.visualRow,n.visualCol);(0,l.removeClass)(r,F.getSettings().invalidCellClassName)}s.removeValidatorFormQueue()}}(u,y),t))}s.checkIfQueueIsEmpty()}function $(e,t){var n=e.length-1;if(!(n<0)){for(;n>=0;n--){var o=!1;if(null!==e[n]){if(null!==e[n][2]&&void 0!==e[n][2]||null!==e[n][3]&&void 0!==e[n][3]){if(z.settings.allowInsertRow)for(;e[n][0]>F.countRows()-1;)if(0===Y.createRow(void 0,void 0,t)){o=!0;break}if(!o){if("array"===F.dataType&&(!z.settings.columns||0===z.settings.columns.length)&&z.settings.allowInsertColumn)for(;Y.propToCol(e[n][1])>F.countCols()-1;)Y.createCol(void 0,void 0,t);Y.set(e[n][0],e[n][1],e[n][3])}}}else e.splice(n,1)}F.forceFullRender=!0,K.adjustRowsAndCols(),F.runHooks("beforeChangeRender",e,t),X.lockEditor(),F._refreshBorders(null),X.unlockEditor(),F.view.wt.wtOverlays.adjustElementsSize(),F.runHooks("afterChange",e,t||"edit");var r=F.getActiveEditor();r&&(0,d.isDefined)(r.refreshValue)&&r.refreshValue()}}function ee(e,t,n){return"object"===(void 0===e?"undefined":i(e))?e:[[e,t,n]]}function te(e){if((0,y.hasOwnProperty)(e,"type")){var t={},n=void 0;for(var o in"object"===i(e.type)?n=e.type:"string"==typeof e.type&&(n=(0,P.getCellType)(e.type)),n)(0,y.hasOwnProperty)(n,o)&&!(0,y.hasOwnProperty)(e,o)&&(t[o]=n[o]);return t}}this.selection=Q,this.selection.addLocalHook("beforeSetRangeStart",(function(e){n.runHooks("beforeSetRangeStart",e)})),this.selection.addLocalHook("beforeSetRangeStartOnly",(function(e){n.runHooks("beforeSetRangeStartOnly",e)})),this.selection.addLocalHook("beforeSetRangeEnd",(function(e){n.runHooks("beforeSetRangeEnd",e),e.row<0&&(e.row=n.view.wt.wtTable.getFirstVisibleRow()),e.col<0&&(e.col=n.view.wt.wtTable.getFirstVisibleColumn())})),this.selection.addLocalHook("afterSetRangeEnd",(function(e){var t=(0,y.createObjectPropListener)(!1),o=n.selection.getSelectedRange(),i=o.current(),a=i.from,s=i.to,u=o.size()-1;n.runHooks("afterSelection",a.row,a.col,s.row,s.col,t,u),n.runHooks("afterSelectionByProp",a.row,F.colToProp(a.col),s.row,F.colToProp(s.col),t,u);var c=n.selection.isSelectedByAnyHeader(),h=n.selection.selectedRange.current(),d=!0;r&&(d=!1),t.isTouched()&&(d=!t.value);var f=n.selection.isSelectedByRowHeader(),p=n.selection.isSelectedByColumnHeader();!1!==d&&(c?f?n.view.scrollViewportVertically(e.row):p&&n.view.scrollViewportHorizontally(e.col):h&&!n.selection.isMultiple()?n.view.scrollViewport(h.from):n.view.scrollViewport(e)),f&&p?(0,l.addClass)(n.rootElement,["ht__selection--rows","ht__selection--columns"]):f?((0,l.removeClass)(n.rootElement,"ht__selection--columns"),(0,l.addClass)(n.rootElement,"ht__selection--rows")):p?((0,l.removeClass)(n.rootElement,"ht__selection--rows"),(0,l.addClass)(n.rootElement,"ht__selection--columns")):(0,l.removeClass)(n.rootElement,["ht__selection--rows","ht__selection--columns"]),n._refreshBorders(null)})),this.selection.addLocalHook("afterSelectionFinished",(function(e){var t=e.length-1,o=e[t],r=o.from,i=o.to;n.runHooks("afterSelectionEnd",r.row,r.col,i.row,i.col,t),n.runHooks("afterSelectionEndByProp",r.row,F.colToProp(r.col),i.row,F.colToProp(i.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(function(e){var t=n.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("beforeModifyTransformStart",(function(e){n.runHooks("modifyTransformStart",e)})),this.selection.addLocalHook("afterModifyTransformStart",(function(e,t,o){n.runHooks("afterModifyTransformStart",e,t,o)})),this.selection.addLocalHook("beforeModifyTransformEnd",(function(e){n.runHooks("modifyTransformEnd",e)})),this.selection.addLocalHook("afterModifyTransformEnd",(function(e,t,o){n.runHooks("afterModifyTransformEnd",e,t,o)})),this.selection.addLocalHook("afterDeselect",(function(){X.destroyEditor(),n._refreshBorders(),(0,l.removeClass)(n.rootElement,["ht__selection--rows","ht__selection--columns"]),n.runHooks("afterDeselect")})),this.selection.addLocalHook("insertRowRequire",(function(e){n.alter("insert_row",e,1,"auto")})),this.selection.addLocalHook("insertColRequire",(function(e){n.alter("insert_col",e,1,"auto")})),K={alter:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments[3],r=arguments[4],i=void 0;function s(e,t,n,o){var r=(0,m.arrayMap)(new Array(n),(function(){return e=void 0,"array"===o?e=[]:"object"===o&&(e={}),e;var e}));r.unshift(t,0),e.splice.apply(e,B(r))}var l=function(e){if(0===e.length)return[];var t=[].concat(B(e));return t.sort((function(e,t){var n=a(e,1)[0],o=a(t,1)[0];return n===o?0:n>o?1:-1})),(0,m.arrayReduce)(t,(function(e,t){var n=a(t,2),o=n[0],r=n[1],i=e[e.length-1],s=a(i,2),l=s[0]+s[1];if(o<=l){var u=Math.max(r-(l-o),0);i[1]+=u}else e.push([o,r]);return e}),[t[0]])};switch(e){case"insert_row":var u=F.countSourceRows();if(F.getSettings().maxRows===u)return;t=(0,d.isDefined)(t)?t:u,i=Y.createRow(t,n,o),s(z.cellSettings,t,n,"array"),i&&(Q.isSelected()&&Q.selectedRange.current().from.row>=t?(Q.selectedRange.current().from.row+=i,Q.transformEnd(i,0)):F._refreshBorders());break;case"insert_col":i=Y.createCol(t,n,o);for(var c=0,h=F.countSourceRows();c<h;c++)z.cellSettings[c]&&s(z.cellSettings[c],t,n);if(i){if(Array.isArray(F.getSettings().colHeaders)){var f=[t,0];f.length+=i,Array.prototype.splice.apply(F.getSettings().colHeaders,f)}Q.isSelected()&&Q.selectedRange.current().from.col>=t?(Q.selectedRange.current().from.col+=i,Q.transformEnd(0,i)):F._refreshBorders()}break;case"remove_row":var p=function(e){var t=0;(0,m.arrayEach)(e,(function(e){var r=a(e,2),i=r[0],s=r[1],l=(0,d.isEmpty)(i)?F.countRows()-1:Math.max(i-t,0);Number.isInteger(i)&&(i=Math.max(i-t,0)),Y.removeRow(i,s,o),z.cellSettings.splice(l,n);var u=F.countRows(),c=F.getSettings().fixedRowsTop;c>=l+1&&(F.getSettings().fixedRowsTop-=Math.min(s,c-l));var h=F.getSettings().fixedRowsBottom;h&&l>=u-h&&(F.getSettings().fixedRowsBottom-=Math.min(s,h)),t+=s}))};Array.isArray(t)?p(l(t)):p([[t,n]]),K.adjustRowsAndCols(),F._refreshBorders();break;case"remove_col":var g=function(e){var t=0;(0,m.arrayEach)(e,(function(e){var n=a(e,2),r=n[0],i=n[1],s=(0,d.isEmpty)(r)?F.countCols()-1:Math.max(r-t,0),l=q.toPhysicalColumn(s);Number.isInteger(r)&&(r=Math.max(r-t,0)),Y.removeCol(r,i,o);for(var u=0,c=F.countSourceRows();u<c;u++)z.cellSettings[u]&&z.cellSettings[u].splice(l,i);var h=F.getSettings().fixedColumnsLeft;h>=s+1&&(F.getSettings().fixedColumnsLeft-=Math.min(i,h-s)),Array.isArray(F.getSettings().colHeaders)&&(void 0===l&&(l=-1),F.getSettings().colHeaders.splice(l,i)),t+=i}))};Array.isArray(t)?g(l(t)):g([[t,n]]),K.adjustRowsAndCols(),F._refreshBorders();break;default:throw new Error('There is no such action "'+e+'"')}r||K.adjustRowsAndCols()},adjustRowsAndCols:function(){if(z.settings.minRows){var e=F.countRows();if(e<z.settings.minRows)for(var t=0,n=z.settings.minRows;t<n-e;t++)Y.createRow(F.countRows(),1,"auto")}if(z.settings.minSpareRows){var o=F.countEmptyRows(!0);if(o<z.settings.minSpareRows)for(;o<z.settings.minSpareRows&&F.countSourceRows()<z.settings.maxRows;o++)Y.createRow(F.countRows(),1,"auto")}var r=void 0;if((z.settings.minCols||z.settings.minSpareCols)&&(r=F.countEmptyCols(!0)),z.settings.minCols&&!z.settings.columns&&F.countCols()<z.settings.minCols)for(;F.countCols()<z.settings.minCols;r++)Y.createCol(F.countCols(),1,"auto");if(z.settings.minSpareCols&&!z.settings.columns&&"array"===F.dataType&&r<z.settings.minSpareCols)for(;r<z.settings.minSpareCols&&F.countCols()<z.settings.maxCols;r++)Y.createCol(F.countCols(),1,"auto");var i=F.countRows(),a=F.countCols();0!==i&&0!==a||Q.deselect(),Q.isSelected()&&(0,m.arrayEach)(Q.selectedRange,(function(e){var t=!1,n=e.from.row,o=e.from.col,r=e.to.row,s=e.to.col;n>i-1?(t=!0,r>(n=i-1)&&(r=n)):r>i-1&&(t=!0,n>(r=i-1)&&(n=r)),o>a-1?(t=!0,s>(o=a-1)&&(s=o)):s>a-1&&(t=!0,o>(s=a-1)&&(o=s)),t&&F.selectCell(n,o,r,s)})),F.view&&F.view.wt.wtOverlays.adjustElementsSize()},populateFromArray:function(e,t,n,o,r,a,s){var l=void 0,u=void 0,c=void 0,h=void 0,f=[],p={};if(0===(u=t.length))return!1;var g=void 0,v=void 0,m=void 0,w=void 0;switch(r){case"shift_down":for(g=n?n.col-e.col+1:0,v=n?n.row-e.row+1:0,c=0,h=(t=(0,R.translateRowsToColumns)(t)).length,m=Math.max(h,g);c<m;c++)if(c<h){var C;for(l=0,u=t[c].length;l<v-u;l++)t[c].push(t[c][l%u]);t[c].unshift(e.col+c,e.row,0),(C=F).spliceCol.apply(C,B(t[c]))}else{var b;t[c%h][0]=e.col+c,(b=F).spliceCol.apply(b,B(t[c%h]))}break;case"shift_right":for(g=n?n.col-e.col+1:0,v=n?n.row-e.row+1:0,l=0,u=t.length,w=Math.max(u,v);l<w;l++)if(l<u){var E;for(c=0,h=t[l].length;c<g-h;c++)t[l].push(t[l][c%h]);t[l].unshift(e.row+l,e.col,0),(E=F).spliceRow.apply(E,B(t[l]))}else{var S;t[l%u][0]=e.row+l,(S=F).spliceRow.apply(S,B(t[l%u]))}break;default:p.row=e.row,p.col=e.col;var O={row:n&&e?n.row-e.row+1:1,col:n&&e?n.col-e.col+1:1},T=0,_=0,k=!0,M=void 0,A=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=t[e%t.length];return null!==n?o[n%o.length]:o},N=t.length,H=n?n.row-e.row+1:0;for(u=n?H:Math.max(N,H),l=0;l<u&&!(n&&p.row>n.row&&H>N||!z.settings.allowInsertRow&&p.row>F.countRows()-1||p.row>=z.settings.maxRows);l++){var P=l-T,L=A(P).length,D=n?n.col-e.col+1:0;if(h=n?D:Math.max(L,D),p.col=e.col,M=F.getCellMeta(p.row,p.col),"CopyPaste.paste"!==o&&"Autofill.autofill"!==o||!M.skipRowOnPaste){for(_=0,c=0;c<h&&!(n&&p.col>n.col&&D>L||!z.settings.allowInsertColumn&&p.col>F.countCols()-1||p.col>=z.settings.maxCols);c++)if(M=F.getCellMeta(p.row,p.col),"CopyPaste.paste"!==o&&"Autofill.fill"!==o||!M.skipColumnOnPaste)if(M.readOnly)p.col+=1;else{var I=c-_,x=A(P,I),j=F.getDataAtCell(p.row,p.col),W={row:P,col:I};if("Autofill.fill"===o){var V=F.runHooks("beforeAutofillInsidePopulate",W,a,t,s,{},O);V&&(x=(0,d.isUndefined)(V.value)?x:V.value)}if(null!==x&&"object"===(void 0===x?"undefined":i(x)))if(null===j||"object"!==(void 0===j?"undefined":i(j)))k=!1;else{var U=(0,y.duckSchema)(j[0]||j),Y=(0,y.duckSchema)(x[0]||x);(0,y.isObjectEqual)(U,Y)?x=(0,y.deepClone)(x):k=!1}else null!==j&&"object"===(void 0===j?"undefined":i(j))&&(k=!1);k&&f.push([p.row,p.col,x]),k=!0,p.col+=1}else _+=1,p.col+=1,h+=1;p.row+=1}else T+=1,p.row+=1,u+=1}F.setDataAtCell(f,null,null,o||"populateFromArray")}}},this.init=function(){G.setData(z.settings.data),F.runHooks("beforeInit"),(0,f.isMobileBrowser)()&&(0,l.addClass)(F.rootElement,"mobile"),this.updateSettings(z.settings,!0),this.view=new T.default(this),X=g.default.getInstance(F,z,Q,Y),this.forceFullRender=!0,F.runHooks("init"),this.view.render(),"object"===i(z.firstRun)&&(F.runHooks("afterChange",z.firstRun[0],z.firstRun[1]),z.firstRun=!1),F.runHooks("afterInit")},this.validateCell=function(e,t,n,o){var r,i=F.getCellValidator(t);function a(e){if(arguments.length>1&&void 0!==arguments[1]&&!arguments[1]||!0===t.hidden)n(e);else{var o=t.visualCol,r=t.visualRow,i=F.getCell(r,o,!0);i&&"TH"!==i.nodeName&&F.view.wt.wtSettings.settings.cellRenderer(r,o,i),n(e)}}(0,d.isRegExp)(i)&&(r=i,i=function(e,t){t(r.test(e))}),(0,c.isFunction)(i)?(e=F.runHooks("beforeValidate",e,t.visualRow,t.prop,o),F._registerTimeout(setTimeout((function(){i.call(t,e,(function(n){n=F.runHooks("afterValidate",n,e,t.visualRow,t.prop,o),t.valid=n,a(n),F.runHooks("postAfterValidate",n,e,t.visualRow,t.prop,o)}))}),0))):F._registerTimeout(setTimeout((function(){t.valid=!0,a(t.valid,!1)}),0))},this.setDataAtCell=function(e,t,n,o){var r,a=ee(e,t,n),s=[],l=o,u=void 0,c=void 0;for(u=0,r=a.length;u<r;u++){if("object"!==i(a[u]))throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof a[u][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`");c=Y.colToProp(a[u][1]),s.push([a[u][0],c,G.getAtCell(q.toPhysicalRow(a[u][0]),a[u][1]),a[u][2]])}l||"object"!==(void 0===e?"undefined":i(e))||(l=t),F.runHooks("afterSetDataAtCell",s,l),Z(s,l,(function(){$(s,l)}))},this.setDataAtRowProp=function(e,t,n,o){var r,a=ee(e,t,n),s=[],l=o,u=void 0;for(u=0,r=a.length;u<r;u++)s.push([a[u][0],a[u][1],G.getAtCell(q.toPhysicalRow(a[u][0]),a[u][1]),a[u][2]]);l||"object"!==(void 0===e?"undefined":i(e))||(l=t),F.runHooks("afterSetDataAtRowProp",s,l),Z(s,l,(function(){$(s,l)}))},this.listen=function(){if(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]){var e=!document.activeElement||document.activeElement&&void 0===document.activeElement.nodeName;document.activeElement&&document.activeElement!==document.body&&!e?document.activeElement.blur():e&&document.body.focus()}F&&!F.isListening()&&(W=F.guid,F.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(W=null,F.runHooks("afterUnlisten"))},this.isListening=function(){return W===F.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];F._refreshBorders(e,t)},this.populateFromArray=function(e,t,n,o,r,a,s,l,u){if("object"!==(void 0===n?"undefined":i(n))||"object"!==i(n[0]))throw new Error("populateFromArray parameter `input` must be an array of arrays");var c="number"==typeof o?new A.CellCoords(o,r):null;return K.populateFromArray(new A.CellCoords(e,t),n,c,a,s,l,u)},this.spliceCol=function(e,t,n){for(var o,r=arguments.length,i=Array(r>3?r-3:0),a=3;a<r;a++)i[a-3]=arguments[a];return(o=Y).spliceCol.apply(o,[e,t,n].concat(i))},this.spliceRow=function(e,t,n){for(var o,r=arguments.length,i=Array(r>3?r-3:0),a=3;a<r;a++)i[a-3]=arguments[a];return(o=Y).spliceRow.apply(o,[e,t,n].concat(i))},this.getSelected=function(){if(Q.isSelected())return(0,m.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=this.getSelected(),t=void 0;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(Q.isSelected())return Array.from(Q.getSelectedRange())},this.getSelectedRangeLast=function(){var e=this.getSelectedRange(),t=void 0;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(){var e=this;if(Q.isSelected()){var t=[];(0,m.arrayEach)(Q.getSelectedRange(),(function(n){var o=n.getTopLeftCorner(),r=n.getBottomRightCorner();(0,O.rangeEach)(o.row,r.row,(function(n){(0,O.rangeEach)(o.col,r.col,(function(o){e.getCellMeta(n,o).readOnly||t.push([n,o,""])}))}))})),t.length>0&&this.setDataAtCell(t)}},this.render=function(){F.view&&(F.renderCall=!0,F.forceFullRender=!0,X.lockEditor(),F._refreshBorders(null),X.unlockEditor())},this.loadData=function(e){if(Array.isArray(z.settings.dataSchema)?F.dataType="array":(0,c.isFunction)(z.settings.dataSchema)?F.dataType="function":F.dataType="object",Y&&Y.destroy(),Y=new p.default(F,z,V),"object"===(void 0===e?"undefined":i(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 ("+(void 0===e?"undefined":i(e))+" given)");var t=Y.getSchema();e=[];var n,o=void 0,r=0;for(r=0,n=z.settings.startRows;r<n;r++)if("object"!==F.dataType&&"function"!==F.dataType||!z.settings.dataSchema)if("array"===F.dataType)o=(0,y.deepClone)(t[0]),e.push(o);else{o=[];for(var a=0,s=z.settings.startCols;a<s;a++)o.push(null);e.push(o)}else o=(0,y.deepClone)(t),e.push(o)}z.isPopulated=!1,V.prototype.data=e,Array.isArray(e[0])&&(F.dataType="array"),Y.dataSource=e,G.data=e,G.dataType=F.dataType,G.colToProp=Y.colToProp.bind(Y),G.propToCol=Y.propToCol.bind(Y),z.cellSettings.length=0,K.adjustRowsAndCols(),F.runHooks("afterLoadData",z.firstRun),z.firstRun?z.firstRun=[null,"loadData"]:(F.runHooks("afterChange",null,"loadData"),F.render()),z.isPopulated=!0},this.getData=function(e,t,n,o){return(0,d.isUndefined)(e)?Y.getAll():Y.getRange(new A.CellCoords(e,t),new A.CellCoords(n,o),Y.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,n,o){return Y.getCopyableText(new A.CellCoords(e,t),new A.CellCoords(n,o))},this.getCopyableData=function(e,t){return Y.getCopyable(e,Y.colToProp(t))},this.getSchema=function(){return Y.getSchema()},this.updateSettings=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!1,i=void 0,a=void 0,s=void 0;if((0,d.isDefined)(e.rows))throw new Error('"rows" setting is no longer supported. do you mean startRows, minRows or maxRows?');if((0,d.isDefined)(e.cols))throw new Error('"cols" setting is no longer supported. do you mean startCols, minCols or maxCols?');for(i in e)"data"!==i&&("language"!==i?N.default.getSingleton().getRegistered().indexOf(i)>-1?((0,c.isFunction)(e[i])||Array.isArray(e[i]))&&(e[i].initialHook=!0,F.addHook(i,e[i])):!o&&(0,y.hasOwnProperty)(e,i)&&(V.prototype[i]=e[i]):(t=e.language,n=void 0,n=(0,I.normalizeLanguageCode)(t),(0,D.hasLanguageDictionary)(n)?(F.runHooks("beforeLanguageChange",n),V.prototype.language=n,F.runHooks("afterLanguageChange",n)):(0,I.warnUserAboutLanguageRegistration)(t)));void 0===e.data&&void 0===z.settings.data?F.loadData(null):void 0!==e.data?F.loadData(e.data):void 0!==e.columns&&Y.createMap(),s=F.countCols();var h=e.columns||V.prototype.columns;if(h&&(0,c.isFunction)(h)&&(s=F.countSourceCols(),r=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||(z.cellSettings.length=0),s>0){var f=void 0,p=void 0;for(i=0,a=0;i<s;i++)r&&!h(i)||(z.columnSettings[a]=(0,u.columnFactory)(V,z.columnsSettingConflicts),f=z.columnSettings[a].prototype,h&&(p=r?h(i):h[a])&&((0,y.extend)(f,p),(0,y.extend)(f,te(p))),a+=1)}(0,d.isDefined)(e.cell)&&(0,y.objectEach)(e.cell,(function(e){F.setCellMetaObject(e.row,e.col,e)})),F.runHooks("afterCellMetaReset"),(0,d.isDefined)(e.className)&&(V.prototype.className&&(0,l.removeClass)(F.rootElement,V.prototype.className),e.className&&(0,l.addClass)(F.rootElement,e.className));var g=F.rootElement.style.height;""!==g&&(g=parseInt(F.rootElement.style.height,10));var v=e.height;if((0,c.isFunction)(v)&&(v=v()),o&&F.rootElement.getAttribute("style")&&F.rootElement.setAttribute("data-initialstyle",F.rootElement.getAttribute("style")),null===v){var m=F.rootElement.getAttribute("data-initialstyle");m&&(m.indexOf("height")>-1||m.indexOf("overflow")>-1)?F.rootElement.setAttribute("style",m):(F.rootElement.style.height="",F.rootElement.style.overflow="")}else void 0!==v&&(F.rootElement.style.height=v+"px",F.rootElement.style.overflow="hidden");if(void 0!==e.width){var w=e.width;(0,c.isFunction)(w)&&(w=w()),F.rootElement.style.width=w+"px"}o||(Y.clearLengthCache(),F.view&&F.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked(),F.runHooks("afterUpdateSettings",e)),K.adjustRowsAndCols(),F.view&&!z.firstRun&&(F.forceFullRender=!0,X.lockEditor(),F._refreshBorders(null),X.unlockEditor()),o||!F.view||""!==g&&""!==v&&void 0!==v||g===v||F.view.wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){var e=F.getSelectedLast();if(V.prototype.getValue){if((0,c.isFunction)(V.prototype.getValue))return V.prototype.getValue.call(F);if(e)return F.getData()[e[0][0]][V.prototype.getValue]}else if(e)return F.getDataAtCell(e[0],e[1])},this.getSettings=function(){return z.settings},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,n,o,r){K.alter(e,t,n,o,r)},this.getCell=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return F.view.getCellAtCoords(new A.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 Y.colToProp(e)},this.propToCol=function(e){return Y.propToCol(e)},this.toVisualRow=function(e){return q.toVisualRow(e)},this.toVisualColumn=function(e){return q.toVisualColumn(e)},this.toPhysicalRow=function(e){return q.toPhysicalRow(e)},this.toPhysicalColumn=function(e){return q.toPhysicalColumn(e)},this.getDataAtCell=function(e,t){return Y.get(e,Y.colToProp(t))},this.getDataAtRowProp=function(e,t){return Y.get(e,t)},this.getDataAtCol=function(e){var t;return(t=[]).concat.apply(t,B(Y.getRange(new A.CellCoords(0,e),new A.CellCoords(z.settings.data.length-1,e),Y.DESTINATION_RENDERER)))},this.getDataAtProp=function(e){var t,n=Y.getRange(new A.CellCoords(0,Y.propToCol(e)),new A.CellCoords(z.settings.data.length-1,Y.propToCol(e)),Y.DESTINATION_RENDERER);return(t=[]).concat.apply(t,B(n))},this.getSourceData=function(e,t,n,o){return void 0===e?G.getData():G.getByRange(new A.CellCoords(e,t),new A.CellCoords(n,o))},this.getSourceDataArray=function(e,t,n,o){return void 0===e?G.getData(!0):G.getByRange(new A.CellCoords(e,t),new A.CellCoords(n,o),!0)},this.getSourceDataAtCol=function(e){return G.getAtColumn(e)},this.getSourceDataAtRow=function(e){return G.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return G.getAtCell(e,t)},this.getDataAtRow=function(e){return Y.getRange(new A.CellCoords(e,0),new A.CellCoords(e,this.countCols()-1),Y.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,n,o){var r=this,i=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,n,o],a=i[0],s=i[1],l=i[2],u=i[3],c=null,h=null;void 0===l&&(l=a),void 0===u&&(u=s);var d="mixed";return(0,O.rangeEach)(Math.min(a,l),Math.max(a,l),(function(e){var t=!0;return(0,O.rangeEach)(Math.min(s,u),Math.max(s,u),(function(n){var o=r.getCellMeta(e,n);return h=o.type,c?t=c===h:c=h,t})),d=t?h:"mixed",t})),d},this.removeCellMeta=function(e,t,n){var o=q.toPhysical(e,t),r=a(o,2),i=r[0],s=r[1],l=z.cellSettings[i][s][n];!1!==F.runHooks("beforeRemoveCellMeta",e,t,n,l)&&(delete z.cellSettings[i][s][n],F.runHooks("afterRemoveCellMeta",e,t,n,l)),l=null},this.spliceCellsMeta=function(e,t){for(var n,o=arguments.length,r=Array(o>2?o-2:0),i=2;i<o;i++)r[i-2]=arguments[i];(n=z.cellSettings).splice.apply(n,[e,t].concat(r))},this.setCellMetaObject=function(e,t,n){var o=this;"object"===(void 0===n?"undefined":i(n))&&(0,y.objectEach)(n,(function(n,r){o.setCellMeta(e,t,r,n)}))},this.setCellMeta=function(e,t,n,o){var r=q.toPhysical(e,t),i=a(r,2),s=i[0],l=i[1];z.columnSettings[l]||(z.columnSettings[l]=(0,u.columnFactory)(V,z.columnsSettingConflicts)),z.cellSettings[s]||(z.cellSettings[s]=[]),z.cellSettings[s][l]||(z.cellSettings[s][l]=new z.columnSettings[l]),z.cellSettings[s][l][n]=o,F.runHooks("afterSetCellMeta",e,t,n,o)},this.getCellsMeta=function(){return(0,m.arrayFlatten)(z.cellSettings)},this.getCellMeta=function(e,t){var n=Y.colToProp(t),o=q.toPhysical(e,t),r=a(o,2),i=r[0],s=r[1],l=i;null===l&&(l=e),z.columnSettings[s]||(z.columnSettings[s]=(0,u.columnFactory)(V,z.columnsSettingConflicts)),z.cellSettings[l]||(z.cellSettings[l]=[]),z.cellSettings[l][s]||(z.cellSettings[l][s]=new z.columnSettings[s]);var c=z.cellSettings[l][s];if(c.row=l,c.col=s,c.visualRow=e,c.visualCol=t,c.prop=n,c.instance=F,F.runHooks("beforeGetCellMeta",e,t,c),(0,y.extend)(c,te(c)),c.cells){var h=c.cells.call(c,l,s,n);h&&((0,y.extend)(c,h),(0,y.extend)(c,te(h)))}return F.runHooks("afterGetCellMeta",e,t,c),c},this.getCellMetaAtRow=function(e){return z.cellSettings[e]},this.isColumnModificationAllowed=function(){return!("object"===F.dataType||F.getSettings().columns)};var ne=(0,R.cellMethodLookupFactory)("renderer");this.getCellRenderer=function(e,t){return(0,b.getRenderer)(ne.call(this,e,t))},this.getCellEditor=(0,R.cellMethodLookupFactory)("editor");var oe=(0,R.cellMethodLookupFactory)("validator");this.getCellValidator=function(e,t){var n=oe.call(this,e,t);return"string"==typeof n&&(n=(0,E.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 o=new J;e&&(o.onQueueEmpty=e);for(var r=F.countRows()-1;r>=0;)if(void 0===t||-1!==t.indexOf(r)){for(var i=F.countCols()-1;i>=0;)void 0===n||-1!==n.indexOf(i)?(o.addValidatorToQueue(),F.validateCell(F.getDataAtCell(r,i),F.getCellMeta(r,i),(function(e){if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(o.valid=!1),o.removeValidatorFormQueue()}),"validateCells"),i-=1):i-=1;r-=1}else r-=1;o.checkIfQueueIsEmpty()},this.getRowHeader=function(e){var t=z.settings.rowHeaders,n=e;return void 0!==n&&(n=F.runHooks("modifyRowHeader",n)),void 0===n?(t=[],(0,O.rangeEach)(F.countRows()-1,(function(e){t.push(F.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[n]?t=t[n]:(0,c.isFunction)(t)?t=t(n):t&&"string"!=typeof t&&"number"!=typeof t&&(t=n+1),t},this.hasRowHeaders=function(){return!!z.settings.rowHeaders},this.hasColHeaders=function(){if(void 0!==z.settings.colHeaders&&null!==z.settings.colHeaders)return!!z.settings.colHeaders;for(var e=0,t=F.countCols();e<t;e++)if(F.getColHeader(e))return!0;return!1},this.getColHeader=function(e){var t=z.settings.columns&&(0,c.isFunction)(z.settings.columns),n=F.runHooks("modifyColHeader",e),o=z.settings.colHeaders;if(void 0===n){for(var r=[],i=t?F.countSourceCols():F.countCols(),a=0;a<i;a++)r.push(F.getColHeader(a));o=r}else{var s=n,l=F.runHooks("modifyCol",s),u=function(e){for(var t=[],n=F.countSourceCols(),o=0;o<n;o++)(0,c.isFunction)(F.getSettings().columns)&&F.getSettings().columns(o)&&t.push(o);return t[e]}(l);z.settings.columns&&(0,c.isFunction)(z.settings.columns)&&z.settings.columns(u)&&z.settings.columns(u).title?o=z.settings.columns(u).title:z.settings.columns&&z.settings.columns[l]&&z.settings.columns[l].title?o=z.settings.columns[l].title:Array.isArray(z.settings.colHeaders)&&void 0!==z.settings.colHeaders[l]?o=z.settings.colHeaders[l]:(0,c.isFunction)(z.settings.colHeaders)?o=z.settings.colHeaders(l):z.settings.colHeaders&&"string"!=typeof z.settings.colHeaders&&"number"!=typeof z.settings.colHeaders&&(o=(0,R.spreadsheetColumnLabel)(s))}return o},this._getColWidthFromSettings=function(e){var t=F.getCellMeta(0,e),n=t.width;if(void 0!==n&&n!==z.settings.width||(n=t.colWidths),null!=n){switch(void 0===n?"undefined":i(n)){case"object":n=n[e];break;case"function":n=n(e)}"string"==typeof n&&(n=parseInt(n,10))}return n},this.getColWidth=function(e){var t=F._getColWidthFromSettings(e);return void 0===(t=F.runHooks("modifyColWidth",t,e))&&(t=A.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){var t=z.settings.rowHeights;if(null!=t){switch(void 0===t?"undefined":i(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=F._getRowHeightFromSettings(e);return t=F.runHooks("modifyRowHeight",t,e)},this.countSourceRows=function(){return F.runHooks("modifySourceLength")||(F.getSourceData()?F.getSourceData().length:0)},this.countSourceCols=function(){var e=F.getSourceData()&&F.getSourceData()[0]?F.getSourceData()[0]:[];return(0,y.isObject)(e)?(0,y.deepObjectSize)(e):e.length||0},this.countRows=function(){return Y.getLength()},this.countCols=function(){var e=this.getSettings().maxCols,t=!1,n=0;if("array"===F.dataType&&(t=z.settings.data&&z.settings.data[0]&&z.settings.data[0].length),t&&(n=z.settings.data[0].length),z.settings.columns)if((0,c.isFunction)(z.settings.columns))if("array"===F.dataType){for(var o=0,r=0;r<n;r++)z.settings.columns(r)&&(o+=1);n=o}else"object"!==F.dataType&&"function"!==F.dataType||(n=Y.colToPropCache.length);else n=z.settings.columns.length;else"object"!==F.dataType&&"function"!==F.dataType||(n=Y.colToPropCache.length);return Math.min(e,n)},this.rowOffset=function(){return F.view.wt.wtTable.getFirstRenderedRow()},this.colOffset=function(){return F.view.wt.wtTable.getFirstRenderedColumn()},this.countRenderedRows=function(){return F.view.wt.drawn?F.view.wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return F.view.wt.drawn?F.view.wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return F.view.wt.drawn?F.view.wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return F.view.wt.drawn?F.view.wt.wtTable.getVisibleColumnsCount():-1},this.countEmptyRows=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,O.rangeEachReverse)(F.countRows()-1,(function(n){if(F.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(F.countRows()<1)return 0;var t=0;return(0,O.rangeEachReverse)(F.countCols()-1,(function(n){if(F.isEmptyCol(n))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return z.settings.isEmptyRow.call(F,e)},this.isEmptyCol=function(e){return z.settings.isEmptyCol.call(F,e)},this.selectCell=function(e,t,n,o){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,d.isUndefined)(e)&&!(0,d.isUndefined)(t)&&this.selectCells([[e,t,n,o]],r,i)},this.selectCells=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(r=!0);var n=Q.selectCells(e);return n&&t&&F.listen(),r=!1,n},this.selectCellByProp=function(e,t,n,o){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return(0,h.warn)((0,w.toSingleLine)(s)),this.selectCells([[e,t,n,o]],r,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(){r=!0,Q.selectAll(),r=!1},this.scrollViewportTo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=!n,i=!o,a=!1;return void 0!==e&&void 0!==t&&(a=F.view.scrollViewport(new A.CellCoords(e,t),r,o,n,i)),"number"==typeof e&&"number"!=typeof t&&(a=F.view.scrollViewportVertically(e,r,n)),"number"==typeof t&&"number"!=typeof e&&(a=F.view.scrollViewportHorizontally(t,o,i)),a},this.destroy=function(){F._clearTimeouts(),F._clearImmediates(),F.view&&F.view.destroy(),G&&G.destroy(),G=null,(0,x.stopObserving)(),(0,l.empty)(F.rootElement),U.destroy(),X&&X.destroy(),F.runHooks("afterDestroy"),N.default.getSingleton().destroy(F),(0,y.objectEach)(F,(function(e,t,n){var o;(0,c.isFunction)(e)?n[t]=(o=t,function(){throw new Error('The "'+o+'" method cannot be called because this Handsontable instance has been destroyed')}):"guid"!==t&&(n[t]=null)})),F.isDestroyed=!0,Y&&Y.destroy(),Y=null,z=null,K=null,Q=null,X=null,F=null,V=null},this.getActiveEditor=function(){return X.getActiveEditor()},this.getPlugin=function(e){return(0,C.getPlugin)(this,e)},this.getInstance=function(){return F},this.addHook=function(e,t){N.default.getSingleton().add(e,t,F)},this.hasHook=function(e){return N.default.getSingleton().has(e,F)},this.addHookOnce=function(e,t){N.default.getSingleton().once(e,t,F)},this.removeHook=function(e,t){N.default.getSingleton().remove(e,t,F)},this.runHooks=function(e,t,n,o,r,i,a){return N.default.getSingleton().run(F,e,t,n,o,r,i,a)},this.getTranslatedPhrase=function(e,t){return(0,L.getTranslatedPhrase)(z.settings.language,e,t)},this.timeouts=[],this._registerTimeout=function(e){var t=e;"function"==typeof t&&(t=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){(0,m.arrayEach)(this.timeouts,(function(e){clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,m.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];X.destroyEditor(e),F.view.render(),t&&Q.isSelected()&&X.prepareEditor()},N.default.getSingleton().run(F,"construct")};var l=n(0),u=n(91),c=n(43),h=n(58),d=n(11),f=n(39),p=F(n(264)),g=F(n(267)),v=F(n(5)),y=n(1),m=n(2),w=n(42),C=n(8),b=n(14),E=n(34),S=n(33),O=n(6),T=F(n(268)),_=F(n(269)),R=n(92),k=n(195),M=n(196),A=n(4),N=F(n(16)),H=F(n(197)),P=n(89),L=n(198),D=n(71),I=n(199),x=n(200),j=n(201);function F(e){return e&&e.__esModule?e:{default:e}}function B(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)}var W=null},function(e,t,n){"use strict";t.__esModule=!0,t.columnFactory=function(e,t){function n(){}(0,o.inherit)(n,e);for(var r=0,i=t.length;r<i;r++)n.prototype[t[r]]=void 0;return n};var o=n(1)},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,o=e.length-1;n<e.length;n+=1,o-=1)t+=Math.pow(a,o)*(i.indexOf(e[n])+1);return t-=1},t.createSpreadsheetData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=[],o=void 0,r=void 0;for(o=0;o<e;o++){var i=[];for(r=0;r<t;r++)i.push(s(r)+(o+1));n.push(i)}return n},t.createSpreadsheetObjectData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=[],o=void 0,r=void 0;for(o=0;o<e;o++){var i={};for(r=0;r<t;r++)i["prop"+r]=s(r)+(o+1);n.push(i)}return n},t.createEmptySpreadsheetData=function(e,t){for(var n=[],o=void 0,r=0;r<e;r++){o=[];for(var i=0;i<t;i++)o.push("");n.push(o)}return n},t.translateRowsToColumns=function(e){var t,n=[],o=void 0,r=void 0,i=void 0,a=0;for(o=0,t=e.length;o<t;o++)for(r=0,i=e[o].length;r<i;r++)r===a&&(n.push([]),a+=1),n[r].push(e[o][r]);return n},t.cellMethodLookupFactory=function(e,t){var n=void 0===t||t;return function(t,i){return function t(i){if(i){if((0,r.hasOwnProperty)(i,e)&&void 0!==i[e])return i[e];if((0,r.hasOwnProperty)(i,"type")&&i.type){if("string"!=typeof i.type)throw new Error("Cell type must be a string ");var a=(0,o.getCellType)(i.type);if((0,r.hasOwnProperty)(a,e))return a[e];if(n)return}return t(Object.getPrototypeOf(i))}}("number"==typeof t?this.getCellMeta(t,i):t)}};var o=n(89),r=n(1),i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",a=i.length;function s(e){for(var t=e+1,n="",o=void 0;t>0;)o=(t-1)%a,n=String.fromCharCode(65+o)+n,t=parseInt((t-o)/a,10);return n}},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(2),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 o(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){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,i.arrayEach)(this.rows,(function(t){e(t.row,(0,r.outerHeight)(t.table)-1)}))}},{key:"getWidths",value:function(e){this.injected||this.injectTable(),(0,i.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,i.arrayEach)(n.strings,(function(n){t.appendChild(e.createColElement(n.col))}))})),t}},{key:"createRow",value:function(e){var t=this,n=document,o=n.createDocumentFragment(),r=n.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,r),o.appendChild(r)),this.samples.forEach((function(r){(0,i.arrayEach)(r.strings,(function(r){var i=r.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),r.value,a),o.appendChild(l)}))})),o}},{key:"createColumnHeadersRow",value:function(){var e=this,t=document,n=t.createDocumentFragment();if(this.hot.hasRowHeaders()){var o=t.createElement("th");this.hot.view.appendColHeader(-1,o),n.appendChild(o)}return this.samples.forEach((function(o){(0,i.arrayEach)(o.strings,(function(o){var r=o.col,i=t.createElement("th");e.hot.view.appendColHeader(r,i),n.appendChild(i)}))})),n}},{key:"createCol",value:function(e){var t=this,n=document,o=n.createDocumentFragment();return this.samples.forEach((function(r){(0,i.arrayEach)(r.strings,(function(r){var i=r.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");s(t.hot,l,i,e,t.hot.colToProp(e),r.value,a),u.appendChild(l),o.appendChild(u)}))})),o}},{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=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 "+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;var o=n(2),r=n(1),i=n(6),a={_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,r=(0,o.arrayMax)(this._arrayMap)+1,a=[];return(0,i.rangeEach)(n-1,(function(n){a.push(t._arrayMap.splice(e+n,0,r+n))})),a},removeItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=[];if(Array.isArray(e)){var i=[].concat(this._arrayMap);e.sort((function(e,t){return t-e})),r=(0,o.arrayReduce)(e,(function(e,n){return t._arrayMap.splice(n,1),e.concat(i.slice(n,n+1))}),[])}else r=this._arrayMap.splice(e,n);return r},unshiftItems:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.removeItems(e,t);this._arrayMap=(0,o.arrayMap)(this._arrayMap,(function(e){var t=e,r=function(e){return(0,o.arrayReduce)(n,(function(t,n){var o=t;return e>n&&(o+=1),o}),0)}(t);return r&&(t-=r),t}))},shiftItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._arrayMap=(0,o.arrayMap)(this._arrayMap,(function(t){var o=t;return o>=e&&(o+=n),o})),(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(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)}(this._arrayMap.splice(e,1))))},clearMap:function(){this._arrayMap.length=0}};(0,r.defineGetter)(a,"MIXIN_NAME","arrayMapper",{writable:!1,enumerable:!1}),t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{name:o}};var o=t.KEY="---------"},function(e,t,n){"use strict";var o;t.__esModule=!0,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(305);Object.defineProperty(t,"ALIGNMENT",{enumerable:!0,get:function(){return r.KEY}});var i=n(306);Object.defineProperty(t,"CLEAR_COLUMN",{enumerable:!0,get:function(){return i.KEY}});var a=n(307);Object.defineProperty(t,"COLUMN_LEFT",{enumerable:!0,get:function(){return a.KEY}});var s=n(308);Object.defineProperty(t,"COLUMN_RIGHT",{enumerable:!0,get:function(){return s.KEY}});var l=n(309);Object.defineProperty(t,"READ_ONLY",{enumerable:!0,get:function(){return l.KEY}});var u=n(310);Object.defineProperty(t,"REDO",{enumerable:!0,get:function(){return u.KEY}});var c=n(311);Object.defineProperty(t,"REMOVE_COLUMN",{enumerable:!0,get:function(){return c.KEY}});var h=n(312);Object.defineProperty(t,"REMOVE_ROW",{enumerable:!0,get:function(){return h.KEY}});var d=n(313);Object.defineProperty(t,"ROW_ABOVE",{enumerable:!0,get:function(){return d.KEY}});var f=n(314);Object.defineProperty(t,"ROW_BELOW",{enumerable:!0,get:function(){return f.KEY}});var p=n(95);Object.defineProperty(t,"SEPARATOR",{enumerable:!0,get:function(){return p.KEY}});var g=n(315);Object.defineProperty(t,"UNDO",{enumerable:!0,get:function(){return g.KEY}}),t.predefinedItems=function(){var e={};return(0,v.objectEach)(H,(function(t,n){e[n]=t()})),e},t.addItem=function(e,t){-1===N.indexOf(e)&&(H[e]=t)};var v=n(1),y=M(r),m=M(i),w=M(a),C=M(s),b=M(l),E=M(u),S=M(c),O=M(h),T=M(d),_=M(f),R=M(p),k=M(g);function M(e){return e&&e.__esModule?e:{default:e}}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var N=t.ITEMS=[d.KEY,f.KEY,a.KEY,s.KEY,i.KEY,h.KEY,c.KEY,g.KEY,u.KEY,l.KEY,r.KEY,p.KEY],H=(A(o={},p.KEY,R.default),A(o,d.KEY,T.default),A(o,f.KEY,_.default),A(o,a.KEY,w.default),A(o,s.KEY,C.default),A(o,i.KEY,m.default),A(o,h.KEY,O.default),A(o,c.KEY,S.default),A(o,g.KEY,k.default),A(o,u.KEY,E.default),A(o,l.KEY,b.default),A(o,r.KEY,y.default),o)},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=c(["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."],["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."]),i=c(["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."],["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."]),a=c(["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.'],["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.']),s=c(["The merged cell declared at [",", ",'] has "rowspan" or "colspan" declared as \n "0", which is not supported. It cannot be added to the collection.'],["The merged cell declared at [",", ",'] has "rowspan" or "colspan" declared as \n "0", which is not supported. It cannot be added to the collection.']),l=n(4),u=n(42);function c(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var h=function(){function e(t,n,o,r){!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=o,this.colspan=r,this.removed=!1}return o(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],o=t+Math.abs(e[0]||e[1])-1,r=e[0]?"colspan":"rowspan",i=e[0]?"col":"row",a=Math.min(t,o),s=Math.max(t,o),l=this[i],u=this[i]+this[r]-1;if(l>=t&&(this[i]+=n),n>0)t<=u&&t>l&&(this[r]+=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,h=Math.abs(n)-c;this[i]-=h+n,this[r]-=c}else if(l<=a&&u>=s)this[r]+=n;else if(l<=a&&u>=a&&u<s){var d=u-a+1;this[r]-=d}}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 l.CellRange(new l.CellCoords(this.row,this.col),new l.CellCoords(this.row,this.col),new l.CellCoords(this.getLastRow(),this.getLastColumn()))}}],[{key:"NEGATIVE_VALUES_WARNING",value:function(e){return(0,u.toSingleLine)(r,e.row,e.col,e.rowspan,e.colspan)}},{key:"IS_OUT_OF_BOUNDS_WARNING",value:function(e){return(0,u.toSingleLine)(i,e.row,e.col)}},{key:"IS_SINGLE_CELL",value:function(e){return(0,u.toSingleLine)(a,e.row,e.col)}},{key:"ZERO_SPAN_WARNING",value:function(e){return(0,u.toSingleLine)(s,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=h},function(e,t,n){"use strict";var o=n(99),r=n(45),i="Map";e.exports=n(66)(i,(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var t=o.getEntry(r(this,i),e);return t&&t.v},set:function(e,t){return o.def(r(this,i),0===e?0:e,t)}},o,!0)},function(e,t,n){"use strict";var o=n(20).f,r=n(76),i=n(62),a=n(30),s=n(64),l=n(65),u=n(108),c=n(110),h=n(111),d=n(22),f=n(32).fastKey,p=n(45),g=d?"_s":"size",v=function(e,t){var n,o=f(t);if("F"!==o)return e._i[o];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,o){s(e,c,t,"_i"),e._t=t,e._i=r(null),e._f=void 0,e._l=void 0,e[g]=0,null!=o&&l(o,n,e[u],e)}));return i(c.prototype,{clear:function(){for(var e=p(this,t),n=e._i,o=e._f;o;o=o.n)o.r=!0,o.p&&(o.p=o.p.n=void 0),delete n[o.i];e._f=e._l=void 0,e[g]=0},delete:function(e){var n=p(this,t),o=v(n,e);if(o){var r=o.n,i=o.p;delete n._i[o.i],o.r=!0,i&&(i.n=r),r&&(r.p=i),n._f==o&&(n._f=r),n._l==o&&(n._l=i),n[g]--}return!!o},forEach:function(e){p(this,t);for(var n,o=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(o(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!v(p(this,t),e)}}),d&&o(c.prototype,"size",{get:function(){return p(this,t)[g]}}),c},def:function(e,t,n){var o,r,i=v(e,t);return i?i.v=n:(e._l=i={i:r=f(t,!0),k:t,v:n,p:o=e._l,n:void 0,r:!1},e._f||(e._f=i),o&&(o.n=i),e[g]++,"F"!==r&&(e._i[r]=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,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?c(0,"keys"==t?n.k:"values"==t?n.v:[n.k,n.v]):(e._t=void 0,c(1))}),n?"entries":"values",!n,!0),h(t)}}},function(e,t,n){e.exports=!n(22)&&!n(23)((function(){return 7!=Object.defineProperty(n(74)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var o=n(27),r=n(24),i=n(102)(!1),a=n(78)("IE_PROTO");e.exports=function(e,t){var n,s=r(e),l=0,u=[];for(n in s)n!=a&&o(s,n)&&u.push(n);for(;t.length>l;)o(s,n=t[l++])&&(~i(u,n)||u.push(n));return u}},function(e,t,n){var o=n(24),r=n(25),i=n(61);e.exports=function(e){return function(t,n,a){var s,l=o(t),u=r(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,n){var o=n(15).document;e.exports=o&&o.documentElement},function(e,t,n){var o=n(18);e.exports=function(e,t,n,r){try{return r?t(o(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&o(i.call(e)),t}}},function(e,t,n){var o=n(52),r=n(12)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||i[r]===e)}},function(e,t,n){var o=n(107),r=n(12)("iterator"),i=n(52);e.exports=n(37).getIteratorMethod=function(e){if(null!=e)return e[r]||e["@@iterator"]||i[o(e)]}},function(e,t,n){var o=n(44),r=n(12)("toStringTag"),i="Arguments"==o(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),r))?n:i?o(t):"Object"==(a=o(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){"use strict";var o=n(49),r=n(3),i=n(28),a=n(29),s=n(52),l=n(209),u=n(53),c=n(109),h=n(12)("iterator"),d=!([].keys&&"next"in[].keys()),f="keys",p="values",g=function(){return this};e.exports=function(e,t,n,v,y,m,w){l(n,t,v);var C,b,E,S=function(e){if(!d&&e in R)return R[e];switch(e){case f:case p:return function(){return new n(this,e)}}return function(){return new n(this,e)}},O=t+" Iterator",T=y==p,_=!1,R=e.prototype,k=R[h]||R["@@iterator"]||y&&R[y],M=k||S(y),A=y?T?S("entries"):M:void 0,N="Array"==t&&R.entries||k;if(N&&(E=c(N.call(new e)))!==Object.prototype&&E.next&&(u(E,O,!0),o||"function"==typeof E[h]||a(E,h,g)),T&&k&&k.name!==p&&(_=!0,M=function(){return k.call(this)}),o&&!w||!d&&!_&&R[h]||a(R,h,M),s[t]=M,s[O]=g,y)if(C={values:T?M:S(p),keys:m?M:S(f),entries:A},w)for(b in C)b in R||i(R,b,C[b]);else r(r.P+r.F*(d||_),t,C);return C}},function(e,t,n){var o=n(27),r=n(31),i=n(78)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),o(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var o=n(15),r=n(20),i=n(22),a=n(12)("species");e.exports=function(e){var t=o[e];i&&t&&!t[a]&&r.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,n){var o=n(9),r=n(18),i=function(e,t){if(r(e),!o(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,o){try{(o=n(30)(Function.call,n(67).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:o(e,n),e}}({},!1):void 0),check:i}},function(e,t,n){"use strict";var o=n(99),r=n(45);e.exports=n(66)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return o.def(r(this,"Set"),e=0===e?0:e,e)}},o)},function(e,t,n){"use strict";var o,r=n(68)(0),i=n(28),a=n(32),s=n(116),l=n(117),u=n(9),c=n(23),h=n(45),d="WeakMap",f=a.getWeak,p=Object.isExtensible,g=l.ufstore,v={},y=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(e){if(u(e)){var t=f(e);return!0===t?g(h(this,d)).get(e):t?t[this._i]:void 0}},set:function(e,t){return l.def(h(this,d),e,t)}},w=e.exports=n(66)(d,y,m,l,!0,!0);c((function(){return 7!=(new w).set((Object.freeze||Object)(v),7).get(v)}))&&(s((o=l.getConstructor(y,d)).prototype,m),a.NEED=!0,r(["delete","has","get","set"],(function(e){var t=w.prototype,n=t[e];i(t,e,(function(t,r){if(u(t)&&!p(t)){this._f||(this._f=new o);var i=this._f[e](t,r);return"set"==e?this:i}return n.call(this,t,r)}))})))},function(e,t,n){var o=n(44);e.exports=Array.isArray||function(e){return"Array"==o(e)}},function(e,t,n){"use strict";var o=n(35),r=n(69),i=n(54),a=n(31),s=n(77),l=Object.assign;e.exports=!l||n(23)((function(){var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=o}))?function(e,t){for(var n=a(e),l=arguments.length,u=1,c=r.f,h=i.f;l>u;)for(var d,f=s(arguments[u++]),p=c?o(f).concat(c(f)):o(f),g=p.length,v=0;g>v;)h.call(f,d=p[v++])&&(n[d]=f[d]);return n}:l},function(e,t,n){"use strict";var o=n(62),r=n(32).getWeak,i=n(18),a=n(9),s=n(64),l=n(65),u=n(68),c=n(27),h=n(45),d=u(5),f=u(6),p=0,g=function(e){return e._l||(e._l=new v)},v=function(){this.a=[]},y=function(e,t){return d(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=f(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,o){s(e,u,t,"_i"),e._t=t,e._i=p++,e._l=void 0,null!=o&&l(o,n,e[i],e)}));return o(u.prototype,{delete:function(e){if(!a(e))return!1;var n=r(e);return!0===n?g(h(this,t)).delete(e):n&&c(n,this._i)&&delete n[this._i]},has:function(e){if(!a(e))return!1;var n=r(e);return!0===n?g(h(this,t)).has(e):n&&c(n,this._i)}}),u},def:function(e,t,n){var o=r(i(t),!0);return!0===o?g(e).set(t,n):o[e._i]=n,e},ufstore:g}},function(e,t,n){"use strict";var o=n(117),r=n(45),i="WeakSet";n(66)(i,(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return o.def(r(this,i),e,!0)}},o,!1,!0)},function(e,t,n){"use strict";var o,r,i,a,s=n(49),l=n(15),u=n(30),c=n(107),h=n(3),d=n(9),f=n(63),p=n(64),g=n(65),v=n(213),y=n(82).set,m=n(215)(),w=n(120),C=n(216),b=n(83),E=n(217),S="Promise",O=l.TypeError,T=l.process,_=T&&T.versions,R=_&&_.v8||"",k=l[S],M="process"==c(T),A=function(){},N=r=w.f,H=!!function(){try{var e=k.resolve(1),t=(e.constructor={})[n(12)("species")]=function(e){e(A,A)};return(M||"function"==typeof PromiseRejectionEvent)&&e.then(A)instanceof t&&0!==R.indexOf("6.6")&&-1===b.indexOf("Chrome/66")}catch(e){}}(),P=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},L=function(e,t){if(!e._n){e._n=!0;var n=e._c;m((function(){for(var o=e._v,r=1==e._s,i=0,a=function(t){var n,i,a,s=r?t.ok:t.fail,l=t.resolve,u=t.reject,c=t.domain;try{s?(r||(2==e._h&&x(e),e._h=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),a=!0)),n===t.promise?u(O("Promise-chain cycle")):(i=P(n))?i.call(n,l,u):l(n)):u(o)}catch(e){c&&!a&&c.exit(),u(e)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&D(e)}))}},D=function(e){y.call(l,(function(){var t,n,o,r=e._v,i=I(e);if(i&&(t=C((function(){M?T.emit("unhandledRejection",r,e):(n=l.onunhandledrejection)?n({promise:e,reason:r}):(o=l.console)&&o.error&&o.error("Unhandled promise rejection",r)})),e._h=M||I(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},I=function(e){return 1!==e._h&&0===(e._a||e._c).length},x=function(e){y.call(l,(function(){var t;M?T.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},j=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()),L(t,!0))},F=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=P(e))?m((function(){var o={_w:n,_d:!1};try{t.call(e,u(F,o,1),u(j,o,1))}catch(e){j.call(o,e)}})):(n._v=e,n._s=1,L(n,!1))}catch(e){j.call({_w:n,_d:!1},e)}}};H||(k=function(e){p(this,k,S,"_h"),f(e),o.call(this);try{e(u(F,this,1),u(j,this,1))}catch(e){j.call(this,e)}},(o=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(62)(k.prototype,{then:function(e,t){var n=N(v(this,k));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=M?T.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new o;this.promise=e,this.resolve=u(F,e,1),this.reject=u(j,e,1)},w.f=N=function(e){return e===k||e===a?new i(e):r(e)}),h(h.G+h.W+h.F*!H,{Promise:k}),n(53)(k,S),n(111)(S),a=n(37)[S],h(h.S+h.F*!H,S,{reject:function(e){var t=N(this);return(0,t.reject)(e),t.promise}}),h(h.S+h.F*(s||!H),S,{resolve:function(e){return E(s&&this===a?k:this,e)}}),h(h.S+h.F*!(H&&n(81)((function(e){k.all(e).catch(A)}))),S,{all:function(e){var t=this,n=N(t),o=n.resolve,r=n.reject,i=C((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||o(n))}),r)})),--a||o(n)}));return i.e&&r(i.v),n.promise},race:function(e){var t=this,n=N(t),o=n.reject,r=C((function(){g(e,!1,(function(e){t.resolve(e).then(n.resolve,o)}))}));return r.e&&o(r.v),n.promise}})},function(e,t,n){"use strict";var o=n(63);function r(e){var t,n;this.promise=new e((function(e,o){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=o})),this.resolve=o(t),this.reject=o(n)}e.exports.f=function(e){return new r(e)}},function(e,t,n){"use strict";var o=n(15),r=n(27),i=n(22),a=n(3),s=n(28),l=n(32).KEY,u=n(23),c=n(79),h=n(53),d=n(50),f=n(12),p=n(122),g=n(218),v=n(219),y=n(115),m=n(18),w=n(9),C=n(24),b=n(75),E=n(51),S=n(76),O=n(123),T=n(67),_=n(20),R=n(35),k=T.f,M=_.f,A=O.f,N=o.Symbol,H=o.JSON,P=H&&H.stringify,L="prototype",D=f("_hidden"),I=f("toPrimitive"),x={}.propertyIsEnumerable,j=c("symbol-registry"),F=c("symbols"),B=c("op-symbols"),W=Object[L],V="function"==typeof N,U=o.QObject,z=!U||!U[L]||!U[L].findChild,Y=i&&u((function(){return 7!=S(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a}))?function(e,t,n){var o=k(W,t);o&&delete W[t],M(e,t,n),o&&e!==W&&M(W,t,o)}:M,G=function(e){var t=F[e]=S(N[L]);return t._k=e,t},K=V&&"symbol"==typeof N.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof N},X=function(e,t,n){return e===W&&X(B,t,n),m(e),t=b(t,!0),m(n),r(F,t)?(n.enumerable?(r(e,D)&&e[D][t]&&(e[D][t]=!1),n=S(n,{enumerable:E(0,!1)})):(r(e,D)||M(e,D,E(1,{})),e[D][t]=!0),Y(e,t,n)):M(e,t,n)},q=function(e,t){m(e);for(var n,o=v(t=C(t)),r=0,i=o.length;i>r;)X(e,n=o[r++],t[n]);return e},Q=function(e){var t=x.call(this,e=b(e,!0));return!(this===W&&r(F,e)&&!r(B,e))&&(!(t||!r(this,e)||!r(F,e)||r(this,D)&&this[D][e])||t)},J=function(e,t){if(e=C(e),t=b(t,!0),e!==W||!r(F,t)||r(B,t)){var n=k(e,t);return!n||!r(F,t)||r(e,D)&&e[D][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=A(C(e)),o=[],i=0;n.length>i;)r(F,t=n[i++])||t==D||t==l||o.push(t);return o},$=function(e){for(var t,n=e===W,o=A(n?B:C(e)),i=[],a=0;o.length>a;)!r(F,t=o[a++])||n&&!r(W,t)||i.push(F[t]);return i};V||(N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===W&&t.call(B,n),r(this,D)&&r(this[D],e)&&(this[D][e]=!1),Y(this,e,E(1,n))};return i&&z&&Y(W,e,{configurable:!0,set:t}),G(e)},s(N[L],"toString",(function(){return this._k})),T.f=J,_.f=X,n(84).f=O.f=Z,n(54).f=Q,n(69).f=$,i&&!n(49)&&s(W,"propertyIsEnumerable",Q,!0),p.f=function(e){return G(f(e))}),a(a.G+a.W+a.F*!V,{Symbol:N});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)f(ee[te++]);for(var ne=R(f.store),oe=0;ne.length>oe;)g(ne[oe++]);a(a.S+a.F*!V,"Symbol",{for:function(e){return r(j,e+="")?j[e]:j[e]=N(e)},keyFor:function(e){if(!K(e))throw TypeError(e+" is not a symbol!");for(var t in j)if(j[t]===e)return t},useSetter:function(){z=!0},useSimple:function(){z=!1}}),a(a.S+a.F*!V,"Object",{create:function(e,t){return void 0===t?S(e):q(S(e),t)},defineProperty:X,defineProperties:q,getOwnPropertyDescriptor:J,getOwnPropertyNames:Z,getOwnPropertySymbols:$}),H&&a(a.S+a.F*(!V||u((function(){var e=N();return"[null]"!=P([e])||"{}"!=P({a:e})||"{}"!=P(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,o=[e],r=1;arguments.length>r;)o.push(arguments[r++]);if(n=t=o[1],(w(t)||void 0!==e)&&!K(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!K(t))return t}),o[1]=t,P.apply(H,o)}}),N[L][I]||n(29)(N[L],I,N[L].valueOf),h(N,"Symbol"),h(Math,"Math",!0),h(o.JSON,"JSON",!0)},function(e,t,n){t.f=n(12)},function(e,t,n){var o=n(24),r=n(84).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 r(e)}catch(e){return a.slice()}}(e):r(o(e))}},function(e,t,n){var o=n(9),r=n(32).onFreeze;n(26)("freeze",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(9),r=n(32).onFreeze;n(26)("seal",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(9),r=n(32).onFreeze;n(26)("preventExtensions",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(9);n(26)("isFrozen",(function(e){return function(t){return!o(t)||!!e&&e(t)}}))},function(e,t,n){var o=n(9);n(26)("isSealed",(function(e){return function(t){return!o(t)||!!e&&e(t)}}))},function(e,t,n){var o=n(9);n(26)("isExtensible",(function(e){return function(t){return!!o(t)&&(!e||e(t))}}))},function(e,t,n){var o=n(24),r=n(67).f;n(26)("getOwnPropertyDescriptor",(function(){return function(e,t){return r(o(e),t)}}))},function(e,t,n){var o=n(31),r=n(109);n(26)("getPrototypeOf",(function(){return function(e){return r(o(e))}}))},function(e,t,n){var o=n(31),r=n(35);n(26)("keys",(function(){return function(e){return r(o(e))}}))},function(e,t,n){n(26)("getOwnPropertyNames",(function(){return n(123).f}))},function(e,t,n){var o=n(3);o(o.S+o.F,"Object",{assign:n(116)})},function(e,t,n){var o=n(3);o(o.S,"Object",{is:n(220)})},function(e,t,n){var o=n(3);o(o.S,"Object",{setPrototypeOf:n(112).set})},function(e,t,n){var o=n(20).f,r=Function.prototype,i=/^\s*function ([^ (]*)/,a="name";a in r||n(22)&&o(r,a,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){var o=n(3),r=n(24),i=n(25);o(o.S,"String",{raw:function(e){for(var t=r(e.raw),n=i(t.length),o=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s<o&&a.push(String(arguments[s]));return a.join("")}})},function(e,t,n){var o=n(3),r=n(61),i=String.fromCharCode,a=String.fromCodePoint;o(o.S+o.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],o=arguments.length,a=0;o>a;){if(t=+arguments[a++],r(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){"use strict";var o=n(3),r=n(221)(!1);o(o.P,"String",{codePointAt:function(e){return r(this,e)}})},function(e,t,n){var o=n(3);o(o.P,"String",{repeat:n(142)})},function(e,t,n){"use strict";var o=n(60),r=n(36);e.exports=function(e){var t=String(r(this)),n="",i=o(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,n){"use strict";var o=n(3),r=n(25),i=n(85),a="startsWith",s=""[a];o(o.P+o.F*n(86)(a),"String",{startsWith:function(e){var t=i(this,e,a),n=r(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),o=String(e);return s?s.call(t,o,n):t.slice(n,n+o.length)===o}})},function(e,t,n){var o=n(9),r=n(44),i=n(12)("match");e.exports=function(e){var t;return o(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==r(e))}},function(e,t,n){"use strict";var o=n(3),r=n(25),i=n(85),a="endsWith",s=""[a];o(o.P+o.F*n(86)(a),"String",{endsWith:function(e){var t=i(this,e,a),n=arguments.length>1?arguments[1]:void 0,o=r(t.length),l=void 0===n?o:Math.min(r(n),o),u=String(e);return s?s.call(t,u,l):t.slice(l-u.length,l)===u}})},function(e,t,n){"use strict";var o=n(3),r=n(85),i="includes";o(o.P+o.F*n(86)(i),"String",{includes:function(e){return!!~r(this,e,i).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){n(22)&&"g"!=/./g.flags&&n(20).f(RegExp.prototype,"flags",{configurable:!0,get:n(222)})},function(e,t,n){n(70)("match",1,(function(e,t,n){return[function(n){"use strict";var o=e(this),r=null==n?void 0:n[t];return void 0!==r?r.call(n,o):new RegExp(n)[t](String(o))},n]}))},function(e,t,n){n(70)("replace",2,(function(e,t,n){return[function(o,r){"use strict";var i=e(this),a=null==o?void 0:o[t];return void 0!==a?a.call(o,i,r):n.call(String(i),o,r)},n]}))},function(e,t,n){n(70)("split",2,(function(e,t,o){"use strict";var r=n(144),i=o,a=[].push,s="split",l="length",u="lastIndex";if("c"=="abbc"[s](/(b)*/)[1]||4!="test"[s](/(?:)/,-1)[l]||2!="ab"[s](/(?:ab)*/)[l]||4!="."[s](/(.?)(.?)/)[l]||"."[s](/()()/)[l]>1||""[s](/.?/)[l]){var c=void 0===/()??/.exec("")[1];o=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!r(e))return i.call(n,e,t);var o,s,h,d,f,p=[],g=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),v=0,y=void 0===t?4294967295:t>>>0,m=new RegExp(e.source,g+"g");for(c||(o=new RegExp("^"+m.source+"$(?!\\s)",g));(s=m.exec(n))&&!((h=s.index+s[0][l])>v&&(p.push(n.slice(v,s.index)),!c&&s[l]>1&&s[0].replace(o,(function(){for(f=1;f<arguments[l]-2;f++)void 0===arguments[f]&&(s[f]=void 0)})),s[l]>1&&s.index<n[l]&&a.apply(p,s.slice(1)),d=s[0][l],v=h,p[l]>=y));)m[u]===s.index&&m[u]++;return v===n[l]?!d&&m.test("")||p.push(""):p.push(n.slice(v)),p[l]>y?p.slice(0,y):p}}else"0"[s](void 0,0)[l]&&(o=function(e,t){return void 0===e&&0===t?[]:i.call(this,e,t)});return[function(n,r){var i=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,i,r):o.call(String(i),n,r)},o]}))},function(e,t,n){n(70)("search",1,(function(e,t,n){return[function(n){"use strict";var o=e(this),r=null==n?void 0:n[t];return void 0!==r?r.call(n,o):new RegExp(n)[t](String(o))},n]}))},function(e,t,n){"use strict";var o=n(30),r=n(3),i=n(31),a=n(104),s=n(105),l=n(25),u=n(87),c=n(106);r(r.S+r.F*!n(81)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,r,h,d=i(e),f="function"==typeof this?this:Array,p=arguments.length,g=p>1?arguments[1]:void 0,v=void 0!==g,y=0,m=c(d);if(v&&(g=o(g,p>2?arguments[2]:void 0,2)),null==m||f==Array&&s(m))for(n=new f(t=l(d.length));t>y;y++)u(n,y,v?g(d[y],y):d[y]);else for(h=m.call(d),n=new f;!(r=h.next()).done;y++)u(n,y,v?a(h,g,[r.value,y],!0):r.value);return n.length=y,n}})},function(e,t,n){"use strict";var o=n(3),r=n(87);o(o.S+o.F*n(23)((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;)r(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){var o=n(3);o(o.P,"Array",{copyWithin:n(223)}),n(46)("copyWithin")},function(e,t,n){"use strict";var o=n(3),r=n(68)(5),i="find",a=!0;i in[]&&Array(1)[i]((function(){a=!1})),o(o.P+o.F*a,"Array",{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(46)(i)},function(e,t,n){"use strict";var o=n(3),r=n(68)(6),i="findIndex",a=!0;i in[]&&Array(1)[i]((function(){a=!1})),o(o.P+o.F*a,"Array",{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(46)(i)},function(e,t,n){var o=n(3);o(o.P,"Array",{fill:n(224)}),n(46)("fill")},function(e,t,n){var o=n(3),r=n(15).isFinite;o(o.S,"Number",{isFinite:function(e){return"number"==typeof e&&r(e)}})},function(e,t,n){var o=n(3);o(o.S,"Number",{isInteger:n(160)})},function(e,t,n){var o=n(9),r=Math.floor;e.exports=function(e){return!o(e)&&isFinite(e)&&r(e)===e}},function(e,t,n){var o=n(3),r=n(160),i=Math.abs;o(o.S,"Number",{isSafeInteger:function(e){return r(e)&&i(e)<=9007199254740991}})},function(e,t,n){var o=n(3);o(o.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var o=n(3);o(o.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var o=n(3);o(o.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var o=n(3);o(o.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){"use strict";var o=n(3),r=n(102)(!0);o(o.P,"Array",{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(46)("includes")},function(e,t,n){var o=n(3),r=n(168)(!1);o(o.S,"Object",{values:function(e){return r(e)}})},function(e,t,n){var o=n(35),r=n(24),i=n(54).f;e.exports=function(e){return function(t){for(var n,a=r(t),s=o(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){var o=n(3),r=n(168)(!0);o(o.S,"Object",{entries:function(e){return r(e)}})},function(e,t,n){var o=n(3),r=n(225),i=n(24),a=n(67),s=n(87);o(o.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,o=i(e),l=a.f,u=r(o),c={},h=0;u.length>h;)void 0!==(n=l(o,t=u[h++]))&&s(c,t,n);return c}})},function(e,t,n){"use strict";var o=n(3),r=n(172),i=n(83);o(o.P+o.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){var o=n(25),r=n(142),i=n(36);e.exports=function(e,t,n,a){var s=String(i(e)),l=s.length,u=void 0===n?" ":String(n),c=o(t);if(c<=l||""==u)return s;var h=c-l,d=r.call(u,Math.ceil(h/u.length));return d.length>h&&(d=d.slice(0,h)),a?d+s:s+d}},function(e,t,n){"use strict";var o=n(3),r=n(172),i=n(83);o(o.P+o.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){var o=n(3),r=n(82);o(o.G+o.B,{setImmediate:r.set,clearImmediate:r.clear})},function(e,t,n){for(var o=n(88),r=n(35),i=n(28),a=n(15),s=n(29),l=n(52),u=n(12),c=u("iterator"),h=u("toStringTag"),d=l.Array,f={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=r(f),g=0;g<p.length;g++){var v,y=p[g],m=f[y],w=a[y],C=w&&w.prototype;if(C&&(C[c]||s(C,c,d),C[h]||s(C,h,y),l[y]=d,m))for(v in o)C[v]||i(C,v,o[v],!0)}},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=new WeakMap,i=function(){function e(t,n,o,i,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),r.set(this,{viewportWidth:t,scrollOffset:n,totalColumns:o,columnWidthFn:i,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=0,t=!0,n=[],o=void 0,i=r.get(this),a=i.onlyFullyVisible,s=i.overrideFn,l=i.scrollOffset,u=i.totalColumns,c=i.viewportWidth,h=0;h<u;h++)if(o=this._getColumnWidth(h),e<=l&&!a&&(this.startColumn=h),e>=l&&e+o<=l+(l>0?c+1:c)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=h),this.endColumn=h),n.push(e),e+=o,a||(this.endColumn=h),e>=l+c){t=!1;break}if(this.endColumn===u-1&&t)for(this.startColumn=this.endColumn;this.startColumn>0;){var d=n[this.endColumn]+o-n[this.startColumn-1];if((d<=c||!a)&&(this.startColumn-=1),d>c)break}null!==this.startColumn&&s&&s(this),this.startPosition=n[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=r.get(this),o=n.totalColumns,i=0,a=0;a<o;a++){var s=this._getColumnWidth(a),l=n.stretchingColumnWidthFn(void 0,a);"number"==typeof l?t-=l:i+=s}var u=t-i;if("all"===this.stretch&&u>0)this.stretchAllRatio=t/i,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===this.stretch&&t!==1/0){var c=this._getColumnWidth(o-1),h=u+c;this.stretchLastWidth=h>=0?h: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,o=r.get(this),i=o.totalColumns;if(!this.stretchAllColumnsWidth[e]){var a=Math.round(t*this.stretchAllRatio),s=o.stretchingColumnWidthFn(a,e);this.stretchAllColumnsWidth[e]=void 0===s?a:isNaN(s)?this._getColumnWidth(e):s}if(this.stretchAllColumnsWidth.length===i&&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===r.get(this).totalColumns-1?this.stretchLastWidth:null}},{key:"_getColumnWidth",value:function(t){var n=r.get(this).columnWidthFn(t);return isNaN(n)&&(n=e.DEFAULT_WIDTH),n}}]),e}();t.default=i},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=new WeakMap,i=function(){function e(t,n,o,i,a,s,l){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r.set(this,{viewportHeight:t,scrollOffset:n,totalRows:o,rowHeightFn:i,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=0,n=!0,o=[],i=r.get(this),a=i.onlyFullyVisible,s=i.overrideFn,l=i.rowHeightFn,u=i.scrollOffset,c=i.totalRows,h=i.viewportHeight,d=i.horizontalScrollbarHeight||0,f=void 0,p=0;p<c;p++)if(f=l(p),isNaN(f)&&(f=e.DEFAULT_HEIGHT),t<=u&&!a&&(this.startRow=p),t>=u&&t+f<=u+h-d&&(null===this.startRow&&(this.startRow=p),this.endRow=p),o.push(t),t+=f,a||(this.endRow=p),t>=u+h-d){n=!1;break}if(this.endRow===c-1&&n)for(this.startRow=this.endRow;this.startRow>0;){var g=o[this.endRow]+f-o[this.startRow-1];if((g<=h-d||!a)&&(this.startRow-=1),g>=h-d)break}null!==this.startRow&&s&&s(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=i},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(56),a=(o=i)&&o.__esModule?o:{default:o},s=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,o=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=o}return r(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,o=this.getTopLeftCorner(),r=this.getBottomRightCorner();return o.row<=t&&r.row>=t&&o.col<=n&&r.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 a.default(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=new a.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(),r=e.getTopLeftCorner(),i=e.getBottomRightCorner(),s=Math.min(t.row,r.row),l=Math.min(t.col,r.col),u=Math.max(n.row,i.row),c=Math.max(n.col,i.col),h=new a.default(s,l),d=new a.default(u,c);return this.from=h,this.to=d,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 o=[this.getBottomRightCorner(),this.getTopLeftCorner()];this.from=o[0],this.to=o[1];break;case"SW-NE":var r=[this.getBottomLeftCorner(),this.getTopRightCorner()];this.from=r[0],this.to=r[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 a.default(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"getBottomRightCorner",value:function(){return new a.default(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getTopRightCorner",value:function(){return new a.default(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getBottomLeftCorner",value:function(){return new a.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 a.default(t.from.row,t.from.col))||this.getTopRightCorner().isEqual(new a.default(t.from.row,t.to.col))||this.getBottomLeftCorner().isEqual(new a.default(t.to.row,t.from.col))||this.getBottomRightCorner().isEqual(new a.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 a.default))return!1;if(t&&t.includes(e)){if(this.getTopLeftCorner().isEqual(new a.default(t.from.row,t.from.col)))return this.getBottomRightCorner();if(this.getTopRightCorner().isEqual(new a.default(t.from.row,t.to.col)))return this.getBottomLeftCorner();if(this.getBottomLeftCorner().isEqual(new a.default(t.to.row,t.from.col)))return this.getTopRightCorner();if(this.getBottomRightCorner().isEqual(new a.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),o=Math.min(this.from.col,this.to.col),r=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"),r===l&&u.push("right"),n===a&&u.push("bottom"),o===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 r=e.col;r<=t.col;r++)this.from.row===o&&this.from.col===r||this.to.row===o&&this.to.col===r||n.push(new a.default(o,r));return n}},{key:"getAll",value:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),n=[],o=e.row;o<=t.row;o++)for(var r=e.col;r<=t.col;r++)e.row===o&&e.col===r?n.push(e):t.row===o&&t.col===r?n.push(t):n.push(new a.default(o,r));return n}},{key:"forAll",value:function(e){for(var t=this.getTopLeftCorner(),n=this.getBottomRightCorner(),o=t.row;o<=n.row;o++)for(var r=t.col;r<=n.col;r++)if(!1===e(o,r))return}},{key:"toObject",value:function(){return{from:this.from.toObject(),to:this.to.toObject()}}}]),e}();t.default=s},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function(){function e(t,n,o){!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=o}return o(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=r},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function(){function e(t,n,o){!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=o}return o(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=r},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(1),a=n(33),s=f(n(182)),l=f(n(183)),u=f(n(184)),c=f(n(185)),h=f(n(186)),d=f(n(188));function f(e){return e&&e.__esModule?e:{default:e}}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_"+(0,a.randomString)(),t.cloneSource?(this.cloneSource=t.cloneSource,this.cloneOverlay=t.cloneOverlay,this.wtSettings=t.cloneSource.wtSettings,this.wtTable=new h.default(this,t.table,t.wtRootElement),this.wtScroll=new u.default(this),this.wtViewport=t.cloneSource.wtViewport,this.wtEvent=new s.default(this),this.selections=this.cloneSource.selections):(this.wtSettings=new c.default(this,t),this.wtTable=new h.default(this,t.table),this.wtScroll=new u.default(this),this.wtViewport=new d.default(this),this.wtEvent=new s.default(this),this.selections=this.getSetting("selections"),this.wtOverlays=new l.default(this),this.exportSettingsAsClassNames()),this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(var o=0,i=this.wtTable.THEAD.childNodes[0].childNodes.length;o<i;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 o(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"),o=this.wtSettings.getSetting("fixedRowsBottom"),r=this.wtSettings.getSetting("fixedColumnsLeft");if(e.row<n&&e.col<r)return this.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell(e);if(e.row<n)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<r&&e.row>=t-o){if(this.wtOverlays.bottomLeftCornerOverlay&&this.wtOverlays.bottomLeftCornerOverlay.clone)return this.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<r)return this.wtOverlays.leftOverlay.clone.wtTable.getCell(e);if(e.row<t&&e.row>t-o&&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,o,r){return this.wtScroll.scrollViewport(e,t,n,o,r)}},{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,i.objectEach)({rowHeaders:["array"],columnHeaders:["array"]},(function(o,r){o.indexOf("array")>-1&&e.getSetting(r).length&&n.push("ht"+(0,a.toUpperCaseFirst)(r)),t.push("ht"+(0,a.toUpperCaseFirst)(r))})),(0,r.removeClass)(this.wtTable.wtRootElement.parentNode,t),(0,r.addClass)(this.wtTable.wtRootElement.parentNode,n)}},{key:"getSetting",value:function(e,t,n,o,r){return this.wtSettings.getSetting(e,t,n,o,r)}},{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,n){"use strict";t.__esModule=!0;var o,r=n(0),i=n(43),a=n(39),s=n(5),l=(o=s)&&o.__esModule?o:{default:o};function u(e){var t=this,n=new l.default(e),o=void 0;this.instance=e;var s=[null,null];this.dblClickTimeout=[null,null];var u=function(e){var n=document.activeElement,o=(0,i.partial)(r.getParent,e.realTarget),a=e.realTarget;if(a!==n&&o(0)!==n&&o(1)!==n){var l=t.parentCell(a);(0,r.hasClass)(a,"corner")?t.instance.getSetting("onCellCornerMouseDown",e,a):l.TD&&t.instance.hasSetting("onCellMouseDown")&&t.instance.getSetting("onCellMouseDown",e,l.coords,l.TD,t.instance),2!==e.button&&l.TD&&(s[0]=l.TD,clearTimeout(t.dblClickTimeout[0]),t.dblClickTimeout[0]=setTimeout((function(){s[0]=null}),1e3))}},c=function(){t.instance.touchMoving=!0},h=function(e){n.addEventListener(this,"touchmove",c),t.checkIfTouchMove=setTimeout((function(){!0===t.instance.touchMoving&&(t.instance.touchMoving=void 0,n.removeEventListener("touchmove",c,!1)),u(e)}),30)},d=function(e){if(2!==e.button){var n=t.parentCell(e.realTarget);n.TD===s[0]&&n.TD===s[1]?((0,r.hasClass)(e.realTarget,"corner")?t.instance.getSetting("onCellCornerDblClick",e,n.coords,n.TD,t.instance):t.instance.getSetting("onCellDblClick",e,n.coords,n.TD,t.instance),s[0]=null,s[1]=null):n.TD===s[0]?(t.instance.getSetting("onCellMouseUp",e,n.coords,n.TD,t.instance),s[1]=n.TD,clearTimeout(t.dblClickTimeout[1]),t.dblClickTimeout[1]=setTimeout((function(){s[1]=null}),500)):n.TD&&t.instance.hasSetting("onCellMouseUp")&&t.instance.getSetting("onCellMouseUp",e,n.coords,n.TD,t.instance)}},f=function(e){var n=e.target;!1!==function(e){var n=t.parentCell(e).coords;if(o&&n){var r=[n.row,o.from.row],i=r[0],a=r[1],s=[n.col,o.from.col];return i===a&&s[0]===s[1]}return!1}(n)&&!1!==["A","BUTTON","INPUT"].includes(n.tagName)||(e.preventDefault(),d(e))};if(n.addEventListener(this.instance.wtTable.holder,"mousedown",u),n.addEventListener(this.instance.wtTable.holder,"contextmenu",(function(e){if(t.instance.hasSetting("onCellContextMenu")){var n=t.parentCell(e.realTarget);n.TD&&t.instance.getSetting("onCellContextMenu",e,n.coords,n.TD,t.instance)}})),n.addEventListener(this.instance.wtTable.TABLE,"mouseover",(function(e){var n=void 0,o=void 0,i=void 0;t.instance.hasSetting("onCellMouseOver")&&(n=t.instance.wtTable.TABLE,o=(0,r.closestDown)(e.realTarget,["TD","TH"],n),i=t.instance.cloneSource||t.instance,o&&o!==i.lastMouseOver&&(0,r.isChildOf)(o,n)&&(i.lastMouseOver=o,t.instance.getSetting("onCellMouseOver",e,t.instance.wtTable.getCoords(o),o,t.instance)))})),n.addEventListener(this.instance.wtTable.TABLE,"mouseout",(function(e){var n=void 0,o=void 0,i=void 0;t.instance.hasSetting("onCellMouseOut")&&(n=t.instance.wtTable.TABLE,o=(0,r.closestDown)(e.realTarget,["TD","TH"],n),i=(0,r.closestDown)(e.relatedTarget,["TD","TH"],n),o&&o!==i&&(0,r.isChildOf)(o,n)&&t.instance.getSetting("onCellMouseOut",e,t.instance.wtTable.getCoords(o),o,t.instance))})),n.addEventListener(this.instance.wtTable.holder,"mouseup",d),this.instance.wtTable.holder.parentNode.parentNode&&(0,a.isMobileBrowser)()&&!t.instance.wtTable.isWorkingOnClone()){var p="."+this.instance.wtTable.holder.parentNode.className.split(" ").join(".");n.addEventListener(this.instance.wtTable.holder,"touchstart",(function(n){o=e.selections.getCell().cellRange,t.instance.touchApplied=!0,(0,r.isChildOf)(n.target,p)&&h.call(n.target,n)})),n.addEventListener(this.instance.wtTable.holder,"touchend",(function(e){t.instance.touchApplied=!1,(0,r.isChildOf)(e.target,p)&&f.call(e.target,e)})),t.instance.momentumScrolling||(t.instance.momentumScrolling={}),n.addEventListener(this.instance.wtTable.holder,"scroll",(function(){clearTimeout(t.instance.momentumScrolling._timeout),t.instance.momentumScrolling.ongoing||t.instance.getSetting("onBeforeTouchScroll"),t.instance.momentumScrolling.ongoing=!0,t.instance.momentumScrolling._timeout=setTimeout((function(){t.instance.touchApplied||(t.instance.momentumScrolling.ongoing=!1,t.instance.getSetting("onAfterMomentumScroll"))}),200)}))}n.addEventListener(window,"resize",(function(){"none"!==t.instance.getSetting("stretchH")&&t.instance.draw()})),this.destroy=function(){clearTimeout(this.dblClickTimeout[0]),clearTimeout(this.dblClickTimeout[1]),n.destroy()}}u.prototype.parentCell=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},t.default=u},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(2),a=n(21),s=n(39),l=c(n(5)),u=c(n(41));function c(e){return e&&e.__esModule?e:{default:e}}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);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 l.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 o(e,[{key:"prepareOverlays",value:function(){var e=!1;return this.topOverlay?e=this.topOverlay.updateStateOfRendering()||e:this.topOverlay=u.default.createOverlay(u.default.CLONE_TOP,this.wot),u.default.hasOverlay(u.default.CLONE_BOTTOM)||(this.bottomOverlay={needFullRender:!1,updateStateOfRendering:function(){return!1}}),u.default.hasOverlay(u.default.CLONE_BOTTOM_LEFT_CORNER)||(this.bottomLeftCornerOverlay={needFullRender:!1,updateStateOfRendering:function(){return!1}}),this.bottomOverlay?e=this.bottomOverlay.updateStateOfRendering()||e:this.bottomOverlay=u.default.createOverlay(u.default.CLONE_BOTTOM,this.wot),this.leftOverlay?e=this.leftOverlay.updateStateOfRendering()||e:this.leftOverlay=u.default.createOverlay(u.default.CLONE_LEFT,this.wot),this.topOverlay.needFullRender&&this.leftOverlay.needFullRender&&(this.topLeftCornerOverlay?e=this.topLeftCornerOverlay.updateStateOfRendering()||e:this.topLeftCornerOverlay=u.default.createOverlay(u.default.CLONE_TOP_LEFT_CORNER,this.wot)),this.bottomOverlay.needFullRender&&this.leftOverlay.needFullRender&&(this.bottomLeftCornerOverlay?e=this.bottomLeftCornerOverlay.updateStateOfRendering()||e:this.bottomLeftCornerOverlay=u.default.createOverlay(u.default.CLONE_BOTTOM_LEFT_CORNER,this.wot)),this.wot.getSetting("debug")&&!this.debug&&(this.debug=u.default.createOverlay(u.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,o=[];for(o.push([document.documentElement,"keydown",function(t){return e.onKeyDown(t)}]),o.push([document.documentElement,"keyup",function(){return e.onKeyUp()}]),o.push([document,"visibilitychange",function(){return e.onKeyUp()}]),o.push([t,"scroll",function(t){return e.onTableScroll(t)}]),t!==n&&o.push([n,"scroll",function(t){return e.onTableScroll(t)}]),window.devicePixelRatio&&window.devicePixelRatio>1||!(0,s.isChrome)()?o.push([this.instance.wtTable.wtRootElement.parentNode,"wheel",function(t){return e.onCloneWheel(t)}]):(this.topOverlay.needFullRender&&o.push([this.topOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.bottomOverlay.needFullRender&&o.push([this.bottomOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.leftOverlay.needFullRender&&o.push([this.leftOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.needFullRender&&o.push([this.topLeftCornerOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.needFullRender&&o.push([this.bottomLeftCornerOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}])),this.topOverlay.trimmingContainer!==window&&this.leftOverlay.trimmingContainer!==window&&o.push([window,"wheel",function(t){var n=void 0,o=t.wheelDeltaY||t.deltaY,r=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!==o||"left"===n&&0!==r||"bottom"===n&&0!==o||("topLeft"===n||"bottomLeft"===n)&&(0!==o||0!==r))&&t.preventDefault()}]);o.length;){var r=o.pop();this.eventManager.addEventListener(r[0],r[1],r[2]),this.registeredListeners.push(r)}}},{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,o=e.target;this.keyPressed&&(n!==window&&o!==window&&!e.target.contains(n)||t!==window&&o!==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,o=e.target,r=n!==window&&o!==window&&!e.target.contains(n),i=t!==window&&o!==window&&!e.target.contains(t);this.keyPressed&&(r||i)||this.translateMouseWheelToScroll(e)}},{key:"onKeyDown",value:function(e){this.keyPressed=(0,a.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],o=n[0],r=n[1];if(this.horizontalScrolling=e.scrollLeft!==o,this.verticalScrolling=t.scrollTop!==r,this.horizontalScrolling){e.scrollLeft=o;var i=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;i&&(i.scrollLeft=o)}this.verticalScrolling&&(t.scrollTop=r),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,o=t.clientHeight;n===this.spreaderLastSize.width&&o===this.spreaderLastSize.height||(this.spreaderLastSize.width=n,this.spreaderLastSize.height=o,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"),o=this.wot.wtViewport.getRowHeaderWidth(),r=this.wot.wtViewport.getColumnHeaderHeight(),i=this.wot.wtTable.hider.style;i.width=o+this.leftOverlay.sumCellSizes(0,t)+"px",i.height=r+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,i.arrayEach)(t,(function(t){t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(n=t.clone)})),n}}]),e}();t.default=h},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(6),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 o(e,[{key:"scrollViewport",value:function(e,t,n,o,r){var i=this.scrollViewportHorizontally(e.col,n,r),a=this.scrollViewportVertically(e.row,t,o);return i||a}},{key:"scrollViewportHorizontally",value:function(e,t,n){if(!this.wot.drawn)return!1;var o=this._getVariables(),r=o.fixedColumnsLeft,i=o.leftOverlay,a=o.totalColumns,s=!1;return e>=0&&e<=Math.max(a-1,0)&&(e>=r&&(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 o=this._getVariables(),r=o.fixedRowsBottom,i=o.fixedRowsTop,a=o.topOverlay,s=o.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-r||n)&&(l=a.scrollTo(e,!0))),l}},{key:"getFirstVisibleRow",value:function(){var e=this._getVariables(),t=e.topOverlay,n=e.wtTable,o=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),h=(0,r.innerHeight)(window),d=(0,r.getScrollTop)(window);if(u.top+c-h<=d){var f=o.getColumnHeaderHeight();f+=t.sumCellSizes(0,s),(0,i.rangeEachReverse)(a,1,(function(e){if(f+=t.sumCellSizes(e-1,e),u.top+c-f<=d)return l=e,!1}))}}return l}},{key:"getLastVisibleRow",value:function(){var e=this._getVariables(),t=e.topOverlay,n=e.wtTable,o=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 h=o.getColumnHeaderHeight();(0,i.rangeEach)(1,a,(function(e){if(h+=t.sumCellSizes(e-1,e),l.top+h-c>=u)return s=e-2,!1}))}}return s}},{key:"getFirstVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,o=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),h=(0,r.getScrollLeft)(window);if(l.left+u-c<=h){var d=o.getRowHeaderWidth();(0,i.rangeEachReverse)(a,1,(function(e){if(d+=t.sumCellSizes(e-1,e),l.left+u-d<=h)return s=e,!1}))}}return s}},{key:"getLastVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,o=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 h=o.getRowHeaderWidth();(0,i.rangeEach)(1,a,(function(e){if(h+=t.sumCellSizes(e-1,e),l.left+h-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;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(1),a=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=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 i=o.getSetting("data",e,t);(0,r.fastInnerText)(n,null==i?"":i)},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,i.objectEach)(this.defaults,(function(e,t){if(void 0!==n[t])o.settings[t]=n[t];else{if(void 0===e)throw new Error('A required setting "'+t+'" was not provided');o.settings[t]=e}}))}return o(e,[{key:"update",value:function(e,t){var n=this;return void 0===t?(0,i.objectEach)(e,(function(e,t){n.settings[t]=e})):this.settings[e]=t,this.wot}},{key:"getSetting",value:function(e,t,n,o,r){return"function"==typeof this.settings[e]?this.settings[e](t,n,o,r):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;var 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},r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(0),s=n(43),l=f(n(56)),u=f(n(179)),c=f(n(180)),h=f(n(187)),d=f(n(41));function f(e){return e&&e.__esModule?e:{default:e}}var p=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,a.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 r=this.wot.wtSettings.settings.rowHeaderWidth;this.wot.wtSettings.settings.rowHeaderWidth=function(){return o._modifyRowHeaderWidth(r)}}return i(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=e.parentNode,n=void 0;return t&&1===t.nodeType&&(0,a.hasClass)(t,"wtHolder")||((n=document.createElement("div")).className="wtSpreader",t&&t.insertBefore(n,e),n.appendChild(e)),n.style.position="relative",n}},{key:"createHider",value:function(e){var t=e.parentNode,n=void 0;return t&&1===t.nodeType&&(0,a.hasClass)(t,"wtHolder")||((n=document.createElement("div")).className="wtHider",t&&t.insertBefore(n,e),n.appendChild(e)),n}},{key:"createHolder",value:function(e){var t=e.parentNode,n=void 0;return t&&1===t.nodeType&&(0,a.hasClass)(t,"wtHolder")||((n=document.createElement("div")).style.position="relative",n.className="wtHolder",t&&t.insertBefore(n,e),this.isWorkingOnClone()||(n.parentNode.className+="ht_master handsontable"),n.appendChild(e)),n}},{key:"alignOverlaysWithTrimmingContainer",value:function(){var e=(0,a.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,a.getStyle)(e,"width"),this.holder.style.height=(0,a.getStyle)(e,"height"),this.holder.style.overflow=""))}},{key:"isWorkingOnClone",value:function(){return!!this.wot.cloneSource}},{key:"draw",value:function(e){var t=this.wot,n=t.wtOverlays,o=t.wtViewport,r=this.instance.getSetting("totalRows"),i=this.wot.getSetting("rowHeaders").length,s=this.wot.getSetting("columnHeaders").length,l=!1,h=e;if(!this.isWorkingOnClone()&&(this.holderOffset=(0,a.offset)(this.holder),h=o.createRenderCalculators(h),i&&!this.wot.getSetting("fixedColumnsLeft"))){var f=n.leftOverlay.getScrollPosition(),p=this.correctHeaderWidth;this.correctHeaderWidth=f>0,p!==this.correctHeaderWidth&&(h=!1)}if(this.isWorkingOnClone()||(l=n.prepareOverlays()),h)this.isWorkingOnClone()||o.createVisibleCalculators(),n&&n.refresh(!0);else{this.isWorkingOnClone()?this.tableOffset=this.wot.cloneSource.wtTable.tableOffset:this.tableOffset=(0,a.offset)(this.TABLE);var g=void 0;g=d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_DEBUG)||d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_TOP)||d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_TOP_LEFT_CORNER)?0:d.default.isOverlayTypeOf(this.instance.cloneOverlay,d.default.CLONE_BOTTOM)||d.default.isOverlayTypeOf(this.instance.cloneOverlay,d.default.CLONE_BOTTOM_LEFT_CORNER)?Math.max(r-this.wot.getSetting("fixedRowsBottom"),0):o.rowsRenderCalculator.startRow;var v=void 0;v=d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_DEBUG)||d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_LEFT)||d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_TOP_LEFT_CORNER)||d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_BOTTOM_LEFT_CORNER)?0:o.columnsRenderCalculator.startColumn,this.rowFilter=new c.default(g,r,s),this.columnFilter=new u.default(v,this.wot.getSetting("totalColumns"),i),this.alignOverlaysWithTrimmingContainer(),this._doDraw()}return this.refreshSelections(h),this.isWorkingOnClone()||(n.topOverlay.resetFixedPosition(),n.bottomOverlay.clone&&n.bottomOverlay.resetFixedPosition(),n.leftOverlay.resetFixedPosition(),n.topLeftCornerOverlay&&n.topLeftCornerOverlay.resetFixedPosition(),n.bottomLeftCornerOverlay&&n.bottomLeftCornerOverlay.clone&&n.bottomLeftCornerOverlay.resetFixedPosition()),l&&n.syncScrollWithMaster(),this.wot.drawn=!0,this}},{key:"_doDraw",value:function(){new h.default(this).render()}},{key:"removeClassFromCells",value:function(e){for(var t=this.TABLE.querySelectorAll("."+e),n=0,o=t.length;n<o;n++)(0,a.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 o=[],r=0;r<n;r++){for(var i=t[r].settings,a=i.highlightHeaderClassName,s=i.highlightRowClassName,l=i.highlightColumnClassName,u=t[r].classNames,c=u.length,h=0;h<c;h++)o.includes(u[h])||o.push(u[h]);a&&!o.includes(a)&&o.push(a),s&&!o.includes(s)&&o.push(s),l&&!o.includes(l)&&o.push(l)}var d=this.wot.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(d))for(var f=0;f<d.length;f++)o.push(d[f]);for(var p=o.length,g=0;g<p;g++)this.removeClassFromCells(o[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,o=this.wot.getSetting("onModifyGetCellCoords",t,n);if(o&&Array.isArray(o)){var i=r(o,2);t=i[0],n=i[1]}if(this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;var a=this.TBODY.childNodes[this.rowFilter.sourceToRendered(t)];return a?a.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,a.closest)(t,["TD","TH"])),null===t)return null;var n=t.parentNode,o=n.parentNode,r=(0,a.index)(n),i=t.cellIndex;return(0,a.overlayContainsElement)(d.default.CLONE_TOP_LEFT_CORNER,t)||(0,a.overlayContainsElement)(d.default.CLONE_TOP,t)?"THEAD"===o.nodeName&&(r-=o.childNodes.length):r=o===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(r):this.rowFilter.renderedToSource(r),i=(0,a.overlayContainsElement)(d.default.CLONE_TOP_LEFT_CORNER,t)||(0,a.overlayContainsElement)(d.default.CLONE_LEFT,t)?this.columnFilter.offsettedTH(i):this.columnFilter.visibleRowHeadedColumnToSourceColumn(i),new l.default(r,i)}},{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(d.default.CLONE_DEBUG))e=t;else if(this.wot.isOverlayName(d.default.CLONE_LEFT)||this.wot.isOverlayName(d.default.CLONE_TOP_LEFT_CORNER)||this.wot.isOverlayName(d.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(d.default.CLONE_DEBUG)?e=t:this.wot.isOverlayName(d.default.CLONE_TOP)||this.wot.isOverlayName(d.default.CLONE_TOP_LEFT_CORNER)?e=Math.min(this.wot.getSetting("fixedRowsTop"),t):(this.wot.isOverlayName(d.default.CLONE_BOTTOM)||this.wot.isOverlayName(d.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"===(void 0===t?"undefined":o(t))&&(t=t[e]),t||this.wot.wtSettings.settings.defaultColumnWidth}},{key:"getStretchedColumnWidth",value:function(e){var t=this.getColumnWidth(e),n=null==t?this.instance.wtSettings.settings.defaultColumnWidth:t,o=this.wot.wtViewport.columnsRenderCalculator;if(o){var r=o.getStretchedColumnWidth(e,n);r&&(n=r)}return n}},{key:"_modifyRowHeaderWidth",value:function(e){var t=(0,s.isFunction)(e)?e():null;return Array.isArray(t)?(t=[].concat(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)}(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=p},function(e,t,n){"use strict";t.__esModule=!0;var o,r,i,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=(o=['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.'],r=['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.'],Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(r)}}))),l=n(0),u=n(58),c=n(42),h=n(41),d=(i=h)&&i.__esModule?i:{default:i},f=!1,p=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 a(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=this.wtTable.getRenderedColumnsCount(),n=this.wtTable.getRenderedRowsCount(),o=this.wot.getSetting("totalColumns"),r=this.wot.getSetting("totalRows"),i=void 0,a=!1;if((d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_BOTTOM)||d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_BOTTOM_LEFT_CORNER))&&(this.columnHeaders=[],this.columnHeaderCount=0),o>=0&&(this.adjustAvailableNodes(),a=!0,this.renderColumnHeaders(),this.renderRows(r,n,t),this.wtTable.isWorkingOnClone()||(i=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null),this.adjustColumnWidths(t),this.markOversizedColumnHeaders(),this.adjustColumnHeaderHeights()),a||this.adjustAvailableNodes(),this.removeRedundantRows(n),this.wtTable.isWorkingOnClone()&&!this.wot.isOverlayName(d.default.CLONE_BOTTOM)||this.markOversizedRows(),this.wtTable.isWorkingOnClone())this.wot.isOverlayName(d.default.CLONE_BOTTOM)&&this.wot.cloneSource.wtOverlays.adjustElementsSize();else{this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays.refresh(!1),this.wot.wtOverlays.applyToDOM();var s=(0,l.outerWidth)(this.wtTable.hider),u=(0,l.outerWidth)(this.wtTable.TABLE);if(0!==s&&u!==s&&this.adjustColumnWidths(t),i!==this.wot.wtViewport.getWorkspaceWidth()){this.wot.wtViewport.containerWidth=null;var c=this.wtTable.getFirstRenderedColumn(),h=this.wtTable.getLastRenderedColumn(),f=this.wot.getSetting("defaultColumnWidth"),p=this.wot.getSetting("rowHeaderWidth");if(null!=(p=this.instance.getSetting("onModifyRowHeaderWidth",p)))for(var g=0;g<this.rowHeaderCount;g++){var v=Array.isArray(p)?p[g]:p;v=null==v?f:v,this.COLGROUP.childNodes[g].style.width=v+"px"}for(var y=c;y<h;y++){var m=this.wtTable.getStretchedColumnWidth(y),w=this.columnFilter.sourceToRendered(y);this.COLGROUP.childNodes[w+this.rowHeaderCount].style.width=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 o=void 0,r=0,i=this.rowFilter.renderedToSource(r),a=this.wtTable.isWorkingOnClone();i<e&&i>=0&&(!f&&r>1e3&&(f=!0,(0,u.warn)((0,c.toSingleLine)(s))),void 0===t||r!==t);){if(o=this.getOrCreateTrForRow(r,o),this.renderRowHeaders(i,o),this.adjustColumns(o,n+this.rowHeaderCount),this.renderCells(i,o,n),a&&!this.wot.isOverlayName(d.default.CLONE_BOTTOM)||this.resetOversizedRow(i),o.firstChild){var l=this.wot.wtTable.getRowHeight(i);l?(l-=1,o.firstChild.style.height=l+"px"):o.firstChild.style.height=""}r+=1,i=this.rowFilter.renderedToSource(r)}}},{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=this.instance.wtTable.TBODY.childNodes.length,t=void 0,n=void 0,o=void 0,r=void 0,i=void 0;if(e*this.instance.wtSettings.settings.defaultRowHeight!=(0,l.innerHeight)(this.instance.wtTable.TBODY)-1||this.instance.getSetting("fixedRowsBottom"))for(;e;)e-=1,o=this.instance.wtTable.rowFilter.renderedToSource(e),t=this.instance.wtTable.getRowHeight(o),n=(i=(r=this.instance.wtTable.getTrForRow(o)).querySelector("th"))?(0,l.innerHeight)(i):(0,l.innerHeight)(r)-1,(!t&&this.instance.wtSettings.settings.defaultRowHeight<n||t<n)&&(n+=1,this.instance.wtViewport.oversizedRows[o]=n)}}},{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 o=-1*this.rowHeaderCount;o<t;o++)this.markIfOversizedColumnHeader(o);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,o=0,r=e.length;o<r;o++)if(n[o]){if(!t[o]||0===t[o].childNodes.length)return;t[o].childNodes[0].style.height=n[o]+"px"}}},{key:"markIfOversizedColumnHeader",value:function(e){for(var t=this.wot.wtTable.columnFilter.renderedToSource(e),n=this.columnHeaderCount,o=this.wot.wtSettings.settings.defaultRowHeight,r=void 0,i=void 0,a=void 0,s=this.wot.getSetting("columnHeaderHeight")||[];n;)n-=1,r=this.wot.wtTable.getColumnHeaderHeight(n),(i=this.wot.wtTable.getColumnHeader(t,n))&&(a=(0,l.innerHeight)(i),(!r&&o<a||r<a)&&(this.wot.wtViewport.oversizedColumnHeaders[n]=a),Array.isArray(s)?null!==s[n]&&void 0!==s[n]&&(this.wot.wtViewport.oversizedColumnHeaders[n]=s[n]):isNaN(s)||(this.wot.wtViewport.oversizedColumnHeaders[n]=s),this.wot.wtViewport.oversizedColumnHeaders[n]<(s[n]||s)&&(this.wot.wtViewport.oversizedColumnHeaders[n]=s[n]||s))}},{key:"renderCells",value:function(e,t,n){for(var o=void 0,r=void 0,i=0;i<n;i++)r=this.columnFilter.renderedToSource(i),"TH"===(o=0===i?t.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(r)]:o.nextSibling).nodeName&&(o=v(o,t)),(0,l.hasClass)(o,"hide")||(o.className=""),o.removeAttribute("style"),this.wot.wtSettings.settings.cellRenderer(e,r,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"),r=this.wot.getSetting("rowHeaderWidth");if(n.offsetHeight<n.scrollHeight&&(t=(0,l.getScrollbarWidth)()),this.wot.wtViewport.columnsRenderCalculator.refreshStretching(this.wot.wtViewport.getViewportWidth()-t),null!=(r=this.instance.getSetting("onModifyRowHeaderWidth",r)))for(var i=0;i<this.rowHeaderCount;i++){var a=Array.isArray(r)?r[i]:r;a=null==a?o:a,this.COLGROUP.childNodes[i].style.width=a+"px"}for(var s=0;s<e;s++){var u=this.wtTable.getStretchedColumnWidth(this.columnFilter.renderedToSource(s));this.COLGROUP.childNodes[s+this.rowHeaderCount].style.width=u+"px"}}},{key:"appendToTbody",value:function(e){this.TBODY.appendChild(e),this.wtTable.tbodyChildrenLength+=1}},{key:"getOrCreateTrForRow",value:function(e,t){var n=void 0;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,o=0;o<this.rowHeaderCount;o++)n?"TD"===n.nodeName&&(n=g(n,t)):(n=document.createElement("TH"),t.appendChild(n)),this.renderRowHeader(e,o,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),o=-1*this.rowHeaderCount;o<e;o++){var r=this.columnFilter.renderedToSource(o);this.renderColumnHeader(t,r,n.childNodes[o+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,l.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 r=this.THEAD.childNodes.length;if(r>this.columnHeaders.length)for(var i=this.columnHeaders.length;i<r;i++)this.THEAD.removeChild(this.THEAD.lastChild)}else t&&(0,l.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 o=document.createElement("TD");e.appendChild(o),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}();function g(e,t){var n=document.createElement("TH");return t.insertBefore(n,e),t.removeChild(e),n}function v(e,t){var n=document.createElement("TD");return t.insertBefore(n,e),t.removeChild(e),n}t.default=p},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(1),a=u(n(5)),s=u(n(176)),l=u(n(177));function u(e){return e&&e.__esModule?e:{default:e}}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 a.default(this.wot),this.eventManager.addEventListener(window,"resize",(function(){n.clientHeight=n.getWorkspaceHeight()}))}return o(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=void 0,t=this.wot.getSetting("totalColumns"),n=this.instance.wtOverlays.leftOverlay.trimmingContainer,o=void 0,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),n===window&&t>0&&this.sumColumnWidths(0,t-1)>e?document.documentElement.clientWidth:n===window||"scroll"!==(o=(0,r.getStyle)(this.instance.wtOverlays.leftOverlay.trimmingContainer,"overflow"))&&"hidden"!==o&&"auto"!==o?"none"!==i&&i?e:Math.max(e,(0,r.outerWidth)(this.instance.wtTable.TABLE)):Math.max(e,n.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,o=0,r=e;r<t;)o+=n.getColumnWidth(r),r+=1;return o}},{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=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=void 0,o=void 0,i=void 0;this.rowHeaderWidth=NaN,n=this.wot.wtSettings.settings.renderAllRows&&!t?1/0:this.getViewportHeight();var a=this.wot.wtOverlays.topOverlay.getScrollPosition()-this.wot.wtOverlays.topOverlay.getTableParentOffset();a<0&&(a=0);var s=this.wot.getSetting("fixedRowsTop"),u=this.wot.getSetting("fixedRowsBottom"),c=this.wot.getSetting("totalRows");return s&&(a+=i=this.wot.wtOverlays.topOverlay.sumCellSizes(0,s),n-=i),u&&this.wot.wtOverlays.bottomOverlay.clone&&(n-=i=this.wot.wtOverlays.bottomOverlay.sumCellSizes(c-u,c)),o=this.wot.wtTable.holder.clientHeight===this.wot.wtTable.holder.offsetHeight?0:(0,r.getScrollbarWidth)(),new l.default(n,a,this.wot.getSetting("totalRows"),(function(t){return e.wot.wtTable.getRowHeight(t)}),t?null:this.wot.wtSettings.settings.viewportRowCalculatorOverride,t,o)}},{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 a=this.wot.wtOverlays.leftOverlay.sumCellSizes(0,i);o+=a,n-=a}return this.wot.wtTable.holder.clientWidth!==this.wot.wtTable.holder.offsetWidth&&(n-=(0,r.getScrollbarWidth)()),new s.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,i.objectEach)(this.hasOversizedColumnHeadersMarked,(function(e,t,n){n[t]=void 0}))}}]),e}();t.default=c},function(e,t,n){"use strict";t.__esModule=!0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),a=n(13),s=n(1),l=n(39),u=h(n(5)),c=h(n(56));function h(e){return e&&e.__esModule?e:{default:e}}var 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),n&&(this.eventManager=new u.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 r(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,o=this.main.childNodes.length;n<o;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,a.stopImmediatePropagation)(e);var n=this,o=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(document.body,"mousemove",(function e(r){var i;((i=r).clientY<Math.floor(o.top)||i.clientY>Math.ceil(o.top+o.height)||i.clientX<Math.floor(o.left)||i.clientX>Math.ceil(o.left+o.width))&&(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 o=0;o<5;o++){var r=t[o],i=document.createElement("div");i.className="wtBorder "+(this.settings.className||""),this.settings[r]&&this.settings[r].hide&&(i.className+=" hidden"),(n=i.style).backgroundColor=this.settings[r]&&this.settings[r].color?this.settings[r].color:e.border.color,n.height=this.settings[r]&&this.settings[r].width?this.settings[r].width+"px":e.border.width+"px",n.width=this.settings[r]&&this.settings[r].width?this.settings[r].width+"px":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,l.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear();var a=this.wot.wtTable.bordersHolder;a||((a=document.createElement("div")).className="htBorders",this.wot.wtTable.bordersHolder=a,this.wot.wtTable.spreader.appendChild(a)),a.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:"40px",width:"40px","border-radius":parseInt(40/1.5,10)+"px"};(0,s.objectEach)(t,(function(t,n){e.selectionHandles.styles.bottomRightHitArea[n]=t,e.selectionHandles.styles.topLeftHitArea[n]=t}));var n={position:"absolute",height:"10px",width:"10px","border-radius":parseInt(10/1.5,10)+"px",background:"#F5F5FF",border:"1px solid #4285c8"};(0,s.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,o,r,i){var a=parseInt(this.selectionHandles.styles.topLeft.width,10),s=parseInt(this.selectionHandles.styles.topLeftHitArea.width,10);this.selectionHandles.styles.topLeft.top=parseInt(n-a,10)+"px",this.selectionHandles.styles.topLeft.left=parseInt(o-a,10)+"px",this.selectionHandles.styles.topLeftHitArea.top=parseInt(n-s/4*3,10)+"px",this.selectionHandles.styles.topLeftHitArea.left=parseInt(o-s/4*3,10)+"px",this.selectionHandles.styles.bottomRight.top=parseInt(n+i,10)+"px",this.selectionHandles.styles.bottomRight.left=parseInt(o+r,10)+"px",this.selectionHandles.styles.bottomRightHitArea.top=parseInt(n+i-s/4,10)+"px",this.selectionHandles.styles.bottomRightHitArea.left=parseInt(o+r-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=void 0,n=void 0,r=void 0,a=void 0,s=this.wot.wtTable.getRenderedRowsCount(),u=0;u<s;u+=1){var h=this.wot.wtTable.rowFilter.renderedToSource(u);if(h>=e[0]&&h<=e[2]){t=h;break}}for(var d=s-1;d>=0;d-=1){var f=this.wot.wtTable.rowFilter.renderedToSource(d);if(f>=e[0]&&f<=e[2]){n=f;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]){r=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]){a=m;break}}if(void 0!==t&&void 0!==r){var w=this.wot.wtTable.getCell(new c.default(t,r)),C=t!==n||r!==a,b=C?this.wot.wtTable.getCell(new c.default(n,a)):w,E=(0,i.offset)(w),S=C?(0,i.offset)(b):E,O=(0,i.offset)(this.wot.wtTable.TABLE),T=E.top,_=E.left,R=_-O.left-1,k=S.left+(0,i.outerWidth)(b)-_;if(this.isEntireColumnSelected(t,n)){var M=this.getDimensionsFromHeader("columns",r,a,O),A=null;if(M){var N=o(M,3);A=N[0],R=N[1],k=N[2]}A&&(w=A)}var H=T-O.top-1,P=S.top+(0,i.outerHeight)(b)-T;if(this.isEntireRowSelected(r,a)){var L=this.getDimensionsFromHeader("rows",t,n,O),D=null;if(L){var I=o(L,3);D=I[0],H=I[1],P=I[2]}D&&(w=D)}var x=(0,i.getComputedStyle)(w);parseInt(x.borderTopWidth,10)>0&&(H+=1,P=P>0?P-1:0),parseInt(x.borderLeftWidth,10)>0&&(R+=1,k=k>0?k-1:0),this.topStyle.top=H+"px",this.topStyle.left=R+"px",this.topStyle.width=k+"px",this.topStyle.display="block",this.leftStyle.top=H+"px",this.leftStyle.left=R+"px",this.leftStyle.height=P+"px",this.leftStyle.display="block";var j=Math.floor(this.settings.border.width/2);this.bottomStyle.top=H+P-j+"px",this.bottomStyle.left=R+"px",this.bottomStyle.width=k+"px",this.bottomStyle.display="block",this.rightStyle.top=H+"px",this.rightStyle.left=R+k-j+"px",this.rightStyle.height=P+1+"px",this.rightStyle.display="block";var F=this.settings.border.cornerVisible;F="function"==typeof F?F(this.settings.layerLevel):F;var B=this.wot.getSetting("onModifyGetCellCoords",n,a),W=n,V=a;if(B&&Array.isArray(B)){var U=o(B,4);W=U[2],V=U[3]}if((0,l.isMobileBrowser)()||!F||this.isPartRange(W,V))this.cornerStyle.display="none";else{this.cornerStyle.top=H+P-4+"px",this.cornerStyle.left=R+k-4+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";var z=(0,i.getTrimmingContainer)(this.wot.wtTable.TABLE),Y=z===window;Y&&(z=document.documentElement),a===this.wot.getSetting("totalColumns")-1&&(Y?b.getBoundingClientRect().left:b.offsetLeft)+(0,i.outerWidth)(b)+parseInt(this.cornerDefaultStyle.width,10)/2>=(0,i.innerWidth)(z)&&(this.cornerStyle.left=Math.floor(R+k-3-parseInt(this.cornerDefaultStyle.width,10)/2)+"px",this.cornerStyle.borderRightWidth=0),n===this.wot.getSetting("totalRows")-1&&(Y?b.getBoundingClientRect().top:b.offsetTop)+(0,i.outerHeight)(b)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,i.innerHeight)(z)&&(this.cornerStyle.top=Math.floor(H+P-3-parseInt(this.cornerDefaultStyle.height,10)/2)+"px",this.cornerStyle.borderBottomWidth=0),this.cornerStyle.display="block"}(0,l.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(n,a,H,R,k,P)}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 r=this,a=this.wot.wtTable.wtRootElement.parentNode,s=null,l=null,u=null,c=null,h=null,d=null,f=null,p=null;switch(e){case"rows":s=function(){var e;return(e=r.wot.wtTable).getRowHeader.apply(e,arguments)},l=function(){return i.outerHeight.apply(void 0,arguments)},u="ht__selection--rows",d="top";break;case"columns":s=function(){var e;return(e=r.wot.wtTable).getColumnHeader.apply(e,arguments)},l=function(){return i.outerWidth.apply(void 0,arguments)},u="ht__selection--columns",d="left"}if(a.className.includes(u)){var g=this.wot.getSetting("columnHeaders").length;if(f=s(t,g-1),p=s(n,g-1),!f||!p)return!1;var v=(0,i.offset)(f),y=(0,i.offset)(p);return f&&p&&(c=v[d]-o[d]-1,h=y[d]+l(p)-v[d]),[f,c,h]}return!1}},{key:"changeBorderStyle",value:function(e,t){var n=this[e].style,o=t[e];!o||o.hide?(0,i.addClass)(this[e],"hidden"):((0,i.hasClass)(this[e],"hidden")&&(0,i.removeClass)(this[e],"hidden"),n.backgroundColor=o.color,"top"!==e&&"bottom"!==e||(n.height=o.width+"px"),"right"!==e&&"left"!==e||(n.width=o.width+"px"))}},{key:"changeBorderToDefaultStyle",value:function(e){var t=1,n="#000",o=this[e].style;o.backgroundColor=n,o.width=t+"px",o.height=t+"px"}},{key:"toggleHiddenClass",value:function(e,t){this.changeBorderToDefaultStyle(e),t?(0,i.addClass)(this[e],"hidden"):(0,i.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,l.isMobileBrowser)()&&(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none")}}]),e}();t.default=d},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(21),i=n(11),a=n(33),s=n(2),l=n(0),u=n(191),c=(o=u)&&o.__esModule?o:{default:o},h=c.default.prototype.extend();h.prototype.init=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];c.default.prototype.init.apply(this,t),this.query=null,this.strippedChoices=[],this.rawChoices=[]},h.prototype.getValue=function(){var e=this,t=this.rawChoices.find((function(t){return e.stripValueIfNeeded(t)===e.TEXTAREA.value}));return(0,i.isDefined)(t)?t:this.TEXTAREA.value},h.prototype.createElements=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];c.default.prototype.createElements.apply(this,t),(0,l.addClass)(this.htContainer,"autocompleteEditor"),(0,l.addClass)(this.htContainer,-1===window.navigator.platform.indexOf("Mac")?"":"htMacScroll")};var d=!1;function f(e){d=!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),d=!0}),n)}}h.prototype.prepare=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];c.default.prototype.prepare.apply(this,t)},h.prototype.open=function(){this.instance.addHook("beforeKeyDown",f),this.TEXTAREA_PARENT.style.overflow="auto";for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];c.default.prototype.open.apply(this,t),this.TEXTAREA_PARENT.style.overflow="";var o=this.htEditor.getInstance(),r=this,a=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown;this.showEditableElement(),this.focus(),o.updateSettings({colWidths:a?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,width:a?(0,l.outerWidth)(this.TEXTAREA)+(0,l.getScrollbarWidth)()+2:void 0,afterRenderer:function(e,t,n,o,a){var s=r.cellProperties,l=s.filteringCaseSensitive,u=s.allowHtml,c=(0,i.stringify)(a),h=void 0,d=void 0;c&&!u&&-1!==(h=!0===l?c.indexOf(this.query):c.toLowerCase().indexOf(r.query.toLowerCase()))&&(d=c.substr(h,r.query.length),c=c.replace(d,"<strong>"+d+"</strong>")),e.innerHTML=c},autoColumnSize:!0,modifyColWidth:function(e,t){var n=this.getPlugin("autoColumnSize").widths,o=e;return n[t]&&(o=n[t]),a?o:o+15}}),this.htEditor.view.wt.wtTable.holder.parentNode.style["padding-right"]=(0,l.getScrollbarWidth)()+2+"px",d&&(d=!1),r.instance._registerTimeout((function(){r.queryChoices(r.TEXTAREA.value)}))},h.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([])},h.prototype.updateChoicesList=function(e){var t=(0,l.getCaretPosition)(this.TEXTAREA),n=(0,l.getSelectionEndPosition)(this.TEXTAREA),o=this.cellProperties.sortByRelevance,r=this.cellProperties.filter,i=null,a=null,u=e;o&&(i=h.sortByRelevance(this.stripValueIfNeeded(this.getValue()),u,this.cellProperties.filteringCaseSensitive));var c=Array.isArray(i)?i.length:0;if(!1===r)c&&(a=i[0]);else{for(var d=[],f=0,p=u.length;f<p&&!(o&&c<=f);f++)c?d.push(u[i[f]]):d.push(u[f]);a=0,u=d}this.strippedChoices=u,this.htEditor.loadData((0,s.pivot)([u])),this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a),this.instance.listen(!1),(0,l.setCaretPosition)(this.TEXTAREA,t,t===n?void 0:n)},h.prototype.flipDropdownIfNeeded=function(){var e=(0,l.offset)(this.TEXTAREA),t=(0,l.outerHeight)(this.TEXTAREA),n=this.getDropdownHeight(),o=(0,l.getTrimmingContainer)(this.instance.view.wt.wtTable.TABLE),r=o.scrollTop,i=(0,l.outerHeight)(this.instance.view.wt.wtTable.THEAD),a={row:0,col:0};o!==window&&(a=(0,l.offset)(o));var s=e.top-a.top-i+r,u=o.scrollHeight-s-i-t,c=n>u&&s>u;return c?this.flipDropdown(n):this.unflipDropdown(),this.limitDropdownIfNeeded(c?s:u,n),c},h.prototype.limitDropdownIfNeeded=function(e,t){if(t>e){var n,o=0,r=0,i=0;do{o+=i=this.htEditor.getRowHeight(r)||this.htEditor.view.wt.wtSettings.settings.defaultRowHeight,r+=1}while(o<e);n=o-i,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-n+"px"),this.setDropdownHeight(o-i)}},h.prototype.flipDropdown=function(e){var t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0},h.prototype.unflipDropdown=function(){var e=this.htEditor.rootElement.style;"absolute"===e.position&&(e.position="",e.top=""),this.htEditor.flipped=void 0},h.prototype.updateDropdownHeight=function(){var e=this.htEditor.getColWidth(0)+(0,l.getScrollbarWidth)()+2,t=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view.wt.wtTable.alignOverlaysWithTrimmingContainer()},h.prototype.setDropdownHeight=function(e){this.htEditor.updateSettings({height:e})},h.prototype.finishEditing=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];c.default.prototype.finishEditing.apply(this,[e].concat(n))},h.prototype.highlightBestMatchingChoice=function(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()},h.sortByRelevance=function(e,t,n){var o=[],r=void 0,s=e.length,l=void 0,u=void 0,c=[],h=void 0,d=t.length;if(0===s){for(h=0;h<d;h++)c.push(h);return c}for(h=0;h<d;h++)r=(0,a.stripTags)((0,i.stringify)(t[h])),-1!==(l=n?r.indexOf(e):r.toLowerCase().indexOf(e.toLowerCase()))&&(u=r.length-l-s,o.push({baseIndex:h,index:l,charsLeft:u,value:r}));for(o.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})),h=0,d=o.length;h<d;h++)c.push(o[h].baseIndex);return c},h.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},h.prototype.stripValueIfNeeded=function(e){return this.stripValuesIfNeeded([e])[0]},h.prototype.stripValuesIfNeeded=function(e){var t=this.cellProperties.allowHtml,n=(0,s.arrayMap)(e,(function(e){return(0,i.stringify)(e)}));return(0,s.arrayMap)(n,(function(e){return t?e:(0,a.stripTags)(e)}))},h.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},h.prototype.close=function(){this.instance.removeHook("beforeKeyDown",f);for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];c.default.prototype.close.apply(this,t)},h.prototype.discardEditor=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];c.default.prototype.discardEditor.apply(this,t),this.instance.view.render()},t.default=h},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(21),i=n(1),a=n(0),s=n(13),l=n(59),u=(o=l)&&o.__esModule?o:{default:o},c=u.default.prototype.extend();c.prototype.createElements=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.default.prototype.createElements.apply(this,t);var o=document.createElement("DIV");o.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(o),this.htContainer=o,this.assignHooks()},c.prototype.prepare=function(e,t,n,o,r,a){for(var s=arguments.length,l=Array(s>6?s-6:0),c=6;c<s;c++)l[c-6]=arguments[c];u.default.prototype.prepare.apply(this,[e,t,n,o,r,a].concat(l));var h=this,d={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&&h.setValue(n),h.instance.destroyEditor()}};this.cellProperties.handsontable&&(0,i.extend)(d,a.handsontable),this.htOptions=d};var h=function(e){if(!(0,s.isImmediatePropagationStopped)(e)){var t=this.getActiveEditor(),n=t.htEditor.getInstance(),o=void 0,i=void 0;if(e.keyCode===r.KEY_CODES.ARROW_DOWN)if(n.getSelectedLast()||n.flipped){if(n.getSelectedLast())if(n.flipped)o=n.getSelectedLast()[0]+1;else if(!n.flipped){var a=n.countRows()-1;i=n.getSelectedLast()[0],o=Math.min(a,i+1)}}else o=0;else e.keyCode===r.KEY_CODES.ARROW_UP&&(!n.getSelectedLast()&&n.flipped?o=n.countRows()-1:n.getSelectedLast()&&(n.flipped?(i=n.getSelectedLast()[0],o=Math.max(0,i-1)):o=(i=n.getSelectedLast()[0])-1));void 0!==o&&(o<0||n.flipped&&o>n.countRows()-1?n.deselectCell():n.selectCell(o,0),n.getData().length&&(e.preventDefault(),(0,s.stopImmediatePropagation)(e),t.instance.listen(),t.TEXTAREA.focus()))}};c.prototype.open=function(){this.instance.addHook("beforeKeyDown",h);for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.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,a.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length)},c.prototype.close=function(){this.htEditor.rootElement.style.display="none",this.instance.removeHook("beforeKeyDown",h);for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.default.prototype.close.apply(this,t)},c.prototype.focus=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.default.prototype.focus.apply(this,t)},c.prototype.beginEditing=function(){var e=this.instance.getSettings().onBeginEditing;if(!e||!1!==e()){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];u.default.prototype.beginEditing.apply(this,n)}},c.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=Array(t),o=0;o<t;o++)n[o]=arguments[o];return u.default.prototype.finishEditing.apply(this,n)},c.prototype.assignHooks=function(){var e=this;this.instance.addHook("afterDestroy",(function(){e.htEditor&&e.htEditor.destroy()}))},t.default=c},function(e,t,n){"use strict";t.__esModule=!0,t.getNormalizedDate=function(e){var t=new Date(e);return isNaN(new Date(e+"T00:00").getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}},function(e,t,n){"use strict";!function(){function e(e){return e.split('"').length-1}var n=function(t){var n,o,r,i,a,s,l,u=[],c=0;for((r=t.split("\n")).length>1&&""===r[r.length-1]&&r.pop(),n=0,o=r.length;n<o;n+=1){for(r[n]=r[n].split("\t"),i=0,a=r[n].length;i<a;i+=1)u[c]||(u[c]=[]),s&&0===i?(l=u[c].length-1,u[c][l]=u[c][l]+"\n"+r[n][0],s&&1&e(r[n][0])&&(s=!1,u[c][l]=u[c][l].substring(0,u[c][l].length-1).replace(/""/g,'"'))):i===a-1&&0===r[n][i].indexOf('"')&&1&e(r[n][i])?(u[c].push(r[n][i].substring(1).replace(/""/g,'"')),s=!0):(u[c].push(r[n][i].replace(/""/g,'"')),s=!1);s||(c+=1)}return u},o=function(e){var t,n,o,r,i,a="";for(t=0,n=e.length;t<n;t+=1){for(r=e[t].length,o=0;o<r;o+=1)o>0&&(a+="\t"),"string"==typeof(i=e[t][o])?i.indexOf("\n")>-1?a+='"'+i.replace(/"/g,'""')+'"':a+=i:a+=null==i?"":i;t!==n-1&&(a+="\n")}return a};t.parse=n,t.stringify=o}(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,r=t.selection,i=t.controller;s.get(e.type)({coords:n,selection:r,controller:i,isShiftKey:e.shiftKey,isLeftClick:(0,o.isLeftClick)(e)||"touchstart"===e.type,isRightClick:(0,o.isRightClick)(e)})};var o=n(13),r=n(4);function i(e){var t=e.isShiftKey,n=e.isLeftClick,o=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 r.CellCoords(i.row,i.col)):u&&i.row<0&&!s.column?a.setRangeEnd(new r.CellCoords(l.to.row,i.col)):c&&i.col<0&&!s.row?a.setRangeEnd(new r.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 h=new r.CellCoords(i.row,i.col);h.row<0&&(h.row=0),h.col<0&&(h.col=0);var d=!a.inInSelection(h),f=n||o&&d;i.row<0&&i.col>=0&&!s.column?f&&a.selectColumns(i.col):i.col<0&&i.row>=0&&!s.row?f&&a.selectRows(i.row):i.col>=0&&i.row>=0&&!s.cells?f&&a.setRangeStart(i):i.col<0&&i.row<0&&a.setRangeStart(i)}}function a(e){var t=e.isLeftClick,n=e.coords,o=e.selection,i=e.controller;if(t){var a=o.isSelectedByRowHeader(),s=o.isSelectedByColumnHeader(),l=o.tableProps.countCols(),u=o.tableProps.countRows();s&&!i.column?o.setRangeEnd(new r.CellCoords(u-1,n.col)):a&&!i.row?o.setRangeEnd(new r.CellCoords(n.row,l-1)):i.cell||o.setRangeEnd(n)}}var s=new Map([["mousedown",i],["mouseover",a],["touchstart",i]])},function(e,t,n){"use strict";t.__esModule=!0,t.RecordTranslator=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.registerIdentity=function(e,t){u.set(e,t)},t.getTranslator=function(e){var t=e instanceof a.default?e:h(e),n=void 0;return c.has(t)?n=c.get(t):(n=new l(t),c.set(t,n)),n},t.getIdentity=h;var r,i=n(90),a=(r=i)&&r.__esModule?r:{default:r},s=n(1),l=t.RecordTranslator=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 o(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,s.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,s.isObject)(e)?{row:this.toPhysicalRow(e.row),column:this.toPhysicalColumn(e.column)}:[this.toPhysicalRow(e),this.toPhysicalColumn(t)]}}]),e}(),u=new WeakMap,c=new WeakMap;function h(e){if(!u.has(e))throw Error("Record translator was not registered for this object identity");return u.get(e)}},function(e,t,n){"use strict";t.__esModule=!0,t.registerAsRootInstance=function(e){o.set(e,!0)},t.hasValidParameter=function(e){return e===r},t.isRootInstance=function(e){return o.has(e)};var o=t.holder=new WeakMap,r=t.rootInstanceSymbol=Symbol("rootInstance")},function(e,t,n){"use strict";t.__esModule=!0;var 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},r=n(11),i=n(1);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=void 0,a=void 0,s=void 0;for(n=0,t=this.countCols();n<t;n++)if(""!==(a=this.getDataAtCell(e,n))&&null!==a&&(0,r.isDefined)(a))return"object"===(void 0===a?"undefined":o(a))&&(s=this.getCellMeta(e,n),(0,i.isObjectEqual)(this.getSchema()[s.prop],a));return!0},isEmptyCol:function(e){var t,n=void 0,o=void 0;for(n=0,t=this.countRows();n<t;n++)if(""!==(o=this.getDataAtCell(n,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,viewportRowRenderingOffset:"auto",viewportColumnRenderingOffset:"auto",validator:void 0,disableVisualSelection:!1,sortIndicator:void 0,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,sortFunction:void 0,sortByRelevance:!0,filter:!0,filteringCaseSensitive:!1,dragToScroll:!0,nestedRows:void 0},t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.getTranslatedPhrase=function(e,t,n){var s=(0,r.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,o.arrayEach)((0,i.getPhraseFormatters)(),(function(o){n=o(e,t)})),n}(l,n);return Array.isArray(u)?u[0]:u};var o=n(2),r=n(71),i=n(271),a=n(11)},function(e,t,n){"use strict";t.__esModule=!0;var o,r,i=(o=['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.'],r=['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.'],Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(r)}})));t.extendNotExistingKeys=function(e,t){return(0,s.objectEach)(t,(function(t,n){(0,a.isUndefined)(e[n])&&(e[n]=t)})),e},t.createCellHeadersRange=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,r=n,i=o;if(e>t){var a=[i,r];r=a[0],i=a[1]}return r+"-"+i},t.normalizeLanguageCode=h,t.applyLanguageSetting=function(e,t){var n=h(t);(0,c.hasLanguageDictionary)(n)?e.language=n:(e.language=c.DEFAULT_LANGUAGE_CODE,d(t))},t.warnUserAboutLanguageRegistration=d;var a=n(11),s=n(1),l=n(58),u=n(42),c=n(71);function h(e){var t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/.exec(e);return t?t[1].toLowerCase()+"-"+t[2].toUpperCase():e}function d(e){(0,a.isDefined)(e)&&(0,l.error)((0,u.toSingleLine)(i,e))}},function(e,t,n){"use strict";t.__esModule=!0,t.stopObserving=t.startObserving=t.isPressedCtrlKey=t.isPressed=t._resetState=t._getRefCount=void 0;var o,r=n(5),i=(o=r)&&o.__esModule?o:{default:o},a=n(21),s=new i.default,l=new Set,u=0;function c(){s.clearEvents(),l.clear(),u=0}t._getRefCount=function(){return u},t._resetState=c,t.isPressed=function(e){return Array.from(l.values()).some((function(t){return(0,a.isKey)(t,e)}))},t.isPressedCtrlKey=function(){var e=Array.from(l.values());return e.some((function(e){return(0,a.isCtrlMetaKey)(e)}))&&e.every((function(e){return!(0,a.isPrintableChar)(e)}))},t.startObserving=function(){0===u&&(s.addEventListener(document,"keydown",(function(e){l.has(e.keyCode)||l.add(e.keyCode)})),s.addEventListener(document,"keyup",(function(e){l.has(e.keyCode)&&l.delete(e.keyCode)})),s.addEventListener(document,"visibilitychange",(function(){document.hidden&&l.clear()}))),u+=1},t.stopObserving=function(){u>0&&(u-=1),0===u&&c()}},function(e,t,n){"use strict";t.__esModule=!0,t.normalizeSelectionFactory=t.detectSelectionType=t.Selection=t.Highlight=t.handleMouseEvent=void 0;var o=s(n(202)),r=s(n(280)),i=n(194),a=n(72);function s(e){return e&&e.__esModule?e:{default:e}}t.handleMouseEvent=i.handleMouseEvent,t.Highlight=o.default,t.Selection=r.default,t.detectSelectionType=a.detectSelectionType,t.normalizeSelectionFactory=a.normalizeSelectionFactory},function(e,t,n){"use strict";t.__esModule=!0,t.CUSTOM_SELECTION=t.HEADER_TYPE=t.FILL_TYPE=t.CELL_TYPE=t.AREA_TYPE=t.ACTIVE_HEADER_TYPE=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(273),i=n(2);function a(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)}var s=t.ACTIVE_HEADER_TYPE="active-header",l=t.AREA_TYPE="area",u=t.CELL_TYPE="cell",c=t.FILL_TYPE="fill",h=t.HEADER_TYPE="header",d=t.CUSTOM_SELECTION="custom-selection",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 o(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=this.layerLevel,t=void 0;return this.areas.has(e)?t=this.areas.get(e):(t=(0,r.createHighlight)(l,Object.assign({layerLevel:e},this.options)),this.areas.set(e,t)),t}},{key:"getAreas",value:function(){return[].concat(a(this.areas.values()))}},{key:"createOrGetHeader",value:function(){var e=this.layerLevel,t=void 0;return this.headers.has(e)?t=this.headers.get(e):(t=(0,r.createHighlight)(h,Object.assign({},this.options)),this.headers.set(e,t)),t}},{key:"getHeaders",value:function(){return[].concat(a(this.headers.values()))}},{key:"createOrGetActiveHeader",value:function(){var e=this.layerLevel,t=void 0;return this.activeHeaders.has(e)?t=this.activeHeaders.get(e):(t=(0,r.createHighlight)(s,Object.assign({},this.options)),this.activeHeaders.set(e,t)),t}},{key:"getActiveHeaders",value:function(){return[].concat(a(this.activeHeaders.values()))}},{key:"getCustomSelections",value:function(){return[].concat(a(this.customSelections.values()))}},{key:"addCustomSelection",value:function(e){this.customSelections.push((0,r.createHighlight)(d,Object.assign({},e)))}},{key:"clear",value:function(){this.cell.clear(),this.fill.clear(),(0,i.arrayEach)(this.areas.values(),(function(e){e.clear()})),(0,i.arrayEach)(this.headers.values(),(function(e){e.clear()})),(0,i.arrayEach)(this.activeHeaders.values(),(function(e){e.clear()}))}},{key:Symbol.iterator,value:function(){return[this.cell,this.fill].concat(a(this.areas.values()),a(this.headers.values()),a(this.activeHeaders.values()),a(this.customSelections))[Symbol.iterator]()}}]),e}();t.default=f},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(1),i=n(6),a=n(11),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.samples=null,this.dataFactory=t,this.customSampleCount=null,this.allowDuplicates=!1}return o(e,null,[{key:"SAMPLE_COUNT",get:function(){return 3}}]),o(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 o=this,r=new Map,a="number"==typeof n?{from:n,to:n}:n,s=a.from,l=a.to;return(0,i.rangeEach)(s,l,(function(n){var i=o.generateSample(e,t,n);r.set(n,i)})),r}},{key:"generateSample",value:function(e,t,n){var o=this;if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");var s=new Map,l="row"===e?"col":"row",u=[];return(0,i.rangeEach)(t.from,t.to,(function(t){var i="row"===e?o.dataFactory(n,t):o.dataFactory(t,n),c=i.value,h=i.bundleCountSeed,d=h>0,f=void 0;f=(0,r.isObject)(c)?Object.keys(c).length:Array.isArray(c)?c.length:(0,a.stringify)(c).length,d&&(f+=h),s.has(f)||s.set(f,{needed:o.getSampleCount(),strings:[]});var p=s.get(f);p.needed&&(!(u.indexOf(c)>-1)||o.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:c},l,t)),u.push(c),p.needed-=1)})),s}}]),e}();t.default=s},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(6),i="px",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=0}return o(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=0}},{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+i),(0,r.isNumeric)(t)&&(this._element.style.left=t+i)}},{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+i),(0,r.isNumeric)(t)&&(this._element.style.height=t+i)}},{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+i),(0,r.isNumeric)(t)&&(this._element.style.marginLeft=t+i)}},{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";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r="px",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=0}return o(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=0}},{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+r),void 0!==t&&(this._element.style.left=t+r)}},{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+r),t&&(this._element.style.height=t+r)}},{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+r),t&&(this._element.style.marginLeft=t+r)}},{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,o){t?t.row===n&&t.col===o?(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,n(98),n(113),n(114),n(118),n(119),n(121),n(124),n(125),n(126),n(127),n(128),n(129),n(130),n(131),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(143),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(88),n(158),n(159),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(169),n(170),n(171),n(173),n(174),n(175),n(226),n(227),n(228);var o=n(17),r=n(14),i=n(34),a=n(89),s=D(n(90)),l=D(n(283)),u=n(5),c=D(u),h=D(n(16)),d=D(n(93)),f=L(n(2)),p=L(n(39)),g=L(n(92)),v=L(n(192)),y=L(n(40)),m=L(n(43)),w=L(n(11)),C=L(n(6)),b=L(n(1)),E=L(n(91)),S=L(n(33)),O=L(n(21)),T=L(n(0)),_=L(n(13)),R=L(n(284)),k=n(8),M=D(n(197)),A=n(196),N=n(198),H=L(n(7)),P=n(71);function L(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}function D(e){return e&&e.__esModule?e:{default:e}}function I(e,t){var n=new s.default(e,t||{},A.rootInstanceSymbol);return n.init(),n}(0,l.default)(I),I.Core=s.default,I.DefaultSettings=M.default,I.EventManager=c.default,I._getListenersCounter=u.getListenersCounter,I.buildDate="11/09/2018 09:55:19",I.packageName="handsontable",I.version="5.0.2",I.hooks=h.default.getSingleton(),I.__GhostTable=d.default;var x=[f,p,g,v,y,m,w,C,b,E,S,O],j=[T,_];I.helper={},I.dom={},f.arrayEach(x,(function(e){f.arrayEach(Object.getOwnPropertyNames(e),(function(t){"_"!==t.charAt(0)&&(I.helper[t]=e[t])}))})),f.arrayEach(j,(function(e){f.arrayEach(Object.getOwnPropertyNames(e),(function(t){"_"!==t.charAt(0)&&(I.dom[t]=e[t])}))})),I.cellTypes={},f.arrayEach((0,a.getRegisteredCellTypeNames)(),(function(e){I.cellTypes[e]=(0,a.getCellType)(e)})),I.cellTypes.registerCellType=a.registerCellType,I.cellTypes.getCellType=a.getCellType,I.editors={},f.arrayEach((0,o.getRegisteredEditorNames)(),(function(e){I.editors[S.toUpperCaseFirst(e)+"Editor"]=(0,o.getEditor)(e)})),I.editors.registerEditor=o.registerEditor,I.editors.getEditor=o.getEditor,I.renderers={},f.arrayEach((0,r.getRegisteredRendererNames)(),(function(e){var t=(0,r.getRenderer)(e);"base"===e&&(I.renderers.cellDecorator=t),I.renderers[S.toUpperCaseFirst(e)+"Renderer"]=t})),I.renderers.registerRenderer=r.registerRenderer,I.renderers.getRenderer=r.getRenderer,I.validators={},f.arrayEach((0,i.getRegisteredValidatorNames)(),(function(e){I.validators[S.toUpperCaseFirst(e)+"Validator"]=(0,i.getValidator)(e)})),I.validators.registerValidator=i.registerValidator,I.validators.getValidator=i.getValidator,I.plugins={},f.arrayEach(Object.getOwnPropertyNames(R),(function(e){var t=R[e];"Base"===e?I.plugins[e+"Plugin"]=t:I.plugins[e]=t})),I.plugins.registerPlugin=k.registerPlugin,I.languages={},I.languages.dictionaryKeys=H,I.languages.getLanguageDictionary=P.getLanguageDictionary,I.languages.getLanguagesDictionaries=P.getLanguagesDictionaries,I.languages.registerLanguageDictionary=P.registerLanguageDictionary,I.languages.getTranslatedPhrase=function(){return N.getTranslatedPhrase.apply(void 0,arguments)},t.default=I},function(e,t,n){var o=n(20),r=n(18),i=n(35);e.exports=n(22)?Object.defineProperties:function(e,t){r(e);for(var n,a=i(t),s=a.length,l=0;s>l;)o.f(e,n=a[l++],t[n]);return e}},function(e,t,n){"use strict";var o=n(76),r=n(51),i=n(53),a={};n(29)(a,n(12)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=o(a,{next:r(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var o=n(9),r=n(112).set;e.exports=function(e,t,n){var i,a=t.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&o(i)&&r&&r(e,i),e}},function(e,t,n){var o=n(212);e.exports=function(e,t){return new(o(e))(t)}},function(e,t,n){var o=n(9),r=n(115),i=n(12)("species");e.exports=function(e){var t;return r(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!r(t.prototype)||(t=void 0),o(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var o=n(18),r=n(63),i=n(12)("species");e.exports=function(e,t){var n,a=o(e).constructor;return void 0===a||null==(n=o(a)[i])?t:r(n)}},function(e,t){e.exports=function(e,t,n){var o=void 0===n;switch(t.length){case 0:return o?e():e.call(n);case 1:return o?e(t[0]):e.call(n,t[0]);case 2:return o?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return o?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return o?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 o=n(15),r=n(82).set,i=o.MutationObserver||o.WebKitMutationObserver,a=o.process,s=o.Promise,l="process"==n(44)(a);e.exports=function(){var e,t,n,u=function(){var o,r;for(l&&(o=a.domain)&&o.exit();e;){r=e.fn,e=e.next;try{r()}catch(o){throw e?n():t=void 0,o}}t=void 0,o&&o.enter()};if(l)n=function(){a.nextTick(u)};else if(!i||o.navigator&&o.navigator.standalone)if(s&&s.resolve){var c=s.resolve(void 0);n=function(){c.then(u)}}else n=function(){r.call(o,u)};else{var h=!0,d=document.createTextNode("");new i(u).observe(d,{characterData:!0}),n=function(){d.data=h=!h}}return function(o){var r={fn:o,next:void 0};t&&(t.next=r),e||(e=r,n()),t=r}}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var o=n(18),r=n(9),i=n(120);e.exports=function(e,t){if(o(e),r(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){var o=n(15),r=n(37),i=n(49),a=n(122),s=n(20).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=i?{}:o.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){var o=n(35),r=n(69),i=n(54);e.exports=function(e){var t=o(e),n=r.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){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){var o=n(60),r=n(36);e.exports=function(e){return function(t,n){var i,a,s=String(r(t)),l=o(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 o=n(18);e.exports=function(){var e=o(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 o=n(31),r=n(61),i=n(25);e.exports=[].copyWithin||function(e,t){var n=o(this),a=i(n.length),s=r(e,a),l=r(t,a),u=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===u?a:r(u,a))-l,a-s),h=1;for(l<s&&s<l+c&&(h=-1,l+=c-1,s+=c-1);c-- >0;)l in n?n[s]=n[l]:delete n[s],s+=h,l+=h;return n}},function(e,t,n){"use strict";var o=n(31),r=n(61),i=n(25);e.exports=function(e){for(var t=o(this),n=i(t.length),a=arguments.length,s=r(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,u=void 0===l?n:r(l,n);u>s;)t[s++]=e;return t}},function(e,t,n){var o=n(84),r=n(69),i=n(18),a=n(15).Reflect;e.exports=a&&a.ownKeys||function(e){var t=o.f(i(e)),n=r.f;return n?t.concat(n(e)):t}},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(0),i=n(41),a=(o=i)&&o.__esModule?o:{default:o},s=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.clone=n.makeClone(a.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, 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}(a.default);a.default.registerOverlay(a.default.CLONE_DEBUG,s),t.default=s},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),a=n(41),s=(o=a)&&o.__esModule?o:{default:o},l=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.clone=n.makeClone(s.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, 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),r(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,i.resetCssTransform)(e);else{var o=this.wot.wtTable.hider.getBoundingClientRect(),r=Math.ceil(o.left),a=Math.ceil(o.right),s=void 0,l=void 0;l=""===(l=this.wot.wtTable.hider.style.top)?0:l,t=s=r<0&&a-e.offsetWidth>0?-r:0,s+="px",(0,i.setOverlayPosition)(e,s,l)}this.adjustHeaderBordersPosition(t),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){var t=!1;return this.mainTableScrollableElement===window&&window.scrollX!==e?(window.scrollTo(e,(0,i.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,o=e,r=0;o<t;)r+=this.wot.wtTable.getStretchedColumnWidth(o)||n,o+=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.clientHeight===e.offsetHeight?0:(0,i.getScrollbarWidth)(),n=this.clone.wtTable.holder.parentNode.style,o=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==window||"vertical"===o){var r=this.wot.wtViewport.getWorkspaceHeight()-t;r=Math.min(r,(0,i.innerHeight)(this.wot.wtTable.wtRootElement)),n.height=r+"px"}else n.height="";this.clone.wtTable.holder.style.height=n.height;var a=(0,i.outerWidth)(this.clone.wtTable.TABLE);n.width=(0===a?a:a+4)+"px"}},{key:"adjustRootChildrenSize",value:function(){var e=(0,i.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=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=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=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,r=0;return t&&o.offsetWidth!==o.clientWidth&&(r=(0,i.getScrollbarWidth)()),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportWidth()):n+=this.sumCellSizes(this.wot.getSetting("fixedColumnsLeft"),e),n+=r,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,i.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,i.removeClass)(t,"emptyRows"):(0,i.addClass)(t,"emptyRows"),o&&!n.length)(0,i.addClass)(t,"innerBorderLeft");else if(!o&&n.length){var r=(0,i.hasClass)(t,"innerBorderLeft");e?(0,i.addClass)(t,"innerBorderLeft"):(0,i.removeClass)(t,"innerBorderLeft"),(!r&&e||r&&!e)&&this.wot.wtOverlays.adjustElementsSize()}}}]),t}(s.default);s.default.registerOverlay(s.default.CLONE_LEFT,l),t.default=l},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),a=n(2),s=n(41),l=(o=s)&&o.__esModule?o:{default:o},u=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.clone=n.makeClone(l.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, 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),r(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,i.resetCssTransform)(e);else{var o=this.wot.wtTable.hider.getBoundingClientRect(),r=Math.ceil(o.top),a=Math.ceil(o.bottom),s=void 0,l=void 0;s=""===(s=this.wot.wtTable.hider.style.left)?0:s,t=l=r<0&&a-e.offsetHeight>0?-r:0,l+="px",(0,i.setOverlayPosition)(e,s,l)}this.adjustHeaderBordersPosition(t),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){var t=!1;return this.mainTableScrollableElement===window&&window.scrollY!==e?(window.scrollTo((0,i.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,o=e,r=0;o<t;){var i=this.wot.wtTable.getRowHeight(o);r+=void 0===i?n:i,o+=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,i.getScrollbarWidth)(),n=this.clone.wtTable.holder.parentNode.style,o=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==window||"horizontal"===o){var r=this.wot.wtViewport.getWorkspaceWidth()-t;r=Math.min(r,(0,i.innerWidth)(this.wot.wtTable.wtRootElement)),n.width=r+"px"}else n.width="";this.clone.wtTable.holder.style.width=n.width;var a=(0,i.outerHeight)(this.clone.wtTable.TABLE);n.height=(0===a?a:a+4)+"px"}},{key:"adjustRootChildrenSize",value:function(){var e=(0,i.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=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=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=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,r=0;if(t&&o.offsetHeight!==o.clientHeight&&(r=(0,i.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+=r,this.setScrollPosition(n)}},{key:"getTableParentOffset",value:function(){return this.mainTableScrollableElement===window?this.wot.wtTable.holderOffset.top:0}},{key:"getScrollPosition",value:function(){return(0,i.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,a.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,i.removeClass)(t,"emptyColumns"):(0,i.addClass)(t,"emptyColumns"),0===this.wot.getSetting("fixedRowsTop")&&this.wot.getSetting("columnHeaders").length>0){var n=(0,i.hasClass)(t,"innerBorderTop");e||0===this.wot.getSetting("totalRows")?(0,i.addClass)(t,"innerBorderTop"):(0,i.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 r=0;r<o.length;r++)o[r].style["border-left-width"]=0}}}]),t}(l.default);l.default.registerOverlay(l.default.CLONE_TOP,u),t.default=u},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),a=n(41),s=(o=a)&&o.__esModule?o:{default:o},l=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.clone=n.makeClone(s.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, 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),r(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,i.outerHeight)(this.clone.wtTable.TABLE),n=(0,i.outerWidth)(this.clone.wtTable.TABLE),o=this.wot.getSetting("preventOverflow");if(this.trimmingContainer===window){var r=this.wot.wtTable.hider.getBoundingClientRect(),a=Math.ceil(r.top),s=Math.ceil(r.left),l=Math.ceil(r.bottom),u=Math.ceil(r.right),c="0",h="0";o&&"vertical"!==o||s<0&&u-e.offsetWidth>0&&(c=-s+"px"),o&&"horizontal"!==o||a<0&&l-e.offsetHeight>0&&(h=-a+"px"),(0,i.setOverlayPosition)(e,c,h)}else(0,i.resetCssTransform)(e);e.style.height=(0===t?t:t+4)+"px",e.style.width=(0===n?n:n+4)+"px"}}}]),t}(s.default);s.default.registerOverlay(s.default.CLONE_TOP_LEFT_CORNER,l),t.default=l},function(e,t,n){"use strict";t.__esModule=!0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},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},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(0),s=c(n(189)),l=c(n(56)),u=c(n(178));function c(e){return e&&e.__esModule?e:{default:e}}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),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 i(e,[{key:"getBorder",value:function(e){return this.instanceBorders[e.guid]||(this.instanceBorders[e.guid]=new s.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 u.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 i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=e.wtTable.getCell(new l.default(t,n));if("object"===(void 0===s?"undefined":r(s))){var u=o;i&&(u=this.classNameGenerator(s),this.classNames.includes(u)||this.classNames.push(u)),(0,a.addClass)(s,u)}return this}},{key:"linearClassNameGenerator",value:function(e,t){return function n(o){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0===t||0===r)return e;var i=r>=0?r:t,s=0==(i-=1)?e:e+"-"+i;return(0,a.hasClass)(o,s)?e+"-"+(i+1):n(o,i)}}},{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(),r=this.getCorners(),i=o(r,4),s=i[0],l=i[1],u=i[2],c=i[3],h=0;h<n;h+=1){var d=e.wtTable.columnFilter.renderedToSource(h);if(d>=l&&d<=c){var f=e.wtTable.getColumnHeader(d);if(f){var p=[];this.settings.highlightHeaderClassName&&p.push(this.settings.highlightHeaderClassName),this.settings.highlightColumnClassName&&p.push(this.settings.highlightColumnClassName),(0,a.addClass)(f,p)}}}for(var g=0;g<t;g+=1){var v=e.wtTable.rowFilter.renderedToSource(g);if(v>=s&&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,a.addClass)(y,m)}}for(var w=0;w<n;w+=1){var C=e.wtTable.columnFilter.renderedToSource(w);v>=s&&v<=u&&C>=l&&C<=c?this.settings.className&&this.addClassAtCoords(e,v,C,this.settings.className,this.settings.markIntersections):v>=s&&v<=u?this.settings.highlightRowClassName&&this.addClassAtCoords(e,v,C,this.settings.highlightRowClassName):C>=l&&C<=c&&this.settings.highlightColumnClassName&&this.addClassAtCoords(e,v,C,this.settings.highlightColumnClassName);var b=e.getSetting("onAfterDrawSelection",v,C,r,this.settings.layerLevel);"string"==typeof b&&this.addClassAtCoords(e,v,C,b)}}e.getSetting("onBeforeDrawBorders",r,this.settings.className),this.settings.border&&this.getBorder(e).appear(r)}}}]),e}();t.default=h},function(e,t,n){"use strict";e.exports=function(){var e,t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},n=document.body,o=document.createTextNode(""),r=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!==o.textContent?o.textContent=e.value+i:o.data=e.value+i,r.style.fontSize=c(e).fontSize,r.style.fontFamily=c(e).fontFamily,r.style.whiteSpace="pre",n.appendChild(r),a=r.clientWidth+2,n.removeChild(r),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)}r.firstChild||(r.className="autoResize",r.style.display="inline-block",r.appendChild(o))}(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;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(55),a=(o=i)&&o.__esModule?o:{default:o},s=n(0),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),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,(t.__proto__||Object.getPrototypeOf(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, 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),r(t,[{key:"beginEditing",value:function(e,t){if(t&&"mouseup"===t.type){var n=this.TD.querySelector('input[type="checkbox"]');(0,s.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}(a.default);t.default=l},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=d(n(57)),a=d(n(237));n(238);var s=n(0),l=n(1),u=d(n(5)),c=n(21),h=n(13);function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.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, 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),o(t,[{key:"init",value:function(){var e=this;if("function"!=typeof i.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof a.default)throw new Error("You need to include Pikaday to your project.");r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"init",this).call(this),this.instance.addHook("afterDestroy",(function(){e.parentDestroyed=!0,e.destroyElements()}))}},{key:"createElements",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(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,s.addClass)(this.datePicker,"htDatepickerHolder"),document.body.appendChild(this.datePicker),this.$datePicker=new a.default(this.getDatePickerConfig()),new u.default(this).addEventListener(this.datePicker,"mousedown",(function(e){return(0,h.stopPropagation)(e)})),this.hideDatepicker()}},{key:"destroyElements",value:function(){this.$datePicker.destroy()}},{key:"prepare",value:function(e,n,o,i,a,s){this._opened=!1,r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"prepare",this).call(this,e,n,o,i,a,s)}},{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;r(t.prototype.__proto__||Object.getPrototypeOf(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()})),r(t.prototype.__proto__||Object.getPrototypeOf(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 o=this.originalValue;void 0!==o&&this.setValue(o)}this.hideDatepicker(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"finishEditing",this).call(this,e,n)}},{key:"showDatepicker",value:function(e){this.$datePicker.config(this.getDatePickerConfig());var t=this.TD.getBoundingClientRect(),n=this.cellProperties.dateFormat||this.defaultDateFormat,o=this.$datePicker.config(),r=void 0,a=this.instance.view.isMouseDown(),l=!!e&&(0,c.isMetaKey)(e.keyCode);this.datePickerStyle.top=window.pageYOffset+t.top+(0,s.outerHeight)(this.TD)+"px",this.datePickerStyle.left=window.pageXOffset+t.left+"px",this.$datePicker._onInputFocus=function(){},o.format=n,this.originalValue?(r=this.originalValue,(0,i.default)(r,n,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(r,n),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),l||a||this.setValue("")):this.cellProperties.defaultDate?(r=this.cellProperties.defaultDate,o.defaultDate=r,(0,i.default)(r,n,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(r,n),!0),l||a||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,l.deepExtend)(n,this.cellProperties.datePickerConfig);var o=n.onSelect,r=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,i.default)(n).format(e.cellProperties.dateFormat||e.defaultDateFormat)),e.setValue(n),e.hideDatepicker(),o&&o()},n.onClose=function(){e.parentDestroyed||e.finishEditing(!1),r&&r()},n}}]),t}(d(n(59)).default);t.default=f},function(e,t){e.exports=n},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=s(n(190)),a=s(n(16));function s(e){return e&&e.__esModule?e:{default:e}}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),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,(t.__proto__||Object.getPrototypeOf(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, 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),o(t,[{key:"prepare",value:function(e,n,o,i,a,s){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"prepare",this).call(this,e,n,o,i,a,s),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}]),t}(i.default);a.default.getSingleton().add("beforeValidate",(function(e,t,n){var o=this.getCellMeta(t,this.propToCol(n));o.editor===l&&void 0===o.strict&&(o.filter=!1,o.strict=!0)})),t.default=l},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(59),i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),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,(t.__proto__||Object.getPrototypeOf(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, 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}(((o=r)&&o.__esModule?o:{default:o}).default);t.default=i},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},a=n(0),s=n(59),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),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,(t.__proto__||Object.getPrototypeOf(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, 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),r(t,[{key:"createElements",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(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,a.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}]),t}(((o=s)&&o.__esModule?o:{default:o}).default);t.default=l},function(e,t,n){"use strict";t.__esModule=!0;var o,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},i=n(0),a=n(13),s=n(21),l=n(55),u=(o=l)&&o.__esModule?o:{default:o},c=n(1),h=u.default.prototype.extend();h.prototype.init=function(){this.select=document.createElement("SELECT"),(0,i.addClass)(this.select,"htSelectEditor"),this.select.style.display="none",this.instance.rootElement.appendChild(this.select),this.registerHooks()},h.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()}))},h.prototype.prepare=function(){for(var e=this,t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];u.default.prototype.prepare.apply(this,n);var r=this.cellProperties.selectOptions,a=void 0;a="function"==typeof r?this.prepareOptions(r(this.row,this.col,this.prop)):this.prepareOptions(r),(0,i.empty)(this.select),(0,c.objectEach)(a,(function(t,n){var o=document.createElement("OPTION");o.value=n,(0,i.fastInnerHTML)(o,t),e.select.appendChild(o)}))},h.prototype.prepareOptions=function(e){var t={};if(Array.isArray(e))for(var n=0,o=e.length;n<o;n++)t[e[n]]=e[n];else"object"===(void 0===e?"undefined":r(e))&&(t=e);return t},h.prototype.getValue=function(){return this.select.value},h.prototype.setValue=function(e){this.select.value=e};var d=function(e){var t=this.getActiveEditor(),n=t.select.selectedIndex-1,o=t.select.selectedIndex+1;switch(e.keyCode){case s.KEY_CODES.ARROW_UP:n>=0&&(t.select[n].selected=!0),(0,a.stopImmediatePropagation)(e),e.preventDefault();break;case s.KEY_CODES.ARROW_DOWN:o<=t.select.length-1&&(t.select[o].selected=!0),(0,a.stopImmediatePropagation)(e),e.preventDefault()}};h.prototype.open=function(){this._opened=!0,this.refreshDimensions(),this.select.style.display="",this.instance.addHook("beforeKeyDown",d)},h.prototype.close=function(){this._opened=!1,this.select.style.display="none",this.instance.removeHook("beforeKeyDown",d)},h.prototype.focus=function(){this.select.focus()},h.prototype.refreshValue=function(){var e=this.instance.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()},h.prototype.refreshDimensions=function(){if(this.state===l.EditorState.EDITING)if(this.TD=this.getEditedCell(),this.TD){var e=(0,i.offset)(this.TD),t=(0,i.offset)(this.instance.rootElement),n=(0,i.getScrollableElement)(this.TD),o=this.checkEditorSection(),r=(0,i.outerWidth)(this.TD)+1,a=(0,i.outerHeight)(this.TD)+1,s=e.top-t.top-1-(n.scrollTop||0),u=e.left-t.left-1-(n.scrollLeft||0),c=void 0;switch(o){case"top":c=(0,i.getCssTransform)(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":c=(0,i.getCssTransform)(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":c=(0,i.getCssTransform)(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":c=(0,i.getCssTransform)(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":c=(0,i.getCssTransform)(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode)}0===this.instance.getSelectedLast()[0]&&(s+=1),0===this.instance.getSelectedLast()[1]&&(u+=1);var h=this.select.style;c&&-1!==c?h[c[0]]=c[1]:(0,i.resetCssTransform)(this.select);var d=(0,i.getComputedStyle)(this.TD);parseInt(d.borderTopWidth,10)>0&&(a-=1),parseInt(d.borderLeftWidth,10)>0&&(r-=1),h.height=a+"px",h.minWidth=r+"px",h.top=s+"px",h.left=u+"px",h.margin="0px"}else this.close()},h.prototype.getEditedCell=function(){var e=void 0;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},t.default=h},function(e,t,n){"use strict";t.__esModule=!0;var o=n(0);t.default=function(e,t,n,r,i,a,s){var l=[],u=[];s.className&&(t.className?t.className=t.className+" "+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,o.removeClass)(t,u),(0,o.addClass)(t,l)}},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(0),i=n(5),a=(o=i)&&o.__esModule?o:{default:o},s=n(4),l=n(14);document.createElement("DIV").className="htAutocompleteWrapper";var u=document.createElement("DIV");u.className="htAutocompleteArrow",u.appendChild(document.createTextNode(String.fromCharCode(9660))),t.default=function(e,t,n,o,i,c,h){for(var d=h.allowHtml?"html":"text",f=u.cloneNode(!0),p=arguments.length,g=Array(p>7?p-7:0),v=7;v<p;v++)g[v-7]=arguments[v];if((0,l.getRenderer)(d).apply(this,[e,t,n,o,i,c,h].concat(g)),t.firstChild||t.appendChild(document.createTextNode(String.fromCharCode(160))),t.insertBefore(f,t.firstChild),(0,r.addClass)(t,"htAutocomplete"),!e.acArrowListener){var y=new a.default(e);e.acArrowListener=function(i){(0,r.hasClass)(i.target,"htAutocompleteArrow")&&e.view.wt.getSetting("onCellDblClick",null,new s.CellCoords(n,o),t)},y.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",(function(){y.destroy()}))}}},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(0),i=n(33),a=n(5),s=(o=a)&&o.__esModule?o:{default:o},l=n(21),u=n(43),c=n(13),h=n(14),d=new WeakMap,f=new WeakMap;function p(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}t.default=function(e,t,n,o,a,g,v){for(var y=arguments.length,m=Array(y>7?y-7:0),w=7;w<y;w++)m[w-7]=arguments[w];(0,h.getRenderer)("base").apply(this,[e,t,n,o,a,g,v].concat(m)),function(e){var t=f.get(e);t||((t=new s.default(e)).addEventListener(e.rootElement,"click",(function(t){return function(e,t){if(!p(e.target))return!1;var n=parseInt(e.target.getAttribute("data-row"),10),o=parseInt(e.target.getAttribute("data-col"),10),r=t.getCellMeta(n,o);r.readOnly&&e.preventDefault()}(t,e)})),t.addEventListener(e.rootElement,"mouseup",(function(t){return function(e,t){p(e.target)&&setTimeout(t.listen,10)}(t,e)})),t.addEventListener(e.rootElement,"change",(function(t){return function(e,t){if(!p(e.target))return!1;var n=parseInt(e.target.getAttribute("data-row"),10),o=parseInt(e.target.getAttribute("data-col"),10),r=t.getCellMeta(n,o);if(!r.readOnly){var i=null;i=e.target.checked?void 0===r.uncheckedTemplate||r.checkedTemplate:void 0!==r.uncheckedTemplate&&r.uncheckedTemplate,t.setDataAtCell(n,o,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)}(),b=v.label,E=!1;if(void 0===v.checkedTemplate&&(v.checkedTemplate=!0),void 0===v.uncheckedTemplate&&(v.uncheckedTemplate=!1),(0,r.empty)(t),g===v.checkedTemplate||(0,i.equalsIgnoreCase)(g,v.checkedTemplate)?C.checked=!0:g===v.uncheckedTemplate||(0,i.equalsIgnoreCase)(g,v.uncheckedTemplate)?C.checked=!1:null===g?(0,r.addClass)(C,"noValue"):(C.style.display="none",(0,r.addClass)(C,"htBadValue"),E=!0),C.setAttribute("data-row",n),C.setAttribute("data-col",o),!E&&b){var S="";b.value?S="function"==typeof b.value?b.value.call(this,n,o,a,g):b.value:b.property&&(S=e.getDataAtRowProp(n,b.property));var O=function(e){var t=document.createElement("label");return t.className="htCheckboxRendererLabel",t.appendChild(document.createTextNode(e)),t.cloneNode(!0)}(S);"before"===b.position?O.appendChild(C):O.insertBefore(C,O.firstChild),C=O}function T(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=e.getSelectedRangeLast();if(n){for(var o=n.getTopLeftCorner(),r=o.row,i=o.col,a=n.getBottomRightCorner(),s=a.row,l=a.col,u=[],c=r;c<=s;c+=1)for(var h=i;h<=l;h+=1){var d=e.getCellMeta(c,h);if("checkbox"!==d.type)return;if(!0!==d.readOnly){void 0===d.checkedTemplate&&(d.checkedTemplate=!0),void 0===d.uncheckedTemplate&&(d.uncheckedTemplate=!1);var f=e.getDataAtCell(c,h);!1===t?[d.checkedTemplate,d.checkedTemplate.toString()].includes(f)?u.push([c,h,d.uncheckedTemplate]):[d.uncheckedTemplate,d.uncheckedTemplate.toString(),null,void 0].includes(f)&&u.push([c,h,d.checkedTemplate]):u.push([c,h,d.uncheckedTemplate])}}u.length>0&&e.setDataAtCell(u)}}t.appendChild(C),E&&t.appendChild(document.createTextNode("#bad-value#")),d.has(e)||(d.set(e,!0),e.addHook("beforeKeyDown",(function(t){var n="SPACE|ENTER",o="DELETE|BACKSPACE",r=(0,u.partial)(l.isKey,t.keyCode);r(n+"|"+o)&&!(0,c.isImmediatePropagationStopped)(t)&&function(t){var n=e.getSelectedRangeLast();if(n)for(var o=n.getTopLeftCorner(),r=n.getBottomRightCorner(),i=o.row;i<=r.row;i++)for(var a=o.col;a<=r.col;a++){var s=e.getCellMeta(i,a);if("checkbox"!==s.type)return;var l=e.getCell(i,a);if(null==l)t(i,a,s);else{var u=l.querySelectorAll("input[type=checkbox]");u.length>0&&!s.readOnly&&t(u)}}}((function(){(0,c.stopImmediatePropagation)(t),t.preventDefault()})),r(n)&&T(),r(o)&&T(!0)})))}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(0),r=n(14);t.default=function(e,t,n,i,a,s){for(var l=arguments.length,u=Array(l>6?l-6:0),c=6;c<l;c++)u[c-6]=arguments[c];(0,r.getRenderer)("base").apply(this,[e,t,n,i,a,s].concat(u)),(0,o.fastInnerHTML)(t,null==s?"":s)}},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(248),i=(o=r)&&o.__esModule?o:{default:o},a=n(14),s=n(6);t.default=function(e,t,n,o,r,l,u){var c=l;if((0,s.isNumeric)(c)){var h=u.numericFormat,d=h&&h.culture||"-",f=h&&h.pattern,p=u.className||"",g=p.length?p.split(" "):[];if(void 0!==d&&!i.default.languages()[d]){var v=d.replace("-",""),y=i.default.allLanguages?i.default.allLanguages[d]:i.default[v];y&&i.default.registerLanguage(y)}i.default.setLanguage(d),c=(0,i.default)(c).format(f||"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,a.getRenderer)("text")(e,t,n,o,r,c,u)}},function(e,n){e.exports=t},function(e,t,n){"use strict";t.__esModule=!0;var o=n(0),r=n(14),i=n(6);t.default=function(e,t,n,a,s,l,u){for(var c=arguments.length,h=Array(c>7?c-7:0),d=7;d<c;d++)h[d-7]=arguments[d];(0,r.getRenderer)("text").apply(this,[e,t,n,a,s,l,u].concat(h));var f=u.hashLength||t.innerHTML.length,p=u.hashSymbol||"*",g="";(0,i.rangeEach)(f-1,(function(){g+=p})),(0,o.fastInnerHTML)(t,g)}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(0),r=n(11),i=n(14);t.default=function(e,t,n,a,s,l,u){for(var c=arguments.length,h=Array(c>7?c-7:0),d=7;d<c;d++)h[d-7]=arguments[d];(0,i.getRenderer)("base").apply(this,[e,t,n,a,s,l,u].concat(h));var f=l;if(!f&&u.placeholder&&(f=u.placeholder),f=(0,r.stringify)(f),e.getSettings().trimWhitespace||(f=f.replace(/ /g,String.fromCharCode(160))),u.rendererTemplate){(0,o.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,o.fastInnerText)(t,f)}},function(e,t,n){"use strict";function o(e,t){var n=e;return function(e){for(var o=!1,r=0,i=e.length;r<i;r++)if(n===e[r]){o=!0;break}t(o)}}t.__esModule=!0,t.default=function(e,t){var n=e;null==n&&(n=""),this.allowEmpty&&""===n?t(!0):this.strict&&this.source?"function"==typeof this.source?this.source(n,o(n,t)):o(n,t)(this.source):t(!0)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n=(0,s.getEditorInstance)("date",this.instance),o=e,r=!0;null==o&&(o="");var a=(0,i.default)(new Date(o)).isValid()||(0,i.default)(o,n.defaultDateFormat).isValid(),u=(0,i.default)(o,this.dateFormat||n.defaultDateFormat,!0).isValid();if(this.allowEmpty&&""===o&&(a=!0,u=!0),a||(r=!1),!a&&u&&(r=!0),a&&!u)if(!0===this.correctFormat){var c=l(o,this.dateFormat),h=this.instance.runHooks("unmodifyRow",this.row),d=this.instance.runHooks("unmodifyCol",this.col);this.instance.setDataAtCell(h,d,c,"dateValidator"),r=!0}else r=!1;t(r)},t.correctFormat=l;var o,r=n(57),i=(o=r)&&o.__esModule?o:{default:o},a=n(192),s=n(17);function l(e,t){var n=(0,i.default)((0,a.getNormalizedDate)(e)),o=(0,i.default)(e,t),r=e.search(/[A-z]/g)>-1;return(n.isValid()&&n.format("x")===o.format("x")||!o.isValid()||r?n:o).format(t)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n=e;null==n&&(n=""),this.allowEmpty&&""===n?t(!0):t(""!==n&&/^-?\d*(\.|,)?\d*$/.test(n))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n=this.timeFormat||"h:mm:ss a",o=!0,r=e;null===r&&(r=""),r=/^\d{3,}$/.test(r)?parseInt(r,10):r;var s=/^\d{1,2}$/.test(r);s&&(r+=":00");var l=(0,i.default)(r,a,!0).isValid()?(0,i.default)(r):(0,i.default)(r,n),u=l.isValid(),c=(0,i.default)(r,n,!0).isValid()&&!s;if(this.allowEmpty&&""===r&&(u=!0,c=!0),u||(o=!1),!u&&c&&(o=!0),u&&!c)if(!0===this.correctFormat){var h=l.format(n),d=this.instance.runHooks("unmodifyRow",this.row),f=this.instance.runHooks("unmodifyCol",this.col);this.instance.setDataAtCell(d,f,h,"timeValidator"),o=!0}else o=!1;t(o)};var o,r=n(57),i=(o=r)&&o.__esModule?o:{default:o},a=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"]},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14),i=n(34),a="autocomplete";t.default={editor:(0,o.getEditor)(a),renderer:(0,r.getRenderer)(a),validator:(0,i.getValidator)(a)}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14),i="checkbox";t.default={editor:(0,o.getEditor)(i),renderer:(0,r.getRenderer)(i)}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14),i=n(34),a="date";t.default={editor:(0,o.getEditor)(a),renderer:(0,r.getRenderer)("autocomplete"),validator:(0,i.getValidator)(a)}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14),i=n(34);t.default={editor:(0,o.getEditor)("dropdown"),renderer:(0,r.getRenderer)("autocomplete"),validator:(0,i.getValidator)("autocomplete")}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14);t.default={editor:(0,o.getEditor)("handsontable"),renderer:(0,r.getRenderer)("autocomplete")}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14),i=n(34),a="numeric";t.default={editor:(0,o.getEditor)(a),renderer:(0,r.getRenderer)(a),validator:(0,i.getValidator)(a),dataType:"number"}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14),i="password";t.default={editor:(0,o.getEditor)(i),renderer:(0,r.getRenderer)(i),copyable:!1}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14),i="text";t.default={editor:(0,o.getEditor)(i),renderer:(0,r.getRenderer)(i)}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14),i=n(34);t.default={editor:(0,o.getEditor)("text"),renderer:(0,r.getRenderer)("text"),validator:(0,i.getValidator)("time")}},function(e,t,n){"use strict";t.__esModule=!0;var 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},r=d(n(193)),i=n(92),a=n(91),s=n(1),l=n(2),u=d(n(265)),c=n(6),h=d(n(266));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n){var o=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=u.default.create((function(){return o.clearLengthCache()}),"15fps"),this.instance.addHook("skipLengthCache",(function(e){return o.onSkipLengthCache(e)})),this.onSkipLengthCache(500)}f.prototype.DESTINATION_RENDERER=1,f.prototype.DESTINATION_CLIPBOARD_GENERATOR=2,f.prototype.recursiveDuckSchema=function(e){return(0,s.duckSchema)(e)},f.prototype.recursiveDuckColumns=function(e,t,n){var r=this,i=t,a=n,l=void 0;return void 0===i&&(i=0,a=""),"object"!==(void 0===e?"undefined":o(e))||Array.isArray(e)||(0,s.objectEach)(e,(function(e,t){null===e?(l=a+t,r.colToPropCache.push(l),r.propToColCache.set(l,i),i+=1):i=r.recursiveDuckColumns(e,i,t+".")})),i},f.prototype.createMap=function(){var e=void 0,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 h.default;var n=this.instance.getSettings().columns;if(n){var o=this.instance.getSettings().maxCols,r=Math.min(o,n.length),i=0,a=!1,l=(0,s.deepObjectSize)(t);for("function"==typeof n&&(r=l>0?l:this.instance.countSourceCols(),a=!0),e=0;e<r;e++){var u=a?n(e):n[e];if((0,s.isObject)(u)){if(void 0!==u.data){var c=a?i:e;this.colToPropCache[c]=u.data,this.propToColCache.set(u.data,c)}i+=1}}}else this.recursiveDuckColumns(t)},f.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},f.prototype.propToCol=function(e){var t=void 0;return t=void 0===this.propToColCache.get(e)?e:this.propToColCache.get(e),t=this.instance.runHooks("unmodifyCol",t)},f.prototype.getSchema=function(){var e=this.instance.getSettings().dataSchema;return e?"function"==typeof e?e():e:this.duckSchema},f.prototype.createRow=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments[2],r=0,i=e;if(("number"!=typeof i||i>=this.instance.countSourceRows())&&(i=this.instance.countSourceRows()),!1===this.instance.runHooks("beforeCreateRow",i,n,o))return 0;for(var a=this.instance.getSettings().maxRows,l=this.instance.countCols(),u=function(){var e=null;"array"===t.instance.dataType?t.instance.getSettings().dataSchema?e=(0,s.deepClone)(t.getSchema()):(e=[],(0,c.rangeEach)(l-1,(function(){return e.push(null)}))):"function"===t.instance.dataType?e=t.instance.getSettings().dataSchema(i):(e={},(0,s.deepExtend)(e,t.getSchema())),i===t.instance.countSourceRows()?t.dataSource.push(e):t.spliceData(i,0,e),r+=1};r<n&&this.instance.countSourceRows()<a;)u();return this.instance.runHooks("afterCreateRow",i,r,o),this.instance.forceFullRender=!0,r},f.prototype.createCol=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments[2];if(!this.instance.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");var o=this.instance.countSourceRows(),r=this.dataSource,i=this.instance.countCols(),s="number"!=typeof e||e>=i?i:e,l=void 0,u=0,c=void 0;this.instance.runHooks("beforeCreateCol",s,t,n),c=s;for(var h=this.instance.getSettings().maxCols;u<t&&this.instance.countCols()<h;){if(l=(0,a.columnFactory)(this.GridSettings,this.priv.columnsSettingConflicts),"number"!=typeof s||s>=this.instance.countCols()){if(o>0)for(var d=0;d<o;d++)void 0===r[d]&&(r[d]=[]),r[d].push(null);else r.push([null]);this.priv.columnSettings.push(l)}else{for(var f=0;f<o;f++)r[f].splice(c,0,null);this.priv.columnSettings.splice(c,0,l)}u+=1,c+=1}return this.instance.runHooks("afterCreateCol",s,u,n),this.instance.forceFullRender=!0,u},f.prototype.removeRow=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments[2],o="number"!=typeof e?-t:e,r=this.instance.runHooks("modifyRemovedAmount",t,o);o=(this.instance.countSourceRows()+o)%this.instance.countSourceRows();var i=this.visualRowsToPhysical(o,r);if(!1!==this.instance.runHooks("beforeRemoveRow",o,r,i,n)){var a=this.dataSource,s=this.filterData(o,r);s&&(a.length=0,Array.prototype.push.apply(a,s)),this.instance.runHooks("afterRemoveRow",o,r,i,n),this.instance.forceFullRender=!0}},f.prototype.removeCol=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments[2];if("object"===this.instance.dataType||this.instance.getSettings().columns)throw new Error("cannot remove column with object data source or columns option specified");var o="number"!=typeof e?-t:e;o=(this.instance.countCols()+o)%this.instance.countCols();var r=this.visualColumnsToPhysical(o,t),i=r.slice(0).sort((function(e,t){return t-e}));if(!1!==this.instance.runHooks("beforeRemoveCol",o,t,r,n)){for(var a=!0,s=i.length,l=this.dataSource,u=0;u<s;u++)a&&r[0]!==r[u]-u&&(a=!1);if(a)for(var c=0,h=this.instance.countSourceRows();c<h;c++)l[c].splice(r[0],t);else{for(var d=0,f=this.instance.countSourceRows();d<f;d++)for(var p=0;p<s;p++)l[d].splice(i[p],1);for(var g=0;g<s;g++)this.priv.columnSettings.splice(r[g],1)}this.instance.runHooks("afterRemoveCol",o,t,r,n),this.instance.forceFullRender=!0}},f.prototype.spliceCol=function(e,t,n){for(var o=this.instance.getDataAtCol(e),r=o.slice(t,t+n),i=o.slice(t+n),a=arguments.length,s=Array(a>3?a-3:0),u=3;u<a;u++)s[u-3]=arguments[u];(0,l.extendArray)(s,i);for(var c=0;c<n;)s.push(null),c+=1;return(0,l.to2dArray)(s),this.instance.populateFromArray(t,e,s,null,null,"spliceCol"),r},f.prototype.spliceRow=function(e,t,n){for(var o=this.instance.getSourceDataAtRow(e),r=o.slice(t,t+n),i=o.slice(t+n),a=arguments.length,s=Array(a>3?a-3:0),u=3;u<a;u++)s[u-3]=arguments[u];(0,l.extendArray)(s,i);for(var c=0;c<n;)s.push(null),c+=1;return this.instance.populateFromArray(e,t,[s],null,null,"spliceRow"),r},f.prototype.spliceData=function(e,t,n){!1!==this.instance.runHooks("beforeDataSplice",e,t,n)&&this.dataSource.splice(e,t,n)},f.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)}))},f.prototype.get=function(e,t){var n=this.instance.runHooks("modifyRow",e),o=this.dataSource[n],r=this.instance.runHooks("modifyRowData",n),i=null;if((o=isNaN(r)?r:o)&&o.hasOwnProperty&&(0,s.hasOwnProperty)(o,t))i=o[t];else if("string"==typeof t&&t.indexOf(".")>-1){var a=t.split("."),l=o;if(!l)return null;for(var u=0,c=a.length;u<c;u++)if(void 0===(l=l[a[u]]))return null;i=l}else"function"==typeof t&&(i=t(this.dataSource.slice(n,n+1)[0]));if(this.instance.hasHook("modifyData")){var h=(0,s.createObjectPropListener)(i);this.instance.runHooks("modifyData",n,this.propToCol(t),h,"get"),h.isTouched()&&(i=h.value)}return i};var p=(0,i.cellMethodLookupFactory)("copyable",!1);f.prototype.getCopyable=function(e,t){return p.call(this.instance,e,this.propToCol(t))?this.get(e,t):""},f.prototype.set=function(e,t,n,o){var r=this.instance.runHooks("modifyRow",e,o||"datamapGet"),i=n,a=this.dataSource[r],l=this.instance.runHooks("modifyRowData",r);if(a=isNaN(l)?l:a,this.instance.hasHook("modifyData")){var u=(0,s.createObjectPropListener)(i);this.instance.runHooks("modifyData",r,this.propToCol(t),u,"set"),u.isTouched()&&(i=u.value)}if(a&&a.hasOwnProperty&&(0,s.hasOwnProperty)(a,t))a[t]=i;else if("string"==typeof t&&t.indexOf(".")>-1){var c,h=t.split("."),d=a,f=0;for(f=0,c=h.length-1;f<c;f++)void 0===d[h[f]]&&(d[h[f]]={}),d=d[h[f]];d[h[f]]=i}else"function"==typeof t?t(this.dataSource.slice(r,r+1)[0],i):a[t]=i},f.prototype.visualRowsToPhysical=function(e,t){for(var n=this.instance.countSourceRows(),o=[],r=(n+e)%n,i=t,a=void 0;r<n&&i;)a=this.instance.runHooks("modifyRow",r),o.push(a),i-=1,r+=1;return o},f.prototype.visualColumnsToPhysical=function(e,t){for(var n=this.instance.countCols(),o=(n+e)%n,r=[],i=t;o<n&&i;){var a=this.instance.runHooks("modifyCol",o);r.push(a),i-=1,o+=1}return r},f.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),"")},f.prototype.clearLengthCache=function(){this.cachedLength=null},f.prototype.getLength=function(){var e=this,t=this.instance.getSettings().maxRows,n=void 0;n=t<0||0===t?0:t||1/0;var o=this.instance.countSourceRows();if(this.instance.hasHook("modifyRow")){var r=this.skipCache;this.interval.start(),o!==this.latestSourceRowsCount&&(r=!0),this.latestSourceRowsCount=o,null===this.cachedLength||r?((0,c.rangeEach)(o-1,(function(t){null===e.instance.runHooks("modifyRow",t)&&(o-=1)})),this.cachedLength=o):o=this.cachedLength}else this.interval.stop();return Math.min(o,n)},f.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,f.prototype.DESTINATION_RENDERER):[]},f.prototype.getRange=function(e,t,n){var o=[],r=void 0,i=void 0,a=void 0,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)),h=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(r=Math.min(e.row,t.row);r<=c;r++){a=[];var d=this.instance.runHooks("modifyRow",r);for(i=Math.min(e.col,t.col);i<=h&&null!==d;i++)a.push(u.call(this,r,this.colToProp(i)));null!==d&&o.push(a)}return o},f.prototype.getText=function(e,t){return r.default.stringify(this.getRange(e,t,this.DESTINATION_RENDERER))},f.prototype.getCopyableText=function(e,t){return r.default.stringify(this.getRange(e,t,this.DESTINATION_CLIPBOARD_GENERATOR))},f.prototype.onSkipLengthCache=function(e){var t=this;this.skipCache=!0,setTimeout((function(){t.skipCache=!1}),e)},f.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},t.default=f},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.parseDelay=a;var r=n(40),i=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.timer=null,this.func=t,this.delay=a(n),this.stopped=!0,this._then=null,this._callback=function(){return o.__callback()}}return o(e,null,[{key:"create",value:function(t,n){return new e(t,n)}}]),o(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 a(e){var t=e;return"string"==typeof t&&/fps$/.test(t)&&(t=1e3/parseInt(t.replace("fps","")||0,10)),t}t.default=i},function(e,t,n){"use strict";t.__esModule=!0;var 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};t.default=function(){var e={arrayMap:[],weakMap:new WeakMap};return{get:function(o){return t(o)?e.arrayMap[o]:n(o)?e.weakMap.get(o):void 0},set:function(o,r){if(t(o))e.arrayMap[o]=r;else{if(!n(o))throw new Error("Invalid key type");e.weakMap.set(o,r)}},delete:function(o){t(o)?delete e.arrayMap[o]:n(o)&&e.weakMap.delete(o)}};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"===(void 0===e?"undefined":o(e))||"function"==typeof e)}}},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(4),i=n(21),a=n(13),s=n(17),l=n(5),u=(o=l)&&o.__esModule?o:{default:o},c=n(55);function h(e,t,n){var o=this,l=new u.default(e),h=!1,d=!1,f=void 0;function p(e){var o="function"==typeof t.settings.enterMoves?t.settings.enterMoves(event):t.settings.enterMoves;e?n.transformStart(-o.row,-o.col):n.transformStart(o.row,o.col,!0)}function g(s){if(e.isListening()&&(e.runHooks("beforeKeyDown",s),!h&&229!==s.keyCode&&!(0,a.isImmediatePropagationStopped)(s)&&(t.lastKeyCode=s.keyCode,n.isSelected()))){var l=(s.ctrlKey||s.metaKey)&&!s.altKey;if(!f||f.isWaiting()||(0,i.isMetaKey)(s.keyCode)||(0,i.isCtrlMetaKey)(s.keyCode)||l||o.isEditorOpened()){var u=s.shiftKey?n.setRangeEnd:n.setRangeStart,d=void 0;switch(s.keyCode){case i.KEY_CODES.A:!o.isEditorOpened()&&l&&(e.selectAll(),s.preventDefault(),(0,a.stopPropagation)(s));break;case i.KEY_CODES.ARROW_UP:o.isEditorOpened()&&!f.isWaiting()&&o.closeEditorAndSaveChanges(l),s.shiftKey?n.transformEnd(-1,0):n.transformStart(-1,0),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.ARROW_DOWN:o.isEditorOpened()&&!f.isWaiting()&&o.closeEditorAndSaveChanges(l),function(e){e?n.transformEnd(1,0):n.transformStart(1,0)}(s.shiftKey),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.ARROW_RIGHT:o.isEditorOpened()&&!f.isWaiting()&&o.closeEditorAndSaveChanges(l),function(e){e?n.transformEnd(0,1):n.transformStart(0,1)}(s.shiftKey),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.ARROW_LEFT:o.isEditorOpened()&&!f.isWaiting()&&o.closeEditorAndSaveChanges(l),function(e){e?n.transformEnd(0,-1):n.transformStart(0,-1)}(s.shiftKey),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.TAB:d="function"==typeof t.settings.tabMoves?t.settings.tabMoves(s):t.settings.tabMoves,s.shiftKey?n.transformStart(-d.row,-d.col):n.transformStart(d.row,d.col,!0),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.BACKSPACE:case i.KEY_CODES.DELETE:e.emptySelectedCells(),o.prepareEditor(),s.preventDefault();break;case i.KEY_CODES.F2:f&&f.enableFullEditMode(),o.openEditor(null,s),s.preventDefault();break;case i.KEY_CODES.ENTER:o.isEditorOpened()?(f&&f.state!==c.EditorState.WAITING&&o.closeEditorAndSaveChanges(l),p(s.shiftKey)):e.getSettings().enterBeginsEditing?(f&&f.enableFullEditMode(),o.openEditor(null,s)):p(s.shiftKey),s.preventDefault(),(0,a.stopImmediatePropagation)(s);break;case i.KEY_CODES.ESCAPE:o.isEditorOpened()&&(o.closeEditorAndRestoreOriginalValue(l),f.focus()),s.preventDefault();break;case i.KEY_CODES.HOME:s.ctrlKey||s.metaKey?u.call(n,new r.CellCoords(0,n.selectedRange.current().from.col)):u.call(n,new r.CellCoords(n.selectedRange.current().from.row,0)),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.END:s.ctrlKey||s.metaKey?u.call(n,new r.CellCoords(e.countRows()-1,n.selectedRange.current().from.col)):u.call(n,new r.CellCoords(n.selectedRange.current().from.row,e.countCols()-1)),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.PAGE_UP:n.transformStart(-e.countVisibleRows(),0),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.PAGE_DOWN:n.transformStart(e.countVisibleRows(),0),s.preventDefault(),(0,a.stopPropagation)(s)}}else o.openEditor("",s)}}this.lockEditor=function(){d=!0},this.unlockEditor=function(){d=!1},this.destroyEditor=function(e){d||this.closeEditor(e)},this.getActiveEditor=function(){return f},this.prepareEditor=function(){if(!d)if(f&&f.isWaiting())this.closeEditor(!1,!1,(function(e){e&&o.prepareEditor()}));else{var t=e.selection.selectedRange.current().highlight.row,n=e.selection.selectedRange.current().highlight.col,r=e.colToProp(n),i=e.getCell(t,n),a=e.getSourceDataAtCell(e.runHooks("modifyRow",t),n),l=e.getCellMeta(t,n),u=e.getCellEditor(l);u?(f=(0,s.getEditorInstance)(u,e)).prepare(t,n,r,i,a,l):f=void 0}},this.isEditorOpened=function(){return f&&f.isOpened()},this.openEditor=function(e,t){f&&(f.cellProperties.readOnly?t&&t.keyCode===i.KEY_CODES.ENTER&&p():f.beginEditing(e,t))},this.closeEditor=function(e,t,n){f?f.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),l.addEventListener(document.documentElement,"keydown",(function(t){h||e.runHooks("afterDocumentKeyDown",t)})),l.addEventListener(document.documentElement,"compositionstart",(function(t){!h&&f&&!f.isOpened()&&e.isListening()&&o.openEditor("",t)})),e.view.wt.update("onCellDblClick",(function(e,t,n){"TD"===n.nodeName&&(f&&f.enableFullEditMode(),o.openEditor(null,e))}))}var d=new WeakMap;h.getInstance=function(e,t,n,o){var r=d.get(e);return r||(r=new h(e,t,n,o),d.set(e,r)),r},t.default=h},function(e,t,n){"use strict";t.__esModule=!0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(0),i=u(n(5)),a=n(13),s=u(n(4)),l=n(194);function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()};function h(e){var t=this,n=this;this.eventManager=new i.default(e),this.instance=e,this.settings=e.getSettings(),this.selectionMouseDown=!1;var o=e.rootElement.getAttribute("style");o&&e.rootElement.setAttribute("data-originalstyle",o),(0,r.addClass)(e.rootElement,"handsontable");var u=document.createElement("TABLE");(0,r.addClass)(u,"htCore"),e.getSettings().tableClassName&&(0,r.addClass)(u,e.getSettings().tableClassName),this.THEAD=document.createElement("THEAD"),u.appendChild(this.THEAD),this.TBODY=document.createElement("TBODY"),u.appendChild(this.TBODY),e.table=u,e.container.insertBefore(u,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()}));var h=void 0;this.isMouseDown=function(){return h},this.eventManager.addEventListener(document.documentElement,"mouseup",(function(t){e.selection.isInProgress()&&(0,a.isLeftClick)(t)&&e.selection.finish(),h=!1,((0,r.isOutsideInput)(document.activeElement)||!e.selection.isSelected()&&!(0,a.isRightClick)(t))&&e.unlisten()})),this.eventManager.addEventListener(document.documentElement,"contextmenu",(function(t){e.selection.isInProgress()&&(0,a.isRightClick)(t)&&(e.selection.finish(),h=!1)})),this.eventManager.addEventListener(document.documentElement,"touchend",(function(){e.selection.isInProgress()&&e.selection.finish()})),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(!h&&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(u,"selectstart",(function(e){n.settings.fragmentSelection||(0,r.isInput)(e.target)||e.preventDefault()}));var d={debug:function(){return n.settings.debug},externalRowCalculator:this.instance.getPlugin("autoRowSize")&&this.instance.getPlugin("autoRowSize").isEnabled(),table:u,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,o){var r=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,r)),n.instance.runHooks("beforeRenderer",o,e,t,i,a,r),n.instance.getCellRenderer(r)(n.instance,o,e,t,i,a,r),n.instance.runHooks("afterRenderer",o,e,t,i,a,r)},selections:n.instance.selection.highlight,hideBorderOnMouseDownOver:function(){return n.settings.fragmentSelection},onCellMouseDown:function(t,o,r,i){var s={row:!1,column:!1,cell:!1};e.listen(),n.activeWt=i,h=!0,e.runHooks("beforeOnCellMouseDown",t,o,r,s),(0,a.isImmediatePropagationStopped)(t)||((0,l.handleMouseEvent)(t,{coords:o,selection:e.selection,controller:s}),e.runHooks("afterOnCellMouseDown",t,o,r),n.activeWt=n.wt)},onCellContextMenu:function(t,o,r,i){n.activeWt=i,h=!1,e.selection.isInProgress()&&e.selection.finish(),e.runHooks("beforeOnCellContextMenu",t,o,r),(0,a.isImmediatePropagationStopped)(t)||(e.runHooks("afterOnCellContextMenu",t,o,r),n.activeWt=n.wt)},onCellMouseOut:function(t,o,r,i){n.activeWt=i,e.runHooks("beforeOnCellMouseOut",t,o,r),(0,a.isImmediatePropagationStopped)(t)||(e.runHooks("afterOnCellMouseOut",t,o,r),n.activeWt=n.wt)},onCellMouseOver:function(t,o,r,i){var s={row:!1,column:!1,cell:!1};n.activeWt=i,e.runHooks("beforeOnCellMouseOver",t,o,r,s),(0,a.isImmediatePropagationStopped)(t)||(h&&(0,l.handleMouseEvent)(t,{coords:o,selection:e.selection,controller:s}),e.runHooks("afterOnCellMouseOver",t,o,r),n.activeWt=n.wt)},onCellMouseUp:function(t,o,r,i){n.activeWt=i,e.runHooks("beforeOnCellMouseUp",t,o,r),e.runHooks("afterOnCellMouseUp",t,o,r),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,o,r){return e.runHooks("afterDrawSelection",t,n,o,r)},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,o){return e.runHooks("modifyGetCellCoords",t,n,o)},viewportRowCalculatorOverride:function(t){var o=e.countRows(),r=n.settings.viewportRowRenderingOffset;if("auto"===r&&n.settings.fixedRowsTop&&(r=10),"number"==typeof r&&(t.startRow=Math.max(t.startRow-r,0),t.endRow=Math.min(t.endRow+r,o-1)),"auto"===r){var i=t.startRow+t.endRow-t.startRow,a=Math.ceil(i/o*12);t.startRow=Math.max(t.startRow-a,0),t.endRow=Math.min(t.endRow+a,o-1)}e.runHooks("afterViewportRowCalculatorOverride",t)},viewportColumnCalculatorOverride:function(t){var o=e.countCols(),r=n.settings.viewportColumnRenderingOffset;if("auto"===r&&n.settings.fixedColumnsLeft&&(r=10),"number"==typeof r&&(t.startColumn=Math.max(t.startColumn-r,0),t.endColumn=Math.min(t.endColumn+r,o-1)),"auto"===r){var i=t.startColumn+t.endColumn-t.startColumn,a=Math.ceil(i/o*12);t.startRow=Math.max(t.startColumn-a,0),t.endColumn=Math.min(t.endColumn+a,o-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",d),this.wt=new s.default(d),this.activeWt=this.wt,this.eventManager.addEventListener(n.wt.wtTable.spreader,"mousedown",(function(e){e.target===n.wt.wtTable.spreader&&3===e.which&&(0,a.stopPropagation)(e)})),this.eventManager.addEventListener(n.wt.wtTable.spreader,"contextmenu",(function(e){e.target===n.wt.wtTable.spreader&&3===e.which&&(0,a.stopPropagation)(e)})),this.eventManager.addEventListener(document.documentElement,"click",(function(){n.settings.observeDOMVisibility&&n.wt.drawInterrupted&&(n.instance.forceFullRender=!0,n.render())}))}h.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())},h.prototype.isSelectedOnlyCell=function(){var e=this.instance.getSelectedLast()||[],t=o(e,4),n=t[0],r=t[1],i=t[2],a=t[3];return void 0!==n&&n===i&&r===a},h.prototype.isCellEdited=function(){var e=this.instance.getActiveEditor();return e&&e.isOpened()},h.prototype.beforeRender=function(e,t){e&&this.instance.runHooks("beforeRender",this.instance.forceFullRender,t)},h.prototype.onDraw=function(e){e&&this.instance.runHooks("afterRender",this.instance.forceFullRender)},h.prototype.render=function(){this.wt.draw(!this.instance.forceFullRender),this.instance.forceFullRender=!1,this.instance.renderCall=!1},h.prototype.getCellAtCoords=function(e,t){var n=this.wt.getCell(e,t);return n<0?null:n},h.prototype.scrollViewport=function(e,t,n,o,r){return this.wt.scrollViewport(e,t,n,o,r)},h.prototype.scrollViewportHorizontally=function(e,t,n){return this.wt.scrollViewportHorizontally(e,t,n)},h.prototype.scrollViewportVertically=function(e,t,n){return this.wt.scrollViewportVertically(e,t,n)},h.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)},h.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)},h.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"))},h.prototype.maximumVisibleElementWidth=function(e){var t=this.wt.wtViewport.getWorkspaceWidth()-e;return t>0?t:0},h.prototype.maximumVisibleElementHeight=function(e){var t=this.wt.wtViewport.getWorkspaceHeight()-e;return t>0?t:0},h.prototype.mainViewIsActive=function(){return this.wt===this.activeWt},h.prototype.destroy=function(){this.wt.destroy(),this.eventManager.destroy()},t.default=h},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(1),i=n(2),a=n(6),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 o(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,i.arrayEach)(this.data,(function(o){var i=t.colToProp(e),a=void 0;a="string"==typeof i?(0,r.getProperty)(o,i):"function"==typeof i?i(o):o[i],n.push(a)})),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,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Math.min(e.row,t.row),i=Math.min(e.col,t.col),s=Math.max(e.row,t.row),l=Math.max(e.col,t.col),u=[];return(0,a.rangeEach)(r,s,(function(e){var t=n.getAtRow(e),r=void 0;"array"===n.dataType?r=t.slice(i,l+1):"object"===n.dataType&&(r=o?[]:{},(0,a.rangeEach)(i,l,(function(e){var i=n.colToProp(e);o?r.push(t[i]):r[i]=t[i]}))),u.push(r)})),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";var o;t.__esModule=!0;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(7));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(o={languageCode:"en-US"},r.CONTEXTMENU_ITEMS_ROW_ABOVE,"Insert row above"),i(o,r.CONTEXTMENU_ITEMS_ROW_BELOW,"Insert row below"),i(o,r.CONTEXTMENU_ITEMS_INSERT_LEFT,"Insert column left"),i(o,r.CONTEXTMENU_ITEMS_INSERT_RIGHT,"Insert column right"),i(o,r.CONTEXTMENU_ITEMS_REMOVE_ROW,["Remove row","Remove rows"]),i(o,r.CONTEXTMENU_ITEMS_REMOVE_COLUMN,["Remove column","Remove columns"]),i(o,r.CONTEXTMENU_ITEMS_UNDO,"Undo"),i(o,r.CONTEXTMENU_ITEMS_REDO,"Redo"),i(o,r.CONTEXTMENU_ITEMS_READ_ONLY,"Read only"),i(o,r.CONTEXTMENU_ITEMS_CLEAR_COLUMN,"Clear column"),i(o,r.CONTEXTMENU_ITEMS_ALIGNMENT,"Alignment"),i(o,r.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT,"Left"),i(o,r.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER,"Center"),i(o,r.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT,"Right"),i(o,r.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY,"Justify"),i(o,r.CONTEXTMENU_ITEMS_ALIGNMENT_TOP,"Top"),i(o,r.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE,"Middle"),i(o,r.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM,"Bottom"),i(o,r.CONTEXTMENU_ITEMS_FREEZE_COLUMN,"Freeze column"),i(o,r.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN,"Unfreeze column"),i(o,r.CONTEXTMENU_ITEMS_BORDERS,"Borders"),i(o,r.CONTEXTMENU_ITEMS_BORDERS_TOP,"Top"),i(o,r.CONTEXTMENU_ITEMS_BORDERS_RIGHT,"Right"),i(o,r.CONTEXTMENU_ITEMS_BORDERS_BOTTOM,"Bottom"),i(o,r.CONTEXTMENU_ITEMS_BORDERS_LEFT,"Left"),i(o,r.CONTEXTMENU_ITEMS_REMOVE_BORDERS,"Remove border(s)"),i(o,r.CONTEXTMENU_ITEMS_ADD_COMMENT,"Add comment"),i(o,r.CONTEXTMENU_ITEMS_EDIT_COMMENT,"Edit comment"),i(o,r.CONTEXTMENU_ITEMS_REMOVE_COMMENT,"Delete comment"),i(o,r.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT,"Read-only comment"),i(o,r.CONTEXTMENU_ITEMS_MERGE_CELLS,"Merge cells"),i(o,r.CONTEXTMENU_ITEMS_UNMERGE_CELLS,"Unmerge cells"),i(o,r.CONTEXTMENU_ITEMS_COPY,"Copy"),i(o,r.CONTEXTMENU_ITEMS_CUT,"Cut"),i(o,r.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD,"Insert child row"),i(o,r.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD,"Detach from parent"),i(o,r.CONTEXTMENU_ITEMS_HIDE_COLUMN,["Hide column","Hide columns"]),i(o,r.CONTEXTMENU_ITEMS_SHOW_COLUMN,["Show column","Show columns"]),i(o,r.CONTEXTMENU_ITEMS_HIDE_ROW,["Hide row","Hide rows"]),i(o,r.CONTEXTMENU_ITEMS_SHOW_ROW,["Show row","Show rows"]),i(o,r.FILTERS_CONDITIONS_NONE,"None"),i(o,r.FILTERS_CONDITIONS_EMPTY,"Is empty"),i(o,r.FILTERS_CONDITIONS_NOT_EMPTY,"Is not empty"),i(o,r.FILTERS_CONDITIONS_EQUAL,"Is equal to"),i(o,r.FILTERS_CONDITIONS_NOT_EQUAL,"Is not equal to"),i(o,r.FILTERS_CONDITIONS_BEGINS_WITH,"Begins with"),i(o,r.FILTERS_CONDITIONS_ENDS_WITH,"Ends with"),i(o,r.FILTERS_CONDITIONS_CONTAINS,"Contains"),i(o,r.FILTERS_CONDITIONS_NOT_CONTAIN,"Does not contain"),i(o,r.FILTERS_CONDITIONS_GREATER_THAN,"Greater than"),i(o,r.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,"Greater than or equal to"),i(o,r.FILTERS_CONDITIONS_LESS_THAN,"Less than"),i(o,r.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,"Less than or equal to"),i(o,r.FILTERS_CONDITIONS_BETWEEN,"Is between"),i(o,r.FILTERS_CONDITIONS_NOT_BETWEEN,"Is not between"),i(o,r.FILTERS_CONDITIONS_AFTER,"After"),i(o,r.FILTERS_CONDITIONS_BEFORE,"Before"),i(o,r.FILTERS_CONDITIONS_TODAY,"Today"),i(o,r.FILTERS_CONDITIONS_TOMORROW,"Tomorrow"),i(o,r.FILTERS_CONDITIONS_YESTERDAY,"Yesterday"),i(o,r.FILTERS_VALUES_BLANK_CELLS,"Blank cells"),i(o,r.FILTERS_DIVS_FILTER_BY_CONDITION,"Filter by condition"),i(o,r.FILTERS_DIVS_FILTER_BY_VALUE,"Filter by value"),i(o,r.FILTERS_LABELS_CONJUNCTION,"And"),i(o,r.FILTERS_LABELS_DISJUNCTION,"Or"),i(o,r.FILTERS_BUTTONS_SELECT_ALL,"Select all"),i(o,r.FILTERS_BUTTONS_CLEAR,"Clear"),i(o,r.FILTERS_BUTTONS_OK,"OK"),i(o,r.FILTERS_BUTTONS_CANCEL,"Cancel"),i(o,r.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,"Search"),i(o,r.FILTERS_BUTTONS_PLACEHOLDER_VALUE,"Value"),i(o,r.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE,"Second value"),o);t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.getPhraseFormatters=t.registerPhraseFormatter=void 0,t.register=u,t.getAll=c;var o=i(n(38)),r=i(n(272));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,o.default)("phraseFormatters"),s=a.register,l=a.getValues;function u(e,t){s(e,t)}function c(){return l()}t.registerPhraseFormatter=u,t.getPhraseFormatters=c,u("pluralize",r.default)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){return Array.isArray(e)&&Number.isInteger(t)?e[t]:e}},function(e,t,n){"use strict";t.__esModule=!0,t.createHighlight=void 0;var o=c(n(38)),r=c(n(274)),i=c(n(275)),a=c(n(276)),s=c(n(277)),l=c(n(278)),u=c(n(279));function c(e){return e&&e.__esModule?e:{default:e}}var h=(0,o.default)("highlight/types"),d=h.register,f=h.getItem;d("active-header",r.default),d("area",i.default),d("cell",a.default),d("custom-selection",s.default),d("fill",l.default),d("header",u.default),t.createHighlight=function(e,t){return f(e)(t)}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(4);t.default=function(e){var t=e.activeHeaderClassName;return new o.Selection({highlightHeaderClassName:t})}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(4);t.default=function(e){var t=e.layerLevel,n=e.areaCornerVisible;return new o.Selection({className:"area",markIntersections:!0,layerLevel:Math.min(t,7),border:{width:1,color:"#4b89ff",cornerVisible:n}})}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(4);t.default=function(e){var t=e.cellCornerVisible;return new o.Selection({className:"current",border:{width:2,color:"#4b89ff",cornerVisible:t}})}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(4);t.default=function(e){var t=e.border,n=e.cellRange;return new o.Selection(t,n)}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(4);t.default=function(){return new o.Selection({className:"fill",border:{width:1,color:"#ff0000"}})}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(4);t.default=function(e){var t=e.headerClassName,n=e.rowClassName,r=e.columnClassName;return new o.Selection({className:"highlight",highlightHeaderClassName:t,highlightRowClassName:n,highlightColumnClassName:r})}},function(e,t,n){"use strict";t.__esModule=!0;var o,r,i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=(o=["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."],r=["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."],Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(r)}}))),l=n(202),u=C(l),c=C(n(281)),h=n(4),d=n(200),f=n(1),p=n(11),g=n(2),v=C(n(47)),y=C(n(282)),m=n(72),w=n(42);function C(e){return e&&e.__esModule?e:{default:e}}var b=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.settings=t,this.tableProps=n,this.inProgress=!1,this.selectedByCorner=!1,this.selectedByRowHeader=new Set,this.selectedByColumnHeader=new Set,this.selectedRange=new c.default,this.highlight=new u.default({headerClassName:t.currentHeaderClassName,activeHeaderClassName:t.activeHeaderClassName,rowClassName:t.currentRowClassName,columnClassName:t.currentColClassName,disableHighlight:this.settings.disableVisualSelection,cellCornerVisible:function(){return o.isCellCornerVisible.apply(o,arguments)},areaCornerVisible:function(){return o.isAreaCornerVisible.apply(o,arguments)}}),this.transformation=new y.default(this.selectedRange,{countRows:function(){return o.tableProps.countRows()},countCols:function(){return o.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=Array(e),n=0;n<e;n++)t[n]=arguments[n];return o.runLocalHooks.apply(o,["beforeModifyTransformStart"].concat(t))})),this.transformation.addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return o.runLocalHooks.apply(o,["afterModifyTransformStart"].concat(t))})),this.transformation.addLocalHook("beforeTransformEnd",(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return o.runLocalHooks.apply(o,["beforeModifyTransformEnd"].concat(t))})),this.transformation.addLocalHook("afterTransformEnd",(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return o.runLocalHooks.apply(o,["afterModifyTransformEnd"].concat(t))})),this.transformation.addLocalHook("insertRowRequire",(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return o.runLocalHooks.apply(o,["insertRowRequire"].concat(t))})),this.transformation.addLocalHook("insertColRequire",(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return o.runLocalHooks.apply(o,["insertColRequire"].concat(t))}))}return a(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],o="multiple"===this.settings.selectionMode,r=(0,p.isUndefined)(t)?(0,d.isPressedCtrlKey)():t,i=e.row<0,a=e.col<0,s=i&&a;i&&(e.row=0),a&&(e.col=0),this.selectedByCorner=s,this.runLocalHooks("beforeSetRangeStart"+(n?"Only":""),e),(!o||o&&!r&&(0,p.isUndefined)(t))&&this.selectedRange.clear(),this.selectedRange.add(e),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),!s&&a&&this.selectedByRowHeader.add(this.getLayerLevel()),!s&&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 h.CellCoords(e.row,e.col)),this.highlight.getCell().clear(),this.highlight.isEnabledFor(l.CELL_TYPE)&&this.highlight.getCell().add(this.selectedRange.current().highlight);var n=this.getLayerLevel();n<this.highlight.layerLevel&&((0,g.arrayEach)(this.highlight.getAreas(),(function(e){e.clear()})),(0,g.arrayEach)(this.highlight.getHeaders(),(function(e){e.clear()})),(0,g.arrayEach)(this.highlight.getActiveHeaders(),(function(e){e.clear()}))),this.highlight.useLayerLevel(n);var o=this.highlight.createOrGetArea(),r=this.highlight.createOrGetHeader(),i=this.highlight.createOrGetActiveHeader();o.clear(),r.clear(),i.clear(),this.highlight.isEnabledFor(l.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(l.HEADER_TYPE)&&("single"===this.settings.selectionMode?r.add(t.highlight):r.add(t.from).add(t.to)),this.isSelectedByRowHeader()&&this.tableProps.countCols()===t.getWidth()&&i.add(new h.CellCoords(t.from.row,-1)).add(new h.CellCoords(t.to.row,-1)),this.isSelectedByColumnHeader()&&this.tableProps.countRows()===t.getHeight()&&i.add(new h.CellCoords(-1,t.from.col)).add(new h.CellCoords(-1,t.to.col)),this.runLocalHooks("afterSetRangeEnd",e)}}},{key:"isMultiple",value:function(){var e=(0,f.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 h.CellCoords(-1,-1)),this.selectedByRowHeader.add(this.getLayerLevel()),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(new h.CellCoords(this.tableProps.countRows()-1,this.tableProps.countCols()-1))}},{key:"selectCells",value:function(e){var t=this,n=(0,m.detectSelectionType)(e);if(n===m.SELECTION_TYPE_EMPTY)return!1;if(n===m.SELECTION_TYPE_UNRECOGNIZED)throw new Error((0,w.toSingleLine)(s));var o=(0,m.normalizeSelectionFactory)(n,{propToCol:function(e){return t.tableProps.propToCol(e)},keepDirection:!0}),r=this.tableProps.countRows(),a=this.tableProps.countCols(),l=!e.some((function(e){var t=o(e),n=i(t,4),s=n[0],l=n[1],u=n[2],c=n[3];return!((0,m.isValidCoord)(s,r)&&(0,m.isValidCoord)(l,a)&&(0,m.isValidCoord)(u,r)&&(0,m.isValidCoord)(c,a))}));return l&&(this.clear(),(0,g.arrayEach)(e,(function(e){var n=o(e),r=i(n,4),a=r[0],s=r[1],l=r[2],u=r[3];t.setRangeStartOnly(new h.CellCoords(a,s),!1),t.setRangeEnd(new h.CellCoords(l,u)),t.finish()}))),l}},{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,o="string"==typeof t?this.tableProps.propToCol(t):t,r=this.tableProps.countCols(),i=(0,m.isValidCoord)(n,r)&&(0,m.isValidCoord)(o,r);return i&&(this.setRangeStartOnly(new h.CellCoords(-1,n)),this.setRangeEnd(new h.CellCoords(this.tableProps.countRows()-1,o)),this.finish()),i}},{key:"selectRows",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.tableProps.countRows(),o=(0,m.isValidCoord)(e,n)&&(0,m.isValidCoord)(t,n);return o&&(this.setRangeStartOnly(new h.CellCoords(e,-1)),this.setRangeEnd(new h.CellCoords(t,this.tableProps.countCols()-1)),this.finish()),o}}]),e}();(0,f.mixin)(b,v.default),t.default=b},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(4),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 o(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=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.size()+e-1,n=void 0;return t>=0&&(n=this.ranges[t]),n}},{key:Symbol.iterator,value:function(){return this.ranges[Symbol.iterator]()}}]),e}();t.default=i},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(4),a=n(1),s=n(47),l=(o=s)&&o.__esModule?o:{default:o},u=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 r(e,[{key:"transformStart",value:function(e,t,n){var o=new i.CellCoords(e,t);this.runLocalHooks("beforeTransformStart",o);var r=this.options.countRows(),a=this.options.countCols(),s=this.options.fixedRowsBottom(),l=this.options.minSpareRows(),u=this.options.minSpareCols(),c=this.options.autoWrapRow(),h=this.options.autoWrapCol(),d=this.range.current().highlight;d.row+e>r-1?n&&l>0&&!(s&&d.row>=r-s-1)?(this.runLocalHooks("insertRowRequire",r),r=this.options.countRows()):h&&(o.row=1-r,o.col=d.col+o.col===a-1?1-a:1):h&&d.row+o.row<0&&d.col+o.col>=0&&(o.row=r-1,o.col=d.col+o.col===0?a-1:-1),d.col+o.col>a-1?n&&u>0?(this.runLocalHooks("insertColRequire",a),a=this.options.countCols()):c&&(o.row=d.row+o.row===r-1?1-r:1,o.col=1-a):c&&d.col+o.col<0&&d.row+o.row>=0&&(o.row=d.row+o.row===0?r-1:-1,o.col=a-1);var f=new i.CellCoords(d.row+o.row,d.col+o.col),p=0,g=0;return f.row<0?(p=-1,f.row=0):f.row>0&&f.row>=r&&(p=1,f.row=r-1),f.col<0?(g=-1,f.col=0):f.col>0&&f.col>=a&&(g=1,f.col=a-1),this.runLocalHooks("afterTransformStart",f,p,g),f}},{key:"transformEnd",value:function(e,t){var n=new i.CellCoords(e,t);this.runLocalHooks("beforeTransformEnd",n);var o=this.options.countRows(),r=this.options.countCols(),a=this.range.current(),s=new i.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>=r&&(u=1,s.col=r-1),this.runLocalHooks("afterTransformEnd",s,l,u),s}}]),e}();(0,a.mixin)(u,l.default),t.default=u},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){var t="undefined"!=typeof window&&window.jQuery;t&&(t.fn.handsontable=function(t){var n=this.first(),o=n.data("handsontable");if("string"!=typeof t){var r=t||{};return o?o.updateSettings(r):(o=new e.Core(n[0],r),n.data("handsontable",o),o.init()),n}var i=void 0;if(o){if(void 0===o[t])throw new Error("Handsontable do not provide action: "+t);for(var a,s=arguments.length,l=Array(s>1?s-1:0),u=1;u<s;u++)l[u-1]=arguments[u];i=(a=o[t]).call.apply(a,[o].concat(l)),"destroy"===t&&n.removeData()}return i})}},function(e,t,n){"use strict";t.__esModule=!0,t.Base=t.UndoRedo=t.TouchScroll=t.Search=t.PersistentState=t.ObserveChanges=t.MultipleSelectionHandles=t.MergeCells=t.ManualRowResize=t.ManualRowMove=t.ManualColumnResize=t.ManualColumnMove=t.ManualColumnFreeze=t.DragToScroll=t.CustomBorders=t.CopyPaste=t.ContextMenu=t.Comments=t.ColumnSorting=t.AutoRowSize=t.AutoFill=t.AutoColumnSize=void 0;var o=T(n(285)),r=T(n(287)),i=T(n(288)),a=T(n(290)),s=T(n(291)),l=T(n(298)),u=T(n(302)),c=T(n(319)),h=T(n(326)),d=T(n(333)),f=T(n(334)),p=T(n(338)),g=T(n(343)),v=T(n(344)),y=T(n(349)),m=T(n(350)),w=T(n(356)),C=T(n(357)),b=T(n(361)),E=T(n(362)),S=T(n(363)),O=T(n(10));function T(e){return e&&e.__esModule?e:{default:e}}t.AutoColumnSize=r.default,t.AutoFill=i.default,t.AutoRowSize=a.default,t.ColumnSorting=s.default,t.Comments=l.default,t.ContextMenu=u.default,t.CopyPaste=c.default,t.CustomBorders=h.default,t.DragToScroll=d.default,t.ManualColumnFreeze=f.default,t.ManualColumnMove=p.default,t.ManualColumnResize=g.default,t.ManualRowMove=v.default,t.ManualRowResize=y.default,t.MergeCells=m.default,t.MultipleSelectionHandles=w.default,t.ObserveChanges=C.default,t.PersistentState=o.default,t.Search=b.default,t.TouchScroll=E.default,t.UndoRedo=S.default,t.Base=O.default},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=u(n(10)),a=n(8),s=u(n(286)),l=u(n(16));function u(e){return e&&e.__esModule?e:{default:e}}l.default.getSingleton().register("persistentStateSave"),l.default.getSingleton().register("persistentStateLoad"),l.default.getSingleton().register("persistentStateReset");var c=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.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, 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),o(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().persistentState}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.storage||(this.storage=new s.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()})),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.storage=void 0,r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),r(t.prototype.__proto__||Object.getPrototypeOf(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(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(i.default);(0,a.registerPlugin)("persistentState",c),t.default=c},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(2),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 o(e,[{key:"saveValue",value:function(e,t){window.localStorage.setItem(this.prefix+"_"+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,o=window.localStorage.getItem(this.prefix+"_"+n);return null===o?void 0:JSON.parse(o)}},{key:"reset",value:function(e){window.localStorage.removeItem(this.prefix+"_"+e)}},{key:"resetAll",value:function(){var e=this;(0,r.arrayEach)(this.savedKeys,(function(t,n){window.localStorage.removeItem(e.prefix+"_"+e.savedKeys[n])})),this.clearSavedKeys()}},{key:"loadSavedKeys",value:function(){var e=window.localStorage.getItem(this.prefix+"__persistentStateKeys"),t="string"==typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}},{key:"saveSavedKeys",value:function(){window.localStorage.setItem(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;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=y(n(10)),s=n(2),l=n(40),u=n(0),c=y(n(93)),h=n(1),d=n(6),f=n(8),p=y(n(203)),g=n(33),v=n(4);function y(e){return e&&e.__esModule?e:{default:e}}var m=new WeakMap,w=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return m.set(n,{cachedColumnHeaders:[]}),n.widths=[],n.ghostTable=new c.default(n.hot),n.samplesGenerator=new p.default((function(e,t){var o=n.hot.getCellMeta(e,t),r="";o.spanned||(r=n.hot.getDataAtCell(e,t));var i=0;if(o.label){var a=o.label,s=a.value,l=a.property,u="";s?u="function"==typeof s?s(e,t,n.hot.colToProp(t),r):s:l&&(u=n.hot.getDataAtRowProp(e,l)),i=u.length}return{value:r,bundleCountSeed:i}})),n.firstCalculation=!0,n.inProgress=!1,n.addHook("beforeColumnResize",(function(e,t,o){return n.onBeforeColumnResize(e,t,o)})),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),i(t,null,[{key:"CALCULATION_STEP",get:function(){return 50}},{key:"SYNC_CALCULATION_LIMIT",get:function(){return 50}}]),i(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()})),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){var e=this.findColumnsWhereHeaderWasChanged();e.length&&this.clearCache(e),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"calculateColumnsWidth",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=this,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 e?{from:e,to:e}:e,a="number"==typeof n?{from:n,to:n}:n;(0,d.rangeEach)(i.from,i.to,(function(e){if(r||void 0===t.widths[e]&&!t.hot._getColWidthFromSettings(e)){var n=t.samplesGenerator.generateColumnSamples(e,a);(0,s.arrayEach)(n,(function(e){var n=o(e,2),r=n[0],i=n[1];return t.ghostTable.addColumn(r,i)}))}})),this.ghostTable.columns.length&&(this.ghostTable.getWidths((function(e,n){t.widths[e]=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},o=0,r=this.hot.countCols()-1,i=null;this.inProgress=!0,this.firstCalculation&&this.getSyncCalculationLimit()&&(this.calculateColumnsWidth({from:0,to:this.getSyncCalculationLimit()},n),this.firstCalculation=!1,o=this.getSyncCalculationLimit()+1),o<r?function a(){if(!e.hot)return(0,l.cancelAnimationFrame)(i),void(e.inProgress=!1);e.calculateColumnsWidth({from:o,to:Math.min(o+t.CALCULATION_STEP,r)},n),(o=o+t.CALCULATION_STEP+1)<r?i=(0,l.requestAnimationFrame)(a):((0,l.cancelAnimationFrame)(i),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,h.hasOwnProperty)(e,"samplingRatio")?this.hot.getSettings().autoColumnSize.samplingRatio:void 0,n=e&&(0,h.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,u.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,h.isObject)(this.hot.getSettings().autoColumnSize)&&(e=this.hot.getSettings().autoColumnSize.syncLimit,(0,g.isPercentValue)(e)?e=(0,d.valueAccordingPercent)(n,e):e>>=0),Math.min(e,n)}},{key:"getColumnWidth",value:function(e){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return void 0===n&&(n=this.widths[e],t&&"number"==typeof n&&(n=Math.max(n,v.ViewportColumnsCalculator.DEFAULT_WIDTH))),n}},{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=m.get(this).cachedColumnHeaders;return(0,s.arrayReduce)(e,(function(e,n,o){var r=t.length;return(r-1<o||t[o]!==n)&&e.push(o),r-1<o?t.push(n):t[o]=n,e}),[])}},{key:"clearCache",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.length?(0,s.arrayEach)(t,(function(t){e.widths[t]=void 0})):this.widths.length=0}},{key:"isNeedRecalculate",value:function(){return!!(0,s.arrayFilter)(this.widths,(function(e){return void 0===e})).length}},{key:"onBeforeRender",value:function(){var e=this.hot.renderCall;this.hot.countRows()&&(this.calculateColumnsWidth({from:this.getFirstVisibleColumn(),to:this.getLastVisibleColumn()},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,s.arrayMap)(e,(function(e){var n=o(e,2)[1];return t.hot.propToCol(n)}));this.clearCache(n)}},{key:"onBeforeColumnResize",value:function(e,t,n){var o=t;return n&&(this.calculateColumnsWidth(e,void 0,!0),o=this.getColumnWidth(e,void 0,!1)),o}},{key:"onAfterInit",value:function(){m.get(this).cachedColumnHeaders=this.hot.getColHeader()}},{key:"destroy",value:function(){this.ghostTable.clean(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(a.default);(0,f.registerPlugin)("autoColumnSize",w),t.default=w},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=d(n(10)),a=d(n(16)),s=n(0),l=d(n(5)),u=n(8),c=n(4),h=n(289);function d(e){return e&&e.__esModule?e:{default:e}}a.default.getSingleton().register("modifyAutofillRange"),a.default.getSingleton().register("beforeAutofill");var f=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.eventManager=new l.default(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, 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),o(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)})),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.clearMappedSettings(),r(t.prototype.__proto__||Object.getPrototypeOf(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,h.getDragDirectionAndRange)(t,e),o=n.directionOfDrag,r=n.startOfDragCoords,i=n.endOfDragCoords;if(r&&r.row>-1&&r.col>-1){var a=this.getSelectionData();this.hot.runHooks("beforeAutofill",r,i,a);var s=(0,h.getDeltas)(r,i,a,o),l=a;if(["up","left"].indexOf(o)>-1){l=[];var u=null,c=null;if("up"===o){c=(u=i.row-r.row+1)%a.length;for(var d=0;d<u;d++)l.push(a[(d+(a.length-c))%a.length])}else{c=(u=i.col-r.col+1)%a[0].length;for(var f=0;f<a.length;f++){l.push([]);for(var p=0;p<u;p++)l[f].push(a[f][(p+(a[f].length-c))%a[f].length])}}}this.hot.populateFromArray(r.row,r.col,l,i.row,i.col,this.pluginName+".fill",null,o,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=this.hot.getSelectedRangeLast().getTopLeftCorner(),n=this.hot.getSelectedRangeLast().getBottomRightCorner(),o=void 0;if(this.directions.includes(h.DIRECTIONS.vertical)&&(n.row<e.row||t.row>e.row))o=new c.CellCoords(e.row,n.col);else{if(!this.directions.includes(h.DIRECTIONS.horizontal))return;o=new c.CellCoords(n.row,e.col)}return this.reduceSelectionAreaIfNeeded(o)}},{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,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=this.hot.getData(),n=this.hot.countRows(),o=void 0,r=e[2]+1;r<n;r++){for(var i=e[1];i<=e[3];i++)if(t[r][i])return-1;var a=t[r][e[1]-1],s=t[r][e[3]+1];(a||s)&&(o=r)}return o}},{key:"addSelectionFromStartAreaToSpecificRowIndex",value:function(e,t){this.hot.selection.highlight.getFill().clear().add(new c.CellCoords(e[0],e[1])).add(new c.CellCoords(t,e[3]))}},{key:"setSelection",value:function(e){var t;(t=this.hot).selectCell.apply(t,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)}(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,s.offset)(this.hot.table).top-(window.pageYOffset||document.documentElement.scrollTop)+(0,s.outerHeight)(this.hot.table),n=(0,s.offset)(this.hot.table).left-(window.pageXOffset||document.documentElement.scrollLeft)+(0,s.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,h.getMappedFillHandleSetting)(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}},{key:"destroy",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(i.default);(0,u.registerPlugin)("autofill",f),t.default=f},function(e,t,n){"use strict";t.__esModule=!0,t.DIRECTIONS=void 0,t.getDeltas=function(e,t,n,o){var r=n.length,i=n?n[0].length:0,a=[],s=t.row-e.row,l=t.col-e.col;if(-1!==["down","up"].indexOf(o)){for(var u=[],c=0;c<=l;c++){var h=parseInt(n[0][c],10),d=parseInt(n[r-1][c],10),f=("down"===o?d-h:h-d)/(r-1)||0;u.push(f)}a.push(u)}if(-1!==["right","left"].indexOf(o))for(var p=0;p<=s;p++){var g=parseInt(n[p][0],10),v=parseInt(n[p][i-1],10),y=("right"===o?v-g:g-v)/(i-1)||0;a.push([y])}return a},t.getDragDirectionAndRange=function(e,t){var n=void 0,o=void 0,r=void 0;return t[0]===e[0]&&t[1]<e[1]?(r="left",n=new i.CellCoords(t[0],t[1]),o=new i.CellCoords(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(r="right",n=new i.CellCoords(t[0],e[3]+1),o=new i.CellCoords(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(r="up",n=new i.CellCoords(t[0],t[1]),o=new i.CellCoords(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(r="down",n=new i.CellCoords(e[2]+1,t[1]),o=new i.CellCoords(t[2],t[3])),{directionOfDrag:r,startOfDragCoords:n,endOfDragCoords:o}},t.getMappedFillHandleSetting=function(e){var t={};return!0===e?(t.directions=Object.keys(a),t.autoInsertRow=!0):(0,o.isObject)(e)?((0,r.isDefined)(e.autoInsertRow)?e.direction===a.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,(0,r.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),t};var o=n(1),r=n(11),i=n(4),a=t.DIRECTIONS={horizontal:"horizontal",vertical:"vertical"}},function(e,t,n){"use strict";t.__esModule=!0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=v(n(10)),s=n(2),l=n(40),u=n(0),c=v(n(93)),h=n(1),d=n(6),f=n(8),p=v(n(203)),g=n(33);function v(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.heights=[],n.ghostTable=new c.default(n.hot),n.samplesGenerator=new p.default((function(e,t){var o=void 0;return e>=0?o=n.hot.getDataAtCell(e,t):-1===e&&(o=n.hot.getColHeader(t)),{value:o}})),n.firstCalculation=!0,n.inProgress=!1,n.addHook("beforeRowResize",(function(e,t,o){return n.onBeforeRowResize(e,t,o)})),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),i(t,null,[{key:"CALCULATION_STEP",get:function(){return 50}},{key:"SYNC_CALCULATION_LIMIT",get:function(){return 500}}]),i(t,[{key:"isEnabled",value:function(){return!0===this.hot.getSettings().autoRowSize||(0,h.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()})),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"calculateRowsHeight",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=this,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 e?{from:e,to:e}:e,a="number"==typeof n?{from:n,to:n}:n;if(null!==this.hot.getColHeader(0)){var l=this.samplesGenerator.generateRowSamples(-1,a);this.ghostTable.addColumnHeadersRow(l.get(-1))}(0,d.rangeEach)(i.from,i.to,(function(e){if(r||void 0===t.heights[e]){var n=t.samplesGenerator.generateRowSamples(e,a);(0,s.arrayEach)(n,(function(e){var n=o(e,2),r=n[0],i=n[1];return t.ghostTable.addRow(r,i)}))}})),this.ghostTable.rows.length&&(this.ghostTable.getHeights((function(e,n){t.heights[e]=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},o=0,r=this.hot.countRows()-1,i=null;this.inProgress=!0,this.firstCalculation&&this.getSyncCalculationLimit()&&(this.calculateRowsHeight({from:0,to:this.getSyncCalculationLimit()},n),this.firstCalculation=!1,o=this.getSyncCalculationLimit()+1),o<r?function a(){if(!e.hot)return(0,l.cancelAnimationFrame)(i),void(e.inProgress=!1);e.calculateRowsHeight({from:o,to:Math.min(o+t.CALCULATION_STEP,r)},n),(o=o+t.CALCULATION_STEP+1)<r?i=(0,l.requestAnimationFrame)(a):((0,l.cancelAnimationFrame)(i),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,h.hasOwnProperty)(e,"samplingRatio")?this.hot.getSettings().autoRowSize.samplingRatio:void 0,n=e&&(0,h.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,u.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,h.isObject)(this.hot.getSettings().autoRowSize)&&(e=this.hot.getSettings().autoRowSize.syncLimit,(0,g.isPercentValue)(e)?e=(0,d.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,o=n.from,r=n.to;(0,d.rangeEach)(Math.min(o,r),Math.max(o,r),(function(e){t.heights[e]=void 0}))}},{key:"isNeedRecalculate",value:function(){return!!(0,s.arrayFilter)(this.heights,(function(e){return void 0===e})).length}},{key:"onBeforeRender",value:function(){var e=this.hot.renderCall,t=this.hot.getSettings().fixedRowsBottom;if(this.calculateRowsHeight({from:this.getFirstVisibleRow(),to:this.getLastVisibleRow()},void 0,e),t){var n=this.hot.countRows()-1;this.calculateRowsHeight({from:n-t,to:n})}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 o=t;return n&&(this.calculateRowsHeight(e,void 0,!0),o=this.getRowHeight(e)),o}},{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(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(a.default);(0,f.registerPlugin)("autoRowSize",y),t.default=y},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=n(0),a=n(1),s=n(11),l=n(73),u=p(n(10)),c=n(8),h=p(n(295)),d=p(n(16)),f=p(n(297));function p(e){return e&&e.__esModule?e:{default:e}}d.default.getSingleton().register("beforeColumnSort"),d.default.getSingleton().register("afterColumnSort");var g="columnSorting",v="ascending",y="descending",m="asc",w="desc",C="none",b=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.sortIndicators=[],n.sortColumn=void 0,n.sortOrder=C,n.sortEmptyCells=!1,n.rowsMapper=new f.default(n),n.blockPluginTranslation=!0,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),o(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().columnSorting}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.setPluginOptions(),(0,s.isUndefined)(this.hot.getSettings().observeChanges)&&this.enableObserveChangesPlugin(),this.addHook("afterTrimRow",(function(){return e.sortByPresetColumnAndOrder()})),this.addHook("afterUntrimRow",(function(){return e.sortByPresetColumnAndOrder()})),this.addHook("modifyRow",(function(t,n){return e.onModifyRow(t,n)})),this.addHook("unmodifyRow",(function(t,n){return e.onUnmodifyRow(t,n)})),this.addHook("afterUpdateSettings",(function(){return e.onAfterUpdateSettings()})),this.addHook("afterGetColHeader",(function(t,n){return e.onAfterGetColHeader(t,n)})),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.sortBySettings()})),this.addHook("afterLoadData",(function(){e.rowsMapper.clearMap(),e.hot.view&&e.sortBySettings()})),this.hot.view&&this.sortBySettings(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"sort",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getNextOrderState(e);(0,s.isUndefined)(e)||!1!==this.hot.runHooks("beforeColumnSort",e,t)&&(this.sortColumn=this.hot.toPhysicalColumn(e),this.sortOrder=t,this.sortByPresetColumnAndOrder(),this.updateSortIndicator(),this.hot.runHooks("afterColumnSort",e,t),this.hot.render(),this.hot.view.wt.draw(!0),this.saveSortingState())}},{key:"getNextOrderState",value:function(e){var t=this.hot.toPhysicalColumn(e);if(this.sortColumn===t){if(this.sortOrder===w)return C;if(this.sortOrder===m)return w}return m}},{key:"isSorted",value:function(){return this.isEnabled()&&this.sortOrder!==C}},{key:"saveSortingState",value:function(){var e={};(0,s.isDefined)(this.sortColumn)&&(e.sortColumn=this.sortColumn),(0,s.isDefined)(this.sortOrder)&&(e.sortOrder=this.sortOrder),((0,a.hasOwnProperty)(e,"sortColumn")||(0,a.hasOwnProperty)(e,"sortOrder"))&&this.hot.runHooks("persistentStateSave","columnSorting",e)}},{key:"loadSortingState",value:function(){var e={};return this.hot.runHooks("persistentStateLoad","columnSorting",e),e.value}},{key:"enableObserveChangesPlugin",value:function(){var e=this;this.hot._registerTimeout(setTimeout((function(){e.hot.updateSettings({observeChanges:!0})}),0))}},{key:"sortByPresetColumnAndOrder",value:function(){if(this.sortOrder!==C){var e=[],t=this.hot.toVisualColumn(this.sortColumn),n=this.hot.getCellMeta(0,t),o=(0,l.getSortFunctionForColumn)(n),r=this.hot.countRows(),i=this.hot.getSettings(),a=void 0;a=i.maxRows<=r?i.maxRows:r-i.minSpareRows,(0,s.isUndefined)(n.columnSorting.sortEmptyCells)&&(n.columnSorting={sortEmptyCells:this.sortEmptyCells}),this.blockPluginTranslation=!0;for(var u=0;u<a;u+=1)e.push([u,this.hot.getDataAtCell(u,t)]);(0,h.default)(e,o(this.sortOrder,n));for(var c=e.length;c<r;c+=1)e.push([c,this.hot.getDataAtCell(c,t)]);this.blockPluginTranslation=!1,this.rowsMapper._arrayMap=e.map((function(e){return e[0]}))}else this.rowsMapper.clearMap()}},{key:"updateSortIndicator",value:function(){if(this.sortOrder!==C){var e=this.hot.toVisualColumn(this.sortColumn),t=this.hot.getCellMeta(0,e);this.sortIndicators[this.sortColumn]=t.sortIndicator}}},{key:"setPluginOptions",value:function(){var e=this.hot.getSettings().columnSorting;(0,a.isObject)(e)?this.sortEmptyCells=e.sortEmptyCells||!1:this.sortEmptyCells=!1}},{key:"onModifyRow",value:function(e,t){var n=e;if(!1===this.blockPluginTranslation&&t!==this.pluginName){var o=this.rowsMapper.getValueByIndex(n);n=null===o?n:o}return n}},{key:"onUnmodifyRow",value:function(e,t){var n=e;return!1===this.blockPluginTranslation&&t!==this.pluginName&&(n=this.rowsMapper.getIndexByValue(n)),n}},{key:"onAfterGetColHeader",value:function(e,t){if(e<0||!t.parentNode)return!1;var n=t.querySelector(".colHeader"),o=t.parentNode.parentNode.childNodes,r=[],a=[y,v],s=this.hot.toPhysicalColumn(e),l=Array.prototype.indexOf.call(o,t.parentNode);if(l-=o.length,n){this.hot.getSettings().columnSorting&&e>=0&&-1===l&&r.push(g),this.sortIndicators[s]&&s===this.sortColumn&&(this.sortOrder===m?r.push(v):this.sortOrder===w&&r.push(y));var u=a.filter((function(e){return!1===r.includes(e)}));(0,i.removeClass)(n,u),(0,i.addClass)(n,r)}}},{key:"onAfterUpdateSettings",value:function(){this.sortBySettings()}},{key:"sortBySettings",value:function(){var e=this.hot.getSettings().columnSorting,t=this.loadSortingState(),n=void 0,o=void 0;(0,s.isUndefined)(t)?(n=e.column,o=e.sortOrder):(n=t.sortColumn,o=t.sortOrder),"number"==typeof n&&this.sort(n,o)}},{key:"onAfterCreateRow",value:function(e,t){this.rowsMapper.shiftItems(e,t)}},{key:"onAfterRemoveRow",value:function(e,t){this.rowsMapper.unshiftItems(e,t)}},{key:"onAfterOnCellMouseDown",value:function(e,t){t.row>=0||(0,i.hasClass)(e.realTarget,g)&&this.sort(t.col)}},{key:"destroy",value:function(){this.rowsMapper.destroy(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(u.default);(0,c.registerPlugin)("columnSorting",b),t.default=b},function(e,t,n){"use strict";t.__esModule=!0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e,t){return function(n,r){var i=o(n,2)[1],u=o(r,2)[1],c=t.columnSorting.sortEmptyCells;if(i===u)return l.DO_NOT_SWAP;if((0,s.isEmpty)(i))return(0,s.isEmpty)(u)?l.DO_NOT_SWAP:c&&"asc"===e?l.FIRST_BEFORE_SECOND:l.FIRST_AFTER_SECOND;if((0,s.isEmpty)(u))return c&&"asc"===e?l.FIRST_AFTER_SECOND:l.FIRST_BEFORE_SECOND;var h=t.dateFormat,d=(0,a.default)(i,h),f=(0,a.default)(u,h);return d.isValid()?f.isValid()?f.isAfter(d)?"asc"===e?l.FIRST_BEFORE_SECOND:l.FIRST_AFTER_SECOND:f.isBefore(d)?"asc"===e?l.FIRST_AFTER_SECOND:l.FIRST_BEFORE_SECOND:l.DO_NOT_SWAP:l.FIRST_BEFORE_SECOND:l.FIRST_AFTER_SECOND}};var r,i=n(57),a=(r=i)&&r.__esModule?r:{default:r},s=n(11),l=n(73)},function(e,t,n){"use strict";t.__esModule=!0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e,t){return function(n,a){var s=o(n,2)[1],l=o(a,2)[1],u=t.columnSorting.sortEmptyCells,c=s,h=l;return"string"==typeof c&&(c=c.toLowerCase()),"string"==typeof h&&(h=h.toLowerCase()),c===h?i.DO_NOT_SWAP:(0,r.isEmpty)(c)?(0,r.isEmpty)(h)?i.DO_NOT_SWAP:u&&"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:(0,r.isEmpty)(h)?u&&"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:isNaN(c)&&!isNaN(h)?"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:!isNaN(c)&&isNaN(h)?"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:(isNaN(c)||isNaN(h)||(c=parseFloat(c),h=parseFloat(h)),c<h?"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:c>h?"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:i.DO_NOT_SWAP)}};var r=n(11),i=n(73)},function(e,t,n){"use strict";t.__esModule=!0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e,t){return function(n,a){var s=o(n,2)[1],l=o(a,2)[1],u=t.columnSorting.sortEmptyCells,c=parseFloat(s),h=parseFloat(l);if(c===h||isNaN(c)&&isNaN(h))return i.DO_NOT_SWAP;if(u){if((0,r.isEmpty)(s))return"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND;if((0,r.isEmpty)(l))return"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND}return isNaN(c)?i.FIRST_AFTER_SECOND:isNaN(h)?i.FIRST_BEFORE_SECOND:c<h?"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:c>h?"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:i.DO_NOT_SWAP}};var r=n(11),i=n(73)},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]:a,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(Math.abs(r-o)<=1)return[];var s=Math.ceil((o+r)/2);return e(t,n,o,s),e(t,n,s,r),function(e,t,n,o,r){for(var a=new i.default,s=new i.default,l=o-n,u=r-o,c=Math.max(l,u),h=r-n,d=0;d<c;d+=1)d<l&&a.push(e[n+d]),d<u&&s.push(e[o+d]);for(var f=0;f<h;)a.first&&s.first?t(a.first.data,s.first.data)>0?e[n+f]=s.shift().data:e[n+f]=a.shift().data:a.first?e[n+f]=a.shift().data:e[n+f]=s.shift().data,f+=1;return e}(t,n,o,s,r)};var o,r=n(296),i=(o=r)&&o.__esModule?o:{default:o},a=function(e,t){var n=e.toString(),o=t.toString();return n===o?0:n<o?-1:1}},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function e(t){r(this,e),this.data=t,this.next=null,this.prev=null},a=function(){function e(){r(this,e),this.first=null,this.last=null}return o(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=this.first,n=void 0,o=void 0;t;){if(t.data===e)return n=t.next,o=t.prev,n&&(n.prev=o),o&&(o.next=n),t===this.first&&(this.first=n),t===this.last&&(this.last=o),!0;t=t.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=this.first.next,t=this.first,n=void 0;e;)n=e.next,e.next=t,t.prev=e,t=e,e=n;this.first.next=null,this.last.prev=null,n=this.first,this.first=t,this.last=n}}}]),e}();t.NodeStructure=i,t.default=a},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(94),a=(o=i)&&o.__esModule?o:{default:o},s=n(1),l=n(6),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.columnSorting=t}return r(e,[{key:"createMap",value:function(e){var t=this,n=void 0===e?this._arrayMap.length:e;this._arrayMap.length=0,(0,l.rangeEach)(n-1,(function(e){t._arrayMap[e]=e}))}},{key:"destroy",value:function(){this._arrayMap=null}}]),e}();(0,s.mixin)(u,a.default),t.default=u},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=n(0),a=n(1),s=g(n(5)),l=n(4),u=n(8),c=g(n(10)),h=g(n(299)),d=n(19),f=g(n(300)),p=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(7));function g(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(301);var y=new WeakMap,m="comment",w="value",C="style",b="readOnly",E=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.editor=null,n.displaySwitch=null,n.eventManager=null,n.range={},n.mouseDown=!1,n.contextMenuEvent=!1,n.timer=null,y.set(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, 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),o(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().comments}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.editor||(this.editor=new h.default),this.eventManager||(this.eventManager=new s.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,o,r,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(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this),this.displaySwitch.updateDelay(this.getDisplayDelaySetting())}},{key:"disablePlugin",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(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,i.closest)(e.target,"TD","TBODY");return!!(t&&(0,i.hasClass)(t,"htCommentCell")&&(0,i.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?n=e:null!=t&&(n=t);var o=this.range.from.row,r=this.range.from.col;this.updateCommentMeta(o,r,v({},w,n)),this.hot.render()}},{key:"setCommentAtCell",value:function(e,t,n){this.setRange({from:new l.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,m,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 l.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,w)}},{key:"getCommentAtCell",value:function(e,t){return this.getCommentMeta(e,t,w)}},{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[m]?e[m][w]:""),this.editor.hidden&&this.editor.show(),!0}},{key:"showAtCell",value:function(e,t){return this.setRange({from:new l.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,i.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,r=(0,i.offset)(t),a=this.hot.view.wt.wtTable.getStretchedColumnWidth(o),s=r.top<0?0:r.top,l=r.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,h=this.getCommentMeta(n,o,C),d=this.getCommentMeta(n,o,b);h?this.editor.setSize(h.width,h.height):this.editor.resetSize(),this.editor.setReadOnlyState(d),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,w)&&(t=!0),t}},{key:"updateCommentMeta",value:function(e,t,n){var o=this.hot.getCellMeta(e,t)[m],r=void 0;o?(r=(0,a.deepClone)(o),(0,a.deepExtend)(r,n)):r=n,this.hot.setCellMeta(e,t,m,r)}},{key:"getCommentMeta",value:function(e,t,n){var o=this.hot.getCellMeta(e,t);if(o[m])return o[m][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,i.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=y.get(this);if(t.cellBelowCursor=document.elementFromPoint(e.clientX,e.clientY),!(this.mouseDown||this.editor.isFocused()||(0,i.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 l.CellCoords(n.row,n.col)};this.displaySwitch.show(o)}else(0,i.isChildOf)(e.target,document)&&!this.targetIsCommentTextArea(e)&&this.displaySwitch.hide()}},{key:"onMouseUp",value:function(){this.mouseDown=!1}},{key:"onAfterRenderer",value:function(e,t){t[m]&&t[m][w]&&(0,i.addClass)(e,t.commentedCellClassName)}},{key:"onEditorBlur",value:function(){this.setComment()}},{key:"onEditorMouseDown",value:function(e){y.get(this).tempEditorDimensions={width:(0,i.outerWidth)(e.target),height:(0,i.outerHeight)(e.target)}}},{key:"onEditorMouseUp",value:function(e){var t=y.get(this),n=(0,i.outerWidth)(e.target),o=(0,i.outerHeight)(e.target);n===t.tempEditorDimensions.width+1&&o===t.tempEditorDimensions.height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,v({},C,{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 o=t.row;o<=n.row;o++)for(var r=t.col;r<=n.col;r++)this.removeCommentAtCell(o,r,!1);this.hot.render()}},{key:"onContextMenuMakeReadOnly",value:function(){var e=this.hot.getSelectedRangeLast(),t=e.from,n=e.to;this.contextMenuEvent=!0;for(var o=t.row;o<=n.row;o++)for(var r=t.col;r<=n.col;r++){var i=!!this.getCommentMeta(o,r,b);this.updateCommentMeta(o,r,v({},b,!i))}}},{key:"addToContextMenu",value:function(e){var t=this;e.items.push({name:"---------"},{key:"commentsAddEdit",name:function(){return t.checkSelectionCommentsConsistency()?t.hot.getTranslatedPhrase(p.CONTEXTMENU_ITEMS_EDIT_COMMENT):t.hot.getTranslatedPhrase(p.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback:function(){return t.onContextMenuAddComment()},disabled:function(){return!(this.getSelectedLast()&&!this.selection.isSelectedByCorner())}},{key:"commentsRemove",name:function(){return this.getTranslatedPhrase(p.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(p.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return(0,d.checkSelectionConsistency)(this.getSelectedRangeLast(),(function(t,n){var o=e.getCellMeta(t,n)[m];if(o&&(o=o[b]),o)return!0}))&&(t=(0,d.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,a.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(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(c.default);(0,u.registerPlugin)("comments",E),t.default=E},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=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 o(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"}}]),o(e,[{key:"setPosition",value:function(e,t){this.editorStyle.left=e+"px",this.editorStyle.top=t+"px"}},{key:"setSize",value:function(e,t){if(e&&t){var n=this.getInputElement();n.style.width=e+"px",n.style.height=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("."+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("."+e.CLASS_INPUT)}},{key:"destroy",value:function(){this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null}}]),e}();t.default=i},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(43),a=n(1),s=n(47),l=(o=s)&&o.__esModule?o:{default:o},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.wasLastActionShow=!0,this.showDebounced=null,this.hidingTimer=null,this.updateDelay(t)}return r(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,i.debounce)((function(t){e.wasLastActionShow&&e.runLocalHooks("show",t.from.row,t.from.col)}),t)}},{key:"destroy",value:function(){this.clearLocalHooks()}}]),e}();(0,a.mixin)(u,l.default),t.default=u},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0;var o=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=v(n(10)),a=v(n(16)),s=n(2),l=v(n(303)),u=v(n(5)),c=v(n(304)),h=v(n(316)),d=n(8),f=n(13),p=n(0),g=n(96);function v(e){return e&&e.__esModule?e:{default:e}}n(318),a.default.getSingleton().register("afterContextMenuDefaultOptions"),a.default.getSingleton().register("beforeContextMenuShow"),a.default.getSingleton().register("afterContextMenuShow"),a.default.getSingleton().register("afterContextMenuHide"),a.default.getSingleton().register("afterContextMenuExecute");var y=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.eventManager=new u.default(n),n.commandExecutor=new l.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, 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),r(t,null,[{key:"DEFAULT_ITEMS",get:function(){return[g.ROW_ABOVE,g.ROW_BELOW,g.SEPARATOR,g.COLUMN_LEFT,g.COLUMN_RIGHT,g.SEPARATOR,g.REMOVE_ROW,g.REMOVE_COLUMN,g.SEPARATOR,g.UNDO,g.REDO,g.SEPARATOR,g.READ_ONLY,g.SEPARATOR,g.ALIGNMENT]}}]),r(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().contextMenu}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){this.itemsFactory=new c.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),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this);var i=function(){if(e.hot){e.hot.runHooks("afterContextMenuDefaultOptions",r),e.itemsFactory.setPredefinedItems(r.items);var t=e.itemsFactory.getItems(n);e.menu=new h.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,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.executeCommand).call.apply(t,[e].concat(o))})),e.addHook("afterOnCellContextMenu",(function(t){return e.onAfterOnCellContextMenu(t)})),(0,s.arrayEach)(t,(function(t){return e.commandExecutor.registerCommand(t.key,t)}))}};this.callOnPluginsReady((function(){e.isPluginsReady?setTimeout(i,0):i()}))}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),o(t.prototype.__proto__||Object.getPrototypeOf(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,p.getWindowScrollTop)(),left:parseInt((0,f.pageX)(e),10)-(0,p.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,o=Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];(t=this.commandExecutor).execute.apply(t,[e].concat(o))}},{key:"onAfterOnCellContextMenu",value:function(e){var t=this.hot.getSettings(),n=t.rowHeaders,o=t.colHeaders,r=e.realTarget;this.close(),(0,p.hasClass)(r,"handsontableInput")||(e.preventDefault(),(0,f.stopPropagation)(e),(n||o||function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(r)||(0,p.hasClass)(r,"current")&&(0,p.hasClass)(r,"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(),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(i.default);y.SEPARATOR={name:g.SEPARATOR},(0,d.registerPlugin)("contextMenu",y),t.default=y},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(2),i=n(1),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 o(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,o=Array(n>1?n-1:0),a=1;a<n;a++)o[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 '"+l+"' not exists.");if(u&&c.submenu&&(c=function(e,t){var n=void 0;return(0,r.arrayEach)(t,(function(t){var o=t.key?t.key.split(":"):null;if(Array.isArray(o)&&o[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,i.hasOwnProperty)(c,"submenu")){var h=[];"function"==typeof c.callback&&h.push(c.callback),"function"==typeof this.commonCallback&&h.push(this.commonCallback),o.unshift(s.join(":")),(0,r.arrayEach)(h,(function(e){return e.apply(t.hot,o)}))}}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(1),i=n(2),a=n(96),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,a.predefinedItems)(),this.defaultOrderPattern=n}return o(e,[{key:"setPredefinedItems",value:function(e){var t=this,n={};this.defaultOrderPattern.length=0,(0,r.objectEach)(e,(function(e,o){var r="";e.name===a.SEPARATOR?(n[a.SEPARATOR]=e,r=a.SEPARATOR):isNaN(parseInt(o,10))?(e.key=void 0===e.key?o:e.key,n[o]=e,r=e.key):(n[e.key]=e,r=e.key),t.defaultOrderPattern.push(r)})),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]:{},o=[],s=e;return s&&s.items?s=s.items:Array.isArray(s)||(s=t),(0,r.isObject)(s)?(0,r.objectEach)(s,(function(e,t){var i=n["string"==typeof e?e:t];i||(i=e),(0,r.isObject)(e)?(0,r.extend)(i,e):"string"==typeof i&&(i={name:i}),void 0===i.key&&(i.key=t),o.push(i)})):(0,i.arrayEach)(s,(function(e,t){var i=n[e];!i&&a.ITEMS.indexOf(e)>=0||(i||(i={name:e,key:""+t}),(0,r.isObject)(e)&&(0,r.extend)(i,e),void 0===i.key&&(i.key=t),o.push(i))})),o}(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.KEY=void 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:a+":left",name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){var o=e.getCellMeta(t,n).className;if(o&&-1!==o.indexOf("htLeft"))return!0}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.getAlignmentClasses)(t,(function(t,n){return e.getCellMeta(t,n).className})),r="horizontal",i="htLeft";this.runHooks("beforeCellAlignment",n,t,r,i),(0,o.align)(t,r,i,(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,o,r){return e.setCellMeta(t,n,o,r)})),this.render()},disabled:!1},{key:a+":center",name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){var o=e.getCellMeta(t,n).className;if(o&&-1!==o.indexOf("htCenter"))return!0}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.getAlignmentClasses)(t,(function(t,n){return e.getCellMeta(t,n).className})),r="horizontal",i="htCenter";this.runHooks("beforeCellAlignment",n,t,r,i),(0,o.align)(t,r,i,(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,o,r){return e.setCellMeta(t,n,o,r)})),this.render()},disabled:!1},{key:a+":right",name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){var o=e.getCellMeta(t,n).className;if(o&&-1!==o.indexOf("htRight"))return!0}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.getAlignmentClasses)(t,(function(t,n){return e.getCellMeta(t,n).className})),r="horizontal",i="htRight";this.runHooks("beforeCellAlignment",n,t,r,i),(0,o.align)(t,r,i,(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,o,r){return e.setCellMeta(t,n,o,r)})),this.render()},disabled:!1},{key:a+":justify",name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){var o=e.getCellMeta(t,n).className;if(o&&-1!==o.indexOf("htJustify"))return!0}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.getAlignmentClasses)(t,(function(t,n){return e.getCellMeta(t,n).className})),r="horizontal",i="htJustify";this.runHooks("beforeCellAlignment",n,t,r,i),(0,o.align)(t,r,i,(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,o,r){return e.setCellMeta(t,n,o,r)})),this.render()},disabled:!1},{name:r.KEY},{key:a+":top",name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){var o=e.getCellMeta(t,n).className;if(o&&-1!==o.indexOf("htTop"))return!0}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.getAlignmentClasses)(t,(function(t,n){return e.getCellMeta(t,n).className})),r="vertical",i="htTop";this.runHooks("beforeCellAlignment",n,t,r,i),(0,o.align)(t,r,i,(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,o,r){return e.setCellMeta(t,n,o,r)})),this.render()},disabled:!1},{key:a+":middle",name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){var o=e.getCellMeta(t,n).className;if(o&&-1!==o.indexOf("htMiddle"))return!0}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.getAlignmentClasses)(t,(function(t,n){return e.getCellMeta(t,n).className})),r="vertical",i="htMiddle";this.runHooks("beforeCellAlignment",n,t,r,i),(0,o.align)(t,r,i,(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,o,r){return e.setCellMeta(t,n,o,r)})),this.render()},disabled:!1},{key:a+":bottom",name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){var o=e.getCellMeta(t,n).className;if(o&&-1!==o.indexOf("htBottom"))return!0}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.getAlignmentClasses)(t,(function(t,n){return e.getCellMeta(t,n).className})),r="vertical",i="htBottom";this.runHooks("beforeCellAlignment",n,t,r,i),(0,o.align)(t,r,i,(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,o,r){return e.setCellMeta(t,n,o,r)})),this.render()},disabled:!1}]}}};var o=n(19),r=n(95),i=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(7)),a=t.KEY="alignment"},function(e,t,n){"use strict";t.__esModule=!0,t.KEY=void 0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(){return{key:a,name:function(){return this.getTranslatedPhrase(i.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=o(e[0],3),n=t[0],i=t[1],a=[n,0,t[2],this.countCols()-1].join(",")===e.join(",");return i<0||this.countCols()>=this.getSettings().maxCols||a}}};var r=n(19),i=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(7)),a=t.KEY="clear_column"},function(e,t,n){"use strict";t.__esModule=!0,t.KEY=void 0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(){return{key:a,name:function(){return this.getTranslatedPhrase(i.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=o(e[0],3),n=t[0],i=t[1],a=[n,0,t[2],this.countCols()-1].join(",")===e.join(","),s=1===this.countCols();return i<0||this.countCols()>=this.getSettings().maxCols||!s&&a},hidden:function(){return!this.getSettings().allowInsertColumn}}};var r=n(19),i=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(7)),a=t.KEY="col_left"},function(e,t,n){"use strict";t.__esModule=!0,t.KEY=void 0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(){return{key:a,name:function(){return this.getTranslatedPhrase(i.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=o(e[0],3),n=t[0],i=t[1],a=[n,0,t[2],this.countCols()-1].join(",")===e.join(","),s=1===this.countCols();return i<0||this.countCols()>=this.getSettings().maxCols||!s&&a},hidden:function(){return!this.getSettings().allowInsertColumn}}};var r=n(19),i=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(7)),a=t.KEY="col_right"},function(e,t,n){"use strict";t.__esModule=!0,t.KEY=void 0,t.default=function(){return{key:a,name:function(){var e=this,t=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_READ_ONLY);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){return e.getCellMeta(t,n).readOnly}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.checkSelectionConsistency)(t,(function(t,n){return e.getCellMeta(t,n).readOnly}));(0,r.arrayEach)(t,(function(t){t.forAll((function(t,o){e.setCellMeta(t,o,"readOnly",!n)}))})),this.render()},disabled:function(){return!(this.getSelectedRange()&&!this.selection.isSelectedByCorner())}}};var o=n(19),r=n(2),i=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(7)),a=t.KEY="make_read_only"},function(e,t,n){"use strict";t.__esModule=!0,t.KEY=void 0,t.default=function(){return{key:r,name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_REDO)},callback:function(){this.redo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isRedoAvailable()}}};var o=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(7)),r=t.KEY="redo"},function(e,t,n){"use strict";t.__esModule=!0,t.KEY=void 0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(){return{key:s,name:function(){var e=this.getSelected(),t=0;if(e)if(e.length>1)t=1;else{var n=o(e[0],4);n[1]-n[3]!=0&&(t=1)}return this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_REMOVE_COLUMN,t)},callback:function(){this.alter("remove_col",(0,i.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}}};var r=n(19),i=n(72),a=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(7)),s=t.KEY="remove_col"},function(e,t,n){"use strict";t.__esModule=!0,t.KEY=void 0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(){return{key:s,name:function(){var e=this.getSelected(),t=0;if(e)if(e.length>1)t=1;else{var n=o(e[0],3);n[0]-n[2]!=0&&(t=1)}return this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_REMOVE_ROW,t)},callback:function(){this.alter("remove_row",(0,i.transformSelectionToRowDistance)(this.getSelected()),null,"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}}};var r=n(19),i=n(72),a=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(7)),s=t.KEY="remove_row"},function(e,t,n){"use strict";t.__esModule=!0,t.KEY=void 0,t.default=function(){return{key:i,name:function(){return this.getTranslatedPhrase(r.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(){return!(0,o.getValidSelection)(this)||this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden:function(){return!this.getSettings().allowInsertRow}}};var o=n(19),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(7)),i=t.KEY="row_above"},function(e,t,n){"use strict";t.__esModule=!0,t.KEY=void 0,t.default=function(){return{key:i,name:function(){return this.getTranslatedPhrase(r.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(){return!(0,o.getValidSelection)(this)||this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden:function(){return!this.getSettings().allowInsertRow}}};var o=n(19),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(7)),i=t.KEY="row_below"},function(e,t,n){"use strict";t.__esModule=!0,t.KEY=void 0,t.default=function(){return{key:r,name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_UNDO)},callback:function(){this.undo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isUndoAvailable()}}};var o=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(7)),r=t.KEY="undo"},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=y(n(90)),i=n(0),a=n(2),s=y(n(317)),l=y(n(5)),u=n(1),c=n(11),h=n(43),d=n(19),f=n(21),p=y(n(47)),g=n(96),v=n(13);function y(e){return e&&e.__esModule?e:{default:e}}var m=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:215},this.eventManager=new l.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 o(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,h.debounce)((function(t){return e.openSubMenu(t)}),300),n=this.options.minWidth||215,o=(0,a.arrayFilter)(this.menuItems,(function(t){return(0,d.isItemHidden)(t,e.hot)})),i={data:o=(0,d.filterSeparators)(o,g.SEPARATOR),colHeaders:!1,autoColumnSize:!0,modifyColWidth:function(e){return(0,c.isDefined)(e)&&e<n?n:e},autoRowSize:!1,readOnly:!0,copyPaste:!1,columns:[{data:"name",renderer:function(t,n,o,r,i,a){return e.menuItemRenderer(t,n,o,r,i,a)}}],renderAllRows:!0,fragmentSelection:"cell",disableVisualSelection:"area",beforeKeyDown:function(t){return e.onBeforeKeyDown(t)},afterOnCellMouseOver:function(n,o){e.isAllSubMenusClosed()?t(o.row):e.openSubMenu(o.row)},rowHeights:function(e){return o[e].name===g.SEPARATOR?1:23}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new r.default(this.container,i),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,d.hasSubMenu)(n))return!1;var o=this.hotMenu.getSourceDataAtRow(t),r=new e(this.hot,{parent:this,name:o.name,className:this.options.className,keepInViewport:!0});return r.setMenuItems(o.submenu.items),r.open(),r.setPosition(n.getBoundingClientRect()),this.hotSubMenus[o.key]=r,r}},{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,a.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!==g.SEPARATOR){var n=this.hot.getSelectedRange(),o=n?(0,d.normalizeSelection)(n):[],r=!0;(!0===t.disabled||"function"==typeof t.disabled&&!0===t.disabled.call(this.hot)||t.submenu)&&(r=!1),this.runLocalHooks("executeCommand",t.key,o,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,o,e),r&&this.close(!0)}}}},{key:"setPosition",value:function(e){var t=new s.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=t+"px"}},{key:"setPositionBelowCursor",value:function(e){var t=this.offset.below+e.top;this.isSubMenu()&&(t=e.top-1),this.container.style.top=t+"px"}},{key:"setPositionOnRightOfCursor",value:function(e){var t=void 0;t=this.isSubMenu()?1+e.left+e.cellWidth:this.offset.right+1+e.left,this.container.style.left=t+"px"}},{key:"setPositionOnLeftOfCursor",value:function(e){var t=this.offset.left+e.left-this.container.offsetWidth+(0,i.getScrollbarWidth)()+4;this.container.style.left=t+"px"}},{key:"selectFirstCell",value:function(){var e=this.hotMenu.getCell(0,0);(0,d.isSeparator)(e)||(0,d.isDisabled)(e)||(0,d.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,d.isSeparator)(t)||(0,d.isDisabled)(t)||(0,d.isSelectionDisabled)(t)?this.selectPrevCell(e,0):this.hotMenu.selectCell(e,0)}},{key:"selectNextCell",value:function(e,t){var n=e+1,o=n<this.hotMenu.countRows()?this.hotMenu.getCell(n,t):null;o&&((0,d.isSeparator)(o)||(0,d.isDisabled)(o)||(0,d.isSelectionDisabled)(o)?this.selectNextCell(n,t):this.hotMenu.selectCell(n,t))}},{key:"selectPrevCell",value:function(e,t){var n=e-1,o=n>=0?this.hotMenu.getCell(n,t):null;o&&((0,d.isSeparator)(o)||(0,d.isDisabled)(o)||(0,d.isSelectionDisabled)(o)?this.selectPrevCell(n,t):this.hotMenu.selectCell(n,t))}},{key:"menuItemRenderer",value:function(e,t,n,o,r,a){var s,l=this,c=e.getSourceDataAtRow(n),h=document.createElement("div"),d=function(e){return e.disableSelection},f=a;"function"==typeof f&&(f=f.call(this.hot)),(0,i.empty)(t),(0,i.addClass)(h,"htItemWrapper"),t.appendChild(h),s=c,new RegExp(g.SEPARATOR,"i").test(s.name)?(0,i.addClass)(t,"htSeparator"):"function"==typeof c.renderer?((0,i.addClass)(t,"htCustomMenuRenderer"),t.appendChild(c.renderer(e,h,n,o,r,f))):(0,i.fastInnerHTML)(h,f),function(e){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(l.hot)}(c)?((0,i.addClass)(t,"htDisabled"),this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()}))):d(c)?((0,i.addClass)(t,"htSelectionDisabled"),this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()}))):function(e){return(0,u.hasOwnProperty)(e,"submenu")}(c)?((0,i.addClass)(t,"htSubmenu"),d(c)?this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()})):this.eventManager.addEventListener(t,"mouseenter",(function(){return e.selectCell(n,o,void 0,void 0,!1,!1)}))):((0,i.removeClass)(t,"htSubmenu"),(0,i.removeClass)(t,"htDisabled"),d(c)?this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()})):this.eventManager.addEventListener(t,"mouseenter",(function(){return e.selectCell(n,o,void 0,void 0,!1,!1)})))}},{key:"createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=void 0;return e?((0,h.isFunction)(e)&&(e=null===(e=e.call(this.hot))||(0,c.isUndefined)(e)?"":e.toString()),e=e.replace(/[^A-z0-9]/g,"_"),e=this.options.className+"Sub_"+e,t=document.querySelector("."+this.options.className+"."+e)):t=document.querySelector("."+this.options.className),t||(t=document.createElement("div"),(0,i.addClass)(t,"htMenu "+this.options.className),e&&(0,i.addClass)(t,e),document.getElementsByTagName("body")[0].appendChild(t)),t}},{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 f.KEY_CODES.ESCAPE:this.close(),n=!0;break;case f.KEY_CODES.ENTER:t&&(this.hotMenu.getSourceDataAtRow(t[0]).submenu?n=!0:(this.executeCommand(e),this.close(!0)));break;case f.KEY_CODES.ARROW_DOWN:t?this.selectNextCell(t[0],t[1]):this.selectFirstCell(),n=!0;break;case f.KEY_CODES.ARROW_UP:t?this.selectPrevCell(t[0],t[1]):this.selectLastCell(),n=!0;break;case f.KEY_CODES.ARROW_RIGHT:if(t){var o=this.openSubMenu(t[0]);o&&o.selectFirstCell()}n=!0;break;case f.KEY_CODES.ARROW_LEFT:t&&this.isSubMenu()&&(this.close(),this.parentMenu&&this.parentMenu.hotMenu.listen(),n=!0)}n&&(e.preventDefault(),(0,v.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,o=parseInt(t.width,10),r=(0,a.arrayReduce)(e,(function(e,t){return e+(t.name===g.SEPARATOR?1:26)}),0);n.width=o+22+"px",n.height=r+4+"px",t.height=n.height}},{key:"onAfterSelection",value:function(e,t,n,o,r){!1===this.keyEvent&&(r.value=!0)}},{key:"onDocumentMouseDown",value:function(e){this.isOpened()&&(this.container&&(0,i.isChildOf)(e.target,this.container)&&this.executeCommand(e),(this.options.standalone&&this.hotMenu&&!(0,i.isChildOf)(e.target,this.hotMenu.rootElement)||(this.isAllSubMenusClosed()||this.isSubMenu())&&!(0,i.isChildOf)(e.target,".htMenu")&&(0,i.isChildOf)(e.target,document))&&this.close(!0))}}]),e}();(0,u.mixin)(m,p.default),t.default=m},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(13),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=(0,r.getWindowScrollTop)(),o=(0,r.getWindowScrollLeft)(),a=void 0,s=void 0,l=void 0,u=void 0,c=void 0,h=void 0;this.type=this.getSourceType(t),"literal"===this.type?(a=parseInt(t.top,10),l=parseInt(t.left,10),c=t.height||0,h=t.width||0,s=a,u=l,a+=n,l+=o):"event"===this.type&&(a=parseInt((0,i.pageY)(t),10),l=parseInt((0,i.pageX)(t),10),c=t.target.clientHeight,h=t.target.clientWidth,s=a-n,u=l-o),this.top=a,this.topRelative=s,this.left=l,this.leftRelative=u,this.scrollTop=n,this.scrollLeft=o,this.cellHeight=c,this.cellWidth=h}return o(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;var 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},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},a=m(n(10)),s=m(n(16)),l=m(n(193)),u=n(4),c=n(0),h=n(2),d=n(6),f=n(8),p=m(n(320)),g=m(n(321)),v=m(n(322)),y=n(324);function m(e){return e&&e.__esModule?e:{default:e}}n(325),s.default.getSingleton().register("afterCopyLimit"),s.default.getSingleton().register("modifyCopyableRange"),s.default.getSingleton().register("beforeCut"),s.default.getSingleton().register("afterCut"),s.default.getSingleton().register("beforePaste"),s.default.getSingleton().register("afterPaste"),s.default.getSingleton().register("beforeCopy"),s.default.getSingleton().register("afterCopy");var w=new WeakMap,C=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.columnsLimit=1e3,n.copyableRanges=[],n.pasteMode="overwrite",n.rowsLimit=1e3,w.set(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, 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),r(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();w.get(this).isFragmentSelectionEnabled=n.fragmentSelection,"object"===o(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("afterSelectionEnd",(function(){return e.onAfterSelectionEnd()})),this.focusableElement=(0,y.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)})),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.focusableElement&&(0,y.destroyElement)(this.focusableElement),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"setCopyableText",value:function(){var e=this.hot.getSelectedRangeLast();if(e){var t=e.getTopLeftCorner(),n=e.getBottomRightCorner(),o=t.row,r=t.col,i=n.row,a=n.col,s=Math.min(i,o+this.rowsLimit-1),l=Math.min(a,r+this.columnsLimit-1);this.copyableRanges.length=0,this.copyableRanges.push({startRow:o,startCol:r,endRow:s,endCol:l}),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges),i===s&&a===l||this.hot.runHooks("afterCopyLimit",i-o+1,a-r+1,this.rowsLimit,this.columnsLimit)}}},{key:"getRangedCopyableData",value:function(e){var t=this,n=[],o=[],r=[];return(0,h.arrayEach)(e,(function(e){(0,d.rangeEach)(e.startRow,e.endRow,(function(e){-1===o.indexOf(e)&&o.push(e)})),(0,d.rangeEach)(e.startCol,e.endCol,(function(e){-1===r.indexOf(e)&&r.push(e)}))})),(0,h.arrayEach)(o,(function(e){var o=[];(0,h.arrayEach)(r,(function(n){o.push(t.hot.getCopyableData(e,n))})),n.push(o)})),l.default.stringify(n)}},{key:"getRangedData",value:function(e){var t=this,n=[],o=[],r=[];return(0,h.arrayEach)(e,(function(e){(0,d.rangeEach)(e.startRow,e.endRow,(function(e){-1===o.indexOf(e)&&o.push(e)})),(0,d.rangeEach)(e.startCol,e.endCol,(function(e){-1===r.indexOf(e)&&r.push(e)}))})),(0,h.arrayEach)(o,(function(e){var o=[];(0,h.arrayEach)(r,(function(n){o.push(t.hot.getCopyableData(e,n))})),n.push(o)})),n}},{key:"copy",value:function(){w.get(this).isTriggeredByCopy=!0,this.focusableElement.focus(),document.execCommand("copy")}},{key:"cut",value:function(){w.get(this).isTriggeredByCut=!0,this.focusableElement.focus(),document.execCommand("cut")}},{key:"paste",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=new v.default;t.clipboardData.setData("text/plain",e),this.onPaste(t)}},{key:"onCopy",value:function(e){var t=w.get(this);if(this.hot.isListening()||t.isTriggeredByCopy){var n=this.hot.getActiveEditor();if(!n||!n.isOpened()){this.setCopyableText(),t.isTriggeredByCopy=!1;var o=this.getRangedData(this.copyableRanges),r="";!!this.hot.runHooks("beforeCopy",o,this.copyableRanges)&&(r=l.default.stringify(o),e&&e.clipboardData?e.clipboardData.setData("text/plain",r):"undefined"==typeof ClipboardEvent&&window.clipboardData.setData("Text",r),this.hot.runHooks("afterCopy",o,this.copyableRanges)),e.preventDefault()}}}},{key:"onCut",value:function(e){var t=w.get(this);if(this.hot.isListening()||t.isTriggeredByCut){var n=this.hot.getActiveEditor();if(!n||!n.isOpened()){this.setCopyableText(),t.isTriggeredByCut=!1;var o=this.getRangedData(this.copyableRanges),r=void 0;!!this.hot.runHooks("beforeCut",o,this.copyableRanges)&&(r=l.default.stringify(o),e&&e.clipboardData?e.clipboardData.setData("text/plain",r):"undefined"==typeof ClipboardEvent&&window.clipboardData.setData("Text",r),this.hot.emptySelectedCells(),this.hot.runHooks("afterCut",o,this.copyableRanges)),e.preventDefault()}}}},{key:"onPaste",value:function(e){var t=this;if(this.hot.isListening()){var n=this.hot.getActiveEditor();if(!n||!n.isOpened()){e&&e.preventDefault&&e.preventDefault();var o=void 0;e&&void 0!==e.clipboardData?o=e.clipboardData.getData("text/plain"):"undefined"==typeof ClipboardEvent&&void 0!==window.clipboardData&&(o=window.clipboardData.getData("Text"));var r=l.default.parse(o);if(0!==r.length&&this.hot.runHooks("beforePaste",r,this.copyableRanges)){var i=this.hot.getSelectedLast(),a=new u.CellCoords(i[0],i[1]),s=new u.CellCoords(i[2],i[3]),c=new u.CellRange(a,a,s),d=c.getTopLeftCorner(),f=c.getBottomRightCorner(),p=d,g=new u.CellCoords(Math.max(f.row,r.length-1+d.row),Math.max(f.col,r[0].length-1+d.col)),v=s.row-a.row>=r.length-1,y=s.col-a.col>=r[0].length-1;this.hot.addHookOnce("afterChange",(function(e){var n=e?e.length:0;if(n){var o={row:0,col:0},r=-1;(0,h.arrayEach)(e,(function(t,i){var a=n>i+1?e[i+1]:null;a&&(v||(o.row+=Math.max(a[0]-t[0]-1,0)),!y&&t[1]>r&&(r=t[1],o.col+=Math.max(a[1]-t[1]-1,0)))})),t.hot.selectCell(p.row,p.col,g.row+o.row,g.col+o.col)}})),this.hot.populateFromArray(p.row,p.col,r,g.row,g.col,"CopyPaste.paste",this.pasteMode),this.hot.runHooks("afterPaste",r,this.copyableRanges)}}}}},{key:"onAfterContextMenuDefaultOptions",value:function(e){e.items.push({name:"---------"},(0,p.default)(this),(0,g.default)(this))}},{key:"onAfterSelectionEnd",value:function(){var e=w.get(this).isFragmentSelectionEnabled,t=this.hot.getActiveEditor();if(!t||!t.isOpened()){var n=t?t.TEXTAREA:void 0;n?this.focusableElement.setFocusableElement(n):this.focusableElement.useSecondaryElement(),e&&this.focusableElement.getFocusableElement()!==document.activeElement&&(0,c.getSelectionText)()||(this.setCopyableText(),this.focusableElement.focus())}}},{key:"destroy",value:function(){this.focusableElement&&((0,y.destroyElement)(this.focusableElement),this.focusableElement=null),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(a.default);(0,f.registerPlugin)("CopyPaste",C),t.default=C},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy",name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_COPY)},callback:function(){e.copy()},disabled:function(){var e=this.getSelected();return!e||e.length>1},hidden:!1}};var o=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(7))},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"cut",name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_CUT)},callback:function(){e.cut()},disabled:function(){var e=this.getSelected();return!e||e.length>1},hidden:!1}};var o=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(7))},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(323),i=(o=r)&&o.__esModule?o:{default:o};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 i.default}},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=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 o(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=r},function(e,t,n){"use strict";t.__esModule=!0,t.destroyElement=t.deactivateElement=t.createElement=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=s(n(5)),i=s(n(47)),a=n(1);function s(e){return e&&e.__esModule?e:{default: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.mainElement=null,this.eventManager=new r.default(this),this.listenersCount=new WeakSet}return o(e,[{key:"useSecondaryElement",value:function(){var e=function(){if(f)return f.parentElement||document.body.appendChild(f),f;var e=document.createElement("textarea");return f=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),d(this.eventManager,e,this)),this.mainElement=e}},{key:"setFocusableElement",value:function(e){this.listenersCount.has(e)||(this.listenersCount.add(e),d(this.eventManager,e,this)),this.mainElement=e}},{key:"getFocusableElement",value:function(){return this.mainElement}},{key:"focus",value:function(){this.mainElement.value=" ",this.mainElement.select()}}]),e}();(0,a.mixin)(l,i.default);var u=0;function c(e){e.eventManager.clear()}var h=function(e,t){return function(n){return t.runLocalHooks(e,n)}};function d(e,t,n){e.addEventListener(t,"copy",h("copy",n)),e.addEventListener(t,"cut",h("cut",n)),e.addEventListener(t,"paste",h("paste",n))}var f=void 0;t.createElement=function(){var e=new l;return u+=1,e},t.deactivateElement=c,t.destroyElement=function(e){e instanceof l&&(u>0&&(u-=1),c(e),u<=0&&(u=0,f&&f.parentNode&&(f.parentNode.removeChild(f),f=null),e.mainElement=null))}},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},s=n(10),l=(o=s)&&o.__esModule?o:{default:o},u=n(8),c=n(1),h=n(6),d=n(2),f=n(4),p=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(7)),g=n(327),v=n(48),y=n(201),m=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.savedBorders=[],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),i(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()})),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.hideBorders(),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"setBorders",value:function(e,t){var n=this,o=t?Object.keys(t):["top","right","bottom","left"],i=(0,y.detectSelectionType)(e),a=(0,y.normalizeSelectionFactory)(i);(0,d.arrayEach)(e,(function(e){for(var i=a(e),s=r(i,4),l=s[0],u=s[1],c=s[2],h=s[3],f=function(e){for(var r=function(r){(0,d.arrayEach)(o,(function(o){n.prepareBorderFromCustomAdded(e,r,t,o)}))},i=u;i<=h;i+=1)r(i)},p=l;p<=c;p+=1)f(p)}))}},{key:"getBorders",value:function(e){var t=this;if(!Array.isArray(e))return this.savedBorders;var n=(0,y.detectSelectionType)(e),o=(0,y.normalizeSelectionFactory)(n),i=[];return(0,d.arrayEach)(e,(function(e){for(var n=o(e),a=r(n,4),s=a[0],l=a[1],u=a[2],c=a[3],h=function(e){for(var n=function(n){(0,d.arrayEach)(t.savedBorders,(function(t){t.row===e&&t.col===n&&i.push(t)}))},o=l;o<=c;o+=1)n(o)},f=s;f<=u;f+=1)h(f)})),i}},{key:"clearBorders",value:function(e){var t=this;e?this.setBorders(e):((0,d.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},o=new f.CellRange(n,n,n);this.checkCustomSelections(e,o,t)||(this.hot.selection.highlight.addCustomSelection({border:e,cellRange:o}),this.hot.view.wt.draw(!0))}},{key:"prepareBorderFromCustomAdded",value:function(e,t,n,o){var r=(0,v.createEmptyBorders)(e,t);n&&(r=(0,v.extendDefaultBorder)(r,n),(0,d.arrayEach)(this.hot.selection.highlight.customSelections,(function(e){if(r.id===e.settings.id)return Object.assign(e.settings,n),r=e.settings,!1}))),this.hot.setCellMeta(e,t,"borders",r),this.insertBorderIntoSettings(r,o)}},{key:"prepareBorderFromCustomAddedRange",value:function(e){var t=this,n=e.range;(0,h.rangeEach)(n.from.row,n.to.row,(function(o){(0,h.rangeEach)(n.from.col,n.to.col,(function(r){var i=(0,v.createEmptyBorders)(o,r),a=0;o===n.from.row&&(a+=1,(0,c.hasOwnProperty)(e,"top")&&(i.top=e.top)),o===n.to.row&&(a+=1,(0,c.hasOwnProperty)(e,"bottom")&&(i.bottom=e.bottom)),r===n.from.col&&(a+=1,(0,c.hasOwnProperty)(e,"left")&&(i.left=e.left)),r===n.to.col&&(a+=1,(0,c.hasOwnProperty)(e,"right")&&(i.right=e.right)),a>0&&(t.hot.setCellMeta(o,r,"borders",i),t.insertBorderIntoSettings(i))}))}))}},{key:"removeAllBorders",value:function(e,t){var n=(0,v.createId)(e,t);this.spliceBorder(n),this.clearBordersFromSelectionSettings(n),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}},{key:"setBorder",value:function(e,t,n,o){var r=this.hot.getCellMeta(e,t).borders;r&&void 0!==r.border||(r=(0,v.createEmptyBorders)(e,t)),o?(r[n]=(0,v.createSingleEmptyBorder)(),4===this.countHide(r)?this.removeAllBorders(e,t):(this.checkCustomSelectionsFromContextMenu(r,n,o)||this.insertBorderIntoSettings(r),this.hot.setCellMeta(e,t,"borders",r))):(r[n]=(0,v.createDefaultCustomBorder)(),this.checkCustomSelectionsFromContextMenu(r,n,o)||this.insertBorderIntoSettings(r),this.hot.setCellMeta(e,t,"borders",r))}},{key:"prepareBorder",value:function(e,t,n){var o=this;(0,d.arrayEach)(e,(function(e){var r=e.start,i=e.end;if(r.row===i.row&&r.col===i.col)"noBorders"===t?o.removeAllBorders(r.row,r.col):o.setBorder(r.row,r.col,t,n);else switch(t){case"noBorders":(0,h.rangeEach)(r.col,i.col,(function(e){(0,h.rangeEach)(r.row,i.row,(function(t){o.removeAllBorders(t,e)}))}));break;case"top":(0,h.rangeEach)(r.col,i.col,(function(e){o.setBorder(r.row,e,t,n)}));break;case"right":(0,h.rangeEach)(r.row,i.row,(function(e){o.setBorder(e,i.col,t,n)}));break;case"bottom":(0,h.rangeEach)(r.col,i.col,(function(e){o.setBorder(i.row,e,t,n)}));break;case"left":(0,h.rangeEach)(r.row,i.row,(function(e){o.setBorder(e,r.col,t,n)}))}}))}},{key:"createCustomBorders",value:function(e){var t=this;(0,d.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,d.arrayReduce)(t,(function(e,t){var n=e;return t.hide&&(n+=1),n}),0)}},{key:"clearBordersFromSelectionSettings",value:function(e){var t=(0,d.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,d.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,d.arrayEach)(this.savedBorders,(function(t){e.clearBordersFromSelectionSettings(t.id)}))}},{key:"spliceBorder",value:function(e){var t=(0,d.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,d.arrayEach)(this.savedBorders,(function(o,r){if(e.id===o.id)return t.savedBorders[r]=e,n=!0,!1})),n}},{key:"checkCustomSelectionsFromContextMenu",value:function(e,t,n){var o=!1;return(0,d.arrayEach)(this.hot.selection.highlight.customSelections,(function(r){if(e.id===r.settings.id)return(0,c.objectEach)(r.instanceBorders,(function(e){e.toggleHiddenClass(t,n)})),o=!0,!1})),o}},{key:"checkCustomSelections",value:function(e,t,n){var o=this.countHide(e),r=!1;return 4===o?(this.removeAllBorders(e.row,e.col),this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),r=!0):(0,d.arrayEach)(this.hot.selection.highlight.customSelections,(function(o){if(e.id===o.settings.id)return o.cellRange=t,n&&(0,c.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(p.CONTEXTMENU_ITEMS_BORDERS)},disabled:function(){return this.selection.isSelectedByCorner()},submenu:{items:[(0,g.top)(this),(0,g.right)(this),(0,g.bottom)(this),(0,g.left)(this),(0,g.noBorders)(this)]}})}},{key:"onAfterInit",value:function(){this.changeBorderSettings()}},{key:"destroy",value:function(){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(l.default);(0,u.registerPlugin)("customBorders",m),t.default=m},function(e,t,n){"use strict";t.__esModule=!0,t.top=t.right=t.noBorders=t.left=t.bottom=void 0;var o=l(n(328)),r=l(n(329)),i=l(n(330)),a=l(n(331)),s=l(n(332));function l(e){return e&&e.__esModule?e:{default:e}}t.bottom=o.default,t.left=r.default,t.noBorders=i.default,t.right=a.default,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(o.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return(0,r.checkSelectionBorders)(this,"bottom")&&(e=(0,r.markSelected)(e)),e},callback:function(t,n){var o=(0,r.checkSelectionBorders)(this,"bottom");e.prepareBorder(n,"bottom",o)}}};var o=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(7)),r=n(48)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:left",name:function(){var e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_BORDERS_LEFT);return(0,r.checkSelectionBorders)(this,"left")&&(e=(0,r.markSelected)(e)),e},callback:function(t,n){var o=(0,r.checkSelectionBorders)(this,"left");e.prepareBorder(n,"left",o)}}};var o=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(7)),r=n(48)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:no_borders",name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback:function(t,n){e.prepareBorder(n,"noBorders")},disabled:function(){return!(0,r.checkSelectionBorders)(this)}}};var o=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(7)),r=n(48)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:right",name:function(){var e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return(0,r.checkSelectionBorders)(this,"right")&&(e=(0,r.markSelected)(e)),e},callback:function(t,n){var o=(0,r.checkSelectionBorders)(this,"right");e.prepareBorder(n,"right",o)}}};var o=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(7)),r=n(48)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:top",name:function(){var e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_BORDERS_TOP);return(0,r.checkSelectionBorders)(this,"top")&&(e=(0,r.markSelected)(e)),e},callback:function(t,n){var o=(0,r.checkSelectionBorders)(this,"top");e.prepareBorder(n,"top",o)}}};var o=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(7)),r=n(48)},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=l(n(10)),a=l(n(5)),s=n(8);function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.eventManager=new a.default(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, 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),o(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(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.unregisterEvents(),r(t.prototype.__proto__||Object.getPrototypeOf(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,o=0;t<this.boundaries.top?o=t-this.boundaries.top:t>this.boundaries.bottom&&(o=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,o)}},{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(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(i.default);(0,s.registerPlugin)("dragToScroll",u),t.default=u},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=c(n(10)),a=n(8),s=n(2),l=c(n(335)),u=c(n(336));function c(e){return e&&e.__esModule?e:{default:e}}n(337);var h=new WeakMap,d=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return h.set(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, 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),o(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)})),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){var e=h.get(this);e.afterFirstUse=!1,e.moveByFreeze=!1,r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"freezeColumn",value:function(e){var t=h.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=h.get(this),n=this.hot.getSettings();if(t.afterFirstUse||(t.afterFirstUse=!0),!(n.fixedColumnsLeft<=0||e>n.fixedColumnsLeft-1)){var o=this.getBestColumnReturnPosition(e);t.moveByFreeze=!0,n.fixedColumnsLeft-=1,this.getMovePlugin().moveColumn(e,o+1)}}},{key:"getMovePlugin",value:function(){return this.manualColumnMovePlugin||(this.manualColumnMovePlugin=this.hot.getPlugin("manualColumnMove")),this.manualColumnMovePlugin}},{key:"getBestColumnReturnPosition",value:function(e){var t=this.getMovePlugin(),n=this.hot.getSettings().fixedColumnsLeft,o=t.columnsMapper.getValueByIndex(n),r=void 0;if(null===this.frozenColumnsBasePositions[e]||void 0===this.frozenColumnsBasePositions[e])for(r=t.columnsMapper.getValueByIndex(e);null!==o&&o<=r;)n+=1,o=t.columnsMapper.getValueByIndex(n);else{for(r=this.frozenColumnsBasePositions[e],this.frozenColumnsBasePositions[e]=void 0;null!==o&&o<=r;)n+=1,o=t.columnsMapper.getValueByIndex(n);n=o}return n-1}},{key:"addContextMenuEntry",value:function(e){e.items.push({name:"---------"},(0,l.default)(this),(0,u.default)(this))}},{key:"onAfterInit",value:function(){this.getMovePlugin().isEnabled()||this.getMovePlugin().enablePlugin()}},{key:"onBeforeColumnMove",value:function(e,t){var n=h.get(this);if(n.afterFirstUse&&!n.moveByFreeze){var o=this.hot.getSettings().fixedColumnsLeft,r=t<o;if(r||(0,s.arrayEach)(e,(function(e){if(e<o)return r=!0,!1})),r)return!1}n.moveByFreeze&&(n.moveByFreeze=!1)}},{key:"destroy",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(i.default);(0,a.registerPlugin)("manualColumnFreeze",d),t.default=d},function(e,t,n){"use strict";t.__esModule=!0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e){return{key:"freeze_column",name:function(){return this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_FREEZE_COLUMN)},callback:function(t,n){var r=o(n,1)[0].start.col;e.freezeColumn(r),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),t=!1;return(void 0===e||e.length>1||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)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(7))},function(e,t,n){"use strict";t.__esModule=!0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e){return{key:"unfreeze_column",name:function(){return this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN)},callback:function(t,n){var r=o(n,1)[0].start.col;e.unfreezeColumn(r),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),t=!1;return(void 0===e||e.length>1||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)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(7))},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=g(n(10)),a=g(n(16)),s=n(2),l=n(0),u=n(6),c=g(n(5)),h=n(8),d=g(n(339)),f=g(n(340)),p=g(n(341));function g(e){return e&&e.__esModule?e:{default:e}}n(342),a.default.getSingleton().register("beforeColumnMove"),a.default.getSingleton().register("afterColumnMove"),a.default.getSingleton().register("unmodifyCol");var v=new WeakMap,y="ht__manualColumnMove",m="show-ui",w="on-moving--columns",C="after-selection--columns",b=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return v.set(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 d.default(n),n.eventManager=new c.default(n),n.backlight=new f.default(e),n.guideline=new p.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, 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),o(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,o,r){return e.onBeforeOnCellMouseDown(t,n,o,r)})),this.addHook("beforeOnCellMouseOver",(function(t,n,o,r){return e.onBeforeOnCellMouseOver(t,n,o,r)})),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,l.addClass)(this.hot.rootElement,y),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.onAfterPluginsInitialized(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){var e=this.hot.getSettings().manualColumnMove;Array.isArray(e)&&this.columnsMapper.clearMap(),(0,l.removeClass)(this.hot.rootElement,y),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),r(t.prototype.__proto__||Object.getPrototypeOf(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,o=[].concat(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)}(e)),r=v.get(this),i=this.hot.runHooks("beforeColumnMove",o,t);r.disallowMoving=!i,!1!==i&&((0,s.arrayEach)(e,(function(e,t,o){o[t]=n.columnsMapper.getValueByIndex(e)})),(0,s.arrayEach)(e,(function(e,o){var r=n.columnsMapper.getIndexByValue(e);r!==t&&n.columnsMapper.moveColumn(r,t+o)})),this.columnsMapper.clearNull()),this.hot.runHooks("afterColumnMove",o,t)}},{key:"changeSelection",value:function(e,t){this.hot.selectColumns(e,t)}},{key:"getColumnsWidth",value:function(e,t){for(var n=0,o=e;o<t;o++)n+=o<0?this.hot.view.wt.wtViewport.getRowHeaderWidth()||0:this.hot.view.wt.wtTable.getStretchedColumnWidth(o)||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,u.rangeEach)(e,t,(function(e){n.push(e)})),n}},{key:"refreshPositions",value:function(){var e=v.get(this),t=this.hot.view.wt.wtTable.getFirstVisibleColumn(),n=this.hot.view.wt.wtTable.getLastVisibleColumn(),o=this.hot.view.wt.wtTable,r=this.hot.view.wt.wtOverlays.scrollableElement,i="number"==typeof r.scrollX?r.scrollX:r.scrollLeft,a=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,e.coordsColumn),s=e.target.eventPageX-(e.rootElementOffset-(void 0===r.scrollX?i:0)),l=o.hider.offsetWidth,u=o.TBODY.offsetLeft,c=this.backlight.getOffset().left,h=this.backlight.getSize().width,d=0;if(e.rootElementOffset+o.holder.offsetWidth+i<e.target.eventPageX&&e.coordsColumn<e.countCols&&(e.coordsColumn+=1),e.hasRowHeaders&&(d=this.hot.view.wt.wtOverlays.leftOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsLeft(e.coordsColumn)&&(a+=i),a+=d,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 f=e.coordsColumn>=e.countCols?e.countCols-1:e.coordsColumn;e.target.col=f+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+h+c>=l?p=l-h-c:s+c<u+d&&(p=u+d+Math.abs(c)),a>=l-1?g=l-1:0===g?g=1:void 0!==r.scrollX&&e.coordsColumn<e.fixedColumns&&(g-=e.rootElementOffset<=r.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 o=e-1,r=[];(0,s.arrayEach)(this.columnsMapper._arrayMap,(function(e,t){e>o&&r.push(t)})),this.columnsMapper.removeItems(r)}}},{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,o){var r=this.hot.view.wt.wtTable,i=this.hot.selection.isSelectedByColumnHeader(),a=this.hot.getSelectedRangeLast(),s=v.get(this),u=e.realTarget.className.indexOf("columnSorting")>-1;if(!a||!i||s.pressed||0!==e.button||u)return s.pressed=!1,s.columnsToMove.length=0,void(0,l.removeClass)(this.hot.rootElement,[w,m]);var c=this.guideline.isBuilt()&&!this.guideline.isAppended(),h=this.backlight.isBuilt()&&!this.backlight.isAppended();c&&h&&(this.guideline.appendTo(r.hider),this.backlight.appendTo(r.hider));var d=a.from,f=a.to,p=Math.min(d.col,f.col),g=Math.max(d.col,f.col);if(t.row<0&&t.col>=p&&t.col<=g){o.column=!0,s.pressed=!0,s.target.eventPageX=e.pageX,s.coordsColumn=t.col,s.target.TD=n,s.target.col=t.col,s.columnsToMove=this.prepareColumnsToMoving(p,g),s.hasRowHeaders=!!this.hot.getSettings().rowHeaders,s.countCols=this.hot.countCols(),s.fixedColumns=this.hot.getSettings().fixedColumnsLeft,s.rootElementOffset=(0,l.offset)(this.hot.rootElement).left;var y=s.hasRowHeaders?-1:0,b=r.holder.scrollTop+r.getColumnHeaderHeight(0)+1,E=t.col<s.fixedColumns,S=this.hot.view.wt.wtOverlays.scrollableElement,O=S.scrollX?S.scrollX-s.rootElementOffset:0,T=e.layerX-(E?O:0),_=Math.abs(this.getColumnsWidth(p,t.col)+T);this.backlight.setPosition(b,this.getColumnsWidth(y,p)+_),this.backlight.setSize(this.getColumnsWidth(p,g+1),r.hider.offsetHeight-b),this.backlight.setOffset(null,-1*_),(0,l.addClass)(this.hot.rootElement,w)}else(0,l.removeClass)(this.hot.rootElement,C),s.pressed=!1,s.columnsToMove.length=0}},{key:"onMouseMove",value:function(e){var t=v.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,o){var r=this.hot.getSelectedRangeLast(),i=v.get(this);r&&i.pressed&&(i.columnsToMove.indexOf(t.col)>-1?(0,l.removeClass)(this.hot.rootElement,m):(0,l.addClass)(this.hot.rootElement,m),o.row=!0,o.column=!0,o.cell=!0,i.coordsColumn=t.col,i.target.TD=n)}},{key:"onMouseUp",value:function(){var e=v.get(this);if(e.coordsColumn=void 0,e.pressed=!1,e.backlightWidth=0,(0,l.removeClass)(this.hot.rootElement,[w,m,C]),this.hot.selection.isSelectedByColumnHeader()&&(0,l.addClass)(this.hot.rootElement,C),!(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,u.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 o=this.columnsMapper.getValueByIndex(n);n=null===o?n:o}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(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(i.default);(0,h.registerPlugin)("ManualColumnMove",b),t.default=b},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(94),a=(o=i)&&o.__esModule?o:{default:o},s=n(2),l=n(1),u=n(6),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.manualColumnMove=t}return r(e,[{key:"createMap",value:function(e){var t=this,n=void 0===e?this._arrayMap.length:e;this._arrayMap.length=0,(0,u.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,s.arrayFilter)(this._arrayMap,(function(e){return null!==e}))}}]),e}();(0,l.mixin)(c,a.default),t.default=c},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},a=n(204),s=(o=a)&&o.__esModule?o:{default:o},l=n(0),u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),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,(t.__proto__||Object.getPrototypeOf(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, 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),r(t,[{key:"build",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"build",this).call(this),(0,l.addClass)(this._element,"ht__manualColumnMove--backlight")}}]),t}(s.default);t.default=u},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},a=n(204),s=(o=a)&&o.__esModule?o:{default:o},l=n(0),u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),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,(t.__proto__||Object.getPrototypeOf(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, 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),r(t,[{key:"build",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"build",this).call(this),(0,l.addClass)(this._element,"ht__manualColumnMove--guideline")}}]),t}(s.default);t.default=u},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=d(n(10)),a=n(0),s=d(n(5)),l=n(13),u=n(2),c=n(6),h=n(8);function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.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 s.default(n),n.pressed=null,n.dblclick=0,n.autoresizeTimeout=null,n.manualColumnWidths=[],(0,a.addClass)(n.handle,"manualColumnResizer"),(0,a.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, 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),o(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,o=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,o){return e.onBeforeColumnResize(t,n,o)})),void 0!==o?this.manualColumnWidths=o:Array.isArray(n)?this.manualColumnWidths=n:this.manualColumnWidths=[],this.bindEvents(),r(t.prototype.__proto__||Object.getPrototypeOf(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(){r(t.prototype.__proto__||Object.getPrototypeOf(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,o=(0,a.outerHeight)(this.currentTH);if(n>=0){var r=this.currentTH.getBoundingClientRect();if(this.currentCol=n,this.selectedCols=[],this.hot.selection.isSelected()&&this.hot.selection.isSelectedByColumnHeader()){var i=this.hot.getSelectedRangeLast(),s=i.from,l=i.to,u=s.col,h=l.col;u>=h&&(u=l.col,h=s.col),this.currentCol>=u&&this.currentCol<=h?(0,c.rangeEach)(u,h,(function(e){return t.selectedCols.push(e)})):this.selectedCols.push(this.currentCol)}else this.selectedCols.push(this.currentCol);this.startOffset=r.left-6,this.startWidth=parseInt(r.width,10),this.handle.style.top=r.top+"px",this.handle.style.left=this.startOffset+this.startWidth+"px",this.handle.style.height=o+"px",this.hot.rootElement.appendChild(this.handle)}}},{key:"refreshHandlePosition",value:function(){this.handle.style.left=this.startOffset+this.currentWidth+"px"}},{key:"setupGuidePosition",value:function(){var e=parseInt((0,a.outerHeight)(this.handle),10),t=parseInt(this.handle.style.top,10)+e,n=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);(0,a.addClass)(this.handle,"active"),(0,a.addClass)(this.guide,"active"),this.guide.style.top=t+"px",this.guide.style.left=this.handle.style.left,this.guide.style.height=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,a.removeClass)(this.handle,"active"),(0,a.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,o){var r=e.hot.runHooks("beforeColumnResize",n,e.newSize,!0);void 0!==r&&(e.newSize=r),"all"===e.hot.getSettings().stretchH?e.clearManualSize(n):e.setManualSize(n,e.newSize),o&&t(),e.saveManualColumnWidths(),e.hot.runHooks("afterColumnResize",n,e.newSize,!0)};this.dblclick>=2&&(this.selectedCols.length>1?((0,u.arrayEach)(this.selectedCols,(function(e){n(e)})),t()):(0,u.arrayEach)(this.selectedCols,(function(e){n(e,!0)}))),this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(e){var t=this;(0,a.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,l.pageX)(e),this.newSize=this.startWidth)}},{key:"onMouseMove",value:function(e){var t=this;this.pressed&&(this.currentWidth=this.startWidth+((0,l.pageX)(e)-this.startX),(0,u.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,o){e.hot.runHooks("beforeColumnResize",n,e.newSize,!1),o&&t(),e.saveManualColumnWidths(),e.hot.runHooks("afterColumnResize",n,e.newSize)};this.pressed&&(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startWidth&&(this.selectedCols.length>1?((0,u.arrayEach)(this.selectedCols,(function(e){n(e)})),t()):(0,u.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),o=this.hot.runHooks("modifyCol",e);return this.manualColumnWidths[o]=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 o=this.hot.runHooks("modifyCol",t),r=this.manualColumnWidths[o];this.hot.getSettings().manualColumnResize&&r&&(n=r)}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}(i.default);(0,h.registerPlugin)("manualColumnResize",f),t.default=f},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=g(n(10)),a=g(n(16)),s=n(2),l=n(0),u=n(6),c=g(n(5)),h=n(8),d=g(n(345)),f=g(n(346)),p=g(n(347));function g(e){return e&&e.__esModule?e:{default:e}}n(348),a.default.getSingleton().register("beforeRowMove"),a.default.getSingleton().register("afterRowMove"),a.default.getSingleton().register("unmodifyRow");var v=new WeakMap,y="ht__manualRowMove",m="show-ui",w="on-moving--rows",C="after-selection--rows",b=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return v.set(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 d.default(n),n.eventManager=new c.default(n),n.backlight=new f.default(e),n.guideline=new p.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, 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),o(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,o,r){return e.onBeforeOnCellMouseDown(t,n,o,r)})),this.addHook("beforeOnCellMouseOver",(function(t,n,o,r){return e.onBeforeOnCellMouseOver(t,n,o,r)})),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,l.addClass)(this.hot.rootElement,y),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.onAfterPluginsInitialized(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){var e=this.hot.getSettings().manualRowMove;Array.isArray(e)&&this.rowsMapper.clearMap(),(0,l.removeClass)(this.hot.rootElement,y),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),r(t.prototype.__proto__||Object.getPrototypeOf(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,o=[].concat(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)}(e)),r=v.get(this),i=this.hot.runHooks("beforeRowMove",o,t);r.disallowMoving=!1===i,r.disallowMoving||((0,s.arrayEach)(e,(function(e,t,o){o[t]=n.rowsMapper.getValueByIndex(e)})),(0,s.arrayEach)(e,(function(e,o){var r=n.rowsMapper.getIndexByValue(e);r!==t&&n.rowsMapper.moveRow(r,t+o)})),this.rowsMapper.clearNull()),this.hot.runHooks("afterRowMove",o,t)}},{key:"changeSelection",value:function(e,t){this.hot.selectRows(e,t)}},{key:"getRowsHeight",value:function(e,t){for(var n=0,o=e;o<t;o++)n+=this.hot.view.wt.wtTable.getRowHeight(o)||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,o=e.to,r=Math.min(n.row,o.row),i=Math.max(n.row,o.row);return(0,u.rangeEach)(r,i,(function(e){t.push(e)})),t}},{key:"refreshPositions",value:function(){var e=v.get(this),t=e.target.coords,n=this.hot.view.wt.wtTable.getFirstVisibleRow(),o=this.hot.view.wt.wtTable.getLastVisibleRow(),r=this.hot.getSettings().fixedRowsTop,i=this.hot.countRows();t.row<r&&n>0&&this.hot.scrollViewportTo(n-1),t.row>=o&&o<i&&this.hot.scrollViewportTo(o+1,void 0,!0);var a=this.hot.view.wt.wtTable,s=e.target.TD,u=(0,l.offset)(this.hot.rootElement),c=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,t.row),h=e.target.eventPageY-u.top+a.holder.scrollTop,d=a.hider.offsetHeight,f=a.TBODY.offsetTop,p=this.backlight.getOffset().top,g=this.backlight.getSize().height;this.isFixedRowTop(t.row)&&(c+=a.holder.scrollTop),t.row<0?e.target.row=n>0?n-1:n:s.offsetHeight/2+c<=h?(e.target.row=t.row+1,c+=0===t.row?s.offsetHeight-1:s.offsetHeight):e.target.row=t.row;var y=h,m=c;h+g+p>=d?y=d-g-p:h+p<f&&(y=f+Math.abs(p)),c>=d-1&&(m=d-1);var w=0;this.hot.view.wt.wtOverlays.topOverlay&&(w=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.TABLE.offsetHeight),t.row>=r&&m-a.holder.scrollTop<w&&this.hot.scrollViewportTo(t.row),this.backlight.setPosition(y),this.guideline.setPosition(m)}},{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 o=e-1,r=[];(0,s.arrayEach)(this.rowsMapper._arrayMap,(function(e,t){e>o&&r.push(t)})),this.rowsMapper.removeItems(r)}}},{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){v.get(this).disallowMoving=void 0!==t}},{key:"onBeforeOnCellMouseDown",value:function(e,t,n,o){var r=this.hot.view.wt.wtTable,i=this.hot.selection.isSelectedByRowHeader(),a=this.hot.getSelectedRangeLast(),s=v.get(this);if(!a||!i||s.pressed||0!==e.button)return s.pressed=!1,s.rowsToMove.length=0,void(0,l.removeClass)(this.hot.rootElement,[w,m]);var u=this.guideline.isBuilt()&&!this.guideline.isAppended(),c=this.backlight.isBuilt()&&!this.backlight.isAppended();u&&c&&(this.guideline.appendTo(r.hider),this.backlight.appendTo(r.hider));var h=a.from,d=a.to,f=Math.min(h.row,d.row),p=Math.max(h.row,d.row);if(t.col<0&&t.row>=f&&t.row<=p){o.row=!0,s.pressed=!0,s.target.eventPageY=e.pageY,s.target.coords=t,s.target.TD=n,s.rowsToMove=this.prepareRowsToMoving();var g=r.holder.scrollLeft+this.hot.view.wt.wtViewport.getRowHeaderWidth();this.backlight.setPosition(null,g),this.backlight.setSize(r.hider.offsetWidth-g,this.getRowsHeight(f,p+1)),this.backlight.setOffset(-1*(this.getRowsHeight(f,t.row)+e.layerY),null),(0,l.addClass)(this.hot.rootElement,w),this.refreshPositions()}else(0,l.removeClass)(this.hot.rootElement,C),s.pressed=!1,s.rowsToMove.length=0}},{key:"onMouseMove",value:function(e){var t=v.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,o){var r=this.hot.getSelectedRangeLast(),i=v.get(this);r&&i.pressed&&(i.rowsToMove.indexOf(t.row)>-1?(0,l.removeClass)(this.hot.rootElement,m):(0,l.addClass)(this.hot.rootElement,m),o.row=!0,o.column=!0,o.cell=!0,i.target.coords=t,i.target.TD=n)}},{key:"onMouseUp",value:function(){var e=v.get(this),t=e.target.row,n=e.rowsToMove.length;if(e.pressed=!1,e.backlightHeight=0,(0,l.removeClass)(this.hot.rootElement,[w,m,C]),this.hot.selection.isSelectedByRowHeader()&&(0,l.addClass)(this.hot.rootElement,C),!(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 o=this.rowsMapper.getIndexByValue(e.rowsToMove[0]),r=this.rowsMapper.getIndexByValue(e.rowsToMove[n-1]);this.changeSelection(o,r)}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,u.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 o=this.rowsMapper.getValueByIndex(n);n=null===o?n:o}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(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(i.default);(0,h.registerPlugin)("ManualRowMove",b),t.default=b},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(94),a=(o=i)&&o.__esModule?o:{default:o},s=n(2),l=n(1),u=n(6),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.manualRowMove=t}return r(e,[{key:"createMap",value:function(e){var t=this,n=void 0===e?this._arrayMap.length:e;this._arrayMap.length=0,(0,u.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,s.arrayFilter)(this._arrayMap,(function(e){return null!==e}))}}]),e}();(0,l.mixin)(c,a.default),t.default=c},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},a=n(205),s=(o=a)&&o.__esModule?o:{default:o},l=n(0),u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),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,(t.__proto__||Object.getPrototypeOf(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, 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),r(t,[{key:"build",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"build",this).call(this),(0,l.addClass)(this._element,"ht__manualRowMove--backlight")}}]),t}(s.default);t.default=u},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},a=n(205),s=(o=a)&&o.__esModule?o:{default:o},l=n(0),u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),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,(t.__proto__||Object.getPrototypeOf(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, 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),r(t,[{key:"build",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"build",this).call(this),(0,l.addClass)(this._element,"ht__manualRowMove--guideline")}}]),t}(s.default);t.default=u},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=d(n(10)),a=n(0),s=d(n(5)),l=n(13),u=n(2),c=n(6),h=n(8);function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.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 s.default(n),n.pressed=null,n.dblclick=0,n.autoresizeTimeout=null,n.manualRowHeights=[],(0,a.addClass)(n.handle,"manualRowResizer"),(0,a.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, 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),o(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,o=this.loadManualRowHeights();void 0!==o?this.manualRowHeights=o:Array.isArray(n)?this.manualRowHeights=n:this.manualRowHeights=[],this.addHook("modifyRowHeight",(function(t,n){return e.onModifyRowHeight(t,n)})),this.bindEvents(),r(t.prototype.__proto__||Object.getPrototypeOf(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(){r(t.prototype.__proto__||Object.getPrototypeOf(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,o=(0,a.outerWidth)(this.currentTH);if(n>=0){var r=this.currentTH.getBoundingClientRect();if(this.currentRow=n,this.selectedRows=[],this.hot.selection.isSelected()&&this.hot.selection.isSelectedByRowHeader()){var i=this.hot.getSelectedRangeLast(),s=i.from,l=i.to,u=s.row,h=l.row;u>=h&&(u=l.row,h=s.row),this.currentRow>=u&&this.currentRow<=h?(0,c.rangeEach)(u,h,(function(e){return t.selectedRows.push(e)})):this.selectedRows.push(this.currentRow)}else this.selectedRows.push(this.currentRow);this.startOffset=r.top-6,this.startHeight=parseInt(r.height,10),this.handle.style.left=r.left+"px",this.handle.style.top=this.startOffset+this.startHeight+"px",this.handle.style.width=o+"px",this.hot.rootElement.appendChild(this.handle)}}},{key:"refreshHandlePosition",value:function(){this.handle.style.top=this.startOffset+this.currentHeight+"px"}},{key:"setupGuidePosition",value:function(){var e=parseInt((0,a.outerWidth)(this.handle),10),t=parseInt(this.handle.style.left,10)+e,n=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);(0,a.addClass)(this.handle,"active"),(0,a.addClass)(this.guide,"active"),this.guide.style.top=this.handle.style.top,this.guide.style.left=t+"px",this.guide.style.width=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,a.removeClass)(this.handle,"active"),(0,a.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,o){var r=e.hot.runHooks("beforeRowResize",n,e.newSize,!0);void 0!==r&&(e.newSize=r),e.setManualSize(n,e.newSize),o&&t(),e.hot.runHooks("afterRowResize",n,e.newSize,!0)};this.dblclick>=2&&(this.selectedRows.length>1?((0,u.arrayEach)(this.selectedRows,(function(e){n(e)})),t()):(0,u.arrayEach)(this.selectedRows,(function(e){n(e,!0)}))),this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(e){var t=this;(0,a.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,l.pageY)(e),this.newSize=this.startHeight)}},{key:"onMouseMove",value:function(e){var t=this;this.pressed&&(this.currentHeight=this.startHeight+((0,l.pageY)(e)-this.startY),(0,u.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,o){e.hot.runHooks("beforeRowResize",n,e.newSize),o&&t(),e.saveManualRowHeights(),e.hot.runHooks("afterRowResize",n,e.newSize,!1)};this.pressed&&(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startHeight&&(this.selectedRows.length>1?((0,u.arrayEach)(this.selectedRows,(function(e){n(e)})),t()):(0,u.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"),o=n?n.heights[t]:null,r=this.hot.runHooks("modifyRow",t),i=this.manualRowHeights[r];if(void 0!==i&&(i===o||i>(e||0)))return i}return e}}]),t}(i.default);(0,h.registerPlugin)("manualRowResize",f),t.default=f},function(e,t,n){"use strict";t.__esModule=!0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},a=b(n(10)),s=b(n(16)),l=n(8),u=n(13),c=n(4),h=b(n(351)),d=b(n(97)),f=b(n(352)),p=b(n(353)),g=b(n(354)),v=n(2),y=n(1),m=n(58),w=n(6),C=n(206);function b(e){return e&&e.__esModule?e:{default:e}}function E(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)}n(355),s.default.getSingleton().register("beforeMergeCells"),s.default.getSingleton().register("afterMergeCells"),s.default.getSingleton().register("beforeUnmergeCells"),s.default.getSingleton().register("afterUnmergeCells");var S=new WeakMap,O=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return S.set(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, 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),r(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().mergeCells}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.mergedCellsCollection=new h.default(this),this.autofillCalculations=new f.default(this),this.selectionCalculations=new p.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)})),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.clearCollections(),this.hot.render(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){var e=this.hot.getSettings().mergeCells;this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(e),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"validateSetting",value:function(e){var t=!0;return!!e&&(d.default.containsNegativeValues(e)?((0,m.warn)(d.default.NEGATIVE_VALUES_WARNING(e)),t=!1):d.default.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?((0,m.warn)(d.default.IS_OUT_OF_BOUNDS_WARNING(e)),t=!1):d.default.isSingleCell(e)?((0,m.warn)(d.default.IS_SINGLE_CELL(e)),t=!1):d.default.containsZeroSpan(e)&&((0,m.warn)(d.default.ZERO_SPAN_WARNING(e)),t=!1),t)}},{key:"generateFromSettings",value:function(e){var t=this;if(Array.isArray(e)){var n,o=[];(0,v.arrayEach)(e,(function(e){if(t.validateSetting(e)){var n=new c.CellCoords(e.row,e.col),r=new c.CellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),i=new c.CellRange(n,n,r);o.push(t.mergeRange(i,!0,!0))}})),o=o.filter((function(e){return!0!==e}));var r=this.getBulkCollectionData(o);(n=this.hot).populateFromArray.apply(n,E(r))}}},{key:"getBulkCollectionData",value:function(e){var t,n=this.getBulkCollectionDataRange(e),r=(t=this.hot).getData.apply(t,E(n)).splice(0);return(0,v.arrayEach)(e,(function(e){var t=o(e,3),i=t[0],a=t[1],s=t[2];(0,v.arrayEach)(s,(function(e,t){(0,v.arrayEach)(e,(function(e,o){r[i-n[0]+t][a-n[1]+o]=e}))}))})),[n[0],n[1],r]}},{key:"getBulkCollectionDataRange",value:function(e){var t=[0,0],n=[0,0],o=null,r=null,i=null;return(0,v.arrayEach)(e,(function(e){o=e[0],r=e[1],i=e[2],t[0]=Math.min(o,t[0]),t[1]=Math.min(r,t[1]),n[0]=Math.max(o+i.length-1,n[0]),n[1]=Math.max(r+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],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.getTopLeftCorner(),i=e.getBottomRightCorner(),a={row:r.row,col:r.col,rowspan:i.row-r.row+1,colspan:i.col-r.col+1},s=[],l=null;return!!this.canMergeRange(a,n)&&(this.hot.runHooks("beforeMergeCells",e,n),(0,w.rangeEach)(0,a.rowspan-1,(function(e){(0,w.rangeEach)(0,a.colspan-1,(function(n){var o=null;s[e]||(s[e]=[]),0===e&&0===n?o=t.hot.getDataAtCell(a.row,a.col):t.hot.setCellMeta(a.row+e,a.col+n,"hidden",!0),s[e][n]=o}))})),this.hot.setCellMeta(a.row,a.col,"spanned",!0),!this.mergedCellsCollection.add(a)||(o?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],o=this.mergedCellsCollection.getWithinRange(e);o&&(this.hot.runHooks("beforeUnmergeCells",e,n),(0,v.arrayEach)(o,(function(e){t.mergedCellsCollection.remove(e.row,e.col),(0,w.rangeEach)(0,e.rowspan-1,(function(n){(0,w.rangeEach)(0,e.colspan-1,(function(o){t.hot.removeCellMeta(e.row+n,e.col+o,"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,o){var r=new c.CellCoords(e,t),i=new c.CellCoords(n,o);this.mergeRange(new c.CellRange(r,r,i))}},{key:"unmerge",value:function(e,t,n,o){var r=new c.CellCoords(e,t),i=new c.CellCoords(n,o);this.unmergeRange(new c.CellRange(r,r,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,u.stopImmediatePropagation)(e))}},{key:"onAfterIsMultipleSelection",value:function(e){if(e)for(var t=this.mergedCellsCollection.mergedCells,n=this.hot.getSelectedRangeLast(),o=0;o<t.length;o+=1)if(n.highlight.row===t[o].row&&n.highlight.col===t[o].col&&n.to.row===t[o].row+t[o].rowspan-1&&n.to.col===t[o].col+t[o].colspan-1)return!1;return e}},{key:"onModifyTransformStart",value:function(e){var t,n=S.get(this),o=this.hot.getSelectedRangeLast(),r={row:e.row,col:e.col},i=new c.CellCoords(o.highlight.row,o.highlight.col),a=this.mergedCellsCollection.get(i.row,i.col);if(n.lastDesiredCoords||(n.lastDesiredCoords=new c.CellCoords(null,null)),a){var s=new c.CellCoords(a.row,a.col),l=new c.CellCoords(a.row+a.rowspan-1,a.col+a.colspan-1);new c.CellRange(s,s,l).includes(n.lastDesiredCoords)||(n.lastDesiredCoords=new c.CellCoords(null,null)),r.row=n.lastDesiredCoords.row?n.lastDesiredCoords.row-i.row:r.row,r.col=n.lastDesiredCoords.col?n.lastDesiredCoords.col-i.col:r.col,e.row>0?r.row=a.row+a.rowspan-1-i.row+e.row:e.row<0&&(r.row=i.row-a.row+e.row),e.col>0?r.col=a.col+a.colspan-1-i.col+e.col:e.col<0&&(r.col=i.col-a.col+e.col)}t=new c.CellCoords(o.highlight.row+r.row,o.highlight.col+r.col);var u=this.mergedCellsCollection.get(t.row,t.col);u&&(n.lastDesiredCoords=t,r={row:u.row-i.row,col:u.col-i.col}),0!==r.row&&(e.row=r.row),0!==r.col&&(e.col=r.col)}},{key:"onModifyTransformEnd",value:function(e){var t=this,n=this.hot.getSelectedRangeLast(),o=(0,y.clone)(e),r=this.selectionCalculations.getUpdatedSelectionRange(n,e),i=(0,y.clone)(o),a=this.mergedCellsCollection.getWithinRange(r,!0);do{i=(0,y.clone)(o),this.selectionCalculations.getUpdatedSelectionRange(n,o),(0,v.arrayEach)(a,(function(e){t.selectionCalculations.snapDelta(o,n,e)}))}while(o.row!==i.row||o.col!==i.col);e.row=o.row,e.col=o.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,g.default)(this))}},{key:"onAfterRenderer",value:function(e,t,n){var o=this.mergedCellsCollection.get(t,n);(0,C.applySpanProperties)(e,o,t,n)}},{key:"onBeforeSetRangeEnd",value:function(e){var t=this.hot.getSelectedRangeLast();t.highlight=new c.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 o=0;o<this.mergedCellsCollection.mergedCells.length;o+=1){var r=this.mergedCellsCollection.mergedCells[o].getRange();t.expandByRange(r)&&(e.row=t.to.row,e.col=t.to.col,n=!0)}}while(n)}},{key:"onAfterGetCellMeta",value:function(e,t,n){var o=this.mergedCellsCollection.get(e,t);!o||o.row===e&&o.col===t||(n.copyable=!1)}},{key:"onAfterViewportRowCalculatorOverride",value:function(e){var t=this,n=this.hot.countCols(),o=void 0;(0,w.rangeEach)(0,n-1,(function(n){if((o=t.mergedCellsCollection.get(e.startRow,n))&&o.row<e.startRow)return e.startRow=o.row,t.onAfterViewportRowCalculatorOverride.call(t,e);if(o=t.mergedCellsCollection.get(e.endRow,n)){var r=o.row+o.rowspan-1;if(r>e.endRow)return e.endRow=r,t.onAfterViewportRowCalculatorOverride.call(t,e)}return!0}))}},{key:"onAfterViewportColumnCalculatorOverride",value:function(e){var t=this,n=this.hot.countRows(),o=void 0;(0,w.rangeEach)(0,n-1,(function(n){if((o=t.mergedCellsCollection.get(n,e.startColumn))&&o.col<e.startColumn)return e.startColumn=o.col,t.onAfterViewportColumnCalculatorOverride.call(t,e);if(o=t.mergedCellsCollection.get(n,e.endColumn)){var r=o.col+o.colspan-1;if(r>e.endColumn)return e.endColumn=r,t.onAfterViewportColumnCalculatorOverride.call(t,e)}return!0}))}},{key:"onModifyAutofillRange",value:function(e,t){this.autofillCalculations.correctSelectionAreaSize(t);var n=this.autofillCalculations.getDirection(t,e),o=e;if(this.autofillCalculations.dragAreaOverlapsCollections(t,o,n))return o=t;var r=this.mergedCellsCollection.getWithinRange({from:{row:t[0],col:t[1]},to:{row:t[2],col:t[3]}});return r?o=this.autofillCalculations.snapDragArea(t,o,n,r):o}},{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(),o=this.mergedCellsCollection.getWithinRange(n);(0,v.arrayEach)(o,(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 o=this.mergedCellsCollection.get(e.row,e.col);if(o){var r=t>0,i=t<0,a=n<0,s=n>0,l=o.row+o.rowspan-1==this.hot.countRows()-1,u=0===o.row,c=o.col+o.colspan-1==this.hot.countCols()-1,h=0===o.col;(r&&l||i&&u||s&&c||a&&h)&&(e.row=o.row,e.col=o.col)}}}},{key:"onAfterDrawSelection",value:function(e,t,n,o){return this.selectionCalculations.getSelectedMergedCellClassName(e,t,n,o)}},{key:"onBeforeRemoveCellClassNames",value:function(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}}]),t}(a.default);(0,l.registerPlugin)("mergeCells",O),t.default=O},function(e,t,n){"use strict";t.__esModule=!0;var o,r,i,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=(o=["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."],r=["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."],Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(r)}}))),l=n(97),u=(i=l)&&i.__esModule?i:{default:i},c=n(4),h=n(6),d=n(58),f=n(2),p=n(206),g=n(42);function v(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)}var y=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 a(e,[{key:"get",value:function(e,t){var n=this.mergedCells,o=!1;return(0,f.arrayEach)(n,(function(n){return!(n.row<=e&&n.row+n.rowspan-1>=e&&n.col<=t&&n.col+n.colspan-1>=t&&(o=n,1))})),o}},{key:"getByRange",value:function(e){var t=this.mergedCells,n=!1;return(0,f.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,o=[],r=e;if(!r.includesRange){var i=new c.CellCoords(r.from.row,r.from.col),a=new c.CellCoords(r.to.row,r.to.col);r=new c.CellRange(i,i,a)}return(0,f.arrayEach)(n,(function(e){var n=new c.CellCoords(e.row,e.col),i=new c.CellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),a=new c.CellRange(n,n,i);t?r.overlaps(a)&&o.push(e):r.includesRange(a)&&o.push(e)})),!!o.length&&o}},{key:"add",value:function(t){var n=this.mergedCells,o=t.row,r=t.col,i=t.rowspan,a=t.colspan,s=new u.default(o,r,i,a),l=this.get(o,r),c=this.isOverlapping(s);return l||c?((0,d.warn)(e.IS_OVERLAPPING_WARNING(s)),!1):(this.hot&&s.normalize(this.hot),n.push(s),s)}},{key:"remove",value:function(e,t){var n=this.mergedCells,o=this.get(e,t),r=o?this.mergedCells.indexOf(o):null;return!(!o||!1===r)&&(n.splice(r,1),o)}},{key:"clear",value:function(){var e=this,t=this.mergedCells,n=[],o=[];(0,f.arrayEach)(t,(function(t){var o=e.hot.getCell(t.row,t.col);o&&n.push([o,e.get(t.row,t.col),t.row,t.col])})),this.mergedCells.length=0,(0,f.arrayEach)(n,(function(t,r){(0,h.rangeEach)(0,t.rowspan-1,(function(n){(0,h.rangeEach)(0,t.colspan-1,(function(r){if(0!==r||0!==n){var i=e.hot.getCell(t.row+n,t.col+r);i&&o.push([i,null,null,null])}}))})),n[r][1]=null})),(0,f.arrayEach)(n,(function(e){p.applySpanProperties.apply(void 0,v(e))})),(0,f.arrayEach)(o,(function(e){p.applySpanProperties.apply(void 0,v(e))}))}},{key:"isOverlapping",value:function(e){var t=new c.CellRange(null,new c.CellCoords(e.row,e.col),new c.CellCoords(e.row+e.rowspan-1,e.col+e.colspan-1)),n=!1;return(0,f.arrayEach)(this.mergedCells,(function(e){return!new c.CellRange(null,new c.CellCoords(e.row,e.col),new c.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,o=!1;return(0,f.arrayEach)(n,(function(n){return n.row!==e||n.col!==t||(o=!0,!1)})),o}},{key:"shiftCollections",value:function(e,t,n){var o=this,r=[0,0];switch(e){case"right":r[0]+=n;break;case"left":r[0]-=n;break;case"down":r[1]+=n;break;case"up":r[1]-=n}(0,f.arrayEach)(this.mergedCells,(function(e){e.shift(r,t)})),(0,h.rangeEachReverse)(this.mergedCells.length-1,0,(function(e){var t=o.mergedCells[e];t&&t.removed&&o.mergedCells.splice(o.mergedCells.indexOf(t),1)}))}}],[{key:"IS_OVERLAPPING_WARNING",value:function(e){return(0,g.toSingleLine)(s,e.row,e.col)}}]),e}();t.default=y},function(e,t,n){"use strict";t.__esModule=!0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(1),a=n(4),s=n(2),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 r(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 i=t.slice(0),a=this.getAutofillSize(e,t,n),s=o(e,4),l=s[0],u=s[1],c=s[2],h=s[3],d=["up","down"].indexOf(n)>-1?c-l+1:h-u+1,f=a-Math.floor(a/d)*d,p=this.getFarthestCollection(e,t,n,r);if(p)if("down"===n){var g=p.row+p.rowspan-l-f;i[2]+g>=this.plugin.hot.countRows()?i[2]-=f:i[2]+=f?g:0}else if("right"===n){var v=p.col+p.colspan-u-f;i[3]+v>=this.plugin.hot.countCols()?i[3]-=f:i[3]+=f?v:0}else if("up"===n){var y=c-f-p.row+1;i[0]+y<0?i[0]+=f:i[0]-=f?y:0}else if("left"===n){var m=h-f-p.col+1;i[1]+m<0?i[1]+=f:i[1]-=f?m:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:n,foundMergedCells:r,fillSize:a,dragArea:i,cycleLength:d}),i}},{key:"updateCurrentFillCache",value:function(e){this.currentFillData||(this.currentFillData={}),(0,i.extend)(this.currentFillData,e)}},{key:"getAutofillSize",value:function(e,t,n){var r=o(e,4),i=r[0],a=r[1],s=r[2],l=r[3],u=o(t,4),c=u[0],h=u[1],d=u[2],f=u[3];switch(n){case"up":return i-c;case"down":return d-s;case"left":return a-h;case"right":return f-l;default:return null}}},{key:"getDragArea",value:function(e,t,n){var r=o(e,4),i=r[0],a=r[1],s=r[2],l=r[3],u=o(t,4),c=u[0],h=u[1],d=u[2],f=u[3];switch(n){case"up":return[c,h,i-1,l];case"down":return[s+1,a,d,l];case"left":return[c,h,s,a-1];case"right":return[i,l+1,d,f];default:return null}}},{key:"getFarthestCollection",value:function(e,t,n,r){var i=o(e,4),a=i[0],l=i[1],u=i[2],c=i[3],h=["up","down"].indexOf(n)>-1,d=h?u:c,f=h?a:l,p=this.getAutofillSize(e,t,n),g=h?u-a+1:c-l+1,v=p-Math.floor(p/g)*g,y=null,m=null,w=null;switch(n){case"up":y="includesVertically",w=d-v+1;break;case"left":y="includesHorizontally",w=d-v+1;break;case"down":y="includesVertically",w=f+v-1;break;case"right":y="includesHorizontally",w=f+v-1}return(0,s.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,o=this.currentFillData.dragDirection,r=function(e,n){switch(o){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(r(a=n[l],i=s*this.currentFillData.cycleLength))switch(o){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(r(a,i));this.currentFillData=null,this.plugin.hot.render()}}},{key:"getRangeFromChanges",value:function(e){var t={min:null,max:null},n={min:null,max:null};return(0,s.arrayEach)(e,(function(e){(null===t.min||e[0]<t.min)&&(t.min=e[0]),(null===t.max||e[0]>t.max)&&(t.max=e[0]),(null===n.min||e[1]<n.min)&&(n.min=e[1]),(null===n.max||e[1]>n.max)&&(n.max=e[1])})),{from:{row:t.min,column:n.min},to:{row:t.max,column:n.max}}}},{key:"dragAreaOverlapsCollections",value:function(e,t,n){var r=this.getDragArea(e,t,n),i=o(r,4),s=i[0],l=i[1],u=i[2],c=i[3],h=new a.CellCoords(s,l),d=new a.CellCoords(u,c),f=new a.CellRange(h,h,d);return!!this.mergedCellsCollection.getWithinRange(f,!0)}}]),e}();t.default=l},function(e,t,n){"use strict";t.__esModule=!0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(4),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 r(e,[{key:"snapDelta",value:function(e,t,n){var o=t.to,r=o.row+e.row,i=o.col+e.col;e.row?this.jumpOverMergedCell(e,n,r):e.col&&this.jumpOverMergedCell(e,n,i)}},{key:"jumpOverMergedCell",value:function(e,t,n){var o=e.row||e.col,r=null,i=null,a=null;e.row?(r=t.includesVertically(n),i=t.row,a=t.getLastRow()):e.col&&(r=t.includesHorizontally(n),i=t.col,a=t.getLastColumn()),0!==o&&(o>0?r&&n!==i&&(o+=a-n+1):r&&n!==a&&(o-=n-i+1),e.row?e.row=o:e.col&&(e.col=o))}},{key:"getUpdatedSelectionRange",value:function(e,t){return new i.CellRange(e.highlight,e.from,new i.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 this.fullySelectedMergedCellClassName+"-"+r;if(this.plugin.selectionCalculations.isMergeCellFullySelected(c,this.plugin.hot.getSelectedRange()))return 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 r=0;r<e.colspan;r+=1)n.push(new i.CellCoords(e.row+o,e.col+r));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(this.fullySelectedMergedCellClassName+"-"+t);return e.push(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();return!e||a.default.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1})||this.selection.isSelectedByCorner()},hidden:!1}};var o,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(7)),i=n(97),a=(o=i)&&o.__esModule?o:{default:o}},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=n(0),a=n(39),s=h(n(10)),l=h(n(5)),u=n(8),c=n(4);function h(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.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, 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),o(t,[{key:"isEnabled",value:function(){return(0,a.isMobileBrowser)()}},{key:"enablePlugin",value:function(){this.enabled||(this.eventManager||(this.eventManager=new l.default(this)),this.registerListeners(),r(t.prototype.__proto__||Object.getPrototypeOf(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=void 0;return(0,i.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,i.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,i.hasClass)(n.target,"topLeftSelectionHandle-HitArea")?(t.call(e,"topLeft"),e.touchStartRange=void 0,n.preventDefault(),!1):(0,i.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=(0,i.getWindowScrollTop)(),o=(0,i.getWindowScrollLeft)(),r=void 0,a=void 0,s=void 0,l=void 0,u=void 0,c=void 0;if(0!==e.dragged.length){var h=document.elementFromPoint(t.touches[0].screenX-o,t.touches[0].screenY-n);h&&h!==e.lastSetCell&&("TD"!==h.nodeName&&"TH"!==h.nodeName||(-1===(r=e.hot.getCoords(h)).col&&(r.col=0),s=(a=e.hot.getSelectedRangeLast()).getWidth(),l=a.getHeight(),u=a.getDirection(),1===s&&1===l&&e.hot.selection.setRangeEnd(r),null!==(c=e.getCurrentRangeCoords(a,r,e.touchStartRange.direction,u,e.dragged[0])).start&&e.hot.selection.setRangeStart(c.start),e.hot.selection.setRangeEnd(c.end),e.lastSetCell=h),t.preventDefault())}}))}},{key:"getCurrentRangeCoords",value:function(e,t,n,o,r){var i=e.getTopLeftCorner(),a=e.getBottomRightCorner(),s=e.getBottomLeftCorner(),l=e.getTopRightCorner(),u={start:null,end:null};switch(n){case"NE-SW":switch(o){case"NE-SW":case"NW-SE":u="topLeft"===r?{start:new c.CellCoords(t.row,e.highlight.col),end:new c.CellCoords(s.row,t.col)}:{start:new c.CellCoords(e.highlight.row,t.col),end:new c.CellCoords(t.row,i.col)};break;case"SE-NW":"bottomRight"===r&&(u={start:new c.CellCoords(a.row,t.col),end:new c.CellCoords(t.row,i.col)})}break;case"NW-SE":switch(o){case"NE-SW":"topLeft"===r?u={start:t,end:s}:u.end=t;break;case"NW-SE":"topLeft"===r?u={start:t,end:a}:u.end=t;break;case"SE-NW":"topLeft"===r?u={start:t,end:i}:u.end=t;break;case"SW-NE":"topLeft"===r?u={start:t,end:l}:u.end=t}break;case"SW-NE":switch(o){case"NW-SE":u="bottomRight"===r?{start:new c.CellCoords(t.row,i.col),end:new c.CellCoords(s.row,t.col)}:{start:new c.CellCoords(i.row,t.col),end:new c.CellCoords(t.row,a.col)};break;case"SW-NE":u="topLeft"===r?{start:new c.CellCoords(e.highlight.row,t.col),end:new c.CellCoords(t.row,a.col)}:{start:new c.CellCoords(t.row,i.col),end:new c.CellCoords(i.row,t.col)};break;case"SE-NW":"bottomRight"===r?u={start:new c.CellCoords(t.row,l.col),end:new c.CellCoords(i.row,t.col)}:"topLeft"===r&&(u={start:s,end:t})}break;case"SE-NW":switch(o){case"NW-SE":case"NE-SW":case"SW-NE":"topLeft"===r&&(u.end=t);break;case"SE-NW":"topLeft"===r?u.end=t:u={start:t,end:i}}}return u}},{key:"isDragged",value:function(){return this.dragged.length>0}}]),t}(s.default);(0,u.registerPlugin)("multipleSelectionHandles",d),t.default=d},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=u(n(10)),a=u(n(358)),s=n(2),l=n(8);function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.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, 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),o(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().observeChanges}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.observer||(this.observer=new a.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)})),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.observer&&(this.observer.destroy(),this.observer=null,this._deletePublicApi()),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"onDataChange",value:function(e){var t=this;if(!this.observer.isPaused()){var n=this.pluginName+".change",o={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,s.arrayEach)(e,(function(e){o[e.op]&&o[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()),r(t.prototype.__proto__||Object.getPrototypeOf(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}(i.default);t.default=c,(0,l.registerPlugin)("observeChanges",c)},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=l(n(359)),i=l(n(47)),a=n(1),s=n(360);function l(e){return e&&e.__esModule?e:{default:e}}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 o(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,s.cleanPatches)(e))}},{key:"destroy",value:function(){r.default.unobserve(this.observedData,this.observer),this.observedData=null,this.observer=null}}]),e}();(0,a.mixin)(u,i.default),t.default=u},function(e,t,n){"use strict";var o,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},i=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function o(){this.constructor=e}e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=Error;!function(e){var t=function(e){if(c(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);for(var o in t=[],e)e.hasOwnProperty(o)&&t.push(o);return t};function n(e,o){switch(void 0===e?"undefined":r(e)){case"undefined":case"boolean":case"string":case"number":return e===o;case"object":if(null===e)return null===o;if(c(e)){if(!c(o)||e.length!==o.length)return!1;for(var i=0,a=e.length;i<a;i++)if(!n(e[i],o[i]))return!1;return!0}var s=t(o).length;if(t(e).length!==s)return!1;for(i=0;i<s;i++)if(!n(e[i],o[i]))return!1;return!0;default:return!1}}var o={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 o={op:"_get",path:this.from};return m(n,[o]),m(n,[{op:"remove",path:this.from}]),m(n,[{op:"add",path:this.path,value:o.value}]),!0},copy:function(e,t,n){var o={op:"_get",path:this.from};return m(n,[o]),m(n,[{op:"add",path:this.path,value:o.value}]),!0},test:function(e,t){return n(e[t],this.value)},_get:function(e,t){this.value=e[t]}},s={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:o.move,copy:o.copy,test:o.test,_get:o._get},l={add:function(e){for(var t in l.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)&&o.remove.call(this,e,t);return!0},replace:function(e){return m(e,[{op:"remove",path:this.path}]),m(e,[{op:"add",path:this.path,value:this.value}]),!0},move:o.move,copy:o.copy,test:function(e){return JSON.stringify(e)===JSON.stringify(this.value)},_get:function(e){this.value=e}};function u(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}var c,h=[],d=function(e){this.observers=[],this.obj=e},f=function(e,t){this.callback=e,this.observer=t};function p(e){return"object"===(void 0===e?"undefined":r(e))?JSON.parse(JSON.stringify(e)):e}function g(e){for(var t,n=0,o=h.length;n<o;n++)if(h[n].obj===e.object){t=h[n];break}v(t.value,e.object,e.patches,""),e.patches.length&&m(t.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function v(e,n,o,i){for(var a=t(n),s=t(e),l=!1,c=s.length-1;c>=0;c--){var h=e[f=s[c]];if(n.hasOwnProperty(f)){var d=n[f];"object"==(void 0===h?"undefined":r(h))&&null!=h&&"object"==(void 0===d?"undefined":r(d))&&null!=d?v(h,d,o,i+"/"+u(f)):h!=d&&o.push({op:"replace",path:i+"/"+u(f),value:p(d)})}else o.push({op:"remove",path:i+"/"+u(f)}),l=!0}if(l||a.length!=s.length)for(c=0;c<a.length;c++){var f=a[c];e.hasOwnProperty(f)||o.push({op:"add",path:i+"/"+u(f),value:p(n[f])})}}function y(e){for(var t,n=0,o=e.length;n<o;){if(!((t=e.charCodeAt(n))>=48&&t<=57))return!1;n++}return!0}function m(e,t,n){for(var r,i,a=!1,u=0,h=t.length;u<h;){r=t[u],u++;for(var d=(r.path||"").split("/"),f=e,p=1,g=d.length,v=void 0;;){if(i=d[p],n&&void 0===v&&(void 0===f[i]?v=d.slice(0,p).join("/"):p==g-1&&(v=r.path),void 0!==v&&this.validator(r,u-1,e,v)),p++,void 0===i&&p>=g){a=l[r.op].call(r,f,i,e);break}if(c(f)){if("-"===i)i=f.length;else{if(n&&!y(i))throw new w("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",u-1,r.path,r);i=parseInt(i,10)}if(p>=g){if(n&&"add"===r.op&&i>f.length)throw new w("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",u-1,r.path,r);a=s[r.op].call(r,f,i,e);break}}else if(i&&-1!=i.indexOf("~")&&(i=i.replace(/~1/g,"/").replace(/~0/g,"~")),p>=g){a=o[r.op].call(r,f,i,e);break}f=f[i]}}return a}e.unobserve=function(e,t){t.unobserve()},e.observe=function(e,t){var n,o=function(e){for(var t=0,n=h.length;t<n;t++)if(h[t].obj===e)return h[t]}(e);if(o?n=function(e,t){for(var n=0,o=e.observers.length;n<o;n++)if(e.observers[n].callback===t)return e.observers[n].observer}(o,t):(o=new d(e),h.push(o)),n)return n;if(n={},o.value=p(e),t){n.callback=t,n.next=null;var r=this.intervals||[100,1e3,1e4,6e4];if(void 0===r.push)throw new a("jsonpatch.intervals must be an array");var i=0,s=function(){g(n)},l=function(){clearTimeout(n.next),n.next=setTimeout((function(){s(),i=0,n.next=setTimeout(u,r[i++])}),0)},u=function e(){s(),i==r.length&&(i=r.length-1),n.next=setTimeout(e,r[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,r[i++])}return n.patches=[],n.object=e,n.unobserve=function(){g(n),clearTimeout(n.next),function(e,t){for(var n=0,o=e.observers.length;n<o;n++)if(e.observers[n].observer===t)return void e.observers.splice(n,1)}(o,n),"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)))},o.observers.push(new f(t,n)),n},e.generate=g,c=Array.isArray?Array.isArray:function(e){return e.push&&"number"==typeof e.length},e.apply=m,e.compare=function(e,t){var n=[];return v(e,t,n,""),n};var w=function(e){function t(t,n,o,r,i){e.call(this,t),this.message=t,this.name=n,this.index=o,this.operation=r,this.tree=i}return i(t,e),t}(a);function C(e){if(void 0===e)return!0;if("array"==typeof e||"object"==(void 0===e?"undefined":r(e)))for(var t in e)if(C(e[t]))return!0;return!1}e.JsonPatchError=w,e.Error=w,e.validator=function(t,n,i,a){if("object"!==(void 0===t?"undefined":r(t))||null===t||c(t))throw new w("Operation is not an object","OPERATION_NOT_AN_OBJECT",n,t,i);if(!o[t.op])throw new w("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",n,t,i);if("string"!=typeof t.path)throw new w("Operation `path` property is not a string","OPERATION_PATH_INVALID",n,t,i);if(("move"===t.op||"copy"===t.op)&&"string"!=typeof t.from)throw new w("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",n,t,i);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&void 0===t.value)throw new w("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",n,t,i);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&C(t.value))throw new w("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",n,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 w("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",n,t,i)}else if("replace"===t.op||"remove"===t.op||"_get"===t.op){if(t.path!==a)throw new w("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",n,t,i)}else if("move"===t.op||"copy"===t.op){var u={op:"_get",path:t.from,value:void 0},h=e.validate([u],i);if(h&&"OPERATION_PATH_UNRESOLVABLE"===h.name)throw new w("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",n,t,i)}},e.validate=function(e,t){try{if(!c(e))throw new w("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)t=JSON.parse(JSON.stringify(t)),m.call(this,t,e,!0);else for(var n=0;n<e.length;n++)this.validator(e[n],n)}catch(e){if(e instanceof w)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;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};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(2);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;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},a=n(10),s=(o=a)&&o.__esModule?o:{default:o},l=n(8),u=n(1),c=n(6),h=n(11),d=function(e,t,n,o,r){e.getCellMeta(t,n).isSearchResult=r},f=function(e,t){return!((0,h.isUndefined)(e)||null===e||!e.toLowerCase||0===e.length||(0,h.isUndefined)(t)||null===t||-1===t.toString().toLowerCase().indexOf(e.toLowerCase()))},p=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.callback=d,n.queryMethod=f,n.searchResultClass="htSearchResult",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),r(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)})),i(t.prototype.__proto__||Object.getPrototypeOf(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)})),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),i(t.prototype.__proto__||Object.getPrototypeOf(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(),o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod(),r=this.hot.countRows(),i=this.hot.countCols(),a=[],s=this.hot;return(0,c.rangeEach)(0,r-1,(function(r){(0,c.rangeEach)(0,i-1,(function(i){var l=t.hot.getDataAtCell(r,i),u=t.hot.getCellMeta(r,i),c=u.search.callback||n,h=(u.search.queryMethod||o)(e,l);if(h){var d={row:r,col:i,data:l};a.push(d)}c&&c(s,r,i,l,h)}))})),a}},{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,u.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,o,r,i){var a,s=i.className||[],l=[];"string"==typeof s?l=s.split(" "):(a=l).push.apply(a,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)}(s)),this.isEnabled()&&i.isSearchResult?l.includes(this.searchResultClass)||l.push(""+this.searchResultClass):l.includes(this.searchResultClass)&&l.splice(l.indexOf(this.searchResultClass),1),i.className=l.join(" ")}},{key:"destroy",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(s.default);(0,l.registerPlugin)("search",p),t.default=p},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},a=n(0),s=n(2),l=n(10),u=(o=l)&&o.__esModule?o:{default:o},c=n(8),h=n(40),d=function(e){function t(e){!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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.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, 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),r(t,[{key:"isEnabled",value:function(){return(0,h.isTouchSupported)()}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("afterRender",(function(){return e.onAfterRender()})),this.registerEvents(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.lockedCollection=!1,i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(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,o=e.leftOverlay,r=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(o),r&&this.scrollbars.push(r),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),o.needFullRender&&this.clones.push(o.clone.wtTable.holder.parentNode),r&&this.clones.push(r.clone.wtTable.holder.parentNode),i&&i.clone&&this.clones.push(i.clone.wtTable.holder.parentNode)}}},{key:"onBeforeTouchScroll",value:function(){this.freezeOverlays=!0,(0,s.arrayEach)(this.clones,(function(e){(0,a.addClass)(e,"hide-tween")}))}},{key:"onAfterMomentumScroll",value:function(){var e=this;this.freezeOverlays=!1,(0,s.arrayEach)(this.clones,(function(e){(0,a.removeClass)(e,"hide-tween"),(0,a.addClass)(e,"show-tween")})),setTimeout((function(){(0,s.arrayEach)(e.clones,(function(e){(0,a.removeClass)(e,"show-tween")}))}),400),(0,s.arrayEach)(this.scrollbars,(function(e){e.refresh(),e.resetFixedPosition()})),this.hot.view.wt.wtOverlays.syncScrollWithMaster()}}]),t}(u.default);(0,c.registerPlugin)("touchScroll",d),t.default=d},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(16),a=(o=i)&&o.__esModule?o:{default:o},s=n(2),l=n(6),u=n(1),c=n(13),h=n(19);function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(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)}function g(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 g.ChangeAction(e))})),e.addHook("afterCreateRow",(function(e,n,o){if("UndoRedo.undo"!==o&&"UndoRedo.undo"!==o&&"auto"!==o){var r=new g.CreateRowAction(e,n);t.done(r)}})),e.addHook("beforeRemoveRow",(function(e,n,o,r){if("UndoRedo.undo"!==r&&"UndoRedo.redo"!==r&&"auto"!==r){var i=t.instance.getSourceDataArray(),a=(i.length+e)%i.length,s=(0,u.deepClone)(i.slice(a,a+n));t.done(new g.RemoveRowAction(a,s))}})),e.addHook("afterCreateCol",(function(e,n,o){"UndoRedo.undo"!==o&&"UndoRedo.redo"!==o&&"auto"!==o&&t.done(new g.CreateColumnAction(e,n))})),e.addHook("beforeRemoveCol",(function(n,o,r,i){if("UndoRedo.undo"!==i&&"UndoRedo.redo"!==i&&"auto"!==i){var a=t.instance.getSourceDataArray(),s=(t.instance.countCols()+n)%t.instance.countCols(),u=[],c=[],h=[];(0,l.rangeEach)(a.length-1,(function(t){var n=[],r=a[t];(0,l.rangeEach)(s,s+(o-1),(function(t){n.push(r[e.runHooks("modifyCol",t)])})),u.push(n)})),(0,l.rangeEach)(o-1,(function(t){h.push(e.runHooks("modifyCol",s+t))})),Array.isArray(e.getSettings().colHeaders)&&(0,l.rangeEach)(o-1,(function(t){c.push(e.getSettings().colHeaders[e.runHooks("modifyCol",s+t)]||null)}));var d=t.instance.getPlugin("manualColumnMove"),f=d.isEnabled()?d.columnsMapper.__arrayMap:[],p=new g.RemoveColumnAction(s,h,u,c,f);t.done(p)}})),e.addHook("beforeCellAlignment",(function(e,n,o,r){var i=new g.CellAlignmentAction(e,n,o,r);t.done(i)})),e.addHook("beforeFilter",(function(e){t.done(new g.FiltersAction(e))})),e.addHook("beforeRowMove",(function(e,n){!1!==e&&t.done(new g.RowMoveAction(e,n))})),e.addHook("beforeMergeCells",(function(n,o){o||t.done(new g.MergeCellsAction(e,n))})),e.addHook("afterUnmergeCells",(function(n,o){o||t.done(new g.UnmergeCellsAction(e,n))}))}g.prototype.done=function(e){this.ignoreNewActions||(this.doneActions.push(e),this.undoneActions.length=0)},g.prototype.undo=function(){if(this.isUndoAvailable()){var e=this.doneActions.pop(),t=(0,u.deepClone)(e),n=this.instance;if(!1===n.runHooks("beforeUndo",t))return;this.ignoreNewActions=!0;var o=this;e.undo(this.instance,(function(){o.ignoreNewActions=!1,o.undoneActions.push(e)})),n.runHooks("afterUndo",t)}},g.prototype.redo=function(){if(this.isRedoAvailable()){var e=this.undoneActions.pop(),t=(0,u.deepClone)(e),n=this.instance;if(!1===n.runHooks("beforeRedo",t))return;this.ignoreNewActions=!0;var o=this;e.redo(this.instance,(function(){o.ignoreNewActions=!1,o.doneActions.push(e)})),n.runHooks("afterRedo",t)}},g.prototype.isUndoAvailable=function(){return this.doneActions.length>0},g.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},g.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},g.Action=function(){},g.Action.prototype.undo=function(){},g.Action.prototype.redo=function(){},g.ChangeAction=function(e){this.changes=e,this.actionType="change"},(0,u.inherit)(g.ChangeAction,g.Action),g.ChangeAction.prototype.undo=function(e,t){for(var n=(0,u.deepClone)(this.changes),o=e.countEmptyRows(!0),r=e.countEmptyCols(!0),i=0,a=n.length;i<a;i++)n[i].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtRowProp(n,null,null,"UndoRedo.undo");for(var s=0,l=n.length;s<l;s++)e.getSettings().minSpareRows&&n[s][0]+1+e.getSettings().minSpareRows===e.countRows()&&o===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(n[s][0]+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&n[s][1]+1+e.getSettings().minSpareCols===e.countCols()&&r===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(n[s][1]+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())},g.ChangeAction.prototype.redo=function(e,t){for(var n=(0,u.deepClone)(this.changes),o=0,r=n.length;o<r;o++)n[o].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtRowProp(n,null,null,"UndoRedo.redo")},g.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},(0,u.inherit)(g.CreateRowAction,g.Action),g.CreateRowAction.prototype.undo=function(e,t){var n=e.countRows(),o=e.getSettings().minSpareRows;this.index>=n&&this.index-o<n&&(this.index-=o),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},g.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row",this.index,this.amount,"UndoRedo.redo")},g.RemoveRowAction=function(e,t){this.index=e,this.data=t,this.actionType="remove_row"},(0,u.inherit)(g.RemoveRowAction,g.Action),g.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")},g.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},g.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},(0,u.inherit)(g.CreateColumnAction,g.Action),g.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},g.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col",this.index,this.amount,"UndoRedo.redo")},g.RemoveColumnAction=function(e,t,n,o,r){this.index=e,this.indexes=t,this.data=n,this.amount=this.data[0].length,this.headers=o,this.columnPositions=r.slice(0),this.actionType="remove_col"},(0,u.inherit)(g.RemoveColumnAction,g.Action),g.RemoveColumnAction.prototype.undo=function(e,t){var n,o=this,r=void 0,i=this.indexes.slice(0).sort(),a=function(e,t,n){return n[o.indexes.indexOf(i[t])]},u=[];(0,l.rangeEach)(this.data.length-1,(function(e){u[e]=(0,s.arrayMap)(o.data[e],a)})),n=(0,s.arrayMap)(this.headers,a);var c=[];e.runHooks("beforeCreateCol",this.indexes[0],this.indexes.length,"UndoRedo.undo"),(0,l.rangeEach)(this.data.length-1,(function(t){r=e.getSourceDataAtRow(t),(0,l.rangeEach)(i.length-1,(function(e){r.splice(i[e],0,u[t][e]),c.push([t,i[e],null,u[t][e]])}))})),e.getPlugin("formulas")&&e.getPlugin("formulas").onAfterSetDataAtCell(c),void 0!==this.headers&&(0,l.rangeEach)(n.length-1,(function(t){e.getSettings().colHeaders.splice(i[t],0,n[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()},g.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},g.CellAlignmentAction=function(e,t,n,o){this.stateBefore=e,this.range=t,this.type=n,this.alignment=o},g.CellAlignmentAction.prototype.undo=function(e,t){var n=this;(0,s.arrayEach)(this.range,(function(t){for(var o=t.from,r=t.to,i=o.row;i<=r.row;i+=1)for(var a=o.col;a<=r.col;a+=1)e.setCellMeta(i,a,"className",n.stateBefore[i][a]||" htLeft")})),e.addHookOnce("afterRender",t),e.render()},g.CellAlignmentAction.prototype.redo=function(e,t){(0,h.align)(this.range,this.type,this.alignment,(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,o,r){return e.setCellMeta(t,n,o,r)})),e.addHookOnce("afterRender",t),e.render()},g.FiltersAction=function(e){this.conditionsStack=e,this.actionType="filter"},(0,u.inherit)(g.FiltersAction,g.Action),g.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()},g.FiltersAction.prototype.redo=function(e,t){var n=e.getPlugin("filters");e.addHookOnce("afterRender",t),n.conditionCollection.importAllConditions(this.conditionsStack),n.filter()};var v=function(e){function t(e,n){d(this,t);var o=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.cellRange=n,o.rangeData=e.getData(n.from.row,n.from.col,n.to.row,n.to.col),o}return p(t,e),r(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}(g.Action);g.MergeCellsAction=v;var y=function(e){function t(e,n){d(this,t);var o=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.cellRange=n,o}return p(t,e),r(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}(g.Action);function m(){var e=this;void 0===e.getSettings().undo||e.getSettings().undo?e.undoRedo||(e.undoRedo=new g(e),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()}}(e),e.addHook("beforeKeyDown",w),e.addHook("afterChange",C)):e.undoRedo&&(delete e.undoRedo,function(e){delete e.undo,delete e.redo,delete e.isUndoAvailable,delete e.isRedoAvailable,delete e.clearUndo}(e),e.removeHook("beforeKeyDown",w),e.removeHook("afterChange",C))}function w(e){(e.ctrlKey||e.metaKey)&&!e.altKey&&(89===e.keyCode||e.shiftKey&&90===e.keyCode?(this.undoRedo.redo(),(0,c.stopImmediatePropagation)(e)):90===e.keyCode&&(this.undoRedo.undo(),(0,c.stopImmediatePropagation)(e)))}function C(e,t){if("loadData"===t)return this.undoRedo.clear()}g.UnmergeCellsAction=y,g.RowMoveAction=function(e,t){this.rows=e.slice(),this.target=t},(0,u.inherit)(g.RowMoveAction,g.Action),g.RowMoveAction.prototype.undo=function(e,t){var n=e.getPlugin("manualRowMove");e.addHookOnce("afterRender",t);for(var o=this.rows[0]<this.target?-1*this.rows.length:0,r=this.rows[0]>this.target?this.rows[0]+this.rows.length:this.rows[0],i=[],a=this.rows.length+o,s=o;s<a;s+=1)i.push(this.target+s);n.moveRows(i.slice(),r),e.render(),e.selectCell(this.rows[0],0,this.rows[this.rows.length-1],e.countCols()-1,!1,!1)},g.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 o=this.rows[0]<this.target?this.target-this.rows.length:this.target;e.selectCell(o,0,o+this.rows.length-1,e.countCols()-1,!1,!1)};var b=a.default.getSingleton();b.add("afterInit",m),b.add("afterUpdateSettings",m),b.register("beforeUndo"),b.register("afterUndo"),b.register("beforeRedo"),b.register("afterRedo"),t.default=g}]).default},e.exports=o(n(5093),n(3333),n(8823))}}]);