@refinitiv-ui/efx-grid 6.0.164 → 6.0.165
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/core/dist/core.js +8 -6
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.js +8 -6
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +12 -8
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.js +4 -2
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
(()=>{"use strict";let t={};t.isIE=function(){let t=window.navigator.userAgent;return t.indexOf("MSIE ")>0||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0}(),t.isTouchDevice=!!(navigator.maxTouchPoints&&navigator.maxTouchPoints<256||navigator.msMaxTouchPoints&&navigator.msMaxTouchPoints<256),t.isSafari=function(){let t=navigator.userAgent;return!/Chrome|Android|CriOS|FxiOS|EdgiOS/i.test(t)&&/Safari/i.test(t)}(),t.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),t.getElement=function(e){return t.isElement(e)?e:e&&t.isFunction(e.getElement)?e.getElement():null},t.isElement=function(t){return!!t&&1===t.nodeType},t.isEmpty=function(e,i){return null==e||void 0===e||!i&&""===e||t.isArray(e)&&0===e.length},t.isNumber=function(t){return"number"==typeof t&&isFinite(t)},t.isString=function(t){return"string"==typeof t},t.isArray=Array.isArray,t.isFunction=function(t){return"function"==typeof t},t.getClientPosition=function(t,e){let i=e||{};if(t.getBoundingClientRect){let e=t.getBoundingClientRect();i.x=e.left,i.y=e.top}else i.x=t.clientX,i.y=t.clientY;return i},t.getRelativePosition=function(e,i,o){o=t.getClientPosition(e,o);let n=t.getClientPosition(i);return o.x-=n.x,o.y-=n.y,o},t.moveArrayItem=function(t,e,i){if(!t)return null;let o=t.length;if(e>=o&&i>=o)return t;let n=t.splice(e,1)[0];return i<o?t.splice(i,0,n):t[i]=n,t},t.pushArrayItems=function(t,e){let i=e?e.length:0;if(i>0)if(i<1e5)i>1?Array.prototype.push.apply(t,e):t.push(e[0]);else{let o=0,n=0;for(;o<i;)n+=1e5,Array.prototype.push.apply(t,e.slice(o,n)),o=n}return t},t.insertEmptyItems=function(e,i,o){if(o>0)if(o>1){let n=e.slice(i);e.length=i,e.length+=o,t.pushArrayItems(e,n)}else e.splice(i,0,null)},t.cycleArray=function(t,e){if(e>0&&t&&e<t.length){let i=t.splice(0,e);return t.concat(i)}return t||null},t.lowerBound=function(e,i,o,n,s){(null==o||o<0)&&(o=0),(null==n||n<0||n>e.length)&&(n=e.length),o>n&&(o=n),null==s&&(s=t._defaultLessComparator);let r=0;for(;n>o;)r=o+n>>1,s(e[r],i)?o=r+1:n=r;return o},t.upperBound=function(e,i,o,n,s){let r=t.lowerBound(e,i,o,n,s);for(;e[r]===i;)++r;return r},t.stringFormat=function(t){let e=Array.prototype.slice.call(arguments,1);return t.replace(/{(\d+)}/g,(function(t,i){return null!=e[i]?e[i]:t}))},t._defaultLessComparator=function(t,e){return t<e},t._deprecatedFunction=function(){console.warn("Calling deprecated method")},t.calculatePercent=function(t,e,i){if(!t&&0!==t||!e&&0!==e||!i&&0!==i)return NaN;if(i===t)return 50;let o=(e-t)/(i-t);return o<0?0:o>1?100:100*o},t.closestElement=function(t,e){let i=t;for(;i;){if(i.classList&&i.classList.contains(e))return i;i=i.parentNode||i.host}return null},t._preventDefault=function(t){t.preventDefault(),t.stopPropagation()};const e=t;let o=function(t){this.dispatch=this.dispatch.bind(this),this._listeners=[],this.setSender(t)};o.prototype.listen=function(t,i){if(t&&e.isFunction(t)&&this._listeners.indexOf(t)<0)if(null==i)this._listeners.push(t);else{t._priority=i;let n=e.lowerBound(this._listeners,t,0,this._listeners.length,o.listenerComparer);this._listeners.splice(n,0,t)}},o.prototype.unlisten=function(t){if(t){let e=this._listeners.indexOf(t);e>=0&&this._listeners.splice(e,1)}},o.prototype.unlistenAll=function(){this._listeners.length=0},o.prototype.getListenerCount=function(){return this._listeners.length},o.prototype.hasListener=function(){return this._listeners.length>0},o.prototype.dispatch=function(t){if(this._enabled&&!(this._listeners.length<=0)){this._dispatching&&window.console.log("WARNING: There is an error in one of your binding methods."),this._dispatching=!0,null==t&&(t={}),null!==this._sender&&(t.sender=this._sender),null!==this._extender&&this._extender(t);for(let e=0;e<this._listeners.length;e++)this._listeners[e](t);null!==this._sender&&(t.sender=null),this._dispatching=!1}},o.prototype.isDispatching=function(){return this._dispatching},o.prototype.isEnabled=function(){return this._enabled},o.prototype.enable=function(t){this._enabled=!1!==t},o.prototype.disable=function(t){this._enabled=!1===t},o.prototype.setSender=function(t){this._sender=t||null},o.prototype.setEventArgExtender=function(t){this._extender=null!=t?t:null},o.listenerComparer=function(t,e){return null==e._priority||t._priority>=e._priority},o.prototype._listeners=null,o.prototype._sender=null,o.prototype._extender=null,o.prototype._enabled=!0,o.prototype._dispatching=!1,o._proto=o.prototype;const n=o;let s=function(){};s.prototype._customEvents=null,s.prototype.listen=function(t,e,i){this._customEvents&&this._customEvents[t]&&this._customEvents[t].listen(e,i)},s.prototype.unlisten=function(t,e){this._customEvents&&this._customEvents[t]&&this._customEvents[t].unlisten(e)},s.prototype.unlistenAll=function(t){if(t)this._customEvents&&this._customEvents[t]&&this._customEvents[t].unlistenAll();else for(let t in this._customEvents)this._customEvents[t].unlistenAll()},s.prototype._addEvent=function(t){t&&(this._customEvents||(this._customEvents={}),this._customEvents[t]||(this._customEvents[t]=new n(this)))},s.prototype._addEvents=function(t){let e=Array.isArray(t)?t:arguments,i=e.length;for(let t=0;t<i;++t)this._addEvent(e[t])},s.prototype._isEventDispatching=function(t){let e=this._customEvents[t];return!!e&&e.isDispatching()},s.prototype._disableEvent=function(t,e){let i=this._customEvents[t];i&&i.disable(e)},s.prototype._hasListener=function(t){return!(!this._customEvents||!this._customEvents[t])&&this._customEvents[t].hasListener()},s.prototype._dispatch=function(t,e){this._customEvents[t].dispatch(e)},s._proto=s.prototype;const r=s;const l={inherits:function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.base=function(t,i,o){i||(i="constructor");let n=arguments.length,s=new Array(n);for(let t=2;t<n;t++)s[t-2]=arguments[t];return e.prototype[i].apply(t,s)}}};let h=function(t){this._element=t||document.createElement("div")};l.inherits(h,r),h.prototype._element=null,h.prototype._content=null,h.prototype._textSpan=null,h.prototype._nativeEvents=null,h._passiveEvents=null,h.prototype.getContent=function(t){return t?this._element.children:this._element.lastChild},h.prototype.setContent=function(t,i){if(null==t||t!=t?t=null:1!==t.nodeType&&11!==t.nodeType&&(null==t.getElement?(e.isString(t)||(t+=""),null==this._textSpan&&(this._textSpan=document.createElement("span")),this._textSpan.textContent=t,t=this._textSpan):t=t.getElement()),t!==this._content){for(this._content=t;null!==this._element.firstChild;)this._element.removeChild(this._element.firstChild);null!==this._content&&this._element.appendChild(this._content)}return i&&t&&t.setAttribute("title",i),this._content},h.prototype.addContent=function(t){return null==(t=e.getElement(t))?null:(this._content=this._element.children,this._element.appendChild(t),t)},h.prototype.removeContent=function(t){return null!=(t=e.getElement(t))&&(this._content=this._element.children,this._element.removeChild(t),!0)},h.prototype.listen=function(t,e,i){if(this._customEvents&&this._customEvents[t])return void this._customEvents[t].listen(e,i);this._nativeEvents||(this._nativeEvents={});let o=this._nativeEvents[t];if(!o){if(o=new n,this._nativeEvents[t]=o,o.dispatch=o.dispatch.bind(o),!h._passiveEvents){let t=!1;try{let e=Object.defineProperty({},"passive",{get:function(){return t=!0,!1}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(t){}if(t){let t={passive:!0};h._passiveEvents={touchstart:t,touchmove:t}}else h._passiveEvents={}}this._element.addEventListener(t,o.dispatch,h._passiveEvents[t]||!1)}o.listen(e,i)},h.prototype.unlisten=function(t,e){if(this._customEvents&&this._customEvents[t])this._customEvents[t].unlisten(e);else if(this._nativeEvents){let i=this._nativeEvents[t];i&&i.unlisten(e)}},h.prototype.unlistenAll=function(t){if(this._customEvents)if(t)this._customEvents[t]&&this._customEvents[t].unlistenAll();else for(let t in this._customEvents)this._customEvents[t].unlistenAll();if(this._nativeEvents)if(t)this._nativeEvents[t]&&(this._unlistenAll(t),delete this._nativeEvents[t]);else{for(let t in this._nativeEvents)this._unlistenAll(t);this._nativeEvents=null}},h.prototype._unlistenAll=function(t){let e=this._nativeEvents[t];this._element.removeEventListener(t,e.dispatch,!1),e.unlistenAll()},h.prototype.dispose=function(){this._dispose()},h.prototype._dispose=function(){this.setParent(null),this.unlistenAll(),this._element=this._content=this._textSpan=null,this._customEvents=this._nativeEvents=null},h.prototype.setEventArgExtender=function(t,e){if(this._customEvents){let i=this._customEvents[t];i&&i.setEventArgExtender(e)}},h.prototype.getElement=function(){return this._element},h.prototype.getNextSibling=function(){return this._element.nextSibling},h.prototype.getParent=function(){return this._element.parentNode},h.prototype.setParent=function(t,e){this._setParent(t,e)},h.prototype._setParent=function(t,i){null!==(t=e.getElement(t))?i?t.insertBefore(this._element,t.firstChild):t.appendChild(this._element):null!==this._element.parentNode&&this._element.parentNode.removeChild(this._element)},h.prototype.insertBefore=function(t){this._insertBefore(t)},h.prototype._insertBefore=function(t){if(null==(t=e.getElement(t)))return void this.setParent(this.getParent());let i=t.parentNode;null!=i&&i.insertBefore(this._element,t)},h.prototype.insertAfter=function(t){(t=e.getElement(t))?t.nextSibling?this.insertBefore(t.nextSibling):this.setParent(t.parentNode):this.setParent(this.getParent(),!0)},h.prototype.hasClass=function(t){return!!this._element&&this._element.classList.contains(t)},h.prototype.addClass=function(t){this._element&&this._element.classList.add(t)},h.prototype.removeClass=function(t){this._element&&this._element.classList.remove(t)},h.prototype.toggleClass=function(t,e){let i=this._element;i&&(null==e&&(e=!i.classList.contains(t)),e?i.classList.add(t):i.classList.remove(t))},h.prototype.enableClass=function(t,e){!1!==e?this.addClass(t):this.removeClass(t)},h.prototype.getClass=function(){return this._element.className},h.prototype.setClass=function(t){this._element.className=t},h.prototype.getAttribute=function(t){return this._element.getAttribute(t)},h.prototype.hasAttribute=function(t){return this._element.hasAttribute(t)},h.prototype.setAttribute=function(t,e){this._element.setAttribute(t,e)},h.prototype.setAttributes=function(t){for(let e in t)this._element.setAttribute(e,t[e])},h.prototype.removeAttribute=function(t){this._element.removeAttribute(t)},h.prototype.getStyle=function(t){return this._element.style[t]},h.prototype.setStyle=function(t,e){this._element.style[t]=e},h.prototype.setStyles=function(t){let e=this._element.style;for(let i in t)e[i]=t[i]},h.prototype.getId=function(){return this._element.id},h.prototype.setId=function(t){this._element.id=t},h.prototype.toString=function(){let t=this._element.outerHTML;return t=t.replace(this._element.innerHTML,""),t},h.prototype.getTextContent=function(){return this._element.textContent},h.prototype.setTextContent=function(t){this._element.textContent=t},h.prototype.getLeft=function(){return this._element.offsetLeft},h.prototype.setLeft=function(t){return this._element.style.left=t+"px",!0},h.prototype.getTop=function(){return this._element.offsetTop},h.prototype.setTop=function(t){return this._element.style.top=t+"px",!0},h.prototype.getWidth=function(){return this._element.offsetWidth},h.prototype.setWidth=function(t){return this._element.style.width=t+"px",!0},h.prototype.getHeight=function(){return this._element.offsetHeight},h.prototype.setHeight=function(t){return t<0&&(t=0),this._element.style.height=t+"px",!0},h.prototype.getBoundingClientRect=function(){return this._element.getBoundingClientRect()},h.prototype.fillParentWidth=function(t){return null==t&&(t=100),this._element.style.width=t+"%",!0},h.prototype.fillParentHeight=function(t){return null==t&&(t=100),this._element.style.height=t+"%",!0},h.prototype.getTooltip=function(){return this.getAttribute("title")},h.prototype.setTooltip=function(t){t?this.setAttribute("title",t):this.removeAttribute("title")},h.prototype.show=function(t){this._element.style.display=!1!==t?"":"none"},h.prototype.hide=function(t){this.show(!1===t)},h.prototype.isVisible=function(){return"none"!==this._element.style.display},h.prototype.enable=function(t){(t=!1!==t)?this.removeAttribute("disabled"):(this.setAttribute("disabled","disabled"),this._element.disabled=!t)},h.prototype.disable=function(t){this.enable(!1===t)},h.prototype.isEnabled=function(){return!this._element.hasAttribute("disabled")},h.prototype.getScrollLeft=function(){return this._element.scrollLeft},h.prototype.getScrollTop=function(){return this._element.scrollTop},h.prototype.isEndOfHorizontalScroll=function(){return this._element.scrollLeft>=this._element.scrollWidth-this.getWidth()},h.prototype.isEndOfVerticalScroll=function(){return this._element.scrollTop>=this._element.scrollHeight-this.getHeight()},h._proto=h.prototype;const u=h;let a=function(){this._items=[],this._element=null};l.inherits(a,u),a.prototype._items=[],a.prototype.hasItem=function(){return!!this._items.length},a.prototype.containItem=function(t){return this._items.indexOf(t)>-1},a.prototype.insertItem=function(t,e){let i=this._items;i.indexOf(t)>-1||(i.push(t),e&&(t._order=e),i.length&&i.sort(a._iconComparer),this._updatePanelItems())},a.prototype.removeItem=function(t){let e=this._items,i=-1;if(t)for(let o=e.length;--o>=0;){let n=e[o];if("string"==typeof t){if(n.classList.contains(t)){i=o;break}}else if(n===t){i=o;break}}else i=e.length-1;let o=null;return i>-1&&(o=e.splice(i,1)[0]),this._updatePanelItems(),o},a.prototype.clearItems=function(){let t=this._items;t.length&&(t.length=0,this._updatePanelItems())},a._iconComparer=function(t,e){return t._order?e._order?t._order-e._order:1:e._order?-1:0},a.prototype._updatePanelItems=function(){let t=this._items,e=this._element;if(t.length){for(this._element||(e=this._element=document.createElement("div"));e.lastChild;)e.removeChild(e.lastChild);for(let i=0;i<t.length;i++)e.appendChild(t[i])}};const p=a;let _=function(t,e){this._id=_._runningId++,this._element=document.createElement("div"),this._element.className="cell",e&&(this._section=e)};l.inherits(_,u),_.prototype._aligner=null,_._runningId=0,_.prototype._id=0,_.prototype._width=-1,_.prototype._height=-1,_.prototype._visible=!0,_.prototype._rawContent,_.prototype._section=null,_.prototype._contentLocked=!1,_.prototype._collapsedState=0,_.prototype._floatingPanel=null,_.prototype._frontIcon=null,_.prototype._tooltipInfo=null,_.prototype.getContent=function(t){return t&&this._element?this._element.children:this._content||null},_.prototype.setContent=function(t,e){if(this._contentLocked)return null;if(null==t||t!=t?t=null:1!==t.nodeType&&11!==t.nodeType&&(null==t.getElement?"string"!=typeof t&&(t+=""):t=t.getElement()),this._aligner){let t=this._aligner.firstChild;t!==this._content&&(this._rawContent=t,this._content=t)}let i=this._setRawContent(t);return null!=e&&this._content&&this._content.setAttribute("title",e),i},_.prototype.setTextContent=function(t){null==t&&(t=""),this._rawContent!==t&&("string"==typeof this._rawContent?(this._rawContent=t,this._textSpan.textContent=t):null!=this._rawContent||this._textSpan?this.setContent(t):(this.initialize(),this._rawContent=t,this._textSpan=document.createElement("span"),this._textSpan.className="text",this._textSpan.textContent=t,this._content=this._textSpan,this._aligner.className="valigner",this._aligner.appendChild(this._textSpan)))},_.prototype.dispose=function(){this.removeParent(),this.unlistenAll(),this._element=this._section=this._aligner=null,this._textSpan=this._rawContent=this._content=null,this._frontIcon=this._floatingPanel=null},_.prototype.getNextSibling=function(){return null!==this._element?this._element.nextSibling:null},_.prototype.getParent=function(){return null!==this._element?this._element.parentNode:null},_.prototype.setParent=function(t,i){let o=e.getElement(t);if(o){if(this.initialize(),1===this._collapsedState)return;let t;!0===i&&(t=o.firstChild),t?o.insertBefore(this._element,t):o.appendChild(this._element)}else this.removeParent()},_.prototype.removeParent=function(){let t=this._element;t&&t.parentNode&&t.parentNode.removeChild(t)},_.prototype.insertBefore=function(t){let i=e.getElement(t);if(null==i)return void this.setParent(this.getParent());let o=i.parentNode;null!=o&&(this.initialize(),o.insertBefore(this._element,i))},_.prototype.getTextContent=function(){return this._rawContent?"string"==typeof this._rawContent?this._rawContent:this._rawContent.textContent:""},_.prototype.getTextElement=function(){return this._textSpan},_.prototype.getWidth=function(){return this._width>=0?this._width:this._element.offsetWidth},_.prototype.setWidth=function(t){return t<0&&(t=-1),this._width!==t&&(this._width=t,this._element.style.width=t>=0?t+"px":"",this._updateDisplay(),!0)},_.prototype.getHeight=function(){return this._height>=0?this._height:this._element.offsetHeight},_.prototype.setHeight=function(t){return t<0&&(t=-1),this._height!==t&&(this._height=t,this._element.style.height=t>=0?t+"px":"",this._updateDisplay(),!0)},_.prototype.fillParentWidth=function(t){return!1},_.prototype.fillParentHeight=function(t){return!1},_.prototype.show=function(t){let e=!1!==t;e!==this._visible&&(this._visible=e,this._updateDisplay())},_.prototype.isVisible=function(){return this._visible},_.prototype.getScrollLeft=function(){return 0},_.prototype.getScrollTop=function(){return 0},_.prototype.isEndOfHorizontalScroll=function(){return!0},_.prototype.isEndOfVerticalScroll=function(){return!0},_.prototype.hasElement=function(){return null!==this._element},_.prototype.getSection=function(){return this._section},_.prototype.initialize=function(){return null==this._aligner&&(e.isIE?this._aligner=document.createElement("div"):this._aligner=document.createElement("button"),this._aligner.className="valigner",this._aligner.role="gridcell",this._frontIcon&&this._element.appendChild(this._frontIcon.getElement()),this._element.appendChild(this._aligner),this._floatingPanel&&this._element.appendChild(this._floatingPanel.getElement())),this._element},_.prototype.updateIcon=function(t){if(!t)return;let e=this._frontIcon;if(e){if(e.containItem(t))return;e.clearItems()}this.insertFrontIcon(t,0)},_.prototype.removeIcon=function(){let t=this._frontIcon;t&&(t.clearItems(),this._element.removeChild(t.getElement()),t=this._frontIcon=null)},_.prototype.isFrozen=e._deprecatedFunction,_.prototype.freezeLayout=e._deprecatedFunction,_.prototype.setAutoContentClipping=e._deprecatedFunction,_.prototype.setContentTooltip=function(t){return!(null==t||!this._content||(this._content.setAttribute("title",t),0))},_.prototype.lockContent=function(t){this._contentLocked=!1!==t},_.prototype.reset=function(){if(!this._element)return;let t=this._element.style.width,e=this._element.style.height;this.removeAttribute("style"),t&&(this._element.style.width=t),e&&(this._element.style.height=e),this.resetClass();let i=this.blinkState;i&&(i.timerId>=0&&clearInterval(i.timerId),delete this.blinkState),delete this.trendState;let o=this.blinking;o&&(o.blinking>=0&&clearTimeout(o.blinking),o.cell=null,o.styles=null,delete this.blinking),this.removeIcon(),this.setContent(null),this._textSpan&&(this._textSpan.className="text",this._textSpan.textContent="")},_.prototype.resetClass=function(){let t="cell";this.hasClass("spanned")&&(t+=" spanned"),this.hasClass("selected-row")&&(t+=" selected-row"),this.hasClass("highlighted-row")&&(t+=" highlighted-row"),this.setClass(t)},_.prototype.resetToInitialState=function(){this._element&&(this.setParent(null),this.unlistenAll(),this._element.className="cell",this.removeIcon(),this.setContent(null),this._contentLocked=!1,this._collapsedState=0)},_.prototype.insertFloatingIcon=function(t,e){if(!t)return;let i=this._floatingPanel;i||(i=this._floatingPanel=new p),i.insertItem(t,e),i.addClass("floating-panel");let o=this._element;o.contains(i.getElement())||o.appendChild(i.getElement())},_.prototype.removeFloatingIcon=function(t){let e=this._floatingPanel;if(!e)return null;let i=e.removeItem(t);return e.hasItem()||(this._element.removeChild(e.getElement()),this._floatingPanel=null),i},_.prototype.insertFrontIcon=function(t,e){if(!t)return;let i=this._frontIcon;i||(i=this._frontIcon=new p),i.insertItem(t,e),i.addClass("front-panel");let o=this._element;o.contains(i.getElement())||o.insertBefore(i.getElement(),o.firstChild)},_.prototype.removeFrontIcon=function(t){let e=this._frontIcon;if(!e)return null;let i=e.removeItem(t);return e.hasItem()||(i=e.getElement(),this._element.removeChild(i),this._frontIcon=null),i},_.prototype.getCellId=function(){return this._id},_.prototype.updatePadding=function(){},_.prototype.collapse=function(t,e){let i,o=!1!==t;return i=o?e?2:1:0,this._collapsedState!==i&&(o?e?this.addClass("spanned"):this.setParent(null):2===this._collapsedState&&this.removeClass("spanned"),this._collapsedState=i,!0)},_.prototype.isCollapsed=function(){return 0!==this._collapsedState},_.prototype.isKeptInDoc=function(){return 1!==this._collapsedState},_.prototype.getClientWidth=function(){return this._element?this._element.clientWidth:this.getWidth()},_.prototype.getClientHeight=function(){return this._element?this._element.clientHeight:this.getHeight()},_.prototype.setTooltip=function(t){this.setTooltipInfo("userTooltip",t),this.updateTooltip()},_.prototype.setTooltipInfo=function(t,e){let i=this._tooltipInfo;i||(i=this._tooltipInfo={}),i[t]=e},_.prototype.updateTooltip=function(){let t=this._tooltipInfo;if(!t)return;let e="",i=null;t.clippedText&&(e=i=t.clippedTextTooltip),null==t.groupHeaderTooltip?!1!==t.columnDefault&&(null!=t.columnDefault?i=t.columnTooltip:e=t.columnTooltip):!1!==t.groupHeaderDefault&&(null!=t.groupHeaderDefault?i=t.groupHeaderTooltip:e=t.groupHeaderTooltip),null!=t.userTooltip&&(i=t.userTooltip),null==i&&(i=e),i?(this.hasAttribute("tooltip")?this.getAttribute("tooltip"):this.getAttribute("title"))!==i&&this.setAttribute("title",i):(this.hasAttribute("title")&&this.removeAttribute("title"),this.hasAttribute("tooltip")&&this.removeAttribute("tooltip"))},_.prototype.getTooltipInfo=function(t){return this._tooltipInfo?this._tooltipInfo[t]:null},_.prototype._setRawContent=function(t){if(this._rawContent!==t){this._rawContent=t;let e=this._rawContent;if("string"==typeof this._rawContent&&(this._textSpan||(this._textSpan=document.createElement("span"),this._textSpan.className="text"),this._textSpan.textContent=this._rawContent,e=this._textSpan),this._content!==e){this._content=e,this.initialize();let t=this._aligner;for(;t.lastChild;)t.removeChild(t.lastChild);this._content&&t.appendChild(this._content)}}return this._content},_.prototype._updateDisplay=function(){let t=!1;this.isVisible()&&this._width&&this._height&&(t=!0),this._element.style.display=t?"":"none"},_._proto=_.prototype;const d=_;let c=function(){this._ends=[],this._cols=[]};c.prototype._laneCount=0,c.prototype._defaultSize=10,c.prototype._defaultScalability=!0,c.prototype._homogeneous=!0,c.prototype._visibility=!0,c.prototype._ends,c.prototype._cols,c.prototype._bits=[1,2,4,8],c.prototype.hitTest=function(t){if(t<0)return-1;if(t>=this.getTrackSize())return~this._laneCount;let i=-1,o=0;if(this._homogeneous){let e=this._defaultSize;i=Math.floor(t/e),o=(i+1)*e}else i=e.upperBound(this._ends,t),o=this._ends[i];return(i>=this._laneCount||t>=o)&&(i=~i),i},c.prototype.dispose=function(){this._cols=this._ends=null},c.prototype.isAtDefaultSize=function(t){if(this._homogeneous)return!0;if(null!=t){if(!this._isAtDefaultSize(t))return!1}else{for(let t=this._cols.length;--t>=0;)if(!this._isAtDefaultSize(t))return!1;this._homogeneous=!0}return!0},c.prototype._isAtDefaultSize=function(t){let e=this._cols[t];if(e){if(e.actualSize!==this._defaultSize)return!1;if(null!=e.customSize)return!1;if(e.invisibility)return!1}return!0},c.prototype.isHomogeneous=function(){return this._homogeneous},c.prototype.isAtMinimumSize=function(t){let e=this._getMinimumScalingSize(t);return(null!=t?this.getLaneSize(t):this.getTrackSize())<=e},c.prototype.isFixedSize=function(){for(let t=0;t<this._laneCount;++t)if(this.getLaneScalability(t))return!1;return!0},c.prototype.clearLaneCustomizations=function(){this._ends.length=0,this._cols.length=0,this._homogeneous=!0},c.prototype.getLaneCount=function(){return this._laneCount},c.prototype.setLaneCount=function(t){t<0&&(t=0),t!==this._laneCount&&(this._markDirtyIndex(t),this._cols.length=t,this._laneCount=t,0===t&&(this._homogeneous=!0))},c.prototype.getDefaultLaneSize=function(){return this._defaultSize},c.prototype.setDefaultLaneSize=function(t){return t<0&&(t=0),this._defaultSize!==t&&(this._defaultSize=t,this._markDirtyIndex(0),!0)},c.prototype.getLaneDefaultSize=function(t){if(t<0||t>=this._laneCount)return-1;let e=this._newColumn(t);return e.defaultSize?e.defaultSize:-1},c.prototype.setLaneDefaultSize=function(t,e){!(t<0||t>=this._laneCount)&&e>=0&&(this._newColumn(t).defaultSize=e)},c.prototype.resetLaneToDefaultSize=function(){let t=!1;for(let e=0;e<this._laneCount;++e){let i=this._cols[e];i&&(i.invisibility||(null!=i.defaultSize?(t|=this.setLaneScalability(e,!1),t|=this.setLaneSize(e,i.defaultSize)):(t|=this.setLaneScalability(e,!0),t|=this.setLaneSize(e,1))))}return!!t},c.prototype.getDefaultScalability=function(){return this._defaultScalability},c.prototype.setDefaultScalability=function(t){return this._defaultScalability!==t&&(this._defaultScalability=t,!0)},c.prototype.getTrackSize=function(){return!this._visibility||this._laneCount<=0?0:this._homogeneous?this._laneCount*this._defaultSize:(this._updateEndPoints(),this._ends[this._laneCount-1])},c.prototype.setTrackSize=function(t){let e=0,i=0,o=[];for(e=0;e<this._laneCount;++e){let t=this._cols[e];t?t.invisibility||(!1!==this._getLaneScalability(t)?o.push(e):i+=this._getFixedSize(t)):o.push(e)}if(o.length<=0)return null;let n=this._distributeLaneSize(t-i,o),s=!1,r=[];for(e=n.length;--e>=0;){r[e]=0;let t=n[e];if(null!=t){let i=this.getLaneSize(e);this._newColumn(e),this._setCalculatedLaneSize(e,t)&&(r[e]=t-i,s=!0)}}return s?r:null},c.prototype.getLaneStart=function(t){if(t<=0)return 0;if(this._homogeneous)return t*this._defaultSize;this._updateEndPoints();let e=t-this._laneCount,i=0;return e>0&&(t-=e,i=e*this._defaultSize),this._ends[t-1]+i},c.prototype.getLaneEnd=function(t){return this._laneCount<=0?NaN:(t<0?t=0:t>=this._laneCount&&(t=this._laneCount-1),this._homogeneous?(t+1)*this._defaultSize:(this._updateEndPoints(),this._ends[t]))},c.prototype.getLaneSize=function(t){if(this._visibility){let e=this._cols[t];return e?e.actualSize:this._defaultSize}return 0},c.prototype.getCustomLaneSize=function(t){let e=this._cols[t];return e&&null!=e.customSize?e.customSize:this._defaultSize},c.prototype.setLaneSize=function(t,e){if(t<0||t>=this._laneCount)return!1;if(e<0||e!=e)return!1;let i=this._cols[t];return(null==i||i.customSize!==e)&&(i=this._newColumn(t),i.customSize=e,this._setCalculatedLaneSize(t,e))},c.prototype.setLaneProperty=function(t,e,i){if(t<0||t>=this._laneCount)return!1;let o=this._cols[t];return(null==o||o[e]!==i)&&(o=this._newColumn(t),o[e]=i,!0)},c.prototype.getLaneProperty=function(t,e){let i=this._cols[t];return i&&null!=i[e]?i[e]:null},c.prototype.getMinimumLaneSize=function(t){let e=this._cols[t];return e&&null!=e.minSize?e.minSize:0},c.prototype.setMinimumLaneSize=function(t,e,i){if(t<0||t>=this._laneCount)return!1;if(e<0&&(e=0),this.getMinimumLaneSize(t)!==e){let o=this._newColumn(t);return o.minSize=e,i&&this.getLaneScalability(t)&&(o.customSize=e),this._setCalculatedLaneSize(t)}return!1},c.prototype.isLaneVisible=function(t){let e=this._cols[t];return!e||!e.invisibility},c.prototype.showLane=function(t,e){return this.hideLane(t,!1===e)},c.prototype.hideLane=function(t,e,i){if(t<0||t>=this._laneCount)return!1;let o=this._newColumn(t),n=!o.invisibility,s=null!=i?this._bits[i]:1;return!1!==e?o.invisibility|=s:o.invisibility&=~s,n!==!o.invisibility&&this._setCalculatedLaneSize(t)},c.prototype.getLaneVisibilityBit=function(t,e){if(t>=0&&t<this._laneCount){let i=this._cols[t];if(i){let t=null!=e?this._bits[e]:1;if(i.invisibility&t)return!1}}return!0},c.prototype.show=function(t){if(t=!1!==t,this._visibility!==t)if(this._visibility=t,t)for(let t=0;t<this._laneCount;++t)this._newColumn(t),this._setCalculatedLaneSize(t);else this._markDirtyIndex(0)},c.prototype.getLaneScalability=function(t){let e=this._cols[t];return e&&null!=e.scalability?e.scalability:this._defaultScalability},c.prototype.setLaneScalability=function(t,e){if(t<0||t>=this._laneCount)return!1;let i=this._cols[t];return!(i&&i.scalability===e||(i=this._newColumn(t),i.scalability=e,0))},c.prototype.removeLaneAt=function(t,e){if(null==e&&(e=1),t<0)return null;if(t+e>this._laneCount&&(e=this._laneCount-t),e<1)return null;this._markDirtyIndex(t);let i=this.serializeLane(t);return this._cols.splice(t,e),this._laneCount-=e,i},c.prototype.insertLane=function(t,i){t<0&&(t=0);let o=1;if(e.isNumber(i)){if(i<=0)return;o=i,i=null}if(t>=this._laneCount&&(t=this._laneCount,!i))this.setLaneCount(this._laneCount+o);else if(this._laneCount+=o,this._markDirtyIndex(t),e.insertEmptyItems(this._cols,t,o),i){let e=t+o;for(let o=t;o<e;++o)this.deserializeLane(o,i)}},c.prototype.moveLane=function(t,i){if(t<0?t=0:t>this._laneCount&&(t=this._laneCount),i<0?i=0:i>this._laneCount&&(i=this._laneCount),t===i)return;let o=t<i?t:i;this._markDirtyIndex(o),e.moveArrayItem(this._cols,t,i)},c.prototype.serializeLane=function(t){if(t<0||t>=this._laneCount)return null;let e={};e.index=t;let i=this._cols[t];return i?(e.size=i.customSize,e.minSize=i.minSize,e.visible=!i.invisibility,e.scalable=i.scalability,e):e},c.prototype.deserializeLane=function(t,e){if(!e)return;if(t<0||t>=this._laneCount)return;let i=e.size;null!=i&&this.setLaneSize(t,i),i=e.minSize,null!=i&&this.setMinimumLaneSize(t,i),i=e.visible,null!=i&&this.showLane(t,i),i=e.scalable,null!=i&&this.setLaneScalability(t,i)},c.prototype._updateEndPoints=function(){let t=this._ends.length;if(t>=this._laneCount)return;this._ends.length=this._laneCount;let e=0,i=t>0?this._ends[t-1]:0;for(e=t;e<this._laneCount;++e)i+=this.getLaneSize(e),this._ends[e]=i},c.prototype._setCalculatedLaneSize=function(t,e){let i=this._cols[t];if(this._visibility&&!i.invisibility){if(null==e&&(e=null!=i.customSize?i.customSize:this._defaultSize),!i.scalability){let t=null!=i.minSize?i.minSize:0;e<t&&(e=t)}}else e=0;return i.actualSize!==e&&(i.actualSize=e,this._homogeneous=!1,this._markDirtyIndex(t),!0)},c.prototype._getMinimumScalingSize=function(t){let e=0;if(null!=t){let e=this._cols[t];if(!e.invisibility&&null!=e.minSize)return!1===this._getLaneScalability(e)&&null!=e.customSize&&e.customSize>e.minSize?e.customSize:e.minSize}else for(let t=this._laneCount;--t>=0;)e+=this._getMinimumScalingSize(t);return e},c.prototype._getFixedSize=function(t){return null!=t.customSize?null!=t.minSize?t.customSize>t.minSize?t.customSize:t.minSize:t.customSize:null!=t.minSize?t.minSize:this._defaultSize},c.prototype._getLaneScalability=function(t){return null==t.scalability?this._defaultScalability:t.scalability},c.prototype._distributeLaneSize=function(t,e){if(e.length<=0)return[];t<0&&(t=0);let i=0,o=0,n=0,s=0,r=[],l=[],h=[];for(i=e.length;--i>=0;)n=e[i],r[n]=this.getMinimumLaneSize(n),l[n]=this.getCustomLaneSize(n),o+=l[n];let u=!0;for(;u;)for(u=!1,i=e.length;--i>=0;){n=e[i];let a=r[n],p=l[n];s=t*p/o,s<=a&&(u=!0,h[n]=a,t-=a,o-=p,e.splice(i,1))}let a=e.length-1,p=0,_=0;for(i=a;--i>=0;){n=e[i],s=t*l[n]/o;let r=Math.floor(s);_+=s-r,_>=1&&(++r,--_),h[n]=r,p+=r}return h[e[a]]=Math.floor(t-p),h},c.prototype._markDirtyIndex=function(t){t<this._ends.length&&(this._ends.length=t)},c.prototype._newColumn=function(t){let e=this._cols[t];return e||(this._cols[t]=e={},e.invisibility=0),e},c.prototype.copyFrom=function(t,e){if(this._homogeneous&&t._homogeneous&&this._defaultSize===t._defaultSize)return;e||(e=0);let i=t.getLaneCount(),o=this.getLaneCount(),n=e+i;n>o&&(n=o);let s=0;for(let i=e;i<n;++i){let e=t.getLaneSize(s++),o=this._newColumn(i);o.customSize!==e&&(o.customSize=e,o.actualSize!==e&&(o.actualSize=e,this._homogeneous=!1,this._markDirtyIndex(i)))}};const g=c;let f=function(){};f.prototype.hitTest=function(t,e,i){},f.prototype.hitTestX=function(t){},f.prototype.hitTestY=function(t){},f.prototype.getDefaultColumnWidth=function(){},f.prototype.setDefaultColumnWidth=function(t){},f.prototype.getDefaultRowHeight=function(){},f.prototype.setDefaultRowHeight=function(t){},f.prototype.getColumnWidth=function(t){},f.prototype.setColumnWidth=function(t,e){},f.prototype.getRowHeight=function(t){},f.prototype.setRowHeight=function(t,e){},f.prototype.isColumnVisible=function(t){},f.prototype.hideColumn=function(t,e){},f.prototype.isRowVisible=function(t){},f.prototype.hideRow=function(t,e){},f.prototype.getMinimumColumnWidth=function(t){},f.prototype.setMinimumColumnWidth=function(t,e){},f.prototype.getMinimumRowHeight=function(t){},f.prototype.setMinimumRowHeight=function(t,e){},f.prototype.getCellLeft=function(t){},f.prototype.getCellTop=function(t){},f.prototype.getCellWidth=function(t,e){},f.prototype.getCellHeight=function(t,e){},f.prototype.hasCellSpan=function(){},f.prototype.getCellRowSpan=function(t,e){},f.prototype.setCellRowSpan=function(t,e,i){},f.prototype.getCellColSpan=function(t,e){},f.prototype.setCellColSpan=function(t,e,i){},f.prototype.clearCellSpans=function(){},f.prototype.clearColumnSpans=function(t){},f.prototype.clearColumnCustomizations=function(){},f.prototype.clearRowCustomizations=function(){},f.prototype.getColumnScalability=function(t){},f.prototype.setColumnScalability=function(t,e){},f.prototype.getRowScalability=function(t){},f.prototype.setRowScalability=function(t,e){},f.prototype.getCell=function(t,e,i){},f.prototype.getCellContent=function(t,e){},f.prototype.setCellContent=function(t,e,i){},f.prototype.getColumn=function(t){},f.prototype.getColumnCount=function(){},f.prototype.setColumnCount=function(t){},f.prototype.getRowCount=function(){},f.prototype.setRowCount=function(t,e){},f.prototype.getVisibleRowCount=function(){},f.prototype.addRow=function(t){},f.prototype.removeRow=function(t){},f.prototype.setBorders=function(t,e,i,o){},f.prototype.getColumnStyle=function(t,e){},f.prototype.setColumnStyle=function(t,e,i){},f.prototype.enableColumnClass=function(t,e,i){},f.prototype.hasColumnClass=function(t,e){},f.prototype.enableRowClass=function(t,e,i){},f.prototype.setRowStyle=function(t,e,i,o){},f.prototype.getRelativePosition=function(t){},f.prototype.getContentWidth=function(){},f.prototype.getContentHeight=function(){},f.prototype.getCellsByRowIndex=function(t){},f.prototype.disableHorizontalGridLine=function(t){},f.prototype.disableVerticalGridLine=function(t){},f.prototype.enableShading=function(t){},f.prototype.setTransposedShading=function(t){},f.prototype.enableRowHighlighting=function(t){},f.prototype.getRowHighlight=function(){},f.prototype.setRowHighlight=function(t){},f.prototype.getSelectedRows=function(){},f.prototype.getSelectedRowCount=function(){},f.prototype.isSelectedRow=function(t){},f.prototype.getRowAnchor=function(){},f.prototype.setRowAnchor=function(t){},f.prototype.setSelectedRow=function(t,e){},f.prototype.selectSingleRow=function(t){},f.prototype.selectRowRange=function(t,e){},f.prototype.clearSelectedRows=function(){},f.prototype.getFirstSelectedRow=function(){},f.prototype.getLastSelectedRow=function(){},f.prototype.activateColumn=function(t,e){},f.prototype.activateRows=function(t,e,i){},f.prototype.moveRowsToTop=function(t){},f.prototype.getFirstIndexInView=function(){},f.prototype.getLastIndexInView=function(){},f.prototype.isInCurrentView=function(t){},f.prototype.getFrozenLayout=function(){},f.prototype.setFrozenLayout=function(t){},f.prototype.insertColumn=function(t,e){},f.prototype.removeColumnAt=function(t){},f.prototype.moveColumn=function(t,e){},f.prototype.enableRowVirtualization=function(t){},f.prototype.enableColumnVirtualization=function(t){},f.prototype.getColumnIndex=function(t){},f.prototype.getCellIndex=function(t,e){},f.prototype.getIndex=function(){},f.prototype.setIndex=function(t){},f.prototype.getRowOffset=function(){},f.prototype.setRowOffset=function(t){},f.prototype.updateLayout=function(){},f.prototype.stretchCell=function(t,e,i,o){},f.prototype.unstretchCell=function(t,e){},f.prototype.unstretchAllCells=function(){},f.prototype.getStretchedCell=function(t,e){},f.prototype.getStretchedCells=function(){},f.prototype.updateStretchedCells=function(){},f.prototype.getColumnHost=function(){},f.prototype.setHidingMethod=function(t){},f.prototype.getHidingMethod=function(){},f.prototype.setColumnVisibility=function(t,e,i){},f.prototype.getRowLayout=function(){},f.prototype.reserveRightSpace=function(t){},f.prototype.getReservedSpace=function(){},f.prototype.getComputedStyle=function(){},f.prototype.isColumnActive=function(t){},f.prototype.setRowAttributes=function(t,e){},f.prototype.getContextRow=function(t){},f.prototype.selectColumn=function(t,e){},f.prototype.isSelectedColumn=function(t){},f.prototype.selectCell=function(t,e,i){},f.prototype.setCellBounds=function(t,e,i,o){},f.prototype.getHorizontalLayout=function(){},f.prototype.calculateColumnBounds=function(t,e,i,o){},f.prototype.updateColumnBounds=function(t,e,i){},f.prototype.updateColumnSeparators=function(){};const y=f;let m=function(t){(this._element=document.createElement("div")).className="column",this._cells=[],this._section=t};l.inherits(m,u),m.prototype._nextSibling=null,m.prototype._parent=null,m.prototype._section=null,m.prototype._cells=null,m.prototype._cellStart=0,m.prototype._cellEnd=0,m.prototype._autoStyleUpdating=!1,m.prototype._deactivation=!1,m.prototype._sizeClasses=null,m.prototype._colLeft=0,m.prototype._absolute=!1,m.prototype._scrollFrame=null,m.prototype._invisibility=0,m.prototype._bits=[1,2,4,8],m.prototype._pinned=!0,m.prototype.clearContent=function(){for(let t=this._cells.length;--t>=0;)this._cells[t].setContent(null)},m.prototype.setLeft=function(t){return this._colLeft=t,this._absolute&&(this._element.style.left=t+"px"),!0},m.prototype.enableAbsolutePosition=function(t){(t=!1!==t)!==this._absolute&&(this._absolute=t,this._element.style.left=t?this._colLeft+"px":"")},m.prototype.dispose=function(){this._dispose();for(let t=this._cells.length;--t>=0;)this._cells[t].dispose();this._scrollFrame=this._nextSibling=this._parent=this._cells=this._section=null},m.prototype.setStyle=function(t,e){let i=this._element;i.style[t]=e,i.style.backgroundColor?i.classList.contains("no-shading")||i.classList.add("no-shading"):i.classList.contains("no-shading")&&i.classList.remove("no-shading")},m.prototype.setStyles=function(t){let e=this._element,i=e.style;for(let e in t)i[e]=t[e];e.style.backgroundColor?e.classList.contains("no-shading")||e.classList.add("no-shading"):e.classList.contains("no-shading")&&e.classList.remove("no-shading")},m.prototype.show=function(t){this.setVisibility(0,!1!==t)},m.prototype.setWidth=function(t){this._element.style.width=t+"px";let e,i=0;t>0&&t<=24?i=3:t>24&&t<=40?i=2:t>40&&t<60&&(i=1);let o=this._sizeClasses;if(o){if(o.length>i){for(e=o.length;--e>=i;)this.removeClass(o[e]);o.length=i}i||(this._sizeClasses=null)}if(i)for(o||(o=[],this._sizeClasses=o),e=o.length;e<i;++e)o[e]=m._sizeClasses[e],this.addClass(o[e]);return this.setVisibility(1,t>0),!0},m._sizeClasses=["small-col","very-small-col","tiny-col"],m.prototype.setHeight=function(t){return this._element.style.height=t+"px",this.setVisibility(2,t>0),!0},m.prototype.getParent=function(){return this._parent},m.prototype.setParent=function(t,i){if(!this._element)return;this._parent=e.getElement(t);let o=this._section?this._section.getHidingMethod():"";this._invisibility&&!o||this._setParent(this._parent,i)},m.prototype.insertBefore=function(t){this._parent?this._scrollFrame?t&&this._parent===t.getParent()?this._insertBefore(t):this._insertBefore(this._scrollFrame):t?this._parent===t.getParent()&&this._insertBefore(t):this._setParent(this._parent):(this._insertBefore(t),this._parent=t.getParent())},m.prototype.enableAutoStyleUpdating=function(t){t=!1!==t,this._autoStyleUpdating!==t&&(this._autoStyleUpdating=t)},m.prototype.setNextSibling=function(t){this._nextSibling=t},m.prototype.isActive=function(){return!(this._invisibility&this._bits[3])},m.prototype.disableDeactivation=function(t){this._deactivation=!1!==t,this._deactivation&&(this.isActive()||this.activate())},m.prototype.activate=function(t){return t=this._pinned||this._deactivation||!1!==t,this.isActive()!==t&&(this.setVisibility(3,t),!0)},m.prototype.deactivate=function(t){this.activate(!1===t)},m.prototype.setCellCount=function(t){let e;for(e=this._cells.length;e<t;++e)this._cells.push(new d(null,this._section));for(e=this._cells.length;--e>=t;)this._cells[e].dispose();this._cells.length=t,this._cellStart>t?this._cellStart=this._cellEnd=t:this._cellEnd>t&&(this._cellEnd=t)},m.prototype.getCell=function(t){return this._cells[t]||null},m.prototype.collapseCells=function(t,e,i,o,n){if(e<=0)return;let s=!1,r=this._cells[t];r&&!o&&(s|=r.collapse(i,n));for(let o=1;o<e&&(r=this._cells[t+o],r);++o)s|=r.collapse(i,n);s&&(i?e>1&&(this._hasCollapsedCells=!0):this.updateCellOrders())},m.prototype.uncollapseAllCells=e._deprecatedFunction,m.prototype.activateCells=function(t,e){let i,o=this._element;if(this._hasCollapsedCells)t=this._cellEnd,e>this._cellEnd&&(this._cellEnd=e);else if(this._cellStart===t){let o=this._cellEnd-e;if(o>0){for(i=this._cellEnd;--i>=e;)this._cells[i].removeParent();return void(this._cellEnd=e)}if(!(o<0))return;t=this._cellEnd,this._cellEnd=e}else{for(i=this._cellEnd;--i>=this._cellStart;)this._cells[i].removeParent();this._cellStart=t,this._cellEnd=e}for(i=t;i<e;++i){let t=this._cells[i];t.isKeptInDoc()&&(t.initialize(),o.appendChild(t.getElement()))}},m.prototype.moveCellsToTop=function(t){if(!this.isActive())return;let i=this._element;for(let e=0;e<t;++e){let t=this._cells[e];t.isKeptInDoc()&&i.appendChild(t.getElement())}this._cells=e.cycleArray(this._cells,t)},m.prototype.updateCellOrders=function(){this._hasCollapsedCells=!1;let t=this._element;for(let e=this._cellStart;e<this._cellEnd;++e){let i=this._cells[e];i.isKeptInDoc()?t.appendChild(i.getElement()):this._hasCollapsedCells=!0}},m.prototype.hasCollapsedCells=function(){return this._hasCollapsedCells},m.prototype.getCellIndex=function(t){if(!t)return-1;for(let e=this._cellStart;e<this._cellEnd;++e)if(this._cells[e].getElement()===t)return e;return-1},m.prototype.getSection=function(){return this._section},m.prototype.log=function(){let t=[],e=this._cells.length;for(let i=0;i<e;++i)t.push(this._cells[i].getTextContent());return t},m.prototype.getVisibility=function(){return!this._invisibility},m.prototype.setVisibility=function(t,e){let i=!this._invisibility,o=this._bits[t]||1;e?this._invisibility&=~o:this._invisibility|=o;let n=!this._invisibility;if(i!==n)if(this._section&&this._section.getHidingMethod())this.enableClass("hidden",!n);else if(n){let t=this._parent;if(!t)return;let e=this._nextSibling;for(;e;){if(e._parent!==t){e=null;break}if(!e._invisibility)break;e=e._nextSibling}this.insertBefore(e)}else this._setParent(null)},m.prototype.updateLayout=function(){},m.prototype.setScrollState=function(t,e,i){this._scrollFrame=t,this.enableAbsolutePosition(i),this.setParent(e||this._section.getColumnHost()),e||this.activate(),this._pinned=!e},m._proto=m.prototype;const C=m;let S=function(){this._items=[]};S.prototype._items=null,S.prototype.dispose=function(){this._items=null},S.prototype.setItemCount=function(t){let e=this._items,i=e.length;if(i!==t)for(e.length=t;i<t;)e[i++]={}},S.prototype.getItem=function(t){return this._items[t]||null},S.prototype.moveItemsToTop=function(t){this._items=e.cycleArray(this._items,t)};const w=S;let b=function(t,e,i){t.setTop(e.getLaneStart(i)),t.setHeight(e.getLaneSize(i))},v=function(t,e,i,o){if(i){let n=e.getLaneStart(i);t.setLeft(n),t.setWidth(o-n)}else t.setStyle("left",""),t.setWidth(o)},R=function(t,e,i){this._trackX=t,this._trackY=e,this._section=i,this._cells=[]};R.prototype._trackX,R.prototype._trackY,R.prototype._section,R.prototype._cells,R.prototype._activeCount=0,R.prototype._stretchSize=0,R.prototype.dispose=function(){let t=this._cells;if(this._activeCount){this._activeCount=0;for(let e=t.length;--e>=0;){let i=t[e];i&&i.dispose()}}t.length=0},R.prototype.setStretchSize=function(t){this._stretchSize=t},R.prototype.getStretchSize=function(){return this._stretchSize},R.prototype.setCellCount=function(t){let e=this._cells,i=e.length;if(i<t)for(e.length=t;i<t;)e[i++]=null;else if(i>t){for(;--i>=t;){let t=e[i];t&&t.dispose()}e.length=t}},R.prototype.getCell=function(t){let e=this._cells[t];return e&&e.getParent()?e:null},R.prototype.getCells=function(){let t=[];if(this._activeCount){let e=this._cells,i=e.length;for(let o=0;o<i;++o){let i=e[o];i&&i.getParent()&&t.push(i)}this._activeCount=t.length}return t},R.prototype.getColumnIndex=function(t){if(t){if(!t.getElement)return null!=t._colIndex?t._colIndex:-1;{let e=t.getElement();if(e)return null!=e._colIndex?e._colIndex:-1}}return-1},R.prototype.getRowIndex=function(t){if(t){if(t.getElement)return t.getParent()?this._cells.indexOf(t):-1;{let e=this._cells,i=e.length;for(let o=0;o<i;++o){let i=e[o];if(i&&i.getParent()&&i.getElement()===t)return o}}}return-1},R.prototype.stretchCell=function(t,e){++this._activeCount,(!e||e<0)&&(e=0);let i=this._cells[t]||null;i||(i=new d(null,this._section),i.addClass("tr-stretched"),i.stretched=!0,this._cells[t]=i);let o=i.getElement();o.stretched=!0,o._colIndex!==e&&(o._colIndex=e,e>0?o.classList.add("right-stretching"):o.classList.remove("right-stretching")),o._rowIndex!==t&&(o._rowIndex=t);let n=this._stretchSize||this._trackX.getTrackSize();return v(i,this._trackX,e,n),b(i,this._trackY,t),i},R.prototype.unstretchCell=function(t){let e=this._cells[t]||null;return e&&e.setParent(null),e},R.prototype.unstretchAllCells=function(){if(this._activeCount){this._activeCount=0;let t=this._cells;for(let e=t.length;--e>=0;){let i=t[e];i&&i.setParent(null)}}},R.prototype.updateCells=function(){if(this._activeCount){let t=0,e=this._cells,i=e.length,o=this._trackX,n=this._trackY,s=this._stretchSize||o.getTrackSize();for(let r=0;r<i;++r){let i=e[r];i&&i.getParent()&&(++t,v(i,o,i.getElement()._colIndex,s),b(i,n,r))}this._activeCount=t}},R.prototype.updateXAxis=function(){if(this._activeCount){let t=0,e=this._cells,i=e.length,o=this._trackX,n=this._stretchSize||o.getTrackSize();for(let s=0;s<i;++s){let i=e[s];i&&i.getParent()&&(++t,v(i,o,i.getElement()._colIndex,n))}this._activeCount=t}},R.prototype.updateYAxis=function(){if(this._activeCount){let t=0,e=this._cells,i=e.length,o=this._trackY;for(let n=0;n<i;++n){let i=e[n];i&&i.getParent()&&(++t,b(i,o,n))}this._activeCount=t}},R.prototype.moveCellsToTop=function(t){this._activeCount&&(this._cells=e.cycleArray(this._cells,t),this.updateYAxis())};const I=R;let x=function(t,e){this.indexX=t,this.indexY=e};x.prototype.isSpanIndices=function(t,e){return t===this.indexX&&e===this.indexY},x.prototype.isOccupiedIndices=function(t,e){return t!==this.indexX||e!==this.indexY},x.prototype.register=function(t,e){this._register(t,e,!0)},x.prototype.unregister=function(t,e){this._register(t,e,!1)},x.prototype._register=function(t,e,i){let o=t.indexOf(this);i?o<0&&t.push(this):o>=0&&t.splice(o,1);let n=i?this:null,s=this.indexX+this.colSpan,r=this.indexY+this.rowSpan;for(let t=this.indexX;t<s;++t)for(let i=this.indexY;i<r;++i)e[t+","+i]=n},x.prototype.indexX,x.prototype.indexY,x.prototype.colSpan=1,x.prototype.rowSpan=1,x.prototype.prevColSpan=1,x.prototype.prevRowSpan=1,x.prototype.retVal=0;const L=x;let D=function(){this._spans=[],this._occupiedMap={}};D.prototype.removeColumn=function(t){let e=!1;return this.removeSpanByColIndex(t)&&(e=!0),this.shiftColumn(t,-1)&&(e=!0),e},D.prototype.freezeMapping=function(t){this._frozenMapping=!1!==t,this._frozenMapping||this._mapCellSpans()},D.prototype._mapCellSpans=function(){let t,e,i=this._spans;for(this._spans=[],this._occupiedMap={},t=i.length;--t>=0;)e=i[t],e.indexX>=0&&e.register(this._spans,this._occupiedMap)},D.prototype.shiftColumn=function(t,e){if(this._spans.length<=0||0===e)return!1;let i=!1;for(let o=this._spans.length;--o>=0;){let n=this._spans[o];n.indexX>=t&&(i=!0,n.indexX+=e)}return!(!i||this._frozenMapping||(this._mapCellSpans(),0))},D.prototype.removeSpan=function(t,e){if(this._spans.length<=0)return null;let i=t+","+e,o=this._occupiedMap[i];return!o||o.isOccupiedIndices(t,e)?null:(o.unregister(this._spans,this._occupiedMap),o)},D.prototype.removeSpanByColIndex=function(t,e){let i,o=this._spans.length;if(o<=0)return null;let n,s=e||[],r=0;for(n=0;n<o;++n)i=this._spans[n],i&&i.indexX===t&&(s.push(i),r++);if(r<=0)return null;for(o=s.length,n=0;n<r;++n)s[o-n-1].unregister(this._spans,this._occupiedMap);return s},D.prototype.removeSpanStartedFromRowIndex=function(t,e){let i,o=this._spans.length;if(o<=0)return null;let n,s=e||[],r=0;for(n=0;n<o;++n)i=this._spans[n],i&&i.indexY>=t&&(s.push(i),r++);if(r<=0)return null;for(o=s.length,n=0;n<r;++n)s[o-n-1].unregister(this._spans,this._occupiedMap);return s},D.prototype.clearAllSpans=function(){if(this._spans.length<=0)return null;let t=this._spans;return this._spans=[],this._occupiedMap={},t},D.prototype.hasSpan=function(){return this._spans.length>0},D.prototype.getSpan=function(t,e){let i=this.getOccupyingSpan(t,e);return i&&i.isSpanIndices(t,e)?i:null},D.prototype.getOccupyingSpan=function(t,e){return this._spans.length<=0?null:this._occupiedMap[t+","+e]||null},D.prototype.getAllSpans=function(){return this._spans},D.prototype.getColSpan=function(t,e){let i=this._occupiedMap[t+","+e];return null==i?1:i.isOccupiedIndices(t,e)?i.indexX-t:i.colSpan},D.prototype.getRowSpan=function(t,e){let i=this._occupiedMap[t+","+e];return null==i?1:i.isOccupiedIndices(t,e)?i.indexY-e:i.rowSpan},D.prototype.setColSpan=function(t,e,i){return this._updateSpan(t,e,!0,i)},D.prototype.setRowSpan=function(t,e,i){return this._updateSpan(t,e,!1,i)},D.prototype._updateSpan=function(t,e,i,o){o<1&&(o=1);let n=this.getSpan(t,e);n&&(n.retVal=0);let s,r,l,h,u,a,p=t,_=e,d=n?n.colSpan:1,c=n?n.rowSpan:1,g=!0;if(i){if(d===o)return n;if(d>o)p=t+o,s=t+d,g=!1;else{if(l=this._occupiedMap[t+","+e],l&&l!==n)return n;p=t+d,s=t+o}r=e+c}else{if(c===o)return n;if(c>o)_=e+o,r=e+c,g=!1;else{if(l=this._occupiedMap[t+","+e],l&&l!==n)return n;_=e+c,r=e+o}s=t+d}if(g){let i=[];for(u=p;u<s;++u)for(a=_;a<r;++a){if(h=u+","+a,this._occupiedMap[h])return n;i.push(h)}for(null==n&&(n=new L(t,e),h=t+","+e,this._spans.push(n),this._occupiedMap[h]=n),u=i.length;--u>=0;)this._occupiedMap[i[u]]=n}else{if(i?o+c<=2:o+d<=2){h=t+","+e;let i=this._spans.indexOf(n);this._spans.splice(i,1),this._occupiedMap[h]=null}for(u=p;u<s;++u)for(a=_;a<r;++a)this._occupiedMap[u+","+a]=null}return i?(n.prevColSpan=n.colSpan,n.colSpan=o):(n.prevRowSpan=n.rowSpan,n.rowSpan=o),n.retVal=g?1:-1,n},D.prototype._spans,D.prototype._occupiedMap,D.prototype._frozenMapping=!1;const A=D;let z=function(){this._selections=[]};z.prototype.clone=function(){let t=new z;return t._selections=this._selections.concat(),t._count=this._count,t._anchor=this._anchor,t._firstIndex=this._firstIndex,t._lastIndex=this._lastIndex,t},z.prototype.toString=function(){return this._selections.join(", ")},z.prototype.select=function(t){return!(t<0||!this._select(t)||(this._anchor=t,(this._firstIndex<0||t<this._firstIndex)&&(this._firstIndex=t),(this._lastIndex<0||t>this._lastIndex)&&(this._lastIndex=t),0))},z.prototype.deselect=function(t){return!!this._selections[t]&&(this._selections[t]=!1,--this._count,this._anchor===t&&(this._anchor=-1),this._firstIndex===t&&(this._firstIndex=this._findNextSelection(t)),this._lastIndex===t&&(this._lastIndex=this._findPrevSelection(t)),!0)},z.prototype.deselectFrom=function(t){if(this._lastIndex<t)return!1;if(this._firstIndex>=t)return this.clearAllSelections(),!0;let e=this._lastIndex,i=this._selections;for(let o=t;o<=e;++o)i[o]&&(i[t]=!1,--this._count);return this._anchor>=t&&(this._anchor=-1),this._lastIndex=this._findPrevSelection(t),!0},z.prototype.toggleSelection=function(t){this._selections[t]?this.deselect(t):this.select(t)},z.prototype.singularlySelect=function(t){return 1!==this._count||t<0?(this.clearAllSelections(),this.select(t),!0):this._firstIndex!==t&&(this._selections[this._anchor]=!1,this._selections[t]=!0,this._anchor=t,this._firstIndex=t,this._lastIndex=t,!0)},z.prototype.selectRange=function(t,e){if(0===e)return;if(t<0&&(t=0),1===e||-1===e)return void this.select(t);let i=t,o=i+e;if(e<0&&(o=i+1,i=o+e),!(i>=o)){this._anchor=t,(this._firstIndex<0||i<this._firstIndex)&&(this._firstIndex=i),(this._lastIndex<0||o>=this._lastIndex)&&(this._lastIndex=o-1);for(let t=i;t<o;++t)this._select(t)}},z.prototype.deselectRange=function(t,e){if(this._count<=0)return;if(t<0&&(t=0),1===e||-1===e)return void this.deselect(t);let i=t+e;if(e<0&&(i=t+1,t=i+e),this._firstIndex>=t&&this._lastIndex<i)return void this.clearAllSelections();this._anchor>=t&&this._anchor<i&&(this._anchor=-1),this._firstIndex>=t&&this._firstIndex<i&&(this._firstIndex=this._findNextSelection(i-1)),this._lastIndex>=t&&this._lastIndex<i&&(this._lastIndex=this._findPrevSelection(t));let o=0;for(o=t;o<i;++o)this._selections[o]&&(this._selections[o]=!1,--this._count)},z.prototype.hasSelection=function(t,e){if(this._count<=0)return!1;let i=t+e;if(e<0&&(i=t+1,t=i+e),i<this._firstIndex||t>this._lastIndex)return!1;for(let e=t;e<i;++e)if(this._selections[e])return!0;return!1},z.prototype.getSelection=function(t){return!0===this._selections[t]},z.prototype.setSelection=function(t,e){return!1!==e?this.select(t):this.deselect(t)},z.prototype.getSelectionAnchor=function(){return this._anchor},z.prototype.setSelectionAnchor=function(t){this._anchor=t},z.prototype.getSelectionCount=function(){return this._count},z.prototype.getFirstSelectedIndex=function(){return this._firstIndex},z.prototype.getLastSelectedIndex=function(){return this._lastIndex},z.prototype.getAllSelections=function(){if(this._count>0){let t=new Array(this._count),e=0,i=this._selections,o=this._lastIndex;for(let n=this._firstIndex;n<=o;++n)i[n]&&(t[e++]=n);return t}return[]},z.prototype.getConnectedRanges=function(t,e){if(this._count>0){let i=[];(null==t||t<this._firstIndex)&&(t=this._firstIndex),(null==e||e>this._lastIndex)&&(e=this._lastIndex+1);let o=null;for(let n=t;n<e;++n)this._selections[n]?o||(o=[n,-1]):o&&(o[1]=n-1,i.push(o),o=null);return o&&(o[1]=this._lastIndex,i.push(o),o=null),i}return[]},z.prototype.getSelectionMap=function(){return this._selections},z.prototype.clearAllSelections=function(){if(this._count>0){let t=0;return this._selections.length=0,this._count=0,this._anchor=-1,this._firstIndex=-1,this._lastIndex=-1,t}return 0},z.prototype.copyFrom=function(t,e,i,o){if(o<=0)return;let n=e+i;if(null!=t)if(!1!==t.hasSelection(e,o)){for(let i=0;i<o;++i)t._selections[e+i]?this.select(n+i):this.deselect(n+i);this._anchor=-1,t._anchor>=0&&t._anchor>=e&&t._anchor<e+o&&(this._anchor=t._anchor+i)}else this.deselectRange(n,o);else this.deselectRange(n,o)},z.prototype._select=function(t){return!this._selections[t]&&(this._selections[t]=!0,++this._count,!0)},z.prototype._findNextSelection=function(t){if(this._lastIndex>=0)for(;++t<=this._lastIndex;)if(this._selections[t])return t;return-1},z.prototype._findPrevSelection=function(t){if(this._firstIndex>=0)for(;--t>=this._firstIndex;)if(this._selections[t])return t;return-1},z.prototype._selections=null,z.prototype._count=0,z.prototype._anchor=-1,z.prototype._firstIndex=-1,z.prototype._lastIndex=-1;const T=z;let V=function(t,e){this._onInterval=this._onInterval.bind(this),"function"==typeof t?this._func=t:"function"==typeof e&&(this._func=e),"number"==typeof e?this._delay=e:"number"==typeof t&&(this._delay=t)};V.prototype._func=null,V.prototype._delay=0,V.prototype._timerId=0,V.prototype._pending=!1,V.prototype.start=function(){this._func&&(this._timerId?this._pending=!0:this._timerId=setInterval(this._onInterval,this._delay))},V.prototype.dispose=function(){this._timerId&&(clearInterval(this._timerId),this._timerId=0),this._func=null},V.prototype._onInterval=function(){this._pending?this._pending=!1:(this._func(),clearInterval(this._timerId),this._timerId=0)},V._proto=V.prototype;const E=V;let P=function(){let t=this;t._addEvents("scroll","activated","deactivated","scrollStart","scrollEnd","thicknessChanged","layoutChanged","enabled","disabled"),t._onTrackScroll=t._onTrackScroll.bind(t),t._onKeyDown=t._onKeyDown.bind(t),t._onStartFading=t._onStartFading.bind(t),t._onMouseWheel=t._onMouseWheel.bind(t),t._flash=t._flash.bind(t),t._onTouchStart=t._onTouchStart.bind(t),t._onTouchMove=t._onTouchMove.bind(t),t._onTouchEnd=t._onTouchEnd.bind(t),t._smoothScroll=t._smoothScroll.bind(t),t._updateEffectiveArea=t._updateEffectiveArea.bind(t),t._onRestingPosition=t._onRestingPosition.bind(t),t._element=document.createElement("div"),t._element.className="grid-scrollbar",t._trackContent=document.createElement("div"),t._panes=[],t._paneSliders=[],t._startPos={},t._endPos={},t._reverter=new E(t._onRestingPosition,300),t._element.addEventListener("scroll",t._onTrackScroll),t._element.addEventListener("mouseover",t._flash),t._element.appendChild(t._trackContent),t.disableKeyboardInput(!1),t._onThicknessChanged=t._dispatch.bind(t,"thicknessChanged"),P._queryNativeTrackThickness(t._onThicknessChanged),t._updateEffectiveArea()||t.listen("thicknessChanged",t._updateEffectiveArea)};l.inherits(P,u),P.prototype._vertical=!0,P.prototype._step=0,P.prototype._parentNode=null,P.prototype._hostClassName="",P.prototype._trackContent=null,P.prototype._panes=null,P.prototype._paneSliders=null,P.prototype._enabled=!0,P.prototype._active=!1,P.prototype._isFrozen=!1,P.prototype._otherScrollbar=null,P.prototype._autoHideScrollbar=!0,P.prototype._trackSize=120,P.prototype._tContentSize=0,P.prototype._tScrollVal=0,P.prototype._tPercentVal=0,P.prototype._paneSize=0,P.prototype._pContentSize=0,P.prototype._pScrollVal=0,P.prototype._footerCount=0,P.prototype._fadingId=0,P.prototype._postponeFading=!1,P.prototype._layoutChanged=!1,P.prototype._contentDirty=!0,P.prototype._layoutDirty=!0,P.prototype._touchInput=!0,P.prototype._swiping=!1,P.prototype._touchDrag=!1,P.prototype._startPos,P.prototype._endPos,P.prototype._smoothing=!0,P.prototype._smoothingId=0,P.prototype._smoothingSpeed=0,P.prototype._wheelScrolling="",P.prototype._mouseWheelLogic=null,P.prototype._onThicknessChanged=null,P._trackThickness=0,P._queryTimeout=0,P._queryStarted=!1,P._outerDummy=null,P._innerDummy=null,P._listeners=null,P.prototype._updateEffectiveArea=function(){let t=this.getTrackThickness();if(t){let e=this._vertical?"width":"height";this._element.style[e]=t+1+"px"}return!!t},P._queryNativeTrackThickness=function(t){if(P._queryStarted||P._repeatQuery(),t&&P._trackThickness<=0){let e=P._listeners;e||(e=P._listeners=[]),e.push(t)}},P._repeatQuery=function(){P._queryStarted=!0,P._retrieveNativeTrackThinkness()||(P._queryTimeout+=100,P._queryTimeout<3e3?setTimeout(P._repeatQuery,P._queryTimeout):(P._trackThickness=13,P._clearStaticResources()))},P._retrieveNativeTrackThinkness=function(){if(P._trackThickness>0)return!0;let t=P._innerDummy,e=P._outerDummy;t||(t=P._innerDummy=document.createElement("p"),t.style.width="100%",t.style.height="200px",e=P._outerDummy=document.createElement("div"),e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.appendChild(t)),e.style.overflow="hidden",document.body.appendChild(e);let i=t.offsetWidth;e.style.overflow="scroll";let o=t.offsetWidth;return i==o&&(o=e.clientWidth),document.body.removeChild(e),(P._trackThickness=i-o)>0&&(P._clearStaticResources(),!0)},P._clearStaticResources=function(){P._innerDummy=P._outerDummy=null;let t=P._listeners;if(t){P._listeners=null;let e={};for(let i=t.length;--i>=0;)t[i](e)}},P.updateTrackThickness=function(){P._trackThickness=0,P._queryTimeout=0,P._queryStarted=!1,P._queryNativeTrackThickness()},P.prototype.dispose=function(){let t=P._listeners;if(t){let e=t.indexOf(this._onThicknessChanged);e>=0&&(t.splice(e,1),this._onThicknessChanged=null)}this.unlistenAll(),this._smoothingId&&(clearInterval(this._smoothingId),this._smoothingId=0),this._active=this._layoutChanged=!1,this._dispose();for(let t=this._panes.length;--t>=0;)this._panes[t].dispose(),this._paneSliders[t].dispose();this._reverter.dispose()},P.prototype.getContent=function(t){return this._paneSliders[0].getContent(t)},P.prototype.getParent=function(){return this._parentNode},P.prototype.setParent=function(t,i){let o=e.getElement(t),n=this._parentNode!==o;n&&this._parentNode&&(this.removeWheelListener(this._parentNode),this._parentNode.classList.remove(this._hostClassName)),this.isActive()?(this._setParent(o,i),this._parentNode=this._element.parentNode,this._parentNode&&this._parentNode.classList.add(this._hostClassName)):this._parentNode=o,n&&this.addWheelListener(this._parentNode)},P.prototype.attachToExternalElement=function(t){this.setParent(t);let e=this.getElement();e.style.right="0",this._vertical?e.style.overflowX="hidden":e.style.overflowY="hidden",e.style.boxSizing="border-box",e.style.position="absolute",e.style.outline="none"},P.prototype._onActiveStateChange=function(){let t,e=this;if(e._scrollTo(0,!0),e._active){for(e._parentNode&&(e._layoutDirty=!0,e._setParent(e._parentNode),e._parentNode.classList.add(e._hostClassName)),e._flash(),t=e._panes.length;--t>=0;)e._panes[t].removeClass("scroll-disabled");e._dispatch("activated",{})}else{e._setParent(null),e._parentNode&&e._parentNode.classList.remove(e._hostClassName);let i=e._vertical?"height":"width";for(t=e._panes.length;--t>=0;)e._panes[t].addClass("scroll-disabled"),e._panes[t].setStyle(i,"");e._dispatch("deactivated",{})}e._vertical&&e._otherScrollbar&&e._otherScrollbar.isActive()&&e._otherScrollbar.invalidate()},P.prototype._onEnablingStateChange=function(){let t=this;t._enabled?t._dispatch("enabled",{}):t._dispatch("disabled",{})},P.prototype.isActive=function(){return this._active},P.prototype.isEnabled=function(){return this._enabled},P.prototype.enable=function(t){t=!1!==t,this._enabled!=t&&(this._enabled=t,this._updateLayout(),this._onEnablingStateChange())},P.prototype.disable=function(t){this.enable(!1===t)},P.prototype.getTrackSize=function(){return this._trackSize},P.prototype.getPaneSize=function(){return this._paneSize},P.prototype.getContentSize=function(){return this._pContentSize},P.prototype.getTrackThickness=function(){return P._trackThickness},P.prototype.getScrollGap=function(){return this._pContentSize-this.getPaneSize()},P.prototype.setTrackSize=function(t,e){this._trackSize=t>0?t:0,this._paneSize=e>0?e:0},P.prototype.calculateContentSize=function(){return 0},P.prototype.update=function(){if(this._contentDirty){this._contentDirty=!1;let t=this.calculateContentSize();(!t||t<0)&&(t=0),this._pContentSize!==t&&(this._pContentSize=t,this._layoutDirty=!0)}return!!this._layoutDirty&&(this._layoutDirty=!1,this._updateLayout(),!0)},P.prototype.invalidate=function(t,e){this._contentDirty=!0,this._layoutDirty=!0,null!=e&&(this._pScrollVal=e),t&&this.update()},P.prototype.invalidateContent=function(){this._contentDirty=!0},P.prototype.isScrollPosValid=function(t){let e=t-this.getPaneSize(),i=this._pScrollVal;return 0===i||i>0&&e>0&&i<e},P.prototype.flash=function(){this.update(),this._flash()},P.prototype._scroll=function(t){this._scrollTo(this._pScrollVal+t)},P.prototype._scrollTo=function(t,e){if(!this._active&&!e)return;t=this._calcProperScrollValue(t);let i=!1;this._pScrollVal!==t&&(this._pScrollVal=t,i=!0),this._setTrackScrollVal(t),i?(e&&(this._layoutChanged=!0),this._dispatchScrollEvent(null)):e&&this._dispatch("layoutChanged",{})},P.prototype._calcProperScrollValue=function(t){if(!t||t-.5<0)return 0;if(this._tPercentVal>=1&&Math.abs(this._pScrollVal-t)<=2)return this._pScrollVal;let e=this.getScrollGap();if(e<=0)return 0;if(t+.5>=e)return e;let i=this._step;if(i){if((t=Math.round(t/i)*i)-i/2<=0)return 0;if(t+i/2>=e)return e}return Math.round(t)},P.prototype._convertTrackToPane=function(t){t=Math.round(t);let e=this._getTrackGap();this._tPercentVal>=1&&Math.abs(this._tScrollVal-t)<=5&&(t=e),this._tScrollVal=t,this._tPercentVal=e?t/e:0;let i=this.getScrollGap();return e===i?t:this._tPercentVal*i},P.prototype._setTrackScrollVal=function(t){let e=this._getTrackGap(),i=0;if(e>0){if(t>0){let o=this.getScrollGap();i=e===o?t:t/o*e,i=Math.round(i)}i>=e&&(i=e)}if(i!==this._tScrollVal){this._tScrollVal=i,this._tPercentVal=e?i/e:0;let t=this._element;return this._vertical?t.scrollTop=i:t.scrollLeft=i,!0}return!1},P.prototype._getTrackGap=function(){let t=this._tContentSize-this.getTrackSize();return t>0?t:0},P.prototype._getScrollValue=function(){return this._pScrollVal},P.prototype._isEndOfScroll=function(){return!this._active||this._pScrollVal>=this.getScrollGap()},P.prototype._isStartOfScroll=function(){return!this._pScrollVal},P.prototype._isOnEdge=function(t){return t<0&&this._isStartOfScroll()||t>0&&this._isEndOfScroll()},P.prototype._flash=function(){this._active&&this._autoHideScrollbar&&(this._fadingId?this._postponeFading=!0:(this._element._fading&&(this._element.classList.remove("grid-scroll-fadeout"),this._element._fading=!1),this._fadingId=setTimeout(this._onStartFading,1e3)))},P.prototype._clearAllPanes=function(){for(let t=this._panes.length;--t>=0;){this._panes[t].setParent(null);let e=this._paneSliders[t];e._content=e._columns=null;let i=e.getElement();for(;null!==i.firstChild;)i.removeChild(i.firstChild)}},P.prototype.disableKeyboardInput=function(t){!1===t?(this._element.setAttribute("tabindex","-1"),this._element.addEventListener("keydown",this._onKeyDown,!1)):(this._element.removeAttribute("tabindex"),this._element.removeEventListener("keydown",this._onKeyDown,!1))},P.prototype.disableTouchInput=function(t){this._touchInput=!1===t},P.prototype.setAutoHide=function(t){this._autoHideScrollbar=t,t||(this._element._fading&&(this._element.classList.remove("grid-scroll-fadeout"),this._element._fading=!1),this._fadingId&&(clearTimeout(this._fadingId),this._fadingId=0))},P.prototype.getAutoHide=function(){return this._autoHideScrollbar},P.prototype.setOtherScrollbar=function(t){this._otherScrollbar=t},P.prototype.setFooterCount=function(t){this._footerCount=t},P.prototype._calcActiveState=function(){if(this._enabled&&this.getTrackSize()>20){let t=this.getPaneSize();if(t>0)return this._pContentSize-t>0}return!1},P.prototype._updateLayout=function(){let t=this._calcActiveState();if(t!==this._active&&(this._active=t,this._onActiveStateChange()),!this._active)return;let e=this.getTrackSize(),i=this.getPaneSize();if(this._tContentSize=this._pContentSize/i*e,this._vertical)this._trackContent.style.height=this._tContentSize+"px",this._element.style.height=e+"px",this._panes[0].setHeight(i);else{this._trackContent.style.width=this._tContentSize+"px",this._element.style.width=e+"px";for(let t=this._panes.length;--t>=0;)this._panes[t].setWidth(i)}this._scrollTo(this._pScrollVal,!0)},P.prototype.resetPaneSize=function(){let t=this._vertical?"height":"width";for(let e=this._panes.length;--e>=0;)this._panes[e].setStyle(t,"")},P._preventVScrolling=function(t){t.currentTarget.scrollTop=0},P._preventHScrolling=function(t){t.currentTarget.scrollLeft=0},P.prototype._addPaneAt=function(t){null==t&&(t=this._panes.length);let e=this._panes[t];if(!e){if(e=new u(document.createElement("div")),e.setClass("grid-pane"),this._vertical?(e.addClass("sections"),e.listen("scroll",P._preventVScrolling)):(e.addClass("columns"),e.listen("scroll",P._preventHScrolling)),this._active||e.addClass("scroll-disabled"),this._paneSize&&this._active){let t=this.getPaneSize();this._vertical?e.setHeight(t):e.setWidth(t)}e.listen("touchstart",this._onTouchStart),e.listen("touchmove",this._onTouchMove),e.listen("touchend",this._onTouchEnd),e.listen("touchcancel",this._onTouchEnd);let i=new u(document.createElement("div"));i.setClass("grid-pane-slider"),i.setParent(e),this._panes[t]=e,this._paneSliders[t]=i}return e},P.prototype._onStartFading=function(t){this._fadingId=0,this._active&&(this._postponeFading?(this._postponeFading=!1,this._flash()):this._element._fading||(this._element.classList.add("grid-scroll-fadeout"),this._element._fading=!0))},P.prototype._onTrackScroll=function(t){if(!this._element)return;let e=this._vertical?t.target.scrollTop:t.target.scrollLeft,i=this._convertTrackToPane(e);i=this._calcProperScrollValue(i),i!==this._pScrollVal&&(this._pScrollVal=i,this._dispatchScrollEvent(t))},P.prototype._onRestingPosition=function(){this._setSliderPosition(-this._pScrollVal,!0)},P.prototype._setSliderPosition=function(t,e){let i="",o="",n=this._vertical?"top":"left";t&&(e?o=t+"px":(i=this._vertical?"translateY":"translateX",i+="("+t+"px)",this._reverter.start()));for(let e=this._paneSliders.length;--e>=0;){let s=this._paneSliders[e],r=s.getElement().style;s._titleSection?r[n]=t+"px":(r.transform=i,r[n]=o)}e?this._dispatch("scrollEnd",{}):this._dispatch("scrollStart",{})},P.prototype._dispatchScrollEvent=function(t){if(this._setSliderPosition(-this._pScrollVal,!1),this._flash(),!this._isEventDispatching("scroll")){if(!t){let e=this._element;t={currentTarget:e,srcElement:e,target:e}}t.layoutChanged=this._layoutChanged,this._vertical?t.scrollTop=this._pScrollVal:t.scrollLeft=this._pScrollVal,this._dispatch("scroll",t)}},P.prototype._onKeyDown=function(t){if(this._isFrozen)return void e._preventDefault(t);if(!this._active)return;let i=!1;if(i=this._vertical?38===t.keyCode||40===t.keyCode:37===t.keyCode||39===t.keyCode,i){let i=this.getScrollGap(),o=Math.round(.07*i);o<10?o=10:o>100&&(o=100),37!==t.keyCode&&38!==t.keyCode||(o*=-1),this._scroll(o),e._preventDefault(t)}},P.prototype._onTouchStart=function(t){this._isFrozen?e._preventDefault(t):!this._swiping&&this._touchInput&&(this._vertical&&this.update(),this._flash(),this._smoothingId&&(clearInterval(this._smoothingId),this._smoothingId=0),this._swiping=!0,this._getTouchInfo(t,this._startPos))},P.prototype._onTouchMove=function(t){let i=this;if(i._isFrozen)return void e._preventDefault(t);if(!i._swiping||!i._active||!i._touchInput)return;if(t.touches&&t.touches.length>1)return;let o=i._startPos,n=i._endPos;i._getTouchInfo(t,n);let s=this._vertical?o.y-n.y:o.x-n.x;s>-5&&s<5||i._isOnEdge(s)||(i._touchDrag?i._scrollTo(o.scrollValue+s):n.timeStamp-o.timeStamp>30&&(i._touchDrag=!0),t.cancelable&&t.preventDefault())},P.prototype._onTouchEnd=function(t){if(this._isFrozen)e._preventDefault(t);else if(this._swiping=!1,this._touchDrag&&(this._touchDrag=!1,t.cancelable&&t.preventDefault(),this._smoothing&&!this._smoothingId)){let e=this._startPos,i=this._getTouchInfo(t,this._endPos),o=i.timeStamp-e.timeStamp,n=this._vertical?e.y-i.y:e.x-i.x;this._smoothingSpeed=30*n/o,(this._smoothingSpeed>10||this._smoothingSpeed<-10)&&(this._smoothingId=setInterval(this._smoothScroll,25))}},P.prototype._getTouchInfo=function(t,e){let i=t.changedTouches[0];return e||(e={}),e.x=i.pageX,e.y=i.pageY,e.timeStamp=t.timeStamp,e.scrollValue=this._getScrollValue(),e},P.prototype._smoothScroll=function(){let t=this._smoothingSpeed;t=.9*t|0,this._smoothingSpeed=t,t>1||t<-1?this._scroll(t):(clearInterval(this._smoothingId),this._smoothingId=0)},P.prototype.disableMouseWheel=function(t){!1===t?this.setMouseWheelLogic(this._mouseWheelLogic||this._onMouseWheel):this.setMouseWheelLogic(null)},P.prototype.setMouseWheelLogic=function(t){this.removeWheelListener(this._parentNode),this._mouseWheelLogic=t,this._mouseWheelLogic&&this.addWheelListener(this._parentNode)},P.prototype.addWheelListener=function(t){t&&this._mouseWheelLogic&&t.addEventListener("wheel",this._mouseWheelLogic,!1)},P.prototype.removeWheelListener=function(t){t&&this._mouseWheelLogic&&t.removeEventListener("wheel",this._mouseWheelLogic,!1)},P.prototype.setMouseWheelSpeed=function(t){this._wheelScrolling="string"==typeof t?t:""},P.prototype.getMouseWheelSpeed=function(){return this._wheelScrolling},P.prototype.getDefaultMouseWheelLogic=function(){return this._onMouseWheel},P.prototype._onMouseWheel=function(t){if(t.target.opened)return;if(this._isFrozen)return void e._preventDefault(t);if(t.ctrlKey||t.altKey)return;if(!this.isActive())return;let i=this._vertical?t.deltaY:t.deltaX;if(i&&!this._isOnEdge(i)){if(e._preventDefault(t),t.deltaMode&&(i=i>0?100:-100),"linear"!=this._wheelScrolling){let t=this.getContentSize();t>=4e3&&(i*=1+t/4e3|0)}this.update(),this._scroll(i)}},P.prototype.setScrollingStep=function(t){this._step=t>0?t:0},P.prototype.freezeScrolling=function(t){let e=this._isFrozen;return this._isFrozen=!1!==t,e},P.prototype.restoreTrackPosition=function(){let t=this._element;this._vertical&&(t.scrollTop=this._tScrollVal,t.scrollTop&&(this._tScrollVal=t.scrollTop))},P._proto=P.prototype;const M=P;let H=function(){let t=this;t._vertical=!1,t._onDeactivated=t._onDeactivated.bind(t),t._onActivated=t._onActivated.bind(t),t._hostClassName="hscrollbar-host",H.base(this,"constructor"),t._element.classList.add("grid-hscroll"),t._trackContent.style.height="1px",t.disableMouseWheel(!1),t.listen("activated",t._onActivated),t.listen("deactivated",t._onDeactivated)};l.inherits(H,M),H.prototype._pinnedLeftColumnCount=0,H.prototype._pinnedRightColumnCount=0,H.prototype.setScrollContent=function(t,e,i,o){this._clearAllPanes();let n=e.length;if(n<=0)return;this._pinnedLeftColumnCount=i>=0?i:0,this._pinnedRightColumnCount=o>0?o:0;let s=e[0],r=s.getColumnCount(),l=r-o;(!l||l<0)&&(l=r);for(let t=0;t<n;++t){s=e[t];let o,n,h=this._addPaneAt(t),u=this._paneSliders[t],a=h.getElement(),p=u.getElement();for(o=0;o<i;++o)n=s.getColumn(o),n.setScrollState(a,null,!1);let _=s.getColumnHost();h.setParent(_);let d=[],c=[];for(o=i;o<l;++o)n=s.getColumn(o),n.setScrollState(null,p,this.isActive()),d.push(n),c.push(n.getElement());for(o=l;o<r;++o)n=s.getColumn(o),n.setScrollState(null,null,!1);let g=s.getReservedSpace();g&&(this.isActive()&&!this._pinnedRightColumnCount?(u.addContent(g),c.push(g)):_.appendChild(g),s._updateRightSpaceStyle()),s._updateLayers(),u._titleSection=s.hasClass("title"),u._columns=d,u._content=c}this.invalidateContent()},H.prototype.setWidth=function(t){return this.setTrackSize(t,t),!0},H.prototype.getWidth=function(){return this.getPaneSize()},H.prototype.getScrollLeft=function(){return this._getScrollValue()},H.prototype.setScrollLeft=function(t){this.update(),this._scrollTo(t)},H.prototype.getPinnedLeftColumnCount=function(){return this.isEnabled()?this._pinnedLeftColumnCount:0},H.prototype.getPinnedRightColumnCount=function(){return this.isEnabled()?this._pinnedRightColumnCount:0},H.prototype.setPaneLeft=function(t){let e=t&&this.isActive()?-t+"px":"";for(let t=this._panes.length;--t>=0;)this._paneSliders[t].setStyle("marginLeft",e)},H.prototype.isEndOfHorizontalScroll=function(){return this._isEndOfScroll()},H.prototype.getContentWidth=function(){let t=this._paneSliders[0],e=0;if(t){let i=t._content;for(let t=i.length;--t>=0;){let o=i[t],n=o?o.style.width:0;n&&(e+=parseFloat(n))}}return e},H.prototype.calculateContentSize=function(){return this.getContentWidth()},H.prototype.getTrackSize=function(){return this._footerCount<=0&&this._otherScrollbar&&this._otherScrollbar.isActive()&&!this._pinnedRightColumnCount?this._trackSize-this.getTrackThickness():this._trackSize},H.prototype._onActivated=function(t){this._updateActivation(!0)},H.prototype._onDeactivated=function(t){this._updateActivation(!1)},H.prototype._updateActivation=function(t){let e=this._paneSliders.length;for(let i=0;i<e;++i){let e=this._paneSliders[i]._columns,o=e?e.length:0;for(let i=0;i<o;++i){let o=e[i];o.getElement()&&o.enableAbsolutePosition(t)}}},H._proto=H.prototype;const F=H;let k=function(t,e){return t>e?e:t<0?0:t},O=function(t){this._boundLayer=t.boundLayer,this._layoutX=t.layoutX,this._layoutY=t.layoutY,this._hscrollbar=t.hscrollbar,this._calculateColumnBounds=t.calculateColumnBounds};O.prototype._boundLayer=null,O.prototype._layoutX,O.prototype._layoutY,O.prototype._hscrollbar,O.prototype._calculateColumnBounds,O.prototype._cellBound=null,O.prototype._cbLftIdx=0,O.prototype._cbRgtIdx=0,O.prototype._cbTopIdx=0,O.prototype._cbBtmIdx=0,O.prototype.dispose=function(){let t=this._cellBound;if(t){let e=t.parentNode;e&&e.removeChild(t),this._cellBound=null}this._boundLayer=null,this._layoutX=null,this._layoutY=null,this._hscrollbar=null,this._calculateColumnBounds=null},O.prototype.setCellBounds=function(t,e,i,o,n){let s=this._cellBound;s||(s=this._cellBound=document.createElement("div"),s.className="selection-bound");let r=t+i,l=e+o,h=this._layoutY.getLaneCount();this._cbLftIdx=k(t,n),this._cbRgtIdx=k(r,n),this._cbTopIdx=k(e,h),this._cbBtmIdx=k(l,h),this.updateCellBounds()},O.prototype.updateCellBounds=function(){let t=this._cellBound;if(!t)return;let e,i,o,n,s=this._layoutX,r=this._layoutY,l=this._cbLftIdx,h=this._cbRgtIdx,u=this._cbTopIdx,a=this._cbBtmIdx;e=i=o=n=0,l<h&&u<a&&(e=s.getLaneStart(l),i=s.getLaneEnd(h-1),o=r.getLaneStart(u),n=r.getLaneEnd(a-1));let p=i-e,_=n-o,d=[!1,!1];if(p>0&&_>0&&this._hscrollbar){let t=[0,0];this._calculateColumnBounds(l,h-1,t,d),e=t[0],i=t[1],p=i-e}if(p>0)t.style.left=e+"px",t.style.top=o+"px",t.style.width=p+"px",t.style.height=_+"px",t.classList.toggle("no-left-bound",d[0]),t.classList.toggle("no-right-bound",d[1]),this._boundLayer&&this._boundLayer.appendChild(t);else{let e=t.parentNode;e&&e.removeChild(t)}},O._proto=O.prototype;const B=O;let G=function(t){let e=this;e._onMouseMove=e._onMouseMove.bind(e),e._onMouseOut=e._onMouseOut.bind(e),e._onResetTransformIE=e._onResetTransformIE.bind(e),e._trackX=new g,e._trackY=new g,e._trackX.setDefaultLaneSize(100),e._trackY.setDefaultLaneSize(32),e._cellSpans=new A,e._element=document.createElement("div"),e._element.className="tr-lg tr-even-shading",e._ctxRows=new w,e._columns=[],e._cells=[],e._highlightedCells=[],e._stretchedCells=new I(e._trackX,e._trackY,e),e._selectionList=new T,t&&(e._virOwner=t.owner||null,t.horizontalScrollbar&&(e._hscrollbar=t.horizontalScrollbar)),e._virOwner||e._element.classList.add("section"),e._addEvent("rowHighlighted"),e._addEvent("rowCountChanged"),e._addEvent("rowHeightChanged"),e._addEvent("rowAvailable")};l.inherits(G,u),G.prototype._index=-1,G.prototype._availableRowCount=0,G.prototype._activeRow=0,G.prototype._activeRowEnd=0,G.prototype._colCount=0,G.prototype._rowCount=0,G.prototype._hiddenRowCount=0,G.prototype._trackX,G.prototype._trackY,G.prototype._cellSpans,G.prototype._columns,G.prototype._firstColumn,G.prototype._lastColumn,G.prototype._rightSpace,G.prototype._rightSpaceSize=0,G.prototype._frozenLayout=!1,G.prototype._rowHighlightEnabled=!1,G.prototype._rowHighlightIndex=-1,G.prototype._highlightedCells,G.prototype._coverLayer=null,G.prototype._stretchedCells=null,G.prototype._ctx=null,G.prototype._selectionList,G.prototype._colVir=!1,G.prototype._initialized=!1,G.prototype._hidingMethod="",G.prototype._virOwner=null,G.prototype._transformIETimer=0,G.prototype._ctxRows,G.prototype._boundLayer=null,G.prototype._colBounds=null,G.prototype._colBoundCache=null,G.prototype._hscrollbar=null,G.prototype._leftColumnSeparator=null,G.prototype._rightColumnSeparator=null,G.prototype._cellBoundPainter=null,G.prototype.dispose=function(){this.setRowCount(0),this.unlistenAll(),this._ctxRows.dispose(),this._stretchedCells.dispose();for(let t=this._columns.length;--t>=0;)this._columns[t].dispose();this._colCount=this._rowCount=this._activeRowEnd=this._availableRowCount=0,this._colBounds=this._colBoundCache=null,this._highlightedCells.length=0,this._ctx=null,this._hscrollbar=null,this._cellBoundPainter&&this._cellBoundPainter.dispose(),this._dispose()},G.prototype.getWidth=function(){return this.isVisible()?this._getWidth():0},G.prototype._getWidth=function(){return this.getContentWidth()+this._rightSpaceSize},G.prototype.setWidth=function(t){return!(t<0)&&(null!=this._trackX.setTrackSize(t-this._rightSpaceSize)&&(this._syncLayoutToColumns(0),!0))},G.prototype.getHeight=function(){return this.isVisible()?this.getContentHeight():0},G.prototype.setHeight=function(t){return!(t<0)&&(null==this._trackY.setTrackSize(t)||this._syncLayoutToRows(0,this._rowCount),!0)},G.prototype.show=function(t){this._element.style.display=!1!==t?"":"none",this._trackY.show(t),this.setFrozenLayout(!1===t),this._dispatchRowHeightChangedEvent(0,this._rowCount)},G.prototype.hitTest=function(t,e,i){if(t<0)return null;if(e<0)return null;if(t>=this.getContentWidth())return null;if(e>=this.getHeight())return null;let o=this._trackX.hitTest(t);if(o<0)return null;let n=this._trackY.hitTest(e);if(n<0)return null;let s={};if(s.colIndex=o,s.rowIndex=n,!0!==i){let t=this._cellSpans.getOccupyingSpan(o,n);t&&(s.colIndex=t.indexX,s.rowIndex=t.indexY)}return s},G.prototype.hitTestX=function(t){return t<0?-1:t>=this.getContentWidth()?~this._colCount:this._trackX.hitTest(t)},G.prototype.hitTestY=function(t){return t<0?-1:t>=this.getHeight()?~this._rowCount:this._trackY.hitTest(t)},G.prototype.getDefaultColumnWidth=function(){return this._trackX.getDefaultLaneSize()},G.prototype.setDefaultColumnWidth=function(t){this._trackX.getDefaultLaneSize()!==t&&(this._trackX.setDefaultLaneSize(t),this._syncLayoutToColumns(0))},G.prototype.getDefaultRowHeight=function(){return this._trackY.getDefaultLaneSize()},G.prototype.setDefaultRowHeight=function(t){if(this._trackY.getDefaultLaneSize()!==t){this._trackY.setDefaultLaneSize(t);for(let e=0;e<this._colCount;++e)this._columns[e].setHeight(t);this._syncLayoutToRows(0,this._rowCount),this._dispatchRowHeightChangedEvent(0,this._rowCount)}},G.prototype.getColumnWidth=function(t){return this._trackX.getLaneSize(t)},G.prototype.setColumnWidth=function(t,e){return!!this._setColumnWidth(t,e)&&(this._syncLayoutToColumns(t),!0)},G.prototype._setColumnWidth=function(t,e){return this._trackX.setLaneSize(t,e)},G.prototype._updateColumnLayout=function(){this._syncLayoutToColumns(0)},G.prototype._startBindingSession=function(t){},G.prototype._getTempRowHeights=function(){return null},G.prototype.getRowHeight=function(t){return this._trackY.getLaneSize(t)},G.prototype.setRowHeight=function(t,e){if(t<0||t>=this._rowCount)return!1;let i=this._trackY.setLaneSize(t,e);return this._syncLayoutToRows(t,t+1),i&&this._dispatchRowHeightChangedEvent(t,t+1),this._resetTransformIETimer(),i},G.prototype._updateRowHeights=function(t,e){let i=0;for(let o=0;o<this._rowCount;++o){let n=t.getLaneSize(e);i|=this._trackY.setLaneSize(o,n),++e}return this._syncLayoutToRows(0,this._rowCount),i},G.prototype.isColumnVisible=function(t){return this._trackX.isLaneVisible(t)},G.prototype.hideColumn=function(t,e){return this.setColumnVisibility(t,!1===e,0)},G.prototype.isRowVisible=function(t){return this._trackY.isLaneVisible(t)},G.prototype.hideRow=function(t,e){return!!this._trackY.hideLane(t,e)&&(null!=e&&!e||this.isRowVisible(t)?this.isRowVisible(t)&&this._hiddenRowCount--:this._hiddenRowCount++,this._syncLayoutToRows(t,this._rowCount),this._dispatchRowHeightChangedEvent(t,t+1),!0)},G.prototype.getMinimumColumnWidth=function(t){return this._trackX.getMinimumLaneSize(t)},G.prototype.setMinimumColumnWidth=function(t,e){return!!this._trackX.setMinimumLaneSize(t,e)&&(this._syncLayoutToColumns(t),!0)},G.prototype.getMinimumRowHeight=function(t){return this._trackY.getMinimumLaneSize(t)},G.prototype.setMinimumRowHeight=function(t,e){return!!this._trackY.setMinimumLaneSize(t,e)&&(this._syncLayoutToRows(t,this._rowCount),this._dispatchRowHeightChangedEvent(t,t+1),!0)},G.prototype.getCellLeft=function(t){return this._trackX.getLaneStart(t)},G.prototype.getCellTop=function(t){return this._trackY.getLaneStart(t)},G.prototype.getCellWidth=function(t,e){let i=this._cellSpans.getOccupyingSpan(t,e);if(i){let t=this._trackX.getLaneStart(i.indexX);return this._trackX.getLaneEnd(i.indexX+i.colSpan-1)-t}return this.getColumnWidth(t)},G.prototype.getCellHeight=function(t,e){let i=this._cellSpans.getOccupyingSpan(t,e);if(i){let t=this._trackY.getLaneStart(i.indexY);return this._trackY.getLaneEnd(i.indexY+i.rowSpan-1)-t}return this.getRowHeight(e)},G.prototype.hasCellSpan=function(){return this._cellSpans.hasSpan()},G.prototype.getCellRowSpan=function(t,e){return this._cellSpans.getRowSpan(t,e)},G.prototype.setCellRowSpan=function(t,e,i){let o=this._cellSpans.setRowSpan(t,e,i);if(this._updateCellSpanSize(t,e,o),o)return o.retVal>=0?this._updateCellSpanClass(t,e,o.colSpan,o.rowSpan,!0):o.colSpan>1?(this._updateCellSpanClass(t,e,o.colSpan,o.prevRowSpan,!1),this._updateCellSpanClass(t,e,o.colSpan,o.rowSpan,!0)):this._updateCellSpanClass(t,e,o.colSpan,o.prevRowSpan,!1),0!==o.retVal;let n=this._getCell(t,e);return n&&n._rowSpan>1&&this._updateCellSpanClass(t,e,n._colSpan,n._rowSpan,!1),!1},G.prototype.getCellColSpan=function(t,e){return this._cellSpans.getColSpan(t,e)},G.prototype.setCellColSpan=function(t,e,i){let o=this._cellSpans.setColSpan(t,e,i);if(this._updateCellSpanSize(t,e,o),o)return o.retVal>=0?this._updateCellSpanClass(t,e,o.colSpan,o.rowSpan,!0):o.colSpan>1?(this._updateCellSpanClass(t,e,o.prevColSpan,o.rowSpan,!1),this._updateCellSpanClass(t,e,o.colSpan,o.rowSpan,!0)):this._updateCellSpanClass(t,e,o.prevColSpan,o.rowSpan,!1),0!==o.retVal;let n=this._getCell(t,e);return n&&n._colSpan>1&&this._updateCellSpanClass(t,e,n._colSpan,n._rowSpan,!1),!1},G.prototype.clearCellSpans=function(){let t=this._cellSpans.clearAllSpans();if(null==t)return!1;for(let e=t.length;--e>=0;){let i=t[e];this._updateCellSpan(i.indexX,i.indexY,i,!1)}return!0},G.prototype.clearColumnSpans=function(t){let e=this._cellSpans.removeSpanByColIndex(t);if(null==e)return!1;for(let t=e.length;--t>=0;){let i=e[t];this._updateCellSpan(i.indexX,i.indexY,i,!1)}return!0},G.prototype.clearColumnCustomizations=function(){this._trackX.clearLaneCustomizations(),this._syncLayoutToColumns(0)},G.prototype.clearRowCustomizations=function(){this._trackY.clearLaneCustomizations(),this._syncLayoutToRows(0,this._rowCount)},G.prototype.getColumnScalability=function(t){return this._trackX.getLaneScalability(t)},G.prototype.setColumnScalability=function(t,e){return this._trackX.setLaneScalability(t,e)},G.prototype.getRowScalability=function(t){return this._trackY.getLaneScalability(t)},G.prototype.setRowScalability=function(t,e){return this._trackY.setLaneScalability(t,e)},G.prototype.getCell=function(t,e,i){if(i&&this._cellSpans.hasSpan()){let i=this._cellSpans.getColSpan(t,e),o=this._cellSpans.getRowSpan(t,e);i<0&&(t+=i),o<0&&(e+=o)}return this._getCell(t,e)},G.prototype.getCellContent=function(t,e){let i=this.getCell(t,e);return null!==i?i.getContent():null},G.prototype.setCellContent=function(t,e,i){let o=this.getCell(t,e);return null==o?(window.console.log("Error: Accessing nonexistent cell in Grid's Table"),null):o.setContent(i)},G.prototype.getColumnCount=function(){return this._colCount},G.prototype.setColumnCount=function(t){if(t<0&&(t=0),this._colCount===t)return;let e=this._colCount;this._trackX.setLaneCount(t),this._colCount=this._trackX.getLaneCount();let i=0,o=null;if(e>t)for(i=e;--i>=t;)o=this._columns.pop(),o.dispose(),o===this._firstColumn&&(this._firstColumn=null),o===this._lastColumn&&(this._lastColumn=null);else for(i=e;i<t;++i)o=this._newColumn(i);for(this._updateColumnIndices(),i=e;i<t;++i)this._columns[i].activate(!this._colVir);t<=0&&this._selectionList.clearAllSelections()},G.prototype.getRowCount=function(){return this._rowCount},G.prototype.setRowCount=function(t,e){if(t<0&&(t=0),this._rowCount===t)return;let i,o=this._rowCount;for(this._trackY.setLaneCount(t),this._rowCount=this._trackY.getLaneCount(),this._ctxRows.setItemCount(t),this._stretchedCells.setCellCount(t),i=0;i<this._colCount;++i)this._columns[i].setCellCount(t);if(o>t)if(t<this._rowHighlightIndex&&this.setRowHighlight(-1),t<this._activeRowEnd&&(this._activeRowEnd=t),t<this._availableRowCount&&(this._availableRowCount=t),this._cellSpans.removeSpanStartedFromRowIndex(t),this._updateViewHeight(),t>0)for(let e=t;e<o;++e)this._selectionList.deselect(e);else this._selectionList.clearAllSelections();else this._syncLayoutToRows(o,t);let n={};n.prevCount=o,n.rowCount=this._rowCount,this._dispatch("rowCountChanged",n),o<t&&this._insertCells(0,this._rowCount)},G.prototype.getVisibleRowCount=function(){return this._rowCount-this._hiddenRowCount},G.prototype.addRow=function(t){t<=0||(this._colCount<=0?window.console.log("WARNING: Row cannot be added, unless at least one column is added"):this.setRowCount(this._rowCount+t))},G.prototype.removeRow=function(t){t<=0||(t>this._rowCount&&(t=this._rowCount),this.setRowCount(this._rowCount-t))},G.prototype.setBorders=function(t,e,i,o){},G.prototype.getColumnStyle=function(t,e){let i=this._columns[t];return i?i.getStyle(e):null},G.prototype.setColumnStyle=function(t,e,i){let o=this._columns[t];o&&o.setStyle(e,i)},G.prototype.enableColumnClass=function(t,e,i){let o=this._columns[t];o&&o.enableClass(e,i)},G.prototype.hasColumnClass=function(t,e){let i=this._columns[t];return!!i&&i.hasClass(e)},G.prototype.enableRowClass=function(t,e,i){if(t>=0&&t<this._rowCount)for(let o=0;o<this._colCount;++o)this._columns[o].getCell(t).enableClass(e,i)},G.prototype.setRowStyle=function(t,e,i,o){if(t>=0&&t<this._rowCount){i&&(null==o||o)||(i="");for(let o=0;o<this._colCount;++o)this._columns[o].getCell(t).setStyle(e,i)}},G.prototype.getRelativePosition=function(t){return e.getRelativePosition(t,this._element)},G.prototype.getContentWidth=function(){return this._trackX.getTrackSize()},G.prototype.getContentHeight=function(){let t=this._trackY.getTrackSize();if(t<=0&&this._colCount*this.getVisibleRowCount()>0){let t=this._columns[0],e=t.getCell(this._rowCount-1);return e.getTop()+e.getHeight()-t.getCell(0).getTop()}return t},G.prototype.getCellsByRowIndex=function(t){if(t<0||t>=this._rowCount)return null;let e=new Array(this._colCount);for(let i=0;i<this._colCount;++i)e[i]=this._columns[i].getCell(t);return e},G.prototype.disableHorizontalGridLine=function(t){this.enableClass("no-horizontal-grid-line",!1!==t)},G.prototype.disableVerticalGridLine=function(t){this.enableClass("no-vertical-grid-line",!1!==t)},G.prototype.enableShading=function(t){!1!==t?this.addClass("tr-even-shading"):(this.removeClass("tr-even-shading"),this.removeClass("tr-odd-shading"))},G.prototype.setTransposedShading=function(t){this.enableClass("transposed-shading",!1!==t)},G.prototype.enableRowHighlighting=function(t){null==t&&(t=!0),this._rowHighlightEnabled!==t&&(this._rowHighlightEnabled=t,this._rowHighlightEnabled?(this.listen("mousemove",this._onMouseMove),this.listen("mouseout",this._onMouseOut)):(this.setRowHighlight(-1),this.unlisten("mousemove",this._onMouseMove),this.unlisten("mouseout",this._onMouseOut)))},G.prototype.getRowHighlight=function(){return this._rowHighlightIndex},G.prototype.setRowHighlight=function(t){if((!this._rowHighlightEnabled||t<-1||t>=this._rowCount)&&(t=-1),this._rowHighlightIndex===t)return;let e=this._rowHighlightIndex;this._rowHighlightIndex=t;for(let t=this._highlightedCells.length;--t>=0;)this._highlightedCells[t].removeClass("highlighted-row");if(t>=0&&t<this._rowCount){this._highlightedCells.length=this._colCount;for(let e=this._colCount;--e>=0;){let i=this._columns[e].getCell(t);this._highlightedCells[e]=i,i.addClass("highlighted-row")}let e=this.getStretchedCell(t);e&&(this._highlightedCells.push(e),e.addClass("highlighted-row"))}else this._highlightedCells.length=0;if(this._hasListener("rowHighlighted")){let i={};i.prevRowIndex=e,i.rowIndex=t,this._dispatch("rowHighlighted",i)}},G.prototype.getSelectedRows=function(){return this.getSelectedRowCount()>0?this._selectionList.getAllSelections():null},G.prototype.getSelectedRowCount=function(){return this._selectionList.getSelectionCount()},G.prototype.isSelectedRow=function(t){return this._selectionList.getSelection(t)},G.prototype.setSelectedRow=function(t,e){t<0||t>=this._rowCount||(this._selectionList.setSelection(t,e),this._updateSelectionUI(t))},G.prototype.selectSingleRow=function(t){t<0||t>=this._rowCount||(this.clearSelectedRows(),this._selectionList.select(t),this._addSelectionUI(t))},G.prototype.selectRowRange=function(t,e){if(!(t<0||t>=this._rowCount)){t+e>this._rowCount&&(e=this._rowCount-t),this._selectionList.selectRange(t,e);for(let i=0;i<e;++i)this._addSelectionUI(i+t)}},G.prototype.clearSelectedRows=function(){let t=this._selectionList.getSelectionCount();if(t){let e=this._selectionList.getAllSelections();this._selectionList.clearAllSelections();for(let i=0;i<t;++i)this._removeSelectionUI(e[i]);return t}return 0},G.prototype.getFirstSelectedRow=function(){return this._selectionList.getFirstSelectedIndex()},G.prototype.getLastSelectedRow=function(){return this._selectionList.getLastSelectedIndex()},G.prototype.getRowAnchor=function(){return this._selectionList.getSelectionAnchor()},G.prototype.setRowAnchor=function(t){this._selectionList.setSelectionAnchor(t)},G.prototype.activateColumn=function(t,e){let i=this._columns[t];if(i){let t=i.activate(e);if(e&&t&&this._rightSpace){let t=this._rightSpace.parentNode;t&&t.appendChild(this._rightSpace)}}},G.prototype.activateRows=function(){this._onEnterDocument()},G.prototype.moveRowsToTop=function(t){this._ctxRows.moveItemsToTop(t),this._stretchedCells.moveCellsToTop(t);for(let e=0;e<this._colCount;++e)this._columns[e].moveCellsToTop(t)},G.prototype.getFirstIndexInView=function(){return 0},G.prototype.getLastIndexInView=function(){return this._availableRowCount-1},G.prototype.isInCurrentView=function(t){return 0!==this._rowCount&&t>=0&&t<this._rowCount},G.prototype.getFrozenLayout=function(){return this._frozenLayout},G.prototype.setFrozenLayout=function(t){this.isVisible()||(t=!0),this._frozenLayout!==t&&(this._frozenLayout=t,this._cellSpans.freezeMapping(this._frozenLayout),this._frozenLayout||(this._syncLayoutToColumns(0),this._syncLayoutToRows(0,this._rowCount),this._dispatchRowHeightChangedEvent(0,this._rowCount)))},G.prototype.getColumn=function(t){return this._columns[t]||null},G.prototype.insertColumn=function(t,e){t<0?t=0:t>this._colCount&&(t=this._colCount);let i=t<this._colCount,o=this._cellSpans.getAllSpans();this._updateCellSpans(o,!1),this._trackX.insertLane(t,e),this._colCount=this._trackX.getLaneCount();let n=this._newColumn(t);if(this._updateColumnIndices(),this._cellSpans.shiftColumn(t,1)&&(o=this._cellSpans.getAllSpans()),this._updateCellSpans(o,!0),this._calculateViewSize(!0),this._stretchedCells.updateXAxis(),this._selectionList.getSelectionCount()){let t=this._selectionList.getAllSelections();for(let e=t.length;--e>=0;){let i=n.getCell(t[e]);i&&i.addClass("selected-row")}}return n.activate(i||!this._colVir),n},G.prototype.removeColumnAt=function(t){let e=this._trackX.removeLaneAt(t);if(null==e)return null;let i=this._cellSpans.getAllSpans();this._updateCellSpans(i,!1),this._colCount=this._trackX.getLaneCount();let o=this._columns.splice(t,1)[0];return o.dispose(),e.control=o,this._updateColumnIndices(),this._cellSpans.removeColumn(t)&&(i=this._cellSpans.getAllSpans()),this._updateCellSpans(i,!0),this._syncLayoutToColumns(t),t>=this._colCount&&this._updateCssWidth(),e},G.prototype.moveColumn=function(t,i){if(t<0)t=0;else if(t>=this._colCount)return;if(i<0?i=0:i>=this._colCount&&(i=this._colCount-1),t===i)return;let o=this._cellSpans.getAllSpans();this._updateCellSpans(o,!1),this._trackX.moveLane(t,i);let n=this._columns[t];if(e.moveArrayItem(this._columns,t,i),n.getElement().offsetParent){let t=i+1,e=this._columns[t]||null;for(;e&&!e.getElement().offsetParent;)e=this._columns[++t];n.insertBefore(e)}this._updateColumnIndices(),this._updateCellSpans(o,!0);let s=t<i?t:i;this._syncLayoutToColumns(s)},G.prototype.enableRowVirtualization=function(){console.log("WARNING: This function is deprecated")},G.prototype.enableColumnVirtualization=function(t){this._colVir=!1!==t},G.prototype.getColumnIndex=function(t){if(t){if(t.stretched)return this._stretchedCells.getColumnIndex(t);let e=this._columns.length;for(let i=0;i<e;++i)if(this._columns[i].getElement()===t)return i}return-1},G.prototype.getCellIndex=function(t,e){if(e){if(e.stretched)return this._stretchedCells.getRowIndex(e);let i=this._columns[t];if(i)return i.getCellIndex(e)}return-1},G.prototype.getIndex=function(){return this._index},G.prototype.setIndex=function(t){this._index=t},G.prototype.getRowOffset=function(){return this._rowOffset},G.prototype.setRowOffset=function(t){this._rowOffset=t},G.prototype.updateLayout=function(){this._calculateViewSize(!0),this._stretchedCells.updateCells(),this._updateRightSpaceStyle()},G.prototype.stretchCell=function(t,e,i,o){let n=-1;if("number"==typeof t?(n=t,null==e&&(e=0)):t&&(t.stretched?(n=this._stretchedCells.getColumnIndex(t),null==e&&(e=this._stretchedCells.getRowIndex(t))):t.getParent&&(n=this.getColumnIndex(t.getParent()))),n<0||e<0||null==e)return null;let s=null;if(!1!==i){let t=this._coverLayer;t||(t=this._coverLayer=document.createElement("div"),t.className="cover-layer",this._updateLayers()),this._calculateViewSize(),s=this._stretchedCells.stretchCell(e,o?n:0),s.setParent(t)}else s=this._stretchedCells.unstretchCell(e);if(s){let t=this._selectionList.getSelection(e);s.enableClass("selected-row",t)}return s},G.prototype.unstretchCell=function(t,e){return this.stretchCell(t,e,!1)},G.prototype.unstretchAllCells=function(){this._stretchedCells.unstretchAllCells()},G.prototype.getStretchedCell=function(t,e){return null==e&&(e="number"==typeof t?t:this._stretchedCells.getRowIndex(t)),"number"==typeof e?this._stretchedCells.getCell(e):null},G.prototype.getStretchedCells=function(){return this._stretchedCells.getCells()},G.prototype.updateStretchedCells=function(){this._updateLayers();let t=this._coverLayer?this._coverLayer.children.length:0;return!(t<=0||(this._calculateViewSize(!0),this._stretchedCells.updateCells(),!t))},G.prototype._calculateViewSize=function(t){if(this._frozenLayout)return this._stretchedCells.getStretchSize();let e=this._ctx,i=t?0:this._stretchedCells.getStretchSize();if(!i&&e&&e.getWidth){let t=this.getContentWidth();return i=e.getWidth()-this._rightSpaceSize,i?(t<i&&(i=t),this._stretchedCells.setStretchSize(i),i):t}return i},G.prototype._enableStretchCellClass=function(t,e,i){let o=this.getStretchedCell(t);o&&o.enableClass(e,i)},G.prototype._getViewSize=function(){return this._calculateViewSize()},G.prototype.getColumnHost=function(){return this._element},G.prototype.setHidingMethod=function(t){this._hidingMethod=t},G.prototype.getHidingMethod=function(){return this._hidingMethod},G.prototype.setColumnVisibility=function(t,e,i){return!!this._trackX.hideLane(t,!e,i)&&(this._syncLayoutToColumns(t),!0)},G.prototype.getRowLayout=function(){return this._trackY},G.prototype.reserveRightSpace=function(t){if(t&&t>0){if(!this._rightSpace){let t=this._rightSpace=document.createElement("div");t.className="tr-reserved-space",t.style.height=this.getContentHeight()+"px",this._updateLayers()}this._rightSpace.style.width=t+"px",this._rightSpaceSize=t,this._updateCssWidth()}else if(this._rightSpace){let t=this._rightSpace.parentNode;t&&t.removeChild(this._rightSpace),this._rightSpace=null,this._rightSpaceSize=0,this._updateCssWidth()}return this._rightSpace},G.prototype._updateRightSpaceStyle=function(){let t=this._rightSpace;if(!t)return;let e=!1,i=0;this._hscrollbar&&(e=this._hscrollbar.isActive(),i=this._hscrollbar.getPinnedRightColumnCount()),e&&!i?(t.style.top=this._trackY.getLaneStart(this._activeRow)+"px",t.style.left=this._trackX.getLaneStart(this._colCount)+"px",t.style.position="",t.style.display=""):(t.style.position="static",t.style.display="inline-block")},G.prototype._updateLayers=function(){if(this._rightSpace){let t=this._rightSpace.parentNode;t?t.appendChild(this._rightSpace):this._element.appendChild(this._rightSpace)}this._boundLayer&&this._element.appendChild(this._boundLayer),this._coverLayer&&this._element.appendChild(this._coverLayer)},G.prototype.getReservedSpace=function(){return this._rightSpace},G.prototype.getComputedStyle=function(){let t=this._element;return t.offsetParent?getComputedStyle(t):null},G.prototype.isColumnActive=function(t){let e=this._columns[t];return!!e&&e.isActive()},G.prototype.setRowAttributes=function(t,e){if(!(t<0||t>=this._rowCount))for(let i=0;i<this._colCount;++i){let o=e(i);for(let e=o.length;--e>=0;){let n=o[e],s=this._columns[i].getCell(t);s&&(n.remove?s.removeAttribute(n.attribute):s.setAttribute(n.attribute,n.value))}}},G.prototype.getContextRow=function(t){return this._ctxRows.getItem(t)},G.prototype.selectColumn=function(t,e){this.enableColumnClass(t,"selected-column",e),e&&(this._boundLayer||(this._initBoundLayer(),this._updateLayers()))},G.prototype.isSelectedColumn=function(t){return this.hasColumnClass(t,"selected-column")},G.prototype.selectCell=function(t,e,i){let o=this._getCell(t,e);o&&o.enableClass("selection",i)},G.prototype.setCellBounds=function(t,e,i,o){let n=this._initBoundLayer(),s=this._cellBoundPainter;s||(s=this._cellBoundPainter=new B({boundLayer:n,layoutX:this._trackX,layoutY:this._trackY,hscrollbar:this._hscrollbar,calculateColumnBounds:this.calculateColumnBounds.bind(this)}));let r=this.getColumnCount();s.setCellBounds(t,e,i,o,r)},G.prototype.getHorizontalLayout=function(){return this._trackX},G.prototype.calculateColumnBounds=function(t,e,i,o){let n=0,s=0,r=!1,l=!1,h=this._trackX.getLaneCount();if(t>=0&&(n=this._trackX.getLaneStart(t),s=this._trackX.getLaneEnd(e)),n<s){let i,o,u=0,a=0,p=0,_=0;this._hscrollbar&&(a=this._hscrollbar.getScrollLeft(),p=this._hscrollbar.getPinnedLeftColumnCount(),_=this._hscrollbar.getPinnedRightColumnCount()),i=o=this._trackX.getTrackSize(),p&&(u=this._trackX.getLaneStart(p)),_&&(h-=_,i=this._getViewSize()-o+this._trackX.getLaneStart(h)),t>=p&&t<h?(n-=a,n<u?(n=u,r=!0):n>i&&(n=i,r=!0)):t>=h&&(n=this._getViewSize()-o+this._trackX.getLaneStart(t)),e>=p&&e<h?(s-=a,s<u?(s=u,l=!0):s>i&&(s=i,l=!0)):e>=h&&(s=this._getViewSize()-o+this._trackX.getLaneEnd(e))}i[0]=n,i[1]=s,o[0]=r,o[1]=l},G.prototype.updateColumnBounds=function(t,e,i){let o=this._colBounds,n=this._colBoundCache;o||(o=this._colBounds=[]),n||(n=this._colBoundCache=[]);let s,r=t.length,l=null,h=null,u=o.length;for(s=r;s<u;++s)h=o[s],l=h.parentNode,l&&l.removeChild(h);if(o.length=u=r,r)for(s=0;s<r;++s){let r=t[s],l=e[s],u=r[0],a=r[1];h=n[s],h||(h=n[s]=document.createElement("div"),h.className="selection-bound column-bound"),h.style.left=u+"px",h.style.width=a-u+"px",i=i||0,h.style.top=i+"px",h.style.height=this._trackY.getTrackSize()-i+"px",h.classList.toggle("no-left-bound",l[0]),h.classList.toggle("no-right-bound",l[1]),this._boundLayer&&(o[s]||(o[s]=h,this._boundLayer.appendChild(h)))}},G.prototype.updateColumnSeparators=function(){let t=this._hscrollbar.getPinnedLeftColumnCount(),e=this._hscrollbar.getPinnedRightColumnCount();!t&&!e||this._boundLayer||this._initBoundLayer();let i=!1;this._hscrollbar&&(i=this._hscrollbar.isActive());let o=this._boundLayer,n=this._leftColumnSeparator;if(i&&t){n||(n=this._leftColumnSeparator=this._createColumnSeparator()),n.parentNode||(o.children.length?o.insertBefore(n,o.children[0]):o.appendChild(n));let e=this._trackX.getLaneStart(t);n.style.left=e-1+"px",n.style.height=this._trackY.getTrackSize()+"px"}else n&&n.parentNode&&this._boundLayer.removeChild(n);if(n=this._rightColumnSeparator,i&&e){n||(n=this._rightColumnSeparator=this._createColumnSeparator()),n.parentNode||(o.children.length?o.insertBefore(n,o.children[0]):o.appendChild(n));let t=this.getColumnCount(),i=this._trackX.getLaneEnd(t-1)-this._trackX.getLaneStart(t-e),s=this._getViewSize();n.style.left=s-i+"px",n.style.height=this._trackY.getTrackSize()+"px"}else n&&n.parentNode&&this._boundLayer.removeChild(n)},G.prototype._createColumnSeparator=function(){let t=document.createElement("div");return t.classList.add("column-separator"),t},G.prototype._initBoundLayer=function(){let t=this._boundLayer;return t||(t=this._boundLayer=document.createElement("div"),t.className="cover-layer",this._element.appendChild(t)),t},G.prototype._getCell=function(t,e){let i=this._columns[t];return i?i.getCell(e):null},G.prototype._insertCells=function(t,e){this._activeRow=t,this._activeRowEnd=e;let i=this._trackY.getLaneStart(t);for(let o=0;o<this._colCount;++o){let n=this._columns[o];n.hasCollapsedCells()||n.setTop(i),n.activateCells(t,e)}if(this._rightSpace&&(this._rightSpace.style.top=i+"px"),e>this._availableRowCount){let t={};t.prevRowIndex=this._availableRowCount,t.rowIndex=e,this._availableRowCount=e,this._dispatch("rowAvailable",t)}},G.prototype._newColumn=function(t){let e=new C(this._virOwner||this);e.setHeight(this._trackY.getDefaultLaneSize()),e.setCellCount(this._rowCount),e.setTop(this._trackY.getLaneStart(this._activeRow)),e.activateCells(this._activeRow,this._activeRowEnd);for(let t=0;t<this._rowCount;++t)this._trackY.isAtDefaultSize(t)||e.getCell(t).setHeight(this._trackY.getLaneSize(t));if(t>=this._columns.length)this._columns.push(e),e.setParent(this._element);else{this._columns.splice(t,0,e);let i=this._columns[t+1];e.insertBefore(i)}return e},G.prototype._updateCssWidth=function(){this._frozenLayout||(this._calculateViewSize(!0),this._stretchedCells.updateXAxis(),this._element.style.width=this._getWidth()+"px")},G.prototype._updateViewHeight=function(){if(this._frozenLayout)return;let t=this.getContentHeight();this._element.style.height=t+"px",this._rightSpace&&(this._rightSpace.style.height=t+"px")},G.prototype._updateColumnIndices=function(){let t=this._columns.length,e=this._columns[0];e!==this._firstColumn&&(this._firstColumn&&this._firstColumn.removeClass("first"),this._firstColumn=e,this._firstColumn&&this._firstColumn.addClass("first"));let i=this._columns[t-1];i!==this._lastColumn&&(this._lastColumn&&this._lastColumn.removeClass("last"),this._lastColumn=i,this._lastColumn&&this._lastColumn.addClass("last"));let o=null;for(let t=this._columns.length;--t>=0;){let e=this._columns[t];e.setNextSibling(o),o=e}},G.prototype._syncLayoutToColumns=function(t){if(this._frozenLayout)return!1;if(this._rightSpace&&(this._rightSpace.style.left=this._trackX.getLaneStart(this._colCount)+"px"),t>=this._colCount)return!1;for(let e=t;e<this._colCount;++e){let t=this._columns[e];t.setLeft(this._trackX.getLaneStart(e)),t.setWidth(this._trackX.getLaneSize(e))}return this._updateCellSpanLayout(this._cellSpans.getAllSpans()),this._updateCssWidth(),!0},G.prototype._syncLayoutToRows=function(t,e){if(!this._frozenLayout){for(let i=t;i<e;++i){let t=this._trackY.isAtDefaultSize(i)?-1:this._trackY.getLaneSize(i);for(let e=0;e<this._colCount;++e)this._columns[e].getCell(i).setHeight(t)}this._stretchedCells.updateYAxis(),t?this._updateCellSpanLayout(this._cellSpans.getAllSpans()):this._updateCellSpans(this._cellSpans.getAllSpans(),!0),this._updateViewHeight()}},G.prototype._dispatchRowHeightChangedEvent=function(t,e){if(!this._hasListener("rowHeightChanged"))return;if(t>=e)return;let i={};i.rowIndex=t,i.changeLength=e-t,this._dispatch("rowHeightChanged",i)},G.prototype._updateCellSpanSize=function(t,e,i){let o=this._getCell(t,e);if(null!=o)if(i&&i.colSpan>1?(o.setWidth(this.getCellWidth(t,e)),this._columns[t].disableDeactivation()):o.setWidth(-1),i&&i.rowSpan>1)o.setHeight(this.getCellHeight(t,e));else{let t=this._trackY.isAtDefaultSize(e)?-1:this._trackY.getLaneSize(e);o.setHeight(t)}},G.prototype._updateCellSpanLayout=function(t){if(null!=t)for(let e=t.length;--e>=0;){let i=t[e];this._updateCellSpanSize(i.indexX,i.indexY,i)}},G.prototype._updateCellSpan=function(t,e,i,o){this._updateCellSpanSize(t,e,o?i:null),this._updateCellSpanClass(t,e,i.colSpan,i.rowSpan,o)},G.prototype._updateCellSpanClass=function(t,e,i,o,n){let s;for(let r=0;r<i&&(s=this._columns[t+r],s);++r)s.collapseCells(e,o,n,0===r,r>0);let r=this._getCell(t,e);r&&(r._colSpan=n?i:1,r._rowSpan=n?o:1)},G.prototype._updateCellSpans=function(t,e){if(null!=t)for(let i=t.length;--i>=0;){let o=t[i];this._updateCellSpan(o.indexX,o.indexY,o,e)}},G.prototype._onMouseMove=function(t){let i=t.target,o=e.closestElement(i,"cell"),n=this._stretchedCells.getColumnIndex(o);if(n<0){let t=e.closestElement(i,"column");n=this.getColumnIndex(t)}let s=this.getCellIndex(n,o);this.setRowHighlight(s)},G.prototype._onMouseOut=function(t){let e=t.relatedTarget;if(e){let t=this._element;for(;null!==e.parentNode;)if(e=e.parentNode,e===t)return}this.setRowHighlight(-1)},G.prototype._getEventHandlers=function(){return{mouseout:this._onMouseOut,mousemove:this._onMouseMove}},G.prototype._updateSelectionUI=function(t){let e=this._selectionList.getSelection(t);this._enableStretchCellClass(t,"selected-row",e),this.enableRowClass(t,"selected-row",e)},G.prototype._addSelectionUI=function(t){this._enableStretchCellClass(t,"selected-row",!0),this.enableRowClass(t,"selected-row",!0)},G.prototype._removeSelectionUI=function(t){this._enableStretchCellClass(t,"selected-row",!1),this.enableRowClass(t,"selected-row",!1)},G.prototype._onEnterDocument=function(){if(!this._initialized&&this.getParent()){for(let t=0;t<this._colCount;++t)this._columns[t].enableAutoStyleUpdating();this._syncLayoutToColumns(0),this._initialized=!0}},G.prototype._setContext=function(t){this._ctx=t},G.prototype._getContext=function(){return this._ctx},G.prototype._resetTransformIETimer=function(){e.isIE&&(this._transformIETimer||(this.enableClass("reset-transform"),this._transformIETimer=setTimeout(this._onResetTransformIE,20)))},G.prototype._onResetTransformIE=function(){this._transformIETimer=0,this.enableClass("reset-transform",!1)},G._proto=G.prototype;const N=G;let W={};const Y=/\d+/g;let X=function(t){let e=parseInt(t.replace(/[^0-9A-F]/gi,""),16);return[e>>16&255,e>>8&255,255&e]},q=function(t){if(!t||t<0)return 0;if(t>=255)return 1;let e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)},U=function(t){return.2126*q(t[0])+.7152*q(t[1])+.0722*q(t[2])},K=function(t,e){if(t===e)return 1;let i=t,o=e;return t>e&&(o=t,i=e),(o+.05)/(i+.05)};W.rgb2Hex=function(t){if(!t||"string"!=typeof t)return"";if("#"===t.charAt(0))return t;let e=t.match(Y);if(!e||e.length<3)return t;let i="#";for(let t=0;t<3;t++){let o=+e[t];o>=16||(i+="0"),i+=o?o.toString(16).toUpperCase():"0"}return i},W.num2Hex=function(t){return"#"+(16777216+(t[2]|t[1]<<8|t[0]<<16)).toString(16).slice(1)},W.num2Rgb=function(t){return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},W.hex2Num=X,W.hex2Rgb=function(t){if(t){let e=parseInt(t.replace(/[^0-9A-F]/gi,""),16);return"rgb("+(e>>16&255)+", "+(e>>8&255)+", "+(255&e)+")"}return""},W.getColorLuminance=q,W.getRelativeLuminance=U,W.getContrastRatio=K,W.getContrastColor=function(t){let e=U(t),i=K(1,e);return K(0,e)>=i?"#000000":"#ffffff"},W.blendColor=function(t,e,i){i>1?i=1:i<0&&(i=0);let o=X(t),n=X(e),s=[];for(let t=0;t<3;++t){let e=(n[t]-o[t])*i;s.push(o[t]+e)}return s};let j=function(t){for(let e in t)return!1;return!0},Q=function(t,e,i){let o=e[i];if(null!=o){let e=t[i];Array.isArray(e)?t[i]=e.concat(o):Array.isArray(o)&&e?t[i]=o.concat(e):t[i]=o}},J=function(){this._groupMap={},this._childToParent={}};J.prototype._groupMap,J.prototype._childToParent,J.getGroupId=function(t){return t&&t.id||""},J.calcTreeDepth=function(t,e){let i=-1,o=e;for(;o;){if(++i>15){console.log("WARNING: Infinite loop detected during column group creation");break}o=t[o.parentId]}return i},J.getLeafDescendants=function(t,e){let i=t[e];if(!i)return null;let o=[],n=[i],s=0,r={};for(;s<n.length;){i=n[s++],r[i.id]=!0;let e=i.children,l=e?e.length:0;for(let s=0;s<l;++s){let l=e[s];i=t[l],i?r[i.id]||n.push(i):o.push(l)}}return o},J._cloneObject=function(t){let e=function(t,e){return function(t,e,i){if(!t)return null;if(!e||t===e)return t;let o;if(i){let n=i.length;for(let s=0;s<n;++s)o=i[s],o&&Q(t,e,o)}else for(o in e)Q(t,e,o);return t}({},t,e)}(t);return Array.isArray(e.children)?e.children=e.children.slice():e.children=[],e},J._toGroupDefinition=function(t,e){let i=null;return t&&(i=Array.isArray(t)?{children:t.slice()}:J._cloneObject(t),e&&(i.name||(i.name=e),i.id=e)),i},J.prototype.toString=function(){let t=this._groupMap,e=[];e.push("=== groupDefs ===");for(let i in t){let o=t[i];e.push(i+": "+JSON.stringify(o,["id","parentId","children"]))}return e.push("=== childToParent ==="),e.push(JSON.stringify(this._childToParent,null,2)),e.push(""),e.join("\n")},J.prototype.getGroup=function(t){return t&&this._groupMap[t]||null},J.prototype.getDefinition=J.prototype.getGroup,J.prototype.getGroups=function(){let t=[],e=this._groupMap;for(let i in e)t.push(e[i]);return t},J.prototype.getGroupIds=function(){return Object.keys(this._groupMap)},J.prototype.getGroupMap=function(){return this._groupMap},J.prototype.cloneGroupMap=function(){let t=this._groupMap,e={};for(let i in t){let o=t[i],n=J._cloneObject(o);e[i]=n}return e},J.prototype.rebuildMap=function(){let t,e,i=this._groupMap,o=this._childToParent={},n=Object.keys(i),s=n.length;for(t=0;t<s;++t){e=n[t];let s=i[e].children,r=s?s.length:0;for(let t=0;t<r;t++)o[s[t]]=e}for(t=0;t<s;++t){e=n[t];let s=o[e];s&&(i[e].parentId=s)}},J.prototype.getGroupChildren=function(t){let e=this._groupMap[t];return e?e.children:null},J.prototype.getLeafDescendants=function(t){return J.getLeafDescendants(this._groupMap,t)},J.prototype.getGroupLevel=function(t){return J.calcTreeDepth(this._groupMap,this._groupMap[t])},J.prototype.getRootGroup=function(t){if(!t)return null;let e=this._groupMap,i=e[t]||null;if(i)for(;i.parentId;){let t=e[i.parentId];if(!t)break;i=t}return i},J.prototype.getParentGroup=function(t){return this.getGroup(this._childToParent[t])},J.prototype.getParentIds=function(t){if(t&&"string"==typeof t){let e=this._childToParent[t];if(e){let t=[e],i=this._groupMap[e];for(;i&&i.parentId;)i=this._groupMap[i.parentId],i&&t.push(i.id);return t}}return null},J.prototype.getParentId=function(t,e){let i=this._childToParent[t];if(null!=e){let t=this.getGroupLevel(i);for(;t>e&&i;)i=this._childToParent[i],t--}return i||""},J.prototype.removeAllGroups=function(){for(let t in this._groupMap)return this._groupMap={},this._childToParent={},!0;return!1},J.prototype.setGroups=function(t){let e=this._groupMap={},i=t?t.length:0;for(let o=0;o<i;o++){let i=t[o],n=i.id;n&&(e[n]=J._cloneObject(i))}this.rebuildMap()},J.prototype.addGroup=function(t){let e=J.getGroupId(t);return e?this.setGroup(e,t):e},J.prototype.removeGroup=function(t){return!!this._groupMap[t]&&(this.removeAllChildren(t),this.unsetParent(t),delete this._groupMap[t],!0)},J.prototype.setGroup=function(t,e){if(!t)return"";if(e){let i=J._toGroupDefinition(e,t);this._ungroupChildren(i.children),this._groupMap[t]&&this.removeAllChildren(t);let o=this._childToParent[t];o&&(i.parentId=o),this._groupMap[t]=i;let n=i.children,s=n.length;for(let e=0;e<s;++e){let i=n[e];this._childToParent[i]=t;let o=this._groupMap[i];o&&(o.parentId=t)}}else if(!this.removeGroup(t))return"";return t},J.prototype._ungroupChildren=function(t){if(Array.isArray(t)){let e=t.length;for(let i=0;i<e;++i)this.unsetParent(t[i])}},J.prototype.hasGroupChild=function(t,e){let i=this._groupMap[t];if(e&&i){let t=i.children;if(t)return t.indexOf(e)>=0}return!1},J.prototype.contains=function(t,e){if(t&&e){if(t===e)return!0;let i=20,o=this._childToParent[e];for(;o&&i;){if(t===o)return!0;--i,o=this._childToParent[o]}}return!1},J.prototype.addGroupChild=function(t,e,i){let o=this._groupMap[t];if(e&&o){let n=o.children;if(n&&n.indexOf(e)<0){this.unsetParent(e),this._childToParent[e]=t;let o=this._groupMap[e];return o&&(o.parentId=t),null!=i&&i>=0?n.splice(i,0,e):n.push(e),!0}}return!1},J.prototype.removeGroupChild=function(t,e){return null==e?this.unsetParent(t):!!this.hasGroupChild(t,e)&&this.unsetParent(e)},J.prototype.unsetParent=function(t){let e=this._childToParent[t];if(!e)return!1;this._childToParent[t]="";let i=this._groupMap[t];i&&(i.parentId="");let o=this._groupMap[e];if(o){let e=o.children;if(e&&e.length){let i=e.indexOf(t);i>=0&&e.splice(i,1)}}return!0},J.prototype.removeAllChildren=function(t){let e=this._groupMap[t];if(e){let t=e.children,i=t?t.length:0;if(i){e.children=[];for(let e=0;e<i;++e){let i=t[e];this._childToParent[i]&&(this._childToParent[i]="");let o=this._groupMap[i];o&&(o.parentId="")}return!0}}return!1},J.prototype.setGroupChildren=function(t,e){let i=this._groupMap[t];if(i){if(Array.isArray(e)){let o=e.slice();this._ungroupChildren(o),this.removeAllChildren(t),i.children=o;let n=i.id,s=o.length;for(let t=0;t<s;++t){let e=o[t];this._childToParent[e]=n;let i=this._groupMap[e];i&&(i.parentId=n)}return!0}if(!e&&i.children.length)return this.removeAllChildren(t),!0}return!1},J.prototype.getGroupName=function(t){let e=this._groupMap[t];return e&&e.name||""},J.prototype.setGroupName=function(t,e){let i=this._groupMap[t];return!(!i||i.name===e||(i.name=e,0))};let $=function(){this._rows={},this._addEvent("dataComposed"),this._addEvent("dataChanged")};l.inherits($,r),$.prototype._rows,$.prototype._composing=!1,$.prototype.dispose=function(){this.unlistenAll(),this.clearAllData(!0)},$.prototype.setSubscriptions=function(){},$.prototype.getSubscriptions=function(){return null},$.prototype.addSubscription=function(){},$.prototype.removeSubscription=function(){},$.prototype.startAllSubscriptions=function(){},$.prototype.stopAllSubscriptions=function(){},$.prototype.getSubscription=function(){return null},$.prototype.getPrimaryRic=function(){return""},$.prototype.clearAllData=function(t){this._rows={},t||this._dispatchDataChange({globalChange:!0})},$.prototype.clearColumnData=function(t,e){let i="string"==typeof t?[t]:t;for(let t=i.length;--t>=0;){let e=i[t];if(e)for(let t in this._rows)delete this._rows[t][e]}e||this._dispatchDataChange({globalChange:!0})},$.prototype.getData=function(t,e){let i=this.getRowData(t);return i?i[e]:null},$.prototype.getAllRics=function(){return null},$.prototype.getAllRowIds=function(){let t=[];for(let e in this._rows)t.push(e);return t},$.prototype.hasRowId=function(t){return!!this._rows[t]},$.prototype.getColumnData=function(t){let e=[];for(let i in this._rows)e.push(this._rows[i][t]);return e},$.prototype.getRowData=function(t){return this._rows[t]||null},$.prototype.getMultipleRowData=function(t,e,i){let o=t.length;null==i&&(i=o),i>o&&(i=o),e>0||(e=0);let n=new Array(o),s=this._rows;for(let o=e;o<i;++o)n[o]=s[t[o]]||null;return n},$.prototype.getAllRowData=function(){let t=[],e=this._rows;for(let i in e)t.push(e[i]);return t},$.prototype.setData=function(t,e,i){let o={};return o[e]=i,this.setRowData(t,o)},$.prototype.hasDataCloudData=function(t){},$.prototype.setRowData=function(t,e,i){let o=this.getRowData(t),n=!1,s=null;if(e)if(o){for(let t in e)o[t]=e[t],n=!0;s=e}else o=e,this._rows[t]=o,n=!0;else o&&(delete this._rows[t],n=!0);if(n&&!this._composing){let e=i||{};e.rid=t,s&&(e.changes=s),e.rowData=o,this._dispatchDataChange(e)}return n},$.prototype.cloneRowData=function(t){let e=this._rows[t];if(!e)return null;let i={};for(let t in e)0!==t.indexOf("FREE_TEXT")&&(i[t]=e[t]);return i},$.prototype._replaceRowId=function(t,e){let i=this._rows;return!!i[t]&&(i[e]=i[t],delete i[t],!0)},$.prototype.replaceRowIds=function(t){if("object"==typeof t)for(let e in t)this._replaceRowId(e,t[e])},$.prototype.addStaticFields=function(){},$.prototype.removeStaticFields=function(){},$.prototype.resetStaticFields=function(){},$.prototype.getStaticFields=function(){},$.prototype.dump=function(t){return $.constructTable(this.getAllRowData(),t,Object.keys(this._rows))},$.prototype.log=function(t){console.table(this.dump(t))},$.prototype.setDataCloudSettings=function(){},$.prototype.getDataCloudFields=function(){},$.prototype.addDataCloudFields=function(){},$.prototype.removeDataCloudField=function(){},$.prototype._dispatchDataChange=function(t){this._composing||(this._composing=!0,this._dispatch("dataComposed",t),this._composing=!1,this._dispatch("dataChanged",t))},$._defaultPropertyGetter=function(t,e,i){let o=e[i];return o?o[t]:null},$._defaultGetter=function(t,e){return t[e]},$.constructTable=function(t,e,i){let o=0,n=t.length,s=n,r=null,l=i||null,h=$._defaultGetter,u=!1;if(e){if(e.rowCount&&(s=e.rowCount,u=!0),e.colNames){r={};let t=e.colNames.length;for(let i=0;i<t;++i)r[e.colNames[i]]=!0;u=!0}e.getter&&(h="string"==typeof e.getter?$._defaultPropertyGetter.bind(null,e.getter):e.getter,u=!0),e.startIndex&&(o=e.startIndex,u=!0),!1===e.withRowIds&&(l=null)}if(!u&&!l)return t;let a=[];for(let e=o;e<n&&!(a.length>=s);++e){let i=t[e],o=l?{rid:l[e]}:{};if(i){let t;if(r)for(t in r)null!=i[t]&&(o[t]=h(i,t));else for(t in i)o[t]=h(i,t)}a.push(o)}return a};const Z=$;let tt=function(){};tt.prototype._events=null,tt.prototype._listenerCount=0,tt.prototype.addEventListener=function(t,e){if(!t||!e)return;this._events||(this._events={});let i=this._events[t];i?i.indexOf(e)<0&&(i.push(e),++this._listenerCount):(this._events[t]=[e],++this._listenerCount)},tt.prototype.removeEventListener=function(t,e){let i=this._events?this._events[t]:null;if(i){let t=i.indexOf(e);t>=0&&(i.splice(t,1),--this._listenerCount)}},tt.prototype.removeAllEventListeners=function(){this._events=null,this._listenerCount=0},tt.prototype.hasListener=function(t){if(this._listenerCount){if(t){let e=this._events?this._events[t]:null;return!!e&&e.length>0}return!0}return!1},tt.prototype.getListener=function(t,e){if(t){let i=this._events?this._events[t]:null;if(i)return e||(e=0),i[e]||null}return null},tt.prototype.addListener=function(t,e){let i=t?t[e]:null;"function"==typeof i&&this.addEventListener(e,i)},tt.prototype._prepareEventArguments=function(t,e){return e},tt.prototype._dispatch=function(t,e){let i=this._events?this._events[t]:null;if(i){e=this._prepareEventArguments(t,e);let o=i.length;for(let t=0;t<o;++t)i[t](e)}},tt.preventDefault=function(t){t&&t.preventDefault&&(t.preventDefault(),t.stopPropagation())};const et=tt;let it=function(t,e){this._rid=t,this._childIds=[],this._shared=e,e.defaultCollapsing&&(this._collapsed=!0)};l.inherits(it,et);const ot="Uncategorized";it._subSegSortLogic=function(t,e){return t===ot?1:e===ot||t<e?-1:e<t?1:0},it.prototype._shared=null,it.prototype._rid,it.prototype._childIds,it.prototype._childDataIds=null,it.prototype._collapsed=!1,it.prototype._order=0,it.prototype._offsetOrder=0,it.prototype._depth=0,it.prototype._disposed=!1,it.prototype._subSegDef=null,it.prototype._subSegment=!1,it.prototype._subSegMap=null,it.prototype._subSegNames=null,it.prototype._subSegName="",it.prototype._subSegVal,it.prototype.dispose=function(){if(this._disposed)return;this._disposed=!0,this.removeAllEventListeners();let t=this._subSegNames;if(t){let e=t.length,i=this._subSegMap;for(let o=0;o<e;++o)i[t[o]].dispose();this._subSegMap=this._subSegNames=null}this._collapsed&&this.markCollapsingStateDirty(),this._childDataIds=null,this._childIds.length=0,this._shared=null,this._subSegDef=this._subSegVal=null},it.prototype.getId=function(){return this._rid},it.prototype.getParentId=function(){return this._shared.childToSegment[this._rid]||""},it.prototype.getParent=function(){let t=this.getParentId();return t&&this._shared.segments[t]||null},it.prototype.getSubSegmentIds=function(t){let e=this._subSegNames;if(e){t||(t=[]);let i=e.length,o=this._subSegMap;for(let n=0;n<i;++n){let i=o[e[n]];t.push(i.getId()),i.getSubSegmentIds(t)}return t}return null},it.prototype.addChild=function(t,e){if(!t)return!1;let i=this._shared.childToSegment[t];if(i){if(i!==this._rid){let e=this._shared.segments[i];e&&!e.hasSubSegments()&&e.removeChild(t),this._shared.childToSegment[t]=this._rid}}else this._shared.childToSegment[t]=this._rid;return null!=e&&(e&&e!==t?(this._childDataIds||(this._childDataIds={}),this._childDataIds[t]=e):this._childDataIds&&delete this._childDataIds[t]),this._childIds.indexOf(t)<0&&(this._collapsed&&(this._shared.dirtyCollapsingState=!0),this._childIds.push(t),!0)},it.prototype.addChildren=function(t,e){if(!t)return!1;let i=Array.isArray(t)?t:[t],o=i.length;if(!o)return!1;let n,s=0;if(null!=e)for(e=Array.isArray(e)?e:[e],n=0;n<o;++n)s|=this.addChild(i[n],e[n]);else for(n=0;n<o;++n)s|=this.addChild(i[n]);return!!s},it.prototype.containsChild=function(t){return this._childIds.indexOf(t)>=0},it.prototype.getChildIndex=function(t){return this._childIds.indexOf(t)},it.prototype.removeChild=function(t){if(this._subSegment)return!1;if(!this._childIds.length)return!1;let e=this._childIds.indexOf(t);return!(e<0||(this._shared.childToSegment[t]===this._rid&&delete this._shared.childToSegment[t],this._childIds.splice(e,1),this._collapsed&&(this._shared.dirtyCollapsingState=!0),0))},it.prototype.removeChildren=function(t){if(this._subSegment)return!1;if(!this._childIds.length)return!1;let e=Array.isArray(t)?t:[t],i=e.length,o=0;for(let t=0;t<i;++t)o|=this.removeChild(e[t]);return!!o},it.prototype.removeAllChildren=function(){if(this._subSegment)return!1;let t=this._childIds.length;if(!this._childIds.length)return!1;let e=this._rid,i=this._shared.childToSegment,o=this._childIds;for(let n=0;n<t;++n){let t=o[n];i[t]===e&&delete i[t]}return this._childIds.length=0,this._childDataIds=null,this._collapsed&&(this._shared.dirtyCollapsingState=!0),!0},it.prototype.getChildIds=function(){return this._childIds},it.prototype.getChildren=function(){let t={},e=this._childIds,i=e.length,o=this._childDataIds||{};for(let n=0;n<i;++n){let i=e[n];t[i]=o[i]||i}return t},it.prototype.getChildCount=function(){return this._childIds.length},it.prototype.markCollapsingStateDirty=function(){(this._childIds.length||this._subSegDef)&&(this._shared.dirtyCollapsingState=!0)},it.prototype.getClassification=function(){return this._subSegDef&&this._subSegDef.classifiers||null},it.prototype.setClassification=function(t){if(this._subSegment)return!1;let e=null;this._subSegDef&&(e=this._subSegDef.classifiers);let i,o=null;t&&("string"==typeof t?o=[t]:Array.isArray(t)&&(o=t));let n=o?o.length:0;if(n){if((e?e.length:0)===n){for(i=0;i<n&&o[i]===e[i];++i);if(i>=n)return!1}return this._subSegDef||(this._subSegDef={root:this,subSegments:null}),this._subSegDef.classifiers=o,!0}return!!e&&(this._subSegDef.classifiers=null,this._subSegDef=null,!0)},it.prototype.classify=function(t){let e=this._subSegDef?this._subSegDef.classifiers:null,i=e?e.length:0,o=this._subSegNames,n=o?o.length:0;if(!n&&this._depth>=i)return!1;let s,r=this._shared;this._collapsed&&(r.dirtyCollapsingState=!0);let l="",h={},u=0,a=this._subSegMap,p=null;if(n)for(u=n,s=0;s<u;++s)l=o[s],h[l]=1,p=a[l],p._childIds.length&&(p._childIds.length=0),p._collapsed&&(r.dirtyCollapsingState=!0);let _,d=!this._subSegment,c=this._childDataIds||{},g=this._childIds,f=g.length;if(this._depth<i&&t){a||(a=this._subSegMap={},o=this._subSegNames=[]);let i=e[this._depth];for(s=0;s<f;++s){_=g[s];let e=c[_]||_,n=t[e],d=n?n[i]:null;if(r.childToSegment[_]=this._rid,l=ot,(d||0===d||!1===d)&&(l=d+""),h[l]&&(h[l]=0,--u),p=a[l],!p){let t=this._rid+"/"+l;p=new it(t,r),p._subSegDef=this._subSegDef,p._subSegment=!0,p._depth=this._depth+1,p._subSegName=l,p._subSegVal=d,r.childToSegment[t]=this._rid,a[l]=p,o.push(l),this._dispatch("subSegmentAdded",{rid:t,segment:p})}p.addChild(_,e)}}else if(d)for(s=0;s<f;++s)_=g[s],r.childToSegment[_]=this._rid;if(u>0){for(l in u>=o.length&&(o.length=0),h)if(h[l]){p=a[l],delete a[l];let t=o.indexOf(l);t>=0&&o.splice(t,1),this._dispatch("subSegmentRemoved",{rid:p.getId(),segment:p})}o.length||(o=this._subSegMap=this._subSegNames=null)}if(n=o?o.length:0,n)for(o.sort(it._subSegSortLogic),s=0;s<n;++s)p=a[o[s]],p.classify(t);return!0},it.prototype.hasSubSegments=function(){return!!this._subSegNames&&!!this._subSegNames.length},it.prototype.isSubSegment=function(){return this._subSegment},it.prototype.isRootSegment=function(){return!this._shared.childToSegment[this._rid]},it.prototype.getFirstAncestor=function(){let t=null;if(this._subSegment&&this._subSegDef)t=this._subSegDef.root;else if(t=this.getParent(),t){let e=t.getParent();for(;e;)t=e,e=t.getParent()}return t||null},it.prototype.getAllSubSegments=function(t){let e=this._subSegNames;if(e){t||(t=[]);let i=this._subSegMap,o=e.length;for(let n=0;n<o;++n){let o=i[e[n]];t.push(o),o.getAllSubSegments(t)}}return t||null},it.prototype.updateTreeStructure=function(t,e,i){let o;t||(t=0,this._subSegment||(this._depth=0)),e||(e=0),i||(i={});let n=this._subSegNames,s=n?n.length:0;if(s){let r=this._subSegMap;for(o=0;o<s;++o){let s=r[n[o]];++t,i[s.getId()]=e+t,s.setOrder(t),t=s.updateTreeStructure(t,e,i)}}else{let n=this._childIds,s=n.length,r=this._shared.segments,l="";for(o=0;o<s;++o){let s=n[o],h=r[s],u=h?h.getId():ot;l!==u&&(++t,l=u),i[s]=e+t,h&&(h._depth=this._depth+1,h.setOrder(t),t=h.updateTreeStructure(t,e,i))}}return this.setLastOrder(t)},it.prototype.calcSubSegmentOrder=it.prototype.updateTreeStructure,it.prototype.getSegmentLevel=function(){return this._depth},it.prototype.setRowData=function(t,e){if(!t)return;let i=t[this._rid];i||(i=t[this._rid]={}),e||(e=t),i=e[this._rid],i||(i=e[this._rid]={});let o=this;for(;o&&o.isSubSegment();)o.getSubSegmentName(i),o=o.getParent()},it.prototype.getSubSegmentName=function(t){if(t&&this._subSegment){let e=this.getClassification()[this._depth-1];e&&(t[e]=this._subSegName)}return this._subSegName},it.prototype.sortSegments=function(t){if(!t||this.hasSubSegments())return!1;let e=this._childIds,i=e.length,o=this._shared.segments;for(let n=0;n<i;++n)if(o[e[n]])return this._childIds.sort(t),!0;return!1},it.prototype.getFlattenTreeIds=function(t){let e;t||(t=[]),this._subSegment||t.push(this._rid);let i=this._subSegNames;if(i){let o=i.length,n=this._subSegMap;for(e=0;e<o;++e)n[i[e]].getFlattenTreeIds(t)}else{let i=this._childIds,o=i.length,n=this._shared.segments;for(e=0;e<o;++e){let o=i[e],s=n[o];s?s.getFlattenTreeIds(t):t.push(o)}}return t},it.prototype.collapse=function(t){return t=!1!==t,this._collapsed!==t&&(this._collapsed=t,this.markCollapsingStateDirty(),!0)},it.prototype.expand=function(t){return this.collapse(!1===t)},it.prototype.isCollapsed=function(){return this._collapsed},it.prototype.getCollapsingStates=function(t,e){let i=this._subSegNames,o=this._subSegMap,n=!0;!i&&this._shared&&(i=this._childIds,o=this._shared.segments,n=!1);let s=i?i.length:0;if(!s)return!1;let r=!1,l=!(!e&&!this._collapsed);t||(t={});for(let e=0;e<s;++e){let s="",h=null;n?(h=o[i[e]],s=h.getId()):(s=i[e],h=o[s]),l&&(t[s]=l,r=!0),h&&h.getCollapsingStates(t,l)&&(r=!0)}return r},it.prototype.getOrder=function(){let t=this.getFirstAncestor();return t?t._order+this._order:this._order},it.prototype.getLastOrder=function(){let t=this.getFirstAncestor();return t?t.getLastOrder():this._order+this._offsetOrder},it.prototype.setOrder=function(t){this._order=t},it.prototype.setLastOrder=function(t){return this._offsetOrder=t},it._tabs=null,it.prototype.log=function(t,e){let i;t||(t=[]);let o=it._tabs;if(!o){o=it._tabs=[];let t="";for(i=0;i<11;++i)o[i]=t,t+=" "}e||(e=0);let n=this._collapsed?"+ ":"- ";t.push(o[e]+n+this._rid);let s=e+1,r=o[s],l=this._subSegNames,h=this._subSegMap,u=!0;!l&&this._shared&&(l=this._childIds,h=this._shared.segments,u=!1);let a=l?l.length:0;for(i=0;i<a;++i){let e="",o=null;u?(o=h[l[i]],e=o.getId()):(e=l[i],o=h[e]),o?o.log(t,s):t.push(r+"- "+e)}return t};let nt=function(){this._onSubSegmentAdded=this._onSubSegmentAdded.bind(this),this._onSubSegmentRemoved=this._onSubSegmentRemoved.bind(this),this._segments={},this._insertionList=[],this._removalList=[],this._shared={segments:this._segments,childToSegment:{},dirtyCollapsingState:!1,defaultCollapsing:!1}};l.inherits(nt,et),nt.prototype._segments,nt.prototype._segmentCount=0,nt.prototype._collapsedRids=null,nt.prototype._shared,nt.prototype._segmentList=null,nt.prototype._insertionList=null,nt.prototype._removalList=null,nt.prototype._classification=!1,nt.prototype._classifierChanged=!1,nt.prototype._rowOrders=null,nt.prototype.dispose=function(){this.removeAllSegments(),this.removeAllEventListeners(),this._collapsedRids=null,this._segmentList=this._rowOrders=this._insertionList=this._removalList=null},nt.prototype.addSegment=function(t,e){if(t&&!this._segments[t]){let i=this._segments[t]=new it(t,this._shared);return i.addEventListener("subSegmentAdded",this._onSubSegmentAdded),i.addEventListener("subSegmentRemoved",this._onSubSegmentRemoved),++this._segmentCount,this.invalidateSegmentOrder(),e&&e.length&&i.addChildren(e),!0}return!1},nt.prototype.addSegments=function(t){let e=Array.isArray(t)?t:[t],i=e.length,o=0;for(let t=0;t<i;++t)o|=this.addSegment(e[t]);return!!o},nt.prototype.containsSegment=function(t){return!!this._segments[t]},nt.prototype.getParentRowId=function(t){return this._shared.childToSegment[t]||""},nt.prototype.removeSegment=function(t){let e=this._segments[t];if(!e)return!1;if(this._segmentCount<=1)return this.removeAllSegments();let i=e.isSubSegment();i&&this._removalList.push(e.getId());let o=e.getSubSegmentIds();if(o){let t=o.length;for(let e=0;e<t;++e){let t=o[e];this._segments[t]&&(this._removalList.push(t),delete this._segments[t],--this._segmentCount)}}if(!i){let t=e.getParent();t&&t.addChildren(e.getChildIds())}return e.removeAllChildren(),e.dispose(),delete this._segments[t],--this._segmentCount,this.invalidateSegmentOrder(),!0},nt.prototype.removeAllSegments=function(){if(this._segmentCount){for(let t in this._segments)this._segments[t].dispose();return this._segments={},this._segmentCount=0,this._segmentList=this._rowOrders=null,this._shared.segments=this._segments,this._shared.childToSegment={},this._classification=this._classifierChanged=!1,!0}return!1},nt.prototype.getSegmentCount=function(){return this._segmentCount},nt.prototype.getSegment=function(t){return this._segments[t]||null},nt.prototype.getSegmentParent=function(t){let e=this.getParentRowId(t);return e?this.getSegment(e):null},nt.prototype.getSegments=function(){return this._segmentCount?this._segments:null},nt.prototype.getSegmentIds=function(){return Object.keys(this._segments)},nt.prototype.sortSegments=function(t){let e=[],i=this._segments;for(let o in i){let n=i[o];n.sortSegments(t),n.isRootSegment()&&e.push(n)}return e.sort(t),this.invalidateSegmentOrder(),e},nt.prototype.collapseSegments=function(t,e){let i=0;if(this._segmentCount){let o=t.length;for(let n=0;n<o;n++){let o=this._segments[t[n]];o&&(i|=o.collapse(e))}}return!!i},nt.prototype.collapseSegment=function(t,e){let i=this._segments[t];return!!i&&i.collapse(e)},nt.prototype.expandSegment=function(t,e){return this.collapseSegment(t,!1===e)},nt.prototype.expandAllSegments=function(){if(this._segmentCount){let t=this._segments,e=0;for(let i in t)e|=t[i].expand();if(e)return!0}return!1},nt.prototype.isCollapsedSegment=function(t){let e=this._segments[t];return!!e&&e.isCollapsed()},nt.prototype.getCollapsedRows=function(){if(this._shared.dirtyCollapsingState){this._shared.dirtyCollapsingState=!1;let t=null,e=0;if(this._segmentCount){let i=this._segments;t={};for(let o in i){let n=i[o];n.isRootSegment()&&n.getCollapsingStates(t)&&++e}}this._collapsedRids=e?t:null}return this._collapsedRids},nt.prototype.invalidateSegmentOrder=function(){return!!this._segmentList&&(this._segmentList=this._rowOrders=null,!0)},nt.prototype.addSegmentChild=function(t,e,i){let o=this._segments[t];return!(!o||o.isSubSegment())&&(this.invalidateSegmentOrder(),o.addChild(e,i))},nt.prototype.addSegmentChildren=function(t,e,i){let o=this._segments[t];return!(!o||o.isSubSegment())&&(this.invalidateSegmentOrder(),o.addChildren(e,i))},nt.prototype.containsSegmentChild=function(t,e){let i=this._segments[t];return!!i&&i.containsChild(e)},nt.prototype.removeSegmentChild=function(t,e){let i=this._segments[t];return!!i&&(this.invalidateSegmentOrder(),i.removeChild(e))},nt.prototype.removeSegmentChildren=function(t,e){let i=this._segments[t];return!!i&&(this.invalidateSegmentOrder(),i.removeChildren(e))},nt.prototype.removeAllSegmentChildren=function(){this._shared.childToSegment={};let t=this._segments,e=!1;for(let i in t)t[i].removeAllChildren()&&(e=!0);return e&&(this.invalidateSegmentOrder(),this.classify(null)),e},nt.prototype.fillSegment=function(t,e){let i=Array.isArray(e)?e.length:0;if(!i)return;let o=this._segments,n=o[t];if(n&&!n.isSubSegment()){let s=e.indexOf(t);if(s>=0){n.removeAllChildren();for(let t=s+1;t<i;++t){let i=e[t];if(o[i])break;n.addChild(i)}this.invalidateSegmentOrder()}}},nt.prototype.fillSegments=function(t){this._shared.childToSegment={};let e=Array.isArray(t)?t.length:0,i=this._segments,o=null,n=!1;for(let s=0;s<e;++s){let e=t[s],r=i[e];r&&!r.isSubSegment()?(o=r,o.removeAllChildren()):o&&!o.isSubSegment()&&(o.addChild(e),n=!0)}return n&&this.invalidateSegmentOrder(),n},nt.prototype.calcSegmentOrder=function(t,e){let i=this._segmentList;if(i){if(e)return;i.length=0}else i=this._segmentList=[];this._rowOrders={};let o=this._rowOrders,n=this._segments,s=this._shared.childToSegment,r=ot,l=t?t.length:0,h=0;for(let e=0;e<l;++e){let i=t[e];if(!s[i]){let t=n[i],e=t?t.getId():ot;r!==e&&(++h,r=e);let s=1e4*h;o[i]=s,t&&(this._segmentList.push(t),t.setOrder(s),t.updateTreeStructure(0,s,o))}}},nt.prototype.getSegmentValues=function(t,e){let i=t?t.length:0;if(!i)return null;let o=this._rowOrders;if(!o)return null;let n=new Array(i),s=0;for(let e=0;e<i;++e){let i=o[t[e]];null!=i?s<i&&(s=i):i=s?s+1e4:0,n[e]=i}return s?n:null},nt.prototype.logStructure=function(){let t=this._segmentList;if(!t)return"";let e=t.length,i=[];for(let o=0;o<e;++o){let e=t[o];e.isRootSegment()&&e.log(i)}return i.join("\n")},nt.prototype.logRowIdMap=function(){let t=[],e=this._segments,i=this._shared.childToSegment;for(let o in i){let n=i[o],s=e[n];s&&s.isSubSegment()||t.push(o+" > "+n)}return t.join("\n")},nt.prototype.setSegmentClassification=function(t,e){let i=this._segments[t];return!(!i||!i.setClassification(e)||(i.getClassification()&&(this._classification=!0),this._classifierChanged=!0,0))},nt.prototype.hasClassification=function(){return this._classification||this._classifierChanged},nt.prototype.classify=function(t){if(!this._segmentCount)return!1;if(!this.hasClassification())return!1;this._classification=this._classifierChanged=!1;let e=this._segments;for(let i in e){let e=this._segments[i];e.isSubSegment()||(e.getClassification()&&(this._classification=!0),e.classify(t))}return this._insertionList.length||this._removalList.length?(this.invalidateSegmentOrder(),this._dispatch("subSegmentChanged",{insertionList:this._insertionList,removalList:this._removalList}),this._insertionList.length=0,this._removalList.length=0,this._dispatch("classified",{}),!0):(this._dispatch("classified",{}),!1)},nt.prototype._onSubSegmentAdded=function(t){let e=t.rid;if(this._segments[e])console.log("Incorrect logic detected.");else{let i=t.segment;this._insertionList.push(i),this._segments[e]=i,this._segmentCount++,i.addEventListener("subSegmentAdded",this._onSubSegmentAdded),i.addEventListener("subSegmentRemoved",this._onSubSegmentRemoved)}},nt.prototype._onSubSegmentRemoved=function(t){let e=t.rid;this.removeSegment(e)},nt.prototype.setDefaultCollapsing=function(t){let e=!!t;return this._shared.defaultCollapsing!==e&&(this._shared.defaultCollapsing=e,!0)};const st=nt;let rt=function(){rt.base(this,"constructor"),this._removeRows=this._removeRows.bind(this),this._bySegmentSeparator=this._bySegmentSeparator.bind(this),this._onClassifyingTimer=this._onClassifyingTimer.bind(this),this._onSubSegmentChanged=this._onSubSegmentChanged.bind(this),this._prevData={},this._rids=[],this._compMap={},this._addEvent("subSegmentChanged")};l.inherits(rt,Z),rt.prototype._prevData=null,rt.prototype._rids,rt.prototype._frozen=!1,rt.prototype._runningId=0,rt.prototype._compMap=null,rt.prototype._segments=null,rt.prototype._autoSegmentFilling=!1,rt.prototype._removedRows=null,rt.prototype._userSegmentComparer=null,rt.prototype._segmentSortOrder=0,rt.prototype._segmentSortContext=null,rt.prototype._clsSource=null,rt.prototype._classifyingTimer=0,rt.prototype._segmentDefaultCollapsing=!1,rt.SortLogic,rt.prototype.dispose=function(){this.unlistenAll(),this.clearAllData(!0),this._classifyingTimer&&(clearTimeout(this._classifyingTimer),this._classifyingTimer=0),this._compMap=null,this._clsSource=null,rt._removeIndexArray(),this._segments&&(this._segments.dispose(),this._segments=null)},rt.prototype.getColumnData=function(t){let e=new Array(this._rids.length);for(let i=this._rids.length;--i>=0;)e[i]=this._rows[this._rids[i]][t];return e},rt.prototype.getRowId=function(t){return this._rids[t]||""},rt.prototype.getAllRowIds=function(t){return t?this._rids:this._rids.slice(0)},rt.prototype.getRowIndex=function(t){return this._rids.indexOf(t)},rt.prototype.getRowCount=function(){return this._rids.length},rt.prototype.getDataAt=function(t,e){return this.getData(this._rids[t],e)},rt.prototype.getRowDataAt=function(t){return this.getRowData(this._rids[t])},rt.prototype.getPreviousData=function(t,e){let i=this._prevData[t]||null;return i?i[e]:null},rt.prototype.setData=function(t,e,i){if(!this._needFiring())return this._setData(t,e,i);let o={};return o[e]=i,this.setRowData(t,o)},rt.prototype._removeRidFromSegments=function(t){if(this._segments)if(this._segments.getSegment(t)){if(this._segments.removeSegment(t))return this._segments.getSegmentCount()||(this._segments.dispose(),this._segments=null),!0}else{let e=this._segments.getParentRowId(t);e&&this._segments.removeSegmentChild(e,t)}return!1},rt.prototype.setRowData=function(t,e,i){if(!t)return!1;let o=this.getRowData(t),n=!1,s="updated",r=!1;if(e){if(o){let i=this._prevData[t];for(let t in e)i[t]=o[t],o[t]=e[t]}else if(s="inserted",o=e,this._rows[t]=o,this._prevData[t]={},i){let e=i.nextRid,o=e?this.getRowIndex(e):-1;o<0&&(o=i.fallback),null==o||o<0||o>=this._rids.length?this._rids.push(t):(this._rids.splice(o,0,t),this._segments&&this._segments.invalidateSegmentOrder(),r=!this._isLastSegment(o))}else this._rids.push(t);n=!0}else o&&(s="removed",this._prevData[t]=this._rows[t],delete this._rows[t],r=this._removeRidFromSegments(t),rt._removeArrayItem(this._rids,t),n=!0);if(n&&this._needFiring()){if(this._autoFillSegments())this.dispatchGlobalChange();else{let n=i||{};n.rid=t,n.changes=e,n.rowData=o,n.type=s,r&&(n.segmentChanged=!0),this._dispatchDataChange(n)}this.requestClassifying()}return n},rt.prototype.setColumnData=function(t,e,i){let o=e?e.length:0;if(o<0)return;let n=this._frozen;this.freeze();let s=this._generateRids(o,i);for(let i=0;i<o;++i)this._setData(s[i],t,e[i]);this.freeze(n)},rt.prototype.setDataFromObjectMap=function(t){if(!t)return;if(Array.isArray(t))return void this.addRows(t);let e=this._frozen;this.freeze();for(let e in t)this.setRowData(e,t[e]);this.freeze(e)},rt.prototype.setDataFrom2DArray=function(t,e,i){let o=t?t.length:0;if(o<0)return;let n=this._frozen;this.freeze();let s=0,r=this._generateRids(o,i);for(let i=0;i<o;++i){let o=t[i],n=r[i];if(e)for(s=o.length;--s>=0;)this._setData(n,e[s],o[s]);else for(s=o.length;--s>=0;)this._setData(n,""+s,o[s])}this.freeze(n)},rt.prototype.setDataAt=function(t,e,i){let o=this.getRowId(t);return!!o&&this.setData(o,e,i)},rt.prototype.setRowDataAt=function(t,e,i){let o=this.getRowId(t);return!!o&&this.setRowData(o,e,i)},rt.prototype.addRow=function(t,e){return t||(t={}),e=this._generateUniqueRid(t,e),this.setRowData(e,t),e},rt.prototype.addRows=function(t,e){if(!Array.isArray(t))return;let i=t.length;if(!i)return;if(1===i)return void this.addRow(t[0],e?e[0]:null);e||(e=[]);let o=this._frozen;this.freeze();for(let o=0;o<i;++o)this.addRow(t[o],e[o]);this.freeze(o)},rt.prototype.unshiftRow=function(t,e){return this.insertRow(0,t,e)},rt.prototype.insertRow=function(t,e,i){let o=null;return"number"==typeof t?(o={},o.nextRid=this._rids[t],o.fallback=t):t&&(o={},o.nextRid=t),e||(e={}),i=this._generateUniqueRid(e,i),this.setRowData(i,e,o),i},rt.prototype.insertAfter=function(t,e,i){let o="string"==typeof t?this.getRowIndex(t):t;return!(o>=0)||o>=this._rids.length-1?this.addRow(e,i):this.insertRow(o+1,e,i)},rt.prototype.removeRow=function(t){"number"==typeof t?this.setRowData(this.getRowId(t),null):this.setRowData(t,null)},rt.prototype.removeRows=function(t){let e,i;if(1===t.length)return e=t[0],void("number"==typeof e?this.removeRow(e):this.setRowData(e,null));let o=!1;for(this._removedRows={},i=t.length;--i>=0;)e=t[i],"number"==typeof e&&(e=this.getRowId(e)),this.getRowData(e)&&(this._prevData[e]=this._rows[e],this._removedRows[e]=1,delete this._rows[e],this._removeRidFromSegments(e),o=!0);o?(this._rids=this._rids.filter(this._removeRows),this._removedRows=null,this.dispatchGlobalChange()):this._removedRows=null},rt.prototype._removeRows=function(t){return!this._removedRows[t]},rt._removeArrayItem=function(t,e){let i=t.indexOf(e);return i>=0&&(i>=t.length?t.pop():t.splice(i,1),!0)},rt.prototype.clearAllData=function(t){rt.base(this,"clearAllData",!0),this._prevData={},this._segments&&(this._segments.dispose(),this._segments=null),this._rids.length&&(this._rids.length=0,this.dispatchGlobalChange(t))},rt.prototype.removeAllRows=rt.prototype.clearAllData,rt._ascendingOrder=function(t,e){return t-e},rt.prototype.moveRow=function(t,e,i){let o=null,n="";if(e>=0&&e<this._rids.length||(e=this._rids.length),Array.isArray(t)){let i=t;i.sort(rt._ascendingOrder);let s=[];for(let t=i.length;--t>=0;){let o=i[t];n=this._rids[o],n&&(s.unshift(n),this._rids.splice(o,1),o<e&&--e)}s.length&&(this._rids.splice.apply(this._rids,[e,0].concat(s)),o=s)}else t<0&&(t=0),t!==e&&t+1!==e&&(n=this._rids.splice(t,1)[0],n&&(t<e&&--e,this._rids.splice(e,0,n),o=n));return o&&(this._segments&&(this._segments.invalidateSegmentOrder(),this._sort(null)),this._dispatchPositionChange(i)),o},rt.prototype._moveRow=function(t,e,i){let o=t.length;if(!o)return null;let n=new Array(o);for(let e=0;e<o;++e)n[e]=this.getRowIndex(t[e]);let s=e?this.getRowIndex(e):this._rids.length;return o>1?this.moveRow(n,s,i):this.moveRow(n[0],s,i)},rt.prototype.moveRows=function(t,e,i,o){"string"==typeof t&&(t=this.getRowIndex(t)),"string"==typeof e&&(e=this.getRowIndex(e)),t<0&&(t=0),e<0&&(e=this._rids.length),i||(i=1);let n=t+i-1,s=e;if(e>=t&&(s=e<=n?t:e-i),i>0&&n<=this._rids.length){s>this._rids.length&&(s=this._rids.length);let e=this._rids.splice(t,i),n=[s,0].concat(e);return Array.prototype.splice.apply(this._rids,n),this._segments&&this._sort(null),this._dispatchPositionChange(o),e}return null},rt.prototype.swapRow=function(t,e){let i=this._rids.length;if(t<0||t>=i)return;if(e<0||e>=i)return;let o=this._rids[t];this._rids[t]=this._rids[e],this._rids[e]=o},rt.prototype._replaceRowId=function(t,e){let i=this._rids,o=i.indexOf(t);return o>=0&&(i[o]=e,this._rows[e]=this._rows[t],delete this._rows[t],this._prevData[e]=this._prevData[t],delete this._prevData[t],!0)},rt.prototype.replaceRowIds=function(t){if("object"==typeof t){let e=!1;for(let i in t)e|=this._replaceRowId(i,t[i]);e&&this.dispatchGlobalChange()}},rt.prototype.clearRowData=rt.prototype.removeRow,rt.prototype.clearColumnData=function(t,e){let i="string"==typeof t?[t]:t;for(let t=i.length;--t>=0;){let e=i[t];if(e)for(let t in this._rows)delete this._rows[t][e],delete this._prevData[t][e]}this.dispatchGlobalChange(e)},rt.prototype.getDataSource=function(){return null},rt.prototype.setDataSource=function(t){},rt.prototype.getSortingLogics=function(){return this._compMap},rt.prototype.sortOnce=function(t,e,i,o){let n=rt._buildSortContext([],t,e,i||this._compMap,o);return!!this._sort(n)&&(this._dispatchPositionChange(),!0)},rt.prototype.setSortingLogic=function(t){this._compMap._default=t},rt.prototype.setColumnSortingLogic=function(t,e){t&&(this._compMap[t]=e)},rt.prototype.getColumnSortingLogic=function(t){if(t){let e=this._compMap[t];if(e)return e}return this._compMap._default||null},rt.prototype.freeze=function(t){t=!1!==t;let e=this._frozen;return e!==t&&(this._frozen=t,!t&&this._segments&&this._segments.invalidateSegmentOrder(),this._autoFillSegments(),this.dispatchGlobalChange()),e},rt.prototype.unfreeze=function(t){return this.freeze(!1===t)},rt.prototype.isFrozen=function(){return this._frozen},rt.prototype._initSegmentCollection=function(){this._segments||(this._segments=new st,this._segments.setDefaultCollapsing(this._segmentDefaultCollapsing),this._segments.addEventListener("subSegmentChanged",this._onSubSegmentChanged))},rt.prototype.setSegmentSeparators=function(t,e){if(!t)return!1;let i=!1!==e,o=0,n=0,s=t.length;for(let e=0;e<s;e++){let s=t[e];if(i){if(this._initSegmentCollection(),this._autoSegmentFilling){let t=this._segments.getParentRowId(s);t&&this._segments.removeSegmentChild(t,s)}o|=this._segments.addSegment(s)}else this._segments&&this._segments.getSegment(s)&&this._segments.removeSegment(s)&&(n=1,this._segments.getSegmentCount()||(this._segments=null))}let r=o||n;return r&&this._needFiring()&&this.dispatchGlobalChange(),!!r},rt.prototype.setSegmentSeparator=function(t,e){let i=!1,o=0;if(t&&"string"==typeof t)if(!1!==e){if(this._initSegmentCollection(),this._autoSegmentFilling){let e=this._segments.getParentRowId(t);e&&this._segments.removeSegmentChild(e,t)}let o=e&&e.children?e.children:null;this._segments.addSegment(t,o)&&(i=!0)}else if(this._segments){let e=this._segments.getSegment(t);e&&(o=e.getChildCount(),this._segments.removeSegment(t)&&(i=!0,this._segments.getSegmentCount()||(this._segments=null)))}if(i&&this._needFiring())if(this._autoFillSegments()||o)this.dispatchGlobalChange();else{let e=this._rows[t]||null;e&&this._dispatchDataChange({rid:t,changes:{},rowData:e,type:"updated",segmentChanged:!0})}return i},rt.prototype.unsetAllSegmentSeparators=function(){return!!this._segments&&(this._segments.dispose(),this._segments=null,this.dispatchGlobalChange(),!0)},rt.prototype.hasSegmentation=function(){return!!this._segments},rt.prototype.hasSegmentClassification=function(){return!!this._segments&&this._segments.hasClassification()},rt.prototype.isSegmentSeparator=function(t){return!!this._segments&&this._segments.containsSegment(t)},rt.prototype.getSegment=function(t){return this._segments?this._segments.getSegment(t):null},rt.prototype.getSegmentParent=function(t){return this._segments?this._segments.getSegmentParent(t):null},rt.prototype.getSegmentLevel=function(t){let e=this.getSegment(t);return e?e.getSegmentLevel()+1:0},rt.prototype.getSegmentParentRowId=function(t){return this._segments?this._segments.getParentRowId(t):""},rt.prototype.getSegmentValues=function(t,e){return this._segments?(this._segments.calcSegmentOrder(this._rids,!0),this._segments.getSegmentValues(t||this._rids,e)):null},rt.prototype._isLastSegment=function(t){let e=this._segments;if(e){let i=this._rids,o=i.length;for(let n=t+1;n<o;++n)if(e.containsSegment(i[n]))return!1}return!0},rt.prototype._getSegmentSeparators=function(){return this._segments},rt.prototype.enableAutoSegmentFilling=function(t){this._autoSegmentFilling=0!=t,this._autoFillSegments()},rt.prototype._autoFillSegments=function(){return!!this._autoSegmentFilling&&this.fillSegments()},rt.prototype.fillSegment=function(t){this._segments&&(this._segments.fillSegment(t,this._rids),this.dispatchGlobalChange(),this.requestClassifying())},rt.prototype.fillSegments=function(){if(this._segments){let t=this._segments.fillSegments(this._rids);return t&&(this.dispatchGlobalChange(),this.requestClassifying()),t}return!1},rt.prototype._onSegmentChildChanged=function(t){!1!==t&&this._sort(null),this._dispatchPositionChange(),this.requestClassifying()},rt.prototype.addSegmentChild=function(t,e,i){return!(!this._segments||!this._segments.addSegmentChild(t,e,i))&&(this._onSegmentChildChanged(),!0)},rt.prototype.addSegmentChildren=function(t,e,i){return!(!this._segments||!this._segments.addSegmentChildren(t,e,i))&&(this._onSegmentChildChanged(),!0)},rt.prototype.setSegmentChildren=function(t){if(!this._segments)return!1;let e=this._segments.removeAllSegmentChildren(),i=t.length;for(let o=0;o<i;o++){let i=t[o];this._segments.addSegmentChildren(i.segmentId,i.rowIds)&&(e=!0)}return!!e&&(this._onSegmentChildChanged(),!0)},rt.prototype.removeSegmentChild=function(t,e){if(this._segments){let i=this._segments.removeSegmentChild(t,e);return i&&this._onSegmentChildChanged(!1),i}return!1},rt.prototype.removeSegmentChildren=function(t,e){if(this._segments){let i=this._segments.removeSegmentChildren(t,e);return i&&this._onSegmentChildChanged(!1),i}return!1},rt.prototype.removeAllSegmentChildren=function(){if(this._segments){let t=this._segments.removeAllSegmentChildren();return t&&this._onSegmentChildChanged(!1),t}return!1},rt.prototype.getSegmentIds=function(){return this._segments?this._segments.getSegmentIds():null},rt.prototype.getSegmentChildIds=function(t){if(this._segments){let e=this._segments.getSegment(t);if(e){let t=e.getChildIds();return t.length?t:null}}return null},rt.prototype._setSegmentSortContext=function(t,e){this._segmentSortOrder=t,this._segmentSortContext=e},rt.prototype.sortSeparators=function(t,e,i){if(!this._segments)return!1;if("function"==typeof t)return this._setSegmentSortContext(rt._getSortOrder(e),i),this.sortSegments(t);if(!i)return!1;let o=rt._buildSortContext([],i,e,t||this._compMap),n=o.length,s=null;if(n>1)s=rt._multiColumnSeparatorCompareLogic,this._setSegmentSortContext(1,o);else{if(1!==n)return!1;s=rt._singleColumnSeparatorCompareLogic,this._setSegmentSortContext(o[0][3],o[0])}return this.sortSegments(s)},rt.prototype.sortSegments=function(t){if(!this._segments)return!1;if("function"!=typeof t)return!1;this._userSegmentComparer=t;let e=this._segments,i=e.sortSegments(this._bySegmentSeparator);this._userSegmentComparer=null,this._setSegmentSortContext(0,null);let o=this._rids,n=o.slice(),s=o.length;o.length=0;let r=0,l=!1;for(let t=0;t<s;++t){let s=n[t],h=e.getSegment(s);h?h.isRootSegment()&&i[r++].getFlattenTreeIds(o):e.getParentRowId(s)||o.push(s),s!==o[t]&&(l=!0)}return l&&(this._sort(null),this._dispatchPositionChange()),l},rt.prototype._bySegmentSeparator=function(t,e){return this._userSegmentComparer(this._getRowDataFromSegment(t),this._getRowDataFromSegment(e),this._segmentSortOrder,this._segmentSortContext)},rt.prototype._getRowDataFromSegment=function(t){var e=null;return t&&("string"==typeof t?e=this.getRowData(t):t.getId&&(e=this.getRowData(t.getId()))),e},rt.prototype.setClassificationSource=function(t){this._clsSource=null,t&&t._rows&&(this._clsSource=t._rows)},rt.prototype.setSegmentClassification=function(t,e){return!(!this._segments||!this._segments.setSegmentClassification(t,e))&&this.classifySegments()},rt.prototype.classifySegments=function(){return!(!this._segments||!this._rids.length)&&this._segments.classify(this._clsSource||this._rows)},rt.prototype.requestClassifying=function(){this._segments&&!this._classifyingTimer&&this._segments.hasClassification()&&(this._classifyingTimer=setTimeout(this._onClassifyingTimer,10))},rt.prototype._onClassifyingTimer=function(){this._classifyingTimer=0,this.classifySegments()},rt.prototype._onSubSegmentChanged=function(t){let e,i=t.insertionList,o=t.removalList,n=!1,s=this._rows,r=this._clsSource||s,l=this._rids,h=this._prevData,u=o.length,a={};for(e=0;e<u;e++){let t=o[e];s[t]&&(a[t]=h[t]=s[t],delete s[t],rt._removeArrayItem(l,t),n=!0)}let p=i.length;for(e=0;e<p;e++){let t=i[e],o=t.getParentId(),u=t.getId();if(!s[u]){h[u]={},t.setRowData(s,r);let e=l.indexOf(o);e<0||e+1>=l.length?l.push(u):l.splice(e+1,0,u),n=!0}}n&&(t.removedRows=a,this._dispatch("subSegmentChanged",t),this.dispatchGlobalChange())},rt.prototype.setSegmentDefaultCollapsing=function(t){return this._segmentDefaultCollapsing!==t&&(this._segmentDefaultCollapsing=t,this._segments&&this._segments.setDefaultCollapsing(t),!0)},rt.prototype._sort=function(t){let e=this._rids,i=this.getMultipleRowData(e),o=this.getSegmentValues(e),n=rt._performMultiLevelSorting(i,t,o);return!!n&&(this._rids=rt._reorderItems(e,n),!0)},rt.prototype.dispatchGlobalChange=function(t){!t&&this._needFiring()&&this._dispatchDataChange(rt._globalChangeArg)},rt.prototype._dispatchPositionChange=function(t){!t&&this._needFiring()&&this._dispatch("dataChanged",rt._positionChangeArg)},rt.prototype.dump=function(t){return Z.constructTable(this.getMultipleRowData(this._rids),t,this._rids)},rt.prototype._setData=function(t,e,i){let o=this.getRowData(t);return o||(o={},this._rows[t]=o,this._prevData[t]={},this._rids.push(t)),this._prevData[t][e]=o[e],o[e]=i,!0},rt.prototype._generateRids=function(t,e){let i,o=0;if(e)i=e;else{i=[];let e=this._rids.length;for(;o<e&&o<t;)i.push(this._rids[o++])}for(o=i.length;o<t;)i.push(""+o++);return i},rt.prototype._generateUniqueRid=function(t,e){if(!e){if(t.ROW_ID)return t.ROW_ID;for(e="_"+this._runningId++;this._rows[e];)e="_"+this._runningId++}return e},rt.prototype._needFiring=function(){return!this._frozen&&!this._composing},rt.getSortingDefinitions=e._deprecatedFunction,rt._globalChangeArg={globalChange:!0},rt._positionChangeArg={globalChange:!0,positionChangeOnly:!0},rt._buildSortContext=function(t,e,i,o,n){let s,r;Array.isArray(e)?(s=e,r=i):(s=[e],r=e?[i]:[0]);let l=null,h=null;"function"==typeof o?l=o:h=o;let u=s.length;t.length=u;for(let e=u;--e>=0;){Array.isArray(h)&&(l=h[e]);let i=t[e];i||(i=t[e]=new Array(5));let o=s[e];i[0]=o,i[1]=null,i[2]=l||h[o]||h._default,i[2]||(i[2]=rt._defaultComparer),i[3]=rt._getSortOrder(r[e]),i[4]=n}return t},rt._multiColumnCompareLogic=function(t,e,i,o){let n=o.length,s=0;for(let i=0;i<n;++i){let n=o[i];if(s=rt._singleColumnCompareLogic(t,e,n[3],n),s)return s}return s},rt._singleColumnCompareLogic=function(t,e,i,o){let n=o[1];return o[2](n[t],n[e],i,o[4])},rt._multiColumnSeparatorCompareLogic=function(t,e,i,o){let n=o.length,s=0;for(let i=0;i<n;++i){let n=o[i];if(s=rt._singleColumnSeparatorCompareLogic(t,e,n[3],n),s)return s}return s},rt._singleColumnSeparatorCompareLogic=function(t,e,i,o){let n=o[0];return o[2](t[n],e[n],i,o[4])},rt._performMultiLevelSorting=function(t,e,i){let o,n=t?t.length:0,s=e?e.length:0;if(!n)return null;for(let i=0;i<s;++i){let s,r=e[i],l=r[1];if(o=r[2],o.rowSorting)if(l)for(l.length=n,s=0;s<n;++s)l[s]=t[s];else l=r[1]=t;else{l?l.length=n:l=r[1]=new Array(n);let e=r[0];for(s=0;s<n;++s)l[s]=t[s][e]}}if(i){let t=["ROW_SEGMENT",i,rt._segmentComparer,1,null];e?(e=e.slice()).unshift(t):e=[t],++s}if(!s)return null;let r,l=0;return s>1?(o=rt._multiColumnCompareLogic,r=e,l=1):(o=rt._singleColumnCompareLogic,r=e[0],l=r[3]),rt._mergeSort(n,l,o,r)},rt._mergeSort=function(t,e,i,o){let n,s,r,l,h,u=!1,a=1,p=rt._createIndexArray(t),_=p.slice();for(;a<=t;){for(n=h=0;n<t;)if(s=h,l=s+a,r=l,h=r+a,h>t&&(h=t),r<h){for(;;)if(i(p[s],p[r],e,o)<=0){if(_[n++]=p[s],++s>=l){for(;r<h;)_[n++]=p[r],++r;break}}else if(u=!0,_[n++]=p[r],++r>=h){for(;s<l;)_[n++]=p[s],++s;break}}else for(;n<t;)_[n]=p[n],++n;let d=p;p=_,_=d,a<<=1}return u?p:null},rt._reorderItems=function(t,e){if(e){for(let i=t.length;--i>=0;)e[i]=t[e[i]];return e}return t},rt._createIndexArray=function(t){let e=rt._idxAryMap[t];if(!e){rt._idxAryCount>50&&(rt._idxAryMap={},rt._idxAryCount=0),e=rt._idxAryMap[t]=new Array(t),rt._idxAryCount++;for(let i=0;i<t;++i)e[i]=i}return e.slice()},rt._removeIndexArray=function(){rt._idxAryMap={},rt._idxAryCount=0},rt._idxAryMap={},rt._idxAryCount=0,rt._segmentComparer=function(t,e){return t===e?0:t<e?-1:1},rt._defaultComparer=function(t,e,i){return null==t||t!=t?null==e||e!=e?0:1:null==e||e!=e?-1:t<e?-i:e<t?i:0},rt._getSortOrder=function(t){if("number"==typeof t)return t;if(t&&"string"==typeof t){if("a"===(t=t.charAt(0).toLowerCase()))return 1;if("d"===t)return-1}return 0},rt._proto=rt.prototype;const lt=rt;let ht=function(t,e){this._onDataChanged=this._onDataChanged.bind(this),this._refs=[],t&&(this._dt=t,this._dt.listen("dataChanged",this._onDataChanged,0)),e&&(this._field=e)};ht.prototype.dispose=function(){this._dt&&(this._dt.unlisten("dataChanged",this._onDataChanged),this._dt=null)},ht.prototype.setDataSource=function(t){this._dt!==t&&(this._dt&&this._dt.unlisten("dataChanged",this._onDataChanged),this._dt=t,this._dt&&this._dt.listen("dataChanged",this._onDataChanged,0),this._requestRecalculation())},ht.prototype.setField=function(t){this._field!==t&&(this._field=t,this._requestRecalculation())},ht.prototype.disableOnDemandMode=function(t){let e=!1===t;this._onDemandMode!==e&&(this._onDemandMode=e,this._requestRecalculation())},ht.prototype.setColumnDataGetter=function(t){this._colDataGetter!==t&&(this._colDataGetter=t,this._requestRecalculation())},ht.prototype.getColumnDataGetter=function(){return this._colDataGetter},ht.prototype.getSum=function(){return this._updateStats(),this._sum},ht.prototype.getDataCount=function(){return this._updateStats(),this._count},ht.prototype.getMin=function(){return this._updateStats(),this._min},ht.prototype.getMax=function(){return this._updateStats(),this._max},ht.prototype.getAbsoluteMax=function(){this._updateStats();let t=this._max>=0?this._max:-this._max,e=this._min>=0?this._min:-this._min;return t>=e?t:e},ht.prototype.getAverage=function(){return this._updateStats(),this._sum/this._count},ht.prototype.getMean=ht.prototype.getAverage,ht.prototype.getMidRange=function(){return this._updateStats(),.5*(this._max+this._min)},ht.prototype.getCachedColumnData=function(){return this._dirty?this._recalculate():this._cacheData||(this._cacheData=this._getColData()),this._cacheData},ht.prototype.markDirty=function(){return!!this._onDemandMode&&(this._dirty=!0,this._dirty)},ht.prototype._getColData=function(){return this._colDataGetter?this._colDataGetter(this._field,this._dt):this._dt.getColumnData(this._field)},ht.prototype._requestRecalculation=function(){this.markDirty()||this._recalculate()},ht.prototype._updateStats=function(){this._dirty&&this._recalculate()},ht.prototype._recalculate=function(){if(this._dirty=!1,this._cacheData=null,this._sum=0,this._min=NaN,this._max=NaN,this._count=0,!this._dt||!this._field)return;let t=this._cacheData=this._getColData(),e=t.length;if(!e)return;let i,o=ht._isDataNumeric,n=0;for(;n<e;)if(i=+t[n++],o(i)){this._sum=this._min=this._max=i,++this._count;break}for(;n<e;)i=+t[n],o(i)&&(this._sum+=i,i<this._min?this._min=i:i>this._max&&(this._max=i),++this._count),++n},ht.prototype._onDataChanged=function(t){if(t.rid){if(!this._colDataGetter&&t.changes&&null==t.changes[this._field])return;if(this.markDirty())return;this._updateRowData(t.rid)}else if(t.rids){if(this.markDirty())return;let e=t.rids;1===e.length?this._updateRowData(e[0]):this._recalculate()}else if(t.globalChange){if(t.positionChangeOnly)return void(this._cacheData=null);this._requestRecalculation()}},ht.prototype._updateRowData=function(t){let e=this._dt.getPreviousData(t,this._field),i=this._dt.getData(t,this._field);if(e===i)return;let o=ht._isDataNumeric(i);if(ht._isDataNumeric(e)){if(this._min===e&&(!o||i>this._min))return void this._recalculate();if(this._max===e&&(!o||i<this._max))return void this._recalculate();this._sum-=e,--this._count}o&&(this._sum+=i,i>=this._min||(this._min=i),i<=this._max||(this._max=i),++this._count)},ht._isDataNumeric=function(t){return"number"==typeof t&&t==t},ht.prototype.addRef=function(t){return t&&this._refs.indexOf(t)<0&&this._refs.push(t),this._refs.length},ht.prototype.deRef=function(t){if(t){let e=this._refs.indexOf(t);e>=0&&this._refs.splice(e,1)}return this._refs.length},ht.prototype.getRefCount=function(){return this._refs.length},ht.prototype._dt=null,ht.prototype._field="",ht.prototype._onDemandMode=!0,ht.prototype._dirty=!0,ht.prototype._cacheData=null,ht.prototype._sum=0,ht.prototype._min=NaN,ht.prototype._max=NaN,ht.prototype._count=0,ht.prototype._colDataGetter=null,ht.prototype._refs;const ut=ht;let at=function(t){this._onDataChanged=this._onDataChanged.bind(this),this._onWrapSizeChanged=this._onWrapSizeChanged.bind(this),this._dv=t.dataView,this._dt=this._dv.getDataTable(),this._dv.listen("dataChanged",this._onDataChanged),this._dv.listen("wrapSizeChanged",this._onWrapSizeChanged),this._wrapIndex=t.wrapIndex,this._refreshRids(t.rids),this._addEvents("dataChanged")};l.inherits(at,r),at.prototype._dv=null,at.prototype._dt=null,at.prototype._wrapIndex=0,at.prototype._rids,at.prototype._dataConflator=null,at.prototype._onDataChanged=function(t){if(this._dv){let e=this._dv.getVisibleRowIds(!0);this._refreshRids(e)&&(t.globalChange||(t.globalChange=!0),this._dispatch("dataChanged",t))}},at.prototype._onWrapSizeChanged=function(t){this._refreshRids(t.rids)&&this._dispatch("dataChanged",lt._globalChangeArg)},at.prototype._refreshRids=function(t){let e=!1;if(this._dv&&Array.isArray(t)){let i=this.getWrapSize();if(i>0){let o=i*this._wrapIndex;o<t.length?(e=!0,this._rids=t.slice(o,o+i)):this._rids.length&&(e=!0,this._rids.length=0)}}return e},at.prototype.dispose=function(){this._dv&&(this.unlistenAll(),this._dv.unlisten("dataChanged",this._onDataChanged),this._dv.unlisten("wrapSizeChanged",this._onWrapSizeChanged),this._dt=this._dv=null)},at.prototype.getData=function(t,e){return this._dt.getData(t,e)},at.prototype.getRowData=function(t){return this._dt.getRowData(t)},at.prototype.getColumnData=function(t,e){let i=this.getAllRowIds(!0,e),o=[],n=i.length;for(let s=0;s<n;++s){let n=this._dt.getRowData(i[s]);n?o.push(n[t]):e&&o.push(null)}return o},at.prototype.getRowId=function(t){return this._rids[t]||""},at.prototype._toRowId=function(t){return"number"==typeof t?this._rids[t]||"":t||""},at.prototype._toRowIds=function(t){let e=Array.isArray(t)?t.length:0,i=new Array(e),o=this._rids;for(let n=0;n<e;++n){let e=t[n];i[n]="number"==typeof e?o[e]||"":e||""}return i},at.prototype.getAllRowIds=function(t,e){return t?this._rids:this._rids.slice(0)},at.prototype.getVisibleRowIds=function(t){return t?this._rids:this._rids.slice(0)},at.prototype.getSortedRowIds=function(t){return t?this._rids:this._rids.slice(0)},at.prototype.getRowIndex=function(t){return this._rids.indexOf(t)},at.prototype.getRowCount=function(){return this._rids.length},at.prototype.getDataAt=function(t,e){return this._dt.getData(this.getRowId(t),e)},at.prototype.getRowDataAt=function(t){return this._dt.getRowData(this.getRowId(t))},at.prototype.getPreviousData=function(t,e){return this._dt.getPreviousData(t,e)},at.prototype.getMultipleRowData=function(t,e,i){return this._dt.getMultipleRowData(t,e,i)},at.prototype.getAllRowData=function(){return this.getMultipleRowData(this.getAllRowIds(!0))},at.prototype.setData=function(t,e,i){return!!this._dt&&this._dt.setData(t,e,i)},at.prototype.setRowData=function(t,e,i){return this._dv.setRowData(t,e,i)},at.prototype.setColumnData=function(t,e,i){this._dt&&this._dt.setColumnData(t,e,i)},at.prototype.setDataAt=function(t,e,i){let o=this.getRowId(t);return!(!o||!this._dt)&&this._dt.setData(o,e,i)},at.prototype.setRowDataAt=function(t,e,i){let o=this.getRowId(t);return this.setRowData(o,e,i)},at.prototype.insertRow=function(t,e,i){let o=this._toRowId(t);return this._dv.insertRow(o,e,i)},at.prototype.removeRow=function(t){this._dt&&this._dt.removeRow(this._toRowId(t))},at.prototype.removeRows=function(t){this._dt&&this._dt.removeRows(this._toRowIds(t))},at.prototype.moveRow=function(t,e){let i=this._toRowId(e),o=Array.isArray(t)?t:[t],n=this._toRowIds(o);return this._dv.moveRow(n,i)},at.prototype.getDataTable=function(){return this._dt},at.prototype.getDataSource=function(){return this._dv},at.prototype.setDataSource=function(t){},at.prototype.setConflationRate=function(t){this._dv.setConflationRate(t)},at.prototype.getConflationRate=function(){return this._dv.getConflationRate()},at.prototype.getSortingLogics=function(){return this._dt?this._dt.getSortingLogics():null},at.prototype.sort=function(t,e,i,o){this._dv.sort(t,e,i,o)},at.prototype.sortOnce=function(t,e){this._dv.sortOnce(t,e)},at.prototype.setSortingLogic=function(t){this._dt&&this._dt.setSortingLogic(t)},at.prototype.setColumnSortingLogic=function(t,e){this._dt&&this._dt.setColumnSortingLogic(t,e)},at.prototype.isSorting=function(){return this._dv.isSorting()},at.prototype.hideRow=function(t,e){this.showRows([t],!1===e)},at.prototype.hideRows=function(t,e){this.showRows(t,!1===e)},at.prototype.showRows=function(t,e){let i=this._toRowIds(t);this._dv.showRows(i,e)},at.prototype.unhideAllRows=function(){this._dv.unhideAllRows()},at.prototype.hasHiddenRow=function(){return this._dv.hasHiddenRow()},at.prototype.filterIn=function(t,e,i){return this._dv.filterIn(t,e,i)},at.prototype.filterOut=function(t,e){return this.filterIn(t,e,!0)},at.prototype.filterInOnce=function(t,e,i){this._dv.filterInOnce(t,e,i)},at.prototype.filterOutOnce=function(t,e){this.filterInOnce(t,e,!0)},at.prototype.clearFilter=function(){this._dv.clearFilter()},at.prototype.disablePageCorrection=function(t){},at.prototype.setPage=function(t){return!1},at.prototype.gotoPage=at.prototype.setPage,at.prototype.nextPage=function(){return!1},at.prototype.previousPage=function(){return!1},at.prototype.prevPage=at.prototype.previousPage,at.prototype.lastPage=function(){return!1},at.prototype.firstPage=function(){return!1},at.prototype.getCurrentPage=function(){return 1},at.prototype.getPageIndex=at.prototype.getCurrentPage,at.prototype.isOnLastPage=function(){return!0},at.prototype.isOnFirstPage=function(){return!0},at.prototype.getPageSize=function(){return 0},at.prototype.getPageCount=function(){return 1},at.prototype.getTotalPages=at.prototype.getPageCount,at.prototype.setPageSize=function(t){},at.prototype.groupBy=function(t,e){this._dv.groupBy(t,e)},at.prototype.addGroup=function(t){this._dv.addGroup(t)},at.prototype.sortGroups=function(t){this._dv.sortGroups(t)},at.prototype.moveGroup=function(t,e){this._dv.moveGroup(t,e)},at.prototype.setPredefinedGroups=function(t){this._dv.setPredefinedGroups(t)},at.prototype.addFooter=function(t){this._dv.addFooter(t)},at.prototype.removeFooter=function(){this._dv.removeFooter()},at.prototype.enableMultiGroup=function(t){this._dv.enableMultiGroup(t)},at.prototype.getGroupByRowId=function(t){return this._dv.getGroupByRowId(t)},at.prototype.getGroup=function(t){return this._dv.getGroup(t)},at.prototype.getAllGroups=function(t){return this._dv.getAllGroups(t)},at.prototype.getGroupList=function(){return this._dv.getGroupList()},at.prototype.getGroupId=function(){return this._dv.getGroupId()},at.prototype.getGroupValue=function(){return this._dv.getGroupValue()},at.prototype.getGroupRowId=function(){return this._dv.getGroupRowId()},at.prototype.getFooterRowIndex=function(t){return this._dv.getFooterRowIndex(t)},at.prototype.getFooterRowIds=function(){return this._dv.getFooterRowIds()},at.prototype.hasGroup=function(){return this._dv.hasGroup()},at.prototype.getGroupRows=function(){return null},at.prototype.getGroupLevel=function(t){let e=this._toRowId(t);return this._dv.getGroupLevel(e)},at.prototype.enableColumnStats=function(t,e,i){return this._dv.enableColumnStats(t,e,i)},at.prototype.getColumnStats=function(t){return this._dv.getColumnStats(t)},at.prototype.hide=function(t){return this._dv.hide(t)},at.prototype.isHidden=function(){return this._dv.isHidden()},at.prototype.isHiddenRow=function(t){return this._dv.isHiddenRow(t)},at.prototype.collapse=function(t){this._dv.collapse(t)},at.prototype.collapseAllGroups=function(t){this._dv.collapseAllGroups(t)},at.prototype.toggleCollapsedState=function(){this.collapse(!this.isCollapsed())},at.prototype.isCollapsed=function(){return this._dv.isCollapsed()},at.prototype.enableContentAsHeader=function(t){this._dv.enableContentAsHeader(t)},at.prototype.getVisibleRowCount=function(){return this._rids.length},at.prototype.isRowDataInGroup=function(t,e){return this._dv.isRowDataInGroup(t,e)},at.prototype.isRowIdInGroup=function(t,e){return this._dv.isRowIdInGroup(t,e)},at.prototype.addRowExpansion=function(t,e){this._dv.addRowExpansion(t,e)},at.prototype.removeRowExpansion=function(t){this._dv.removeRowExpansion(t)},at.prototype.toggleRowExpansion=function(t,e,i){let o=this._toRowId(t);this._dv.toggleRowExpansion(o,e,i)},at.prototype.removeAllRowExpansions=function(){this._dv.removeAllRowExpansions()},at.prototype.getRowsWithExpansion=function(t,e){return this._dv.getRowsWithExpansion(t,e)},at.prototype.getExpansionParents=function(t,e){return this._dv.getExpansionParents(t,e)},at.prototype.isRowExpansion=function(t){return this._dv.isRowExpansion(t)},at.prototype.hasRowExpansion=function(t){return this._dv.hasRowExpansion(t)},at.prototype.getRowExpansionId=function(t,e){return this._dv.getRowExpansionId(t,e)},at.prototype.getRowExpansionIndex=function(t){return this._dv.getRowExpansionIndex(t)},at.prototype.searchAll=function(t,e){return this._dv.searchAll(t,e)},at.prototype.searchPrev=function(t,e){let i=this._toRowId(t);return this._dv.searchPrev(i,e)},at.prototype.searchNext=function(t,e){let i=this._toRowId(t);return this._dv.searchNext(i,e)},at.prototype.stall=function(t){return this._dv.stall(t)},at.prototype.enableAutoGroupRemoval=function(t){return this._dv.enableAutoGroupRemoval(t)},at.prototype.enableAutoGroupHiding=function(t){return this._dv.enableAutoGroupHiding(t)},at.prototype.synchronizeRowOrder=function(){this._dv.synchronizeRowOrder()},at.prototype.setSegmentSeparator=function(t,e){let i=this._toRowId(t);return this._dv.setSegmentSeparator(i,e)},at.prototype.unsetAllSegmentSeparators=function(){return this._dt.unsetAllSegmentSeparators()},at.prototype.hasSegmentation=function(){return this._dt.hasSegmentation()},at.prototype.isSegmentSeparator=function(t){return this._dt.isSegmentSeparator(t)},at.prototype.getSegmentParentRowId=function(t){return this._dt.getSegmentParentRowId(t)},at.prototype.collapseSegment=function(t,e){let i=this._toRowId(t);return this._dv.collapseSegment(i,e)},at.prototype.expandSegment=function(t,e){return this.collapseSegment(t,!1===e)},at.prototype.expandAllSegments=function(){return this._dv.expandAllSegments()},at.prototype.setSegmentCollapsingLogic=function(){},at.prototype.isSegmentCollapsed=function(t){let e=this._toRowId(t);return this._dv.isSegmentCollapsed(e)},at.prototype.fillSegment=function(t){let e=this._toRowId(t);this._dv.fillSegment(e)},at.prototype.fillSegments=function(){this._dv.fillSegments()},at.prototype.addSegmentChild=function(t,e){let i=this._toRowId(t),o=this._toRowId(e);return this._dv.addSegmentChild(i,o)},at.prototype.addSegmentChildren=function(t,e){let i=this._toRowId(t),o=this._toRowIds(e);return this._dv.addSegmentChildren(i,o)},at.prototype.removeSegmentChild=function(t,e){let i=this._toRowId(t),o=this._toRowId(e);return this._dv.removeSegmentChild(i,o)},at.prototype.removeSegmentChildren=function(t,e){let i=this._toRowId(t),o=this._toRowIds(e);return this._dv.removeSegmentChildren(i,o)},at.prototype.removeAllSegmentChildren=function(){return this._dt.removeAllSegmentChildren()},at.prototype.getSegmentIds=function(){return this._dt.getSegmentIds()},at.prototype.getSegmentChildIds=function(t){return this._dt.getSegmentChildIds(this._toRowId(t))},at.prototype.sortSegments=function(t){this._dt.sortSegments(t)},at.prototype.getWrapSize=function(){return this._dv.getWrapSize()},at.prototype.getWrappedViews=function(){return this._dv.getWrappedViews()},at.prototype.wrapView=function(t){this._dv.wrapView(t)},at.prototype.dump=function(t){return Z.constructTable(this.getMultipleRowData(this._rids),t,this._rids)},at.prototype.log=function(t){console.table(this.dump(t))},at.prototype.isRowFiltered=function(t,e){return this._dv.isRowFiltered(t,e)};const pt=at;let _t=function(t,e,i){this._onConflated=this._onConflated.bind(this),this._data=[],"function"==typeof t?this.setFunction(t,i):"function"==typeof e&&this.setFunction(e,i),"number"==typeof e?this.setConflatingTime(e):"number"==typeof t&&this.setConflatingTime(t)};_t.prototype._data,_t.prototype._func=null,_t.prototype._delay=0,_t.prototype._timerId=0,_t.prototype._conflated=!1,_t.prototype._disabled=!1,_t.prototype.reset=function(){return this._timerId&&(clearTimeout(this._timerId),this._timerId=0),this.popAllData()},_t.prototype.popAllData=function(){if(this._data.length){let t=this._data;return this._data=[],t}return null},_t.prototype.dispose=function(){this._timerId&&(clearTimeout(this._timerId),this._timerId=0),this._data.length&&(this._data.length=0),this._func=null},_t.prototype.conflate=function(t){return!this._disabled&&(null!=t&&this._data.push(t),!this._conflated&&(this._timerId||(this._timerId=setTimeout(this._onConflated,this._delay)),!0))},_t.prototype.isConflating=function(){return this._timerId>0&&!this._conflated&&!this._disabled},_t.prototype._onConflated=function(){this._conflated=!0;try{this._func()}catch(t){console.error(t.message||t)}this._timerId=0,this._data.length=0,this._conflated=!1},_t.prototype.getData=function(){return this._data},_t.prototype.setFunction=function(t,e){this._func=t,this._func=t?e?t.bind(e):t:null},_t.prototype.setConflatingTime=function(t){this._delay=t||0,this._delay<0&&(this._delay=0)},_t.prototype.getConflatingTime=function(){return this._delay},_t.prototype.disable=function(t){this._disabled=!1!==t},_t.prototype.isEnabled=function(){return!this._disabled},_t.prototype.enable=function(t){this._disabled=!1===t};let dt=function(t){let e=this;e._groupFilterLogic=e._groupFilterLogic.bind(e),e._internalGroupSortingLogic=e._internalGroupSortingLogic.bind(e),e._onDataChanged=e._onDataChanged.bind(e),e._onGroupAdded=e._onGroupAdded.bind(e),e._onBeforeGroupAdded=e._onBeforeGroupAdded.bind(e),e._onRefreshTimeout=e._onRefreshTimeout.bind(e),e._updateWrapCount=e._updateWrapCount.bind(e),e._byRemovalMap=e._byRemovalMap.bind(e),e._rids=[],e._sortingDefs=[],e._columnStats={},e._shared={},e._conflator=new _t(this._onDataChanged,0),e._conflator.disable(),e._addEvents("dataChanged","preDisposed","pageIndexChanged","pageCountChanged","groupAdded","beforeGroupAdded","groupCriteriaChanged","beforeFiltering","wrapCountChanged","wrapSizeChanged"),e.setDataSource(t)};l.inherits(dt,r),dt.prototype._rids,dt.prototype._groupView=null,dt.prototype._pageView=null,dt.prototype._expansionView=null,dt.prototype._hiddenRids=null,dt.prototype._collapsedRids=null,dt.prototype._excludedRids=null,dt.prototype._emptySegmentFiltering=!1,dt.prototype._separatorFiltering=!1,dt.prototype._expansionMap=null,dt.prototype._expansionChildren=null,dt.prototype._expansionCount=0,dt.prototype._dt=null,dt.prototype._parent=null,dt.prototype._shared=null,dt.prototype._sortingDefs=null,dt.prototype._userFilter=null,dt.prototype._filteringOut=!1,dt.prototype._refreshTimerId=0,dt.prototype._groupSortingLogic=null,dt.prototype._pageCorrection=!0,dt.prototype._pageSize=0,dt.prototype._pageIndex=1,dt.prototype._lastPageIndex=0,dt.prototype._groupCriteria=null,dt.prototype._preDefGroups=null,dt.prototype._preDefGroupsDirty=!1,dt.prototype._groupMembers=null,dt.prototype._groupList=null,dt.prototype._groupRows=null,dt.prototype._groupId="",dt.prototype._groupColor="",dt.prototype._groupValue,dt.prototype._groupRowId="",dt.prototype._footerRowIds=null,dt.prototype._groupLevel=0,dt.prototype._groupViewDirty=!1,dt.prototype._columnStats,dt.prototype._hidden=!1,dt.prototype._hiddenHeaderRow=!1,dt.prototype._collapsed=!1,dt.prototype._collapsible=!0,dt.prototype._showOnlyFirstMember=!1,dt.prototype._beingAdded=!1,dt.prototype._conflator=null,dt.prototype._wrappedViews=null,dt.prototype._wrapSize=0,dt.prototype._wrapTimerId=0,dt.prototype._stalledSorting=!1,dt.prototype.dispose=function(){if(this._dispatch("preDisposed",{}),this.unlistenAll(),this.wrapView(0),this.setDataSource(null),this.groupBy(null),this._conflator.dispose(),this._sortingDefs=null,this._shared=null,this._userFilter=this._groupSortingLogic=null,this._wrapTimerId&&(clearTimeout(this._wrapTimerId),this._wrapTimerId=0),this._refreshTimerId&&(clearTimeout(this._refreshTimerId),this._refreshTimerId=0),this._columnStats){for(let t in this._columnStats)this._columnStats[t].dispose();this._columnStats=null}},dt.prototype.getData=function(t,e){return this._dt.getData(t,e)},dt.prototype.getRowData=function(t){return this._dt.getRowData(t)},dt.prototype.getColumnData=function(t,e){let i=this.getAllRowIds(!0,e),o=[],n=i.length;for(let s=0;s<n;++s){let n=this._dt.getRowData(i[s]);n?o.push(n[t]):e&&o.push(null)}return o},dt.prototype.getRowId=function(t){return this._rebuildRowIdsFromChildren(),this._getRids()[t]||""},dt.prototype._toRowId=function(t){return"number"==typeof t?(this._rebuildRowIdsFromChildren(),this._getRids()[t]||""):t||""},dt.prototype._toRowIds=function(t){let e=Array.isArray(t)?t.length:0,i=new Array(e),o=this._getRids();for(let n=0;n<e;++n){let e=t[n];"number"==typeof e?(this._rebuildRowIdsFromChildren(),i[n]=o[e]||""):i[n]=e||""}return i},dt.prototype.getAllRowIds=function(t,e){this._rebuildRowIdsFromChildren();let i=e?this._getRids():this._pageView||this._rids;return t?i:i.slice(0)},dt.prototype.getVisibleRowIds=function(t){this._rebuildRowIdsFromChildren();let e=this._getRids();return t?e:e.slice(0)},dt.prototype.getSortedRowIds=function(t){return this._rebuildRowIdsFromChildren(),t?this._rids:this._rids.slice(0)},dt.prototype.getRowIndex=function(t){return this._rebuildRowIdsFromChildren(),this._getRids().indexOf(t)},dt.prototype.getRowCount=function(){return this._getRids().length},dt.prototype.getDataAt=function(t,e){return this._dt.getData(this.getRowId(t),e)},dt.prototype.getRowDataAt=function(t){return this._dt.getRowData(this.getRowId(t))},dt.prototype.getPreviousData=function(t,e){return this._dt.getPreviousData(t,e)},dt.prototype.getMultipleRowData=function(t,e,i){return this._dt.getMultipleRowData(t,e,i)},dt.prototype.getAllRowData=function(){return this.getMultipleRowData(this.getAllRowIds(!0))},dt.prototype.setData=function(t,e,i){return!!this._dt&&this._dt.setData(t,e,i)},dt.prototype.setRowData=function(t,e,i){return!(!t||!this._dt||this.isRowExpansion(t))&&this._dt.setRowData(t,e,i)},dt.prototype.setColumnData=function(t,e,i){this._dt&&this._dt.setColumnData(t,e,i)},dt.prototype.setDataAt=function(t,e,i){let o=this.getRowId(t);return!(!o||!this._dt)&&this._dt.setData(o,e,i)},dt.prototype.setRowDataAt=function(t,e,i){let o=this.getRowId(t);return this.setRowData(o,e,i)},dt.prototype.insertRow=function(t,e,i){this._rebuildRowIdsFromChildren();let o=this._toRowId(t);return this._dt?this._dt.insertRow(o,e,i):""},dt.prototype.removeRow=function(t){this._dt&&this._dt.removeRow(this._toRowId(t))},dt.prototype.removeRows=function(t){this._dt&&this._dt.removeRows(this._toRowIds(t))},dt.prototype.moveRow=function(t,e){let i=this._toRowId(e),o=Array.isArray(t)?t:[t],n=this._toRowIds(o);return this._dt.hasSegmentation()&&this.synchronizeRowOrder(),this._dt._moveRow(n,i)},dt.prototype.swapRow=e._deprecatedFunction,dt.prototype.getDataTable=function(){return this._dt},dt.prototype.getDataSource=function(){return this._parent},dt.prototype.setDataSource=function(t){if(t){if(this._groupLevel>0)return;this._setParent(t),this._onDataChanged(lt._globalChangeArg),this._parent.listen("dataChanged",this._onDataChanged)}else this._parent&&(this._parent.unlisten("dataChanged",this._onDataChanged),this._resetAllViews(),this._groupViewDirty=!1),this._parent=this._dt=null,this._shared={}},dt.prototype.setConflationRate=function(t){this._conflator.disable(!t),this._conflator.setConflatingTime(t)},dt.prototype.getConflationRate=function(){return this._conflator.getConflatingTime()},dt.prototype._resetAllViews=function(){this._rids.length=0,this._groupView&&this._groupView.length&&(this._groupView.length=0),this._pageView&&this._pageView.length&&(this._pageView.length=0),this._expansionView&&this._expansionView.length&&(this._expansionView.length=0)},dt.prototype.getSortingLogics=function(){return this._dt?this._dt.getSortingLogics():null},dt.prototype.sort=function(t,e,i,o){if(this._groupLevel>0)return void window.console.log("ERROR: Sub-group cannot be sorted individually");let n=this.getSortingLogics(),s=this._sortingDefs,r=s.length;if(Array.isArray(i))for(let e=i.length;--e>=0;)if("function"!=typeof i[e]){let o=Array.isArray(t)?t[e]:t;i[e]=n[o]||n._default}if(lt._buildSortContext(s,t,e,i||n),1===s.length&&0===s[0][3]&&(s.length=0),r<=0&&s.length<=0)return;if(this._shared.stalledRids)return;let l=!1;this._groupMembers||s.length<=0||o?(l=!0,this._updateRowIds()):l=this._sort(),l&&this._dispatchDataChange(lt._positionChangeArg)},dt.prototype.sortOnce=function(t,e){this.sort(t,e),this._sortingDefs.length=0},dt.prototype.setSortingLogic=function(t){this._dt&&this._dt.setSortingLogic(t)},dt.prototype.setColumnSortingLogic=function(t,e){this._dt&&this._dt.setColumnSortingLogic(t,e)},dt.prototype.getColumnSortingLogic=function(t){return this._dt?this._dt.getColumnSortingLogic(t):null},dt.prototype.isSorting=function(){return this._sortingDefs.length>0},dt.prototype.hideRow=function(t,e){this.hideRows([t],e)},dt.prototype.hideRows=function(t,e){e=!1!==e;let i=this._hiddenRids;if(e)i||(i=this._hiddenRids={});else if(!i)return;let o=this._toRowIds(t),n=!1;for(let t=o.length;--t>=0;){let s=o[t];s&&(e?i[s]||(i[s]=!0,n=!0):i[s]&&(delete i[s],n=!0))}if(n){if(!e){let t=!1;for(let e in i){t=!0;break}t||(i=this._hiddenRids=null)}this._refreshAndNotify()}},dt.prototype.showRows=function(t,e){this.hideRows(t,!1===e)},dt.prototype.unhideAllRows=function(){this._hiddenRids&&(this._hiddenRids=null,this._refreshAndNotify())},dt.prototype.hasHiddenRow=function(){return!!this._hiddenRids},dt.prototype.filterIn=function(t,e,i){let o=this._getFilterLogic(t,e),n=!0===i;return!!(this._userFilter!==o||"function"==typeof t||o&&n!==this._filteringOut)&&(this._shared.filterLogic=o,this._userFilter=o,this._filteringOut=n,this._refreshAndNotify(),!0)},dt.prototype.filterOut=function(t,e){return this.filterIn(t,e,!0)},dt.prototype.filterInOnce=function(t,e,i){let o=this._getFilterLogic(t,e),n={};if(!this._getRemovalMap(n,o,!0===i))return;let s=this._removeRowIds(n);this._updatePageCount()||this._transformView(s)?this._dispatchGlobalChange():this._dispatchMultiRowRemoved(Object.keys(n))},dt.prototype.filterOutOnce=function(t,e){this.filterInOnce(t,e,!0)},dt.prototype._removeRowIds=function(t){let e=dt._removeArrayItems(this._rids,t);if(this._groupView&&(e=dt._removeArrayItems(this._groupView,t)),this._groupMembers){let e=this._groupList.length;for(let i=0;i<e;++i){let e=this._groupList[i];this._groupMembers[e]._removeRowIds(t)}}return e},dt.prototype.clearFilter=function(){this._userFilter&&(this._userFilter=null,this._shared.filterLogic=null,this._refreshAndNotify())},dt.prototype.disablePageCorrection=function(t){this._pageCorrection=!1===t},dt.prototype.setPage=function(t){let e=this._setPage(t);return e&&this._dispatchGlobalChange(),e},dt.prototype.gotoPage=dt.prototype.setPage,dt.prototype.nextPage=function(){return this.gotoPage(this._pageIndex+1)},dt.prototype.previousPage=function(){return this.gotoPage(this._pageIndex-1)},dt.prototype.prevPage=dt.prototype.previousPage,dt.prototype.lastPage=function(){return this.gotoPage(this._lastPageIndex)},dt.prototype.firstPage=function(){return this.gotoPage(0)},dt.prototype.getCurrentPage=function(){return this._pageIndex},dt.prototype.getPageIndex=dt.prototype.getCurrentPage,dt.prototype.isOnLastPage=function(){return this._pageIndex===this._lastPageIndex},dt.prototype.isOnFirstPage=function(){return 1===this._pageIndex},dt.prototype.getPageSize=function(){return this._pageSize},dt.prototype.getPageCount=function(){return this._lastPageIndex},dt.prototype.getTotalPages=dt.prototype.getPageCount,dt.prototype.setPageSize=function(t){t>=0||(t=0),this._pageSize!==t&&(this._pageSize=t,this._updatePageCount(),t>0?this._pageView||(this._pageView=[]):this._pageView&&(this._pageView=null),this._pageView&&0!==t?this._transformView():this._updateRowIds(),this._dispatchGlobalChange())},dt.prototype.groupBy=function(t,e){if(this._shared.multiGroupRow=!1,this._groupCriteria){if(this._groupList&&this._groupList.length>0){for(let t in this._groupMembers)this._groupMembers[t].dispose();this._groupMembers={},this._groupList.length=0}this._groupCriteria=null}let i,o;if(null!=e&&this._setPredefinedGroups(e),t&&0===this._groupLevel){let e;for(this._groupCriteria=[],e=Array.isArray(t)?t:[t],o=e.length,i=0;i<o;++i){let t=e[i];"string"==typeof t?this._groupCriteria.push(this._defaultGroupCriteria.bind(this,t)):t&&this._groupCriteria.push(t)}}if(this._groupCriteria)this._groupMembers||(this._groupMembers={},this._groupList=[],this._groupRows={}),this._groupView||(this._groupView=[]);else{if(this._groupMembers=null,this._groupList=null,this._groupView=null,this._groupRows){if(this._groupLevel<=0)this._footerRowIds=null;else if(this._groupRowId&&delete this._groupRows[this._groupRowId],this._footerRowIds){for(o=this._footerRowIds.length,i=0;i<o;++i)delete this._groupRows[this._footerRowIds[i]];this._footerRowIds=null}this._groupRows=null}this._groupValue=null}this._groupLevel=0,this._updateRowIds(),this._dispatch("groupCriteriaChanged",{}),this._dispatchGlobalChange()},dt.prototype.addGroup=function(t){if(this._groupMembers)if(isArray(t)){let e=t,i=e.length;for(let t=0;t<i;++t)this._addGroup(e[t])}else this._addGroup(t)},dt.prototype.sortGroups=function(t){if(this._groupMembers&&(this._groupSortingLogic=null==t?dt._defaultGroupSortingLogic:t||null,this._groupSortingLogic)){this._groupList.sort(this._internalGroupSortingLogic);for(let t=this._groupList.length;--t>=0;){let e=this._groupList[t];this._groupMembers[e].sortGroups(this._groupSortingLogic)}this._groupViewDirty=!0,this._groupLevel<=0&&this._dispatchGlobalChange()}},dt.prototype.moveGroup=function(t,e){let i=this.getGroup(t);if(!i)return;let o=i.getDataSource(),n=i.getGroupId(),s=o._groupList.indexOf(n);s!==e&&s+1!==e&&(o._groupList.splice(s,1),s<e&&--e,o._groupList.splice(e,0,n),this._requestRebuildingRowIds(!1))},dt.prototype.setPredefinedGroups=function(t){this._setPredefinedGroups(t),this._groupMembers&&this._refreshAndNotify()},dt.prototype._setPredefinedGroups=function(t){if(this._preDefGroups===t)return;this._preDefGroups&&(this._preDefGroups.length=0);let e=!1;if(t)for(let i=t.length;--i>=0;)if(Array.isArray(t[i])){e=!0;break}e?this._preDefGroups=t:Array.isArray(t)?this._preDefGroups=[t]:this._preDefGroups=null,this._preDefGroupsDirty=!0},dt.prototype.addFooter=function(t){if(this._groupLevel<=0)console.log("WARNING: Only group can have a footer");else if(null==t&&(t=1),!(t<=0)){this._footerRowIds||(this._footerRowIds=[]);for(let e=0;e<t;++e){let t=this._groupRowId+"_footer"+(this._footerRowIds.length||"");this._footerRowIds.push(t),this._groupRows[t]=this}this._beingAdded||this._requestRebuildingRowIds(this._collapsed)}},dt.prototype.removeFooter=function(){if(this._footerRowIds){let t=this._footerRowIds.length;for(let e=0;e<t;++e)delete this._groupRows[this._footerRowIds[e]];this._footerRowIds=null,this._beingAdded||this._requestRebuildingRowIds(this._collapsed)}},dt.prototype.enableMultiGroup=function(t){this._shared.multiGroupRow=!1!==t},dt.prototype.getGroupByRowId=function(t){return this._groupRows&&this._groupRows[t]||null},dt.prototype.getGroup=function(t){if(!this._groupMembers)return null;let e;if("number"==typeof t){if(e=this._groupList[t],!e)return null}else e=t+"";let i=this._groupMembers[e];if(i)return i;let o=e;return i=this._groupRows[o],i||this._getGroupByContentRowId(o)},dt.prototype._getGroupByContentRowId=function(t){if(this._groupMembers)for(let e=0;e<this._groupList.length;e++){let i=this._groupList[e],o=this._groupMembers[i]._getGroupByContentRowId(t);if(o)return o}else if(-1!==this._rids.indexOf(t))return this;return null},dt.prototype.getAllGroups=function(t){if(t||(t=[]),this._groupMembers){let e=this._groupList.length;for(let i=0;i<e;++i){let e=this._groupList[i],o=this._groupMembers[e];t.push(o),o.getAllGroups(t)}}return t},dt.prototype.getGroupList=function(){return this._groupList},dt.prototype.getGroupId=function(){return this._groupId},dt.prototype.getGroupValue=function(){return this._groupValue},dt.prototype.getGroupRowId=function(){return this._groupRowId},dt.prototype.getFooterRowIndex=function(t){if(this._footerRowIds)for(let e=this._footerRowIds.length;--e>=0;)if(this._footerRowIds[e]===t)return e;return-1},dt.prototype.getFooterRowIds=function(){return this._footerRowIds},dt.prototype.hasGroup=function(){return!!this._groupMembers},dt.prototype.getGroupRows=function(){return null},dt.prototype.getGroupLevel=function(t){if(null!=t&&this._groupRows){if("number"!=typeof t){let e=this.getGroup(t);return e?e._groupLevel:-1}{this._rebuildRowIdsFromChildren();let e=this._getRids(),i=e[t];for(;i;){let o=this._groupRows[i];if(o)return o._groupLevel;i=e[--t]}}}return this._groupLevel},dt.prototype.enableColumnStats=function(t,e,i){if(!t)return null;let o=!1!==e,n=this._columnStats[t];if(o?(n||(n=new ut(this,t),this._columnStats[t]=n),n.addRef(i)):n&&(n.deRef(i)||(n.dispose(),delete this._columnStats[t])),this._groupMembers)for(let o=this._groupList.length;--o>=0;){let n=this._groupList[o];this._groupMembers[n].enableColumnStats(t,e,i)}return n||null},dt.prototype.getColumnStats=function(t){return this._columnStats[t]||null},dt.prototype.hide=function(t){let e=!1!==t;return this._hidden!==e&&(this._hidden=e,this._refreshAndNotify(),!0)},dt.prototype.isHidden=function(){return this._hidden},dt.prototype.isHiddenRow=function(t){return!!this._hiddenRids&&!0===this._hiddenRids[t]},dt.prototype._isHeaderRowShown=function(){return!(this._hiddenHeaderRow||this._shared.filterLogic&&0===this._rids.length||this._shared.autoGroupHiding&&null==this._groupValue)},dt.prototype._setCollapse=function(t){if(this._shared.contentAsHeader){if(this._hiddenHeaderRow&&this._showOnlyFirstMember!==t)return this._showOnlyFirstMember=t,!0}else if(this._isHeaderRowShown()&&this._collapsible&&this._collapsed!==t)return this._collapsed=t,!0;return!1},dt.prototype.collapse=function(t){this._setCollapse(!1!==t)&&(this._shared.contentAsHeader?this._hiddenHeaderRow&&this._requestRebuildingRowIds(this._showOnlyFirstMember):this._groupLevel>0&&this._requestRebuildingRowIds(this._collapsed))},dt.prototype.collapseAllGroups=function(t){let e=this.getAllGroups(),i=e.length;if(i){let o=!1!==t;for(let t=0;t<i;++t)e[t]._setCollapse(o);this._requestRebuildingRowIds(!1)}},dt.prototype.toggleCollapsedState=function(){this.collapse(!this.isCollapsed())},dt.prototype.isCollapsed=function(){return this._collapsed||this._showOnlyFirstMember},dt.prototype.enableContentAsHeader=function(t){this._shared.contentAsHeader=!1!==t},dt.prototype.setDefaultCollapse=function(t){this._shared.defaultCollapse=!!t},dt.prototype.getDefaultCollapse=function(){return!!this._shared.defaultCollapse},dt.prototype.isCollapsible=function(){return this._collapsible},dt.prototype.disableCollapsing=function(t){this._collapsible=!(!1!==t)},dt.prototype.setGroupColor=function(t){1===this._groupLevel&&(this._groupColor=t)},dt.prototype.getGroupColor=function(){return 0===this._groupLevel?"":1===this._groupLevel?this._groupColor:this._parent.getGroupColor()},dt.prototype._getFirstHiddenRids=function(){if(this._shared.contentAsHeader&&this._showOnlyFirstMember){let t=this._rids;if(Array.isArray(t)&&t.length)return[t[0]]}return null},dt.prototype.getVisibleRowCount=function(){return this._collapsed?0:(this._rebuildRowIdsFromChildren(),this._getRids().length)},dt.prototype.isRowDataInGroup=function(t,e){let i=this._groupCriteria,o=this._groupLevel;if(!e||e===this.getGroupId())return this._isAllowedInGroup(null,t);for(let n=o;n<i.length;n++)if(i[n](t).indexOf(e)>=0)return!0;return!1},dt.prototype.isRowIdInGroup=function(t,e){let i=this.getRowData(t);return!!i&&this.isRowDataInGroup(i,e)},dt._getDataViewExpansionId=function(t,e){return t+"_ex"+e},dt.prototype.addRowExpansion=function(t,e){if(this._groupLevel>0)return;if(!e||e<0){if(null!=e)return;e=1}let i=this._rids.indexOf(t);if(i<0)return;let o=0;this._expansionMap?o=this._expansionMap[t]||0:(this._expansionMap={},this._expansionChildren={});let n=o+e;this._expansionMap[t]=n;for(let e=o;e<n;e++)this._expansionChildren[dt._getDataViewExpansionId(t,e)]=t;if(o||this._expansionCount++,!this._groupViewDirty&&this._updateExpansionView()){let e={};e.rid=t,e.type="inserted",e.nextRid=this._rids[i+1],e.fallback=i,this._dispatchDataChange(e)}},dt.prototype.removeRowExpansion=function(t){if(!this._expansionMap)return;let e=this._expansionMap[t];if(!e)return;let i=new Array(e);for(let o=0;o<e;++o)i[o]=dt._getDataViewExpansionId(t,o),delete this._expansionChildren[i[o]];delete this._expansionMap[t],this._expansionCount--,this._groupViewDirty||this._updateExpansionView()&&(1===e?this._dispatchRowRemoved(i[0]):this._dispatchMultiRowRemoved(i))},dt.prototype.toggleRowExpansion=function(t,e,i){let o=this._toRowId(t);(e=null!=e?!0===e:!this.hasRowExpansion(o))?this.addRowExpansion(o,i):this.removeRowExpansion(o)},dt.prototype.removeAllRowExpansions=function(){this._expansionMap&&(this._expansionMap=null,this._expansionCount=0,this._expansionView=null,this._expansionChildren=null,this._refreshAndNotify())},dt.prototype.getRowsWithExpansion=function(t,e){if(!this._expansionMap)return[];let i=this._expansionView,o=i.length;(null==e||e>o)&&(e=o),t>0||(t=0);let n=this._expansionCount,s=new Array(o);for(let o=t;o<e;++o){let t=i[o];if(this._expansionMap[t]&&(s[o]=t,--n<=0))break}return s},dt.prototype.getExpansionParents=function(t,e){let i=[];if(this._expansionMap){let o=this._expansionView,n=o.length;(null==e||e>n)&&(e=n),(!t||t<0)&&(t=0);for(let n=t;n<e;++n)i[n]=this._expansionChildren[o[n]]||""}return i},dt.prototype.getExpansionParentByRowId=function(t){return this._expansionChildren&&this._expansionChildren[t]||""},dt.prototype.isRowExpansion=function(t){return!!this._expansionChildren&&!!this._expansionChildren[t]},dt.prototype.hasRowExpansion=function(t){return!!this._expansionMap&&!!this._expansionMap[t]},dt.prototype.getRowExpansionCount=function(t){return this._expansionMap&&this._expansionMap[t]||0},dt.prototype.getRowExpansionId=function(t,e){return this._expansionMap&&(e||(e=0),e<(this._expansionMap[t]||0))?dt._getDataViewExpansionId(t,e):""},dt.prototype.getRowExpansionIndex=function(t){if(t){let e=t.match(/_ex(\d+)$/);if(e)return+e[1]}return-1},dt.prototype._updateExpansionView=function(){let t=this._expansionMap;if(t){if(!this._expansionCount||this._expansionCount<0)return this._expansionCount=0,this._expansionMap=null,this._expansionView=null,this._expansionChildren=null,!0;let e=this._pageView||this._groupView||this._rids,i=e.length,o=this._expansionView?this._expansionView.length:0;this._expansionView?this._expansionView.length=i:this._expansionView=new Array(i);let n=this._expansionCount;for(let o=0,s=0;o<i;++o){let i=e[o];if(this._expansionView[s++]=i,n){let e=t[i]||0;if(e){for(let t=0;t<e;++t)this._expansionView[s++]=dt._getDataViewExpansionId(i,t);--n}}}return o!==this._expansionView.length}return!1},dt.prototype._transformView=function(t){let e=this._updatePaginationView(t);return e|=this._updateExpansionView(),!!e},dt.prototype.searchAll=function(t,e){e||(e=[]),this._rebuildRowIdsFromChildren();let i=this._getRids(),o=i.length;for(let n=0;n<o;++n){let o=i[n],s=this._dt.getRowData(o);s&&t(s)&&e.push(o)}return e},dt.prototype.searchPrev=function(t,e){this._rebuildRowIdsFromChildren();let i=this._getRids(),o=-1;"number"==typeof t?this._dt.getRowData(i[t])&&(o=t):o=i.indexOf(t);let n=-1,s=i.length;return o>0&&(n=this._searchRow(i,e,o-1,-1,-1),n>=0)||o>=0&&(n=this._searchRow(i,e,s-1,o,-1),n>=0)?n:-1},dt.prototype.searchNext=function(t,e){this._rebuildRowIdsFromChildren();let i=this._getRids(),o=-1;if("number"==typeof t?this._dt.getRowData(i[t])&&(o=t):o=i.indexOf(t),o<0)return-1;let n=-1,s=i.length;return o<s-1&&(n=this._searchRow(i,e,o+1,s,1),n>=0)||o>0&&(n=this._searchRow(i,e,0,o,1),n>=0)?n:-1},dt.prototype._searchRow=function(t,e,i,o,n){for(;i!==o;){let o=t[i],s=this._dt.getRowData(o);if(s&&e(s))return i;i+=n}return-1},dt.prototype.stall=function(t){let e=!1!==t;if(!!this._shared.stalledRids===e)return!1;if(e){let t={};this._shared.stalledRids=t;let e=this._getRids();for(let i=e.length;--i>=0;)t[e[i]]=1}else this._shared.stalledRids=null,this._refreshAndNotify();return!0},dt.prototype.stallSorting=function(t){let e=!1!==t;return this._stalledSorting!==e&&(this._stalledSorting=e,!e&&this.isSorting()&&this._sort()&&this._dispatchDataChange(lt._positionChangeArg),!0)},dt.prototype.enableAutoGroupRemoval=function(t){return t=!1!==t,!!this._shared.autoGroupRemoval!==t&&(this._shared.autoGroupRemoval=t,this._triggerGroupRefreshing(),!0)},dt.prototype.enableAutoGroupHiding=function(t){return t=!1!==t,!!this._shared.autoGroupHiding!==t&&(this._shared.autoGroupHiding=t,this._triggerGroupRefreshing(),!0)},dt.prototype.synchronizeRowOrder=function(){!this._stalledSorting&&this.isSorting()&&this._dt._sort(this._sortingDefs)},dt.prototype.setSegmentSeparators=function(t,e){return!!t&&((e=!1!==e)&&this.synchronizeRowOrder(),this._dt.setSegmentSeparators(t,e))},dt.prototype.setSegmentSeparator=function(t,e){let i="";return"number"==typeof t?i=this.getRowId(t):"string"==typeof t&&(i=t),!!i&&(!1!==e&&this.synchronizeRowOrder(),this._dt.setSegmentSeparator(i,e))},dt.prototype.unsetAllSegmentSeparators=function(){return this._dt.unsetAllSegmentSeparators()},dt.prototype.hasSegmentation=function(){return this._dt.hasSegmentation()},dt.prototype.isSegmentSeparator=function(t){return this._dt.isSegmentSeparator(t)},dt.prototype.getSegment=function(t){return this._dt.getSegment(t)},dt.prototype.getSegmentParent=function(t){return this._dt.getSegmentParent(t)},dt.prototype.getSegmentLevel=function(t){return this._dt.getSegmentLevel(t)},dt.prototype.getSegmentParentRowId=function(t){return this._dt.getSegmentParentRowId(t)},dt.prototype.collapseSegment=function(t,e){e=!1!==e;let i=this._dt._getSegmentSeparators();if(i){let o=this._toRowId(t);if(i.collapseSegment(o,e))return this._refreshAndNotify(),!0}return!1},dt.prototype.collapseSegments=function(t,e){e=!1!==e;let i=this._dt._getSegmentSeparators();return!(!i||!i.collapseSegments(t,e)||(this._refreshAndNotify(),0))},dt.prototype.expandSegment=function(t,e){return this.collapseSegment(t,!1===e)},dt.prototype.expandAllSegments=function(){let t=this._dt._getSegmentSeparators();return!(!t||!t.expandAllSegments()||(this._refreshAndNotify(),0))},dt.prototype.setSegmentCollapsingLogic=function(){},dt.prototype.isSegmentCollapsed=function(t){let e=this._dt._getSegmentSeparators();return!!e&&e.isCollapsedSegment(this._toRowId(t))},dt.prototype.fillSegment=function(t){this._dt.fillSegment(this._toRowId(t))},dt.prototype.fillSegments=function(){this._dt.fillSegments()},dt.prototype.addSegmentChild=function(t,e,i){if(this._dt._getSegmentSeparators()){let o=this._toRowId(t),n=this._toRowId(e);return this._dt.addSegmentChild(o,n,i)}return!1},dt.prototype.addSegmentChildren=function(t,e,i){if(this._dt._getSegmentSeparators()){let o=this._toRowId(t),n=this._toRowIds(e);return this._dt.addSegmentChildren(o,n,i)}return!1},dt.prototype.setSegmentChildren=function(t){return!!this._dt._getSegmentSeparators()&&this._dt.setSegmentChildren(t)},dt.prototype.removeSegmentChild=function(t,e){if(this._dt._getSegmentSeparators()){let i=this._toRowId(t),o=this._toRowId(e);return this._dt.removeSegmentChild(i,o)}return!1},dt.prototype.removeSegmentChildren=function(t,e){if(this._dt._getSegmentSeparators()){let i=this._toRowId(t),o=this._toRowIds(e);return this._dt.removeSegmentChildren(i,o)}return!1},dt.prototype.removeAllSegmentChildren=function(){return this._dt.removeAllSegmentChildren()},dt.prototype.getSegmentIds=function(){return this._dt.getSegmentIds()},dt.prototype.getSegmentChildIds=function(t){return this._dt.getSegmentChildIds(this._toRowId(t))},dt.prototype.sortSeparators=function(t,e,i){let o=this._sortingDefs;if(o.length)i||(i=o[0][0]),e||(e=o[0][3]);else if(!t)return;this._dt.sortSeparators(t,e,i)},dt.prototype.sortSegments=function(t){this._dt.sortSegments(t)},dt.prototype.enableEmptySegmentFiltering=function(t){t=!1!==t,this._emptySegmentFiltering!==t&&(this._emptySegmentFiltering=t,this._userFilter&&this._refreshAndNotify())},dt.prototype.enableSeparatorFiltering=function(t){t=!1!==t,this._separatorFiltering!==t&&(this._separatorFiltering=t,this._userFilter&&this._refreshAndNotify())},dt.prototype.setSegmentClassification=function(t,e){return this._dt.setSegmentClassification(this._toRowId(t),e)},dt.prototype.setSegmentDefaultCollapsing=function(t){return this._dt.setSegmentDefaultCollapsing(t)},dt.prototype._getSharedObject=function(){return this._shared},dt.prototype.getWrapSize=function(){return this._wrapSize},dt.prototype.getWrappedViews=function(){return this._wrappedViews},dt.prototype.wrapView=function(t){null!=t&&((!t||t<0)&&(t=0),this._wrapSize!==t&&(this._wrapSize=t,this._dispatch("wrapSizeChanged",{wrapSize:t,rids:this.getVisibleRowIds(!0)}))),this._updateWrapCount()},dt.prototype._updateWrapCount=function(){this._wrapTimerId=0;let t,e=this._wrapSize,i=this._wrappedViews,o=i?i.length:0,n=0;if(e){let s=this.getVisibleRowIds(!0),r=s.length;if(n=Math.ceil(r/e),o<n)for(i||(i=this._wrappedViews=[]),t=o;t<n;++t)this._wrappedViews[t]=new pt({dataView:this,wrapIndex:t,rids:s})}if(n<o){for(t=o;--t>=n;)this._wrappedViews[t].dispose();this._wrappedViews.length=n}e||(this._wrappedViews=null),o!==n&&this._dispatch("wrapCountChanged",{prevCount:o,newCount:n})},dt.prototype.dump=function(t){this._rebuildRowIdsFromChildren();let e=this._getRids();return Z.constructTable(this.getMultipleRowData(e),t,e)},dt.prototype.log=function(t){console.table(this.dump(t))},dt.prototype._getRids=function(){return this._expansionView||this._pageView||this._groupView||this._rids},dt.prototype._updateRowIds=function(t){if(this._groupViewDirty=!1,!this._parent||this._hidden)return void this._resetAllViews();if(this._shared.stalledRids)return;this._rids=t||this._parent.getAllRowIds(),this._dispatch("beforeFiltering",{}),this._excludedRids={};let e=0;e+=dt._copyValidObjectKeys(this._excludedRids,this._hiddenRids);let i=this._dt._getSegmentSeparators(),o=i?i.getSegments():null,n=this._getRemovalMap(this._excludedRids,this._userFilter,this._filteringOut,this._separatorFiltering?null:o);if(e+=n,this._collapsedRids=null,i&&(n&&this._emptySegmentFiltering&&(e+=this._getEmptySegments(this._excludedRids,o)),this._collapsedRids=i.getCollapsedRows(),e+=dt._copyValidObjectKeys(this._excludedRids,this._collapsedRids)),this._groupLevel>0&&!t&&(e+=this._getRemovalMap(this._excludedRids,this._groupFilterLogic,!1)),e&&(this._rids=this._rids.filter(this._byRemovalMap)),this._excludedRids=null,this._groupMembers)this._populateGroups();else{let t=this._updatePageCount();this._sort()||t||this._transformView()}},dt.prototype._onDataChanged=function(t){if(this._conflator.conflate(t))return;let e=this._conflator.popAllData()||[t],i=e.length;if(1===i){let t=e[0];if(t.globalChange)return this._updateRowIds(),void this._dispatchDataChange(t);let i=t.type;"inserted"===i?this._onRowInserted(t):"removed"===i?this._onRowRemoved(t):this._onRowUpdated(t)}else{this._updateRowIds();let t=!0;for(let o=0;o<i;o++)if(!e[o].positionChangeOnly){t=!1;break}this._dispatchDataChange({globalChange:!0,positionChangeOnly:t,events:e})}},dt.prototype._onRowInserted=function(t){if(this._shared.stalledRids)return 0;if(this.isRowFiltered(t.rid,t.rowData))return 0;let e=0;if(this._groupMembers){let i,o=this._resolveGroupId(t.rowData),n=o.length;n>1&&(this._shared.multiGroupRow=!0);for(let s=0;s<n;s++)if(i=o[s],this._groupMembers[i])e=this._groupMembers[i]._onRowInserted(t);else{let o=this._addGroup(i);o&&(t.globalChange=!0,o._onRowInserted(t),e=1)}t.globalChange&&(this._groupViewDirty=!0)}if(this._hidden)return e;let i=t.rid,o=t.rowData;if(!this._isAllowedInGroup(i,o))return e;let n,s=t.nextRid;n=this.isSorting()&&!t.segmentChanged?this._addDataRow(i):this._addDataRow(i,s,t.fallback);let r=this._updatePageCount(),l=this._sort();return l&&(t.globalChange=!0),t.globalChange?l||r||this._transformView():(t={rid:i,rowData:o,type:"inserted"},null!=s&&(t.nextRid=s,t.fallback=n),this._transformView(n)&&(t.globalChange=!0)),this._dispatchDataChange(t),1},dt.prototype._onRowRemoved=function(t){if(this._shared.stalledRids)return 0;if(t.segmentChanged&&this.isSorting())return this._refreshAndNotify(),1;let e,i=0,o=t.rids;if(this._groupMembers){let n,s,r=t.rowData;if(!o&&r){for(n=this._resolveGroupId(r),e=0;e<n.length;e++)s=n[e],this._groupMembers[s]&&(i+=this._groupMembers[s]._onRowRemoved(t));i>1&&(this._groupViewDirty=!0)}else{let o=this._groupList.length;for(e=0;e<o;++e)s=this._groupList[e],i+=this._groupMembers[s]._onRowRemoved(t)}}let n,s,r=NaN,l=null;if(i=0,o){for(l=[],e=o.length;--e>=0;)n=o[e],s=this._removeDataRow(n),s>=0&&(l.push(n),s>=r||(r=s));i=l.length}else n=t.rid,s=this._removeDataRow(n),s>=0&&(l=[n],r=s,i=1);return i>0&&(this._updatePageCount()||this._transformView(r)?this._dispatchGlobalChange():this._dispatchMultiRowRemoved(l),this._shared.autoGroupRemoval&&this._groupRows&&this._rids.length<=0&&this._triggerGroupRefreshing(),this._hiddenHeaderRow&&this._requestRebuildingRowIds(!0)),i},dt.prototype._onRowUpdated=function(t){let e,i,o=t.rid,n=t.rowData;if(this.isRowFiltered(o,n))return this._onRowRemoved(t)?1:0;if(this._groupMembers){let s=[],r=this._groupList.length;for(e=0;e<r;++e)i=this._groupList[e],s[this._groupMembers[i]._onRowUpdated(t)]=!0;t.globalChange&&(this._groupViewDirty=!0);let l=0;if(s[2]?l=2:s[1]?this._isAllowedInGroup(o,n)||(l=1):s[4]&&(l=4),this._groupLevel>0)1===l?(dt._removeArrayItem(this._rids,o)>=0&&this._groupView&&dt._removeArrayItem(this._groupView,o),this._shared.multiGroupRow&&(this._groupViewDirty=!0)):2!==l||this._hidden||(this._rids.indexOf(o)<0&&this._rids.push(o),this._groupViewDirty=!0,this._resolveGroupId(n).length>1&&(this._shared.multiGroupRow=!0));else{let r=s[1]&&s[2]||s[4];if(this._shared.multiGroupRow||!r){let o=this._resolveGroupId(n);for(e=0;e<o.length;e++){i=o[e];let n=this._addGroup(i);n&&(n._onRowInserted(t),l=1)}}!r&&!this._hidden&&this._rids.indexOf(o)<0&&this._addDataRow(o),4===l?this._shared.multiGroupRow?this._dispatchGlobalChange():this._dispatchDataChange(t):(this._groupViewDirty=!0,this._dispatchGlobalChange())}return l}return this._isAllowedInGroup(o,n)?this._rids.indexOf(o)<0?(this._onRowInserted(t),2):(this._shared.stalledRids||this._sort()&&(t.globalChange=!0),this._dispatchDataChange(t),4):this._onRowRemoved(t)?1:0},dt.prototype._onGroupAdded=function(t){if(!this._hidden){let i=t.newGroup,o=i.getGroupRowId();this._groupView.push(o),this._groupViewDirty=!0,this._dispatch("groupAdded",t),e.pushArrayItems(this._groupView,i.getFooterRowIds())}},dt.prototype._onBeforeGroupAdded=function(t){this._dispatch("beforeGroupAdded",t)},dt.prototype._requestRebuildingRowIds=function(t){this._groupMembers&&(this._groupViewDirty=!0),this._groupLevel>0?this._parent._requestRebuildingRowIds(t):(t?this._rebuildRowIdsFromChildren():this._updateRowIds(),this._dispatchGlobalChange())},dt.prototype._refreshAndNotify=function(){this._updateRowIds(),this._dispatchGlobalChange()},dt.prototype._onRefreshTimeout=function(){this._refreshTimerId=0,this._refreshAndNotify()},dt.prototype._addDataRow=function(t,e,i){let o=this._getRowIndex(this._rids,e,i);return this._insertItems(this._rids,o,t),this._groupView?this._groupMembers?(this._groupViewDirty=!0,this._insertItems(this._groupView,-1,t)):o<0?this._insertItems(this._groupView,-1,t):(o=this._getRowIndex(this._groupView,e,i),this._insertItems(this._groupView,o,t)):o>=0?o:this._rids.length-1},dt.prototype._insertItems=function(t,e,i){return e<0?(e=t.length,t.push(i)):t.splice(e,0,i),e},dt.prototype._getRowIndex=function(t,e,i){if(null==e)return-1;let o=this._rids.indexOf(e);return o>=0?o:null==i||i>=t.length?-1:i},dt.prototype._removeDataRow=function(t){let e=dt._removeArrayItem(this._rids,t);return this._groupView&&e>=0&&(e=dt._removeArrayItem(this._groupView,t)),e},dt._removeArrayItem=function(t,e){let i=t.indexOf(e);return i>=0&&t.splice(i,1),i},dt._removeArrayItems=function(t,e){let i=NaN,o=0;for(let n=t.length;--n>=0;)e[t[n]]?++o:o&&(i=n+1,t.splice(i,o),o=0);return o&&(t.splice(0,o),i=0),i},dt._copyValidObjectKeys=function(t,e){if(e){let i=0;for(let o in e)e[o]&&(t[o]=1,++i);return i}return 0},dt.prototype._isAllowedInGroup=function(t,e){if(this._groupLevel>0){let i=this;for(let o=this._groupLevel;--o>=0;){if(!i._groupFilterLogic(t,e))return!1;i=i.getDataSource()}}return!0},dt.prototype.isRowFiltered=function(t,e){return this._shared.stalledRids?!this._shared.stalledRids[t]:!(!this._hiddenRids||!this._hiddenRids[t])||!(!this._collapsedRids||!this._collapsedRids[t])||!(!this._userFilter||this._userFilter(t,e)!==this._filteringOut)},dt.prototype._sort=function(){if(this._groupMembers)return!1;if(this._stalledSorting)return!1;if(this._dt._getSegmentSeparators()||this.isSorting()){let t=this._rids,e=this._dt.getMultipleRowData(t),i=this._dt.getSegmentValues(t,!0),o=lt._performMultiLevelSorting(e,this._sortingDefs,i);if(o)return this._rids=lt._reorderItems(t,o),this._transformView(),!0}return!1},dt.prototype._byRemovalMap=function(t){return!this._excludedRids[t]},dt.prototype._getRemovalMap=function(t,e,i,o){if(!e)return 0;let n,s,r,l=this._rids,h=this._dt,u=0,a=l.length;if(o)for(s=a;--s>=0;)n=l[s],o[n]||(r=h.getRowData(n),r?e(n,r)===i&&(t[n]=1,++u):(t[n]=1,++u));else for(s=a;--s>=0;)n=l[s],r=h.getRowData(n),r?e(n,r)===i&&(t[n]=1,++u):(t[n]=1,++u);return u},dt.prototype._getEmptySegments=function(t,e){let i=this._dt._getSegmentSeparators(),o=0;for(let n in e){let e=i.getSegment(n);if(e){let i=e.getChildren(),s=!0;for(let e in i)if(!t[e]){s=!1;break}s&&(t[n]=1,++o)}}return o},dt.prototype._getFilterLogic=function(t,e){return null!=t?"function"==typeof t?t:"string"==typeof t?dt._defaultFilterLogic.bind(null,t,e):dt._defaultFilterLogic.bind(null,t+"",e):null},dt.prototype._setPage=function(t){return t>this._lastPageIndex&&this._pageCorrection&&(t=this._lastPageIndex),t<1&&(t=1),t!=this._pageIndex&&(this._pageIndex=t,this._transformView(),this._dispatch("pageIndexChanged",{pageIndex:this._pageIndex}),!0)},dt.prototype._updatePaginationView=function(t){let e=!1;if(this._pageView){t||(t=0);let i=this._pageSize*(this._pageIndex-1),o=this._pageSize+i;if(t<o){let t=this._groupView||this._rids;o>t.length&&(o=t.length);let n=o-i;this._pageView.length=n>=0?n:0;for(let e=i;e<o;++e)this._pageView[e-i]=t[e];e=!0}}return e},dt.prototype._updatePageCount=function(){let t=1;if(this._pageSize>0){let e=this._groupView||this._rids,i=e.length>0?e.length:0;t=Math.ceil(i/this._pageSize)}return!!(this._lastPageIndex!==t&&(this._lastPageIndex=t,this._dispatch("pageCountChanged",{pageCount:this._lastPageIndex}),this._lastPageIndex<this._pageIndex&&this._pageCorrection))&&this._setPage(this._lastPageIndex)},dt.prototype._dispatchRowRemoved=function(t){t&&this._dispatchDataChange({type:"removed",rid:t})},dt.prototype._dispatchMultiRowRemoved=function(t){if(t){let e=t.length;1===e?this._dispatchRowRemoved(t[0]):e>1&&this._dispatchDataChange({type:"removed",rids:t})}},dt.prototype._dispatchGlobalChange=function(){this._dispatchDataChange(lt._globalChangeArg)},dt.prototype._dispatchDataChange=function(t){this._dispatch("dataChanged",t),this._wrapSize&&!this._wrapTimerId&&(this._wrapTimerId=setTimeout(this._updateWrapCount))},dt.prototype._setParent=function(t){this._parent=t,this._dt=t;do{(t=t.getDataSource())&&(this._dt=t)}while(t);if(this._parent&&this._dt!==this._parent){this._shared=this._parent._shared;let t=this._parent._columnStats;if(t)for(let e in t){let t=this.enableColumnStats(e),i=this._parent.getColumnStats(e);t&&i&&t.setColumnDataGetter(i.getColumnDataGetter())}}},dt.prototype._populateGroups=function(){let t,e,i,o,n,s,r=this._rids;this._rids=[];let l={},h=[];for(e=r.length,t=0;t<e;++t){let e=r[t],i=this._dt.getRowData(e);if(i){n=this._resolveGroupId(i),s=n.length,s>1&&(this._shared.multiGroupRow=!0);for(let t=0;t<s;t++){o=n[t];let i=l[o];i?i.push(e):(i=[e],l[o]=i,h.push(o))}}}if(this._shared.autoGroupRemoval)for(e=this._groupList.length,t=e;--t>=0;)o=this._groupList[t],l[o]||(i=this._groupMembers[o],i&&!i._predefinedGroup&&this._removeGroupMember(t,o));let u=null;if(this._preDefGroups&&this._groupLevel<this._preDefGroups.length&&(u=this._preDefGroups[this._groupLevel]),e=this._groupList.length,this._preDefGroupsDirty)for(this._preDefGroupsDirty=!1,t=e;--t>=0;)o=this._groupList[t],i=this._groupMembers[o],i&&i._predefinedGroup&&(u?u.indexOf(i._groupId)<0&&this._removeGroupMember(t,o):this._removeGroupMember(t,o));if(u)for(e=u.length,t=0;t<e;++t){let e=this._addGroup(u[t]);e&&(e._predefinedGroup=!0)}for(e=h.length,t=0;t<e;++t)this._addGroup(h[t]);for(e=this._groupList.length,t=0;t<e;++t)o=this._groupList[t],i=this._groupMembers[o],i._updateRowIds(l[o]),i._markColumnStatsDirty();this._groupViewDirty=!0,this._rebuildRowIdsFromChildren()},dt.prototype._removeGroupMember=function(t,e){let i=this._groupMembers[e];i&&(this._groupList.splice(t,1),delete this._groupMembers[e],i.dispose())},dt.prototype._defaultGroupCriteria=function(t,e){let i=e[t];return Array.isArray(i)?i.map((function(t){return t+""})):[i+""]},dt.prototype._groupFilterLogic=function(t,e){return this._groupCriteria[this._groupLevel-1](e).indexOf(this._groupId)>=0},dt.prototype._internalGroupSortingLogic=function(t,e){let i=this._groupMembers[t],o=this._groupMembers[e];return this._groupSortingLogic(t,e,i,o)},dt.prototype._addGroup=function(t){let e=t+"";if(!e)return null;let i=this._groupMembers[e];if(i)return null;let o,n=(this._groupRowId||"_grp")+"_"+e;if(this._hasListener("beforeGroupAdded")&&(o={dataView:this,newGroupId:e,newGroupValue:t,newGroupRowId:n,newGroupLevel:this._groupLevel+1},this._dispatch("beforeGroupAdded",o),o.cancel))return null;i=new dt;let s=this._shared.defaultCollapse;return null!=s&&(i._collapsed=s),i._groupId=e,"string"==typeof t?"null"==t?i._groupValue=null:"undefined"!=t&&(i._groupValue=t):i._groupValue=t,o&&!0===o.hideHeaderRow&&(i._hiddenHeaderRow=!0),i._groupRowId=n,i._groupLevel=this._groupLevel+1,i._groupCriteria=this._groupCriteria,i._preDefGroups=this._preDefGroups,i._groupLevel<i._groupCriteria.length&&(i._groupMembers={},i._groupList=[],i._groupView=[]),i._groupRows=this._groupRows,i._setParent(this),i._sortingDefs=this._sortingDefs,this._groupMembers[e]=i,this._groupList.push(e),this._groupRows[i._groupRowId]=i,this._hidden||(i._isHeaderRowShown()&&this._groupView.push(i._groupRowId),this._groupViewDirty=!0,i._beingAdded=!0,this._dispatch("groupAdded",{dataView:this,newGroup:i}),i._beingAdded=!1),i.listen("groupAdded",this._onGroupAdded),this._hasListener("beforeGroupAdded")&&i.listen("beforeGroupAdded",this._onBeforeGroupAdded),i},dt.prototype._triggerGroupRefreshing=function(){this._groupLevel>0?this._parent&&this._parent._triggerGroupRefreshing():this._groupRows&&!this._refreshTimerId&&(this._refreshTimerId=setTimeout(this._onRefreshTimeout,100))},dt.prototype._rebuildRowIdsFromChildren=function(){if(this._groupViewDirty){if(this._rids.length=0,this._groupView&&(this._groupView.length=0),!this._hidden){let t=this._groupList.length;for(let i=0;i<t;++i){let t=this._groupList[i],o=this._groupMembers[t];if(o._rebuildRowIdsFromChildren(),e.pushArrayItems(this._rids,o._rids),!this._collapsed&&this._groupView&&(o._isHeaderRowShown()&&this._groupView.push(o._groupRowId),!o._collapsed)){let t=o._getFirstHiddenRids()||o._groupView||o._rids;e.pushArrayItems(this._groupView,t),e.pushArrayItems(this._groupView,o._footerRowIds)}}}this._groupViewDirty=!1,this._updatePageCount()||this._transformView()}},dt.prototype._resolveGroupId=function(t){return this._groupCriteria[this._groupLevel](t)},dt.prototype._markColumnStatsDirty=function(){for(let t in this._columnStats)this._columnStats[t].markDirty()},dt._defaultFilterLogic=function(t,e,i,o){return o[t]===e},dt._defaultGroupSortingLogic=function(t,e){return t==e?0:t<e?-1:1};const ct=dt;let gt=function(t,e,i){this._onConflated=this._onConflated.bind(this),this._data=[],"function"==typeof t?this.setFunction(t,i):"function"==typeof e&&this.setFunction(e,i),"number"==typeof e?this.setConflatingTime(e):"number"==typeof t&&this.setConflatingTime(t)};gt.prototype._data,gt.prototype._func=null,gt.prototype._delay=0,gt.prototype._timerId=0,gt.prototype._conflated=!1,gt.prototype._disabled=!1,gt.prototype.reset=function(){return this._timerId&&(clearTimeout(this._timerId),this._timerId=0),this.popAllData()},gt.prototype.popAllData=function(){if(this._data.length){let t=this._data;return this._data=[],t}return null},gt.prototype.dispose=function(){this._timerId&&(clearTimeout(this._timerId),this._timerId=0),this._data.length&&(this._data.length=0),this._func=null},gt.prototype.conflate=function(t){return!this._disabled&&(null!=t&&this._data.push(t),!this._conflated&&(this._timerId||(this._timerId=setTimeout(this._onConflated,this._delay)),!0))},gt.prototype.isConflating=function(){return this._timerId>0&&!this._conflated&&!this._disabled},gt.prototype._onConflated=function(){this._conflated=!0;try{this._func()}catch(t){console.error(t.message||t)}this._timerId=0,this._data.length=0,this._conflated=!1},gt.prototype.getData=function(){return this._data},gt.prototype.setFunction=function(t,e){this._func=t,this._func=t?e?t.bind(e):t:null},gt.prototype.setConflatingTime=function(t){this._delay=t||0,this._delay<0&&(this._delay=0)},gt.prototype.disable=function(t){this._disabled=!1!==t},gt.prototype.isEnabled=function(){return!this._disabled},gt.prototype.enable=function(t){this._disabled=!1===t},gt._proto=gt.prototype;const ft=gt;let yt=function(t){let e=this;e._onDataChanged=e._onDataChanged.bind(e),e.extendEventArg=e.extendEventArg.bind(e),e._dataChangedConflator=new ft(100,e._onDataChanged),e._grid=t,e._grid.setEventArgExtender("rowCountChanged",e.extendEventArg),e._grid.setEventArgExtender("rowHeightChanged",e.extendEventArg),e._grid.setEventArgExtender("rowAvailable",e.extendEventArg),e._grid.listen("rowAvailable",e._dispatch.bind(this,"rowAvailable")),e._addEvent("dataChanged"),e._addEvent("rowAvailable")};l.inherits(yt,r),yt._runningId=0,yt.prototype._id="",yt.prototype._type="",yt.prototype._grid=null,yt.prototype._snapshot=null,yt.prototype._dataView=null,yt.prototype._dataArg=null,yt.prototype._autoSyncRowCount,yt.prototype._bindingEnabled=!0,yt.prototype._parent=null,yt.prototype._children=null,yt.prototype._dataChangedConflator,yt.prototype.getId=function(){return this._id},yt.prototype.setId=function(t){return this._id=t||"section"+yt._runningId++,this._grid.setAttribute("id",this._id),this._id},yt.prototype.getSection=function(){return this._snapshot||this._grid},yt.prototype.getSectionName=function(){return this._grid.getId()},yt.prototype.getIndex=function(){return this._grid.getIndex()},yt.prototype.getType=function(){return this._type},yt.prototype.setType=function(t){this._type!==t&&(this._type&&this._grid.removeClass(this._type),this._type=t||"",t&&this._grid.addClass(t))},yt.prototype.getDataSource=function(){return this._dataView},yt.prototype.setDataSource=function(t){let e=this;e.getAutoSyncRowCount()&&e._dataView!==t&&(e._dataView&&e._dataView.unlisten("dataChanged",this._onDataChanged),e._dataChangedConflator.reset(),e._dataArg=null,e._dataView=t,null!==e._dataView&&e._dataView.listen("dataChanged",e._onDataChanged),e._dispatchDataChanged(0,NaN))},yt.prototype.getRootDataSource=function(){if(!this._dataView)return null;let t=this._dataView.getDataSource();if(!t)return null;for(;t.getDataSource();)t=t.getDataSource();return t},yt.prototype.getData=function(t,e){return this._dataView?(e=this._getRowId(e),this._dataView.getData(e,t)):null},yt.prototype.setData=function(t,e,i){return!!this._dataView&&(e=this._getRowId(e),this._dataView.setData(e,t,i),!0)},yt.prototype.getRowData=function(t){return this._dataView?(t=this._getRowId(t),this._dataView.getRowData(t)):null},yt.prototype.removeRowData=function(t){if(!this._dataView)return!1;let e=this.getRootDataSource();if(!e)return!1;t=this._getRowId(t);let i=e.getRowIndex(t);return!(i<0||(e.removeRow(i),0))},yt.prototype.activateColumns=function(t,e,i){if("content"===this._type)for(let o=i+1;--o>=e;){let e=t[o];null!=e&&this._grid.activateColumn(o,e)}},yt.prototype.getChildren=function(){return this._children},yt.prototype.setParent=function(t){if(this._parent){let t=this._parent._children.indexOf(this);t>=0&&(this._parent._children.splice(t,1),this._parent._children.length<=0&&(this._parent._children=null)),this._parent=null}this._parent=t,this._parent&&(this._parent._children||(this._parent._children=[]),this._parent._children.push(this))},yt.prototype.getParent=function(){return this._parent},yt.prototype.getDataChangedConflator=function(){return this._dataChangedConflator},yt.prototype.disableConflation=function(t){this._dataChangedConflator.disable(t)},yt.prototype.disableDataBinding=function(t){this._bindingEnabled=!1===t},yt.prototype.getAutoSyncRowCount=function(){return null!=this._autoSyncRowCount?this._autoSyncRowCount:"content"===this._type},yt.prototype.setAutoSyncRowCount=function(t){if(this._autoSyncRowCount=t,this.getAutoSyncRowCount()){let t=this._dataView?this._dataView.getVisibleRowCount():0;this._grid.setRowCount(t)}},yt.prototype.isDataBindable=function(){return!(!this._bindingEnabled||!this._dataView)},yt.prototype.dispose=function(){let t=this;t._dataChangedConflator.reset(),t._dataArg=null,t._grid&&t._grid.dispose(),t._dataView&&t._dataView.unlisten("dataChanged",t._onDataChanged),t.unlistenAll(),t.setParent(null),t._grid=null,t._dataView=null},yt.prototype.extendEventArg=function(t){return t||(t={}),t.sectionSettings!==this&&(t.sectionSettings=this,t.section=this._snapshot||this._grid,t.sectionName=this._grid.getId(),t.sectionIndex=this._grid.getIndex(),t.sectionType=this._type,t.dataSource=this._dataView,this._snapshot?t.print=!0:t.print&&(t.print=!1)),t},yt.prototype.extendRenderEventArg=function(t,e,i){return t=this.extendEventArg(t),e>=0||(this._snapshot?(e=0,i=this._grid.getRowCount()):(e=this._grid.getFirstIndexInView(),i=this._grid.getLastIndexInView()+1)),t.fromRowIndex=e,t.toRowIndex=i,t},yt.prototype.extendDataEventArg=function(t,e,i){let o,n;if(t||(t={}),t.firstUpdate=e,t.lastUpdate=i,this._snapshot?(o=0,n=this._grid.getRowCount()):(o=this._grid.getFirstIndexInView(),n=this._grid.getLastIndexInView()+1),t.fromRowIndex=e>o?e:o,this._dataView){let e=this._dataView.getVisibleRowCount();t.dataRowCount=e,n>e&&(n=e)}return t.toRowIndex=i+1<n?i+1:n,this.extendEventArg(t),t},yt.prototype.setIndex=function(t){this._grid.setIndex(t)},yt.prototype.getRowOffset=function(){return this._grid.getRowOffset()},yt.prototype.setRowOffset=function(t){this._grid.setRowOffset(t)},yt.prototype.enableColumnVirtualization=function(t){t=!1!==t,"content"===this._type&&this._grid.enableColumnVirtualization(t)},yt.prototype.isBinding=function(){return this._isEventDispatching("dataChanged")},yt.prototype._onDataChanged=function(t){if(!this.isBinding()){if(this._bindingEnabled){if(t)this._mergeEvent(t);else if(!this._dataArg)return}else if(!this.getAutoSyncRowCount())return;this._dataChangedConflator.conflate()||(this._calculateChangeIndices(),this._dataArg?this._dispatchDataChanged(this._dataArg.firstUpdate,this._dataArg.lastUpdate):this._dispatchDataChanged(0,NaN))}},yt.prototype._dispatchDataChanged=function(t,e){let i=this.getAutoSyncRowCount(),o=this._dataView?this._dataView.getVisibleRowCount():0,n=this._grid.getRowCount();i?o!==n&&this._grid.setRowCount(o,!0):o>n&&(e=n-1),this.updateRowData(t,e,this._dataArg),this._dataArg=null},yt.prototype.updateRowData=function(t,e,i){this.isDataBindable()&&(this._grid._getTempRowHeights()&&(t=this._grid.getFirstIndexInView(),e=this._grid.getLastIndexInView()+1),(i=this.extendDataEventArg(i,t,e)).fromRowIndex<i.toRowIndex&&this._dispatch("dataChanged",i))},yt.prototype.rerender=function(){this.isDataBindable()?this.updateRowData():this._dispatch("rowAvailable",this.extendEventArg())},yt.prototype.snapshot=function(t){if(t){this._snapshot=t;try{t.setColumnCount(this._grid.getColumnCount()),t.setRowCount(this._grid.getRowCount()),this._dispatch("rowAvailable",this.extendEventArg())}catch(t){console.warn("Unable to take a snapshot: "+t.message)}this._snapshot=null,this._dispatch("rowAvailable",this.extendEventArg())}},yt.prototype._getRowId=function(t){return e.isNumber(t)?this._dataView.getRowId(t):t},yt.prototype._mergeEvent=function(t){let e=this._dataArg;if(e||(e=this._dataArg={},e.actualUpdate=!0,e.positionChangeOnly=!0,e.events=[],e.firstUpdate=NaN,e.lastUpdate=NaN,e.updatedRids={}),t.positionChangeOnly||(e.positionChangeOnly=!1),t.events?e.events=e.events.concat(t.events):e.events.push(t),e.globalChange)return;if(t.globalChange)return e.globalChange=!0,e.firstUpdate=0,void(e.lastUpdate=NaN);let i=t.rids;if(i)for(let t=i.length;--t>=0;)e.updatedRids[i[t]]=!0;else t.rid&&(e.updatedRids[t.rid]=!0);"updated"!==t.type&&(e.indexShifted=!0,"removed"===t.type&&(e.dataRemoved=!0))},yt.prototype._calculateChangeIndices=function(){if(!this.isDataBindable()||this._dataArg.globalChange)return;let t,e;if(this._dataArg.indexShifted){if(this._dataArg.dataRemoved)this._dataArg.firstUpdate=0;else for(t in this._dataArg.updatedRids)e=this._dataView.getRowIndex(t),e>=0&&(this._dataArg.firstUpdate<=e||(this._dataArg.firstUpdate=e));this._dataArg.lastUpdate=this._dataView.getVisibleRowCount()}else for(t in this._dataArg.updatedRids)e=this._dataView.getRowIndex(t),e>=0&&(this._dataArg.firstUpdate<=e||(this._dataArg.firstUpdate=e),this._dataArg.lastUpdate>=e||(this._dataArg.lastUpdate=e))},yt._proto=yt.prototype;const mt=yt;let Ct=function(t){this._layout=t,this._arg={},this._addEvent("indexChanged")};l.inherits(Ct,r),Ct.prototype._layout,Ct.prototype._viewSize=0,Ct.prototype._viewOffset=0,Ct.prototype._startOffsetCount=0,Ct.prototype._endOffsetCount=0,Ct.prototype._bufferSize=0,Ct.prototype._arg=null,Ct.prototype._enabled=!0,Ct.prototype._active=!0,Ct.prototype._virtualizable=!1,Ct.prototype._getMinIndex=function(){return this._startOffsetCount},Ct.prototype._getMaxIndex=function(){let t=this._layout.getLaneCount()-this._endOffsetCount;return t>this._startOffsetCount?t:this._startOffsetCount},Ct.prototype.getContentStart=function(t){return this._layout.getLaneStart(t)},Ct.prototype.getContentInViewCount=function(){let t=this.getFirstIndexInView(),e=this.getLastIndexInView();return t>=0&&t<e?e-t+1:0},Ct.prototype._getContentSizeInBounds=function(){let t=this._getMinIndex(),e=this._getMaxIndex();return this._layout.getLaneStart(e)-this._layout.getLaneStart(t)},Ct.prototype.getViewSize=function(){return this._viewSize},Ct.prototype.getViewOffset=function(){let t=this._getMinIndex();return this._viewOffset+this._layout.getLaneStart(t)},Ct.prototype.getIndexOffset=function(){return this._startOffsetCount},Ct.prototype.isVirtualizable=function(){return this._virtualizable},Ct.prototype.getFirstIndexInView=function(){if(!this._virtualizable)return 0;let t=this.getViewOffset(),e=this._layout.getTrackSize();return t>=e&&(t=e-this._viewSize),t<0?0:this._layout.hitTest(t)},Ct.prototype.getLastIndexInView=function(){if(this._virtualizable){let t=this.getViewOffset()+this._viewSize,e=this._getMaxIndex();return t>=this._layout.getLaneStart(e)?e-1:this._layout.hitTest(t)}return this._layout.getLaneCount()-1},Ct.prototype.getPrevFirstIndexInView=function(){return null!=this._arg.prevFirstIndex?this._arg.prevFirstIndex:-1},Ct.prototype.getPrevLastIndexInView=function(){return null!=this._arg.prevLastIndex?this._arg.prevLastIndex:-1},Ct.prototype.update=function(t){if(!(!0===t||this._enabled&&this._active))return!1;if(this._isEventDispatching("indexChanged"))return!1;let e=this.getFirstIndexInView(),i=this.getLastIndexInView(),o=this._arg.prevFirstIndex!==e||this._arg.prevLastIndex!==i;return(t||o)&&(this._arg.firstIndex=e,this._arg.lastIndex=i,this._dispatch("indexChanged",this._arg),this._arg.prevFirstIndex=e,this._arg.prevLastIndex=i),o},Ct.prototype.isEnabled=function(){return this._enabled},Ct.prototype.enable=function(t){t=!1!==t,this._enabled!==t&&(this._enabled=t,this.validateVirtualization(),this.update(!0))},Ct.prototype.disable=function(t){this.enable(!1===t)},Ct.prototype.isActive=function(){return this._active},Ct.prototype.activate=function(t){t=!1!==t,this._active!==t&&(this._active=t,this.validateVirtualization(),this.update(!0))},Ct.prototype.deactivate=function(t){this.activate(!1===t)},Ct.prototype.getBufferSize=function(){return this._bufferSize},Ct.prototype.setContentLayout=function(t){this._layout!==t&&(this._layout=t,this.validateVirtualization())},Ct.prototype.setViewSize=function(t){t<0&&(t=0),this._viewSize!==t&&(this._viewSize=t,this.validateVirtualization())},Ct.prototype.setViewOffset=function(t){this._viewOffset=t>0?t:0,this.update()},Ct.prototype.setViewBounds=function(t,e){this._startOffsetCount=t>0?t:0,this._endOffsetCount=e>0?e:0,this.validateVirtualization()},Ct.prototype.setBufferSize=function(t){t<0&&(t=0),this._bufferSize!==t&&(this._bufferSize=t,this.validateVirtualization())},Ct.prototype.validateVirtualization=function(){this._virtualizable=!1,this._enabled&&this._active&&this._viewSize>0&&this._getContentSizeInBounds()>this._viewSize&&(this._virtualizable=!0)},Ct._proto=Ct.prototype;const St=Ct;let wt=function(){let t=this;t._vertical=!0,t._hostClassName="vscrollbar-host",wt.base(this,"constructor"),t._onScroll=t._onScroll.bind(t),t._addPaneAt(),t._element.classList.add("grid-vscroll"),t._trackContent.style.width="1px",t.disableMouseWheel(!1),t.listen("scroll",t._onScroll),t._addEvent("contentScrolled")};l.inherits(wt,M),wt.prototype.setScrollContent=function(t,e,i){this._clearAllPanes();let o,n=e.length;if(n<=0)return;let s=this._panes[0],r=this._paneSliders[0],l=0;for(;l<i;)o=e[l++],o.setParent(t);s.setParent(t);let h=n-this._footerCount;for(;l<h;)o=e[l++],o.setParent(r);for(;l<n;)o=e[l++],o.setParent(t);this.invalidateContent()},wt.prototype.setHeight=function(t){return this.setTrackSize(t,t),!0},wt.prototype.getHeight=function(){return this.getPaneSize()},wt.prototype.getScrollTop=function(){return this._getScrollValue()},wt.prototype.setScrollTop=function(t){this.update(),this._scrollTo(t)},wt.prototype.isEndOfVerticalScroll=function(){return this._isEndOfScroll()},wt.prototype.getContentHeight=function(){let t=this._paneSliders[0].getContent(!0),e=0;for(let i=t.length;--i>=0;)e+=t[i].offsetHeight;return e},wt.prototype.calculateContentSize=function(){return this.getContentHeight()},wt.prototype.getPane=function(){return this._panes[0]},wt.prototype._onScroll=function(t){this._dispatch("contentScrolled",t)},wt._proto=wt.prototype;const bt=wt;let vt=function(t){let e=this;e._onRestingPosition=e._onRestingPosition.bind(e),e._updateRowBounds=e._updateRowBounds.bind(e),e._element=document.createElement("div"),e._element.className="tr-vlg section",t||(t={}),t.horizontalScrollbar&&(e._hscrollbar=t.horizontalScrollbar),t.owner=this,e._grid=new N(t),e._grid.setParent(e._element),e._layoutY=new g,e._selectionList=new T,e._reverter=new E(e._onRestingPosition,200),e._addEvent("rowHighlighted"),e._addEvent("rowCountChanged"),e._addEvent("rowHeightChanged"),e._addEvent("rowAvailable")};l.inherits(vt,u),vt.prototype._index=-1,vt.prototype._rowOffset=0,vt.prototype._firstIndex=0,vt.prototype._grid,vt.prototype._layoutY,vt.prototype._selectionList=null,vt.prototype._reverter=null,vt.prototype._rowBounds=null,vt.prototype._rowBoundCache=null,vt.prototype._rowSelDirty=!1,vt.prototype._cellBoundPainter=null,vt.prototype._rowBoundTimer=0,vt.prototype._boundLayer=null,vt.prototype._hscrollbar=null,vt.prototype._session="A",vt.prototype._tempRowHeights=null,vt.prototype.getWidth=function(){return this.isVisible()?this._grid.getWidth():0},vt.prototype.getHeight=function(){return this.isVisible()?this._element.offsetHeight:0},vt.prototype.dispose=function(){this.setRowCount(0),this.unlistenAll(),this._hscrollbar=null,this._grid.dispose(),this._dispose(),this._reverter.dispose(),this._rowBounds=this._rowBoundCache=null,this._rowSelDirty=!1,this._rowBoundTimer&&(clearTimeout(this._rowBoundTimer),this._rowBoundTimer=0),this._cellBoundPainter&&this._cellBoundPainter.dispose()},vt.prototype.setWidth=function(t){return this._grid.setWidth(t)},vt.prototype.setHeight=function(t){return!1},vt.prototype.show=function(t){this._element.style.display=!1!==t?"":"none",this._dispatchRowHeightChangedEvent(0,this._layoutY.getLaneCount())},vt.prototype.hitTest=function(t,e){let i=[];return i.colIndex=this._grid.hitTestX(t),i.rowIndex=this._layoutY.hitTest(e),i},vt.prototype.hitTestX=function(t){return this._grid.hitTestX(t)},vt.prototype.hitTestY=function(t){return this._layoutY.hitTest(t)},vt.prototype.getDefaultColumnWidth=function(){return this._grid.getDefaultColumnWidth()},vt.prototype.setDefaultColumnWidth=function(t){this._grid.setDefaultColumnWidth(t)},vt.prototype.getDefaultRowHeight=function(){return this._layoutY.getDefaultLaneSize()},vt.prototype.setDefaultRowHeight=function(t){this._layoutY.getDefaultLaneSize()!==t&&(this._layoutY.setDefaultLaneSize(t),this._element.style.height=this._layoutY.getTrackSize()+"px",this._grid.setDefaultRowHeight(t),this._dispatchRowHeightChangedEvent(0,this._layoutY.getLaneCount()))},vt.prototype.getColumnWidth=function(t){return this._grid.getColumnWidth(t)},vt.prototype.setColumnWidth=function(t,e){return this._grid.setColumnWidth(t,e)},vt.prototype._setColumnWidth=function(t,e){return this._grid._setColumnWidth(t,e)},vt.prototype._updateColumnLayout=function(){this._grid._updateColumnLayout()},vt.prototype._startBindingSession=function(t){if(this._isBinding=t,!t){if(this._tempRowHeights){let t=this.getDefaultRowHeight(),e=!0,i=[];for(let e in this._tempRowHeights){let o=+e,n=this._layoutY.getLaneProperty(o,"sizeSession");n&&n!=this._session&&(this.setRowHeight(o,t),this._layoutY.setLaneProperty(o,"sizeSession",null),i.push(o))}let o=i.length;for(let t=0;t<o;t++)delete this._tempRowHeights[i[t]];if(o)for(let t in this._tempRowHeights){e=null!=t;break}e||(this._tempRowHeights=null)}this._session="A"===this._session?"B":"A"}},vt.prototype._getTempRowHeights=function(){return this._tempRowHeights},vt.prototype.getRowHeight=function(t){return this._layoutY.getLaneSize(t)},vt.prototype.setRowHeight=function(t,e){return this._isBinding&&e!=this.getDefaultRowHeight()&&(this._layoutY.setLaneProperty(t,"sizeSession",this._session),this._tempRowHeights||(this._tempRowHeights=[]),this._tempRowHeights[t]=!0),!!this._layoutY.setLaneSize(t,e)&&(this._grid.setRowHeight(t-this._firstIndex,e),this._element.style.height=this._layoutY.getTrackSize()+"px",this._requestUpdatingRowBounds(),this._dispatchRowHeightChangedEvent(t,t+1))},vt.prototype.isColumnVisible=function(t){return this._grid.isColumnVisible(t)},vt.prototype.hideColumn=function(t,e){return this._grid.hideColumn(t,e)},vt.prototype.isRowVisible=function(t){return this._grid.isRowVisible(t-this._firstIndex)},vt.prototype.hideRow=function(t,e){return this._grid.hideRow(t-this._firstIndex,e)},vt.prototype.getMinimumColumnWidth=function(t){return this._grid.getMinimumColumnWidth(t)},vt.prototype.setMinimumColumnWidth=function(t,e){return this._grid.setMinimumColumnWidth(t,e)},vt.prototype.getMinimumRowHeight=function(t){return this._layoutY.getMinimumLaneSize(t)},vt.prototype.setMinimumRowHeight=function(t,e){return!1},vt.prototype.getCellLeft=function(t){return this._grid.getCellLeft(t)},vt.prototype.getCellTop=function(t){return this._layoutY.getLaneStart(t)},vt.prototype.getCellWidth=function(t,e){return this._grid.getCellWidth(t,0)},vt.prototype.getCellHeight=function(t,e){return this._layoutY.getLaneSize(e)},vt.prototype.hasCellSpan=function(){return this._grid.hasCellSpan()},vt.prototype.getCellRowSpan=function(t,e){return this._grid.getCellRowSpan(t,e-this._firstIndex)},vt.prototype.setCellRowSpan=function(t,e,i){return this._grid.setCellRowSpan(t,e-this._firstIndex,i)},vt.prototype.getCellColSpan=function(t,e){return this._grid.getCellColSpan(t,e-this._firstIndex)},vt.prototype.setCellColSpan=function(t,e,i){return this._grid.setCellColSpan(t,e-this._firstIndex,i)},vt.prototype.clearCellSpans=function(){return this._grid.clearCellSpans()},vt.prototype.clearColumnSpans=function(t){return this._grid.clearColumnSpans(t)},vt.prototype.clearColumnCustomizations=function(){this._grid.clearColumnCustomizations()},vt.prototype.clearRowCustomizations=function(){this._layoutY.clearLaneCustomizations(),this._grid.clearRowCustomizations()},vt.prototype.getColumnScalability=function(t){return this._grid.getColumnScalability(t)},vt.prototype.setColumnScalability=function(t,e){return this._grid.setColumnScalability(t,e)},vt.prototype.getRowScalability=function(t){return this._layoutY.getLaneScalability(t)},vt.prototype.setRowScalability=function(t,e){return!1},vt.prototype.getCell=function(t,e,i){return this._grid.getCell(t,e-this._firstIndex,i)},vt.prototype.getCellContent=function(t,e){return this._grid.getCellContent(t,e-this._firstIndex)},vt.prototype.setCellContent=function(t,e,i){return this._grid.setCellContent(t,e-this._firstIndex,i)},vt.prototype.getColumnCount=function(){return this._grid.getColumnCount()},vt.prototype.setColumnCount=function(t){this._grid.setColumnCount(t)},vt.prototype.getRowCount=function(){return this._layoutY.getLaneCount()},vt.prototype.setRowCount=function(t,e){let i=this._layoutY.getLaneCount();i!==t&&(this._layoutY.setLaneCount(t),this._tempRowHeights&&(this._tempRowHeights.length=t),this._element.style.height=this._layoutY.getTrackSize()+"px",this._requestUpdatingRowBounds(),this._dispatch("rowCountChanged",{rowCount:t,prevCount:i,noBinding:e}))},vt.prototype.getVisibleRowCount=function(){return this.getRowCount()},vt.prototype.addRow=function(t){t<=0||(this._grid.getColumnCount()<=0?console.log("WARNING: Row cannot be added, unless at least one column is added"):this.setRowCount(this._layoutY.getLaneCount()+t))},vt.prototype.removeRow=function(t){if(t<=0)return;let e=this._layoutY.getLaneCount();t>e&&(t=e),this.setRowCount(e-t)},vt.prototype.setBorders=function(t,e,i,o){this._grid.setBorders(t,e,i,o)},vt.prototype.getColumnStyle=function(t,e){return this._grid.getColumnStyle(t,e)},vt.prototype.setColumnStyle=function(t,e,i){this._grid.setColumnStyle(t,e,i)},vt.prototype.enableColumnClass=function(t,e,i){this._grid.enableColumnClass(t,e,i)},vt.prototype.hasColumnClass=function(t,e){return this._grid.hasColumnClass(t,e)},vt.prototype.enableRowClass=function(t,e,i){this._grid.enableRowClass(t-this._firstIndex,e,i)},vt.prototype.setRowStyle=function(t,e,i,o){this._grid.setRowStyle(t-this._firstIndex,e,i,o)},vt.prototype.getContentWidth=function(){return this._grid.getContentWidth()},vt.prototype.getContentHeight=function(){return this._layoutY.getTrackSize()},vt.prototype.getCellsByRowIndex=function(t){return this._grid.getCellsByRowIndex(t-this._firstIndex)},vt.prototype.disableHorizontalGridLine=function(t){this._grid.disableHorizontalGridLine(t)},vt.prototype.disableVerticalGridLine=function(t){this._grid.disableVerticalGridLine(t)},vt.prototype.enableShading=function(t){this._grid.enableShading(t)},vt.prototype.setTransposedShading=function(t){this._grid.setTransposedShading(t)},vt.prototype.enableRowHighlighting=function(t){this._grid.enableRowHighlighting(t)},vt.prototype.getRowHighlight=function(){let t=this._grid.getRowHighlight();return t>=0&&(t+=this._firstIndex),t},vt.prototype.setRowHighlight=function(t){let e=this._grid.getRowHighlight();this._grid.setRowHighlight(t-this._firstIndex),this._hasListener("rowHighlighted")&&(t=this._grid.getRowHighlight(),this._dispatch("rowHighlighted",{prevRowIndex:e>=0?e+this._firstIndex:e,rowIndex:t>=0?t+this._firstIndex:t}))},vt.prototype.getSelectedRows=function(){return this.getSelectedRowCount()>0?this._selectionList.getAllSelections():null},vt.prototype.getSelectedRowCount=function(){return this._selectionList.getSelectionCount()},vt.prototype.isSelectedRow=function(t){return this._selectionList.getSelection(t)},vt.prototype.setSelectedRow=function(t,e){this._selectionList.setSelection(t,e);let i=this._selectionList.getSelection(t);this._grid.setSelectedRow(t-this._firstIndex,i),i&&(this._rowSelDirty=!0,this._initBoundLayer()),this._requestUpdatingRowBounds()},vt.prototype.selectSingleRow=function(t){this._selectionList.clearAllSelections(),this._grid.clearSelectedRows(),this.setSelectedRow(t)},vt.prototype.selectRowRange=function(t,e){this._selectionList.selectRange(t,e),this._updateRowSelection(),this._rowSelDirty=!0,this._initBoundLayer(),this._requestUpdatingRowBounds()},vt.prototype.clearSelectedRows=function(){let t=this._selectionList.clearAllSelections();return this._grid.clearSelectedRows(),this._requestUpdatingRowBounds(),t},vt.prototype.getFirstSelectedRow=function(){return this._selectionList.getFirstSelectedIndex()},vt.prototype.getLastSelectedRow=function(){return this._selectionList.getLastSelectedIndex()},vt.prototype.getRowAnchor=function(){return this._selectionList.getSelectionAnchor()},vt.prototype.setRowAnchor=function(t){this._selectionList.setSelectionAnchor(t)},vt.prototype.activateColumn=function(t,e){this._grid.activateColumn(t,e)},vt.prototype.activateRows=function(t,e,i){let o=this._layoutY.getLaneCount();t||(t=this._rowOffset),e||0===e||(e=t+o),(t-=this._rowOffset)<0&&(t=0),(e-=this._rowOffset)<0&&(e=0);let n=this._getInnerRowCount(),s=this._firstIndex,r=0;r=t-(1&t),r<0?r=0:r>o&&(r=o);let l=e+(1&e)-r;l+2===n&&(l=n),l<0?l=0:l+r>o&&(l=o-r),this._firstIndex=r;let h=r+l,u=this._layoutY.getLaneStart(r),a=this._grid.getElement();a&&(a.style.transform=u?"translateY("+u+"px)":"",a.style.top="",this._reverter.start()),this._grid._onEnterDocument();let p=!1;if(l!==n){if(this._grid.setRowCount(l),l>n){let t={};t.prevRowIndex=r+n,t.rowIndex=r+l,i&&(t.noDataUpdate=!0),this._dispatch("rowAvailable",t)}p=!0}if(i){if(!p){this._grid.clearSelectedRows();let t=s+n;r<s&&s<h&&t>=h?(this.moveRowsToTop(h-s),i[0]=r,i[1]=s):s<r&&r<t&&h>=t?(this.moveRowsToTop(r-s),i[0]=t,i[1]=h):r===s&&h===t?(i[0]=0,i[1]=0):p=!0}p&&(i[0]=r,i[1]=h)}this._layoutY.isHomogeneous()||this._grid._updateRowHeights(this._layoutY,r),this._updateRowSelection()},vt.prototype.moveRowsToTop=function(t){this._grid.moveRowsToTop(t)},vt.prototype.getFirstIndexInView=function(){return this._firstIndex},vt.prototype.getLastIndexInView=function(){let t=this._firstIndex+this._getInnerRowCount()-1,e=this._grid._getContext().getDataSource(),i=e?e.getRowCount()-1:-1;return t>i?i:t},vt.prototype.isInCurrentView=function(t){return this._firstIndex<=t&&t<this._firstIndex+this._getInnerRowCount()},vt.prototype.getFrozenLayout=function(){return this._grid.getFrozenLayout()},vt.prototype.setFrozenLayout=function(t){this._grid.setFrozenLayout(t)},vt.prototype.getColumn=function(t){return this._grid.getColumn(t)},vt.prototype.insertColumn=function(t,e){return this._grid.insertColumn(t,e)},vt.prototype.removeColumnAt=function(t){return this._grid.removeColumnAt(t)},vt.prototype.moveColumn=function(t,e){this._grid.moveColumn(t,e)},vt.prototype.enableRowVirtualization=function(t){},vt.prototype.enableColumnVirtualization=function(t){this._grid.enableColumnVirtualization(t)},vt.prototype.getColumnIndex=function(t){return this._grid.getColumnIndex(t)},vt.prototype.getCellIndex=function(t,e){let i=this._grid.getCellIndex(t,e);return i<0?-1:i+this._firstIndex},vt.prototype.getIndex=function(){return this._index},vt.prototype.setIndex=function(t){this._index=t},vt.prototype.setRowOffset=function(t){this._rowOffset=t},vt.prototype.getRowOffset=function(){return this._rowOffset},vt.prototype.updateLayout=function(){this._grid.updateLayout()},vt.prototype.stretchCell=function(t,e,i,o){let n=this._grid.stretchCell(t,null!=e?e-this._firstIndex:null,i,o);if(n){let t=n.getElement();0===e?t.classList.add("top"):t.classList.remove("top")}return n},vt.prototype.unstretchCell=function(t,e){return this._grid.unstretchCell(t,null!=e?e-this._firstIndex:null)},vt.prototype.unstretchAllCells=function(){this._grid.unstretchAllCells()},vt.prototype.getStretchedCell=function(t,e){return this._grid.getStretchedCell(t,null!=e?e-this._firstIndex:null)},vt.prototype.getStretchedCells=function(){return this._grid.getStretchedCells()},vt.prototype.updateStretchedCells=function(){return this._grid.updateStretchedCells()},vt.prototype.getColumnHost=function(){return this._grid.getElement()},vt.prototype.setHidingMethod=function(t){this._grid.setHidingMethod(t)},vt.prototype.getHidingMethod=function(){return this._grid.getHidingMethod()},vt.prototype.setColumnVisibility=function(t,e,i){return this._grid.setColumnVisibility(t,e,i)},vt.prototype.getRowLayout=function(){return this._layoutY},vt.prototype.reserveRightSpace=function(t){return this._grid.reserveRightSpace(t)},vt.prototype.getReservedSpace=function(){return this._grid.getReservedSpace()},vt.prototype.getComputedStyle=function(){return this._grid.getComputedStyle()},vt.prototype.isColumnActive=function(t){return this._grid.isColumnActive(t)},vt.prototype.setRowAttributes=function(t,e){return this._grid.setRowAttributes(t,e)},vt.prototype.getContextRow=function(t){return this._grid.getContextRow(t-this._firstIndex)},vt.prototype.selectColumn=function(t,e){this._grid.selectColumn(t,e)},vt.prototype.isSelectedColumn=function(t){return this._grid.isSelectedColumn(t)},vt.prototype.selectCell=function(t,e,i){this._grid.selectCell(t,e-this._firstIndex,i)},vt.prototype.setCellBounds=function(t,e,i,o){let n=this._initBoundLayer(),s=this._cellBoundPainter;s||(s=this._cellBoundPainter=new B({boundLayer:n,layoutX:this.getHorizontalLayout(),layoutY:this._layoutY,hscrollbar:this._hscrollbar,calculateColumnBounds:this.calculateColumnBounds.bind(this)}));let r=this.getColumnCount();s.setCellBounds(t,e,i,o,r)},vt.prototype.getHorizontalLayout=function(){return this._grid.getHorizontalLayout()},vt.prototype.calculateColumnBounds=function(t,e,i,o){this._grid.calculateColumnBounds(t,e,i,o)},vt.prototype.updateColumnBounds=function(t,e,i){this._grid.updateColumnBounds(t,e,i),this._updateRowBounds()},vt.prototype.updateColumnSeparators=function(){this._grid.updateColumnSeparators()},vt.prototype._initBoundLayer=function(){let t=this._boundLayer;return t||(t=this._boundLayer=document.createElement("div"),t.className="cover-layer",this._element.appendChild(t)),t},vt.prototype._requestUpdatingRowBounds=function(){this._rowBoundTimer||(this._rowBoundTimer=setTimeout(this._updateRowBounds,10))},vt.prototype._updateRowBounds=function(){this._rowBoundTimer=0;let t=this._cellBoundPainter;if(t&&t.updateCellBounds(),!this._rowSelDirty)return;let e=this._rowBounds,i=this._rowBoundCache;e||(e=this._rowBounds=[]),i||(i=this._rowBoundCache=[]);let o=this._selectionList,n=this._layoutY.getLaneCount();o.deselectFrom(n);let s,r=o.getConnectedRanges(),l=r.length,h=null,u=null,a=e.length;for(s=l;s<a;++s)u=e[s],h=u.parentNode,h&&h.removeChild(u);if(e.length=a=l,!l)return void(o.getSelectionCount()||(this._rowSelDirty=!1));let p=0,_=0,d=0,c=!1;this._hscrollbar&&(p=this._hscrollbar.getScrollLeft(),_=this._hscrollbar.getPinnedLeftColumnCount(),d=this._hscrollbar.getPinnedRightColumnCount(),c=this._hscrollbar.isEndOfHorizontalScroll());let g=!_&&p>0,f=!d&&!c,y=this._grid._getViewSize();for(s=0;s<l;++s){let t=r[s],o=t[0],n=t[1],l=this._layoutY.getLaneStart(o),h=this._layoutY.getLaneEnd(n);u=i[s],u||(u=i[s]=document.createElement("div"),u.className="selection-bound"),u.style.top=l+"px",u.style.height=h-l+"px",u.style.width=y+"px",u.classList.toggle("no-left-bound",g),u.classList.toggle("no-right-bound",f),this._boundLayer&&(e[s]||(e[s]=u,this._boundLayer.appendChild(u)))}},vt.prototype._getInnerRowCount=function(){return this._grid.getRowCount()},vt.prototype._updateRowSelection=function(){this._grid.clearSelectedRows();let t,e=this._selectionList,i=e.getSelectionCount();if(i<=0)return;let o=this._firstIndex,n=o+this._getInnerRowCount();if(1===i)t=e.getFirstSelectedIndex(),o<=t&&t<n&&this._grid.setSelectedRow(t-o,!0);else if(i>=n-o)for(t=o;t<n;++t)e.getSelection(t)&&this._grid.setSelectedRow(t-o,!0);else{let s=e.getAllSelections();for(let e=0;e<i;++e)t=s[e],o<=t&&t<n&&this._grid.setSelectedRow(t-o,!0)}},vt.prototype._dispatchRowHeightChangedEvent=function(t,e){if(t>=e)return!1;let i={};return i.rowIndex=t,i.changeLength=e-t,this._dispatch("rowHeightChanged",i),!0},vt.prototype._onRestingPosition=function(){let t=this._grid.getElement();if(t){let e=this._layoutY.getLaneStart(this._firstIndex);t.style.transform="",t.style.top=e?e+"px":""}},vt.prototype._updateRightSpaceStyle=function(){this._grid._updateRightSpaceStyle()},vt.prototype._updateLayers=function(){this._grid._updateLayers()},vt.prototype._setContext=function(t){this._grid._setContext(t)},vt.prototype._getContext=function(){return this._grid._getContext()},vt._proto=vt.prototype;const Rt=vt;let It=function(t,e){return t-e},xt=function(){let t=document.createElement("input"),e=t.style;return e.position="absolute",e.width=e.height=e.padding=e.border="0",t.value="0",t.role="grid",t.readOnly=!0,t},Lt=function(t){if(t){if(!t.getRootNode)return document.activeElement;{let e=t.getRootNode();if(e&&e!==t)return e.activeElement||null}}return null},Dt=function(t){Dt._sectionType||(Dt._sectionType={},Dt._sectionType.title=!0,Dt._sectionType.header=!0,Dt._sectionType.content=!0,Dt._sectionType.footer=!0);let i=this;if(i.getColumnId=i.getColumnId.bind(i),i.getColumnIndex=i.getColumnIndex.bind(i),i._onMouseMove=i._onMouseMove.bind(i),i._onRowHightlighted=i._onRowHightlighted.bind(i),i._onGridClicked=i._onGridClicked.bind(i),i._onKeyDown=i._onKeyDown.bind(i),i._onWindowResize=i._onWindowResize.bind(i),i._onSectionDataChanged=i._onSectionDataChanged.bind(i),i._onRowCountChanged=i._onRowCountChanged.bind(i),i._onRowHeightChanged=i._onRowHeightChanged.bind(i),i._onRowAvailable=i._onRowAvailable.bind(i),i._onVScroll=i._onVScroll.bind(i),i._onHScroll=i._onHScroll.bind(i),i._onSyncVScroll=i._onSyncVScroll.bind(i),i._onSyncHScroll=i._onSyncHScroll.bind(i),i.updateLayout=i.updateLayout.bind(i),i._onRowRefresh=i._onRowRefresh.bind(i),i._onVScrollEnabled=i._onVScrollEnabled.bind(i),i._onVScrollDisabled=i._onVScrollDisabled.bind(i),i._onRowInViewChanged=i._onRowInViewChanged.bind(i),i._onColInViewChanged=i._onColInViewChanged.bind(i),i._updateVScrollbar=i._updateVScrollbar.bind(i),i.updateColumnBounds=i.updateColumnBounds.bind(i),i._dispatchColumnPositionChanged=i._dispatchColumnPositionChanged.bind(i),i._dispatchRowPositionChanged=i._dispatchRowPositionChanged.bind(i),i._requestScrollbarUpdate=i._requestScrollbarUpdate.bind(i),t)for(let i=t.childNodes.length;--i>=0;)e.isElement(t.childNodes[i])||t.removeChild(t.childNodes[i]);i._element=t||document.createElement("div"),i._element.classList.add("tr-grid"),i._layoutX=new g,i._layoutY=new g,i._layoutX.setDefaultLaneSize(100),i._layoutY.setDefaultLaneSize(32),i._settings=[],i._plugins={},i._columnDefs=[],i._sectionStarts=[],i._rowHeightException="title",i._rowVirtualizer=new St(i._layoutY),i._rowVirtualizer.deactivate(),i._rowVirtualizer.setViewSize(360),i._colVirtualizer=new St(i._layoutX),i._colVirtualizer.enable(!1),i._colVirtualizer.deactivate(),i._colVirtualizer.setViewSize(400),i._vscrollbar=new bt,i._vscrollbar.disable(),i._vscrollbar.setParent(i.getParent()||i.getElement()),i._vscrollbar.listen("scroll",i._onVScroll),i._vscrollbar.listen("layoutChanged",i._onVScroll),i._vscrollbar.listen("activated",i.updateLayout),i._vscrollbar.listen("deactivated",i.updateLayout),i._vscrollbar.listen("thicknessChanged",i.updateLayout),i._vscrollbar.listen("enabled",i._onVScrollEnabled),i._vscrollbar.listen("disabled",i._onVScrollDisabled),i._hscrollbar=new F,i._hscrollbar.disable(),i._hscrollbar.setParent(i.getParent()||i.getElement()),i._hscrollbar.listen("scroll",i._onHScroll),i._hscrollbar.listen("layoutChanged",i._onHScroll),i._hscrollbar.listen("activated",i.updateLayout),i._hscrollbar.listen("deactivated",i.updateLayout),i._hscrollbar.setOtherScrollbar(i._vscrollbar),i._vscrollbar.setOtherScrollbar(i._hscrollbar),i._element.addEventListener("keydown",i._onKeyDown),e.isMobile||e.isTouchDevice?i._element.addEventListener("touchmove",i._onMouseMove,!1):i._element.addEventListener("mousemove",i._onMouseMove,!1),e.isSafari&&i._element.addEventListener("click",i._onGridClicked),window.addEventListener("resize",i._onWindowResize,!1),i._rowVirtualizer.listen("indexChanged",i._onRowInViewChanged),i._colVirtualizer.listen("indexChanged",i._onColInViewChanged),i._rowHeightConflator=new ft(i._onRowHeightChanged,50),i._vScrollbarConflator=new ft(i._updateVScrollbar,200),i._columnBoundConflator=new ft(i.updateColumnBounds,10),i._columnPositionConflator=new ft(i._dispatchColumnPositionChanged,10),i._rowPositionConflator=new ft(i._dispatchRowPositionChanged,10),i._firstHiddenInput=xt(),i._firstHiddenInput.className="first-input",i._lastHiddenInput=xt(),i._lastHiddenInput.className="last-input",i._element.insertBefore(i._firstHiddenInput,i._element.firstChild),i._element.appendChild(i._lastHiddenInput),i._addEvents("sectionAdded","columnAdded","columnRemoved","columnMoved","columnVisibilityChanged","columnAlignmentChanged","widthChanged","dataSourceChanged","postDataSourceChanged","preSectionRender","postSectionRender","beforeContentBinding","preSectionDataBinding","postSectionDataBinding","firstRendered","afterContentBinding","rowExpansionBinding","rowHighlighted","preForcedUpdate","rowAdded","rowRemoved","columnPositionChanged","rowPositionChanged","beforeColumnBoundUpdate","beforeBatchOperation","afterBatchOperation","pinningChanged","tabNavigation");let o=Dt.map;o||(o={},Dt.map=o),i._element._control=i;let n=i._element.id||i._element.name;n&&!o[n]||(n="_grid"+Dt._runningGridId),i._id=n,o[n]=i,Dt._runningGridId++,Object.defineProperty(i,"zoomFactor",{set:function(t){!t||t<0||this._zoomFactor!==t&&(this._zoomFactor=t,i._updateLayout())},get:function(){return this._zoomFactor}})};l.inherits(Dt,u),Dt.SectionReference,Dt.MouseInfo,Dt.BatchInfo,Dt.CellReference,Dt.ColumnOptions,Dt._runningGridId=0,Dt._runningColumnId=0,Dt._sectionType,Dt.prototype._plugins,Dt.prototype._dataSource=null,Dt.prototype._layoutX,Dt.prototype._layoutY,Dt.prototype._vscrollbar,Dt.prototype._hscrollbar,Dt.prototype._tempFrozenSectionRef="",Dt.prototype._startVScrollbarIndex=-1,Dt.prototype._hScrollbarEnabled=!0,Dt.prototype._pinnedLeftColumnCount=0,Dt.prototype._pinnedRightColumnCount=0,Dt.prototype._frozenFooterCount=0,Dt.prototype._fixFrozenTopSections=!1,Dt.prototype._fixFrozenBottomSection=!1,Dt.prototype._sectionStarts,Dt.prototype._settings,Dt.prototype._firstSettings,Dt.prototype._lastSettings,Dt.prototype._fitContentWidth=!1,Dt.prototype._columnDefs,Dt.prototype._rowVirtualizer,Dt.prototype._colVirtualizer,Dt.prototype._autoSetDataSource=!0,Dt.prototype._renderingHandler=null,Dt.prototype._dataBindingHandler=null,Dt.prototype._frozenLayout=!1,Dt.prototype._noBinding=!1,Dt.prototype._rowHeightSync=!0,Dt.prototype._rowHighlighting=!1,Dt.prototype._dispatchingDataChanged=!1,Dt.prototype._rowHeightException="",Dt.prototype._rowScrollingStep=0,Dt.prototype._zoomFactor=1,Dt.prototype._reservedSpace=0,Dt.prototype._hidingMethod="",Dt.prototype._rowHeightConflator=null,Dt.prototype._vScrollbarConflator=null,Dt.prototype._columnBoundConflator=null,Dt.prototype._rowRefreshTimer=0,Dt.prototype._layoutUpdating=!1,Dt.prototype._firstHiddenInput,Dt.prototype._lastHiddenInput,Dt.prototype._bottomPadding=6,Dt.prototype._bottomPaddingSect=null,Dt.prototype._preserveProportion=!1,Dt.prototype._preserveGridSize=!1,Dt.prototype._rowHeightTimerId=0,Dt.prototype._groupDefs=null,Dt.prototype._batches=null,Dt.prototype._firstRendered=!1,Dt.prototype._hasPendingRowChange=!1,Dt.getVersion=function(){return"5.2.2"},Dt.prototype.dispose=function(){let t=this._id,e=Dt.map;if(!e[t])return void console.log("WARNING: Core grid is disposed twice");e[t]=null,this._disposed=!0,this._rowRefreshTimer&&(clearTimeout(this._rowRefreshTimer),this._rowRefreshTimer=0),this.unlistenAll(),window.removeEventListener("resize",this._onWindowResize,!1);for(let t=this._columnDefs.length;--t>=0;){let e=this._getColumnDef(t);e.renderingHandler=e.dataBindingHandler=null}for(let t in this._plugins){let e=this._plugins[t];e.unload&&e.unload(this)}this.removeAllSections();let i=this._vscrollbar._mainScrollbar;i&&(i.unlisten("scroll",this._onSyncVScroll),this._vscrollbar._mainScrollbar=null),i=this._hscrollbar._mainScrollbar,i&&(i.unlisten("scroll",this._onSyncHScroll),this._hscrollbar._mainScrollbar=null),this._vscrollbar.dispose(),this._hscrollbar.dispose(),this._rowHeightConflator.dispose(),this._vScrollbarConflator.dispose(),this._columnBoundConflator.dispose(),this._columnPositionConflator.dispose(),this._rowPositionConflator.dispose(),this._layoutX.dispose(),this._layoutY.dispose();let o=this._element;o&&(o._control&&delete o._control,o.removeChild(this._firstHiddenInput),o.removeChild(this._lastHiddenInput)),this._dispose(),this._columnDefs.length=0,delete this._plugins},Dt.prototype.isDisposed=function(){return this._disposed},Dt.prototype.setParent=function(t,e){this._setParent(t,e),this._onParentChange()},Dt.prototype.insertBefore=function(t){this._insertBefore(t),this._onParentChange()},Dt.prototype._onParentChange=function(){let t=this.getParent()||this.getElement();this._vscrollbar._mainScrollbar||this._vscrollbar.setParent(t),this._hscrollbar.setParent(t),this._updateLayout()},Dt.prototype.getConfigObject=function(t){let e=t||{},i=this.getColumnCount();e.columns||(e.columns=[]);for(let t=0;t<i;t++){let i=e.columns[t];i||(i=e.columns[t]={});let o=this._getColumnDef(t);o.userId&&(i.id=o.userId),o.field&&(i.field=o.field),o.styles&&(i.styles=o.styles),o.stationary&&(i.stationary=o.stationary),o.leftPinned&&(i.leftPinned=o.leftPinned),o.rightPinned&&(i.rightPinned=o.rightPinned),o.backgroundColor&&(i.backgroundColor=o.backgroundColor)}e.rowVirtualization=this.isRowVirtualizationEnabled(),e.columnVirtualization=this.isColumnVirtualizationEnabled(),e.rowHighlighting=this._rowHighlighting,this._fixFrozenTopSections&&(e.topFreezingCount=this._startVScrollbarIndex>=0&&this._startVScrollbarIndex+1),this._fixFrozenBottomSection&&(e.bottomFreezingCount=this._frozenFooterCount),this._rowScrollingStep&&(e.stepScroll=1===this._rowScrollingStep||this._rowScrollingStep);let o=this._vscrollbar.getAutoHide();!0!==o&&(e.autoHideScrollbar=o);let n=this._vscrollbar.getMouseWheelSpeed();n&&(e.linearWheelScrolling=n),this.hasClass("no-borders")&&(e.borders=!1),this.hasClass("no-gridlines")&&(e.gridlines=!1),this.hasClass("no-vertical-grid-line")&&(e.verticalLines=!1),this.hasClass("no-horizontal-grid-line")&&(e.horizontalLines=!1),this.hasClass("no-content-vertical-line")&&(e.contentVerticalLines=!1),this._bottomPaddingSect&&(e.contentBottomPadding=this._bottomPadding),this._reservedSpace>0&&(e.contentRightPadding=this._reservedSpace);let s=this.getDataConflationRate();s&&(e.dataConflationRate=s);for(let t in this._plugins){let i=this._plugins[t];"function"==typeof i.getConfigObject&&i.getConfigObject(e)}return e},Dt.prototype.fillParentWidth=function(t){if(this._fitContentWidth)return!1;if(this._layoutX.isFixedSize())return!1;let e=this._element,i=(0|e.getBoundingClientRect().width)-e.clientLeft;return null!==this._layoutX.setTrackSize(i-this._reservedSpace)},Dt.prototype.show=function(t){this._element.style.display=!1!==t?"":"none",!1!==t&&this.updateLayout()},Dt.prototype.getContentWidth=function(){return this._layoutX.getTrackSize()},Dt.prototype.getSectionCount=function(){return this._settings.length},Dt.prototype._updateFrozenTopSections=function(){if(!this._fixFrozenTopSections){let t=this._getTopSectionCount();this._freezeTopSectionAt(t-1)}},Dt.prototype._updateFrozenBottomSections=function(){if(!this._fixFrozenBottomSection){let t=this._getBottomSectionCount();this._setFrozenFooter(t)}},Dt.prototype._getTopSectionCount=function(){let t=this._settings,e=t.length,i=0;for(let o=0;o<e;o++){let e=t[o].getType();if("header"!==e&&"title"!==e)break;i++}return i},Dt.prototype._getBottomSectionCount=function(){let t=this._settings,e=0;for(let i=t.length-1;i>=0&&"footer"===t[i].getType();i--)e++;return e},Dt.prototype.addSection=function(t,e){return this.addSectionAt(this.getSectionCount(),t,e)},Dt.prototype.addSectionAt=function(t,e,i){let o=this._settings.length;t<0&&(t=0),t>o&&(t=o);let n=this._toSectionType(e),s="bottomPadding"===i,r=this._newSection(s?"footer":n,i);if(!r)return null;let l=r.getSection();if(s&&(r.setAutoSyncRowCount(!1),this._bottomPaddingSect=l),t>=o?(this._putToLast(l),this._settings.push(r)):(this._settings.splice(t,0,r),l.insertBefore(this._settings[t+1].getSection())),this._updateSectionIndices(t),this._autoSetDataSource&&r.setDataSource(this._dataSource),n=r.getType(),"footer"===n?this._updateFrozenBottomSections():"header"!==n&&"title"!==n||this._updateFrozenTopSections(),this._onColumnCountChanged(),this._onSectionCountChanged(!0),this._colVirtualizer.isEnabled()){let t=this._getColActivationList(),e=this.getColumnCount();r.activateColumns(t,0,e-1)}if(this._hasListener("sectionAdded")){let t=r.extendEventArg();this._dispatch("sectionAdded",t)}return l},Dt.prototype.removeSection=function(t){let e=this.getSection(t);return null!==e?this.removeSectionAt(e.getIndex()):null},Dt.prototype.removeSectionAt=function(t){let e=this._settings.length;if(t>=0&&t<e){let e=this._settings[t],i=e.getIndex(),o=e.getSection(),n=e.getType();return o.setRowCount(0),this._settings.splice(t,1),this._updateSectionIndices(i),"footer"===n?(this._updateFrozenBottomSections(),this._onColumnCountChanged()):"header"!==n&&"title"!==n||this._updateFrozenTopSections(),this._onSectionCountChanged(),e.dispose(),o}return null},Dt.prototype.removeLastSection=function(){return this.removeSectionAt(this._settings.length-1)},Dt.prototype.removeAllSections=function(){let t=this._settings.length;for(let e=0;e<t;++e)this._settings[e].dispose();this._bottomPaddingSect=null,this._firstSettings=this._lastSettings=null,this._settings.length=0,this._updateSectionIndices(0),this._onSectionCountChanged()},Dt.prototype.setBottomPaddingSection=function(t){let e=this._bottomPaddingSect;t?("number"==typeof t&&(this._bottomPadding=t),e||(e=this.addSection("content","bottomPadding")),e&&(e.setDefaultRowHeight(this._bottomPadding),e.getRowCount()||e.addRow(1))):e&&this.removeSection(e)},Dt.prototype._updatePaddingBottomSect=function(){let t=this._bottomPaddingSect;if(t){let e=this._settings.length-1;if(e>0){let o=this._settings[e];if(o.getSection()!==t){let n=null;for(let i=e;--i>=0;){let e=this._settings[i];if(e.getSection()===t){n=e;break}}if(i>=0)return this._putToLast(t),this._settings.splice(i,1),this._settings.push(n),n.setType("footer"===o.getType()?"footer":"content"),!0;this._bottomPaddingSect=null}else{let t=this._settings[e-1];t&&o.setType("footer"===t.getType()?"footer":"content")}}}return!1},Dt.prototype.moveSection=function(t,i){let o=this.getSectionCount();if(t<0)t=0;else if(t>=o)return;if(i<0?i=0:i>=o&&(i=o-1),t===i)return;let n=this._settings[t],s=this._settings[i];e.moveArrayItem(this._settings,t,i),s?n.getSection().insertBefore(s.getSection()):this._putToLast(n.getSection()),this._updateSectionIndices(t<=i?t:i),this._syncRowHeights(),this._onSectionCountChanged(),this._frozenLayout||this._rowVirtualizer.update(!0)},Dt.prototype.getSection=function(t){let e=this.getSectionSettings(t);return null!==e?e.getSection():null},Dt.prototype.getSectionSettings=function(t){if(e.isString(t)){if(Dt._sectionType[t])return this._getNextSection(1,null,t);for(let e=this._settings.length;--e>=0;)if(this._settings[e].getId()===t)return this._settings[e]}else if(null!=t){let i=-1;if(null!=t.getIndex?i=t.getIndex():e.isNumber(t)&&(i=t),i>=0&&i<this._settings.length)return this._settings[i]}return null},Dt.prototype.getAllSections=function(t){if(null==t)return this._getAllSections();let e=this.getAllSectionSettings(t),i=e;for(let t=i.length;--t>=0;)i[t]=e[t].getSection();return i},Dt.prototype.getAllSectionSettings=function(t){if(!t)return this._settings;let e=this._settings.length,i=[];t=this._toSectionType(t);for(let o=0;o<e;++o){let e=this._settings[o];t===e.getType()&&i.push(e)}return i},Dt.prototype.getSectionIndex=function(t){if(e.isNumber(t))return t;if(t instanceof MouseEvent){let i=e.getRelativePosition(t,this._element),o={};return this._hitTestY(i.y,o),o.sectionIndex}let i=this.getSection(t);return null==i?-1:i.getIndex()},Dt.prototype.getSectionTop=function(t){let e=this.getSection(t);if(null==e)return 0;let i=this._layoutY.getLaneStart(e.getRowOffset());return this._startVScrollbarIndex>=0&&e.getIndex()>=this._startVScrollbarIndex&&(i-=this._vscrollbar.getScrollTop()),i},Dt.prototype.getPreviousSection=function(t,e){null==t&&(t=this._settings.length);let i=this._getNextSection(-1,t,e);return null!==i?i.getSection():null},Dt.prototype.getNextSection=function(t,e){let i=this._getNextSection(1,t,e);return null!==i?i.getSection():null},Dt.prototype.getLastSection=function(){return this.getSection(this._settings.length-1)},Dt.prototype.getCell=function(t,e,i,o){let n=this.getSection(t);return n?n.getCell(e,i,o):null},Dt.prototype.getCellInfo=function(t){if(!t)return null;let e=t.colIndex,i=t.rowIndex,o=t.sectionName,n=null;if(null==e||null==i)n=this.getRelativePosition(t),n.hit||(n=null);else{o||(o="content");let t=this.getSectionSettings(o);t&&t.getSection().getCell(e,i)&&(n={},n.colIndex=e,n.rowIndex=i,t.extendEventArg(n))}return n},Dt.prototype.getNextCellInRow=function(t,e){return this._getNextCellInRow(t,null!=e?e:1)},Dt.prototype.getPrevCellInRow=function(t,e){return this._getNextCellInRow(t,null!=e?-e:-1)},Dt.prototype._getNextCellInRow=function(t,e){let i=this.getCellInfo(t);if(i){let t=i.colIndex+e,o=i.rowIndex,n=i.section;i.colIndex=t,i.cell=n.getCell(t,o)}return i},Dt.prototype.getNextCell=function(t){let e=this.getNextCellInRow(t);if(e&&!e.cell){let t=e.section,i=e.colIndex=0,o=e.rowIndex;e.rowIndex=++o,e.cell=t.getCell(i,o)}return e},Dt.prototype.getPrevCell=function(t){let e=this.getPrevCellInRow(t);if(e&&!e.cell){let t=e.section,i=e.colIndex=t.getColumnCount()-1,o=e.rowIndex;e.rowIndex=--o,e.cell=t.getCell(i,o)}return e},Dt.prototype.getColumnCount=function(){return this._layoutX.getLaneCount()},Dt.prototype.setColumnCount=function(t){let e=this._layoutX.getLaneCount();if(t>=e){this._layoutX.setLaneCount(t);for(let e=this._settings.length;--e>=0;)this._settings[e].getSection().setColumnCount(t);this._onColumnCountChanged(),this._syncLayoutToColumns(e,t),this._dispatchColumnAddedEvent(e,t-e,!1)}else this._removeColumn(e-t)},Dt.prototype.insertColumn=function(t,e){let i=this.getColumnCount();t<i||(t=i),this._layoutX.insertLane(t);for(let e=this._settings.length;--e>=0;)this._settings[e].getSection().insertColumn(t);this._columnDefs.splice(t,0,null),this._deserializeColumn(t,e),this._onColumnCountChanged(),this._syncLayoutToColumns(t,t+1),this._dispatchColumnAddedEvent(t,1,t<i,e)},Dt.prototype.insertColumns=function(t,e){let i=this.getColumnCount();t<i||(t=i);let o,n=0;if(Array.isArray(e)){if(n=e.length,1===n)return void this.insertColumn(t,e[0]);o=e}else{if("number"!=typeof e)return void this.insertColumn(t,e);if(n=e,1===n)return void this.insertColumn(t,null)}if(n<=0)return;let s=this.freezeLayout(),r=[t,0].concat(new Array(n));Array.prototype.splice.apply(this._columnDefs,r);for(let e=0;e<n;e++){let i=t+e;this._layoutX.insertLane(i);for(let t=this._settings.length;--t>=0;)this._settings[t].getSection().insertColumn(i);let n=o&&o[e];this._deserializeColumn(i,n)}this._dispatchColumnAddedEvent(t,n,t<i,o),this.freezeLayout(s)},Dt.prototype.removeColumnAt=function(t){let e=this.getColumnCount();if(t<0||t>=e)return null;let i=-1;this._colVirtualizer.isVirtualizable()&&(i=this._colVirtualizer.getLastIndexInView());let o=this._layoutX.removeLaneAt(t),n=this._settings.length;for(let e=0;e<n;++e)this._settings[e].getSection().removeColumnAt(t);let s=this._pinnedLeftColumnCount,r=this._pinnedRightColumnCount,l=this._columnDefs.splice(t,1)[0];if(this._onColumnCountChanged(),(t<s||t>=e-r)&&this._updateScrollbarWidth(!0,!0),this._syncLayoutToColumns(t,e-1,!0),l||(l={}),l.layout=o,this._hasListener("columnRemoved")){let e={atTheMiddle:!0};e.colIndex=t,e.columns="deprecated",e.columnData=l.columnData,e.colId=l.id||"",this._dispatchColumnEvent("columnRemoved",e)}return t<=i&&i===this._colVirtualizer.getLastIndexInView()&&this._colVirtualizer.update(),l},Dt.prototype.removeAllColumns=function(){this.getColumnCount()>0&&(this._pinnedLeftColumnCount=0,this._pinnedRightColumnCount=0,this.setColumnCount(0))},Dt.prototype.getStationaryColumnIndex=function(){for(let t=this.getColumnCount()-1;t>=0;t--)if(this._getColumnDef(t).stationary)return t;return-1},Dt.prototype.isColumnMoveAllowed=function(t,e){if(Array.isArray(t)||(t=[t]),0===t.length||null==e)return!1;let i=this.getStationaryColumnIndex();if(i>-1){if(e<=i)return!1;for(let e=0;e<t.length;e++)if(t[e]<=i)return!1}return!0},Dt.prototype.isColumnMovable=function(t){let e=this.getStationaryColumnIndex();return!(e>-1&&t<=e)},Dt.prototype.moveColumn=function(t,e){if("number"==typeof t)return this._moveColumn(t,e);if(!Array.isArray(t))return!1;let i,o=t.length,n=[],s=0,r=this.getColumnCount(),l={};for(i=0;i<o;++i)s=t[i],s>=0&&s<r&&null==l[s]&&(l[s]=1,n.push(s));if(e<0?e=0:e>=r&&(e=r-1),o=n.length,!o)return!1;if(1===o)return this._moveColumn(n[0],e);if(!this.isColumnMoveAllowed(n,e))return!1;if(n.sort(It),l[e]){let t=!0;for(s=n[0],i=1;i<o;++i)if(++s!==n[i]){t=!1;break}if(t)return!1}let h,u,a=this.freezeLayout(!0),p=0;for(i=0;i<o;++i)h=n[i],h>=e&&(u=e+p,this._moveColumn(h,u),++p);let _=o-p;for(u=p?e-1:e,i=0;i<_;++i)h=n[i]-i,this._moveColumn(h,u);return this.freezeLayout(a),!0},Dt.prototype._moveColumn=function(t,i){let o=this.getColumnCount();if(t<0?t=0:t>=o&&(t=o-1),i<0?i=0:i>=o&&(i=o-1),t===i)return!1;if(!this.isColumnMoveAllowed(t,i))return!1;let n=-1;this._colVirtualizer.isVirtualizable()&&(n=this._colVirtualizer.getLastIndexInView());let s=this.getColumnId(t);this._layoutX.moveLane(t,i);let r=this._settings.length;for(let e=0;e<r;++e)this._settings[e].getSection().moveColumn(t,i);let l=this._columnDefs[t],h=this._countPinnedLeftColumns(),u=this._countPinnedRightColumns();if(e.moveArrayItem(this._columnDefs,t,i),this._hScrollbarEnabled&&(t<h?i>=o-u?this.freezeColumn(h-2,u+1):i>=h&&this.freezeColumn(h-2,u):l.rightPinned?i<h?this.freezeColumn(h,u-1):i<o-u&&this.freezeColumn(h-1,u-1):i<h?this.freezeColumn(h,u):i>=o-u&&this.freezeColumn(h-1,u+1)),!this._frozenLayout&&this._colVirtualizer.isEnabled()){let e=this._colVirtualizer.getFirstIndexInView();t<e&&i<e||t>n&&i>n||this._activateColumns(e,n,e,n)}if(this._hasListener("columnMoved")){let e={};e.fromColIndex=t,e.toColIndex=i,e.colId=s,this._dispatchColumnEvent("columnMoved",e)}return n===this._colVirtualizer.getLastIndexInView()&&(t<=n&&i>n||i<=n&&t>n)&&this._colVirtualizer.update(),this.updateColumnBounds(),this._updateColumnSeparators(),!0},Dt.prototype.moveColumnById=function(t,e){let i=this.getColumnCount(),o=this.getColumnIndex(t);if(o<0||o>=i)return!1;let n=null!=e?this.getColumnIndex(e):-1;return n<0&&(n=i),this._moveColumnByIndex(o,n)},Dt.prototype._moveColumnByIndex=function(t,e){return t<e&&--e,t!==e&&this.moveColumn(t,e)},Dt.prototype.reorderColumns=function(t,e){let i="";"number"==typeof e?i=this.getColumnId(e):e&&(i=e),this.startBatch("move");let o=0;if(Array.isArray(t)){let e=t.length;if(e>1){let n,s,r,l,h=this.getColumnIds(),u=h.length,a=[],p=!1;for(n=0;n<e;++n){let e=t[n];"number"==typeof e?(r=e,s=h[e]||""):(s=e,r=h.indexOf(s)),s&&r>=0&&(a.push(s),i===s&&(p=!0))}if(e=a.length,p){if(l=this.getColumnIndex(i),l>=0)for(;++l<u&&(i=h[l],!(a.indexOf(i)<0)););(l<0||l>=u)&&(i="")}for(n=e;--n>=0;)s=a[n],r=this.getColumnIndex(s),l=this.getColumnIndex(i),l<0&&(l=u),o|=this._moveColumnByIndex(r,l),i=s}else o=this.moveColumnById(t[0],i)}else null!=t&&(o=this.moveColumnById(t,i));return this.stopBatch("move"),!!o},Dt.prototype.getColumnLayout=function(){return this._layoutX},Dt.prototype.updateColumnLayout=function(){this._syncLayoutToColumns(0,this.getColumnCount())},Dt.prototype._deserializeColumn=function(t,e){if(!e)return;let i,o=e.layout||e,n=e.width;null!=n&&(o.size=n),n=e.scalable,null!=n&&(o.scalable=n),n=e.minWidth,null!=n&&(o.minSize=n),null==o.scalable&&(o.scalable=null==o.size),this._layoutX.deserializeLane(t,o);let s=e.styles;for(i in s)this.setColumnStyle(t,i,s[i]);let r=e.classes;for(i in r)this.enableColumnClass(t,i,r[i]);let l=this._getColumnDef(t),h=e.id;h&&"string"==typeof h&&(l.id=h,l.userId=h);let u=e.field;u&&"string"==typeof u&&(l.field=u);let a=e.dataColumnName;null!=a&&(l.dataColumnName=a),a=e.stationary,null!=a&&(l.stationary=!!a),a=e.leftPinned,null!=a&&(l.leftPinned=!!a),a=e.rightPinned,null!=a&&(l.rightPinned=!!a),a=e.backgroundColor,null!=a&&this.setColumnBackgroundColor(t,a),this.setColumnRenderingHandler(t,e.renderingHandler),this.setColumnDataBindingHandler(t,e.dataBindingHandler),a=e.columnData,a&&this.setColumnData(t,a);let p=e.binding||e.formatter;if(Array.isArray(p)&&(p=p[0]),p&&"function"!=typeof p){let t=p.init;"function"==typeof t&&t(e,this)}},Dt.prototype.addRow=function(t){if(null==t)t=1;else if(t<=0)return;this.getColumnCount()<=0&&this.setColumnCount(1);let e=this.getLastSection();null==e&&(e=this.addSection()),e.addRow(t)},Dt.prototype.removeRow=function(t){let e=this.getLastSection();null!=e&&(null==t&&(t=1),e.removeRow(t))},Dt.prototype.getRowCount=function(){return this._layoutY.getLaneCount()},Dt.prototype.setSectionRowCount=function(t,e){let i=this.getSection(t);null!=i&&i.setRowCount(e)},Dt.prototype.getRowIndex=function(t,e){return this._sectionStarts[t]+e},Dt.prototype.getRelativeIndex=e._deprecatedFunction,Dt.prototype.removeAllRows=function(){let t=this._settings.length;for(let e=0;e<t;++e)this._settings[e].getSection().setRowCount(0),this._sectionStarts[e]=0;this._sectionStarts[t]=0},Dt.prototype.getDefaultRowHeight=function(){return this._layoutY.getDefaultLaneSize()},Dt.prototype.setDefaultRowHeight=function(t,e){if(this._layoutY.setDefaultLaneSize(t)){this._rowHeightSync=!1;let t=this._layoutY.getDefaultLaneSize();this._rowHeightException=e?"":"title";let i=this._settings.length;for(let e=0;e<i;++e){let i=this._settings[e];i.getType()!==this._rowHeightException&&"bottomPadding"!==i.getId()&&i.getSection().setDefaultRowHeight(t)}this._syncRowHeights(),this._rowHeightSync=!0,this.setRowScrollingStep(this._rowScrollingStep),this._updateColumnSeparators()}},Dt.prototype.getDataSource=function(){return this._dataSource},Dt.prototype.setDataConflationRate=function(t){this._dataSource.setConflationRate(t)},Dt.prototype.getDataConflationRate=function(){return this._dataSource.getConflationRate()},Dt.prototype.setDataSource=function(t){t&&t instanceof lt&&(t=new ct(t));let e={};if(e.prevDataSource=this._dataSource,this._dataSource=t||null,e.dataSource=this._dataSource,this._dispatch("dataSourceChanged",e),this._autoSetDataSource){let e=this._settings.length;for(let i=0;i<e;++i)this._settings[i].setDataSource(t)}return this._dispatch("postDataSourceChanged",e),this._dataSource},Dt.prototype.setColumnTemplate=e._deprecatedFunction,Dt.prototype.getColumnTemplate=e._deprecatedFunction,Dt.prototype.getColumnRenderEvent=e._deprecatedFunction,Dt.prototype.getColumnDataBindingEvent=function(t){console.log("getColumnDataBindingEvent() is deprecated. Use setColumnDataBindingHandler() instead");let e=this;return{listen:function(i){e.setColumnDataBindingHandler(t,i)},unlisten:function(){e.setColumnDataBindingHandler(t,null)}}},Dt.prototype.setColumnStyle=function(t,i,o,n){if(!i)return;let s;e.isNumber(t)||(t=0,console.log("WARNING: the first parameter for setColumnStyle must be column index")),null==n?s=this._getNestedColumnDef(t,"styles"):(n=this._toSectionType(n),s=this._getNestedColumnDef(t,n,"styles")),s[i]=o;for(let e=this._settings.length;--e>=0;){let s=this._settings[e];null!=n&&n!==s.getType()||s.getSection().setColumnStyle(t,i,o)}},Dt.prototype.getColumnBackgroundColor=function(t){return this._getColumnDef(t).backgroundColor||""},Dt.prototype.setColumnBackgroundColor=function(t,e){if(null==t||"number"!=typeof t)return;let i=this._getColumnDef(t);if(i.backgroundColor===e)return;i.backgroundColor=e,e=null!=e?e:"";let o=this._settings.length;for(let i=0;i<o;++i){let o=this._settings[i],n=o.getSection();n&&("content"!==o.getType()?this._applyCellsBackgroundColor(n,t,e):n.getColumn(t).setStyle("backgroundColor",e))}},Dt.prototype._applyCellsBackgroundColor=function(t,e,i){let o=t.getRowCount();for(let n=0;n<o;n++){if(t.getCellColSpan(e,n)>1)continue;let o=t.getCell(e,n);o&&o.setStyle("backgroundColor",i)}},Dt.prototype.applyColumnsBackgroundColor=function(t){if(!t)return;let e=t.getColumnCount();for(let i=0;i<e;i++){let e=this._getColumnDef(i).backgroundColor||"";this._applyCellsBackgroundColor(t,i,e)}},Dt.prototype.enableColumnClass=function(t,e,i,o){let n;"number"!=typeof t&&(t=0),null==o?n=this._getNestedColumnDef(t,"classes"):(o=this._toSectionType(o),n=this._getNestedColumnDef(t,o,"classes"));let s=!1;if((i=!1!==i)?n[e]||(s=n[e]=!0):n[e]&&(delete n[e],s=!0),s)for(let n=this._settings.length;--n>=0;){let s=this._settings[n];null!=o&&o!==s.getType()||s.getSection().enableColumnClass(t,e,i)}return s},Dt.prototype.hasColumnClass=function(t,e,i){let o;return null==i?o=this._getNestedColumnDef(t,"classes"):(i=this._toSectionType(i),o=this._getNestedColumnDef(t,i,"classes")),!(!o||!o[e])},Dt.prototype.setColumnAlignment=function(t,e){let i=e?e.charAt(0).toLowerCase():"",o=0;o|=this.enableColumnClass(t,"tr-align-left","l"===i),o|=this.enableColumnClass(t,"tr-align-right","r"===i),o|=this.enableColumnClass(t,"tr-align-center","c"===i),o&&this._dispatch("columnAlignmentChanged",{colIndex:t,alignment:i})},Dt.prototype.getColumnAlignment=function(t){return this.hasColumnClass(t,"tr-align-right")?"right":this.hasColumnClass(t,"tr-align-center")?"center":this.hasColumnClass(t,"tr-align-left")?"left":"default"},Dt.prototype.getColumnLeft=function(t){let e=this._columnDefs[t];if(e&&e.rightPinned){let e=this.getElement().clientWidth,i=this._layoutX.getTrackSize(),o=i<e?i:e;for(let e=this.getColumnCount()-1;e>=t;--e)o-=this._layoutX.getLaneSize(e);return o}return this._hScrollbarEnabled&&t>=this._pinnedLeftColumnCount?this._layoutX.getLaneStart(t)-this._hscrollbar.getScrollLeft():this._layoutX.getLaneStart(t)},Dt.prototype.getColumnRight=function(t){return this.getColumnLeft(t)+this._layoutX.getLaneSize(t)},Dt.prototype.getColumnWidth=function(t){return this._layoutX.getLaneSize(t)},Dt.prototype.getColumnCustomLaneSize=function(t){return this._layoutX.getCustomLaneSize(t)},Dt.prototype._calculateColumnWidths=function(t,e){if(!this._preserveGridSize)return e;let i,o=0,n={},s=t.length,r=new Array(s);for(i=0;i<s;i++)n[t[i]]=!0,r[i]=e[i],o+=e[i];let l=0,h=0,u=this.getColumnCount(),a=this._layoutX;for(i=0;i<u;i++)n[i]||a.isLaneVisible(i)&&(a.getLaneScalability(i)?(l+=a.getMinimumLaneSize(i),h++):l+=a.getLaneSize(i));let p=this.getContentWidth(),_=o+l-p;if(h<1||_>0){for(a.resetLaneToDefaultSize(),a.setTrackSize(p-this._reservedSpace),l=0,i=0;i<u;i++)n[i]||a.isLaneVisible(i)&&(a.getLaneScalability(i)?l+=a.getMinimumLaneSize(i):l+=a.getLaneSize(i));if(_=o+l-p,_>0)for(_/=s,i=0;i<s;i++)r[i]-=_}return r},Dt.prototype.setColumnWidth=function(t,e,i){let o=this._calculateColumnWidths([t],[e]),n=this._setColumnWidth(t,o[0],i);return n&&this._syncLayoutToColumns(t,t+1),n},Dt.prototype.setColumnWidths=function(t,e){let i,o=0,n=[],s=[],r=[];for(i=t.length;--i>=0;){let o=t[i];null!=o&&(n.push(i),s.push(o));let l=Array.isArray(e)?e[i]:e;r.push(l)}let l=this._calculateColumnWidths(n,s);for(i=0;i<l.length;i++)o|=this._setColumnWidth(n[i],l[i],r[i]);return o&&this._syncLayoutToColumns(0,t.length),!!o},Dt.prototype.isColumnVisible=function(t){return this._layoutX.isLaneVisible(t)},Dt.prototype.hideColumn=function(t,e){let i=!1===e;this.setColumnVisibility(t,i,0)},Dt.prototype.hideColumns=function(t,e){let i=Array.isArray(t)?t.length:0,o=[],n=this.getColumnCount();e=!1!==e;for(let s=0;s<i;++s){let i=t[s];i>=0&&i<n&&this._layoutX.hideLane(i,e,0)&&o.push(i)}if(o.length&&(this._syncLayoutToColumns(),this.requestRowRefresh(),this._hasListener("columnVisibilityChanged"))){let t={};t.colIndices=o,t.hidden=e,this._dispatch("columnVisibilityChanged",t)}},Dt.prototype.showAllColumns=function(){let t=[],e=this.getColumnCount();for(let i=0;i<e;++i)this._layoutX.hideLane(i,!1,0)&&t.push(i);if(t.length&&(this._syncLayoutToColumns(),this.requestRowRefresh(),this._hasListener("columnVisibilityChanged"))){let e={};e.colIndices=t,e.hidden=!1,this._dispatch("columnVisibilityChanged",e)}},Dt.prototype.getMinimumColumnWidth=function(t){return this._layoutX.getMinimumLaneSize(t)},Dt.prototype.setMinimumColumnWidth=function(t,e){this._layoutX.setMinimumLaneSize(t,e)&&this._syncLayoutToColumns(t,t+1)},Dt.prototype.setMinimumColumnWidths=function(t,e){let i=0,o=NaN,n=NaN;for(let s=t.length;--s>=0;){let r=t[s];null!=r&&(n||(n=s),o=s,i|=this._layoutX.setMinimumLaneSize(s,r,e))}return i&&this._syncLayoutToColumns(o,n+1),!!i},Dt.prototype.getColumnScalability=function(t){return this._layoutX.getLaneScalability(t)},Dt.prototype.setColumnScalability=function(t,i){let o=!1;return e.isNumber(t)?(i=!1!==i,o=this._layoutX.setLaneScalability(t,i),o&&this._syncLayoutToColumns(t,t+1)):this.setDefaultColumnScalable(t),o},Dt.prototype.setDefaultColumnScalable=function(t){this._layoutX.setDefaultScalability(!!t)},Dt.prototype.resetColumnWidths=function(){let t=this._layoutX.resetLaneToDefaultSize();return t&&this._syncLayoutToColumns(0,this.getColumnCount()),t},Dt.prototype.setColumnDefaultWidth=function(t,e){this._layoutX.setLaneDefaultSize(t,e)},Dt.prototype.preserveProportion=function(t){this._preserveProportion=!0===t},Dt.prototype.isProportionPreserved=function(){return this._preserveProportion},Dt.prototype.preserveGridSize=function(t){this._preserveGridSize=!0===t},Dt.prototype.getColumnData=function(t){return this._getColumnDef(t).columnData},Dt.prototype.setColumnData=function(t,e){return this._getColumnDef(t).columnData=e||{},e},Dt.prototype.newColumnData=Dt.prototype.getColumnData,Dt.prototype.setAlwaysRenderColumn=function(t,e){this.getColumnData(t).alwaysRender=!1!==e},Dt.prototype._isAlwaysRenderColumn=function(t){return!0===this.getColumnData(t).alwaysRender},Dt.prototype.getFitContentWidth=function(){return this._fitContentWidth},Dt.prototype.setFitContentWidth=function(t){this._fitContentWidth!==t&&(this._fitContentWidth=t,this.enableClass("fit-width",this._fitContentWidth))},Dt.prototype.loadPlugin=function(t,e){let i=null;if("string"==typeof t){let e=window.tr,o=e?e.grid:null;if(!o)return null;if(o[t])i=new o[t];else{if(!o[t+"Plugin"])return null;i=new o[t+"Plugin"]}}else i=t;if(!i||!i.getName)return null;let o=i.getName();if(!o)return null;let n=this._plugins[o];if(n){if(n===i)return n;console.log("WARNING: Two of the same "+o+"s cannot be loaded on a single grid. The existing plugin is replaced."),this.unloadPlugin(o)}return i.initialize&&i.initialize(this,e),this._plugins[o]=i,i},Dt.prototype.unloadPlugin=function(t){let e;if(t){let i="";"string"==typeof t?i=t:t.getName&&(i=t.getName()),e=this._plugins[i],e||(i+="Plugin",e=this._plugins[i]),e&&(e.unload&&e.unload(this),delete this._plugins[i])}return e||null},Dt.prototype.getPlugin=function(t){let e=this._plugins[t];return e||(e=this._plugins[t+"Plugin"]),e||null},Dt.prototype.getPlugins=function(){let t=[];for(let e in this._plugins)t.push(this._plugins[e]);return t},Dt.prototype.getPluginList=function(){let t=[];for(let e in this._plugins)t.push(e);return t},Dt.prototype.freezeSection=function(t){this._fixFrozenTopSections=!0,this._freezeTopSectionAt(t)},Dt.prototype.resetSectionFreezing=function(){this._fixFrozenTopSections=!1,this._updateFrozenTopSections()},Dt.prototype._freezeTopSectionAt=function(t){if("number"==typeof t){let e=t+1;if(e===this._startVScrollbarIndex)return;this._startVScrollbarIndex=e}else this._startVScrollbarIndex=-1,"string"==typeof t&&(this._tempFrozenSectionRef=t);this._onSectionCountChanged()},Dt.prototype.freezeFooter=function(t){this._fixFrozenBottomSection=!0,this._frozenFooterCount!==t&&(this._setFrozenFooter(t),this._onSectionCountChanged())},Dt.prototype._setFrozenFooter=function(t){this._frozenFooterCount!==t&&(this._frozenFooterCount=t,this._vscrollbar.setFooterCount(t),this._hscrollbar.setFooterCount(t))},Dt.prototype.getFooterCount=function(){return this._frozenFooterCount},Dt.prototype.freezeColumn=function(t,e){let i,o,n=this.getColumnCount(),s=0,r=0,l=!1;if(t||0===t)for(this._hScrollbarEnabled=!0,s=t>=0?t+1:0,this._pinnedLeftColumnCount!==s&&(l=!0,this._pinnedLeftColumnCount=s),i=0;i<n;++i)o=this._getColumnDef(i),o.leftPinned=--s>=0;else this._hScrollbarEnabled=!1;if(null!=e)for(r=e>0?e:0,this._pinnedRightColumnCount!==r&&(l=!0,this._pinnedRightColumnCount=r),i=n;--i>=0;)o=this._getColumnDef(i),o.rightPinned=--r>=0;this._onColumnCountChanged(),this._updateScrollbarWidth(!0,!0),this._updateColumnSeparators(),l&&(this._isEventDispatching("pinningChanged")||this._dispatch("pinningChanged",{}))},Dt.prototype._countPinnedLeftColumns=function(){let t=0;if(this._hScrollbarEnabled)for(let e=this._columnDefs.length;--e>=0;){let i=this._columnDefs[e];if(i&&i.leftPinned){t=e+1;break}}return this._pinnedLeftColumnCount=t,t},Dt.prototype._countPinnedRightColumns=function(){let t=0;if(this._hScrollbarEnabled){let e,i=this._columnDefs.length;for(e=0;e<i;++e){let t=this._columnDefs[e];if(t&&t.rightPinned)break}t=i-e}return this._pinnedRightColumnCount=t,t},Dt.prototype.isPinnedColumn=function(t){return t<this.getFrozenColumnCount()||t>=this.getFirstPinnedRightIndex()},Dt.prototype.getFrozenColumnCount=function(){return this._hScrollbarEnabled?this._pinnedLeftColumnCount:0},Dt.prototype.getPinnedLeftColumnCount=Dt.prototype.getFrozenColumnCount,Dt.prototype.getPinnedRightColumnCount=function(){return this._pinnedRightColumnCount},Dt.prototype.getFirstPinnedRightIndex=function(){return this.getColumnCount()-this._pinnedRightColumnCount},Dt.prototype.updateLayout=function(){this._disposed||this._layoutUpdating||(this._layoutUpdating=!0,this._dispatch("preForcedUpdate",{}),this._updateLayout(),this._colVirtualizer.isEnabled()&&this._activateColumns(),this._layoutUpdating=!1)},Dt.prototype.updateScrollbars=function(t,e){e&&this._updateScrollbarWidth(!0,!1),t&&this._updateScrollbarHeight(!0,!1)},Dt.prototype.freezeLayout=function(t){t=!1!==t;let e=this._frozenLayout;if(e!==t){this._frozenLayout=t;let e,i,o=this.getPlugin("SortableTitlePlugin");this._frozenLayout&&o&&o.freezeIndicator(!0),this._frozenLayout||(this._disableEvent("widthChanged"),this._onSectionCountChanged(),this._onColumnCountChanged(),this._colVirtualizer.isEnabled()&&this._activateColumns()),this._rowHeightSync=!1;let n=this._settings.length;for(e=0;e<n;e++)i=this._settings[e].getSection(),i.setFrozenLayout(this._frozenLayout);this._frozenLayout||(this._syncLayoutToColumns(0,this.getColumnCount()),this._disableEvent("widthChanged",!1),this._dispatch("widthChanged",{}),this._syncRowHeights()||this._rowVirtualizer.update(!0),o&&o.freezeIndicator(!1)),this._rowHeightSync=!0}return e},Dt.prototype.unfreezeLayout=function(t){this.freezeLayout(!1===t)},Dt.prototype.isLayoutFrozen=function(){return this._frozenLayout},Dt.prototype.showBorders=e._deprecatedFunction,Dt.prototype.hideBorders=e._deprecatedFunction,Dt.prototype.toggleBorders=function(t){this.toggleClass("no-borders",null!=t?!t:null)},Dt.prototype.toggleGridlines=function(t){this.toggleClass("no-gridlines",null!=t?!t:null)},Dt.prototype.toggleVerticalLines=function(t){this.toggleClass("no-vertical-grid-line",null!=t?!t:null)},Dt.prototype.toggleHorizontalLines=function(t){this.toggleClass("no-horizontal-grid-line",null!=t?!t:null)},Dt.prototype.toggleContentVerticalLines=function(t){this.toggleClass("no-content-vertical-line",null!=t?!t:null)},Dt.prototype.getDataColumnMap=function(){let t=[];for(let e=this.getColumnCount();--e>=0;)t[e]=this.getDataColumnName(e);return t},Dt.prototype.setDataColumnMap=function(t){let e,i;if(t)for(e=t.length;--e>=0;)i=this._getColumnDef(e),i.dataColumnName=t[e];else for(e=this._columnDefs.length;--e>=0;)i=this._columnDefs[e],i&&null!=i.dataColumnName&&(i.dataColumnName=null)},Dt.prototype.getDataColumnName=function(t){return this._getColumnDef(t).dataColumnName||""},Dt.prototype.setDataColumnName=function(t,e){this._getColumnDef(t).dataColumnName=e},Dt.prototype.setDefaultRenderingHandler=function(t){this._renderingHandler="function"==typeof t?t:null},Dt.prototype.setDefaultDataBindingHandler=function(t){this._dataBindingHandler="function"==typeof t?t:null},Dt.prototype.setColumnRenderingHandler=function(t,e){this._getColumnDef(t).renderingHandler="function"==typeof e?e:null},Dt.prototype.setColumnDataBindingHandler=function(t,e){this._getColumnDef(t).dataBindingHandler="function"==typeof e?e:null},Dt.prototype.getColumnRenderingHandler=function(t){return this._getColumnDef(t).renderingHandler||null},Dt.prototype.getColumnDataBindingHandler=function(t){return this._getColumnDef(t).dataBindingHandler||null},Dt.prototype.enableRowHighlighting=function(t){if(null==t&&(t=!0),this._rowHighlighting!==t){this._rowHighlighting=t;let e=this.getAllSections("content");for(let t=e.length;--t>=0;)e[t].enableRowHighlighting(this._rowHighlighting)}},Dt.prototype._getTarget=function(t){let i=t.target;if(i){let e=null;return this._element.contains(i)||(e=t.composedPath?t.composedPath():t.path),e?e[0]||null:i}return t.getElement?t.getElement():e.isElement(t)?t:null},Dt.prototype.getRelativePosition=function(t,i){if(!t)return{};let o=i||{},n=this._getTarget(t);t.target?e.getRelativePosition(t,this.getElement(),o):n&&e.getRelativePosition(n,this.getElement(),o),1!==this._zoomFactor&&(o.x/=this._zoomFactor,o.y/=this._zoomFactor),o.hit=!1,o.grid=this,o.clientX=t.clientX,o.clientY=t.clientY,o.zoomFactor=this._zoomFactor;let s=e.closestElement(n,"cell");if(!s)return o;o.cellElement=s;let r=e.closestElement(s,"column");o.columnElement=r;let l=null;if(l=r?e.closestElement(r,"tr-lg"):e.closestElement(s,"tr-lg"),!l)return o;o.sectionName=l.id||e.closestElement(l,"tr-vlg").id;let h=this.getSectionSettings(o.sectionName);if(!h)return o;h.extendEventArg(o);let u=h.getSection(),a=u.getColumnIndex(r||s);return a<0||(o.colIndex=a,!1===this._hitTestY(-1,o)||(s.stretched?o.cell=u.getStretchedCell(a,o.rowIndex):o.cell=u.getCell(a,o.rowIndex),o.hit=!0)),o},Dt.prototype.getVScrollbar=function(){return this._vscrollbar},Dt.prototype.getHScrollbar=function(){return this._hscrollbar},Dt.prototype.autoHideScrollbars=function(t){t=null==t||t,this._vscrollbar.setAutoHide(t),this._hscrollbar.setAutoHide(t)},Dt.prototype.getVScrollStartIndex=function(){return this._startVScrollbarIndex},Dt.prototype.getHScrollStartIndex=function(){return this._hScrollbarEnabled?this._pinnedLeftColumnCount:-1},Dt.prototype.scrollToColumn=function(t,e){if(!this._updateScrollbar(this._hscrollbar))return!1;let i=this._layoutX.getLaneCount();if(t<=0?t=0:t>=i&&(t=i-1),this.isPinnedColumn(t))return!1;let o=this._hScrollbarEnabled?this._layoutX.getLaneStart(this._pinnedLeftColumnCount):0,n=this._hscrollbar.getScrollLeft(),s=n+o,r=this._hscrollbar.getWidth(),l=this._layoutX.hitTest(s),h=this._layoutX.getLaneStart(t),u=this._layoutX.getLaneSize(t);if(e||u>=r||t<=l){let t=h-o;if(n!==t)return this._hscrollbar.setScrollLeft(t),!0}else{let e=s+r;if(t>=this._layoutX.hitTest(e-.1)){let t=n+(h+u)-e;return this._hscrollbar.setScrollLeft(t),!0}}return!1},Dt.prototype.getScrollLeft=function(){return this._updateScrollbar(this._hscrollbar)?this._hscrollbar.getScrollLeft():0},Dt.prototype.setScrollLeft=function(t){this._updateScrollbar(this._hscrollbar)&&this._hscrollbar.setScrollLeft(t)},Dt.prototype.scrollRight=function(t){this.setScrollLeft(this._hscrollbar.getScrollLeft()+t)},Dt.prototype.getScrollWidth=function(){return this._updateScrollbar(this._hscrollbar)?this._hscrollbar.getContentWidth():0},Dt.prototype.getYScrollVal=function(t,e,i){if(!this._updateScrollbar(this._vscrollbar))return null;let o=null;t&&(o=this.getSection(t));let n=o?o.getRowOffset():this._sectionStarts[this._startVScrollbarIndex],s=this._layoutY.getLaneStart(this._startVScrollbarIndex),r=this._layoutY.getLaneCount();if(e<=0?e=0:e>=r&&(e=r-1),i)return this._layoutY.getLaneStart(e+n)-s;let l=this.getVerticalViewInfo();if(e<l.firstFullRow){let t=e-2;return t<0&&(t=0),this._layoutY.getLaneStart(t+n)-s}return e>l.lastFullRow?this._layoutY.getLaneStart(e+n+2+1)-l.viewHeight-s:null},Dt.prototype.scrollToRow=function(t,e,i){let o=this.getYScrollVal(t,e,i);null!==o&&this._vscrollbar.setScrollTop(o)},Dt.prototype.getVerticalViewInfo=function(){let t=this._sectionStarts[this._startVScrollbarIndex],e=this._layoutY.getLaneStart(t),i=this._vscrollbar.getHeight(),o=this._vscrollbar.getScrollTop()+e,n=o+i,s=this._layoutY.hitTest(o)-t,r=this._layoutY.hitTest(n-.1);return r<0&&(r=this._layoutY.getLaneCount()-1),r-=t,{topRowIndex:s,firstFullRow:this._layoutY.getLaneStart(s+t)<o?s+1:s,lastFullRow:this._layoutY.getLaneEnd(r+t)>n?r-1:r,bottomRowIndex:r,viewHeight:i,viewTop:o,viewBottom:n}},Dt.prototype.getVScrollView=function(){if(!this._updateScrollbar(this._vscrollbar))return null;let t=this._layoutY.getLaneCount();if(0===t)return null;let e=this._sectionStarts[this._startVScrollbarIndex],i=this._layoutY.getLaneStart(e),o=this._vscrollbar.getScrollTop()+i,n=this._vscrollbar.getHeight(),s=o+n,r=this._layoutY.hitTest(o),l=this._layoutY.hitTest(s-.1),h=this._layoutY.getLaneStart(r+e),u=this._layoutY.getLaneEnd(l+e),a=o-n,p=a<=i?e:this._layoutY.hitTest(a)+1,_=s+n,d=_>=this._layoutY.getTrackSize()?t-1:this._layoutY.hitTest(_-.1)-1;r-=e,l-=e;let c={};return c.viewTop=o-i,c.viewBottom=s-i,c.topRowIndex=r,c.bottomRowIndex=l,c.firstFullRow=h<o?r+1:r,c.lastFullRow=u>s?l-1:l,c.prevPageRowIndex=p-e,c.nextPageRowIndex=d-e,c},Dt.prototype.getScrollTop=function(){return this._updateScrollbar(this._vscrollbar)?this._vscrollbar.getScrollTop():0},Dt.prototype.setScrollTop=function(t){this._updateScrollbar(this._vscrollbar)&&this._vscrollbar.setScrollTop(t)},Dt.prototype.scrollDown=function(t){this.setScrollTop(this._vscrollbar.getScrollTop()+t)},Dt.prototype.getScrollHeight=function(){return this._updateScrollbar(this._vscrollbar)?this._vscrollbar.getContentHeight():0},Dt.prototype.restoreScrollbars=function(){this._vscrollbar.restoreTrackPosition()},Dt.prototype.enableAutoSetDataSource=function(t){this._autoSetDataSource=t},Dt.prototype.getRowVirtualizer=function(){return this._rowVirtualizer},Dt.prototype.getColumnVirtualizer=function(){return this._colVirtualizer},Dt.prototype.enableRowVirtualization=function(t){this._rowVirtualizer.enable(t),this._rowVirtualizer.isEnabled()&&this._vscrollbar.isEnabled()?this._rowVirtualizer.activate():this._rowVirtualizer.deactivate()},Dt.prototype.isRowVirtualizationEnabled=function(){return this._rowVirtualizer.isEnabled()},Dt.prototype.enableColumnVirtualization=function(t){this._colVirtualizer.enable(t);let e=this._colVirtualizer.isEnabled();for(let t=this._settings.length;--t>=0;)this._settings[t].enableColumnVirtualization(e)},Dt.prototype.isColumnVirtualizationEnabled=function(){return this._colVirtualizer.isEnabled()},Dt.prototype.setRowScrollingStep=function(t){this._rowScrollingStep=t>0?t:0,this._vscrollbar.setScrollingStep(this._layoutY.getDefaultLaneSize()*this._rowScrollingStep)},Dt.prototype.getVMouseWheelHandler=function(){return this._vscrollbar.getDefaultMouseWheelLogic()},Dt.prototype.synchronizeVScrollbar=function(t){t.unlisten("mousemove",t._onMouseMove),t.listen("mousemove",this._onMouseMove);let e=t.getVScrollbar();e._mainScrollbar=this._vscrollbar,e.setStyle("visibility","hidden"),e.setStyle("pointerEvents","none"),e.disableMouseWheel(),e.attachToExternalElement(this._vscrollbar.getParent()),this._vscrollbar.listen("scroll",t._onSyncVScroll)},Dt.prototype.synchronizeHScrollbar=function(t){t.unlisten("mousemove",t._onMouseMove),t.listen("mousemove",this._onMouseMove);let e=t.getHScrollbar();e._mainScrollbar=this._hscrollbar,e.setStyle("visibility","hidden"),e.setStyle("pointerEvents","none"),e.disableMouseWheel(),e.attachToExternalElement(this._hscrollbar.getParent()),this._hscrollbar.listen("scroll",t._onSyncHScroll)},Dt.prototype.updateRowData=function(t,e,i,o){let n=this.getSectionSettings(t||"content");n&&n.updateRowData(e,i,o)},Dt.prototype.rerender=function(){let t=this._settings.length;for(let e=0;e<t;e++)this._settings[e].rerender()},Dt.prototype.requestRowRefresh=function(){this._rowRefreshTimer||(this._rowRefreshTimer=setTimeout(this._onRowRefresh,100))},Dt.prototype._requestScrollbarUpdate=function(){this._updateScrollbarHeight(!0,!0),this._rowHeightTimerId=0},Dt.prototype.deactivateRendering=function(t){if((t=!1!==t)==this._noBinding)return;this._noBinding=t;let e=this.getSectionSettings("content");e&&(e.disableDataBinding(t),t||this.requestRowRefresh())},Dt.prototype._onRowRefresh=function(){this._rowRefreshTimer=0,this.updateRowData()},Dt.prototype.disableLazyRendering=function(t){console.log("WARNING: This function is deprecated.")},Dt.prototype.getData=function(t,e,i){let o=this.getSectionSettings(t);if(!o)return null;let n=this._toDataColumnName(e);return o.getData(n,i)},Dt.prototype.setData=function(t,e,i,o){let n=this.getSectionSettings(t);if(n&&n.isDataBindable()){let t=this._toDataColumnName(e);return n.setData(t,i,o)}return!1},Dt.prototype.removeRowData=function(t,e){let i=this.getSectionSettings(t);return!(!i||!i.isDataBindable())&&i.removeRowData(e)},Dt.prototype.setHidingMethod=function(t){if(t||(t=""),this._hidingMethod!==t){this._hidingMethod=t;let e=this.getAllSections();for(let i=e.length;--i>=0;)e[i].setHidingMethod(t)}},Dt.prototype.getHorizontalLayout=function(){return this._layoutX},Dt.prototype.setColumnVisibility=function(t,e,i){if(this._layoutX.hideLane(t,!e,i)){if(this._syncLayoutToColumns(t,t+1),e&&this.requestRowRefresh(),this._hasListener("columnVisibilityChanged")){let i={};i.colIndex=t,i.hidden=!e,this._dispatch("columnVisibilityChanged",i)}return!0}return!1},Dt.prototype.getColumnVisibility=function(t,e){return this._layoutX.getLaneVisibilityBit(t,e)},Dt.prototype.reserveRightSpace=function(t){if(this._reservedSpace!==t){this._reservedSpace=t;for(let e=this._settings.length;--e>=0;)this._settings[e].getSection().reserveRightSpace(t);return this._onColumnCountChanged(),this._updateScrollbarWidth(!0,!0),!0}return!1},Dt.prototype.getHiddenInput=function(t){return t?this._firstHiddenInput:this._lastHiddenInput},Dt.prototype.focus=function(){let t=this._lastHiddenInput,e=Lt(t);if(t&&t!==e){let e=window.pageXOffset,i=window.pageYOffset;if(t.setActive)try{t.setActive()}catch(e){t.focus({preventScroll:!0})}else t.focus({preventScroll:!0});i===window.pageYOffset&&e===window.pageXOffset||window.scrollTo(e,i)}},Dt.prototype.isBinding=function(){return this._dispatchingDataChanged},Dt.prototype.hideRow=function(t,e){this._dataSource.hideRow(t,e)},Dt.prototype.hideRows=function(t,e){Array.isArray(t)?this._dataSource.hideRows(t,e):this._dataSource.hideRow(t,e)},Dt.prototype.showRows=function(t,e){Array.isArray(t)?this._dataSource.showRows(t,e):this._dataSource.showRows([t],e)},Dt.prototype.unhideAllRows=function(){this._dataSource.unhideAllRows()},Dt.prototype.hasHiddenRow=function(){return this._dataSource.hasHiddenRow()},Dt.prototype.initSimpleTable=function(t){let e=0;if(t||this.getColumnCount()||(t=["Default"]),t){e=t.length,this.setColumnCount(e),this.setDataColumnMap(t);for(let i=0;i<e;++i)this.setColumnField(i,t[i])}let i=this.addSection("title");if(i.addRow(1),!this._renderingHandler)for(let o=0;o<e;++o)i.setCellContent(o,0,t[o]);this.addSection("content");let o=this.getSectionSettings("title");o.disableDataBinding();let n=this.getSectionSettings("content");n.setAutoSyncRowCount(!0),n.setParent(o),this._dataBindingHandler||this.setDefaultDataBindingHandler(Dt._defaultDataBinding)},Dt._defaultDataBinding=function(t){t.cell.setContent(t.dataValue)},Dt.prototype.selectColumn=function(t,e){for(let i=this._settings.length;--i>=0;)this._settings[i].getSection().selectColumn(t,e);this.updateColumnBounds()},Dt.prototype.isSelectedColumn=function(t){let e=this._settings[0]||null;return!!e&&e.getSection().isSelectedColumn(t)},Dt.prototype.updateColumnBounds=function(){if(this._columnBoundConflator.conflate())return;let t=this._settings.length;if(!t)return;let e,i=[],o=null,n=this.getColumnCount(),s=[];for(e=0;e<n;e++)this.isSelectedColumn(e)?(s.push(e),o||(o=[e,-1])):o&&(o[1]=e-1,i.push(o),o=null);o&&(o[1]=n-1,i.push(o),o=null);let r={selectedColumns:s,selectionRanges:i};this._dispatch("beforeColumnBoundUpdate",r);let l=i.length,h=[],u=[],a=this._settings[0],p=a.getSection();for(e=0;e<l;++e){o=i[e];let t=[0,0],n=[!1,!1];p.calculateColumnBounds(o[0],o[1],t,n),t[0]<t[1]&&(h.push(t),u.push(n))}let _=0,d=-1;for(null!=r.topBoundRowIndex&&(d=+r.topBoundRowIndex),d>=0&&"title"===a.getType()&&(_=this._layoutY.getLaneStart(d)),p.updateColumnBounds(h,u,_),e=1;e<t;e++)p=this._settings[e].getSection(),p.updateColumnBounds(h,u)},Dt.prototype._updateColumnSeparators=function(){let t=this._settings.length;if(t)for(let e=0;e<t;e++){let t=this._settings[e].getSection();t&&t.updateColumnSeparators()}},Dt.prototype.getColumnRect=function(t,e){let i=this.getElement().clientWidth,o=i,n=this._hscrollbar;n.isActive()&&(o=n.getTrackSize());let s=0,r=0;if(this._settings.length){let i=[0,0];this._settings[0].getSection().calculateColumnBounds(t,e,i,[]),s=i[0],r=i[1]-s}return{top:0,left:s,width:r,height:this._layoutY.getTrackSize(),leftPinnedIndex:this._pinnedLeftColumnCount-1,rightPinnedIndex:this.getFirstPinnedRightIndex(),scrollViewSize:o,gridWidth:i}},Dt.prototype.getRowRect=function(t,e){let i=this._layoutX.getTrackSize(),o=this.getElement().clientWidth;i=i<o?i:o;let n=this.getSection("content"),s=n?n.getRowOffset():1,r=this._layoutY,l=r.getLaneStart(s),h=0,u=n.getHeight(),a=this._vscrollbar;a.isActive()&&(h=a.getScrollTop(),u=a.getTrackSize());let p=u+l,_=r.getLaneStart(t+s)-h,d=r.getLaneEnd(e+s)-h;return _<l?_=l:_>p&&(_=p),d<l?d=l:d>p&&(d=p),_-=l,d-=l,{top:_,left:0,width:i,height:d-_,scrollViewSize:u,scrollViewTop:l,scrollViewBottom:p}},Dt.prototype.normalizeConfig=function(t){t||(t={});let e,i,o=t.columns,n=o?o.length:0,s=t.columnFreezing;null==s&&(s=t.freezeColumn);let r=t.pinnedRightColumns||t.frozenRightColumns;if(r)for(delete t.pinnedRightColumns,delete t.frozenRightColumns,t.columnVirtualRendering=!1,t.columnVirtualization=!1,e=n;--e>=0;)--r>=0&&(i=o[e],i&&(i.rightPinned=!0));return null!=s&&(delete t.columnFreezing,delete t.freezeColumn,s>=0&&o&&(i=o[s],i&&(i.leftPinned=!0))),t},Dt.prototype.setColumnGrouping=function(t){this._groupDefs=t||null},Dt.prototype.getColumnGroupParentId=function(t){if(this._groupDefs){let e="number"==typeof t?this.getColumnId(t):t;return this._groupDefs.getParentId(e)}return""},Dt.prototype.getColumnGroupChildIds=function(t){if(this._groupDefs){let e=this._groupDefs.getLeafDescendants(t);if(e&&e.length>0)return e}return null},Dt.prototype.getValidColumnList=function(t,e){let i=[];if(!t)return i;e||(e=this.createColumnMap(t));let o=this.getColumnCount();for(let t=0;t<o;++t){let o=this._getColumnDef(t).id;null!=e[o]&&i.push({index:t,id:o})}return i},Dt.prototype.createColumnMap=function(t){t||(t=this.getColumnIds());let e={},i=t.length;for(let o=0;o<i;o++){let i=t[o];"number"==typeof i&&(i=this.getColumnId(i)),i&&(e[i]=!0)}return e},Dt.prototype.startBatch=function(t){return!!t&&(this._batches||(this._batches={}),this._batches[t]=t,"reset"===t&&this._disableEvent("columnVisibilityChanged",!0),this._dispatch("beforeBatchOperation",{batches:this._batches,batchType:t}),!0)},Dt.prototype.stopBatch=function(t){return!!t&&(this._dispatch("afterBatchOperation",{batches:this._batches,batchType:t}),"reset"===t&&this._disableEvent("columnVisibilityChanged",!1),delete this._batches[t],j(this._batches)&&(this._batches=null),!0)},Dt.prototype._dispatchColumnEvent=function(t,e){let i=this._batches;i&&(e.batches=i),this._dispatch(t,e)},Dt.prototype._dispatchColumnPositionChanged=function(){this._columnPositionConflator.conflate()||this._dispatch("columnPositionChanged",{sender:this})},Dt.prototype._dispatchRowPositionChanged=function(){this._rowPositionConflator.conflate()||this._dispatch("rowPositionChanged",{sender:this})},Dt.prototype._getAllSections=function(){let t=[],e=this._settings.length;for(let i=0;i<e;i++)t.push(this._settings[i].getSection());return t},Dt.prototype._getNextSection=function(t,e,i){let o=this.getSectionIndex(e)+t;if(null==i)return this.getSectionSettings(o);i=this._toSectionType(i);let n=this._settings.length;for(;o>=0&&o<n;){let e=this._settings[o];if(i===e.getType())return e;o+=t}return null},Dt.prototype._toSectionType=function(t){if(Dt._sectionType[t])return t;if(e.isString(t))switch(t.charAt(0).toLowerCase()){case"t":return"title";case"h":case"s":return"header";case"f":return"footer"}return"content"},Dt.prototype._newSection=function(t,e){if(e)for(let t=this._settings.length;--t>=0;)if(this._settings[t].getId()===e)return null;t=this._toSectionType(t);let i={horizontalScrollbar:this._hscrollbar},o="content"===t?new Rt(i):new N(i);o._setContext(this);let n=new mt(o);n.setId(e),n.setType(t),n.listen("dataChanged",this._onSectionDataChanged),n.listen("rowAvailable",this._onRowAvailable);let s="content"===t&&this._rowHighlighting;return o.enableRowHighlighting(s),o.enableShading(!1),o.setHidingMethod(this._hidingMethod),n.enableColumnVirtualization(this._colVirtualizer.isEnabled()),o.setColumnCount(this._layoutX.getLaneCount()),o.reserveRightSpace(this._reservedSpace),this._syncLayoutToSectionColumns(o),this._syncStyleToSectionColumns(o,t),t!==this._rowHeightException&&o.setDefaultRowHeight(this._layoutY.getDefaultLaneSize()),o.listen("rowHighlighted",this._onRowHightlighted),o.listen("rowCountChanged",this._onRowCountChanged),o.listen("rowHeightChanged",this._onRowHeightChanged),n},Dt.prototype._putToLast=function(t){if(0===this._settings.length)t.insertBefore(this._lastHiddenInput);else{let e=this.getLastSection().getElement().nextSibling;null!==e?t.insertBefore(e):t.insertBefore(this._lastHiddenInput)}},Dt.prototype._syncStyleToSectionColumns=function(t,e){let i;for(let o=this._columnDefs.length;--o>=0;){let n=this._getColumnDef(o),s=n.styles;for(i in s)t.setColumnStyle(o,i,s[i]);let r=n.classes;for(i in r)t.enableColumnClass(o,i,!0);let l=n[e];if(l){for(i in s=l.styles,s)t.setColumnStyle(o,i,s[i]);for(i in r=l.classes,r)t.enableColumnClass(o,i,!0)}}},Dt.prototype._syncRowHeights=function(){let t=this._settings.length;for(let e=0;e<t;++e)this._syncSectionRowHeights(this._settings[e].getSection());return!this._frozenLayout&&this._updateScrollbarHeight(!0,!0)},Dt.prototype._syncSectionRowHeights=function(t){this._layoutY.copyFrom(t.getRowLayout(),this._sectionStarts[t.getIndex()])},Dt.prototype._setColumnWidth=function(t,e,i){let o=!1,n=this._layoutX;if(null!=i)o=n.setLaneScalability(t,!!i);else{let i=n.getLaneScalability(t);if(this._preserveProportion){if(i){let i=this.getColumnCount(),o=0,s=0;for(let t=0;t<i;++t){if(!n.getLaneScalability(t))continue;let e=n.getLaneSize(t);o+=n.getCustomLaneSize(t),s+=e}(!(e=(e*o-e*n.getCustomLaneSize(t))/(s-e))||e<0)&&(e=o)}}else o=n.setLaneScalability(t,!1)}return o=n.setLaneSize(t,e)||o,o},Dt.prototype._dispatchColumnAddedEvent=function(t,e,i,o){let n={};if(this._hasListener("columnAdded"))if(n.atTheMiddle=i,1===e)n.colIndex=t,n.context=o,this._dispatchColumnEvent("columnAdded",n);else{let i=Array.isArray(o)?o:[];for(let o=0;o<e;++o)n.colIndex=t+o,n.context=i[o],this._dispatchColumnEvent("columnAdded",n)}this._frozenLayout&&(n.noDataUpdate=!0),this._dispatchColumnRenderEvent(n,t,t+e,0,this._settings.length,NaN,NaN)},Dt.prototype._dispatchColumnRenderEvent=function(t,e,i,o,n,s,r){if(!(o<n))return;let l;if(t.sender=this,t.fromColIndex=e,t.toColIndex=i,this._hasListener("preSectionRender"))for(l=o;l<n;++l)this._settings[l].extendRenderEventArg(t,s,r),this._dispatch("preSectionRender",t);for(let h=e;h<i;++h){let e=this.getColumnRenderingHandler(h)||this._renderingHandler;if(e)for(t.colIndex=h,t.dataColumnName=this.getDataColumnName(h),l=o;l<n;++l){let i=this._settings[l];i.extendRenderEventArg(t,s,r);let o=i.getSection(),n=t.fromRowIndex,u=t.toRowIndex;for(let i=n;i<u;++i)t.rowIndex=i,t.cell=o.getCell(h,i,!1),e(t)}}if(this._hasListener("postSectionRender"))for(l=o;l<n;++l)this._settings[l].extendRenderEventArg(t,s,r),this._dispatch("postSectionRender",t);if(!t.noDataUpdate&&!this._noBinding)for(l=o;l<n;++l)this.updateRowData(this._settings[l],s,r-1)},Dt.prototype._dispatchRowExpansionBinding=function(t){if(!this._hasListener("rowExpansionBinding"))return;let e=t.dataSource;if(!e||!e.getDataSource())return;let i=t.fromRowIndex,o=t.toRowIndex,n=e.getVisibleRowIds(!0),s=t.section;t.rowData=null,t.cell=null;let r=!1;for(let l=o-1;l>=i;--l){let i=e.getRowId(l);if(!r){let t=e.getRowExpansionCount(i);if(t>0){l=l+t+1,r=!0;continue}}let o=s.getContextRow(l);if(!o)continue;let h=e.getExpansionParentByRowId(i);if(h)t.originalRowData=e.getRowData(h),t.originalRowId=h,t.rowExpansion=o.rowExpansion=!0;else{if(!o.rowExpansion)continue;t.originalRowData=null,t.originalRowId=null,t.rowExpansion=o.rowExpansion=!1}t.rowId=n[l],t.rowIndex=l,this._dispatch("rowExpansionBinding",t)}t.originalRowData=null,t.originalRowId=null,t.rowExpansion=!1},Dt.prototype._removeColumn=function(t){let e=this._layoutX.getLaneCount();if(t>e&&(t=e),t<=0)return;let i=e-t;this._layoutX.setLaneCount(i);for(let t=this._settings.length;--t>=0;)this._settings[t].getSection().setColumnCount(i);let o=this._columnDefs.slice(i);if(this._columnDefs.length=i,this._onColumnCountChanged(),this._syncLayoutToColumns(i,0,!0),this._hasListener("columnRemoved")){let t={};for(let n=e;--n>=i;){let e=o[n-i];t.colIndex=n,t.columnData=e?e.columnData:null,this._dispatchColumnEvent("columnRemoved",t)}}},Dt.prototype._onSectionDataChanged=function(t){if(this._dispatchingDataChanged)return;let e=this._layoutX.getLaneCount();if(this._dispatchingDataChanged=!!e,!e)return;let i,o,n=t.fromRowIndex,s=t.toRowIndex,r=t.section,l=t.dataSource,h=l&&l.getDataSource()?1:0;r._startBindingSession(!0),h&&(i=l.getVisibleRowIds(!0),o=l.getMultipleRowData(i,n,s),t.dataRows=o);let u="content"===t.sectionType;u&&this._dispatch("beforeContentBinding",t),this._dispatch("preSectionDataBinding",t);let a=this.getDataColumnMap();for(let l=0;l<e;++l)if(r.isColumnActive(l)&&(this.isColumnVisible(l)||this._isAlwaysRenderColumn(l))){let e=this.getColumnDataBindingHandler(l)||this._dataBindingHandler;if(e){let u=a[l];t.dataColumnName=u,t.colIndex=l;for(let a=n;a<s;++a){let n=h?o[a]:null;n&&(t.rowData=n,t.rowId=i[a],t.dataValue=n?n[u]:null,t.rowIndex=a,t.cell=r.getCell(l,a,!1),e(t))}}}this._dispatch("postSectionDataBinding",t),this._dispatchRowExpansionBinding(t),u&&(this._firstRendered||(this._dispatch("firstRendered",t),this._firstRendered=!0),this._dispatch("afterContentBinding",t)),r._startBindingSession(!1),this._dispatchingDataChanged=!1},Dt.prototype.resetInternalState=function(){this._firstRendered=!1},Dt.prototype._updateScrollbar=function(t){return!!t&&(t.isEnabled()&&t.update(),t.isActive())},Dt.prototype._onVScroll=function(t){this._rowVirtualizer.setViewOffset(this._vscrollbar.getScrollTop()),this._dispatchRowPositionChanged()},Dt.prototype._onHScroll=function(t){let e=this._hscrollbar.getScrollLeft();this._colVirtualizer.setViewOffset(e),this.updateColumnBounds(),this._dispatchColumnPositionChanged()},Dt.prototype._onVScrollEnabled=function(){this._updateScrollbarHeight(!0,!1),this._rowVirtualizer.isEnabled()&&this._rowVirtualizer.activate(),this._vscrollbar.getAutoHide()||this._updateVScrollbar()},Dt.prototype._onVScrollDisabled=function(){this._rowVirtualizer.isEnabled()&&this._rowVirtualizer.deactivate()},Dt.prototype._onRowInViewChanged=function(t){let e=t.firstIndex,i=t.lastIndex+1,o=this._settings.length,n=[0,0];for(let t=0;t<o;++t){let o=this._settings[t],s=o.getSection();s&&!s.getFrozenLayout()&&(s.activateRows(e,i,n),this.updateRowData(o,n[0],n[1]-1))}},Dt.prototype._onColInViewChanged=function(t){if(!this.getColumnCount())return;let e=t.prevFirstIndex,i=t.prevLastIndex,o=t.firstIndex,n=t.lastIndex,s=e<o?e:o,r=i>n?i:n;this._activateColumns(o,n,s,r);let l=this.getSectionCount();for(let t=0;t<l;++t){let e=this._settings[t];this.updateRowData(e)}},Dt.prototype._activateColumns=function(t,e,i,o){null==i&&(i=0),null==o&&(o=this.getColumnCount()-1);let n=this._getColActivationList(t,e,i,o);for(let t=this.getSectionCount();--t>=0;)this._settings[t].activateColumns(n,i,o)},Dt.prototype._getColActivationList=function(t,e,i,o){null==i&&(i=0);let n=this.getColumnCount();null==o&&(o=n-1),null==t&&(t=this._colVirtualizer.getFirstIndexInView()),null==e&&(e=this._colVirtualizer.getLastIndexInView());let s=this.getHScrollStartIndex(),r=this.getFirstPinnedRightIndex(),l=new Array(o+1);for(let n=i;n<=o;++n)l[n]=n<s||n>=t&&n<=e||n>=r;return l},Dt.prototype._getColumnDef=function(t){if(t>=0){let e=this._columnDefs[t];return e||(e=this._columnDefs[t]={id:""+Dt._runningColumnId++,columnData:{}}),e}return{columnData:{}}},Dt.prototype._getNestedColumnDef=function(t,e,i){let o=this._getColumnDef(t);if(e){let t=o;o=t[e],o||(o=t[e]={}),i&&(t=o,o=t[i],o||(o=t[i]={}))}return o},Dt.prototype.getColumnId=function(t){return t>=0&&t<this.getColumnCount()&&this._getColumnDef(t).id||""},Dt.prototype._getColumnId=Dt.prototype.getColumnId,Dt.prototype.getColumnIds=function(){let t=this.getColumnCount(),e=new Array(t);for(let i=0;i<t;++i)e[i]=this._getColumnDef(i).id||"";return e},Dt.prototype.setColumnField=function(t,e){this._getColumnDef(t).field=e||""},Dt.prototype.getColumnField=function(t){return t>=0&&t<this.getColumnCount()&&this._getColumnDef(t).field||""},Dt.prototype.getColumnFields=function(){let t=this.getColumnCount(),e=new Array(t);for(let i=0;i<t;++i)e[i]=this._getColumnDef(i).field||"";return e},Dt.prototype.getColumnIndex=function(t){if("number"==typeof t)return t;if(t){let e=t,i=-1,o=this.getColumnCount();for(let t=0;t<o;++t){let o=this._getColumnDef(t);if(e===o.id)return t;e===o.field&&i<0&&(i=t)}return i}return-1},Dt.prototype.getColumnIndices=function(t){let e=[],i=this.getColumnCount(),o=Array.isArray(t)?t:[t],n=o.length;for(let t=0;t<n;++t){let n=this.getColumnIndex(o[t]);n>=0&&n<i&&e.push(n)}return e},Dt.prototype.getColumnIndexMap=function(){let t=this.getColumnCount(),e={},i="";for(let o=0;o<t;++o){let t=this._getColumnDef(o);i=t.field,i&&(e[i]=o),i=t.id,i&&(e[i]=o)}return e},Dt.prototype._onWindowResize=function(){this._updateLayout(),this._rowVirtualizer.setViewOffset(this._vscrollbar.getScrollTop())},Dt.prototype._onMouseMove=function(){this._vscrollbar.flash(),this._hscrollbar.flash()},Dt.prototype._onGridClicked=function(){window.getSelection().toString()||this._element.contains(Lt(this._element))||this.focus()},Dt.prototype._onKeyDown=function(t){if(!function(t){return 9===t.keyCode&&!t.ctrlKey&&!t.altKey&&!t.metaKey}(t))return;let e=Lt(this._element),i=!1;this._firstHiddenInput===e?i=-1:this._lastHiddenInput===e&&(i=1),this._dispatch("tabNavigation",{activeElement:e,firstHiddenInput:this._firstHiddenInput,lastHiddenInput:this._lastHiddenInput,onTheEdge:i,shiftKey:t.shiftKey,event:t}),i&&!t.defaultPrevented&&(i>0&&t.shiftKey?this._firstHiddenInput.focus():i<0&&!t.shiftKey&&this._lastHiddenInput.focus())},Dt.prototype._onRowHightlighted=function(t){if(!this._hasListener("rowHighlighted"))return;let e=t.sender,i=this.getSectionSettings(e.getId());if(null==i)return;i.extendEventArg(t);let o=i.getDataSource();null!==o&&(t.rowId=o.getRowId(t.rowIndex),t.dataRow=o.getRowData(t.rowId)),this._dispatch("rowHighlighted",t)},Dt.prototype._onRowCountChanged=function(t){if(this._disposed)return;let e=t.sender,i=t.prevCount,o=t.rowCount,n=e.getIndex(),s=this._updateSectionIndices(n),r=0;if(i>o)this._layoutY.removeLaneAt(s,i-o),this._layoutY.isHomogeneous()||this._syncSectionRowHeights(e);else{let t=this._layoutY.getDefaultLaneSize(),n=e.getDefaultRowHeight();if(this._layoutY.insertLane(s+i,o-i),n!==t)for(r=i;r<o;++r)this._layoutY.setLaneSize(s+r,n)}let l=t.noBinding,h=n<=this._startVScrollbarIndex||n>=this._getFooterStartIndex(),u=this._frozenFooterCount>0,a=this._updateScrollbarHeight(h,u,l);l&&(this._hasPendingRowChange=!0),this._frozenLayout||a||(this._rowVirtualizer.isVirtualizable()?e.activateRows(this._rowVirtualizer.getFirstIndexInView(),this._rowVirtualizer.getLastIndexInView()):e.activateRows()),this._hasPendingRowChange=!1,u||this._updateVScrollbar(),this._updateColumnSeparators(),i<o?("content"!==this.getSectionSettings(e).getType()&&this.applyColumnsBackgroundColor(e),this._dispatch("rowAdded",t)):i>o&&this._dispatch("rowRemoved",t)},Dt.prototype._onRowHeightChanged=function(t){if(!this._rowHeightSync)return;if(this._disposed)return;if(this._rowHeightConflator.conflate(t))return;let e=this._rowHeightConflator.popAllData(),i=e.length,o=NaN;for(let t=0;t<i;++t){let i=e[t],n=i.section;if(!this._containsSection(n))continue;let s=n.getIndex(),r=i.rowIndex,l=this.getRowIndex(s,r),h=i.changeLength;for(let t=0;t<h;++t)this._layoutY.setLaneSize(l+t,n.getRowHeight(r+t))&&(s>=o||(o=s))}this._rowHeightConflator._needScrollbarUpdate?(this._rowHeightConflator._needScrollbarUpdate=!1,this._updateScrollbarHeight(!0,!0)):o>=0&&(this._dispatchingDataChanged?this._rowHeightTimerId||(this._rowHeightTimerId=setTimeout(this._requestScrollbarUpdate,0)):this._updateScrollbarHeight(o<this._startVScrollbarIndex,o>=this._startVScrollbarIndex)),this._updateColumnSeparators(),this._dispatchRowPositionChanged()},Dt.prototype._containsSection=function(t){for(let e=this._settings.length;--e>=0;)if(this._settings[e].getSection()===t)return!0;return!1},Dt.prototype._onRowAvailable=function(t){if(this._hasPendingRowChange)return;let e=t.sectionIndex;this._dispatchColumnRenderEvent(t,0,this.getColumnCount(),e,e+1,t.prevRowIndex,t.rowIndex)},Dt.prototype._onSectionCountChanged=function(t){if(!this._frozenLayout){if(this._tempFrozenSectionRef){let t=this.getNextSection(this._tempFrozenSectionRef);null!==t&&(this._startVScrollbarIndex=t.getIndex(),this._tempFrozenSectionRef="")}this._startVScrollbarIndex>=0&&this._startVScrollbarIndex<this._getFooterStartIndex()?(this._vscrollbar.enable(),this._vscrollbar.setScrollContent(this,this._getAllSections(),this._startVScrollbarIndex),this._element.appendChild(this._lastHiddenInput),t||this._updateScrollbarHeight(!0,!0),this._syncLayoutToColumns()):this._vscrollbar.disable()}},Dt.prototype._onColumnCountChanged=function(){if(this._frozenLayout||this._disposed)return;let t=this._countPinnedLeftColumns(),e=this._countPinnedRightColumns();this.updateColumnBounds(),this._updateColumnSeparators(),this._hScrollbarEnabled&&t+e<this.getColumnCount()?(this._hscrollbar.enable(),this._colVirtualizer.activate(),this._hscrollbar.setScrollContent(this,this._getAllSections(),t,e)):(this._hscrollbar.disable(),this._colVirtualizer.deactivate(),t=e=0),this._element.classList.toggle("right-pinning",e>0),this._dispatchColumnPositionChanged()},Dt.prototype._onSyncVScroll=function(t){this._vscrollbar.setScrollTop(t.scrollTop)},Dt.prototype._onSyncHScroll=function(t){this._hscrollbar.setScrollLeft(t.scrollLeft)},Dt.prototype._getFooterStartIndex=function(){return this.getSectionCount()-this._frozenFooterCount},Dt.prototype._getVScrollStart=function(){return this._getSectionSize(0,this._startVScrollbarIndex)},Dt.prototype._getFooterSize=function(){return this._frozenFooterCount>0?this._getSectionSize(this._getFooterStartIndex()):0},Dt.prototype._getSectionSize=function(t,e){if(t){if(t<0)return 0}else t=0;null==e&&(e=this.getSectionCount()-t);let i=this._layoutY.getLaneStart(this._sectionStarts[t]),o=t+e;return(e>0?this._layoutY.getLaneStart(this._sectionStarts[o]):0)-i},Dt.prototype._updateScrollbarHeight=function(t,e,i){if(!this._vscrollbar.isEnabled())return!1;let o=e,n=t&&this._startVScrollbarIndex>=0,s=this._rowHeightConflator.isConflating();if(s&&(this._rowHeightConflator._needScrollbarUpdate=!0,o=!1),n&&!s){let t=this.getElement();if(!t)return!1;let e=this.getParent(),i=this._vscrollbar.getParent();i?i!==e&&i.firstElementChild&&(i=i.firstElementChild):(i=t,this._vscrollbar.setParent(i));let o=this._getVScrollStart(),n=this._getFooterSize();i!==t&&(o+=t.clientTop),this._vscrollbar.resetPaneSize();let s=i.clientHeight-(o+n)*this._zoomFactor;this._vscrollbar.setTop(o*this._zoomFactor),this._vscrollbar.setTrackSize(s,s/this._zoomFactor);let r=this._layoutY.getDefaultLaneSize(),l=12*r;s>l&&(l=(Math.ceil(s/r)+4)*r),this._rowVirtualizer.setViewSize(l/this._zoomFactor);let h=this._sectionStarts[this._startVScrollbarIndex],u=this.getFooterCount(),a=0;if(u){let t=this.getSectionCount();a=this._sectionStarts[t]-this._sectionStarts[t-u]}this._rowVirtualizer.setViewBounds(h,a)}else this._rowVirtualizer.validateVirtualization();let r=!1;return i||(r=this._rowVirtualizer.update()),this._vscrollbar.invalidate(o),r},Dt.prototype._updateScrollbarWidth=function(t,e){if(!this._frozenLayout){if(t&&this._hScrollbarEnabled){let t=this.getElement(),e=this._hscrollbar.getParent();e||(e=this.getParent()||t,this._hscrollbar.setParent(e));let i=this._layoutX.getLaneStart(this._pinnedLeftColumnCount),o=this._layoutX.getLaneCount(),n=0,s=this._countPinnedRightColumns();s&&(n=this._layoutX.getLaneStart(o)-this._layoutX.getLaneStart(o-s));let r=e!==t?t.clientLeft:0,l=e.clientWidth-(i+r+n)*this._zoomFactor;s>0&&(l-=this._reservedSpace),this._hscrollbar.setPaneLeft(i),this._hscrollbar.setLeft((i+r)*this._zoomFactor),this._hscrollbar.setTrackSize(l,l/this._zoomFactor);let h=4*this._layoutX.getDefaultLaneSize();l>h&&(h=l),this._colVirtualizer.setViewSize(h/this._zoomFactor),this._colVirtualizer.setViewBounds(this._pinnedLeftColumnCount,s)}else this._colVirtualizer.validateVirtualization();this._colVirtualizer.update(),this._hscrollbar.invalidate(e)}},Dt.prototype._hitTestY=function(t,i){let o;if(i.sectionSettings)o=i.sectionSettings;else{let n;n="number"==i.rowIndex?i.rowIndex:this._layoutY.hitTest(t);let s=n>=0?n:~n,r=e.upperBound(this._sectionStarts,s)-1;if(i.sectionIndex=r,o=this._settings[r],!o)return!1;o.extendEventArg(i)}let n=o.getSection();return null!=i.colIndex&&i.cellElement?i.rowIndex=n.getCellIndex(i.colIndex,i.cellElement):i.rowIndex=rowIndex+n.getRowOffset(),!0},Dt.prototype._syncLayoutToColumns=function(t,e,i){if(this._frozenLayout)return;let o=this._layoutX.getLaneCount(),n=this.fillParentWidth(100);(n||null==t||null==e)&&(t=0,e=o,n=!0);let s=this._settings.length;if(s<=0)return;let r=!1;if(t<e)for(let i=0;i<s;++i)r=this._syncLayoutToSectionColumns(this._settings[i].getSection(),t,e)||r;let l=n||t<this.getHScrollStartIndex()||e>this.getFirstPinnedRightIndex();this._updateScrollbarWidth(l,!0),this.updateColumnBounds(),this._updateColumnSeparators(),this._dispatchColumnPositionChanged(),(r||i)&&this._dispatch("widthChanged",{from:t,to:e,colChanged:t})},Dt.prototype._syncLayoutToSectionColumns=function(t,e,i){null==e&&(e=0),null==i&&(i=this._layoutX.getLaneCount());let o=0;for(let n=e;n<i;++n)o|=t._setColumnWidth(n,this._layoutX.getLaneSize(n));return!(!o||this._frozenLayout||(t._updateColumnLayout(),0))},Dt.prototype._toDataColumnName=function(t){return e.isNumber(t)?this.getDataColumnName(t):t},Dt.prototype._updateSectionIndices=function(t){this._updatePaddingBottomSect()&&--t,t<0&&(t=0);let e=this._settings.length,i=this._settings[0]||null;i!==this._firstSettings&&(this._firstSettings&&this._firstSettings.getSection().removeClass("first"),this._firstSettings=i,this._firstSettings&&this._firstSettings.getSection().addClass("first"));let o=this._settings[e-1]||null;o!==this._lastSettings&&(this._lastSettings&&this._lastSettings.getSection().removeClass("last"),this._lastSettings=o,this._lastSettings&&this._lastSettings.getSection().addClass("last")),this._sectionStarts.length=e+1,this._sectionStarts[0]=0;for(let i=t;i<e;++i){let t=this._settings[i].getSection();t.setIndex(i),t.setRowOffset(this._sectionStarts[i]),this._sectionStarts[i+1]=this._sectionStarts[i]+t.getRowCount()}return this._sectionStarts[t]},Dt.prototype._updateLayout=function(){let t=this.getElement();if(this._disposed||!t.offsetParent)return;this._syncLayoutToColumns(),this._updateScrollbarHeight(!0,!0),this._updateScrollbarWidth(!0,!0);let e=this.getSectionCount();for(let t=0;t<e;++t)this._settings[t].getSection().updateLayout();this._updateColumnSeparators()},Dt.prototype._updateVScrollbar=function(){!this._disposed&&this._vscrollbar.isEnabled()&&(this._vScrollbarConflator.conflate()||this._vscrollbar.update())},Dt._proto=Dt.prototype;const At=Dt,zt="ROW_DEF";let Tt=function(t){let e=this;e._onSectionAdded=e._onSectionAdded.bind(e),e._onMouseDown=e._onMouseDown.bind(e),e._onUIUpdated=e._onUIUpdated.bind(e),e._onColumnAdded=e._onColumnAdded.bind(e),e._onColumnRemoved=e._onColumnRemoved.bind(e),e._onItemSortingClicked=e._onItemSortingClicked.bind(e),e.refresh=e.refresh.bind(e),e._rowDefSorter=e._rowDefSorter.bind(e),e._hosts=[],e._sortLogic={},e._addEvents("preClicked","clicked","preDataSorting","columnSorted"),e._sortStates=[],e._sortingSequence=["a","d"],t&&e.config({sorting:t})};l.inherits(Tt,r),Tt.prototype._hosts=null,Tt.prototype._sortStates,Tt.prototype._maxCount=1,Tt.prototype._dataSorting=!0,Tt.prototype._dblClickAllowed=!1,Tt.prototype._clickTimer=0,Tt.prototype._delayInterval=0,Tt.prototype._lastMouseDown=0,Tt.prototype._initialSort=null,Tt.prototype._mode="",Tt.prototype._sortableColumns=!0,Tt.prototype._sortableIndicator=!1,Tt.prototype._solarTheme=!1,Tt.prototype._sortLogic,Tt.prototype._userManagedLogic=!1,Tt.prototype._disabled=!1,Tt.prototype._frozenIndicator=!1,Tt.prototype._rowDefMode=!1,Tt.prototype._userComparer=null,Tt._icons={},Tt.prototype._sortingSequence,Tt.prototype._sortingSequenceMap=null,Tt.prototype.getName=function(){return"SortableTitlePlugin"},Tt.prototype.initialize=function(t,e){this._hosts.indexOf(t)>=0||(this._hosts.push(t),1===this._hosts.length&&(t.listen("columnAdded",this._onColumnAdded),t.listen("columnRemoved",this._onColumnRemoved)),t.listen("sectionAdded",this._onSectionAdded),t.listen("postSectionRender",this._onUIUpdated),t.listen("dataSourceChanged",this.refresh),this.config(e))},Tt.prototype.unload=function(t){let e=this._hosts.indexOf(t);e<0||(this._hosts.splice(e,1),t.unlisten("sectionAdded",this._onSectionAdded),t.unlisten("postSectionRender",this._onUIUpdated),t.unlisten("dataSourceChanged",this.refresh),t.unlisten("columnAdded",this._onColumnAdded),t.unlisten("columnRemoved",this._onColumnRemoved),this._hosts.length<=0&&this._clickTimer&&(clearTimeout(this._clickTimer),this._clickTimer=0))},Tt.prototype.afterInit=function(){let t=this;t.setSortLogics(t._sortLogic);let e=t._initialSort;null!=e&&(Array.isArray(e)?1===t._maxCount?t.sortColumns(e.slice(0,1)):t.sortColumns(e):t.sortColumns([e]))},Tt.prototype.config=function(t){if(!t)return;let e=this,i=t.icons;null!=i&&i.sorting&&(Tt._icons=i.sorting);let o=t.themeName;!o||o.indexOf("solar")>=0?e._solarTheme=!0:e._solarTheme=!1,e._initialSort=e._initialSortByColumnField(t);let n=t.sorting;if(!n)return;n.ROW_DEF&&(this._rowDefMode=!0),n.userManagedLogic&&(e._userManagedLogic=!0);let s=n.multiColumn||n.multicolumn;if(null!=s&&(!0===s&&(s=-1),!1===s&&(s=1),e.setSortableColumnCount("number"==typeof s&&s>0?s:-1)),s=n.sortableIndicator,null!=s&&(e._sortableIndicator=s),s=n.disabled,null!=s&&(e._disabled=!!s),s=n.threeStatesSorting,null!=s&&e.disableTwoStateSorting(s),s=n.sortingSequence,null!=s&&Array.isArray(s)&&(e._sortingSequence=s),s=n.mode,null!=s&&(e._mode=s,"manual"===s&&e.disableDataSorting()),s=n.indicatorOnly,null!=s&&e.disableDataSorting(s),s=n.disableDoubleClickToSort,null!=s&&e.disableDoubleClickToSort(s),s=n.columnSorted,"function"==typeof s&&e.listen("columnSorted",s),s=n.preClicked,"function"==typeof s&&e.listen("preClicked",s),s=n.clicked,"function"==typeof s&&e.listen("clicked",s),s=n.preDataSorting,"function"==typeof s&&e.listen("preDataSorting",s),s=n.sortableColumns,null!=s&&(e._sortableColumns=s),s=n.initialSort,"object"==typeof s&&(e._initialSort=s),s=n.sortLogic,"object"==typeof s)for(let t in s)"function"==typeof s[t]&&(e._sortLogic[t]=s[t])},Tt.prototype.getConfigObject=function(t){let e=t||{},i=e.columns;i||(i=e.columns=[]);let o=this._hosts[0];if(!o)return e;let n,s,r,l,h,u=this.getSortedColumns();if(1===this._maxCount&&null!=u)for(r=u.length,s=0;s<r;s++){let t=u[s],e=t.colIndex;n=i[e],n||(n=i[e]={}),n.sortOrder=t.sortOrder}for(r=o.getColumnCount(),s=0;s<r;++s)n=i[s],n||(n=i[s]={}),l=this._getSortOptions(s),l&&(this._sortableColumns?l.disabled&&(n.sortable=!1):l.disabled||(n.sortable=!0),h=l.field,h&&(null!=n.field&&n.field!==h&&(n.sortBy=h),this._sortingSequenceMap&&this._sortingSequenceMap[h]&&(n.sortingSequence=this._sortingSequenceMap[h])));let a=e.sorting;a||(a=e.sorting={});let p=u;null!=p&&(a.initialSort=p),p=this._sortableIndicator,!1!==p&&(a.sortableIndicator=p),1!==this._maxCount&&(a.multiColumn=-1===this._maxCount||this._maxCount),this._dblClickAllowed&&(a.disableDoubleClickToSort=!this._dblClickAllowed),p=this._sortableColumns,!0!==p&&(a.sortableColumns=p),p=this._dataSorting,!0!==p&&(a.indicatorOnly=p),this._disabled&&(a.disabled=!0);let _=this._sortingSequence,d=!0;return 2===_.length&&"a"===_[0]&&"d"===_[1]&&(d=!1),d&&(a.sortingSequence=_.slice()),j(e.sorting)&&delete e.sorting,e},Tt.prototype.getColumnMenu=function(t,e){e||(e={});let i=e.menus;i||(i=e.menus=[]);let o=i[0];o||(o=i[0]={menuItems:[]});let n=this.getSortOrder(t),s={indexScore:100,label:"Sort Column",icon:"sort-a-to-z",group:"FREQUENTLY_USED",subMenu:{menuItems:[{indexScore:3,label:"Ascending",radioMode:!0,value:{colIndex:t,order:"a"},selected:"a"===n,click:this._onItemSortingClicked},{indexScore:2,label:"Descending",radioMode:!0,value:{colIndex:t,order:"d"},selected:"d"===n,click:this._onItemSortingClicked},{indexScore:1,label:"Un-Sort",radioMode:!0,value:{colIndex:t,order:"n"},selected:"n"===n,click:this._onItemSortingClicked}]}};return o.menuItems.push(s),e},Tt.prototype._onItemSortingClicked=function(t){this._hosts[0].getPlugin("ColumnMenuPlugin").hide();let e=t.currentTarget.value,i=e.colIndex,o=e.sortOrder;this.sortColumn(i,o)},Tt.prototype.getIcons=function(){return Tt._icons},Tt.prototype.setSortLogics=function(t){if(null!=t){let e=this._hosts[0];if(e){let i=e.getDataSource();for(let e in t)this._setSortLogic(i,e,t[e])}}},Tt.prototype.setSortLogic=function(t,e){if("string"==typeof t){let i=this._hosts[0];if(i){let o=i.getDataSource();this._setSortLogic(o,t,e)}}},Tt.prototype._setSortLogic=function(t,e,i){t&&"string"==typeof e&&("*"===e?t.setSortingLogic(i):t.setColumnSortingLogic(e,i))},Tt.prototype.getSortOrder=function(t){let e=null!=t?this.getSortPriority(t):0,i=this._sortStates[e];return(i?i.sortOrder:"")||"n"},Tt.prototype.getSortedColumnIndex=function(t){return this._getColumnIndex(this._sortStates[t||0])},Tt.prototype.getSortPriority=function(t,e){let i=this._hosts[0];if(i){let o,n=this._sortStates.length;if(t>=0){let e=i.getColumnId(t);if(e)for(o=0;o<n;++o)if(this._sortStates[o].colId===e)return o}else if(e)for(o=0;o<n;++o){let t=this._sortStates[o];if(t.colId===e)return o;if(t.field===e)return o}}return-1},Tt.prototype.isColumnSorted=function(t){return this.getSortPriority(t)>=0},Tt.prototype.getSortedColumns=function(){let t=this._sortStates.length;if(t<=0)return null;let e=new Array(t);for(let i=0;i<t;++i){let t=this.getSortedColumnIndex(i),o=this._sortStates[i],n={},s="";t>=0&&(n.colIndex=t,s=this._getColumnId(t)),s&&(n.colId=s);let r=o.field||"";r&&(n.field=r),n.sortOrder=o.sortOrder||"n",e[i]=n}return e},Tt.prototype.isSorting=function(){return!!this._sortStates.length},Tt.prototype.sortColumn=function(t,e,i){let o=this._prepareSorting(t,e);if(this._sortColumn(o,i),i&&i.isUserAction){let t={};t.colIndex=o.colIndex,t.sortOrder=this.getSortOrder(o.colIndex),t.dataColumnName=this.getColumnSortingField(o.colIndex),this._dispatch("clicked",t)}},Tt.prototype.sortColumns=function(t,e){if(Array.isArray(t)){let i=t.length,o=new Array(i);for(let e=0;e<i;e++)o[e]=this._prepareSorting(t[e]);this._sortColumn(o,e)}},Tt.prototype.clearSortState=function(t){this._popSortState(0,t)&&this.updateSortSymbols()},Tt.prototype.refresh=function(){this._sortStates.length&&(this._sortDataView(),this.updateSortSymbols())},Tt.prototype.restoreUserActions=Tt.prototype.refresh,Tt.prototype.setSortableColumnCount=function(t){this._maxCount=t||1,this._popSortState(this._maxCount)},Tt.prototype.getSortingStates=function(){return this._sortStates},Tt.prototype.updateSortSymbols=function(){if(!this._disabled)for(let t=this._hosts.length;--t>=0;)this._updateSortableIndicator(t)},Tt.prototype.getDataColumnMap=function(){let t=this._hosts[0],e=[];if(t){let i=t.getColumnCount();for(let t=0;t<i;++t)e[t]=this.getColumnSortingField(t)}return e},Tt.prototype.getDataColumnNames=Tt.prototype.getDataColumnMap,Tt.prototype.setDataColumnMap=function(t){if(Array.isArray(t))for(let e=t.length;--e>=0;)this.setColumnSortingField(e,t[e])},Tt.prototype.setDataColumnNames=Tt.prototype.setDataColumnMap,Tt.prototype.getColumnSortingField=function(t){let e=this._getSortOptions(t),i=e?e.field:null;if(null==i&&!this._rowDefMode){let o=this._hosts[0];o&&(i=o.getColumnField(t),i||(i=o.getDataColumnName(t)),i&&e&&(e.field=i))}return i||""},Tt.prototype.setColumnSortingField=function(t,e,i,o){if("number"==typeof t&&null!=e){let n=this._newSortOptions(t);e||(e=""),n.field!==e&&(n.field=e),null==i||this._userManagedLogic||n.sortLogic!==i&&(n.sortLogic=i||null,o&&i&&(i.rowSorting=!0))}};let Vt=function(t){return t.field||""};Tt.prototype.getColumnSortingFields=function(){return this._sortStates.map(Vt)},Tt.prototype.setFirstSortOrder=function(t,e){"a"!==(e=e?Tt._toSortOrder(e):"a")&&"d"!==e&&(e="a");let i=null;i=Array.isArray(t)?t:[t];let o=i.length;for(let t=0;t<o;++t){let o=i[t],n=this.getSortingSequence(o).slice(),s=n.indexOf(e);s>=0&&n.splice(s,1),n.unshift(e),this.setSortingSequence(n,o)}},Tt.prototype.disableTwoStateSorting=function(t){let e=this._sortingSequence.indexOf("n");!1===t?e>=0&&this._sortingSequence.splice(e,1):e<0&&this._sortingSequence.push("n")},Tt.prototype.freezeIndicator=function(t){let e=this._frozenIndicator;if(this._frozenIndicator=!1!==t,e&&!this._frozenIndicator)for(let t=this._hosts.length;--t>=0;)this._updateSortableIndicator(t)},Tt.prototype.disableSortSymbols=function(t){},Tt.prototype.disableDataSorting=function(t){this._dataSorting=!1===t},Tt.prototype.disableDoubleClickToSort=function(t){this._dblClickAllowed=!t},Tt.prototype.disableCellClick=function(t,e){t&&t.enableClass("no-sort",!1!==e)},Tt.prototype.disableColumnSorting=function(t,e){if(e=!1!==e,"number"==typeof t)this._disableColumnSorting(t,e);else if(Array.isArray(t)){let i=t.length;for(let o=0;o<i;++o)this._disableColumnSorting(t[o]||0,e)}},Tt.prototype._disableColumnSorting=function(t,e){let i=this._newSortOptions(t);i.disabled!==e&&(i.disabled=e)},Tt.prototype.setClickDelayInterval=function(t){this._delayInterval=null!=t?t:500},Tt.prototype._initialSortByColumnField=function(t){let e=t.columns,i=e?e.length:0;for(let t=0;t<i;t++){let i=e[t].defaultSort;if(i)return{colIndex:t,sortOrder:i}}return null},Tt.prototype._onSectionAdded=function(t){if("title"!==t.sectionType)return;let e=t.section;0===e.getIndex()&&(e.listen("mousedown",this._onMouseDown),e.listen("click",this._onClickTitle.bind(this,t.sender),0))},Tt.prototype._onUIUpdated=function(t){"title"===t.sectionType&&this.updateSortSymbols()},Tt.prototype._canClickToSort=function(t){if(this._disabled)return!1;let e=t.grid;if(!e||!e.getElement())return!1;let i=this._getPlugin("CellEditingPlugin");if(i&&i.isEditing())return!1;if(this._dispatch("preClicked",t),t.cancel)return!1;let o=t.colIndex,n=t.section,s=t.rowIndex;return!!this._isCellSortable(n,o,s)},Tt.prototype._proceedSorting=function(t){if(this._clickTimer=0,this._canClickToSort(t)){let e=t.colIndex;this.sortColumn(e,null,{isUserAction:!0});let i=t.grid;i&&i.focus&&i.focus()}},Tt.prototype._onMouseDown=function(t){t.button||(this._lastMouseDown=t.timeStamp)},Tt.prototype._getPlugin=function(t){let e=this._hosts[0];return e?e.getPlugin(t):null},Tt.prototype.clickTitleByMouse=function(t,e){this._onClickTitle(t,e)},Tt.prototype._onClickTitle=function(t,e){if(this._disabled)return;if(2===e.detail&&!this._dblClickAllowed)return void(this._clickTimer&&(clearTimeout(this._clickTimer),this._clickTimer=0));if(e.shiftKey||e.ctrlKey||e.altKey||e.metaKey)return;if(!(e.timeStamp-this._lastMouseDown<500))return;let i=t.getRelativePosition(e);if(!i.hit)return;let o=this._getPlugin("ColumnSelectionPlugin");if(o&&o.isEnabled()){let t=i.colIndex;if(!o.isSelectedColumn(t))return}i.target=e.target,this._delayInterval>0?this._clickTimer||(this._clickTimer=setTimeout(this._proceedSorting.bind(this,i),this._delayInterval)):this._proceedSorting(i)},Tt.prototype._popSortState=function(t,e){if(t<0||this._sortStates.length<=t)return!1;let i=!1;for(let e=this._sortStates.length;--e>=t;)this._clearSortSymbols(this._sortStates[e]),i=!0;return this._sortStates.length=t,this._sortDataView(e),i},Tt._toSortOrder=function(t){return!t||"string"!=typeof t||"d"!==(t=t.charAt(0).toLowerCase())&&"a"!==t?"n":t},Tt.prototype.getSortingSequence=function(t){return this._sortingSequenceMap&&(t||0===t)&&("string"!=typeof t&&(t=this.getColumnSortingField(t)),this._sortingSequenceMap[t])?this._sortingSequenceMap[t]:this._sortingSequence},Tt.prototype.setSortingSequence=function(t,e){if(Array.isArray(t))t.length||(t=null);else if(t)return;let i;if(null!=e&&("string"==typeof e?i=e:"number"==typeof e&&(i=this.getColumnSortingField(e))),t){let e=t.map(Tt._toSortOrder);i?(this._sortingSequenceMap||(this._sortingSequenceMap={}),this._sortingSequenceMap[i]=e):this._sortingSequence=e}else i?this._sortingSequenceMap&&delete this._sortingSequenceMap[i]:this._sortingSequence=this._sortingSequence.length>2?["a","d","n"]:["a","d"]},Tt.prototype.clearAllColumnSortingSequences=function(){this._sortingSequenceMap=null},Tt.prototype._rowDefSorter=function(t,e,i,o){return this._userComparer(t[zt].getRowData(),e[zt].getRowData(),i,o)},Tt.prototype.sortSeparators=function(t){let e=this._hosts[0].getDataSource();if(t)this._rowDefMode?(this._userComparer=t,e.sortSeparators(this._rowDefSorter),this._userComparer=null):e.sortSeparators(t);else{let t=e.getSortingLogics(),i=[],o=[],n=this._sortStates.length;for(let t=0;t<n;t++){let e=this._sortStates[t],n=this._rowDefMode?zt:e.field;i.push(e.sortOrder),o.push(n)}e.sortSeparators(t,i,o)}},Tt.prototype._prepareSorting=function(t,e){if(!this._maxCount)return null;let i=this._hosts[0];if(!i)return null;let o=-1,n="";"number"==typeof t?o=t:"string"==typeof t?(n=t,o=this._getColumnIndex(n)):t&&"object"==typeof t&&(n=t.colId||t.field,n?o=this._getColumnIndex(n):"number"==typeof t.colIndex&&(o=t.colIndex),e||(e=t.sortOrder||t.order||null));let s="",r=null;if(o>=0){s=this.getColumnSortingField(o);let t=this._getSortOptions(o);t&&(r=t.sortLogic)}else n&&(s=n);let l=this.getSortPriority(o,s),h=l>=0?this._sortStates[l]:null,u=h?h.sortOrder:"n",a="n";if(null==e){let t=this.getSortingSequence(s),e=t.indexOf(u);e=e<0?0:(e+1)%t.length,a=t[e]}else a=Tt._toSortOrder(e);if(h){if(u===a)return this.updateSortSymbols(),null;this._sortStates.splice(l,1),this._clearSortSymbols(h)}if("a"===a||"d"===a){if(o<0&&!s)return null;if(!h){h={};let t=i.getColumnId(o);t&&(h.colId=t)}h.field=s,h.sortLogic=r||null,this._sortStates.push(h)}h&&("n"!==u?h.prevOrder=u:delete h.prevOrder,h.order=a,h.sortOrder=a);let p=[];if(this._maxCount>0)for(;this._sortStates.length>this._maxCount;){let t=this._clearSortSymbols(this._sortStates.shift());null!==t&&p.push(t)}return{colIndex:o,sortedField:s,sortOrder:a||"n",prevOrder:u,clearedSortColIndexes:p}},Tt.prototype._sortColumn=function(t,e){if(!t)return;this._sortDataView(e),this.updateSortSymbols();let i=null;if(Array.isArray(t)){let e=t.length;for(let o=0;o<e;++o){let e=t[o];e&&(i?(i.colIndices||(i.colIndices=[],i.sortedFields=[],i.sortOrders=[],i.prevOrders=[]),i.colIndices.push(e.colIndex),i.sortedFields.push(e.sortedField),i.sortOrders.push(e.sortOrder),i.prevOrders.push(e.prevOrder)):i=e)}i=t[0]}else i=t;this._dispatch("columnSorted",i)},Tt.prototype._onColumnAdded=function(t){let e=this,i=t.colIndex,o=t.context||{},n=!!e._sortableColumns,s=o.field,r=o.sortBy;null!=r&&(n=!!r,s=r),null!=o.sortable&&(n=!!o.sortable);let l=o.sortLogic||o.sortingLogic||o.sorter;l||(l=e._sortLogic[s]),"function"!=typeof l&&(l=null);let h=o.sortingSequence;null!=h&&s&&e.setSortingSequence(h,s),n?e.setColumnSortingField(i,s,l,o.rowSorting):e.disableColumnSorting(i,!0);let u=o.sortOrder||o.sort;null!=u&&(u=Tt._toSortOrder(u),"n"!==u&&(e.clearSortState(),e.sortColumn(i,u)))},Tt.prototype._onColumnRemoved=function(t){let e=this._sortStates.length;if(!e)return;let i=t.colId;if(i)for(let t=0;t<e;++t){let e=this._sortStates[t];if(e.colId===i){this._sortStates.splice(t,1),this._clearSortSymbols(e),this._sortDataView();break}}},Tt._toRowDefField=function(){return zt},Tt.prototype._sortDataView=function(t){if(t=t||{},this._dispatch("preDataSorting",t),!this._dataSorting)return;let e=this._sortStates.length;this._userManagedLogic&&e>1&&(e=1);let i=null,o=null,n=null;if(e){i=new Array(e),o=new Array(e);for(let t=0;t<e;++t)i[t]=this._sortStates[t].sortOrder,o[t]=this._sortStates[t].sortLogic;n=this._rowDefMode?this._sortStates.map(Tt._toRowDefField):this.getColumnSortingFields(),this._userManagedLogic&&n.length>1&&(n=n.slice(0,1))}for(let e=this._hosts.length;--e>=0;){let s=this._hosts[e].getDataSource();if(s){let e=1==t.isUserAction;s.sort(n,i,o,e)}}},Tt.prototype._clearSortSymbols=function(t){let e=t.targetCells;if(!e)return null;let i=null;for(let t=e.length;--t>=0;){let o,n=e[t];n.removeClass("sorting"),n.removeClass("sortable"),n.removeFloatingIcon("sort-symbol"),n.removeFloatingIcon("priority-symbol"),null==i&&(o=n.getSection())&&(i=o.getColumnIndex(n.getParent()))}return e.length=0,i},Tt.prototype._updateSortableIndicator=function(t){let e=this,i=e._hosts[t];if(!i||this._frozenIndicator)return;let o=i.getSection("title");if(null!=o)for(let i=o.getColumnCount();--i>=0;){let n=o.getRowCount();for(let s=0;s<n;s++){let r=o.getCell(i,s,!0);if(!r)continue;if(r.removeClass("sorting"),r.removeClass("sortable"),r.removeClass("asc"),r.removeClass("desc"),r.removeClass("edge-indicator"),r.removeFloatingIcon("sort-symbol"),r.removeFloatingIcon("priority-symbol"),r.removeFloatingIcon("sortable-indicator"),s!==n-1)continue;if(!e._isCellSortable(o,i,s))continue;r.addClass("sortable");let l,h,u=e.getSortPriority(i),a=e._sortStates[u];if(a&&"n"!==a.sortOrder){if(a.targetCells||(a.targetCells=[]),a.targetCells[t]=r,"a"===a.sortOrder?r.addClass("asc"):r.addClass("desc"),r.addClass("sorting"),e._solarTheme){let t;"a"===a.sortOrder?(t="▲",h=Tt._icons.ascending):(t="▼",h=Tt._icons.descending),l=e._createIconElem(h,t),l.className="sort-symbol",r.insertFloatingIcon(l,0)}else r.addClass("edge-indicator");e._sortStates.length>1&&(l=document.createElement("span"),l.className="priority-symbol",l.textContent=u+1,r.insertFloatingIcon(l,1))}else e._sortableIndicator&&(h=Tt._icons.sortable,l=e._createIconElem(h,"◊"),l.className="sortable-indicator",r.insertFloatingIcon(l,0))}}},Tt.prototype._createIconElem=function(t,e){let i;return t&&"string"==typeof t?(i=document.createElement("ef-icon"),i.setAttribute("icon",t)):(i=document.createElement("span"),i.textContent=e),i},Tt.prototype._getColumnIndex=function(t){if(null!=t){let e=this._hosts[0];if(e)return"number"==typeof t?t:"string"==typeof t?e.getColumnIndex(t):e.getColumnIndex(t.colId)}return-1},Tt.prototype._getColumnId=function(t){let e=this._hosts[0];return e&&null!=t?e.getColumnId(t):""},Tt.prototype._getSortOptions=function(t){let e=this._hosts[0];return e&&e.getColumnData(t).sortableTitle||null},Tt.prototype._newSortOptions=function(t){let e=this._hosts[0],i=null;if(e&&t>=0){let o=e.getColumnData(t);i=o.sortableTitle,i||(i=o.sortableTitle={})}return i||{}},Tt.prototype._isCellSortable=function(t,e,i){let o=this._getSortOptions(e);if(o){if(o.disabled)return!1;let t=o.field;if(null!=t&&!t)return!1}let n=t.getCell(e,i,!0);return!n.hasClass("no-sort")&&n===t.getCell(e,t.getRowCount()-1,!0)&&!n.getParent().classList.contains("collapsed")},Tt._proto=Tt.prototype;const Et=Tt;var Pt=window.tr;Pt||(Pt=window.tr={});var Mt=Pt.grid;Mt||(Mt=Pt.grid={}),Object.assign(Pt,e),Pt.EventDispatcher=r,Pt.ElementWrapper=u,Pt.ILayoutGrid=y,Pt.LayoutGrid=N,Pt.Grid=At,Pt.ColumnStats=ut,Pt.DataCache=Z,Pt.DataTable=lt,Pt.DataView=ct,Pt.SegmentCollection=st,Mt.CellFloatingPanel=p,Mt.Cell=d,Mt.CellSpan=L,Mt.CellSpans=A,Mt.Column=C,Mt.Scrollbar=M,Mt.HScrollbar=F,Mt.VScrollbar=bt,Mt.VirtualizedLayoutGrid=Rt,Mt.Conflator=ft,Mt.Reverter=E,Mt.TrackLayout=g,Mt.Virtualizer=St,Mt.SelectionList=T,Mt.SectionSettings=mt,Mt.SortableTitlePlugin=Et})();
|
1
|
+
(()=>{"use strict";let t={};t.isIE=function(){let t=window.navigator.userAgent;return t.indexOf("MSIE ")>0||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0}(),t.isTouchDevice=!!(navigator.maxTouchPoints&&navigator.maxTouchPoints<256||navigator.msMaxTouchPoints&&navigator.msMaxTouchPoints<256),t.isSafari=function(){let t=navigator.userAgent;return!/Chrome|Android|CriOS|FxiOS|EdgiOS/i.test(t)&&/Safari/i.test(t)}(),t.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),t.getElement=function(e){return t.isElement(e)?e:e&&t.isFunction(e.getElement)?e.getElement():null},t.isElement=function(t){return!!t&&1===t.nodeType},t.isEmpty=function(e,i){return null==e||void 0===e||!i&&""===e||t.isArray(e)&&0===e.length},t.isNumber=function(t){return"number"==typeof t&&isFinite(t)},t.isString=function(t){return"string"==typeof t},t.isArray=Array.isArray,t.isFunction=function(t){return"function"==typeof t},t.getClientPosition=function(t,e){let i=e||{};if(t.getBoundingClientRect){let e=t.getBoundingClientRect();i.x=e.left,i.y=e.top}else i.x=t.clientX,i.y=t.clientY;return i},t.getRelativePosition=function(e,i,o){o=t.getClientPosition(e,o);let n=t.getClientPosition(i);return o.x-=n.x,o.y-=n.y,o},t.moveArrayItem=function(t,e,i){if(!t)return null;let o=t.length;if(e>=o&&i>=o)return t;let n=t.splice(e,1)[0];return i<o?t.splice(i,0,n):t[i]=n,t},t.pushArrayItems=function(t,e){let i=e?e.length:0;if(i>0)if(i<1e5)i>1?Array.prototype.push.apply(t,e):t.push(e[0]);else{let o=0,n=0;for(;o<i;)n+=1e5,Array.prototype.push.apply(t,e.slice(o,n)),o=n}return t},t.insertEmptyItems=function(e,i,o){if(o>0)if(o>1){let n=e.slice(i);e.length=i,e.length+=o,t.pushArrayItems(e,n)}else e.splice(i,0,null)},t.cycleArray=function(t,e){if(e>0&&t&&e<t.length){let i=t.splice(0,e);return t.concat(i)}return t||null},t.lowerBound=function(e,i,o,n,s){(null==o||o<0)&&(o=0),(null==n||n<0||n>e.length)&&(n=e.length),o>n&&(o=n),null==s&&(s=t._defaultLessComparator);let r=0;for(;n>o;)r=o+n>>1,s(e[r],i)?o=r+1:n=r;return o},t.upperBound=function(e,i,o,n,s){let r=t.lowerBound(e,i,o,n,s);for(;e[r]===i;)++r;return r},t.stringFormat=function(t){let e=Array.prototype.slice.call(arguments,1);return t.replace(/{(\d+)}/g,(function(t,i){return null!=e[i]?e[i]:t}))},t._defaultLessComparator=function(t,e){return t<e},t._deprecatedFunction=function(){console.warn("Calling deprecated method")},t.calculatePercent=function(t,e,i){if(!t&&0!==t||!e&&0!==e||!i&&0!==i)return NaN;if(i===t)return 50;let o=(e-t)/(i-t);return o<0?0:o>1?100:100*o},t.closestElement=function(t,e){let i=t;for(;i;){if(i.classList&&i.classList.contains(e))return i;i=i.parentNode||i.host}return null},t._preventDefault=function(t){t.preventDefault(),t.stopPropagation()};const e=t;let o=function(t){this.dispatch=this.dispatch.bind(this),this._listeners=[],this.setSender(t)};o.prototype.listen=function(t,i){if(t&&e.isFunction(t)&&this._listeners.indexOf(t)<0)if(null==i)this._listeners.push(t);else{t._priority=i;let n=e.lowerBound(this._listeners,t,0,this._listeners.length,o.listenerComparer);this._listeners.splice(n,0,t)}},o.prototype.unlisten=function(t){if(t){let e=this._listeners.indexOf(t);e>=0&&this._listeners.splice(e,1)}},o.prototype.unlistenAll=function(){this._listeners.length=0},o.prototype.getListenerCount=function(){return this._listeners.length},o.prototype.hasListener=function(){return this._listeners.length>0},o.prototype.dispatch=function(t){if(this._enabled&&!(this._listeners.length<=0)){this._dispatching&&window.console.log("WARNING: There is an error in one of your binding methods."),this._dispatching=!0,null==t&&(t={}),null!==this._sender&&(t.sender=this._sender),null!==this._extender&&this._extender(t);for(let e=0;e<this._listeners.length;e++)this._listeners[e](t);null!==this._sender&&(t.sender=null),this._dispatching=!1}},o.prototype.isDispatching=function(){return this._dispatching},o.prototype.isEnabled=function(){return this._enabled},o.prototype.enable=function(t){this._enabled=!1!==t},o.prototype.disable=function(t){this._enabled=!1===t},o.prototype.setSender=function(t){this._sender=t||null},o.prototype.setEventArgExtender=function(t){this._extender=null!=t?t:null},o.listenerComparer=function(t,e){return null==e._priority||t._priority>=e._priority},o.prototype._listeners=null,o.prototype._sender=null,o.prototype._extender=null,o.prototype._enabled=!0,o.prototype._dispatching=!1,o._proto=o.prototype;const n=o;let s=function(){};s.prototype._customEvents=null,s.prototype.listen=function(t,e,i){this._customEvents&&this._customEvents[t]&&this._customEvents[t].listen(e,i)},s.prototype.unlisten=function(t,e){this._customEvents&&this._customEvents[t]&&this._customEvents[t].unlisten(e)},s.prototype.unlistenAll=function(t){if(t)this._customEvents&&this._customEvents[t]&&this._customEvents[t].unlistenAll();else for(let t in this._customEvents)this._customEvents[t].unlistenAll()},s.prototype._addEvent=function(t){t&&(this._customEvents||(this._customEvents={}),this._customEvents[t]||(this._customEvents[t]=new n(this)))},s.prototype._addEvents=function(t){let e=Array.isArray(t)?t:arguments,i=e.length;for(let t=0;t<i;++t)this._addEvent(e[t])},s.prototype._isEventDispatching=function(t){let e=this._customEvents[t];return!!e&&e.isDispatching()},s.prototype._disableEvent=function(t,e){let i=this._customEvents[t];i&&i.disable(e)},s.prototype._hasListener=function(t){return!(!this._customEvents||!this._customEvents[t])&&this._customEvents[t].hasListener()},s.prototype._dispatch=function(t,e){this._customEvents[t].dispatch(e)},s._proto=s.prototype;const r=s;const l={inherits:function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.base=function(t,i,o){i||(i="constructor");let n=arguments.length,s=new Array(n);for(let t=2;t<n;t++)s[t-2]=arguments[t];return e.prototype[i].apply(t,s)}}};let h=function(t){this._element=t||document.createElement("div")};l.inherits(h,r),h.prototype._element=null,h.prototype._content=null,h.prototype._textSpan=null,h.prototype._nativeEvents=null,h._passiveEvents=null,h.prototype.getContent=function(t){return t?this._element.children:this._element.lastChild},h.prototype.setContent=function(t,i){if(null==t||t!=t?t=null:1!==t.nodeType&&11!==t.nodeType&&(null==t.getElement?(e.isString(t)||(t+=""),null==this._textSpan&&(this._textSpan=document.createElement("span")),this._textSpan.textContent=t,t=this._textSpan):t=t.getElement()),t!==this._content){for(this._content=t;null!==this._element.firstChild;)this._element.removeChild(this._element.firstChild);null!==this._content&&this._element.appendChild(this._content)}return i&&t&&t.setAttribute("title",i),this._content},h.prototype.addContent=function(t){return null==(t=e.getElement(t))?null:(this._content=this._element.children,this._element.appendChild(t),t)},h.prototype.removeContent=function(t){return null!=(t=e.getElement(t))&&(this._content=this._element.children,this._element.removeChild(t),!0)},h.prototype.listen=function(t,e,i){if(this._customEvents&&this._customEvents[t])return void this._customEvents[t].listen(e,i);this._nativeEvents||(this._nativeEvents={});let o=this._nativeEvents[t];if(!o){if(o=new n,this._nativeEvents[t]=o,o.dispatch=o.dispatch.bind(o),!h._passiveEvents){let t=!1;try{let e=Object.defineProperty({},"passive",{get:function(){return t=!0,!1}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(t){}if(t){let t={passive:!0};h._passiveEvents={touchstart:t,touchmove:t}}else h._passiveEvents={}}this._element.addEventListener(t,o.dispatch,h._passiveEvents[t]||!1)}o.listen(e,i)},h.prototype.unlisten=function(t,e){if(this._customEvents&&this._customEvents[t])this._customEvents[t].unlisten(e);else if(this._nativeEvents){let i=this._nativeEvents[t];i&&i.unlisten(e)}},h.prototype.unlistenAll=function(t){if(this._customEvents)if(t)this._customEvents[t]&&this._customEvents[t].unlistenAll();else for(let t in this._customEvents)this._customEvents[t].unlistenAll();if(this._nativeEvents)if(t)this._nativeEvents[t]&&(this._unlistenAll(t),delete this._nativeEvents[t]);else{for(let t in this._nativeEvents)this._unlistenAll(t);this._nativeEvents=null}},h.prototype._unlistenAll=function(t){let e=this._nativeEvents[t];this._element.removeEventListener(t,e.dispatch,!1),e.unlistenAll()},h.prototype.dispose=function(){this._dispose()},h.prototype._dispose=function(){this.setParent(null),this.unlistenAll(),this._element=this._content=this._textSpan=null,this._customEvents=this._nativeEvents=null},h.prototype.setEventArgExtender=function(t,e){if(this._customEvents){let i=this._customEvents[t];i&&i.setEventArgExtender(e)}},h.prototype.getElement=function(){return this._element},h.prototype.getNextSibling=function(){return this._element.nextSibling},h.prototype.getParent=function(){return this._element.parentNode},h.prototype.setParent=function(t,e){this._setParent(t,e)},h.prototype._setParent=function(t,i){null!==(t=e.getElement(t))?i?t.insertBefore(this._element,t.firstChild):t.appendChild(this._element):null!==this._element.parentNode&&this._element.parentNode.removeChild(this._element)},h.prototype.insertBefore=function(t){this._insertBefore(t)},h.prototype._insertBefore=function(t){if(null==(t=e.getElement(t)))return void this.setParent(this.getParent());let i=t.parentNode;null!=i&&i.insertBefore(this._element,t)},h.prototype.insertAfter=function(t){(t=e.getElement(t))?t.nextSibling?this.insertBefore(t.nextSibling):this.setParent(t.parentNode):this.setParent(this.getParent(),!0)},h.prototype.hasClass=function(t){return!!this._element&&this._element.classList.contains(t)},h.prototype.addClass=function(t){this._element&&this._element.classList.add(t)},h.prototype.removeClass=function(t){this._element&&this._element.classList.remove(t)},h.prototype.toggleClass=function(t,e){let i=this._element;i&&(null==e&&(e=!i.classList.contains(t)),e?i.classList.add(t):i.classList.remove(t))},h.prototype.enableClass=function(t,e){!1!==e?this.addClass(t):this.removeClass(t)},h.prototype.getClass=function(){return this._element.className},h.prototype.setClass=function(t){this._element.className=t},h.prototype.getAttribute=function(t){return this._element.getAttribute(t)},h.prototype.hasAttribute=function(t){return this._element.hasAttribute(t)},h.prototype.setAttribute=function(t,e){this._element.setAttribute(t,e)},h.prototype.setAttributes=function(t){for(let e in t)this._element.setAttribute(e,t[e])},h.prototype.removeAttribute=function(t){this._element.removeAttribute(t)},h.prototype.getStyle=function(t){return this._element.style[t]},h.prototype.setStyle=function(t,e){this._element.style[t]=e},h.prototype.setStyles=function(t){let e=this._element.style;for(let i in t)e[i]=t[i]},h.prototype.getId=function(){return this._element.id},h.prototype.setId=function(t){this._element.id=t},h.prototype.toString=function(){let t=this._element.outerHTML;return t=t.replace(this._element.innerHTML,""),t},h.prototype.getTextContent=function(){return this._element.textContent},h.prototype.setTextContent=function(t){this._element.textContent=t},h.prototype.getLeft=function(){return this._element.offsetLeft},h.prototype.setLeft=function(t){return this._element.style.left=t+"px",!0},h.prototype.getTop=function(){return this._element.offsetTop},h.prototype.setTop=function(t){return this._element.style.top=t+"px",!0},h.prototype.getWidth=function(){return this._element.offsetWidth},h.prototype.setWidth=function(t){return this._element.style.width=t+"px",!0},h.prototype.getHeight=function(){return this._element.offsetHeight},h.prototype.setHeight=function(t){return t<0&&(t=0),this._element.style.height=t+"px",!0},h.prototype.getBoundingClientRect=function(){return this._element.getBoundingClientRect()},h.prototype.fillParentWidth=function(t){return null==t&&(t=100),this._element.style.width=t+"%",!0},h.prototype.fillParentHeight=function(t){return null==t&&(t=100),this._element.style.height=t+"%",!0},h.prototype.getTooltip=function(){return this.getAttribute("title")},h.prototype.setTooltip=function(t){t?this.setAttribute("title",t):this.removeAttribute("title")},h.prototype.show=function(t){this._element.style.display=!1!==t?"":"none"},h.prototype.hide=function(t){this.show(!1===t)},h.prototype.isVisible=function(){return"none"!==this._element.style.display},h.prototype.enable=function(t){(t=!1!==t)?this.removeAttribute("disabled"):(this.setAttribute("disabled","disabled"),this._element.disabled=!t)},h.prototype.disable=function(t){this.enable(!1===t)},h.prototype.isEnabled=function(){return!this._element.hasAttribute("disabled")},h.prototype.getScrollLeft=function(){return this._element.scrollLeft},h.prototype.getScrollTop=function(){return this._element.scrollTop},h.prototype.isEndOfHorizontalScroll=function(){return this._element.scrollLeft>=this._element.scrollWidth-this.getWidth()},h.prototype.isEndOfVerticalScroll=function(){return this._element.scrollTop>=this._element.scrollHeight-this.getHeight()},h._proto=h.prototype;const u=h;let a=function(){this._items=[],this._element=null};l.inherits(a,u),a.prototype._items=[],a.prototype.hasItem=function(){return!!this._items.length},a.prototype.containItem=function(t){return this._items.indexOf(t)>-1},a.prototype.insertItem=function(t,e){let i=this._items;i.indexOf(t)>-1||(i.push(t),e&&(t._order=e),i.length&&i.sort(a._iconComparer),this._updatePanelItems())},a.prototype.removeItem=function(t){let e=this._items,i=-1;if(t)for(let o=e.length;--o>=0;){let n=e[o];if("string"==typeof t){if(n.classList.contains(t)){i=o;break}}else if(n===t){i=o;break}}else i=e.length-1;let o=null;return i>-1&&(o=e.splice(i,1)[0]),this._updatePanelItems(),o},a.prototype.clearItems=function(){let t=this._items;t.length&&(t.length=0,this._updatePanelItems())},a._iconComparer=function(t,e){return t._order?e._order?t._order-e._order:1:e._order?-1:0},a.prototype._updatePanelItems=function(){let t=this._items,e=this._element;if(t.length){for(this._element||(e=this._element=document.createElement("div"));e.lastChild;)e.removeChild(e.lastChild);for(let i=0;i<t.length;i++)e.appendChild(t[i])}};const p=a;let _=function(t,e){this._id=_._runningId++,this._element=document.createElement("div"),this._element.className="cell",e&&(this._section=e)};l.inherits(_,u),_.prototype._aligner=null,_._runningId=0,_.prototype._id=0,_.prototype._width=-1,_.prototype._height=-1,_.prototype._visible=!0,_.prototype._rawContent,_.prototype._section=null,_.prototype._contentLocked=!1,_.prototype._collapsedState=0,_.prototype._floatingPanel=null,_.prototype._frontIcon=null,_.prototype._tooltipInfo=null,_.prototype.getContent=function(t){return t&&this._element?this._element.children:this._content||null},_.prototype.setContent=function(t,e){if(this._contentLocked)return null;if(null==t||t!=t?t=null:1!==t.nodeType&&11!==t.nodeType&&(null==t.getElement?"string"!=typeof t&&(t+=""):t=t.getElement()),this._aligner){let t=this._aligner.firstChild;t!==this._content&&(this._rawContent=t,this._content=t)}let i=this._setRawContent(t);return null!=e&&this._content&&this._content.setAttribute("title",e),i},_.prototype.setTextContent=function(t){null==t&&(t=""),this._rawContent!==t&&("string"==typeof this._rawContent?(this._rawContent=t,this._textSpan.textContent=t):null!=this._rawContent||this._textSpan?this.setContent(t):(this.initialize(),this._rawContent=t,this._textSpan=document.createElement("span"),this._textSpan.className="text",this._textSpan.textContent=t,this._content=this._textSpan,this._aligner.className="valigner",this._aligner.appendChild(this._textSpan)))},_.prototype.dispose=function(){this.removeParent(),this.unlistenAll(),this._element=this._section=this._aligner=null,this._textSpan=this._rawContent=this._content=null,this._frontIcon=this._floatingPanel=null},_.prototype.getNextSibling=function(){return null!==this._element?this._element.nextSibling:null},_.prototype.getParent=function(){return null!==this._element?this._element.parentNode:null},_.prototype.setParent=function(t,i){let o=e.getElement(t);if(o){if(this.initialize(),1===this._collapsedState)return;let t;!0===i&&(t=o.firstChild),t?o.insertBefore(this._element,t):o.appendChild(this._element)}else this.removeParent()},_.prototype.removeParent=function(){let t=this._element;t&&t.parentNode&&t.parentNode.removeChild(t)},_.prototype.insertBefore=function(t){let i=e.getElement(t);if(null==i)return void this.setParent(this.getParent());let o=i.parentNode;null!=o&&(this.initialize(),o.insertBefore(this._element,i))},_.prototype.getTextContent=function(){return this._rawContent?"string"==typeof this._rawContent?this._rawContent:this._rawContent.textContent:""},_.prototype.getTextElement=function(){return this._textSpan},_.prototype.getWidth=function(){return this._width>=0?this._width:this._element.offsetWidth},_.prototype.setWidth=function(t){return t<0&&(t=-1),this._width!==t&&(this._width=t,this._element.style.width=t>=0?t+"px":"",this._updateDisplay(),!0)},_.prototype.getHeight=function(){return this._height>=0?this._height:this._element.offsetHeight},_.prototype.setHeight=function(t){return t<0&&(t=-1),this._height!==t&&(this._height=t,this._element.style.height=t>=0?t+"px":"",this._updateDisplay(),!0)},_.prototype.fillParentWidth=function(t){return!1},_.prototype.fillParentHeight=function(t){return!1},_.prototype.show=function(t){let e=!1!==t;e!==this._visible&&(this._visible=e,this._updateDisplay())},_.prototype.isVisible=function(){return this._visible},_.prototype.getScrollLeft=function(){return 0},_.prototype.getScrollTop=function(){return 0},_.prototype.isEndOfHorizontalScroll=function(){return!0},_.prototype.isEndOfVerticalScroll=function(){return!0},_.prototype.hasElement=function(){return null!==this._element},_.prototype.getSection=function(){return this._section},_.prototype.initialize=function(){return null==this._aligner&&(e.isIE?this._aligner=document.createElement("div"):this._aligner=document.createElement("button"),this._aligner.className="valigner",this._aligner.role="gridcell",this._frontIcon&&this._element.appendChild(this._frontIcon.getElement()),this._element.appendChild(this._aligner),this._floatingPanel&&this._element.appendChild(this._floatingPanel.getElement())),this._element},_.prototype.updateIcon=function(t){if(!t)return;let e=this._frontIcon;if(e){if(e.containItem(t))return;e.clearItems()}this.insertFrontIcon(t,0)},_.prototype.removeIcon=function(){let t=this._frontIcon;t&&(t.clearItems(),this._element.removeChild(t.getElement()),t=this._frontIcon=null)},_.prototype.isFrozen=e._deprecatedFunction,_.prototype.freezeLayout=e._deprecatedFunction,_.prototype.setAutoContentClipping=e._deprecatedFunction,_.prototype.setContentTooltip=function(t){return!(null==t||!this._content||(this._content.setAttribute("title",t),0))},_.prototype.lockContent=function(t){this._contentLocked=!1!==t},_.prototype.reset=function(){if(!this._element)return;let t=this._element.style.width,e=this._element.style.height;this.removeAttribute("style"),t&&(this._element.style.width=t),e&&(this._element.style.height=e),this.resetClass();let i=this.blinkState;i&&(i.timerId>=0&&clearInterval(i.timerId),delete this.blinkState),delete this.trendState;let o=this.blinking;o&&(o.blinking>=0&&clearTimeout(o.blinking),o.cell=null,o.styles=null,delete this.blinking),this.removeIcon(),this.setContent(null),this._textSpan&&(this._textSpan.className="text",this._textSpan.textContent="")},_.prototype.resetClass=function(){let t="cell";this.hasClass("spanned")&&(t+=" spanned"),this.hasClass("selected-row")&&(t+=" selected-row"),this.hasClass("highlighted-row")&&(t+=" highlighted-row"),this.setClass(t)},_.prototype.resetToInitialState=function(){this._element&&(this.setParent(null),this.unlistenAll(),this._element.className="cell",this.removeIcon(),this.setContent(null),this._contentLocked=!1,this._collapsedState=0)},_.prototype.insertFloatingIcon=function(t,e){if(!t)return;let i=this._floatingPanel;i||(i=this._floatingPanel=new p),i.insertItem(t,e),i.addClass("floating-panel");let o=this._element;o.contains(i.getElement())||o.appendChild(i.getElement())},_.prototype.removeFloatingIcon=function(t){let e=this._floatingPanel;if(!e)return null;let i=e.removeItem(t);return e.hasItem()||(this._element.removeChild(e.getElement()),this._floatingPanel=null),i},_.prototype.insertFrontIcon=function(t,e){if(!t)return;let i=this._frontIcon;i||(i=this._frontIcon=new p),i.insertItem(t,e),i.addClass("front-panel");let o=this._element;o.contains(i.getElement())||o.insertBefore(i.getElement(),o.firstChild)},_.prototype.removeFrontIcon=function(t){let e=this._frontIcon;if(!e)return null;let i=e.removeItem(t);return e.hasItem()||(i=e.getElement(),this._element.removeChild(i),this._frontIcon=null),i},_.prototype.getCellId=function(){return this._id},_.prototype.updatePadding=function(){},_.prototype.collapse=function(t,e){let i,o=!1!==t;return i=o?e?2:1:0,this._collapsedState!==i&&(o?e?this.addClass("spanned"):this.setParent(null):2===this._collapsedState&&this.removeClass("spanned"),this._collapsedState=i,!0)},_.prototype.isCollapsed=function(){return 0!==this._collapsedState},_.prototype.isKeptInDoc=function(){return 1!==this._collapsedState},_.prototype.getClientWidth=function(){return this._element?this._element.clientWidth:this.getWidth()},_.prototype.getClientHeight=function(){return this._element?this._element.clientHeight:this.getHeight()},_.prototype.setTooltip=function(t){this.setTooltipInfo("userTooltip",t),this.updateTooltip()},_.prototype.setTooltipInfo=function(t,e){let i=this._tooltipInfo;i||(i=this._tooltipInfo={}),i[t]=e},_.prototype.updateTooltip=function(){let t=this._tooltipInfo;if(!t)return;let e="",i=null;t.clippedText&&(e=i=t.clippedTextTooltip),null==t.groupHeaderTooltip?!1!==t.columnDefault&&(null!=t.columnDefault?i=t.columnTooltip:e=t.columnTooltip):!1!==t.groupHeaderDefault&&(null!=t.groupHeaderDefault?i=t.groupHeaderTooltip:e=t.groupHeaderTooltip),null!=t.userTooltip&&(i=t.userTooltip),null==i&&(i=e),i?(this.hasAttribute("tooltip")?this.getAttribute("tooltip"):this.getAttribute("title"))!==i&&this.setAttribute("title",i):(this.hasAttribute("title")&&this.removeAttribute("title"),this.hasAttribute("tooltip")&&this.removeAttribute("tooltip"))},_.prototype.getTooltipInfo=function(t){return this._tooltipInfo?this._tooltipInfo[t]:null},_.prototype._setRawContent=function(t){if(this._rawContent!==t){this._rawContent=t;let e=this._rawContent;if("string"==typeof this._rawContent&&(this._textSpan||(this._textSpan=document.createElement("span"),this._textSpan.className="text"),this._textSpan.textContent=this._rawContent,e=this._textSpan),this._content!==e){this._content=e,this.initialize();let t=this._aligner;for(;t.lastChild;)t.removeChild(t.lastChild);this._content&&t.appendChild(this._content)}}return this._content},_.prototype._updateDisplay=function(){let t=!1;this.isVisible()&&this._width&&this._height&&(t=!0),this._element.style.display=t?"":"none"},_._proto=_.prototype;const d=_;let c=function(){this._ends=[],this._cols=[]};c.prototype._laneCount=0,c.prototype._defaultSize=10,c.prototype._defaultScalability=!0,c.prototype._homogeneous=!0,c.prototype._visibility=!0,c.prototype._ends,c.prototype._cols,c.prototype._bits=[1,2,4,8],c.prototype.hitTest=function(t){if(t<0)return-1;if(t>=this.getTrackSize())return~this._laneCount;let i=-1,o=0;if(this._homogeneous){let e=this._defaultSize;i=Math.floor(t/e),o=(i+1)*e}else i=e.upperBound(this._ends,t),o=this._ends[i];return(i>=this._laneCount||t>=o)&&(i=~i),i},c.prototype.dispose=function(){this._cols=this._ends=null},c.prototype.isAtDefaultSize=function(t){if(this._homogeneous)return!0;if(null!=t){if(!this._isAtDefaultSize(t))return!1}else{for(let t=this._cols.length;--t>=0;)if(!this._isAtDefaultSize(t))return!1;this._homogeneous=!0}return!0},c.prototype._isAtDefaultSize=function(t){let e=this._cols[t];if(e){if(e.actualSize!==this._defaultSize)return!1;if(null!=e.customSize)return!1;if(e.invisibility)return!1}return!0},c.prototype.isHomogeneous=function(){return this._homogeneous},c.prototype.isAtMinimumSize=function(t){let e=this._getMinimumScalingSize(t);return(null!=t?this.getLaneSize(t):this.getTrackSize())<=e},c.prototype.isFixedSize=function(){for(let t=0;t<this._laneCount;++t)if(this.getLaneScalability(t))return!1;return!0},c.prototype.clearLaneCustomizations=function(){this._ends.length=0,this._cols.length=0,this._homogeneous=!0},c.prototype.getLaneCount=function(){return this._laneCount},c.prototype.setLaneCount=function(t){t<0&&(t=0),t!==this._laneCount&&(this._markDirtyIndex(t),this._cols.length=t,this._laneCount=t,0===t&&(this._homogeneous=!0))},c.prototype.getDefaultLaneSize=function(){return this._defaultSize},c.prototype.setDefaultLaneSize=function(t){return t<0&&(t=0),this._defaultSize!==t&&(this._defaultSize=t,this._markDirtyIndex(0),!0)},c.prototype.getLaneDefaultSize=function(t){if(t<0||t>=this._laneCount)return-1;let e=this._newColumn(t);return e.defaultSize?e.defaultSize:-1},c.prototype.setLaneDefaultSize=function(t,e){!(t<0||t>=this._laneCount)&&e>=0&&(this._newColumn(t).defaultSize=e)},c.prototype.resetLaneToDefaultSize=function(){let t=!1;for(let e=0;e<this._laneCount;++e){let i=this._cols[e];i&&(i.invisibility||(null!=i.defaultSize?(t|=this.setLaneScalability(e,!1),t|=this.setLaneSize(e,i.defaultSize)):(t|=this.setLaneScalability(e,!0),t|=this.setLaneSize(e,1))))}return!!t},c.prototype.getDefaultScalability=function(){return this._defaultScalability},c.prototype.setDefaultScalability=function(t){return this._defaultScalability!==t&&(this._defaultScalability=t,!0)},c.prototype.getTrackSize=function(){return!this._visibility||this._laneCount<=0?0:this._homogeneous?this._laneCount*this._defaultSize:(this._updateEndPoints(),this._ends[this._laneCount-1])},c.prototype.setTrackSize=function(t){let e=0,i=0,o=[];for(e=0;e<this._laneCount;++e){let t=this._cols[e];t?t.invisibility||(!1!==this._getLaneScalability(t)?o.push(e):i+=this._getFixedSize(t)):o.push(e)}if(o.length<=0)return null;let n=this._distributeLaneSize(t-i,o),s=!1,r=[];for(e=n.length;--e>=0;){r[e]=0;let t=n[e];if(null!=t){let i=this.getLaneSize(e);this._newColumn(e),this._setCalculatedLaneSize(e,t)&&(r[e]=t-i,s=!0)}}return s?r:null},c.prototype.getLaneStart=function(t){if(t<=0)return 0;if(this._homogeneous)return t*this._defaultSize;this._updateEndPoints();let e=t-this._laneCount,i=0;return e>0&&(t-=e,i=e*this._defaultSize),this._ends[t-1]+i},c.prototype.getLaneEnd=function(t){return this._laneCount<=0?NaN:(t<0?t=0:t>=this._laneCount&&(t=this._laneCount-1),this._homogeneous?(t+1)*this._defaultSize:(this._updateEndPoints(),this._ends[t]))},c.prototype.getLaneSize=function(t){if(this._visibility){let e=this._cols[t];return e?e.actualSize:this._defaultSize}return 0},c.prototype.getCustomLaneSize=function(t){let e=this._cols[t];return e&&null!=e.customSize?e.customSize:this._defaultSize},c.prototype.setLaneSize=function(t,e){if(t<0||t>=this._laneCount)return!1;if(e<0||e!=e)return!1;let i=this._cols[t];return(null==i||i.customSize!==e)&&(i=this._newColumn(t),i.customSize=e,this._setCalculatedLaneSize(t,e))},c.prototype.setLaneProperty=function(t,e,i){if(t<0||t>=this._laneCount)return!1;let o=this._cols[t];return(null==o||o[e]!==i)&&(o=this._newColumn(t),o[e]=i,!0)},c.prototype.getLaneProperty=function(t,e){let i=this._cols[t];return i&&null!=i[e]?i[e]:null},c.prototype.getMinimumLaneSize=function(t){let e=this._cols[t];return e&&null!=e.minSize?e.minSize:0},c.prototype.setMinimumLaneSize=function(t,e,i){if(t<0||t>=this._laneCount)return!1;if(e<0&&(e=0),this.getMinimumLaneSize(t)!==e){let o=this._newColumn(t);return o.minSize=e,i&&this.getLaneScalability(t)&&(o.customSize=e),this._setCalculatedLaneSize(t)}return!1},c.prototype.isLaneVisible=function(t){let e=this._cols[t];return!e||!e.invisibility},c.prototype.showLane=function(t,e){return this.hideLane(t,!1===e)},c.prototype.hideLane=function(t,e,i){if(t<0||t>=this._laneCount)return!1;let o=this._newColumn(t),n=!o.invisibility,s=null!=i?this._bits[i]:1;return!1!==e?o.invisibility|=s:o.invisibility&=~s,n!==!o.invisibility&&this._setCalculatedLaneSize(t)},c.prototype.getLaneVisibilityBit=function(t,e){if(t>=0&&t<this._laneCount){let i=this._cols[t];if(i){let t=null!=e?this._bits[e]:1;if(i.invisibility&t)return!1}}return!0},c.prototype.show=function(t){if(t=!1!==t,this._visibility!==t)if(this._visibility=t,t)for(let t=0;t<this._laneCount;++t)this._newColumn(t),this._setCalculatedLaneSize(t);else this._markDirtyIndex(0)},c.prototype.getLaneScalability=function(t){let e=this._cols[t];return e&&null!=e.scalability?e.scalability:this._defaultScalability},c.prototype.setLaneScalability=function(t,e){if(t<0||t>=this._laneCount)return!1;let i=this._cols[t];return!(i&&i.scalability===e||(i=this._newColumn(t),i.scalability=e,0))},c.prototype.removeLaneAt=function(t,e){if(null==e&&(e=1),t<0)return null;if(t+e>this._laneCount&&(e=this._laneCount-t),e<1)return null;this._markDirtyIndex(t);let i=this.serializeLane(t);return this._cols.splice(t,e),this._laneCount-=e,i},c.prototype.insertLane=function(t,i){t<0&&(t=0);let o=1;if(e.isNumber(i)){if(i<=0)return;o=i,i=null}if(t>=this._laneCount&&(t=this._laneCount,!i))this.setLaneCount(this._laneCount+o);else if(this._laneCount+=o,this._markDirtyIndex(t),e.insertEmptyItems(this._cols,t,o),i){let e=t+o;for(let o=t;o<e;++o)this.deserializeLane(o,i)}},c.prototype.moveLane=function(t,i){if(t<0?t=0:t>this._laneCount&&(t=this._laneCount),i<0?i=0:i>this._laneCount&&(i=this._laneCount),t===i)return;let o=t<i?t:i;this._markDirtyIndex(o),e.moveArrayItem(this._cols,t,i)},c.prototype.serializeLane=function(t){if(t<0||t>=this._laneCount)return null;let e={};e.index=t;let i=this._cols[t];return i?(e.size=i.customSize,e.minSize=i.minSize,e.visible=!i.invisibility,e.scalable=i.scalability,e):e},c.prototype.deserializeLane=function(t,e){if(!e)return;if(t<0||t>=this._laneCount)return;let i=e.size;null!=i&&this.setLaneSize(t,i),i=e.minSize,null!=i&&this.setMinimumLaneSize(t,i),i=e.visible,null!=i&&this.showLane(t,i),i=e.scalable,null!=i&&this.setLaneScalability(t,i)},c.prototype._updateEndPoints=function(){let t=this._ends.length;if(t>=this._laneCount)return;this._ends.length=this._laneCount;let e=0,i=t>0?this._ends[t-1]:0;for(e=t;e<this._laneCount;++e)i+=this.getLaneSize(e),this._ends[e]=i},c.prototype._setCalculatedLaneSize=function(t,e){let i=this._cols[t];if(this._visibility&&!i.invisibility){if(null==e&&(e=null!=i.customSize?i.customSize:this._defaultSize),!i.scalability){let t=null!=i.minSize?i.minSize:0;e<t&&(e=t)}}else e=0;return i.actualSize!==e&&(i.actualSize=e,this._homogeneous=!1,this._markDirtyIndex(t),!0)},c.prototype._getMinimumScalingSize=function(t){let e=0;if(null!=t){let e=this._cols[t];if(!e.invisibility&&null!=e.minSize)return!1===this._getLaneScalability(e)&&null!=e.customSize&&e.customSize>e.minSize?e.customSize:e.minSize}else for(let t=this._laneCount;--t>=0;)e+=this._getMinimumScalingSize(t);return e},c.prototype._getFixedSize=function(t){return null!=t.customSize?null!=t.minSize?t.customSize>t.minSize?t.customSize:t.minSize:t.customSize:null!=t.minSize?t.minSize:this._defaultSize},c.prototype._getLaneScalability=function(t){return null==t.scalability?this._defaultScalability:t.scalability},c.prototype._distributeLaneSize=function(t,e){if(e.length<=0)return[];t<0&&(t=0);let i=0,o=0,n=0,s=0,r=[],l=[],h=[];for(i=e.length;--i>=0;)n=e[i],r[n]=this.getMinimumLaneSize(n),l[n]=this.getCustomLaneSize(n),o+=l[n];let u=!0;for(;u;)for(u=!1,i=e.length;--i>=0;){n=e[i];let a=r[n],p=l[n];s=t*p/o,s<=a&&(u=!0,h[n]=a,t-=a,o-=p,e.splice(i,1))}let a=e.length-1,p=0,_=0;for(i=a;--i>=0;){n=e[i],s=t*l[n]/o;let r=Math.floor(s);_+=s-r,_>=1&&(++r,--_),h[n]=r,p+=r}return h[e[a]]=Math.floor(t-p),h},c.prototype._markDirtyIndex=function(t){t<this._ends.length&&(this._ends.length=t)},c.prototype._newColumn=function(t){let e=this._cols[t];return e||(this._cols[t]=e={},e.invisibility=0),e},c.prototype.copyFrom=function(t,e){if(this._homogeneous&&t._homogeneous&&this._defaultSize===t._defaultSize)return;e||(e=0);let i=t.getLaneCount(),o=this.getLaneCount(),n=e+i;n>o&&(n=o);let s=0;for(let i=e;i<n;++i){let e=t.getLaneSize(s++),o=this._newColumn(i);o.customSize!==e&&(o.customSize=e,o.actualSize!==e&&(o.actualSize=e,this._homogeneous=!1,this._markDirtyIndex(i)))}};const g=c;let f=function(){};f.prototype.hitTest=function(t,e,i){},f.prototype.hitTestX=function(t){},f.prototype.hitTestY=function(t){},f.prototype.getDefaultColumnWidth=function(){},f.prototype.setDefaultColumnWidth=function(t){},f.prototype.getDefaultRowHeight=function(){},f.prototype.setDefaultRowHeight=function(t){},f.prototype.getColumnWidth=function(t){},f.prototype.setColumnWidth=function(t,e){},f.prototype.getRowHeight=function(t){},f.prototype.setRowHeight=function(t,e){},f.prototype.isColumnVisible=function(t){},f.prototype.hideColumn=function(t,e){},f.prototype.isRowVisible=function(t){},f.prototype.hideRow=function(t,e){},f.prototype.getMinimumColumnWidth=function(t){},f.prototype.setMinimumColumnWidth=function(t,e){},f.prototype.getMinimumRowHeight=function(t){},f.prototype.setMinimumRowHeight=function(t,e){},f.prototype.getCellLeft=function(t){},f.prototype.getCellTop=function(t){},f.prototype.getCellWidth=function(t,e){},f.prototype.getCellHeight=function(t,e){},f.prototype.hasCellSpan=function(){},f.prototype.getCellRowSpan=function(t,e){},f.prototype.setCellRowSpan=function(t,e,i){},f.prototype.getCellColSpan=function(t,e){},f.prototype.setCellColSpan=function(t,e,i){},f.prototype.clearCellSpans=function(){},f.prototype.clearColumnSpans=function(t){},f.prototype.clearColumnCustomizations=function(){},f.prototype.clearRowCustomizations=function(){},f.prototype.getColumnScalability=function(t){},f.prototype.setColumnScalability=function(t,e){},f.prototype.getRowScalability=function(t){},f.prototype.setRowScalability=function(t,e){},f.prototype.getCell=function(t,e,i){},f.prototype.getCellContent=function(t,e){},f.prototype.setCellContent=function(t,e,i){},f.prototype.getColumn=function(t){},f.prototype.getColumnCount=function(){},f.prototype.setColumnCount=function(t){},f.prototype.getRowCount=function(){},f.prototype.setRowCount=function(t,e){},f.prototype.getVisibleRowCount=function(){},f.prototype.addRow=function(t){},f.prototype.removeRow=function(t){},f.prototype.setBorders=function(t,e,i,o){},f.prototype.getColumnStyle=function(t,e){},f.prototype.setColumnStyle=function(t,e,i){},f.prototype.enableColumnClass=function(t,e,i){},f.prototype.hasColumnClass=function(t,e){},f.prototype.enableRowClass=function(t,e,i){},f.prototype.setRowStyle=function(t,e,i,o){},f.prototype.getRelativePosition=function(t){},f.prototype.getContentWidth=function(){},f.prototype.getContentHeight=function(){},f.prototype.getCellsByRowIndex=function(t){},f.prototype.disableHorizontalGridLine=function(t){},f.prototype.disableVerticalGridLine=function(t){},f.prototype.enableShading=function(t){},f.prototype.setTransposedShading=function(t){},f.prototype.enableRowHighlighting=function(t){},f.prototype.getRowHighlight=function(){},f.prototype.setRowHighlight=function(t){},f.prototype.getSelectedRows=function(){},f.prototype.getSelectedRowCount=function(){},f.prototype.isSelectedRow=function(t){},f.prototype.getRowAnchor=function(){},f.prototype.setRowAnchor=function(t){},f.prototype.setSelectedRow=function(t,e){},f.prototype.selectSingleRow=function(t){},f.prototype.selectRowRange=function(t,e){},f.prototype.clearSelectedRows=function(){},f.prototype.getFirstSelectedRow=function(){},f.prototype.getLastSelectedRow=function(){},f.prototype.activateColumn=function(t,e){},f.prototype.activateRows=function(t,e,i){},f.prototype.moveRowsToTop=function(t){},f.prototype.getFirstIndexInView=function(){},f.prototype.getLastIndexInView=function(){},f.prototype.isInCurrentView=function(t){},f.prototype.getFrozenLayout=function(){},f.prototype.setFrozenLayout=function(t){},f.prototype.insertColumn=function(t,e){},f.prototype.removeColumnAt=function(t){},f.prototype.moveColumn=function(t,e){},f.prototype.enableRowVirtualization=function(t){},f.prototype.enableColumnVirtualization=function(t){},f.prototype.getColumnIndex=function(t){},f.prototype.getCellIndex=function(t,e){},f.prototype.getIndex=function(){},f.prototype.setIndex=function(t){},f.prototype.getRowOffset=function(){},f.prototype.setRowOffset=function(t){},f.prototype.updateLayout=function(){},f.prototype.stretchCell=function(t,e,i,o){},f.prototype.unstretchCell=function(t,e){},f.prototype.unstretchAllCells=function(){},f.prototype.getStretchedCell=function(t,e){},f.prototype.getStretchedCells=function(){},f.prototype.updateStretchedCells=function(){},f.prototype.getColumnHost=function(){},f.prototype.setHidingMethod=function(t){},f.prototype.getHidingMethod=function(){},f.prototype.setColumnVisibility=function(t,e,i){},f.prototype.getRowLayout=function(){},f.prototype.reserveRightSpace=function(t){},f.prototype.getReservedSpace=function(){},f.prototype.getComputedStyle=function(){},f.prototype.isColumnActive=function(t){},f.prototype.setRowAttributes=function(t,e){},f.prototype.getContextRow=function(t){},f.prototype.selectColumn=function(t,e){},f.prototype.isSelectedColumn=function(t){},f.prototype.selectCell=function(t,e,i){},f.prototype.setCellBounds=function(t,e,i,o){},f.prototype.getHorizontalLayout=function(){},f.prototype.calculateColumnBounds=function(t,e,i,o){},f.prototype.updateColumnBounds=function(t,e,i){},f.prototype.updateColumnSeparators=function(){};const y=f;let m=function(t){(this._element=document.createElement("div")).className="column",this._cells=[],this._section=t};l.inherits(m,u),m.prototype._nextSibling=null,m.prototype._parent=null,m.prototype._section=null,m.prototype._cells=null,m.prototype._cellStart=0,m.prototype._cellEnd=0,m.prototype._autoStyleUpdating=!1,m.prototype._deactivation=!1,m.prototype._sizeClasses=null,m.prototype._colLeft=0,m.prototype._absolute=!1,m.prototype._scrollFrame=null,m.prototype._invisibility=0,m.prototype._bits=[1,2,4,8],m.prototype._pinned=!0,m.prototype.clearContent=function(){for(let t=this._cells.length;--t>=0;)this._cells[t].setContent(null)},m.prototype.setLeft=function(t){return this._colLeft=t,this._absolute&&(this._element.style.left=t+"px"),!0},m.prototype.enableAbsolutePosition=function(t){(t=!1!==t)!==this._absolute&&(this._absolute=t,this._element.style.left=t?this._colLeft+"px":"")},m.prototype.dispose=function(){this._dispose();for(let t=this._cells.length;--t>=0;)this._cells[t].dispose();this._scrollFrame=this._nextSibling=this._parent=this._cells=this._section=null},m.prototype.setStyle=function(t,e){let i=this._element;i.style[t]=e,i.style.backgroundColor?i.classList.contains("no-shading")||i.classList.add("no-shading"):i.classList.contains("no-shading")&&i.classList.remove("no-shading")},m.prototype.setStyles=function(t){let e=this._element,i=e.style;for(let e in t)i[e]=t[e];e.style.backgroundColor?e.classList.contains("no-shading")||e.classList.add("no-shading"):e.classList.contains("no-shading")&&e.classList.remove("no-shading")},m.prototype.show=function(t){this.setVisibility(0,!1!==t)},m.prototype.setWidth=function(t){this._element.style.width=t+"px";let e,i=0;t>0&&t<=24?i=3:t>24&&t<=40?i=2:t>40&&t<60&&(i=1);let o=this._sizeClasses;if(o){if(o.length>i){for(e=o.length;--e>=i;)this.removeClass(o[e]);o.length=i}i||(this._sizeClasses=null)}if(i)for(o||(o=[],this._sizeClasses=o),e=o.length;e<i;++e)o[e]=m._sizeClasses[e],this.addClass(o[e]);return this.setVisibility(1,t>0),!0},m._sizeClasses=["small-col","very-small-col","tiny-col"],m.prototype.setHeight=function(t){return this._element.style.height=t+"px",this.setVisibility(2,t>0),!0},m.prototype.getParent=function(){return this._parent},m.prototype.setParent=function(t,i){if(!this._element)return;this._parent=e.getElement(t);let o=this._section?this._section.getHidingMethod():"";this._invisibility&&!o||this._setParent(this._parent,i)},m.prototype.insertBefore=function(t){this._parent?this._scrollFrame?t&&this._parent===t.getParent()?this._insertBefore(t):this._insertBefore(this._scrollFrame):t?this._parent===t.getParent()&&this._insertBefore(t):this._setParent(this._parent):(this._insertBefore(t),this._parent=t.getParent())},m.prototype.enableAutoStyleUpdating=function(t){t=!1!==t,this._autoStyleUpdating!==t&&(this._autoStyleUpdating=t)},m.prototype.setNextSibling=function(t){this._nextSibling=t},m.prototype.isActive=function(){return!(this._invisibility&this._bits[3])},m.prototype.disableDeactivation=function(t){this._deactivation=!1!==t,this._deactivation&&(this.isActive()||this.activate())},m.prototype.activate=function(t){return t=this._pinned||this._deactivation||!1!==t,this.isActive()!==t&&(this.setVisibility(3,t),!0)},m.prototype.deactivate=function(t){this.activate(!1===t)},m.prototype.setCellCount=function(t){let e;for(e=this._cells.length;e<t;++e)this._cells.push(new d(null,this._section));for(e=this._cells.length;--e>=t;)this._cells[e].dispose();this._cells.length=t,this._cellStart>t?this._cellStart=this._cellEnd=t:this._cellEnd>t&&(this._cellEnd=t)},m.prototype.getCell=function(t){return this._cells[t]||null},m.prototype.collapseCells=function(t,e,i,o,n){if(e<=0)return;let s=!1,r=this._cells[t];r&&!o&&(s|=r.collapse(i,n));for(let o=1;o<e&&(r=this._cells[t+o],r);++o)s|=r.collapse(i,n);s&&(i?e>1&&(this._hasCollapsedCells=!0):this.updateCellOrders())},m.prototype.uncollapseAllCells=e._deprecatedFunction,m.prototype.activateCells=function(t,e){let i,o=this._element;if(this._hasCollapsedCells)t=this._cellEnd,e>this._cellEnd&&(this._cellEnd=e);else if(this._cellStart===t){let o=this._cellEnd-e;if(o>0){for(i=this._cellEnd;--i>=e;)this._cells[i].removeParent();return void(this._cellEnd=e)}if(!(o<0))return;t=this._cellEnd,this._cellEnd=e}else{for(i=this._cellEnd;--i>=this._cellStart;)this._cells[i].removeParent();this._cellStart=t,this._cellEnd=e}for(i=t;i<e;++i){let t=this._cells[i];t.isKeptInDoc()&&(t.initialize(),o.appendChild(t.getElement()))}},m.prototype.moveCellsToTop=function(t){if(!this.isActive())return;let i=this._element;for(let e=0;e<t;++e){let t=this._cells[e];t.isKeptInDoc()&&i.appendChild(t.getElement())}this._cells=e.cycleArray(this._cells,t)},m.prototype.updateCellOrders=function(){this._hasCollapsedCells=!1;let t=this._element;for(let e=this._cellStart;e<this._cellEnd;++e){let i=this._cells[e];i.isKeptInDoc()?t.appendChild(i.getElement()):this._hasCollapsedCells=!0}},m.prototype.hasCollapsedCells=function(){return this._hasCollapsedCells},m.prototype.getCellIndex=function(t){if(!t)return-1;for(let e=this._cellStart;e<this._cellEnd;++e)if(this._cells[e].getElement()===t)return e;return-1},m.prototype.getSection=function(){return this._section},m.prototype.log=function(){let t=[],e=this._cells.length;for(let i=0;i<e;++i)t.push(this._cells[i].getTextContent());return t},m.prototype.getVisibility=function(){return!this._invisibility},m.prototype.setVisibility=function(t,e){let i=!this._invisibility,o=this._bits[t]||1;e?this._invisibility&=~o:this._invisibility|=o;let n=!this._invisibility;if(i!==n)if(this._section&&this._section.getHidingMethod())this.enableClass("hidden",!n);else if(n){let t=this._parent;if(!t)return;let e=this._nextSibling;for(;e;){if(e._parent!==t){e=null;break}if(!e._invisibility)break;e=e._nextSibling}this.insertBefore(e)}else this._setParent(null)},m.prototype.updateLayout=function(){},m.prototype.setScrollState=function(t,e,i){this._scrollFrame=t,this.enableAbsolutePosition(i),this.setParent(e||this._section.getColumnHost()),e||this.activate(),this._pinned=!e},m._proto=m.prototype;const C=m;let S=function(){this._items=[]};S.prototype._items=null,S.prototype.dispose=function(){this._items=null},S.prototype.setItemCount=function(t){let e=this._items,i=e.length;if(i!==t)for(e.length=t;i<t;)e[i++]={}},S.prototype.getItem=function(t){return this._items[t]||null},S.prototype.moveItemsToTop=function(t){this._items=e.cycleArray(this._items,t)};const w=S;let b=function(t,e,i){t.setTop(e.getLaneStart(i)),t.setHeight(e.getLaneSize(i))},v=function(t,e,i,o){if(i){let n=e.getLaneStart(i);t.setLeft(n),t.setWidth(o-n)}else t.setStyle("left",""),t.setWidth(o)},R=function(t,e,i){this._trackX=t,this._trackY=e,this._section=i,this._cells=[]};R.prototype._trackX,R.prototype._trackY,R.prototype._section,R.prototype._cells,R.prototype._activeCount=0,R.prototype._stretchSize=0,R.prototype.dispose=function(){let t=this._cells;if(this._activeCount){this._activeCount=0;for(let e=t.length;--e>=0;){let i=t[e];i&&i.dispose()}}t.length=0},R.prototype.setStretchSize=function(t){this._stretchSize=t},R.prototype.getStretchSize=function(){return this._stretchSize},R.prototype.setCellCount=function(t){let e=this._cells,i=e.length;if(i<t)for(e.length=t;i<t;)e[i++]=null;else if(i>t){for(;--i>=t;){let t=e[i];t&&t.dispose()}e.length=t}},R.prototype.getCell=function(t){let e=this._cells[t];return e&&e.getParent()?e:null},R.prototype.getCells=function(){let t=[];if(this._activeCount){let e=this._cells,i=e.length;for(let o=0;o<i;++o){let i=e[o];i&&i.getParent()&&t.push(i)}this._activeCount=t.length}return t},R.prototype.getColumnIndex=function(t){if(t){if(!t.getElement)return null!=t._colIndex?t._colIndex:-1;{let e=t.getElement();if(e)return null!=e._colIndex?e._colIndex:-1}}return-1},R.prototype.getRowIndex=function(t){if(t){if(t.getElement)return t.getParent()?this._cells.indexOf(t):-1;{let e=this._cells,i=e.length;for(let o=0;o<i;++o){let i=e[o];if(i&&i.getParent()&&i.getElement()===t)return o}}}return-1},R.prototype.stretchCell=function(t,e){++this._activeCount,(!e||e<0)&&(e=0);let i=this._cells[t]||null;i||(i=new d(null,this._section),i.addClass("tr-stretched"),i.stretched=!0,this._cells[t]=i);let o=i.getElement();o.stretched=!0,o._colIndex!==e&&(o._colIndex=e,e>0?o.classList.add("right-stretching"):o.classList.remove("right-stretching")),o._rowIndex!==t&&(o._rowIndex=t);let n=this._stretchSize||this._trackX.getTrackSize();return v(i,this._trackX,e,n),b(i,this._trackY,t),i},R.prototype.unstretchCell=function(t){let e=this._cells[t]||null;return e&&e.setParent(null),e},R.prototype.unstretchAllCells=function(){if(this._activeCount){this._activeCount=0;let t=this._cells;for(let e=t.length;--e>=0;){let i=t[e];i&&i.setParent(null)}}},R.prototype.updateCells=function(){if(this._activeCount){let t=0,e=this._cells,i=e.length,o=this._trackX,n=this._trackY,s=this._stretchSize||o.getTrackSize();for(let r=0;r<i;++r){let i=e[r];i&&i.getParent()&&(++t,v(i,o,i.getElement()._colIndex,s),b(i,n,r))}this._activeCount=t}},R.prototype.updateXAxis=function(){if(this._activeCount){let t=0,e=this._cells,i=e.length,o=this._trackX,n=this._stretchSize||o.getTrackSize();for(let s=0;s<i;++s){let i=e[s];i&&i.getParent()&&(++t,v(i,o,i.getElement()._colIndex,n))}this._activeCount=t}},R.prototype.updateYAxis=function(){if(this._activeCount){let t=0,e=this._cells,i=e.length,o=this._trackY;for(let n=0;n<i;++n){let i=e[n];i&&i.getParent()&&(++t,b(i,o,n))}this._activeCount=t}},R.prototype.moveCellsToTop=function(t){this._activeCount&&(this._cells=e.cycleArray(this._cells,t),this.updateYAxis())};const I=R;let x=function(t,e){this.indexX=t,this.indexY=e};x.prototype.isSpanIndices=function(t,e){return t===this.indexX&&e===this.indexY},x.prototype.isOccupiedIndices=function(t,e){return t!==this.indexX||e!==this.indexY},x.prototype.register=function(t,e){this._register(t,e,!0)},x.prototype.unregister=function(t,e){this._register(t,e,!1)},x.prototype._register=function(t,e,i){let o=t.indexOf(this);i?o<0&&t.push(this):o>=0&&t.splice(o,1);let n=i?this:null,s=this.indexX+this.colSpan,r=this.indexY+this.rowSpan;for(let t=this.indexX;t<s;++t)for(let i=this.indexY;i<r;++i)e[t+","+i]=n},x.prototype.indexX,x.prototype.indexY,x.prototype.colSpan=1,x.prototype.rowSpan=1,x.prototype.prevColSpan=1,x.prototype.prevRowSpan=1,x.prototype.retVal=0;const L=x;let D=function(){this._spans=[],this._occupiedMap={}};D.prototype.removeColumn=function(t){let e=!1;return this.removeSpanByColIndex(t)&&(e=!0),this.shiftColumn(t,-1)&&(e=!0),e},D.prototype.freezeMapping=function(t){this._frozenMapping=!1!==t,this._frozenMapping||this._mapCellSpans()},D.prototype._mapCellSpans=function(){let t,e,i=this._spans;for(this._spans=[],this._occupiedMap={},t=i.length;--t>=0;)e=i[t],e.indexX>=0&&e.register(this._spans,this._occupiedMap)},D.prototype.shiftColumn=function(t,e){if(this._spans.length<=0||0===e)return!1;let i=!1;for(let o=this._spans.length;--o>=0;){let n=this._spans[o];n.indexX>=t&&(i=!0,n.indexX+=e)}return!(!i||this._frozenMapping||(this._mapCellSpans(),0))},D.prototype.removeSpan=function(t,e){if(this._spans.length<=0)return null;let i=t+","+e,o=this._occupiedMap[i];return!o||o.isOccupiedIndices(t,e)?null:(o.unregister(this._spans,this._occupiedMap),o)},D.prototype.removeSpanByColIndex=function(t,e){let i,o=this._spans.length;if(o<=0)return null;let n,s=e||[],r=0;for(n=0;n<o;++n)i=this._spans[n],i&&i.indexX===t&&(s.push(i),r++);if(r<=0)return null;for(o=s.length,n=0;n<r;++n)s[o-n-1].unregister(this._spans,this._occupiedMap);return s},D.prototype.removeSpanStartedFromRowIndex=function(t,e){let i,o=this._spans.length;if(o<=0)return null;let n,s=e||[],r=0;for(n=0;n<o;++n)i=this._spans[n],i&&i.indexY>=t&&(s.push(i),r++);if(r<=0)return null;for(o=s.length,n=0;n<r;++n)s[o-n-1].unregister(this._spans,this._occupiedMap);return s},D.prototype.clearAllSpans=function(){if(this._spans.length<=0)return null;let t=this._spans;return this._spans=[],this._occupiedMap={},t},D.prototype.hasSpan=function(){return this._spans.length>0},D.prototype.getSpan=function(t,e){let i=this.getOccupyingSpan(t,e);return i&&i.isSpanIndices(t,e)?i:null},D.prototype.getOccupyingSpan=function(t,e){return this._spans.length<=0?null:this._occupiedMap[t+","+e]||null},D.prototype.getAllSpans=function(){return this._spans},D.prototype.getColSpan=function(t,e){let i=this._occupiedMap[t+","+e];return null==i?1:i.isOccupiedIndices(t,e)?i.indexX-t:i.colSpan},D.prototype.getRowSpan=function(t,e){let i=this._occupiedMap[t+","+e];return null==i?1:i.isOccupiedIndices(t,e)?i.indexY-e:i.rowSpan},D.prototype.setColSpan=function(t,e,i){return this._updateSpan(t,e,!0,i)},D.prototype.setRowSpan=function(t,e,i){return this._updateSpan(t,e,!1,i)},D.prototype._updateSpan=function(t,e,i,o){o<1&&(o=1);let n=this.getSpan(t,e);n&&(n.retVal=0);let s,r,l,h,u,a,p=t,_=e,d=n?n.colSpan:1,c=n?n.rowSpan:1,g=!0;if(i){if(d===o)return n;if(d>o)p=t+o,s=t+d,g=!1;else{if(l=this._occupiedMap[t+","+e],l&&l!==n)return n;p=t+d,s=t+o}r=e+c}else{if(c===o)return n;if(c>o)_=e+o,r=e+c,g=!1;else{if(l=this._occupiedMap[t+","+e],l&&l!==n)return n;_=e+c,r=e+o}s=t+d}if(g){let i=[];for(u=p;u<s;++u)for(a=_;a<r;++a){if(h=u+","+a,this._occupiedMap[h])return n;i.push(h)}for(null==n&&(n=new L(t,e),h=t+","+e,this._spans.push(n),this._occupiedMap[h]=n),u=i.length;--u>=0;)this._occupiedMap[i[u]]=n}else{if(i?o+c<=2:o+d<=2){h=t+","+e;let i=this._spans.indexOf(n);this._spans.splice(i,1),this._occupiedMap[h]=null}for(u=p;u<s;++u)for(a=_;a<r;++a)this._occupiedMap[u+","+a]=null}return i?(n.prevColSpan=n.colSpan,n.colSpan=o):(n.prevRowSpan=n.rowSpan,n.rowSpan=o),n.retVal=g?1:-1,n},D.prototype._spans,D.prototype._occupiedMap,D.prototype._frozenMapping=!1;const A=D;let z=function(){this._selections=[]};z.prototype.clone=function(){let t=new z;return t._selections=this._selections.concat(),t._count=this._count,t._anchor=this._anchor,t._firstIndex=this._firstIndex,t._lastIndex=this._lastIndex,t},z.prototype.toString=function(){return this._selections.join(", ")},z.prototype.select=function(t){return!(t<0||!this._select(t)||(this._anchor=t,(this._firstIndex<0||t<this._firstIndex)&&(this._firstIndex=t),(this._lastIndex<0||t>this._lastIndex)&&(this._lastIndex=t),0))},z.prototype.deselect=function(t){return!!this._selections[t]&&(this._selections[t]=!1,--this._count,this._anchor===t&&(this._anchor=-1),this._firstIndex===t&&(this._firstIndex=this._findNextSelection(t)),this._lastIndex===t&&(this._lastIndex=this._findPrevSelection(t)),!0)},z.prototype.deselectFrom=function(t){if(this._lastIndex<t)return!1;if(this._firstIndex>=t)return this.clearAllSelections(),!0;let e=this._lastIndex,i=this._selections;for(let o=t;o<=e;++o)i[o]&&(i[t]=!1,--this._count);return this._anchor>=t&&(this._anchor=-1),this._lastIndex=this._findPrevSelection(t),!0},z.prototype.toggleSelection=function(t){this._selections[t]?this.deselect(t):this.select(t)},z.prototype.singularlySelect=function(t){return 1!==this._count||t<0?(this.clearAllSelections(),this.select(t),!0):this._firstIndex!==t&&(this._selections[this._anchor]=!1,this._selections[t]=!0,this._anchor=t,this._firstIndex=t,this._lastIndex=t,!0)},z.prototype.selectRange=function(t,e){if(0===e)return;if(t<0&&(t=0),1===e||-1===e)return void this.select(t);let i=t,o=i+e;if(e<0&&(o=i+1,i=o+e),!(i>=o)){this._anchor=t,(this._firstIndex<0||i<this._firstIndex)&&(this._firstIndex=i),(this._lastIndex<0||o>=this._lastIndex)&&(this._lastIndex=o-1);for(let t=i;t<o;++t)this._select(t)}},z.prototype.deselectRange=function(t,e){if(this._count<=0)return;if(t<0&&(t=0),1===e||-1===e)return void this.deselect(t);let i=t+e;if(e<0&&(i=t+1,t=i+e),this._firstIndex>=t&&this._lastIndex<i)return void this.clearAllSelections();this._anchor>=t&&this._anchor<i&&(this._anchor=-1),this._firstIndex>=t&&this._firstIndex<i&&(this._firstIndex=this._findNextSelection(i-1)),this._lastIndex>=t&&this._lastIndex<i&&(this._lastIndex=this._findPrevSelection(t));let o=0;for(o=t;o<i;++o)this._selections[o]&&(this._selections[o]=!1,--this._count)},z.prototype.hasSelection=function(t,e){if(this._count<=0)return!1;let i=t+e;if(e<0&&(i=t+1,t=i+e),i<this._firstIndex||t>this._lastIndex)return!1;for(let e=t;e<i;++e)if(this._selections[e])return!0;return!1},z.prototype.getSelection=function(t){return!0===this._selections[t]},z.prototype.setSelection=function(t,e){return!1!==e?this.select(t):this.deselect(t)},z.prototype.getSelectionAnchor=function(){return this._anchor},z.prototype.setSelectionAnchor=function(t){this._anchor=t},z.prototype.getSelectionCount=function(){return this._count},z.prototype.getFirstSelectedIndex=function(){return this._firstIndex},z.prototype.getLastSelectedIndex=function(){return this._lastIndex},z.prototype.getAllSelections=function(){if(this._count>0){let t=new Array(this._count),e=0,i=this._selections,o=this._lastIndex;for(let n=this._firstIndex;n<=o;++n)i[n]&&(t[e++]=n);return t}return[]},z.prototype.getConnectedRanges=function(t,e){if(this._count>0){let i=[];(null==t||t<this._firstIndex)&&(t=this._firstIndex),(null==e||e>this._lastIndex)&&(e=this._lastIndex+1);let o=null;for(let n=t;n<e;++n)this._selections[n]?o||(o=[n,-1]):o&&(o[1]=n-1,i.push(o),o=null);return o&&(o[1]=this._lastIndex,i.push(o),o=null),i}return[]},z.prototype.getSelectionMap=function(){return this._selections},z.prototype.clearAllSelections=function(){if(this._count>0){let t=0;return this._selections.length=0,this._count=0,this._anchor=-1,this._firstIndex=-1,this._lastIndex=-1,t}return 0},z.prototype.copyFrom=function(t,e,i,o){if(o<=0)return;let n=e+i;if(null!=t)if(!1!==t.hasSelection(e,o)){for(let i=0;i<o;++i)t._selections[e+i]?this.select(n+i):this.deselect(n+i);this._anchor=-1,t._anchor>=0&&t._anchor>=e&&t._anchor<e+o&&(this._anchor=t._anchor+i)}else this.deselectRange(n,o);else this.deselectRange(n,o)},z.prototype._select=function(t){return!this._selections[t]&&(this._selections[t]=!0,++this._count,!0)},z.prototype._findNextSelection=function(t){if(this._lastIndex>=0)for(;++t<=this._lastIndex;)if(this._selections[t])return t;return-1},z.prototype._findPrevSelection=function(t){if(this._firstIndex>=0)for(;--t>=this._firstIndex;)if(this._selections[t])return t;return-1},z.prototype._selections=null,z.prototype._count=0,z.prototype._anchor=-1,z.prototype._firstIndex=-1,z.prototype._lastIndex=-1;const T=z;let V=function(t,e){this._onInterval=this._onInterval.bind(this),"function"==typeof t?this._func=t:"function"==typeof e&&(this._func=e),"number"==typeof e?this._delay=e:"number"==typeof t&&(this._delay=t)};V.prototype._func=null,V.prototype._delay=0,V.prototype._timerId=0,V.prototype._pending=!1,V.prototype.start=function(){this._func&&(this._timerId?this._pending=!0:this._timerId=setInterval(this._onInterval,this._delay))},V.prototype.dispose=function(){this._timerId&&(clearInterval(this._timerId),this._timerId=0),this._func=null},V.prototype._onInterval=function(){this._pending?this._pending=!1:(this._func(),clearInterval(this._timerId),this._timerId=0)},V._proto=V.prototype;const E=V;let P=function(){let t=this;t._addEvents("scroll","activated","deactivated","scrollStart","scrollEnd","thicknessChanged","layoutChanged","enabled","disabled"),t._onTrackScroll=t._onTrackScroll.bind(t),t._onKeyDown=t._onKeyDown.bind(t),t._onStartFading=t._onStartFading.bind(t),t._onMouseWheel=t._onMouseWheel.bind(t),t._flash=t._flash.bind(t),t._onTouchStart=t._onTouchStart.bind(t),t._onTouchMove=t._onTouchMove.bind(t),t._onTouchEnd=t._onTouchEnd.bind(t),t._smoothScroll=t._smoothScroll.bind(t),t._updateEffectiveArea=t._updateEffectiveArea.bind(t),t._onRestingPosition=t._onRestingPosition.bind(t),t._element=document.createElement("div"),t._element.className="grid-scrollbar",t._trackContent=document.createElement("div"),t._panes=[],t._paneSliders=[],t._startPos={},t._endPos={},t._reverter=new E(t._onRestingPosition,300),t._element.addEventListener("scroll",t._onTrackScroll),t._element.addEventListener("mouseover",t._flash),t._element.appendChild(t._trackContent),t.disableKeyboardInput(!1),t._onThicknessChanged=t._dispatch.bind(t,"thicknessChanged"),P._queryNativeTrackThickness(t._onThicknessChanged),t._updateEffectiveArea()||t.listen("thicknessChanged",t._updateEffectiveArea)};l.inherits(P,u),P.prototype._vertical=!0,P.prototype._step=0,P.prototype._parentNode=null,P.prototype._hostClassName="",P.prototype._trackContent=null,P.prototype._panes=null,P.prototype._paneSliders=null,P.prototype._enabled=!0,P.prototype._active=!1,P.prototype._isFrozen=!1,P.prototype._otherScrollbar=null,P.prototype._autoHideScrollbar=!0,P.prototype._trackSize=120,P.prototype._tContentSize=0,P.prototype._tScrollVal=0,P.prototype._tPercentVal=0,P.prototype._paneSize=0,P.prototype._pContentSize=0,P.prototype._pScrollVal=0,P.prototype._footerCount=0,P.prototype._fadingId=0,P.prototype._postponeFading=!1,P.prototype._layoutChanged=!1,P.prototype._contentDirty=!0,P.prototype._layoutDirty=!0,P.prototype._touchInput=!0,P.prototype._swiping=!1,P.prototype._touchDrag=!1,P.prototype._startPos,P.prototype._endPos,P.prototype._smoothing=!0,P.prototype._smoothingId=0,P.prototype._smoothingSpeed=0,P.prototype._wheelScrolling="",P.prototype._mouseWheelLogic=null,P.prototype._onThicknessChanged=null,P._trackThickness=0,P._queryTimeout=0,P._queryStarted=!1,P._outerDummy=null,P._innerDummy=null,P._listeners=null,P.prototype._updateEffectiveArea=function(){let t=this.getTrackThickness();if(t){let e=this._vertical?"width":"height";this._element.style[e]=t+1+"px"}return!!t},P._queryNativeTrackThickness=function(t){if(P._queryStarted||P._repeatQuery(),t&&P._trackThickness<=0){let e=P._listeners;e||(e=P._listeners=[]),e.push(t)}},P._repeatQuery=function(){P._queryStarted=!0,P._retrieveNativeTrackThinkness()||(P._queryTimeout+=100,P._queryTimeout<3e3?setTimeout(P._repeatQuery,P._queryTimeout):(P._trackThickness=13,P._clearStaticResources()))},P._retrieveNativeTrackThinkness=function(){if(P._trackThickness>0)return!0;let t=P._innerDummy,e=P._outerDummy;t||(t=P._innerDummy=document.createElement("p"),t.style.width="100%",t.style.height="200px",e=P._outerDummy=document.createElement("div"),e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.appendChild(t)),e.style.overflow="hidden",document.body.appendChild(e);let i=t.offsetWidth;e.style.overflow="scroll";let o=t.offsetWidth;return i==o&&(o=e.clientWidth),document.body.removeChild(e),(P._trackThickness=i-o)>0&&(P._clearStaticResources(),!0)},P._clearStaticResources=function(){P._innerDummy=P._outerDummy=null;let t=P._listeners;if(t){P._listeners=null;let e={};for(let i=t.length;--i>=0;)t[i](e)}},P.updateTrackThickness=function(){P._trackThickness=0,P._queryTimeout=0,P._queryStarted=!1,P._queryNativeTrackThickness()},P.prototype.dispose=function(){let t=P._listeners;if(t){let e=t.indexOf(this._onThicknessChanged);e>=0&&(t.splice(e,1),this._onThicknessChanged=null)}this.unlistenAll(),this._smoothingId&&(clearInterval(this._smoothingId),this._smoothingId=0),this._active=this._layoutChanged=!1,this._dispose();for(let t=this._panes.length;--t>=0;)this._panes[t].dispose(),this._paneSliders[t].dispose();this._reverter.dispose()},P.prototype.getContent=function(t){return this._paneSliders[0].getContent(t)},P.prototype.getParent=function(){return this._parentNode},P.prototype.setParent=function(t,i){let o=e.getElement(t),n=this._parentNode!==o;n&&this._parentNode&&(this.removeWheelListener(this._parentNode),this._parentNode.classList.remove(this._hostClassName)),this.isActive()?(this._setParent(o,i),this._parentNode=this._element.parentNode,this._parentNode&&this._parentNode.classList.add(this._hostClassName)):this._parentNode=o,n&&this.addWheelListener(this._parentNode)},P.prototype.attachToExternalElement=function(t){this.setParent(t);let e=this.getElement();e.style.right="0",this._vertical?e.style.overflowX="hidden":e.style.overflowY="hidden",e.style.boxSizing="border-box",e.style.position="absolute",e.style.outline="none"},P.prototype._onActiveStateChange=function(){let t,e=this;if(e._scrollTo(0,!0),e._active){for(e._parentNode&&(e._layoutDirty=!0,e._setParent(e._parentNode),e._parentNode.classList.add(e._hostClassName)),e._flash(),t=e._panes.length;--t>=0;)e._panes[t].removeClass("scroll-disabled");e._dispatch("activated",{})}else{e._setParent(null),e._parentNode&&e._parentNode.classList.remove(e._hostClassName);let i=e._vertical?"height":"width";for(t=e._panes.length;--t>=0;)e._panes[t].addClass("scroll-disabled"),e._panes[t].setStyle(i,"");e._dispatch("deactivated",{})}e._vertical&&e._otherScrollbar&&e._otherScrollbar.isActive()&&e._otherScrollbar.invalidate()},P.prototype._onEnablingStateChange=function(){let t=this;t._enabled?t._dispatch("enabled",{}):t._dispatch("disabled",{})},P.prototype.isActive=function(){return this._active},P.prototype.isEnabled=function(){return this._enabled},P.prototype.enable=function(t){t=!1!==t,this._enabled!=t&&(this._enabled=t,this._updateLayout(),this._onEnablingStateChange())},P.prototype.disable=function(t){this.enable(!1===t)},P.prototype.getTrackSize=function(){return this._trackSize},P.prototype.getPaneSize=function(){return this._paneSize},P.prototype.getContentSize=function(){return this._pContentSize},P.prototype.getTrackThickness=function(){return P._trackThickness},P.prototype.getScrollGap=function(){return this._pContentSize-this.getPaneSize()},P.prototype.setTrackSize=function(t,e){this._trackSize=t>0?t:0,this._paneSize=e>0?e:0},P.prototype.calculateContentSize=function(){return 0},P.prototype.update=function(){if(this._contentDirty){this._contentDirty=!1;let t=this.calculateContentSize();(!t||t<0)&&(t=0),this._pContentSize!==t&&(this._pContentSize=t,this._layoutDirty=!0)}return!!this._layoutDirty&&(this._layoutDirty=!1,this._updateLayout(),!0)},P.prototype.invalidate=function(t,e){this._contentDirty=!0,this._layoutDirty=!0,null!=e&&(this._pScrollVal=e),t&&this.update()},P.prototype.invalidateContent=function(){this._contentDirty=!0},P.prototype.isScrollPosValid=function(t){let e=t-this.getPaneSize(),i=this._pScrollVal;return 0===i||i>0&&e>0&&i<e},P.prototype.flash=function(){this.update(),this._flash()},P.prototype._scroll=function(t){this._scrollTo(this._pScrollVal+t)},P.prototype._scrollTo=function(t,e){if(!this._active&&!e)return;t=this._calcProperScrollValue(t);let i=!1;this._pScrollVal!==t&&(this._pScrollVal=t,i=!0),this._setTrackScrollVal(t),i?(e&&(this._layoutChanged=!0),this._dispatchScrollEvent(null)):e&&this._dispatch("layoutChanged",{})},P.prototype._calcProperScrollValue=function(t){if(!t||t-.5<0)return 0;if(this._tPercentVal>=1&&Math.abs(this._pScrollVal-t)<=2)return this._pScrollVal;let e=this.getScrollGap();if(e<=0)return 0;if(t+.5>=e)return e;let i=this._step;if(i){if((t=Math.round(t/i)*i)-i/2<=0)return 0;if(t+i/2>=e)return e}return Math.round(t)},P.prototype._convertTrackToPane=function(t){t=Math.round(t);let e=this._getTrackGap();this._tPercentVal>=1&&Math.abs(this._tScrollVal-t)<=5&&(t=e),this._tScrollVal=t,this._tPercentVal=e?t/e:0;let i=this.getScrollGap();return e===i?t:this._tPercentVal*i},P.prototype._setTrackScrollVal=function(t){let e=this._getTrackGap(),i=0;if(e>0){if(t>0){let o=this.getScrollGap();i=e===o?t:t/o*e,i=Math.round(i)}i>=e&&(i=e)}if(i!==this._tScrollVal){this._tScrollVal=i,this._tPercentVal=e?i/e:0;let t=this._element;return this._vertical?t.scrollTop=i:t.scrollLeft=i,!0}return!1},P.prototype._getTrackGap=function(){let t=this._tContentSize-this.getTrackSize();return t>0?t:0},P.prototype._getScrollValue=function(){return this._pScrollVal},P.prototype._isEndOfScroll=function(){return!this._active||this._pScrollVal>=this.getScrollGap()},P.prototype._isStartOfScroll=function(){return!this._pScrollVal},P.prototype._isOnEdge=function(t){return t<0&&this._isStartOfScroll()||t>0&&this._isEndOfScroll()},P.prototype._flash=function(){this._active&&this._autoHideScrollbar&&(this._fadingId?this._postponeFading=!0:(this._element._fading&&(this._element.classList.remove("grid-scroll-fadeout"),this._element._fading=!1),this._fadingId=setTimeout(this._onStartFading,1e3)))},P.prototype._clearAllPanes=function(){for(let t=this._panes.length;--t>=0;){this._panes[t].setParent(null);let e=this._paneSliders[t];e._content=e._columns=null;let i=e.getElement();for(;null!==i.firstChild;)i.removeChild(i.firstChild)}},P.prototype.disableKeyboardInput=function(t){!1===t?(this._element.setAttribute("tabindex","-1"),this._element.addEventListener("keydown",this._onKeyDown,!1)):(this._element.removeAttribute("tabindex"),this._element.removeEventListener("keydown",this._onKeyDown,!1))},P.prototype.disableTouchInput=function(t){this._touchInput=!1===t},P.prototype.setAutoHide=function(t){this._autoHideScrollbar=t,t||(this._element._fading&&(this._element.classList.remove("grid-scroll-fadeout"),this._element._fading=!1),this._fadingId&&(clearTimeout(this._fadingId),this._fadingId=0))},P.prototype.getAutoHide=function(){return this._autoHideScrollbar},P.prototype.setOtherScrollbar=function(t){this._otherScrollbar=t},P.prototype.setFooterCount=function(t){this._footerCount=t},P.prototype._calcActiveState=function(){if(this._enabled&&this.getTrackSize()>20){let t=this.getPaneSize();if(t>0)return this._pContentSize-t>0}return!1},P.prototype._updateLayout=function(){let t=this._calcActiveState();if(t!==this._active&&(this._active=t,this._onActiveStateChange()),!this._active)return;let e=this.getTrackSize(),i=this.getPaneSize();if(this._tContentSize=this._pContentSize/i*e,this._vertical)this._trackContent.style.height=this._tContentSize+"px",this._element.style.height=e+"px",this._panes[0].setHeight(i);else{this._trackContent.style.width=this._tContentSize+"px",this._element.style.width=e+"px";for(let t=this._panes.length;--t>=0;)this._panes[t].setWidth(i)}this._scrollTo(this._pScrollVal,!0)},P.prototype.resetPaneSize=function(){let t=this._vertical?"height":"width";for(let e=this._panes.length;--e>=0;)this._panes[e].setStyle(t,"")},P._preventVScrolling=function(t){t.currentTarget.scrollTop=0},P._preventHScrolling=function(t){t.currentTarget.scrollLeft=0},P.prototype._addPaneAt=function(t){null==t&&(t=this._panes.length);let e=this._panes[t];if(!e){if(e=new u(document.createElement("div")),e.setClass("grid-pane"),this._vertical?(e.addClass("sections"),e.listen("scroll",P._preventVScrolling)):(e.addClass("columns"),e.listen("scroll",P._preventHScrolling)),this._active||e.addClass("scroll-disabled"),this._paneSize&&this._active){let t=this.getPaneSize();this._vertical?e.setHeight(t):e.setWidth(t)}e.listen("touchstart",this._onTouchStart),e.listen("touchmove",this._onTouchMove),e.listen("touchend",this._onTouchEnd),e.listen("touchcancel",this._onTouchEnd);let i=new u(document.createElement("div"));i.setClass("grid-pane-slider"),i.setParent(e),this._panes[t]=e,this._paneSliders[t]=i}return e},P.prototype._onStartFading=function(t){this._fadingId=0,this._active&&(this._postponeFading?(this._postponeFading=!1,this._flash()):this._element._fading||(this._element.classList.add("grid-scroll-fadeout"),this._element._fading=!0))},P.prototype._onTrackScroll=function(t){if(!this._element)return;let e=this._vertical?t.target.scrollTop:t.target.scrollLeft,i=this._convertTrackToPane(e);i=this._calcProperScrollValue(i),i!==this._pScrollVal&&(this._pScrollVal=i,this._dispatchScrollEvent(t))},P.prototype._onRestingPosition=function(){this._setSliderPosition(-this._pScrollVal,!0)},P.prototype._setSliderPosition=function(t,e){let i="",o="",n=this._vertical?"top":"left";t&&(e?o=t+"px":(i=this._vertical?"translateY":"translateX",i+="("+t+"px)",this._reverter.start()));for(let e=this._paneSliders.length;--e>=0;){let s=this._paneSliders[e],r=s.getElement().style;s._titleSection?r[n]=t+"px":(r.transform=i,r[n]=o)}e?this._dispatch("scrollEnd",{}):this._dispatch("scrollStart",{})},P.prototype._dispatchScrollEvent=function(t){if(this._setSliderPosition(-this._pScrollVal,!1),this._flash(),!this._isEventDispatching("scroll")){if(!t){let e=this._element;t={currentTarget:e,srcElement:e,target:e}}t.layoutChanged=this._layoutChanged,this._vertical?t.scrollTop=this._pScrollVal:t.scrollLeft=this._pScrollVal,this._dispatch("scroll",t)}},P.prototype._onKeyDown=function(t){if(this._isFrozen)return void e._preventDefault(t);if(!this._active)return;let i=!1;if(i=this._vertical?38===t.keyCode||40===t.keyCode:37===t.keyCode||39===t.keyCode,i){let i=this.getScrollGap(),o=Math.round(.07*i);o<10?o=10:o>100&&(o=100),37!==t.keyCode&&38!==t.keyCode||(o*=-1),this._scroll(o),e._preventDefault(t)}},P.prototype._onTouchStart=function(t){this._isFrozen?e._preventDefault(t):!this._swiping&&this._touchInput&&(this._vertical&&this.update(),this._flash(),this._smoothingId&&(clearInterval(this._smoothingId),this._smoothingId=0),this._swiping=!0,this._getTouchInfo(t,this._startPos))},P.prototype._onTouchMove=function(t){let i=this;if(i._isFrozen)return void e._preventDefault(t);if(!i._swiping||!i._active||!i._touchInput)return;if(t.touches&&t.touches.length>1)return;let o=i._startPos,n=i._endPos;i._getTouchInfo(t,n);let s=this._vertical?o.y-n.y:o.x-n.x;s>-5&&s<5||i._isOnEdge(s)||(i._touchDrag?i._scrollTo(o.scrollValue+s):n.timeStamp-o.timeStamp>30&&(i._touchDrag=!0),t.cancelable&&t.preventDefault())},P.prototype._onTouchEnd=function(t){if(this._isFrozen)e._preventDefault(t);else if(this._swiping=!1,this._touchDrag&&(this._touchDrag=!1,t.cancelable&&t.preventDefault(),this._smoothing&&!this._smoothingId)){let e=this._startPos,i=this._getTouchInfo(t,this._endPos),o=i.timeStamp-e.timeStamp,n=this._vertical?e.y-i.y:e.x-i.x;this._smoothingSpeed=30*n/o,(this._smoothingSpeed>10||this._smoothingSpeed<-10)&&(this._smoothingId=setInterval(this._smoothScroll,25))}},P.prototype._getTouchInfo=function(t,e){let i=t.changedTouches[0];return e||(e={}),e.x=i.pageX,e.y=i.pageY,e.timeStamp=t.timeStamp,e.scrollValue=this._getScrollValue(),e},P.prototype._smoothScroll=function(){let t=this._smoothingSpeed;t=.9*t|0,this._smoothingSpeed=t,t>1||t<-1?this._scroll(t):(clearInterval(this._smoothingId),this._smoothingId=0)},P.prototype.disableMouseWheel=function(t){!1===t?this.setMouseWheelLogic(this._mouseWheelLogic||this._onMouseWheel):this.setMouseWheelLogic(null)},P.prototype.setMouseWheelLogic=function(t){this.removeWheelListener(this._parentNode),this._mouseWheelLogic=t,this._mouseWheelLogic&&this.addWheelListener(this._parentNode)},P.prototype.addWheelListener=function(t){t&&this._mouseWheelLogic&&t.addEventListener("wheel",this._mouseWheelLogic,!1)},P.prototype.removeWheelListener=function(t){t&&this._mouseWheelLogic&&t.removeEventListener("wheel",this._mouseWheelLogic,!1)},P.prototype.setMouseWheelSpeed=function(t){this._wheelScrolling="string"==typeof t?t:""},P.prototype.getMouseWheelSpeed=function(){return this._wheelScrolling},P.prototype.getDefaultMouseWheelLogic=function(){return this._onMouseWheel},P.prototype._onMouseWheel=function(t){if(t.target.opened)return;if(this._isFrozen)return void e._preventDefault(t);if(t.ctrlKey||t.altKey)return;if(!this.isActive())return;let i=this._vertical?t.deltaY:t.deltaX;if(i&&!this._isOnEdge(i)){if(e._preventDefault(t),t.deltaMode&&(i=i>0?100:-100),"linear"!=this._wheelScrolling){let t=this.getContentSize();t>=4e3&&(i*=1+t/4e3|0)}this.update(),this._scroll(i)}},P.prototype.setScrollingStep=function(t){this._step=t>0?t:0},P.prototype.freezeScrolling=function(t){let e=this._isFrozen;return this._isFrozen=!1!==t,e},P.prototype.restoreTrackPosition=function(){let t=this._element;this._vertical&&(t.scrollTop=this._tScrollVal,t.scrollTop&&(this._tScrollVal=t.scrollTop))},P._proto=P.prototype;const M=P;let H=function(){let t=this;t._vertical=!1,t._onDeactivated=t._onDeactivated.bind(t),t._onActivated=t._onActivated.bind(t),t._hostClassName="hscrollbar-host",H.base(this,"constructor"),t._element.classList.add("grid-hscroll"),t._trackContent.style.height="1px",t.disableMouseWheel(!1),t.listen("activated",t._onActivated),t.listen("deactivated",t._onDeactivated)};l.inherits(H,M),H.prototype._pinnedLeftColumnCount=0,H.prototype._pinnedRightColumnCount=0,H.prototype.setScrollContent=function(t,e,i,o){this._clearAllPanes();let n=e.length;if(n<=0)return;this._pinnedLeftColumnCount=i>=0?i:0,this._pinnedRightColumnCount=o>0?o:0;let s=e[0],r=s.getColumnCount(),l=r-o;(!l||l<0)&&(l=r);for(let t=0;t<n;++t){s=e[t];let o,n,h=this._addPaneAt(t),u=this._paneSliders[t],a=h.getElement(),p=u.getElement();for(o=0;o<i;++o)n=s.getColumn(o),n.setScrollState(a,null,!1);let _=s.getColumnHost();h.setParent(_);let d=[],c=[];for(o=i;o<l;++o)n=s.getColumn(o),n.setScrollState(null,p,this.isActive()),d.push(n),c.push(n.getElement());for(o=l;o<r;++o)n=s.getColumn(o),n.setScrollState(null,null,!1);let g=s.getReservedSpace();g&&(this.isActive()&&!this._pinnedRightColumnCount?(u.addContent(g),c.push(g)):_.appendChild(g),s._updateRightSpaceStyle()),s._updateLayers(),u._titleSection=s.hasClass("title"),u._columns=d,u._content=c}this.invalidateContent()},H.prototype.setWidth=function(t){return this.setTrackSize(t,t),!0},H.prototype.getWidth=function(){return this.getPaneSize()},H.prototype.getScrollLeft=function(){return this._getScrollValue()},H.prototype.setScrollLeft=function(t){this.update(),this._scrollTo(t)},H.prototype.getPinnedLeftColumnCount=function(){return this.isEnabled()?this._pinnedLeftColumnCount:0},H.prototype.getPinnedRightColumnCount=function(){return this.isEnabled()?this._pinnedRightColumnCount:0},H.prototype.setPaneLeft=function(t){let e=t&&this.isActive()?-t+"px":"";for(let t=this._panes.length;--t>=0;)this._paneSliders[t].setStyle("marginLeft",e)},H.prototype.isEndOfHorizontalScroll=function(){return this._isEndOfScroll()},H.prototype.getContentWidth=function(){let t=this._paneSliders[0],e=0;if(t){let i=t._content;for(let t=i.length;--t>=0;){let o=i[t],n=o?o.style.width:0;n&&(e+=parseFloat(n))}}return e},H.prototype.calculateContentSize=function(){return this.getContentWidth()},H.prototype.getTrackSize=function(){return this._footerCount<=0&&this._otherScrollbar&&this._otherScrollbar.isActive()&&!this._pinnedRightColumnCount?this._trackSize-this.getTrackThickness():this._trackSize},H.prototype._onActivated=function(t){this._updateActivation(!0)},H.prototype._onDeactivated=function(t){this._updateActivation(!1)},H.prototype._updateActivation=function(t){let e=this._paneSliders.length;for(let i=0;i<e;++i){let e=this._paneSliders[i]._columns,o=e?e.length:0;for(let i=0;i<o;++i){let o=e[i];o.getElement()&&o.enableAbsolutePosition(t)}}},H._proto=H.prototype;const F=H;let k=function(t,e){return t>e?e:t<0?0:t},O=function(t){this._boundLayer=t.boundLayer,this._layoutX=t.layoutX,this._layoutY=t.layoutY,this._hscrollbar=t.hscrollbar,this._calculateColumnBounds=t.calculateColumnBounds};O.prototype._boundLayer=null,O.prototype._layoutX,O.prototype._layoutY,O.prototype._hscrollbar,O.prototype._calculateColumnBounds,O.prototype._cellBound=null,O.prototype._cbLftIdx=0,O.prototype._cbRgtIdx=0,O.prototype._cbTopIdx=0,O.prototype._cbBtmIdx=0,O.prototype.dispose=function(){let t=this._cellBound;if(t){let e=t.parentNode;e&&e.removeChild(t),this._cellBound=null}this._boundLayer=null,this._layoutX=null,this._layoutY=null,this._hscrollbar=null,this._calculateColumnBounds=null},O.prototype.setCellBounds=function(t,e,i,o,n){let s=this._cellBound;s||(s=this._cellBound=document.createElement("div"),s.className="selection-bound");let r=t+i,l=e+o,h=this._layoutY.getLaneCount();this._cbLftIdx=k(t,n),this._cbRgtIdx=k(r,n),this._cbTopIdx=k(e,h),this._cbBtmIdx=k(l,h),this.updateCellBounds()},O.prototype.updateCellBounds=function(){let t=this._cellBound;if(!t)return;let e,i,o,n,s=this._layoutX,r=this._layoutY,l=this._cbLftIdx,h=this._cbRgtIdx,u=this._cbTopIdx,a=this._cbBtmIdx;e=i=o=n=0,l<h&&u<a&&(e=s.getLaneStart(l),i=s.getLaneEnd(h-1),o=r.getLaneStart(u),n=r.getLaneEnd(a-1));let p=i-e,_=n-o,d=[!1,!1];if(p>0&&_>0&&this._hscrollbar){let t=[0,0];this._calculateColumnBounds(l,h-1,t,d),e=t[0],i=t[1],p=i-e}if(p>0)t.style.left=e+"px",t.style.top=o+"px",t.style.width=p+"px",t.style.height=_+"px",t.classList.toggle("no-left-bound",d[0]),t.classList.toggle("no-right-bound",d[1]),this._boundLayer&&this._boundLayer.appendChild(t);else{let e=t.parentNode;e&&e.removeChild(t)}},O._proto=O.prototype;const B=O;let G=function(t){let e=this;e._onMouseMove=e._onMouseMove.bind(e),e._onMouseOut=e._onMouseOut.bind(e),e._onResetTransformIE=e._onResetTransformIE.bind(e),e._trackX=new g,e._trackY=new g,e._trackX.setDefaultLaneSize(100),e._trackY.setDefaultLaneSize(32),e._cellSpans=new A,e._element=document.createElement("div"),e._element.className="tr-lg tr-even-shading",e._ctxRows=new w,e._columns=[],e._cells=[],e._highlightedCells=[],e._stretchedCells=new I(e._trackX,e._trackY,e),e._selectionList=new T,t&&(e._virOwner=t.owner||null,t.horizontalScrollbar&&(e._hscrollbar=t.horizontalScrollbar)),e._virOwner||e._element.classList.add("section"),e._addEvent("rowHighlighted"),e._addEvent("rowCountChanged"),e._addEvent("rowHeightChanged"),e._addEvent("rowAvailable")};l.inherits(G,u),G.prototype._index=-1,G.prototype._availableRowCount=0,G.prototype._activeRow=0,G.prototype._activeRowEnd=0,G.prototype._colCount=0,G.prototype._rowCount=0,G.prototype._hiddenRowCount=0,G.prototype._trackX,G.prototype._trackY,G.prototype._cellSpans,G.prototype._columns,G.prototype._firstColumn,G.prototype._lastColumn,G.prototype._rightSpace,G.prototype._rightSpaceSize=0,G.prototype._frozenLayout=!1,G.prototype._rowHighlightEnabled=!1,G.prototype._rowHighlightIndex=-1,G.prototype._highlightedCells,G.prototype._coverLayer=null,G.prototype._stretchedCells=null,G.prototype._ctx=null,G.prototype._selectionList,G.prototype._colVir=!1,G.prototype._initialized=!1,G.prototype._hidingMethod="",G.prototype._virOwner=null,G.prototype._transformIETimer=0,G.prototype._ctxRows,G.prototype._boundLayer=null,G.prototype._colBounds=null,G.prototype._colBoundCache=null,G.prototype._hscrollbar=null,G.prototype._leftColumnSeparator=null,G.prototype._rightColumnSeparator=null,G.prototype._cellBoundPainter=null,G.prototype.dispose=function(){this.setRowCount(0),this.unlistenAll(),this._ctxRows.dispose(),this._stretchedCells.dispose();for(let t=this._columns.length;--t>=0;)this._columns[t].dispose();this._colCount=this._rowCount=this._activeRowEnd=this._availableRowCount=0,this._colBounds=this._colBoundCache=null,this._highlightedCells.length=0,this._ctx=null,this._hscrollbar=null,this._cellBoundPainter&&this._cellBoundPainter.dispose(),this._dispose()},G.prototype.getWidth=function(){return this.isVisible()?this._getWidth():0},G.prototype._getWidth=function(){return this.getContentWidth()+this._rightSpaceSize},G.prototype.setWidth=function(t){return!(t<0)&&(null!=this._trackX.setTrackSize(t-this._rightSpaceSize)&&(this._syncLayoutToColumns(0),!0))},G.prototype.getHeight=function(){return this.isVisible()?this.getContentHeight():0},G.prototype.setHeight=function(t){return!(t<0)&&(null==this._trackY.setTrackSize(t)||this._syncLayoutToRows(0,this._rowCount),!0)},G.prototype.show=function(t){this._element.style.display=!1!==t?"":"none",this._trackY.show(t),this.setFrozenLayout(!1===t),this._dispatchRowHeightChangedEvent(0,this._rowCount)},G.prototype.hitTest=function(t,e,i){if(t<0)return null;if(e<0)return null;if(t>=this.getContentWidth())return null;if(e>=this.getHeight())return null;let o=this._trackX.hitTest(t);if(o<0)return null;let n=this._trackY.hitTest(e);if(n<0)return null;let s={};if(s.colIndex=o,s.rowIndex=n,!0!==i){let t=this._cellSpans.getOccupyingSpan(o,n);t&&(s.colIndex=t.indexX,s.rowIndex=t.indexY)}return s},G.prototype.hitTestX=function(t){return t<0?-1:t>=this.getContentWidth()?~this._colCount:this._trackX.hitTest(t)},G.prototype.hitTestY=function(t){return t<0?-1:t>=this.getHeight()?~this._rowCount:this._trackY.hitTest(t)},G.prototype.getDefaultColumnWidth=function(){return this._trackX.getDefaultLaneSize()},G.prototype.setDefaultColumnWidth=function(t){this._trackX.getDefaultLaneSize()!==t&&(this._trackX.setDefaultLaneSize(t),this._syncLayoutToColumns(0))},G.prototype.getDefaultRowHeight=function(){return this._trackY.getDefaultLaneSize()},G.prototype.setDefaultRowHeight=function(t){if(this._trackY.getDefaultLaneSize()!==t){this._trackY.setDefaultLaneSize(t);for(let e=0;e<this._colCount;++e)this._columns[e].setHeight(t);this._syncLayoutToRows(0,this._rowCount),this._dispatchRowHeightChangedEvent(0,this._rowCount)}},G.prototype.getColumnWidth=function(t){return this._trackX.getLaneSize(t)},G.prototype.setColumnWidth=function(t,e){return!!this._setColumnWidth(t,e)&&(this._syncLayoutToColumns(t),!0)},G.prototype._setColumnWidth=function(t,e){return this._trackX.setLaneSize(t,e)},G.prototype._updateColumnLayout=function(){this._syncLayoutToColumns(0)},G.prototype._startBindingSession=function(t){},G.prototype._getTempRowHeights=function(){return null},G.prototype.getRowHeight=function(t){return this._trackY.getLaneSize(t)},G.prototype.setRowHeight=function(t,e){if(t<0||t>=this._rowCount)return!1;let i=this._trackY.setLaneSize(t,e);return this._syncLayoutToRows(t,t+1),i&&this._dispatchRowHeightChangedEvent(t,t+1),this._resetTransformIETimer(),i},G.prototype._updateRowHeights=function(t,e){let i=0;for(let o=0;o<this._rowCount;++o){let n=t.getLaneSize(e);i|=this._trackY.setLaneSize(o,n),++e}return this._syncLayoutToRows(0,this._rowCount),i},G.prototype.isColumnVisible=function(t){return this._trackX.isLaneVisible(t)},G.prototype.hideColumn=function(t,e){return this.setColumnVisibility(t,!1===e,0)},G.prototype.isRowVisible=function(t){return this._trackY.isLaneVisible(t)},G.prototype.hideRow=function(t,e){return!!this._trackY.hideLane(t,e)&&(null!=e&&!e||this.isRowVisible(t)?this.isRowVisible(t)&&this._hiddenRowCount--:this._hiddenRowCount++,this._syncLayoutToRows(t,this._rowCount),this._dispatchRowHeightChangedEvent(t,t+1),!0)},G.prototype.getMinimumColumnWidth=function(t){return this._trackX.getMinimumLaneSize(t)},G.prototype.setMinimumColumnWidth=function(t,e){return!!this._trackX.setMinimumLaneSize(t,e)&&(this._syncLayoutToColumns(t),!0)},G.prototype.getMinimumRowHeight=function(t){return this._trackY.getMinimumLaneSize(t)},G.prototype.setMinimumRowHeight=function(t,e){return!!this._trackY.setMinimumLaneSize(t,e)&&(this._syncLayoutToRows(t,this._rowCount),this._dispatchRowHeightChangedEvent(t,t+1),!0)},G.prototype.getCellLeft=function(t){return this._trackX.getLaneStart(t)},G.prototype.getCellTop=function(t){return this._trackY.getLaneStart(t)},G.prototype.getCellWidth=function(t,e){let i=this._cellSpans.getOccupyingSpan(t,e);if(i){let t=this._trackX.getLaneStart(i.indexX);return this._trackX.getLaneEnd(i.indexX+i.colSpan-1)-t}return this.getColumnWidth(t)},G.prototype.getCellHeight=function(t,e){let i=this._cellSpans.getOccupyingSpan(t,e);if(i){let t=this._trackY.getLaneStart(i.indexY);return this._trackY.getLaneEnd(i.indexY+i.rowSpan-1)-t}return this.getRowHeight(e)},G.prototype.hasCellSpan=function(){return this._cellSpans.hasSpan()},G.prototype.getCellRowSpan=function(t,e){return this._cellSpans.getRowSpan(t,e)},G.prototype.setCellRowSpan=function(t,e,i){let o=this._cellSpans.setRowSpan(t,e,i);if(this._updateCellSpanSize(t,e,o),o)return o.retVal>=0?this._updateCellSpanClass(t,e,o.colSpan,o.rowSpan,!0):o.colSpan>1?(this._updateCellSpanClass(t,e,o.colSpan,o.prevRowSpan,!1),this._updateCellSpanClass(t,e,o.colSpan,o.rowSpan,!0)):this._updateCellSpanClass(t,e,o.colSpan,o.prevRowSpan,!1),0!==o.retVal;let n=this._getCell(t,e);return n&&n._rowSpan>1&&this._updateCellSpanClass(t,e,n._colSpan,n._rowSpan,!1),!1},G.prototype.getCellColSpan=function(t,e){return this._cellSpans.getColSpan(t,e)},G.prototype.setCellColSpan=function(t,e,i){let o=this._cellSpans.setColSpan(t,e,i);if(this._updateCellSpanSize(t,e,o),o)return o.retVal>=0?this._updateCellSpanClass(t,e,o.colSpan,o.rowSpan,!0):o.colSpan>1?(this._updateCellSpanClass(t,e,o.prevColSpan,o.rowSpan,!1),this._updateCellSpanClass(t,e,o.colSpan,o.rowSpan,!0)):this._updateCellSpanClass(t,e,o.prevColSpan,o.rowSpan,!1),0!==o.retVal;let n=this._getCell(t,e);return n&&n._colSpan>1&&this._updateCellSpanClass(t,e,n._colSpan,n._rowSpan,!1),!1},G.prototype.clearCellSpans=function(){let t=this._cellSpans.clearAllSpans();if(null==t)return!1;for(let e=t.length;--e>=0;){let i=t[e];this._updateCellSpan(i.indexX,i.indexY,i,!1)}return!0},G.prototype.clearColumnSpans=function(t){let e=this._cellSpans.removeSpanByColIndex(t);if(null==e)return!1;for(let t=e.length;--t>=0;){let i=e[t];this._updateCellSpan(i.indexX,i.indexY,i,!1)}return!0},G.prototype.clearColumnCustomizations=function(){this._trackX.clearLaneCustomizations(),this._syncLayoutToColumns(0)},G.prototype.clearRowCustomizations=function(){this._trackY.clearLaneCustomizations(),this._syncLayoutToRows(0,this._rowCount)},G.prototype.getColumnScalability=function(t){return this._trackX.getLaneScalability(t)},G.prototype.setColumnScalability=function(t,e){return this._trackX.setLaneScalability(t,e)},G.prototype.getRowScalability=function(t){return this._trackY.getLaneScalability(t)},G.prototype.setRowScalability=function(t,e){return this._trackY.setLaneScalability(t,e)},G.prototype.getCell=function(t,e,i){if(i&&this._cellSpans.hasSpan()){let i=this._cellSpans.getColSpan(t,e),o=this._cellSpans.getRowSpan(t,e);i<0&&(t+=i),o<0&&(e+=o)}return this._getCell(t,e)},G.prototype.getCellContent=function(t,e){let i=this.getCell(t,e);return null!==i?i.getContent():null},G.prototype.setCellContent=function(t,e,i){let o=this.getCell(t,e);return null==o?(window.console.log("Error: Accessing nonexistent cell in Grid's Table"),null):o.setContent(i)},G.prototype.getColumnCount=function(){return this._colCount},G.prototype.setColumnCount=function(t){if(t<0&&(t=0),this._colCount===t)return;let e=this._colCount;this._trackX.setLaneCount(t),this._colCount=this._trackX.getLaneCount();let i=0,o=null;if(e>t)for(i=e;--i>=t;)o=this._columns.pop(),o.dispose(),o===this._firstColumn&&(this._firstColumn=null),o===this._lastColumn&&(this._lastColumn=null);else for(i=e;i<t;++i)o=this._newColumn(i);for(this._updateColumnIndices(),i=e;i<t;++i)this._columns[i].activate(!this._colVir);t<=0&&this._selectionList.clearAllSelections()},G.prototype.getRowCount=function(){return this._rowCount},G.prototype.setRowCount=function(t,e){if(t<0&&(t=0),this._rowCount===t)return;let i,o=this._rowCount;for(this._trackY.setLaneCount(t),this._rowCount=this._trackY.getLaneCount(),this._ctxRows.setItemCount(t),this._stretchedCells.setCellCount(t),i=0;i<this._colCount;++i)this._columns[i].setCellCount(t);if(o>t)if(t<this._rowHighlightIndex&&this.setRowHighlight(-1),t<this._activeRowEnd&&(this._activeRowEnd=t),t<this._availableRowCount&&(this._availableRowCount=t),this._cellSpans.removeSpanStartedFromRowIndex(t),this._updateViewHeight(),t>0)for(let e=t;e<o;++e)this._selectionList.deselect(e);else this._selectionList.clearAllSelections();else this._syncLayoutToRows(o,t);let n={};n.prevCount=o,n.rowCount=this._rowCount,this._dispatch("rowCountChanged",n),o<t&&this._insertCells(0,this._rowCount)},G.prototype.getVisibleRowCount=function(){return this._rowCount-this._hiddenRowCount},G.prototype.addRow=function(t){t<=0||(this._colCount<=0?window.console.log("WARNING: Row cannot be added, unless at least one column is added"):this.setRowCount(this._rowCount+t))},G.prototype.removeRow=function(t){t<=0||(t>this._rowCount&&(t=this._rowCount),this.setRowCount(this._rowCount-t))},G.prototype.setBorders=function(t,e,i,o){},G.prototype.getColumnStyle=function(t,e){let i=this._columns[t];return i?i.getStyle(e):null},G.prototype.setColumnStyle=function(t,e,i){let o=this._columns[t];o&&o.setStyle(e,i)},G.prototype.enableColumnClass=function(t,e,i){let o=this._columns[t];o&&o.enableClass(e,i)},G.prototype.hasColumnClass=function(t,e){let i=this._columns[t];return!!i&&i.hasClass(e)},G.prototype.enableRowClass=function(t,e,i){if(t>=0&&t<this._rowCount)for(let o=0;o<this._colCount;++o)this._columns[o].getCell(t).enableClass(e,i)},G.prototype.setRowStyle=function(t,e,i,o){if(t>=0&&t<this._rowCount){i&&(null==o||o)||(i="");for(let o=0;o<this._colCount;++o)this._columns[o].getCell(t).setStyle(e,i)}},G.prototype.getRelativePosition=function(t){return e.getRelativePosition(t,this._element)},G.prototype.getContentWidth=function(){return this._trackX.getTrackSize()},G.prototype.getContentHeight=function(){let t=this._trackY.getTrackSize();if(t<=0&&this._colCount*this.getVisibleRowCount()>0){let t=this._columns[0],e=t.getCell(this._rowCount-1);return e.getTop()+e.getHeight()-t.getCell(0).getTop()}return t},G.prototype.getCellsByRowIndex=function(t){if(t<0||t>=this._rowCount)return null;let e=new Array(this._colCount);for(let i=0;i<this._colCount;++i)e[i]=this._columns[i].getCell(t);return e},G.prototype.disableHorizontalGridLine=function(t){this.enableClass("no-horizontal-grid-line",!1!==t)},G.prototype.disableVerticalGridLine=function(t){this.enableClass("no-vertical-grid-line",!1!==t)},G.prototype.enableShading=function(t){!1!==t?this.addClass("tr-even-shading"):(this.removeClass("tr-even-shading"),this.removeClass("tr-odd-shading"))},G.prototype.setTransposedShading=function(t){this.enableClass("transposed-shading",!1!==t)},G.prototype.enableRowHighlighting=function(t){null==t&&(t=!0),this._rowHighlightEnabled!==t&&(this._rowHighlightEnabled=t,this._rowHighlightEnabled?(this.listen("mousemove",this._onMouseMove),this.listen("mouseout",this._onMouseOut)):(this.setRowHighlight(-1),this.unlisten("mousemove",this._onMouseMove),this.unlisten("mouseout",this._onMouseOut)))},G.prototype.getRowHighlight=function(){return this._rowHighlightIndex},G.prototype.setRowHighlight=function(t){if((!this._rowHighlightEnabled||t<-1||t>=this._rowCount)&&(t=-1),this._rowHighlightIndex===t)return;let e=this._rowHighlightIndex;this._rowHighlightIndex=t;for(let t=this._highlightedCells.length;--t>=0;)this._highlightedCells[t].removeClass("highlighted-row");if(t>=0&&t<this._rowCount){this._highlightedCells.length=this._colCount;for(let e=this._colCount;--e>=0;){let i=this._columns[e].getCell(t);this._highlightedCells[e]=i,i.addClass("highlighted-row")}let e=this.getStretchedCell(t);e&&(this._highlightedCells.push(e),e.addClass("highlighted-row"))}else this._highlightedCells.length=0;if(this._hasListener("rowHighlighted")){let i={};i.prevRowIndex=e,i.rowIndex=t,this._dispatch("rowHighlighted",i)}},G.prototype.getSelectedRows=function(){return this.getSelectedRowCount()>0?this._selectionList.getAllSelections():null},G.prototype.getSelectedRowCount=function(){return this._selectionList.getSelectionCount()},G.prototype.isSelectedRow=function(t){return this._selectionList.getSelection(t)},G.prototype.setSelectedRow=function(t,e){t<0||t>=this._rowCount||(this._selectionList.setSelection(t,e),this._updateSelectionUI(t))},G.prototype.selectSingleRow=function(t){t<0||t>=this._rowCount||(this.clearSelectedRows(),this._selectionList.select(t),this._addSelectionUI(t))},G.prototype.selectRowRange=function(t,e){if(!(t<0||t>=this._rowCount)){t+e>this._rowCount&&(e=this._rowCount-t),this._selectionList.selectRange(t,e);for(let i=0;i<e;++i)this._addSelectionUI(i+t)}},G.prototype.clearSelectedRows=function(){let t=this._selectionList.getSelectionCount();if(t){let e=this._selectionList.getAllSelections();this._selectionList.clearAllSelections();for(let i=0;i<t;++i)this._removeSelectionUI(e[i]);return t}return 0},G.prototype.getFirstSelectedRow=function(){return this._selectionList.getFirstSelectedIndex()},G.prototype.getLastSelectedRow=function(){return this._selectionList.getLastSelectedIndex()},G.prototype.getRowAnchor=function(){return this._selectionList.getSelectionAnchor()},G.prototype.setRowAnchor=function(t){this._selectionList.setSelectionAnchor(t)},G.prototype.activateColumn=function(t,e){let i=this._columns[t];if(i){let t=i.activate(e);if(e&&t&&this._rightSpace){let t=this._rightSpace.parentNode;t&&t.appendChild(this._rightSpace)}}},G.prototype.activateRows=function(){this._onEnterDocument()},G.prototype.moveRowsToTop=function(t){this._ctxRows.moveItemsToTop(t),this._stretchedCells.moveCellsToTop(t);for(let e=0;e<this._colCount;++e)this._columns[e].moveCellsToTop(t)},G.prototype.getFirstIndexInView=function(){return 0},G.prototype.getLastIndexInView=function(){return this._availableRowCount-1},G.prototype.isInCurrentView=function(t){return 0!==this._rowCount&&t>=0&&t<this._rowCount},G.prototype.getFrozenLayout=function(){return this._frozenLayout},G.prototype.setFrozenLayout=function(t){this.isVisible()||(t=!0),this._frozenLayout!==t&&(this._frozenLayout=t,this._cellSpans.freezeMapping(this._frozenLayout),this._frozenLayout||(this._syncLayoutToColumns(0),this._syncLayoutToRows(0,this._rowCount),this._dispatchRowHeightChangedEvent(0,this._rowCount)))},G.prototype.getColumn=function(t){return this._columns[t]||null},G.prototype.insertColumn=function(t,e){t<0?t=0:t>this._colCount&&(t=this._colCount);let i=t<this._colCount,o=this._cellSpans.getAllSpans();this._updateCellSpans(o,!1),this._trackX.insertLane(t,e),this._colCount=this._trackX.getLaneCount();let n=this._newColumn(t);if(this._updateColumnIndices(),this._cellSpans.shiftColumn(t,1)&&(o=this._cellSpans.getAllSpans()),this._updateCellSpans(o,!0),this._calculateViewSize(!0),this._stretchedCells.updateXAxis(),this._selectionList.getSelectionCount()){let t=this._selectionList.getAllSelections();for(let e=t.length;--e>=0;){let i=n.getCell(t[e]);i&&i.addClass("selected-row")}}return n.activate(i||!this._colVir),n},G.prototype.removeColumnAt=function(t){let e=this._trackX.removeLaneAt(t);if(null==e)return null;let i=this._cellSpans.getAllSpans();this._updateCellSpans(i,!1),this._colCount=this._trackX.getLaneCount();let o=this._columns.splice(t,1)[0];return o.dispose(),e.control=o,this._updateColumnIndices(),this._cellSpans.removeColumn(t)&&(i=this._cellSpans.getAllSpans()),this._updateCellSpans(i,!0),this._syncLayoutToColumns(t),t>=this._colCount&&this._updateCssWidth(),e},G.prototype.moveColumn=function(t,i){if(t<0)t=0;else if(t>=this._colCount)return;if(i<0?i=0:i>=this._colCount&&(i=this._colCount-1),t===i)return;let o=this._cellSpans.getAllSpans();this._updateCellSpans(o,!1),this._trackX.moveLane(t,i);let n=this._columns[t];if(e.moveArrayItem(this._columns,t,i),n.getElement().offsetParent){let t=i+1,e=this._columns[t]||null;for(;e&&!e.getElement().offsetParent;)e=this._columns[++t];n.insertBefore(e)}this._updateColumnIndices(),this._updateCellSpans(o,!0);let s=t<i?t:i;this._syncLayoutToColumns(s)},G.prototype.enableRowVirtualization=function(){console.log("WARNING: This function is deprecated")},G.prototype.enableColumnVirtualization=function(t){this._colVir=!1!==t},G.prototype.getColumnIndex=function(t){if(t){if(t.stretched)return this._stretchedCells.getColumnIndex(t);let e=this._columns.length;for(let i=0;i<e;++i)if(this._columns[i].getElement()===t)return i}return-1},G.prototype.getCellIndex=function(t,e){if(e){if(e.stretched)return this._stretchedCells.getRowIndex(e);let i=this._columns[t];if(i)return i.getCellIndex(e)}return-1},G.prototype.getIndex=function(){return this._index},G.prototype.setIndex=function(t){this._index=t},G.prototype.getRowOffset=function(){return this._rowOffset},G.prototype.setRowOffset=function(t){this._rowOffset=t},G.prototype.updateLayout=function(){this._calculateViewSize(!0),this._stretchedCells.updateCells(),this._updateRightSpaceStyle()},G.prototype.stretchCell=function(t,e,i,o){let n=-1;if("number"==typeof t?(n=t,null==e&&(e=0)):t&&(t.stretched?(n=this._stretchedCells.getColumnIndex(t),null==e&&(e=this._stretchedCells.getRowIndex(t))):t.getParent&&(n=this.getColumnIndex(t.getParent()))),n<0||e<0||null==e)return null;let s=null;if(!1!==i){let t=this._coverLayer;t||(t=this._coverLayer=document.createElement("div"),t.className="cover-layer",this._updateLayers()),this._calculateViewSize(),s=this._stretchedCells.stretchCell(e,o?n:0),s.setParent(t)}else s=this._stretchedCells.unstretchCell(e);if(s){let t=this._selectionList.getSelection(e);s.enableClass("selected-row",t)}return s},G.prototype.unstretchCell=function(t,e){return this.stretchCell(t,e,!1)},G.prototype.unstretchAllCells=function(){this._stretchedCells.unstretchAllCells()},G.prototype.getStretchedCell=function(t,e){return null==e&&(e="number"==typeof t?t:this._stretchedCells.getRowIndex(t)),"number"==typeof e?this._stretchedCells.getCell(e):null},G.prototype.getStretchedCells=function(){return this._stretchedCells.getCells()},G.prototype.updateStretchedCells=function(){this._updateLayers();let t=this._coverLayer?this._coverLayer.children.length:0;return!(t<=0||(this._calculateViewSize(!0),this._stretchedCells.updateCells(),!t))},G.prototype._calculateViewSize=function(t){if(this._frozenLayout)return this._stretchedCells.getStretchSize();let e=this._ctx,i=t?0:this._stretchedCells.getStretchSize();if(!i&&e&&e.getWidth){let t=this.getContentWidth();return i=e.getWidth()-this._rightSpaceSize,i?(t<i&&(i=t),this._stretchedCells.setStretchSize(i),i):t}return i},G.prototype._enableStretchCellClass=function(t,e,i){let o=this.getStretchedCell(t);o&&o.enableClass(e,i)},G.prototype._getViewSize=function(){return this._calculateViewSize()},G.prototype.getColumnHost=function(){return this._element},G.prototype.setHidingMethod=function(t){this._hidingMethod=t},G.prototype.getHidingMethod=function(){return this._hidingMethod},G.prototype.setColumnVisibility=function(t,e,i){return!!this._trackX.hideLane(t,!e,i)&&(this._syncLayoutToColumns(t),!0)},G.prototype.getRowLayout=function(){return this._trackY},G.prototype.reserveRightSpace=function(t){if(t&&t>0){if(!this._rightSpace){let t=this._rightSpace=document.createElement("div");t.className="tr-reserved-space",t.style.height=this.getContentHeight()+"px",this._updateLayers()}this._rightSpace.style.width=t+"px",this._rightSpaceSize=t,this._updateCssWidth()}else if(this._rightSpace){let t=this._rightSpace.parentNode;t&&t.removeChild(this._rightSpace),this._rightSpace=null,this._rightSpaceSize=0,this._updateCssWidth()}return this._rightSpace},G.prototype._updateRightSpaceStyle=function(){let t=this._rightSpace;if(!t)return;let e=!1,i=0;this._hscrollbar&&(e=this._hscrollbar.isActive(),i=this._hscrollbar.getPinnedRightColumnCount()),e&&!i?(t.style.top=this._trackY.getLaneStart(this._activeRow)+"px",t.style.left=this._trackX.getLaneStart(this._colCount)+"px",t.style.position="",t.style.display=""):(t.style.position="static",t.style.display="inline-block")},G.prototype._updateLayers=function(){if(this._rightSpace){let t=this._rightSpace.parentNode;t?t.appendChild(this._rightSpace):this._element.appendChild(this._rightSpace)}this._boundLayer&&this._element.appendChild(this._boundLayer),this._coverLayer&&this._element.appendChild(this._coverLayer)},G.prototype.getReservedSpace=function(){return this._rightSpace},G.prototype.getComputedStyle=function(){let t=this._element;return t.offsetParent?getComputedStyle(t):null},G.prototype.isColumnActive=function(t){let e=this._columns[t];return!!e&&e.isActive()},G.prototype.setRowAttributes=function(t,e){if(!(t<0||t>=this._rowCount))for(let i=0;i<this._colCount;++i){let o=e(i);for(let e=o.length;--e>=0;){let n=o[e],s=this._columns[i].getCell(t);s&&(n.remove?s.removeAttribute(n.attribute):s.setAttribute(n.attribute,n.value))}}},G.prototype.getContextRow=function(t){return this._ctxRows.getItem(t)},G.prototype.selectColumn=function(t,e){this.enableColumnClass(t,"selected-column",e),e&&(this._boundLayer||(this._initBoundLayer(),this._updateLayers()))},G.prototype.isSelectedColumn=function(t){return this.hasColumnClass(t,"selected-column")},G.prototype.selectCell=function(t,e,i){let o=this._getCell(t,e);o&&o.enableClass("selection",i)},G.prototype.setCellBounds=function(t,e,i,o){let n=this._initBoundLayer(),s=this._cellBoundPainter;s||(s=this._cellBoundPainter=new B({boundLayer:n,layoutX:this._trackX,layoutY:this._trackY,hscrollbar:this._hscrollbar,calculateColumnBounds:this.calculateColumnBounds.bind(this)}));let r=this.getColumnCount();s.setCellBounds(t,e,i,o,r)},G.prototype.getHorizontalLayout=function(){return this._trackX},G.prototype.calculateColumnBounds=function(t,e,i,o){let n=0,s=0,r=!1,l=!1,h=this._trackX.getLaneCount();if(t>=0&&(n=this._trackX.getLaneStart(t),s=this._trackX.getLaneEnd(e)),n<s){let i,o,u=0,a=0,p=0,_=0;this._hscrollbar&&(a=this._hscrollbar.getScrollLeft(),p=this._hscrollbar.getPinnedLeftColumnCount(),_=this._hscrollbar.getPinnedRightColumnCount()),i=o=this._trackX.getTrackSize(),p&&(u=this._trackX.getLaneStart(p)),_&&(h-=_,i=this._getViewSize()-o+this._trackX.getLaneStart(h)),t>=p&&t<h?(n-=a,n<u?(n=u,r=!0):n>i&&(n=i,r=!0)):t>=h&&(n=this._getViewSize()-o+this._trackX.getLaneStart(t)),e>=p&&e<h?(s-=a,s<u?(s=u,l=!0):s>i&&(s=i,l=!0)):e>=h&&(s=this._getViewSize()-o+this._trackX.getLaneEnd(e))}i[0]=n,i[1]=s,o[0]=r,o[1]=l},G.prototype.updateColumnBounds=function(t,e,i){let o=this._colBounds,n=this._colBoundCache;o||(o=this._colBounds=[]),n||(n=this._colBoundCache=[]);let s,r=t.length,l=null,h=null,u=o.length;for(s=r;s<u;++s)h=o[s],l=h.parentNode,l&&l.removeChild(h);if(o.length=u=r,r)for(s=0;s<r;++s){let r=t[s],l=e[s],u=r[0],a=r[1];h=n[s],h||(h=n[s]=document.createElement("div"),h.className="selection-bound column-bound"),h.style.left=u+"px",h.style.width=a-u+"px",i=i||0,h.style.top=i+"px",h.style.height=this._trackY.getTrackSize()-i+"px",h.classList.toggle("no-left-bound",l[0]),h.classList.toggle("no-right-bound",l[1]),this._boundLayer&&(o[s]||(o[s]=h,this._boundLayer.appendChild(h)))}},G.prototype.updateColumnSeparators=function(){let t=this._hscrollbar.getPinnedLeftColumnCount(),e=this._hscrollbar.getPinnedRightColumnCount();!t&&!e||this._boundLayer||this._initBoundLayer();let i=!1;this._hscrollbar&&(i=this._hscrollbar.isActive());let o=this._boundLayer,n=this._leftColumnSeparator;if(i&&t){n||(n=this._leftColumnSeparator=this._createColumnSeparator()),n.parentNode||(o.children.length?o.insertBefore(n,o.children[0]):o.appendChild(n));let e=this._trackX.getLaneStart(t);n.style.left=e-1+"px",n.style.height=this._trackY.getTrackSize()+"px"}else n&&n.parentNode&&this._boundLayer.removeChild(n);if(n=this._rightColumnSeparator,i&&e){n||(n=this._rightColumnSeparator=this._createColumnSeparator()),n.parentNode||(o.children.length?o.insertBefore(n,o.children[0]):o.appendChild(n));let t=this.getColumnCount(),i=this._trackX.getLaneEnd(t-1)-this._trackX.getLaneStart(t-e),s=this._getViewSize();n.style.left=s-i+"px",n.style.height=this._trackY.getTrackSize()+"px"}else n&&n.parentNode&&this._boundLayer.removeChild(n)},G.prototype._createColumnSeparator=function(){let t=document.createElement("div");return t.classList.add("column-separator"),t},G.prototype._initBoundLayer=function(){let t=this._boundLayer;return t||(t=this._boundLayer=document.createElement("div"),t.className="cover-layer",this._element.appendChild(t)),t},G.prototype._getCell=function(t,e){let i=this._columns[t];return i?i.getCell(e):null},G.prototype._insertCells=function(t,e){this._activeRow=t,this._activeRowEnd=e;let i=this._trackY.getLaneStart(t);for(let o=0;o<this._colCount;++o){let n=this._columns[o];n.hasCollapsedCells()||n.setTop(i),n.activateCells(t,e)}if(this._rightSpace&&(this._rightSpace.style.top=i+"px"),e>this._availableRowCount){let t={};t.prevRowIndex=this._availableRowCount,t.rowIndex=e,this._availableRowCount=e,this._dispatch("rowAvailable",t)}},G.prototype._newColumn=function(t){let e=new C(this._virOwner||this);e.setHeight(this._trackY.getDefaultLaneSize()),e.setCellCount(this._rowCount),e.setTop(this._trackY.getLaneStart(this._activeRow)),e.activateCells(this._activeRow,this._activeRowEnd);for(let t=0;t<this._rowCount;++t)this._trackY.isAtDefaultSize(t)||e.getCell(t).setHeight(this._trackY.getLaneSize(t));if(t>=this._columns.length)this._columns.push(e),e.setParent(this._element);else{this._columns.splice(t,0,e);let i=this._columns[t+1];e.insertBefore(i)}return e},G.prototype._updateCssWidth=function(){this._frozenLayout||(this._calculateViewSize(!0),this._stretchedCells.updateXAxis(),this._element.style.width=this._getWidth()+"px")},G.prototype._updateViewHeight=function(){if(this._frozenLayout)return;let t=this.getContentHeight();this._element.style.height=t+"px",this._rightSpace&&(this._rightSpace.style.height=t+"px")},G.prototype._updateColumnIndices=function(){let t=this._columns.length,e=this._columns[0];e!==this._firstColumn&&(this._firstColumn&&this._firstColumn.removeClass("first"),this._firstColumn=e,this._firstColumn&&this._firstColumn.addClass("first"));let i=this._columns[t-1];i!==this._lastColumn&&(this._lastColumn&&this._lastColumn.removeClass("last"),this._lastColumn=i,this._lastColumn&&this._lastColumn.addClass("last"));let o=null;for(let t=this._columns.length;--t>=0;){let e=this._columns[t];e.setNextSibling(o),o=e}},G.prototype._syncLayoutToColumns=function(t){if(this._frozenLayout)return!1;if(this._rightSpace&&(this._rightSpace.style.left=this._trackX.getLaneStart(this._colCount)+"px"),t>=this._colCount)return!1;for(let e=t;e<this._colCount;++e){let t=this._columns[e];t.setLeft(this._trackX.getLaneStart(e)),t.setWidth(this._trackX.getLaneSize(e))}return this._updateCellSpanLayout(this._cellSpans.getAllSpans()),this._updateCssWidth(),!0},G.prototype._syncLayoutToRows=function(t,e){if(!this._frozenLayout){for(let i=t;i<e;++i){let t=this._trackY.isAtDefaultSize(i)?-1:this._trackY.getLaneSize(i);for(let e=0;e<this._colCount;++e)this._columns[e].getCell(i).setHeight(t)}this._stretchedCells.updateYAxis(),t?this._updateCellSpanLayout(this._cellSpans.getAllSpans()):this._updateCellSpans(this._cellSpans.getAllSpans(),!0),this._updateViewHeight()}},G.prototype._dispatchRowHeightChangedEvent=function(t,e){if(!this._hasListener("rowHeightChanged"))return;if(t>=e)return;let i={};i.rowIndex=t,i.changeLength=e-t,this._dispatch("rowHeightChanged",i)},G.prototype._updateCellSpanSize=function(t,e,i){let o=this._getCell(t,e);if(null!=o)if(i&&i.colSpan>1?(o.setWidth(this.getCellWidth(t,e)),this._columns[t].disableDeactivation()):o.setWidth(-1),i&&i.rowSpan>1)o.setHeight(this.getCellHeight(t,e));else{let t=this._trackY.isAtDefaultSize(e)?-1:this._trackY.getLaneSize(e);o.setHeight(t)}},G.prototype._updateCellSpanLayout=function(t){if(null!=t)for(let e=t.length;--e>=0;){let i=t[e];this._updateCellSpanSize(i.indexX,i.indexY,i)}},G.prototype._updateCellSpan=function(t,e,i,o){this._updateCellSpanSize(t,e,o?i:null),this._updateCellSpanClass(t,e,i.colSpan,i.rowSpan,o)},G.prototype._updateCellSpanClass=function(t,e,i,o,n){let s;for(let r=0;r<i&&(s=this._columns[t+r],s);++r)s.collapseCells(e,o,n,0===r,r>0);let r=this._getCell(t,e);r&&(r._colSpan=n?i:1,r._rowSpan=n?o:1)},G.prototype._updateCellSpans=function(t,e){if(null!=t)for(let i=t.length;--i>=0;){let o=t[i];this._updateCellSpan(o.indexX,o.indexY,o,e)}},G.prototype._onMouseMove=function(t){let i=t.target,o=e.closestElement(i,"cell"),n=this._stretchedCells.getColumnIndex(o);if(n<0){let t=e.closestElement(i,"column");n=this.getColumnIndex(t)}let s=this.getCellIndex(n,o);this.setRowHighlight(s)},G.prototype._onMouseOut=function(t){let e=t.relatedTarget;if(e){let t=this._element;for(;null!==e.parentNode;)if(e=e.parentNode,e===t)return}this.setRowHighlight(-1)},G.prototype._getEventHandlers=function(){return{mouseout:this._onMouseOut,mousemove:this._onMouseMove}},G.prototype._updateSelectionUI=function(t){let e=this._selectionList.getSelection(t);this._enableStretchCellClass(t,"selected-row",e),this.enableRowClass(t,"selected-row",e)},G.prototype._addSelectionUI=function(t){this._enableStretchCellClass(t,"selected-row",!0),this.enableRowClass(t,"selected-row",!0)},G.prototype._removeSelectionUI=function(t){this._enableStretchCellClass(t,"selected-row",!1),this.enableRowClass(t,"selected-row",!1)},G.prototype._onEnterDocument=function(){if(!this._initialized&&this.getParent()){for(let t=0;t<this._colCount;++t)this._columns[t].enableAutoStyleUpdating();this._syncLayoutToColumns(0),this._initialized=!0}},G.prototype._setContext=function(t){this._ctx=t},G.prototype._getContext=function(){return this._ctx},G.prototype._resetTransformIETimer=function(){e.isIE&&(this._transformIETimer||(this.enableClass("reset-transform"),this._transformIETimer=setTimeout(this._onResetTransformIE,20)))},G.prototype._onResetTransformIE=function(){this._transformIETimer=0,this.enableClass("reset-transform",!1)},G._proto=G.prototype;const N=G;let W={};const Y=/\d+/g;let X=function(t){let e=parseInt(t.replace(/[^0-9A-F]/gi,""),16);return[e>>16&255,e>>8&255,255&e]},q=function(t){if(!t||t<0)return 0;if(t>=255)return 1;let e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)},U=function(t){return.2126*q(t[0])+.7152*q(t[1])+.0722*q(t[2])},K=function(t,e){if(t===e)return 1;let i=t,o=e;return t>e&&(o=t,i=e),(o+.05)/(i+.05)};W.rgb2Hex=function(t){if(!t||"string"!=typeof t)return"";if("#"===t.charAt(0))return t;let e=t.match(Y);if(!e||e.length<3)return t;let i="#";for(let t=0;t<3;t++){let o=+e[t];o>=16||(i+="0"),i+=o?o.toString(16).toUpperCase():"0"}return i},W.num2Hex=function(t){return"#"+(16777216+(t[2]|t[1]<<8|t[0]<<16)).toString(16).slice(1)},W.num2Rgb=function(t){return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},W.hex2Num=X,W.hex2Rgb=function(t){if(t){let e=parseInt(t.replace(/[^0-9A-F]/gi,""),16);return"rgb("+(e>>16&255)+", "+(e>>8&255)+", "+(255&e)+")"}return""},W.getColorLuminance=q,W.getRelativeLuminance=U,W.getContrastRatio=K,W.getContrastColor=function(t){let e=U(t),i=K(1,e);return K(0,e)>=i?"#000000":"#ffffff"},W.blendColor=function(t,e,i){i>1?i=1:i<0&&(i=0);let o=X(t),n=X(e),s=[];for(let t=0;t<3;++t){let e=(n[t]-o[t])*i;s.push(o[t]+e)}return s};let j=function(t){for(let e in t)return!1;return!0},Q=function(t,e,i){let o=e[i];if(null!=o){let e=t[i];Array.isArray(e)?t[i]=e.concat(o):Array.isArray(o)&&e?t[i]=o.concat(e):t[i]=o}},J=function(){this._groupMap={},this._childToParent={}};J.prototype._groupMap,J.prototype._childToParent,J.getGroupId=function(t){return t&&t.id||""},J.calcTreeDepth=function(t,e){let i=-1,o=e;for(;o;){if(++i>15){console.log("WARNING: Infinite loop detected during column group creation");break}o=t[o.parentId]}return i},J.getLeafDescendants=function(t,e){let i=t[e];if(!i)return null;let o=[],n=[i],s=0,r={};for(;s<n.length;){i=n[s++],r[i.id]=!0;let e=i.children,l=e?e.length:0;for(let s=0;s<l;++s){let l=e[s];i=t[l],i?r[i.id]||n.push(i):o.push(l)}}return o},J._cloneObject=function(t){let e=function(t,e){return function(t,e,i){if(!t)return null;if(!e||t===e)return t;let o;if(i){let n=i.length;for(let s=0;s<n;++s)o=i[s],o&&Q(t,e,o)}else for(o in e)Q(t,e,o);return t}({},t,e)}(t);return Array.isArray(e.children)?e.children=e.children.slice():e.children=[],e},J._toGroupDefinition=function(t,e){let i=null;return t&&(i=Array.isArray(t)?{children:t.slice()}:J._cloneObject(t),e&&(i.name||(i.name=e),i.id=e)),i},J.prototype.toString=function(){let t=this._groupMap,e=[];e.push("=== groupDefs ===");for(let i in t){let o=t[i];e.push(i+": "+JSON.stringify(o,["id","parentId","children"]))}return e.push("=== childToParent ==="),e.push(JSON.stringify(this._childToParent,null,2)),e.push(""),e.join("\n")},J.prototype.getGroup=function(t){return t&&this._groupMap[t]||null},J.prototype.getDefinition=J.prototype.getGroup,J.prototype.getGroups=function(){let t=[],e=this._groupMap;for(let i in e)t.push(e[i]);return t},J.prototype.getGroupIds=function(){return Object.keys(this._groupMap)},J.prototype.getGroupMap=function(){return this._groupMap},J.prototype.cloneGroupMap=function(){let t=this._groupMap,e={};for(let i in t){let o=t[i],n=J._cloneObject(o);e[i]=n}return e},J.prototype.rebuildMap=function(){let t,e,i=this._groupMap,o=this._childToParent={},n=Object.keys(i),s=n.length;for(t=0;t<s;++t){e=n[t];let s=i[e].children,r=s?s.length:0;for(let t=0;t<r;t++)o[s[t]]=e}for(t=0;t<s;++t){e=n[t];let s=o[e];s&&(i[e].parentId=s)}},J.prototype.getGroupChildren=function(t){let e=this._groupMap[t];return e?e.children:null},J.prototype.getLeafDescendants=function(t){return J.getLeafDescendants(this._groupMap,t)},J.prototype.getGroupLevel=function(t){return J.calcTreeDepth(this._groupMap,this._groupMap[t])},J.prototype.getRootGroup=function(t){if(!t)return null;let e=this._groupMap,i=e[t]||null;if(i)for(;i.parentId;){let t=e[i.parentId];if(!t)break;i=t}return i},J.prototype.getParentGroup=function(t){return this.getGroup(this._childToParent[t])},J.prototype.getParentIds=function(t){if(t&&"string"==typeof t){let e=this._childToParent[t];if(e){let t=[e],i=this._groupMap[e];for(;i&&i.parentId;)i=this._groupMap[i.parentId],i&&t.push(i.id);return t}}return null},J.prototype.getParentId=function(t,e){let i=this._childToParent[t];if(null!=e){let t=this.getGroupLevel(i);for(;t>e&&i;)i=this._childToParent[i],t--}return i||""},J.prototype.removeAllGroups=function(){for(let t in this._groupMap)return this._groupMap={},this._childToParent={},!0;return!1},J.prototype.setGroups=function(t){let e=this._groupMap={},i=t?t.length:0;for(let o=0;o<i;o++){let i=t[o],n=i.id;n&&(e[n]=J._cloneObject(i))}this.rebuildMap()},J.prototype.addGroup=function(t){let e=J.getGroupId(t);return e?this.setGroup(e,t):e},J.prototype.removeGroup=function(t){return!!this._groupMap[t]&&(this.removeAllChildren(t),this.unsetParent(t),delete this._groupMap[t],!0)},J.prototype.setGroup=function(t,e){if(!t)return"";if(e){let i=J._toGroupDefinition(e,t);this._ungroupChildren(i.children),this._groupMap[t]&&this.removeAllChildren(t);let o=this._childToParent[t];o&&(i.parentId=o),this._groupMap[t]=i;let n=i.children,s=n.length;for(let e=0;e<s;++e){let i=n[e];this._childToParent[i]=t;let o=this._groupMap[i];o&&(o.parentId=t)}}else if(!this.removeGroup(t))return"";return t},J.prototype._ungroupChildren=function(t){if(Array.isArray(t)){let e=t.length;for(let i=0;i<e;++i)this.unsetParent(t[i])}},J.prototype.hasGroupChild=function(t,e){let i=this._groupMap[t];if(e&&i){let t=i.children;if(t)return t.indexOf(e)>=0}return!1},J.prototype.contains=function(t,e){if(t&&e){if(t===e)return!0;let i=20,o=this._childToParent[e];for(;o&&i;){if(t===o)return!0;--i,o=this._childToParent[o]}}return!1},J.prototype.addGroupChild=function(t,e,i){let o=this._groupMap[t];if(e&&o){let n=o.children;if(n&&n.indexOf(e)<0){this.unsetParent(e),this._childToParent[e]=t;let o=this._groupMap[e];return o&&(o.parentId=t),null!=i&&i>=0?n.splice(i,0,e):n.push(e),!0}}return!1},J.prototype.removeGroupChild=function(t,e){return null==e?this.unsetParent(t):!!this.hasGroupChild(t,e)&&this.unsetParent(e)},J.prototype.unsetParent=function(t){let e=this._childToParent[t];if(!e)return!1;this._childToParent[t]="";let i=this._groupMap[t];i&&(i.parentId="");let o=this._groupMap[e];if(o){let e=o.children;if(e&&e.length){let i=e.indexOf(t);i>=0&&e.splice(i,1)}}return!0},J.prototype.removeAllChildren=function(t){let e=this._groupMap[t];if(e){let t=e.children,i=t?t.length:0;if(i){e.children=[];for(let e=0;e<i;++e){let i=t[e];this._childToParent[i]&&(this._childToParent[i]="");let o=this._groupMap[i];o&&(o.parentId="")}return!0}}return!1},J.prototype.setGroupChildren=function(t,e){let i=this._groupMap[t];if(i){if(Array.isArray(e)){let o=e.slice();this._ungroupChildren(o),this.removeAllChildren(t),i.children=o;let n=i.id,s=o.length;for(let t=0;t<s;++t){let e=o[t];this._childToParent[e]=n;let i=this._groupMap[e];i&&(i.parentId=n)}return!0}if(!e&&i.children.length)return this.removeAllChildren(t),!0}return!1},J.prototype.getGroupName=function(t){let e=this._groupMap[t];return e&&e.name||""},J.prototype.setGroupName=function(t,e){let i=this._groupMap[t];return!(!i||i.name===e||(i.name=e,0))};let $=function(){this._rows={},this._addEvent("dataComposed"),this._addEvent("dataChanged")};l.inherits($,r),$.prototype._rows,$.prototype._composing=!1,$.prototype.dispose=function(){this.unlistenAll(),this.clearAllData(!0)},$.prototype.setSubscriptions=function(){},$.prototype.getSubscriptions=function(){return null},$.prototype.addSubscription=function(){},$.prototype.removeSubscription=function(){},$.prototype.startAllSubscriptions=function(){},$.prototype.stopAllSubscriptions=function(){},$.prototype.getSubscription=function(){return null},$.prototype.getPrimaryRic=function(){return""},$.prototype.clearAllData=function(t){this._rows={},t||this._dispatchDataChange({globalChange:!0})},$.prototype.clearColumnData=function(t,e){let i="string"==typeof t?[t]:t;for(let t=i.length;--t>=0;){let e=i[t];if(e)for(let t in this._rows)delete this._rows[t][e]}e||this._dispatchDataChange({globalChange:!0})},$.prototype.getData=function(t,e){let i=this.getRowData(t);return i?i[e]:null},$.prototype.getAllRics=function(){return null},$.prototype.getAllRowIds=function(){let t=[];for(let e in this._rows)t.push(e);return t},$.prototype.hasRowId=function(t){return!!this._rows[t]},$.prototype.getColumnData=function(t){let e=[];for(let i in this._rows)e.push(this._rows[i][t]);return e},$.prototype.getRowData=function(t){return this._rows[t]||null},$.prototype.getMultipleRowData=function(t,e,i){let o=t.length;null==i&&(i=o),i>o&&(i=o),e>0||(e=0);let n=new Array(o),s=this._rows;for(let o=e;o<i;++o)n[o]=s[t[o]]||null;return n},$.prototype.getAllRowData=function(){let t=[],e=this._rows;for(let i in e)t.push(e[i]);return t},$.prototype.setData=function(t,e,i){let o={};return o[e]=i,this.setRowData(t,o)},$.prototype.hasDataCloudData=function(t){},$.prototype.setRowData=function(t,e,i){let o=this.getRowData(t),n=!1,s=null;if(e)if(o){for(let t in e)o[t]=e[t],n=!0;s=e}else o=e,this._rows[t]=o,n=!0;else o&&(delete this._rows[t],n=!0);if(n&&!this._composing){let e=i||{};e.rid=t,s&&(e.changes=s),e.rowData=o,this._dispatchDataChange(e)}return n},$.prototype.cloneRowData=function(t){let e=this._rows[t];if(!e)return null;let i={};for(let t in e)0!==t.indexOf("FREE_TEXT")&&(i[t]=e[t]);return i},$.prototype._replaceRowId=function(t,e){let i=this._rows;return!!i[t]&&(i[e]=i[t],delete i[t],!0)},$.prototype.replaceRowIds=function(t){if("object"==typeof t)for(let e in t)this._replaceRowId(e,t[e])},$.prototype.addStaticFields=function(){},$.prototype.removeStaticFields=function(){},$.prototype.resetStaticFields=function(){},$.prototype.getStaticFields=function(){},$.prototype.dump=function(t){return $.constructTable(this.getAllRowData(),t,Object.keys(this._rows))},$.prototype.log=function(t){console.table(this.dump(t))},$.prototype.setDataCloudSettings=function(){},$.prototype.getDataCloudFields=function(){},$.prototype.addDataCloudFields=function(){},$.prototype.removeDataCloudField=function(){},$.prototype._dispatchDataChange=function(t){this._composing||(this._composing=!0,this._dispatch("dataComposed",t),this._composing=!1,this._dispatch("dataChanged",t))},$._defaultPropertyGetter=function(t,e,i){let o=e[i];return o?o[t]:null},$._defaultGetter=function(t,e){return t[e]},$.constructTable=function(t,e,i){let o=0,n=t.length,s=n,r=null,l=i||null,h=$._defaultGetter,u=!1;if(e){if(e.rowCount&&(s=e.rowCount,u=!0),e.colNames){r={};let t=e.colNames.length;for(let i=0;i<t;++i)r[e.colNames[i]]=!0;u=!0}e.getter&&(h="string"==typeof e.getter?$._defaultPropertyGetter.bind(null,e.getter):e.getter,u=!0),e.startIndex&&(o=e.startIndex,u=!0),!1===e.withRowIds&&(l=null)}if(!u&&!l)return t;let a=[];for(let e=o;e<n&&!(a.length>=s);++e){let i=t[e],o=l?{rid:l[e]}:{};if(i){let t;if(r)for(t in r)null!=i[t]&&(o[t]=h(i,t));else for(t in i)o[t]=h(i,t)}a.push(o)}return a};const Z=$;let tt=function(){};tt.prototype._events=null,tt.prototype._listenerCount=0,tt.prototype.addEventListener=function(t,e){if(!t||!e)return;this._events||(this._events={});let i=this._events[t];i?i.indexOf(e)<0&&(i.push(e),++this._listenerCount):(this._events[t]=[e],++this._listenerCount)},tt.prototype.removeEventListener=function(t,e){let i=this._events?this._events[t]:null;if(i){let t=i.indexOf(e);t>=0&&(i.splice(t,1),--this._listenerCount)}},tt.prototype.removeAllEventListeners=function(){this._events=null,this._listenerCount=0},tt.prototype.hasListener=function(t){if(this._listenerCount){if(t){let e=this._events?this._events[t]:null;return!!e&&e.length>0}return!0}return!1},tt.prototype.getListener=function(t,e){if(t){let i=this._events?this._events[t]:null;if(i)return e||(e=0),i[e]||null}return null},tt.prototype.addListener=function(t,e){let i=t?t[e]:null;"function"==typeof i&&this.addEventListener(e,i)},tt.prototype._prepareEventArguments=function(t,e){return e},tt.prototype._dispatch=function(t,e){let i=this._events?this._events[t]:null;if(i){e=this._prepareEventArguments(t,e);let o=i.length;for(let t=0;t<o;++t)i[t](e)}},tt.preventDefault=function(t){t&&t.preventDefault&&(t.preventDefault(),t.stopPropagation())};const et=tt;let it=function(t,e){this._rid=t,this._childIds=[],this._shared=e,e.defaultCollapsing&&(this._collapsed=!0)};l.inherits(it,et);const ot="Uncategorized";it._subSegSortLogic=function(t,e){return t===ot?1:e===ot||t<e?-1:e<t?1:0},it.prototype._shared=null,it.prototype._rid,it.prototype._childIds,it.prototype._childDataIds=null,it.prototype._collapsed=!1,it.prototype._order=0,it.prototype._offsetOrder=0,it.prototype._depth=0,it.prototype._disposed=!1,it.prototype._subSegDef=null,it.prototype._subSegment=!1,it.prototype._subSegMap=null,it.prototype._subSegNames=null,it.prototype._subSegName="",it.prototype._subSegVal,it.prototype.dispose=function(){if(this._disposed)return;this._disposed=!0,this.removeAllEventListeners();let t=this._subSegNames;if(t){let e=t.length,i=this._subSegMap;for(let o=0;o<e;++o)i[t[o]].dispose();this._subSegMap=this._subSegNames=null}this._collapsed&&this.markCollapsingStateDirty(),this._childDataIds=null,this._childIds.length=0,this._shared=null,this._subSegDef=this._subSegVal=null},it.prototype.getId=function(){return this._rid},it.prototype.getParentId=function(){return this._shared.childToSegment[this._rid]||""},it.prototype.getParent=function(){let t=this.getParentId();return t&&this._shared.segments[t]||null},it.prototype.getSubSegmentIds=function(t){let e=this._subSegNames;if(e){t||(t=[]);let i=e.length,o=this._subSegMap;for(let n=0;n<i;++n){let i=o[e[n]];t.push(i.getId()),i.getSubSegmentIds(t)}return t}return null},it.prototype.addChild=function(t,e){if(!t)return!1;let i=this._shared.childToSegment[t];if(i){if(i!==this._rid){let e=this._shared.segments[i];e&&!e.hasSubSegments()&&e.removeChild(t),this._shared.childToSegment[t]=this._rid}}else this._shared.childToSegment[t]=this._rid;return null!=e&&(e&&e!==t?(this._childDataIds||(this._childDataIds={}),this._childDataIds[t]=e):this._childDataIds&&delete this._childDataIds[t]),this._childIds.indexOf(t)<0&&(this._collapsed&&(this._shared.dirtyCollapsingState=!0),this._childIds.push(t),!0)},it.prototype.addChildren=function(t,e){if(!t)return!1;let i=Array.isArray(t)?t:[t],o=i.length;if(!o)return!1;let n,s=0;if(null!=e)for(e=Array.isArray(e)?e:[e],n=0;n<o;++n)s|=this.addChild(i[n],e[n]);else for(n=0;n<o;++n)s|=this.addChild(i[n]);return!!s},it.prototype.containsChild=function(t){return this._childIds.indexOf(t)>=0},it.prototype.getChildIndex=function(t){return this._childIds.indexOf(t)},it.prototype.removeChild=function(t){if(this._subSegment)return!1;if(!this._childIds.length)return!1;let e=this._childIds.indexOf(t);return!(e<0||(this._shared.childToSegment[t]===this._rid&&delete this._shared.childToSegment[t],this._childIds.splice(e,1),this._collapsed&&(this._shared.dirtyCollapsingState=!0),0))},it.prototype.removeChildren=function(t){if(this._subSegment)return!1;if(!this._childIds.length)return!1;let e=Array.isArray(t)?t:[t],i=e.length,o=0;for(let t=0;t<i;++t)o|=this.removeChild(e[t]);return!!o},it.prototype.removeAllChildren=function(){if(this._subSegment)return!1;let t=this._childIds.length;if(!this._childIds.length)return!1;let e=this._rid,i=this._shared.childToSegment,o=this._childIds;for(let n=0;n<t;++n){let t=o[n];i[t]===e&&delete i[t]}return this._childIds.length=0,this._childDataIds=null,this._collapsed&&(this._shared.dirtyCollapsingState=!0),!0},it.prototype.getChildIds=function(){return this._childIds},it.prototype.getChildren=function(){let t={},e=this._childIds,i=e.length,o=this._childDataIds||{};for(let n=0;n<i;++n){let i=e[n];t[i]=o[i]||i}return t},it.prototype.getChildCount=function(){return this._childIds.length},it.prototype.markCollapsingStateDirty=function(){(this._childIds.length||this._subSegDef)&&(this._shared.dirtyCollapsingState=!0)},it.prototype.getClassification=function(){return this._subSegDef&&this._subSegDef.classifiers||null},it.prototype.setClassification=function(t){if(this._subSegment)return!1;let e=null;this._subSegDef&&(e=this._subSegDef.classifiers);let i,o=null;t&&("string"==typeof t?o=[t]:Array.isArray(t)&&(o=t));let n=o?o.length:0;if(n){if((e?e.length:0)===n){for(i=0;i<n&&o[i]===e[i];++i);if(i>=n)return!1}return this._subSegDef||(this._subSegDef={root:this,subSegments:null}),this._subSegDef.classifiers=o,!0}return!!e&&(this._subSegDef.classifiers=null,this._subSegDef=null,!0)},it.prototype.classify=function(t){let e=this._subSegDef?this._subSegDef.classifiers:null,i=e?e.length:0,o=this._subSegNames,n=o?o.length:0;if(!n&&this._depth>=i)return!1;let s,r=this._shared;this._collapsed&&(r.dirtyCollapsingState=!0);let l="",h={},u=0,a=this._subSegMap,p=null;if(n)for(u=n,s=0;s<u;++s)l=o[s],h[l]=1,p=a[l],p._childIds.length&&(p._childIds.length=0),p._collapsed&&(r.dirtyCollapsingState=!0);let _,d=!this._subSegment,c=this._childDataIds||{},g=this._childIds,f=g.length;if(this._depth<i&&t){a||(a=this._subSegMap={},o=this._subSegNames=[]);let i=e[this._depth];for(s=0;s<f;++s){_=g[s];let e=c[_]||_,n=t[e],d=n?n[i]:null;if(r.childToSegment[_]=this._rid,l=ot,(d||0===d||!1===d)&&(l=d+""),h[l]&&(h[l]=0,--u),p=a[l],!p){let t=this._rid+"/"+l;p=new it(t,r),p._subSegDef=this._subSegDef,p._subSegment=!0,p._depth=this._depth+1,p._subSegName=l,p._subSegVal=d,r.childToSegment[t]=this._rid,a[l]=p,o.push(l),this._dispatch("subSegmentAdded",{rid:t,segment:p})}p.addChild(_,e)}}else if(d)for(s=0;s<f;++s)_=g[s],r.childToSegment[_]=this._rid;if(u>0){for(l in u>=o.length&&(o.length=0),h)if(h[l]){p=a[l],delete a[l];let t=o.indexOf(l);t>=0&&o.splice(t,1),this._dispatch("subSegmentRemoved",{rid:p.getId(),segment:p})}o.length||(o=this._subSegMap=this._subSegNames=null)}if(n=o?o.length:0,n)for(o.sort(it._subSegSortLogic),s=0;s<n;++s)p=a[o[s]],p.classify(t);return!0},it.prototype.hasSubSegments=function(){return!!this._subSegNames&&!!this._subSegNames.length},it.prototype.isSubSegment=function(){return this._subSegment},it.prototype.isRootSegment=function(){return!this._shared.childToSegment[this._rid]},it.prototype.getFirstAncestor=function(){let t=null;if(this._subSegment&&this._subSegDef)t=this._subSegDef.root;else if(t=this.getParent(),t){let e=t.getParent();for(;e;)t=e,e=t.getParent()}return t||null},it.prototype.getAllSubSegments=function(t){let e=this._subSegNames;if(e){t||(t=[]);let i=this._subSegMap,o=e.length;for(let n=0;n<o;++n){let o=i[e[n]];t.push(o),o.getAllSubSegments(t)}}return t||null},it.prototype.updateTreeStructure=function(t,e,i){let o;t||(t=0,this._subSegment||(this._depth=0)),e||(e=0),i||(i={});let n=this._subSegNames,s=n?n.length:0;if(s){let r=this._subSegMap;for(o=0;o<s;++o){let s=r[n[o]];++t,i[s.getId()]=e+t,s.setOrder(t),t=s.updateTreeStructure(t,e,i)}}else{let n=this._childIds,s=n.length,r=this._shared.segments,l="";for(o=0;o<s;++o){let s=n[o],h=r[s],u=h?h.getId():ot;l!==u&&(++t,l=u),i[s]=e+t,h&&(h._depth=this._depth+1,h.setOrder(t),t=h.updateTreeStructure(t,e,i))}}return this.setLastOrder(t)},it.prototype.calcSubSegmentOrder=it.prototype.updateTreeStructure,it.prototype.getSegmentLevel=function(){return this._depth},it.prototype.setRowData=function(t,e){if(!t)return;let i=t[this._rid];i||(i=t[this._rid]={}),e||(e=t),i=e[this._rid],i||(i=e[this._rid]={});let o=this;for(;o&&o.isSubSegment();)o.getSubSegmentName(i),o=o.getParent()},it.prototype.getSubSegmentName=function(t){if(t&&this._subSegment){let e=this.getClassification()[this._depth-1];e&&(t[e]=this._subSegName)}return this._subSegName},it.prototype.sortSegments=function(t){if(!t||this.hasSubSegments())return!1;let e=this._childIds,i=e.length,o=this._shared.segments;for(let n=0;n<i;++n)if(o[e[n]])return this._childIds.sort(t),!0;return!1},it.prototype.getFlattenTreeIds=function(t){let e;t||(t=[]),this._subSegment||t.push(this._rid);let i=this._subSegNames;if(i){let o=i.length,n=this._subSegMap;for(e=0;e<o;++e)n[i[e]].getFlattenTreeIds(t)}else{let i=this._childIds,o=i.length,n=this._shared.segments;for(e=0;e<o;++e){let o=i[e],s=n[o];s?s.getFlattenTreeIds(t):t.push(o)}}return t},it.prototype.collapse=function(t){return t=!1!==t,this._collapsed!==t&&(this._collapsed=t,this.markCollapsingStateDirty(),!0)},it.prototype.expand=function(t){return this.collapse(!1===t)},it.prototype.isCollapsed=function(){return this._collapsed},it.prototype.getCollapsingStates=function(t,e){let i=this._subSegNames,o=this._subSegMap,n=!0;!i&&this._shared&&(i=this._childIds,o=this._shared.segments,n=!1);let s=i?i.length:0;if(!s)return!1;let r=!1,l=!(!e&&!this._collapsed);t||(t={});for(let e=0;e<s;++e){let s="",h=null;n?(h=o[i[e]],s=h.getId()):(s=i[e],h=o[s]),l&&(t[s]=l,r=!0),h&&h.getCollapsingStates(t,l)&&(r=!0)}return r},it.prototype.getOrder=function(){let t=this.getFirstAncestor();return t?t._order+this._order:this._order},it.prototype.getLastOrder=function(){let t=this.getFirstAncestor();return t?t.getLastOrder():this._order+this._offsetOrder},it.prototype.setOrder=function(t){this._order=t},it.prototype.setLastOrder=function(t){return this._offsetOrder=t},it._tabs=null,it.prototype.log=function(t,e){let i;t||(t=[]);let o=it._tabs;if(!o){o=it._tabs=[];let t="";for(i=0;i<11;++i)o[i]=t,t+=" "}e||(e=0);let n=this._collapsed?"+ ":"- ";t.push(o[e]+n+this._rid);let s=e+1,r=o[s],l=this._subSegNames,h=this._subSegMap,u=!0;!l&&this._shared&&(l=this._childIds,h=this._shared.segments,u=!1);let a=l?l.length:0;for(i=0;i<a;++i){let e="",o=null;u?(o=h[l[i]],e=o.getId()):(e=l[i],o=h[e]),o?o.log(t,s):t.push(r+"- "+e)}return t};let nt=function(){this._onSubSegmentAdded=this._onSubSegmentAdded.bind(this),this._onSubSegmentRemoved=this._onSubSegmentRemoved.bind(this),this._segments={},this._insertionList=[],this._removalList=[],this._shared={segments:this._segments,childToSegment:{},dirtyCollapsingState:!1,defaultCollapsing:!1}};l.inherits(nt,et),nt.prototype._segments,nt.prototype._segmentCount=0,nt.prototype._collapsedRids=null,nt.prototype._shared,nt.prototype._segmentList=null,nt.prototype._insertionList=null,nt.prototype._removalList=null,nt.prototype._classification=!1,nt.prototype._classifierChanged=!1,nt.prototype._rowOrders=null,nt.prototype.dispose=function(){this.removeAllSegments(),this.removeAllEventListeners(),this._collapsedRids=null,this._segmentList=this._rowOrders=this._insertionList=this._removalList=null},nt.prototype.addSegment=function(t,e){if(t&&!this._segments[t]){let i=this._segments[t]=new it(t,this._shared);return i.addEventListener("subSegmentAdded",this._onSubSegmentAdded),i.addEventListener("subSegmentRemoved",this._onSubSegmentRemoved),++this._segmentCount,this.invalidateSegmentOrder(),e&&e.length&&i.addChildren(e),!0}return!1},nt.prototype.addSegments=function(t){let e=Array.isArray(t)?t:[t],i=e.length,o=0;for(let t=0;t<i;++t)o|=this.addSegment(e[t]);return!!o},nt.prototype.containsSegment=function(t){return!!this._segments[t]},nt.prototype.getParentRowId=function(t){return this._shared.childToSegment[t]||""},nt.prototype.removeSegment=function(t){let e=this._segments[t];if(!e)return!1;if(this._segmentCount<=1)return this.removeAllSegments();let i=e.isSubSegment();i&&this._removalList.push(e.getId());let o=e.getSubSegmentIds();if(o){let t=o.length;for(let e=0;e<t;++e){let t=o[e];this._segments[t]&&(this._removalList.push(t),delete this._segments[t],--this._segmentCount)}}if(!i){let t=e.getParent();t&&t.addChildren(e.getChildIds())}return e.removeAllChildren(),e.dispose(),delete this._segments[t],--this._segmentCount,this.invalidateSegmentOrder(),!0},nt.prototype.removeAllSegments=function(){if(this._segmentCount){for(let t in this._segments)this._segments[t].dispose();return this._segments={},this._segmentCount=0,this._segmentList=this._rowOrders=null,this._shared.segments=this._segments,this._shared.childToSegment={},this._classification=this._classifierChanged=!1,!0}return!1},nt.prototype.getSegmentCount=function(){return this._segmentCount},nt.prototype.getSegment=function(t){return this._segments[t]||null},nt.prototype.getSegmentParent=function(t){let e=this.getParentRowId(t);return e?this.getSegment(e):null},nt.prototype.getSegments=function(){return this._segmentCount?this._segments:null},nt.prototype.getSegmentIds=function(){return Object.keys(this._segments)},nt.prototype.sortSegments=function(t){let e=[],i=this._segments;for(let o in i){let n=i[o];n.sortSegments(t),n.isRootSegment()&&e.push(n)}return e.sort(t),this.invalidateSegmentOrder(),e},nt.prototype.collapseSegments=function(t,e){let i=0;if(this._segmentCount){let o=t.length;for(let n=0;n<o;n++){let o=this._segments[t[n]];o&&(i|=o.collapse(e))}}return!!i},nt.prototype.collapseSegment=function(t,e){let i=this._segments[t];return!!i&&i.collapse(e)},nt.prototype.expandSegment=function(t,e){return this.collapseSegment(t,!1===e)},nt.prototype.expandAllSegments=function(){if(this._segmentCount){let t=this._segments,e=0;for(let i in t)e|=t[i].expand();if(e)return!0}return!1},nt.prototype.isCollapsedSegment=function(t){let e=this._segments[t];return!!e&&e.isCollapsed()},nt.prototype.getCollapsedRows=function(){if(this._shared.dirtyCollapsingState){this._shared.dirtyCollapsingState=!1;let t=null,e=0;if(this._segmentCount){let i=this._segments;t={};for(let o in i){let n=i[o];n.isRootSegment()&&n.getCollapsingStates(t)&&++e}}this._collapsedRids=e?t:null}return this._collapsedRids},nt.prototype.invalidateSegmentOrder=function(){return!!this._segmentList&&(this._segmentList=this._rowOrders=null,!0)},nt.prototype.addSegmentChild=function(t,e,i){let o=this._segments[t];return!(!o||o.isSubSegment())&&(this.invalidateSegmentOrder(),o.addChild(e,i))},nt.prototype.addSegmentChildren=function(t,e,i){let o=this._segments[t];return!(!o||o.isSubSegment())&&(this.invalidateSegmentOrder(),o.addChildren(e,i))},nt.prototype.containsSegmentChild=function(t,e){let i=this._segments[t];return!!i&&i.containsChild(e)},nt.prototype.removeSegmentChild=function(t,e){let i=this._segments[t];return!!i&&(this.invalidateSegmentOrder(),i.removeChild(e))},nt.prototype.removeSegmentChildren=function(t,e){let i=this._segments[t];return!!i&&(this.invalidateSegmentOrder(),i.removeChildren(e))},nt.prototype.removeAllSegmentChildren=function(){this._shared.childToSegment={};let t=this._segments,e=!1;for(let i in t)t[i].removeAllChildren()&&(e=!0);return e&&(this.invalidateSegmentOrder(),this.classify(null)),e},nt.prototype.fillSegment=function(t,e){let i=Array.isArray(e)?e.length:0;if(!i)return;let o=this._segments,n=o[t];if(n&&!n.isSubSegment()){let s=e.indexOf(t);if(s>=0){n.removeAllChildren();for(let t=s+1;t<i;++t){let i=e[t];if(o[i])break;n.addChild(i)}this.invalidateSegmentOrder()}}},nt.prototype.fillSegments=function(t){this._shared.childToSegment={};let e=Array.isArray(t)?t.length:0,i=this._segments,o=null,n=!1;for(let s=0;s<e;++s){let e=t[s],r=i[e];r&&!r.isSubSegment()?(o=r,o.removeAllChildren()):o&&!o.isSubSegment()&&(o.addChild(e),n=!0)}return n&&this.invalidateSegmentOrder(),n},nt.prototype.calcSegmentOrder=function(t,e){let i=this._segmentList;if(i){if(e)return;i.length=0}else i=this._segmentList=[];this._rowOrders={};let o=this._rowOrders,n=this._segments,s=this._shared.childToSegment,r=ot,l=t?t.length:0,h=0;for(let e=0;e<l;++e){let i=t[e];if(!s[i]){let t=n[i],e=t?t.getId():ot;r!==e&&(++h,r=e);let s=1e4*h;o[i]=s,t&&(this._segmentList.push(t),t.setOrder(s),t.updateTreeStructure(0,s,o))}}},nt.prototype.getSegmentValues=function(t,e){let i=t?t.length:0;if(!i)return null;let o=this._rowOrders;if(!o)return null;let n=new Array(i),s=0;for(let e=0;e<i;++e){let i=o[t[e]];null!=i?s<i&&(s=i):i=s?s+1e4:0,n[e]=i}return s?n:null},nt.prototype.logStructure=function(){let t=this._segmentList;if(!t)return"";let e=t.length,i=[];for(let o=0;o<e;++o){let e=t[o];e.isRootSegment()&&e.log(i)}return i.join("\n")},nt.prototype.logRowIdMap=function(){let t=[],e=this._segments,i=this._shared.childToSegment;for(let o in i){let n=i[o],s=e[n];s&&s.isSubSegment()||t.push(o+" > "+n)}return t.join("\n")},nt.prototype.setSegmentClassification=function(t,e){let i=this._segments[t];return!(!i||!i.setClassification(e)||(i.getClassification()&&(this._classification=!0),this._classifierChanged=!0,0))},nt.prototype.hasClassification=function(){return this._classification||this._classifierChanged},nt.prototype.classify=function(t){if(!this._segmentCount)return!1;if(!this.hasClassification())return!1;this._classification=this._classifierChanged=!1;let e=this._segments;for(let i in e){let e=this._segments[i];e.isSubSegment()||(e.getClassification()&&(this._classification=!0),e.classify(t))}return this._insertionList.length||this._removalList.length?(this.invalidateSegmentOrder(),this._dispatch("subSegmentChanged",{insertionList:this._insertionList,removalList:this._removalList}),this._insertionList.length=0,this._removalList.length=0,this._dispatch("classified",{}),!0):(this._dispatch("classified",{}),!1)},nt.prototype._onSubSegmentAdded=function(t){let e=t.rid;if(this._segments[e])console.log("Incorrect logic detected.");else{let i=t.segment;this._insertionList.push(i),this._segments[e]=i,this._segmentCount++,i.addEventListener("subSegmentAdded",this._onSubSegmentAdded),i.addEventListener("subSegmentRemoved",this._onSubSegmentRemoved)}},nt.prototype._onSubSegmentRemoved=function(t){let e=t.rid;this.removeSegment(e)},nt.prototype.setDefaultCollapsing=function(t){let e=!!t;return this._shared.defaultCollapsing!==e&&(this._shared.defaultCollapsing=e,!0)};const st=nt;let rt=function(){rt.base(this,"constructor"),this._removeRows=this._removeRows.bind(this),this._bySegmentSeparator=this._bySegmentSeparator.bind(this),this._onClassifyingTimer=this._onClassifyingTimer.bind(this),this._onSubSegmentChanged=this._onSubSegmentChanged.bind(this),this._prevData={},this._rids=[],this._compMap={},this._addEvent("subSegmentChanged")};l.inherits(rt,Z),rt.prototype._prevData=null,rt.prototype._rids,rt.prototype._frozen=!1,rt.prototype._runningId=0,rt.prototype._compMap=null,rt.prototype._segments=null,rt.prototype._autoSegmentFilling=!1,rt.prototype._removedRows=null,rt.prototype._userSegmentComparer=null,rt.prototype._segmentSortOrder=0,rt.prototype._segmentSortContext=null,rt.prototype._clsSource=null,rt.prototype._classifyingTimer=0,rt.prototype._segmentDefaultCollapsing=!1,rt.SortLogic,rt.prototype.dispose=function(){this.unlistenAll(),this.clearAllData(!0),this._classifyingTimer&&(clearTimeout(this._classifyingTimer),this._classifyingTimer=0),this._compMap=null,this._clsSource=null,rt._removeIndexArray(),this._segments&&(this._segments.dispose(),this._segments=null)},rt.prototype.getColumnData=function(t){let e=new Array(this._rids.length);for(let i=this._rids.length;--i>=0;)e[i]=this._rows[this._rids[i]][t];return e},rt.prototype.getRowId=function(t){return this._rids[t]||""},rt.prototype.getAllRowIds=function(t){return t?this._rids:this._rids.slice(0)},rt.prototype.getRowIndex=function(t){return this._rids.indexOf(t)},rt.prototype.getRowCount=function(){return this._rids.length},rt.prototype.getDataAt=function(t,e){return this.getData(this._rids[t],e)},rt.prototype.getRowDataAt=function(t){return this.getRowData(this._rids[t])},rt.prototype.getPreviousData=function(t,e){let i=this._prevData[t]||null;return i?i[e]:null},rt.prototype.setData=function(t,e,i){if(!this._needFiring())return this._setData(t,e,i);let o={};return o[e]=i,this.setRowData(t,o)},rt.prototype._removeRidFromSegments=function(t){if(this._segments)if(this._segments.getSegment(t)){if(this._segments.removeSegment(t))return this._segments.getSegmentCount()||(this._segments.dispose(),this._segments=null),!0}else{let e=this._segments.getParentRowId(t);e&&this._segments.removeSegmentChild(e,t)}return!1},rt.prototype.setRowData=function(t,e,i){if(!t)return!1;let o=this.getRowData(t),n=!1,s="updated",r=!1;if(e){if(o){let i=this._prevData[t];for(let t in e)i[t]=o[t],o[t]=e[t]}else if(s="inserted",o=e,this._rows[t]=o,this._prevData[t]={},i){let e=i.nextRid,o=e?this.getRowIndex(e):-1;o<0&&(o=i.fallback),null==o||o<0||o>=this._rids.length?this._rids.push(t):(this._rids.splice(o,0,t),this._segments&&this._segments.invalidateSegmentOrder(),r=!this._isLastSegment(o))}else this._rids.push(t);n=!0}else o&&(s="removed",this._prevData[t]=this._rows[t],delete this._rows[t],r=this._removeRidFromSegments(t),rt._removeArrayItem(this._rids,t),n=!0);if(n&&this._needFiring()){if(this._autoFillSegments())this.dispatchGlobalChange();else{let n=i||{};n.rid=t,n.changes=e,n.rowData=o,n.type=s,r&&(n.segmentChanged=!0),this._dispatchDataChange(n)}this.requestClassifying()}return n},rt.prototype.setColumnData=function(t,e,i){let o=e?e.length:0;if(o<0)return;let n=this._frozen;this.freeze();let s=this._generateRids(o,i);for(let i=0;i<o;++i)this._setData(s[i],t,e[i]);this.freeze(n)},rt.prototype.setDataFromObjectMap=function(t){if(!t)return;if(Array.isArray(t))return void this.addRows(t);let e=this._frozen;this.freeze();for(let e in t)this.setRowData(e,t[e]);this.freeze(e)},rt.prototype.setDataFrom2DArray=function(t,e,i){let o=t?t.length:0;if(o<0)return;let n=this._frozen;this.freeze();let s=0,r=this._generateRids(o,i);for(let i=0;i<o;++i){let o=t[i],n=r[i];if(e)for(s=o.length;--s>=0;)this._setData(n,e[s],o[s]);else for(s=o.length;--s>=0;)this._setData(n,""+s,o[s])}this.freeze(n)},rt.prototype.setDataAt=function(t,e,i){let o=this.getRowId(t);return!!o&&this.setData(o,e,i)},rt.prototype.setRowDataAt=function(t,e,i){let o=this.getRowId(t);return!!o&&this.setRowData(o,e,i)},rt.prototype.addRow=function(t,e){return t||(t={}),e=this._generateUniqueRid(t,e),this.setRowData(e,t),e},rt.prototype.addRows=function(t,e){if(!Array.isArray(t))return;let i=t.length;if(!i)return;if(1===i)return void this.addRow(t[0],e?e[0]:null);e||(e=[]);let o=this._frozen;this.freeze();for(let o=0;o<i;++o)this.addRow(t[o],e[o]);this.freeze(o)},rt.prototype.unshiftRow=function(t,e){return this.insertRow(0,t,e)},rt.prototype.insertRow=function(t,e,i){let o=null;return"number"==typeof t?(o={},o.nextRid=this._rids[t],o.fallback=t):t&&(o={},o.nextRid=t),e||(e={}),i=this._generateUniqueRid(e,i),this.setRowData(i,e,o),i},rt.prototype.insertAfter=function(t,e,i){let o="string"==typeof t?this.getRowIndex(t):t;return!(o>=0)||o>=this._rids.length-1?this.addRow(e,i):this.insertRow(o+1,e,i)},rt.prototype.removeRow=function(t){"number"==typeof t?this.setRowData(this.getRowId(t),null):this.setRowData(t,null)},rt.prototype.removeRows=function(t){let e,i;if(1===t.length)return e=t[0],void("number"==typeof e?this.removeRow(e):this.setRowData(e,null));let o=!1;for(this._removedRows={},i=t.length;--i>=0;)e=t[i],"number"==typeof e&&(e=this.getRowId(e)),this.getRowData(e)&&(this._prevData[e]=this._rows[e],this._removedRows[e]=1,delete this._rows[e],this._removeRidFromSegments(e),o=!0);o?(this._rids=this._rids.filter(this._removeRows),this._removedRows=null,this.dispatchGlobalChange()):this._removedRows=null},rt.prototype._removeRows=function(t){return!this._removedRows[t]},rt._removeArrayItem=function(t,e){let i=t.indexOf(e);return i>=0&&(i>=t.length?t.pop():t.splice(i,1),!0)},rt.prototype.clearAllData=function(t){rt.base(this,"clearAllData",!0),this._prevData={},this._segments&&(this._segments.dispose(),this._segments=null),this._rids.length&&(this._rids.length=0,this.dispatchGlobalChange(t))},rt.prototype.removeAllRows=rt.prototype.clearAllData,rt._ascendingOrder=function(t,e){return t-e},rt.prototype.moveRow=function(t,e,i){let o=null,n="";if(e>=0&&e<this._rids.length||(e=this._rids.length),Array.isArray(t)){let i=t;i.sort(rt._ascendingOrder);let s=[];for(let t=i.length;--t>=0;){let o=i[t];n=this._rids[o],n&&(s.unshift(n),this._rids.splice(o,1),o<e&&--e)}s.length&&(this._rids.splice.apply(this._rids,[e,0].concat(s)),o=s)}else t<0&&(t=0),t!==e&&t+1!==e&&(n=this._rids.splice(t,1)[0],n&&(t<e&&--e,this._rids.splice(e,0,n),o=n));return o&&(this._segments&&(this._segments.invalidateSegmentOrder(),this._sort(null)),this._dispatchPositionChange(i)),o},rt.prototype._moveRow=function(t,e,i){let o=t.length;if(!o)return null;let n=new Array(o);for(let e=0;e<o;++e)n[e]=this.getRowIndex(t[e]);let s=e?this.getRowIndex(e):this._rids.length;return o>1?this.moveRow(n,s,i):this.moveRow(n[0],s,i)},rt.prototype.moveRows=function(t,e,i,o){"string"==typeof t&&(t=this.getRowIndex(t)),"string"==typeof e&&(e=this.getRowIndex(e)),t<0&&(t=0),e<0&&(e=this._rids.length),i||(i=1);let n=t+i-1,s=e;if(e>=t&&(s=e<=n?t:e-i),i>0&&n<=this._rids.length){s>this._rids.length&&(s=this._rids.length);let e=this._rids.splice(t,i),n=[s,0].concat(e);return Array.prototype.splice.apply(this._rids,n),this._segments&&this._sort(null),this._dispatchPositionChange(o),e}return null},rt.prototype.swapRow=function(t,e){let i=this._rids.length;if(t<0||t>=i)return;if(e<0||e>=i)return;let o=this._rids[t];this._rids[t]=this._rids[e],this._rids[e]=o},rt.prototype._replaceRowId=function(t,e){let i=this._rids,o=i.indexOf(t);return o>=0&&(i[o]=e,this._rows[e]=this._rows[t],delete this._rows[t],this._prevData[e]=this._prevData[t],delete this._prevData[t],!0)},rt.prototype.replaceRowIds=function(t){if("object"==typeof t){let e=!1;for(let i in t)e|=this._replaceRowId(i,t[i]);e&&this.dispatchGlobalChange()}},rt.prototype.clearRowData=rt.prototype.removeRow,rt.prototype.clearColumnData=function(t,e){let i="string"==typeof t?[t]:t;for(let t=i.length;--t>=0;){let e=i[t];if(e)for(let t in this._rows)delete this._rows[t][e],delete this._prevData[t][e]}this.dispatchGlobalChange(e)},rt.prototype.getDataSource=function(){return null},rt.prototype.setDataSource=function(t){},rt.prototype.getSortingLogics=function(){return this._compMap},rt.prototype.sortOnce=function(t,e,i,o){let n=rt._buildSortContext([],t,e,i||this._compMap,o);return!!this._sort(n)&&(this._dispatchPositionChange(),!0)},rt.prototype.setSortingLogic=function(t){this._compMap._default=t},rt.prototype.setColumnSortingLogic=function(t,e){t&&(this._compMap[t]=e)},rt.prototype.getColumnSortingLogic=function(t){if(t){let e=this._compMap[t];if(e)return e}return this._compMap._default||null},rt.prototype.freeze=function(t){t=!1!==t;let e=this._frozen;return e!==t&&(this._frozen=t,!t&&this._segments&&this._segments.invalidateSegmentOrder(),this._autoFillSegments(),this.dispatchGlobalChange()),e},rt.prototype.unfreeze=function(t){return this.freeze(!1===t)},rt.prototype.isFrozen=function(){return this._frozen},rt.prototype._initSegmentCollection=function(){this._segments||(this._segments=new st,this._segments.setDefaultCollapsing(this._segmentDefaultCollapsing),this._segments.addEventListener("subSegmentChanged",this._onSubSegmentChanged))},rt.prototype.setSegmentSeparators=function(t,e){if(!t)return!1;let i=!1!==e,o=0,n=0,s=t.length;for(let e=0;e<s;e++){let s=t[e];if(i){if(this._initSegmentCollection(),this._autoSegmentFilling){let t=this._segments.getParentRowId(s);t&&this._segments.removeSegmentChild(t,s)}o|=this._segments.addSegment(s)}else this._segments&&this._segments.getSegment(s)&&this._segments.removeSegment(s)&&(n=1,this._segments.getSegmentCount()||(this._segments=null))}let r=o||n;return r&&this._needFiring()&&this.dispatchGlobalChange(),!!r},rt.prototype.setSegmentSeparator=function(t,e){let i=!1,o=0;if(t&&"string"==typeof t)if(!1!==e){if(this._initSegmentCollection(),this._autoSegmentFilling){let e=this._segments.getParentRowId(t);e&&this._segments.removeSegmentChild(e,t)}let o=e&&e.children?e.children:null;this._segments.addSegment(t,o)&&(i=!0)}else if(this._segments){let e=this._segments.getSegment(t);e&&(o=e.getChildCount(),this._segments.removeSegment(t)&&(i=!0,this._segments.getSegmentCount()||(this._segments=null)))}if(i&&this._needFiring())if(this._autoFillSegments()||o)this.dispatchGlobalChange();else{let e=this._rows[t]||null;e&&this._dispatchDataChange({rid:t,changes:{},rowData:e,type:"updated",segmentChanged:!0})}return i},rt.prototype.unsetAllSegmentSeparators=function(){return!!this._segments&&(this._segments.dispose(),this._segments=null,this.dispatchGlobalChange(),!0)},rt.prototype.hasSegmentation=function(){return!!this._segments},rt.prototype.hasSegmentClassification=function(){return!!this._segments&&this._segments.hasClassification()},rt.prototype.isSegmentSeparator=function(t){return!!this._segments&&this._segments.containsSegment(t)},rt.prototype.getSegment=function(t){return this._segments?this._segments.getSegment(t):null},rt.prototype.getSegmentParent=function(t){return this._segments?this._segments.getSegmentParent(t):null},rt.prototype.getSegmentLevel=function(t){let e=this.getSegment(t);return e?e.getSegmentLevel()+1:0},rt.prototype.getSegmentParentRowId=function(t){return this._segments?this._segments.getParentRowId(t):""},rt.prototype.getSegmentValues=function(t,e){return this._segments?(this._segments.calcSegmentOrder(this._rids,!0),this._segments.getSegmentValues(t||this._rids,e)):null},rt.prototype._isLastSegment=function(t){let e=this._segments;if(e){let i=this._rids,o=i.length;for(let n=t+1;n<o;++n)if(e.containsSegment(i[n]))return!1}return!0},rt.prototype._getSegmentSeparators=function(){return this._segments},rt.prototype.enableAutoSegmentFilling=function(t){this._autoSegmentFilling=0!=t,this._autoFillSegments()},rt.prototype._autoFillSegments=function(){return!!this._autoSegmentFilling&&this.fillSegments()},rt.prototype.fillSegment=function(t){this._segments&&(this._segments.fillSegment(t,this._rids),this.dispatchGlobalChange(),this.requestClassifying())},rt.prototype.fillSegments=function(){if(this._segments){let t=this._segments.fillSegments(this._rids);return t&&(this.dispatchGlobalChange(),this.requestClassifying()),t}return!1},rt.prototype._onSegmentChildChanged=function(t){!1!==t&&this._sort(null),this._dispatchPositionChange(),this.requestClassifying()},rt.prototype.addSegmentChild=function(t,e,i){return!(!this._segments||!this._segments.addSegmentChild(t,e,i))&&(this._onSegmentChildChanged(),!0)},rt.prototype.addSegmentChildren=function(t,e,i){return!(!this._segments||!this._segments.addSegmentChildren(t,e,i))&&(this._onSegmentChildChanged(),!0)},rt.prototype.setSegmentChildren=function(t){if(!this._segments)return!1;let e=this._segments.removeAllSegmentChildren(),i=t.length;for(let o=0;o<i;o++){let i=t[o];this._segments.addSegmentChildren(i.segmentId,i.rowIds)&&(e=!0)}return!!e&&(this._onSegmentChildChanged(),!0)},rt.prototype.removeSegmentChild=function(t,e){if(this._segments){let i=this._segments.removeSegmentChild(t,e);return i&&this._onSegmentChildChanged(!1),i}return!1},rt.prototype.removeSegmentChildren=function(t,e){if(this._segments){let i=this._segments.removeSegmentChildren(t,e);return i&&this._onSegmentChildChanged(!1),i}return!1},rt.prototype.removeAllSegmentChildren=function(){if(this._segments){let t=this._segments.removeAllSegmentChildren();return t&&this._onSegmentChildChanged(!1),t}return!1},rt.prototype.getSegmentIds=function(){return this._segments?this._segments.getSegmentIds():null},rt.prototype.getSegmentChildIds=function(t){if(this._segments){let e=this._segments.getSegment(t);if(e){let t=e.getChildIds();return t.length?t:null}}return null},rt.prototype._setSegmentSortContext=function(t,e){this._segmentSortOrder=t,this._segmentSortContext=e},rt.prototype.sortSeparators=function(t,e,i){if(!this._segments)return!1;if("function"==typeof t)return this._setSegmentSortContext(rt._getSortOrder(e),i),this.sortSegments(t);if(!i)return!1;let o=rt._buildSortContext([],i,e,t||this._compMap),n=o.length,s=null;if(n>1)s=rt._multiColumnSeparatorCompareLogic,this._setSegmentSortContext(1,o);else{if(1!==n)return!1;s=rt._singleColumnSeparatorCompareLogic,this._setSegmentSortContext(o[0][3],o[0])}return this.sortSegments(s)},rt.prototype.sortSegments=function(t){if(!this._segments)return!1;if("function"!=typeof t)return!1;this._userSegmentComparer=t;let e=this._segments,i=e.sortSegments(this._bySegmentSeparator);this._userSegmentComparer=null,this._setSegmentSortContext(0,null);let o=this._rids,n=o.slice(),s=o.length;o.length=0;let r=0,l=!1;for(let t=0;t<s;++t){let s=n[t],h=e.getSegment(s);h?h.isRootSegment()&&i[r++].getFlattenTreeIds(o):e.getParentRowId(s)||o.push(s),s!==o[t]&&(l=!0)}return l&&(this._sort(null),this._dispatchPositionChange()),l},rt.prototype._bySegmentSeparator=function(t,e){return this._userSegmentComparer(this._getRowDataFromSegment(t),this._getRowDataFromSegment(e),this._segmentSortOrder,this._segmentSortContext)},rt.prototype._getRowDataFromSegment=function(t){var e=null;return t&&("string"==typeof t?e=this.getRowData(t):t.getId&&(e=this.getRowData(t.getId()))),e},rt.prototype.setClassificationSource=function(t){this._clsSource=null,t&&t._rows&&(this._clsSource=t._rows)},rt.prototype.setSegmentClassification=function(t,e){return!(!this._segments||!this._segments.setSegmentClassification(t,e))&&this.classifySegments()},rt.prototype.classifySegments=function(){return!(!this._segments||!this._rids.length)&&this._segments.classify(this._clsSource||this._rows)},rt.prototype.requestClassifying=function(){this._segments&&!this._classifyingTimer&&this._segments.hasClassification()&&(this._classifyingTimer=setTimeout(this._onClassifyingTimer,10))},rt.prototype._onClassifyingTimer=function(){this._classifyingTimer=0,this.classifySegments()},rt.prototype._onSubSegmentChanged=function(t){let e,i=t.insertionList,o=t.removalList,n=!1,s=this._rows,r=this._clsSource||s,l=this._rids,h=this._prevData,u=o.length,a={};for(e=0;e<u;e++){let t=o[e];s[t]&&(a[t]=h[t]=s[t],delete s[t],rt._removeArrayItem(l,t),n=!0)}let p=i.length;for(e=0;e<p;e++){let t=i[e],o=t.getParentId(),u=t.getId();if(!s[u]){h[u]={},t.setRowData(s,r);let e=l.indexOf(o);e<0||e+1>=l.length?l.push(u):l.splice(e+1,0,u),n=!0}}n&&(t.removedRows=a,this._dispatch("subSegmentChanged",t),this.dispatchGlobalChange())},rt.prototype.setSegmentDefaultCollapsing=function(t){return this._segmentDefaultCollapsing!==t&&(this._segmentDefaultCollapsing=t,this._segments&&this._segments.setDefaultCollapsing(t),!0)},rt.prototype._sort=function(t){let e=this._rids,i=this.getMultipleRowData(e),o=this.getSegmentValues(e),n=rt._performMultiLevelSorting(i,t,o);return!!n&&(this._rids=rt._reorderItems(e,n),!0)},rt.prototype.dispatchGlobalChange=function(t){!t&&this._needFiring()&&this._dispatchDataChange(rt._globalChangeArg)},rt.prototype._dispatchPositionChange=function(t){!t&&this._needFiring()&&this._dispatch("dataChanged",rt._positionChangeArg)},rt.prototype.dump=function(t){return Z.constructTable(this.getMultipleRowData(this._rids),t,this._rids)},rt.prototype._setData=function(t,e,i){let o=this.getRowData(t);return o||(o={},this._rows[t]=o,this._prevData[t]={},this._rids.push(t)),this._prevData[t][e]=o[e],o[e]=i,!0},rt.prototype._generateRids=function(t,e){let i,o=0;if(e)i=e;else{i=[];let e=this._rids.length;for(;o<e&&o<t;)i.push(this._rids[o++])}for(o=i.length;o<t;)i.push(""+o++);return i},rt.prototype._generateUniqueRid=function(t,e){if(!e){if(t.ROW_ID)return t.ROW_ID;for(e="_"+this._runningId++;this._rows[e];)e="_"+this._runningId++}return e},rt.prototype._needFiring=function(){return!this._frozen&&!this._composing},rt.getSortingDefinitions=e._deprecatedFunction,rt._globalChangeArg={globalChange:!0},rt._positionChangeArg={globalChange:!0,positionChangeOnly:!0},rt._buildSortContext=function(t,e,i,o,n){let s,r;Array.isArray(e)?(s=e,r=i):(s=[e],r=e?[i]:[0]);let l=null,h=null;"function"==typeof o?l=o:h=o;let u=s.length;t.length=u;for(let e=u;--e>=0;){Array.isArray(h)&&(l=h[e]);let i=t[e];i||(i=t[e]=new Array(5));let o=s[e];i[0]=o,i[1]=null,i[2]=l||h[o]||h._default,i[2]||(i[2]=rt._defaultComparer),i[3]=rt._getSortOrder(r[e]),i[4]=n}return t},rt._multiColumnCompareLogic=function(t,e,i,o){let n=o.length,s=0;for(let i=0;i<n;++i){let n=o[i];if(s=rt._singleColumnCompareLogic(t,e,n[3],n),s)return s}return s},rt._singleColumnCompareLogic=function(t,e,i,o){let n=o[1];return o[2](n[t],n[e],i,o[4])},rt._multiColumnSeparatorCompareLogic=function(t,e,i,o){let n=o.length,s=0;for(let i=0;i<n;++i){let n=o[i];if(s=rt._singleColumnSeparatorCompareLogic(t,e,n[3],n),s)return s}return s},rt._singleColumnSeparatorCompareLogic=function(t,e,i,o){let n=o[0];return o[2](t[n],e[n],i,o[4])},rt._performMultiLevelSorting=function(t,e,i){let o,n=t?t.length:0,s=e?e.length:0;if(!n)return null;for(let i=0;i<s;++i){let s,r=e[i],l=r[1];if(o=r[2],o.rowSorting)if(l)for(l.length=n,s=0;s<n;++s)l[s]=t[s];else l=r[1]=t;else{l?l.length=n:l=r[1]=new Array(n);let e=r[0];for(s=0;s<n;++s)l[s]=t[s][e]}}if(i){let t=["ROW_SEGMENT",i,rt._segmentComparer,1,null];e?(e=e.slice()).unshift(t):e=[t],++s}if(!s)return null;let r,l=0;return s>1?(o=rt._multiColumnCompareLogic,r=e,l=1):(o=rt._singleColumnCompareLogic,r=e[0],l=r[3]),rt._mergeSort(n,l,o,r)},rt._mergeSort=function(t,e,i,o){let n,s,r,l,h,u=!1,a=1,p=rt._createIndexArray(t),_=p.slice();for(;a<=t;){for(n=h=0;n<t;)if(s=h,l=s+a,r=l,h=r+a,h>t&&(h=t),r<h){for(;;)if(i(p[s],p[r],e,o)<=0){if(_[n++]=p[s],++s>=l){for(;r<h;)_[n++]=p[r],++r;break}}else if(u=!0,_[n++]=p[r],++r>=h){for(;s<l;)_[n++]=p[s],++s;break}}else for(;n<t;)_[n]=p[n],++n;let d=p;p=_,_=d,a<<=1}return u?p:null},rt._reorderItems=function(t,e){if(e){for(let i=t.length;--i>=0;)e[i]=t[e[i]];return e}return t},rt._createIndexArray=function(t){let e=rt._idxAryMap[t];if(!e){rt._idxAryCount>50&&(rt._idxAryMap={},rt._idxAryCount=0),e=rt._idxAryMap[t]=new Array(t),rt._idxAryCount++;for(let i=0;i<t;++i)e[i]=i}return e.slice()},rt._removeIndexArray=function(){rt._idxAryMap={},rt._idxAryCount=0},rt._idxAryMap={},rt._idxAryCount=0,rt._segmentComparer=function(t,e){return t===e?0:t<e?-1:1},rt._defaultComparer=function(t,e,i){return null==t||t!=t?null==e||e!=e?0:1:null==e||e!=e?-1:t<e?-i:e<t?i:0},rt._getSortOrder=function(t){if("number"==typeof t)return t;if(t&&"string"==typeof t){if("a"===(t=t.charAt(0).toLowerCase()))return 1;if("d"===t)return-1}return 0},rt._proto=rt.prototype;const lt=rt;let ht=function(t,e){this._onDataChanged=this._onDataChanged.bind(this),this._refs=[],t&&(this._dt=t,this._dt.listen("dataChanged",this._onDataChanged,0)),e&&(this._field=e)};ht.prototype.dispose=function(){this._dt&&(this._dt.unlisten("dataChanged",this._onDataChanged),this._dt=null)},ht.prototype.setDataSource=function(t){this._dt!==t&&(this._dt&&this._dt.unlisten("dataChanged",this._onDataChanged),this._dt=t,this._dt&&this._dt.listen("dataChanged",this._onDataChanged,0),this._requestRecalculation())},ht.prototype.setField=function(t){this._field!==t&&(this._field=t,this._requestRecalculation())},ht.prototype.disableOnDemandMode=function(t){let e=!1===t;this._onDemandMode!==e&&(this._onDemandMode=e,this._requestRecalculation())},ht.prototype.setColumnDataGetter=function(t){this._colDataGetter!==t&&(this._colDataGetter=t,this._requestRecalculation())},ht.prototype.getColumnDataGetter=function(){return this._colDataGetter},ht.prototype.getSum=function(){return this._updateStats(),this._sum},ht.prototype.getDataCount=function(){return this._updateStats(),this._count},ht.prototype.getMin=function(){return this._updateStats(),this._min},ht.prototype.getMax=function(){return this._updateStats(),this._max},ht.prototype.getAbsoluteMax=function(){this._updateStats();let t=this._max>=0?this._max:-this._max,e=this._min>=0?this._min:-this._min;return t>=e?t:e},ht.prototype.getAverage=function(){return this._updateStats(),this._sum/this._count},ht.prototype.getMean=ht.prototype.getAverage,ht.prototype.getMidRange=function(){return this._updateStats(),.5*(this._max+this._min)},ht.prototype.getCachedColumnData=function(){return this._dirty?this._recalculate():this._cacheData||(this._cacheData=this._getColData()),this._cacheData},ht.prototype.markDirty=function(){return!!this._onDemandMode&&(this._dirty=!0,this._dirty)},ht.prototype._getColData=function(){return this._colDataGetter?this._colDataGetter(this._field,this._dt):this._dt.getColumnData(this._field)},ht.prototype._requestRecalculation=function(){this.markDirty()||this._recalculate()},ht.prototype._updateStats=function(){this._dirty&&this._recalculate()},ht.prototype._recalculate=function(){if(this._dirty=!1,this._cacheData=null,this._sum=0,this._min=NaN,this._max=NaN,this._count=0,!this._dt||!this._field)return;let t=this._cacheData=this._getColData(),e=t.length;if(!e)return;let i,o=ht._isDataNumeric,n=0;for(;n<e;)if(i=+t[n++],o(i)){this._sum=this._min=this._max=i,++this._count;break}for(;n<e;)i=+t[n],o(i)&&(this._sum+=i,i<this._min?this._min=i:i>this._max&&(this._max=i),++this._count),++n},ht.prototype._onDataChanged=function(t){if(t.rid){if(!this._colDataGetter&&t.changes&&null==t.changes[this._field])return;if(this.markDirty())return;this._updateRowData(t.rid)}else if(t.rids){if(this.markDirty())return;let e=t.rids;1===e.length?this._updateRowData(e[0]):this._recalculate()}else if(t.globalChange){if(t.positionChangeOnly)return void(this._cacheData=null);this._requestRecalculation()}},ht.prototype._updateRowData=function(t){let e=this._dt.getPreviousData(t,this._field),i=this._dt.getData(t,this._field);if(e===i)return;let o=ht._isDataNumeric(i);if(ht._isDataNumeric(e)){if(this._min===e&&(!o||i>this._min))return void this._recalculate();if(this._max===e&&(!o||i<this._max))return void this._recalculate();this._sum-=e,--this._count}o&&(this._sum+=i,i>=this._min||(this._min=i),i<=this._max||(this._max=i),++this._count)},ht._isDataNumeric=function(t){return"number"==typeof t&&t==t},ht.prototype.addRef=function(t){return t&&this._refs.indexOf(t)<0&&this._refs.push(t),this._refs.length},ht.prototype.deRef=function(t){if(t){let e=this._refs.indexOf(t);e>=0&&this._refs.splice(e,1)}return this._refs.length},ht.prototype.getRefCount=function(){return this._refs.length},ht.prototype._dt=null,ht.prototype._field="",ht.prototype._onDemandMode=!0,ht.prototype._dirty=!0,ht.prototype._cacheData=null,ht.prototype._sum=0,ht.prototype._min=NaN,ht.prototype._max=NaN,ht.prototype._count=0,ht.prototype._colDataGetter=null,ht.prototype._refs;const ut=ht;let at=function(t){this._onDataChanged=this._onDataChanged.bind(this),this._onWrapSizeChanged=this._onWrapSizeChanged.bind(this),this._dv=t.dataView,this._dt=this._dv.getDataTable(),this._dv.listen("dataChanged",this._onDataChanged),this._dv.listen("wrapSizeChanged",this._onWrapSizeChanged),this._wrapIndex=t.wrapIndex,this._refreshRids(t.rids),this._addEvents("dataChanged")};l.inherits(at,r),at.prototype._dv=null,at.prototype._dt=null,at.prototype._wrapIndex=0,at.prototype._rids,at.prototype._dataConflator=null,at.prototype._onDataChanged=function(t){if(this._dv){let e=this._dv.getVisibleRowIds(!0);this._refreshRids(e)&&(t.globalChange||(t.globalChange=!0),this._dispatch("dataChanged",t))}},at.prototype._onWrapSizeChanged=function(t){this._refreshRids(t.rids)&&this._dispatch("dataChanged",lt._globalChangeArg)},at.prototype._refreshRids=function(t){let e=!1;if(this._dv&&Array.isArray(t)){let i=this.getWrapSize();if(i>0){let o=i*this._wrapIndex;o<t.length?(e=!0,this._rids=t.slice(o,o+i)):this._rids.length&&(e=!0,this._rids.length=0)}}return e},at.prototype.dispose=function(){this._dv&&(this.unlistenAll(),this._dv.unlisten("dataChanged",this._onDataChanged),this._dv.unlisten("wrapSizeChanged",this._onWrapSizeChanged),this._dt=this._dv=null)},at.prototype.getData=function(t,e){return this._dt.getData(t,e)},at.prototype.getRowData=function(t){return this._dt.getRowData(t)},at.prototype.getColumnData=function(t,e){let i=this.getAllRowIds(!0,e),o=[],n=i.length;for(let s=0;s<n;++s){let n=this._dt.getRowData(i[s]);n?o.push(n[t]):e&&o.push(null)}return o},at.prototype.getRowId=function(t){return this._rids[t]||""},at.prototype._toRowId=function(t){return"number"==typeof t?this._rids[t]||"":t||""},at.prototype._toRowIds=function(t){let e=Array.isArray(t)?t.length:0,i=new Array(e),o=this._rids;for(let n=0;n<e;++n){let e=t[n];i[n]="number"==typeof e?o[e]||"":e||""}return i},at.prototype.getAllRowIds=function(t,e){return t?this._rids:this._rids.slice(0)},at.prototype.getVisibleRowIds=function(t){return t?this._rids:this._rids.slice(0)},at.prototype.getSortedRowIds=function(t){return t?this._rids:this._rids.slice(0)},at.prototype.getRowIndex=function(t){return this._rids.indexOf(t)},at.prototype.getRowCount=function(){return this._rids.length},at.prototype.getDataAt=function(t,e){return this._dt.getData(this.getRowId(t),e)},at.prototype.getRowDataAt=function(t){return this._dt.getRowData(this.getRowId(t))},at.prototype.getPreviousData=function(t,e){return this._dt.getPreviousData(t,e)},at.prototype.getMultipleRowData=function(t,e,i){return this._dt.getMultipleRowData(t,e,i)},at.prototype.getAllRowData=function(){return this.getMultipleRowData(this.getAllRowIds(!0))},at.prototype.setData=function(t,e,i){return!!this._dt&&this._dt.setData(t,e,i)},at.prototype.setRowData=function(t,e,i){return this._dv.setRowData(t,e,i)},at.prototype.setColumnData=function(t,e,i){this._dt&&this._dt.setColumnData(t,e,i)},at.prototype.setDataAt=function(t,e,i){let o=this.getRowId(t);return!(!o||!this._dt)&&this._dt.setData(o,e,i)},at.prototype.setRowDataAt=function(t,e,i){let o=this.getRowId(t);return this.setRowData(o,e,i)},at.prototype.insertRow=function(t,e,i){let o=this._toRowId(t);return this._dv.insertRow(o,e,i)},at.prototype.removeRow=function(t){this._dt&&this._dt.removeRow(this._toRowId(t))},at.prototype.removeRows=function(t){this._dt&&this._dt.removeRows(this._toRowIds(t))},at.prototype.moveRow=function(t,e){let i=this._toRowId(e),o=Array.isArray(t)?t:[t],n=this._toRowIds(o);return this._dv.moveRow(n,i)},at.prototype.getDataTable=function(){return this._dt},at.prototype.getDataSource=function(){return this._dv},at.prototype.setDataSource=function(t){},at.prototype.setConflationRate=function(t){this._dv.setConflationRate(t)},at.prototype.getConflationRate=function(){return this._dv.getConflationRate()},at.prototype.getSortingLogics=function(){return this._dt?this._dt.getSortingLogics():null},at.prototype.sort=function(t,e,i,o){this._dv.sort(t,e,i,o)},at.prototype.sortOnce=function(t,e){this._dv.sortOnce(t,e)},at.prototype.setSortingLogic=function(t){this._dt&&this._dt.setSortingLogic(t)},at.prototype.setColumnSortingLogic=function(t,e){this._dt&&this._dt.setColumnSortingLogic(t,e)},at.prototype.isSorting=function(){return this._dv.isSorting()},at.prototype.hideRow=function(t,e){this.showRows([t],!1===e)},at.prototype.hideRows=function(t,e){this.showRows(t,!1===e)},at.prototype.showRows=function(t,e){let i=this._toRowIds(t);this._dv.showRows(i,e)},at.prototype.unhideAllRows=function(){this._dv.unhideAllRows()},at.prototype.hasHiddenRow=function(){return this._dv.hasHiddenRow()},at.prototype.filterIn=function(t,e,i){return this._dv.filterIn(t,e,i)},at.prototype.filterOut=function(t,e){return this.filterIn(t,e,!0)},at.prototype.filterInOnce=function(t,e,i){this._dv.filterInOnce(t,e,i)},at.prototype.filterOutOnce=function(t,e){this.filterInOnce(t,e,!0)},at.prototype.clearFilter=function(){this._dv.clearFilter()},at.prototype.disablePageCorrection=function(t){},at.prototype.setPage=function(t){return!1},at.prototype.gotoPage=at.prototype.setPage,at.prototype.nextPage=function(){return!1},at.prototype.previousPage=function(){return!1},at.prototype.prevPage=at.prototype.previousPage,at.prototype.lastPage=function(){return!1},at.prototype.firstPage=function(){return!1},at.prototype.getCurrentPage=function(){return 1},at.prototype.getPageIndex=at.prototype.getCurrentPage,at.prototype.isOnLastPage=function(){return!0},at.prototype.isOnFirstPage=function(){return!0},at.prototype.getPageSize=function(){return 0},at.prototype.getPageCount=function(){return 1},at.prototype.getTotalPages=at.prototype.getPageCount,at.prototype.setPageSize=function(t){},at.prototype.groupBy=function(t,e){this._dv.groupBy(t,e)},at.prototype.addGroup=function(t){this._dv.addGroup(t)},at.prototype.sortGroups=function(t){this._dv.sortGroups(t)},at.prototype.moveGroup=function(t,e){this._dv.moveGroup(t,e)},at.prototype.setPredefinedGroups=function(t){this._dv.setPredefinedGroups(t)},at.prototype.addFooter=function(t){this._dv.addFooter(t)},at.prototype.removeFooter=function(){this._dv.removeFooter()},at.prototype.enableMultiGroup=function(t){this._dv.enableMultiGroup(t)},at.prototype.getGroupByRowId=function(t){return this._dv.getGroupByRowId(t)},at.prototype.getGroup=function(t){return this._dv.getGroup(t)},at.prototype.getAllGroups=function(t){return this._dv.getAllGroups(t)},at.prototype.getGroupList=function(){return this._dv.getGroupList()},at.prototype.getGroupId=function(){return this._dv.getGroupId()},at.prototype.getGroupValue=function(){return this._dv.getGroupValue()},at.prototype.getGroupRowId=function(){return this._dv.getGroupRowId()},at.prototype.getFooterRowIndex=function(t){return this._dv.getFooterRowIndex(t)},at.prototype.getFooterRowIds=function(){return this._dv.getFooterRowIds()},at.prototype.hasGroup=function(){return this._dv.hasGroup()},at.prototype.getGroupRows=function(){return null},at.prototype.getGroupLevel=function(t){let e=this._toRowId(t);return this._dv.getGroupLevel(e)},at.prototype.enableColumnStats=function(t,e,i){return this._dv.enableColumnStats(t,e,i)},at.prototype.getColumnStats=function(t){return this._dv.getColumnStats(t)},at.prototype.hide=function(t){return this._dv.hide(t)},at.prototype.isHidden=function(){return this._dv.isHidden()},at.prototype.isHiddenRow=function(t){return this._dv.isHiddenRow(t)},at.prototype.collapse=function(t){this._dv.collapse(t)},at.prototype.collapseAllGroups=function(t){this._dv.collapseAllGroups(t)},at.prototype.toggleCollapsedState=function(){this.collapse(!this.isCollapsed())},at.prototype.isCollapsed=function(){return this._dv.isCollapsed()},at.prototype.enableContentAsHeader=function(t){this._dv.enableContentAsHeader(t)},at.prototype.getVisibleRowCount=function(){return this._rids.length},at.prototype.isRowDataInGroup=function(t,e){return this._dv.isRowDataInGroup(t,e)},at.prototype.isRowIdInGroup=function(t,e){return this._dv.isRowIdInGroup(t,e)},at.prototype.addRowExpansion=function(t,e){this._dv.addRowExpansion(t,e)},at.prototype.removeRowExpansion=function(t){this._dv.removeRowExpansion(t)},at.prototype.toggleRowExpansion=function(t,e,i){let o=this._toRowId(t);this._dv.toggleRowExpansion(o,e,i)},at.prototype.removeAllRowExpansions=function(){this._dv.removeAllRowExpansions()},at.prototype.getRowsWithExpansion=function(t,e){return this._dv.getRowsWithExpansion(t,e)},at.prototype.getExpansionParents=function(t,e){return this._dv.getExpansionParents(t,e)},at.prototype.isRowExpansion=function(t){return this._dv.isRowExpansion(t)},at.prototype.hasRowExpansion=function(t){return this._dv.hasRowExpansion(t)},at.prototype.getRowExpansionId=function(t,e){return this._dv.getRowExpansionId(t,e)},at.prototype.getRowExpansionIndex=function(t){return this._dv.getRowExpansionIndex(t)},at.prototype.searchAll=function(t,e){return this._dv.searchAll(t,e)},at.prototype.searchPrev=function(t,e){let i=this._toRowId(t);return this._dv.searchPrev(i,e)},at.prototype.searchNext=function(t,e){let i=this._toRowId(t);return this._dv.searchNext(i,e)},at.prototype.stall=function(t){return this._dv.stall(t)},at.prototype.enableAutoGroupRemoval=function(t){return this._dv.enableAutoGroupRemoval(t)},at.prototype.enableAutoGroupHiding=function(t){return this._dv.enableAutoGroupHiding(t)},at.prototype.synchronizeRowOrder=function(){this._dv.synchronizeRowOrder()},at.prototype.setSegmentSeparator=function(t,e){let i=this._toRowId(t);return this._dv.setSegmentSeparator(i,e)},at.prototype.unsetAllSegmentSeparators=function(){return this._dt.unsetAllSegmentSeparators()},at.prototype.hasSegmentation=function(){return this._dt.hasSegmentation()},at.prototype.isSegmentSeparator=function(t){return this._dt.isSegmentSeparator(t)},at.prototype.getSegmentParentRowId=function(t){return this._dt.getSegmentParentRowId(t)},at.prototype.collapseSegment=function(t,e){let i=this._toRowId(t);return this._dv.collapseSegment(i,e)},at.prototype.expandSegment=function(t,e){return this.collapseSegment(t,!1===e)},at.prototype.expandAllSegments=function(){return this._dv.expandAllSegments()},at.prototype.setSegmentCollapsingLogic=function(){},at.prototype.isSegmentCollapsed=function(t){let e=this._toRowId(t);return this._dv.isSegmentCollapsed(e)},at.prototype.fillSegment=function(t){let e=this._toRowId(t);this._dv.fillSegment(e)},at.prototype.fillSegments=function(){this._dv.fillSegments()},at.prototype.addSegmentChild=function(t,e){let i=this._toRowId(t),o=this._toRowId(e);return this._dv.addSegmentChild(i,o)},at.prototype.addSegmentChildren=function(t,e){let i=this._toRowId(t),o=this._toRowIds(e);return this._dv.addSegmentChildren(i,o)},at.prototype.removeSegmentChild=function(t,e){let i=this._toRowId(t),o=this._toRowId(e);return this._dv.removeSegmentChild(i,o)},at.prototype.removeSegmentChildren=function(t,e){let i=this._toRowId(t),o=this._toRowIds(e);return this._dv.removeSegmentChildren(i,o)},at.prototype.removeAllSegmentChildren=function(){return this._dt.removeAllSegmentChildren()},at.prototype.getSegmentIds=function(){return this._dt.getSegmentIds()},at.prototype.getSegmentChildIds=function(t){return this._dt.getSegmentChildIds(this._toRowId(t))},at.prototype.sortSegments=function(t){this._dt.sortSegments(t)},at.prototype.getWrapSize=function(){return this._dv.getWrapSize()},at.prototype.getWrappedViews=function(){return this._dv.getWrappedViews()},at.prototype.wrapView=function(t){this._dv.wrapView(t)},at.prototype.dump=function(t){return Z.constructTable(this.getMultipleRowData(this._rids),t,this._rids)},at.prototype.log=function(t){console.table(this.dump(t))},at.prototype.isRowFiltered=function(t,e){return this._dv.isRowFiltered(t,e)};const pt=at;let _t=function(t,e,i){this._onConflated=this._onConflated.bind(this),this._data=[],"function"==typeof t?this.setFunction(t,i):"function"==typeof e&&this.setFunction(e,i),"number"==typeof e?this.setConflatingTime(e):"number"==typeof t&&this.setConflatingTime(t)};_t.prototype._data,_t.prototype._func=null,_t.prototype._delay=0,_t.prototype._timerId=0,_t.prototype._conflated=!1,_t.prototype._disabled=!1,_t.prototype.reset=function(){return this._timerId&&(clearTimeout(this._timerId),this._timerId=0),this.popAllData()},_t.prototype.popAllData=function(){if(this._data.length){let t=this._data;return this._data=[],t}return null},_t.prototype.dispose=function(){this._timerId&&(clearTimeout(this._timerId),this._timerId=0),this._data.length&&(this._data.length=0),this._func=null},_t.prototype.conflate=function(t){return!this._disabled&&(null!=t&&this._data.push(t),!this._conflated&&(this._timerId||(this._timerId=setTimeout(this._onConflated,this._delay)),!0))},_t.prototype.isConflating=function(){return this._timerId>0&&!this._conflated&&!this._disabled},_t.prototype._onConflated=function(){this._conflated=!0;try{this._func()}catch(t){console.error(t.message||t)}this._timerId=0,this._data.length=0,this._conflated=!1},_t.prototype.getData=function(){return this._data},_t.prototype.setFunction=function(t,e){this._func=t,this._func=t?e?t.bind(e):t:null},_t.prototype.setConflatingTime=function(t){this._delay=t||0,this._delay<0&&(this._delay=0)},_t.prototype.getConflatingTime=function(){return this._delay},_t.prototype.disable=function(t){this._disabled=!1!==t},_t.prototype.isEnabled=function(){return!this._disabled},_t.prototype.enable=function(t){this._disabled=!1===t};let dt=function(t){let e=this;e._groupFilterLogic=e._groupFilterLogic.bind(e),e._internalGroupSortingLogic=e._internalGroupSortingLogic.bind(e),e._onDataChanged=e._onDataChanged.bind(e),e._onGroupAdded=e._onGroupAdded.bind(e),e._onBeforeGroupAdded=e._onBeforeGroupAdded.bind(e),e._onRefreshTimeout=e._onRefreshTimeout.bind(e),e._updateWrapCount=e._updateWrapCount.bind(e),e._byRemovalMap=e._byRemovalMap.bind(e),e._rids=[],e._sortingDefs=[],e._columnStats={},e._shared={},e._conflator=new _t(this._onDataChanged,0),e._conflator.disable(),e._addEvents("dataChanged","preDisposed","pageIndexChanged","pageCountChanged","groupAdded","beforeGroupAdded","groupCriteriaChanged","beforeFiltering","wrapCountChanged","wrapSizeChanged"),e.setDataSource(t)};l.inherits(dt,r),dt.prototype._rids,dt.prototype._groupView=null,dt.prototype._pageView=null,dt.prototype._expansionView=null,dt.prototype._hiddenRids=null,dt.prototype._collapsedRids=null,dt.prototype._excludedRids=null,dt.prototype._emptySegmentFiltering=!1,dt.prototype._separatorFiltering=!1,dt.prototype._expansionMap=null,dt.prototype._expansionChildren=null,dt.prototype._expansionCount=0,dt.prototype._dt=null,dt.prototype._parent=null,dt.prototype._shared=null,dt.prototype._sortingDefs=null,dt.prototype._userFilter=null,dt.prototype._filteringOut=!1,dt.prototype._refreshTimerId=0,dt.prototype._groupSortingLogic=null,dt.prototype._pageCorrection=!0,dt.prototype._pageSize=0,dt.prototype._pageIndex=1,dt.prototype._lastPageIndex=0,dt.prototype._groupCriteria=null,dt.prototype._preDefGroups=null,dt.prototype._preDefGroupsDirty=!1,dt.prototype._groupMembers=null,dt.prototype._groupList=null,dt.prototype._groupRows=null,dt.prototype._groupId="",dt.prototype._groupColor="",dt.prototype._groupValue,dt.prototype._groupRowId="",dt.prototype._footerRowIds=null,dt.prototype._groupLevel=0,dt.prototype._groupViewDirty=!1,dt.prototype._columnStats,dt.prototype._hidden=!1,dt.prototype._hiddenHeaderRow=!1,dt.prototype._collapsed=!1,dt.prototype._collapsible=!0,dt.prototype._showOnlyFirstMember=!1,dt.prototype._beingAdded=!1,dt.prototype._conflator=null,dt.prototype._wrappedViews=null,dt.prototype._wrapSize=0,dt.prototype._wrapTimerId=0,dt.prototype._stalledSorting=!1,dt.prototype.dispose=function(){if(this._dispatch("preDisposed",{}),this.unlistenAll(),this.wrapView(0),this.setDataSource(null),this.groupBy(null),this._conflator.dispose(),this._sortingDefs=null,this._shared=null,this._userFilter=this._groupSortingLogic=null,this._wrapTimerId&&(clearTimeout(this._wrapTimerId),this._wrapTimerId=0),this._refreshTimerId&&(clearTimeout(this._refreshTimerId),this._refreshTimerId=0),this._columnStats){for(let t in this._columnStats)this._columnStats[t].dispose();this._columnStats=null}},dt.prototype.getData=function(t,e){return this._dt.getData(t,e)},dt.prototype.getRowData=function(t){return this._dt.getRowData(t)},dt.prototype.getColumnData=function(t,e){let i=this.getAllRowIds(!0,e),o=[],n=i.length;for(let s=0;s<n;++s){let n=this._dt.getRowData(i[s]);n?o.push(n[t]):e&&o.push(null)}return o},dt.prototype.getRowId=function(t){return this._rebuildRowIdsFromChildren(),this._getRids()[t]||""},dt.prototype._toRowId=function(t){return"number"==typeof t?(this._rebuildRowIdsFromChildren(),this._getRids()[t]||""):t||""},dt.prototype._toRowIds=function(t){let e=Array.isArray(t)?t.length:0,i=new Array(e),o=this._getRids();for(let n=0;n<e;++n){let e=t[n];"number"==typeof e?(this._rebuildRowIdsFromChildren(),i[n]=o[e]||""):i[n]=e||""}return i},dt.prototype.getAllRowIds=function(t,e){this._rebuildRowIdsFromChildren();let i=e?this._getRids():this._pageView||this._rids;return t?i:i.slice(0)},dt.prototype.getVisibleRowIds=function(t){this._rebuildRowIdsFromChildren();let e=this._getRids();return t?e:e.slice(0)},dt.prototype.getSortedRowIds=function(t){return this._rebuildRowIdsFromChildren(),t?this._rids:this._rids.slice(0)},dt.prototype.getRowIndex=function(t){return this._rebuildRowIdsFromChildren(),this._getRids().indexOf(t)},dt.prototype.getRowCount=function(){return this._getRids().length},dt.prototype.getDataAt=function(t,e){return this._dt.getData(this.getRowId(t),e)},dt.prototype.getRowDataAt=function(t){return this._dt.getRowData(this.getRowId(t))},dt.prototype.getPreviousData=function(t,e){return this._dt.getPreviousData(t,e)},dt.prototype.getMultipleRowData=function(t,e,i){return this._dt.getMultipleRowData(t,e,i)},dt.prototype.getAllRowData=function(){return this.getMultipleRowData(this.getAllRowIds(!0))},dt.prototype.setData=function(t,e,i){return!!this._dt&&this._dt.setData(t,e,i)},dt.prototype.setRowData=function(t,e,i){return!(!t||!this._dt||this.isRowExpansion(t))&&this._dt.setRowData(t,e,i)},dt.prototype.setColumnData=function(t,e,i){this._dt&&this._dt.setColumnData(t,e,i)},dt.prototype.setDataAt=function(t,e,i){let o=this.getRowId(t);return!(!o||!this._dt)&&this._dt.setData(o,e,i)},dt.prototype.setRowDataAt=function(t,e,i){let o=this.getRowId(t);return this.setRowData(o,e,i)},dt.prototype.insertRow=function(t,e,i){this._rebuildRowIdsFromChildren();let o=this._toRowId(t);return this._dt?this._dt.insertRow(o,e,i):""},dt.prototype.removeRow=function(t){this._dt&&this._dt.removeRow(this._toRowId(t))},dt.prototype.removeRows=function(t){this._dt&&this._dt.removeRows(this._toRowIds(t))},dt.prototype.moveRow=function(t,e){let i=this._toRowId(e),o=Array.isArray(t)?t:[t],n=this._toRowIds(o);return this._dt.hasSegmentation()&&this.synchronizeRowOrder(),this._dt._moveRow(n,i)},dt.prototype.swapRow=e._deprecatedFunction,dt.prototype.getDataTable=function(){return this._dt},dt.prototype.getDataSource=function(){return this._parent},dt.prototype.setDataSource=function(t){if(t){if(this._groupLevel>0)return;this._setParent(t),this._onDataChanged(lt._globalChangeArg),this._parent.listen("dataChanged",this._onDataChanged)}else this._parent&&(this._parent.unlisten("dataChanged",this._onDataChanged),this._resetAllViews(),this._groupViewDirty=!1),this._parent=this._dt=null,this._shared={}},dt.prototype.setConflationRate=function(t){this._conflator.disable(!t),this._conflator.setConflatingTime(t)},dt.prototype.getConflationRate=function(){return this._conflator.getConflatingTime()},dt.prototype._resetAllViews=function(){this._rids.length=0,this._groupView&&this._groupView.length&&(this._groupView.length=0),this._pageView&&this._pageView.length&&(this._pageView.length=0),this._expansionView&&this._expansionView.length&&(this._expansionView.length=0)},dt.prototype.getSortingLogics=function(){return this._dt?this._dt.getSortingLogics():null},dt.prototype.sort=function(t,e,i,o){if(this._groupLevel>0)return void window.console.log("ERROR: Sub-group cannot be sorted individually");let n=this.getSortingLogics(),s=this._sortingDefs,r=s.length;if(Array.isArray(i))for(let e=i.length;--e>=0;)if("function"!=typeof i[e]){let o=Array.isArray(t)?t[e]:t;i[e]=n[o]||n._default}if(lt._buildSortContext(s,t,e,i||n),1===s.length&&0===s[0][3]&&(s.length=0),r<=0&&s.length<=0)return;if(this._shared.stalledRids)return;let l=!1;this._groupMembers||s.length<=0||o?(l=!0,this._updateRowIds()):l=this._sort(),l&&this._dispatchDataChange(lt._positionChangeArg)},dt.prototype.sortOnce=function(t,e){this.sort(t,e),this._sortingDefs.length=0},dt.prototype.setSortingLogic=function(t){this._dt&&this._dt.setSortingLogic(t)},dt.prototype.setColumnSortingLogic=function(t,e){this._dt&&this._dt.setColumnSortingLogic(t,e)},dt.prototype.getColumnSortingLogic=function(t){return this._dt?this._dt.getColumnSortingLogic(t):null},dt.prototype.isSorting=function(){return this._sortingDefs.length>0},dt.prototype.hideRow=function(t,e){this.hideRows([t],e)},dt.prototype.hideRows=function(t,e){e=!1!==e;let i=this._hiddenRids;if(e)i||(i=this._hiddenRids={});else if(!i)return;let o=this._toRowIds(t),n=!1;for(let t=o.length;--t>=0;){let s=o[t];s&&(e?i[s]||(i[s]=!0,n=!0):i[s]&&(delete i[s],n=!0))}if(n){if(!e){let t=!1;for(let e in i){t=!0;break}t||(i=this._hiddenRids=null)}this._refreshAndNotify()}},dt.prototype.showRows=function(t,e){this.hideRows(t,!1===e)},dt.prototype.unhideAllRows=function(){this._hiddenRids&&(this._hiddenRids=null,this._refreshAndNotify())},dt.prototype.hasHiddenRow=function(){return!!this._hiddenRids},dt.prototype.filterIn=function(t,e,i){let o=this._getFilterLogic(t,e),n=!0===i;return!!(this._userFilter!==o||"function"==typeof t||o&&n!==this._filteringOut)&&(this._shared.filterLogic=o,this._userFilter=o,this._filteringOut=n,this._refreshAndNotify(),!0)},dt.prototype.filterOut=function(t,e){return this.filterIn(t,e,!0)},dt.prototype.filterInOnce=function(t,e,i){let o=this._getFilterLogic(t,e),n={};if(!this._getRemovalMap(n,o,!0===i))return;let s=this._removeRowIds(n);this._updatePageCount()||this._transformView(s)?this._dispatchGlobalChange():this._dispatchMultiRowRemoved(Object.keys(n))},dt.prototype.filterOutOnce=function(t,e){this.filterInOnce(t,e,!0)},dt.prototype._removeRowIds=function(t){let e=dt._removeArrayItems(this._rids,t);if(this._groupView&&(e=dt._removeArrayItems(this._groupView,t)),this._groupMembers){let e=this._groupList.length;for(let i=0;i<e;++i){let e=this._groupList[i];this._groupMembers[e]._removeRowIds(t)}}return e},dt.prototype.clearFilter=function(){this._userFilter&&(this._userFilter=null,this._shared.filterLogic=null,this._refreshAndNotify())},dt.prototype.disablePageCorrection=function(t){this._pageCorrection=!1===t},dt.prototype.setPage=function(t){let e=this._setPage(t);return e&&this._dispatchGlobalChange(),e},dt.prototype.gotoPage=dt.prototype.setPage,dt.prototype.nextPage=function(){return this.gotoPage(this._pageIndex+1)},dt.prototype.previousPage=function(){return this.gotoPage(this._pageIndex-1)},dt.prototype.prevPage=dt.prototype.previousPage,dt.prototype.lastPage=function(){return this.gotoPage(this._lastPageIndex)},dt.prototype.firstPage=function(){return this.gotoPage(0)},dt.prototype.getCurrentPage=function(){return this._pageIndex},dt.prototype.getPageIndex=dt.prototype.getCurrentPage,dt.prototype.isOnLastPage=function(){return this._pageIndex===this._lastPageIndex},dt.prototype.isOnFirstPage=function(){return 1===this._pageIndex},dt.prototype.getPageSize=function(){return this._pageSize},dt.prototype.getPageCount=function(){return this._lastPageIndex},dt.prototype.getTotalPages=dt.prototype.getPageCount,dt.prototype.setPageSize=function(t){t>=0||(t=0),this._pageSize!==t&&(this._pageSize=t,this._updatePageCount(),t>0?this._pageView||(this._pageView=[]):this._pageView&&(this._pageView=null),this._pageView&&0!==t?this._transformView():this._updateRowIds(),this._dispatchGlobalChange())},dt.prototype.groupBy=function(t,e){if(this._shared.multiGroupRow=!1,this._groupCriteria){if(this._groupList&&this._groupList.length>0){for(let t in this._groupMembers)this._groupMembers[t].dispose();this._groupMembers={},this._groupList.length=0}this._groupCriteria=null}let i,o;if(null!=e&&this._setPredefinedGroups(e),t&&0===this._groupLevel){let e;for(this._groupCriteria=[],e=Array.isArray(t)?t:[t],o=e.length,i=0;i<o;++i){let t=e[i];"string"==typeof t?this._groupCriteria.push(this._defaultGroupCriteria.bind(this,t)):t&&this._groupCriteria.push(t)}}if(this._groupCriteria)this._groupMembers||(this._groupMembers={},this._groupList=[],this._groupRows={}),this._groupView||(this._groupView=[]);else{if(this._groupMembers=null,this._groupList=null,this._groupView=null,this._groupRows){if(this._groupLevel<=0)this._footerRowIds=null;else if(this._groupRowId&&delete this._groupRows[this._groupRowId],this._footerRowIds){for(o=this._footerRowIds.length,i=0;i<o;++i)delete this._groupRows[this._footerRowIds[i]];this._footerRowIds=null}this._groupRows=null}this._groupValue=null}this._groupLevel=0,this._updateRowIds(),this._dispatch("groupCriteriaChanged",{}),this._dispatchGlobalChange()},dt.prototype.addGroup=function(t){if(this._groupMembers)if(isArray(t)){let e=t,i=e.length;for(let t=0;t<i;++t)this._addGroup(e[t])}else this._addGroup(t)},dt.prototype.sortGroups=function(t){if(this._groupMembers&&(this._groupSortingLogic=null==t?dt._defaultGroupSortingLogic:t||null,this._groupSortingLogic)){this._groupList.sort(this._internalGroupSortingLogic);for(let t=this._groupList.length;--t>=0;){let e=this._groupList[t];this._groupMembers[e].sortGroups(this._groupSortingLogic)}this._groupViewDirty=!0,this._groupLevel<=0&&this._dispatchGlobalChange()}},dt.prototype.moveGroup=function(t,e){let i=this.getGroup(t);if(!i)return;let o=i.getDataSource(),n=i.getGroupId(),s=o._groupList.indexOf(n);s!==e&&s+1!==e&&(o._groupList.splice(s,1),s<e&&--e,o._groupList.splice(e,0,n),this._requestRebuildingRowIds(!1))},dt.prototype.setPredefinedGroups=function(t){this._setPredefinedGroups(t),this._groupMembers&&this._refreshAndNotify()},dt.prototype._setPredefinedGroups=function(t){if(this._preDefGroups===t)return;this._preDefGroups&&(this._preDefGroups.length=0);let e=!1;if(t)for(let i=t.length;--i>=0;)if(Array.isArray(t[i])){e=!0;break}e?this._preDefGroups=t:Array.isArray(t)?this._preDefGroups=[t]:this._preDefGroups=null,this._preDefGroupsDirty=!0},dt.prototype.addFooter=function(t){if(this._groupLevel<=0)console.log("WARNING: Only group can have a footer");else if(null==t&&(t=1),!(t<=0)){this._footerRowIds||(this._footerRowIds=[]);for(let e=0;e<t;++e){let t=this._groupRowId+"_footer"+(this._footerRowIds.length||"");this._footerRowIds.push(t),this._groupRows[t]=this}this._beingAdded||this._requestRebuildingRowIds(this._collapsed)}},dt.prototype.removeFooter=function(){if(this._footerRowIds){let t=this._footerRowIds.length;for(let e=0;e<t;++e)delete this._groupRows[this._footerRowIds[e]];this._footerRowIds=null,this._beingAdded||this._requestRebuildingRowIds(this._collapsed)}},dt.prototype.enableMultiGroup=function(t){this._shared.multiGroupRow=!1!==t},dt.prototype.getGroupByRowId=function(t){return this._groupRows&&this._groupRows[t]||null},dt.prototype.getGroup=function(t){if(!this._groupMembers)return null;let e;if("number"==typeof t){if(e=this._groupList[t],!e)return null}else e=t+"";let i=this._groupMembers[e];if(i)return i;let o=e;return i=this._groupRows[o],i||this._getGroupByContentRowId(o)},dt.prototype._getGroupByContentRowId=function(t){if(this._groupMembers)for(let e=0;e<this._groupList.length;e++){let i=this._groupList[e],o=this._groupMembers[i]._getGroupByContentRowId(t);if(o)return o}else if(-1!==this._rids.indexOf(t))return this;return null},dt.prototype.getAllGroups=function(t){if(t||(t=[]),this._groupMembers){let e=this._groupList.length;for(let i=0;i<e;++i){let e=this._groupList[i],o=this._groupMembers[e];t.push(o),o.getAllGroups(t)}}return t},dt.prototype.getGroupList=function(){return this._groupList},dt.prototype.getGroupId=function(){return this._groupId},dt.prototype.getGroupValue=function(){return this._groupValue},dt.prototype.getGroupRowId=function(){return this._groupRowId},dt.prototype.getFooterRowIndex=function(t){if(this._footerRowIds)for(let e=this._footerRowIds.length;--e>=0;)if(this._footerRowIds[e]===t)return e;return-1},dt.prototype.getFooterRowIds=function(){return this._footerRowIds},dt.prototype.hasGroup=function(){return!!this._groupMembers},dt.prototype.getGroupRows=function(){return null},dt.prototype.getGroupLevel=function(t){if(null!=t&&this._groupRows){if("number"!=typeof t){let e=this.getGroup(t);return e?e._groupLevel:-1}{this._rebuildRowIdsFromChildren();let e=this._getRids(),i=e[t];for(;i;){let o=this._groupRows[i];if(o)return o._groupLevel;i=e[--t]}}}return this._groupLevel},dt.prototype.enableColumnStats=function(t,e,i){if(!t)return null;let o=!1!==e,n=this._columnStats[t];if(o?(n||(n=new ut(this,t),this._columnStats[t]=n),n.addRef(i)):n&&(n.deRef(i)||(n.dispose(),delete this._columnStats[t])),this._groupMembers)for(let o=this._groupList.length;--o>=0;){let n=this._groupList[o];this._groupMembers[n].enableColumnStats(t,e,i)}return n||null},dt.prototype.getColumnStats=function(t){return this._columnStats[t]||null},dt.prototype.hide=function(t){let e=!1!==t;return this._hidden!==e&&(this._hidden=e,this._refreshAndNotify(),!0)},dt.prototype.isHidden=function(){return this._hidden},dt.prototype.isHiddenRow=function(t){return!!this._hiddenRids&&!0===this._hiddenRids[t]},dt.prototype._isHeaderRowShown=function(){return!(this._hiddenHeaderRow||this._shared.filterLogic&&0===this._rids.length||this._shared.autoGroupHiding&&null==this._groupValue)},dt.prototype._setCollapse=function(t){if(this._shared.contentAsHeader){if(this._hiddenHeaderRow&&this._showOnlyFirstMember!==t)return this._showOnlyFirstMember=t,!0}else if(this._isHeaderRowShown()&&this._collapsible&&this._collapsed!==t)return this._collapsed=t,!0;return!1},dt.prototype.collapse=function(t){this._setCollapse(!1!==t)&&(this._shared.contentAsHeader?this._hiddenHeaderRow&&this._requestRebuildingRowIds(this._showOnlyFirstMember):this._groupLevel>0&&this._requestRebuildingRowIds(this._collapsed))},dt.prototype.collapseAllGroups=function(t){let e=this.getAllGroups(),i=e.length;if(i){let o=!1!==t;for(let t=0;t<i;++t)e[t]._setCollapse(o);this._requestRebuildingRowIds(!1)}},dt.prototype.toggleCollapsedState=function(){this.collapse(!this.isCollapsed())},dt.prototype.isCollapsed=function(){return this._collapsed||this._showOnlyFirstMember},dt.prototype.enableContentAsHeader=function(t){this._shared.contentAsHeader=!1!==t},dt.prototype.setDefaultCollapse=function(t){this._shared.defaultCollapse=!!t},dt.prototype.getDefaultCollapse=function(){return!!this._shared.defaultCollapse},dt.prototype.isCollapsible=function(){return this._collapsible},dt.prototype.disableCollapsing=function(t){this._collapsible=!(!1!==t)},dt.prototype.setGroupColor=function(t){1===this._groupLevel&&(this._groupColor=t)},dt.prototype.getGroupColor=function(){return 0===this._groupLevel?"":1===this._groupLevel?this._groupColor:this._parent.getGroupColor()},dt.prototype._getFirstHiddenRids=function(){if(this._shared.contentAsHeader&&this._showOnlyFirstMember){let t=this._rids;if(Array.isArray(t)&&t.length)return[t[0]]}return null},dt.prototype.getVisibleRowCount=function(){return this._collapsed?0:(this._rebuildRowIdsFromChildren(),this._getRids().length)},dt.prototype.isRowDataInGroup=function(t,e){let i=this._groupCriteria,o=this._groupLevel;if(!e||e===this.getGroupId())return this._isAllowedInGroup(null,t);for(let n=o;n<i.length;n++)if(i[n](t).indexOf(e)>=0)return!0;return!1},dt.prototype.isRowIdInGroup=function(t,e){let i=this.getRowData(t);return!!i&&this.isRowDataInGroup(i,e)},dt._getDataViewExpansionId=function(t,e){return t+"_ex"+e},dt.prototype.addRowExpansion=function(t,e){if(this._groupLevel>0)return;if(!e||e<0){if(null!=e)return;e=1}let i=this._rids.indexOf(t);if(i<0)return;let o=0;this._expansionMap?o=this._expansionMap[t]||0:(this._expansionMap={},this._expansionChildren={});let n=o+e;this._expansionMap[t]=n;for(let e=o;e<n;e++)this._expansionChildren[dt._getDataViewExpansionId(t,e)]=t;if(o||this._expansionCount++,!this._groupViewDirty&&this._updateExpansionView()){let e={};e.rid=t,e.type="inserted",e.nextRid=this._rids[i+1],e.fallback=i,this._dispatchDataChange(e)}},dt.prototype.removeRowExpansion=function(t){if(!this._expansionMap)return;let e=this._expansionMap[t];if(!e)return;let i=new Array(e);for(let o=0;o<e;++o)i[o]=dt._getDataViewExpansionId(t,o),delete this._expansionChildren[i[o]];delete this._expansionMap[t],this._expansionCount--,this._groupViewDirty||this._updateExpansionView()&&(1===e?this._dispatchRowRemoved(i[0]):this._dispatchMultiRowRemoved(i))},dt.prototype.toggleRowExpansion=function(t,e,i){let o=this._toRowId(t);(e=null!=e?!0===e:!this.hasRowExpansion(o))?this.addRowExpansion(o,i):this.removeRowExpansion(o)},dt.prototype.removeAllRowExpansions=function(){this._expansionMap&&(this._expansionMap=null,this._expansionCount=0,this._expansionView=null,this._expansionChildren=null,this._refreshAndNotify())},dt.prototype.getRowsWithExpansion=function(t,e){if(!this._expansionMap)return[];let i=this._expansionView,o=i.length;(null==e||e>o)&&(e=o),t>0||(t=0);let n=this._expansionCount,s=new Array(o);for(let o=t;o<e;++o){let t=i[o];if(this._expansionMap[t]&&(s[o]=t,--n<=0))break}return s},dt.prototype.getExpansionParents=function(t,e){let i=[];if(this._expansionMap){let o=this._expansionView,n=o.length;(null==e||e>n)&&(e=n),(!t||t<0)&&(t=0);for(let n=t;n<e;++n)i[n]=this._expansionChildren[o[n]]||""}return i},dt.prototype.getExpansionParentByRowId=function(t){return this._expansionChildren&&this._expansionChildren[t]||""},dt.prototype.isRowExpansion=function(t){return!!this._expansionChildren&&!!this._expansionChildren[t]},dt.prototype.hasRowExpansion=function(t){return!!this._expansionMap&&!!this._expansionMap[t]},dt.prototype.getRowExpansionCount=function(t){return this._expansionMap&&this._expansionMap[t]||0},dt.prototype.getRowExpansionId=function(t,e){return this._expansionMap&&(e||(e=0),e<(this._expansionMap[t]||0))?dt._getDataViewExpansionId(t,e):""},dt.prototype.getRowExpansionIndex=function(t){if(t){let e=t.match(/_ex(\d+)$/);if(e)return+e[1]}return-1},dt.prototype._updateExpansionView=function(){let t=this._expansionMap;if(t){if(!this._expansionCount||this._expansionCount<0)return this._expansionCount=0,this._expansionMap=null,this._expansionView=null,this._expansionChildren=null,!0;let e=this._pageView||this._groupView||this._rids,i=e.length,o=this._expansionView?this._expansionView.length:0;this._expansionView?this._expansionView.length=i:this._expansionView=new Array(i);let n=this._expansionCount;for(let o=0,s=0;o<i;++o){let i=e[o];if(this._expansionView[s++]=i,n){let e=t[i]||0;if(e){for(let t=0;t<e;++t)this._expansionView[s++]=dt._getDataViewExpansionId(i,t);--n}}}return o!==this._expansionView.length}return!1},dt.prototype._transformView=function(t){let e=this._updatePaginationView(t);return e|=this._updateExpansionView(),!!e},dt.prototype.searchAll=function(t,e){e||(e=[]),this._rebuildRowIdsFromChildren();let i=this._getRids(),o=i.length;for(let n=0;n<o;++n){let o=i[n],s=this._dt.getRowData(o);s&&t(s)&&e.push(o)}return e},dt.prototype.searchPrev=function(t,e){this._rebuildRowIdsFromChildren();let i=this._getRids(),o=-1;"number"==typeof t?this._dt.getRowData(i[t])&&(o=t):o=i.indexOf(t);let n=-1,s=i.length;return o>0&&(n=this._searchRow(i,e,o-1,-1,-1),n>=0)||o>=0&&(n=this._searchRow(i,e,s-1,o,-1),n>=0)?n:-1},dt.prototype.searchNext=function(t,e){this._rebuildRowIdsFromChildren();let i=this._getRids(),o=-1;if("number"==typeof t?this._dt.getRowData(i[t])&&(o=t):o=i.indexOf(t),o<0)return-1;let n=-1,s=i.length;return o<s-1&&(n=this._searchRow(i,e,o+1,s,1),n>=0)||o>0&&(n=this._searchRow(i,e,0,o,1),n>=0)?n:-1},dt.prototype._searchRow=function(t,e,i,o,n){for(;i!==o;){let o=t[i],s=this._dt.getRowData(o);if(s&&e(s))return i;i+=n}return-1},dt.prototype.stall=function(t){let e=!1!==t;if(!!this._shared.stalledRids===e)return!1;if(e){let t={};this._shared.stalledRids=t;let e=this._getRids();for(let i=e.length;--i>=0;)t[e[i]]=1}else this._shared.stalledRids=null,this._refreshAndNotify();return!0},dt.prototype.stallSorting=function(t){let e=!1!==t;return this._stalledSorting!==e&&(this._stalledSorting=e,!e&&this.isSorting()&&this._sort()&&this._dispatchDataChange(lt._positionChangeArg),!0)},dt.prototype.enableAutoGroupRemoval=function(t){return t=!1!==t,!!this._shared.autoGroupRemoval!==t&&(this._shared.autoGroupRemoval=t,this._triggerGroupRefreshing(),!0)},dt.prototype.enableAutoGroupHiding=function(t){return t=!1!==t,!!this._shared.autoGroupHiding!==t&&(this._shared.autoGroupHiding=t,this._triggerGroupRefreshing(),!0)},dt.prototype.synchronizeRowOrder=function(){!this._stalledSorting&&this.isSorting()&&this._dt._sort(this._sortingDefs)},dt.prototype.setSegmentSeparators=function(t,e){return!!t&&((e=!1!==e)&&this.synchronizeRowOrder(),this._dt.setSegmentSeparators(t,e))},dt.prototype.setSegmentSeparator=function(t,e){let i="";return"number"==typeof t?i=this.getRowId(t):"string"==typeof t&&(i=t),!!i&&(!1!==e&&this.synchronizeRowOrder(),this._dt.setSegmentSeparator(i,e))},dt.prototype.unsetAllSegmentSeparators=function(){return this._dt.unsetAllSegmentSeparators()},dt.prototype.hasSegmentation=function(){return this._dt.hasSegmentation()},dt.prototype.isSegmentSeparator=function(t){return this._dt.isSegmentSeparator(t)},dt.prototype.getSegment=function(t){return this._dt.getSegment(t)},dt.prototype.getSegmentParent=function(t){return this._dt.getSegmentParent(t)},dt.prototype.getSegmentLevel=function(t){return this._dt.getSegmentLevel(t)},dt.prototype.getSegmentParentRowId=function(t){return this._dt.getSegmentParentRowId(t)},dt.prototype.collapseSegment=function(t,e){e=!1!==e;let i=this._dt._getSegmentSeparators();if(i){let o=this._toRowId(t);if(i.collapseSegment(o,e))return this._refreshAndNotify(),!0}return!1},dt.prototype.collapseSegments=function(t,e){e=!1!==e;let i=this._dt._getSegmentSeparators();return!(!i||!i.collapseSegments(t,e)||(this._refreshAndNotify(),0))},dt.prototype.expandSegment=function(t,e){return this.collapseSegment(t,!1===e)},dt.prototype.expandAllSegments=function(){let t=this._dt._getSegmentSeparators();return!(!t||!t.expandAllSegments()||(this._refreshAndNotify(),0))},dt.prototype.setSegmentCollapsingLogic=function(){},dt.prototype.isSegmentCollapsed=function(t){let e=this._dt._getSegmentSeparators();return!!e&&e.isCollapsedSegment(this._toRowId(t))},dt.prototype.fillSegment=function(t){this._dt.fillSegment(this._toRowId(t))},dt.prototype.fillSegments=function(){this._dt.fillSegments()},dt.prototype.addSegmentChild=function(t,e,i){if(this._dt._getSegmentSeparators()){let o=this._toRowId(t),n=this._toRowId(e);return this._dt.addSegmentChild(o,n,i)}return!1},dt.prototype.addSegmentChildren=function(t,e,i){if(this._dt._getSegmentSeparators()){let o=this._toRowId(t),n=this._toRowIds(e);return this._dt.addSegmentChildren(o,n,i)}return!1},dt.prototype.setSegmentChildren=function(t){return!!this._dt._getSegmentSeparators()&&this._dt.setSegmentChildren(t)},dt.prototype.removeSegmentChild=function(t,e){if(this._dt._getSegmentSeparators()){let i=this._toRowId(t),o=this._toRowId(e);return this._dt.removeSegmentChild(i,o)}return!1},dt.prototype.removeSegmentChildren=function(t,e){if(this._dt._getSegmentSeparators()){let i=this._toRowId(t),o=this._toRowIds(e);return this._dt.removeSegmentChildren(i,o)}return!1},dt.prototype.removeAllSegmentChildren=function(){return this._dt.removeAllSegmentChildren()},dt.prototype.getSegmentIds=function(){return this._dt.getSegmentIds()},dt.prototype.getSegmentChildIds=function(t){return this._dt.getSegmentChildIds(this._toRowId(t))},dt.prototype.sortSeparators=function(t,e,i){let o=this._sortingDefs;if(o.length)i||(i=o[0][0]),e||(e=o[0][3]);else if(!t)return;this._dt.sortSeparators(t,e,i)},dt.prototype.sortSegments=function(t){this._dt.sortSegments(t)},dt.prototype.enableEmptySegmentFiltering=function(t){t=!1!==t,this._emptySegmentFiltering!==t&&(this._emptySegmentFiltering=t,this._userFilter&&this._refreshAndNotify())},dt.prototype.enableSeparatorFiltering=function(t){t=!1!==t,this._separatorFiltering!==t&&(this._separatorFiltering=t,this._userFilter&&this._refreshAndNotify())},dt.prototype.setSegmentClassification=function(t,e){return this._dt.setSegmentClassification(this._toRowId(t),e)},dt.prototype.setSegmentDefaultCollapsing=function(t){return this._dt.setSegmentDefaultCollapsing(t)},dt.prototype._getSharedObject=function(){return this._shared},dt.prototype.getWrapSize=function(){return this._wrapSize},dt.prototype.getWrappedViews=function(){return this._wrappedViews},dt.prototype.wrapView=function(t){null!=t&&((!t||t<0)&&(t=0),this._wrapSize!==t&&(this._wrapSize=t,this._dispatch("wrapSizeChanged",{wrapSize:t,rids:this.getVisibleRowIds(!0)}))),this._updateWrapCount()},dt.prototype._updateWrapCount=function(){this._wrapTimerId=0;let t,e=this._wrapSize,i=this._wrappedViews,o=i?i.length:0,n=0;if(e){let s=this.getVisibleRowIds(!0),r=s.length;if(n=Math.ceil(r/e),o<n)for(i||(i=this._wrappedViews=[]),t=o;t<n;++t)this._wrappedViews[t]=new pt({dataView:this,wrapIndex:t,rids:s})}if(n<o){for(t=o;--t>=n;)this._wrappedViews[t].dispose();this._wrappedViews.length=n}e||(this._wrappedViews=null),o!==n&&this._dispatch("wrapCountChanged",{prevCount:o,newCount:n})},dt.prototype.dump=function(t){this._rebuildRowIdsFromChildren();let e=this._getRids();return Z.constructTable(this.getMultipleRowData(e),t,e)},dt.prototype.log=function(t){console.table(this.dump(t))},dt.prototype._getRids=function(){return this._expansionView||this._pageView||this._groupView||this._rids},dt.prototype._updateRowIds=function(t){if(this._groupViewDirty=!1,!this._parent||this._hidden)return void this._resetAllViews();if(this._shared.stalledRids)return;this._rids=t||this._parent.getAllRowIds(),this._dispatch("beforeFiltering",{}),this._excludedRids={};let e=0;e+=dt._copyValidObjectKeys(this._excludedRids,this._hiddenRids);let i=this._dt._getSegmentSeparators(),o=i?i.getSegments():null,n=this._getRemovalMap(this._excludedRids,this._userFilter,this._filteringOut,this._separatorFiltering?null:o);if(e+=n,this._collapsedRids=null,i&&(n&&this._emptySegmentFiltering&&(e+=this._getEmptySegments(this._excludedRids,o)),this._collapsedRids=i.getCollapsedRows(),e+=dt._copyValidObjectKeys(this._excludedRids,this._collapsedRids)),this._groupLevel>0&&!t&&(e+=this._getRemovalMap(this._excludedRids,this._groupFilterLogic,!1)),e&&(this._rids=this._rids.filter(this._byRemovalMap)),this._excludedRids=null,this._groupMembers)this._populateGroups();else{let t=this._updatePageCount();this._sort()||t||this._transformView()}},dt.prototype._onDataChanged=function(t){if(this._conflator.conflate(t))return;let e=this._conflator.popAllData()||[t],i=e.length;if(1===i){let t=e[0];if(t.globalChange)return this._updateRowIds(),void this._dispatchDataChange(t);let i=t.type;"inserted"===i?this._onRowInserted(t):"removed"===i?this._onRowRemoved(t):this._onRowUpdated(t)}else{this._updateRowIds();let t=!0;for(let o=0;o<i;o++)if(!e[o].positionChangeOnly){t=!1;break}this._dispatchDataChange({globalChange:!0,positionChangeOnly:t,events:e})}},dt.prototype._onRowInserted=function(t){if(this._shared.stalledRids)return 0;if(this.isRowFiltered(t.rid,t.rowData))return 0;let e=0;if(this._groupMembers){let i,o=this._resolveGroupId(t.rowData),n=o.length;n>1&&(this._shared.multiGroupRow=!0);for(let s=0;s<n;s++)if(i=o[s],this._groupMembers[i])e=this._groupMembers[i]._onRowInserted(t);else{let o=this._addGroup(i);o&&(t.globalChange=!0,o._onRowInserted(t),e=1)}t.globalChange&&(this._groupViewDirty=!0)}if(this._hidden)return e;let i=t.rid,o=t.rowData;if(!this._isAllowedInGroup(i,o))return e;let n,s=t.nextRid;n=this.isSorting()&&!t.segmentChanged?this._addDataRow(i):this._addDataRow(i,s,t.fallback);let r=this._updatePageCount(),l=this._sort();return l&&(t.globalChange=!0),t.globalChange?l||r||this._transformView():(t={rid:i,rowData:o,type:"inserted"},null!=s&&(t.nextRid=s,t.fallback=n),this._transformView(n)&&(t.globalChange=!0)),this._dispatchDataChange(t),1},dt.prototype._onRowRemoved=function(t){if(this._shared.stalledRids)return 0;if(t.segmentChanged&&this.isSorting())return this._refreshAndNotify(),1;let e,i=0,o=t.rids;if(this._groupMembers){let n,s,r=t.rowData;if(!o&&r){for(n=this._resolveGroupId(r),e=0;e<n.length;e++)s=n[e],this._groupMembers[s]&&(i+=this._groupMembers[s]._onRowRemoved(t));i>1&&(this._groupViewDirty=!0)}else{let o=this._groupList.length;for(e=0;e<o;++e)s=this._groupList[e],i+=this._groupMembers[s]._onRowRemoved(t)}}let n,s,r=NaN,l=null;if(i=0,o){for(l=[],e=o.length;--e>=0;)n=o[e],s=this._removeDataRow(n),s>=0&&(l.push(n),s>=r||(r=s));i=l.length}else n=t.rid,s=this._removeDataRow(n),s>=0&&(l=[n],r=s,i=1);return i>0&&(this._updatePageCount()||this._transformView(r)?this._dispatchGlobalChange():this._dispatchMultiRowRemoved(l),this._shared.autoGroupRemoval&&this._groupRows&&this._rids.length<=0&&this._triggerGroupRefreshing(),this._hiddenHeaderRow&&this._requestRebuildingRowIds(!0)),i},dt.prototype._onRowUpdated=function(t){let e,i,o=t.rid,n=t.rowData;if(this.isRowFiltered(o,n))return this._onRowRemoved(t)?1:0;if(this._groupMembers){let s=[],r=this._groupList.length;for(e=0;e<r;++e)i=this._groupList[e],s[this._groupMembers[i]._onRowUpdated(t)]=!0;t.globalChange&&(this._groupViewDirty=!0);let l=0;if(s[2]?l=2:s[1]?this._isAllowedInGroup(o,n)||(l=1):s[4]&&(l=4),this._groupLevel>0)1===l?(dt._removeArrayItem(this._rids,o)>=0&&this._groupView&&dt._removeArrayItem(this._groupView,o),this._shared.multiGroupRow&&(this._groupViewDirty=!0)):2!==l||this._hidden||(this._rids.indexOf(o)<0&&this._rids.push(o),this._groupViewDirty=!0,this._resolveGroupId(n).length>1&&(this._shared.multiGroupRow=!0));else{let r=s[1]&&s[2]||s[4];if(this._shared.multiGroupRow||!r){let o=this._resolveGroupId(n);for(e=0;e<o.length;e++){i=o[e];let n=this._addGroup(i);n&&(n._onRowInserted(t),l=1)}}!r&&!this._hidden&&this._rids.indexOf(o)<0&&this._addDataRow(o),4===l?this._shared.multiGroupRow?this._dispatchGlobalChange():this._dispatchDataChange(t):(this._groupViewDirty=!0,this._dispatchGlobalChange())}return l}return this._isAllowedInGroup(o,n)?this._rids.indexOf(o)<0?(this._onRowInserted(t),2):(this._shared.stalledRids||this._sort()&&(t.globalChange=!0),this._dispatchDataChange(t),4):this._onRowRemoved(t)?1:0},dt.prototype._onGroupAdded=function(t){if(!this._hidden){let i=t.newGroup,o=i.getGroupRowId();this._groupView.push(o),this._groupViewDirty=!0,this._dispatch("groupAdded",t),e.pushArrayItems(this._groupView,i.getFooterRowIds())}},dt.prototype._onBeforeGroupAdded=function(t){this._dispatch("beforeGroupAdded",t)},dt.prototype._requestRebuildingRowIds=function(t){this._groupMembers&&(this._groupViewDirty=!0),this._groupLevel>0?this._parent._requestRebuildingRowIds(t):(t?this._rebuildRowIdsFromChildren():this._updateRowIds(),this._dispatchGlobalChange())},dt.prototype._refreshAndNotify=function(){this._updateRowIds(),this._dispatchGlobalChange()},dt.prototype._onRefreshTimeout=function(){this._refreshTimerId=0,this._refreshAndNotify()},dt.prototype._addDataRow=function(t,e,i){let o=this._getRowIndex(this._rids,e,i);return this._insertItems(this._rids,o,t),this._groupView?this._groupMembers?(this._groupViewDirty=!0,this._insertItems(this._groupView,-1,t)):o<0?this._insertItems(this._groupView,-1,t):(o=this._getRowIndex(this._groupView,e,i),this._insertItems(this._groupView,o,t)):o>=0?o:this._rids.length-1},dt.prototype._insertItems=function(t,e,i){return e<0?(e=t.length,t.push(i)):t.splice(e,0,i),e},dt.prototype._getRowIndex=function(t,e,i){if(null==e)return-1;let o=this._rids.indexOf(e);return o>=0?o:null==i||i>=t.length?-1:i},dt.prototype._removeDataRow=function(t){let e=dt._removeArrayItem(this._rids,t);return this._groupView&&e>=0&&(e=dt._removeArrayItem(this._groupView,t)),e},dt._removeArrayItem=function(t,e){let i=t.indexOf(e);return i>=0&&t.splice(i,1),i},dt._removeArrayItems=function(t,e){let i=NaN,o=0;for(let n=t.length;--n>=0;)e[t[n]]?++o:o&&(i=n+1,t.splice(i,o),o=0);return o&&(t.splice(0,o),i=0),i},dt._copyValidObjectKeys=function(t,e){if(e){let i=0;for(let o in e)e[o]&&(t[o]=1,++i);return i}return 0},dt.prototype._isAllowedInGroup=function(t,e){if(this._groupLevel>0){let i=this;for(let o=this._groupLevel;--o>=0;){if(!i._groupFilterLogic(t,e))return!1;i=i.getDataSource()}}return!0},dt.prototype.isRowFiltered=function(t,e){return this._shared.stalledRids?!this._shared.stalledRids[t]:!(!this._hiddenRids||!this._hiddenRids[t])||!(!this._collapsedRids||!this._collapsedRids[t])||!(!this._userFilter||this._userFilter(t,e)!==this._filteringOut)},dt.prototype._sort=function(){if(this._groupMembers)return!1;if(this._stalledSorting)return!1;if(this._dt._getSegmentSeparators()||this.isSorting()){let t=this._rids,e=this._dt.getMultipleRowData(t),i=this._dt.getSegmentValues(t,!0),o=lt._performMultiLevelSorting(e,this._sortingDefs,i);if(o)return this._rids=lt._reorderItems(t,o),this._transformView(),!0}return!1},dt.prototype._byRemovalMap=function(t){return!this._excludedRids[t]},dt.prototype._getRemovalMap=function(t,e,i,o){if(!e)return 0;let n,s,r,l=this._rids,h=this._dt,u=0,a=l.length;if(o)for(s=a;--s>=0;)n=l[s],o[n]||(r=h.getRowData(n),r?e(n,r)===i&&(t[n]=1,++u):(t[n]=1,++u));else for(s=a;--s>=0;)n=l[s],r=h.getRowData(n),r?e(n,r)===i&&(t[n]=1,++u):(t[n]=1,++u);return u},dt.prototype._getEmptySegments=function(t,e){let i=this._dt._getSegmentSeparators(),o=0;for(let n in e){let e=i.getSegment(n);if(e){let i=e.getChildren(),s=!0;for(let e in i)if(!t[e]){s=!1;break}s&&(t[n]=1,++o)}}return o},dt.prototype._getFilterLogic=function(t,e){return null!=t?"function"==typeof t?t:"string"==typeof t?dt._defaultFilterLogic.bind(null,t,e):dt._defaultFilterLogic.bind(null,t+"",e):null},dt.prototype._setPage=function(t){return t>this._lastPageIndex&&this._pageCorrection&&(t=this._lastPageIndex),t<1&&(t=1),t!=this._pageIndex&&(this._pageIndex=t,this._transformView(),this._dispatch("pageIndexChanged",{pageIndex:this._pageIndex}),!0)},dt.prototype._updatePaginationView=function(t){let e=!1;if(this._pageView){t||(t=0);let i=this._pageSize*(this._pageIndex-1),o=this._pageSize+i;if(t<o){let t=this._groupView||this._rids;o>t.length&&(o=t.length);let n=o-i;this._pageView.length=n>=0?n:0;for(let e=i;e<o;++e)this._pageView[e-i]=t[e];e=!0}}return e},dt.prototype._updatePageCount=function(){let t=1;if(this._pageSize>0){let e=this._groupView||this._rids,i=e.length>0?e.length:0;t=Math.ceil(i/this._pageSize)}return!!(this._lastPageIndex!==t&&(this._lastPageIndex=t,this._dispatch("pageCountChanged",{pageCount:this._lastPageIndex}),this._lastPageIndex<this._pageIndex&&this._pageCorrection))&&this._setPage(this._lastPageIndex)},dt.prototype._dispatchRowRemoved=function(t){t&&this._dispatchDataChange({type:"removed",rid:t})},dt.prototype._dispatchMultiRowRemoved=function(t){if(t){let e=t.length;1===e?this._dispatchRowRemoved(t[0]):e>1&&this._dispatchDataChange({type:"removed",rids:t})}},dt.prototype._dispatchGlobalChange=function(){this._dispatchDataChange(lt._globalChangeArg)},dt.prototype._dispatchDataChange=function(t){this._dispatch("dataChanged",t),this._wrapSize&&!this._wrapTimerId&&(this._wrapTimerId=setTimeout(this._updateWrapCount))},dt.prototype._setParent=function(t){this._parent=t,this._dt=t;do{(t=t.getDataSource())&&(this._dt=t)}while(t);if(this._parent&&this._dt!==this._parent){this._shared=this._parent._shared;let t=this._parent._columnStats;if(t)for(let e in t){let t=this.enableColumnStats(e),i=this._parent.getColumnStats(e);t&&i&&t.setColumnDataGetter(i.getColumnDataGetter())}}},dt.prototype._populateGroups=function(){let t,e,i,o,n,s,r=this._rids;this._rids=[];let l={},h=[];for(e=r.length,t=0;t<e;++t){let e=r[t],i=this._dt.getRowData(e);if(i){n=this._resolveGroupId(i),s=n.length,s>1&&(this._shared.multiGroupRow=!0);for(let t=0;t<s;t++){o=n[t];let i=l[o];i?i.push(e):(i=[e],l[o]=i,h.push(o))}}}if(this._shared.autoGroupRemoval)for(e=this._groupList.length,t=e;--t>=0;)o=this._groupList[t],l[o]||(i=this._groupMembers[o],i&&!i._predefinedGroup&&this._removeGroupMember(t,o));let u=null;if(this._preDefGroups&&this._groupLevel<this._preDefGroups.length&&(u=this._preDefGroups[this._groupLevel]),e=this._groupList.length,this._preDefGroupsDirty)for(this._preDefGroupsDirty=!1,t=e;--t>=0;)o=this._groupList[t],i=this._groupMembers[o],i&&i._predefinedGroup&&(u?u.indexOf(i._groupId)<0&&this._removeGroupMember(t,o):this._removeGroupMember(t,o));if(u)for(e=u.length,t=0;t<e;++t){let e=this._addGroup(u[t]);e&&(e._predefinedGroup=!0)}for(e=h.length,t=0;t<e;++t)this._addGroup(h[t]);for(e=this._groupList.length,t=0;t<e;++t)o=this._groupList[t],i=this._groupMembers[o],i._updateRowIds(l[o]),i._markColumnStatsDirty();this._groupViewDirty=!0,this._rebuildRowIdsFromChildren()},dt.prototype._removeGroupMember=function(t,e){let i=this._groupMembers[e];i&&(this._groupList.splice(t,1),delete this._groupMembers[e],i.dispose())},dt.prototype._defaultGroupCriteria=function(t,e){let i=e[t];return Array.isArray(i)?i.map((function(t){return t+""})):[i+""]},dt.prototype._groupFilterLogic=function(t,e){return this._groupCriteria[this._groupLevel-1](e).indexOf(this._groupId)>=0},dt.prototype._internalGroupSortingLogic=function(t,e){let i=this._groupMembers[t],o=this._groupMembers[e];return this._groupSortingLogic(t,e,i,o)},dt.prototype._addGroup=function(t){let e=t+"";if(!e)return null;let i=this._groupMembers[e];if(i)return null;let o,n=(this._groupRowId||"_grp")+"_"+e;if(this._hasListener("beforeGroupAdded")&&(o={dataView:this,newGroupId:e,newGroupValue:t,newGroupRowId:n,newGroupLevel:this._groupLevel+1},this._dispatch("beforeGroupAdded",o),o.cancel))return null;i=new dt;let s=this._shared.defaultCollapse;return null!=s&&(i._collapsed=s),i._groupId=e,"string"==typeof t?"null"==t?i._groupValue=null:"undefined"!=t&&(i._groupValue=t):i._groupValue=t,o&&!0===o.hideHeaderRow&&(i._hiddenHeaderRow=!0),i._groupRowId=n,i._groupLevel=this._groupLevel+1,i._groupCriteria=this._groupCriteria,i._preDefGroups=this._preDefGroups,i._groupLevel<i._groupCriteria.length&&(i._groupMembers={},i._groupList=[],i._groupView=[]),i._groupRows=this._groupRows,i._setParent(this),i._sortingDefs=this._sortingDefs,this._groupMembers[e]=i,this._groupList.push(e),this._groupRows[i._groupRowId]=i,this._hidden||(i._isHeaderRowShown()&&this._groupView.push(i._groupRowId),this._groupViewDirty=!0,i._beingAdded=!0,this._dispatch("groupAdded",{dataView:this,newGroup:i}),i._beingAdded=!1),i.listen("groupAdded",this._onGroupAdded),this._hasListener("beforeGroupAdded")&&i.listen("beforeGroupAdded",this._onBeforeGroupAdded),i},dt.prototype._triggerGroupRefreshing=function(){this._groupLevel>0?this._parent&&this._parent._triggerGroupRefreshing():this._groupRows&&!this._refreshTimerId&&(this._refreshTimerId=setTimeout(this._onRefreshTimeout,100))},dt.prototype._rebuildRowIdsFromChildren=function(){if(this._groupViewDirty){if(this._rids.length=0,this._groupView&&(this._groupView.length=0),!this._hidden){let t=this._groupList.length;for(let i=0;i<t;++i){let t=this._groupList[i],o=this._groupMembers[t];if(o._rebuildRowIdsFromChildren(),e.pushArrayItems(this._rids,o._rids),!this._collapsed&&this._groupView&&(o._isHeaderRowShown()&&this._groupView.push(o._groupRowId),!o._collapsed)){let t=o._getFirstHiddenRids()||o._groupView||o._rids;e.pushArrayItems(this._groupView,t),e.pushArrayItems(this._groupView,o._footerRowIds)}}}this._groupViewDirty=!1,this._updatePageCount()||this._transformView()}},dt.prototype._resolveGroupId=function(t){return this._groupCriteria[this._groupLevel](t)},dt.prototype._markColumnStatsDirty=function(){for(let t in this._columnStats)this._columnStats[t].markDirty()},dt._defaultFilterLogic=function(t,e,i,o){return o[t]===e},dt._defaultGroupSortingLogic=function(t,e){return t==e?0:t<e?-1:1};const ct=dt;let gt=function(t,e,i){this._onConflated=this._onConflated.bind(this),this._data=[],"function"==typeof t?this.setFunction(t,i):"function"==typeof e&&this.setFunction(e,i),"number"==typeof e?this.setConflatingTime(e):"number"==typeof t&&this.setConflatingTime(t)};gt.prototype._data,gt.prototype._func=null,gt.prototype._delay=0,gt.prototype._timerId=0,gt.prototype._conflated=!1,gt.prototype._disabled=!1,gt.prototype.reset=function(){return this._timerId&&(clearTimeout(this._timerId),this._timerId=0),this.popAllData()},gt.prototype.popAllData=function(){if(this._data.length){let t=this._data;return this._data=[],t}return null},gt.prototype.dispose=function(){this._timerId&&(clearTimeout(this._timerId),this._timerId=0),this._data.length&&(this._data.length=0),this._func=null},gt.prototype.conflate=function(t){return!this._disabled&&(null!=t&&this._data.push(t),!this._conflated&&(this._timerId||(this._timerId=setTimeout(this._onConflated,this._delay)),!0))},gt.prototype.isConflating=function(){return this._timerId>0&&!this._conflated&&!this._disabled},gt.prototype._onConflated=function(){this._conflated=!0;try{this._func()}catch(t){console.error(t.message||t)}this._timerId=0,this._data.length=0,this._conflated=!1},gt.prototype.getData=function(){return this._data},gt.prototype.setFunction=function(t,e){this._func=t,this._func=t?e?t.bind(e):t:null},gt.prototype.setConflatingTime=function(t){this._delay=t||0,this._delay<0&&(this._delay=0)},gt.prototype.disable=function(t){this._disabled=!1!==t},gt.prototype.isEnabled=function(){return!this._disabled},gt.prototype.enable=function(t){this._disabled=!1===t},gt._proto=gt.prototype;const ft=gt;let yt=function(t){let e=this;e._onDataChanged=e._onDataChanged.bind(e),e.extendEventArg=e.extendEventArg.bind(e),e._dataChangedConflator=new ft(100,e._onDataChanged),e._grid=t,e._grid.setEventArgExtender("rowCountChanged",e.extendEventArg),e._grid.setEventArgExtender("rowHeightChanged",e.extendEventArg),e._grid.setEventArgExtender("rowAvailable",e.extendEventArg),e._grid.listen("rowAvailable",e._dispatch.bind(this,"rowAvailable")),e._addEvent("dataChanged"),e._addEvent("rowAvailable")};l.inherits(yt,r),yt._runningId=0,yt.prototype._id="",yt.prototype._type="",yt.prototype._grid=null,yt.prototype._snapshot=null,yt.prototype._dataView=null,yt.prototype._dataArg=null,yt.prototype._autoSyncRowCount,yt.prototype._bindingEnabled=!0,yt.prototype._parent=null,yt.prototype._children=null,yt.prototype._dataChangedConflator,yt.prototype.getId=function(){return this._id},yt.prototype.setId=function(t){return this._id=t||"section"+yt._runningId++,this._grid.setAttribute("id",this._id),this._id},yt.prototype.getSection=function(){return this._snapshot||this._grid},yt.prototype.getSectionName=function(){return this._grid.getId()},yt.prototype.getIndex=function(){return this._grid.getIndex()},yt.prototype.getType=function(){return this._type},yt.prototype.setType=function(t){this._type!==t&&(this._type&&this._grid.removeClass(this._type),this._type=t||"",t&&this._grid.addClass(t))},yt.prototype.getDataSource=function(){return this._dataView},yt.prototype.setDataSource=function(t){let e=this;e.getAutoSyncRowCount()&&e._dataView!==t&&(e._dataView&&e._dataView.unlisten("dataChanged",this._onDataChanged),e._dataChangedConflator.reset(),e._dataArg=null,e._dataView=t,null!==e._dataView&&e._dataView.listen("dataChanged",e._onDataChanged),e._dispatchDataChanged(0,NaN))},yt.prototype.getRootDataSource=function(){if(!this._dataView)return null;let t=this._dataView.getDataSource();if(!t)return null;for(;t.getDataSource();)t=t.getDataSource();return t},yt.prototype.getData=function(t,e){return this._dataView?(e=this._getRowId(e),this._dataView.getData(e,t)):null},yt.prototype.setData=function(t,e,i){return!!this._dataView&&(e=this._getRowId(e),this._dataView.setData(e,t,i),!0)},yt.prototype.getRowData=function(t){return this._dataView?(t=this._getRowId(t),this._dataView.getRowData(t)):null},yt.prototype.removeRowData=function(t){if(!this._dataView)return!1;let e=this.getRootDataSource();if(!e)return!1;t=this._getRowId(t);let i=e.getRowIndex(t);return!(i<0||(e.removeRow(i),0))},yt.prototype.activateColumns=function(t,e,i){if("content"===this._type)for(let o=i+1;--o>=e;){let e=t[o];null!=e&&this._grid.activateColumn(o,e)}},yt.prototype.getChildren=function(){return this._children},yt.prototype.setParent=function(t){if(this._parent){let t=this._parent._children.indexOf(this);t>=0&&(this._parent._children.splice(t,1),this._parent._children.length<=0&&(this._parent._children=null)),this._parent=null}this._parent=t,this._parent&&(this._parent._children||(this._parent._children=[]),this._parent._children.push(this))},yt.prototype.getParent=function(){return this._parent},yt.prototype.getDataChangedConflator=function(){return this._dataChangedConflator},yt.prototype.disableConflation=function(t){this._dataChangedConflator.disable(t)},yt.prototype.disableDataBinding=function(t){this._bindingEnabled=!1===t},yt.prototype.getAutoSyncRowCount=function(){return null!=this._autoSyncRowCount?this._autoSyncRowCount:"content"===this._type},yt.prototype.setAutoSyncRowCount=function(t){if(this._autoSyncRowCount=t,this.getAutoSyncRowCount()){let t=this._dataView?this._dataView.getVisibleRowCount():0;this._grid.setRowCount(t)}},yt.prototype.isDataBindable=function(){return!(!this._bindingEnabled||!this._dataView)},yt.prototype.dispose=function(){let t=this;t._dataChangedConflator.reset(),t._dataArg=null,t._grid&&t._grid.dispose(),t._dataView&&t._dataView.unlisten("dataChanged",t._onDataChanged),t.unlistenAll(),t.setParent(null),t._grid=null,t._dataView=null},yt.prototype.extendEventArg=function(t){return t||(t={}),t.sectionSettings!==this&&(t.sectionSettings=this,t.section=this._snapshot||this._grid,t.sectionName=this._grid.getId(),t.sectionIndex=this._grid.getIndex(),t.sectionType=this._type,t.dataSource=this._dataView,this._snapshot?t.print=!0:t.print&&(t.print=!1)),t},yt.prototype.extendRenderEventArg=function(t,e,i){return t=this.extendEventArg(t),e>=0||(this._snapshot?(e=0,i=this._grid.getRowCount()):(e=this._grid.getFirstIndexInView(),i=this._grid.getLastIndexInView()+1)),t.fromRowIndex=e,t.toRowIndex=i,t},yt.prototype.extendDataEventArg=function(t,e,i){let o,n;if(t||(t={}),t.firstUpdate=e,t.lastUpdate=i,this._snapshot?(o=0,n=this._grid.getRowCount()):(o=this._grid.getFirstIndexInView(),n=this._grid.getLastIndexInView()+1),t.fromRowIndex=e>o?e:o,this._dataView){let e=this._dataView.getVisibleRowCount();t.dataRowCount=e,n>e&&(n=e)}return t.toRowIndex=i+1<n?i+1:n,this.extendEventArg(t),t},yt.prototype.setIndex=function(t){this._grid.setIndex(t)},yt.prototype.getRowOffset=function(){return this._grid.getRowOffset()},yt.prototype.setRowOffset=function(t){this._grid.setRowOffset(t)},yt.prototype.enableColumnVirtualization=function(t){t=!1!==t,"content"===this._type&&this._grid.enableColumnVirtualization(t)},yt.prototype.isBinding=function(){return this._isEventDispatching("dataChanged")},yt.prototype._onDataChanged=function(t){if(!this.isBinding()){if(this._bindingEnabled){if(t)this._mergeEvent(t);else if(!this._dataArg)return}else if(!this.getAutoSyncRowCount())return;this._dataChangedConflator.conflate()||(this._calculateChangeIndices(),this._dataArg?this._dispatchDataChanged(this._dataArg.firstUpdate,this._dataArg.lastUpdate):this._dispatchDataChanged(0,NaN))}},yt.prototype._dispatchDataChanged=function(t,e){let i=this.getAutoSyncRowCount(),o=this._dataView?this._dataView.getVisibleRowCount():0,n=this._grid.getRowCount();i?o!==n&&this._grid.setRowCount(o,!0):o>n&&(e=n-1),this.updateRowData(t,e,this._dataArg),this._dataArg=null},yt.prototype.updateRowData=function(t,e,i){this.isDataBindable()&&(this._grid._getTempRowHeights()&&(t=this._grid.getFirstIndexInView(),e=this._grid.getLastIndexInView()+1),(i=this.extendDataEventArg(i,t,e)).fromRowIndex<i.toRowIndex&&this._dispatch("dataChanged",i))},yt.prototype.rerender=function(){this.isDataBindable()?this.updateRowData():this._dispatch("rowAvailable",this.extendEventArg())},yt.prototype.snapshot=function(t){if(t){this._snapshot=t;try{t.setColumnCount(this._grid.getColumnCount()),t.setRowCount(this._grid.getRowCount()),this._dispatch("rowAvailable",this.extendEventArg())}catch(t){console.warn("Unable to take a snapshot: "+t.message)}this._snapshot=null,this._dispatch("rowAvailable",this.extendEventArg())}},yt.prototype._getRowId=function(t){return e.isNumber(t)?this._dataView.getRowId(t):t},yt.prototype._mergeEvent=function(t){let e=this._dataArg;if(e||(e=this._dataArg={},e.actualUpdate=!0,e.positionChangeOnly=!0,e.events=[],e.firstUpdate=NaN,e.lastUpdate=NaN,e.updatedRids={}),t.positionChangeOnly||(e.positionChangeOnly=!1),t.events?e.events=e.events.concat(t.events):e.events.push(t),e.globalChange)return;if(t.globalChange)return e.globalChange=!0,e.firstUpdate=0,void(e.lastUpdate=NaN);let i=t.rids;if(i)for(let t=i.length;--t>=0;)e.updatedRids[i[t]]=!0;else t.rid&&(e.updatedRids[t.rid]=!0);"updated"!==t.type&&(e.indexShifted=!0,"removed"===t.type&&(e.dataRemoved=!0))},yt.prototype._calculateChangeIndices=function(){if(!this.isDataBindable()||this._dataArg.globalChange)return;let t,e;if(this._dataArg.indexShifted){if(this._dataArg.dataRemoved)this._dataArg.firstUpdate=0;else for(t in this._dataArg.updatedRids)e=this._dataView.getRowIndex(t),e>=0&&(this._dataArg.firstUpdate<=e||(this._dataArg.firstUpdate=e));this._dataArg.lastUpdate=this._dataView.getVisibleRowCount()}else for(t in this._dataArg.updatedRids)e=this._dataView.getRowIndex(t),e>=0&&(this._dataArg.firstUpdate<=e||(this._dataArg.firstUpdate=e),this._dataArg.lastUpdate>=e||(this._dataArg.lastUpdate=e))},yt._proto=yt.prototype;const mt=yt;let Ct=function(t){this._layout=t,this._arg={},this._addEvent("indexChanged")};l.inherits(Ct,r),Ct.prototype._layout,Ct.prototype._viewSize=0,Ct.prototype._viewOffset=0,Ct.prototype._startOffsetCount=0,Ct.prototype._endOffsetCount=0,Ct.prototype._bufferSize=0,Ct.prototype._arg=null,Ct.prototype._enabled=!0,Ct.prototype._active=!0,Ct.prototype._virtualizable=!1,Ct.prototype._getMinIndex=function(){return this._startOffsetCount},Ct.prototype._getMaxIndex=function(){let t=this._layout.getLaneCount()-this._endOffsetCount;return t>this._startOffsetCount?t:this._startOffsetCount},Ct.prototype.getContentStart=function(t){return this._layout.getLaneStart(t)},Ct.prototype.getContentInViewCount=function(){let t=this.getFirstIndexInView(),e=this.getLastIndexInView();return t>=0&&t<e?e-t+1:0},Ct.prototype._getContentSizeInBounds=function(){let t=this._getMinIndex(),e=this._getMaxIndex();return this._layout.getLaneStart(e)-this._layout.getLaneStart(t)},Ct.prototype.getViewSize=function(){return this._viewSize},Ct.prototype.getViewOffset=function(){let t=this._getMinIndex();return this._viewOffset+this._layout.getLaneStart(t)},Ct.prototype.getIndexOffset=function(){return this._startOffsetCount},Ct.prototype.isVirtualizable=function(){return this._virtualizable},Ct.prototype.getFirstIndexInView=function(){if(!this._virtualizable)return 0;let t=this.getViewOffset(),e=this._layout.getTrackSize();return t>=e&&(t=e-this._viewSize),t<0?0:this._layout.hitTest(t)},Ct.prototype.getLastIndexInView=function(){if(this._virtualizable){let t=this.getViewOffset()+this._viewSize,e=this._getMaxIndex();return t>=this._layout.getLaneStart(e)?e-1:this._layout.hitTest(t)}return this._layout.getLaneCount()-1},Ct.prototype.getPrevFirstIndexInView=function(){return null!=this._arg.prevFirstIndex?this._arg.prevFirstIndex:-1},Ct.prototype.getPrevLastIndexInView=function(){return null!=this._arg.prevLastIndex?this._arg.prevLastIndex:-1},Ct.prototype.update=function(t){if(!(!0===t||this._enabled&&this._active))return!1;if(this._isEventDispatching("indexChanged"))return!1;let e=this.getFirstIndexInView(),i=this.getLastIndexInView(),o=this._arg.prevFirstIndex!==e||this._arg.prevLastIndex!==i;return(t||o)&&(this._arg.firstIndex=e,this._arg.lastIndex=i,this._dispatch("indexChanged",this._arg),this._arg.prevFirstIndex=e,this._arg.prevLastIndex=i),o},Ct.prototype.isEnabled=function(){return this._enabled},Ct.prototype.enable=function(t){t=!1!==t,this._enabled!==t&&(this._enabled=t,this.validateVirtualization(),this.update(!0))},Ct.prototype.disable=function(t){this.enable(!1===t)},Ct.prototype.isActive=function(){return this._active},Ct.prototype.activate=function(t){t=!1!==t,this._active!==t&&(this._active=t,this.validateVirtualization(),this.update(!0))},Ct.prototype.deactivate=function(t){this.activate(!1===t)},Ct.prototype.getBufferSize=function(){return this._bufferSize},Ct.prototype.setContentLayout=function(t){this._layout!==t&&(this._layout=t,this.validateVirtualization())},Ct.prototype.setViewSize=function(t){t<0&&(t=0),this._viewSize!==t&&(this._viewSize=t,this.validateVirtualization())},Ct.prototype.setViewOffset=function(t){this._viewOffset=t>0?t:0,this.update()},Ct.prototype.setViewBounds=function(t,e){this._startOffsetCount=t>0?t:0,this._endOffsetCount=e>0?e:0,this.validateVirtualization()},Ct.prototype.setBufferSize=function(t){t<0&&(t=0),this._bufferSize!==t&&(this._bufferSize=t,this.validateVirtualization())},Ct.prototype.validateVirtualization=function(){this._virtualizable=!1,this._enabled&&this._active&&this._viewSize>0&&this._getContentSizeInBounds()>this._viewSize&&(this._virtualizable=!0)},Ct._proto=Ct.prototype;const St=Ct;let wt=function(){let t=this;t._vertical=!0,t._hostClassName="vscrollbar-host",wt.base(this,"constructor"),t._onScroll=t._onScroll.bind(t),t._addPaneAt(),t._element.classList.add("grid-vscroll"),t._trackContent.style.width="1px",t.disableMouseWheel(!1),t.listen("scroll",t._onScroll),t._addEvent("contentScrolled")};l.inherits(wt,M),wt.prototype.setScrollContent=function(t,e,i){this._clearAllPanes();let o,n=e.length;if(n<=0)return;let s=this._panes[0],r=this._paneSliders[0],l=0;for(;l<i;)o=e[l++],o.setParent(t);s.setParent(t);let h=n-this._footerCount;for(;l<h;)o=e[l++],o.setParent(r);for(;l<n;)o=e[l++],o.setParent(t);this.invalidateContent()},wt.prototype.setHeight=function(t){return this.setTrackSize(t,t),!0},wt.prototype.getHeight=function(){return this.getPaneSize()},wt.prototype.getScrollTop=function(){return this._getScrollValue()},wt.prototype.setScrollTop=function(t){this.update(),this._scrollTo(t)},wt.prototype.isEndOfVerticalScroll=function(){return this._isEndOfScroll()},wt.prototype.getContentHeight=function(){let t=this._paneSliders[0].getContent(!0),e=0;for(let i=t.length;--i>=0;)e+=t[i].offsetHeight;return e},wt.prototype.calculateContentSize=function(){return this.getContentHeight()},wt.prototype.getPane=function(){return this._panes[0]},wt.prototype._onScroll=function(t){this._dispatch("contentScrolled",t)},wt._proto=wt.prototype;const bt=wt;let vt=function(t){let e=this;e._onRestingPosition=e._onRestingPosition.bind(e),e._updateRowBounds=e._updateRowBounds.bind(e),e._element=document.createElement("div"),e._element.className="tr-vlg section",t||(t={}),t.horizontalScrollbar&&(e._hscrollbar=t.horizontalScrollbar),t.owner=this,e._grid=new N(t),e._grid.setParent(e._element),e._layoutY=new g,e._selectionList=new T,e._reverter=new E(e._onRestingPosition,200),e._addEvent("rowHighlighted"),e._addEvent("rowCountChanged"),e._addEvent("rowHeightChanged"),e._addEvent("rowAvailable")};l.inherits(vt,u),vt.prototype._index=-1,vt.prototype._rowOffset=0,vt.prototype._firstIndex=0,vt.prototype._grid,vt.prototype._layoutY,vt.prototype._selectionList=null,vt.prototype._reverter=null,vt.prototype._rowBounds=null,vt.prototype._rowBoundCache=null,vt.prototype._rowSelDirty=!1,vt.prototype._cellBoundPainter=null,vt.prototype._rowBoundTimer=0,vt.prototype._boundLayer=null,vt.prototype._hscrollbar=null,vt.prototype._session="A",vt.prototype._tempRowHeights=null,vt.prototype.getWidth=function(){return this.isVisible()?this._grid.getWidth():0},vt.prototype.getHeight=function(){return this.isVisible()?this._element.offsetHeight:0},vt.prototype.dispose=function(){this.setRowCount(0),this.unlistenAll(),this._hscrollbar=null,this._grid.dispose(),this._dispose(),this._reverter.dispose(),this._rowBounds=this._rowBoundCache=null,this._rowSelDirty=!1,this._rowBoundTimer&&(clearTimeout(this._rowBoundTimer),this._rowBoundTimer=0),this._cellBoundPainter&&this._cellBoundPainter.dispose()},vt.prototype.setWidth=function(t){return this._grid.setWidth(t)},vt.prototype.setHeight=function(t){return!1},vt.prototype.show=function(t){this._element.style.display=!1!==t?"":"none",this._dispatchRowHeightChangedEvent(0,this._layoutY.getLaneCount())},vt.prototype.hitTest=function(t,e){let i=[];return i.colIndex=this._grid.hitTestX(t),i.rowIndex=this._layoutY.hitTest(e),i},vt.prototype.hitTestX=function(t){return this._grid.hitTestX(t)},vt.prototype.hitTestY=function(t){return this._layoutY.hitTest(t)},vt.prototype.getDefaultColumnWidth=function(){return this._grid.getDefaultColumnWidth()},vt.prototype.setDefaultColumnWidth=function(t){this._grid.setDefaultColumnWidth(t)},vt.prototype.getDefaultRowHeight=function(){return this._layoutY.getDefaultLaneSize()},vt.prototype.setDefaultRowHeight=function(t){this._layoutY.getDefaultLaneSize()!==t&&(this._layoutY.setDefaultLaneSize(t),this._element.style.height=this._layoutY.getTrackSize()+"px",this._grid.setDefaultRowHeight(t),this._dispatchRowHeightChangedEvent(0,this._layoutY.getLaneCount()))},vt.prototype.getColumnWidth=function(t){return this._grid.getColumnWidth(t)},vt.prototype.setColumnWidth=function(t,e){return this._grid.setColumnWidth(t,e)},vt.prototype._setColumnWidth=function(t,e){return this._grid._setColumnWidth(t,e)},vt.prototype._updateColumnLayout=function(){this._grid._updateColumnLayout()},vt.prototype._startBindingSession=function(t){if(this._isBinding=t,!t){if(this._tempRowHeights){let t=this.getDefaultRowHeight(),e=!0,i=[];for(let e in this._tempRowHeights){let o=+e,n=this._layoutY.getLaneProperty(o,"sizeSession");n&&n!=this._session&&(this.setRowHeight(o,t),this._layoutY.setLaneProperty(o,"sizeSession",null),i.push(o))}let o=i.length;for(let t=0;t<o;t++)delete this._tempRowHeights[i[t]];if(o)for(let t in this._tempRowHeights){e=null!=t;break}e||(this._tempRowHeights=null)}this._session="A"===this._session?"B":"A"}},vt.prototype._getTempRowHeights=function(){return this._tempRowHeights},vt.prototype.getRowHeight=function(t){return this._layoutY.getLaneSize(t)},vt.prototype.setRowHeight=function(t,e){return this._isBinding&&e!=this.getDefaultRowHeight()&&(this._layoutY.setLaneProperty(t,"sizeSession",this._session),this._tempRowHeights||(this._tempRowHeights=[]),this._tempRowHeights[t]=!0),!!this._layoutY.setLaneSize(t,e)&&(this._grid.setRowHeight(t-this._firstIndex,e),this._element.style.height=this._layoutY.getTrackSize()+"px",this._requestUpdatingRowBounds(),this._dispatchRowHeightChangedEvent(t,t+1))},vt.prototype.isColumnVisible=function(t){return this._grid.isColumnVisible(t)},vt.prototype.hideColumn=function(t,e){return this._grid.hideColumn(t,e)},vt.prototype.isRowVisible=function(t){return this._grid.isRowVisible(t-this._firstIndex)},vt.prototype.hideRow=function(t,e){return this._grid.hideRow(t-this._firstIndex,e)},vt.prototype.getMinimumColumnWidth=function(t){return this._grid.getMinimumColumnWidth(t)},vt.prototype.setMinimumColumnWidth=function(t,e){return this._grid.setMinimumColumnWidth(t,e)},vt.prototype.getMinimumRowHeight=function(t){return this._layoutY.getMinimumLaneSize(t)},vt.prototype.setMinimumRowHeight=function(t,e){return!1},vt.prototype.getCellLeft=function(t){return this._grid.getCellLeft(t)},vt.prototype.getCellTop=function(t){return this._layoutY.getLaneStart(t)},vt.prototype.getCellWidth=function(t,e){return this._grid.getCellWidth(t,0)},vt.prototype.getCellHeight=function(t,e){return this._layoutY.getLaneSize(e)},vt.prototype.hasCellSpan=function(){return this._grid.hasCellSpan()},vt.prototype.getCellRowSpan=function(t,e){return this._grid.getCellRowSpan(t,e-this._firstIndex)},vt.prototype.setCellRowSpan=function(t,e,i){return this._grid.setCellRowSpan(t,e-this._firstIndex,i)},vt.prototype.getCellColSpan=function(t,e){return this._grid.getCellColSpan(t,e-this._firstIndex)},vt.prototype.setCellColSpan=function(t,e,i){return this._grid.setCellColSpan(t,e-this._firstIndex,i)},vt.prototype.clearCellSpans=function(){return this._grid.clearCellSpans()},vt.prototype.clearColumnSpans=function(t){return this._grid.clearColumnSpans(t)},vt.prototype.clearColumnCustomizations=function(){this._grid.clearColumnCustomizations()},vt.prototype.clearRowCustomizations=function(){this._layoutY.clearLaneCustomizations(),this._grid.clearRowCustomizations()},vt.prototype.getColumnScalability=function(t){return this._grid.getColumnScalability(t)},vt.prototype.setColumnScalability=function(t,e){return this._grid.setColumnScalability(t,e)},vt.prototype.getRowScalability=function(t){return this._layoutY.getLaneScalability(t)},vt.prototype.setRowScalability=function(t,e){return!1},vt.prototype.getCell=function(t,e,i){return this._grid.getCell(t,e-this._firstIndex,i)},vt.prototype.getCellContent=function(t,e){return this._grid.getCellContent(t,e-this._firstIndex)},vt.prototype.setCellContent=function(t,e,i){return this._grid.setCellContent(t,e-this._firstIndex,i)},vt.prototype.getColumnCount=function(){return this._grid.getColumnCount()},vt.prototype.setColumnCount=function(t){this._grid.setColumnCount(t)},vt.prototype.getRowCount=function(){return this._layoutY.getLaneCount()},vt.prototype.setRowCount=function(t,e){let i=this._layoutY.getLaneCount();i!==t&&(this._layoutY.setLaneCount(t),this._tempRowHeights&&(this._tempRowHeights.length=t),this._element.style.height=this._layoutY.getTrackSize()+"px",this._requestUpdatingRowBounds(),this._dispatch("rowCountChanged",{rowCount:t,prevCount:i,noBinding:e}))},vt.prototype.getVisibleRowCount=function(){return this.getRowCount()},vt.prototype.addRow=function(t){t<=0||(this._grid.getColumnCount()<=0?console.log("WARNING: Row cannot be added, unless at least one column is added"):this.setRowCount(this._layoutY.getLaneCount()+t))},vt.prototype.removeRow=function(t){if(t<=0)return;let e=this._layoutY.getLaneCount();t>e&&(t=e),this.setRowCount(e-t)},vt.prototype.setBorders=function(t,e,i,o){this._grid.setBorders(t,e,i,o)},vt.prototype.getColumnStyle=function(t,e){return this._grid.getColumnStyle(t,e)},vt.prototype.setColumnStyle=function(t,e,i){this._grid.setColumnStyle(t,e,i)},vt.prototype.enableColumnClass=function(t,e,i){this._grid.enableColumnClass(t,e,i)},vt.prototype.hasColumnClass=function(t,e){return this._grid.hasColumnClass(t,e)},vt.prototype.enableRowClass=function(t,e,i){this._grid.enableRowClass(t-this._firstIndex,e,i)},vt.prototype.setRowStyle=function(t,e,i,o){this._grid.setRowStyle(t-this._firstIndex,e,i,o)},vt.prototype.getContentWidth=function(){return this._grid.getContentWidth()},vt.prototype.getContentHeight=function(){return this._layoutY.getTrackSize()},vt.prototype.getCellsByRowIndex=function(t){return this._grid.getCellsByRowIndex(t-this._firstIndex)},vt.prototype.disableHorizontalGridLine=function(t){this._grid.disableHorizontalGridLine(t)},vt.prototype.disableVerticalGridLine=function(t){this._grid.disableVerticalGridLine(t)},vt.prototype.enableShading=function(t){this._grid.enableShading(t)},vt.prototype.setTransposedShading=function(t){this._grid.setTransposedShading(t)},vt.prototype.enableRowHighlighting=function(t){this._grid.enableRowHighlighting(t)},vt.prototype.getRowHighlight=function(){let t=this._grid.getRowHighlight();return t>=0&&(t+=this._firstIndex),t},vt.prototype.setRowHighlight=function(t){let e=this._grid.getRowHighlight();this._grid.setRowHighlight(t-this._firstIndex),this._hasListener("rowHighlighted")&&(t=this._grid.getRowHighlight(),this._dispatch("rowHighlighted",{prevRowIndex:e>=0?e+this._firstIndex:e,rowIndex:t>=0?t+this._firstIndex:t}))},vt.prototype.getSelectedRows=function(){return this.getSelectedRowCount()>0?this._selectionList.getAllSelections():null},vt.prototype.getSelectedRowCount=function(){return this._selectionList.getSelectionCount()},vt.prototype.isSelectedRow=function(t){return this._selectionList.getSelection(t)},vt.prototype.setSelectedRow=function(t,e){this._selectionList.setSelection(t,e);let i=this._selectionList.getSelection(t);this._grid.setSelectedRow(t-this._firstIndex,i),i&&(this._rowSelDirty=!0,this._initBoundLayer()),this._requestUpdatingRowBounds()},vt.prototype.selectSingleRow=function(t){this._selectionList.clearAllSelections(),this._grid.clearSelectedRows(),this.setSelectedRow(t)},vt.prototype.selectRowRange=function(t,e){this._selectionList.selectRange(t,e),this._updateRowSelection(),this._rowSelDirty=!0,this._initBoundLayer(),this._requestUpdatingRowBounds()},vt.prototype.clearSelectedRows=function(){let t=this._selectionList.clearAllSelections();return this._grid.clearSelectedRows(),this._requestUpdatingRowBounds(),t},vt.prototype.getFirstSelectedRow=function(){return this._selectionList.getFirstSelectedIndex()},vt.prototype.getLastSelectedRow=function(){return this._selectionList.getLastSelectedIndex()},vt.prototype.getRowAnchor=function(){return this._selectionList.getSelectionAnchor()},vt.prototype.setRowAnchor=function(t){this._selectionList.setSelectionAnchor(t)},vt.prototype.activateColumn=function(t,e){this._grid.activateColumn(t,e)},vt.prototype.activateRows=function(t,e,i){let o=this._layoutY.getLaneCount();t||(t=this._rowOffset),e||0===e||(e=t+o),(t-=this._rowOffset)<0&&(t=0),(e-=this._rowOffset)<0&&(e=0);let n=this._getInnerRowCount(),s=this._firstIndex,r=0;r=t-(1&t),r<0?r=0:r>o&&(r=o);let l=e+(1&e)-r;l+2===n&&(l=n),l<0?l=0:l+r>o&&(l=o-r),this._firstIndex=r;let h=r+l,u=this._layoutY.getLaneStart(r),a=this._grid.getElement();a&&(a.style.transform=u?"translateY("+u+"px)":"",a.style.top="",this._reverter.start()),this._grid._onEnterDocument();let p=!1;if(l!==n){if(this._grid.setRowCount(l),l>n){let t={};t.prevRowIndex=r+n,t.rowIndex=r+l,i&&(t.noDataUpdate=!0),this._dispatch("rowAvailable",t)}p=!0}if(i){if(!p){this._grid.clearSelectedRows();let t=s+n;r<s&&s<h&&t>=h?(this.moveRowsToTop(h-s),i[0]=r,i[1]=s):s<r&&r<t&&h>=t?(this.moveRowsToTop(r-s),i[0]=t,i[1]=h):r===s&&h===t?(i[0]=0,i[1]=0):p=!0}p&&(i[0]=r,i[1]=h)}this._layoutY.isHomogeneous()||this._grid._updateRowHeights(this._layoutY,r),this._updateRowSelection()},vt.prototype.moveRowsToTop=function(t){this._grid.moveRowsToTop(t)},vt.prototype.getFirstIndexInView=function(){return this._firstIndex},vt.prototype.getLastIndexInView=function(){let t=this._firstIndex+this._getInnerRowCount()-1,e=this._grid._getContext().getDataSource(),i=e?e.getRowCount()-1:-1;return t>i?i:t},vt.prototype.isInCurrentView=function(t){return this._firstIndex<=t&&t<this._firstIndex+this._getInnerRowCount()},vt.prototype.getFrozenLayout=function(){return this._grid.getFrozenLayout()},vt.prototype.setFrozenLayout=function(t){this._grid.setFrozenLayout(t)},vt.prototype.getColumn=function(t){return this._grid.getColumn(t)},vt.prototype.insertColumn=function(t,e){return this._grid.insertColumn(t,e)},vt.prototype.removeColumnAt=function(t){return this._grid.removeColumnAt(t)},vt.prototype.moveColumn=function(t,e){this._grid.moveColumn(t,e)},vt.prototype.enableRowVirtualization=function(t){},vt.prototype.enableColumnVirtualization=function(t){this._grid.enableColumnVirtualization(t)},vt.prototype.getColumnIndex=function(t){return this._grid.getColumnIndex(t)},vt.prototype.getCellIndex=function(t,e){let i=this._grid.getCellIndex(t,e);return i<0?-1:i+this._firstIndex},vt.prototype.getIndex=function(){return this._index},vt.prototype.setIndex=function(t){this._index=t},vt.prototype.setRowOffset=function(t){this._rowOffset=t},vt.prototype.getRowOffset=function(){return this._rowOffset},vt.prototype.updateLayout=function(){this._grid.updateLayout()},vt.prototype.stretchCell=function(t,e,i,o){let n=this._grid.stretchCell(t,null!=e?e-this._firstIndex:null,i,o);if(n){let t=n.getElement();0===e?t.classList.add("top"):t.classList.remove("top")}return n},vt.prototype.unstretchCell=function(t,e){return this._grid.unstretchCell(t,null!=e?e-this._firstIndex:null)},vt.prototype.unstretchAllCells=function(){this._grid.unstretchAllCells()},vt.prototype.getStretchedCell=function(t,e){return this._grid.getStretchedCell(t,null!=e?e-this._firstIndex:null)},vt.prototype.getStretchedCells=function(){return this._grid.getStretchedCells()},vt.prototype.updateStretchedCells=function(){return this._grid.updateStretchedCells()},vt.prototype.getColumnHost=function(){return this._grid.getElement()},vt.prototype.setHidingMethod=function(t){this._grid.setHidingMethod(t)},vt.prototype.getHidingMethod=function(){return this._grid.getHidingMethod()},vt.prototype.setColumnVisibility=function(t,e,i){return this._grid.setColumnVisibility(t,e,i)},vt.prototype.getRowLayout=function(){return this._layoutY},vt.prototype.reserveRightSpace=function(t){return this._grid.reserveRightSpace(t)},vt.prototype.getReservedSpace=function(){return this._grid.getReservedSpace()},vt.prototype.getComputedStyle=function(){return this._grid.getComputedStyle()},vt.prototype.isColumnActive=function(t){return this._grid.isColumnActive(t)},vt.prototype.setRowAttributes=function(t,e){return this._grid.setRowAttributes(t,e)},vt.prototype.getContextRow=function(t){return this._grid.getContextRow(t-this._firstIndex)},vt.prototype.selectColumn=function(t,e){this._grid.selectColumn(t,e)},vt.prototype.isSelectedColumn=function(t){return this._grid.isSelectedColumn(t)},vt.prototype.selectCell=function(t,e,i){this._grid.selectCell(t,e-this._firstIndex,i)},vt.prototype.setCellBounds=function(t,e,i,o){let n=this._initBoundLayer(),s=this._cellBoundPainter;s||(s=this._cellBoundPainter=new B({boundLayer:n,layoutX:this.getHorizontalLayout(),layoutY:this._layoutY,hscrollbar:this._hscrollbar,calculateColumnBounds:this.calculateColumnBounds.bind(this)}));let r=this.getColumnCount();s.setCellBounds(t,e,i,o,r)},vt.prototype.getHorizontalLayout=function(){return this._grid.getHorizontalLayout()},vt.prototype.calculateColumnBounds=function(t,e,i,o){this._grid.calculateColumnBounds(t,e,i,o)},vt.prototype.updateColumnBounds=function(t,e,i){this._grid.updateColumnBounds(t,e,i),this._updateRowBounds()},vt.prototype.updateColumnSeparators=function(){this._grid.updateColumnSeparators()},vt.prototype._initBoundLayer=function(){let t=this._boundLayer;return t||(t=this._boundLayer=document.createElement("div"),t.className="cover-layer",this._element.appendChild(t)),t},vt.prototype._requestUpdatingRowBounds=function(){this._rowBoundTimer||(this._rowBoundTimer=setTimeout(this._updateRowBounds,10))},vt.prototype._updateRowBounds=function(){this._rowBoundTimer=0;let t=this._cellBoundPainter;if(t&&t.updateCellBounds(),!this._rowSelDirty)return;let e=this._rowBounds,i=this._rowBoundCache;e||(e=this._rowBounds=[]),i||(i=this._rowBoundCache=[]);let o=this._selectionList,n=this._layoutY.getLaneCount();o.deselectFrom(n);let s,r=o.getConnectedRanges(),l=r.length,h=null,u=null,a=e.length;for(s=l;s<a;++s)u=e[s],h=u.parentNode,h&&h.removeChild(u);if(e.length=a=l,!l)return void(o.getSelectionCount()||(this._rowSelDirty=!1));let p=0,_=0,d=0,c=!1;this._hscrollbar&&(p=this._hscrollbar.getScrollLeft(),_=this._hscrollbar.getPinnedLeftColumnCount(),d=this._hscrollbar.getPinnedRightColumnCount(),c=this._hscrollbar.isEndOfHorizontalScroll());let g=!_&&p>0,f=!d&&!c,y=this._grid._getViewSize();for(s=0;s<l;++s){let t=r[s],o=t[0],n=t[1],l=this._layoutY.getLaneStart(o),h=this._layoutY.getLaneEnd(n);u=i[s],u||(u=i[s]=document.createElement("div"),u.className="selection-bound"),u.style.top=l+"px",u.style.height=h-l+"px",u.style.width=y+"px",u.classList.toggle("no-left-bound",g),u.classList.toggle("no-right-bound",f),this._boundLayer&&(e[s]||(e[s]=u,this._boundLayer.appendChild(u)))}},vt.prototype._getInnerRowCount=function(){return this._grid.getRowCount()},vt.prototype._updateRowSelection=function(){this._grid.clearSelectedRows();let t,e=this._selectionList,i=e.getSelectionCount();if(i<=0)return;let o=this._firstIndex,n=o+this._getInnerRowCount();if(1===i)t=e.getFirstSelectedIndex(),o<=t&&t<n&&this._grid.setSelectedRow(t-o,!0);else if(i>=n-o)for(t=o;t<n;++t)e.getSelection(t)&&this._grid.setSelectedRow(t-o,!0);else{let s=e.getAllSelections();for(let e=0;e<i;++e)t=s[e],o<=t&&t<n&&this._grid.setSelectedRow(t-o,!0)}},vt.prototype._dispatchRowHeightChangedEvent=function(t,e){if(t>=e)return!1;let i={};return i.rowIndex=t,i.changeLength=e-t,this._dispatch("rowHeightChanged",i),!0},vt.prototype._onRestingPosition=function(){let t=this._grid.getElement();if(t){let e=this._layoutY.getLaneStart(this._firstIndex);t.style.transform="",t.style.top=e?e+"px":""}},vt.prototype._updateRightSpaceStyle=function(){this._grid._updateRightSpaceStyle()},vt.prototype._updateLayers=function(){this._grid._updateLayers()},vt.prototype._setContext=function(t){this._grid._setContext(t)},vt.prototype._getContext=function(){return this._grid._getContext()},vt._proto=vt.prototype;const Rt=vt;let It=function(t,e){return t-e},xt=function(){let t=document.createElement("input"),e=t.style;return e.position="absolute",e.width=e.height=e.padding=e.border="0",t.value="0",t.role="grid",t.readOnly=!0,t},Lt=function(t){if(t){if(!t.getRootNode)return document.activeElement;{let e=t.getRootNode();if(e&&e!==t)return e.activeElement||null}}return null},Dt=function(t){Dt._sectionType||(Dt._sectionType={},Dt._sectionType.title=!0,Dt._sectionType.header=!0,Dt._sectionType.content=!0,Dt._sectionType.footer=!0);let i=this;if(i.getColumnId=i.getColumnId.bind(i),i.getColumnIndex=i.getColumnIndex.bind(i),i._onMouseMove=i._onMouseMove.bind(i),i._onRowHightlighted=i._onRowHightlighted.bind(i),i._onGridClicked=i._onGridClicked.bind(i),i._onKeyDown=i._onKeyDown.bind(i),i._onWindowResize=i._onWindowResize.bind(i),i._onSectionDataChanged=i._onSectionDataChanged.bind(i),i._onRowCountChanged=i._onRowCountChanged.bind(i),i._onRowHeightChanged=i._onRowHeightChanged.bind(i),i._onRowAvailable=i._onRowAvailable.bind(i),i._onVScroll=i._onVScroll.bind(i),i._onHScroll=i._onHScroll.bind(i),i._onSyncVScroll=i._onSyncVScroll.bind(i),i._onSyncHScroll=i._onSyncHScroll.bind(i),i.updateLayout=i.updateLayout.bind(i),i._onRowRefresh=i._onRowRefresh.bind(i),i._onVScrollEnabled=i._onVScrollEnabled.bind(i),i._onVScrollDisabled=i._onVScrollDisabled.bind(i),i._onRowInViewChanged=i._onRowInViewChanged.bind(i),i._onColInViewChanged=i._onColInViewChanged.bind(i),i._updateVScrollbar=i._updateVScrollbar.bind(i),i.updateColumnBounds=i.updateColumnBounds.bind(i),i._dispatchColumnPositionChanged=i._dispatchColumnPositionChanged.bind(i),i._dispatchRowPositionChanged=i._dispatchRowPositionChanged.bind(i),i._requestScrollbarUpdate=i._requestScrollbarUpdate.bind(i),t)for(let i=t.childNodes.length;--i>=0;)e.isElement(t.childNodes[i])||t.removeChild(t.childNodes[i]);i._element=t||document.createElement("div"),i._element.classList.add("tr-grid"),i._layoutX=new g,i._layoutY=new g,i._layoutX.setDefaultLaneSize(100),i._layoutY.setDefaultLaneSize(32),i._settings=[],i._plugins={},i._columnDefs=[],i._sectionStarts=[],i._rowHeightException="title",i._rowVirtualizer=new St(i._layoutY),i._rowVirtualizer.deactivate(),i._rowVirtualizer.setViewSize(360),i._colVirtualizer=new St(i._layoutX),i._colVirtualizer.enable(!1),i._colVirtualizer.deactivate(),i._colVirtualizer.setViewSize(400),i._vscrollbar=new bt,i._vscrollbar.disable(),i._vscrollbar.setParent(i.getParent()||i.getElement()),i._vscrollbar.listen("scroll",i._onVScroll),i._vscrollbar.listen("layoutChanged",i._onVScroll),i._vscrollbar.listen("activated",i.updateLayout),i._vscrollbar.listen("deactivated",i.updateLayout),i._vscrollbar.listen("thicknessChanged",i.updateLayout),i._vscrollbar.listen("enabled",i._onVScrollEnabled),i._vscrollbar.listen("disabled",i._onVScrollDisabled),i._hscrollbar=new F,i._hscrollbar.disable(),i._hscrollbar.setParent(i.getParent()||i.getElement()),i._hscrollbar.listen("scroll",i._onHScroll),i._hscrollbar.listen("layoutChanged",i._onHScroll),i._hscrollbar.listen("activated",i.updateLayout),i._hscrollbar.listen("deactivated",i.updateLayout),i._hscrollbar.setOtherScrollbar(i._vscrollbar),i._vscrollbar.setOtherScrollbar(i._hscrollbar),i._element.addEventListener("keydown",i._onKeyDown),e.isMobile||e.isTouchDevice?i._element.addEventListener("touchmove",i._onMouseMove,!1):i._element.addEventListener("mousemove",i._onMouseMove,!1),e.isSafari&&i._element.addEventListener("click",i._onGridClicked),window.addEventListener("resize",i._onWindowResize,!1),i._rowVirtualizer.listen("indexChanged",i._onRowInViewChanged),i._colVirtualizer.listen("indexChanged",i._onColInViewChanged),i._rowHeightConflator=new ft(i._onRowHeightChanged,50),i._vScrollbarConflator=new ft(i._updateVScrollbar,200),i._columnBoundConflator=new ft(i.updateColumnBounds,10),i._columnPositionConflator=new ft(i._dispatchColumnPositionChanged,10),i._rowPositionConflator=new ft(i._dispatchRowPositionChanged,10),i._firstHiddenInput=xt(),i._firstHiddenInput.className="first-input",i._lastHiddenInput=xt(),i._lastHiddenInput.className="last-input",i._element.insertBefore(i._firstHiddenInput,i._element.firstChild),i._element.appendChild(i._lastHiddenInput),i._addEvents("sectionAdded","columnAdded","columnRemoved","columnMoved","columnVisibilityChanged","columnAlignmentChanged","widthChanged","dataSourceChanged","postDataSourceChanged","preSectionRender","postSectionRender","beforeContentBinding","preSectionDataBinding","postSectionDataBinding","firstRendered","afterContentBinding","rowExpansionBinding","rowHighlighted","preForcedUpdate","rowAdded","rowRemoved","columnPositionChanged","rowPositionChanged","beforeColumnBoundUpdate","beforeBatchOperation","afterBatchOperation","pinningChanged","tabNavigation");let o=Dt.map;o||(o={},Dt.map=o),i._element._control=i;let n=i._element.id||i._element.name;n&&!o[n]||(n="_grid"+Dt._runningGridId),i._id=n,o[n]=i,Dt._runningGridId++,Object.defineProperty(i,"zoomFactor",{set:function(t){!t||t<0||this._zoomFactor!==t&&(this._zoomFactor=t,i._updateLayout())},get:function(){return this._zoomFactor}})};l.inherits(Dt,u),Dt.SectionReference,Dt.MouseInfo,Dt.BatchInfo,Dt.CellReference,Dt.ColumnOptions,Dt._runningGridId=0,Dt._runningColumnId=0,Dt._sectionType,Dt.prototype._plugins,Dt.prototype._dataSource=null,Dt.prototype._layoutX,Dt.prototype._layoutY,Dt.prototype._vscrollbar,Dt.prototype._hscrollbar,Dt.prototype._tempFrozenSectionRef="",Dt.prototype._startVScrollbarIndex=-1,Dt.prototype._hScrollbarEnabled=!0,Dt.prototype._pinnedLeftColumnCount=0,Dt.prototype._pinnedRightColumnCount=0,Dt.prototype._frozenFooterCount=0,Dt.prototype._fixFrozenTopSections=!1,Dt.prototype._fixFrozenBottomSection=!1,Dt.prototype._sectionStarts,Dt.prototype._settings,Dt.prototype._firstSettings,Dt.prototype._lastSettings,Dt.prototype._fitContentWidth=!1,Dt.prototype._columnDefs,Dt.prototype._rowVirtualizer,Dt.prototype._colVirtualizer,Dt.prototype._autoSetDataSource=!0,Dt.prototype._renderingHandler=null,Dt.prototype._dataBindingHandler=null,Dt.prototype._frozenLayout=!1,Dt.prototype._noBinding=!1,Dt.prototype._rowHeightSync=!0,Dt.prototype._rowHighlighting=!1,Dt.prototype._dispatchingDataChanged=!1,Dt.prototype._rowHeightException="",Dt.prototype._rowScrollingStep=0,Dt.prototype._zoomFactor=1,Dt.prototype._reservedSpace=0,Dt.prototype._hidingMethod="",Dt.prototype._rowHeightConflator=null,Dt.prototype._vScrollbarConflator=null,Dt.prototype._columnBoundConflator=null,Dt.prototype._rowRefreshTimer=0,Dt.prototype._layoutUpdating=!1,Dt.prototype._firstHiddenInput,Dt.prototype._lastHiddenInput,Dt.prototype._bottomPadding=6,Dt.prototype._bottomPaddingSect=null,Dt.prototype._preserveProportion=!1,Dt.prototype._preserveGridSize=!1,Dt.prototype._rowHeightTimerId=0,Dt.prototype._groupDefs=null,Dt.prototype._batches=null,Dt.prototype._firstRendered=!1,Dt.prototype._hasPendingRowChange=!1,Dt.getVersion=function(){return"5.2.3"},Dt.prototype.dispose=function(){let t=this._id,e=Dt.map;if(!e[t])return void console.log("WARNING: Core grid is disposed twice");e[t]=null,this._disposed=!0,this._rowRefreshTimer&&(clearTimeout(this._rowRefreshTimer),this._rowRefreshTimer=0),this.unlistenAll(),window.removeEventListener("resize",this._onWindowResize,!1);for(let t=this._columnDefs.length;--t>=0;){let e=this._getColumnDef(t);e.renderingHandler=e.dataBindingHandler=null}for(let t in this._plugins){let e=this._plugins[t];e.unload&&e.unload(this)}this.removeAllSections();let i=this._vscrollbar._mainScrollbar;i&&(i.unlisten("scroll",this._onSyncVScroll),this._vscrollbar._mainScrollbar=null),i=this._hscrollbar._mainScrollbar,i&&(i.unlisten("scroll",this._onSyncHScroll),this._hscrollbar._mainScrollbar=null),this._vscrollbar.dispose(),this._hscrollbar.dispose(),this._rowHeightConflator.dispose(),this._vScrollbarConflator.dispose(),this._columnBoundConflator.dispose(),this._columnPositionConflator.dispose(),this._rowPositionConflator.dispose(),this._layoutX.dispose(),this._layoutY.dispose();let o=this._element;o&&(o._control&&delete o._control,o.removeChild(this._firstHiddenInput),o.removeChild(this._lastHiddenInput)),this._dispose(),this._columnDefs.length=0,delete this._plugins},Dt.prototype.isDisposed=function(){return this._disposed},Dt.prototype.setParent=function(t,e){this._setParent(t,e),this._onParentChange()},Dt.prototype.insertBefore=function(t){this._insertBefore(t),this._onParentChange()},Dt.prototype._onParentChange=function(){let t=this.getParent()||this.getElement();this._vscrollbar._mainScrollbar||this._vscrollbar.setParent(t),this._hscrollbar.setParent(t),this._updateLayout()},Dt.prototype.getConfigObject=function(t){let e=t||{},i=this.getColumnCount();e.columns||(e.columns=[]);for(let t=0;t<i;t++){let i=e.columns[t];i||(i=e.columns[t]={});let o=this._getColumnDef(t);o.userId&&(i.id=o.userId),o.field&&(i.field=o.field),o.styles&&(i.styles=o.styles),o.stationary&&(i.stationary=o.stationary),o.leftPinned&&(i.leftPinned=o.leftPinned),o.rightPinned&&(i.rightPinned=o.rightPinned),o.backgroundColor&&(i.backgroundColor=o.backgroundColor)}e.rowVirtualization=this.isRowVirtualizationEnabled(),e.columnVirtualization=this.isColumnVirtualizationEnabled(),e.rowHighlighting=this._rowHighlighting,this._fixFrozenTopSections&&(e.topFreezingCount=this._startVScrollbarIndex>=0&&this._startVScrollbarIndex+1),this._fixFrozenBottomSection&&(e.bottomFreezingCount=this._frozenFooterCount),this._rowScrollingStep&&(e.stepScroll=1===this._rowScrollingStep||this._rowScrollingStep);let o=this._vscrollbar.getAutoHide();!0!==o&&(e.autoHideScrollbar=o);let n=this._vscrollbar.getMouseWheelSpeed();n&&(e.linearWheelScrolling=n),this.hasClass("no-borders")&&(e.borders=!1),this.hasClass("no-gridlines")&&(e.gridlines=!1),this.hasClass("no-vertical-grid-line")&&(e.verticalLines=!1),this.hasClass("no-horizontal-grid-line")&&(e.horizontalLines=!1),this.hasClass("no-content-vertical-line")&&(e.contentVerticalLines=!1),this._bottomPaddingSect&&(e.contentBottomPadding=this._bottomPadding),this._reservedSpace>0&&(e.contentRightPadding=this._reservedSpace);let s=this.getDataConflationRate();s&&(e.dataConflationRate=s);for(let t in this._plugins){let i=this._plugins[t];"function"==typeof i.getConfigObject&&i.getConfigObject(e)}return e},Dt.prototype.fillParentWidth=function(t){if(this._fitContentWidth)return!1;if(this._layoutX.isFixedSize())return!1;let e=this._element,i=(0|e.getBoundingClientRect().width)-e.clientLeft;return null!==this._layoutX.setTrackSize(i-this._reservedSpace)},Dt.prototype.show=function(t){this._element.style.display=!1!==t?"":"none",!1!==t&&this.updateLayout()},Dt.prototype.getContentWidth=function(){return this._layoutX.getTrackSize()},Dt.prototype.getSectionCount=function(){return this._settings.length},Dt.prototype._updateFrozenTopSections=function(){if(!this._fixFrozenTopSections){let t=this._getTopSectionCount();this._freezeTopSectionAt(t-1)}},Dt.prototype._updateFrozenBottomSections=function(){if(!this._fixFrozenBottomSection){let t=this._getBottomSectionCount();this._setFrozenFooter(t)}},Dt.prototype._getTopSectionCount=function(){let t=this._settings,e=t.length,i=0;for(let o=0;o<e;o++){let e=t[o].getType();if("header"!==e&&"title"!==e)break;i++}return i},Dt.prototype._getBottomSectionCount=function(){let t=this._settings,e=0;for(let i=t.length-1;i>=0&&"footer"===t[i].getType();i--)e++;return e},Dt.prototype.addSection=function(t,e){return this.addSectionAt(this.getSectionCount(),t,e)},Dt.prototype.addSectionAt=function(t,e,i){let o=this._settings.length;t<0&&(t=0),t>o&&(t=o);let n=this._toSectionType(e),s="bottomPadding"===i,r=this._newSection(s?"footer":n,i);if(!r)return null;let l=r.getSection();if(s&&(r.setAutoSyncRowCount(!1),this._bottomPaddingSect=l),t>=o?(this._putToLast(l),this._settings.push(r)):(this._settings.splice(t,0,r),l.insertBefore(this._settings[t+1].getSection())),this._updateSectionIndices(t),this._autoSetDataSource&&r.setDataSource(this._dataSource),n=r.getType(),"footer"===n?this._updateFrozenBottomSections():"header"!==n&&"title"!==n||this._updateFrozenTopSections(),this._onColumnCountChanged(),this._onSectionCountChanged(!0),this._colVirtualizer.isEnabled()){let t=this._getColActivationList(),e=this.getColumnCount();r.activateColumns(t,0,e-1)}if(this._hasListener("sectionAdded")){let t=r.extendEventArg();this._dispatch("sectionAdded",t)}return l},Dt.prototype.removeSection=function(t){let e=this.getSection(t);return null!==e?this.removeSectionAt(e.getIndex()):null},Dt.prototype.removeSectionAt=function(t){let e=this._settings.length;if(t>=0&&t<e){let e=this._settings[t],i=e.getIndex(),o=e.getSection(),n=e.getType();return o.setRowCount(0),this._settings.splice(t,1),this._updateSectionIndices(i),"footer"===n?(this._updateFrozenBottomSections(),this._onColumnCountChanged()):"header"!==n&&"title"!==n||this._updateFrozenTopSections(),this._onSectionCountChanged(),e.dispose(),o}return null},Dt.prototype.removeLastSection=function(){return this.removeSectionAt(this._settings.length-1)},Dt.prototype.removeAllSections=function(){let t=this._settings.length;for(let e=0;e<t;++e)this._settings[e].dispose();this._bottomPaddingSect=null,this._firstSettings=this._lastSettings=null,this._settings.length=0,this._updateSectionIndices(0),this._onSectionCountChanged()},Dt.prototype.setBottomPaddingSection=function(t){let e=this._bottomPaddingSect;t?("number"==typeof t&&(this._bottomPadding=t),e||(e=this.addSection("content","bottomPadding")),e&&(e.setDefaultRowHeight(this._bottomPadding),e.getRowCount()||e.addRow(1))):e&&this.removeSection(e)},Dt.prototype._updatePaddingBottomSect=function(){let t=this._bottomPaddingSect;if(t){let e=this._settings.length-1;if(e>0){let o=this._settings[e];if(o.getSection()!==t){let n=null;for(let i=e;--i>=0;){let e=this._settings[i];if(e.getSection()===t){n=e;break}}if(i>=0)return this._putToLast(t),this._settings.splice(i,1),this._settings.push(n),n.setType("footer"===o.getType()?"footer":"content"),!0;this._bottomPaddingSect=null}else{let t=this._settings[e-1];t&&o.setType("footer"===t.getType()?"footer":"content")}}}return!1},Dt.prototype.moveSection=function(t,i){let o=this.getSectionCount();if(t<0)t=0;else if(t>=o)return;if(i<0?i=0:i>=o&&(i=o-1),t===i)return;let n=this._settings[t],s=this._settings[i];e.moveArrayItem(this._settings,t,i),s?n.getSection().insertBefore(s.getSection()):this._putToLast(n.getSection()),this._updateSectionIndices(t<=i?t:i),this._syncRowHeights(),this._onSectionCountChanged(),this._frozenLayout||this._rowVirtualizer.update(!0)},Dt.prototype.getSection=function(t){let e=this.getSectionSettings(t);return null!==e?e.getSection():null},Dt.prototype.getSectionSettings=function(t){if(e.isString(t)){if(Dt._sectionType[t])return this._getNextSection(1,null,t);for(let e=this._settings.length;--e>=0;)if(this._settings[e].getId()===t)return this._settings[e]}else if(null!=t){let i=-1;if(null!=t.getIndex?i=t.getIndex():e.isNumber(t)&&(i=t),i>=0&&i<this._settings.length)return this._settings[i]}return null},Dt.prototype.getAllSections=function(t){if(null==t)return this._getAllSections();let e=this.getAllSectionSettings(t),i=e;for(let t=i.length;--t>=0;)i[t]=e[t].getSection();return i},Dt.prototype.getAllSectionSettings=function(t){if(!t)return this._settings;let e=this._settings.length,i=[];t=this._toSectionType(t);for(let o=0;o<e;++o){let e=this._settings[o];t===e.getType()&&i.push(e)}return i},Dt.prototype.getSectionIndex=function(t){if(e.isNumber(t))return t;if(t instanceof MouseEvent){let i=e.getRelativePosition(t,this._element),o={};return this._hitTestY(i.y,o),o.sectionIndex}let i=this.getSection(t);return null==i?-1:i.getIndex()},Dt.prototype.getSectionTop=function(t){let e=this.getSection(t);if(null==e)return 0;let i=this._layoutY.getLaneStart(e.getRowOffset());return this._startVScrollbarIndex>=0&&e.getIndex()>=this._startVScrollbarIndex&&(i-=this._vscrollbar.getScrollTop()),i},Dt.prototype.getPreviousSection=function(t,e){null==t&&(t=this._settings.length);let i=this._getNextSection(-1,t,e);return null!==i?i.getSection():null},Dt.prototype.getNextSection=function(t,e){let i=this._getNextSection(1,t,e);return null!==i?i.getSection():null},Dt.prototype.getLastSection=function(){return this.getSection(this._settings.length-1)},Dt.prototype.getCell=function(t,e,i,o){let n=this.getSection(t);return n?n.getCell(e,i,o):null},Dt.prototype.getCellInfo=function(t){if(!t)return null;let e=t.colIndex,i=t.rowIndex,o=t.sectionName,n=null;if(null==e||null==i)n=this.getRelativePosition(t),n.hit||(n=null);else{o||(o="content");let t=this.getSectionSettings(o);if(t){let o=t.getSection();e>=0&&e<o.getColumnCount()&&i>=0&&i<o.getRowCount()&&(n={colIndex:e,rowIndex:i},t.extendEventArg(n))}}return n},Dt.prototype.getNextCellInRow=function(t,e){return this._getNextCellInRow(t,null!=e?e:1)},Dt.prototype.getPrevCellInRow=function(t,e){return this._getNextCellInRow(t,null!=e?-e:-1)},Dt.prototype._getNextCellInRow=function(t,e){let i=this.getCellInfo(t);if(i){let t=i.colIndex+e,o=i.rowIndex,n=i.section;i.colIndex=t,i.cell=n.getCell(t,o)}return i},Dt.prototype.getNextCell=function(t){let e=this.getNextCellInRow(t);if(e&&!e.cell){let t=e.section,i=e.colIndex=0,o=e.rowIndex;e.rowIndex=++o,e.cell=t.getCell(i,o)}return e},Dt.prototype.getPrevCell=function(t){let e=this.getPrevCellInRow(t);if(e&&!e.cell){let t=e.section,i=e.colIndex=t.getColumnCount()-1,o=e.rowIndex;e.rowIndex=--o,e.cell=t.getCell(i,o)}return e},Dt.prototype.getColumnCount=function(){return this._layoutX.getLaneCount()},Dt.prototype.setColumnCount=function(t){let e=this._layoutX.getLaneCount();if(t>=e){this._layoutX.setLaneCount(t);for(let e=this._settings.length;--e>=0;)this._settings[e].getSection().setColumnCount(t);this._onColumnCountChanged(),this._syncLayoutToColumns(e,t),this._dispatchColumnAddedEvent(e,t-e,!1)}else this._removeColumn(e-t)},Dt.prototype.insertColumn=function(t,e){let i=this.getColumnCount();t<i||(t=i),this._layoutX.insertLane(t);for(let e=this._settings.length;--e>=0;)this._settings[e].getSection().insertColumn(t);this._columnDefs.splice(t,0,null),this._deserializeColumn(t,e),this._onColumnCountChanged(),this._syncLayoutToColumns(t,t+1),this._dispatchColumnAddedEvent(t,1,t<i,e)},Dt.prototype.insertColumns=function(t,e){let i=this.getColumnCount();t<i||(t=i);let o,n=0;if(Array.isArray(e)){if(n=e.length,1===n)return void this.insertColumn(t,e[0]);o=e}else{if("number"!=typeof e)return void this.insertColumn(t,e);if(n=e,1===n)return void this.insertColumn(t,null)}if(n<=0)return;let s=this.freezeLayout(),r=[t,0].concat(new Array(n));Array.prototype.splice.apply(this._columnDefs,r);for(let e=0;e<n;e++){let i=t+e;this._layoutX.insertLane(i);for(let t=this._settings.length;--t>=0;)this._settings[t].getSection().insertColumn(i);let n=o&&o[e];this._deserializeColumn(i,n)}this._dispatchColumnAddedEvent(t,n,t<i,o),this.freezeLayout(s)},Dt.prototype.removeColumnAt=function(t){let e=this.getColumnCount();if(t<0||t>=e)return null;let i=-1;this._colVirtualizer.isVirtualizable()&&(i=this._colVirtualizer.getLastIndexInView());let o=this._layoutX.removeLaneAt(t),n=this._settings.length;for(let e=0;e<n;++e)this._settings[e].getSection().removeColumnAt(t);let s=this._pinnedLeftColumnCount,r=this._pinnedRightColumnCount,l=this._columnDefs.splice(t,1)[0];if(this._onColumnCountChanged(),(t<s||t>=e-r)&&this._updateScrollbarWidth(!0,!0),this._syncLayoutToColumns(t,e-1,!0),l||(l={}),l.layout=o,this._hasListener("columnRemoved")){let e={atTheMiddle:!0};e.colIndex=t,e.columns="deprecated",e.columnData=l.columnData,e.colId=l.id||"",this._dispatchColumnEvent("columnRemoved",e)}return t<=i&&i===this._colVirtualizer.getLastIndexInView()&&this._colVirtualizer.update(),l},Dt.prototype.removeAllColumns=function(){this.getColumnCount()>0&&(this._pinnedLeftColumnCount=0,this._pinnedRightColumnCount=0,this.setColumnCount(0))},Dt.prototype.getStationaryColumnIndex=function(){for(let t=this.getColumnCount()-1;t>=0;t--)if(this._getColumnDef(t).stationary)return t;return-1},Dt.prototype.isColumnMoveAllowed=function(t,e){if(Array.isArray(t)||(t=[t]),0===t.length||null==e)return!1;let i=this.getStationaryColumnIndex();if(i>-1){if(e<=i)return!1;for(let e=0;e<t.length;e++)if(t[e]<=i)return!1}return!0},Dt.prototype.isColumnMovable=function(t){let e=this.getStationaryColumnIndex();return!(e>-1&&t<=e)},Dt.prototype.moveColumn=function(t,e){if("number"==typeof t)return this._moveColumn(t,e);if(!Array.isArray(t))return!1;let i,o=t.length,n=[],s=0,r=this.getColumnCount(),l={};for(i=0;i<o;++i)s=t[i],s>=0&&s<r&&null==l[s]&&(l[s]=1,n.push(s));if(e<0?e=0:e>=r&&(e=r-1),o=n.length,!o)return!1;if(1===o)return this._moveColumn(n[0],e);if(!this.isColumnMoveAllowed(n,e))return!1;if(n.sort(It),l[e]){let t=!0;for(s=n[0],i=1;i<o;++i)if(++s!==n[i]){t=!1;break}if(t)return!1}let h,u,a=this.freezeLayout(!0),p=0;for(i=0;i<o;++i)h=n[i],h>=e&&(u=e+p,this._moveColumn(h,u),++p);let _=o-p;for(u=p?e-1:e,i=0;i<_;++i)h=n[i]-i,this._moveColumn(h,u);return this.freezeLayout(a),!0},Dt.prototype._moveColumn=function(t,i){let o=this.getColumnCount();if(t<0?t=0:t>=o&&(t=o-1),i<0?i=0:i>=o&&(i=o-1),t===i)return!1;if(!this.isColumnMoveAllowed(t,i))return!1;let n=-1;this._colVirtualizer.isVirtualizable()&&(n=this._colVirtualizer.getLastIndexInView());let s=this.getColumnId(t);this._layoutX.moveLane(t,i);let r=this._settings.length;for(let e=0;e<r;++e)this._settings[e].getSection().moveColumn(t,i);let l=this._columnDefs[t],h=this._countPinnedLeftColumns(),u=this._countPinnedRightColumns();if(e.moveArrayItem(this._columnDefs,t,i),this._hScrollbarEnabled&&(t<h?i>=o-u?this.freezeColumn(h-2,u+1):i>=h&&this.freezeColumn(h-2,u):l.rightPinned?i<h?this.freezeColumn(h,u-1):i<o-u&&this.freezeColumn(h-1,u-1):i<h?this.freezeColumn(h,u):i>=o-u&&this.freezeColumn(h-1,u+1)),!this._frozenLayout&&this._colVirtualizer.isEnabled()){let e=this._colVirtualizer.getFirstIndexInView();t<e&&i<e||t>n&&i>n||this._activateColumns(e,n,e,n)}if(this._hasListener("columnMoved")){let e={};e.fromColIndex=t,e.toColIndex=i,e.colId=s,this._dispatchColumnEvent("columnMoved",e)}return n===this._colVirtualizer.getLastIndexInView()&&(t<=n&&i>n||i<=n&&t>n)&&this._colVirtualizer.update(),this.updateColumnBounds(),this._updateColumnSeparators(),!0},Dt.prototype.moveColumnById=function(t,e){let i=this.getColumnCount(),o=this.getColumnIndex(t);if(o<0||o>=i)return!1;let n=null!=e?this.getColumnIndex(e):-1;return n<0&&(n=i),this._moveColumnByIndex(o,n)},Dt.prototype._moveColumnByIndex=function(t,e){return t<e&&--e,t!==e&&this.moveColumn(t,e)},Dt.prototype.reorderColumns=function(t,e){let i="";"number"==typeof e?i=this.getColumnId(e):e&&(i=e),this.startBatch("move");let o=0;if(Array.isArray(t)){let e=t.length;if(e>1){let n,s,r,l,h=this.getColumnIds(),u=h.length,a=[],p=!1;for(n=0;n<e;++n){let e=t[n];"number"==typeof e?(r=e,s=h[e]||""):(s=e,r=h.indexOf(s)),s&&r>=0&&(a.push(s),i===s&&(p=!0))}if(e=a.length,p){if(l=this.getColumnIndex(i),l>=0)for(;++l<u&&(i=h[l],!(a.indexOf(i)<0)););(l<0||l>=u)&&(i="")}for(n=e;--n>=0;)s=a[n],r=this.getColumnIndex(s),l=this.getColumnIndex(i),l<0&&(l=u),o|=this._moveColumnByIndex(r,l),i=s}else o=this.moveColumnById(t[0],i)}else null!=t&&(o=this.moveColumnById(t,i));return this.stopBatch("move"),!!o},Dt.prototype.getColumnLayout=function(){return this._layoutX},Dt.prototype.updateColumnLayout=function(){this._syncLayoutToColumns(0,this.getColumnCount())},Dt.prototype._deserializeColumn=function(t,e){if(!e)return;let i,o=e.layout||e,n=e.width;null!=n&&(o.size=n),n=e.scalable,null!=n&&(o.scalable=n),n=e.minWidth,null!=n&&(o.minSize=n),null==o.scalable&&(o.scalable=null==o.size),this._layoutX.deserializeLane(t,o);let s=e.styles;for(i in s)this.setColumnStyle(t,i,s[i]);let r=e.classes;for(i in r)this.enableColumnClass(t,i,r[i]);let l=this._getColumnDef(t),h=e.id;h&&"string"==typeof h&&(l.id=h,l.userId=h);let u=e.field;u&&"string"==typeof u&&(l.field=u);let a=e.dataColumnName;null!=a&&(l.dataColumnName=a),a=e.stationary,null!=a&&(l.stationary=!!a),a=e.leftPinned,null!=a&&(l.leftPinned=!!a),a=e.rightPinned,null!=a&&(l.rightPinned=!!a),a=e.backgroundColor,null!=a&&this.setColumnBackgroundColor(t,a),this.setColumnRenderingHandler(t,e.renderingHandler),this.setColumnDataBindingHandler(t,e.dataBindingHandler),a=e.columnData,a&&this.setColumnData(t,a);let p=e.binding||e.formatter;if(Array.isArray(p)&&(p=p[0]),p&&"function"!=typeof p){let t=p.init;"function"==typeof t&&t(e,this)}},Dt.prototype.addRow=function(t){if(null==t)t=1;else if(t<=0)return;this.getColumnCount()<=0&&this.setColumnCount(1);let e=this.getLastSection();null==e&&(e=this.addSection()),e.addRow(t)},Dt.prototype.removeRow=function(t){let e=this.getLastSection();null!=e&&(null==t&&(t=1),e.removeRow(t))},Dt.prototype.getRowCount=function(){return this._layoutY.getLaneCount()},Dt.prototype.setSectionRowCount=function(t,e){let i=this.getSection(t);null!=i&&i.setRowCount(e)},Dt.prototype.getRowIndex=function(t,e){return this._sectionStarts[t]+e},Dt.prototype.getRelativeIndex=e._deprecatedFunction,Dt.prototype.removeAllRows=function(){let t=this._settings.length;for(let e=0;e<t;++e)this._settings[e].getSection().setRowCount(0),this._sectionStarts[e]=0;this._sectionStarts[t]=0},Dt.prototype.getDefaultRowHeight=function(){return this._layoutY.getDefaultLaneSize()},Dt.prototype.setDefaultRowHeight=function(t,e){if(this._layoutY.setDefaultLaneSize(t)){this._rowHeightSync=!1;let t=this._layoutY.getDefaultLaneSize();this._rowHeightException=e?"":"title";let i=this._settings.length;for(let e=0;e<i;++e){let i=this._settings[e];i.getType()!==this._rowHeightException&&"bottomPadding"!==i.getId()&&i.getSection().setDefaultRowHeight(t)}this._syncRowHeights(),this._rowHeightSync=!0,this.setRowScrollingStep(this._rowScrollingStep),this._updateColumnSeparators()}},Dt.prototype.getDataSource=function(){return this._dataSource},Dt.prototype.setDataConflationRate=function(t){this._dataSource.setConflationRate(t)},Dt.prototype.getDataConflationRate=function(){return this._dataSource.getConflationRate()},Dt.prototype.setDataSource=function(t){t&&t instanceof lt&&(t=new ct(t));let e={};if(e.prevDataSource=this._dataSource,this._dataSource=t||null,e.dataSource=this._dataSource,this._dispatch("dataSourceChanged",e),this._autoSetDataSource){let e=this._settings.length;for(let i=0;i<e;++i)this._settings[i].setDataSource(t)}return this._dispatch("postDataSourceChanged",e),this._dataSource},Dt.prototype.setColumnTemplate=e._deprecatedFunction,Dt.prototype.getColumnTemplate=e._deprecatedFunction,Dt.prototype.getColumnRenderEvent=e._deprecatedFunction,Dt.prototype.getColumnDataBindingEvent=function(t){console.log("getColumnDataBindingEvent() is deprecated. Use setColumnDataBindingHandler() instead");let e=this;return{listen:function(i){e.setColumnDataBindingHandler(t,i)},unlisten:function(){e.setColumnDataBindingHandler(t,null)}}},Dt.prototype.setColumnStyle=function(t,i,o,n){if(!i)return;let s;e.isNumber(t)||(t=0,console.log("WARNING: the first parameter for setColumnStyle must be column index")),null==n?s=this._getNestedColumnDef(t,"styles"):(n=this._toSectionType(n),s=this._getNestedColumnDef(t,n,"styles")),s[i]=o;for(let e=this._settings.length;--e>=0;){let s=this._settings[e];null!=n&&n!==s.getType()||s.getSection().setColumnStyle(t,i,o)}},Dt.prototype.getColumnBackgroundColor=function(t){return this._getColumnDef(t).backgroundColor||""},Dt.prototype.setColumnBackgroundColor=function(t,e){if(null==t||"number"!=typeof t)return;let i=this._getColumnDef(t);if(i.backgroundColor===e)return;i.backgroundColor=e,e=null!=e?e:"";let o=this._settings.length;for(let i=0;i<o;++i){let o=this._settings[i],n=o.getSection();n&&("content"!==o.getType()?this._applyCellsBackgroundColor(n,t,e):n.getColumn(t).setStyle("backgroundColor",e))}},Dt.prototype._applyCellsBackgroundColor=function(t,e,i){let o=t.getRowCount();for(let n=0;n<o;n++){if(t.getCellColSpan(e,n)>1)continue;let o=t.getCell(e,n);o&&o.setStyle("backgroundColor",i)}},Dt.prototype.applyColumnsBackgroundColor=function(t){if(!t)return;let e=t.getColumnCount();for(let i=0;i<e;i++){let e=this._getColumnDef(i).backgroundColor||"";this._applyCellsBackgroundColor(t,i,e)}},Dt.prototype.enableColumnClass=function(t,e,i,o){let n;"number"!=typeof t&&(t=0),null==o?n=this._getNestedColumnDef(t,"classes"):(o=this._toSectionType(o),n=this._getNestedColumnDef(t,o,"classes"));let s=!1;if((i=!1!==i)?n[e]||(s=n[e]=!0):n[e]&&(delete n[e],s=!0),s)for(let n=this._settings.length;--n>=0;){let s=this._settings[n];null!=o&&o!==s.getType()||s.getSection().enableColumnClass(t,e,i)}return s},Dt.prototype.hasColumnClass=function(t,e,i){let o;return null==i?o=this._getNestedColumnDef(t,"classes"):(i=this._toSectionType(i),o=this._getNestedColumnDef(t,i,"classes")),!(!o||!o[e])},Dt.prototype.setColumnAlignment=function(t,e){let i=e?e.charAt(0).toLowerCase():"",o=0;o|=this.enableColumnClass(t,"tr-align-left","l"===i),o|=this.enableColumnClass(t,"tr-align-right","r"===i),o|=this.enableColumnClass(t,"tr-align-center","c"===i),o&&this._dispatch("columnAlignmentChanged",{colIndex:t,alignment:i})},Dt.prototype.getColumnAlignment=function(t){return this.hasColumnClass(t,"tr-align-right")?"right":this.hasColumnClass(t,"tr-align-center")?"center":this.hasColumnClass(t,"tr-align-left")?"left":"default"},Dt.prototype.getColumnLeft=function(t){let e=this._columnDefs[t];if(e&&e.rightPinned){let e=this.getElement().clientWidth,i=this._layoutX.getTrackSize(),o=i<e?i:e;for(let e=this.getColumnCount()-1;e>=t;--e)o-=this._layoutX.getLaneSize(e);return o}return this._hScrollbarEnabled&&t>=this._pinnedLeftColumnCount?this._layoutX.getLaneStart(t)-this._hscrollbar.getScrollLeft():this._layoutX.getLaneStart(t)},Dt.prototype.getColumnRight=function(t){return this.getColumnLeft(t)+this._layoutX.getLaneSize(t)},Dt.prototype.getColumnWidth=function(t){return this._layoutX.getLaneSize(t)},Dt.prototype.getColumnCustomLaneSize=function(t){return this._layoutX.getCustomLaneSize(t)},Dt.prototype._calculateColumnWidths=function(t,e){if(!this._preserveGridSize)return e;let i,o=0,n={},s=t.length,r=new Array(s);for(i=0;i<s;i++)n[t[i]]=!0,r[i]=e[i],o+=e[i];let l=0,h=0,u=this.getColumnCount(),a=this._layoutX;for(i=0;i<u;i++)n[i]||a.isLaneVisible(i)&&(a.getLaneScalability(i)?(l+=a.getMinimumLaneSize(i),h++):l+=a.getLaneSize(i));let p=this.getContentWidth(),_=o+l-p;if(h<1||_>0){for(a.resetLaneToDefaultSize(),a.setTrackSize(p-this._reservedSpace),l=0,i=0;i<u;i++)n[i]||a.isLaneVisible(i)&&(a.getLaneScalability(i)?l+=a.getMinimumLaneSize(i):l+=a.getLaneSize(i));if(_=o+l-p,_>0)for(_/=s,i=0;i<s;i++)r[i]-=_}return r},Dt.prototype.setColumnWidth=function(t,e,i){let o=this._calculateColumnWidths([t],[e]),n=this._setColumnWidth(t,o[0],i);return n&&this._syncLayoutToColumns(t,t+1),n},Dt.prototype.setColumnWidths=function(t,e){let i,o=0,n=[],s=[],r=[];for(i=t.length;--i>=0;){let o=t[i];null!=o&&(n.push(i),s.push(o));let l=Array.isArray(e)?e[i]:e;r.push(l)}let l=this._calculateColumnWidths(n,s);for(i=0;i<l.length;i++)o|=this._setColumnWidth(n[i],l[i],r[i]);return o&&this._syncLayoutToColumns(0,t.length),!!o},Dt.prototype.isColumnVisible=function(t){return this._layoutX.isLaneVisible(t)},Dt.prototype.hideColumn=function(t,e){let i=!1===e;this.setColumnVisibility(t,i,0)},Dt.prototype.hideColumns=function(t,e){let i=Array.isArray(t)?t.length:0,o=[],n=this.getColumnCount();e=!1!==e;for(let s=0;s<i;++s){let i=t[s];i>=0&&i<n&&this._layoutX.hideLane(i,e,0)&&o.push(i)}if(o.length&&(this._syncLayoutToColumns(),this.requestRowRefresh(),this._hasListener("columnVisibilityChanged"))){let t={};t.colIndices=o,t.hidden=e,this._dispatch("columnVisibilityChanged",t)}},Dt.prototype.showAllColumns=function(){let t=[],e=this.getColumnCount();for(let i=0;i<e;++i)this._layoutX.hideLane(i,!1,0)&&t.push(i);if(t.length&&(this._syncLayoutToColumns(),this.requestRowRefresh(),this._hasListener("columnVisibilityChanged"))){let e={};e.colIndices=t,e.hidden=!1,this._dispatch("columnVisibilityChanged",e)}},Dt.prototype.getMinimumColumnWidth=function(t){return this._layoutX.getMinimumLaneSize(t)},Dt.prototype.setMinimumColumnWidth=function(t,e){this._layoutX.setMinimumLaneSize(t,e)&&this._syncLayoutToColumns(t,t+1)},Dt.prototype.setMinimumColumnWidths=function(t,e){let i=0,o=NaN,n=NaN;for(let s=t.length;--s>=0;){let r=t[s];null!=r&&(n||(n=s),o=s,i|=this._layoutX.setMinimumLaneSize(s,r,e))}return i&&this._syncLayoutToColumns(o,n+1),!!i},Dt.prototype.getColumnScalability=function(t){return this._layoutX.getLaneScalability(t)},Dt.prototype.setColumnScalability=function(t,i){let o=!1;return e.isNumber(t)?(i=!1!==i,o=this._layoutX.setLaneScalability(t,i),o&&this._syncLayoutToColumns(t,t+1)):this.setDefaultColumnScalable(t),o},Dt.prototype.setDefaultColumnScalable=function(t){this._layoutX.setDefaultScalability(!!t)},Dt.prototype.resetColumnWidths=function(){let t=this._layoutX.resetLaneToDefaultSize();return t&&this._syncLayoutToColumns(0,this.getColumnCount()),t},Dt.prototype.setColumnDefaultWidth=function(t,e){this._layoutX.setLaneDefaultSize(t,e)},Dt.prototype.preserveProportion=function(t){this._preserveProportion=!0===t},Dt.prototype.isProportionPreserved=function(){return this._preserveProportion},Dt.prototype.preserveGridSize=function(t){this._preserveGridSize=!0===t},Dt.prototype.getColumnData=function(t){return this._getColumnDef(t).columnData},Dt.prototype.setColumnData=function(t,e){return this._getColumnDef(t).columnData=e||{},e},Dt.prototype.newColumnData=Dt.prototype.getColumnData,Dt.prototype.setAlwaysRenderColumn=function(t,e){this.getColumnData(t).alwaysRender=!1!==e},Dt.prototype._isAlwaysRenderColumn=function(t){return!0===this.getColumnData(t).alwaysRender},Dt.prototype.getFitContentWidth=function(){return this._fitContentWidth},Dt.prototype.setFitContentWidth=function(t){this._fitContentWidth!==t&&(this._fitContentWidth=t,this.enableClass("fit-width",this._fitContentWidth))},Dt.prototype.loadPlugin=function(t,e){let i=null;if("string"==typeof t){let e=window.tr,o=e?e.grid:null;if(!o)return null;if(o[t])i=new o[t];else{if(!o[t+"Plugin"])return null;i=new o[t+"Plugin"]}}else i=t;if(!i||!i.getName)return null;let o=i.getName();if(!o)return null;let n=this._plugins[o];if(n){if(n===i)return n;console.log("WARNING: Two of the same "+o+"s cannot be loaded on a single grid. The existing plugin is replaced."),this.unloadPlugin(o)}return i.initialize&&i.initialize(this,e),this._plugins[o]=i,i},Dt.prototype.unloadPlugin=function(t){let e;if(t){let i="";"string"==typeof t?i=t:t.getName&&(i=t.getName()),e=this._plugins[i],e||(i+="Plugin",e=this._plugins[i]),e&&(e.unload&&e.unload(this),delete this._plugins[i])}return e||null},Dt.prototype.getPlugin=function(t){let e=this._plugins[t];return e||(e=this._plugins[t+"Plugin"]),e||null},Dt.prototype.getPlugins=function(){let t=[];for(let e in this._plugins)t.push(this._plugins[e]);return t},Dt.prototype.getPluginList=function(){let t=[];for(let e in this._plugins)t.push(e);return t},Dt.prototype.freezeSection=function(t){this._fixFrozenTopSections=!0,this._freezeTopSectionAt(t)},Dt.prototype.resetSectionFreezing=function(){this._fixFrozenTopSections=!1,this._updateFrozenTopSections()},Dt.prototype._freezeTopSectionAt=function(t){if("number"==typeof t){let e=t+1;if(e===this._startVScrollbarIndex)return;this._startVScrollbarIndex=e}else this._startVScrollbarIndex=-1,"string"==typeof t&&(this._tempFrozenSectionRef=t);this._onSectionCountChanged()},Dt.prototype.freezeFooter=function(t){this._fixFrozenBottomSection=!0,this._frozenFooterCount!==t&&(this._setFrozenFooter(t),this._onSectionCountChanged())},Dt.prototype._setFrozenFooter=function(t){this._frozenFooterCount!==t&&(this._frozenFooterCount=t,this._vscrollbar.setFooterCount(t),this._hscrollbar.setFooterCount(t))},Dt.prototype.getFooterCount=function(){return this._frozenFooterCount},Dt.prototype.freezeColumn=function(t,e){let i,o,n=this.getColumnCount(),s=0,r=0,l=!1;if(t||0===t)for(this._hScrollbarEnabled=!0,s=t>=0?t+1:0,this._pinnedLeftColumnCount!==s&&(l=!0,this._pinnedLeftColumnCount=s),i=0;i<n;++i)o=this._getColumnDef(i),o.leftPinned=--s>=0;else this._hScrollbarEnabled=!1;if(null!=e)for(r=e>0?e:0,this._pinnedRightColumnCount!==r&&(l=!0,this._pinnedRightColumnCount=r),i=n;--i>=0;)o=this._getColumnDef(i),o.rightPinned=--r>=0;this._onColumnCountChanged(),this._updateScrollbarWidth(!0,!0),this._updateColumnSeparators(),l&&(this._isEventDispatching("pinningChanged")||this._dispatch("pinningChanged",{}))},Dt.prototype._countPinnedLeftColumns=function(){let t=0;if(this._hScrollbarEnabled)for(let e=this._columnDefs.length;--e>=0;){let i=this._columnDefs[e];if(i&&i.leftPinned){t=e+1;break}}return this._pinnedLeftColumnCount=t,t},Dt.prototype._countPinnedRightColumns=function(){let t=0;if(this._hScrollbarEnabled){let e,i=this._columnDefs.length;for(e=0;e<i;++e){let t=this._columnDefs[e];if(t&&t.rightPinned)break}t=i-e}return this._pinnedRightColumnCount=t,t},Dt.prototype.isPinnedColumn=function(t){return t<this.getFrozenColumnCount()||t>=this.getFirstPinnedRightIndex()},Dt.prototype.getFrozenColumnCount=function(){return this._hScrollbarEnabled?this._pinnedLeftColumnCount:0},Dt.prototype.getPinnedLeftColumnCount=Dt.prototype.getFrozenColumnCount,Dt.prototype.getPinnedRightColumnCount=function(){return this._pinnedRightColumnCount},Dt.prototype.getFirstPinnedRightIndex=function(){return this.getColumnCount()-this._pinnedRightColumnCount},Dt.prototype.updateLayout=function(){this._disposed||this._layoutUpdating||(this._layoutUpdating=!0,this._dispatch("preForcedUpdate",{}),this._updateLayout(),this._colVirtualizer.isEnabled()&&this._activateColumns(),this._layoutUpdating=!1)},Dt.prototype.updateScrollbars=function(t,e){e&&this._updateScrollbarWidth(!0,!1),t&&this._updateScrollbarHeight(!0,!1)},Dt.prototype.freezeLayout=function(t){t=!1!==t;let e=this._frozenLayout;if(e!==t){this._frozenLayout=t;let e,i,o=this.getPlugin("SortableTitlePlugin");this._frozenLayout&&o&&o.freezeIndicator(!0),this._frozenLayout||(this._disableEvent("widthChanged"),this._onSectionCountChanged(),this._onColumnCountChanged(),this._colVirtualizer.isEnabled()&&this._activateColumns()),this._rowHeightSync=!1;let n=this._settings.length;for(e=0;e<n;e++)i=this._settings[e].getSection(),i.setFrozenLayout(this._frozenLayout);this._frozenLayout||(this._syncLayoutToColumns(0,this.getColumnCount()),this._disableEvent("widthChanged",!1),this._dispatch("widthChanged",{}),this._syncRowHeights()||this._rowVirtualizer.update(!0),o&&o.freezeIndicator(!1)),this._rowHeightSync=!0}return e},Dt.prototype.unfreezeLayout=function(t){this.freezeLayout(!1===t)},Dt.prototype.isLayoutFrozen=function(){return this._frozenLayout},Dt.prototype.showBorders=e._deprecatedFunction,Dt.prototype.hideBorders=e._deprecatedFunction,Dt.prototype.toggleBorders=function(t){this.toggleClass("no-borders",null!=t?!t:null)},Dt.prototype.toggleGridlines=function(t){this.toggleClass("no-gridlines",null!=t?!t:null)},Dt.prototype.toggleVerticalLines=function(t){this.toggleClass("no-vertical-grid-line",null!=t?!t:null)},Dt.prototype.toggleHorizontalLines=function(t){this.toggleClass("no-horizontal-grid-line",null!=t?!t:null)},Dt.prototype.toggleContentVerticalLines=function(t){this.toggleClass("no-content-vertical-line",null!=t?!t:null)},Dt.prototype.getDataColumnMap=function(){let t=[];for(let e=this.getColumnCount();--e>=0;)t[e]=this.getDataColumnName(e);return t},Dt.prototype.setDataColumnMap=function(t){let e,i;if(t)for(e=t.length;--e>=0;)i=this._getColumnDef(e),i.dataColumnName=t[e];else for(e=this._columnDefs.length;--e>=0;)i=this._columnDefs[e],i&&null!=i.dataColumnName&&(i.dataColumnName=null)},Dt.prototype.getDataColumnName=function(t){return this._getColumnDef(t).dataColumnName||""},Dt.prototype.setDataColumnName=function(t,e){this._getColumnDef(t).dataColumnName=e},Dt.prototype.setDefaultRenderingHandler=function(t){this._renderingHandler="function"==typeof t?t:null},Dt.prototype.setDefaultDataBindingHandler=function(t){this._dataBindingHandler="function"==typeof t?t:null},Dt.prototype.setColumnRenderingHandler=function(t,e){this._getColumnDef(t).renderingHandler="function"==typeof e?e:null},Dt.prototype.setColumnDataBindingHandler=function(t,e){this._getColumnDef(t).dataBindingHandler="function"==typeof e?e:null},Dt.prototype.getColumnRenderingHandler=function(t){return this._getColumnDef(t).renderingHandler||null},Dt.prototype.getColumnDataBindingHandler=function(t){return this._getColumnDef(t).dataBindingHandler||null},Dt.prototype.enableRowHighlighting=function(t){if(null==t&&(t=!0),this._rowHighlighting!==t){this._rowHighlighting=t;let e=this.getAllSections("content");for(let t=e.length;--t>=0;)e[t].enableRowHighlighting(this._rowHighlighting)}},Dt.prototype._getTarget=function(t){let i=t.target;if(i){let e=null;return this._element.contains(i)||(e=t.composedPath?t.composedPath():t.path),e?e[0]||null:i}return t.getElement?t.getElement():e.isElement(t)?t:null},Dt.prototype.getRelativePosition=function(t,i){if(!t)return{};let o=i||{},n=this._getTarget(t);t.target?e.getRelativePosition(t,this.getElement(),o):n&&e.getRelativePosition(n,this.getElement(),o),1!==this._zoomFactor&&(o.x/=this._zoomFactor,o.y/=this._zoomFactor),o.hit=!1,o.grid=this,o.clientX=t.clientX,o.clientY=t.clientY,o.zoomFactor=this._zoomFactor;let s=e.closestElement(n,"cell");if(!s)return o;o.cellElement=s;let r=e.closestElement(s,"column");o.columnElement=r;let l=null;if(l=r?e.closestElement(r,"tr-lg"):e.closestElement(s,"tr-lg"),!l)return o;o.sectionName=l.id||e.closestElement(l,"tr-vlg").id;let h=this.getSectionSettings(o.sectionName);if(!h)return o;h.extendEventArg(o);let u=h.getSection(),a=u.getColumnIndex(r||s);return a<0||(o.colIndex=a,!1===this._hitTestY(-1,o)||(s.stretched?o.cell=u.getStretchedCell(a,o.rowIndex):o.cell=u.getCell(a,o.rowIndex),o.hit=!0)),o},Dt.prototype.getVScrollbar=function(){return this._vscrollbar},Dt.prototype.getHScrollbar=function(){return this._hscrollbar},Dt.prototype.autoHideScrollbars=function(t){t=null==t||t,this._vscrollbar.setAutoHide(t),this._hscrollbar.setAutoHide(t)},Dt.prototype.getVScrollStartIndex=function(){return this._startVScrollbarIndex},Dt.prototype.getHScrollStartIndex=function(){return this._hScrollbarEnabled?this._pinnedLeftColumnCount:-1},Dt.prototype.scrollToColumn=function(t,e){if(!this._updateScrollbar(this._hscrollbar))return!1;let i=this._layoutX.getLaneCount();if(t<=0?t=0:t>=i&&(t=i-1),this.isPinnedColumn(t))return!1;let o=this._hScrollbarEnabled?this._layoutX.getLaneStart(this._pinnedLeftColumnCount):0,n=this._hscrollbar.getScrollLeft(),s=n+o,r=this._hscrollbar.getWidth(),l=this._layoutX.hitTest(s),h=this._layoutX.getLaneStart(t),u=this._layoutX.getLaneSize(t);if(e||u>=r||t<=l){let t=h-o;if(n!==t)return this._hscrollbar.setScrollLeft(t),!0}else{let e=s+r;if(t>=this._layoutX.hitTest(e-.1)){let t=n+(h+u)-e;return this._hscrollbar.setScrollLeft(t),!0}}return!1},Dt.prototype.getScrollLeft=function(){return this._updateScrollbar(this._hscrollbar)?this._hscrollbar.getScrollLeft():0},Dt.prototype.setScrollLeft=function(t){this._updateScrollbar(this._hscrollbar)&&this._hscrollbar.setScrollLeft(t)},Dt.prototype.scrollRight=function(t){this.setScrollLeft(this._hscrollbar.getScrollLeft()+t)},Dt.prototype.getScrollWidth=function(){return this._updateScrollbar(this._hscrollbar)?this._hscrollbar.getContentWidth():0},Dt.prototype.getYScrollVal=function(t,e,i){if(!this._updateScrollbar(this._vscrollbar))return null;let o=null;t&&(o=this.getSection(t));let n=o?o.getRowOffset():this._sectionStarts[this._startVScrollbarIndex],s=this._layoutY.getLaneStart(this._startVScrollbarIndex),r=this._layoutY.getLaneCount();if(e<=0?e=0:e>=r&&(e=r-1),i)return this._layoutY.getLaneStart(e+n)-s;let l=this.getVerticalViewInfo();if(e<l.firstFullRow){let t=e-2;return t<0&&(t=0),this._layoutY.getLaneStart(t+n)-s}return e>l.lastFullRow?this._layoutY.getLaneStart(e+n+2+1)-l.viewHeight-s:null},Dt.prototype.scrollToRow=function(t,e,i){let o=this.getYScrollVal(t,e,i);null!==o&&this._vscrollbar.setScrollTop(o)},Dt.prototype.getVerticalViewInfo=function(){let t=this._sectionStarts[this._startVScrollbarIndex],e=this._layoutY.getLaneStart(t),i=this._vscrollbar.getHeight(),o=this._vscrollbar.getScrollTop()+e,n=o+i,s=this._layoutY.hitTest(o)-t,r=this._layoutY.hitTest(n-.1);return r<0&&(r=this._layoutY.getLaneCount()-1),r-=t,{topRowIndex:s,firstFullRow:this._layoutY.getLaneStart(s+t)<o?s+1:s,lastFullRow:this._layoutY.getLaneEnd(r+t)>n?r-1:r,bottomRowIndex:r,viewHeight:i,viewTop:o,viewBottom:n}},Dt.prototype.getVScrollView=function(){if(!this._updateScrollbar(this._vscrollbar))return null;let t=this._layoutY.getLaneCount();if(0===t)return null;let e=this._sectionStarts[this._startVScrollbarIndex],i=this._layoutY.getLaneStart(e),o=this._vscrollbar.getScrollTop()+i,n=this._vscrollbar.getHeight(),s=o+n,r=this._layoutY.hitTest(o),l=this._layoutY.hitTest(s-.1),h=this._layoutY.getLaneStart(r+e),u=this._layoutY.getLaneEnd(l+e),a=o-n,p=a<=i?e:this._layoutY.hitTest(a)+1,_=s+n,d=_>=this._layoutY.getTrackSize()?t-1:this._layoutY.hitTest(_-.1)-1;r-=e,l-=e;let c={};return c.viewTop=o-i,c.viewBottom=s-i,c.topRowIndex=r,c.bottomRowIndex=l,c.firstFullRow=h<o?r+1:r,c.lastFullRow=u>s?l-1:l,c.prevPageRowIndex=p-e,c.nextPageRowIndex=d-e,c},Dt.prototype.getScrollTop=function(){return this._updateScrollbar(this._vscrollbar)?this._vscrollbar.getScrollTop():0},Dt.prototype.setScrollTop=function(t){this._updateScrollbar(this._vscrollbar)&&this._vscrollbar.setScrollTop(t)},Dt.prototype.scrollDown=function(t){this.setScrollTop(this._vscrollbar.getScrollTop()+t)},Dt.prototype.getScrollHeight=function(){return this._updateScrollbar(this._vscrollbar)?this._vscrollbar.getContentHeight():0},Dt.prototype.restoreScrollbars=function(){this._vscrollbar.restoreTrackPosition()},Dt.prototype.enableAutoSetDataSource=function(t){this._autoSetDataSource=t},Dt.prototype.getRowVirtualizer=function(){return this._rowVirtualizer},Dt.prototype.getColumnVirtualizer=function(){return this._colVirtualizer},Dt.prototype.enableRowVirtualization=function(t){this._rowVirtualizer.enable(t),this._rowVirtualizer.isEnabled()&&this._vscrollbar.isEnabled()?this._rowVirtualizer.activate():this._rowVirtualizer.deactivate()},Dt.prototype.isRowVirtualizationEnabled=function(){return this._rowVirtualizer.isEnabled()},Dt.prototype.enableColumnVirtualization=function(t){this._colVirtualizer.enable(t);let e=this._colVirtualizer.isEnabled();for(let t=this._settings.length;--t>=0;)this._settings[t].enableColumnVirtualization(e)},Dt.prototype.isColumnVirtualizationEnabled=function(){return this._colVirtualizer.isEnabled()},Dt.prototype.setRowScrollingStep=function(t){this._rowScrollingStep=t>0?t:0,this._vscrollbar.setScrollingStep(this._layoutY.getDefaultLaneSize()*this._rowScrollingStep)},Dt.prototype.getVMouseWheelHandler=function(){return this._vscrollbar.getDefaultMouseWheelLogic()},Dt.prototype.synchronizeVScrollbar=function(t){t.unlisten("mousemove",t._onMouseMove),t.listen("mousemove",this._onMouseMove);let e=t.getVScrollbar();e._mainScrollbar=this._vscrollbar,e.setStyle("visibility","hidden"),e.setStyle("pointerEvents","none"),e.disableMouseWheel(),e.attachToExternalElement(this._vscrollbar.getParent()),this._vscrollbar.listen("scroll",t._onSyncVScroll)},Dt.prototype.synchronizeHScrollbar=function(t){t.unlisten("mousemove",t._onMouseMove),t.listen("mousemove",this._onMouseMove);let e=t.getHScrollbar();e._mainScrollbar=this._hscrollbar,e.setStyle("visibility","hidden"),e.setStyle("pointerEvents","none"),e.disableMouseWheel(),e.attachToExternalElement(this._hscrollbar.getParent()),this._hscrollbar.listen("scroll",t._onSyncHScroll)},Dt.prototype.updateRowData=function(t,e,i,o){let n=this.getSectionSettings(t||"content");n&&n.updateRowData(e,i,o)},Dt.prototype.rerender=function(){let t=this._settings.length;for(let e=0;e<t;e++)this._settings[e].rerender()},Dt.prototype.requestRowRefresh=function(){this._rowRefreshTimer||(this._rowRefreshTimer=setTimeout(this._onRowRefresh,100))},Dt.prototype._requestScrollbarUpdate=function(){this._updateScrollbarHeight(!0,!0),this._rowHeightTimerId=0},Dt.prototype.deactivateRendering=function(t){if((t=!1!==t)==this._noBinding)return;this._noBinding=t;let e=this.getSectionSettings("content");e&&(e.disableDataBinding(t),t||this.requestRowRefresh())},Dt.prototype._onRowRefresh=function(){this._rowRefreshTimer=0,this.updateRowData()},Dt.prototype.disableLazyRendering=function(t){console.log("WARNING: This function is deprecated.")},Dt.prototype.getData=function(t,e,i){let o=this.getSectionSettings(t);if(!o)return null;let n=this._toDataColumnName(e);return o.getData(n,i)},Dt.prototype.setData=function(t,e,i,o){let n=this.getSectionSettings(t);if(n&&n.isDataBindable()){let t=this._toDataColumnName(e);return n.setData(t,i,o)}return!1},Dt.prototype.removeRowData=function(t,e){let i=this.getSectionSettings(t);return!(!i||!i.isDataBindable())&&i.removeRowData(e)},Dt.prototype.setHidingMethod=function(t){if(t||(t=""),this._hidingMethod!==t){this._hidingMethod=t;let e=this.getAllSections();for(let i=e.length;--i>=0;)e[i].setHidingMethod(t)}},Dt.prototype.getHorizontalLayout=function(){return this._layoutX},Dt.prototype.setColumnVisibility=function(t,e,i){if(this._layoutX.hideLane(t,!e,i)){if(this._syncLayoutToColumns(t,t+1),e&&this.requestRowRefresh(),this._hasListener("columnVisibilityChanged")){let i={};i.colIndex=t,i.hidden=!e,this._dispatch("columnVisibilityChanged",i)}return!0}return!1},Dt.prototype.getColumnVisibility=function(t,e){return this._layoutX.getLaneVisibilityBit(t,e)},Dt.prototype.reserveRightSpace=function(t){if(this._reservedSpace!==t){this._reservedSpace=t;for(let e=this._settings.length;--e>=0;)this._settings[e].getSection().reserveRightSpace(t);return this._onColumnCountChanged(),this._updateScrollbarWidth(!0,!0),!0}return!1},Dt.prototype.getHiddenInput=function(t){return t?this._firstHiddenInput:this._lastHiddenInput},Dt.prototype.focus=function(){let t=this._lastHiddenInput,e=Lt(t);if(t&&t!==e){let e=window.pageXOffset,i=window.pageYOffset;if(t.setActive)try{t.setActive()}catch(e){t.focus({preventScroll:!0})}else t.focus({preventScroll:!0});i===window.pageYOffset&&e===window.pageXOffset||window.scrollTo(e,i)}},Dt.prototype.isBinding=function(){return this._dispatchingDataChanged},Dt.prototype.hideRow=function(t,e){this._dataSource.hideRow(t,e)},Dt.prototype.hideRows=function(t,e){Array.isArray(t)?this._dataSource.hideRows(t,e):this._dataSource.hideRow(t,e)},Dt.prototype.showRows=function(t,e){Array.isArray(t)?this._dataSource.showRows(t,e):this._dataSource.showRows([t],e)},Dt.prototype.unhideAllRows=function(){this._dataSource.unhideAllRows()},Dt.prototype.hasHiddenRow=function(){return this._dataSource.hasHiddenRow()},Dt.prototype.initSimpleTable=function(t){let e=0;if(t||this.getColumnCount()||(t=["Default"]),t){e=t.length,this.setColumnCount(e),this.setDataColumnMap(t);for(let i=0;i<e;++i)this.setColumnField(i,t[i])}let i=this.addSection("title");if(i.addRow(1),!this._renderingHandler)for(let o=0;o<e;++o)i.setCellContent(o,0,t[o]);this.addSection("content");let o=this.getSectionSettings("title");o.disableDataBinding();let n=this.getSectionSettings("content");n.setAutoSyncRowCount(!0),n.setParent(o),this._dataBindingHandler||this.setDefaultDataBindingHandler(Dt._defaultDataBinding)},Dt._defaultDataBinding=function(t){t.cell.setContent(t.dataValue)},Dt.prototype.selectColumn=function(t,e){for(let i=this._settings.length;--i>=0;)this._settings[i].getSection().selectColumn(t,e);this.updateColumnBounds()},Dt.prototype.isSelectedColumn=function(t){let e=this._settings[0]||null;return!!e&&e.getSection().isSelectedColumn(t)},Dt.prototype.updateColumnBounds=function(){if(this._columnBoundConflator.conflate())return;let t=this._settings.length;if(!t)return;let e,i=[],o=null,n=this.getColumnCount(),s=[];for(e=0;e<n;e++)this.isSelectedColumn(e)?(s.push(e),o||(o=[e,-1])):o&&(o[1]=e-1,i.push(o),o=null);o&&(o[1]=n-1,i.push(o),o=null);let r={selectedColumns:s,selectionRanges:i};this._dispatch("beforeColumnBoundUpdate",r);let l=i.length,h=[],u=[],a=this._settings[0],p=a.getSection();for(e=0;e<l;++e){o=i[e];let t=[0,0],n=[!1,!1];p.calculateColumnBounds(o[0],o[1],t,n),t[0]<t[1]&&(h.push(t),u.push(n))}let _=0,d=-1;for(null!=r.topBoundRowIndex&&(d=+r.topBoundRowIndex),d>=0&&"title"===a.getType()&&(_=this._layoutY.getLaneStart(d)),p.updateColumnBounds(h,u,_),e=1;e<t;e++)p=this._settings[e].getSection(),p.updateColumnBounds(h,u)},Dt.prototype._updateColumnSeparators=function(){let t=this._settings.length;if(t)for(let e=0;e<t;e++){let t=this._settings[e].getSection();t&&t.updateColumnSeparators()}},Dt.prototype.getColumnRect=function(t,e){let i=this.getElement().clientWidth,o=i,n=this._hscrollbar;n.isActive()&&(o=n.getTrackSize());let s=0,r=0;if(this._settings.length){let i=[0,0];this._settings[0].getSection().calculateColumnBounds(t,e,i,[]),s=i[0],r=i[1]-s}return{top:0,left:s,width:r,height:this._layoutY.getTrackSize(),leftPinnedIndex:this._pinnedLeftColumnCount-1,rightPinnedIndex:this.getFirstPinnedRightIndex(),scrollViewSize:o,gridWidth:i}},Dt.prototype.getRowRect=function(t,e){let i=this._layoutX.getTrackSize(),o=this.getElement().clientWidth;i=i<o?i:o;let n=this.getSection("content"),s=n?n.getRowOffset():1,r=this._layoutY,l=r.getLaneStart(s),h=0,u=n.getHeight(),a=this._vscrollbar;a.isActive()&&(h=a.getScrollTop(),u=a.getTrackSize());let p=u+l,_=r.getLaneStart(t+s)-h,d=r.getLaneEnd(e+s)-h;return _<l?_=l:_>p&&(_=p),d<l?d=l:d>p&&(d=p),_-=l,d-=l,{top:_,left:0,width:i,height:d-_,scrollViewSize:u,scrollViewTop:l,scrollViewBottom:p}},Dt.prototype.normalizeConfig=function(t){t||(t={});let e,i,o=t.columns,n=o?o.length:0,s=t.columnFreezing;null==s&&(s=t.freezeColumn);let r=t.pinnedRightColumns||t.frozenRightColumns;if(r)for(delete t.pinnedRightColumns,delete t.frozenRightColumns,t.columnVirtualRendering=!1,t.columnVirtualization=!1,e=n;--e>=0;)--r>=0&&(i=o[e],i&&(i.rightPinned=!0));return null!=s&&(delete t.columnFreezing,delete t.freezeColumn,s>=0&&o&&(i=o[s],i&&(i.leftPinned=!0))),t},Dt.prototype.setColumnGrouping=function(t){this._groupDefs=t||null},Dt.prototype.getColumnGroupParentId=function(t){if(this._groupDefs){let e="number"==typeof t?this.getColumnId(t):t;return this._groupDefs.getParentId(e)}return""},Dt.prototype.getColumnGroupChildIds=function(t){if(this._groupDefs){let e=this._groupDefs.getLeafDescendants(t);if(e&&e.length>0)return e}return null},Dt.prototype.getValidColumnList=function(t,e){let i=[];if(!t)return i;e||(e=this.createColumnMap(t));let o=this.getColumnCount();for(let t=0;t<o;++t){let o=this._getColumnDef(t).id;null!=e[o]&&i.push({index:t,id:o})}return i},Dt.prototype.createColumnMap=function(t){t||(t=this.getColumnIds());let e={},i=t.length;for(let o=0;o<i;o++){let i=t[o];"number"==typeof i&&(i=this.getColumnId(i)),i&&(e[i]=!0)}return e},Dt.prototype.startBatch=function(t){return!!t&&(this._batches||(this._batches={}),this._batches[t]=t,"reset"===t&&this._disableEvent("columnVisibilityChanged",!0),this._dispatch("beforeBatchOperation",{batches:this._batches,batchType:t}),!0)},Dt.prototype.stopBatch=function(t){return!!t&&(this._dispatch("afterBatchOperation",{batches:this._batches,batchType:t}),"reset"===t&&this._disableEvent("columnVisibilityChanged",!1),delete this._batches[t],j(this._batches)&&(this._batches=null),!0)},Dt.prototype._dispatchColumnEvent=function(t,e){let i=this._batches;i&&(e.batches=i),this._dispatch(t,e)},Dt.prototype._dispatchColumnPositionChanged=function(){this._columnPositionConflator.conflate()||this._dispatch("columnPositionChanged",{sender:this})},Dt.prototype._dispatchRowPositionChanged=function(){this._rowPositionConflator.conflate()||this._dispatch("rowPositionChanged",{sender:this})},Dt.prototype._getAllSections=function(){let t=[],e=this._settings.length;for(let i=0;i<e;i++)t.push(this._settings[i].getSection());return t},Dt.prototype._getNextSection=function(t,e,i){let o=this.getSectionIndex(e)+t;if(null==i)return this.getSectionSettings(o);i=this._toSectionType(i);let n=this._settings.length;for(;o>=0&&o<n;){let e=this._settings[o];if(i===e.getType())return e;o+=t}return null},Dt.prototype._toSectionType=function(t){if(Dt._sectionType[t])return t;if(e.isString(t))switch(t.charAt(0).toLowerCase()){case"t":return"title";case"h":case"s":return"header";case"f":return"footer"}return"content"},Dt.prototype._newSection=function(t,e){if(e)for(let t=this._settings.length;--t>=0;)if(this._settings[t].getId()===e)return null;t=this._toSectionType(t);let i={horizontalScrollbar:this._hscrollbar},o="content"===t?new Rt(i):new N(i);o._setContext(this);let n=new mt(o);n.setId(e),n.setType(t),n.listen("dataChanged",this._onSectionDataChanged),n.listen("rowAvailable",this._onRowAvailable);let s="content"===t&&this._rowHighlighting;return o.enableRowHighlighting(s),o.enableShading(!1),o.setHidingMethod(this._hidingMethod),n.enableColumnVirtualization(this._colVirtualizer.isEnabled()),o.setColumnCount(this._layoutX.getLaneCount()),o.reserveRightSpace(this._reservedSpace),this._syncLayoutToSectionColumns(o),this._syncStyleToSectionColumns(o,t),t!==this._rowHeightException&&o.setDefaultRowHeight(this._layoutY.getDefaultLaneSize()),o.listen("rowHighlighted",this._onRowHightlighted),o.listen("rowCountChanged",this._onRowCountChanged),o.listen("rowHeightChanged",this._onRowHeightChanged),n},Dt.prototype._putToLast=function(t){if(0===this._settings.length)t.insertBefore(this._lastHiddenInput);else{let e=this.getLastSection().getElement().nextSibling;null!==e?t.insertBefore(e):t.insertBefore(this._lastHiddenInput)}},Dt.prototype._syncStyleToSectionColumns=function(t,e){let i;for(let o=this._columnDefs.length;--o>=0;){let n=this._getColumnDef(o),s=n.styles;for(i in s)t.setColumnStyle(o,i,s[i]);let r=n.classes;for(i in r)t.enableColumnClass(o,i,!0);let l=n[e];if(l){for(i in s=l.styles,s)t.setColumnStyle(o,i,s[i]);for(i in r=l.classes,r)t.enableColumnClass(o,i,!0)}}},Dt.prototype._syncRowHeights=function(){let t=this._settings.length;for(let e=0;e<t;++e)this._syncSectionRowHeights(this._settings[e].getSection());return!this._frozenLayout&&this._updateScrollbarHeight(!0,!0)},Dt.prototype._syncSectionRowHeights=function(t){this._layoutY.copyFrom(t.getRowLayout(),this._sectionStarts[t.getIndex()])},Dt.prototype._setColumnWidth=function(t,e,i){let o=!1,n=this._layoutX;if(null!=i)o=n.setLaneScalability(t,!!i);else{let i=n.getLaneScalability(t);if(this._preserveProportion){if(i){let i=this.getColumnCount(),o=0,s=0;for(let t=0;t<i;++t){if(!n.getLaneScalability(t))continue;let e=n.getLaneSize(t);o+=n.getCustomLaneSize(t),s+=e}(!(e=(e*o-e*n.getCustomLaneSize(t))/(s-e))||e<0)&&(e=o)}}else o=n.setLaneScalability(t,!1)}return o=n.setLaneSize(t,e)||o,o},Dt.prototype._dispatchColumnAddedEvent=function(t,e,i,o){let n={};if(this._hasListener("columnAdded"))if(n.atTheMiddle=i,1===e)n.colIndex=t,n.context=o,this._dispatchColumnEvent("columnAdded",n);else{let i=Array.isArray(o)?o:[];for(let o=0;o<e;++o)n.colIndex=t+o,n.context=i[o],this._dispatchColumnEvent("columnAdded",n)}this._frozenLayout&&(n.noDataUpdate=!0),this._dispatchColumnRenderEvent(n,t,t+e,0,this._settings.length,NaN,NaN)},Dt.prototype._dispatchColumnRenderEvent=function(t,e,i,o,n,s,r){if(!(o<n))return;let l;if(t.sender=this,t.fromColIndex=e,t.toColIndex=i,this._hasListener("preSectionRender"))for(l=o;l<n;++l)this._settings[l].extendRenderEventArg(t,s,r),this._dispatch("preSectionRender",t);for(let h=e;h<i;++h){let e=this.getColumnRenderingHandler(h)||this._renderingHandler;if(e)for(t.colIndex=h,t.dataColumnName=this.getDataColumnName(h),l=o;l<n;++l){let i=this._settings[l];i.extendRenderEventArg(t,s,r);let o=i.getSection(),n=t.fromRowIndex,u=t.toRowIndex;for(let i=n;i<u;++i)t.rowIndex=i,t.cell=o.getCell(h,i,!1),e(t)}}if(this._hasListener("postSectionRender"))for(l=o;l<n;++l)this._settings[l].extendRenderEventArg(t,s,r),this._dispatch("postSectionRender",t);if(!t.noDataUpdate&&!this._noBinding)for(l=o;l<n;++l)this.updateRowData(this._settings[l],s,r-1)},Dt.prototype._dispatchRowExpansionBinding=function(t){if(!this._hasListener("rowExpansionBinding"))return;let e=t.dataSource;if(!e||!e.getDataSource())return;let i=t.fromRowIndex,o=t.toRowIndex,n=e.getVisibleRowIds(!0),s=t.section;t.rowData=null,t.cell=null;let r=!1;for(let l=o-1;l>=i;--l){let i=e.getRowId(l);if(!r){let t=e.getRowExpansionCount(i);if(t>0){l=l+t+1,r=!0;continue}}let o=s.getContextRow(l);if(!o)continue;let h=e.getExpansionParentByRowId(i);if(h)t.originalRowData=e.getRowData(h),t.originalRowId=h,t.rowExpansion=o.rowExpansion=!0;else{if(!o.rowExpansion)continue;t.originalRowData=null,t.originalRowId=null,t.rowExpansion=o.rowExpansion=!1}t.rowId=n[l],t.rowIndex=l,this._dispatch("rowExpansionBinding",t)}t.originalRowData=null,t.originalRowId=null,t.rowExpansion=!1},Dt.prototype._removeColumn=function(t){let e=this._layoutX.getLaneCount();if(t>e&&(t=e),t<=0)return;let i=e-t;this._layoutX.setLaneCount(i);for(let t=this._settings.length;--t>=0;)this._settings[t].getSection().setColumnCount(i);let o=this._columnDefs.slice(i);if(this._columnDefs.length=i,this._onColumnCountChanged(),this._syncLayoutToColumns(i,0,!0),this._hasListener("columnRemoved")){let t={};for(let n=e;--n>=i;){let e=o[n-i];t.colIndex=n,t.columnData=e?e.columnData:null,this._dispatchColumnEvent("columnRemoved",t)}}},Dt.prototype._onSectionDataChanged=function(t){if(this._dispatchingDataChanged)return;let e=this._layoutX.getLaneCount();if(this._dispatchingDataChanged=!!e,!e)return;let i,o,n=t.fromRowIndex,s=t.toRowIndex,r=t.section,l=t.dataSource,h=l&&l.getDataSource()?1:0;r._startBindingSession(!0),h&&(i=l.getVisibleRowIds(!0),o=l.getMultipleRowData(i,n,s),t.dataRows=o);let u="content"===t.sectionType;u&&this._dispatch("beforeContentBinding",t),this._dispatch("preSectionDataBinding",t);let a=this.getDataColumnMap();for(let l=0;l<e;++l)if(r.isColumnActive(l)&&(this.isColumnVisible(l)||this._isAlwaysRenderColumn(l))){let e=this.getColumnDataBindingHandler(l)||this._dataBindingHandler;if(e){let u=a[l];t.dataColumnName=u,t.colIndex=l;for(let a=n;a<s;++a){let n=h?o[a]:null;n&&(t.rowData=n,t.rowId=i[a],t.dataValue=n?n[u]:null,t.rowIndex=a,t.cell=r.getCell(l,a,!1),e(t))}}}this._dispatch("postSectionDataBinding",t),this._dispatchRowExpansionBinding(t),u&&(this._firstRendered||(this._dispatch("firstRendered",t),this._firstRendered=!0),this._dispatch("afterContentBinding",t)),r._startBindingSession(!1),this._dispatchingDataChanged=!1},Dt.prototype.resetInternalState=function(){this._firstRendered=!1},Dt.prototype._updateScrollbar=function(t){return!!t&&(t.isEnabled()&&t.update(),t.isActive())},Dt.prototype._onVScroll=function(t){this._rowVirtualizer.setViewOffset(this._vscrollbar.getScrollTop()),this._dispatchRowPositionChanged()},Dt.prototype._onHScroll=function(t){let e=this._hscrollbar.getScrollLeft();this._colVirtualizer.setViewOffset(e),this.updateColumnBounds(),this._dispatchColumnPositionChanged()},Dt.prototype._onVScrollEnabled=function(){this._updateScrollbarHeight(!0,!1),this._rowVirtualizer.isEnabled()&&this._rowVirtualizer.activate(),this._vscrollbar.getAutoHide()||this._updateVScrollbar()},Dt.prototype._onVScrollDisabled=function(){this._rowVirtualizer.isEnabled()&&this._rowVirtualizer.deactivate()},Dt.prototype._onRowInViewChanged=function(t){let e=t.firstIndex,i=t.lastIndex+1,o=this._settings.length,n=[0,0];for(let t=0;t<o;++t){let o=this._settings[t],s=o.getSection();s&&!s.getFrozenLayout()&&(s.activateRows(e,i,n),this.updateRowData(o,n[0],n[1]-1))}},Dt.prototype._onColInViewChanged=function(t){if(!this.getColumnCount())return;let e=t.prevFirstIndex,i=t.prevLastIndex,o=t.firstIndex,n=t.lastIndex,s=e<o?e:o,r=i>n?i:n;this._activateColumns(o,n,s,r);let l=this.getSectionCount();for(let t=0;t<l;++t){let e=this._settings[t];this.updateRowData(e)}},Dt.prototype._activateColumns=function(t,e,i,o){null==i&&(i=0),null==o&&(o=this.getColumnCount()-1);let n=this._getColActivationList(t,e,i,o);for(let t=this.getSectionCount();--t>=0;)this._settings[t].activateColumns(n,i,o)},Dt.prototype._getColActivationList=function(t,e,i,o){null==i&&(i=0);let n=this.getColumnCount();null==o&&(o=n-1),null==t&&(t=this._colVirtualizer.getFirstIndexInView()),null==e&&(e=this._colVirtualizer.getLastIndexInView());let s=this.getHScrollStartIndex(),r=this.getFirstPinnedRightIndex(),l=new Array(o+1);for(let n=i;n<=o;++n)l[n]=n<s||n>=t&&n<=e||n>=r;return l},Dt.prototype._getColumnDef=function(t){if(t>=0){let e=this._columnDefs[t];return e||(e=this._columnDefs[t]={id:""+Dt._runningColumnId++,columnData:{}}),e}return{columnData:{}}},Dt.prototype._getNestedColumnDef=function(t,e,i){let o=this._getColumnDef(t);if(e){let t=o;o=t[e],o||(o=t[e]={}),i&&(t=o,o=t[i],o||(o=t[i]={}))}return o},Dt.prototype.getColumnId=function(t){return t>=0&&t<this.getColumnCount()&&this._getColumnDef(t).id||""},Dt.prototype._getColumnId=Dt.prototype.getColumnId,Dt.prototype.getColumnIds=function(){let t=this.getColumnCount(),e=new Array(t);for(let i=0;i<t;++i)e[i]=this._getColumnDef(i).id||"";return e},Dt.prototype.setColumnField=function(t,e){this._getColumnDef(t).field=e||""},Dt.prototype.getColumnField=function(t){return t>=0&&t<this.getColumnCount()&&this._getColumnDef(t).field||""},Dt.prototype.getColumnFields=function(){let t=this.getColumnCount(),e=new Array(t);for(let i=0;i<t;++i)e[i]=this._getColumnDef(i).field||"";return e},Dt.prototype.getColumnIndex=function(t){if("number"==typeof t)return t;if(t){let e=t,i=-1,o=this.getColumnCount();for(let t=0;t<o;++t){let o=this._getColumnDef(t);if(e===o.id)return t;e===o.field&&i<0&&(i=t)}return i}return-1},Dt.prototype.getColumnIndices=function(t){let e=[],i=this.getColumnCount(),o=Array.isArray(t)?t:[t],n=o.length;for(let t=0;t<n;++t){let n=this.getColumnIndex(o[t]);n>=0&&n<i&&e.push(n)}return e},Dt.prototype.getColumnIndexMap=function(){let t=this.getColumnCount(),e={},i="";for(let o=0;o<t;++o){let t=this._getColumnDef(o);i=t.field,i&&(e[i]=o),i=t.id,i&&(e[i]=o)}return e},Dt.prototype._onWindowResize=function(){this._updateLayout(),this._rowVirtualizer.setViewOffset(this._vscrollbar.getScrollTop())},Dt.prototype._onMouseMove=function(){this._vscrollbar.flash(),this._hscrollbar.flash()},Dt.prototype._onGridClicked=function(){window.getSelection().toString()||this._element.contains(Lt(this._element))||this.focus()},Dt.prototype._onKeyDown=function(t){if(!function(t){return 9===t.keyCode&&!t.ctrlKey&&!t.altKey&&!t.metaKey}(t))return;let e=Lt(this._element),i=!1;this._firstHiddenInput===e?i=-1:this._lastHiddenInput===e&&(i=1),this._dispatch("tabNavigation",{activeElement:e,firstHiddenInput:this._firstHiddenInput,lastHiddenInput:this._lastHiddenInput,onTheEdge:i,shiftKey:t.shiftKey,event:t}),i&&!t.defaultPrevented&&(i>0&&t.shiftKey?this._firstHiddenInput.focus():i<0&&!t.shiftKey&&this._lastHiddenInput.focus())},Dt.prototype._onRowHightlighted=function(t){if(!this._hasListener("rowHighlighted"))return;let e=t.sender,i=this.getSectionSettings(e.getId());if(null==i)return;i.extendEventArg(t);let o=i.getDataSource();null!==o&&(t.rowId=o.getRowId(t.rowIndex),t.dataRow=o.getRowData(t.rowId)),this._dispatch("rowHighlighted",t)},Dt.prototype._onRowCountChanged=function(t){if(this._disposed)return;let e=t.sender,i=t.prevCount,o=t.rowCount,n=e.getIndex(),s=this._updateSectionIndices(n),r=0;if(i>o)this._layoutY.removeLaneAt(s,i-o),this._layoutY.isHomogeneous()||this._syncSectionRowHeights(e);else{let t=this._layoutY.getDefaultLaneSize(),n=e.getDefaultRowHeight();if(this._layoutY.insertLane(s+i,o-i),n!==t)for(r=i;r<o;++r)this._layoutY.setLaneSize(s+r,n)}let l=t.noBinding,h=n<=this._startVScrollbarIndex||n>=this._getFooterStartIndex(),u=this._frozenFooterCount>0,a=this._updateScrollbarHeight(h,u,l);l&&(this._hasPendingRowChange=!0),this._frozenLayout||a||(this._rowVirtualizer.isVirtualizable()?e.activateRows(this._rowVirtualizer.getFirstIndexInView(),this._rowVirtualizer.getLastIndexInView()):e.activateRows()),this._hasPendingRowChange=!1,u||this._updateVScrollbar(),this._updateColumnSeparators(),i<o?("content"!==this.getSectionSettings(e).getType()&&this.applyColumnsBackgroundColor(e),this._dispatch("rowAdded",t)):i>o&&this._dispatch("rowRemoved",t)},Dt.prototype._onRowHeightChanged=function(t){if(!this._rowHeightSync)return;if(this._disposed)return;if(this._rowHeightConflator.conflate(t))return;let e=this._rowHeightConflator.popAllData(),i=e.length,o=NaN;for(let t=0;t<i;++t){let i=e[t],n=i.section;if(!this._containsSection(n))continue;let s=n.getIndex(),r=i.rowIndex,l=this.getRowIndex(s,r),h=i.changeLength;for(let t=0;t<h;++t)this._layoutY.setLaneSize(l+t,n.getRowHeight(r+t))&&(s>=o||(o=s))}this._rowHeightConflator._needScrollbarUpdate?(this._rowHeightConflator._needScrollbarUpdate=!1,this._updateScrollbarHeight(!0,!0)):o>=0&&(this._dispatchingDataChanged?this._rowHeightTimerId||(this._rowHeightTimerId=setTimeout(this._requestScrollbarUpdate,0)):this._updateScrollbarHeight(o<this._startVScrollbarIndex,o>=this._startVScrollbarIndex)),this._updateColumnSeparators(),this._dispatchRowPositionChanged()},Dt.prototype._containsSection=function(t){for(let e=this._settings.length;--e>=0;)if(this._settings[e].getSection()===t)return!0;return!1},Dt.prototype._onRowAvailable=function(t){if(this._hasPendingRowChange)return;let e=t.sectionIndex;this._dispatchColumnRenderEvent(t,0,this.getColumnCount(),e,e+1,t.prevRowIndex,t.rowIndex)},Dt.prototype._onSectionCountChanged=function(t){if(!this._frozenLayout){if(this._tempFrozenSectionRef){let t=this.getNextSection(this._tempFrozenSectionRef);null!==t&&(this._startVScrollbarIndex=t.getIndex(),this._tempFrozenSectionRef="")}this._startVScrollbarIndex>=0&&this._startVScrollbarIndex<this._getFooterStartIndex()?(this._vscrollbar.enable(),this._vscrollbar.setScrollContent(this,this._getAllSections(),this._startVScrollbarIndex),this._element.appendChild(this._lastHiddenInput),t||this._updateScrollbarHeight(!0,!0),this._syncLayoutToColumns()):this._vscrollbar.disable()}},Dt.prototype._onColumnCountChanged=function(){if(this._frozenLayout||this._disposed)return;let t=this._countPinnedLeftColumns(),e=this._countPinnedRightColumns();this.updateColumnBounds(),this._updateColumnSeparators(),this._hScrollbarEnabled&&t+e<this.getColumnCount()?(this._hscrollbar.enable(),this._colVirtualizer.activate(),this._hscrollbar.setScrollContent(this,this._getAllSections(),t,e)):(this._hscrollbar.disable(),this._colVirtualizer.deactivate(),t=e=0),this._element.classList.toggle("right-pinning",e>0),this._dispatchColumnPositionChanged()},Dt.prototype._onSyncVScroll=function(t){this._vscrollbar.setScrollTop(t.scrollTop)},Dt.prototype._onSyncHScroll=function(t){this._hscrollbar.setScrollLeft(t.scrollLeft)},Dt.prototype._getFooterStartIndex=function(){return this.getSectionCount()-this._frozenFooterCount},Dt.prototype._getVScrollStart=function(){return this._getSectionSize(0,this._startVScrollbarIndex)},Dt.prototype._getFooterSize=function(){return this._frozenFooterCount>0?this._getSectionSize(this._getFooterStartIndex()):0},Dt.prototype._getSectionSize=function(t,e){if(t){if(t<0)return 0}else t=0;null==e&&(e=this.getSectionCount()-t);let i=this._layoutY.getLaneStart(this._sectionStarts[t]),o=t+e;return(e>0?this._layoutY.getLaneStart(this._sectionStarts[o]):0)-i},Dt.prototype._updateScrollbarHeight=function(t,e,i){if(!this._vscrollbar.isEnabled())return!1;let o=e,n=t&&this._startVScrollbarIndex>=0,s=this._rowHeightConflator.isConflating();if(s&&(this._rowHeightConflator._needScrollbarUpdate=!0,o=!1),n&&!s){let t=this.getElement();if(!t)return!1;let e=this.getParent(),i=this._vscrollbar.getParent();i?i!==e&&i.firstElementChild&&(i=i.firstElementChild):(i=t,this._vscrollbar.setParent(i));let o=this._getVScrollStart(),n=this._getFooterSize();i!==t&&(o+=t.clientTop),this._vscrollbar.resetPaneSize();let s=i.clientHeight-(o+n)*this._zoomFactor;this._vscrollbar.setTop(o*this._zoomFactor),this._vscrollbar.setTrackSize(s,s/this._zoomFactor);let r=this._layoutY.getDefaultLaneSize(),l=12*r;s>l&&(l=(Math.ceil(s/r)+4)*r),this._rowVirtualizer.setViewSize(l/this._zoomFactor);let h=this._sectionStarts[this._startVScrollbarIndex],u=this.getFooterCount(),a=0;if(u){let t=this.getSectionCount();a=this._sectionStarts[t]-this._sectionStarts[t-u]}this._rowVirtualizer.setViewBounds(h,a)}else this._rowVirtualizer.validateVirtualization();let r=!1;return i||(r=this._rowVirtualizer.update()),this._vscrollbar.invalidate(o),r},Dt.prototype._updateScrollbarWidth=function(t,e){if(!this._frozenLayout){if(t&&this._hScrollbarEnabled){let t=this.getElement(),e=this._hscrollbar.getParent();e||(e=this.getParent()||t,this._hscrollbar.setParent(e));let i=this._layoutX.getLaneStart(this._pinnedLeftColumnCount),o=this._layoutX.getLaneCount(),n=0,s=this._countPinnedRightColumns();s&&(n=this._layoutX.getLaneStart(o)-this._layoutX.getLaneStart(o-s));let r=e!==t?t.clientLeft:0,l=e.clientWidth-(i+r+n)*this._zoomFactor;s>0&&(l-=this._reservedSpace),this._hscrollbar.setPaneLeft(i),this._hscrollbar.setLeft((i+r)*this._zoomFactor),this._hscrollbar.setTrackSize(l,l/this._zoomFactor);let h=4*this._layoutX.getDefaultLaneSize();l>h&&(h=l),this._colVirtualizer.setViewSize(h/this._zoomFactor),this._colVirtualizer.setViewBounds(this._pinnedLeftColumnCount,s)}else this._colVirtualizer.validateVirtualization();this._colVirtualizer.update(),this._hscrollbar.invalidate(e)}},Dt.prototype._hitTestY=function(t,i){let o;if(i.sectionSettings)o=i.sectionSettings;else{let n;n="number"==i.rowIndex?i.rowIndex:this._layoutY.hitTest(t);let s=n>=0?n:~n,r=e.upperBound(this._sectionStarts,s)-1;if(i.sectionIndex=r,o=this._settings[r],!o)return!1;o.extendEventArg(i)}let n=o.getSection();return null!=i.colIndex&&i.cellElement?i.rowIndex=n.getCellIndex(i.colIndex,i.cellElement):i.rowIndex=rowIndex+n.getRowOffset(),!0},Dt.prototype._syncLayoutToColumns=function(t,e,i){if(this._frozenLayout)return;let o=this._layoutX.getLaneCount(),n=this.fillParentWidth(100);(n||null==t||null==e)&&(t=0,e=o,n=!0);let s=this._settings.length;if(s<=0)return;let r=!1;if(t<e)for(let i=0;i<s;++i)r=this._syncLayoutToSectionColumns(this._settings[i].getSection(),t,e)||r;let l=n||t<this.getHScrollStartIndex()||e>this.getFirstPinnedRightIndex();this._updateScrollbarWidth(l,!0),this.updateColumnBounds(),this._updateColumnSeparators(),this._dispatchColumnPositionChanged(),(r||i)&&this._dispatch("widthChanged",{from:t,to:e,colChanged:t})},Dt.prototype._syncLayoutToSectionColumns=function(t,e,i){null==e&&(e=0),null==i&&(i=this._layoutX.getLaneCount());let o=0;for(let n=e;n<i;++n)o|=t._setColumnWidth(n,this._layoutX.getLaneSize(n));return!(!o||this._frozenLayout||(t._updateColumnLayout(),0))},Dt.prototype._toDataColumnName=function(t){return e.isNumber(t)?this.getDataColumnName(t):t},Dt.prototype._updateSectionIndices=function(t){this._updatePaddingBottomSect()&&--t,t<0&&(t=0);let e=this._settings.length,i=this._settings[0]||null;i!==this._firstSettings&&(this._firstSettings&&this._firstSettings.getSection().removeClass("first"),this._firstSettings=i,this._firstSettings&&this._firstSettings.getSection().addClass("first"));let o=this._settings[e-1]||null;o!==this._lastSettings&&(this._lastSettings&&this._lastSettings.getSection().removeClass("last"),this._lastSettings=o,this._lastSettings&&this._lastSettings.getSection().addClass("last")),this._sectionStarts.length=e+1,this._sectionStarts[0]=0;for(let i=t;i<e;++i){let t=this._settings[i].getSection();t.setIndex(i),t.setRowOffset(this._sectionStarts[i]),this._sectionStarts[i+1]=this._sectionStarts[i]+t.getRowCount()}return this._sectionStarts[t]},Dt.prototype._updateLayout=function(){let t=this.getElement();if(this._disposed||!t.offsetParent)return;this._syncLayoutToColumns(),this._updateScrollbarHeight(!0,!0),this._updateScrollbarWidth(!0,!0);let e=this.getSectionCount();for(let t=0;t<e;++t)this._settings[t].getSection().updateLayout();this._updateColumnSeparators()},Dt.prototype._updateVScrollbar=function(){!this._disposed&&this._vscrollbar.isEnabled()&&(this._vScrollbarConflator.conflate()||this._vscrollbar.update())},Dt._proto=Dt.prototype;const At=Dt,zt="ROW_DEF";let Tt=function(t){let e=this;e._onSectionAdded=e._onSectionAdded.bind(e),e._onMouseDown=e._onMouseDown.bind(e),e._onUIUpdated=e._onUIUpdated.bind(e),e._onColumnAdded=e._onColumnAdded.bind(e),e._onColumnRemoved=e._onColumnRemoved.bind(e),e._onItemSortingClicked=e._onItemSortingClicked.bind(e),e.refresh=e.refresh.bind(e),e._rowDefSorter=e._rowDefSorter.bind(e),e._hosts=[],e._sortLogic={},e._addEvents("preClicked","clicked","preDataSorting","columnSorted"),e._sortStates=[],e._sortingSequence=["a","d"],t&&e.config({sorting:t})};l.inherits(Tt,r),Tt.prototype._hosts=null,Tt.prototype._sortStates,Tt.prototype._maxCount=1,Tt.prototype._dataSorting=!0,Tt.prototype._dblClickAllowed=!1,Tt.prototype._clickTimer=0,Tt.prototype._delayInterval=0,Tt.prototype._lastMouseDown=0,Tt.prototype._initialSort=null,Tt.prototype._mode="",Tt.prototype._sortableColumns=!0,Tt.prototype._sortableIndicator=!1,Tt.prototype._solarTheme=!1,Tt.prototype._sortLogic,Tt.prototype._userManagedLogic=!1,Tt.prototype._disabled=!1,Tt.prototype._frozenIndicator=!1,Tt.prototype._rowDefMode=!1,Tt.prototype._userComparer=null,Tt._icons={},Tt.prototype._sortingSequence,Tt.prototype._sortingSequenceMap=null,Tt.prototype.getName=function(){return"SortableTitlePlugin"},Tt.prototype.initialize=function(t,e){this._hosts.indexOf(t)>=0||(this._hosts.push(t),1===this._hosts.length&&(t.listen("columnAdded",this._onColumnAdded),t.listen("columnRemoved",this._onColumnRemoved)),t.listen("sectionAdded",this._onSectionAdded),t.listen("postSectionRender",this._onUIUpdated),t.listen("dataSourceChanged",this.refresh),this.config(e))},Tt.prototype.unload=function(t){let e=this._hosts.indexOf(t);e<0||(this._hosts.splice(e,1),t.unlisten("sectionAdded",this._onSectionAdded),t.unlisten("postSectionRender",this._onUIUpdated),t.unlisten("dataSourceChanged",this.refresh),t.unlisten("columnAdded",this._onColumnAdded),t.unlisten("columnRemoved",this._onColumnRemoved),this._hosts.length<=0&&this._clickTimer&&(clearTimeout(this._clickTimer),this._clickTimer=0))},Tt.prototype.afterInit=function(){let t=this;t.setSortLogics(t._sortLogic);let e=t._initialSort;null!=e&&(Array.isArray(e)?1===t._maxCount?t.sortColumns(e.slice(0,1)):t.sortColumns(e):t.sortColumns([e]))},Tt.prototype.config=function(t){if(!t)return;let e=this,i=t.icons;null!=i&&i.sorting&&(Tt._icons=i.sorting);let o=t.themeName;!o||o.indexOf("solar")>=0?e._solarTheme=!0:e._solarTheme=!1,e._initialSort=e._initialSortByColumnField(t);let n=t.sorting;if(!n)return;n.ROW_DEF&&(this._rowDefMode=!0),n.userManagedLogic&&(e._userManagedLogic=!0);let s=n.multiColumn||n.multicolumn;if(null!=s&&(!0===s&&(s=-1),!1===s&&(s=1),e.setSortableColumnCount("number"==typeof s&&s>0?s:-1)),s=n.sortableIndicator,null!=s&&(e._sortableIndicator=s),s=n.disabled,null!=s&&(e._disabled=!!s),s=n.threeStatesSorting,null!=s&&e.disableTwoStateSorting(s),s=n.sortingSequence,null!=s&&Array.isArray(s)&&(e._sortingSequence=s),s=n.mode,null!=s&&(e._mode=s,"manual"===s&&e.disableDataSorting()),s=n.indicatorOnly,null!=s&&e.disableDataSorting(s),s=n.disableDoubleClickToSort,null!=s&&e.disableDoubleClickToSort(s),s=n.columnSorted,"function"==typeof s&&e.listen("columnSorted",s),s=n.preClicked,"function"==typeof s&&e.listen("preClicked",s),s=n.clicked,"function"==typeof s&&e.listen("clicked",s),s=n.preDataSorting,"function"==typeof s&&e.listen("preDataSorting",s),s=n.sortableColumns,null!=s&&(e._sortableColumns=s),s=n.initialSort,"object"==typeof s&&(e._initialSort=s),s=n.sortLogic,"object"==typeof s)for(let t in s)"function"==typeof s[t]&&(e._sortLogic[t]=s[t])},Tt.prototype.getConfigObject=function(t){let e=t||{},i=e.columns;i||(i=e.columns=[]);let o=this._hosts[0];if(!o)return e;let n,s,r,l,h,u=this.getSortedColumns();if(1===this._maxCount&&null!=u)for(r=u.length,s=0;s<r;s++){let t=u[s],e=t.colIndex;n=i[e],n||(n=i[e]={}),n.sortOrder=t.sortOrder}for(r=o.getColumnCount(),s=0;s<r;++s)n=i[s],n||(n=i[s]={}),l=this._getSortOptions(s),l&&(this._sortableColumns?l.disabled&&(n.sortable=!1):l.disabled||(n.sortable=!0),h=l.field,h&&(null!=n.field&&n.field!==h&&(n.sortBy=h),this._sortingSequenceMap&&this._sortingSequenceMap[h]&&(n.sortingSequence=this._sortingSequenceMap[h])));let a=e.sorting;a||(a=e.sorting={});let p=u;null!=p&&(a.initialSort=p),p=this._sortableIndicator,!1!==p&&(a.sortableIndicator=p),1!==this._maxCount&&(a.multiColumn=-1===this._maxCount||this._maxCount),this._dblClickAllowed&&(a.disableDoubleClickToSort=!this._dblClickAllowed),p=this._sortableColumns,!0!==p&&(a.sortableColumns=p),p=this._dataSorting,!0!==p&&(a.indicatorOnly=p),this._disabled&&(a.disabled=!0);let _=this._sortingSequence,d=!0;return 2===_.length&&"a"===_[0]&&"d"===_[1]&&(d=!1),d&&(a.sortingSequence=_.slice()),j(e.sorting)&&delete e.sorting,e},Tt.prototype.getColumnMenu=function(t,e){e||(e={});let i=e.menus;i||(i=e.menus=[]);let o=i[0];o||(o=i[0]={menuItems:[]});let n=this.getSortOrder(t),s={indexScore:100,label:"Sort Column",icon:"sort-a-to-z",group:"FREQUENTLY_USED",subMenu:{menuItems:[{indexScore:3,label:"Ascending",radioMode:!0,value:{colIndex:t,order:"a"},selected:"a"===n,click:this._onItemSortingClicked},{indexScore:2,label:"Descending",radioMode:!0,value:{colIndex:t,order:"d"},selected:"d"===n,click:this._onItemSortingClicked},{indexScore:1,label:"Un-Sort",radioMode:!0,value:{colIndex:t,order:"n"},selected:"n"===n,click:this._onItemSortingClicked}]}};return o.menuItems.push(s),e},Tt.prototype._onItemSortingClicked=function(t){this._hosts[0].getPlugin("ColumnMenuPlugin").hide();let e=t.currentTarget.value,i=e.colIndex,o=e.sortOrder;this.sortColumn(i,o)},Tt.prototype.getIcons=function(){return Tt._icons},Tt.prototype.setSortLogics=function(t){if(null!=t){let e=this._hosts[0];if(e){let i=e.getDataSource();for(let e in t)this._setSortLogic(i,e,t[e])}}},Tt.prototype.setSortLogic=function(t,e){if("string"==typeof t){let i=this._hosts[0];if(i){let o=i.getDataSource();this._setSortLogic(o,t,e)}}},Tt.prototype._setSortLogic=function(t,e,i){t&&"string"==typeof e&&("*"===e?t.setSortingLogic(i):t.setColumnSortingLogic(e,i))},Tt.prototype.getSortOrder=function(t){let e=null!=t?this.getSortPriority(t):0,i=this._sortStates[e];return(i?i.sortOrder:"")||"n"},Tt.prototype.getSortedColumnIndex=function(t){return this._getColumnIndex(this._sortStates[t||0])},Tt.prototype.getSortPriority=function(t,e){let i=this._hosts[0];if(i){let o,n=this._sortStates.length;if(t>=0){let e=i.getColumnId(t);if(e)for(o=0;o<n;++o)if(this._sortStates[o].colId===e)return o}else if(e)for(o=0;o<n;++o){let t=this._sortStates[o];if(t.colId===e)return o;if(t.field===e)return o}}return-1},Tt.prototype.isColumnSorted=function(t){return this.getSortPriority(t)>=0},Tt.prototype.getSortedColumns=function(){let t=this._sortStates.length;if(t<=0)return null;let e=new Array(t);for(let i=0;i<t;++i){let t=this.getSortedColumnIndex(i),o=this._sortStates[i],n={},s="";t>=0&&(n.colIndex=t,s=this._getColumnId(t)),s&&(n.colId=s);let r=o.field||"";r&&(n.field=r),n.sortOrder=o.sortOrder||"n",e[i]=n}return e},Tt.prototype.isSorting=function(){return!!this._sortStates.length},Tt.prototype.sortColumn=function(t,e,i){let o=this._prepareSorting(t,e);if(this._sortColumn(o,i),i&&i.isUserAction){let t={};t.colIndex=o.colIndex,t.sortOrder=this.getSortOrder(o.colIndex),t.dataColumnName=this.getColumnSortingField(o.colIndex),this._dispatch("clicked",t)}},Tt.prototype.sortColumns=function(t,e){if(Array.isArray(t)){let i=t.length,o=new Array(i);for(let e=0;e<i;e++)o[e]=this._prepareSorting(t[e]);this._sortColumn(o,e)}},Tt.prototype.clearSortState=function(t){this._popSortState(0,t)&&this.updateSortSymbols()},Tt.prototype.refresh=function(){this._sortStates.length&&(this._sortDataView(),this.updateSortSymbols())},Tt.prototype.restoreUserActions=Tt.prototype.refresh,Tt.prototype.setSortableColumnCount=function(t){this._maxCount=t||1,this._popSortState(this._maxCount)},Tt.prototype.getSortingStates=function(){return this._sortStates},Tt.prototype.updateSortSymbols=function(){if(!this._disabled)for(let t=this._hosts.length;--t>=0;)this._updateSortableIndicator(t)},Tt.prototype.getDataColumnMap=function(){let t=this._hosts[0],e=[];if(t){let i=t.getColumnCount();for(let t=0;t<i;++t)e[t]=this.getColumnSortingField(t)}return e},Tt.prototype.getDataColumnNames=Tt.prototype.getDataColumnMap,Tt.prototype.setDataColumnMap=function(t){if(Array.isArray(t))for(let e=t.length;--e>=0;)this.setColumnSortingField(e,t[e])},Tt.prototype.setDataColumnNames=Tt.prototype.setDataColumnMap,Tt.prototype.getColumnSortingField=function(t){let e=this._getSortOptions(t),i=e?e.field:null;if(null==i&&!this._rowDefMode){let o=this._hosts[0];o&&(i=o.getColumnField(t),i||(i=o.getDataColumnName(t)),i&&e&&(e.field=i))}return i||""},Tt.prototype.setColumnSortingField=function(t,e,i,o){if("number"==typeof t&&null!=e){let n=this._newSortOptions(t);e||(e=""),n.field!==e&&(n.field=e),null==i||this._userManagedLogic||n.sortLogic!==i&&(n.sortLogic=i||null,o&&i&&(i.rowSorting=!0))}};let Vt=function(t){return t.field||""};Tt.prototype.getColumnSortingFields=function(){return this._sortStates.map(Vt)},Tt.prototype.setFirstSortOrder=function(t,e){"a"!==(e=e?Tt._toSortOrder(e):"a")&&"d"!==e&&(e="a");let i=null;i=Array.isArray(t)?t:[t];let o=i.length;for(let t=0;t<o;++t){let o=i[t],n=this.getSortingSequence(o).slice(),s=n.indexOf(e);s>=0&&n.splice(s,1),n.unshift(e),this.setSortingSequence(n,o)}},Tt.prototype.disableTwoStateSorting=function(t){let e=this._sortingSequence.indexOf("n");!1===t?e>=0&&this._sortingSequence.splice(e,1):e<0&&this._sortingSequence.push("n")},Tt.prototype.freezeIndicator=function(t){let e=this._frozenIndicator;if(this._frozenIndicator=!1!==t,e&&!this._frozenIndicator)for(let t=this._hosts.length;--t>=0;)this._updateSortableIndicator(t)},Tt.prototype.disableSortSymbols=function(t){},Tt.prototype.disableDataSorting=function(t){this._dataSorting=!1===t},Tt.prototype.disableDoubleClickToSort=function(t){this._dblClickAllowed=!t},Tt.prototype.disableCellClick=function(t,e){t&&t.enableClass("no-sort",!1!==e)},Tt.prototype.disableColumnSorting=function(t,e){if(e=!1!==e,"number"==typeof t)this._disableColumnSorting(t,e);else if(Array.isArray(t)){let i=t.length;for(let o=0;o<i;++o)this._disableColumnSorting(t[o]||0,e)}},Tt.prototype._disableColumnSorting=function(t,e){let i=this._newSortOptions(t);i.disabled!==e&&(i.disabled=e)},Tt.prototype.setClickDelayInterval=function(t){this._delayInterval=null!=t?t:500},Tt.prototype._initialSortByColumnField=function(t){let e=t.columns,i=e?e.length:0;for(let t=0;t<i;t++){let i=e[t].defaultSort;if(i)return{colIndex:t,sortOrder:i}}return null},Tt.prototype._onSectionAdded=function(t){if("title"!==t.sectionType)return;let e=t.section;0===e.getIndex()&&(e.listen("mousedown",this._onMouseDown),e.listen("click",this._onClickTitle.bind(this,t.sender),0))},Tt.prototype._onUIUpdated=function(t){"title"===t.sectionType&&this.updateSortSymbols()},Tt.prototype._canClickToSort=function(t){if(this._disabled)return!1;let e=t.grid;if(!e||!e.getElement())return!1;let i=this._getPlugin("CellEditingPlugin");if(i&&i.isEditing())return!1;if(this._dispatch("preClicked",t),t.cancel)return!1;let o=t.colIndex,n=t.section,s=t.rowIndex;return!!this._isCellSortable(n,o,s)},Tt.prototype._proceedSorting=function(t){if(this._clickTimer=0,this._canClickToSort(t)){let e=t.colIndex;this.sortColumn(e,null,{isUserAction:!0});let i=t.grid;i&&i.focus&&i.focus()}},Tt.prototype._onMouseDown=function(t){t.button||(this._lastMouseDown=t.timeStamp)},Tt.prototype._getPlugin=function(t){let e=this._hosts[0];return e?e.getPlugin(t):null},Tt.prototype.clickTitleByMouse=function(t,e){this._onClickTitle(t,e)},Tt.prototype._onClickTitle=function(t,e){if(this._disabled)return;if(2===e.detail&&!this._dblClickAllowed)return void(this._clickTimer&&(clearTimeout(this._clickTimer),this._clickTimer=0));if(e.shiftKey||e.ctrlKey||e.altKey||e.metaKey)return;if(!(e.timeStamp-this._lastMouseDown<500))return;let i=t.getRelativePosition(e);if(!i.hit)return;let o=this._getPlugin("ColumnSelectionPlugin");if(o&&o.isEnabled()){let t=i.colIndex;if(!o.isSelectedColumn(t))return}i.target=e.target,this._delayInterval>0?this._clickTimer||(this._clickTimer=setTimeout(this._proceedSorting.bind(this,i),this._delayInterval)):this._proceedSorting(i)},Tt.prototype._popSortState=function(t,e){if(t<0||this._sortStates.length<=t)return!1;let i=!1;for(let e=this._sortStates.length;--e>=t;)this._clearSortSymbols(this._sortStates[e]),i=!0;return this._sortStates.length=t,this._sortDataView(e),i},Tt._toSortOrder=function(t){return!t||"string"!=typeof t||"d"!==(t=t.charAt(0).toLowerCase())&&"a"!==t?"n":t},Tt.prototype.getSortingSequence=function(t){return this._sortingSequenceMap&&(t||0===t)&&("string"!=typeof t&&(t=this.getColumnSortingField(t)),this._sortingSequenceMap[t])?this._sortingSequenceMap[t]:this._sortingSequence},Tt.prototype.setSortingSequence=function(t,e){if(Array.isArray(t))t.length||(t=null);else if(t)return;let i;if(null!=e&&("string"==typeof e?i=e:"number"==typeof e&&(i=this.getColumnSortingField(e))),t){let e=t.map(Tt._toSortOrder);i?(this._sortingSequenceMap||(this._sortingSequenceMap={}),this._sortingSequenceMap[i]=e):this._sortingSequence=e}else i?this._sortingSequenceMap&&delete this._sortingSequenceMap[i]:this._sortingSequence=this._sortingSequence.length>2?["a","d","n"]:["a","d"]},Tt.prototype.clearAllColumnSortingSequences=function(){this._sortingSequenceMap=null},Tt.prototype._rowDefSorter=function(t,e,i,o){return this._userComparer(t[zt].getRowData(),e[zt].getRowData(),i,o)},Tt.prototype.sortSeparators=function(t){let e=this._hosts[0].getDataSource();if(t)this._rowDefMode?(this._userComparer=t,e.sortSeparators(this._rowDefSorter),this._userComparer=null):e.sortSeparators(t);else{let t=e.getSortingLogics(),i=[],o=[],n=this._sortStates.length;for(let t=0;t<n;t++){let e=this._sortStates[t],n=this._rowDefMode?zt:e.field;i.push(e.sortOrder),o.push(n)}e.sortSeparators(t,i,o)}},Tt.prototype._prepareSorting=function(t,e){if(!this._maxCount)return null;let i=this._hosts[0];if(!i)return null;let o=-1,n="";"number"==typeof t?o=t:"string"==typeof t?(n=t,o=this._getColumnIndex(n)):t&&"object"==typeof t&&(n=t.colId||t.field,n?o=this._getColumnIndex(n):"number"==typeof t.colIndex&&(o=t.colIndex),e||(e=t.sortOrder||t.order||null));let s="",r=null;if(o>=0){s=this.getColumnSortingField(o);let t=this._getSortOptions(o);t&&(r=t.sortLogic)}else n&&(s=n);let l=this.getSortPriority(o,s),h=l>=0?this._sortStates[l]:null,u=h?h.sortOrder:"n",a="n";if(null==e){let t=this.getSortingSequence(s),e=t.indexOf(u);e=e<0?0:(e+1)%t.length,a=t[e]}else a=Tt._toSortOrder(e);if(h){if(u===a)return this.updateSortSymbols(),null;this._sortStates.splice(l,1),this._clearSortSymbols(h)}if("a"===a||"d"===a){if(o<0&&!s)return null;if(!h){h={};let t=i.getColumnId(o);t&&(h.colId=t)}h.field=s,h.sortLogic=r||null,this._sortStates.push(h)}h&&("n"!==u?h.prevOrder=u:delete h.prevOrder,h.order=a,h.sortOrder=a);let p=[];if(this._maxCount>0)for(;this._sortStates.length>this._maxCount;){let t=this._clearSortSymbols(this._sortStates.shift());null!==t&&p.push(t)}return{colIndex:o,sortedField:s,sortOrder:a||"n",prevOrder:u,clearedSortColIndexes:p}},Tt.prototype._sortColumn=function(t,e){if(!t)return;this._sortDataView(e),this.updateSortSymbols();let i=null;if(Array.isArray(t)){let e=t.length;for(let o=0;o<e;++o){let e=t[o];e&&(i?(i.colIndices||(i.colIndices=[],i.sortedFields=[],i.sortOrders=[],i.prevOrders=[]),i.colIndices.push(e.colIndex),i.sortedFields.push(e.sortedField),i.sortOrders.push(e.sortOrder),i.prevOrders.push(e.prevOrder)):i=e)}i=t[0]}else i=t;this._dispatch("columnSorted",i)},Tt.prototype._onColumnAdded=function(t){let e=this,i=t.colIndex,o=t.context||{},n=!!e._sortableColumns,s=o.field,r=o.sortBy;null!=r&&(n=!!r,s=r),null!=o.sortable&&(n=!!o.sortable);let l=o.sortLogic||o.sortingLogic||o.sorter;l||(l=e._sortLogic[s]),"function"!=typeof l&&(l=null);let h=o.sortingSequence;null!=h&&s&&e.setSortingSequence(h,s),n?e.setColumnSortingField(i,s,l,o.rowSorting):e.disableColumnSorting(i,!0);let u=o.sortOrder||o.sort;null!=u&&(u=Tt._toSortOrder(u),"n"!==u&&(e.clearSortState(),e.sortColumn(i,u)))},Tt.prototype._onColumnRemoved=function(t){let e=this._sortStates.length;if(!e)return;let i=t.colId;if(i)for(let t=0;t<e;++t){let e=this._sortStates[t];if(e.colId===i){this._sortStates.splice(t,1),this._clearSortSymbols(e),this._sortDataView();break}}},Tt._toRowDefField=function(){return zt},Tt.prototype._sortDataView=function(t){if(t=t||{},this._dispatch("preDataSorting",t),!this._dataSorting)return;let e=this._sortStates.length;this._userManagedLogic&&e>1&&(e=1);let i=null,o=null,n=null;if(e){i=new Array(e),o=new Array(e);for(let t=0;t<e;++t)i[t]=this._sortStates[t].sortOrder,o[t]=this._sortStates[t].sortLogic;n=this._rowDefMode?this._sortStates.map(Tt._toRowDefField):this.getColumnSortingFields(),this._userManagedLogic&&n.length>1&&(n=n.slice(0,1))}for(let e=this._hosts.length;--e>=0;){let s=this._hosts[e].getDataSource();if(s){let e=1==t.isUserAction;s.sort(n,i,o,e)}}},Tt.prototype._clearSortSymbols=function(t){let e=t.targetCells;if(!e)return null;let i=null;for(let t=e.length;--t>=0;){let o,n=e[t];n.removeClass("sorting"),n.removeClass("sortable"),n.removeFloatingIcon("sort-symbol"),n.removeFloatingIcon("priority-symbol"),null==i&&(o=n.getSection())&&(i=o.getColumnIndex(n.getParent()))}return e.length=0,i},Tt.prototype._updateSortableIndicator=function(t){let e=this,i=e._hosts[t];if(!i||this._frozenIndicator)return;let o=i.getSection("title");if(null!=o)for(let i=o.getColumnCount();--i>=0;){let n=o.getRowCount();for(let s=0;s<n;s++){let r=o.getCell(i,s,!0);if(!r)continue;if(r.removeClass("sorting"),r.removeClass("sortable"),r.removeClass("asc"),r.removeClass("desc"),r.removeClass("edge-indicator"),r.removeFloatingIcon("sort-symbol"),r.removeFloatingIcon("priority-symbol"),r.removeFloatingIcon("sortable-indicator"),s!==n-1)continue;if(!e._isCellSortable(o,i,s))continue;r.addClass("sortable");let l,h,u=e.getSortPriority(i),a=e._sortStates[u];if(a&&"n"!==a.sortOrder){if(a.targetCells||(a.targetCells=[]),a.targetCells[t]=r,"a"===a.sortOrder?r.addClass("asc"):r.addClass("desc"),r.addClass("sorting"),e._solarTheme){let t;"a"===a.sortOrder?(t="▲",h=Tt._icons.ascending):(t="▼",h=Tt._icons.descending),l=e._createIconElem(h,t),l.className="sort-symbol",r.insertFloatingIcon(l,0)}else r.addClass("edge-indicator");e._sortStates.length>1&&(l=document.createElement("span"),l.className="priority-symbol",l.textContent=u+1,r.insertFloatingIcon(l,1))}else e._sortableIndicator&&(h=Tt._icons.sortable,l=e._createIconElem(h,"◊"),l.className="sortable-indicator",r.insertFloatingIcon(l,0))}}},Tt.prototype._createIconElem=function(t,e){let i;return t&&"string"==typeof t?(i=document.createElement("ef-icon"),i.setAttribute("icon",t)):(i=document.createElement("span"),i.textContent=e),i},Tt.prototype._getColumnIndex=function(t){if(null!=t){let e=this._hosts[0];if(e)return"number"==typeof t?t:"string"==typeof t?e.getColumnIndex(t):e.getColumnIndex(t.colId)}return-1},Tt.prototype._getColumnId=function(t){let e=this._hosts[0];return e&&null!=t?e.getColumnId(t):""},Tt.prototype._getSortOptions=function(t){let e=this._hosts[0];return e&&e.getColumnData(t).sortableTitle||null},Tt.prototype._newSortOptions=function(t){let e=this._hosts[0],i=null;if(e&&t>=0){let o=e.getColumnData(t);i=o.sortableTitle,i||(i=o.sortableTitle={})}return i||{}},Tt.prototype._isCellSortable=function(t,e,i){let o=this._getSortOptions(e);if(o){if(o.disabled)return!1;let t=o.field;if(null!=t&&!t)return!1}let n=t.getCell(e,i,!0);return!n.hasClass("no-sort")&&n===t.getCell(e,t.getRowCount()-1,!0)&&!n.getParent().classList.contains("collapsed")},Tt._proto=Tt.prototype;const Et=Tt;var Pt=window.tr;Pt||(Pt=window.tr={});var Mt=Pt.grid;Mt||(Mt=Pt.grid={}),Object.assign(Pt,e),Pt.EventDispatcher=r,Pt.ElementWrapper=u,Pt.ILayoutGrid=y,Pt.LayoutGrid=N,Pt.Grid=At,Pt.ColumnStats=ut,Pt.DataCache=Z,Pt.DataTable=lt,Pt.DataView=ct,Pt.SegmentCollection=st,Mt.CellFloatingPanel=p,Mt.Cell=d,Mt.CellSpan=L,Mt.CellSpans=A,Mt.Column=C,Mt.Scrollbar=M,Mt.HScrollbar=F,Mt.VScrollbar=bt,Mt.VirtualizedLayoutGrid=Rt,Mt.Conflator=ft,Mt.Reverter=E,Mt.TrackLayout=g,Mt.Virtualizer=St,Mt.SelectionList=T,Mt.SectionSettings=mt,Mt.SortableTitlePlugin=Et})();
|