@dhtmlx/grid 9.3.6 → 9.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
3
 
4
- This edition of DHTMLX dhtmlxGrid v.9.3.6 is licensed under the GNU General Public License v2.0 (GPL v2).
4
+ This edition of DHTMLX dhtmlxGrid v.9.3.8 is licensed under the GNU General Public License v2.0 (GPL v2).
5
5
  You can redistribute this package and/or modify it under the terms of the GPL v2.
6
6
  GPL v2 requires that any project using this package also be open source under a GPL-compatible license.
7
7
  You may NOT use this package in closed-source, proprietary, or commercial applications without a separate commercial license.
@@ -9,7 +9,7 @@ This package is distributed in the hope that it will be useful, but WITHOUT ANY
9
9
 
10
10
  Copyright © 2026 XB Software Ltd.
11
11
  */
12
- if(window.dhx&&(window.dhx_legacy=dhx,delete window.dhx),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.dhx=e():t.dhx=e()}(window,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/codebase/",i(i.s=57)}([function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.getTextLines=e.getCloneObject=e.rgbToHex=e.getStringWidth=e.getMinArrayNumber=e.getMaxArrayNumber=e.isEmptyObj=e.isType=e.compare=e.debounce=e.downloadFile=e.isNumeric=e.range=e.isId=e.isDefined=e.wrapBox=e.unwrapBox=e.detectWidgetClick=e.singleOuterClick=e.isExistValue=e.findIndex=e.naturalSort=e.copy=e.extend=e.extendComponent=e.uid=void 0;var o=i(2),r=(new Date).valueOf();function a(t,e,i){"function"==typeof e[i]?t[i]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e[i].apply(e,t)}:Object.defineProperty(t,i,{get:function(){return e[i]},set:function(t){return e[i]=t},enumerable:!0,configurable:!0})}e.uid=function(){return"u"+r++},e.extendComponent=function(t,e){if(!e)return t;for(var i=0,n=Object.keys(e);i<n.length;i++){a(t,e,s=n[i])}for(var o=Object.getPrototypeOf(e);o&&o!==Object.prototype;){for(var r=0,l=Object.getOwnPropertyNames(o);r<l.length;r++){var s=l[r];t.hasOwnProperty(s)||a(t,e,s)}o=Object.getPrototypeOf(o)}return t},e.extend=function t(e,i,n){if(void 0===n&&(n=!0),i)for(var o in i){var r=i[o],a=e[o];void 0===r?delete e[o]:!n||"object"!=typeof a||a instanceof Date||a instanceof Array?e[o]=r:t(a,r)}return e},e.copy=function(t,e){var i={};for(var n in t)e&&n.startsWith("$")||(i[n]=t[n]);return i},e.naturalSort=function(t){return t.sort((function(t,e){return"string"==typeof t?t.localeCompare(e):t-e}))},e.findIndex=function(t,e){for(var i=t.length,n=0;n<i;n++)if(e(t[n]))return n;return-1},e.isExistValue=function(t,e){var i=e.toString(),n=t.toString();return!(i.length>n.length)&&n.toLowerCase().includes(i.toLowerCase())},e.singleOuterClick=function(t){var e=function(i){t(i)&&document.removeEventListener("click",e)};document.addEventListener("click",e)},e.detectWidgetClick=function(t,e){var i=function(i){return e((0,o.locate)(i,"data-dhx-widget-id")===t)};return document.addEventListener("click",i),function(){return document.removeEventListener("click",i)}},e.unwrapBox=function(t){return Array.isArray(t)?t[0]:t},e.wrapBox=function(t){return Array.isArray(t)?t:[t]},e.isDefined=function(t){return null!=t},e.isId=function(t){return"number"==typeof t||"string"==typeof t&&""!==t},e.range=function(t,e){if(t>e)return[];for(var i=[];t<=e;)i.push(t++);return i},e.isNumeric=function(t){return!isNaN(t-parseFloat(t))},e.downloadFile=function(t,e,i){var n;if(void 0===i&&(i="application/octet-stream"),t instanceof Blob)n=URL.createObjectURL(t);else{var o=new Blob([t],{type:i});if(window.navigator.msSaveOrOpenBlob)return void window.navigator.msSaveOrOpenBlob(o,e);n=URL.createObjectURL(o)}var r=document.createElement("a");r.href=n,r.download=e,document.body.appendChild(r),r.click(),setTimeout((function(){document.body.removeChild(r),URL.revokeObjectURL(n)}),0)},e.debounce=function(t,e,i){var n;return function(){for(var o=this,r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var l=i&&!n;clearTimeout(n),n=setTimeout((function(){n=null,i||t.apply(o,r)}),e),l&&t.apply(this,r)}},e.compare=function t(e,i){for(var n in e){if(e.hasOwnProperty(n)!==i.hasOwnProperty(n))return!1;switch(typeof e[n]){case"object":if(!t(e[n],i[n]))return!1;break;case"function":if(void 0===i[n]||"compare"!==n&&e[n].toString()!==i[n].toString())return!1;break;default:if(e[n]!==i[n])return!1}}for(var n in i)if(!e.hasOwnProperty(n))return!1;return!0};e.isType=function(t){return((Object.prototype.toString.call(t).match(/^\[object (\S+?)\]$/)||[])[1]||"undefined").toLowerCase()};e.isEmptyObj=function(t){for(var e in t)return!1;return!0};e.getMaxArrayNumber=function(t){if(t.length){for(var e=-1/0,i=0,n=t.length;i<n;i++)t[i]>e&&(e=t[i]);return e}};e.getMinArrayNumber=function(t){if(t.length){for(var e=1/0,i=0,n=t.length;i<n;i++)t[i]<e&&(e=t[i]);return e}};e.getStringWidth=function(t,e){e=n({font:"normal 14px Roboto",lineHeight:20},e);var i=document.createElement("canvas"),r=i.getContext("2d");e.font&&(r.font=e.font);var a=r.measureText(t).width;return(0,o.isIE)()||i.remove(),a};e.rgbToHex=function(t){if("#"===t.substr(0,1))return t;if("rgb"===t.substr(0,3)){var e=/(.*?)rgb[a]?\((\d+), *(\d+), *(\d+),* *([\d+.]*)\)/.exec(t),i=parseInt(e[2],10).toString(16).padStart(2,"0"),n=parseInt(e[3],10).toString(16).padStart(2,"0"),o=parseInt(e[4],10).toString(16).padStart(2,"0");return"#".concat(i).concat(n).concat(o)}},e.getCloneObject=function t(e){if(!e)return e;var i=Array.isArray(e)?[]:{};for(var n in e){var o=e[n];o instanceof Date?i[n]=new Date(o):i[n]="object"==typeof o?t(o):o}return i};var l=function(t){var e=t.text;return t.ctx.measureText(e).width},s=function(t){for(var e=t.ctx,i=t.word,n=t.maxWidth,o=[],r="",a=0;a<i.length;a++)r+=i[a],l({text:r,ctx:e})>n&&(o.push(r.slice(0,-1)),r=i[a]);return r&&o.push(r),o};e.getTextLines=function(t){for(var e=t.ctx,i=t.text,n=t.maxWidth,o=i.split(" "),r="",a="",c=[],d=0;d<o.length;d++){var u=o[d];if(l({text:u,ctx:e})>n)for(var h=0,f=s({word:u,ctx:e,maxWidth:n});h<f.length;h++){var p=f[h];a+="".concat(p," "),l({text:a.trimEnd(),ctx:e})>n?(c.push(r.trimEnd()),r="".concat(p," "),a="".concat(p," ")):r+="".concat(p," ")}else a+="".concat(u," "),l({text:a.trimEnd(),ctx:e})>n&&d>0?(c.push(r.trimEnd()),r="".concat(u," "),a="".concat(u," ")):r+="".concat(u," ");d===o.length-1&&c.push(r.trimEnd())}return c}},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.getViewHeight=e.setTheme=e.awaitRedraw=e.resizeHandler=e.resizer=e.disableHelp=e.KEYED_LIST=e.inject=e.create=e.view=e.sv=e.el=void 0;var n=i(71),o=i(2);function r(t){var i=window.ResizeObserver,n=function(e){var i=e.el.offsetHeight,n=e.el.offsetWidth;t(n,i)};return i?(0,e.el)("div.dhx-resize-observer",{_hooks:{didInsert:function(t){new i((function(){return n(t)})).observe(t.el)}}}):(0,e.el)("iframe.dhx-resize-observer",{_hooks:{didInsert:function(t){t.el.contentWindow.onresize=function(){return n(t)},n(t)}}})}e.el=n.defineElement,e.sv=n.defineSvgElement,e.view=n.defineView,e.create=n.createView,e.inject=n.injectView,e.KEYED_LIST=n.KEYED_LIST,e.disableHelp=function(){n.DEVMODE.mutations=!1,n.DEVMODE.warnings=!1,n.DEVMODE.verbose=!1,n.DEVMODE.UNKEYED_INPUT=!1},e.resizer=r,e.resizeHandler=function(t,i){return(0,e.create)({render:function(){return r(i)}}).mount(t)},e.awaitRedraw=function(){return new t((function(t){requestAnimationFrame((function(){t()}))}))},e.setTheme=function(t,e){void 0===t&&(t="light");var i="data-dhx-theme";e||document.querySelectorAll("[".concat(i,"]")).forEach((function(t){return t.removeAttribute(i)})),e=e||document.documentElement,(0,o.toNode)(e).setAttribute(i,t)},e.getViewHeight=function(t,i){var n=(0,e.create)({render:function(){return(0,e.el)("div",{style:{position:"absolute",visibility:"hidden",width:i}},[t])}});n.mount(document.body);var o=n.node.el.offsetHeight;return n.unmount(),o}}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};function o(t,e,i){for(void 0===e&&(e="data-dhx-id"),void 0===i&&(i="target"),t instanceof Event&&(t=t[i]);t;){if(t.getAttribute&&t.getAttribute(e))return t;t=t.parentNode}}Object.defineProperty(e,"__esModule",{value:!0}),e.getNodeOffset=e.getElementFromPoint=e.getPageLinksCss=e.getPageInlineCss=e.getLabelStyle=e.getPageCss=e.fitPosition=e.calculatePosition=e.getRealPosition=e.isFirefox=e.isSafari=e.isIE=e.getScrollbarHeight=e.getScrollbarWidth=e.getBox=e.locateNodeByClassName=e.locate=e.locateNode=e.eventHandler=e.toNode=void 0,e.toNode=function(t){var e;return"string"==typeof t?document.getElementById(t)||document.querySelector("[data-cell-id=".concat(t,"]"))||document.querySelector(t)||(null===(e=document.querySelector("[data-dhx-root-id=".concat(t,"]")))||void 0===e?void 0:e.parentElement)||document.body:t||document.body},e.eventHandler=function(t,e,i){var n=Object.keys(e);return function(o){var r=t(o);if(void 0!==r){var a=o.target;t:for(;a;){var l=a.getAttribute&&a.getAttribute("class")||"";if(l.length)for(var s=l.split(" "),c=0;c<n.length;c++)if(s.includes(n[c])){if(!1===e[n[c]](o,r)||o.cancelBubble)return!1;break t}a=a.parentNode}}return"function"==typeof i&&i(o),!0}},e.locateNode=o,e.locate=function(t,e){void 0===e&&(e="data-dhx-id");var i=o(t,e);return i?i.getAttribute(e):""},e.locateNodeByClassName=function(t,e){for(t instanceof Event&&(t=t.target);t;){if(e){if(t.classList&&t.classList.contains(e))return t}else if(t.getAttribute&&t.getAttribute("data-dhx-id"))return t;t=t.parentNode}},e.getBox=function(t){var e=t.getBoundingClientRect(),i=document.body,n=window.pageYOffset||i.scrollTop,o=window.pageXOffset||i.scrollLeft;return{top:e.top+n,left:e.left+o,right:i.offsetWidth-e.right,bottom:i.offsetHeight-e.bottom,width:e.right-e.left,height:e.bottom-e.top}};var r=-1;e.getScrollbarWidth=function(){if(r>-1)return r;var t=document.createElement("div");return document.body.appendChild(t),t.style.cssText="position: absolute;left: -99999px;overflow:scroll;width: 100px;height: 100px;",r=t.offsetWidth-t.clientWidth,document.body.removeChild(t),r};var a=-1;function l(t){var e=t.getBoundingClientRect();return{left:e.left+window.pageXOffset,right:e.right+window.pageXOffset,top:e.top+window.pageYOffset,bottom:e.bottom+window.pageYOffset}}function s(){return{rightBorder:window.pageXOffset+window.innerWidth,bottomBorder:window.pageYOffset+window.innerHeight}}function c(t,e){var i,o,r=s(),a=r.rightBorder,l=r.bottomBorder-t.bottom-e.height,c=t.top-e.height;if("bottom"===e.mode?l>=0?o=t.bottom:c>=0&&(o=c):c>=0?o=c:l>=0&&(o=t.bottom),l<0&&c<0){if(e.auto)return d(t,n(n({},e),{mode:"right",auto:!1}));o=l>c?t.bottom:c}if(e.centering)i=function(t,e,i){var n=(e-(t.right-t.left))/2,o=t.left-n,r=t.right+n;return o>=0&&r<=i?o:o<0?0:i-e}(t,e.width,a);else{var u=a-t.left-e.width,h=t.right-e.width;i=u>=0?t.left:h>=0?h:h>u?t.left:h}return{left:i,top:o}}function d(t,e){var i,o,r=s(),a=r.rightBorder,l=r.bottomBorder,d=a-t.right-e.width,u=t.left-e.width;if("right"===e.mode?d>=0?i=t.right:u>=0&&(i=u):u>=0?i=u:d>=0&&(i=t.right),u<0&&d<0){if(e.auto)return c(t,n(n({},e),{mode:"bottom",auto:!1}));i=u>d?u:t.right}if(e.centering)o=function(t,e,i){var n=(e-(t.bottom-t.top))/2,o=t.top-n,r=t.bottom+n;return o>=0&&r<=i?o:o<0?0:i-e}(t,e.height,l);else{var h=t.bottom-e.height,f=l-t.top-e.height;o=f>=0?t.top:h>0||h>f?h:t.top}return{left:i,top:o}}function u(t,e){var i="bottom"===e.mode||"top"===e.mode?c(t,e):d(t,e),n=i.left,o=i.top;return{left:Math.round(n)+"px",top:Math.round(o)+"px",minWidth:Math.round(e.width)+"px",position:"absolute"}}e.getScrollbarHeight=function(){if(a>-1)return a;var t=document.createElement("div");return document.body.appendChild(t),t.style.cssText="position: absolute;left: -99999px;overflow:scroll;width: 100px;height: 100px;",a=t.offsetHeight-t.clientHeight,document.body.removeChild(t),a},e.isIE=function(){var t=window.navigator.userAgent;return t.includes("MSIE ")||t.includes("Trident/")},e.isSafari=function(){var t=function(t){return t.test(window.navigator.userAgent)},e=t(/Chrome/),i=t(/Firefox/);return!e&&!i&&t(/Safari/)},e.isFirefox=function(){var t=function(t){return t.test(window.navigator.userAgent)},e=t(/Chrome/),i=t(/Safari/);return!e&&!i&&t(/Firefox/)},e.getRealPosition=l,e.calculatePosition=u,e.fitPosition=function(t,e){return u(l(t),e)},e.getPageCss=function(){for(var t=[],e=0;e<document.styleSheets.length;e++)for(var i=document.styleSheets[e],n=("cssRules"in i?i.cssRules:i.rules),o=0;o<n.length;o++){var r=n[o];"cssText"in r?t.push(r.cssText):t.push("".concat(r.selectorText," {\n").concat(r.style.cssText,"\n}\n"))}return t.join("\n")},e.getLabelStyle=function(t){var e=t.helpMessage,i=t.type,n=t.labelWidth,o=t.label,r=n&&n.toString().startsWith("0"),a="text"!==i&&t.required;return!!(e||a||!(!o||o&&r)||n&&!r)&&{style:(o||n)&&!r&&{width:n,"max-width":"100%"},label:o&&r?null:o}};var h=function(t){return t.href&&!t.href.startsWith(window.location.origin)};e.getPageInlineCss=function(){for(var t=[],e=0;e<document.styleSheets.length;e++){var i=document.styleSheets[e];if(!h(i))for(var n=("cssRules"in i&&i.cssRules.length?i.cssRules:i.rules),o=0;o<n.length;o++){var r=n[o];"cssText"in r?t.push(r.cssText):t.push("".concat(r.selectorText," {\n").concat(r.style.cssText,"\n}\n"))}}return t.join("\n")},e.getPageLinksCss=function(t){var e=[];if(t)t.forEach((function(t){return e.push('<link href="'.concat(t,'" rel="stylesheet"/>'))}));else for(var i=0;i<document.styleSheets.length;i++){var n=document.styleSheets[i];h(n)&&e.push('<link href="'.concat(n.href,'" rel="stylesheet"/>'))}return e.join("\n")},e.getElementFromPoint=function(t){var e,i,n=t.targetTouches?(null===(e=t.targetTouches[0])||void 0===e?void 0:e.clientX)||0:t.clientX,o=t.targetTouches?(null===(i=t.targetTouches[0])||void 0===i?void 0:i.clientY)||0:t.clientY,r=document.elementFromPoint(n,o);return(null==r?void 0:r.shadowRoot)?r.shadowRoot.elementFromPoint(n,o):r},e.getNodeOffset=function(t,e){var i=t.getBoundingClientRect(),n=e.getBoundingClientRect();return{left:i.left-n.left,top:i.top-n.top}}},function(t,e,i){"use strict";var n,o,r;Object.defineProperty(e,"__esModule",{value:!0}),e.Split=e.GridSystemEvents=e.GridEvents=void 0,function(t){t.scroll="scroll",t.expand="expand",t.filterChange="filterChange",t.beforeFilter="beforeFilter",t.beforeResizeStart="beforeResizeStart",t.resize="resize",t.afterResizeEnd="afterResizeEnd",t.cellClick="cellClick",t.cellRightClick="cellRightClick",t.cellMouseOver="cellMouseOver",t.cellMouseDown="cellMouseDown",t.cellDblClick="cellDblClick",t.headerCellClick="headerCellClick",t.footerCellClick="footerCellClick",t.headerCellMouseOver="headerCellMouseOver",t.footerCellMouseOver="footerCellMouseOver",t.headerCellMouseDown="headerCellMouseDown",t.footerCellMouseDown="footerCellMouseDown",t.headerCellDblClick="headerCellDblClick",t.footerCellDblClick="footerCellDblClick",t.headerCellRightClick="headerCellRightClick",t.footerCellRightClick="footerCellRightClick",t.beforeEditStart="beforeEditStart",t.afterEditStart="afterEditStart",t.beforeEditEnd="beforeEditEnd",t.afterEditEnd="afterEditEnd",t.beforeKeyDown="beforeKeyDown",t.afterKeyDown="afterKeyDown",t.beforeColumnHide="beforeColumnHide",t.afterColumnHide="afterColumnHide",t.beforeColumnShow="beforeColumnShow",t.afterColumnShow="afterColumnShow",t.beforeRowHide="beforeRowHide",t.afterRowHide="afterRowHide",t.beforeRowShow="beforeRowShow",t.afterRowShow="afterRowShow",t.beforeCollapse="beforeCollapse",t.afterCollapse="afterCollapse",t.beforeExpand="beforeExpand",t.afterExpand="afterExpand",t.beforeRowDrag="beforeRowDrag",t.dragRowStart="dragRowStart",t.dragRowOut="dragRowOut",t.dragRowIn="dragRowIn",t.canRowDrop="canRowDrop",t.cancelRowDrop="cancelRowDrop",t.beforeRowDrop="beforeRowDrop",t.afterRowDrop="afterRowDrop",t.afterRowDrag="afterRowDrag",t.beforeColumnDrag="beforeColumnDrag",t.dragColumnStart="dragColumnStart",t.dragColumnOut="dragColumnOut",t.dragColumnIn="dragColumnIn",t.canColumnDrop="canColumnDrop",t.cancelColumnDrop="cancelColumnDrop",t.beforeColumnDrop="beforeColumnDrop",t.afterColumnDrop="afterColumnDrop",t.afterColumnDrag="afterColumnDrag",t.beforeRowResize="beforeRowResize",t.afterRowResize="afterRowResize",t.beforeSort="beforeSort",t.afterSort="afterSort",t.groupPanelItemClick="groupPanelItemClick",t.groupPanelItemMouseDown="groupPanelItemMouseDown",t.dragPanelItemClick="dragPanelItemClick",t.dragPanelItemMouseDown="dragPanelItemMouseDown"}(n||(e.GridEvents=n={})),function(t){t.cellTouchMove="cellTouchMove",t.cellTouchEnd="cellTouchEnd",t.headerCellTouchMove="headerCellTouchMove",t.headerCellTouchEnd="headerCellTouchEnd",t.groupPanelItemTouchMove="groupPanelItemTouchMove",t.groupPanelItemItemTouchEnd="groupPanelItemItemTouchEnd"}(o||(e.GridSystemEvents=o={})),function(t){t.left="leftSplit",t.right="rightSplit",t.top="topSplit",t.bottom="bottomSplit"}(r||(e.Split=r={}))},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.getColumnHeaderText=e.getReverseScrollState=e.getEditorValue=e.getComboEditorValue=e.getValueForNumberColumn=e.getOptionValue=e.getEditorOptions=e.applyPattern=e.getMaxColsWidth=e.getTreeCellWidthOffset=e.getCalculatedRowHeight=e.getMaxRowHeight=e.getNormalizeFilterData=e.calculateVisibleRange=e.countColumns=e.measureTextHeight=e.normalizeArray=e.getTotalRowHeight=void 0;var r=i(0),a=i(3),l=i(5),s=i(13),c=i(18),d=i(7);function u(t){return(null==t?void 0:t.$height)+((null==t?void 0:t.$opened)&&(null==t?void 0:t.$subRowHeight)||0)||0}function h(t,e,i,n){void 0===i&&(i=[]);for(var o=-1,r=-1,a=0,l=0,s=0;s<i.length;s++)if(!i[s].hidden){var c="$width"===n?i[s][n]:u(i[s]);if(a+c>=e&&-1===o&&(o=l),a>=e+t){r=l;break}a+=c,l++}return-1===o&&(o=0),-1===r&&(r=l),{start:o,end:r}}e.getTotalRowHeight=u,e.normalizeArray=function(t,e){t[e]&&("string"==typeof t[e]?t[e]=[{text:"".concat(t[e])}]:t[e]=t[e].map((function(t){return"string"==typeof t&&(t={text:t}),t})))},e.measureTextHeight=function(t){var e=t.text,i=void 0===e?"":e,n=t.width,o=void 0===n?0:n,a=t.lineHeight,s=void 0===a?20:a,c=t.font,d=void 0===c?"14.4px Arial":c,u=t.htmlEnable,h=void 0!==u&&u,f=document.createElement("canvas"),p=f.getContext("2d",{alpha:!1});p.font=d;var g=[],v=[];h&&(i=(0,l.removeHTMLTags)(i));var _=Math.ceil(p.measureText(i).width/o);_>1&&(_=(0,r.getTextLines)({ctx:p,text:i,maxWidth:o}).length),v.push(_),g.push(i.split("\n").length);var m=Math.max((0,r.getMaxArrayNumber)(g),(0,r.getMaxArrayNumber)(v));return f.remove(),m*s},e.countColumns=function(t,e){var i=0,n=0,o=0,a=!1,l=0,s=!1;return e.forEach((function(t,e){if(t.$index=e,i=Math.max(i,t.header.length),o+=t.$width,t.footer&&(n=Math.max(n,t.footer.length),s||(s=!0)),!a)for(var r=0,l=t.header;r<l.length;r++){if(l[r].colspan)return void(a=!0)}})),e.forEach((function(t){if(s&&(t.footer=t.footer||[]),t.header.length<i)for(var e=0;e<i;e++)t.header[e]=t.header[e]||{text:""};if(t.footer){if(t.footer.length<n)for(e=0;e<n;e++)t.footer[e]=t.footer[e]||{text:""};for(e=0;e<t.footer.length;e++)t.footer[e].id||(t.footer[e].id=(0,r.uid)())}t.header=t.header.map((function(t){return"object"!=typeof t&&(t={text:t}),t.css=t.css||"",t.text||t.css.includes("dhx_cell-empty")||(t.css+=" dhx_cell-empty"),t.id||(t.id=(0,r.uid)()),t})),""===t.header[0].text&&l++})),t.$totalWidth=o,t.$colspans=a,t.$footer=s,l},e.calculateVisibleRange=function(t,e,i,n){var r=(0,d.getCurrFixedCols)(i,a.Split.left),s=(0,d.getCurrFixedCols)(i,a.Split.right),c=n.slice(0,i.topSplit||0),u=i.bottomSplit?n.slice(-i.bottomSplit):[],f=t.height-(i.$headerHeight||0)-(i.$footerHeight||0)-(0,l.getTotalHeight)(o(o([],c,!0),u,!0)),p=t.width-(0,l.getTotalWidth)(o(o([],r,!0),s,!0)),g=i.topSplit||i.bottomSplit?n.slice(c.length,-i.bottomSplit||n.length):n,v=i.leftSplit||i.rightSplit?i.columns.slice(i.leftSplit||0,-i.rightSplit||i.columns.length):i.columns,_=h(f,e.top,g,"$height"),m=h(p,e.left,v,"$width");return{xStart:m.start+r.length,xEnd:m.end+r.length,yStart:_.start+c.length,yEnd:_.end+c.length}},e.getNormalizeFilterData=function(t,e,i,n){var o=t.map((function(t){return t[e]}));return i&&"multiselect"===n&&o.forEach((function(t,e){"string"==typeof t&&t.includes(", ")&&(t.split(", ").forEach((function(t){return o.push(t)})),delete o[e])})),o.filter((function(t,e,i){return i.indexOf(t)===e&&(0,r.isDefined)(t)})).sort((function(t,e){var i=parseFloat(t),n=parseFloat(e);return isNaN(i)||isNaN(n)?(t="boolean"==typeof t?t.toString():t,e="boolean"==typeof e?e.toString():e,isNaN(t)&&isNaN(e)?t.localeCompare(e):""===t?-1:""===e||isNaN(t)?1:-1):i===n?t.toString().localeCompare(e.toString()):i-n}))};e.getMaxRowHeight=function(t){var e,i,n=t.cols,o=t.row,a=t.config,s=void 0===a?{font:"14.4px Arial",lineHeight:20}:a,c=24+d.BORDERS,u=document.createElement("canvas"),h=u.getContext("2d",{alpha:!1});h.font=s.font;for(var p={},v=n.length,_=0;_<v;_++)p[n[_].id]={width:n[_].$width-c||0,col:n[_]};for(var m=[],y=[],b=0,x=Object.entries(o);b<x.length;b++){var w=x[b],C=w[0],S=w[1],E=null===(e=p[C])||void 0===e?void 0:e.col;if(E&&"height"!==C&&!C.startsWith("$")&&("string"==typeof S||"number"==typeof S||S instanceof Date||Array.isArray(S))){S="combobox"===E.editorType||"multiselect"===E.editorType?g(S,E,o):f(S,E);var D="";if("function"==typeof E.template){var O=E.template(S,o,p[C].col);D=E.htmlEnable?(0,l.removeHTMLTags)(O):O.toString()}else D="string"==typeof S?E.htmlEnable?(0,l.removeHTMLTags)(S):S:S.toString();var k=Math.ceil(h.measureText(D).width/p[C].width);k>1&&(k=(0,r.getTextLines)({ctx:h,text:D,maxWidth:null===(i=p[C])||void 0===i?void 0:i.width}).length),y.push(k),m.push(D.split("\n").length)}}var T=Math.max((0,r.getMaxArrayNumber)(m),(0,r.getMaxArrayNumber)(y));return u.remove(),T*s.lineHeight};e.getCalculatedRowHeight=function(t,e){var i=(e=n({rowHeight:40,verticalOffset:10},e)).rowHeight<40?t:t+2*e.verticalOffset;return t<e.rowHeight?e.rowHeight:i};e.getTreeCellWidthOffset=function(t,e){return void 0===e&&(e=!1),20+20*t.$level-(e&&t.$items?20:0)};function f(t,e){if(!(0,r.isDefined)(t)||"boolean"==typeof t||""===t)return t;if("date"===e.type){var i=e.dateFormat||"%M %d %Y";if("string"==typeof t){if(!(0,s.stringToDate)(t,i,!0)){var o=new Date(t);(null==o?void 0:o.valueOf())&&(t=(0,s.getFormattedDate)(i,o))}}else"object"==typeof t&&(t=(0,s.getFormattedDate)(i,t));return t}if(("number"===e.type||e.numberMask)&&(t=parseFloat(t),isNaN(t)))return t;if(e.numberMask){var a=e.numberMask.maxDecLength;return(0,r.isDefined)(a)&&(t=+t.toFixed(a)),(0,c.numberMask)(t,n(n({},e.numberMask),{onlyView:!0}))}return e.patternMask?(0,c.patternMask)(t,e.patternMask):t}function p(t,e){return o(o([],("function"==typeof t.options?t.options(t,e):t.options)||[],!0),t.$customOptions||[],!0)}function g(t,e,i){var n=p(e,i);return"multiselect"===e.editorType&&"string"==typeof t?t.split(",").map((function(t){return v(t.trim(),n)})).join(", "):v(t,n)}function v(t,e){var i=e.find((function(e){return e instanceof Object&&e.id==t}));return i?i.value:t}e.getMaxColsWidth=function(t,e,i,n){var o;if(void 0===i&&(i={font:"normal 14.4px Arial"}),!t.length||!e.length)return{};var r={},a=e.length,s=t.length,c=document.createElement("canvas"),d=c.getContext("2d",{alpha:!1});d.font=i.font;for(var u=0;u<a;u++)r[e[u].id]={width:20,col:e[u]};for(u=0;u<s;u++)for(var h=0,p=Object.entries(t[u]);h<p.length;h++){var v=p[h],_=v[0],m=v[1],y=null===(o=r[_])||void 0===o?void 0:o.col;if(y&&"height"!==_&&!_.startsWith("$")&&("string"==typeof m||"number"==typeof m||m instanceof Date||Array.isArray(m))){m="combobox"===y.editorType||"multiselect"===y.editorType?g(m,y,t[u]):m,"header"!==n&&(m=f(m,y));var b=void 0;if("function"==typeof(null==y?void 0:y.template)&&"data"===n){var x=y.template(m,t[u],y);b=y.htmlEnable?(0,l.removeHTMLTags)(x):x}else b=y.htmlEnable?(0,l.removeHTMLTags)(m):m.toString();var w=d.measureText(b).width;w>r[_].width&&(r[_].width=w)}}c.remove();for(var C={},S=0,E=Object.entries(r);S<E.length;S++){var D=E[S];_=D[0],m=D[1];C[_]=Math.ceil(m.width)}return C},e.applyPattern=f,e.getEditorOptions=p,e.getOptionValue=function(t,e){var i=p(e).find((function(e){return"string"==typeof e?e===t:e.id.toString()===t}));return(null==i?void 0:i.value)||t},e.getValueForNumberColumn=function(t,e){return!(0,r.isDefined)(e)||""===e||"number"==typeof e||["select","combobox","multiselect"].includes(t.editorType)?e:"string"==typeof e?parseFloat(e):NaN},e.getComboEditorValue=g,e.getEditorValue=v,e.getReverseScrollState=function(t){var e,i=t.getScrollState(),n=(0,d.calcScrollBarWidth)(t.config,!!(null===(e=t.scrollView)||void 0===e?void 0:e.config.enable)),o=t.config.$totalWidth-t.config.$width+d.BORDERS+n.y,r=t.config.$totalHeight-t.config.$height+t.config.$headerHeight+t.config.$footerHeight+d.BORDERS+n.x;return{x:o>0?o-i.x:0,y:r>0?r-i.y:0}},e.getColumnHeaderText=function(t){var e,i,n=null===(e=t.header)||void 0===e?void 0:e.find((function(t){return t.text&&"string"==typeof t.text}));return(null==n?void 0:n.text)||(null===(i=t.id)||void 0===i?void 0:i.toString())||""}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.getClosestBottom=e.getClosestTop=e.getLastChild=e.isWasmSupported=e.scrollFixedColsAndRows=e.getTotalHeight=e.getTotalWidth=e.isHtmlEnable=e.isTooltip=e.getTooltipConfig=e.isContentTooltip=e.showTooltip=e.isAutoWidth=e.isSortable=e.isRowEmpty=e.isCssSupport=e.removeHTMLTags=e.getStyleByClass=e.transpose=void 0;var o=i(0),r=i(2),a=i(83),l=i(4);e.transpose=function(t,e){for(var i=[],n=0;n<t.length;n++)for(var o=t[n],r=0;r<o.length;r++){i[r]=i[r]||[];var a=e?e(o[r]):o[r];i[r].push(a)}return i},e.getStyleByClass=function(t,e,i,n){void 0===n&&(n=document.body);var r,a,l,s=n.querySelector("."+e.trim().replace(/\s/g,".")),c=(r=s,"string"==typeof(a='<div class="'.concat(t,'"></div>'))?(r.insertAdjacentHTML("beforeend",a),r.lastChild):(r.appendChild(a),a)),d=window.getComputedStyle(c),u="rgba(0, 0, 0, 0)";if(d.backgroundColor===u){var h=window.getComputedStyle(s);l=h.backgroundColor===u?i.background:(0,o.rgbToHex)(h.backgroundColor)}else l=(0,o.rgbToHex)(d.backgroundColor);var f={color:"rgb(0, 0, 0)"===d.color?i.color:(0,o.rgbToHex)(d.color),background:l,fontSize:Math.round(parseFloat(d.fontSize)),bold:["bold","700","600","500"].includes(d.fontWeight)};return s.removeChild(c),(0,o.compare)(f,i)?null:f},e.removeHTMLTags=function(t){return"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t?"":t.toString().replace(/<[^>]*>/g,"").trim()},e.isCssSupport=function(t,e){try{return CSS.supports(t,e)}catch(n){var i=document.createElement("div");return i.style[t]=e,i.style[t]===e}},e.isRowEmpty=function(t){if(t)return Object.keys(t).reduce((function(e,i){return"id"===i||i.startsWith("$")?e:e&&void 0!==t[i]&&""!==t[i]?void 0:e}),!0)},e.isSortable=function(t,e){return!1!==e.sortable&&t.sortable||e.sortable},e.isAutoWidth=function(t,e){if(e)return!1!==e.autoWidth&&t.autoWidth||e.autoWidth;var i=!1;return t.columns.map((function(e){(!1!==e.autoWidth&&t.autoWidth||e.autoWidth)&&(i=!0)})),i},e.showTooltip=function(t,e){e.node&&(0,a.tooltip)(t.toString(),n(n({},e),{css:"dhx_grid_tooltip "+(e.css||"")}))},e.isContentTooltip=function(t,e,i,n){for(var o=!1,r="header"===n?t.headerTooltip:t.footerTooltip,a=[t.tooltip,r,e.tooltip,null==i?void 0:i.tooltip],l=0;l<a.length;l++)(a[l]||"boolean"==typeof a[l])&&(o=!!a[l]);return o},e.getTooltipConfig=function(t,e,i,n){return[null==i?void 0:i.tooltip,null==e?void 0:e.tooltip,n&&("header"===n?t.headerTooltip:t.footerTooltip),t.tooltip].find((function(t){return t instanceof Object}))||{}},e.isTooltip=function(t,e){return!1!==e.tooltip&&t.tooltip||e.tooltip},e.isHtmlEnable=function(t,e,i){var n,o;return!!(null!==(o=null!==(n=null==i?void 0:i.htmlEnable)&&void 0!==n?n:e.htmlEnable)&&void 0!==o?o:t.htmlEnable)},e.getTotalWidth=function(t){return t.reduce((function(t,e){return t+(e.$width||0)}),0)},e.getTotalHeight=function(t){return t.reduce((function(t,e){return t+(0,l.getTotalRowHeight)(e)}),0)},e.scrollFixedColsAndRows=function(t){var e=(0,r.locateNode)(t,"data-dhx-widget-id").querySelector(".dhx_grid-body"),i=t.deltaY,n=t.shiftKey?[i,0]:[0,i];null==e||e.scrollBy.apply(e,n)},e.isWasmSupported=function(){try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){var t=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(t instanceof WebAssembly.Module)return new WebAssembly.Instance(t)instanceof WebAssembly.Instance}}catch(t){return!1}return!1},e.getLastChild=function(t,e,i){void 0===i&&(i=!0);for(var n=e.getItem(t);n&&n.$opened&&e.haveItems(t);){var o=e.getItems(t);if(t=o[o.length-1].id,!i)break;n=e.getItem(t)}return n?t:null},e.getClosestTop=function(t,e){var i=e.getIndex(t),n=e.getParent(t);if(i>0){var o=e.getItems(n)[i-1];if(!e.haveItems(o.id)||!o.$opened)return o.id;for(;e.haveItems(o.id)&&o.$opened;){var r=e.getItems(o.id);o=r[r.length-1]}return o.id}return n===e.getRoot()?null:n},e.getClosestBottom=function t(e,i,n){void 0===n&&(n=!1);var o=i.getItem(e);if(i.haveItems(e)&&o.$opened&&!n)return i.getItems(e)[0].id;var r=i.getParent(e),a=i.getItems(r),l=a.findIndex((function(t){return t.id===e}));return l+1<a.length?a[l+1].id:r===i.getRoot()?null:t(r,i,!0)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EventsMixin=e.EventSystem=void 0;var n=function(){function t(t){this.events={},this.context=t||this}return t.prototype.on=function(t,e,i){var n=t.toLowerCase();this.events[n]=this.events[n]||[],this.events[n].push({callback:e,context:i||this.context})},t.prototype.detach=function(t,e){var i=t.toLowerCase(),n=this.events[i];if(e&&n&&n.length)for(var o=n.length-1;o>=0;o--)n[o].context===e&&n.splice(o,1);else this.events[i]=[]},t.prototype.fire=function(t,e){void 0===e&&(e=[]);var i=t.toLowerCase();return!this.events[i]||!this.events[i].map((function(t){return t.callback.apply(t.context,e)})).includes(!1)},t.prototype.clear=function(){this.events={}},t}();e.EventSystem=n,e.EventsMixin=function(t){var e=new n(t=t||{});t.detachEvent=e.detach.bind(e),t.attachEvent=e.on.bind(e),t.callEvent=e.fire.bind(e)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNormalizeDateObject=e.getCurrFixedCols=e.calcScrollBarWidth=e.BORDERS=void 0;var n=i(2),o=i(3),r=i(13);e.BORDERS=2,e.calcScrollBarWidth=function(t,i,o){var r,a;void 0===i&&(i=!1);var l=t.$totalHeight+t.$headerHeight+t.$footerHeight+e.BORDERS>(null!==(r=null==o?void 0:o.height)&&void 0!==r?r:t.$height),s=!l||i?0:(0,n.getScrollbarWidth)(),c=t.$totalWidth+e.BORDERS+s>(null!==(a=null==o?void 0:o.width)&&void 0!==a?a:t.$width);return{x:!c||i?0:(0,n.getScrollbarWidth)(),y:s,xState:c,yState:l}},e.getCurrFixedCols=function(t,e){return t[e]?(e===o.Split.left?t.columns.slice(0,t.leftSplit):t.columns.slice(-t.rightSplit)).filter((function(t){return!t.hidden})):[]},e.getNormalizeDateObject=function(t,e){if("string"!=typeof t)return t;if((0,r.stringToDate)(t,e,!0))return(0,r.stringToDate)(t,e);var i=new Date(t);return(null==i?void 0:i.valueOf())?i:null}},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(12),e),o(i(33),e),o(i(76),e),o(i(77),e),o(i(15),e),o(i(79),e),o(i(10),e),o(i(24),e),o(i(35),e),o(i(80),e),o(i(34),e),o(i(23),e),o(i(37),e)},function(t,e,i){(function(e,i){!function(){e="undefined"!=typeof window?window:this;var n=1,o={},r=!1;function a(t){e.setImmediate?i(t):e.importScripts?setTimeout(t):(n++,o[n]=t,e.postMessage(n,"*"))}function l(t){"use strict";if("function"!=typeof t&&null!=t)throw TypeError();if("object"!=typeof this||this&&this.then)throw TypeError();var e,i,n=this,o=0,r=0,s=[];n.promise=n,n.resolve=function(t){return e=n.fn,i=n.er,o||(r=t,o=1,a(u)),n},n.reject=function(t){return e=n.fn,i=n.er,o||(r=t,o=2,a(u)),n},n._d=1,n.then=function(t,e){if(1!=this._d)throw TypeError();var i=new l;return i.fn=t,i.er=e,3==o?i.resolve(r):4==o?i.reject(r):s.push(i),i},n.catch=function(t){return n.then(null,t)};var c=function(t){o=t||4,s.map((function(t){3==o&&t.resolve(r)||t.reject(r)}))};try{"function"==typeof t&&t(n.resolve,n.reject)}catch(t){n.reject(t)}return n;function d(t,e,i,n){if(2==o)return n();if("object"!=typeof r&&"function"!=typeof r||"function"!=typeof t)n();else try{var a=0;t.call(r,(function(t){a++||(r=t,e())}),(function(t){a++||(r=t,i())}))}catch(t){r=t,i()}}function u(){var t;try{t=r&&r.then}catch(t){return r=t,o=2,u()}d(t,(function(){o=1,u()}),(function(){o=2,u()}),(function(){try{1==o&&"function"==typeof e?r=e(r):2==o&&"function"==typeof i&&(r=i(r),o=1)}catch(t){return r=t,c()}r==n?(r=TypeError(),c()):d(t,(function(){c(3)}),c,(function(){c(1==o&&3)}))}))}}e.setImmediate||e.addEventListener("message",(function(t){if(t.source==e)if(r)a(o[t.data]);else{r=!0;try{o[t.data]()}catch(t){}delete o[t.data],r=!1}})),l.resolve=function(t){if(1!=this._d)throw TypeError();return t instanceof l?t:new l((function(e){e(t)}))},l.reject=function(t){if(1!=this._d)throw TypeError();return new l((function(e,i){i(t)}))},l.all=function(t){if(1!=this._d)throw TypeError();if(!(t instanceof Array))return l.reject(TypeError());var e=new l;return function i(n,o){if(o)return e.resolve(o);if(n)return e.reject(n);0==t.reduce((function(t,e){return e&&e.then?t+1:t}),0)&&e.resolve(t),t.map((function(e,n){e&&e.then&&e.then((function(e){return t[n]=e,i(),e}),i)}))}(),e},l.race=function(t){if(1!=this._d)throw TypeError();if(!(t instanceof Array))return l.reject(TypeError());if(0==t.length)return new l;var e=new l;return function i(n,o){if(o)return e.resolve(o);if(n)return e.reject(n);0==t.reduce((function(t,e){return e&&e.then?t+1:t}),0)&&e.resolve(t),t.map((function(t,e){t&&t.then&&t.then((function(t){i(null,t)}),i)}))}(),e},l._d=1,t.exports=l}()}).call(this,i(22),i(64).setImmediate)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.splitCsv=e.throwMoveWarning=e.isOnlyPermanentFilters=e.hasJsonOrArrayStructure=e.isTreeCollection=e.copyWithoutInner=e.toDataDriver=e.toProxy=e.dhxError=e.dhxWarning=e.isDebug=e.findByConf=e.naturalCompare=e.isEqualObj=void 0;var n=i(0),o=i(15),r=i(34);function a(t){console.warn(t)}e.isEqualObj=function(t,e){for(var i in t)if(t[i]!==e[i]||Array.isArray(t[i]))return!1;return!0},e.naturalCompare=function(t,e){if(isNaN(t)||isNaN(e)){var i=[],n=[];for(t.replace(/(\d+)|(\D+)/g,(function(t,e,n){i.push([e||1/0,n||""])})),e.replace(/(\d+)|(\D+)/g,(function(t,e,i){n.push([e||1/0,i||""])}));i.length&&n.length;){var o=i.shift(),r=n.shift(),a=o[0]-r[0]||o[1].localeCompare(r[1]);if(a)return a}return i.length-n.length}return t-e},e.findByConf=function(t,e,i,n){if("function"==typeof e){if(e.call(this,t,i,n))return t}else if(e.by&&e.match&&t[e.by]===e.match)return t},e.isDebug=function(){var t=window.dhx;if(void 0!==t)return void 0!==t.debug&&t.debug},e.dhxWarning=a,e.dhxError=function(t){throw new Error(t)},e.toProxy=function(t){var e=typeof t;return"string"===e?new o.DataProxy(t):"object"===e?t:void 0},e.toDataDriver=function(t){if("string"==typeof t){var e=window.dhx,i=e&&e.dataDrivers||r.dataDrivers;if(i[t])return new i[t];console.warn("Incorrect data driver type:",t),console.warn("Available types:",JSON.stringify(Object.keys(i)))}else if("object"==typeof t)return t},e.copyWithoutInner=function(t,e){var i={};for(var n in t)n.startsWith("$")||e&&e[n]||(i[n]=t[n]);return i},e.isTreeCollection=function(t){return Boolean(t.getRoot)},e.hasJsonOrArrayStructure=function(t){if("object"==typeof t)return!0;if("string"!=typeof t)return!1;try{var e=JSON.parse(t);return"[object Object]"===Object.prototype.toString.call(e)||Array.isArray(e)}catch(t){return!1}},e.isOnlyPermanentFilters=function(t){return!(!t||(0,n.isEmptyObj)(t))&&Object.keys(t).every((function(e){var i;return null===(i=t[e].config)||void 0===i?void 0:i.permanent}))},e.throwMoveWarning=function(t,e){return void 0===e&&(e=!0),a("item with ID ".concat(t," not ").concat(e?"moved":"found")),null},e.splitCsv=function(t,e){return t.trim().split(new RegExp("".concat(e,'(?=(?:[^"]*"[^"]*")*[^"]*$)')))}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toViewLike=e.View=void 0;var n=i(0),o=i(2),r=function(){function t(t,e){var i;this.config=e||{},this._uid=null!==(i=this.config.rootId)&&void 0!==i?i:(0,n.uid)()}return t.prototype.mount=function(t,e){e&&(this._view=e),t&&this._view&&this._view.mount&&(this._container=(0,o.toNode)(t),this._container.tagName?this._view.mount(this._container):this._container.attach&&this._container.attach(this))},t.prototype.unmount=function(){var t=this.getRootView();t&&t.node&&(this.getRootNode()&&t.unmount(),this._view=null)},t.prototype.getRootView=function(){return this._view},t.prototype.getRootNode=function(){return this._view&&this._view.node&&this._view.node.el},t.prototype.paint=function(){this._view&&(this._view.node||this._container)&&(this._doNotRepaint=!1,this._view.redraw())},t}();e.View=r,e.toViewLike=function(t){return{getRootView:function(){return t},paint:function(){return t.node&&t.redraw()},mount:function(e){return t.mount(e)}}}},function(t,e,i){"use strict";var n,o,r,a;Object.defineProperty(e,"__esModule",{value:!0}),e.DataDriver=e.DragEvents=e.DataEvents=e.TreeFilterType=void 0,function(t){t.all="all",t.level="level",t.leafs="leafs"}(n||(e.TreeFilterType=n={})),function(t){t.afterAdd="afteradd",t.beforeAdd="beforeadd",t.removeAll="removeall",t.beforeRemove="beforeremove",t.afterRemove="afterremove",t.change="change",t.filter="filter",t.dataRequest="dataRequest",t.load="load",t.loadError="loaderror",t.beforeLazyLoad="beforelazyload",t.afterLazyLoad="afterlazyload",t.beforeItemLoad="beforeItemLoad",t.afterItemLoad="afterItemLoad",t.beforeGroup="beforeGroup",t.afterGroup="afterGroup",t.beforeUnGroup="beforeUnGroup",t.afterUnGroup="afterUnGroup"}(o||(e.DataEvents=o={})),function(t){t.beforeDrag="beforeDrag",t.dragStart="dragStart",t.dragOut="dragOut",t.dragIn="dragIn",t.canDrop="canDrop",t.cancelDrop="cancelDrop",t.beforeDrop="beforeDrop",t.afterDrop="afterDrop",t.afterDrag="afterDrag"}(r||(e.DragEvents=r={})),function(t){t.json="json",t.csv="csv",t.xml="xml"}(a||(e.DataDriver=a={}))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stripTime=e.DateHelper=e.stringToDate=e.getExcelDate=e.getFormattedDate=e.locale=void 0;var n=i(0),o=i(0);e.locale={monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Monday"],cancel:"Cancel"};var r,a={"%d":function(t){var e=t.getDate();return e<10?"0"+e:e},"%j":function(t){return t.getDate()},"%l":function(t){return e.locale.days[t.getDay()]},"%D":function(t){return e.locale.daysShort[t.getDay()]},"%m":function(t){var e=t.getMonth()+1;return e<10?"0"+e:e},"%n":function(t){return t.getMonth()+1},"%M":function(t){return e.locale.monthsShort[t.getMonth()]},"%F":function(t){return e.locale.months[t.getMonth()]},"%y":function(t){return t.getFullYear().toString().slice(2)},"%Y":function(t){return t.getFullYear()},"%h":function(t){var e=t.getHours()%12;return 0===e&&(e=12),e<10?"0"+e:e},"%g":function(t){var e=t.getHours()%12;return 0===e&&(e=12),e},"%H":function(t){var e=t.getHours();return e<10?"0"+e:e},"%G":function(t){return t.getHours()},"%i":function(t){var e=t.getMinutes();return e<10?"0"+e:e},"%s":function(t){var e=t.getSeconds();return e<10?"0"+e:e},"%a":function(t){return t.getHours()>=12?"pm":"am"},"%A":function(t){return t.getHours()>=12?"PM":"AM"},"%u":function(t){return t.getMilliseconds()}},l={"%d":function(t,e,i,n){var o=/(^([0-9][0-9])$)/i.test(e);if(n)return o;o?t.setDate(Number(e)):t.setDate(Number(1))},"%j":function(t,e,i,n){var o=/(^([0-9]?[0-9])$)/i.test(e);if(n)return o;o?t.setDate(Number(e)):t.setDate(Number(1))},"%m":function(t,e,i,n){var o=/(^([0-9][0-9])$)/i.test(e);if(n)return o;o?t.setMonth(Number(e)-1):t.setMonth(Number(0)),o&&t.getMonth()!==Number(e)-1&&t.setMonth(Number(e)-1)},"%n":function(t,e,i,n){var o=/(^([0-9]?[0-9])$)/i.test(e);if(n)return o;o?t.setMonth(Number(e)-1):t.setMonth(Number(0)),o&&t.getMonth()!==Number(e)-1&&t.setMonth(Number(e)-1)},"%M":function(t,i,n,r){var a=(0,o.findIndex)(e.locale.monthsShort,(function(t){return t===i}));if(r)return-1!==a;-1===a?t.setMonth(0):t.setMonth(a),-1!==a&&t.getMonth()!==a&&t.setMonth(a)},"%F":function(t,i,n,r){var a=(0,o.findIndex)(e.locale.months,(function(t){return t===i}));if(r)return-1!==a;-1===a?t.setMonth(0):t.setMonth(a),-1!==a&&t.getMonth()!==a&&t.setMonth(a)},"%y":function(t,e,i,n){var o=/(^([0-9][0-9])$)/i.test(e);if(n)return o;o?t.setFullYear(Number("20"+e)):t.setFullYear(Number("2000"))},"%Y":function(t,e,i,n){var o=/(^([0-9][0-9][0-9][0-9])$)/i.test(e);if(n)return o;o?t.setFullYear(Number(e)):t.setFullYear(Number("2000"))},"%h":function(t,e,i,n){var o=/(^0[1-9]|1[0-2]$)/i.test(e);if(n)return o;o&&("am"===i||"pm"===i)||"AM"===i||"PM"===i?t.setHours(Number(e)):t.setHours(Number(0))},"%g":function(t,e,i,n){var o=/(^[1-9]$)|(^0[1-9]|1[0-2]$)/i.test(e);if(n)return o;o&&("am"===i||"pm"===i)||"AM"===i||"PM"===i?t.setHours(Number(e)):t.setHours(Number(0))},"%H":function(t,e,i,n){var o=/(^[0-2][0-9]$)/i.test(e);if(n)return o;o?t.setHours(Number(e)):t.setHours(Number(0))},"%G":function(t,e,i,n){var o=/(^[1-9][0-9]?$)/i.test(e);if(n)return o;o?t.setHours(Number(e)):t.setHours(Number(0))},"%i":function(t,e,i,n){var o=/(^([0-5][0-9])$)/i.test(e);if(n)return o;o?t.setMinutes(Number(e)):t.setMinutes(Number(0))},"%s":function(t,e,i,n){var o=/(^([0-5][0-9])$)/i.test(e);if(n)return o;o?t.setSeconds(Number(e)):t.setSeconds(Number(0))},"%u":function(t,e,i,n){var o=/(^([0-9][0-9][0-9])$)/i.test(e);if(n)return o;o?t.setMilliseconds(Number(e)):t.setMilliseconds(Number(0))},"%a":function(t,e,i,n){if(n)return"pm"===e||"am"===e;"pm"===e&&t.setHours(t.getHours()+12)},"%A":function(t,e,i,n){if(n)return"PM"===e||"AM"===e;"PM"===e&&t.setHours(t.getHours()+12)}};function s(t){for(var e=[],i="",n=0;n<t.length;n++)"%"===t[n]?(i.length>0&&(e.push({type:r.separator,value:i}),i=""),e.push({type:r.datePart,value:t[n]+t[n+1]}),n++):i+=t[n];return i.length>0&&e.push({type:r.separator,value:i}),e}!function(t){t[t.separator=0]="separator",t[t.datePart=1]="datePart"}(r||(r={})),e.getFormattedDate=function(t,e){return s(t).reduce((function(t,i){return i.type===r.separator?t+i.value:a[i.value]?t+a[i.value](e):t}),"")},e.getExcelDate=function(t){return t?25569+(t.getTime()-6e4*t.getTimezoneOffset())/864e5:null};var c={"%Y":1,"%y":1,"%M":2,"%F":2,"%m":2,"%n":2};function d(t,e,i){if("string"==typeof t){e=e.replace(/([a-z])(%a)/i,(function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t=t.replace(/(am|pm)/i," $&"),e[1]+" "+e[2]}));for(var n,o=s(e),a=new Array(2),d=0,u=null,h="Incorrect date, see docs: https://docs.dhtmlx.com/suite/calendar__api__calendar_dateformat_config.html",f=function(t){var e=c[t.formatter];e?a[e-1]=t:("%A"!==t.formatter&&"%a"!==t.formatter||(n=t.value),a.push(t))},p=0;p<o.length;p++)if(o[p].type===r.separator){var g=t.indexOf(o[p].value,d);if(-1===g){if(i)return!1;throw new Error(h)}u&&(f({formatter:u,value:t.slice(d,g)}),u=null),d=g+o[p].value.length}else if(o[p].type===r.datePart){if(o[p+1]&&o[p+1].type!==r.separator){if(i)return!1;throw new Error(h)}u=o[p].value}u&&f({formatter:u,value:t.slice(d)});for(var v=new Date(0),_=0,m=a;_<m.length;_++){var y=m[_];if(y&&l[y.formatter]){if(i&&!l[y.formatter](v,y.value,n,i))return!1;l[y.formatter](v,y.value,n)}}return!!i||v}}e.stringToDate=d;e.DateHelper=function(){function t(){}return t.copy=function(t){return new Date(t)},t.fromYear=function(t){return new Date(t,0,1)},t.fromYearAndMonth=function(t,e){return new Date(t,e,1)},t.weekStart=function(t,e){var i=(t.getDay()+7-e)%7;return new Date(t.getFullYear(),t.getMonth(),t.getDate()-i)},t.monthStart=function(t){return new Date(t.getFullYear(),t.getMonth(),1)},t.yearStart=function(t){return new Date(t.getFullYear(),0,1)},t.dayStart=function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())},t.addDay=function(t,e){return void 0===e&&(e=1),new Date(t.getFullYear(),t.getMonth(),t.getDate()+e)},t.addMonth=function(t,e){return void 0===e&&(e=1),new Date(t.getFullYear(),t.getMonth()+e)},t.addYear=function(t,e){return void 0===e&&(e=1),new Date(t.getFullYear()+e,t.getMonth())},t.withHoursAndMinutes=function(t,e,i,n){return void 0===n||!n&&12===e||n&&12!==e?new Date(t.getFullYear(),t.getMonth(),t.getDate(),e,i):n&&12===e?new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,i):new Date(t.getFullYear(),t.getMonth(),t.getDate(),e+12,i)},t.setMonth=function(t,e){t.setMonth(e)},t.setYear=function(t,e){t.setFullYear(e)},t.mergeHoursAndMinutes=function(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),e.getHours(),e.getMinutes())},t.isWeekEnd=function(t){return 0===t.getDay()||6===t.getDay()},t.getTwelweYears=function(t){var e=t.getFullYear(),i=e-e%12;return(0,n.range)(i,i+11)},t.getDayOrdinal=function(t){return(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())-Date.UTC(t.getFullYear(),0,1))/864e5},t.getWeekNumber=function(e){var i=4===e.getDay()?e:t.addDay(e,4-e.getDay()),n=t.getDayOrdinal(i);return Math.trunc(n/7)+1},t.isSameDay=function(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()},t.toDateObject=function(t,e){return"string"==typeof t?d(t,e):new Date(t)},t.nullTimestampDate=new Date(0),t}();e.stripTime=function(t,e){return void 0===e&&(e=!1),e?new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes()):new Date(t.getFullYear(),t.getMonth(),t.getDate())}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.formatValue=e.clearCells=e.normalizeCell=e.getReducedRowspan=e.getReducedColspan=e.getSpanHeight=e.getWidth=void 0;var o=i(13);e.getWidth=function(t,e,i){return t.slice(i,i+(e||1)).filter((function(t){return!t.hidden})).reduce((function(t,e){return t+e.$width}),0)},e.getSpanHeight=function(t,e){var i=e.$rowsVisibility;return t.slice(i[0],i[1]+1).reduce((function(t,e){return t+e.$height}),0)},e.getReducedColspan=function(t,e,i){var n=t.findIndex((function(t){return t.id===e}));return t.slice(n,n+(i||1)).filter((function(t){return!t.hidden})).length},e.getReducedRowspan=function(t,e,i,n){var o,r=n.rowspan||1;if(t.length===e.length)return r;var a=null!==(o=null==t?void 0:t.findIndex((function(t){return t.id===n.row})))&&void 0!==o?o:-1,l=0;if(-1!==a)for(var s=1;s<r;s++){var c=e[i-l+s],d=t[a+s];(null==c?void 0:c.id)!==(null==d?void 0:d.id)&&l++}return r-l},e.normalizeCell=function(t,e){if(t){var i=t.row,n=t.column,o=e.getSpan(i.id,n.id);return o?{row:i.id===o.row?i:e.data.getItem(o.row),column:n.id===o.column?n:e.config.columns.find((function(t){return t.id===o.column}))}:t}},e.clearCells=function(t,e){var i=new Map(e.map((function(t){var e=t.row;return[e.id,e]}))),o=new Map(e.map((function(t){var e=t.column;return[e.id,e]}))),r=[],a=[],l=0;i.forEach((function(e){var s={};o.forEach((function(t,e){!1!==t.editable&&(s[e]="")})),r.push(n({},e)),a.push(n({id:e.id},s)),t.data.update(e.id,s,l<i.size-1),++l})),t.history&&t.history.add({type:"change",batch:a,inverse:{type:"change",batch:r}}),t.paint()},e.formatValue=function(t,e){var i=e.column,n=e.row,r=t;switch(i.type){case"number":var a=parseFloat(null==r?void 0:r.toString().replace(/[^0-9.-]/g,""));return isNaN(a)?n[i.id]:a;case"boolean":if("boolean"==typeof r)return r;var l=null==r?void 0:r.toString().toLowerCase();return"true"===l||"1"===l||"yes"===l||"false"!==l&&"0"!==l&&"no"!==l&&n[i.id];case"date":var s=i.dateFormat||"%M %d %Y";if(!(0,o.stringToDate)(r,s,!0)){var c=new Date(r);r=(null==c?void 0:c.valueOf())?(0,o.getFormattedDate)(s,c):n[i.id]}}return r}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataProxy=void 0;var n=i(23),o=function(){function t(t,e){void 0===e&&(e={}),this.url=this._url=t,this.config=e}return t.prototype.updateUrl=function(t,e){for(var i in void 0===e&&(e={}),this._url=this.url=t||this._url,this.url+=this.url.includes("?")?"&":"?",e)this.config[i]=e[i],this.url+="".concat(i,"=").concat(encodeURIComponent(e[i]),"&");this.url=this.url.slice(0,-1)},t.prototype.load=function(){return n.ajax.get(this.url,void 0,this.config)},t.prototype.save=function(t,e){switch(e){case"delete":return n.ajax.delete(this.url,t,this.config);case"update":return n.ajax.put(this.url,t,this.config);default:return n.ajax.post(this.url,t,this.config)}},t}();e.DataProxy=o},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionEvents=void 0,function(t){t.beforeUnSelect="beforeunselect",t.afterUnSelect="afterunselect",t.beforeSelect="beforeselect",t.afterSelect="afterselect"}(n||(e.SelectionEvents=n={}))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.focusManager=void 0;var n=i(2),o=function(){function t(){var t=this;this._initHandler=function(e){return t._activeWidgetId=(0,n.locate)(e,"data-dhx-widget-id")},this._removeFocusClass=function(t){var e=document.body.classList;e.contains("utilityfocus")&&e.remove("utilityfocus")},this._addFocusClass=function(t){var e=document.body.classList;"Tab"===t.code?e.contains("utilityfocus")||e.add("utilityfocus"):e.contains("utilityfocus")&&e.remove("utilityfocus")},document.addEventListener("focusin",this._initHandler),document.addEventListener("pointerdown",this._initHandler),document.addEventListener("mousedown",this._removeFocusClass),document.addEventListener("keydown",this._addFocusClass)}return t.prototype.getFocusId=function(){return this._activeWidgetId},t.prototype.setFocusId=function(t){this._activeWidgetId=t},t}();e.focusManager=new o},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.removePatternMask=e.patternMask=e.removeNumberMask=e.numberMask=void 0;var o=i(0);e.numberMask=function(t,e,i){var n,r,a,l=e.prefix||"",s=e.suffix||"",c=e.maxIntLength,d=e.maxDecLength,u=e.minDecLength,h=null!==(n=e.groupSeparator)&&void 0!==n?n:",",f="number"!=typeof d||d?null!==(r=e.decSeparator)&&void 0!==r?r:".":"",p=!1,g=t.toString(),v="-"===g[0];v&&!1===e.allowNegative&&(g=g.slice(1),v=!1);var _=g.split(".");if((0,o.isDefined)(c)){var m=c+(v?1:0);_[0].length>m&&(_[0]=_[0].slice(0,m),p=!0)}if((0,o.isDefined)(d)&&(null===(a=_[1])||void 0===a?void 0:a.length)>d&&(_[1]=_[1].slice(0,d),p=!0),e.onlyView&&u&&_[0])for(_[1]||(_[1]="");_[1].length<u;)_[1]+="0";_[0]=_[0].replace(/\B(?=(\d{3})+(?!\d))/g,h);var y=l+(g=_.join(f))+s;if(g.length||(y=""),i){var b=i.value.length,x=i.selectionStart,w=y.length-b,C=x+w,S=0;v&&g[S+2]!==f&&++S,"0"===g[S]&&g.length>1&&g[1]!==f&&(y=l+"0"+s),g[S]===f&&(y=v?l+"-0"+f+s:l+"0"+f+s,++C),C>y.length?C=y.length:C<0&&(C=0),s&&y.length-s.length<=C&&(C=C-s.length+(y.length-C)),y[C-1]===h&&--C,p&&-1===w&&y[++C-1]===h&&C++,i.value=y,i.setSelectionRange(C,C),i.focus()}return y},e.removeNumberMask=function(t,e){var i,n=e.decSeparator||".",o=null===(i=e.allowNegative)||void 0===i||i;e.prefix&&t.startsWith(e.prefix)&&(t=t.slice(e.prefix.length)),e.suffix&&t.endsWith(e.suffix)&&(t=t.slice(0,t.length-e.suffix.length));var r=o&&"-"===t[0]?"-":"",a=t.split(n),l=a[0],s=a.slice(1),c=(t=s.length?l+n+s.join(""):l).replace(new RegExp("[^0-9\\".concat(n,"]"),"g"),"").replace(new RegExp("\\".concat(n)),".");return e.lastCall&&("."===c[c.length-1]&&(c=0==+c?"":c.slice(0,-1)),(isNaN(+c)||0==+c)&&(r="")),r+c};var r={0:/\d/,a:/[A-Za-z]/,"#":/[A-Za-z0-9]/,"*":/./};function a(t,e){var i="",o=e,a=n({},r);"object"==typeof e&&(o="function"==typeof e.pattern?e.pattern(t):e.pattern,a=n(n({},a),e.charFormat||{}));for(var l=0;l<t.length;l++)a[o[l]]&&(i+=t[l]);return i}e.patternMask=function(t,e,i){var o,l;t=(null===(o=null==i?void 0:i.value)||void 0===o?void 0:o.toString())||t.toString();var s=e,c=n({},r);if("object"==typeof e&&(s="function"==typeof e.pattern?e.pattern(t):e.pattern,c=n(n({},c),e.charFormat||{})),l=function(t,e,i){if(void 0===i&&(i={}),!t)return"";var o="",a=0,l=!1,s=!1;i=n(n({},r),i);for(var c=0;c<e.length;c++){var d=i[u=e[c]];if(d){for(;a<t.length&&!d.test(t[a]);)a++;if(!(a<t.length))break;o+=t[a],a++,l=!0}else a<t.length&&(o+=u,t.length>1&&t[a]===u&&a++)}for(c=o.length;c<e.length;c++)if(i[e[c]]){s=!0;break}if(!s)for(c=o.length;c<e.length;c++){var u;if(i[u=e[c]])break;o+=u}if(s&&o.length>0&&!i[e[o.length-1]]){for(var h=o.length-1;h>=0&&!i[e[h]];)h--;o=o.substring(0,h+1)}return l||(o=""),o}(t,s,c),i){var d=a(i.value,e),u=a(l,e),h=i.selectionStart||0;if(d.length===u.length)if(d!==u)for(;h<s.length&&!c[s[h-1]]||0===h&&!c[s[h]];)h++;else for(;h>0&&!c[s[h-1]];)h--;else if(d.length<u.length)for(;h<s.length&&!c[s[h-1]]||0===h&&!c[s[h]];)h++;0===h&&(h=l.length),i.value=l,i.setSelectionRange(h,h),i.focus()}return l},e.removePatternMask=a},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeSpan=e.getShifts=e.getSpans=e.getCells=e.getHandlers=void 0;var o=i(0),r=i(1),a=i(14),l=i(5),s=i(3),c=i(90),d=i(2),u=i(4),h=i(7);function f(t,e,i,n,o){e=(0,d.locateNodeByClassName)(o.target,"dhx_grid-fixed-cols-wrap")?0:e;var r=(0,d.locateNodeByClassName)(o.target,"dhx_grid-cell"),a=(0,d.locateNodeByClassName)(o.target,"dhx_span-cell");if((r||a)&&n){var l=r?r.parentNode:a,s=(r||a).getAttribute("data-dhx-col-id"),c=i.filteredColumns.find((function(t){return t.id===s})),u=l.getAttribute("data-dhx-id"),h=(i.$data||i.data).find((function(t){return t.id.toString()===u}));n.toLocaleLowerCase().includes("touch")?i._events.fire(n,[h,c,o]):i.events.fire(n,[h,c,o])}}function p(t,e,i,n){return(0,c.getEditor)(t,e,i,n)}function g(t){var e=t.$scrollBarWidth,i=t.$totalWidth-t.$width+h.BORDERS+e.y,n=t.$totalHeight-t.$height+t.$headerHeight+t.$footerHeight+h.BORDERS+e.x;return{x:i>0?i-t.scroll.left:0,y:n>0?n-t.scroll.top:0}}e.getHandlers=function(t,e,i){return{onclick:[f,t,e,i,s.GridEvents.cellClick],onmouseover:[f,t,e,i,s.GridEvents.cellMouseOver],onmousedown:[f,t,e,i,s.GridEvents.cellMouseDown],ondblclick:[f,t,e,i,s.GridEvents.cellDblClick],oncontextmenu:[f,t,e,i,s.GridEvents.cellRightClick],ontouchstart:[f,t,e,i,s.GridEvents.cellMouseDown],ontouchmove:[f,t,e,i,s.GridSystemEvents.cellTouchMove],ontouchend:[f,t,e,i,s.GridSystemEvents.cellTouchEnd]}},e.getCells=function(t){var e;if(!t.data||!t.filteredColumns)return[];var i,a="tree"===t.type,s="row"===(null===(e=t.selection.config)||void 0===e?void 0:e.type),c=t.$positions,d=("render"!==t.$renderFrom?t.data.slice(c.yStart,c.yEnd):t.currentRows)||[],h=t.filteredColumns.slice(c.xStart,c.xEnd),f=t.selection.getCell(),g=document.querySelector(".dhx_drag-ghost");if(g){var v=Array.from(g.querySelectorAll(".dhx_grid-row")).map((function(t){return Number(t.getAttribute("aria-rowindex"))-1}));v.length&&(i=v.map((function(e){return t.data[e]})).filter((function(t){return t&&!d.find((function(e){return e.id===t.id}))})),d.push.apply(d,i))}return d.map((function(e,g){var v,_=null==i?void 0:i.some((function(t){return t.id===e.id})),m=d.length-1===g,y=null===(v=t.$subRowCells)||void 0===v?void 0:v.get(e.id),b="";t.rowCss&&(b=t.rowCss(e)),e.$css&&(b+=e.$css);var x=h.map((function(i,a){var d,h;if(!i.hidden){var g=e[i.id],v=(0,o.isDefined)(g)&&i.options?(0,u.getComboEditorValue)(g,i,e):(0,u.applyPattern)(g,i),_=i.template?i.template((0,o.isDefined)(v)?v:"",e,i):"boolean"!=typeof(h=v)&&"boolean"!==i.type||"string"==typeof h||e.$group?h||0===h?h:"":"".concat(Boolean(h));"string"==typeof _&&(_=(0,l.isHtmlEnable)(t,i)?(0,r.el)("div.dhx_grid-cell__content",n({".innerHTML":_},{role:"button","aria-label":"Edit content"})):_);var m="".concat(i.$cellCss&&i.$cellCss[e.id]||""," dhx_").concat(i.type,"-cell").replace(/\s+/g," "),b=i.$width,x=t.$editable&&t.$editable.row===e.id&&t.$editable.col===i.id&&!t.$editable.isSpan,w=t.leftSplit,C=t.filteredColumns;(x||"boolean"===i.type&&(t.editable&&(null===(d=i.editable)||void 0===d||d)||!t.editable&&i.editable)&&!e.$group)&&(_=p(e,i,t).toHTML(),m+=" dhx_grid-cell__editable",w===C.indexOf(i)+1&&(b-=1));var S=t.firstColId===i.id&&(null==y?void 0:y.toggleIcon)&&!!(null==y?void 0:y.height);return"tree"===t.type&&t.firstColId===i.id||S?function(t,e,i,o,a,l){var s;void 0===a&&(a=!1),void 0===l&&(l=1);var c=o.selection.getCell(),d="row"===(null===(s=o.selection.config)||void 0===s?void 0:s.type),h=o.$editable&&o.$editable.row===e.id&&o.$editable.col===i.id,f=!o.fixedColumns.left.length||"leftFixedCols"===o.$renderFrom,p=i.align?"dhx_align-".concat(i.align):"dhx_align-left",g="";f&&(g="dhx_tree-cell ".concat(i.$cellCss[e.id]||""," ").concat(p),(e.$items||a)&&(g+=" dhx_grid-expand-cell"),h&&(g+=" dhx_tree-editing-cell"),o.dragMode&&!h&&(g+=e.$draggable?" dhx_grid-cell--draggable":""));var v=(0,u.getTreeCellWidthOffset)(e,!0);return(0,r.el)(".dhx_grid-cell",n({class:g,style:{width:i.$width,height:e.$height,padding:e.$items?0:"0 0 0 ".concat(v,"px")},"data-dhx-col-id":i.id},function(t,i){var r,a;return n(n({role:"gridcell","aria-colindex":i,"aria-readonly":o.editable?"false":"true"},!d&&{"aria-selected":o.selection.isSelectedCell(e.id,t.id)?"true":"false"}),{tabindex:(null===(r=null==c?void 0:c.row)||void 0===r?void 0:r.id)===e.id&&(null===(a=null==c?void 0:c.column)||void 0===a?void 0:a.id)===t.id?0:-1})}(i,l)),f?[e.$items||a?(0,r.el)(".dhx_grid-expand-cell-icon",n(n({class:e.$opened?"dxi dxi-chevron-down":"dxi dxi-chevron-right","data-dhx-id":e.id},function(t){return{role:"button","aria-label":t.$opened?"Collapse group":"Expand group"}}(e)),{style:{padding:e.$level?"0 0 0 ".concat(4+v,"px"):"0 0 0 4px"}})):null,(0,r.el)(".dhx_tree-cell",{class:p+"".concat(o.autoHeight?" dhx_tree-cell_auto-height":"")},[t])]:null)}(_,e,i,t,S,c.xStart+a+1):(t.dragMode&&!x&&(m+=e.$draggable?" dhx_grid-cell--draggable":""),i.align&&(m+=" dhx_align-".concat(i.align)),(0,l.isHtmlEnable)(t,i)&&(m+=" dhx_grid-cell__content_html-enable"),t.autoHeight&&(m+=" dhx_grid-cell__content_auto-height"),(0,r.el)(".dhx_grid-cell",n({class:m,style:{width:b,height:e.$height+"px"},_key:i.id,"data-dhx-col-id":i.id},function(i,o,r,a){return n(n({role:"gridcell","aria-colindex":o,"aria-readonly":a?"false":"true"},!s&&{"aria-selected":t.selection.isSelectedCell(e.id,i.id)?"true":"false"}),function(t,e){var i={tabindex:-1};return f?f.row.id===e.id&&f.column.id===t.id&&(i.tabindex=0):i.tabindex=0,i}(i,e))}(i,c.xStart+a+1,0,t.editable)),[_]))}})),w=(0,u.getTotalRowHeight)(e);return(0,r.el)(".dhx_grid-row",n({style:{height:m?w+1:w,display:_?"none":null},"data-dhx-id":e.id,class:b,_key:e.id,_flags:r.KEYED_LIST},_?{}:function(e,i){var o,r=n({role:"row","aria-rowindex":e},s&&{"aria-selected":t.selection.isSelectedCell(i.id)?"true":"false"});return a&&i&&(r["aria-level"]=(null!==(o=i.$level)&&void 0!==o?o:0)+1,i.$items&&(r["aria-expanded"]=i.$opened?"true":"false")),r}(c.yStart+g+1,e)),x)}))},e.getSpans=function(t,e){var i,c,d=[],f=t.columns,v=t.filteredColumns,_=t.data,m=t.currentSpans,y=t.bottomSplit,b=void 0===y?0:y;if(!v.length||!m)return null;for(var x=t.fixedColumns.right.length,w=m.filter((function(e){var i;return null===(i=e.$renderFrom)||void 0===i?void 0:i.includes(t.$renderFrom)})),C=w.sort((function(t,e){return"string"==typeof t.row&&"string"==typeof e.row?t.row.localeCompare(e.row):t.row-e.row})),S=function(m){var y=C[m].row,w=C[m].column,S=C[m].$rowsVisibility[1]-C[m].$rowsVisibility[0]+1,E=C[m].$colsVisibility[1]-C[m].$colsVisibility[0]+1,D=C[m].text,O=C[m].css,k=e===s.Split.bottom&&t.$renderFrom.endsWith("FixedCols"),T=k?t.$data:_,R=null==v?void 0:v.findIndex((function(t){return"".concat(t.id)==="".concat(w)})),M=null==T?void 0:T.findIndex((function(t){return"".concat(t.id)==="".concat(y)}));if(R<0||M<0)return"continue";if(k){var I=t.$data[M+S-1];if(!_.find((function(t){return t.id===(null==I?void 0:I.id)})))return"continue"}var P=v[R],H=T[M],F=P.$cellCss[y],A=(0,o.isDefined)(C[m].text)?"string":P.type;if(P.hidden)return"continue";var j=void 0;if((0,o.isDefined)(D))if("function"==typeof D){var $=n(n({},t.commonSummary),t.colSummary[w]);"string"==typeof P.summary&&"count"!==P.summary&&($[P.summary]=(0,u.applyPattern)($[P.summary],P)),j=D($)}else j=D.toString();else j=void 0===H[w]?"":(0,u.applyPattern)(H[w],P);if("function"!=typeof D){var L=P.template||function(t,e,i){return t||0===t?t:""};j=L(j,H,P)}var N=(0,l.isHtmlEnable)(t,P);j="string"==typeof j?(0,r.el)("div.dhx_span-cell-content",{class:t.autoHeight?" dhx_grid-cell__content_auto-height":"",".innerHTML":N?j:null},N?null:j):j;var V=void 0;if("bottomFixedRows"===t.$renderFrom||k){var W=T.length-b;V=M<W?-(0,l.getTotalHeight)(T.slice(M,W)):(0,l.getTotalHeight)(T.slice(W,M))}else V=(0,l.getTotalHeight)(T.slice(0,M))-(e?0:1);var B=0;if("rightFixedCols"===t.$renderFrom){var z=v.length-t.fixedColumns.right.length;B=R<z?-(0,l.getTotalWidth)(v.slice(R,z)):(0,l.getTotalWidth)(v.slice(z,R))}else for(var G=R-1;G>=0;G--)B+=v[G].$width;var Y=H.$items&&0===R,U=R===v.length-1,X=R+E===v.length,q=x&&R===v.length-x,K=e===s.Split.bottom&&t.fixedRows.bottom.find((function(t){return t.id===y})),Z=!!b&&M+S>T.length-b,J=!!x&&R+E===v.length-x,Q=P.header[0].text?" dhx_span-cell":" dhx_span-cell dhx_span-cell--title";Q+=Y?" dhx_span-expand-cell":"",Q+=F?" ".concat(F):"",Q+=O?" ".concat(O):"",Q+=0===M?" dhx_span-first-row":"",Q+=M+S===T.length?" dhx_grid__span_bottom--last-row":"",Q+=0===R||q?" dhx_span-first-col":"",Q+=U||X?" dhx_span-last-col":"",Q+=1===E?" dhx_span-".concat(P.type||"string","-cell"):" dhx_span-string-cell",Q+=P.align?" dhx_align-".concat(P.align):" dhx_".concat(A,"-cell"),Q+=K?" dhx_grid__span_bottom--all-fixed":"",Q+=Z?" dhx_grid__span_bottom--part-fixed":"",Q+=J?" dhx_grid__span_right--before-fixed":"";var tt=void 0;if(E>1){var et=f.findIndex((function(t){return t.id===w}));tt=(0,a.getWidth)(f,C[m].colspan,et)}else tt=P.$width;var it=void 0;if(S>1){if(it=(0,a.getSpanHeight)(T,C[m]),e===s.Split.top&&t.$renderFrom.endsWith("FixedCols")){var nt=M+S-T.length;if(nt>0){var ot=t.fixedRows.top.length;it+=(0,l.getTotalHeight)(t.$data.slice(ot,ot+nt))}}}else it=H.$height;var rt=null;if((null===(i=t.$editable)||void 0===i?void 0:i.isSpan)&&t.$editable.row===y&&t.$editable.col===w||"boolean"===P.type&&(t.editable&&(null===(c=P.editable)||void 0===c||c)||!t.editable&&P.editable)){var at=t.topSplit,lt=void 0===at?0:at,st=t.fixedColumns.left.length,ct=st&&R+E<=st||x&&R>=v.length-x,dt=M<lt||M+S>T.length-b,ut=lt&&M+S<=lt||b&&M>=T.length-b,ht=R<st||R+E>v.length-x;if("render"===t.$renderFrom||ct&&!dt||ut&&!ht){var ft=t.$height,pt=t.$scrollBarWidth,gt=t.scroll,vt=t.fixedRows,_t=t.fixedColumns,mt=C[m].text,yt=0;if(j=p(H,P,t,C[m]).toHTML(mt),Q+=" dhx_span__editable",!ut){var bt=(0,l.getTotalHeight)(vt.top),xt=(0,l.getTotalHeight)(vt.bottom),wt=pt.yState?ft-t.$headerHeight-t.$footerHeight-pt.x-h.BORDERS:t.$totalHeight,Ct=V+it-gt.top,St=V-bt<gt.top,Et=Ct>wt-xt;St&&Et&&pt.xState&&(yt=1),V=St?gt.top+bt-(bt&&!ct?1:0):V,it=Et?wt-V-xt+gt.top-yt:St?Ct-bt:it}if("render"===t.$renderFrom){if(rt=14,_t.left.find((function(t){return t.id===w}))&&(B=gt.left+(0,l.getTotalWidth)(_t.left.slice(0,R)),!ct)){var Dt=(0,l.getTotalWidth)(_t.left.slice(R,st));tt=tt-gt.left>Dt?tt-gt.left:Dt}if(vt.top.find((function(t){return t.id===y}))&&(V=gt.top+(0,l.getTotalHeight)(vt.top.slice(0,M)),!ut)){var Ot=(0,l.getTotalHeight)(t.fixedRows.top.slice(M,t.topSplit));it=it>0?Ot+it-yt:Ot}if(_t.right.find((function(t){return t===v[v.indexOf(P)+E-1]}))){var kt=v.length,Tt=g(t),Rt=kt-v.indexOf(P)-E,Mt=(Dt=Rt?(0,l.getTotalWidth)(_t.right.slice(0,-Rt)):(0,l.getTotalWidth)(_t.right),(0,l.getTotalWidth)(v.slice(R,kt-x)));B=Tt.x>Mt?B-Tt.x+Mt:B,ct||(tt=Tt.x<Mt?tt-Tt.x-1:Dt-1)}if(vt.bottom.find((function(t){return t===T[T.indexOf(H)+S-1]}))){kt=T.length,Tt=g(t);var It=kt-T.indexOf(H)-S,Pt=(Ot=It?(0,l.getTotalHeight)(vt.bottom.slice(0,-It)):(0,l.getTotalHeight)(t.fixedRows.bottom),(0,l.getTotalHeight)(T.slice(M,kt-b)));V=Tt.y>Pt?V-Tt.y+Pt:V,ut||(it=Tt.y<Pt?Ot+it-yt-(It?-1:yt?0:1):Ot-(It?-1:1))}}st===R+1&&(tt-=1),R===v.length-x&&(B+=1,tt-=1)}}d.push((0,r.el)("div",{class:Q,style:{width:tt,height:it,top:V,left:B,zIndex:rt},"data-dhx-col-id":w,"data-dhx-id":y,"aria-instead":"true"},[Y?(0,r.el)(".dhx_span-expand-cell-icon",{class:H.$opened?"dxi dxi-chevron-down":"dxi dxi-chevron-right","data-dhx-id":H.id,role:"button","aria-label":H.$opened?"Collapse group":"Expand group",style:{padding:"0 0 0 ".concat(4+(0,u.getTreeCellWidthOffset)(H,!0),"px")}}):null,j]))},E=0;E<C.length;E++)S(E);return d},e.getShifts=function(t){var e=t.filteredColumns.slice(0,t.$positions.xStart),i=t.data.slice(0,t.$positions.yStart);return{x:(0,l.getTotalWidth)(e),y:(0,l.getTotalHeight)(i)}},e.normalizeSpan=function(t,e,i){var o=e.topSplit,r=void 0===o?0:o,l=e.bottomSplit,c=void 0===l?0:l,d=e.columns,u=t.column,f=t.row,p=t.colspan,g=t.rowspan,v=i.getRawData(0,-1,null,2),_=d.filter((function(t){return!t.hidden})),m=_.findIndex((function(t){return t.id==u})),y=v.findIndex((function(t){return t.id==f})),b=m+(p?(0,a.getReducedColspan)(d,u,p)-1:0),x=y+(g?(0,a.getReducedRowspan)(i.getInitialData(),v,y,t)-1:0),w=-1===m?[]:[m,b],C=-1===y?[]:[y,x],S=[];if(-1!==m&&-1!==y){var E=(0,h.getCurrFixedCols)(e,s.Split.left).length,D=(0,h.getCurrFixedCols)(e,s.Split.right).length,O=m<E,k=y<r,T=b>=_.length-D,R=x>=v.length-c;b>=E&&x>=r&&m<_.length-D&&y<v.length-c&&S.push("render"),O&&S.push("leftFixedCols"),T&&S.push("rightFixedCols"),!k||O||T?k&&!S.includes("render")&&S.push("render"):S.push("topFixedRows"),!R||O||T?R&&!S.includes("render")&&S.push("render"):S.push("bottomFixedRows")}return n(n({},t),{$renderFrom:S,$rowsVisibility:C,$colsVisibility:w})}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.defaultHistoryConfig=e.defaultDragPanelConfig=e.defaultSubRowConfig=e.getGroupDefaultConfig=void 0;var o=i(56);e.getGroupDefaultConfig=function(t){return"boolean"==typeof t&&(t={}),n(n({type:"column",panel:!0,panelHeight:40,hideableColumns:!0,showMissed:!0},t),{column:n({id:"string"==typeof t.column?t.column:null,header:[{text:o.default.groupText}]},"string"==typeof t.column?{}:t.column)})},e.defaultSubRowConfig={height:200,padding:8,toggleIcon:!0,expanded:!1,preserve:!1,fullWidth:!1},e.defaultDragPanelConfig={width:26,icon:"dxi dxi-drag-vertical"},e.defaultHistoryConfig={limit:15}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getContent=e.HeaderFilterEvent=void 0;var n,o=i(1),r=i(4),a=i(0),l=i(118),s=i(119),c=i(120);!function(t){t.change="change"}(n||(e.HeaderFilterEvent=n={})),e.getContent=function(t){return{inputFilter:{element:{},value:{},toHtml:function(e,i){var n=this,o=(0,a.uid)(),r=e.id.toString(),l=this.element[r];if(l)l.value=this.value[r];else{var s=e.header.find((function(t){return void 0!==t.filterConfig}));(l=new c.InputFilter({column:e,config:i,id:o,value:this.value[r],headerConfig:s,grid:t})).events.on("change",(function(t){n.value[r]=t})),this.element[r]=l}return l.toHTML()},match:function(t){var e=t.val,i=t.match,n=t.col;if(!(0,a.isDefined)(e))return!1;var o=String(i).toLowerCase();if(!o)return!0;var l=(0,r.applyPattern)(e,n),s=e.toString();return l&&String(l).toLowerCase().includes(o)||s&&s.toLowerCase().includes(o)}},selectFilter:{element:{},value:{},toHtml:function(e,i){var n=this,o=e.id.toString(),r=this.element[o];return r?(r.value=this.value[o],r.data=e.$activeFilterData||e.$uniqueData||[]):((r=new s.SelectFilter({column:e,config:i,value:this.value[o],uniqueData:e.$uniqueData,grid:t})).events.on("change",(function(t){n.value[o]=t})),this.element[o]=r),r.toHTML()},match:function(t){var e=t.val,i=t.match,n=t.col,o=(0,r.applyPattern)(e,n);return!i||(o||"boolean"==typeof o)&&o.toString()==i}},comboFilter:{element:{},value:{},toHtml:function(e,i){var n=this,r=e.id.toString(),a=this.element[r];if(a)a.data=e.$uniqueData||[];else{var s=e.header.find((function(t){return void 0!==t.filterConfig}));(a=new l.ComboFilter({column:e,config:i,headerConfig:s,uniqueData:e.$uniqueData,value:this.value[r],grid:t})).events.on("change",(function(t){n.value[r]=t})),this.element[r]=a}return(0,o.inject)(a.getFilter().getRootView())},match:function(t){var e=t.val,i=t.match,n=void 0===i?"":i,o=t.multi,a=void 0!==o&&o,l=t.col,s=(0,r.applyPattern)(e,l);if(Array.isArray(n)){for(var c=!1,d=function(t){if(c=a&&"string"==typeof s?s.split(", ").some((function(e){return e===n[t]})):n[t]===s)return"break"},u=0;u<n.length;u++){if("break"===d(u))break}return!n||!n.length||c}return void 0===n||s===n},destructor:function(){this.value={};var t=this.element;if(t)for(var e in t)t[e].destructor(),delete t[e]}}}}},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.ajax=void 0;var n=i(12),o=i(10);function r(t){return t?t.includes("json")?"json":t.includes("xml")?"xml":"text":"text"}function a(e,i,a,l,s){var c=l||{};if(s&&(c.Accept="application/"+s),"GET"!==a&&(c["Content-Type"]=c["Content-Type"]||"application/json"),"GET"===a){var d=i&&"object"==typeof i?function(t){return Object.keys(t).reduce((function(e,i){var n="object"==typeof t[i]?JSON.stringify(t[i]):t[i];return e.push(i+"="+encodeURIComponent(n)),e}),[]).join("&")}(i):i&&"string"==typeof i?i:"";d&&(e+=e.includes("?")?"&":"?",e+=d),i=null}return window.fetch?("application/json"===c["Content-Type"]&&i&&"object"==typeof i&&(i=JSON.stringify(i)),window.fetch(e,{method:a,body:i||null,headers:c}).then((function(e){if(!e.ok)return e.text().then((function(i){return t.reject({status:e.status,statusText:e.statusText,message:i})}));var i=s||r(e.headers.get("Content-Type"));if("raw"===i)return{headers:Object.fromEntries(e.headers.entries()),url:e.url,body:e.body};if(204!==e.status)switch(i){case"json":return e.json();case"xml":var a=(0,o.toDataDriver)(n.DataDriver.xml);return a?e.text().then((function(t){return a.toJsonObject(t)})):e.text();default:return e.text()}}))):new t((function(t,l){var d=new XMLHttpRequest;for(var u in d.onload=function(){d.status>=200&&d.status<300?("raw"===s&&t({url:d.responseURL,headers:d.getAllResponseHeaders().trim().split(/[\r\n]+/).reduce((function(t,e){var i=e.split(": ");return t[i[0]]=i[1],t}),{}),body:d.response}),204===d.status?t():t(function(t,e){switch(e){case"json":return JSON.parse(t);case"text":default:return t;case"xml":var i=(0,o.toDataDriver)(n.DataDriver.xml);return i?i.toJsonObject(t):{parseError:"Incorrect data driver type: 'xml'"}}}(d.responseText,s||r(d.getResponseHeader("Content-Type"))))):l({status:d.status,statusText:d.statusText})},d.onerror=function(){l({status:d.status,statusText:d.statusText,message:d.responseText})},d.open(a,e),c)d.setRequestHeader(u,c[u]);switch(a){case"POST":case"DELETE":case"PUT":d.send(void 0!==i?JSON.stringify(i):"");break;default:d.send()}}))}e.ajax={get:function(t,e,i){return a(t,e,"GET",i&&i.headers,void 0!==i?i.responseType:void 0)},post:function(t,e,i){return a(t,e,"POST",i&&i.headers,void 0!==i?i.responseType:void 0)},put:function(t,e,i){return a(t,e,"PUT",i&&i.headers,void 0!==i?i.responseType:void 0)},delete:function(t,e,i){return a(t,e,"DELETE",i&&i.headers,void 0!==i?i.responseType:void 0)}}}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.CsvDriver=void 0;var o=i(10),r=function(){function t(t){this.config=n(n({},{skipHeader:0,nameByHeader:!1,rowDelimiter:"\n",columnDelimiter:","}),t),this.config.nameByHeader&&(this.config.skipHeader=1)}return t.prototype.getFields=function(t,e){for(var i=(0,o.splitCsv)(t,this.config.columnDelimiter).map((function(t){return t.replace(/^"(.*)"$/s,"$1").replace(/""/g,'"')})),n={},r=0;r<i.length;r++)n[e?e[r]:r+1]=isNaN(Number(i[r]))?i[r]:parseFloat(i[r]);return n},t.prototype.getRows=function(t){return(0,o.splitCsv)(t,this.config.rowDelimiter)},t.prototype.toJsonArray=function(t){var e=this,i=this.getRows(t),n=this.config.names;if(this.config.skipHeader){var o=i.splice(0,this.config.skipHeader);this.config.nameByHeader&&(n=o[0].trim().split(this.config.columnDelimiter))}return i.map((function(t){return e.getFields(t,n)}))},t.prototype.serialize=function(t,e){var i=t[0]?Object.keys(t[0]).filter((function(t){return!t.startsWith("$")})).join(this.config.columnDelimiter)+this.config.rowDelimiter:"",n=this._serialize(t);return e?n:i+n},t.prototype._serialize=function(t){var e=this;return t.reduce((function(t,i){var n=Object.keys(i),o=n.reduce((function(t,o,r){var a,l;if(o.startsWith("$")||"items"===o)return t;var s=null!==(l=null===(a=i[o])||void 0===a?void 0:a.toString())&&void 0!==l?l:"";return t+(new RegExp("[".concat(e.config.columnDelimiter,'"\n]')).test(s)?'"'.concat(s.replace(/"/g,'""').replace(/\n/g,"\\n"),'"'):s)+(r===n.length-1||n[r+1].startsWith("$")?"":e.config.columnDelimiter)}),"");return i.items?"".concat(t).concat(t?"\n":"").concat(o).concat(e._serialize(i.items)):"".concat(t).concat(t?e.config.rowDelimiter:"").concat(o)}),"")},t}();e.CsvDriver=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyManager=void 0;var n=i(17),o=i(2);function r(t){for(var e=t.toLowerCase().match(/\w+/g),i=0,n="",o=0;o<e.length;o++){var r=e[o];"ctrl"===r?i+=4:"shift"===r?i+=2:"alt"===r?i+=1:n=r}return i+n}var a={Up:"arrowUp",Down:"arrowDown",Right:"arrowRight",Left:"arrowLeft",Esc:"escape",Spacebar:"space"},l=function(){function t(t){var e=this;this._keysStorage={},this._initHandler=function(t){var i;if(t.which>=48&&t.which<=57||t.which>=65&&t.which<=90)i=String.fromCharCode(t.which);else{var r=32===t.which?t.code:t.key;i=(0,o.isIE)()&&a[r]||r}var l=e._keysStorage[(t.ctrlKey||t.metaKey?4:0)+(t.shiftKey?2:0)+(t.altKey?1:0)+(i&&i.toLowerCase())];if(l)for(var s=0;s<l.length;s++){if(e._beforeCall&&!1===e._beforeCall(t,n.focusManager.getFocusId()))return;l[s].handler(t)}},t&&(this._beforeCall=t),document.addEventListener("keydown",this._initHandler)}return t.prototype.destructor=function(){document.removeEventListener("keydown",this._initHandler),this.removeHotKey()},t.prototype.addHotKey=function(t,e){var i=r(t);this._keysStorage[i]||(this._keysStorage[i]=[]),this._keysStorage[i].push({handler:e})},t.prototype.removeHotKey=function(t,e){var i=this;if(t)if(t&&e){var n=r(t),o=function(t){return t.toString().replace(/\n/g,"").replace(/\s/g,"")};this._keysStorage[n].forEach((function(t,r){o(t.handler)===o(e)&&(delete i._keysStorage[n][r],i._keysStorage[n]=i._keysStorage[n].filter((function(t){return t})))}))}else{var a=r(t);delete this._keysStorage[a]}else this._keysStorage={}},t.prototype.exist=function(t){var e=r(t);return!!this._keysStorage[e]},t.prototype.getKeyStorageLength=function(){return Object.keys(this._keysStorage).length},t}();e.KeyManager=l},function(t,e,i){"use strict";var n,o,r;Object.defineProperty(e,"__esModule",{value:!0}),e.MessageContainerPosition=e.Position=e.RealPosition=void 0,function(t){t.left="left",t.right="right",t.top="top",t.bottom="bottom",t.center="center"}(n||(e.RealPosition=n={})),function(t){t.right="right",t.bottom="bottom",t.center="center",t.left="left",t.top="top"}(o||(e.Position=o={})),function(t){t.topLeft="top-left",t.topRight="top-right",t.bottomLeft="bottom-left",t.bottomRight="bottom-right"}(r||(e.MessageContainerPosition=r={}))},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(28),e),o(i(99),e),o(i(29),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Layout=void 0;var r=i(29),a=i(40),l=i(1),s=function(t){function e(e,i){var n=t.call(this,e,i)||this;if(n._root=n.config.parent||n,n._all={},n._parseConfig(),n._progress=!1,n.config.activeTab&&(n.config.activeView=n.config.activeTab),n.config.views&&(n.config.activeView=n.config.activeView||n._cells[0].id,n._isViewLayout=!0),!i.parent){var o=(0,l.create)({render:function(){return n._root&&n.toVDOM()}},n);n.mount(e,o)}return n}return o(e,t),e.prototype.destructor=function(){if(this.unmount(),this.config){for(var t=0,e=this._cells;t<e.length;t++){var i=e[t];null==i||i.destructor()}this.config=this._cells=this._root=this._xLayout=this._isViewLayout=null,this._all={}}},e.prototype.toVDOM=function(){var e;if(this._isViewLayout){var i=[this.getCell(this.config.activeView).toVDOM()];return t.prototype.toVDOM.call(this,i)}var n=[];return this._inheritTypes(),null===(e=this._cells)||void 0===e||e.forEach((function(t){var e=t.toVDOM();Array.isArray(e)?n=n.concat(e):n.push(e)})),t.prototype.toVDOM.call(this,n)},e.prototype.removeCell=function(t){if(this.events.fire(r.LayoutEvents.beforeRemove,[t])){var e=this.config.parent||this;if(e===this){var i=this.getCell(t);if(i){var n=i.getParent();delete this._all[t],n._cells=n._cells.filter((function(e){return e.id!=t})),n.paint()}this.events.fire(r.LayoutEvents.afterRemove,[t])}else e.removeCell(t)}},e.prototype.getId=function(t){return t<0&&(t=this._cells.length+t),this._cells[t]?this._cells[t].id:void 0},e.prototype.getRefs=function(t){var e;return null===(e=this._root.getRootView().refs)||void 0===e?void 0:e[t]},e.prototype.getCell=function(t){var e;return null===(e=this._root)||void 0===e?void 0:e._all[t]},e.prototype.forEach=function(t,e,i){if(void 0===i&&(i=1/0),this._haveCells(e)&&!(i<1)){var n;n=e?this._root._all[e]._cells:this._root._cells;for(var o=0;o<n.length;o++){var r=n[o];t.call(this,r,o,n),this._haveCells(r.id)&&r.forEach(t,r.id,--i)}}},e.prototype.cell=function(t){return this.getCell(t)},e.prototype.progressShow=function(){this._progress=!0,this.paint()},e.prototype.progressHide=function(){this._progress=!1,this.paint()},e.prototype._addCell=function(t,e){if(void 0===e&&(e=-1),this.events.fire(r.LayoutEvents.beforeAdd,[t.id])){var i=this._createCell(t);e<0&&(e=this._cells.length+e+1),this._cells.splice(e,0,i),this.paint(),this.events.fire(r.LayoutEvents.afterAdd,[t.id])}},e.prototype._getCss=function(e){var i=this._xLayout?"dhx_layout-columns":"dhx_layout-rows",n=this.config.align?" "+i+"--"+this.config.align:"";if(e)return i+" dhx_layout-cell"+(this.config.align?" dhx_layout-cell--"+this.config.align:"");var o=this.config.parent?t.prototype._getCss.call(this):"dhx_widget dhx_layout",r=this.config.parent?"":" dhx_layout-cell";return o+(this.config.full?r:" "+i)+n},e.prototype._parseConfig=function(){var t=this,e=this.config,i=e.rows||e.cols||e.views||[];this._xLayout=!e.rows,this._cells=i.map((function(e){return t._createCell(e)}))},e.prototype._createCell=function(t){var i;return t.rows||t.cols||t.views?(t.parent=this._root,i=new e(this,t)):i=new a.Cell(this,t),this._root._all[i.id]=i,t.init&&t.init(i,t),i},e.prototype._haveCells=function(t){if(t){var e=this._root._all[t];return e._cells&&e._cells.length>0}return Object.keys(this._all).length>0},e.prototype._inheritTypes=function(t){var e=this;if(void 0===t&&(t=this._cells),Array.isArray(t))t.forEach((function(t){return e._inheritTypes(t)}));else{var i=null==t?void 0:t.config;if((null==i?void 0:i.rows)||(null==i?void 0:i.cols)){var n=t.getParent();!i.type&&n&&(n.config.type?i.type=n.config.type:this._inheritTypes(n))}}},e}(a.Cell);e.Layout=s},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LayoutEvents=void 0,function(t){t.beforeShow="beforeShow",t.afterShow="afterShow",t.beforeHide="beforeHide",t.afterHide="afterHide",t.beforeResizeStart="beforeResizeStart",t.resize="resize",t.afterResizeEnd="afterResizeEnd",t.beforeAdd="beforeAdd",t.afterAdd="afterAdd",t.beforeRemove="beforeRemove",t.afterRemove="afterRemove",t.beforeCollapse="beforeCollapse",t.afterCollapse="afterCollapse",t.beforeExpand="beforeExpand",t.afterExpand="afterExpand"}(n||(e.LayoutEvents=n={}))},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(102),e),o(i(43),e)},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ListEvents=void 0,function(t){t.click="click",t.doubleClick="doubleclick",t.focusChange="focuschange",t.beforeEditStart="beforeEditStart",t.afterEditStart="afterEditStart",t.beforeEditEnd="beforeEditEnd",t.afterEditEnd="afterEditEnd",t.itemRightClick="itemRightClick",t.itemMouseOver="itemMouseOver",t.contextmenu="contextmenu"}(n||(e.ListEvents=n={}))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={notFound:"Not Found",selectAll:"Select All",unselectAll:"Unselect All",selectedItems:"selected items",createItem:"Create"}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.DataCollection=void 0;var r=i(6),a=i(72),l=i(74),s=i(15),c=i(10),d=i(12),u=i(0),h=i(75),f=i(24),p=i(36),g=function(){function t(t,e){var i=this;this._filters={},this._sortingStates=[],this._changes={order:[]},this.config=t||{},this._group=new h.Group,this._sort=new l.Sort,this._loader=new a.Loader(this,this._changes),this.events=e||new r.EventSystem(this),this.events.on(d.DataEvents.dataRequest,(function(t,e){var n=i.dataProxy;n&&n.updateUrl&&(n.updateUrl(null,{from:t,limit:n.config.limit||e-t}),i.load(n))})),this.events.on(d.DataEvents.loadError,(function(t){setTimeout((function(){"string"!=typeof t?(0,c.dhxError)(t):(0,c.dhxWarning)(t)}),0)})),this._reset()}return t.prototype._reset=function(t){void 0===t&&(t={}),t.grouping||this.ungroup(),this._order=[],this._pull={},this._changes={order:[]},this._initFilterOrder=this._initSortOrder=null,this._meta=new WeakMap,this._loaded=!1},t.prototype.group=function(t,e){void 0===e&&(e={}),t||(0,c.dhxError)("The group method has mandatory arguments"),Array.isArray(t)||(0,c.dhxError)("The group method expects an array as an argument"),t.length||(0,c.dhxError)("The array with the group method values cannot be empty"),this.isGrouped()&&this.ungroup();var i=this._group.getGroupConfig(e);this.events.fire(d.DataEvents.beforeGroup,[i])&&(this._parse(this._group.group(t,(null==e?void 0:e.data)||this._order,e),d.DataDriver.json,!0),this.events.fire(d.DataEvents.afterGroup,[this._group.getGroupedFields(),i]))},t.prototype.ungroup=function(){if(this.isGrouped()){var t=this._group.getGroupedFields(),e=this._group.getGroupConfig();this.events.fire(d.DataEvents.beforeUnGroup,[t,e])&&(this._parse(this._group.ungroup(this._order)),this.events.fire(d.DataEvents.afterUnGroup,[t,e]))}},t.prototype.isGrouped=function(){return this._group.isGrouped()},t.prototype.add=function(t,e){var i,n=this;return i=Array.isArray(t)?t.map((function(i,o){return 0!==o&&e>=0&&(e+=1),n._add({newItem:(0,u.copy)(i),batch:t,index:e,order:o})})):this._add({newItem:(0,u.copy)(t),batch:[t],index:e}),this._reapplyFilters(),i},t.prototype.remove=function(t){var e=this;t instanceof Array?o([],t,!0).forEach((function(i,n){e._remove(i,t,n)})):(0,u.isId)(t)&&this._remove(t,[t])},t.prototype.removeAll=function(){this._reset(),this.events.fire(d.DataEvents.removeAll),this.events.fire(d.DataEvents.change)},t.prototype.exists=function(t){return!!this._pull[t]},t.prototype.getNearId=function(t){var e;if(!this._pull[t])return(null===(e=this._order[0])||void 0===e?void 0:e.id)||""},t.prototype.getItem=function(t){return this._pull[t]},t.prototype.update=function(t,e,i){var n=this.getItem(t);if(n){if((0,c.isEqualObj)(e,n))return;(0,u.isId)(e.id)&&t!==e.id?((0,c.dhxWarning)("this method doesn't allow changing the id"),(0,c.isDebug)()):(e.parent&&n.parent&&e.parent!==n.parent&&this.move(t,-1,this,e.parent),(0,u.extend)(this._pull[t],e,!1),this.config.update&&this.config.update(this._pull[t]),i||this._onChange("update",t,this._pull[t])),this._reapplyFilters()}else(0,c.dhxWarning)("item not found")},t.prototype.getIndex=function(t){return(0,u.isId)(t)&&(0,u.isDefined)(this._pull[t])?this._order.findIndex((function(e){return(null==e?void 0:e.id)==t})):-1},t.prototype.getId=function(t){if(this._order[t])return this._order[t].id},t.prototype.getLength=function(){return this._order.length},t.prototype.isDataLoaded=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this._order.length),(0,u.isNumeric)(t)&&(0,u.isNumeric)(e)?0===this._order.slice(t,e).filter((function(t){return t&&t.$empty})).length:(this._loaded||(this._loaded=!this.find((function(t){return t.$empty}))),!!this._loaded)},t.prototype.filter=function(t,e,i){var n,o;if((null==e?void 0:e.$restore)&&(t=this._normalizeFilters(t||this._filters)),!(null==e?void 0:e.add)&&(this._order=this._initFilterOrder||this._order,this._initFilterOrder=null,!(null==e?void 0:e.$restore)))for(var r in this._filters){var a=this._filters[r];(null===(n=a.config)||void 0===n?void 0:n.permanent)?this._applyFilters(a.rule):delete this._filters[r]}if(t&&!(null==e?void 0:e.$restore)&&(o=(null==e?void 0:e.id)||(0,u.uid)(),this._filters[o]={rule:t,config:e||{}}),t&&"function"!=typeof t)if((0,u.isDefined)(t.by))this._applyFilters(t);else for(var r in t)this._applyFilters(t[r]);else this._applyFilters(t);if(!i){var l=this._getPureFilters(this._filters);this.events.fire(d.DataEvents.filter,[(0,u.isEmptyObj)(l)?null:l])}return o},t.prototype.resetFilter=function(t,e){var i,n=t||{},o=n.id,r=n.permanent;if((0,u.isEmptyObj)(t))for(var a in this._filters)(null===(i=this._filters[a].config)||void 0===i?void 0:i.permanent)||delete this._filters[a];else r?this._filters={}:o&&delete this._filters[o];return this.filter(null,{$restore:!0},e),(0,u.isEmptyObj)(this._getPureFilters(this._filters))},t.prototype.getFilters=function(t){var e=this.getRawFilters(t),i=e?this._getPureFilters(e):{};return(0,u.isEmptyObj)(i)?null:i},t.prototype.getRawFilters=function(t){var e=this._filters;return(null==t?void 0:t.permanent)&&(e=Object.keys(e).reduce((function(t,i){var n;return(null===(n=e[i].config)||void 0===n?void 0:n.permanent)&&(t[i]=e[i]),t}),{})),(0,u.isEmptyObj)(e)?null:e},t.prototype.find=function(t){for(var e=this._initFilterOrder||this._order,i=0;i<e.length;i++){var n=(0,c.findByConf)(e[i],t,i,e);if(n)return n}return null},t.prototype.findAll=function(t){for(var e=this._initFilterOrder||this._order,i=[],n=0;n<e.length;n++){var o=(0,c.findByConf)(e[n],t,n,e);o&&i.push(o)}return i},t.prototype.sort=function(t,e,i){var r,a;if(void 0===i&&(i=!1),this.isDataLoaded()){if((null==e?void 0:e.smartSorting)&&(this._sorter=t),i||this._sortingStates.length&&!(null==e?void 0:e.smartSorting)&&((null===(r=this._sortingStates[0])||void 0===r?void 0:r.smartSorting)||(null==e?void 0:e.smartSorting))||(this._sortingStates=[n(n({},t),e)]),t){if(!i&&(this._initSortOrder=this._initSortOrder||o([],this._initFilterOrder||this._order,!0),!(null==e?void 0:e.smartSorting)&&(null===(a=this._sortingStates[0])||void 0===a?void 0:a.smartSorting))){var l=this._sortingStates.findIndex((function(e){return e.by==t.by}));-1!==l?this._sortingStates[l].dir=t.dir:this._sortingStates.push(t)}this._applySorters()}else this._initSortOrder&&(this._sortingStates=[],this._order=this._initSortOrder,this._sorter=this._initSortOrder=null,this._initFilterOrder&&(this._initFilterOrder=null,this.filter(null,{$restore:!0},!0)));i||this.events.fire(d.DataEvents.change,[void 0,"sort",t])}else(0,c.dhxWarning)("the method doesn't work with lazyLoad")},t.prototype.getSortingStates=function(){return this._sortingStates},t.prototype.copy=function(t,e,i,n){var o=this;return t instanceof Array?t.map((function(t,r){return o._copy(t,e,i,n,r)})):this._copy(t,e,i,n)},t.prototype.move=function(t,e,i,n,o){var r,a=this;if(t instanceof Array){var l=[];return t.forEach((function(t,o){(0,u.isId)(a._move(t,e,i,n,o))?l.push(t):(0,c.throwMoveWarning)(t,a.exists(t))})),l}return null!==(r=this._move(t,e,i,n,0,o))&&void 0!==r?r:(0,c.throwMoveWarning)(t,this.exists(t))},t.prototype.forEach=function(t){for(var e=0;e<this._order.length;e++)t.call(this,this._order[e],e,this._order)},t.prototype.load=function(t,e){return"string"==typeof t&&(this.dataProxy=t=new s.DataProxy(t)),"string"==typeof e&&(e=e.toLocaleLowerCase()),("xml"===e||"csv"===e||e instanceof p.XMLDriver||e instanceof f.CsvDriver)&&(t.config.responseType=t.config.responseType||"text"),this.dataProxy=t,this._loader.load(t,e)},t.prototype.parse=function(t,e){return this._parse(t,e)},t.prototype.$parse=function(t){var e=this.config.approximate;e&&(t=this._approximate(t,e.value,e.maxNum)),this._parse_data(t),this._reapplyFilters(),this.events.fire(d.DataEvents.change,[void 0,"load"]),this.events.fire(d.DataEvents.load)},t.prototype.save=function(t){"string"==typeof t&&(t=new s.DataProxy(t)),this._loader.save(t)},t.prototype.changeId=function(t,e,i){if(void 0===e&&(e=(0,u.uid)()),t!=e)if(this.exists(e))(0,c.dhxWarning)("item with ID ".concat(e," already exists"));else{var n=this.getItem(t);n?(n.id=e,(0,u.extend)(this._pull[t],n),this._pull[e]=this._pull[t],i||this._onChange("update",e,this._pull[e]),delete this._pull[t]):(0,c.dhxWarning)("item not found")}},t.prototype.isSaved=function(){return!this._changes.order.length},t.prototype.map=function(t){for(var e=[],i=0;i<this._order.length;i++)e.push(t.call(this,this._order[i],i,this._order));return e},t.prototype.mapRange=function(t,e,i){t<0&&(t=0),e>this._order.length-1&&(e=this._order.length-1);for(var n=this._order.slice(t,e+1),o=[],r=t;r<=e;r++)o.push(i.call(this,this._order[r],r,n));return o},t.prototype.reduce=function(t,e){for(var i=0;i<this._order.length;i++)e=t.call(this,e,this._order[i],i);return e},t.prototype.serialize=function(t){void 0===t&&(t=d.DataDriver.json);for(var e=[],i=function(t){var i=n({},o._order[t]);Object.keys(i).forEach((function(t){t.startsWith("$")&&delete i[t]})),(0,u.isDefined)(i.parent)||delete i.parent,e.push(i)},o=this,r=0;r<this._order.length;r++)i(r);var a=(0,c.toDataDriver)(t);if(a)return a.serialize(e)},t.prototype.getInitialData=function(){return this._initFilterOrder},t.prototype.setMeta=function(t,e,i){if(t){var n=this._meta.get(t);n||(n={},this._meta.set(t,n)),n[e]=i}},t.prototype.getMeta=function(t,e){var i=this._meta.get(t);return i?i[e]:null},t.prototype.getMetaMap=function(t){return this._meta.get(t)},t.prototype.setRange=function(t,e){this._range=e?[t,e]:null},t.prototype.getRawData=function(t,e,i,n){if(i=i||this._order,1===n)return i;if(this._range)if(t=this._range[0]+t,-1===e)e=this._range[1];else{var o=Math.abs(e-t);e=t+o>this._range[1]?this._range[1]:t+o}if(!e||0===t&&(-1===e||e===i.length))return i;if(t>=i.length)return[];(-1===e||e>i.length)&&(e=i.length);var r=i.slice(t,e);return 0!==r.filter((function(t){return t.$empty})).length&&this.events.fire(d.DataEvents.dataRequest,[t,e]),r},t.prototype._add=function(t){var e=t.newItem,i=t.index,n=t.order,o=void 0===n?0:n,r=t.batch;if(this.events.fire(d.DataEvents.beforeAdd,[e,r,o])){var a=this._addCore(e,i);return this._onChange("add",e.id,e),this.events.fire(d.DataEvents.afterAdd,[e,r,o]),a}},t.prototype._remove=function(t,e,i){var n=this;void 0===i&&(i=0);var o=this._pull[t];if(o){var r=e.map((function(t){return n._pull[t]}));this.events.fire(d.DataEvents.beforeRemove,[o,r,i])&&(this._removeCore(o.id),this._onChange("remove",t,o),this.events.fire(d.DataEvents.afterRemove,[o,r,i]))}},t.prototype._copy=function(e,i,o,r,a){if(!this.exists(e))return null;var l=(0,u.uid)();return a&&(i=-1===i?-1:i+a),o?o instanceof t||!r?o.exists(e)?(o.add(n(n({},(0,c.copyWithoutInner)(this.getItem(e))),{id:l}),i),l):(o.add((0,c.copyWithoutInner)(this.getItem(e)),i),e):void o.add((0,c.copyWithoutInner)(this.getItem(e)),i):(this.add(n(n({},(0,c.copyWithoutInner)(this.getItem(e))),{id:l}),i),l)},t.prototype._move=function(t,e,i,n,o,r){if(!this.exists(t))return null;if(o&&e<this.getIndex(t)&&(e=-1===e?-1:e+o),i&&i!==this&&this.exists(t)){var a=(0,u.copy)(this.getItem(t),!0);return r&&(a.id=r),(!r&&i.exists(t)||i.exists(r))&&(a.id=(0,u.uid)()),n&&(a.parent=n),i.add(a,e),this.remove(t),a.id}if(this.getIndex(t)===e)return null;var l=this._order.splice(this.getIndex(t),1)[0];return-1===e&&(e=this._order.length),this._order.splice(e,0,l),this.events.fire(d.DataEvents.change,[t,"update",this.getItem(t)]),t},t.prototype._addCore=function(t,e){var i;return this.config.init&&(t=this.config.init(t)),t.id=null!==(i=t.id)&&void 0!==i?i:(0,u.uid)(),this._pull[t.id]&&(0,c.dhxError)("Item ".concat(t.id," already exist")),this._initFilterOrder&&!(0,c.isTreeCollection)(this)&&this._addToOrder(this._initFilterOrder,t,e),this._initSortOrder&&this._addToOrder(this._initSortOrder,t,e),this._addToOrder(this._order,t,e),t.id},t.prototype._removeCore=function(t){this._pull[t]&&(this._order=this._order.filter((function(e){return e.id!==t})),this._initFilterOrder&&this._initFilterOrder.length&&(this._initFilterOrder=this._initFilterOrder.filter((function(e){return e.id!==t}))),this._initSortOrder&&this._initSortOrder.length&&(this._initSortOrder=this._initSortOrder.filter((function(e){return e.id!==t}))),delete this._pull[t])},t.prototype._parse_data=function(t){for(var e=this._order.length,i=0,n=t;i<n.length;i++){var o=n[i];this._addCore(o,e++)}},t.prototype._approximate=function(t,e,i){for(var n=t.length,o=e.length,r=Math.floor(n/i),a=Array(Math.ceil(n/r)),l=0,s=0;s<n;s+=r){for(var c=(0,u.copy)(t[s]),d=Math.min(n,s+r),h=0;h<o;h++){for(var f=0,p=s;p<d;p++)f+=t[p][e[h]];c[e[h]]=f/(d-s)}a[l++]=c}return a},t.prototype._onChange=function(t,e,i){for(var o=0,r=0,a=this._changes.order;r<a.length;r++){var l=a[r],s=this._changes.order.indexOf(l);if(l.id===e&&!l.saving&&(o+=1,s===this._changes.order.length-1||this._changes.order[s+1].id!==e)){if(l.error&&(l.error=!1),l=n(n({},l),{obj:i,status:t}),(o+=1)>10?this._changes.order.splice(s,o-10,l):this._changes.order.splice(s+1,0,l),this._loader.updateChanges(this._changes),"remove"===t&&i.$emptyRow)return;return void this.events.fire(d.DataEvents.change,[e,t,i])}}this._changes.order.push({id:e,status:t,obj:n({},i),saving:!1}),this._loader.updateChanges(this._changes),this.events.fire(d.DataEvents.change,[e,t,i])},t.prototype._addToOrder=function(t,e,i){i>=0&&t[i]?(this._pull[e.id]=e,t.splice(i,0,e)):(this._pull[e.id]=e,t.push(e))},t.prototype._applySorters=function(){this._sortingStates.length>0&&(this._order=this._sort.sort(this._order,this._sortingStates),this._initFilterOrder&&this._initFilterOrder.length&&this._sort.sort(this._initFilterOrder,this._sortingStates))},t.prototype._applyFilters=function(t){if(t){if(!this._checkFilterRule(t))throw new Error("Invalid filter rule");var e="function"!=typeof t?this._getRuleCallback(t):t,i=this._order.filter((function(t){return e(t)}));this._initFilterOrder||(this._initFilterOrder=this._order),this._order=i}},t.prototype._reapplyFilters=function(){var t=this.getFilters({permanent:!0});t&&this.filter(t,{$restore:!0,add:!0},!0),this._sorter&&this._applySorters()},t.prototype._getRuleCallback=function(t){if((0,u.isDefined)(t.by)&&(0,u.isDefined)(t.match))return t.compare?function(e){return t.compare(e[t.by],t.match,e,t.multi)}:function(e){return e[t.by]==t.match}},t.prototype._getPureFilters=function(t){return Object.keys(t).reduce((function(e,i){var n;return(null===(n=t[i].config)||void 0===n?void 0:n.$local)||(e[i]=t[i]),e}),{})},t.prototype._normalizeFilters=function(t){var e=[];for(var i in t){var o=t[i].rule;if("function"!=typeof o)if((0,u.isDefined)(o.by))e.push(this._getRuleCallback(o));else for(var r in o)e.push(this._getRuleCallback(o[r]));else e.push(o)}return n({},e)},t.prototype._checkFilterRule=function(t){return"function"==typeof t||(0,u.isDefined)(t.by)&&(0,u.isDefined)(t.match)},t.prototype._parse=function(t,e,i){return void 0===e&&(e=d.DataDriver.json),void 0===i&&(i=!1),this._reset({grouping:i}),this._loader.parse(t,e)},t}();e.DataCollection=g},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.dataDriversPro=e.dataDrivers=void 0;var o=i(35),r=i(24),a=i(36);e.dataDrivers={json:o.JsonDriver,csv:r.CsvDriver},e.dataDriversPro=n(n({},e.dataDrivers),{xml:a.XMLDriver})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JsonDriver=void 0;var n=function(){function t(){}return t.prototype.toJsonArray=function(t){return this.getRows(t)},t.prototype.serialize=function(t){return t},t.prototype.getFields=function(t){return t},t.prototype.getRows=function(t){return"string"==typeof t?JSON.parse(t):t},t}();e.JsonDriver=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XMLDriver=void 0;var n=i(73);function o(t,e){e=e||{};var i=t.attributes;if(i&&i.length)for(var n=0;n<i.length;n++)e[i[n].name]=i[n].value;var r=t.childNodes;for(n=0;n<r.length;n++){var a=r[n];if(a.nodeType===a.ELEMENT_NODE){var l=a.tagName;e[l]?("function"!=typeof e[l].push&&(e[l]=[e[l]]),e[l].push(o(a,{}))):e[l]=o(a,{})}}return e}var r=function(){function t(){}return t.prototype.toJsonArray=function(t){return this.getRows(t)},t.prototype.toJsonObject=function(t){var e;return"string"==typeof t&&(e=this._fromString(t)),o(e)},t.prototype.serialize=function(t){return(0,n.jsonToXML)(t)},t.prototype.getFields=function(t){return t},t.prototype.getRows=function(t){if("string"==typeof t&&(t=this._fromString(t)),t){var e=t.childNodes&&t.childNodes[0]&&t.childNodes[0].childNodes;return e&&e.length?this._getRows(e):null}return[]},t.prototype._getRows=function(t){for(var e=[],i=0;i<t.length;i++)"item"===t[i].tagName&&e.push(this._nodeToJS(t[i]));return e},t.prototype._fromString=function(t){try{return(new DOMParser).parseFromString(t,"text/xml")}catch(t){return null}},t.prototype._nodeToJS=function(t){var e={};if(this._haveAttrs(t))for(var i=t.attributes,n=0;n<i.length;n++){var o=i[n],r=o.name,a=o.value;e[r]=this._toType(a)}if(t.nodeType===t.TEXT_NODE)return e.value=e.value||this._toType(t.textContent),e;var l=t.childNodes;if(l)for(n=0;n<l.length;n++){var s=l[n],c=s.tagName;c&&("items"===c&&s.childNodes?e[c]=this._getRows(s.childNodes):this._haveAttrs(s)?e[c]=this._nodeToJS(s):e[c]=this._toType(s.textContent))}return e},t.prototype._toType=function(t){return"false"===t||"true"===t?"true"===t:t},t.prototype._haveAttrs=function(t){return t.attributes&&t.attributes.length},t}();e.XMLDriver=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.methods=void 0;var n=i(0);e.methods={sum:function(t,e){return parseFloat(t.reduce((function(t,i){return t+(+i[e]||0)}),0).toFixed(12))},avg:function(t,e){return parseFloat((t.reduce((function(t,i){return t+(+i[e]||0)}),0)/t.length).toFixed(12))},count:function(t,e){return void 0===t&&(t=[]),t.filter((function(t){return(0,n.isDefined)(t[e])&&""!==t[e]})).length},min:function(t,e){return Math.min.apply(Math,t.map((function(t){return+t[e]})))},max:function(t,e){return Math.max.apply(Math,t.map((function(t){return+t[e]})))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={apply:"apply",reject:"reject"}},function(t,e,i){"use strict";function n(t){var e=document.activeElement;e.classList.contains("dhx_alert__apply-button")&&"Enter"===t.key||e.classList.contains("dhx_alert__confirm-reject")||e.classList.contains("dhx_alert__confirm-aply")||t.preventDefault()}Object.defineProperty(e,"__esModule",{value:!0}),e.blockScreen=void 0,e.blockScreen=function(t){var e=document.createElement("div");return e.className="dhx_alert__overlay "+(t||""),document.body.appendChild(e),document.addEventListener("keydown",n),function(){document.body.removeChild(e),document.removeEventListener("keydown",n)}}},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Cell=void 0;var a=i(0),l=i(1),s=i(11),c=i(29),d=i(98),u=i(6),h=i(28),f=function(t){function e(e,i){var n=t.call(this,e,i)||this;n._disabled=[];var o=e;return o&&o.isVisible&&(n._parent=o),n._parent&&n._parent.events?n.events=n._parent.events:n.events=new u.EventSystem(n),n.config.full=void 0===n.config.full?Boolean(n.config.header||n.config.collapsable||n.config.headerHeight||n.config.headerIcon||n.config.headerImage):n.config.full,n._afterWindowResized=n._resizedWindow.bind(n),n.id=n.config.id||(0,a.uid)(),n._initHandlers(),n._progress=!!n.config.progressDefault,n._stopProgressDefault=!1,n._isXDirection()&&!i.width&&(i.$autoWidth=!0),n._isXDirection()||i.height||(i.$autoHeight=!0),n}return o(e,t),e.prototype.paint=function(){var t;if(this.isVisible()){var e=this.getRootView();e?e.redraw():null===(t=this._parent)||void 0===t||t.paint()}},e.prototype.isVisible=function(){var t;if(!this._parent)return!(!this._container||!this._container.tagName)||Boolean(this.getRootNode());var e=null===(t=this._parent.config)||void 0===t?void 0:t.activeView;return(!e||e===this.id)&&(!this.config.hidden&&(!this._parent||this._parent.isVisible()))},e.prototype.hide=function(){this.events.fire(c.LayoutEvents.beforeHide,[this.id])&&(this.config.hidden=!0,this._resetCellsSize(),this._parent&&this._parent.paint&&this._parent.paint(),this.events.fire(c.LayoutEvents.afterHide,[this.id]))},e.prototype.show=function(){this.events.fire(c.LayoutEvents.beforeShow,[this.id])&&(this._parent&&this._parent.config&&void 0!==this._parent.config.activeView?this._parent.config.activeView=this.id:this.config.hidden=!1,this._parent&&!this._parent.isVisible()&&this._parent.show(),this.paint(),this.events.fire(c.LayoutEvents.afterShow,[this.id]))},e.prototype.expand=function(){this.events.fire(c.LayoutEvents.beforeExpand,[this.id])&&(this.config.collapsed=!1,this._checkNextSize()||this._checkNextSize(this._getAnyFlexCell()),this.events.fire(c.LayoutEvents.afterExpand,[this.id]),this.paint())},e.prototype.collapse=function(){this.events.fire(c.LayoutEvents.beforeCollapse,[this.id])&&(this.config.collapsed=!0,this._checkNextSize()||this._checkNextSize(this._getAnyFlexCell()),this.events.fire(c.LayoutEvents.afterCollapse,[this.id]),this.paint())},e.prototype.toggle=function(){this.config.collapsed?this.expand():this.collapse()},e.prototype._checkNextSize=function(t){var e=null!=t?t:this._getNextCell();return!!e&&(this._isXDirection()&&e.config.$autoWidth&&e.config.width?(e.config.width=void 0,!0):!this._isXDirection()&&e.config.$autoHeight&&e.config.height?(e.config.height=void 0,!0):!t&&e._checkNextSize())},e.prototype.getParent=function(){return this._parent},e.prototype.destructor=function(){var t;this.events&&this.events.clear(),window.removeEventListener("resize",this._afterWindowResized),this._ui&&this._ui.config&&"function"==typeof(null===(t=this._ui)||void 0===t?void 0:t.destructor)&&this._ui.destructor(),this.config=this.events=this.id=this._parent=this._handlers=this._uid=this._disabled=this._resizerHandlers=null,this.unmount()},e.prototype.getWidget=function(){return this._ui},e.prototype.getCellView=function(){return this._parent&&this._parent.getRefs(this._uid)},e.prototype.attach=function(t,e){return this.config.html=null,"object"==typeof t?this._ui=t:"string"==typeof t?this._ui=new window.dhx[t](null,e):"function"==typeof t&&(t.prototype instanceof s.View?this._ui=new t(null,e):this._ui={getRootView:function(){return t(e)}}),this.paint(),this._ui},e.prototype.attachHTML=function(t){this.config.html=t,this.paint()},e.prototype.detach=function(){this._stopProgressDefault=!1,this._ui=this.config.html=null,this.paint()},e.prototype.progressShow=function(){this.config.progressDefault&&(this._stopProgressDefault=!1),this._progress=!0,this.paint()},e.prototype.progressHide=function(){this.config.progressDefault&&(this._stopProgressDefault=!0),this._progress=!1,this.paint()},e.prototype.isVisibleProgress=function(){return this._progress},e.prototype.toVDOM=function(t){var e,i,n;if(this._saveTheme(),null===this.config&&(this.config={}),!this.config.hidden){var o,s=this.config.$fieldset,c=this._calculateStyle(),d=(0,a.isDefined)(this.config.padding)?isNaN(Number(this.config.padding))?{padding:this.config.padding}:{padding:"".concat(this.config.padding,"px")}:"",u=this.config.full||this.config.html?c:r(r({},c),d),h=this._checkProgress()?this._getProgressBar():null;if(!this.config.html)if(this._ui){var f=this._ui.getRootView();f.render&&(f=(0,l.inject)(f)),o=[f]}else o=t||null;var p=this.config.resizable&&!this._isLastCell()&&this._getNextCell()&&!this.config.collapsed?(0,l.el)(".dhx_layout-resizer."+(this._isXDirection()?"dhx_layout-resizer--x":"dhx_layout-resizer--y"),r(r({},this._resizerHandlers),{_ref:"resizer_"+this._uid,tabindex:0}),[(0,l.el)("span.dhx_layout-resizer__icon",{class:"dxi "+(this._isXDirection()?"dxi-dots-vertical":"dxi-dots-horizontal")})]):null,g={};if(this.config.on)for(var v in this.config.on)g["on"+v]=this.config.on[v];var _="",m=this.config.cols||this.config.rows;if(this.config.type&&m)switch(this.config.type){case"line":_=" dhx_layout-line";break;case"wide":_=" dhx_layout-wide";break;case"space":_=" dhx_layout-space"}var y=s?(0,l.el)("fieldset.dhx_form-fieldset",{class:this.config.$disabled?" dhx_form-fieldset--disabled":"",style:d,disabled:this.config.$disabled},[(0,l.el)("legend.dhx_form-fieldset-legend",{class:"dhx_form-fieldset-legend--".concat(this.config.labelAlignment||"left")},this.config.label),(0,l.el)(".dhx_layout-cell-content",{class:this._getCss(!1)},[].concat(o))]):this.config.full?[(0,l.el)("div",{tabindex:this.config.collapsable?"0":"-1",role:this.config.collapsable?"button":null,"aria-label":this.config.collapsable?"click to ".concat(this.config.collapsed?"expand":"collapse"):null,class:"dhx_layout-cell-header"+(this._isXDirection()?" dhx_layout-cell-header--col":" dhx_layout-cell-header--row")+(this.config.collapsable?" dhx_layout-cell-header--collapseble":"")+(this.config.collapsed?" dhx_layout-cell-header--collapsed":"")+(((this.getParent()||{}).config||{}).isAccordion?" dhx_layout-cell-header--accordion":""),style:{height:this.config.headerHeight},onclick:this._handlers.toggle,onkeydown:this._handlers.enterCollapse},[this.config.headerIcon&&(0,l.el)("span.dhx_layout-cell-header__icon",{class:this.config.headerIcon}),this.config.headerImage&&(0,l.el)(".dhx_layout-cell-header__image-wrapper",[(0,l.el)("img",{src:this.config.headerImage,class:"dhx_layout-cell-header__image"})]),this.config.header&&(0,l.el)("h3.dhx_layout-cell-header__title",this.config.header),this.config.collapsable?(0,l.el)("div.dhx_layout-cell-header__collapse-icon",{class:this._getCollapseIcon()}):(0,l.el)("div.dhx_layout-cell-header__collapse-icon",{class:"dxi dxi-empty"})]),this.config.collapsed?null:(0,l.el)("div",{style:r(r({},d),{height:"calc(100% - ".concat(this.config.headerHeight||37,"px)")}),class:this._getCss(!0)+" dhx_layout-cell-content"+(this.config.type?_:"")},this.config.html?[(0,l.el)("div",{".innerHTML":this.config.html,class:"dhx_layout-cell dhx_layout-cell-inner_html"})]:o)]:!this.config.html||this.config.rows&&this.config.cols&&this.config.views?o:[this.config.collapsed?null:(0,l.el)(".dhx_layout-cell-content",{style:d},[(0,l.el)(".dhx_layout-cell-inner_html",{".innerHTML":this.config.html})])],b=(0,l.el)("div",r(r(((e={_key:this.config.id||this._uid,_ref:this._uid})["aria-label"]=this.config.id?"tab-content-"+this.config.id:null,e["data-cell-id"]=null!==(i=this.config.id)&&void 0!==i?i:null,e["data-dhx-theme"]=null!==(n=this._theme)&&void 0!==n?n:null,e),g),{class:this._getCss(!1)+(this.config.css?" "+this.config.css:"")+(this.config.collapsed?" dhx_layout-cell--collapsed":"")+(this.config.resizable?" dhx_layout-cell--resizable":"")+(this.config.type&&!this.config.full?_:""),style:s?c:u}),y||h?[].concat(y,h):null);return p?[].concat(b,p):b}},e.prototype._saveTheme=function(){var t,e=null===(t=this.getCellView())||void 0===t?void 0:t.el;e&&(this._theme=e.getAttribute("data-dhx-theme"))},e.prototype._getProgressBar=function(){return(0,l.el)("span",{class:"dhx_progress-bar"},[(0,l.sv)("svg",{viewBox:"25 25 50 50",class:"dhx_spinner"},[(0,l.sv)("circle",{cx:"50",cy:"50",r:"20",class:"path"})])])},e.prototype._getCss=function(t){return"dhx_layout-cell"},e.prototype._initHandlers=function(){var t=this;!this.getParent()||this.config.cols||this.config.rows||window.addEventListener("resize",this._afterWindowResized),this._handlers={enterCollapse:function(e){13===e.keyCode&&t._handlers.toggle()},collapse:function(){t.config.collapsable&&t.collapse()},expand:function(){t.config.collapsable&&t.expand()},toggle:function(){t.config.collapsable&&t.toggle()}};var e={left:null,top:null,isActive:!1,range:null,xLayout:null,nextCell:null,size:null,resizerLength:null,margin:null,collapsedSize:null},i=function(i,n){if(void 0===n&&(n={x:0,y:0}),e.isActive){var o=e.xLayout,r=i.targetTouches?i.targetTouches[0].clientX:i.clientX+n.x,a=i.targetTouches?i.targetTouches[0].clientY:i.clientY+n.y,l=o?r-e.range.min+window.pageXOffset:a-e.range.min+window.pageYOffset,s=o?"width":"height";l<0?l=e.resizerLength/2:l>e.size&&(l=e.size-e.resizerLength);var d=function(e){var i;return parseInt(null===(i=t.config[e])||void 0===i?void 0:i.toString())},u=d(o?"maxWidth":"maxHeight"),h=d(o?"minWidth":"minHeight");(!u||l<u)&&(!h||l>h)&&(t.config[s]=l-e.resizerLength/2+"px",e.nextCell.config[s]=e.size-l-e.resizerLength/2+"px",e.nextCell._getAnyFlexCell()&&(e.nextCell._getAnyFlexCell().config[s]=void 0),t.paint(),t.events.fire(c.LayoutEvents.resize,[t.id]))}},n=function(o){e.isActive=!1,document.body.classList.remove("dhx_no-select--resize"),o.targetTouches?(document.removeEventListener("touchend",n),document.removeEventListener("touchmove",i)):(document.removeEventListener("mouseup",n),document.removeEventListener("mousemove",i)),t.events.fire(c.LayoutEvents.afterResizeEnd,[t.id])},o=function(i){if(i.targetTouches&&i.preventDefault(),3!==i.which&&(e.isActive&&n(i),t.events.fire(c.LayoutEvents.beforeResizeStart,[t.id]))){document.body.classList.add("dhx_no-select--resize");var o=t.getCellView(),r=t._getNextCell(),a=r.getCellView(),l=t._getResizerView(),s=o.el.getBoundingClientRect(),u=l.el.getBoundingClientRect(),h=a.el.getBoundingClientRect();e.xLayout=t._isXDirection(),e.left=s.left+window.pageXOffset,e.top=s.top+window.pageYOffset,e.collapsedSize=t._getCollapsedSize(t,r),e.margin=(0,d.getMarginSize)(t.getParent().config),e.range=(0,d.getBlockRange)(s,h,e.xLayout),e.size=e.range.max-e.range.min-e.margin-e.collapsedSize,e.isActive=!0,e.nextCell=r,e.resizerLength=e.xLayout?u.width:u.height}};this._resizerHandlers={onmousedown:function(t){o(t),document.addEventListener("mouseup",n),document.addEventListener("mousemove",i)},ontouchstart:function(t){o(t),document.addEventListener("touchend",n),document.addEventListener("touchmove",i)},ondragstart:function(t){return t.preventDefault()}}},e.prototype._getCollapsedSize=function(t,e){var i=0,n=this._parent,o=n._cells.indexOf(t),r=n._cells.indexOf(e);if(r-o==1)return i;for(var a=o+1;a<r;a++)n._cells[a].config.collapsed&&(this._isXDirection()?i+=45:i+=Number(n._cells[a].config.headerHeight)||37);return i},e.prototype._getCollapseIcon=function(){return this._isXDirection()&&this.config.collapsed?"dxi dxi-chevron-right":this._isXDirection()&&!this.config.collapsed?"dxi dxi-chevron-left":!this._isXDirection()&&this.config.collapsed?"dxi dxi-chevron-up":this._isXDirection()||this.config.collapsed?void 0:"dxi dxi-chevron-down"},e.prototype._isLastCell=function(){var t=this._parent;return!t||t._cells.indexOf(this)===t._cells.length-1},e.prototype._getNextCell=function(){if(!this._isLastCell()){var t=this._parent,e=t._cells.indexOf(this),i=t._cells[e+1];return i.config.hidden||i.config.collapsed?i._getNextCell():i}},e.prototype._getAnyFlexCell=function(t){var e,i=this;void 0===t&&(t=!1);var n=this._parent,o=this._isXDirection()?"$autoWidth":"$autoHeight",r=null===(e=null==n?void 0:n._cells)||void 0===e?void 0:e.filter((function(e){return!0===e.config[o]&&(!!t||e.id!==i.id)}));return!!(null==r?void 0:r.length)&&r[r.length-1]},e.prototype._getResizerView=function(){return this._parent.getRefs("resizer_"+this._uid)},e.prototype._isXDirection=function(){return this._parent&&this._parent._xLayout},e.prototype._checkProgress=function(){return this instanceof h.Layout?this.isVisibleProgress():(this._calculateProgressState(),(this._progress||this._checkAutoProgress())&&!this.config.collapsed&&!this.config.hidden&&!this._parent.isVisibleProgress())},e.prototype._checkAutoProgress=function(){if(this._stopProgressDefault)return!1;var t=this.config,e=t.html;return t.progressDefault&&!this._ui&&!e},e.prototype._calculateProgressState=function(){if(!this._stopProgressDefault){var t=this.config,e=t.html,i=t.progressDefault;!i||this._ui||e||(this._progress=!0),i&&(this._ui||e)&&(this._progress=!1)}},e.prototype._calculateStyle=function(){var t=this.config;if(t){var e={},i=!1,n=!1;isNaN(Number(t.width))||(t.width=t.width+"px"),isNaN(Number(t.height))||(t.height=t.height+"px"),isNaN(Number(t.minWidth))||(t.minWidth=t.minWidth+"px"),isNaN(Number(t.minHeight))||(t.minHeight=t.minHeight+"px"),isNaN(Number(t.maxWidth))||(t.maxWidth=t.maxWidth+"px"),isNaN(Number(t.maxHeight))||(t.maxHeight=t.maxHeight+"px"),"content"===t.width&&(i=!0),"content"===t.height&&(n=!0);var o=t,r=o.width,a=o.height,l=o.cols,s=o.rows,c=o.minWidth,d=o.minHeight,u=o.maxWidth,h=o.maxHeight,f=o.gravity,p=o.collapsed,g=o.$fixed,v=-1===Math.sign(f)?0:f;"boolean"==typeof f&&(v=f?1:0);var _="boolean"==typeof f?!f:-1===Math.sign(f);this._isXDirection()?(g||r||void 0===f&&(c||u))&&(_=!0):(g||a||void 0===f&&(d||h))&&(_=!0);var m=this._checkFullSizeCell(),y=_&&!m?0:m?1:v||1,b=this._isXDirection()?"x":"y";if(void 0===c||p||(e.minWidth=c),void 0===d||p||(e.minHeight=d),void 0!==u&&(e.maxWidth=u),void 0!==h&&(e.maxHeight=h),void 0===this._parent&&void 0!==!b&&(b=!0),m||void 0===r||"content"===r){if(!0===b)e.width="100%";else if("x"===b)if(i)e.flex="0 0 auto";else{var x=this._isXDirection()?"1px":"auto";e.flex="".concat(y," ").concat(l||s?"0 ".concat(x):"1 auto")}}else e.width=r;if(m||void 0===a||"content"===a){if(!0===b)e.height="100%";else if("y"===b)if(n)e.flex="0 0 auto";else{x=this._isXDirection()?"auto":"1px";e.flex="".concat(y," ").concat(l||s?"0 ".concat(x):"1 auto")}}else e.height=a;return!0===b&&void 0===t.width&&void 0===t.height&&(e.flex="".concat(y," 1 auto")),p&&(this._isXDirection()?e.width="auto":e.height="auto",e.flex="0 0 auto"),e}},e.prototype._resizedWindow=function(){var t;if(void 0===this._isLastFlexCell?this._isLastFlexCell=(null===(t=this._getAnyFlexCell(!0))||void 0===t?void 0:t.id)===this.id:this._isLastFlexCell||window.removeEventListener("resize",this._afterWindowResized),this._isLastFlexCell){var e=this._isXDirection()?"width":"height";this.config[e]=void 0,this.paint()}},e.prototype._resetCellsSize=function(){var t=this,e=this._parent._cells.filter((function(e){return e!==t&&!e.config.hidden&&!e.config.collapsed})),i=this._isXDirection(),n=i?"$autoWidth":"$autoHeight",o=i?"width":"height";e.forEach((function(t){t.config[n]&&(t.config[o]=void 0)}))},e.prototype._checkFullSizeCell=function(){var t=this;if(!this._parent)return!1;var e=this._isXDirection()?"$autoWidth":"$autoHeight";if(!this.config[e])return!1;var i=this._parent._cells.filter((function(e){return e!==t&&!e.config.hidden}));return!!i.length&&i.every((function(t){return t.config.collapsed}))},e}(s.View);e.Cell=f},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ProCell=void 0;var a=i(0),l=i(1),s=i(42),c=function(t){function e(e,i){var n=t.call(this,e,i)||this;if(n.scrollView=new s.ScrollView((function(){return n._getFirstRootView()})),!e){var o=(0,l.create)({render:function(){return n.toVDOM()}},n);n.mount(e,o)}return n}return o(e,t),e.prototype._getFirstRootView=function(t){return void 0===t&&(t=this),t.getParent()&&t.getParent().getRootView()?t.getParent().getRootView():this._getFirstRootView(t.getParent())},e.prototype.toVDOM=function(t){var e,i,n;if(this._saveTheme(),null===this.config&&(this.config={}),!this.config.hidden){var o,s=this.config.$fieldset,c=this._calculateStyle(),d=(0,a.isDefined)(this.config.padding)?isNaN(Number(this.config.padding))?{padding:this.config.padding}:{padding:"".concat(this.config.padding,"px")}:"",u=this.config.full||this.config.html?c:r(r({},c),d),h=this._checkProgress()?this._getProgressBar():null;if(!this.config.html)if(this._ui){var f=this._ui.getRootView();f.render&&(f=(0,l.inject)(f)),o=f?[this.scrollView.render(f)]:f||null}else o=t?this.scrollView.render([t]):t||null;var p=this.config.resizable&&!this._isLastCell()&&this._getNextCell()&&!this.config.collapsed?(0,l.el)(".dhx_layout-resizer."+(this._isXDirection()?"dhx_layout-resizer--x":"dhx_layout-resizer--y"),r(r({},this._resizerHandlers),{_ref:"resizer_"+this._uid}),[(0,l.el)("span.dhx_layout-resizer__icon",{class:"dxi "+(this._isXDirection()?"dxi-dots-vertical":"dxi-dots-horizontal")})]):null,g={};if(this.config.on)for(var v in this.config.on)g["on"+v]=this.config.on[v];var _="",m=this.config.cols||this.config.rows;if(this.config.type&&m)switch(this.config.type){case"line":_=" dhx_layout-line";break;case"wide":_=" dhx_layout-wide";break;case"space":_=" dhx_layout-space"}var y=(0,l.el)(".dhx_layout-cell-content",{_key:"".concat(this._uid,"_html"),style:d},[(0,l.el)(".dhx_layout-cell-inner_html",{".innerHTML":this.config.html})]),b=s?(0,l.el)("fieldset.dhx_form-fieldset",{class:this.config.$disabled?" dhx_form-fieldset--disabled":"",style:d,disabled:this.config.$disabled},[(0,l.el)("legend.dhx_form-fieldset-legend",{class:"dhx_form-fieldset-legend--".concat(this.config.labelAlignment||"left")},this.config.label),(0,l.el)(".dhx_layout-cell-content",{class:this._getCss(!1)},[].concat(o))]):this.config.full?[(0,l.el)("div",{tabindex:this.config.collapsable?"0":"-1",class:"dhx_layout-cell-header"+(this._isXDirection()?" dhx_layout-cell-header--col":" dhx_layout-cell-header--row")+(this.config.collapsable?" dhx_layout-cell-header--collapseble":"")+(this.config.collapsed?" dhx_layout-cell-header--collapsed":"")+(((this.getParent()||{}).config||{}).isAccordion?" dhx_layout-cell-header--accordion":""),style:{height:this.config.headerHeight},onclick:this._handlers.toggle,onkeydown:this._handlers.enterCollapse},[this.config.headerIcon&&(0,l.el)("span.dhx_layout-cell-header__icon",{class:this.config.headerIcon}),this.config.headerImage&&(0,l.el)(".dhx_layout-cell-header__image-wrapper",[(0,l.el)("img",{src:this.config.headerImage,class:"dhx_layout-cell-header__image"})]),this.config.header&&(0,l.el)("h3.dhx_layout-cell-header__title",this.config.header),this.config.collapsable?(0,l.el)("div.dhx_layout-cell-header__collapse-icon",{class:this._getCollapseIcon()}):(0,l.el)("div.dhx_layout-cell-header__collapse-icon",{class:"dxi dxi-empty"})]),this.config.collapsed?null:(0,l.el)("div",{style:r(r({},d),{height:"calc(100% - ".concat(this.config.headerHeight||37,"px)")}),class:this._getCss(!0)+" dhx_layout-cell-content"+(this.config.type?_:"")},this.config.html?[(0,l.el)("div",{".innerHTML":this.config.html,class:"dhx_layout-cell dhx_layout-cell-inner_html"})]:o)]:!this.config.html||this.config.rows&&this.config.cols&&this.config.views?o:[this.config.collapsed?null:this.scrollView&&this.scrollView.config.enable&&this.getParent()?this.scrollView.render([y],this._uid):y],x=(0,l.el)("div",r(r(((e={_key:this.config.id||this._uid,_ref:this._uid})["aria-label"]=this.config.id?"tab-content-"+this.config.id:null,e["data-cell-id"]=null!==(i=this.config.id)&&void 0!==i?i:null,e["data-dhx-theme"]=null!==(n=this._theme)&&void 0!==n?n:null,e),g),{class:this._getCss(!1)+(this.config.css?" "+this.config.css:"")+(this.config.collapsed?" dhx_layout-cell--collapsed":"")+(this.config.resizable?" dhx_layout-cell--resizable":"")+(this.config.type&&!this.config.full?_:""),style:s?c:u}),b||h?[].concat(b,h):null);return p?[].concat(x,p):x}},e}(i(40).Cell);e.ProCell=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollView=e.scrollViewConfig=void 0;var n=i(0),o=i(1),r=i(2);e.scrollViewConfig={enable:!1,autoHide:!0,timeout:1e3,scrollHandler:function(){}};var a=function(){function t(t,i){var o;void 0===i&&(i={});var a=this;this.config=(0,n.extend)({enable:e.scrollViewConfig.enable,autoHide:e.scrollViewConfig.autoHide,timeout:e.scrollViewConfig.timeout,scrollHandler:e.scrollViewConfig.scrollHandler},i),this._wheelName=(0,r.isIE)()?"onmousewheel":"onwheel",this._getRootView=t,this._scrollYTop=this._scrollXLeft=this._runnerYTop=this._runnerXLeft=this._runnerHeight=this._runnerWidth=0,this._visibleYArea=this._visibleXArea=1,this._scrollWidth=(0,r.getScrollbarWidth)(),this._scrollHeight=(0,r.getScrollbarHeight)(),this._handlers=((o={onscroll:function(t){a.config.scrollHandler(t),a.update()}})[this._wheelName]=function(t){var e=!!(0,r.locateNodeByClassName)(t.target,"y-scroll");t.preventDefault();var i=40*((t.deltaY||-t.wheelDelta)>0?1:-1),n=a._getRefs().area;if(e){var o=n.scrollHeight-a._runnerHeight,l=a._scrollYTop+i;n.scrollTop=l<0?0:l>o?o:l}else{var s=n.scrollWidth-a._runnerWidth,c=a._scrollXLeft+i;n.scrollLeft=c<0?0:c>s?s:c}a.update()},o.onmousedownRunner=function(t){t.preventDefault();var e=!!(0,r.locateNodeByClassName)(t.target,"y-scroll"),i=a._getRefs(),n=i.area,o=i.runnerY,l=i.runnerX,s=n.getBoundingClientRect(),c=s.top+window.pageYOffset,d=s.bottom+window.pageYOffset,u=n.scrollHeight-a._runnerHeight,h=t.pageY-o.getBoundingClientRect().top-window.pageYOffset,f=s.left+window.pageXOffset,p=s.right+window.pageXOffset,g=n.scrollWidth-a._runnerWidth,v=t.pageX-l.getBoundingClientRect().left-window.pageXOffset,_=function(t){if(e){var i=t.pageY-h;n.scrollTop=i<=c?0:i>d?u:(i-c)/a._visibleYArea}else{var o=t.pageX-v;n.scrollLeft=o<=f?0:o>p?g:(o-f)/a._visibleXArea}a.update()},m=function(){document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",m),document.body.classList.remove("dhx-no-select")};document.body.classList.add("dhx-no-select"),document.addEventListener("mousemove",_),document.addEventListener("mouseup",m)},o.onmousedownArea=function(t){if(!(0,r.locateNodeByClassName)(t,"scroll-runner")){t.preventDefault();var e=!!(0,r.locateNodeByClassName)(t.target,"y-scroll"),i=a._getRefs(),n=i.area,o=i.runnerY,l=i.runnerX;e?n.scrollTop+=(t.pageY-o.getBoundingClientRect().top)/a._visibleYArea:n.scrollLeft+=(t.pageX-l.getBoundingClientRect().left)/a._visibleXArea,a.update()}},o.onmouseenter=function(t){if(!(0,r.locateNodeByClassName)(t,"scroll-runner")){var e=a._getRefs();if(e){var i=!!(0,r.locateNodeByClassName)(t.target,"y-scroll"),n=e.areaX,o=e.areaY;i&&a._runnerHeight>0?o.style.background="#eee":!i&&a._runnerWidth>0&&(n.style.background="#eee")}}},o.onmouseleave=function(t){if(!(0,r.locateNodeByClassName)(t,"scroll-runner")){var e=a._getRefs();if(e){var i=!!(0,r.locateNodeByClassName)(t.target,"y-scroll"),n=e.areaX,o=e.areaY;i&&a._runnerHeight>0?o.style.background="transparent":!i&&a._runnerWidth>0&&(n.style.background="transparent")}}},o)}return t.prototype.enable=function(){this.config.enable=!0,this._getRootView().redraw()},t.prototype.disable=function(){this.config.enable=!1,this._getRootView().redraw()},t.prototype.render=function(t,e){var i,n,r=this;if(void 0===e&&(e=""),!this.config.enable||!t.length)return t;e&&(this._uid=e);var a=this.config.enable?[(0,o.el)(".y-scroll",(i={},i[this._wheelName]=this._handlers[this._wheelName],i._ref=e?"scroll-y-area-".concat(e):"scroll-y-area",i.onmousedown=this._handlers.onmousedownArea,i.onmouseenter=this._handlers.onmouseenter,i.onmouseleave=this._handlers.onmouseleave,i.style={width:"6px",height:"100%",right:0,top:0,position:"absolute"},i),[(0,o.el)(".scroll-runner",{_ref:e?"scroll-y-runner-".concat(e):"scroll-y-runner",onmousedown:this._handlers.onmousedownRunner,style:{height:this._runnerHeight+"px",top:this._runnerYTop}})]),(0,o.el)(".x-scroll",(n={},n[this._wheelName]=this._handlers[this._wheelName],n._ref=e?"scroll-x-area-".concat(e):"scroll-x-area",n.onmousedown=this._handlers.onmousedownArea,n.onmouseenter=this._handlers.onmouseenter,n.onmouseleave=this._handlers.onmouseleave,n.style={width:"100%",height:"6px",left:0,bottom:0,position:"absolute"},n),[(0,o.el)(".scroll-runner",{_ref:e?"scroll-x-runner-".concat(e):"scroll-x-runner",onmousedown:this._handlers.onmousedownRunner,style:{width:this._runnerWidth+"px",left:this._runnerXLeft}})])]:null;return(0,o.el)(".scroll-view-wrapper",[(0,o.el)(".scroll-view",{class:this._scrollWidth?"":"scroll-view--overlay",onscroll:this._handlers.onscroll,_ref:e?"scroll-view-".concat(e):"scroll-view",_hooks:{didInsert:function(){r.update()},didRecycle:function(){r.update()}},style:{width:"calc(100% + ".concat(this._scrollWidth,"px)"),height:"calc(100% + ".concat(this._scrollHeight,"px)"),"margin-bottom":"-".concat(this._scrollHeight,"px")}},t)].concat(a))},t.prototype.update=function(){var t=this._getRefs();if(t){var e=t.area,i=t.areaX,o=t.areaY,r=t.runnerY,a=t.runnerX;this._visibleYArea=e.clientHeight/e.scrollHeight,this._visibleXArea=e.clientWidth/e.scrollWidth,this._scrollYTop=e.scrollTop,this._scrollXLeft=e.scrollLeft,this._runnerYTop=this._scrollYTop*this._visibleYArea,this._runnerXLeft=this._scrollXLeft*this._visibleXArea,this._runnerHeight=this._visibleYArea<1?e.clientHeight*this._visibleYArea:0,this._runnerWidth=this._visibleXArea<1?e.clientWidth*this._visibleXArea:0;var l=r.style.top,s=a.style.left;r.style.opacity=1,r.style.top=this._runnerYTop+"px",r.style.height=this._runnerHeight+"px",a.style.opacity=1,a.style.left=this._runnerXLeft+"px",a.style.width=this._runnerWidth+"px",l!==r.style.top&&(o.style.opacity=.9,o.style.width="10px"),s!==a.style.left&&(i.style.opacity=.9,i.style.height="10px"),this.config.autoHide?!this._autoHideFunc&&(this._autoHideFunc=(0,n.debounce)((function(){r.style.opacity=0,o.style.width="6px",a.style.opacity=0,i.style.height="6px"}),this.config.timeout)):this._autoHideFunc=(0,n.debounce)((function(){o.style.width="6px",i.style.height="6px"}),this.config.timeout),this._autoHideFunc()}},t.prototype._getRefs=function(){var t=this._getRootView(),e=!(!t.refs["scroll-view"]||!t.refs["scroll-x-runner"]&&!t.refs["scroll-y-runner"]),i=!(!this._uid||!t.refs["scroll-view-".concat(this._uid)]||!t.refs["scroll-x-runner-".concat(this._uid)]&&!t.refs["scroll-y-runner-".concat(this._uid)]);if(t.refs){if(e)return{area:t.refs["scroll-view"].el,areaY:t.refs["scroll-y-area"].el,areaX:t.refs["scroll-x-area"].el,runnerY:t.refs["scroll-y-runner"].el,runnerX:t.refs["scroll-x-runner"].el};if(i)return{area:t.refs["scroll-view-".concat(this._uid)].el,areaY:t.refs["scroll-y-area-".concat(this._uid)].el,areaX:t.refs["scroll-x-area-".concat(this._uid)].el,runnerY:t.refs["scroll-y-runner-".concat(this._uid)].el,runnerX:t.refs["scroll-x-runner-".concat(this._uid)].el}}},t}();e.ScrollView=a},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.PopupEvents=void 0,function(t){t.beforeHide="beforeHide",t.beforeShow="beforeShow",t.afterHide="afterHide",t.afterShow="afterShow",t.click="click"}(n||(e.PopupEvents=n={}))},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SliderEvents=void 0,function(t){t.beforeChange="beforeChange",t.change="change",t.focus="focus",t.blur="blur",t.keydown="keydown",t.mousedown="mousedown",t.mouseup="mouseup"}(n||(e.SliderEvents=n={}))},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.TimepickerEvents=void 0,function(t){t.beforeChange="beforeChange",t.change="change",t.beforeApply="beforeApply",t.afterApply="afterApply",t.beforeClose="beforeClose",t.afterClose="afterClose",t.apply="apply",t.close="close",t.save="save"}(n||(e.TimepickerEvents=n={}))},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.CalendarEvents=void 0,function(t){t.change="change",t.beforeChange="beforechange",t.modeChange="modeChange",t.monthSelected="monthSelected",t.yearSelected="yearSelected",t.cancelClick="cancelClick",t.dateMouseOver="dateMouseOver",t.dateHover="dateHover"}(n||(e.CalendarEvents=n={}))},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(48),e),o(i(113),e),o(i(53),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Combobox=e.$template=void 0;var a=i(0),l=i(1),s=i(6),c=i(2),d=i(108),u=i(11),h=i(8),f=i(27),p=i(49),g=i(30),v=i(112),_=i(32),m=i(16),y=i(52),b=i(53);function x(t,e){return"function"==typeof e?e(t):t+" "+_.default.selectedItems}e.$template=function(t){return t.icon?(0,l.el)("div.dhx_combobox-options-wrapper",[(0,l.el)("span",{class:"".concat(t.icon," dhx_combobox-options__icon")}),(0,l.el)("span",{class:"dhx_combobox-options__value"},t.value)]):t.src?(0,l.el)("div.dhx_combobox-options-wrapper",[(0,l.el)("img",{class:"dhx_combobox-options__image",alt:t.value,src:t.src}),(0,l.el)("span",{class:"dhx_combobox-options__value"},t.value)]):(0,l.el)("span",{class:"dhx_combobox-options__value"},t.value)};var w=function(t){function i(e,i){var n=t.call(this,e,(0,a.extend)({listHeight:224,disabled:!1,readOnly:!1,newOptions:!1,htmlEnable:!0},i))||this;n.config.itemsCount=n.config.itemsCount||n.config.showItemsCount,n.config.helpMessage=n.config.helpMessage||n.config.help,n.config.cellHeight&&36===n.config.itemHeight&&(n.config.itemHeight=n.config.cellHeight),n.config.labelInline&&(n.config.labelPosition="left"),Array.isArray(n.config.data)?(n.events=new s.EventSystem(n),n.data=new h.DataCollection({}),n.data.parse(n.config.data)):n.config.data?(n.data=n.config.data,n.events=new s.EventSystem(n),n.events.context=n):(n.events=new s.EventSystem(n),n.data=new h.DataCollection({})),n.popup=new g.Popup,n.popup.events.on(g.PopupEvents.afterShow,(function(){n.paint()})),n.popup.events.on(g.PopupEvents.afterHide,(function(){n.config.multiselection&&(n._state.value=""),n.paint()})),n.popup.events.on(g.PopupEvents.beforeHide,(function(t){t&&n._hideOptions()})),(n.config.readonly||n.config.readOnly)&&(n.config.readOnly=n.config.readOnly||n.config.readonly,n._keyListener=new v.KeyListener),n._state={value:"",ignoreNext:!1,canDelete:!1,unselectActive:!1,currentState:b.ComboState.default,creatingState:!1},n._initHandlers(),n._createLayout(),n.config.value&&n.data.getLength()&&(n._setValue(n.config.value,!0),n.config.value=""),n._initEvents();var o=(0,l.create)({render:function(){return n._draw()},hooks:{didRedraw:function(){n.popup.isVisible()&&(n.focus(),n._configurePopup())}}});return n.mount(e,o),n}return o(i,t),i.prototype.focus=function(){if(this.config.disabled)return!1;this.getRootView().refs.input.el.focus()},i.prototype.blur=function(){if(this.config.disabled)return!1;this.getRootView().refs.input.el.blur(),this.popup.hide()},i.prototype.enable=function(){this.config.disabled=!1,this.paint()},i.prototype.disable=function(){this.config.disabled=!0,this.paint()},i.prototype.isDisabled=function(){return this.config.disabled},i.prototype.clear=function(){this.list.selection.remove(),this._state.value="",this._filter(),this.paint()},i.prototype.getValue=function(t){var e=this.list.selection.getId();return t?(0,a.wrapBox)(e):Array.isArray(e)?e.join(","):e},i.prototype.setValue=function(t,e){return this._setValue(t,e)},i.prototype.addOption=function(t,e){if(void 0===e&&(e=!0),t){var i;"string"==typeof t?i=this.data.add({value:t}):"object"==typeof t&&(i=this.data.add(t));var n=this.config.multiselection&&e?r(r([],this.list.selection.getId(),!0),[i],!1):i;this.setValue(n)}},i.prototype.destructor=function(){this.popup&&this.popup.destructor(),this.events&&this.events.clear(),this.list&&this.list.destructor(),this._helper&&this._helper.destructor(),this._layout&&this._layout.destructor(),this._keyListener&&this._keyListener.destructor(),this.config=this.events=this.list=this.popup=null,this._helper=this._keyListener=this._handlers=this._state=this._uid=this._isPopupConfiqureted=null,this.unmount()},i.prototype.setState=function(t){switch(t){case"success":this._state.currentState=b.ComboState.success;break;case"error":this._state.currentState=b.ComboState.error;break;default:this._state.currentState=b.ComboState.default}this.paint()},i.prototype._setValue=function(t,e){var i=this;if(void 0===e&&(e=!1),!this._exsistId(t))return!1;if(this._filter(),this.list.selection.remove(null,e),this.config.multiselection)"string"==typeof t&&(t=t.split(",")),"number"==typeof t&&(t=[t]),t.forEach((function(t){i.list.selection.add(t,!1,!1,e)}));else{var n=(0,a.unwrapBox)(t);this.list.selection.add(n,!1,!1,e);var o=this.data.getItem(n);o&&(this._state.value=this._getItemText(o))}this.paint()},i.prototype._createLayout=function(){var t=this.list=new p.List(null,{$template:e.$template,template:this.config.template,htmlEnable:this.config.htmlEnable,virtual:this.config.virtual,keyNavigation:!0,multiselection:this.config.multiselection,itemHeight:this.config.itemHeight,height:this.config.listHeight,data:this.data,eventHandlers:this.config.eventHandlers}),i=this._layout=new f.Layout(this.popup.getContainer(),{css:"dhx_combobox-options dhx_combobox__options",rows:[{id:"select-unselect-all",hidden:!this.config.multiselection||!this.config.selectAllButton},{id:"list",height:"content"},{id:"not-found",hidden:!0}],on:{click:{".dhx_combobox__action-select-all":this._handlers.selectAll,".dhx_combobox-options__action-create-option":this._handlers.addOption}}});i.getCell("list").attach(t),this.config.multiselection&&this.config.selectAllButton&&i.getCell("select-unselect-all").attach(y.selectAllView)},i.prototype._initHandlers=function(){var t=this;this.config.helpMessage&&(this._helper=new g.Popup({css:"dhx_tooltip dhx_tooltip--forced dhx_tooltip--light"}),this._helper.attachHTML(this.config.helpMessage)),this._handlers={addOption:function(){return t.addOption(t._state.value)},showHelper:function(e){e.preventDefault(),e.stopPropagation(),t._helper.show(e.target,{mode:"left"===t.config.labelPosition?"bottom":"right",theme:e.target})},selectAll:function(){t._state.unselectActive?(t.list.selection.remove(),t.config.selectAllButton&&(t._layout.getCell("select-unselect-all").attach(y.selectAllView),t._state.unselectActive=!1)):(t.data.filter(),t.list.selection.add(),t.config.selectAllButton&&(t._layout.getCell("select-unselect-all").attach(y.unselectAllView),t._state.unselectActive=!0)),t._changePopupPosition(),t.paint()},onkeydown:function(e){if("Tab"===e.key&&t.popup.isVisible())t._hideOptions();else if(t.popup.isVisible()||e.which!==d.KEY_CODES.DOWN_ARROW||t._showOptions(),t.popup.isVisible()&&(e.which===d.KEY_CODES.RIGHT_ARROW&&t.config.readOnly&&!t.config.multiselection&&(t.list.moveFocus(p.MOVE_DOWN),e.preventDefault()),e.which===d.KEY_CODES.LEFT_ARROW&&t.config.readOnly&&!t.config.multiselection&&(t.list.moveFocus(p.MOVE_UP),e.preventDefault()),e.which===d.KEY_CODES.DOWN_ARROW&&(t.list.moveFocus(p.MOVE_DOWN),e.preventDefault()),e.which===d.KEY_CODES.UP_ARROW&&(t.list.moveFocus(p.MOVE_UP),e.preventDefault()),e.which===d.KEY_CODES.ESC&&t._hideOptions(),e.which===d.KEY_CODES.ENTER)){if(t.data.getLength()){var i=t.list.getFocus(),n=t.config.multiselection?r(r([],t.list.selection.getId(),!0),[i],!1):i;t.setValue(n)}else t.config.newOptions&&t.addOption(t._state.value,!0);t.config.multiselection?t._updatePopup():t.data.getLength()&&t._hideOptions()}t.events.fire(b.ComboboxEvents.keydown,[e,t.list.getFocus()])},onkeyup:function(e){if(t.config.multiselection&&!t.config.itemsCount)if(t._state.ignoreNext)t._state.ignoreNext=!1;else if(e.which===d.KEY_CODES.BACKSPACE&&!t._state.value&&t.config.multiselection&&t.list.selection.getId().length){var i=t.list.selection.getId(),n=i[i.length-1];t.list.selection.remove(n),t._changePopupPosition(),t.paint()}},oninput:function(e){if(!t.config.disabled){var i=e.target.value;t.events.fire(b.ComboboxEvents.input,[i]),t._state.value=i,i.length?t._state.canDelete=!1:(t._state.ignoreNext=!0,t._state.canDelete=!0),t.config.multiselection||t.list.selection.remove(),t._filter(!0),t.popup.isVisible()||t._showOptions(),t._updatePopup()}},oninputclick:function(e){var i;if(!t.config.disabled){if(t.focus(),e.target.classList.contains("dhx_combobox__action-remove")){var n=null===(i=t.data.getItem((0,c.locate)(e)))||void 0===i?void 0:i.id;if(!(0,a.isId)(n))return;return t.list.selection.remove(n),t._changePopupPosition(),void t.paint()}if(e.target.classList.contains("dhx_combobox__action-clear-all"))return t.list.selection.getId().forEach((function(e){return t.list.selection.remove(e)})),t.config.selectAllButton&&t._state.unselectActive&&(t._layout.getCell("select-unselect-all").attach(y.selectAllView),t._state.unselectActive=!1),void t.paint();e.preventDefault(),t.popup.isVisible()?t.focus():t._showOptions()}},toggleIcon:function(){t.focus(),t.popup.isVisible()?t._hideOptions():t._showOptions()},onfocus:function(){var e;return null===(e=t.events)||void 0===e?void 0:e.fire(b.ComboboxEvents.focus,[])},onblur:function(){var e;return null===(e=t.events)||void 0===e?void 0:e.fire(b.ComboboxEvents.blur,[])}}},i.prototype._initEvents=function(){var t=this;this.data.events.on(h.DataEvents.load,(function(){t.config.value&&(t._setValue(t.config.value,!0),t.config.value=""),t.popup.isVisible()&&t._filter()})),this.data.events.on(h.DataEvents.removeAll,(function(){t._state.value="",t.paint()})),this.data.events.on(h.DataEvents.afterAdd,(function(){t.popup.isVisible()&&(t.config.multiselection?t._changePopupPosition():t._hideOptions())})),this.list.events.on(p.ListEvents.click,(function(){t.config.multiselection||t._hideOptions(),t._changePopupPosition()})),this.list.selection.events.on(m.SelectionEvents.beforeSelect,(function(e){var i=t.config.multiselection?r(r([],t.getValue(t.config.multiselection),!0),[e],!1):e;return t.events.fire(b.ComboboxEvents.beforeChange,[i])})),this.list.selection.events.on(m.SelectionEvents.afterSelect,(function(){var e=t.getValue(t.config.multiselection);t.events.fire(b.ComboboxEvents.change,[e]),t._updateSelectedItem(e)})),this.list.selection.events.on(m.SelectionEvents.beforeUnSelect,(function(e){var i=t.config.multiselection?t.getValue(t.config.multiselection).filter((function(t){return t!=e})):e;return t.events.fire(b.ComboboxEvents.beforeChange,[i])})),this.list.selection.events.on(m.SelectionEvents.afterUnSelect,(function(){var e=t.config.multiselection,i=t.getValue(e);t.events.fire(b.ComboboxEvents.change,[i]),e&&t._updateSelectedItem(i)})),this.popup.events.on(g.PopupEvents.beforeShow,(function(){if(!t.popup.isVisible()&&!t._isPopupConfiqureted)return t._configurePopup(),!1})),this.popup.events.on(g.PopupEvents.afterShow,(function(){var e;if((null===(e=t.list.scrollView)||void 0===e?void 0:e.config.enable)&&t.list.scrollView.update(),t.config.readOnly){if(t._state.value){var i=t.list.selection.getId();t.list.setFocus(i)}else t.list.resetFocus();t._keyListener.startNewListen((function(e){return t._findBest(e)}))}t.list.scrollTo(t.list.getFocus())}))},i.prototype._showOptions=function(){this.events.fire(b.ComboboxEvents.beforeOpen)&&(this._state.value.length&&(this._state.canDelete=!0),this._filter(),this._configurePopup()&&(this.events.fire(b.ComboboxEvents.open),this.events.fire(b.ComboboxEvents.afterOpen)))},i.prototype._configurePopup=function(){this._isPopupConfiqureted=!0;var t=this.getRootView();return!!(t&&t.refs&&t.refs.holder)&&(this.popup.isVisible()||this._updatePopup(),!0)},i.prototype._hideOptions=function(){var t=this;this.events.fire(b.ComboboxEvents.beforeClose)&&(this.config.readOnly&&this._keyListener.endListen(),this.config.multiselection||this.config.readOnly||this.list.selection.contains()||(this._state.value=""),(0,l.awaitRedraw)().then((function(){return t.popup.isVisible()&&t.popup.hide()})),this.events.fire(b.ComboboxEvents.afterClose),this.events.fire(b.ComboboxEvents.close),this.data.resetFilter(),this._filter(),this.paint())},i.prototype._filter=function(t){var e=this;if(void 0===t&&(t=!1),!this.config.readOnly){this.config.filter?this.data.filter((function(t){return e.config.filter(t,e._state.value)})):t&&this.data.filter((function(t){return(0,a.isExistValue)(e._getItemText(t)||"",e._state.value)}));var i=this.list.selection.getId();!i||this.config.multiselection?this.list.resetFocus():this.list.setFocus(i);var n=this._layout.getCell("list"),o=this._layout.getCell("not-found");if(0===this.data.getLength()){this.config.multiselection&&this.config.selectAllButton&&this._layout.getCell("select-unselect-all").hide(),n.hide(),this._state.creatingState=!0;var r=this.config.newOptions?this._state.value:"";o.height=(0,y.emptyListHeight)(r,this.getRootView().refs.holder.el.offsetWidth),o.attach(y.emptyListView,r),o.show()}else{if(this.config.multiselection&&this.config.selectAllButton&&this._layout.getCell("select-unselect-all").show(),!(this._state.value&&this.data.find((function(t){return t.value===e._state.value})))&&this._state.value)if(this._state.creatingState=this.config.newOptions,n.show(),this.config.newOptions){r=this._state.value;o.height=(0,y.emptyListHeight)(r,this.getRootView().refs.holder.el.offsetWidth),o.attach(y.emptyListView,r),o.show()}else o.hide();else this._state.creatingState=!1,o.isVisible()&&(n.show(),o.hide())}}},i.prototype._findBest=function(t){var e=this,i=this.data.find((function(i){return(0,a.isExistValue)(e._getItemText(i)||"",t)}));i&&this.list.selection.getId()!==i.id&&(this.list.setFocus(i.id),this.paint())},i.prototype._exsistId=function(t){var e=this;return t instanceof Array?t.every((function(t){return e.data.exists(t)})):this.data.exists(t)},i.prototype._draw=function(){var t;if(!this.config)return(0,l.el)("div");var i=this.config,n=i.multiselection,o=i.labelPosition,a=i.hiddenLabel,s=i.required,d=i.disabled,u=i.css,h=i.helpMessage,f=i.readOnly,p=i.placeholder,g=n?null:this.data.getItem(this.list.selection.getId()),v=!this.list.selection.getId()||"object"==typeof this.list.selection.getId()&&0===this.list.selection.getId().length,_=(0,c.getLabelStyle)(this.config),m=!this.config.multiselection&&(this.config.readOnly||!this.popup.isVisible()),y=m&&this.config.htmlEnable&&this.config.template,x=m&&((null==g?void 0:g.icon)||(null==g?void 0:g.src))&&!this.config.template;return(0,l.el)("div",{"data-dhx-widget-id":this._uid,onkeydown:this._handlers.onkeydown,onkeyup:this._handlers.onkeyup,class:"dhx_widget dhx_combobox"+("left"===o?" dhx_combobox--label-inline":"")+(a?" dhx_combobox--sr_only":"")+(s?" dhx_combobox--required":"")+(d?" dhx_combobox--disabled":"")+(u?" ".concat(u):"")},[_?(0,l.el)("label.dhx_label.dhx_combobox__label",{style:_.style,class:h?"dhx_label--with-help":"",onclick:this._handlers.oninputclick},h?[(_.label||s)&&(0,l.el)("span.dhx_label__holder",_.label),(0,l.el)("span.dhx_label-help.dxi.dxi-help-circle-outline",{tabindex:"0",role:"button",onclick:this._handlers.showHelper,id:"dhx_label__help_".concat(this._uid)})]:_.label):null,(0,l.el)("div.dhx_combobox-input-box"+(d?".dhx_combobox-input-box--disabled":"")+(f?".dhx_combobox-input-box--readonly":"")+(this._state.currentState===b.ComboState.error?".dhx_combobox-input-box--state_error":"")+(this._state.currentState===b.ComboState.success?".dhx_combobox-input-box--state_success":""),{_ref:"holder"},[(0,l.el)("div.dhx_combobox-input__icon",{onclick:this._handlers.toggleIcon},[(0,l.el)("span"+(this.popup.isVisible()?".dxi.dxi-menu-up":".dxi.dxi-menu-down"))]),(0,l.el)("div.dhx_combobox-input-list-wrapper",{onclick:this._handlers.oninputclick},[(0,l.el)("ul.dhx_combobox-input-list",r(r([],this._drawSelectedItems(),!0),[(0,l.el)("li.dhx_combobox-input-list__item.dhx_combobox-input-list__item--input",[(y||x)&&g?(0,l.el)("div.dhx_combobox-input__template",{".innerHTML":y?this.config.template(g):null},x?[(0,e.$template)(g)]:null):null,(0,l.el)("input.dhx_combobox-input",{oninput:this._handlers.oninput,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,_ref:"input",_key:this._uid,type:"text",placeHolder:v&&p?p:void 0,value:f&&g?this._getItemText(g):this._state.value,readOnly:f||d,required:s,role:"combobox","aria-label":f?"Select value":"Type or select value","aria-describedby":h?"dhx_label__help_".concat(this._uid):null,"aria-expanded":this.popup.isVisible().toString(),"aria-controls":null===(t=this.list.getRootView().node)||void 0===t?void 0:t.attrs.id})])],!1))])])])},i.prototype._drawSelectedItems=function(){var t=this;if(!this.config.multiselection)return[];if(this.config.itemsCount){var e=this.list.selection.getId().length;return e?[(0,l.el)("li.dhx_combobox-input-list__item.dhx_combobox-tag",[(0,l.el)("span.dhx_combobox-tag__value",x(e,this.config.itemsCount)),(0,l.el)("button.dhx_button.dhx_combobox-tag__action.dhx_combobox__action-clear-all",{"aria-label":"clear all"},[(0,l.el)("span.dhx_button__icon.dxi.dxi-close-circle")])])]:[]}return this.list.selection.getId().map((function(e){var i=t.data.getItem(e);if(!i)return null;var n=t._drawImageOrIcon(i);return(0,l.el)("li.dhx_combobox-input-list__item.dhx_combobox-tag",{"data-dhx-id":e},r(r([],n||!t.config.template?[n,(0,l.el)("span.dhx_combobox-tag__value",t._getItemText(i))]:[(0,l.el)("span.dhx_combobox-tag__template",{".innerHTML":t.config.template(i)})],!0),[(0,l.el)("button.dhx_button.dhx_button--icon.dhx_combobox-tag__action.dhx_combobox__action-remove",{type:"button","aria-label":"remove"},[(0,l.el)("span.dhx_button__icon.dxi.dxi-close-circle")])],!1))}))},i.prototype._drawImageOrIcon=function(t){return t.src?(0,l.el)("img.dhx_combobox-tag__image",{src:t.src,alt:""}):t.icon?(0,l.el)("span.dhx_combobox-tag__icon",{class:t.icon}):null},i.prototype._getItemText=function(t){return t?t.value:null},i.prototype._updateSelectedItem=function(t){var e;this.config.multiselection?(this.config.selectAllButton&&!this._state.unselectActive&&this.data.getLength()===t.length?(this._layout.getCell("select-unselect-all").attach(y.unselectAllView),this._state.unselectActive=!0):this.config.selectAllButton&&this._state.unselectActive&&(this._layout.getCell("select-unselect-all").attach(y.selectAllView),this._state.unselectActive=!1),this._state.value&&(this._state.value="",this._state.canDelete=0===t.length,this.data.resetFilter(),this._filter())):this._state.value=null!==(e=this._getItemText(this.data.getItem(t)))&&void 0!==e?e:"",this.paint()},i.prototype._changePopupPosition=function(){var t=this;this.config.multiselection&&(0,l.awaitRedraw)().then((function(){t._updatePopup()}))},i.prototype._updatePopup=function(){var t=this.popup.getContainer(),e=this.getRootView().refs.holder.el;t.style.width=e.offsetWidth+"px";var i=parseInt(this.config.listHeight);this.data.getLength()<=10&&(i=(0,l.getViewHeight)(this.list._renderList(),e.offsetWidth));var n=this._layout.getCell("select-unselect-all").isVisible()?33:0,o=this._state.creatingState?this._layout.getCell("not-found").height:0;t.style.height=i+n+o+"px",this.popup.show(e,{mode:"bottom",theme:this.getRootNode()})},i}(u.View);e.Combobox=w},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(50),e),o(i(111),e),o(i(51),e),o(i(31),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.List=e.MOVE_DOWN=e.MOVE_UP=void 0;var l=i(0),s=i(8),c=i(1),d=i(25),u=i(16),h=i(11),f=i(51),p=i(2),g=i(31),v=i(109);e.MOVE_UP=1,e.MOVE_DOWN=2;var _=function(t){function i(e,i){void 0===i&&(i={});var n=this,o=i.itemHeight||(i.virtual?37:null);o&&"number"==typeof o&&(o=o.toString()+"px"),(n=t.call(this,e,(0,l.extend)({itemHeight:o,keyNavigation:!0,editable:!1,selection:!0,htmlEnable:!0},i))||this)._destructed=!1,n._touch={duration:350,dblDuration:300,timer:null,start:!1,timeStamp:null};var r=n.config.data;r instanceof s.DataCollection?(n.data=r,n.events=r.events):(n.data=new s.DataCollection({}),n.events=n.data.events,r&&n.data.parse(r)),n.selection=new f.Selection({disabled:!n.config.selection,multiselection:n.config.multiselection},n.data,n.events),n.config.keyNavigation&&(n.keyManager=new d.KeyManager((function(t,e){return e==n._uid&&(!n._edited||n._edited&&"escape"!==t.key)})),n._initHotKey()),n.events.on(s.DataEvents.change,(function(t,e,i){"setPage"===e&&n.scrollTo(n.data.getId(i[0])),n.paint()})),n.events.on(s.DataEvents.filter,(function(){n.paint()})),n.events.on(u.SelectionEvents.afterUnSelect,(function(){return n.paint()})),n.events.on(u.SelectionEvents.afterSelect,(function(t){(0,l.isId)(t)&&n.config.selection&&n.setFocus(t),n.paint()})),n.events.on(g.ListEvents.afterEditEnd,n.editEnd.bind(n));var a=function(t){return function(e){n.data.setMeta(n.data.getItem(e.target),"drop",t),n.paint()}};n.events.on(s.DragEvents.canDrop,a(!0)),n.events.on(s.DragEvents.cancelDrop,a(!1));var h=function(t){return function(e){e.source.map((function(e){return n.data.setMeta(n.data.getItem(e),"drag",t)})),n.paint()}};n.events.on(s.DragEvents.dragStart,h(!0)),n.events.on(s.DragEvents.afterDrag,h(!1)),n._handlers={onmousedown:function(t){n._dragStart(t)},ontouchstart:function(t){(n._touch.timer=setTimeout((function(){n._dragStart(t)}),n._touch.duration),n._touch.timeStamp)?(n._touch.dblDuration>=n._touch.timeStamp-+t.timeStamp.toFixed()&&(t.preventDefault(),n._dblClick(t)),n._touch.timeStamp=null):n._touch.timeStamp=+t.timeStamp.toFixed();setTimeout((function(){n._touch.timeStamp=null}),n._touch.dblDuration)},ontouchmove:function(t){n._touch.start&&t.preventDefault(),n._clearTouchTimer()},ontouchend:function(){n._touch.start=!1,n._clearTouchTimer()},ondragstart:function(){return!(n.config.dragMode&&!n._edited)&&null},oncontextmenu:function(t){var e,i=null===(e=n.data.getItem((0,p.locate)(t)))||void 0===e?void 0:e.id;(0,l.isId)(i)&&n.events.fire(g.ListEvents.itemRightClick,[i,t])},onclick:function(t){var e,i=null===(e=n.data.getItem((0,p.locate)(t)))||void 0===e?void 0:e.id;(0,l.isId)(i)&&(n.selection.add(i,t.ctrlKey||t.metaKey,t.shiftKey),n.config.selection&&(n._focus=i),n.events.fire(g.ListEvents.click,[i,t]),n.paint())},ondblclick:function(t){n._dblClick(t)},onscroll:function(t){n.config.virtual&&(n._topOffset=t.target.scrollTop,n._visibleHeight=t.target.offsetHeight,n.paint())},onmouseover:function(t){var e,i=null===(e=n.data.getItem((0,p.locate)(t)))||void 0===e?void 0:e.id;(0,l.isId)(i)&&(i!==(0,p.locate)(t.relatedTarget)&&n.events.fire(g.ListEvents.itemMouseOver,[i,t]))}};var v=n.config.eventHandlers;if(v)for(var _=0,m=Object.entries(v);_<m.length;_++){var y=m[_],b=y[0],x=y[1];n._handlers[b]=(0,p.eventHandler)((function(t){return(0,p.locate)(t)}),x,n._handlers[b])}n.config.dragMode&&s.dragManager.setItem(n._uid,n),n._topOffset=n._visibleHeight=0;var w=(0,c.create)({render:function(){return n._destructed?(0,c.el)("div"):n._renderList()},hooks:{didMount:function(t){n.config.virtual&&(n._visibleHeight=t.node.el.offsetHeight)},didRedraw:function(t){return n._didRedraw(t)}}});return n.mount(e,w),n}return o(i,t),i.prototype._didRedraw=function(t){},i.prototype._dblClick=function(t){var e,i=(0,p.locate)(t);i&&(i=null===(e=this.data.getItem(i))||void 0===e?void 0:e.id,this.config.editable&&this.editItem(i),this.events.fire(g.ListEvents.doubleClick,[i,t]))},i.prototype._clearTouchTimer=function(){this._touch.timer&&(clearTimeout(this._touch.timer),this._touch.timer=null)},i.prototype._dragStart=function(t){var e=this;this._touch.start=!0;var i=[],n=(0,p.locateNode)(t,"data-dhx-id"),o=n&&n.getAttribute("data-dhx-id"),r=this.selection.getId();return this.config.multiselection&&r instanceof Array&&(r.map((function(t){t!==o&&e.getRootView().refs[t]&&i.push(e.getRootView().refs[t].el)})),r=a([],r,!0)),"string"==typeof r&&(r=[r]),this.config.dragMode&&!this._edited?s.dragManager.onMouseDown({event:t,type:"row",source:r||[o],itemsForGhost:i}):null},i.prototype.disableSelection=function(){this.selection.disable()},i.prototype.enableSelection=function(){this.selection.enable()},i.prototype.editItem=function(t){this._edited=t,this.data.getItem(this._edited)&&this.events.fire(g.ListEvents.beforeEditStart,[t])?(this.paint(),this.events.fire(g.ListEvents.afterEditStart,[t])):this._edited=null},i.prototype.editEnd=function(t,e){if(this._edited){if(null!==t){var i=this.data.getItem(e);this.data.update(e,r(r({},i),{value:t})),this._changed=!0}this._edited=null,this.paint()}},i.prototype.getFocusItem=function(){return this.data.getItem(this._focus)},i.prototype.setFocus=function(t){this._focus!=t&&this.data.exists(t)&&(this._focus=t,this.events.fire(g.ListEvents.focusChange,[this.data.getIndex(this._focus),this._focus]),this.scrollTo(t),this.paint())},i.prototype.resetFocus=function(){this._focus=void 0,this.events.fire(g.ListEvents.focusChange),this.scrollTo(this.data.getId(0)),this.paint()},i.prototype.getFocus=function(){return this._focus},i.prototype.destructor=function(){this._destructed=!0,this.events&&this.events.clear(),this.keyManager&&this.keyManager.destructor(),this.selection&&this.selection.destructor(),this.config=this.events=this.selection=this.keyManager=null,this._handlers=this._focus=this._edited=this._events=this._topOffset=this._visibleHeight=this._touch=null,this.unmount()},i.prototype.scrollTo=function(t){var e=this.getRootView();if(e&&e.node&&e.node.el&&void 0!==t){var i=this.getRootNode();this._scrollTo(t,i)}},i.prototype._scrollTo=function(t,e){if(e){var i=this.data.getIndex(t);if(-1!==i){var n=this.config.virtual,o=Math.floor(i/e.children.length)||0,r=e.children[i-e.children.length*o];if(n||r){var a=n?parseInt(this.config.itemHeight):r.clientHeight,l=n?i*a:r.offsetTop;l>=e.scrollTop+e.clientHeight-a?e.scrollTo(0,l-e.clientHeight+a):l<e.scrollTop&&e.scrollTo(0,l)}}}},i.prototype._renderItem=function(t,e){var i=function(t){t.class+=" dhx_list-item--empty"},n=this.config.itemHeight;if(t.$empty)return(0,c.el)("li",{class:"dhx_list-item",style:{height:n}});var o="";this.config.template&&(o=this.config.template(t)),t.html&&(o=t.html);var a=t.id==this._focus&&this.config.keyNavigation;if(t.id==this._edited)return(0,v.getEditor)(t,this).toHTML();var l=this.data.getMetaMap(t),s=r(r(r(r({},this._events),{class:"dhx_list-item"+(l&&l.selected?" dhx_list-item--selected":"")+(a?" dhx_list-item--focus":"")+(l&&l.drop&&!this._edited?" dhx_list-item--drophere":"")+(l&&l.drag&&!this._edited?" dhx_list-item--dragtarget":"")+(this.config.dragMode&&!this._edited?" dhx_list-item--drag":"")+(t.css?" "+t.css:""),"data-dhx-id":t.id,_ref:t.id.toString(),style:{height:n},_key:t.id}),this.getItemAriaAttrs(this,t)),{tabindex:a?0:-1});if(o)return o===t.html||this.config.htmlEnable?(s[".innerHTML"]=o,(0,c.el)("li",s)):(0,c.el)("li",s,o);if(this.config.$template)return t.value||i(s),(0,c.el)("li",s,[this.config.$template(t)]);var d=t.text||t.value;return d||i(s),this.config.htmlEnable?s[".innerHTML"]=d:s.class+=" dhx_list-item--text",this.config.htmlEnable?(0,c.el)("li",s):(0,c.el)("li",s,d)},i.prototype._renderList=function(){var t=this,e=this._getRange(),i=this.data.getRawData(e[0],e[1]).map((function(e,i){return t._renderItem(e,i)}));return this.config.virtual&&(i=a(a([(0,c.el)(".div",{style:{height:e[2]+"px",_key:"start-key"}})],i,!0),[(0,c.el)(".div",{style:{height:e[3]+"px",_key:"end-key"}})],!1)),(0,c.el)("ul.dhx_widget.dhx_list",r(r({style:{"max-height":this.config.height,position:"relative"},tabindex:0,id:this._uid,class:(this.config.css?this.config.css:"")+(this.config.multiselection&&this.selection.getItem()?" dhx_no-select--pointer":""),"data-dhx-widget-id":this._uid,"data-dhx-drop-area":"row"},this._handlers),this._getListAriaAttrs(this.config,this.data.getLength())),i)},i.prototype.moveFocus=function(t,i){var n=this.data.getLength();if(n){var o=this._focus,r=o?this.data.getIndex(o):-1;i=i||1,t===e.MOVE_DOWN?o=this.data.getId(Math.min(r+i,n-1)):t===e.MOVE_UP&&(o=this.data.getId(Math.max(r-i,0))),this.setFocus(o)}},i.prototype._getRange=function(){if(this.config.virtual){var t=this._visibleHeight||parseInt(this.config.height),e=parseInt(this.config.itemHeight)||37,i=this.data.getRawData(0,-1).length,n=i*e,o=this._topOffset;o=Math.max(0,Math.min(o,n-t));var r=Math.floor(o/e),a=Math.min(i-r,Math.floor(t/e)+5);return this._topOffset=o,[r,a+r,r*e,n-e*(a+r)]}return[0,-1,0,0]},i.prototype._getHotkeys=function(){var t=this;return{arrowDown:function(i){t.moveFocus(e.MOVE_DOWN),t._changed&&(t._changed=!1),i.preventDefault()},arrowUp:function(i){t.moveFocus(e.MOVE_UP),t._changed&&(t._changed=!1),i.preventDefault()},escape:function(){t.editEnd(null),t._changed&&(t._changed=!1)},enter:function(e){var i;if(t._changed)t._changed=!1;else{var n=t.selection.getItem(),o=n instanceof Array?null===(i=n[0])||void 0===i?void 0:i.id:null==n?void 0:n.id;t.config.editable&&!t._edited&&(n&&o===t._focus||!n)?t.editItem(t._focus):t.selection.add(t._focus),t.events.fire(g.ListEvents.click,[t._focus,e])}},"shift+enter":function(e){t.selection.add(t._focus,!1,!0),t.events.fire(g.ListEvents.click,[t._focus,e])},"ctrl+enter":function(e){t.selection.add(t._focus,!0,!1),t.events.fire(g.ListEvents.click,[t._focus,e])},"ctrl+a":function(e){t.config.multiselection&&(e.preventDefault(),t.selection.remove(),t.data.map((function(t){return t.id})).forEach((function(e){"ctrlClick"===t.config.multiselection?t.selection.add(e,!0):t.selection.add(e)})))}}},i.prototype._initHotKey=function(){var t=this._getHotkeys();for(var e in t)this.keyManager.addHotKey(e,t[e]);for(var e in this.config.hotkeys)this.keyManager.addHotKey(e,this.config.hotkeys[e])},i.prototype.getItemAriaAttrs=function(t,e){return r(r({role:"option","aria-selected":e.id===this._focus?"true":"false"},function(t,e){return t.config.dragMode&&!t._edited?{"aria-grabbed":Boolean(e.$dragtarget&&!t._edited).toString()}:{}}(t,e)),function(t){return t.config.editable?{"aria-roledescription":"".concat(t._edited?"Press Enter to stop editing":"Double click to edit content")}:{}}(t))},i.prototype._getListAriaAttrs=function(t,e){return{role:"listbox","aria-label":"Listbox ".concat(t.title||"",", count of options = ").concat(e,".").concat(t.editable?" Content is editable.":""),"aria-multiselectable":t.selection&&t.multiselection?"true":"false","aria-readonly":t.editable?"false":"true"}},i}(h.View);e.List=_},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;var n=i(16),o=i(8),r=i(0),a=function(){function t(t,e,i){var n=this;if(this.config=t,this.events=i,this._data=e,this._selected=[],this._data.events.on(o.DataEvents.removeAll,(function(){n._selected=[]})),"string"==typeof this.config.multiselection){["click","ctrlClick"].includes(this.config.multiselection)||(this.config.multiselection=!1)}this._data.events.on(o.DataEvents.beforeRemove,(function(t){if(n._nextSelection=null,1===n._selected.length){var e=n._data.getIndex(t.id),i=n._data.getLength();if(i>1){var o=i==e-1?e-1:e+1;n._nextSelection=n._data.getId(o)}}})),this._data.events.on(o.DataEvents.afterRemove,(function(t){var e=n._selected.indexOf(t.id);-1!==e&&n._selected.splice(e,1),(0,r.isId)(n._nextSelection)&&(n.add(n._nextSelection),n._nextSelection=null)}))}return t.prototype.enable=function(){this.config.disabled=!1},t.prototype.disable=function(){this.remove(),this.config.disabled=!0},t.prototype.getId=function(){return this.config.multiselection?this._selected:this._selected[0]},t.prototype.getItem=function(){var t=this;return this.config.multiselection?this._selected.map((function(e){return t._data.getItem(e)})):this._selected.length?this._data.getItem(this._selected[0]):null},t.prototype.contains=function(t){return(0,r.isId)(t)?this._selected.includes(t):this._selected.length>0},t.prototype.remove=function(t,e){var i=this;(0,r.isId)(t)?this._unselectItem(t,e):(this._selected.forEach((function(t){return i._unselectItem(t,e)})),this._selected=[])},t.prototype.add=function(t,e,i,n){var o=this;if(!this.config.disabled)if(void 0!==t){var r=this.config.multiselection;i&&this._selected.length&&r?this._addMulti(t,n):this._addSingle(t,r&&("ctrlClick"!==r||e),n)}else{var a=this._data.serialize().filter((function(t){var e=t.id;return!o._selected.includes(e)}));a.forEach((function(t){var e=t.id;o._addMulti(e,n)}))}},t.prototype.destructor=function(){var t=this;this._selected.forEach((function(e){return t._unselectItem(e,!0)}))},t.prototype._addMulti=function(t,e){var i,n=this._selected[this._selected.length-1],o=this._data.getIndex(n),r=this._data.getIndex(t);for(o>r&&(o=(i=[r,o])[0],r=i[1]);o<=r;o++){var a=this._data.getId(o);this._selectItem(a,e)}},t.prototype._addSingle=function(t,e,i){var n=this;e||this._selected.forEach((function(e){e!=t&&n._unselectItem(e)})),e&&this._selected.includes(t)?this._unselectItem(t,i):this._selectItem(t,i)},t.prototype._selectItem=function(t,e){var i=this._data.getItem(t);i&&!this._data.getMeta(i,"selected")&&(e||this.events.fire(n.SelectionEvents.beforeSelect,[t]))&&(this._selected.push(t),this._data.setMeta(i,"selected",!0),e||this.events.fire(n.SelectionEvents.afterSelect,[t]))},t.prototype._unselectItem=function(t,e){(e||this.events.fire(n.SelectionEvents.beforeUnSelect,[t]))&&(this._selected=this._selected.filter((function(e){return e!==t})),this._data.setMeta(this._data.getItem(t),"selected",!1),e||this.events.fire(n.SelectionEvents.afterUnSelect,[t]))},t}();e.Selection=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.emptyListHeight=e.emptyListView=e.unselectAllView=e.selectAllView=void 0;var n=i(1),o=i(32);e.selectAllView=function(){return(0,n.el)(".dhx_list-item.dhx_combobox-options__item.dhx_combobox-options__item--select-all.dhx_combobox__action-select-all",o.default.selectAll)},e.unselectAllView=function(){return(0,n.el)(".dhx_list-item.dhx_combobox-options__item.dhx_combobox-options__item--select-all.dhx_combobox__action-select-all",o.default.unselectAll)},e.emptyListView=function(t){return(0,n.el)("ul.dhx_list",[(0,n.el)("li.dhx_list-item.dhx_combobox-options__item".concat(t?".dhx_combobox-options__action-create-option":""),{},t?"".concat(o.default.createItem,' "').concat(t,'"'):o.default.notFound)])},e.emptyListHeight=function(t,e){var i=document.createElement("canvas").getContext("2d",{alpha:!1});i.font="normal 14px Roboto";var n=t?"".concat(o.default.createItem,' "').concat(t,'"'):o.default.notFound;return 13+20*Math.ceil(i.measureText(n).width/(e-16))}},function(t,e,i){"use strict";var n,o;Object.defineProperty(e,"__esModule",{value:!0}),e.ComboState=e.ComboboxEvents=void 0,function(t){t.beforeChange="beforeChange",t.change="change",t.focus="focus",t.blur="blur",t.keydown="keydown",t.input="input",t.beforeOpen="beforeOpen",t.afterOpen="afterOpen",t.beforeClose="beforeClose",t.afterClose="afterClose",t.open="open",t.close="close"}(n||(e.ComboboxEvents=n={})),function(t){t[t.default=0]="default",t[t.error=1]="error",t[t.success=2]="success"}(o||(e.ComboState=o={}))},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.getFixedCols=e.getFixedColsHeader=void 0;var r=i(1),a=i(3),l=i(19),s=i(55),c=i(5),d=i(7);e.getFixedColsHeader=function(t,e,i){if((i!==a.Split.left||"number"==typeof t.leftSplit&&t.fixedColumns.left.length)&&(i!==a.Split.right||"number"==typeof t.rightSplit&&t.fixedColumns.right.length)){var o=t.leftSplit,l=t.rightSplit,u=t.$positions,h=t.$totalWidth,f=t.$scrollBarWidth,p=i===a.Split.right,g=p?t.fixedColumns.right:t.fixedColumns.left,v=(0,c.getTotalWidth)(g),_=(0,s.getFixedRows)(n(n({},t),{currentColumns:g,$positions:n(n({},u),{xStart:0,xEnd:p?l:o}),scroll:{top:0,left:0},filteredColumns:g}),n(n({},e),{name:"header",position:"top",shifts:{x:0,y:0}}),i),m=n(n({},e),{name:"header",position:"top"});return(0,r.el)(".dhx_".concat(m.name,"-fixed-cols"),n({onwheel:c.scrollFixedColsAndRows,class:p?"dhx_grid__cols_right--fixed":"dhx_grid__cols_left--fixed",style:{position:"absolute",top:0,left:p?h<e.wrapper.width-f.y-d.BORDERS?h-v:e.wrapper.width-v-f.y-d.BORDERS:0,width:v,overflow:"hidden"}},{role:"rowgroup"}),_.body)}},e.getFixedCols=function(t,e,i,u){var h=i===a.Split.right,f=h?t.rightSplit:t.leftSplit,p=h?t.fixedColumns.right:t.fixedColumns.left;if("number"==typeof f&&p.length){var g=t.$totalWidth,v=t.$totalHeight,_=t.headerHeight,m=t.footerHeight,y=t.$positions,b=t.scroll,x=t.$scrollBarWidth,w=t.$footer,C=t.$footerHeight,S=t.fixedRows,E=h?"rightFixedCols":"leftFixedCols",D=(0,c.getTotalWidth)(p),O=v+_+m,k=e.gridBodyHeight,T=x.x,R=O;O>k?R=w?O-T:k:O>=k-T&&(R=w?k:k-T);var M=n(n({},t),{$positions:n(n({},y),{xStart:0,xEnd:f})}),I=(0,l.getCells)(n(n({},M),{filteredColumns:p,$renderFrom:E})),P=e.sticky,H=n(n({},e),{name:"footer",position:"bottom"}),F=(0,s.getRows)(n(n({},M),{currentColumns:p}),H),A=F.reduce((function(t,e){return t+e.attrs.style.height}),0),j=(0,s.getFixedSpans)(n(n({},t),{filteredColumns:p}),H,i),$=e.wrapper.width-x.y-d.BORDERS,L=h?g<$?g-D:$-D:0,N={position:"absolute",left:L,overflow:"hidden",top:(!e.footerAtBottom||u===a.Split.top)&&R<k?R-A:null,bottom:u!==a.Split.top&&e.footerAtBottom||R>=k?"".concat(P?e.footerAtBottom&&u===a.Split.bottom?-1:T:0,"px"):null},V=P&&w?(0,r.el)(".dhx_footer-fixed-cols",n({onwheel:c.scrollFixedColsAndRows,class:h?"dhx_grid__cols_right--fixed":"dhx_grid__cols_left--fixed",style:N},{role:"rowgroup"}),o(o([],F,!0),[(0,r.el)("span.dhx_span-spans",{class:"dhx_footer-spans",role:"presentation"},j)],!1)):null,W=R>=k?(P?k:k+_)-T:R;!u&&e.footerAtBottom&&(W-=(0,c.getTotalHeight)(S.bottom)+C);var B=(0,l.getSpans)(n(n({},t),{$renderFrom:E}),u||(h?a.Split.right:a.Split.left));return[(0,r.el)(".dhx_grid-fixed-cols-wrap",{style:{left:L,height:W,paddingTop:_,overflow:"hidden",width:D},role:"presentation","aria-label":"Fixed column","data-dhx-drop-area":"row"},[(0,r.el)(".dhx_grid-fixed-cols",n(n({onwheel:c.scrollFixedColsAndRows,class:h?"dhx_grid__cols_right--fixed":"dhx_grid__cols_left--fixed",style:{top:"".concat(-b.top+_-1,"px"),paddingTop:e.shifts.y,height:v,position:"absolute"},_flags:r.KEYED_LIST},(0,l.getHandlers)(y.yStart,y.xStart,t)),{role:"rowgroup"}),o(o([],I,!0),[B&&(0,r.el)("span.dhx_span-spans",{role:"presentation"},B)],!1)),(0,r.el)(".dhx_grid__cols-border--frozen",{role:"presentation",style:h?{left:0}:{right:0}})]),V]}}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.getFixedDataRows=e.getFixedRows=e.getFixedSpans=e.getRows=void 0;var r=i(1),a=i(14),l=i(5),s=i(3),c=i(19),d=i(54),u=i(0),h=i(7),f=i(4);function p(t,e,i,n,o){n&&(n.toLocaleLowerCase().includes("touch")?i._events.fire(n,[t,e,o]):i.events.fire(n,[t,e,o]))}function g(t,e,i,n){return{onclick:[p,n,t,i,s.GridEvents[e+"CellClick"]],onmouseover:[p,n,t,i,s.GridEvents[e+"CellMouseOver"]],onmousedown:[p,n,t,i,s.GridEvents[e+"CellMouseDown"]],ontouchstart:[p,n,t,i,s.GridEvents[e+"CellMouseDown"]],ondblclick:[p,n,t,i,s.GridEvents[e+"CellDblClick"]],oncontextmenu:[p,n,t,i,s.GridEvents[e+"CellRightClick"]],ontouchmove:[p,n,t,i,s.GridSystemEvents[e+"CellTouchMove"]],ontouchend:[p,n,t,i,s.GridSystemEvents[e+"CelltouchEnd"]]}}function v(t,e,i,n,o,a){void 0===o&&(o="");var l=e.type?"dhx_".concat(e.type,"-cell"):"dhx_string-cell",s=i.content[t.content]&&i.content[t.content].toHtml(e,i),c={};return i.filteredColumns.forEach((function(t){var e=!!i.content[t[n][a].content];c[t.id]=e&&i.content[t[n][a].content].toHtml(t,i)||t[n][a].text})),(0,r.el)(".".concat(l),{style:{class:o.trim(),padding:0}},[s])}function _(t,e){if(!t.data||!t.filteredColumns)return[];var i,o=e.name,a="header"===o?t.headerAutoHeight:t.footerAutoHeight,s=t.$positions,c=t.currentColumns,d=function(t,e){var i=t.map((function(t){return t[e]||[{}]}));return(0,l.transpose)(i)}(c,o),u=1;return d.map((function(p,_){var m=("header"===o?t.$headerHeightMap:t.$footerHeightMap)[_];return(0,r.el)(".dhx_".concat(o,"-row"),n({style:{height:m}},{role:"row","aria-rowindex":_+1}),p.map((function(p,y){var b,x=p.css||"",w=c[y],C=s.xStart+y+1,S=(0,l.isHtmlEnable)(t,w,p),E="dxi dxi-arrow-up dhx_grid-sort-icon",D="none",O=p.text;if("function"==typeof p.text){var k=n(n({},t.commonSummary),t.colSummary[w.id]);"string"==typeof w.summary&&"count"!==w.summary&&(k[w.summary]=(0,f.applyPattern)(k[w.summary],w)),O=p.text(k)}var T=t.sort.findIndex((function(t){return t.by==w.id})),R=t.sort[T];R&&!p.content&&(E+=" dhx_grid-sort-icon--".concat(R.dir),x+=" dhx_grid-".concat(o,"-cell--sorted "),D="asc"===R.dir?"ascending":"descending");var M=(0,l.isSortable)(t,w)&&p.text&&"footer"!==o&&!1!==p.headerSort;M&&(x+=" dhx_grid-header-cell--sortable");var I=0===y?"dhx_first-column-cell":"",P=y===c.length-1?"dhx_last-column-cell":"";p.content||(p.align?x+=" dhx_grid-header-cell--align_".concat(p.align," "):x+=" dhx_grid-header-cell--".concat("number"===w.type||"date"===w.type?"align_right":"align_left"," ")),x+="".concat(I," ").concat(P);var H=void 0!==w.resizable?w.resizable:t.resizable;if(H){var F=t.rightSplit&&t.$scrollBarWidth.xState&&t.fixedColumns.right.includes(w);H=(0,r.el)("div",{class:"dhx_resizer_grip_wrap","aria-hidden":"true"},[(0,r.el)("div",{class:"dhx_resizer_grip"+(F?" dhx_resizer_grip--left":" dhx_resizer_grip--right"),dhx_resized:w.id,style:{height:"".concat(100*d.length,"%")}},[(0,r.el)("div",{class:"dhx_resizer_grip_line"})])]);var A=w.header&&(null===(b=w.header[0])||void 0===b?void 0:b.colspan);A&&(i=A,u=1),i&&u!==i&&(0===_&&(H=null),u++),"footer"===o&&(H=null)}p.align&&(x+=" dhx_align-".concat(p.align)),e.footerAtBottom&&(x+=" dhx_grid-footer-at-bottom");var j=function(t,e,i){var n={"aria-colindex":e,tabindex:-1,"data-dhx-row-index":_};return"footer"===t||p.content?n.role="gridcell":(n.role="columnheader",n["aria-sort"]=i),n};if(p.content)return(0,r.el)(".dhx_grid-".concat(o,"-cell.dhx_grid-custom-content-cell"),n(n({class:x.trim(),"data-dhx-id":w.id,"data-dhx-text-id":p.id,_key:w.id,style:{width:w.$width,height:"footer"===o?m+h.BORDERS/2+"px":m+"px"}},g(w,o,t,p)),j(o,C,D)),[v(p,w,t,o,"",_),H||null]);var $="dhx_grid-header-cell-text_content";return a&&($+=" dhx_grid-header-cell-text_content-auto-height"),(0,r.el)(".dhx_grid-".concat(o,"-cell"),n(n({class:x.trim(),"data-dhx-id":w.id,"data-dhx-text-id":p.id,_key:w.id,style:{width:w.$width,height:"footer"===o?m+h.BORDERS/2+"px":m+"px"}},g(w,o,t,p)),j(o,C,D)),[(0,r.el)("div.dhx_grid-header-cell-text",{role:"presentation"},[(0,r.el)("span",n(n({class:$},function(t,e){return M?{role:"button","aria-label":"Sort by ".concat(e)}:{}}(0,O)),{".innerHTML":S?O:null}),S?null:O),H||null]),M&&(0,r.el)("div.dhx_grid-sort",[(0,r.el)("div",{class:E,"aria-hidden":"true"}),R&&t.sort.length>1&&(0,r.el)("div.dhx_grid-sort-counter",{"aria-hidden":"true"},[T+1])||null])])})))}))}function m(t,e,i){var o=t.columns,c=t.filteredColumns,d=(0,l.transpose)(c.map((function(t){return t[e.name]||[]}))),p=e.name,_="header"===p?t.headerAutoHeight:t.footerAutoHeight,m="header"===p?t.$headerHeightMap:t.$footerHeightMap,y=0;return d.map((function(d,b){y=0;var x=m[b];return(0,r.el)(".dhx_span-row",{class:"dhx_header-row","aria-hidden":"true"},d.map((function(d,w){var C,S=c[w];if(i===s.Split.right&&0===w&&!(d.colspan>1)){var E=(0,l.transpose)(o.map((function(t){return t[e.name]||[]})));t:for(var D=0;D<E[b].length;D++){var O=E[b][D];if(O.colspan>1)for(var k=o.slice(D,D+O.colspan),T=0;T<k.length;T++)if(k[T].id===S.id){C={cell:O,col:o[D],widthBefore:(0,a.getWidth)(k,T,0),isLastCol:D+O.colspan>=o.length};break t}}}var R=(null==C?void 0:C.cell)||d,M=(null==C?void 0:C.col)||S,I=(0,l.isHtmlEnable)(t,S,d);y+=M.hidden?0:M.$width;var P=0===w?"dhx_first-column-cell":"",H=i?1:t.fixedColumns.right.length+1,F=d.colspan>1&&(0,a.getReducedColspan)(o,S.id,d.colspan),A=(null==C?void 0:C.isLastCol)||w===c.length-H||(F||1)+(w-1)>=c.length-H?"dhx_last-column-cell":"",j=x,$=x*b;if(R.rowspan>1){for(var L=R.rowspan-1;L>0;)j+=m[b+L],L--;j-=1}if(R.rowspan>1||R.colspan>1){$=0;for(D=b-1;D>=0;D--)$+=m[D]}var N=(0,l.isSortable)(t,M)&&R.rowspan>1&&R.text&&"footer"!==e.name&&!1!==R.headerSort,V="dxi dxi-arrow-up dhx_grid-sort-icon",W=t.sort.findIndex((function(t){return t.by==M.id})),B=t.sort[W];B&&!R.content&&(V+=" dhx_grid-sort-icon--".concat(B.dir));var z=M.align?"dhx_align-".concat(M.align):"number"!==M.type&&"percent"!==M.type&&"date"!==M.type||R.colspan>1?"dhx_align-left":"dhx_align-right",G="dhx_grid-".concat(p,"-cell ").concat(P," ").concat(A," ").concat(R.rowspan>1?"dhx_span-cell__rowspan":""," ").concat(R.align?"dhx_align-".concat(R.align):z," ").concat(R.css?R.css:"");!M.$target&&N&&(G+=" dhx_grid-header-cell--sortable"),R.content||(R.align?G+=" dhx_grid-header-cell--align_".concat(R.align," "):G+=" dhx_grid-header-cell--".concat("number"===M.type||"percent"===M.type||"date"===M.type?"align_right":"align_left"," ")),M.$target&&"header"===p&&(G+=" dhx_grid-header-drop-area--".concat(M.$target," ")),e.footerAtBottom&&(G+=" dhx_grid-footer-at-bottom");var Y=R.text;if("function"==typeof R.text){var U=n(n({},t.commonSummary),t.colSummary[S.id]);"string"==typeof S.summary&&"count"!==S.summary&&(U[S.summary]=(0,f.applyPattern)(U[S.summary],S)),Y=R.text(U)}var X=null;R.content&&((X=v(R,M,t,p,G,b)).attrs.style=n(n({},X.attrs.style),{width:"100%",borderRight:"0"}));var q="";y-M.$width>0&&(q="var(--dhx-border)");var K="dhx_grid-header-cell-text_content";_&&(K+=" dhx_grid-header-cell-text_content-auto-height");var Z=(0,r.el)("span",{class:K,".innerHTML":I?Y:null},I?null:Y);return R.colspan>1||R.rowspan>1?(0,r.el)(".dhx_span-cell",n({style:{width:(0,a.getWidth)(o,R.colspan,(0,u.findIndex)(o,(function(t){return t.id===M.id}))),height:j,left:y-M.$width-((null==C?void 0:C.widthBefore)||0),borderLeft:q,top:$},class:G.trim(),"data-dhx-id":M.id,"data-dhx-text-id":R.id,tabindex:-1,"data-dhx-row-index":b},g(M,p,t,R)),[X||R.rowspan>1?(0,r.el)("div.dhx_grid-header-cell-text",{role:"presentation"},[Z]):Z,N&&(0,r.el)("div.dhx_grid-sort",[(0,r.el)("div",{class:V,"aria-hidden":"true"}),B&&t.sort.length>1&&(0,r.el)("div.dhx_grid-sort-counter",{"aria-hidden":"true"},[W+1])||null]),i===s.Split.left&&F&&w+F>c.length||C?(0,r.el)(".dhx_grid__cols-border--frozen",{role:"presentation",style:{left:((null==C?void 0:C.widthBefore)||(0,a.getWidth)(c,c.length-w,w))-h.BORDERS/2-(w&&i===s.Split.left?1:0)}}):null]):null})).filter((function(t){return t})))}))}e.getRows=_,e.getFixedSpans=m,e.getFixedRows=function(t,e,i){var a,l=t.leftSplit,s=t.$totalWidth,c=_(t,e),d=m(t,e,i),u=null;if("footer"===e.name&&!e.sticky){var f=t.rightSplit,p=t.fixedColumns,g=function(i){void 0===i&&(i=!1);var o=i?p.right:p.left;return!i&&l>=0||i&&f>=0?_(n(n({},t),{currentColumns:o,$positions:n(n({},t.$positions),{xStart:0,xEnd:i?f:l})}),e):[]};u=o(o([],g(),!0),g(!0),!0)}var v,y=((a={position:"sticky"})[e.position]=0,a);e.sticky||(y.left=-t.scroll.left,v=-t.scroll.left,y.position="relative");var b=null;return"header"===e.name&&(b=t.dropManager?t.dropManager.toHTML({header:!0,mode:i}):null),(0,r.el)(".dhx_".concat(e.name,"-wrapper").concat(t.rightSplit?".dhx_grid__rows_right--fixed":""),{class:e.sticky?"":"dhx_compatible-".concat(e.name),style:n(n({},y),{left:e.sticky?v:0,height:"footer"===e.name?t[e.name+"Height"]+h.BORDERS/2:t[e.name+"Height"],width:e.sticky?s:e.wrapper.width-h.BORDERS}),role:"presentation","data-dhx-drop-area":"header"===e.name?"column":null},[(0,r.el)(".dhx_grid-".concat(e.name).concat(l?".dhx_grid_fixed_left":""),{style:{height:"footer"===e.name?t[e.name+"Height"]+h.BORDERS/2:t[e.name+"Height"],left:v,paddingLeft:e.shifts.x,width:s},role:"presentation"},[(0,r.el)(".dhx_".concat(e.name,"-rows"),n({},{role:"rowgroup"}),o([],c,!0)),(0,r.el)(".dhx_".concat(e.name,"-spans"),{style:{marginLeft:-e.shifts.x},class:"dhx_".concat(e.name,"-rows"),role:"presentation"},d),u&&(0,r.el)(".dhx_".concat(e.name,"-fixed-cols"),{style:{position:"absolute",top:0,left:t.scroll.left+"px",height:"100%"}},u)]),b,(0,r.el)("div",{style:{width:s},role:"presentation"})])},e.getFixedDataRows=function(t,e,i){if(!(i===s.Split.top&&"number"!=typeof t.topSplit||i===s.Split.bottom&&"number"!=typeof t.bottomSplit)){var a=t.$totalWidth,u=t.topSplit,p=t.bottomSplit,g=t.$positions,v=t.data,_=t.$totalHeight,m=t.$width,y=t.headerHeight,b=t.footerHeight,x=t.$scrollBarWidth,w=i===s.Split.bottom,C=w?t.fixedRows.bottom:t.fixedRows.top,S=w?"bottomFixedRows":"topFixedRows",E=(0,c.getCells)(n(n({},t),{data:C,$renderFrom:S,$positions:n(n({},g),{yStart:0,yEnd:w?p:u})})),D=C.reduce((function(t,e){return t+(0,f.getTotalRowHeight)(e)}),0),O=(0,c.getSpans)(n(n({},t),{$renderFrom:S,data:v}),w?s.Split.bottom:s.Split.top),k=(0,l.getTotalHeight)(t.fixedRows.bottom),T=function(o){return(0,d.getFixedCols)(n(n({},t),{headerHeight:0,data:C,$renderFrom:S,scroll:n(n({},t.scroll),{top:-1}),$positions:n(n({},g),{yStart:0,yEnd:w?p:u}),$totalHeight:D,$data:v}),n(n({},e),{shifts:n(n({},e.shifts),{y:0})}),o,i)||[]},R=o(o([],T(s.Split.left),!0),T(s.Split.right),!0),M={overflow:"hidden",width:a+x.y+h.BORDERS<m?a:m-x.y-h.BORDERS};return i===s.Split.bottom&&e.footerAtBottom?(M.top="unset",M.bottom=x.x||-1,M.height=b+D):(M.top=w?_+y+b<e.wrapper.height-x.x-h.BORDERS?_+y-k+h.BORDERS/2:e.wrapper.height-k-b-h.BORDERS/2-x.x:y,M.height=D>e.wrapper.height?e.wrapper.height:D),[(0,r.el)(".dhx_grid-fixed-data-rows-wrap",{class:w?"dhx_grid__rows_bottom--fixed":"",style:M},o(o([(0,r.el)(".dhx_grid-fixed-cols",n(n({onwheel:l.scrollFixedColsAndRows,style:{left:-t.scroll.left+"px",paddingLeft:e.shifts.x,position:"absolute",width:a},_flags:r.KEYED_LIST},(0,c.getHandlers)(0,g.xStart,t)),{role:"rowgroup"}),[(0,r.el)(".dhx_grid-fixed-rows",{class:t.rightSplit?"dhx_grid__rows_right--fixed":""},o(o([],E,!0),[O&&(0,r.el)(".dhx_span-spans",{role:"presentation"},O)],!1))])],R,!0),[t.bottomSplit?(0,r.el)(".dhx_grid__rows-border--frozen",{role:"presentation"}):null],!1))]}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={total:"Total",groupText:"Group",dropAreaTitle:"Group by:",dropAreaPlaceholder:"Drag the column header here"}},function(t,e,i){i(58),i(59),i(60),i(61),i(62),i(63),t.exports=i(67)},function(t,e){Object.values=Object.values?Object.values:function(t){var e=Object.prototype.toString.call(t);if(null==t)throw new TypeError("Cannot convert undefined or null to object");if(~["[object String]","[object Object]","[object Array]","[object Function]"].indexOf(e)){if(Object.keys)return Object.keys(t).map((function(e){return t[e]}));var i=[];for(var n in t)t.hasOwnProperty(n)&&i.push(t[n]);return i}return[]},Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t){"use strict";for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(null==t)throw new TypeError("Cannot convert first argument to object");for(var n=Object(t),o=0;o<e.length;o++){var r=e[o];if(null!=r)for(var a=Object.keys(Object(r)),l=0,s=a.length;l<s;l++){var c=a[l],d=Object.getOwnPropertyDescriptor(r,c);void 0!==d&&d.enumerable&&(n[c]=r[c])}}return n}})},function(t,e){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var i=Object(this),n=i.length>>>0;if(0===n)return!1;var o,r,a=0|e,l=Math.max(a>=0?a:n-Math.abs(a),0);for(;l<n;){if((o=i[l])===(r=t)||"number"==typeof o&&"number"==typeof r&&isNaN(o)&&isNaN(r))return!0;l++}return!1},configurable:!0,writable:!0}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o<i;){var r=e[o];if(t.call(n,r,o,e))return r;o++}},configurable:!0,writable:!0}),Array.prototype.findIndex||(Array.prototype.findIndex=function(t){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,i=Object(this),n=i.length>>>0,o=arguments[1],r=0;r<n;r++)if(e=i[r],t.call(o,e,r,i))return r;return-1})},function(t,e){String.prototype.includes||(String.prototype.includes=function(t,e){"use strict";return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){return e=e||0,this.indexOf(t,e)===e}}),String.prototype.padStart||(String.prototype.padStart=function(t,e){return t>>=0,e=String(e||" "),this.length>t?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),e.slice(0,t)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(t,e){return t>>=0,e=String(e||" "),this.length>t?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),String(this)+e.slice(0,t))})},function(t,e){if(Element&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}if("classList"in SVGElement.prototype||Object.defineProperty(SVGElement.prototype,"classList",{get:function(){var t=this;return{contains:function(e){return-1!==t.className.baseVal.split(" ").indexOf(e)},add:function(e){return t.setAttribute("class",t.getAttribute("class")+" "+e)},remove:function(e){var i=t.getAttribute("class").replace(new RegExp("(\\s|^)".concat(e,"(\\s|$)"),"g"),"$2");t.classList.contains(e)&&t.setAttribute("class",i)},toggle:function(t){this.contains(t)?this.remove(t):this.add(t)}}},configurable:!0}),!Object.entries){var n=Function.bind.call(Function.call,Array.prototype.reduce),o=Function.bind.call(Function.call,Object.prototype.propertyIsEnumerable),r=Function.bind.call(Function.call,Array.prototype.concat);Object.entries=function(t){return n(Object.keys(t),(function(e,i){return r(e,"string"==typeof i&&o(t,i)?[[i,t[i]]]:[])}),[])}}Event.prototype.composedPath||(Event.prototype.composedPath=function(){if(this.path)return this.path;var t=this.target;for(this.path=[];null!==t.parentNode;)this.path.push(t),t=t.parentNode;return this.path.push(document,window),this.path})},function(t,e){Math.sign=Math.sign||function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1}},function(t,e,i){(function(t){t.prototype.finally||(t.prototype.finally=function(t){var e=this.constructor;return this.then((function(i){return e.resolve(t()).then((function(){return i}))}),(function(i){return e.resolve(t()).then((function(){throw i}))}))})}).call(this,i(9))},function(t,e,i){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function r(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new r(o.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new r(o.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},i(65),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,i(22))},function(t,e,i){(function(t,e){!function(t,i){"use strict";if(!t.setImmediate){var n,o,r,a,l,s=1,c={},d=!1,u=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,i=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=i,e}}()?t.MessageChannel?((r=new MessageChannel).port1.onmessage=function(t){p(t.data)},n=function(t){r.port2.postMessage(t)}):u&&"onreadystatechange"in u.createElement("script")?(o=u.documentElement,n=function(t){var e=u.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,o.removeChild(e),e=null},o.appendChild(e)}):n=function(t){setTimeout(p,0,t)}:(a="setImmediate$"+Math.random()+"$",l=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",l,!1):t.attachEvent("onmessage",l),n=function(e){t.postMessage(a+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),i=0;i<e.length;i++)e[i]=arguments[i+1];var o={callback:t,args:e};return c[s]=o,n(s),s++},h.clearImmediate=f}function f(t){delete c[t]}function p(t){if(d)setTimeout(p,0,t);else{var e=c[t];if(e){d=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(i,n)}}(e)}finally{f(t),d=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,i(22),i(66))},function(t,e){var i,n,o=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var s,c=[],d=!1,u=-1;function h(){d&&s&&(d=!1,s.length?c=s.concat(c):u=-1,c.length&&f())}function f(){if(!d){var t=l(h);d=!0;for(var e=c.length;e;){for(s=c,c=[];++u<e;)s&&s[u].run();u=-1,e=c.length}s=null,d=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{return n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];c.push(new p(t,e)),1!==c.length||d||l(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.i18n=e.Grid=e.methods=e.DataProxy=e.DataCollection=e.setTheme=e.awaitRedraw=e.cssManager=void 0,i(68),i(69);var n=i(70);Object.defineProperty(e,"cssManager",{enumerable:!0,get:function(){return n.cssManager}});var o=i(1);Object.defineProperty(e,"awaitRedraw",{enumerable:!0,get:function(){return o.awaitRedraw}}),Object.defineProperty(e,"setTheme",{enumerable:!0,get:function(){return o.setTheme}});var r=i(8);Object.defineProperty(e,"DataCollection",{enumerable:!0,get:function(){return r.DataCollection}}),Object.defineProperty(e,"DataProxy",{enumerable:!0,get:function(){return r.DataProxy}}),Object.defineProperty(e,"methods",{enumerable:!0,get:function(){return r.methods}});var a=i(81);Object.defineProperty(e,"Grid",{enumerable:!0,get:function(){return a.Grid}});var l=i(13),s=i(32),c=i(128),d=window;e.i18n=d.dhx&&d.dhx.i18n?d.dhx.i18n:{},e.i18n.setLocale=c.setLocale,e.i18n.calendar=e.i18n.calendar||l.locale,e.i18n.combobox=e.i18n.combobox||s.default},function(t,e,i){"use strict";i.r(e)},function(t,e,i){"use strict";i.r(e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cssManager=e.CssManager=void 0;var n=i(0),o=function(){function t(){this._classes={};var t=document.createElement("style");t.id="dhx_generated_styles",this._styleCont=document.head.appendChild(t)}return t.prototype.update=function(){this._styleCont.innerHTML!==this._generateCss()&&(document.head.appendChild(this._styleCont),this._styleCont.innerHTML=this._generateCss())},t.prototype.remove=function(t){delete this._classes[t],this.update()},t.prototype.add=function(t,e,i){void 0===i&&(i=!1);var n=this._toCssString(t),o=this._findSameClassId(n);return o&&e&&e!==o?(this._classes[e]=this._classes[o],e):o||this._addNewClass(n,e,i)},t.prototype.get=function(t){if(this._classes[t]){for(var e={},i=0,n=this._classes[t].split(";");i<n.length;i++){var o=n[i];if(o){var r=o.split(":");e[r[0]]=r[1]}}return e}return null},t.prototype.destructor=function(){this._classes=this._styleCont=null},t.prototype._findSameClassId=function(t){for(var e in this._classes)if(t===this._classes[e])return e;return null},t.prototype._addNewClass=function(t,e,i){var o=e||"dhx_generated_class_".concat((0,n.uid)());return this._classes[o]=t,i||this.update(),o},t.prototype._toCssString=function(t){var e="";for(var i in t){var n=t[i],o=i.replace(/[A-Z]{1}/g,(function(t){return"-".concat(t.toLowerCase())}));e+="".concat(o,":").concat(n,";")}return e},t.prototype._generateCss=function(){var t="";for(var e in this._classes){var i=this._classes[e];t+=".".concat(e,"{").concat(i,"}\n")}return t},t}();e.CssManager=o,e.cssManager=new o},function(t,e,i){
12
+ if(window.dhx&&(window.dhx_legacy=dhx,delete window.dhx),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.dhx=e():t.dhx=e()}(window,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/codebase/",i(i.s=57)}([function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.getTextLines=e.getCloneObject=e.rgbToHex=e.getStringWidth=e.getMinArrayNumber=e.getMaxArrayNumber=e.isEmptyObj=e.isType=e.compare=e.debounce=e.downloadFile=e.isNumeric=e.range=e.isId=e.isDefined=e.wrapBox=e.unwrapBox=e.detectWidgetClick=e.singleOuterClick=e.isExistValue=e.findIndex=e.naturalSort=e.copy=e.extend=e.extendComponent=e.uid=void 0;var o=i(2),r=(new Date).valueOf();function a(t,e,i){"function"==typeof e[i]?t[i]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e[i].apply(e,t)}:Object.defineProperty(t,i,{get:function(){return e[i]},set:function(t){return e[i]=t},enumerable:!0,configurable:!0})}e.uid=function(){return"u"+r++},e.extendComponent=function(t,e){if(!e)return t;for(var i=0,n=Object.keys(e);i<n.length;i++){a(t,e,s=n[i])}for(var o=Object.getPrototypeOf(e);o&&o!==Object.prototype;){for(var r=0,l=Object.getOwnPropertyNames(o);r<l.length;r++){var s=l[r];t.hasOwnProperty(s)||a(t,e,s)}o=Object.getPrototypeOf(o)}return t},e.extend=function t(e,i,n){if(void 0===n&&(n=!0),i)for(var o in i){var r=i[o],a=e[o];void 0===r?delete e[o]:!n||"object"!=typeof a||a instanceof Date||a instanceof Array?e[o]=r:t(a,r)}return e},e.copy=function(t,e){var i={};for(var n in t)e&&n.startsWith("$")||(i[n]=t[n]);return i},e.naturalSort=function(t){return t.sort((function(t,e){return"string"==typeof t?t.localeCompare(e):t-e}))},e.findIndex=function(t,e){for(var i=t.length,n=0;n<i;n++)if(e(t[n]))return n;return-1},e.isExistValue=function(t,e){var i=e.toString(),n=t.toString();return!(i.length>n.length)&&n.toLowerCase().includes(i.toLowerCase())},e.singleOuterClick=function(t){var e=function(i){t(i)&&document.removeEventListener("click",e)};document.addEventListener("click",e)},e.detectWidgetClick=function(t,e){var i=function(i){return e((0,o.locate)(i,"data-dhx-widget-id")===t)};return document.addEventListener("click",i),function(){return document.removeEventListener("click",i)}},e.unwrapBox=function(t){return Array.isArray(t)?t[0]:t},e.wrapBox=function(t){return Array.isArray(t)?t:[t]},e.isDefined=function(t){return null!=t},e.isId=function(t){return"number"==typeof t||"string"==typeof t&&""!==t},e.range=function(t,e){if(t>e)return[];for(var i=[];t<=e;)i.push(t++);return i},e.isNumeric=function(t){return!isNaN(t-parseFloat(t))},e.downloadFile=function(t,e,i){var n;if(void 0===i&&(i="application/octet-stream"),t instanceof Blob)n=URL.createObjectURL(t);else{var o=new Blob([t],{type:i});if(window.navigator.msSaveOrOpenBlob)return void window.navigator.msSaveOrOpenBlob(o,e);n=URL.createObjectURL(o)}var r=document.createElement("a");r.href=n,r.download=e,document.body.appendChild(r),r.click(),setTimeout((function(){document.body.removeChild(r),URL.revokeObjectURL(n)}),0)},e.debounce=function(t,e,i){var n;return function(){for(var o=this,r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var l=i&&!n;clearTimeout(n),n=setTimeout((function(){n=null,i||t.apply(o,r)}),e),l&&t.apply(this,r)}},e.compare=function t(e,i){for(var n in e){if(e.hasOwnProperty(n)!==i.hasOwnProperty(n))return!1;switch(typeof e[n]){case"object":if(!t(e[n],i[n]))return!1;break;case"function":if(void 0===i[n]||"compare"!==n&&e[n].toString()!==i[n].toString())return!1;break;default:if(e[n]!==i[n])return!1}}for(var n in i)if(!e.hasOwnProperty(n))return!1;return!0};e.isType=function(t){return((Object.prototype.toString.call(t).match(/^\[object (\S+?)\]$/)||[])[1]||"undefined").toLowerCase()};e.isEmptyObj=function(t){for(var e in t)return!1;return!0};e.getMaxArrayNumber=function(t){if(t.length){for(var e=-1/0,i=0,n=t.length;i<n;i++)t[i]>e&&(e=t[i]);return e}};e.getMinArrayNumber=function(t){if(t.length){for(var e=1/0,i=0,n=t.length;i<n;i++)t[i]<e&&(e=t[i]);return e}};e.getStringWidth=function(t,e){e=n({font:"normal 14px Roboto",lineHeight:20},e);var i=document.createElement("canvas"),r=i.getContext("2d");e.font&&(r.font=e.font);var a=r.measureText(t).width;return(0,o.isIE)()||i.remove(),a};e.rgbToHex=function(t){if("#"===t.substr(0,1))return t;if("rgb"===t.substr(0,3)){var e=/(.*?)rgb[a]?\((\d+), *(\d+), *(\d+),* *([\d+.]*)\)/.exec(t),i=parseInt(e[2],10).toString(16).padStart(2,"0"),n=parseInt(e[3],10).toString(16).padStart(2,"0"),o=parseInt(e[4],10).toString(16).padStart(2,"0");return"#".concat(i).concat(n).concat(o)}},e.getCloneObject=function t(e){if(!e)return e;var i=Array.isArray(e)?[]:{};for(var n in e){var o=e[n];o instanceof Date?i[n]=new Date(o):i[n]="object"==typeof o?t(o):o}return i};var l=function(t){var e=t.text;return t.ctx.measureText(e).width},s=function(t){for(var e=t.ctx,i=t.word,n=t.maxWidth,o=[],r="",a=0;a<i.length;a++)r+=i[a],l({text:r,ctx:e})>n&&(o.push(r.slice(0,-1)),r=i[a]);return r&&o.push(r),o};e.getTextLines=function(t){for(var e=t.ctx,i=t.text,n=t.maxWidth,o=i.split(" "),r="",a="",c=[],d=0;d<o.length;d++){var u=o[d];if(l({text:u,ctx:e})>n)for(var h=0,f=s({word:u,ctx:e,maxWidth:n});h<f.length;h++){var p=f[h];a+="".concat(p," "),l({text:a.trimEnd(),ctx:e})>n?(c.push(r.trimEnd()),r="".concat(p," "),a="".concat(p," ")):r+="".concat(p," ")}else a+="".concat(u," "),l({text:a.trimEnd(),ctx:e})>n&&d>0?(c.push(r.trimEnd()),r="".concat(u," "),a="".concat(u," ")):r+="".concat(u," ");d===o.length-1&&c.push(r.trimEnd())}return c}},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.getViewHeight=e.setTheme=e.awaitRedraw=e.resizeHandler=e.resizer=e.disableHelp=e.KEYED_LIST=e.inject=e.create=e.view=e.sv=e.el=void 0;var n=i(71),o=i(2);function r(t){var i=window.ResizeObserver,n=function(e){var i=e.el.offsetHeight,n=e.el.offsetWidth;t(n,i)};return i?(0,e.el)("div.dhx-resize-observer",{_hooks:{didInsert:function(t){new i((function(){return n(t)})).observe(t.el)}}}):(0,e.el)("iframe.dhx-resize-observer",{_hooks:{didInsert:function(t){t.el.contentWindow.onresize=function(){return n(t)},n(t)}}})}e.el=n.defineElement,e.sv=n.defineSvgElement,e.view=n.defineView,e.create=n.createView,e.inject=n.injectView,e.KEYED_LIST=n.KEYED_LIST,e.disableHelp=function(){n.DEVMODE.mutations=!1,n.DEVMODE.warnings=!1,n.DEVMODE.verbose=!1,n.DEVMODE.UNKEYED_INPUT=!1},e.resizer=r,e.resizeHandler=function(t,i){return(0,e.create)({render:function(){return r(i)}}).mount(t)},e.awaitRedraw=function(){return new t((function(t){requestAnimationFrame((function(){t()}))}))},e.setTheme=function(t,e){void 0===t&&(t="light");var i="data-dhx-theme";e||document.querySelectorAll("[".concat(i,"]")).forEach((function(t){return t.removeAttribute(i)})),e=e||document.documentElement,(0,o.toNode)(e).setAttribute(i,t)},e.getViewHeight=function(t,i){var n=(0,e.create)({render:function(){return(0,e.el)("div",{style:{position:"absolute",visibility:"hidden",width:i}},[t])}});n.mount(document.body);var o=n.node.el.offsetHeight;return n.unmount(),o}}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};function o(t,e,i){for(void 0===e&&(e="data-dhx-id"),void 0===i&&(i="target"),t instanceof Event&&(t=t[i]);t;){if(t.getAttribute&&t.getAttribute(e))return t;t=t.parentNode}}Object.defineProperty(e,"__esModule",{value:!0}),e.getNodeOffset=e.getElementFromPoint=e.getPageLinksCss=e.getPageInlineCss=e.getLabelStyle=e.getPageCss=e.fitPosition=e.calculatePosition=e.getRealPosition=e.isFirefox=e.isSafari=e.isIE=e.getScrollbarHeight=e.getScrollbarWidth=e.getBox=e.locateNodeByClassName=e.locate=e.locateNode=e.eventHandler=e.toNode=void 0,e.toNode=function(t){var e;return"string"==typeof t?document.getElementById(t)||document.querySelector("[data-cell-id=".concat(t,"]"))||document.querySelector(t)||(null===(e=document.querySelector("[data-dhx-root-id=".concat(t,"]")))||void 0===e?void 0:e.parentElement)||document.body:t||document.body},e.eventHandler=function(t,e,i){var n=Object.keys(e);return function(o){var r=t(o);if(void 0!==r){var a=o.target;t:for(;a;){var l=a.getAttribute&&a.getAttribute("class")||"";if(l.length)for(var s=l.split(" "),c=0;c<n.length;c++)if(s.includes(n[c])){if(!1===e[n[c]](o,r)||o.cancelBubble)return!1;break t}a=a.parentNode}}return"function"==typeof i&&i(o),!0}},e.locateNode=o,e.locate=function(t,e){void 0===e&&(e="data-dhx-id");var i=o(t,e);return i?i.getAttribute(e):""},e.locateNodeByClassName=function(t,e){for(t instanceof Event&&(t=t.target);t;){if(e){if(t.classList&&t.classList.contains(e))return t}else if(t.getAttribute&&t.getAttribute("data-dhx-id"))return t;t=t.parentNode}},e.getBox=function(t){var e=t.getBoundingClientRect(),i=document.body,n=window.pageYOffset||i.scrollTop,o=window.pageXOffset||i.scrollLeft;return{top:e.top+n,left:e.left+o,right:i.offsetWidth-e.right,bottom:i.offsetHeight-e.bottom,width:e.right-e.left,height:e.bottom-e.top}};var r=-1;e.getScrollbarWidth=function(){if(r>-1)return r;var t=document.createElement("div");return document.body.appendChild(t),t.style.cssText="position: absolute;left: -99999px;overflow:scroll;width: 100px;height: 100px;",r=t.offsetWidth-t.clientWidth,document.body.removeChild(t),r};var a=-1;function l(t){var e=t.getBoundingClientRect();return{left:e.left+window.pageXOffset,right:e.right+window.pageXOffset,top:e.top+window.pageYOffset,bottom:e.bottom+window.pageYOffset}}function s(){return{rightBorder:window.pageXOffset+window.innerWidth,bottomBorder:window.pageYOffset+window.innerHeight}}function c(t,e){var i,o,r=s(),a=r.rightBorder,l=r.bottomBorder-t.bottom-e.height,c=t.top-e.height;if("bottom"===e.mode?l>=0?o=t.bottom:c>=0&&(o=c):c>=0?o=c:l>=0&&(o=t.bottom),l<0&&c<0){if(e.auto)return d(t,n(n({},e),{mode:"right",auto:!1}));o=l>c?t.bottom:c}if(e.centering)i=function(t,e,i){var n=(e-(t.right-t.left))/2,o=t.left-n,r=t.right+n;return o>=0&&r<=i?o:o<0?0:i-e}(t,e.width,a);else{var u=a-t.left-e.width,h=t.right-e.width;i=u>=0?t.left:h>=0?h:h>u?t.left:h}return{left:i,top:o}}function d(t,e){var i,o,r=s(),a=r.rightBorder,l=r.bottomBorder,d=a-t.right-e.width,u=t.left-e.width;if("right"===e.mode?d>=0?i=t.right:u>=0&&(i=u):u>=0?i=u:d>=0&&(i=t.right),u<0&&d<0){if(e.auto)return c(t,n(n({},e),{mode:"bottom",auto:!1}));i=u>d?u:t.right}if(e.centering)o=function(t,e,i){var n=(e-(t.bottom-t.top))/2,o=t.top-n,r=t.bottom+n;return o>=0&&r<=i?o:o<0?0:i-e}(t,e.height,l);else{var h=t.bottom-e.height,f=l-t.top-e.height;o=f>=0?t.top:h>0||h>f?h:t.top}return{left:i,top:o}}function u(t,e){var i="bottom"===e.mode||"top"===e.mode?c(t,e):d(t,e),n=i.left,o=i.top;return{left:Math.round(n)+"px",top:Math.round(o)+"px",minWidth:Math.round(e.width)+"px",position:"absolute"}}e.getScrollbarHeight=function(){if(a>-1)return a;var t=document.createElement("div");return document.body.appendChild(t),t.style.cssText="position: absolute;left: -99999px;overflow:scroll;width: 100px;height: 100px;",a=t.offsetHeight-t.clientHeight,document.body.removeChild(t),a},e.isIE=function(){var t=window.navigator.userAgent;return t.includes("MSIE ")||t.includes("Trident/")},e.isSafari=function(){var t=function(t){return t.test(window.navigator.userAgent)},e=t(/Chrome/),i=t(/Firefox/);return!e&&!i&&t(/Safari/)},e.isFirefox=function(){var t=function(t){return t.test(window.navigator.userAgent)},e=t(/Chrome/),i=t(/Safari/);return!e&&!i&&t(/Firefox/)},e.getRealPosition=l,e.calculatePosition=u,e.fitPosition=function(t,e){return u(l(t),e)},e.getPageCss=function(){for(var t=[],e=0;e<document.styleSheets.length;e++)for(var i=document.styleSheets[e],n=("cssRules"in i?i.cssRules:i.rules),o=0;o<n.length;o++){var r=n[o];"cssText"in r?t.push(r.cssText):t.push("".concat(r.selectorText," {\n").concat(r.style.cssText,"\n}\n"))}return t.join("\n")},e.getLabelStyle=function(t){var e=t.helpMessage,i=t.type,n=t.labelWidth,o=t.label,r=n&&n.toString().startsWith("0"),a="text"!==i&&t.required;return!!(e||a||!(!o||o&&r)||n&&!r)&&{style:(o||n)&&!r&&{width:n,"max-width":"100%"},label:o&&r?null:o}};var h=function(t){return t.href&&!t.href.startsWith(window.location.origin)};e.getPageInlineCss=function(){for(var t=[],e=0;e<document.styleSheets.length;e++){var i=document.styleSheets[e];if(!h(i))for(var n=("cssRules"in i&&i.cssRules.length?i.cssRules:i.rules),o=0;o<n.length;o++){var r=n[o];"cssText"in r?t.push(r.cssText):t.push("".concat(r.selectorText," {\n").concat(r.style.cssText,"\n}\n"))}}return t.join("\n")},e.getPageLinksCss=function(t){var e=[];if(t)t.forEach((function(t){return e.push('<link href="'.concat(t,'" rel="stylesheet"/>'))}));else for(var i=0;i<document.styleSheets.length;i++){var n=document.styleSheets[i];h(n)&&e.push('<link href="'.concat(n.href,'" rel="stylesheet"/>'))}return e.join("\n")},e.getElementFromPoint=function(t){var e,i,n=t.targetTouches?(null===(e=t.targetTouches[0])||void 0===e?void 0:e.clientX)||0:t.clientX,o=t.targetTouches?(null===(i=t.targetTouches[0])||void 0===i?void 0:i.clientY)||0:t.clientY,r=document.elementFromPoint(n,o);return(null==r?void 0:r.shadowRoot)?r.shadowRoot.elementFromPoint(n,o):r},e.getNodeOffset=function(t,e){var i=t.getBoundingClientRect(),n=e.getBoundingClientRect();return{left:i.left-n.left,top:i.top-n.top}}},function(t,e,i){"use strict";var n,o,r;Object.defineProperty(e,"__esModule",{value:!0}),e.Split=e.GridSystemEvents=e.GridEvents=void 0,function(t){t.scroll="scroll",t.expand="expand",t.filterChange="filterChange",t.beforeFilter="beforeFilter",t.beforeResizeStart="beforeResizeStart",t.resize="resize",t.afterResizeEnd="afterResizeEnd",t.cellClick="cellClick",t.cellRightClick="cellRightClick",t.cellMouseOver="cellMouseOver",t.cellMouseDown="cellMouseDown",t.cellDblClick="cellDblClick",t.headerCellClick="headerCellClick",t.footerCellClick="footerCellClick",t.headerCellMouseOver="headerCellMouseOver",t.footerCellMouseOver="footerCellMouseOver",t.headerCellMouseDown="headerCellMouseDown",t.footerCellMouseDown="footerCellMouseDown",t.headerCellDblClick="headerCellDblClick",t.footerCellDblClick="footerCellDblClick",t.headerCellRightClick="headerCellRightClick",t.footerCellRightClick="footerCellRightClick",t.beforeEditStart="beforeEditStart",t.afterEditStart="afterEditStart",t.beforeEditEnd="beforeEditEnd",t.afterEditEnd="afterEditEnd",t.beforeKeyDown="beforeKeyDown",t.afterKeyDown="afterKeyDown",t.beforeColumnHide="beforeColumnHide",t.afterColumnHide="afterColumnHide",t.beforeColumnShow="beforeColumnShow",t.afterColumnShow="afterColumnShow",t.beforeRowHide="beforeRowHide",t.afterRowHide="afterRowHide",t.beforeRowShow="beforeRowShow",t.afterRowShow="afterRowShow",t.beforeCollapse="beforeCollapse",t.afterCollapse="afterCollapse",t.beforeExpand="beforeExpand",t.afterExpand="afterExpand",t.beforeRowDrag="beforeRowDrag",t.dragRowStart="dragRowStart",t.dragRowOut="dragRowOut",t.dragRowIn="dragRowIn",t.canRowDrop="canRowDrop",t.cancelRowDrop="cancelRowDrop",t.beforeRowDrop="beforeRowDrop",t.afterRowDrop="afterRowDrop",t.afterRowDrag="afterRowDrag",t.beforeColumnDrag="beforeColumnDrag",t.dragColumnStart="dragColumnStart",t.dragColumnOut="dragColumnOut",t.dragColumnIn="dragColumnIn",t.canColumnDrop="canColumnDrop",t.cancelColumnDrop="cancelColumnDrop",t.beforeColumnDrop="beforeColumnDrop",t.afterColumnDrop="afterColumnDrop",t.afterColumnDrag="afterColumnDrag",t.beforeRowResize="beforeRowResize",t.afterRowResize="afterRowResize",t.beforeSort="beforeSort",t.afterSort="afterSort",t.groupPanelItemClick="groupPanelItemClick",t.groupPanelItemMouseDown="groupPanelItemMouseDown",t.dragPanelItemClick="dragPanelItemClick",t.dragPanelItemMouseDown="dragPanelItemMouseDown"}(n||(e.GridEvents=n={})),function(t){t.cellTouchMove="cellTouchMove",t.cellTouchEnd="cellTouchEnd",t.headerCellTouchMove="headerCellTouchMove",t.headerCellTouchEnd="headerCellTouchEnd",t.groupPanelItemTouchMove="groupPanelItemTouchMove",t.groupPanelItemItemTouchEnd="groupPanelItemItemTouchEnd"}(o||(e.GridSystemEvents=o={})),function(t){t.left="leftSplit",t.right="rightSplit",t.top="topSplit",t.bottom="bottomSplit"}(r||(e.Split=r={}))},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.getColumnHeaderText=e.getReverseScrollState=e.getEditorValue=e.getComboEditorValue=e.getValueForNumberColumn=e.getOptionValue=e.getEditorOptions=e.applyPattern=e.getMaxColsWidth=e.getTreeCellWidthOffset=e.getCalculatedRowHeight=e.getMaxRowHeight=e.getNormalizeFilterData=e.calculateVisibleRange=e.countColumns=e.measureTextHeight=e.normalizeArray=e.colsWidth=e.rowsHeight=e.getTotalRowHeight=void 0;var r=i(0),a=i(3),l=i(5),s=i(13),c=i(18),d=i(7);function u(t){return(null==t?void 0:t.$height)+((null==t?void 0:t.$opened)&&(null==t?void 0:t.$subRowHeight)||0)||0}function h(t,e,i,n){void 0===i&&(i=[]);for(var o=-1,r=-1,a=0,l=0,s=0;s<i.length;s++)if(!i[s].hidden){var c="$width"===n?i[s][n]:u(i[s]);if(a+c>=e&&-1===o&&(o=l),a>=e+t){r=l;break}a+=c,l++}return-1===o&&(o=0),-1===r&&(r=l),{start:o,end:r}}e.getTotalRowHeight=u,e.rowsHeight=function(t,e,i,n){return t.$rowHeights?t.$rowHeights.rangeSize(i,n):(0,l.getTotalHeight)(e.slice(i,n))},e.colsWidth=function(t,e,i,n){return t.$colWidths?t.$colWidths.rangeSize(i,n):(0,l.getTotalWidth)(e.slice(i,n))},e.normalizeArray=function(t,e){t[e]&&("string"==typeof t[e]?t[e]=[{text:"".concat(t[e])}]:t[e]=t[e].map((function(t){return"string"==typeof t&&(t={text:t}),t})))},e.measureTextHeight=function(t){var e=t.text,i=void 0===e?"":e,n=t.width,o=void 0===n?0:n,a=t.lineHeight,s=void 0===a?20:a,c=t.font,d=void 0===c?"14.4px Arial":c,u=t.htmlEnable,h=void 0!==u&&u,f=document.createElement("canvas"),p=f.getContext("2d",{alpha:!1});p.font=d;var g=[],v=[];h&&(i=(0,l.removeHTMLTags)(i));var _=Math.ceil(p.measureText(i).width/o);_>1&&(_=(0,r.getTextLines)({ctx:p,text:i,maxWidth:o}).length),v.push(_),g.push(i.split("\n").length);var m=Math.max((0,r.getMaxArrayNumber)(g),(0,r.getMaxArrayNumber)(v));return f.remove(),m*s},e.countColumns=function(t,e){var i=0,n=0,o=0,a=!1,l=0,s=!1;return e.forEach((function(t,e){if(t.$index=e,i=Math.max(i,t.header.length),o+=t.$width,t.footer&&(n=Math.max(n,t.footer.length),s||(s=!0)),!a)for(var r=0,l=t.header;r<l.length;r++){if(l[r].colspan)return void(a=!0)}})),e.forEach((function(t){if(s&&(t.footer=t.footer||[]),t.header.length<i)for(var e=0;e<i;e++)t.header[e]=t.header[e]||{text:""};if(t.footer){if(t.footer.length<n)for(e=0;e<n;e++)t.footer[e]=t.footer[e]||{text:""};for(e=0;e<t.footer.length;e++)t.footer[e].id||(t.footer[e].id=(0,r.uid)())}t.header=t.header.map((function(t){return"object"!=typeof t&&(t={text:t}),t.css=t.css||"",t.text||t.css.includes("dhx_cell-empty")||(t.css+=" dhx_cell-empty"),t.id||(t.id=(0,r.uid)()),t})),""===t.header[0].text&&l++})),t.$totalWidth=o,t.$colspans=a,t.$footer=s,l},e.calculateVisibleRange=function(t,e,i,n){var o=i.topSplit||0,r=i.bottomSplit||0,s=i.leftSplit||0,c=i.rightSplit||0,u=o+r>0,f=s+c>0,p=i.$rowHeights,g=i.$colWidths,v=0;u&&(p?(o&&(v+=p.rangeSize(0,o)),r&&(v+=p.rangeSize(p.length-r,p.length))):v=(0,l.getTotalHeight)(n.slice(0,o))+(r?(0,l.getTotalHeight)(n.slice(-r)):0));var _=0,m=s;if(f){var y=(0,d.getCurrFixedCols)(i,a.Split.left),b=(0,d.getCurrFixedCols)(i,a.Split.right);m=y.length,_=(0,l.getTotalWidth)(y)+(0,l.getTotalWidth)(b)}var x,w,C=t.height-(i.$headerHeight||0)-(i.$footerHeight||0)-v,S=t.width-_;if(p&&!u){var E=e.top+C,D=p.findIndex(e.top),O=p.findIndex(E);x={start:D,end:p.rangeSize(0,O)>=E?O:O+1}}else{var k=u?n.slice(o,-r||n.length):n;x=h(C,e.top,k,"$height")}if(g&&!f){var R=e.left+S,T=(D=g.findIndex(e.left),g.findIndex(R));w={start:D,end:g.rangeSize(0,T)>=R?T:T+1}}else{var M=f?i.columns.slice(s,-c||i.columns.length):i.columns;w=h(S,e.left,M,"$width")}return{xStart:w.start+m,xEnd:w.end+m,yStart:x.start+o,yEnd:x.end+o}},e.getNormalizeFilterData=function(t,e,i,n){var o=t.map((function(t){return t[e]}));return i&&"multiselect"===n&&o.forEach((function(t,e){"string"==typeof t&&t.includes(", ")&&(t.split(", ").forEach((function(t){return o.push(t)})),delete o[e])})),o.filter((function(t,e,i){return i.indexOf(t)===e&&(0,r.isDefined)(t)})).sort((function(t,e){var i=parseFloat(t),n=parseFloat(e);return isNaN(i)||isNaN(n)?(t="boolean"==typeof t?t.toString():t,e="boolean"==typeof e?e.toString():e,isNaN(t)&&isNaN(e)?t.localeCompare(e):""===t?-1:""===e||isNaN(t)?1:-1):i===n?t.toString().localeCompare(e.toString()):i-n}))};e.getMaxRowHeight=function(t){var e,i,n=t.cols,o=t.row,a=t.config,s=void 0===a?{font:"14.4px Arial",lineHeight:20}:a,c=24+d.BORDERS,u=document.createElement("canvas"),h=u.getContext("2d",{alpha:!1});h.font=s.font;for(var p={},v=n.length,_=0;_<v;_++)p[n[_].id]={width:n[_].$width-c||0,col:n[_]};for(var m=[],y=[],b=0,x=Object.entries(o);b<x.length;b++){var w=x[b],C=w[0],S=w[1],E=null===(e=p[C])||void 0===e?void 0:e.col;if(E&&"height"!==C&&!C.startsWith("$")&&("string"==typeof S||"number"==typeof S||S instanceof Date||Array.isArray(S))){S="combobox"===E.editorType||"multiselect"===E.editorType?g(S,E,o):f(S,E);var D="";if("function"==typeof E.template){var O=E.template(S,o,p[C].col);D=E.htmlEnable?(0,l.removeHTMLTags)(O):O.toString()}else D="string"==typeof S?E.htmlEnable?(0,l.removeHTMLTags)(S):S:S.toString();var k=Math.ceil(h.measureText(D).width/p[C].width);k>1&&(k=(0,r.getTextLines)({ctx:h,text:D,maxWidth:null===(i=p[C])||void 0===i?void 0:i.width}).length),y.push(k),m.push(D.split("\n").length)}}var R=Math.max((0,r.getMaxArrayNumber)(m),(0,r.getMaxArrayNumber)(y));return u.remove(),R*s.lineHeight};e.getCalculatedRowHeight=function(t,e){var i=(e=n({rowHeight:40,verticalOffset:10},e)).rowHeight<40?t:t+2*e.verticalOffset;return t<e.rowHeight?e.rowHeight:i};e.getTreeCellWidthOffset=function(t,e){return void 0===e&&(e=!1),20+20*t.$level-(e&&t.$items?20:0)};function f(t,e){if(!(0,r.isDefined)(t)||"boolean"==typeof t||""===t)return t;if("date"===e.type){var i=e.dateFormat||"%M %d %Y";if("string"==typeof t){if(!(0,s.stringToDate)(t,i,!0)){var o=new Date(t);(null==o?void 0:o.valueOf())&&(t=(0,s.getFormattedDate)(i,o))}}else"object"==typeof t&&(t=(0,s.getFormattedDate)(i,t));return t}if(("number"===e.type||e.numberMask)&&(t=parseFloat(t),isNaN(t)))return t;if(e.numberMask){var a=e.numberMask.maxDecLength;return(0,r.isDefined)(a)&&(t=+t.toFixed(a)),(0,c.numberMask)(t,n(n({},e.numberMask),{onlyView:!0}))}return e.patternMask?(0,c.patternMask)(t,e.patternMask):t}function p(t,e){return o(o([],("function"==typeof t.options?t.options(t,e):t.options)||[],!0),t.$customOptions||[],!0)}function g(t,e,i){var n=p(e,i);return"multiselect"===e.editorType&&"string"==typeof t?t.split(",").map((function(t){return v(t.trim(),n)})).join(", "):v(t,n)}function v(t,e){var i=e.find((function(e){return e instanceof Object&&e.id==t}));return i?i.value:t}e.getMaxColsWidth=function(t,e,i,n){var o;if(void 0===i&&(i={font:"normal 14.4px Arial"}),!t.length||!e.length)return{};var r={},a=e.length,s=t.length,c=document.createElement("canvas"),d=c.getContext("2d",{alpha:!1});d.font=i.font;for(var u=0;u<a;u++)r[e[u].id]={width:20,col:e[u]};for(u=0;u<s;u++)for(var h=0,p=Object.entries(t[u]);h<p.length;h++){var v=p[h],_=v[0],m=v[1],y=null===(o=r[_])||void 0===o?void 0:o.col;if(y&&"height"!==_&&!_.startsWith("$")&&("string"==typeof m||"number"==typeof m||m instanceof Date||Array.isArray(m))){m="combobox"===y.editorType||"multiselect"===y.editorType?g(m,y,t[u]):m,"header"!==n&&(m=f(m,y));var b=void 0;if("function"==typeof(null==y?void 0:y.template)&&"data"===n){var x=y.template(m,t[u],y);b=y.htmlEnable?(0,l.removeHTMLTags)(x):x}else b=y.htmlEnable?(0,l.removeHTMLTags)(m):m.toString();var w=d.measureText(b).width;w>r[_].width&&(r[_].width=w)}}c.remove();for(var C={},S=0,E=Object.entries(r);S<E.length;S++){var D=E[S];_=D[0],m=D[1];C[_]=Math.ceil(m.width)}return C},e.applyPattern=f,e.getEditorOptions=p,e.getOptionValue=function(t,e){var i=p(e).find((function(e){return"string"==typeof e?e===t:e.id.toString()===t}));return(null==i?void 0:i.value)||t},e.getValueForNumberColumn=function(t,e){return!(0,r.isDefined)(e)||""===e||"number"==typeof e||["select","combobox","multiselect"].includes(t.editorType)?e:"string"==typeof e?parseFloat(e):NaN},e.getComboEditorValue=g,e.getEditorValue=v,e.getReverseScrollState=function(t){var e,i=t.getScrollState(),n=(0,d.calcScrollBarWidth)(t.config,!!(null===(e=t.scrollView)||void 0===e?void 0:e.config.enable)),o=t.config.$totalWidth-t.config.$width+d.BORDERS+n.y,r=t.config.$totalHeight-t.config.$height+t.config.$headerHeight+t.config.$footerHeight+d.BORDERS+n.x;return{x:o>0?o-i.x:0,y:r>0?r-i.y:0}},e.getColumnHeaderText=function(t){var e,i,n=null===(e=t.header)||void 0===e?void 0:e.find((function(t){return t.text&&"string"==typeof t.text}));return(null==n?void 0:n.text)||(null===(i=t.id)||void 0===i?void 0:i.toString())||""}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.getClosestBottom=e.getClosestTop=e.getLastChild=e.isWasmSupported=e.scrollFixedColsAndRows=e.getTotalHeight=e.getTotalWidth=e.isHtmlEnable=e.isTooltip=e.getTooltipConfig=e.isContentTooltip=e.showTooltip=e.isAutoWidth=e.isSortable=e.isRowEmpty=e.isCssSupport=e.removeHTMLTags=e.getStyleByClass=e.transpose=void 0;var o=i(0),r=i(2),a=i(83),l=i(4);e.transpose=function(t,e){for(var i=[],n=0;n<t.length;n++)for(var o=t[n],r=0;r<o.length;r++){i[r]=i[r]||[];var a=e?e(o[r]):o[r];i[r].push(a)}return i},e.getStyleByClass=function(t,e,i,n){void 0===n&&(n=document.body);var r,a,l,s=n.querySelector("."+e.trim().replace(/\s/g,".")),c=(r=s,"string"==typeof(a='<div class="'.concat(t,'"></div>'))?(r.insertAdjacentHTML("beforeend",a),r.lastChild):(r.appendChild(a),a)),d=window.getComputedStyle(c),u="rgba(0, 0, 0, 0)";if(d.backgroundColor===u){var h=window.getComputedStyle(s);l=h.backgroundColor===u?i.background:(0,o.rgbToHex)(h.backgroundColor)}else l=(0,o.rgbToHex)(d.backgroundColor);var f={color:"rgb(0, 0, 0)"===d.color?i.color:(0,o.rgbToHex)(d.color),background:l,fontSize:Math.round(parseFloat(d.fontSize)),bold:["bold","700","600","500"].includes(d.fontWeight)};return s.removeChild(c),(0,o.compare)(f,i)?null:f},e.removeHTMLTags=function(t){return"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t?"":t.toString().replace(/<[^>]*>/g,"").trim()};var s={};e.isCssSupport=function(t,e){var i,n=t+":"+e;if(n in s)return s[n];try{i=CSS.supports(t,e)}catch(n){var o=document.createElement("div");o.style[t]=e,i=o.style[t]===e}return s[n]=i,i},e.isRowEmpty=function(t){if(t)return Object.keys(t).reduce((function(e,i){return"id"===i||i.startsWith("$")?e:e&&void 0!==t[i]&&""!==t[i]?void 0:e}),!0)},e.isSortable=function(t,e){return!1!==e.sortable&&t.sortable||e.sortable},e.isAutoWidth=function(t,e){if(e)return!1!==e.autoWidth&&t.autoWidth||e.autoWidth;var i=!1;return t.columns.map((function(e){(!1!==e.autoWidth&&t.autoWidth||e.autoWidth)&&(i=!0)})),i},e.showTooltip=function(t,e){e.node&&(0,a.tooltip)(t.toString(),n(n({},e),{css:"dhx_grid_tooltip "+(e.css||"")}))},e.isContentTooltip=function(t,e,i,n){for(var o=!1,r="header"===n?t.headerTooltip:t.footerTooltip,a=[t.tooltip,r,e.tooltip,null==i?void 0:i.tooltip],l=0;l<a.length;l++)(a[l]||"boolean"==typeof a[l])&&(o=!!a[l]);return o},e.getTooltipConfig=function(t,e,i,n){return[null==i?void 0:i.tooltip,null==e?void 0:e.tooltip,n&&("header"===n?t.headerTooltip:t.footerTooltip),t.tooltip].find((function(t){return t instanceof Object}))||{}},e.isTooltip=function(t,e){return!1!==e.tooltip&&t.tooltip||e.tooltip},e.isHtmlEnable=function(t,e,i){var n,o;return!!(null!==(o=null!==(n=null==i?void 0:i.htmlEnable)&&void 0!==n?n:e.htmlEnable)&&void 0!==o?o:t.htmlEnable)},e.getTotalWidth=function(t){return t.reduce((function(t,e){return t+(e.$width||0)}),0)},e.getTotalHeight=function(t){return t.reduce((function(t,e){return t+(0,l.getTotalRowHeight)(e)}),0)},e.scrollFixedColsAndRows=function(t){var e=(0,r.locateNode)(t,"data-dhx-widget-id").querySelector(".dhx_grid-body"),i=t.deltaY,n=t.shiftKey?[i,0]:[0,i];null==e||e.scrollBy.apply(e,n)},e.isWasmSupported=function(){try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){var t=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(t instanceof WebAssembly.Module)return new WebAssembly.Instance(t)instanceof WebAssembly.Instance}}catch(t){return!1}return!1},e.getLastChild=function(t,e,i){void 0===i&&(i=!0);for(var n=e.getItem(t);n&&n.$opened&&e.haveItems(t);){var o=e.getItems(t);if(t=o[o.length-1].id,!i)break;n=e.getItem(t)}return n?t:null},e.getClosestTop=function(t,e){var i=e.getIndex(t),n=e.getParent(t);if(i>0){var o=e.getItems(n)[i-1];if(!e.haveItems(o.id)||!o.$opened)return o.id;for(;e.haveItems(o.id)&&o.$opened;){var r=e.getItems(o.id);o=r[r.length-1]}return o.id}return n===e.getRoot()?null:n},e.getClosestBottom=function t(e,i,n){void 0===n&&(n=!1);var o=i.getItem(e);if(i.haveItems(e)&&o.$opened&&!n)return i.getItems(e)[0].id;var r=i.getParent(e),a=i.getItems(r),l=a.findIndex((function(t){return t.id===e}));return l+1<a.length?a[l+1].id:r===i.getRoot()?null:t(r,i,!0)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EventsMixin=e.EventSystem=void 0;var n=function(){function t(t){this.events={},this.context=t||this}return t.prototype.on=function(t,e,i){var n=t.toLowerCase();this.events[n]=this.events[n]||[],this.events[n].push({callback:e,context:i||this.context})},t.prototype.detach=function(t,e){var i=t.toLowerCase(),n=this.events[i];if(e&&n&&n.length)for(var o=n.length-1;o>=0;o--)n[o].context===e&&n.splice(o,1);else this.events[i]=[]},t.prototype.fire=function(t,e){void 0===e&&(e=[]);var i=t.toLowerCase();return!this.events[i]||!this.events[i].map((function(t){return t.callback.apply(t.context,e)})).includes(!1)},t.prototype.clear=function(){this.events={}},t}();e.EventSystem=n,e.EventsMixin=function(t){var e=new n(t=t||{});t.detachEvent=e.detach.bind(e),t.attachEvent=e.on.bind(e),t.callEvent=e.fire.bind(e)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNormalizeDateObject=e.getCurrFixedCols=e.calcScrollBarWidth=e.BORDERS=void 0;var n=i(2),o=i(3),r=i(13);e.BORDERS=2,e.calcScrollBarWidth=function(t,i,o){var r,a;void 0===i&&(i=!1);var l=t.$totalHeight+t.$headerHeight+t.$footerHeight+e.BORDERS>(null!==(r=null==o?void 0:o.height)&&void 0!==r?r:t.$height),s=!l||i?0:(0,n.getScrollbarWidth)(),c=t.$totalWidth+e.BORDERS+s>(null!==(a=null==o?void 0:o.width)&&void 0!==a?a:t.$width);return{x:!c||i?0:(0,n.getScrollbarWidth)(),y:s,xState:c,yState:l}},e.getCurrFixedCols=function(t,e){return t[e]?(e===o.Split.left?t.columns.slice(0,t.leftSplit):t.columns.slice(-t.rightSplit)).filter((function(t){return!t.hidden})):[]},e.getNormalizeDateObject=function(t,e){if("string"!=typeof t)return t;if((0,r.stringToDate)(t,e,!0))return(0,r.stringToDate)(t,e);var i=new Date(t);return(null==i?void 0:i.valueOf())?i:null}},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(12),e),o(i(33),e),o(i(76),e),o(i(77),e),o(i(15),e),o(i(79),e),o(i(10),e),o(i(24),e),o(i(35),e),o(i(80),e),o(i(34),e),o(i(23),e),o(i(37),e)},function(t,e,i){(function(e,i){!function(){e="undefined"!=typeof window?window:this;var n=1,o={},r=!1;function a(t){e.setImmediate?i(t):e.importScripts?setTimeout(t):(n++,o[n]=t,e.postMessage(n,"*"))}function l(t){"use strict";if("function"!=typeof t&&null!=t)throw TypeError();if("object"!=typeof this||this&&this.then)throw TypeError();var e,i,n=this,o=0,r=0,s=[];n.promise=n,n.resolve=function(t){return e=n.fn,i=n.er,o||(r=t,o=1,a(u)),n},n.reject=function(t){return e=n.fn,i=n.er,o||(r=t,o=2,a(u)),n},n._d=1,n.then=function(t,e){if(1!=this._d)throw TypeError();var i=new l;return i.fn=t,i.er=e,3==o?i.resolve(r):4==o?i.reject(r):s.push(i),i},n.catch=function(t){return n.then(null,t)};var c=function(t){o=t||4,s.map((function(t){3==o&&t.resolve(r)||t.reject(r)}))};try{"function"==typeof t&&t(n.resolve,n.reject)}catch(t){n.reject(t)}return n;function d(t,e,i,n){if(2==o)return n();if("object"!=typeof r&&"function"!=typeof r||"function"!=typeof t)n();else try{var a=0;t.call(r,(function(t){a++||(r=t,e())}),(function(t){a++||(r=t,i())}))}catch(t){r=t,i()}}function u(){var t;try{t=r&&r.then}catch(t){return r=t,o=2,u()}d(t,(function(){o=1,u()}),(function(){o=2,u()}),(function(){try{1==o&&"function"==typeof e?r=e(r):2==o&&"function"==typeof i&&(r=i(r),o=1)}catch(t){return r=t,c()}r==n?(r=TypeError(),c()):d(t,(function(){c(3)}),c,(function(){c(1==o&&3)}))}))}}e.setImmediate||e.addEventListener("message",(function(t){if(t.source==e)if(r)a(o[t.data]);else{r=!0;try{o[t.data]()}catch(t){}delete o[t.data],r=!1}})),l.resolve=function(t){if(1!=this._d)throw TypeError();return t instanceof l?t:new l((function(e){e(t)}))},l.reject=function(t){if(1!=this._d)throw TypeError();return new l((function(e,i){i(t)}))},l.all=function(t){if(1!=this._d)throw TypeError();if(!(t instanceof Array))return l.reject(TypeError());var e=new l;return function i(n,o){if(o)return e.resolve(o);if(n)return e.reject(n);0==t.reduce((function(t,e){return e&&e.then?t+1:t}),0)&&e.resolve(t),t.map((function(e,n){e&&e.then&&e.then((function(e){return t[n]=e,i(),e}),i)}))}(),e},l.race=function(t){if(1!=this._d)throw TypeError();if(!(t instanceof Array))return l.reject(TypeError());if(0==t.length)return new l;var e=new l;return function i(n,o){if(o)return e.resolve(o);if(n)return e.reject(n);0==t.reduce((function(t,e){return e&&e.then?t+1:t}),0)&&e.resolve(t),t.map((function(t,e){t&&t.then&&t.then((function(t){i(null,t)}),i)}))}(),e},l._d=1,t.exports=l}()}).call(this,i(22),i(64).setImmediate)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.splitCsv=e.throwMoveWarning=e.isOnlyPermanentFilters=e.hasJsonOrArrayStructure=e.isTreeCollection=e.copyWithoutInner=e.toDataDriver=e.toProxy=e.dhxError=e.dhxWarning=e.isDebug=e.findByConf=e.naturalCompare=e.isEqualObj=void 0;var n=i(0),o=i(15),r=i(34);function a(t){console.warn(t)}e.isEqualObj=function(t,e){for(var i in t)if(t[i]!==e[i]||Array.isArray(t[i]))return!1;return!0},e.naturalCompare=function(t,e){if(isNaN(t)||isNaN(e)){var i=[],n=[];for(t.replace(/(\d+)|(\D+)/g,(function(t,e,n){i.push([e||1/0,n||""])})),e.replace(/(\d+)|(\D+)/g,(function(t,e,i){n.push([e||1/0,i||""])}));i.length&&n.length;){var o=i.shift(),r=n.shift(),a=o[0]-r[0]||o[1].localeCompare(r[1]);if(a)return a}return i.length-n.length}return t-e},e.findByConf=function(t,e,i,n){if("function"==typeof e){if(e.call(this,t,i,n))return t}else if(e.by&&e.match&&t[e.by]===e.match)return t},e.isDebug=function(){var t=window.dhx;if(void 0!==t)return void 0!==t.debug&&t.debug},e.dhxWarning=a,e.dhxError=function(t){throw new Error(t)},e.toProxy=function(t){var e=typeof t;return"string"===e?new o.DataProxy(t):"object"===e?t:void 0},e.toDataDriver=function(t){if("string"==typeof t){var e=window.dhx,i=e&&e.dataDrivers||r.dataDrivers;if(i[t])return new i[t];console.warn("Incorrect data driver type:",t),console.warn("Available types:",JSON.stringify(Object.keys(i)))}else if("object"==typeof t)return t},e.copyWithoutInner=function(t,e){var i={};for(var n in t)n.startsWith("$")||e&&e[n]||(i[n]=t[n]);return i},e.isTreeCollection=function(t){return Boolean(t.getRoot)},e.hasJsonOrArrayStructure=function(t){if("object"==typeof t)return!0;if("string"!=typeof t)return!1;try{var e=JSON.parse(t);return"[object Object]"===Object.prototype.toString.call(e)||Array.isArray(e)}catch(t){return!1}},e.isOnlyPermanentFilters=function(t){return!(!t||(0,n.isEmptyObj)(t))&&Object.keys(t).every((function(e){var i;return null===(i=t[e].config)||void 0===i?void 0:i.permanent}))},e.throwMoveWarning=function(t,e){return void 0===e&&(e=!0),a("item with ID ".concat(t," not ").concat(e?"moved":"found")),null},e.splitCsv=function(t,e){return t.trim().split(new RegExp("".concat(e,'(?=(?:[^"]*"[^"]*")*[^"]*$)')))}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toViewLike=e.View=void 0;var n=i(0),o=i(2),r=function(){function t(t,e){var i;this.config=e||{},this._uid=null!==(i=this.config.rootId)&&void 0!==i?i:(0,n.uid)()}return t.prototype.mount=function(t,e){e&&(this._view=e),t&&this._view&&this._view.mount&&(this._container=(0,o.toNode)(t),this._container.tagName?this._view.mount(this._container):this._container.attach&&this._container.attach(this))},t.prototype.unmount=function(){var t=this.getRootView();t&&t.node&&(this.getRootNode()&&t.unmount(),this._view=null)},t.prototype.getRootView=function(){return this._view},t.prototype.getRootNode=function(){return this._view&&this._view.node&&this._view.node.el},t.prototype.paint=function(){this._view&&(this._view.node||this._container)&&(this._doNotRepaint=!1,this._view.redraw())},t}();e.View=r,e.toViewLike=function(t){return{getRootView:function(){return t},paint:function(){return t.node&&t.redraw()},mount:function(e){return t.mount(e)}}}},function(t,e,i){"use strict";var n,o,r,a;Object.defineProperty(e,"__esModule",{value:!0}),e.DataDriver=e.DragEvents=e.DataEvents=e.TreeFilterType=void 0,function(t){t.all="all",t.level="level",t.leafs="leafs"}(n||(e.TreeFilterType=n={})),function(t){t.afterAdd="afteradd",t.beforeAdd="beforeadd",t.removeAll="removeall",t.beforeRemove="beforeremove",t.afterRemove="afterremove",t.change="change",t.filter="filter",t.dataRequest="dataRequest",t.load="load",t.loadError="loaderror",t.beforeLazyLoad="beforelazyload",t.afterLazyLoad="afterlazyload",t.beforeItemLoad="beforeItemLoad",t.afterItemLoad="afterItemLoad",t.beforeGroup="beforeGroup",t.afterGroup="afterGroup",t.beforeUnGroup="beforeUnGroup",t.afterUnGroup="afterUnGroup"}(o||(e.DataEvents=o={})),function(t){t.beforeDrag="beforeDrag",t.dragStart="dragStart",t.dragOut="dragOut",t.dragIn="dragIn",t.canDrop="canDrop",t.cancelDrop="cancelDrop",t.beforeDrop="beforeDrop",t.afterDrop="afterDrop",t.afterDrag="afterDrag"}(r||(e.DragEvents=r={})),function(t){t.json="json",t.csv="csv",t.xml="xml"}(a||(e.DataDriver=a={}))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stripTime=e.DateHelper=e.stringToDate=e.getExcelDate=e.getFormattedDate=e.locale=void 0;var n=i(0),o=i(0);e.locale={monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Monday"],cancel:"Cancel"};var r,a={"%d":function(t){var e=t.getDate();return e<10?"0"+e:e},"%j":function(t){return t.getDate()},"%l":function(t){return e.locale.days[t.getDay()]},"%D":function(t){return e.locale.daysShort[t.getDay()]},"%m":function(t){var e=t.getMonth()+1;return e<10?"0"+e:e},"%n":function(t){return t.getMonth()+1},"%M":function(t){return e.locale.monthsShort[t.getMonth()]},"%F":function(t){return e.locale.months[t.getMonth()]},"%y":function(t){return t.getFullYear().toString().slice(2)},"%Y":function(t){return t.getFullYear()},"%h":function(t){var e=t.getHours()%12;return 0===e&&(e=12),e<10?"0"+e:e},"%g":function(t){var e=t.getHours()%12;return 0===e&&(e=12),e},"%H":function(t){var e=t.getHours();return e<10?"0"+e:e},"%G":function(t){return t.getHours()},"%i":function(t){var e=t.getMinutes();return e<10?"0"+e:e},"%s":function(t){var e=t.getSeconds();return e<10?"0"+e:e},"%a":function(t){return t.getHours()>=12?"pm":"am"},"%A":function(t){return t.getHours()>=12?"PM":"AM"},"%u":function(t){return t.getMilliseconds()}},l={"%d":function(t,e,i,n){var o=/(^([0-9][0-9])$)/i.test(e);if(n)return o;o?t.setDate(Number(e)):t.setDate(Number(1))},"%j":function(t,e,i,n){var o=/(^([0-9]?[0-9])$)/i.test(e);if(n)return o;o?t.setDate(Number(e)):t.setDate(Number(1))},"%m":function(t,e,i,n){var o=/(^([0-9][0-9])$)/i.test(e);if(n)return o;o?t.setMonth(Number(e)-1):t.setMonth(Number(0)),o&&t.getMonth()!==Number(e)-1&&t.setMonth(Number(e)-1)},"%n":function(t,e,i,n){var o=/(^([0-9]?[0-9])$)/i.test(e);if(n)return o;o?t.setMonth(Number(e)-1):t.setMonth(Number(0)),o&&t.getMonth()!==Number(e)-1&&t.setMonth(Number(e)-1)},"%M":function(t,i,n,r){var a=(0,o.findIndex)(e.locale.monthsShort,(function(t){return t===i}));if(r)return-1!==a;-1===a?t.setMonth(0):t.setMonth(a),-1!==a&&t.getMonth()!==a&&t.setMonth(a)},"%F":function(t,i,n,r){var a=(0,o.findIndex)(e.locale.months,(function(t){return t===i}));if(r)return-1!==a;-1===a?t.setMonth(0):t.setMonth(a),-1!==a&&t.getMonth()!==a&&t.setMonth(a)},"%y":function(t,e,i,n){var o=/(^([0-9][0-9])$)/i.test(e);if(n)return o;o?t.setFullYear(Number("20"+e)):t.setFullYear(Number("2000"))},"%Y":function(t,e,i,n){var o=/(^([0-9][0-9][0-9][0-9])$)/i.test(e);if(n)return o;o?t.setFullYear(Number(e)):t.setFullYear(Number("2000"))},"%h":function(t,e,i,n){var o=/(^0[1-9]|1[0-2]$)/i.test(e);if(n)return o;o&&("am"===i||"pm"===i)||"AM"===i||"PM"===i?t.setHours(Number(e)):t.setHours(Number(0))},"%g":function(t,e,i,n){var o=/(^[1-9]$)|(^0[1-9]|1[0-2]$)/i.test(e);if(n)return o;o&&("am"===i||"pm"===i)||"AM"===i||"PM"===i?t.setHours(Number(e)):t.setHours(Number(0))},"%H":function(t,e,i,n){var o=/(^[0-2][0-9]$)/i.test(e);if(n)return o;o?t.setHours(Number(e)):t.setHours(Number(0))},"%G":function(t,e,i,n){var o=/(^[1-9][0-9]?$)/i.test(e);if(n)return o;o?t.setHours(Number(e)):t.setHours(Number(0))},"%i":function(t,e,i,n){var o=/(^([0-5][0-9])$)/i.test(e);if(n)return o;o?t.setMinutes(Number(e)):t.setMinutes(Number(0))},"%s":function(t,e,i,n){var o=/(^([0-5][0-9])$)/i.test(e);if(n)return o;o?t.setSeconds(Number(e)):t.setSeconds(Number(0))},"%u":function(t,e,i,n){var o=/(^([0-9][0-9][0-9])$)/i.test(e);if(n)return o;o?t.setMilliseconds(Number(e)):t.setMilliseconds(Number(0))},"%a":function(t,e,i,n){if(n)return"pm"===e||"am"===e;"pm"===e&&t.setHours(t.getHours()+12)},"%A":function(t,e,i,n){if(n)return"PM"===e||"AM"===e;"PM"===e&&t.setHours(t.getHours()+12)}};function s(t){for(var e=[],i="",n=0;n<t.length;n++)"%"===t[n]?(i.length>0&&(e.push({type:r.separator,value:i}),i=""),e.push({type:r.datePart,value:t[n]+t[n+1]}),n++):i+=t[n];return i.length>0&&e.push({type:r.separator,value:i}),e}!function(t){t[t.separator=0]="separator",t[t.datePart=1]="datePart"}(r||(r={})),e.getFormattedDate=function(t,e){return s(t).reduce((function(t,i){return i.type===r.separator?t+i.value:a[i.value]?t+a[i.value](e):t}),"")},e.getExcelDate=function(t){return t?25569+(t.getTime()-6e4*t.getTimezoneOffset())/864e5:null};var c={"%Y":1,"%y":1,"%M":2,"%F":2,"%m":2,"%n":2};function d(t,e,i){if("string"==typeof t){e=e.replace(/([a-z])(%a)/i,(function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t=t.replace(/(am|pm)/i," $&"),e[1]+" "+e[2]}));for(var n,o=s(e),a=new Array(2),d=0,u=null,h="Incorrect date, see docs: https://docs.dhtmlx.com/suite/calendar__api__calendar_dateformat_config.html",f=function(t){var e=c[t.formatter];e?a[e-1]=t:("%A"!==t.formatter&&"%a"!==t.formatter||(n=t.value),a.push(t))},p=0;p<o.length;p++)if(o[p].type===r.separator){var g=t.indexOf(o[p].value,d);if(-1===g){if(i)return!1;throw new Error(h)}u&&(f({formatter:u,value:t.slice(d,g)}),u=null),d=g+o[p].value.length}else if(o[p].type===r.datePart){if(o[p+1]&&o[p+1].type!==r.separator){if(i)return!1;throw new Error(h)}u=o[p].value}u&&f({formatter:u,value:t.slice(d)});for(var v=new Date(0),_=0,m=a;_<m.length;_++){var y=m[_];if(y&&l[y.formatter]){if(i&&!l[y.formatter](v,y.value,n,i))return!1;l[y.formatter](v,y.value,n)}}return!!i||v}}e.stringToDate=d;e.DateHelper=function(){function t(){}return t.copy=function(t){return new Date(t)},t.fromYear=function(t){return new Date(t,0,1)},t.fromYearAndMonth=function(t,e){return new Date(t,e,1)},t.weekStart=function(t,e){var i=(t.getDay()+7-e)%7;return new Date(t.getFullYear(),t.getMonth(),t.getDate()-i)},t.monthStart=function(t){return new Date(t.getFullYear(),t.getMonth(),1)},t.yearStart=function(t){return new Date(t.getFullYear(),0,1)},t.dayStart=function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())},t.addDay=function(t,e){return void 0===e&&(e=1),new Date(t.getFullYear(),t.getMonth(),t.getDate()+e)},t.addMonth=function(t,e){return void 0===e&&(e=1),new Date(t.getFullYear(),t.getMonth()+e)},t.addYear=function(t,e){return void 0===e&&(e=1),new Date(t.getFullYear()+e,t.getMonth())},t.withHoursAndMinutes=function(t,e,i,n){return void 0===n||!n&&12===e||n&&12!==e?new Date(t.getFullYear(),t.getMonth(),t.getDate(),e,i):n&&12===e?new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,i):new Date(t.getFullYear(),t.getMonth(),t.getDate(),e+12,i)},t.setMonth=function(t,e){t.setMonth(e)},t.setYear=function(t,e){t.setFullYear(e)},t.mergeHoursAndMinutes=function(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),e.getHours(),e.getMinutes())},t.isWeekEnd=function(t){return 0===t.getDay()||6===t.getDay()},t.getTwelweYears=function(t){var e=t.getFullYear(),i=e-e%12;return(0,n.range)(i,i+11)},t.getDayOrdinal=function(t){return(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())-Date.UTC(t.getFullYear(),0,1))/864e5},t.getWeekNumber=function(e){var i=4===e.getDay()?e:t.addDay(e,4-e.getDay()),n=t.getDayOrdinal(i);return Math.trunc(n/7)+1},t.isSameDay=function(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()},t.toDateObject=function(t,e){return"string"==typeof t?d(t,e):new Date(t)},t.nullTimestampDate=new Date(0),t}();e.stripTime=function(t,e){return void 0===e&&(e=!1),e?new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes()):new Date(t.getFullYear(),t.getMonth(),t.getDate())}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.formatValue=e.clearCells=e.normalizeCell=e.getReducedRowspan=e.getReducedColspan=e.getSpanHeight=e.getWidth=void 0;var o=i(13);e.getWidth=function(t,e,i){return t.slice(i,i+(e||1)).filter((function(t){return!t.hidden})).reduce((function(t,e){return t+e.$width}),0)},e.getSpanHeight=function(t,e){var i=e.$rowsVisibility;return t.slice(i[0],i[1]+1).reduce((function(t,e){return t+e.$height}),0)},e.getReducedColspan=function(t,e,i){var n=t.findIndex((function(t){return t.id===e}));return t.slice(n,n+(i||1)).filter((function(t){return!t.hidden})).length},e.getReducedRowspan=function(t,e,i,n){var o,r=n.rowspan||1;if(t.length===e.length)return r;var a=null!==(o=null==t?void 0:t.findIndex((function(t){return t.id===n.row})))&&void 0!==o?o:-1,l=0;if(-1!==a)for(var s=1;s<r;s++){var c=e[i-l+s],d=t[a+s];(null==c?void 0:c.id)!==(null==d?void 0:d.id)&&l++}return r-l},e.normalizeCell=function(t,e){if(t){var i=t.row,n=t.column,o=e.getSpan(i.id,n.id);return o?{row:i.id===o.row?i:e.data.getItem(o.row),column:n.id===o.column?n:e.config.columns.find((function(t){return t.id===o.column}))}:t}},e.clearCells=function(t,e){var i=new Map(e.map((function(t){var e=t.row;return[e.id,e]}))),o=new Map(e.map((function(t){var e=t.column;return[e.id,e]}))),r=[],a=[],l=0;i.forEach((function(e){var s={};o.forEach((function(t,e){!1!==t.editable&&(s[e]="")})),r.push(n({},e)),a.push(n({id:e.id},s)),t.data.update(e.id,s,l<i.size-1),++l})),t.history&&t.history.add({type:"change",batch:a,inverse:{type:"change",batch:r}}),t.paint()},e.formatValue=function(t,e){var i=e.column,n=e.row,r=t;switch(i.type){case"number":var a=parseFloat(null==r?void 0:r.toString().replace(/[^0-9.-]/g,""));return isNaN(a)?n[i.id]:a;case"boolean":if("boolean"==typeof r)return r;var l=null==r?void 0:r.toString().toLowerCase();return"true"===l||"1"===l||"yes"===l||"false"!==l&&"0"!==l&&"no"!==l&&n[i.id];case"date":var s=i.dateFormat||"%M %d %Y";if(!(0,o.stringToDate)(r,s,!0)){var c=new Date(r);r=(null==c?void 0:c.valueOf())?(0,o.getFormattedDate)(s,c):n[i.id]}}return r}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataProxy=void 0;var n=i(23),o=function(){function t(t,e){void 0===e&&(e={}),this.url=this._url=t,this.config=e}return t.prototype.updateUrl=function(t,e){for(var i in void 0===e&&(e={}),this._url=this.url=t||this._url,this.url+=this.url.includes("?")?"&":"?",e)this.config[i]=e[i],this.url+="".concat(i,"=").concat(encodeURIComponent(e[i]),"&");this.url=this.url.slice(0,-1)},t.prototype.load=function(){return n.ajax.get(this.url,void 0,this.config)},t.prototype.save=function(t,e){switch(e){case"delete":return n.ajax.delete(this.url,t,this.config);case"update":return n.ajax.put(this.url,t,this.config);default:return n.ajax.post(this.url,t,this.config)}},t}();e.DataProxy=o},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionEvents=void 0,function(t){t.beforeUnSelect="beforeunselect",t.afterUnSelect="afterunselect",t.beforeSelect="beforeselect",t.afterSelect="afterselect"}(n||(e.SelectionEvents=n={}))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.focusManager=void 0;var n=i(2),o=function(){function t(){var t=this;this._initHandler=function(e){return t._activeWidgetId=(0,n.locate)(e,"data-dhx-widget-id")},this._removeFocusClass=function(t){var e=document.body.classList;e.contains("utilityfocus")&&e.remove("utilityfocus")},this._addFocusClass=function(t){var e=document.body.classList;"Tab"===t.code?e.contains("utilityfocus")||e.add("utilityfocus"):e.contains("utilityfocus")&&e.remove("utilityfocus")},document.addEventListener("focusin",this._initHandler),document.addEventListener("pointerdown",this._initHandler),document.addEventListener("mousedown",this._removeFocusClass),document.addEventListener("keydown",this._addFocusClass)}return t.prototype.getFocusId=function(){return this._activeWidgetId},t.prototype.setFocusId=function(t){this._activeWidgetId=t},t}();e.focusManager=new o},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.removePatternMask=e.patternMask=e.removeNumberMask=e.numberMask=void 0;var o=i(0);e.numberMask=function(t,e,i){var n,r,a,l=e.prefix||"",s=e.suffix||"",c=e.maxIntLength,d=e.maxDecLength,u=e.minDecLength,h=null!==(n=e.groupSeparator)&&void 0!==n?n:",",f="number"!=typeof d||d?null!==(r=e.decSeparator)&&void 0!==r?r:".":"",p=!1,g=t.toString(),v="-"===g[0];v&&!1===e.allowNegative&&(g=g.slice(1),v=!1);var _=g.split(".");if((0,o.isDefined)(c)){var m=c+(v?1:0);_[0].length>m&&(_[0]=_[0].slice(0,m),p=!0)}if((0,o.isDefined)(d)&&(null===(a=_[1])||void 0===a?void 0:a.length)>d&&(_[1]=_[1].slice(0,d),p=!0),e.onlyView&&u&&_[0])for(_[1]||(_[1]="");_[1].length<u;)_[1]+="0";if(i&&_[0]){var y=v?"-":"",b=v?_[0].slice(1):_[0];if(b.length>1){var x=b.replace(/^0+/,"")||"0";_[0]=y+x}}_[0]=_[0].replace(/\B(?=(\d{3})+(?!\d))/g,h);var w=l+(g=_.join(f))+s;if(g.length||(w=""),i){var C=i.value.length,S=i.selectionStart,E=w.length-C,D=S+E,O=0;v&&g[O+2]!==f&&++O,g[O]===f&&(w=v?l+"-0"+f+s:l+"0"+f+s,++D),D>w.length?D=w.length:D<0&&(D=0),s&&w.length-s.length<=D&&(D=D-s.length+(w.length-D)),w[D-1]===h&&--D,p&&-1===E&&w[++D-1]===h&&D++,i.value=w,i.setSelectionRange(D,D),i.focus()}return w},e.removeNumberMask=function(t,e){var i,n=e.decSeparator||".",o=null===(i=e.allowNegative)||void 0===i||i;e.prefix&&t.startsWith(e.prefix)&&(t=t.slice(e.prefix.length)),e.suffix&&t.endsWith(e.suffix)&&(t=t.slice(0,t.length-e.suffix.length));var r=o&&"-"===t[0]?"-":"",a=t.split(n),l=a[0],s=a.slice(1),c=(t=s.length?l+n+s.join(""):l).replace(new RegExp("[^0-9\\".concat(n,"]"),"g"),"").replace(new RegExp("\\".concat(n)),".");return e.lastCall&&("."===c[c.length-1]&&(c=0==+c?"":c.slice(0,-1)),(isNaN(+c)||0==+c)&&(r="")),r+c};var r={0:/\d/,a:/[A-Za-z]/,"#":/[A-Za-z0-9]/,"*":/./};function a(t,e){var i="",o=e,a=n({},r);"object"==typeof e&&(o="function"==typeof e.pattern?e.pattern(t):e.pattern,a=n(n({},a),e.charFormat||{}));for(var l=0;l<t.length;l++)a[o[l]]&&(i+=t[l]);return i}e.patternMask=function(t,e,i){var o,l;t=(null===(o=null==i?void 0:i.value)||void 0===o?void 0:o.toString())||t.toString();var s=e,c=n({},r);if("object"==typeof e&&(s="function"==typeof e.pattern?e.pattern(t):e.pattern,c=n(n({},c),e.charFormat||{})),l=function(t,e,i){if(void 0===i&&(i={}),!t)return"";var o="",a=0,l=!1,s=!1;i=n(n({},r),i);for(var c=0;c<e.length;c++){var d=i[u=e[c]];if(d){for(;a<t.length&&!d.test(t[a]);)a++;if(!(a<t.length))break;o+=t[a],a++,l=!0}else a<t.length&&(o+=u,t.length>1&&t[a]===u&&a++)}for(c=o.length;c<e.length;c++)if(i[e[c]]){s=!0;break}if(!s)for(c=o.length;c<e.length;c++){var u;if(i[u=e[c]])break;o+=u}if(s&&o.length>0&&!i[e[o.length-1]]){for(var h=o.length-1;h>=0&&!i[e[h]];)h--;o=o.substring(0,h+1)}return l||(o=""),o}(t,s,c),i){var d=a(i.value,e),u=a(l,e),h=i.selectionStart||0;if(d.length===u.length)if(d!==u)for(;h<s.length&&!c[s[h-1]]||0===h&&!c[s[h]];)h++;else for(;h>0&&!c[s[h-1]];)h--;else if(d.length<u.length)for(;h<s.length&&!c[s[h-1]]||0===h&&!c[s[h]];)h++;0===h&&(h=l.length),i.value=l,i.setSelectionRange(h,h),i.focus()}return l},e.removePatternMask=a},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeSpan=e.getShifts=e.getSpans=e.getCells=e.getHandlers=void 0;var o=i(0),r=i(1),a=i(14),l=i(5),s=i(3),c=i(91),d=i(2),u=i(4),h=i(7);function f(t,e,i,n,o){e=(0,d.locateNodeByClassName)(o.target,"dhx_grid-fixed-cols-wrap")?0:e;var r=(0,d.locateNodeByClassName)(o.target,"dhx_grid-cell"),a=(0,d.locateNodeByClassName)(o.target,"dhx_span-cell");if((r||a)&&n){var l=r?r.parentNode:a,s=(r||a).getAttribute("data-dhx-col-id"),c=i.filteredColumns.find((function(t){return t.id===s})),u=l.getAttribute("data-dhx-id"),h=(i.$data||i.data).find((function(t){return t.id.toString()===u}));n.toLocaleLowerCase().includes("touch")?i._events.fire(n,[h,c,o]):i.events.fire(n,[h,c,o])}}function p(t,e,i,n){return(0,c.getEditor)(t,e,i,n)}function g(t){var e=t.$scrollBarWidth,i=t.$totalWidth-t.$width+h.BORDERS+e.y,n=t.$totalHeight-t.$height+t.$headerHeight+t.$footerHeight+h.BORDERS+e.x;return{x:i>0?i-t.scroll.left:0,y:n>0?n-t.scroll.top:0}}e.getHandlers=function(t,e,i){return{onclick:[f,t,e,i,s.GridEvents.cellClick],onmouseover:[f,t,e,i,s.GridEvents.cellMouseOver],onmousedown:[f,t,e,i,s.GridEvents.cellMouseDown],ondblclick:[f,t,e,i,s.GridEvents.cellDblClick],oncontextmenu:[f,t,e,i,s.GridEvents.cellRightClick],ontouchstart:[f,t,e,i,s.GridEvents.cellMouseDown],ontouchmove:[f,t,e,i,s.GridSystemEvents.cellTouchMove],ontouchend:[f,t,e,i,s.GridSystemEvents.cellTouchEnd]}},e.getCells=function(t){var e;if(!t.data||!t.filteredColumns)return[];var i,a="tree"===t.type,s="row"===(null===(e=t.selection.config)||void 0===e?void 0:e.type),c=t.$positions,d=("render"!==t.$renderFrom?t.data.slice(c.yStart,c.yEnd):t.currentRows)||[],h=t.filteredColumns.slice(c.xStart,c.xEnd),f=t.selection.getCell();if(t.$isDragging){var g=document.querySelector(".dhx_drag-ghost");if(g){var v=Array.from(g.querySelectorAll(".dhx_grid-row")).map((function(t){return Number(t.getAttribute("aria-rowindex"))-1}));v.length&&(i=v.map((function(e){return t.data[e]})).filter((function(t){return t&&!d.find((function(e){return e.id===t.id}))})),d.push.apply(d,i))}}return d.map((function(e,g){var v,_=null==i?void 0:i.some((function(t){return t.id===e.id})),m=d.length-1===g,y=null===(v=t.$subRowCells)||void 0===v?void 0:v.get(e.id),b="";t.rowCss&&(b=t.rowCss(e)),e.$css&&(b+=e.$css);var x=h.map((function(i,a){var d,h;if(!i.hidden){var g=e[i.id],v=(0,o.isDefined)(g)&&i.options?(0,u.getComboEditorValue)(g,i,e):(0,u.applyPattern)(g,i),_=i.template?i.template((0,o.isDefined)(v)?v:"",e,i):"boolean"!=typeof(h=v)&&"boolean"!==i.type||"string"==typeof h||e.$group?h||0===h?h:"":"".concat(Boolean(h));"string"==typeof _&&(_=(0,l.isHtmlEnable)(t,i)?(0,r.el)("div.dhx_grid-cell__content",n({".innerHTML":_},{role:"button","aria-label":"Edit content"})):_);var m="".concat(i.$cellCss&&i.$cellCss[e.id]||""," dhx_").concat(i.type,"-cell").replace(/\s+/g," "),b=i.$width,x=t.$editable&&t.$editable.row===e.id&&t.$editable.col===i.id&&!t.$editable.isSpan,w=t.leftSplit,C=t.filteredColumns;(x||"boolean"===i.type&&(t.editable&&(null===(d=i.editable)||void 0===d||d)||!t.editable&&i.editable)&&!e.$group)&&(_=p(e,i,t).toHTML(),m+=" dhx_grid-cell__editable",w===C.indexOf(i)+1&&(b-=1));var S=t.firstColId===i.id&&(null==y?void 0:y.toggleIcon)&&!!(null==y?void 0:y.height);return"tree"===t.type&&t.firstColId===i.id||S?function(t,e,i,o,a,l){var s;void 0===a&&(a=!1),void 0===l&&(l=1);var c=o.selection.getCell(),d="row"===(null===(s=o.selection.config)||void 0===s?void 0:s.type),h=o.$editable&&o.$editable.row===e.id&&o.$editable.col===i.id,f=!o.fixedColumns.left.length||"leftFixedCols"===o.$renderFrom,p=i.align?"dhx_align-".concat(i.align):"dhx_align-left",g="";f&&(g="dhx_tree-cell ".concat(i.$cellCss[e.id]||""," ").concat(p),(e.$items||a)&&(g+=" dhx_grid-expand-cell"),h&&(g+=" dhx_tree-editing-cell"),o.dragMode&&!h&&(g+=e.$draggable?" dhx_grid-cell--draggable":""));var v=(0,u.getTreeCellWidthOffset)(e,!0);return(0,r.el)(".dhx_grid-cell",n({class:g,style:{width:i.$width,height:e.$height,padding:e.$items?0:"0 0 0 ".concat(v,"px")},"data-dhx-col-id":i.id},function(t,i){var r,a;return n(n({role:"gridcell","aria-colindex":i,"aria-readonly":o.editable?"false":"true"},!d&&{"aria-selected":o.selection.isSelectedCell(e.id,t.id)?"true":"false"}),{tabindex:(null===(r=null==c?void 0:c.row)||void 0===r?void 0:r.id)===e.id&&(null===(a=null==c?void 0:c.column)||void 0===a?void 0:a.id)===t.id?0:-1})}(i,l)),f?[e.$items||a?(0,r.el)(".dhx_grid-expand-cell-icon",n(n({class:e.$opened?"dxi dxi-chevron-down":"dxi dxi-chevron-right","data-dhx-id":e.id},function(t){return{role:"button","aria-label":t.$opened?"Collapse group":"Expand group"}}(e)),{style:{padding:e.$level?"0 0 0 ".concat(4+v,"px"):"0 0 0 4px"}})):null,(0,r.el)(".dhx_tree-cell",{class:p+"".concat(o.autoHeight?" dhx_tree-cell_auto-height":"")},[t])]:null)}(_,e,i,t,S,c.xStart+a+1):(t.dragMode&&!x&&(m+=e.$draggable?" dhx_grid-cell--draggable":""),i.align&&(m+=" dhx_align-".concat(i.align)),(0,l.isHtmlEnable)(t,i)&&(m+=" dhx_grid-cell__content_html-enable"),t.autoHeight&&(m+=" dhx_grid-cell__content_auto-height"),(0,r.el)(".dhx_grid-cell",n({class:m,style:{width:b,height:e.$height+"px"},_key:i.id,"data-dhx-col-id":i.id},function(i,o,r,a){return n(n({role:"gridcell","aria-colindex":o,"aria-readonly":a?"false":"true"},!s&&{"aria-selected":t.selection.isSelectedCell(e.id,i.id)?"true":"false"}),function(t,e){var i={tabindex:-1};return f?f.row.id===e.id&&f.column.id===t.id&&(i.tabindex=0):i.tabindex=0,i}(i,e))}(i,c.xStart+a+1,0,t.editable)),[_]))}})),w=(0,u.getTotalRowHeight)(e);return(0,r.el)(".dhx_grid-row",n({style:{height:m?w+1:w,display:_?"none":null},"data-dhx-id":e.id,class:b,_key:e.id,_flags:r.KEYED_LIST},_?{}:function(e,i){var o,r=n({role:"row","aria-rowindex":e},s&&{"aria-selected":t.selection.isSelectedCell(i.id)?"true":"false"});return a&&i&&(r["aria-level"]=(null!==(o=i.$level)&&void 0!==o?o:0)+1,i.$items&&(r["aria-expanded"]=i.$opened?"true":"false")),r}(c.yStart+g+1,e)),x)}))},e.getSpans=function(t,e){var i,c,d=[],f=t.columns,v=t.filteredColumns,_=t.data,m=t.currentSpans,y=t.bottomSplit,b=void 0===y?0:y;if(!v.length||!m)return null;for(var x=t.fixedColumns.right.length,w=m.filter((function(e){var i;return null===(i=e.$renderFrom)||void 0===i?void 0:i.includes(t.$renderFrom)})),C=w.sort((function(t,e){return"string"==typeof t.row&&"string"==typeof e.row?t.row.localeCompare(e.row):t.row-e.row})),S=function(m){var y=C[m].row,w=C[m].column,S=C[m].$rowsVisibility[1]-C[m].$rowsVisibility[0]+1,E=C[m].$colsVisibility[1]-C[m].$colsVisibility[0]+1,D=C[m].text,O=C[m].css,k=e===s.Split.bottom&&t.$renderFrom.endsWith("FixedCols"),R=k?t.$data:_,T=null==v?void 0:v.findIndex((function(t){return"".concat(t.id)==="".concat(w)})),M=null==R?void 0:R.findIndex((function(t){return"".concat(t.id)==="".concat(y)}));if(T<0||M<0)return"continue";if(k){var I=t.$data[M+S-1];if(!_.find((function(t){return t.id===(null==I?void 0:I.id)})))return"continue"}var H=v[T],P=R[M],F=H.$cellCss[y],A=(0,o.isDefined)(C[m].text)?"string":H.type;if(H.hidden)return"continue";var $=void 0;if((0,o.isDefined)(D))if("function"==typeof D){var j=n(n({},t.commonSummary),t.colSummary[w]);"string"==typeof H.summary&&"count"!==H.summary&&(j[H.summary]=(0,u.applyPattern)(j[H.summary],H)),$=D(j)}else $=D.toString();else $=void 0===P[w]?"":(0,u.applyPattern)(P[w],H);if("function"!=typeof D){var L=H.template||function(t,e,i){return t||0===t?t:""};$=L($,P,H)}var N=(0,l.isHtmlEnable)(t,H);$="string"==typeof $?(0,r.el)("div.dhx_span-cell-content",{class:t.autoHeight?" dhx_grid-cell__content_auto-height":"",".innerHTML":N?$:null},N?null:$):$;var V=void 0;if("bottomFixedRows"===t.$renderFrom||k){var W=R.length-b;V=M<W?-(0,u.rowsHeight)(t,R,M,W):(0,u.rowsHeight)(t,R,W,M)}else V=(0,u.rowsHeight)(t,R,0,M)-(e?0:1);var z=0;if("rightFixedCols"===t.$renderFrom){var B=v.length-t.fixedColumns.right.length;z=T<B?-(0,u.colsWidth)(t,v,T,B):(0,u.colsWidth)(t,v,B,T)}else z=(0,u.colsWidth)(t,v,0,T);var G=P.$items&&0===T,Y=T===v.length-1,U=T+E===v.length,X=x&&T===v.length-x,q=e===s.Split.bottom&&t.fixedRows.bottom.find((function(t){return t.id===y})),K=!!b&&M+S>R.length-b,Z=!!x&&T+E===v.length-x,J=H.header[0].text?" dhx_span-cell":" dhx_span-cell dhx_span-cell--title";J+=G?" dhx_span-expand-cell":"",J+=F?" ".concat(F):"",J+=O?" ".concat(O):"",J+=0===M?" dhx_span-first-row":"",J+=M+S===R.length?" dhx_grid__span_bottom--last-row":"",J+=0===T||X?" dhx_span-first-col":"",J+=Y||U?" dhx_span-last-col":"",J+=1===E?" dhx_span-".concat(H.type||"string","-cell"):" dhx_span-string-cell",J+=H.align?" dhx_align-".concat(H.align):" dhx_".concat(A,"-cell"),J+=q?" dhx_grid__span_bottom--all-fixed":"",J+=K?" dhx_grid__span_bottom--part-fixed":"",J+=Z?" dhx_grid__span_right--before-fixed":"";var Q=void 0;if(E>1){var tt=f.findIndex((function(t){return t.id===w}));Q=(0,a.getWidth)(f,C[m].colspan,tt)}else Q=H.$width;var et=void 0;if(S>1){if(et=(0,a.getSpanHeight)(R,C[m]),e===s.Split.top&&t.$renderFrom.endsWith("FixedCols")){var it=M+S-R.length;if(it>0){var nt=t.fixedRows.top.length;et+=(0,l.getTotalHeight)(t.$data.slice(nt,nt+it))}}}else et=P.$height;var ot=null;if((null===(i=t.$editable)||void 0===i?void 0:i.isSpan)&&t.$editable.row===y&&t.$editable.col===w||"boolean"===H.type&&(t.editable&&(null===(c=H.editable)||void 0===c||c)||!t.editable&&H.editable)){var rt=t.topSplit,at=void 0===rt?0:rt,lt=t.fixedColumns.left.length,st=lt&&T+E<=lt||x&&T>=v.length-x,ct=M<at||M+S>R.length-b,dt=at&&M+S<=at||b&&M>=R.length-b,ut=T<lt||T+E>v.length-x;if("render"===t.$renderFrom||st&&!ct||dt&&!ut){var ht=t.$height,ft=t.$scrollBarWidth,pt=t.scroll,gt=t.fixedRows,vt=t.fixedColumns,_t=C[m].text,mt=0;if($=p(P,H,t,C[m]).toHTML(_t),J+=" dhx_span__editable",!dt){var yt=(0,l.getTotalHeight)(gt.top),bt=(0,l.getTotalHeight)(gt.bottom),xt=ft.yState?ht-t.$headerHeight-t.$footerHeight-ft.x-h.BORDERS:t.$totalHeight,wt=V+et-pt.top,Ct=V-yt<pt.top,St=wt>xt-bt;Ct&&St&&ft.xState&&(mt=1),V=Ct?pt.top+yt-(yt&&!st?1:0):V,et=St?xt-V-bt+pt.top-mt:Ct?wt-yt:et}if("render"===t.$renderFrom){if(ot=14,vt.left.find((function(t){return t.id===w}))&&(z=pt.left+(0,l.getTotalWidth)(vt.left.slice(0,T)),!st)){var Et=(0,l.getTotalWidth)(vt.left.slice(T,lt));Q=Q-pt.left>Et?Q-pt.left:Et}if(gt.top.find((function(t){return t.id===y}))&&(V=pt.top+(0,l.getTotalHeight)(gt.top.slice(0,M)),!dt)){var Dt=(0,l.getTotalHeight)(t.fixedRows.top.slice(M,t.topSplit));et=et>0?Dt+et-mt:Dt}if(vt.right.find((function(t){return t===v[v.indexOf(H)+E-1]}))){var Ot=v.length,kt=g(t),Rt=Ot-v.indexOf(H)-E,Tt=(Et=Rt?(0,l.getTotalWidth)(vt.right.slice(0,-Rt)):(0,l.getTotalWidth)(vt.right),(0,l.getTotalWidth)(v.slice(T,Ot-x)));z=kt.x>Tt?z-kt.x+Tt:z,st||(Q=kt.x<Tt?Q-kt.x-1:Et-1)}if(gt.bottom.find((function(t){return t===R[R.indexOf(P)+S-1]}))){Ot=R.length,kt=g(t);var Mt=Ot-R.indexOf(P)-S,It=(Dt=Mt?(0,l.getTotalHeight)(gt.bottom.slice(0,-Mt)):(0,l.getTotalHeight)(t.fixedRows.bottom),(0,l.getTotalHeight)(R.slice(M,Ot-b)));V=kt.y>It?V-kt.y+It:V,dt||(et=kt.y<It?Dt+et-mt-(Mt?-1:mt?0:1):Dt-(Mt?-1:1))}}lt===T+1&&(Q-=1),T===v.length-x&&(z+=1,Q-=1)}}d.push((0,r.el)("div",{class:J,style:{width:Q,height:et,top:V,left:z,zIndex:ot},"data-dhx-col-id":w,"data-dhx-id":y,"aria-instead":"true"},[G?(0,r.el)(".dhx_span-expand-cell-icon",{class:P.$opened?"dxi dxi-chevron-down":"dxi dxi-chevron-right","data-dhx-id":P.id,role:"button","aria-label":P.$opened?"Collapse group":"Expand group",style:{padding:"0 0 0 ".concat(4+(0,u.getTreeCellWidthOffset)(P,!0),"px")}}):null,$]))},E=0;E<C.length;E++)S(E);return d},e.getShifts=function(t){return{x:(0,u.colsWidth)(t,t.filteredColumns,0,t.$positions.xStart),y:(0,u.rowsHeight)(t,t.data,0,t.$positions.yStart)}},e.normalizeSpan=function(t,e,i){var o=e.topSplit,r=void 0===o?0:o,l=e.bottomSplit,c=void 0===l?0:l,d=e.columns,u=t.column,f=t.row,p=t.colspan,g=t.rowspan,v=i.getRawData(0,-1,null,2),_=d.filter((function(t){return!t.hidden})),m=_.findIndex((function(t){return t.id==u})),y=v.findIndex((function(t){return t.id==f})),b=m+(p?(0,a.getReducedColspan)(d,u,p)-1:0),x=y+(g?(0,a.getReducedRowspan)(i.getInitialData(),v,y,t)-1:0),w=-1===m?[]:[m,b],C=-1===y?[]:[y,x],S=[];if(-1!==m&&-1!==y){var E=(0,h.getCurrFixedCols)(e,s.Split.left).length,D=(0,h.getCurrFixedCols)(e,s.Split.right).length,O=m<E,k=y<r,R=b>=_.length-D,T=x>=v.length-c;b>=E&&x>=r&&m<_.length-D&&y<v.length-c&&S.push("render"),O&&S.push("leftFixedCols"),R&&S.push("rightFixedCols"),!k||O||R?k&&!S.includes("render")&&S.push("render"):S.push("topFixedRows"),!T||O||R?T&&!S.includes("render")&&S.push("render"):S.push("bottomFixedRows")}return n(n({},t),{$renderFrom:S,$rowsVisibility:C,$colsVisibility:w})}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.defaultHistoryConfig=e.defaultDragPanelConfig=e.defaultSubRowConfig=e.getGroupDefaultConfig=void 0;var o=i(56);e.getGroupDefaultConfig=function(t){return"boolean"==typeof t&&(t={}),n(n({type:"column",panel:!0,panelHeight:40,hideableColumns:!0,showMissed:!0},t),{column:n({id:"string"==typeof t.column?t.column:null,header:[{text:o.default.groupText}]},"string"==typeof t.column?{}:t.column)})},e.defaultSubRowConfig={height:200,padding:8,toggleIcon:!0,expanded:!1,preserve:!1,fullWidth:!1},e.defaultDragPanelConfig={width:26,icon:"dxi dxi-drag-vertical"},e.defaultHistoryConfig={limit:15}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getContent=e.HeaderFilterEvent=void 0;var n,o=i(1),r=i(4),a=i(0),l=i(119),s=i(120),c=i(121);!function(t){t.change="change"}(n||(e.HeaderFilterEvent=n={})),e.getContent=function(t){return{inputFilter:{element:{},value:{},toHtml:function(e,i){var n=this,o=(0,a.uid)(),r=e.id.toString(),l=this.element[r];if(l)l.value=this.value[r];else{var s=e.header.find((function(t){return void 0!==t.filterConfig}));(l=new c.InputFilter({column:e,config:i,id:o,value:this.value[r],headerConfig:s,grid:t})).events.on("change",(function(t){n.value[r]=t})),this.element[r]=l}return l.toHTML()},match:function(t){var e=t.val,i=t.match,n=t.col;if(!(0,a.isDefined)(e))return!1;var o=String(i).toLowerCase();if(!o)return!0;var l=(0,r.applyPattern)(e,n),s=e.toString();return l&&String(l).toLowerCase().includes(o)||s&&s.toLowerCase().includes(o)}},selectFilter:{element:{},value:{},toHtml:function(e,i){var n=this,o=e.id.toString(),r=this.element[o];return r?(r.value=this.value[o],r.data=e.$activeFilterData||e.$uniqueData||[]):((r=new s.SelectFilter({column:e,config:i,value:this.value[o],uniqueData:e.$uniqueData,grid:t})).events.on("change",(function(t){n.value[o]=t})),this.element[o]=r),r.toHTML()},match:function(t){var e=t.val,i=t.match,n=t.col,o=(0,r.applyPattern)(e,n);return!i||(o||"boolean"==typeof o)&&o.toString()==i}},comboFilter:{element:{},value:{},toHtml:function(e,i){var n=this,r=e.id.toString(),a=this.element[r];if(a)a.data=e.$uniqueData||[];else{var s=e.header.find((function(t){return void 0!==t.filterConfig}));(a=new l.ComboFilter({column:e,config:i,headerConfig:s,uniqueData:e.$uniqueData,value:this.value[r],grid:t})).events.on("change",(function(t){n.value[r]=t})),this.element[r]=a}return(0,o.inject)(a.getFilter().getRootView())},match:function(t){var e=t.val,i=t.match,n=void 0===i?"":i,o=t.multi,a=void 0!==o&&o,l=t.col,s=(0,r.applyPattern)(e,l);if(Array.isArray(n)){for(var c=!1,d=function(t){if(c=a&&"string"==typeof s?s.split(", ").some((function(e){return e===n[t]})):n[t]===s)return"break"},u=0;u<n.length;u++){if("break"===d(u))break}return!n||!n.length||c}return void 0===n||s===n},destructor:function(){this.value={};var t=this.element;if(t)for(var e in t)t[e].destructor(),delete t[e]}}}}},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.ajax=void 0;var n=i(12),o=i(10);function r(t){return t?t.includes("json")?"json":t.includes("xml")?"xml":"text":"text"}function a(e,i,a,l,s){var c=l||{};if(s&&(c.Accept="application/"+s),"GET"!==a&&(c["Content-Type"]=c["Content-Type"]||"application/json"),"GET"===a){var d=i&&"object"==typeof i?function(t){return Object.keys(t).reduce((function(e,i){var n="object"==typeof t[i]?JSON.stringify(t[i]):t[i];return e.push(i+"="+encodeURIComponent(n)),e}),[]).join("&")}(i):i&&"string"==typeof i?i:"";d&&(e+=e.includes("?")?"&":"?",e+=d),i=null}return window.fetch?("application/json"===c["Content-Type"]&&i&&"object"==typeof i&&(i=JSON.stringify(i)),window.fetch(e,{method:a,body:i||null,headers:c}).then((function(e){if(!e.ok)return e.text().then((function(i){return t.reject({status:e.status,statusText:e.statusText,message:i})}));var i=s||r(e.headers.get("Content-Type"));if("raw"===i)return{headers:Object.fromEntries(e.headers.entries()),url:e.url,body:e.body};if(204!==e.status)switch(i){case"json":return e.json();case"xml":var a=(0,o.toDataDriver)(n.DataDriver.xml);return a?e.text().then((function(t){return a.toJsonObject(t)})):e.text();default:return e.text()}}))):new t((function(t,l){var d=new XMLHttpRequest;for(var u in d.onload=function(){d.status>=200&&d.status<300?("raw"===s&&t({url:d.responseURL,headers:d.getAllResponseHeaders().trim().split(/[\r\n]+/).reduce((function(t,e){var i=e.split(": ");return t[i[0]]=i[1],t}),{}),body:d.response}),204===d.status?t():t(function(t,e){switch(e){case"json":return JSON.parse(t);case"text":default:return t;case"xml":var i=(0,o.toDataDriver)(n.DataDriver.xml);return i?i.toJsonObject(t):{parseError:"Incorrect data driver type: 'xml'"}}}(d.responseText,s||r(d.getResponseHeader("Content-Type"))))):l({status:d.status,statusText:d.statusText})},d.onerror=function(){l({status:d.status,statusText:d.statusText,message:d.responseText})},d.open(a,e),c)d.setRequestHeader(u,c[u]);switch(a){case"POST":case"DELETE":case"PUT":d.send(void 0!==i?JSON.stringify(i):"");break;default:d.send()}}))}e.ajax={get:function(t,e,i){return a(t,e,"GET",i&&i.headers,void 0!==i?i.responseType:void 0)},post:function(t,e,i){return a(t,e,"POST",i&&i.headers,void 0!==i?i.responseType:void 0)},put:function(t,e,i){return a(t,e,"PUT",i&&i.headers,void 0!==i?i.responseType:void 0)},delete:function(t,e,i){return a(t,e,"DELETE",i&&i.headers,void 0!==i?i.responseType:void 0)}}}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.CsvDriver=void 0;var o=i(10),r=function(){function t(t){this.config=n(n({},{skipHeader:0,nameByHeader:!1,rowDelimiter:"\n",columnDelimiter:","}),t),this.config.nameByHeader&&(this.config.skipHeader=1)}return t.prototype.getFields=function(t,e){for(var i=(0,o.splitCsv)(t,this.config.columnDelimiter).map((function(t){return t.replace(/^"(.*)"$/s,"$1").replace(/""/g,'"')})),n={},r=0;r<i.length;r++)n[e?e[r]:r+1]=isNaN(Number(i[r]))?i[r]:parseFloat(i[r]);return n},t.prototype.getRows=function(t){return(0,o.splitCsv)(t,this.config.rowDelimiter)},t.prototype.toJsonArray=function(t){var e=this,i=this.getRows(t),n=this.config.names;if(this.config.skipHeader){var o=i.splice(0,this.config.skipHeader);this.config.nameByHeader&&(n=o[0].trim().split(this.config.columnDelimiter))}return i.map((function(t){return e.getFields(t,n)}))},t.prototype.serialize=function(t,e){var i=t[0]?Object.keys(t[0]).filter((function(t){return!t.startsWith("$")})).join(this.config.columnDelimiter)+this.config.rowDelimiter:"",n=this._serialize(t);return e?n:i+n},t.prototype._serialize=function(t){var e=this;return t.reduce((function(t,i){var n=Object.keys(i),o=n.reduce((function(t,o,r){var a,l;if(o.startsWith("$")||"items"===o)return t;var s=null!==(l=null===(a=i[o])||void 0===a?void 0:a.toString())&&void 0!==l?l:"";return t+(new RegExp("[".concat(e.config.columnDelimiter,'"\n]')).test(s)?'"'.concat(s.replace(/"/g,'""').replace(/\n/g,"\\n"),'"'):s)+(r===n.length-1||n[r+1].startsWith("$")?"":e.config.columnDelimiter)}),"");return i.items?"".concat(t).concat(t?"\n":"").concat(o).concat(e._serialize(i.items)):"".concat(t).concat(t?e.config.rowDelimiter:"").concat(o)}),"")},t}();e.CsvDriver=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyManager=void 0;var n=i(17),o=i(2);function r(t){for(var e=t.toLowerCase().match(/\w+/g),i=0,n="",o=0;o<e.length;o++){var r=e[o];"ctrl"===r?i+=4:"shift"===r?i+=2:"alt"===r?i+=1:n=r}return i+n}var a={Up:"arrowUp",Down:"arrowDown",Right:"arrowRight",Left:"arrowLeft",Esc:"escape",Spacebar:"space"},l=function(){function t(t){var e=this;this._keysStorage={},this._initHandler=function(t){var i;if(t.which>=48&&t.which<=57||t.which>=65&&t.which<=90)i=String.fromCharCode(t.which);else{var r=32===t.which?t.code:t.key;i=(0,o.isIE)()&&a[r]||r}var l=e._keysStorage[(t.ctrlKey||t.metaKey?4:0)+(t.shiftKey?2:0)+(t.altKey?1:0)+(i&&i.toLowerCase())];if(l)for(var s=0;s<l.length;s++){if(e._beforeCall&&!1===e._beforeCall(t,n.focusManager.getFocusId()))return;l[s].handler(t)}},t&&(this._beforeCall=t),document.addEventListener("keydown",this._initHandler)}return t.prototype.destructor=function(){document.removeEventListener("keydown",this._initHandler),this.removeHotKey()},t.prototype.addHotKey=function(t,e){var i=r(t);this._keysStorage[i]||(this._keysStorage[i]=[]),this._keysStorage[i].push({handler:e})},t.prototype.removeHotKey=function(t,e){var i=this;if(t)if(t&&e){var n=r(t),o=function(t){return t.toString().replace(/\n/g,"").replace(/\s/g,"")};this._keysStorage[n].forEach((function(t,r){o(t.handler)===o(e)&&(delete i._keysStorage[n][r],i._keysStorage[n]=i._keysStorage[n].filter((function(t){return t})))}))}else{var a=r(t);delete this._keysStorage[a]}else this._keysStorage={}},t.prototype.exist=function(t){var e=r(t);return!!this._keysStorage[e]},t.prototype.getKeyStorageLength=function(){return Object.keys(this._keysStorage).length},t}();e.KeyManager=l},function(t,e,i){"use strict";var n,o,r;Object.defineProperty(e,"__esModule",{value:!0}),e.MessageContainerPosition=e.Position=e.RealPosition=void 0,function(t){t.left="left",t.right="right",t.top="top",t.bottom="bottom",t.center="center"}(n||(e.RealPosition=n={})),function(t){t.right="right",t.bottom="bottom",t.center="center",t.left="left",t.top="top"}(o||(e.Position=o={})),function(t){t.topLeft="top-left",t.topRight="top-right",t.bottomLeft="bottom-left",t.bottomRight="bottom-right"}(r||(e.MessageContainerPosition=r={}))},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(28),e),o(i(100),e),o(i(29),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Layout=void 0;var r=i(29),a=i(40),l=i(1),s=function(t){function e(e,i){var n=t.call(this,e,i)||this;if(n._root=n.config.parent||n,n._all={},n._parseConfig(),n._progress=!1,n.config.activeTab&&(n.config.activeView=n.config.activeTab),n.config.views&&(n.config.activeView=n.config.activeView||n._cells[0].id,n._isViewLayout=!0),!i.parent){var o=(0,l.create)({render:function(){return n._root&&n.toVDOM()}},n);n.mount(e,o)}return n}return o(e,t),e.prototype.destructor=function(){if(this.unmount(),this.config){for(var t=0,e=this._cells;t<e.length;t++){var i=e[t];null==i||i.destructor()}this.config=this._cells=this._root=this._xLayout=this._isViewLayout=null,this._all={}}},e.prototype.toVDOM=function(){var e;if(this._isViewLayout){var i=[this.getCell(this.config.activeView).toVDOM()];return t.prototype.toVDOM.call(this,i)}var n=[];return this._inheritTypes(),null===(e=this._cells)||void 0===e||e.forEach((function(t){var e=t.toVDOM();Array.isArray(e)?n=n.concat(e):n.push(e)})),t.prototype.toVDOM.call(this,n)},e.prototype.removeCell=function(t){if(this.events.fire(r.LayoutEvents.beforeRemove,[t])){var e=this.config.parent||this;if(e===this){var i=this.getCell(t);if(i){var n=i.getParent();delete this._all[t],n._cells=n._cells.filter((function(e){return e.id!=t})),n.paint()}this.events.fire(r.LayoutEvents.afterRemove,[t])}else e.removeCell(t)}},e.prototype.getId=function(t){return t<0&&(t=this._cells.length+t),this._cells[t]?this._cells[t].id:void 0},e.prototype.getRefs=function(t){var e;return null===(e=this._root.getRootView().refs)||void 0===e?void 0:e[t]},e.prototype.getCell=function(t){var e;return null===(e=this._root)||void 0===e?void 0:e._all[t]},e.prototype.forEach=function(t,e,i){if(void 0===i&&(i=1/0),this._haveCells(e)&&!(i<1)){var n;n=e?this._root._all[e]._cells:this._root._cells;for(var o=0;o<n.length;o++){var r=n[o];t.call(this,r,o,n),this._haveCells(r.id)&&r.forEach(t,r.id,--i)}}},e.prototype.cell=function(t){return this.getCell(t)},e.prototype.progressShow=function(){this._progress=!0,this.paint()},e.prototype.progressHide=function(){this._progress=!1,this.paint()},e.prototype._addCell=function(t,e){if(void 0===e&&(e=-1),this.events.fire(r.LayoutEvents.beforeAdd,[t.id])){var i=this._createCell(t);e<0&&(e=this._cells.length+e+1),this._cells.splice(e,0,i),this.paint(),this.events.fire(r.LayoutEvents.afterAdd,[t.id])}},e.prototype._getCss=function(e){var i=this._xLayout?"dhx_layout-columns":"dhx_layout-rows",n=this.config.align?" "+i+"--"+this.config.align:"";if(e)return i+" dhx_layout-cell"+(this.config.align?" dhx_layout-cell--"+this.config.align:"");var o=this.config.parent?t.prototype._getCss.call(this):"dhx_widget dhx_layout",r=this.config.parent?"":" dhx_layout-cell";return o+(this.config.full?r:" "+i)+n},e.prototype._parseConfig=function(){var t=this,e=this.config,i=e.rows||e.cols||e.views||[];this._xLayout=!e.rows,this._cells=i.map((function(e){return t._createCell(e)}))},e.prototype._createCell=function(t){var i;return t.rows||t.cols||t.views?(t.parent=this._root,i=new e(this,t)):i=new a.Cell(this,t),this._root._all[i.id]=i,t.init&&t.init(i,t),i},e.prototype._haveCells=function(t){if(t){var e=this._root._all[t];return e._cells&&e._cells.length>0}return Object.keys(this._all).length>0},e.prototype._inheritTypes=function(t){var e=this;if(void 0===t&&(t=this._cells),Array.isArray(t))t.forEach((function(t){return e._inheritTypes(t)}));else{var i=null==t?void 0:t.config;if((null==i?void 0:i.rows)||(null==i?void 0:i.cols)){var n=t.getParent();!i.type&&n&&(n.config.type?i.type=n.config.type:this._inheritTypes(n))}}},e}(a.Cell);e.Layout=s},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LayoutEvents=void 0,function(t){t.beforeShow="beforeShow",t.afterShow="afterShow",t.beforeHide="beforeHide",t.afterHide="afterHide",t.beforeResizeStart="beforeResizeStart",t.resize="resize",t.afterResizeEnd="afterResizeEnd",t.beforeAdd="beforeAdd",t.afterAdd="afterAdd",t.beforeRemove="beforeRemove",t.afterRemove="afterRemove",t.beforeCollapse="beforeCollapse",t.afterCollapse="afterCollapse",t.beforeExpand="beforeExpand",t.afterExpand="afterExpand"}(n||(e.LayoutEvents=n={}))},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(103),e),o(i(43),e)},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ListEvents=void 0,function(t){t.click="click",t.doubleClick="doubleclick",t.focusChange="focuschange",t.beforeEditStart="beforeEditStart",t.afterEditStart="afterEditStart",t.beforeEditEnd="beforeEditEnd",t.afterEditEnd="afterEditEnd",t.itemRightClick="itemRightClick",t.itemMouseOver="itemMouseOver",t.contextmenu="contextmenu"}(n||(e.ListEvents=n={}))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={notFound:"Not Found",selectAll:"Select All",unselectAll:"Unselect All",selectedItems:"selected items",createItem:"Create"}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.DataCollection=void 0;var r=i(6),a=i(72),l=i(74),s=i(15),c=i(10),d=i(12),u=i(0),h=i(75),f=i(24),p=i(36),g=function(){function t(t,e){var i=this;this._filters={},this._sortingStates=[],this._changes={order:[]},this.config=t||{},this._group=new h.Group,this._sort=new l.Sort,this._loader=new a.Loader(this,this._changes),this.events=e||new r.EventSystem(this),this.events.on(d.DataEvents.dataRequest,(function(t,e){var n=i.dataProxy;n&&n.updateUrl&&(n.updateUrl(null,{from:t,limit:n.config.limit||e-t}),i.load(n))})),this.events.on(d.DataEvents.loadError,(function(t){setTimeout((function(){"string"!=typeof t?(0,c.dhxError)(t):(0,c.dhxWarning)(t)}),0)})),this._reset()}return t.prototype._reset=function(t){void 0===t&&(t={}),t.grouping||this.ungroup(),this._order=[],this._pull={},this._changes={order:[]},this._initFilterOrder=this._initSortOrder=null,this._meta=new WeakMap,this._loaded=!1},t.prototype.group=function(t,e){void 0===e&&(e={}),t||(0,c.dhxError)("The group method has mandatory arguments"),Array.isArray(t)||(0,c.dhxError)("The group method expects an array as an argument"),t.length||(0,c.dhxError)("The array with the group method values cannot be empty"),this.isGrouped()&&this.ungroup();var i=this._group.getGroupConfig(e);this.events.fire(d.DataEvents.beforeGroup,[i])&&(this._parse(this._group.group(t,(null==e?void 0:e.data)||this._order,e),d.DataDriver.json,!0),this.events.fire(d.DataEvents.afterGroup,[this._group.getGroupedFields(),i]))},t.prototype.ungroup=function(){if(this.isGrouped()){var t=this._group.getGroupedFields(),e=this._group.getGroupConfig();this.events.fire(d.DataEvents.beforeUnGroup,[t,e])&&(this._parse(this._group.ungroup(this._order)),this.events.fire(d.DataEvents.afterUnGroup,[t,e]))}},t.prototype.isGrouped=function(){return this._group.isGrouped()},t.prototype.add=function(t,e){var i,n=this;return i=Array.isArray(t)?t.map((function(i,o){return 0!==o&&e>=0&&(e+=1),n._add({newItem:(0,u.copy)(i),batch:t,index:e,order:o})})):this._add({newItem:(0,u.copy)(t),batch:[t],index:e}),this._reapplyFilters(),i},t.prototype.remove=function(t){var e=this;t instanceof Array?o([],t,!0).forEach((function(i,n){e._remove(i,t,n)})):(0,u.isId)(t)&&this._remove(t,[t])},t.prototype.removeAll=function(){this._reset(),this.events.fire(d.DataEvents.removeAll),this.events.fire(d.DataEvents.change)},t.prototype.exists=function(t){return!!this._pull[t]},t.prototype.getNearId=function(t){var e;if(!this._pull[t])return(null===(e=this._order[0])||void 0===e?void 0:e.id)||""},t.prototype.getItem=function(t){return this._pull[t]},t.prototype.update=function(t,e,i){var n=this.getItem(t);if(n){if((0,c.isEqualObj)(e,n))return;(0,u.isId)(e.id)&&t!==e.id?((0,c.dhxWarning)("this method doesn't allow changing the id"),(0,c.isDebug)()):(e.parent&&n.parent&&e.parent!==n.parent&&this.move(t,-1,this,e.parent),(0,u.extend)(this._pull[t],e,!1),this.config.update&&this.config.update(this._pull[t]),i||this._onChange("update",t,this._pull[t])),this._reapplyFilters()}else(0,c.dhxWarning)("item not found")},t.prototype.getIndex=function(t){return(0,u.isId)(t)&&(0,u.isDefined)(this._pull[t])?this._order.findIndex((function(e){return(null==e?void 0:e.id)==t})):-1},t.prototype.getId=function(t){if(this._order[t])return this._order[t].id},t.prototype.getLength=function(){return this._order.length},t.prototype.isDataLoaded=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this._order.length),(0,u.isNumeric)(t)&&(0,u.isNumeric)(e)?0===this._order.slice(t,e).filter((function(t){return t&&t.$empty})).length:(this._loaded||(this._loaded=!this.find((function(t){return t.$empty}))),!!this._loaded)},t.prototype.filter=function(t,e,i){var n,o;if((null==e?void 0:e.$restore)&&(t=this._normalizeFilters(t||this._filters)),!(null==e?void 0:e.add)&&(this._order=this._initFilterOrder||this._order,this._initFilterOrder=null,!(null==e?void 0:e.$restore)))for(var r in this._filters){var a=this._filters[r];(null===(n=a.config)||void 0===n?void 0:n.permanent)?this._applyFilters(a.rule):delete this._filters[r]}if(t&&!(null==e?void 0:e.$restore)&&(o=(null==e?void 0:e.id)||(0,u.uid)(),this._filters[o]={rule:t,config:e||{}}),t&&"function"!=typeof t)if((0,u.isDefined)(t.by))this._applyFilters(t);else for(var r in t)this._applyFilters(t[r]);else this._applyFilters(t);if(!i){var l=this._getPureFilters(this._filters);this.events.fire(d.DataEvents.filter,[(0,u.isEmptyObj)(l)?null:l])}return o},t.prototype.resetFilter=function(t,e){var i,n=t||{},o=n.id,r=n.permanent;if((0,u.isEmptyObj)(t))for(var a in this._filters)(null===(i=this._filters[a].config)||void 0===i?void 0:i.permanent)||delete this._filters[a];else r?this._filters={}:o&&delete this._filters[o];return this.filter(null,{$restore:!0},e),(0,u.isEmptyObj)(this._getPureFilters(this._filters))},t.prototype.getFilters=function(t){var e=this.getRawFilters(t),i=e?this._getPureFilters(e):{};return(0,u.isEmptyObj)(i)?null:i},t.prototype.getRawFilters=function(t){var e=this._filters;return(null==t?void 0:t.permanent)&&(e=Object.keys(e).reduce((function(t,i){var n;return(null===(n=e[i].config)||void 0===n?void 0:n.permanent)&&(t[i]=e[i]),t}),{})),(0,u.isEmptyObj)(e)?null:e},t.prototype.find=function(t){for(var e=this._initFilterOrder||this._order,i=0;i<e.length;i++){var n=(0,c.findByConf)(e[i],t,i,e);if(n)return n}return null},t.prototype.findAll=function(t){for(var e=this._initFilterOrder||this._order,i=[],n=0;n<e.length;n++){var o=(0,c.findByConf)(e[n],t,n,e);o&&i.push(o)}return i},t.prototype.sort=function(t,e,i){var r,a;if(void 0===i&&(i=!1),this.isDataLoaded()){if((null==e?void 0:e.smartSorting)&&(this._sorter=t),i||this._sortingStates.length&&!(null==e?void 0:e.smartSorting)&&((null===(r=this._sortingStates[0])||void 0===r?void 0:r.smartSorting)||(null==e?void 0:e.smartSorting))||(this._sortingStates=[n(n({},t),e)]),t){if(!i&&(this._initSortOrder=this._initSortOrder||o([],this._initFilterOrder||this._order,!0),!(null==e?void 0:e.smartSorting)&&(null===(a=this._sortingStates[0])||void 0===a?void 0:a.smartSorting))){var l=this._sortingStates.findIndex((function(e){return e.by==t.by}));-1!==l?this._sortingStates[l].dir=t.dir:this._sortingStates.push(t)}this._applySorters()}else this._initSortOrder&&(this._sortingStates=[],this._order=this._initSortOrder,this._sorter=this._initSortOrder=null,this._initFilterOrder&&(this._initFilterOrder=null,this.filter(null,{$restore:!0},!0)));i||this.events.fire(d.DataEvents.change,[void 0,"sort",t])}else(0,c.dhxWarning)("the method doesn't work with lazyLoad")},t.prototype.getSortingStates=function(){return this._sortingStates},t.prototype.copy=function(t,e,i,n){var o=this;return t instanceof Array?t.map((function(t,r){return o._copy(t,e,i,n,r)})):this._copy(t,e,i,n)},t.prototype.move=function(t,e,i,n,o){var r,a=this;if(t instanceof Array){var l=[];return t.forEach((function(t,o){(0,u.isId)(a._move(t,e,i,n,o))?l.push(t):(0,c.throwMoveWarning)(t,a.exists(t))})),l}return null!==(r=this._move(t,e,i,n,0,o))&&void 0!==r?r:(0,c.throwMoveWarning)(t,this.exists(t))},t.prototype.forEach=function(t){for(var e=0;e<this._order.length;e++)t.call(this,this._order[e],e,this._order)},t.prototype.load=function(t,e){return"string"==typeof t&&(this.dataProxy=t=new s.DataProxy(t)),"string"==typeof e&&(e=e.toLocaleLowerCase()),("xml"===e||"csv"===e||e instanceof p.XMLDriver||e instanceof f.CsvDriver)&&(t.config.responseType=t.config.responseType||"text"),this.dataProxy=t,this._loader.load(t,e)},t.prototype.parse=function(t,e){return this._parse(t,e)},t.prototype.$parse=function(t){var e=this.config.approximate;e&&(t=this._approximate(t,e.value,e.maxNum)),this._parse_data(t),this._reapplyFilters(),this.events.fire(d.DataEvents.change,[void 0,"load"]),this.events.fire(d.DataEvents.load)},t.prototype.save=function(t){"string"==typeof t&&(t=new s.DataProxy(t)),this._loader.save(t)},t.prototype.changeId=function(t,e,i){if(void 0===e&&(e=(0,u.uid)()),t!=e)if(this.exists(e))(0,c.dhxWarning)("item with ID ".concat(e," already exists"));else{var n=this.getItem(t);n?(n.id=e,(0,u.extend)(this._pull[t],n),this._pull[e]=this._pull[t],i||this._onChange("update",e,this._pull[e]),delete this._pull[t]):(0,c.dhxWarning)("item not found")}},t.prototype.isSaved=function(){return!this._changes.order.length},t.prototype.map=function(t){for(var e=[],i=0;i<this._order.length;i++)e.push(t.call(this,this._order[i],i,this._order));return e},t.prototype.mapRange=function(t,e,i){t<0&&(t=0),e>this._order.length-1&&(e=this._order.length-1);for(var n=this._order.slice(t,e+1),o=[],r=t;r<=e;r++)o.push(i.call(this,this._order[r],r,n));return o},t.prototype.reduce=function(t,e){for(var i=0;i<this._order.length;i++)e=t.call(this,e,this._order[i],i);return e},t.prototype.serialize=function(t){void 0===t&&(t=d.DataDriver.json);for(var e=[],i=function(t){var i=n({},o._order[t]);Object.keys(i).forEach((function(t){t.startsWith("$")&&delete i[t]})),(0,u.isDefined)(i.parent)||delete i.parent,e.push(i)},o=this,r=0;r<this._order.length;r++)i(r);var a=(0,c.toDataDriver)(t);if(a)return a.serialize(e)},t.prototype.getInitialData=function(){return this._initFilterOrder},t.prototype.setMeta=function(t,e,i){if(t){var n=this._meta.get(t);n||(n={},this._meta.set(t,n)),n[e]=i}},t.prototype.getMeta=function(t,e){var i=this._meta.get(t);return i?i[e]:null},t.prototype.getMetaMap=function(t){return this._meta.get(t)},t.prototype.setRange=function(t,e){this._range=e?[t,e]:null},t.prototype.getRawData=function(t,e,i,n){if(i=i||this._order,1===n)return i;if(this._range)if(t=this._range[0]+t,-1===e)e=this._range[1];else{var o=Math.abs(e-t);e=t+o>this._range[1]?this._range[1]:t+o}if(!e||0===t&&(-1===e||e===i.length))return i;if(t>=i.length)return[];(-1===e||e>i.length)&&(e=i.length);var r=i.slice(t,e);return 0!==r.filter((function(t){return t.$empty})).length&&this.events.fire(d.DataEvents.dataRequest,[t,e]),r},t.prototype._add=function(t){var e=t.newItem,i=t.index,n=t.order,o=void 0===n?0:n,r=t.batch;if(this.events.fire(d.DataEvents.beforeAdd,[e,r,o])){var a=this._addCore(e,i);return this._onChange("add",e.id,e),this.events.fire(d.DataEvents.afterAdd,[e,r,o]),a}},t.prototype._remove=function(t,e,i){var n=this;void 0===i&&(i=0);var o=this._pull[t];if(o){var r=e.map((function(t){return n._pull[t]}));this.events.fire(d.DataEvents.beforeRemove,[o,r,i])&&(this._removeCore(o.id),this._onChange("remove",t,o),this.events.fire(d.DataEvents.afterRemove,[o,r,i]))}},t.prototype._copy=function(e,i,o,r,a){if(!this.exists(e))return null;var l=(0,u.uid)();return a&&(i=-1===i?-1:i+a),o?o instanceof t||!r?o.exists(e)?(o.add(n(n({},(0,c.copyWithoutInner)(this.getItem(e))),{id:l}),i),l):(o.add((0,c.copyWithoutInner)(this.getItem(e)),i),e):void o.add((0,c.copyWithoutInner)(this.getItem(e)),i):(this.add(n(n({},(0,c.copyWithoutInner)(this.getItem(e))),{id:l}),i),l)},t.prototype._move=function(t,e,i,n,o,r){if(!this.exists(t))return null;if(o&&e<this.getIndex(t)&&(e=-1===e?-1:e+o),i&&i!==this&&this.exists(t)){var a=(0,u.copy)(this.getItem(t),!0);return r&&(a.id=r),(!r&&i.exists(t)||i.exists(r))&&(a.id=(0,u.uid)()),n&&(a.parent=n),i.add(a,e),this.remove(t),a.id}if(this.getIndex(t)===e)return null;var l=this._order.splice(this.getIndex(t),1)[0];return-1===e&&(e=this._order.length),this._order.splice(e,0,l),this.events.fire(d.DataEvents.change,[t,"update",this.getItem(t)]),t},t.prototype._addCore=function(t,e){var i;return this.config.init&&(t=this.config.init(t)),t.id=null!==(i=t.id)&&void 0!==i?i:(0,u.uid)(),this._pull[t.id]&&(0,c.dhxError)("Item ".concat(t.id," already exist")),this._initFilterOrder&&!(0,c.isTreeCollection)(this)&&this._addToOrder(this._initFilterOrder,t,e),this._initSortOrder&&this._addToOrder(this._initSortOrder,t,e),this._addToOrder(this._order,t,e),t.id},t.prototype._removeCore=function(t){this._pull[t]&&(this._order=this._order.filter((function(e){return e.id!==t})),this._initFilterOrder&&this._initFilterOrder.length&&(this._initFilterOrder=this._initFilterOrder.filter((function(e){return e.id!==t}))),this._initSortOrder&&this._initSortOrder.length&&(this._initSortOrder=this._initSortOrder.filter((function(e){return e.id!==t}))),delete this._pull[t])},t.prototype._parse_data=function(t){for(var e=this._order.length,i=0,n=t;i<n.length;i++){var o=n[i];this._addCore(o,e++)}},t.prototype._approximate=function(t,e,i){for(var n=t.length,o=e.length,r=Math.floor(n/i),a=Array(Math.ceil(n/r)),l=0,s=0;s<n;s+=r){for(var c=(0,u.copy)(t[s]),d=Math.min(n,s+r),h=0;h<o;h++){for(var f=0,p=s;p<d;p++)f+=t[p][e[h]];c[e[h]]=f/(d-s)}a[l++]=c}return a},t.prototype._onChange=function(t,e,i){for(var o=0,r=0,a=this._changes.order;r<a.length;r++){var l=a[r],s=this._changes.order.indexOf(l);if(l.id===e&&!l.saving&&(o+=1,s===this._changes.order.length-1||this._changes.order[s+1].id!==e)){if(l.error&&(l.error=!1),l=n(n({},l),{obj:i,status:t}),(o+=1)>10?this._changes.order.splice(s,o-10,l):this._changes.order.splice(s+1,0,l),this._loader.updateChanges(this._changes),"remove"===t&&i.$emptyRow)return;return void this.events.fire(d.DataEvents.change,[e,t,i])}}this._changes.order.push({id:e,status:t,obj:n({},i),saving:!1}),this._loader.updateChanges(this._changes),this.events.fire(d.DataEvents.change,[e,t,i])},t.prototype._addToOrder=function(t,e,i){i>=0&&t[i]?(this._pull[e.id]=e,t.splice(i,0,e)):(this._pull[e.id]=e,t.push(e))},t.prototype._applySorters=function(){this._sortingStates.length>0&&(this._order=this._sort.sort(this._order,this._sortingStates),this._initFilterOrder&&this._initFilterOrder.length&&this._sort.sort(this._initFilterOrder,this._sortingStates))},t.prototype._applyFilters=function(t){if(t){if(!this._checkFilterRule(t))throw new Error("Invalid filter rule");var e="function"!=typeof t?this._getRuleCallback(t):t,i=this._order.filter((function(t){return e(t)}));this._initFilterOrder||(this._initFilterOrder=this._order),this._order=i}},t.prototype._reapplyFilters=function(){var t=this.getFilters({permanent:!0});t&&this.filter(t,{$restore:!0,add:!0},!0),this._sorter&&this._applySorters()},t.prototype._getRuleCallback=function(t){if((0,u.isDefined)(t.by)&&(0,u.isDefined)(t.match))return t.compare?function(e){return t.compare(e[t.by],t.match,e,t.multi)}:function(e){return e[t.by]==t.match}},t.prototype._getPureFilters=function(t){return Object.keys(t).reduce((function(e,i){var n;return(null===(n=t[i].config)||void 0===n?void 0:n.$local)||(e[i]=t[i]),e}),{})},t.prototype._normalizeFilters=function(t){var e=[];for(var i in t){var o=t[i].rule;if("function"!=typeof o)if((0,u.isDefined)(o.by))e.push(this._getRuleCallback(o));else for(var r in o)e.push(this._getRuleCallback(o[r]));else e.push(o)}return n({},e)},t.prototype._checkFilterRule=function(t){return"function"==typeof t||(0,u.isDefined)(t.by)&&(0,u.isDefined)(t.match)},t.prototype._parse=function(t,e,i){return void 0===e&&(e=d.DataDriver.json),void 0===i&&(i=!1),this._reset({grouping:i}),this._loader.parse(t,e)},t}();e.DataCollection=g},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.dataDriversPro=e.dataDrivers=void 0;var o=i(35),r=i(24),a=i(36);e.dataDrivers={json:o.JsonDriver,csv:r.CsvDriver},e.dataDriversPro=n(n({},e.dataDrivers),{xml:a.XMLDriver})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JsonDriver=void 0;var n=function(){function t(){}return t.prototype.toJsonArray=function(t){return this.getRows(t)},t.prototype.serialize=function(t){return t},t.prototype.getFields=function(t){return t},t.prototype.getRows=function(t){return"string"==typeof t?JSON.parse(t):t},t}();e.JsonDriver=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XMLDriver=void 0;var n=i(73);function o(t,e){e=e||{};var i=t.attributes;if(i&&i.length)for(var n=0;n<i.length;n++)e[i[n].name]=i[n].value;var r=t.childNodes;for(n=0;n<r.length;n++){var a=r[n];if(a.nodeType===a.ELEMENT_NODE){var l=a.tagName;e[l]?("function"!=typeof e[l].push&&(e[l]=[e[l]]),e[l].push(o(a,{}))):e[l]=o(a,{})}}return e}var r=function(){function t(){}return t.prototype.toJsonArray=function(t){return this.getRows(t)},t.prototype.toJsonObject=function(t){var e;return"string"==typeof t&&(e=this._fromString(t)),o(e)},t.prototype.serialize=function(t){return(0,n.jsonToXML)(t)},t.prototype.getFields=function(t){return t},t.prototype.getRows=function(t){if("string"==typeof t&&(t=this._fromString(t)),t){var e=t.childNodes&&t.childNodes[0]&&t.childNodes[0].childNodes;return e&&e.length?this._getRows(e):null}return[]},t.prototype._getRows=function(t){for(var e=[],i=0;i<t.length;i++)"item"===t[i].tagName&&e.push(this._nodeToJS(t[i]));return e},t.prototype._fromString=function(t){try{return(new DOMParser).parseFromString(t,"text/xml")}catch(t){return null}},t.prototype._nodeToJS=function(t){var e={};if(this._haveAttrs(t))for(var i=t.attributes,n=0;n<i.length;n++){var o=i[n],r=o.name,a=o.value;e[r]=this._toType(a)}if(t.nodeType===t.TEXT_NODE)return e.value=e.value||this._toType(t.textContent),e;var l=t.childNodes;if(l)for(n=0;n<l.length;n++){var s=l[n],c=s.tagName;c&&("items"===c&&s.childNodes?e[c]=this._getRows(s.childNodes):this._haveAttrs(s)?e[c]=this._nodeToJS(s):e[c]=this._toType(s.textContent))}return e},t.prototype._toType=function(t){return"false"===t||"true"===t?"true"===t:t},t.prototype._haveAttrs=function(t){return t.attributes&&t.attributes.length},t}();e.XMLDriver=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.methods=void 0;var n=i(0);e.methods={sum:function(t,e){return parseFloat(t.reduce((function(t,i){return t+(+i[e]||0)}),0).toFixed(12))},avg:function(t,e){return parseFloat((t.reduce((function(t,i){return t+(+i[e]||0)}),0)/t.length).toFixed(12))},count:function(t,e){return void 0===t&&(t=[]),t.filter((function(t){return(0,n.isDefined)(t[e])&&""!==t[e]})).length},min:function(t,e){return Math.min.apply(Math,t.map((function(t){return+t[e]})))},max:function(t,e){return Math.max.apply(Math,t.map((function(t){return+t[e]})))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={apply:"apply",reject:"reject"}},function(t,e,i){"use strict";function n(t){var e=document.activeElement;e.classList.contains("dhx_alert__apply-button")&&"Enter"===t.key||e.classList.contains("dhx_alert__confirm-reject")||e.classList.contains("dhx_alert__confirm-aply")||t.preventDefault()}Object.defineProperty(e,"__esModule",{value:!0}),e.blockScreen=void 0,e.blockScreen=function(t){var e=document.createElement("div");return e.className="dhx_alert__overlay "+(t||""),document.body.appendChild(e),document.addEventListener("keydown",n),function(){document.body.removeChild(e),document.removeEventListener("keydown",n)}}},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Cell=void 0;var a=i(0),l=i(1),s=i(11),c=i(29),d=i(99),u=i(6),h=i(28),f=function(t){function e(e,i){var n=t.call(this,e,i)||this;n._disabled=[];var o=e;return o&&o.isVisible&&(n._parent=o),n._parent&&n._parent.events?n.events=n._parent.events:n.events=new u.EventSystem(n),n.config.full=void 0===n.config.full?Boolean(n.config.header||n.config.collapsable||n.config.headerHeight||n.config.headerIcon||n.config.headerImage):n.config.full,n._afterWindowResized=n._resizedWindow.bind(n),n.id=n.config.id||(0,a.uid)(),n._initHandlers(),n._progress=!!n.config.progressDefault,n._stopProgressDefault=!1,n._isXDirection()&&!i.width&&(i.$autoWidth=!0),n._isXDirection()||i.height||(i.$autoHeight=!0),n}return o(e,t),e.prototype.paint=function(){var t;if(this.isVisible()){var e=this.getRootView();e?e.redraw():null===(t=this._parent)||void 0===t||t.paint()}},e.prototype.isVisible=function(){var t;if(!this._parent)return!(!this._container||!this._container.tagName)||Boolean(this.getRootNode());var e=null===(t=this._parent.config)||void 0===t?void 0:t.activeView;return(!e||e===this.id)&&(!this.config.hidden&&(!this._parent||this._parent.isVisible()))},e.prototype.hide=function(){this.events.fire(c.LayoutEvents.beforeHide,[this.id])&&(this.config.hidden=!0,this._resetCellsSize(),this._parent&&this._parent.paint&&this._parent.paint(),this.events.fire(c.LayoutEvents.afterHide,[this.id]))},e.prototype.show=function(){this.events.fire(c.LayoutEvents.beforeShow,[this.id])&&(this._parent&&this._parent.config&&void 0!==this._parent.config.activeView?this._parent.config.activeView=this.id:this.config.hidden=!1,this._parent&&!this._parent.isVisible()&&this._parent.show(),this.paint(),this.events.fire(c.LayoutEvents.afterShow,[this.id]))},e.prototype.expand=function(){this.events.fire(c.LayoutEvents.beforeExpand,[this.id])&&(this.config.collapsed=!1,this._checkNextSize()||this._checkNextSize(this._getAnyFlexCell()),this.events.fire(c.LayoutEvents.afterExpand,[this.id]),this.paint())},e.prototype.collapse=function(){this.events.fire(c.LayoutEvents.beforeCollapse,[this.id])&&(this.config.collapsed=!0,this._checkNextSize()||this._checkNextSize(this._getAnyFlexCell()),this.events.fire(c.LayoutEvents.afterCollapse,[this.id]),this.paint())},e.prototype.toggle=function(){this.config.collapsed?this.expand():this.collapse()},e.prototype._checkNextSize=function(t){var e=null!=t?t:this._getNextCell();return!!e&&(this._isXDirection()&&e.config.$autoWidth&&e.config.width?(e.config.width=void 0,!0):!this._isXDirection()&&e.config.$autoHeight&&e.config.height?(e.config.height=void 0,!0):!t&&e._checkNextSize())},e.prototype.getParent=function(){return this._parent},e.prototype.destructor=function(){var t;this.events&&this.events.clear(),window.removeEventListener("resize",this._afterWindowResized),this._ui&&this._ui.config&&"function"==typeof(null===(t=this._ui)||void 0===t?void 0:t.destructor)&&this._ui.destructor(),this.config=this.events=this.id=this._parent=this._handlers=this._uid=this._disabled=this._resizerHandlers=null,this.unmount()},e.prototype.getWidget=function(){return this._ui},e.prototype.getCellView=function(){return this._parent&&this._parent.getRefs(this._uid)},e.prototype.attach=function(t,e){return this.config.html=null,"object"==typeof t?this._ui=t:"string"==typeof t?this._ui=new window.dhx[t](null,e):"function"==typeof t&&(t.prototype instanceof s.View?this._ui=new t(null,e):this._ui={getRootView:function(){return t(e)}}),this.paint(),this._ui},e.prototype.attachHTML=function(t){this.config.html=t,this.paint()},e.prototype.detach=function(){this._stopProgressDefault=!1,this._ui=this.config.html=null,this.paint()},e.prototype.progressShow=function(){this.config.progressDefault&&(this._stopProgressDefault=!1),this._progress=!0,this.paint()},e.prototype.progressHide=function(){this.config.progressDefault&&(this._stopProgressDefault=!0),this._progress=!1,this.paint()},e.prototype.isVisibleProgress=function(){return this._progress},e.prototype.toVDOM=function(t){var e,i,n;if(this._saveTheme(),null===this.config&&(this.config={}),!this.config.hidden){var o,s=this.config.$fieldset,c=this._calculateStyle(),d=(0,a.isDefined)(this.config.padding)?isNaN(Number(this.config.padding))?{padding:this.config.padding}:{padding:"".concat(this.config.padding,"px")}:"",u=this.config.full||this.config.html?c:r(r({},c),d),h=this._checkProgress()?this._getProgressBar():null;if(!this.config.html)if(this._ui){var f=this._ui.getRootView();f.render&&(f=(0,l.inject)(f)),o=[f]}else o=t||null;var p=this.config.resizable&&!this._isLastCell()&&this._getNextCell()&&!this.config.collapsed?(0,l.el)(".dhx_layout-resizer."+(this._isXDirection()?"dhx_layout-resizer--x":"dhx_layout-resizer--y"),r(r({},this._resizerHandlers),{_ref:"resizer_"+this._uid,tabindex:0}),[(0,l.el)("span.dhx_layout-resizer__icon",{class:"dxi "+(this._isXDirection()?"dxi-dots-vertical":"dxi-dots-horizontal")})]):null,g={};if(this.config.on)for(var v in this.config.on)g["on"+v]=this.config.on[v];var _="",m=this.config.cols||this.config.rows;if(this.config.type&&m)switch(this.config.type){case"line":_=" dhx_layout-line";break;case"wide":_=" dhx_layout-wide";break;case"space":_=" dhx_layout-space"}var y=s?(0,l.el)("fieldset.dhx_form-fieldset",{class:this.config.$disabled?" dhx_form-fieldset--disabled":"",style:d,disabled:this.config.$disabled},[(0,l.el)("legend.dhx_form-fieldset-legend",{class:"dhx_form-fieldset-legend--".concat(this.config.labelAlignment||"left")},this.config.label),(0,l.el)(".dhx_layout-cell-content",{class:this._getCss(!1)},[].concat(o))]):this.config.full?[(0,l.el)("div",{tabindex:this.config.collapsable?"0":"-1",role:this.config.collapsable?"button":null,"aria-label":this.config.collapsable?"click to ".concat(this.config.collapsed?"expand":"collapse"):null,class:"dhx_layout-cell-header"+(this._isXDirection()?" dhx_layout-cell-header--col":" dhx_layout-cell-header--row")+(this.config.collapsable?" dhx_layout-cell-header--collapseble":"")+(this.config.collapsed?" dhx_layout-cell-header--collapsed":"")+(((this.getParent()||{}).config||{}).isAccordion?" dhx_layout-cell-header--accordion":""),style:{height:this.config.headerHeight},onclick:this._handlers.toggle,onkeydown:this._handlers.enterCollapse},[this.config.headerIcon&&(0,l.el)("span.dhx_layout-cell-header__icon",{class:this.config.headerIcon}),this.config.headerImage&&(0,l.el)(".dhx_layout-cell-header__image-wrapper",[(0,l.el)("img",{src:this.config.headerImage,class:"dhx_layout-cell-header__image"})]),this.config.header&&(0,l.el)("h3.dhx_layout-cell-header__title",this.config.header),this.config.collapsable?(0,l.el)("div.dhx_layout-cell-header__collapse-icon",{class:this._getCollapseIcon()}):(0,l.el)("div.dhx_layout-cell-header__collapse-icon",{class:"dxi dxi-empty"})]),this.config.collapsed?null:(0,l.el)("div",{style:r(r({},d),{height:"calc(100% - ".concat(this.config.headerHeight||37,"px)")}),class:this._getCss(!0)+" dhx_layout-cell-content"+(this.config.type?_:"")},this.config.html?[(0,l.el)("div",{".innerHTML":this.config.html,class:"dhx_layout-cell dhx_layout-cell-inner_html"})]:o)]:!this.config.html||this.config.rows&&this.config.cols&&this.config.views?o:[this.config.collapsed?null:(0,l.el)(".dhx_layout-cell-content",{style:d},[(0,l.el)(".dhx_layout-cell-inner_html",{".innerHTML":this.config.html})])],b=(0,l.el)("div",r(r(((e={_key:this.config.id||this._uid,_ref:this._uid})["aria-label"]=this.config.id?"tab-content-"+this.config.id:null,e["data-cell-id"]=null!==(i=this.config.id)&&void 0!==i?i:null,e["data-dhx-theme"]=null!==(n=this._theme)&&void 0!==n?n:null,e),g),{class:this._getCss(!1)+(this.config.css?" "+this.config.css:"")+(this.config.collapsed?" dhx_layout-cell--collapsed":"")+(this.config.resizable?" dhx_layout-cell--resizable":"")+(this.config.type&&!this.config.full?_:""),style:s?c:u}),y||h?[].concat(y,h):null);return p?[].concat(b,p):b}},e.prototype._saveTheme=function(){var t,e=null===(t=this.getCellView())||void 0===t?void 0:t.el;e&&(this._theme=e.getAttribute("data-dhx-theme"))},e.prototype._getProgressBar=function(){return(0,l.el)("span",{class:"dhx_progress-bar"},[(0,l.sv)("svg",{viewBox:"25 25 50 50",class:"dhx_spinner"},[(0,l.sv)("circle",{cx:"50",cy:"50",r:"20",class:"path"})])])},e.prototype._getCss=function(t){return"dhx_layout-cell"},e.prototype._initHandlers=function(){var t=this;!this.getParent()||this.config.cols||this.config.rows||window.addEventListener("resize",this._afterWindowResized),this._handlers={enterCollapse:function(e){13===e.keyCode&&t._handlers.toggle()},collapse:function(){t.config.collapsable&&t.collapse()},expand:function(){t.config.collapsable&&t.expand()},toggle:function(){t.config.collapsable&&t.toggle()}};var e={left:null,top:null,isActive:!1,range:null,xLayout:null,nextCell:null,size:null,resizerLength:null,margin:null,collapsedSize:null},i=function(i,n){if(void 0===n&&(n={x:0,y:0}),e.isActive){var o=e.xLayout,r=i.targetTouches?i.targetTouches[0].clientX:i.clientX+n.x,a=i.targetTouches?i.targetTouches[0].clientY:i.clientY+n.y,l=o?r-e.range.min+window.pageXOffset:a-e.range.min+window.pageYOffset,s=o?"width":"height";l<0?l=e.resizerLength/2:l>e.size&&(l=e.size-e.resizerLength);var d=function(e){var i;return parseInt(null===(i=t.config[e])||void 0===i?void 0:i.toString())},u=d(o?"maxWidth":"maxHeight"),h=d(o?"minWidth":"minHeight");(!u||l<u)&&(!h||l>h)&&(t.config[s]=l-e.resizerLength/2+"px",e.nextCell.config[s]=e.size-l-e.resizerLength/2+"px",e.nextCell._getAnyFlexCell()&&(e.nextCell._getAnyFlexCell().config[s]=void 0),t.paint(),t.events.fire(c.LayoutEvents.resize,[t.id]))}},n=function(o){e.isActive=!1,document.body.classList.remove("dhx_no-select--resize"),o.targetTouches?(document.removeEventListener("touchend",n),document.removeEventListener("touchmove",i)):(document.removeEventListener("mouseup",n),document.removeEventListener("mousemove",i)),t.events.fire(c.LayoutEvents.afterResizeEnd,[t.id])},o=function(i){if(i.targetTouches&&i.preventDefault(),3!==i.which&&(e.isActive&&n(i),t.events.fire(c.LayoutEvents.beforeResizeStart,[t.id]))){document.body.classList.add("dhx_no-select--resize");var o=t.getCellView(),r=t._getNextCell(),a=r.getCellView(),l=t._getResizerView(),s=o.el.getBoundingClientRect(),u=l.el.getBoundingClientRect(),h=a.el.getBoundingClientRect();e.xLayout=t._isXDirection(),e.left=s.left+window.pageXOffset,e.top=s.top+window.pageYOffset,e.collapsedSize=t._getCollapsedSize(t,r),e.margin=(0,d.getMarginSize)(t.getParent().config),e.range=(0,d.getBlockRange)(s,h,e.xLayout),e.size=e.range.max-e.range.min-e.margin-e.collapsedSize,e.isActive=!0,e.nextCell=r,e.resizerLength=e.xLayout?u.width:u.height}};this._resizerHandlers={onmousedown:function(t){o(t),document.addEventListener("mouseup",n),document.addEventListener("mousemove",i)},ontouchstart:function(t){o(t),document.addEventListener("touchend",n),document.addEventListener("touchmove",i)},ondragstart:function(t){return t.preventDefault()}}},e.prototype._getCollapsedSize=function(t,e){var i=0,n=this._parent,o=n._cells.indexOf(t),r=n._cells.indexOf(e);if(r-o==1)return i;for(var a=o+1;a<r;a++)n._cells[a].config.collapsed&&(this._isXDirection()?i+=45:i+=Number(n._cells[a].config.headerHeight)||37);return i},e.prototype._getCollapseIcon=function(){return this._isXDirection()&&this.config.collapsed?"dxi dxi-chevron-right":this._isXDirection()&&!this.config.collapsed?"dxi dxi-chevron-left":!this._isXDirection()&&this.config.collapsed?"dxi dxi-chevron-up":this._isXDirection()||this.config.collapsed?void 0:"dxi dxi-chevron-down"},e.prototype._isLastCell=function(){var t=this._parent;return!t||t._cells.indexOf(this)===t._cells.length-1},e.prototype._getNextCell=function(){if(!this._isLastCell()){var t=this._parent,e=t._cells.indexOf(this),i=t._cells[e+1];return i.config.hidden||i.config.collapsed?i._getNextCell():i}},e.prototype._getAnyFlexCell=function(t){var e,i=this;void 0===t&&(t=!1);var n=this._parent,o=this._isXDirection()?"$autoWidth":"$autoHeight",r=null===(e=null==n?void 0:n._cells)||void 0===e?void 0:e.filter((function(e){return!0===e.config[o]&&(!!t||e.id!==i.id)}));return!!(null==r?void 0:r.length)&&r[r.length-1]},e.prototype._getResizerView=function(){return this._parent.getRefs("resizer_"+this._uid)},e.prototype._isXDirection=function(){return this._parent&&this._parent._xLayout},e.prototype._checkProgress=function(){return this instanceof h.Layout?this.isVisibleProgress():(this._calculateProgressState(),(this._progress||this._checkAutoProgress())&&!this.config.collapsed&&!this.config.hidden&&!this._parent.isVisibleProgress())},e.prototype._checkAutoProgress=function(){if(this._stopProgressDefault)return!1;var t=this.config,e=t.html;return t.progressDefault&&!this._ui&&!e},e.prototype._calculateProgressState=function(){if(!this._stopProgressDefault){var t=this.config,e=t.html,i=t.progressDefault;!i||this._ui||e||(this._progress=!0),i&&(this._ui||e)&&(this._progress=!1)}},e.prototype._calculateStyle=function(){var t=this.config;if(t){var e={},i=!1,n=!1;isNaN(Number(t.width))||(t.width=t.width+"px"),isNaN(Number(t.height))||(t.height=t.height+"px"),isNaN(Number(t.minWidth))||(t.minWidth=t.minWidth+"px"),isNaN(Number(t.minHeight))||(t.minHeight=t.minHeight+"px"),isNaN(Number(t.maxWidth))||(t.maxWidth=t.maxWidth+"px"),isNaN(Number(t.maxHeight))||(t.maxHeight=t.maxHeight+"px"),"content"===t.width&&(i=!0),"content"===t.height&&(n=!0);var o=t,r=o.width,a=o.height,l=o.cols,s=o.rows,c=o.minWidth,d=o.minHeight,u=o.maxWidth,h=o.maxHeight,f=o.gravity,p=o.collapsed,g=o.$fixed,v=-1===Math.sign(f)?0:f;"boolean"==typeof f&&(v=f?1:0);var _="boolean"==typeof f?!f:-1===Math.sign(f);this._isXDirection()?(g||r||void 0===f&&(c||u))&&(_=!0):(g||a||void 0===f&&(d||h))&&(_=!0);var m=this._checkFullSizeCell(),y=_&&!m?0:m?1:v||1,b=this._isXDirection()?"x":"y";if(void 0===c||p||(e.minWidth=c),void 0===d||p||(e.minHeight=d),void 0!==u&&(e.maxWidth=u),void 0!==h&&(e.maxHeight=h),void 0===this._parent&&void 0!==!b&&(b=!0),m||void 0===r||"content"===r){if(!0===b)e.width="100%";else if("x"===b)if(i)e.flex="0 0 auto";else{var x=this._isXDirection()?"1px":"auto";e.flex="".concat(y," ").concat(l||s?"0 ".concat(x):"1 auto")}}else e.width=r;if(m||void 0===a||"content"===a){if(!0===b)e.height="100%";else if("y"===b)if(n)e.flex="0 0 auto";else{x=this._isXDirection()?"auto":"1px";e.flex="".concat(y," ").concat(l||s?"0 ".concat(x):"1 auto")}}else e.height=a;return!0===b&&void 0===t.width&&void 0===t.height&&(e.flex="".concat(y," 1 auto")),p&&(this._isXDirection()?e.width="auto":e.height="auto",e.flex="0 0 auto"),e}},e.prototype._resizedWindow=function(){var t;if(void 0===this._isLastFlexCell?this._isLastFlexCell=(null===(t=this._getAnyFlexCell(!0))||void 0===t?void 0:t.id)===this.id:this._isLastFlexCell||window.removeEventListener("resize",this._afterWindowResized),this._isLastFlexCell){var e=this._isXDirection()?"width":"height";this.config[e]=void 0,this.paint()}},e.prototype._resetCellsSize=function(){var t=this,e=this._parent._cells.filter((function(e){return e!==t&&!e.config.hidden&&!e.config.collapsed})),i=this._isXDirection(),n=i?"$autoWidth":"$autoHeight",o=i?"width":"height";e.forEach((function(t){t.config[n]&&(t.config[o]=void 0)}))},e.prototype._checkFullSizeCell=function(){var t=this;if(!this._parent)return!1;var e=this._isXDirection()?"$autoWidth":"$autoHeight";if(!this.config[e])return!1;var i=this._parent._cells.filter((function(e){return e!==t&&!e.config.hidden}));return!!i.length&&i.every((function(t){return t.config.collapsed}))},e}(s.View);e.Cell=f},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ProCell=void 0;var a=i(0),l=i(1),s=i(42),c=function(t){function e(e,i){var n=t.call(this,e,i)||this;if(n.scrollView=new s.ScrollView((function(){return n._getFirstRootView()})),!e){var o=(0,l.create)({render:function(){return n.toVDOM()}},n);n.mount(e,o)}return n}return o(e,t),e.prototype._getFirstRootView=function(t){return void 0===t&&(t=this),t.getParent()&&t.getParent().getRootView()?t.getParent().getRootView():this._getFirstRootView(t.getParent())},e.prototype.toVDOM=function(t){var e,i,n;if(this._saveTheme(),null===this.config&&(this.config={}),!this.config.hidden){var o,s=this.config.$fieldset,c=this._calculateStyle(),d=(0,a.isDefined)(this.config.padding)?isNaN(Number(this.config.padding))?{padding:this.config.padding}:{padding:"".concat(this.config.padding,"px")}:"",u=this.config.full||this.config.html?c:r(r({},c),d),h=this._checkProgress()?this._getProgressBar():null;if(!this.config.html)if(this._ui){var f=this._ui.getRootView();f.render&&(f=(0,l.inject)(f)),o=f?[this.scrollView.render(f)]:f||null}else o=t?this.scrollView.render([t]):t||null;var p=this.config.resizable&&!this._isLastCell()&&this._getNextCell()&&!this.config.collapsed?(0,l.el)(".dhx_layout-resizer."+(this._isXDirection()?"dhx_layout-resizer--x":"dhx_layout-resizer--y"),r(r({},this._resizerHandlers),{_ref:"resizer_"+this._uid}),[(0,l.el)("span.dhx_layout-resizer__icon",{class:"dxi "+(this._isXDirection()?"dxi-dots-vertical":"dxi-dots-horizontal")})]):null,g={};if(this.config.on)for(var v in this.config.on)g["on"+v]=this.config.on[v];var _="",m=this.config.cols||this.config.rows;if(this.config.type&&m)switch(this.config.type){case"line":_=" dhx_layout-line";break;case"wide":_=" dhx_layout-wide";break;case"space":_=" dhx_layout-space"}var y=(0,l.el)(".dhx_layout-cell-content",{_key:"".concat(this._uid,"_html"),style:d},[(0,l.el)(".dhx_layout-cell-inner_html",{".innerHTML":this.config.html})]),b=s?(0,l.el)("fieldset.dhx_form-fieldset",{class:this.config.$disabled?" dhx_form-fieldset--disabled":"",style:d,disabled:this.config.$disabled},[(0,l.el)("legend.dhx_form-fieldset-legend",{class:"dhx_form-fieldset-legend--".concat(this.config.labelAlignment||"left")},this.config.label),(0,l.el)(".dhx_layout-cell-content",{class:this._getCss(!1)},[].concat(o))]):this.config.full?[(0,l.el)("div",{tabindex:this.config.collapsable?"0":"-1",class:"dhx_layout-cell-header"+(this._isXDirection()?" dhx_layout-cell-header--col":" dhx_layout-cell-header--row")+(this.config.collapsable?" dhx_layout-cell-header--collapseble":"")+(this.config.collapsed?" dhx_layout-cell-header--collapsed":"")+(((this.getParent()||{}).config||{}).isAccordion?" dhx_layout-cell-header--accordion":""),style:{height:this.config.headerHeight},onclick:this._handlers.toggle,onkeydown:this._handlers.enterCollapse},[this.config.headerIcon&&(0,l.el)("span.dhx_layout-cell-header__icon",{class:this.config.headerIcon}),this.config.headerImage&&(0,l.el)(".dhx_layout-cell-header__image-wrapper",[(0,l.el)("img",{src:this.config.headerImage,class:"dhx_layout-cell-header__image"})]),this.config.header&&(0,l.el)("h3.dhx_layout-cell-header__title",this.config.header),this.config.collapsable?(0,l.el)("div.dhx_layout-cell-header__collapse-icon",{class:this._getCollapseIcon()}):(0,l.el)("div.dhx_layout-cell-header__collapse-icon",{class:"dxi dxi-empty"})]),this.config.collapsed?null:(0,l.el)("div",{style:r(r({},d),{height:"calc(100% - ".concat(this.config.headerHeight||37,"px)")}),class:this._getCss(!0)+" dhx_layout-cell-content"+(this.config.type?_:"")},this.config.html?[(0,l.el)("div",{".innerHTML":this.config.html,class:"dhx_layout-cell dhx_layout-cell-inner_html"})]:o)]:!this.config.html||this.config.rows&&this.config.cols&&this.config.views?o:[this.config.collapsed?null:this.scrollView&&this.scrollView.config.enable&&this.getParent()?this.scrollView.render([y],this._uid):y],x=(0,l.el)("div",r(r(((e={_key:this.config.id||this._uid,_ref:this._uid})["aria-label"]=this.config.id?"tab-content-"+this.config.id:null,e["data-cell-id"]=null!==(i=this.config.id)&&void 0!==i?i:null,e["data-dhx-theme"]=null!==(n=this._theme)&&void 0!==n?n:null,e),g),{class:this._getCss(!1)+(this.config.css?" "+this.config.css:"")+(this.config.collapsed?" dhx_layout-cell--collapsed":"")+(this.config.resizable?" dhx_layout-cell--resizable":"")+(this.config.type&&!this.config.full?_:""),style:s?c:u}),b||h?[].concat(b,h):null);return p?[].concat(x,p):x}},e}(i(40).Cell);e.ProCell=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollView=e.scrollViewConfig=void 0;var n=i(0),o=i(1),r=i(2);e.scrollViewConfig={enable:!1,autoHide:!0,timeout:1e3,scrollHandler:function(){}};var a=function(){function t(t,i){var o;void 0===i&&(i={});var a=this;this.config=(0,n.extend)({enable:e.scrollViewConfig.enable,autoHide:e.scrollViewConfig.autoHide,timeout:e.scrollViewConfig.timeout,scrollHandler:e.scrollViewConfig.scrollHandler},i),this._wheelName=(0,r.isIE)()?"onmousewheel":"onwheel",this._getRootView=t,this._scrollYTop=this._scrollXLeft=this._runnerYTop=this._runnerXLeft=this._runnerHeight=this._runnerWidth=0,this._visibleYArea=this._visibleXArea=1,this._scrollWidth=(0,r.getScrollbarWidth)(),this._scrollHeight=(0,r.getScrollbarHeight)(),this._handlers=((o={onscroll:function(t){a.config.scrollHandler(t),a.update()}})[this._wheelName]=function(t){var e=!!(0,r.locateNodeByClassName)(t.target,"y-scroll");t.preventDefault();var i=40*((t.deltaY||-t.wheelDelta)>0?1:-1),n=a._getRefs().area;if(e){var o=n.scrollHeight-a._runnerHeight,l=a._scrollYTop+i;n.scrollTop=l<0?0:l>o?o:l}else{var s=n.scrollWidth-a._runnerWidth,c=a._scrollXLeft+i;n.scrollLeft=c<0?0:c>s?s:c}a.update()},o.onmousedownRunner=function(t){t.preventDefault();var e=!!(0,r.locateNodeByClassName)(t.target,"y-scroll"),i=a._getRefs(),n=i.area,o=i.runnerY,l=i.runnerX,s=n.getBoundingClientRect(),c=s.top+window.pageYOffset,d=s.bottom+window.pageYOffset,u=n.scrollHeight-a._runnerHeight,h=t.pageY-o.getBoundingClientRect().top-window.pageYOffset,f=s.left+window.pageXOffset,p=s.right+window.pageXOffset,g=n.scrollWidth-a._runnerWidth,v=t.pageX-l.getBoundingClientRect().left-window.pageXOffset,_=function(t){if(e){var i=t.pageY-h;n.scrollTop=i<=c?0:i>d?u:(i-c)/a._visibleYArea}else{var o=t.pageX-v;n.scrollLeft=o<=f?0:o>p?g:(o-f)/a._visibleXArea}a.update()},m=function(){document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",m),document.body.classList.remove("dhx-no-select")};document.body.classList.add("dhx-no-select"),document.addEventListener("mousemove",_),document.addEventListener("mouseup",m)},o.onmousedownArea=function(t){if(!(0,r.locateNodeByClassName)(t,"scroll-runner")){t.preventDefault();var e=!!(0,r.locateNodeByClassName)(t.target,"y-scroll"),i=a._getRefs(),n=i.area,o=i.runnerY,l=i.runnerX;e?n.scrollTop+=(t.pageY-o.getBoundingClientRect().top)/a._visibleYArea:n.scrollLeft+=(t.pageX-l.getBoundingClientRect().left)/a._visibleXArea,a.update()}},o.onmouseenter=function(t){if(!(0,r.locateNodeByClassName)(t,"scroll-runner")){var e=a._getRefs();if(e){var i=!!(0,r.locateNodeByClassName)(t.target,"y-scroll"),n=e.areaX,o=e.areaY;i&&a._runnerHeight>0?o.style.background="#eee":!i&&a._runnerWidth>0&&(n.style.background="#eee")}}},o.onmouseleave=function(t){if(!(0,r.locateNodeByClassName)(t,"scroll-runner")){var e=a._getRefs();if(e){var i=!!(0,r.locateNodeByClassName)(t.target,"y-scroll"),n=e.areaX,o=e.areaY;i&&a._runnerHeight>0?o.style.background="transparent":!i&&a._runnerWidth>0&&(n.style.background="transparent")}}},o)}return t.prototype.enable=function(){this.config.enable=!0,this._getRootView().redraw()},t.prototype.disable=function(){this.config.enable=!1,this._getRootView().redraw()},t.prototype.render=function(t,e){var i,n,r=this;if(void 0===e&&(e=""),!this.config.enable||!t.length)return t;e&&(this._uid=e);var a=this.config.enable?[(0,o.el)(".y-scroll",(i={},i[this._wheelName]=this._handlers[this._wheelName],i._ref=e?"scroll-y-area-".concat(e):"scroll-y-area",i.onmousedown=this._handlers.onmousedownArea,i.onmouseenter=this._handlers.onmouseenter,i.onmouseleave=this._handlers.onmouseleave,i.style={width:"6px",height:"100%",right:0,top:0,position:"absolute"},i),[(0,o.el)(".scroll-runner",{_ref:e?"scroll-y-runner-".concat(e):"scroll-y-runner",onmousedown:this._handlers.onmousedownRunner,style:{height:this._runnerHeight+"px",top:this._runnerYTop}})]),(0,o.el)(".x-scroll",(n={},n[this._wheelName]=this._handlers[this._wheelName],n._ref=e?"scroll-x-area-".concat(e):"scroll-x-area",n.onmousedown=this._handlers.onmousedownArea,n.onmouseenter=this._handlers.onmouseenter,n.onmouseleave=this._handlers.onmouseleave,n.style={width:"100%",height:"6px",left:0,bottom:0,position:"absolute"},n),[(0,o.el)(".scroll-runner",{_ref:e?"scroll-x-runner-".concat(e):"scroll-x-runner",onmousedown:this._handlers.onmousedownRunner,style:{width:this._runnerWidth+"px",left:this._runnerXLeft}})])]:null;return(0,o.el)(".scroll-view-wrapper",[(0,o.el)(".scroll-view",{class:this._scrollWidth?"":"scroll-view--overlay",onscroll:this._handlers.onscroll,_ref:e?"scroll-view-".concat(e):"scroll-view",_hooks:{didInsert:function(){r.update()},didRecycle:function(){r.update()}},style:{width:"calc(100% + ".concat(this._scrollWidth,"px)"),height:"calc(100% + ".concat(this._scrollHeight,"px)"),"margin-bottom":"-".concat(this._scrollHeight,"px")}},t)].concat(a))},t.prototype.update=function(){var t=this._getRefs();if(t){var e=t.area,i=t.areaX,o=t.areaY,r=t.runnerY,a=t.runnerX;this._visibleYArea=e.clientHeight/e.scrollHeight,this._visibleXArea=e.clientWidth/e.scrollWidth,this._scrollYTop=e.scrollTop,this._scrollXLeft=e.scrollLeft,this._runnerYTop=this._scrollYTop*this._visibleYArea,this._runnerXLeft=this._scrollXLeft*this._visibleXArea,this._runnerHeight=this._visibleYArea<1?e.clientHeight*this._visibleYArea:0,this._runnerWidth=this._visibleXArea<1?e.clientWidth*this._visibleXArea:0;var l=r.style.top,s=a.style.left;r.style.opacity=1,r.style.top=this._runnerYTop+"px",r.style.height=this._runnerHeight+"px",a.style.opacity=1,a.style.left=this._runnerXLeft+"px",a.style.width=this._runnerWidth+"px",l!==r.style.top&&(o.style.opacity=.9,o.style.width="10px"),s!==a.style.left&&(i.style.opacity=.9,i.style.height="10px"),this.config.autoHide?!this._autoHideFunc&&(this._autoHideFunc=(0,n.debounce)((function(){r.style.opacity=0,o.style.width="6px",a.style.opacity=0,i.style.height="6px"}),this.config.timeout)):this._autoHideFunc=(0,n.debounce)((function(){o.style.width="6px",i.style.height="6px"}),this.config.timeout),this._autoHideFunc()}},t.prototype._getRefs=function(){var t=this._getRootView(),e=!(!t.refs["scroll-view"]||!t.refs["scroll-x-runner"]&&!t.refs["scroll-y-runner"]),i=!(!this._uid||!t.refs["scroll-view-".concat(this._uid)]||!t.refs["scroll-x-runner-".concat(this._uid)]&&!t.refs["scroll-y-runner-".concat(this._uid)]);if(t.refs){if(e)return{area:t.refs["scroll-view"].el,areaY:t.refs["scroll-y-area"].el,areaX:t.refs["scroll-x-area"].el,runnerY:t.refs["scroll-y-runner"].el,runnerX:t.refs["scroll-x-runner"].el};if(i)return{area:t.refs["scroll-view-".concat(this._uid)].el,areaY:t.refs["scroll-y-area-".concat(this._uid)].el,areaX:t.refs["scroll-x-area-".concat(this._uid)].el,runnerY:t.refs["scroll-y-runner-".concat(this._uid)].el,runnerX:t.refs["scroll-x-runner-".concat(this._uid)].el}}},t}();e.ScrollView=a},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.PopupEvents=void 0,function(t){t.beforeHide="beforeHide",t.beforeShow="beforeShow",t.afterHide="afterHide",t.afterShow="afterShow",t.click="click"}(n||(e.PopupEvents=n={}))},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SliderEvents=void 0,function(t){t.beforeChange="beforeChange",t.change="change",t.focus="focus",t.blur="blur",t.keydown="keydown",t.mousedown="mousedown",t.mouseup="mouseup"}(n||(e.SliderEvents=n={}))},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.TimepickerEvents=void 0,function(t){t.beforeChange="beforeChange",t.change="change",t.beforeApply="beforeApply",t.afterApply="afterApply",t.beforeClose="beforeClose",t.afterClose="afterClose",t.apply="apply",t.close="close",t.save="save"}(n||(e.TimepickerEvents=n={}))},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.CalendarEvents=void 0,function(t){t.change="change",t.beforeChange="beforechange",t.modeChange="modeChange",t.monthSelected="monthSelected",t.yearSelected="yearSelected",t.cancelClick="cancelClick",t.dateMouseOver="dateMouseOver",t.dateHover="dateHover"}(n||(e.CalendarEvents=n={}))},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(48),e),o(i(114),e),o(i(53),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Combobox=e.$template=void 0;var a=i(0),l=i(1),s=i(6),c=i(2),d=i(109),u=i(11),h=i(8),f=i(27),p=i(49),g=i(30),v=i(113),_=i(32),m=i(16),y=i(52),b=i(53);function x(t,e){return"function"==typeof e?e(t):t+" "+_.default.selectedItems}e.$template=function(t){return t.icon?(0,l.el)("div.dhx_combobox-options-wrapper",[(0,l.el)("span",{class:"".concat(t.icon," dhx_combobox-options__icon")}),(0,l.el)("span",{class:"dhx_combobox-options__value"},t.value)]):t.src?(0,l.el)("div.dhx_combobox-options-wrapper",[(0,l.el)("img",{class:"dhx_combobox-options__image",alt:t.value,src:t.src}),(0,l.el)("span",{class:"dhx_combobox-options__value"},t.value)]):(0,l.el)("span",{class:"dhx_combobox-options__value"},t.value)};var w=function(t){function i(e,i){var n=t.call(this,e,(0,a.extend)({listHeight:224,disabled:!1,readOnly:!1,newOptions:!1,htmlEnable:!0},i))||this;n.config.itemsCount=n.config.itemsCount||n.config.showItemsCount,n.config.helpMessage=n.config.helpMessage||n.config.help,n.config.cellHeight&&36===n.config.itemHeight&&(n.config.itemHeight=n.config.cellHeight),n.config.labelInline&&(n.config.labelPosition="left"),Array.isArray(n.config.data)?(n.events=new s.EventSystem(n),n.data=new h.DataCollection({}),n.data.parse(n.config.data)):n.config.data?(n.data=n.config.data,n.events=new s.EventSystem(n),n.events.context=n):(n.events=new s.EventSystem(n),n.data=new h.DataCollection({})),n.popup=new g.Popup,n.popup.events.on(g.PopupEvents.afterShow,(function(){n.paint()})),n.popup.events.on(g.PopupEvents.afterHide,(function(){n.config.multiselection&&(n._state.value=""),n.paint()})),n.popup.events.on(g.PopupEvents.beforeHide,(function(t){t&&n._hideOptions()})),(n.config.readonly||n.config.readOnly)&&(n.config.readOnly=n.config.readOnly||n.config.readonly,n._keyListener=new v.KeyListener),n._state={value:"",ignoreNext:!1,canDelete:!1,unselectActive:!1,currentState:b.ComboState.default,creatingState:!1},n._initHandlers(),n._createLayout(),n.config.value&&n.data.getLength()&&(n._setValue(n.config.value,!0),n.config.value=""),n._initEvents();var o=(0,l.create)({render:function(){return n._draw()},hooks:{didRedraw:function(){n.popup.isVisible()&&(n.focus(),n._configurePopup())}}});return n.mount(e,o),n}return o(i,t),i.prototype.focus=function(){if(this.config.disabled)return!1;this.getRootView().refs.input.el.focus()},i.prototype.blur=function(){if(this.config.disabled)return!1;this.getRootView().refs.input.el.blur(),this.popup.hide()},i.prototype.enable=function(){this.config.disabled=!1,this.paint()},i.prototype.disable=function(){this.config.disabled=!0,this.paint()},i.prototype.isDisabled=function(){return this.config.disabled},i.prototype.clear=function(){this.list.selection.remove(),this._state.value="",this._filter(),this.paint()},i.prototype.getValue=function(t){var e=this.list.selection.getId();return t?(0,a.wrapBox)(e):Array.isArray(e)?e.join(","):e},i.prototype.setValue=function(t,e){return this._setValue(t,e)},i.prototype.addOption=function(t,e){if(void 0===e&&(e=!0),t){var i;"string"==typeof t?i=this.data.add({value:t}):"object"==typeof t&&(i=this.data.add(t));var n=this.config.multiselection&&e?r(r([],this.list.selection.getId(),!0),[i],!1):i;this.setValue(n)}},i.prototype.destructor=function(){this.popup&&this.popup.destructor(),this.events&&this.events.clear(),this.list&&this.list.destructor(),this._helper&&this._helper.destructor(),this._layout&&this._layout.destructor(),this._keyListener&&this._keyListener.destructor(),this.config=this.events=this.list=this.popup=null,this._helper=this._keyListener=this._handlers=this._state=this._uid=this._isPopupConfiqureted=null,this.unmount()},i.prototype.setState=function(t){switch(t){case"success":this._state.currentState=b.ComboState.success;break;case"error":this._state.currentState=b.ComboState.error;break;default:this._state.currentState=b.ComboState.default}this.paint()},i.prototype._setValue=function(t,e){var i=this;if(void 0===e&&(e=!1),!this._exsistId(t))return!1;if(this._filter(),this.list.selection.remove(null,e),this.config.multiselection)"string"==typeof t&&(t=t.split(",")),"number"==typeof t&&(t=[t]),t.forEach((function(t){i.list.selection.add(t,!1,!1,e)}));else{var n=(0,a.unwrapBox)(t);this.list.selection.add(n,!1,!1,e);var o=this.data.getItem(n);o&&(this._state.value=this._getItemText(o))}this.paint()},i.prototype._createLayout=function(){var t=this.list=new p.List(null,{$template:e.$template,template:this.config.template,htmlEnable:this.config.htmlEnable,virtual:this.config.virtual,keyNavigation:!0,multiselection:this.config.multiselection,itemHeight:this.config.itemHeight,height:this.config.listHeight,data:this.data,eventHandlers:this.config.eventHandlers}),i=this._layout=new f.Layout(this.popup.getContainer(),{css:"dhx_combobox-options dhx_combobox__options",rows:[{id:"select-unselect-all",hidden:!this.config.multiselection||!this.config.selectAllButton},{id:"list",height:"content"},{id:"not-found",hidden:!0}],on:{click:{".dhx_combobox__action-select-all":this._handlers.selectAll,".dhx_combobox-options__action-create-option":this._handlers.addOption}}});i.getCell("list").attach(t),this.config.multiselection&&this.config.selectAllButton&&i.getCell("select-unselect-all").attach(y.selectAllView)},i.prototype._initHandlers=function(){var t=this;this.config.helpMessage&&(this._helper=new g.Popup({css:"dhx_tooltip dhx_tooltip--forced dhx_tooltip--light"}),this._helper.attachHTML(this.config.helpMessage)),this._handlers={addOption:function(){return t.addOption(t._state.value)},showHelper:function(e){e.preventDefault(),e.stopPropagation(),t._helper.show(e.target,{mode:"left"===t.config.labelPosition?"bottom":"right",theme:e.target})},selectAll:function(){t._state.unselectActive?(t.list.selection.remove(),t.config.selectAllButton&&(t._layout.getCell("select-unselect-all").attach(y.selectAllView),t._state.unselectActive=!1)):(t.data.filter(),t.list.selection.add(),t.config.selectAllButton&&(t._layout.getCell("select-unselect-all").attach(y.unselectAllView),t._state.unselectActive=!0)),t._changePopupPosition(),t.paint()},onkeydown:function(e){if("Tab"===e.key&&t.popup.isVisible())t._hideOptions();else if(t.popup.isVisible()||e.which!==d.KEY_CODES.DOWN_ARROW||t._showOptions(),t.popup.isVisible()&&(e.which===d.KEY_CODES.RIGHT_ARROW&&t.config.readOnly&&!t.config.multiselection&&(t.list.moveFocus(p.MOVE_DOWN),e.preventDefault()),e.which===d.KEY_CODES.LEFT_ARROW&&t.config.readOnly&&!t.config.multiselection&&(t.list.moveFocus(p.MOVE_UP),e.preventDefault()),e.which===d.KEY_CODES.DOWN_ARROW&&(t.list.moveFocus(p.MOVE_DOWN),e.preventDefault()),e.which===d.KEY_CODES.UP_ARROW&&(t.list.moveFocus(p.MOVE_UP),e.preventDefault()),e.which===d.KEY_CODES.ESC&&t._hideOptions(),e.which===d.KEY_CODES.ENTER)){if(t.data.getLength()){var i=t.list.getFocus(),n=t.config.multiselection?r(r([],t.list.selection.getId(),!0),[i],!1):i;t.setValue(n)}else t.config.newOptions&&t.addOption(t._state.value,!0);t.config.multiselection?t._updatePopup():t.data.getLength()&&t._hideOptions()}t.events.fire(b.ComboboxEvents.keydown,[e,t.list.getFocus()])},onkeyup:function(e){if(t.config.multiselection&&!t.config.itemsCount)if(t._state.ignoreNext)t._state.ignoreNext=!1;else if(e.which===d.KEY_CODES.BACKSPACE&&!t._state.value&&t.config.multiselection&&t.list.selection.getId().length){var i=t.list.selection.getId(),n=i[i.length-1];t.list.selection.remove(n),t._changePopupPosition(),t.paint()}},oninput:function(e){if(!t.config.disabled){var i=e.target.value;t.events.fire(b.ComboboxEvents.input,[i]),t._state.value=i,i.length?t._state.canDelete=!1:(t._state.ignoreNext=!0,t._state.canDelete=!0),t.config.multiselection||t.list.selection.remove(),t._filter(!0),t.popup.isVisible()||t._showOptions(),t._updatePopup()}},oninputclick:function(e){var i;if(!t.config.disabled){if(t.focus(),e.target.classList.contains("dhx_combobox__action-remove")){var n=null===(i=t.data.getItem((0,c.locate)(e)))||void 0===i?void 0:i.id;if(!(0,a.isId)(n))return;return t.list.selection.remove(n),t._changePopupPosition(),void t.paint()}if(e.target.classList.contains("dhx_combobox__action-clear-all"))return t.list.selection.getId().forEach((function(e){return t.list.selection.remove(e)})),t.config.selectAllButton&&t._state.unselectActive&&(t._layout.getCell("select-unselect-all").attach(y.selectAllView),t._state.unselectActive=!1),void t.paint();e.preventDefault(),t.popup.isVisible()?t.focus():t._showOptions()}},toggleIcon:function(){t.focus(),t.popup.isVisible()?t._hideOptions():t._showOptions()},onfocus:function(){var e;return null===(e=t.events)||void 0===e?void 0:e.fire(b.ComboboxEvents.focus,[])},onblur:function(){var e;return null===(e=t.events)||void 0===e?void 0:e.fire(b.ComboboxEvents.blur,[])}}},i.prototype._initEvents=function(){var t=this;this.data.events.on(h.DataEvents.load,(function(){t.config.value&&(t._setValue(t.config.value,!0),t.config.value=""),t.popup.isVisible()&&t._filter()})),this.data.events.on(h.DataEvents.removeAll,(function(){t._state.value="",t.paint()})),this.data.events.on(h.DataEvents.afterAdd,(function(){t.popup.isVisible()&&(t.config.multiselection?t._changePopupPosition():t._hideOptions())})),this.list.events.on(p.ListEvents.click,(function(){t.config.multiselection||t._hideOptions(),t._changePopupPosition()})),this.list.selection.events.on(m.SelectionEvents.beforeSelect,(function(e){var i=t.config.multiselection?r(r([],t.getValue(t.config.multiselection),!0),[e],!1):e;return t.events.fire(b.ComboboxEvents.beforeChange,[i])})),this.list.selection.events.on(m.SelectionEvents.afterSelect,(function(){var e=t.getValue(t.config.multiselection);t.events.fire(b.ComboboxEvents.change,[e]),t._updateSelectedItem(e)})),this.list.selection.events.on(m.SelectionEvents.beforeUnSelect,(function(e){var i=t.config.multiselection?t.getValue(t.config.multiselection).filter((function(t){return t!=e})):e;return t.events.fire(b.ComboboxEvents.beforeChange,[i])})),this.list.selection.events.on(m.SelectionEvents.afterUnSelect,(function(){var e=t.config.multiselection,i=t.getValue(e);t.events.fire(b.ComboboxEvents.change,[i]),e&&t._updateSelectedItem(i)})),this.popup.events.on(g.PopupEvents.beforeShow,(function(){if(!t.popup.isVisible()&&!t._isPopupConfiqureted)return t._configurePopup(),!1})),this.popup.events.on(g.PopupEvents.afterShow,(function(){var e;if((null===(e=t.list.scrollView)||void 0===e?void 0:e.config.enable)&&t.list.scrollView.update(),t.config.readOnly){if(t._state.value){var i=t.list.selection.getId();t.list.setFocus(i)}else t.list.resetFocus();t._keyListener.startNewListen((function(e){return t._findBest(e)}))}t.list.scrollTo(t.list.getFocus())}))},i.prototype._showOptions=function(){this.events.fire(b.ComboboxEvents.beforeOpen)&&(this._state.value.length&&(this._state.canDelete=!0),this._filter(),this._configurePopup()&&(this.events.fire(b.ComboboxEvents.open),this.events.fire(b.ComboboxEvents.afterOpen)))},i.prototype._configurePopup=function(){this._isPopupConfiqureted=!0;var t=this.getRootView();return!!(t&&t.refs&&t.refs.holder)&&(this.popup.isVisible()||this._updatePopup(),!0)},i.prototype._hideOptions=function(){var t=this;this.events.fire(b.ComboboxEvents.beforeClose)&&(this.config.readOnly&&this._keyListener.endListen(),this.config.multiselection||this.config.readOnly||this.list.selection.contains()||(this._state.value=""),(0,l.awaitRedraw)().then((function(){return t.popup.isVisible()&&t.popup.hide()})),this.events.fire(b.ComboboxEvents.afterClose),this.events.fire(b.ComboboxEvents.close),this.data.resetFilter(),this._filter(),this.paint())},i.prototype._filter=function(t){var e=this;if(void 0===t&&(t=!1),!this.config.readOnly){this.config.filter?this.data.filter((function(t){return e.config.filter(t,e._state.value)})):t&&this.data.filter((function(t){return(0,a.isExistValue)(e._getItemText(t)||"",e._state.value)}));var i=this.list.selection.getId();!i||this.config.multiselection?this.list.resetFocus():this.list.setFocus(i);var n=this._layout.getCell("list"),o=this._layout.getCell("not-found");if(0===this.data.getLength()){this.config.multiselection&&this.config.selectAllButton&&this._layout.getCell("select-unselect-all").hide(),n.hide(),this._state.creatingState=!0;var r=this.config.newOptions?this._state.value:"";o.height=(0,y.emptyListHeight)(r,this.getRootView().refs.holder.el.offsetWidth),o.attach(y.emptyListView,r),o.show()}else{if(this.config.multiselection&&this.config.selectAllButton&&this._layout.getCell("select-unselect-all").show(),!(this._state.value&&this.data.find((function(t){return t.value===e._state.value})))&&this._state.value)if(this._state.creatingState=this.config.newOptions,n.show(),this.config.newOptions){r=this._state.value;o.height=(0,y.emptyListHeight)(r,this.getRootView().refs.holder.el.offsetWidth),o.attach(y.emptyListView,r),o.show()}else o.hide();else this._state.creatingState=!1,o.isVisible()&&(n.show(),o.hide())}}},i.prototype._findBest=function(t){var e=this,i=this.data.find((function(i){return(0,a.isExistValue)(e._getItemText(i)||"",t)}));i&&this.list.selection.getId()!==i.id&&(this.list.setFocus(i.id),this.paint())},i.prototype._exsistId=function(t){var e=this;return t instanceof Array?t.every((function(t){return e.data.exists(t)})):this.data.exists(t)},i.prototype._draw=function(){var t;if(!this.config)return(0,l.el)("div");var i=this.config,n=i.multiselection,o=i.labelPosition,a=i.hiddenLabel,s=i.required,d=i.disabled,u=i.css,h=i.helpMessage,f=i.readOnly,p=i.placeholder,g=n?null:this.data.getItem(this.list.selection.getId()),v=!this.list.selection.getId()||"object"==typeof this.list.selection.getId()&&0===this.list.selection.getId().length,_=(0,c.getLabelStyle)(this.config),m=!this.config.multiselection&&(this.config.readOnly||!this.popup.isVisible()),y=m&&this.config.htmlEnable&&this.config.template,x=m&&((null==g?void 0:g.icon)||(null==g?void 0:g.src))&&!this.config.template;return(0,l.el)("div",{"data-dhx-widget-id":this._uid,onkeydown:this._handlers.onkeydown,onkeyup:this._handlers.onkeyup,class:"dhx_widget dhx_combobox"+("left"===o?" dhx_combobox--label-inline":"")+(a?" dhx_combobox--sr_only":"")+(s?" dhx_combobox--required":"")+(d?" dhx_combobox--disabled":"")+(u?" ".concat(u):"")},[_?(0,l.el)("label.dhx_label.dhx_combobox__label",{style:_.style,class:h?"dhx_label--with-help":"",onclick:this._handlers.oninputclick},h?[(_.label||s)&&(0,l.el)("span.dhx_label__holder",_.label),(0,l.el)("span.dhx_label-help.dxi.dxi-help-circle-outline",{tabindex:"0",role:"button",onclick:this._handlers.showHelper,id:"dhx_label__help_".concat(this._uid)})]:_.label):null,(0,l.el)("div.dhx_combobox-input-box"+(d?".dhx_combobox-input-box--disabled":"")+(f?".dhx_combobox-input-box--readonly":"")+(this._state.currentState===b.ComboState.error?".dhx_combobox-input-box--state_error":"")+(this._state.currentState===b.ComboState.success?".dhx_combobox-input-box--state_success":""),{_ref:"holder"},[(0,l.el)("div.dhx_combobox-input__icon",{onclick:this._handlers.toggleIcon},[(0,l.el)("span"+(this.popup.isVisible()?".dxi.dxi-menu-up":".dxi.dxi-menu-down"))]),(0,l.el)("div.dhx_combobox-input-list-wrapper",{onclick:this._handlers.oninputclick},[(0,l.el)("ul.dhx_combobox-input-list",r(r([],this._drawSelectedItems(),!0),[(0,l.el)("li.dhx_combobox-input-list__item.dhx_combobox-input-list__item--input",[(y||x)&&g?(0,l.el)("div.dhx_combobox-input__template",{".innerHTML":y?this.config.template(g):null},x?[(0,e.$template)(g)]:null):null,(0,l.el)("input.dhx_combobox-input",{oninput:this._handlers.oninput,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,_ref:"input",_key:this._uid,type:"text",placeHolder:v&&p?p:void 0,value:f&&g?this._getItemText(g):this._state.value,readOnly:f||d,required:s,role:"combobox","aria-label":f?"Select value":"Type or select value","aria-describedby":h?"dhx_label__help_".concat(this._uid):null,"aria-expanded":this.popup.isVisible().toString(),"aria-controls":null===(t=this.list.getRootView().node)||void 0===t?void 0:t.attrs.id})])],!1))])])])},i.prototype._drawSelectedItems=function(){var t=this;if(!this.config.multiselection)return[];if(this.config.itemsCount){var e=this.list.selection.getId().length;return e?[(0,l.el)("li.dhx_combobox-input-list__item.dhx_combobox-tag",[(0,l.el)("span.dhx_combobox-tag__value",x(e,this.config.itemsCount)),(0,l.el)("button.dhx_button.dhx_combobox-tag__action.dhx_combobox__action-clear-all",{"aria-label":"clear all"},[(0,l.el)("span.dhx_button__icon.dxi.dxi-close-circle")])])]:[]}return this.list.selection.getId().map((function(e){var i=t.data.getItem(e);if(!i)return null;var n=t._drawImageOrIcon(i);return(0,l.el)("li.dhx_combobox-input-list__item.dhx_combobox-tag",{"data-dhx-id":e},r(r([],n||!t.config.template?[n,(0,l.el)("span.dhx_combobox-tag__value",t._getItemText(i))]:[(0,l.el)("span.dhx_combobox-tag__template",{".innerHTML":t.config.template(i)})],!0),[(0,l.el)("button.dhx_button.dhx_button--icon.dhx_combobox-tag__action.dhx_combobox__action-remove",{type:"button","aria-label":"remove"},[(0,l.el)("span.dhx_button__icon.dxi.dxi-close-circle")])],!1))}))},i.prototype._drawImageOrIcon=function(t){return t.src?(0,l.el)("img.dhx_combobox-tag__image",{src:t.src,alt:""}):t.icon?(0,l.el)("span.dhx_combobox-tag__icon",{class:t.icon}):null},i.prototype._getItemText=function(t){return t?t.value:null},i.prototype._updateSelectedItem=function(t){var e;this.config.multiselection?(this.config.selectAllButton&&!this._state.unselectActive&&this.data.getLength()===t.length?(this._layout.getCell("select-unselect-all").attach(y.unselectAllView),this._state.unselectActive=!0):this.config.selectAllButton&&this._state.unselectActive&&(this._layout.getCell("select-unselect-all").attach(y.selectAllView),this._state.unselectActive=!1),this._state.value&&(this._state.value="",this._state.canDelete=0===t.length,this.data.resetFilter(),this._filter())):this._state.value=null!==(e=this._getItemText(this.data.getItem(t)))&&void 0!==e?e:"",this.paint()},i.prototype._changePopupPosition=function(){var t=this;this.config.multiselection&&(0,l.awaitRedraw)().then((function(){t._updatePopup()}))},i.prototype._updatePopup=function(){var t=this.popup.getContainer(),e=this.getRootView().refs.holder.el;t.style.width=e.offsetWidth+"px";var i=parseInt(this.config.listHeight);this.data.getLength()<=10&&(i=(0,l.getViewHeight)(this.list._renderList(),e.offsetWidth));var n=this._layout.getCell("select-unselect-all").isVisible()?33:0,o=this._state.creatingState?this._layout.getCell("not-found").height:0;t.style.height=i+n+o+"px",this.popup.show(e,{mode:"bottom",theme:this.getRootNode()})},i}(u.View);e.Combobox=w},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(50),e),o(i(112),e),o(i(51),e),o(i(31),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.List=e.MOVE_DOWN=e.MOVE_UP=void 0;var l=i(0),s=i(8),c=i(1),d=i(25),u=i(16),h=i(11),f=i(51),p=i(2),g=i(31),v=i(110);e.MOVE_UP=1,e.MOVE_DOWN=2;var _=function(t){function i(e,i){void 0===i&&(i={});var n=this,o=i.itemHeight||(i.virtual?37:null);o&&"number"==typeof o&&(o=o.toString()+"px"),(n=t.call(this,e,(0,l.extend)({itemHeight:o,keyNavigation:!0,editable:!1,selection:!0,htmlEnable:!0},i))||this)._destructed=!1,n._touch={duration:350,dblDuration:300,timer:null,start:!1,timeStamp:null};var r=n.config.data;r instanceof s.DataCollection?(n.data=r,n.events=r.events):(n.data=new s.DataCollection({}),n.events=n.data.events,r&&n.data.parse(r)),n.selection=new f.Selection({disabled:!n.config.selection,multiselection:n.config.multiselection},n.data,n.events),n.config.keyNavigation&&(n.keyManager=new d.KeyManager((function(t,e){return e==n._uid&&(!n._edited||n._edited&&"escape"!==t.key)})),n._initHotKey()),n.events.on(s.DataEvents.change,(function(t,e,i){"setPage"===e&&n.scrollTo(n.data.getId(i[0])),n.paint()})),n.events.on(s.DataEvents.filter,(function(){n.paint()})),n.events.on(u.SelectionEvents.afterUnSelect,(function(){return n.paint()})),n.events.on(u.SelectionEvents.afterSelect,(function(t){(0,l.isId)(t)&&n.config.selection&&n.setFocus(t),n.paint()})),n.events.on(g.ListEvents.afterEditEnd,n.editEnd.bind(n));var a=function(t){return function(e){n.data.setMeta(n.data.getItem(e.target),"drop",t),n.paint()}};n.events.on(s.DragEvents.canDrop,a(!0)),n.events.on(s.DragEvents.cancelDrop,a(!1));var h=function(t){return function(e){e.source.map((function(e){return n.data.setMeta(n.data.getItem(e),"drag",t)})),n.paint()}};n.events.on(s.DragEvents.dragStart,h(!0)),n.events.on(s.DragEvents.afterDrag,h(!1)),n._handlers={onmousedown:function(t){n._dragStart(t)},ontouchstart:function(t){(n._touch.timer=setTimeout((function(){n._dragStart(t)}),n._touch.duration),n._touch.timeStamp)?(n._touch.dblDuration>=n._touch.timeStamp-+t.timeStamp.toFixed()&&(t.preventDefault(),n._dblClick(t)),n._touch.timeStamp=null):n._touch.timeStamp=+t.timeStamp.toFixed();setTimeout((function(){n._touch.timeStamp=null}),n._touch.dblDuration)},ontouchmove:function(t){n._touch.start&&t.preventDefault(),n._clearTouchTimer()},ontouchend:function(){n._touch.start=!1,n._clearTouchTimer()},ondragstart:function(){return!(n.config.dragMode&&!n._edited)&&null},oncontextmenu:function(t){var e,i=null===(e=n.data.getItem((0,p.locate)(t)))||void 0===e?void 0:e.id;(0,l.isId)(i)&&n.events.fire(g.ListEvents.itemRightClick,[i,t])},onclick:function(t){var e,i=null===(e=n.data.getItem((0,p.locate)(t)))||void 0===e?void 0:e.id;(0,l.isId)(i)&&(n.selection.add(i,t.ctrlKey||t.metaKey,t.shiftKey),n.config.selection&&(n._focus=i),n.events.fire(g.ListEvents.click,[i,t]),n.paint())},ondblclick:function(t){n._dblClick(t)},onscroll:function(t){n.config.virtual&&(n._topOffset=t.target.scrollTop,n._visibleHeight=t.target.offsetHeight,n.paint())},onmouseover:function(t){var e,i=null===(e=n.data.getItem((0,p.locate)(t)))||void 0===e?void 0:e.id;(0,l.isId)(i)&&(i!==(0,p.locate)(t.relatedTarget)&&n.events.fire(g.ListEvents.itemMouseOver,[i,t]))}};var v=n.config.eventHandlers;if(v)for(var _=0,m=Object.entries(v);_<m.length;_++){var y=m[_],b=y[0],x=y[1];n._handlers[b]=(0,p.eventHandler)((function(t){return(0,p.locate)(t)}),x,n._handlers[b])}n.config.dragMode&&s.dragManager.setItem(n._uid,n),n._topOffset=n._visibleHeight=0;var w=(0,c.create)({render:function(){return n._destructed?(0,c.el)("div"):n._renderList()},hooks:{didMount:function(t){n.config.virtual&&(n._visibleHeight=t.node.el.offsetHeight)},didRedraw:function(t){return n._didRedraw(t)}}});return n.mount(e,w),n}return o(i,t),i.prototype._didRedraw=function(t){},i.prototype._dblClick=function(t){var e,i=(0,p.locate)(t);i&&(i=null===(e=this.data.getItem(i))||void 0===e?void 0:e.id,this.config.editable&&this.editItem(i),this.events.fire(g.ListEvents.doubleClick,[i,t]))},i.prototype._clearTouchTimer=function(){this._touch.timer&&(clearTimeout(this._touch.timer),this._touch.timer=null)},i.prototype._dragStart=function(t){var e=this;this._touch.start=!0;var i=[],n=(0,p.locateNode)(t,"data-dhx-id"),o=n&&n.getAttribute("data-dhx-id"),r=this.selection.getId();return this.config.multiselection&&r instanceof Array&&(r.map((function(t){t!==o&&e.getRootView().refs[t]&&i.push(e.getRootView().refs[t].el)})),r=a([],r,!0)),"string"==typeof r&&(r=[r]),this.config.dragMode&&!this._edited?s.dragManager.onMouseDown({event:t,type:"row",source:r||[o],itemsForGhost:i}):null},i.prototype.disableSelection=function(){this.selection.disable()},i.prototype.enableSelection=function(){this.selection.enable()},i.prototype.editItem=function(t){this._edited=t,this.data.getItem(this._edited)&&this.events.fire(g.ListEvents.beforeEditStart,[t])?(this.paint(),this.events.fire(g.ListEvents.afterEditStart,[t])):this._edited=null},i.prototype.editEnd=function(t,e){if(this._edited){if(null!==t){var i=this.data.getItem(e);this.data.update(e,r(r({},i),{value:t})),this._changed=!0}this._edited=null,this.paint()}},i.prototype.getFocusItem=function(){return this.data.getItem(this._focus)},i.prototype.setFocus=function(t){this._focus!=t&&this.data.exists(t)&&(this._focus=t,this.events.fire(g.ListEvents.focusChange,[this.data.getIndex(this._focus),this._focus]),this.scrollTo(t),this.paint())},i.prototype.resetFocus=function(){this._focus=void 0,this.events.fire(g.ListEvents.focusChange),this.scrollTo(this.data.getId(0)),this.paint()},i.prototype.getFocus=function(){return this._focus},i.prototype.destructor=function(){this._destructed=!0,this.events&&this.events.clear(),this.keyManager&&this.keyManager.destructor(),this.selection&&this.selection.destructor(),this.config=this.events=this.selection=this.keyManager=null,this._handlers=this._focus=this._edited=this._events=this._topOffset=this._visibleHeight=this._touch=null,this.unmount()},i.prototype.scrollTo=function(t){var e=this.getRootView();if(e&&e.node&&e.node.el&&void 0!==t){var i=this.getRootNode();this._scrollTo(t,i)}},i.prototype._scrollTo=function(t,e){if(e){var i=this.data.getIndex(t);if(-1!==i){var n=this.config.virtual,o=Math.floor(i/e.children.length)||0,r=e.children[i-e.children.length*o];if(n||r){var a=n?parseInt(this.config.itemHeight):r.clientHeight,l=n?i*a:r.offsetTop;l>=e.scrollTop+e.clientHeight-a?e.scrollTo(0,l-e.clientHeight+a):l<e.scrollTop&&e.scrollTo(0,l)}}}},i.prototype._renderItem=function(t,e){var i=function(t){t.class+=" dhx_list-item--empty"},n=this.config.itemHeight;if(t.$empty)return(0,c.el)("li",{class:"dhx_list-item",style:{height:n}});var o="";this.config.template&&(o=this.config.template(t)),t.html&&(o=t.html);var a=t.id==this._focus&&this.config.keyNavigation;if(t.id==this._edited)return(0,v.getEditor)(t,this).toHTML();var l=this.data.getMetaMap(t),s=r(r(r(r({},this._events),{class:"dhx_list-item"+(l&&l.selected?" dhx_list-item--selected":"")+(a?" dhx_list-item--focus":"")+(l&&l.drop&&!this._edited?" dhx_list-item--drophere":"")+(l&&l.drag&&!this._edited?" dhx_list-item--dragtarget":"")+(this.config.dragMode&&!this._edited?" dhx_list-item--drag":"")+(t.css?" "+t.css:""),"data-dhx-id":t.id,_ref:t.id.toString(),style:{height:n},_key:t.id}),this.getItemAriaAttrs(this,t)),{tabindex:a?0:-1});if(o)return o===t.html||this.config.htmlEnable?(s[".innerHTML"]=o,(0,c.el)("li",s)):(0,c.el)("li",s,o);if(this.config.$template)return t.value||i(s),(0,c.el)("li",s,[this.config.$template(t)]);var d=t.text||t.value;return d||i(s),this.config.htmlEnable?s[".innerHTML"]=d:s.class+=" dhx_list-item--text",this.config.htmlEnable?(0,c.el)("li",s):(0,c.el)("li",s,d)},i.prototype._renderList=function(){var t=this,e=this._getRange(),i=this.data.getRawData(e[0],e[1]).map((function(e,i){return t._renderItem(e,i)}));return this.config.virtual&&(i=a(a([(0,c.el)(".div",{style:{height:e[2]+"px",_key:"start-key"}})],i,!0),[(0,c.el)(".div",{style:{height:e[3]+"px",_key:"end-key"}})],!1)),(0,c.el)("ul.dhx_widget.dhx_list",r(r({style:{"max-height":this.config.height,position:"relative"},tabindex:0,id:this._uid,class:(this.config.css?this.config.css:"")+(this.config.multiselection&&this.selection.getItem()?" dhx_no-select--pointer":""),"data-dhx-widget-id":this._uid,"data-dhx-drop-area":"row"},this._handlers),this._getListAriaAttrs(this.config,this.data.getLength())),i)},i.prototype.moveFocus=function(t,i){var n=this.data.getLength();if(n){var o=this._focus,r=o?this.data.getIndex(o):-1;i=i||1,t===e.MOVE_DOWN?o=this.data.getId(Math.min(r+i,n-1)):t===e.MOVE_UP&&(o=this.data.getId(Math.max(r-i,0))),this.setFocus(o)}},i.prototype._getRange=function(){if(this.config.virtual){var t=this._visibleHeight||parseInt(this.config.height),e=parseInt(this.config.itemHeight)||37,i=this.data.getRawData(0,-1).length,n=i*e,o=this._topOffset;o=Math.max(0,Math.min(o,n-t));var r=Math.floor(o/e),a=Math.min(i-r,Math.floor(t/e)+5);return this._topOffset=o,[r,a+r,r*e,n-e*(a+r)]}return[0,-1,0,0]},i.prototype._getHotkeys=function(){var t=this;return{arrowDown:function(i){t.moveFocus(e.MOVE_DOWN),t._changed&&(t._changed=!1),i.preventDefault()},arrowUp:function(i){t.moveFocus(e.MOVE_UP),t._changed&&(t._changed=!1),i.preventDefault()},escape:function(){t.editEnd(null),t._changed&&(t._changed=!1)},enter:function(e){var i;if(t._changed)t._changed=!1;else{var n=t.selection.getItem(),o=n instanceof Array?null===(i=n[0])||void 0===i?void 0:i.id:null==n?void 0:n.id;t.config.editable&&!t._edited&&(n&&o===t._focus||!n)?t.editItem(t._focus):t.selection.add(t._focus),t.events.fire(g.ListEvents.click,[t._focus,e])}},"shift+enter":function(e){t.selection.add(t._focus,!1,!0),t.events.fire(g.ListEvents.click,[t._focus,e])},"ctrl+enter":function(e){t.selection.add(t._focus,!0,!1),t.events.fire(g.ListEvents.click,[t._focus,e])},"ctrl+a":function(e){t.config.multiselection&&(e.preventDefault(),t.selection.remove(),t.data.map((function(t){return t.id})).forEach((function(e){"ctrlClick"===t.config.multiselection?t.selection.add(e,!0):t.selection.add(e)})))}}},i.prototype._initHotKey=function(){var t=this._getHotkeys();for(var e in t)this.keyManager.addHotKey(e,t[e]);for(var e in this.config.hotkeys)this.keyManager.addHotKey(e,this.config.hotkeys[e])},i.prototype.getItemAriaAttrs=function(t,e){return r(r({role:"option","aria-selected":e.id===this._focus?"true":"false"},function(t,e){return t.config.dragMode&&!t._edited?{"aria-grabbed":Boolean(e.$dragtarget&&!t._edited).toString()}:{}}(t,e)),function(t){return t.config.editable?{"aria-roledescription":"".concat(t._edited?"Press Enter to stop editing":"Double click to edit content")}:{}}(t))},i.prototype._getListAriaAttrs=function(t,e){return{role:"listbox","aria-label":"Listbox ".concat(t.title||"",", count of options = ").concat(e,".").concat(t.editable?" Content is editable.":""),"aria-multiselectable":t.selection&&t.multiselection?"true":"false","aria-readonly":t.editable?"false":"true"}},i}(h.View);e.List=_},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;var n=i(16),o=i(8),r=i(0),a=function(){function t(t,e,i){var n=this;if(this.config=t,this.events=i,this._data=e,this._selected=[],this._data.events.on(o.DataEvents.removeAll,(function(){n._selected=[]})),"string"==typeof this.config.multiselection){["click","ctrlClick"].includes(this.config.multiselection)||(this.config.multiselection=!1)}this._data.events.on(o.DataEvents.beforeRemove,(function(t){if(n._nextSelection=null,1===n._selected.length){var e=n._data.getIndex(t.id),i=n._data.getLength();if(i>1){var o=i==e-1?e-1:e+1;n._nextSelection=n._data.getId(o)}}})),this._data.events.on(o.DataEvents.afterRemove,(function(t){var e=n._selected.indexOf(t.id);-1!==e&&n._selected.splice(e,1),(0,r.isId)(n._nextSelection)&&(n.add(n._nextSelection),n._nextSelection=null)}))}return t.prototype.enable=function(){this.config.disabled=!1},t.prototype.disable=function(){this.remove(),this.config.disabled=!0},t.prototype.getId=function(){return this.config.multiselection?this._selected:this._selected[0]},t.prototype.getItem=function(){var t=this;return this.config.multiselection?this._selected.map((function(e){return t._data.getItem(e)})):this._selected.length?this._data.getItem(this._selected[0]):null},t.prototype.contains=function(t){return(0,r.isId)(t)?this._selected.includes(t):this._selected.length>0},t.prototype.remove=function(t,e){var i=this;(0,r.isId)(t)?this._unselectItem(t,e):(this._selected.forEach((function(t){return i._unselectItem(t,e)})),this._selected=[])},t.prototype.add=function(t,e,i,n){var o=this;if(!this.config.disabled)if(void 0!==t){var r=this.config.multiselection;i&&this._selected.length&&r?this._addMulti(t,n):this._addSingle(t,r&&("ctrlClick"!==r||e),n)}else{var a=this._data.serialize().filter((function(t){var e=t.id;return!o._selected.includes(e)}));a.forEach((function(t){var e=t.id;o._addMulti(e,n)}))}},t.prototype.destructor=function(){var t=this;this._selected.forEach((function(e){return t._unselectItem(e,!0)}))},t.prototype._addMulti=function(t,e){var i,n=this._selected[this._selected.length-1],o=this._data.getIndex(n),r=this._data.getIndex(t);for(o>r&&(o=(i=[r,o])[0],r=i[1]);o<=r;o++){var a=this._data.getId(o);this._selectItem(a,e)}},t.prototype._addSingle=function(t,e,i){var n=this;e||this._selected.forEach((function(e){e!=t&&n._unselectItem(e)})),e&&this._selected.includes(t)?this._unselectItem(t,i):this._selectItem(t,i)},t.prototype._selectItem=function(t,e){var i=this._data.getItem(t);i&&!this._data.getMeta(i,"selected")&&(e||this.events.fire(n.SelectionEvents.beforeSelect,[t]))&&(this._selected.push(t),this._data.setMeta(i,"selected",!0),e||this.events.fire(n.SelectionEvents.afterSelect,[t]))},t.prototype._unselectItem=function(t,e){(e||this.events.fire(n.SelectionEvents.beforeUnSelect,[t]))&&(this._selected=this._selected.filter((function(e){return e!==t})),this._data.setMeta(this._data.getItem(t),"selected",!1),e||this.events.fire(n.SelectionEvents.afterUnSelect,[t]))},t}();e.Selection=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.emptyListHeight=e.emptyListView=e.unselectAllView=e.selectAllView=void 0;var n=i(1),o=i(32);e.selectAllView=function(){return(0,n.el)(".dhx_list-item.dhx_combobox-options__item.dhx_combobox-options__item--select-all.dhx_combobox__action-select-all",o.default.selectAll)},e.unselectAllView=function(){return(0,n.el)(".dhx_list-item.dhx_combobox-options__item.dhx_combobox-options__item--select-all.dhx_combobox__action-select-all",o.default.unselectAll)},e.emptyListView=function(t){return(0,n.el)("ul.dhx_list",[(0,n.el)("li.dhx_list-item.dhx_combobox-options__item".concat(t?".dhx_combobox-options__action-create-option":""),{},t?"".concat(o.default.createItem,' "').concat(t,'"'):o.default.notFound)])},e.emptyListHeight=function(t,e){var i=document.createElement("canvas").getContext("2d",{alpha:!1});i.font="normal 14px Roboto";var n=t?"".concat(o.default.createItem,' "').concat(t,'"'):o.default.notFound;return 13+20*Math.ceil(i.measureText(n).width/(e-16))}},function(t,e,i){"use strict";var n,o;Object.defineProperty(e,"__esModule",{value:!0}),e.ComboState=e.ComboboxEvents=void 0,function(t){t.beforeChange="beforeChange",t.change="change",t.focus="focus",t.blur="blur",t.keydown="keydown",t.input="input",t.beforeOpen="beforeOpen",t.afterOpen="afterOpen",t.beforeClose="beforeClose",t.afterClose="afterClose",t.open="open",t.close="close"}(n||(e.ComboboxEvents=n={})),function(t){t[t.default=0]="default",t[t.error=1]="error",t[t.success=2]="success"}(o||(e.ComboState=o={}))},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.getFixedCols=e.getFixedColsHeader=void 0;var r=i(1),a=i(3),l=i(19),s=i(55),c=i(5),d=i(7);e.getFixedColsHeader=function(t,e,i){if((i!==a.Split.left||"number"==typeof t.leftSplit&&t.fixedColumns.left.length)&&(i!==a.Split.right||"number"==typeof t.rightSplit&&t.fixedColumns.right.length)){var o=t.leftSplit,l=t.rightSplit,u=t.$positions,h=t.$totalWidth,f=t.$scrollBarWidth,p=i===a.Split.right,g=p?t.fixedColumns.right:t.fixedColumns.left,v=(0,c.getTotalWidth)(g),_=(0,s.getFixedRows)(n(n({},t),{currentColumns:g,$positions:n(n({},u),{xStart:0,xEnd:p?l:o}),scroll:{top:0,left:0},filteredColumns:g}),n(n({},e),{name:"header",position:"top",shifts:{x:0,y:0}}),i),m=n(n({},e),{name:"header",position:"top"});return(0,r.el)(".dhx_".concat(m.name,"-fixed-cols"),n({onwheel:c.scrollFixedColsAndRows,class:p?"dhx_grid__cols_right--fixed":"dhx_grid__cols_left--fixed",style:{position:"absolute",top:0,left:p?h<e.wrapper.width-f.y-d.BORDERS?h-v:e.wrapper.width-v-f.y-d.BORDERS:0,width:v,overflow:"hidden"}},{role:"rowgroup"}),_.body)}},e.getFixedCols=function(t,e,i,u){var h=i===a.Split.right,f=h?t.rightSplit:t.leftSplit,p=h?t.fixedColumns.right:t.fixedColumns.left;if("number"==typeof f&&p.length){var g=t.$totalWidth,v=t.$totalHeight,_=t.headerHeight,m=t.footerHeight,y=t.$positions,b=t.scroll,x=t.$scrollBarWidth,w=t.$footer,C=t.$footerHeight,S=t.fixedRows,E=h?"rightFixedCols":"leftFixedCols",D=(0,c.getTotalWidth)(p),O=v+_+m,k=e.gridBodyHeight,R=x.x,T=O;O>k?T=w?O-R:k:O>=k-R&&(T=w?k:k-R);var M=n(n({},t),{$positions:n(n({},y),{xStart:0,xEnd:f})}),I=(0,l.getCells)(n(n({},M),{filteredColumns:p,$renderFrom:E})),H=e.sticky,P=n(n({},e),{name:"footer",position:"bottom"}),F=(0,s.getRows)(n(n({},M),{currentColumns:p}),P),A=F.reduce((function(t,e){return t+e.attrs.style.height}),0),$=(0,s.getFixedSpans)(n(n({},t),{filteredColumns:p}),P,i),j=e.wrapper.width-x.y-d.BORDERS,L=h?g<j?g-D:j-D:0,N={position:"absolute",left:L,overflow:"hidden",top:(!e.footerAtBottom||u===a.Split.top)&&T<k?T-A:null,bottom:u!==a.Split.top&&e.footerAtBottom||T>=k?"".concat(H?e.footerAtBottom&&u===a.Split.bottom?-1:R:0,"px"):null},V=H&&w?(0,r.el)(".dhx_footer-fixed-cols",n({onwheel:c.scrollFixedColsAndRows,class:h?"dhx_grid__cols_right--fixed":"dhx_grid__cols_left--fixed",style:N},{role:"rowgroup"}),o(o([],F,!0),[(0,r.el)("span.dhx_span-spans",{class:"dhx_footer-spans",role:"presentation"},$)],!1)):null,W=T>=k?(H?k:k+_)-R:T;!u&&e.footerAtBottom&&(W-=(0,c.getTotalHeight)(S.bottom)+C);var z=(0,l.getSpans)(n(n({},t),{$renderFrom:E}),u||(h?a.Split.right:a.Split.left));return[(0,r.el)(".dhx_grid-fixed-cols-wrap",{style:{left:L,height:W,paddingTop:_,overflow:"hidden",width:D},role:"presentation","aria-label":"Fixed column","data-dhx-drop-area":"row"},[(0,r.el)(".dhx_grid-fixed-cols",n(n({onwheel:c.scrollFixedColsAndRows,class:h?"dhx_grid__cols_right--fixed":"dhx_grid__cols_left--fixed",style:{top:"".concat(-b.top+_-1,"px"),paddingTop:e.shifts.y,height:v,position:"absolute"},_flags:r.KEYED_LIST},(0,l.getHandlers)(y.yStart,y.xStart,t)),{role:"rowgroup"}),o(o([],I,!0),[z&&(0,r.el)("span.dhx_span-spans",{role:"presentation"},z)],!1)),(0,r.el)(".dhx_grid__cols-border--frozen",{role:"presentation",style:h?{left:0}:{right:0}})]),V]}}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.getFixedDataRows=e.getFixedRows=e.getFixedSpans=e.getRows=void 0;var r=i(1),a=i(14),l=i(5),s=i(3),c=i(19),d=i(54),u=i(0),h=i(7),f=i(4);function p(t,e,i,n,o){n&&(n.toLocaleLowerCase().includes("touch")?i._events.fire(n,[t,e,o]):i.events.fire(n,[t,e,o]))}function g(t,e,i,n){return{onclick:[p,n,t,i,s.GridEvents[e+"CellClick"]],onmouseover:[p,n,t,i,s.GridEvents[e+"CellMouseOver"]],onmousedown:[p,n,t,i,s.GridEvents[e+"CellMouseDown"]],ontouchstart:[p,n,t,i,s.GridEvents[e+"CellMouseDown"]],ondblclick:[p,n,t,i,s.GridEvents[e+"CellDblClick"]],oncontextmenu:[p,n,t,i,s.GridEvents[e+"CellRightClick"]],ontouchmove:[p,n,t,i,s.GridSystemEvents[e+"CellTouchMove"]],ontouchend:[p,n,t,i,s.GridSystemEvents[e+"CelltouchEnd"]]}}function v(t,e,i,n,o,a){void 0===o&&(o="");var l=e.type?"dhx_".concat(e.type,"-cell"):"dhx_string-cell",s=i.content[t.content]&&i.content[t.content].toHtml(e,i);return(0,r.el)(".".concat(l),{style:{class:o.trim(),padding:0}},[s])}function _(t,e){if(!t.data||!t.filteredColumns)return[];var i,o=e.name,a="header"===o?t.headerAutoHeight:t.footerAutoHeight,s=t.$positions,c=t.currentColumns,d=function(t,e){var i=t.map((function(t){return t[e]||[{}]}));return(0,l.transpose)(i)}(c,o),u=1;return d.map((function(p,_){var m=("header"===o?t.$headerHeightMap:t.$footerHeightMap)[_];return(0,r.el)(".dhx_".concat(o,"-row"),n({style:{height:m}},{role:"row","aria-rowindex":_+1}),p.map((function(p,y){var b,x=p.css||"",w=c[y],C=s.xStart+y+1,S=(0,l.isHtmlEnable)(t,w,p),E="dxi dxi-arrow-up dhx_grid-sort-icon",D="none",O=p.text;if("function"==typeof p.text){var k=n(n({},t.commonSummary),t.colSummary[w.id]);"string"==typeof w.summary&&"count"!==w.summary&&(k[w.summary]=(0,f.applyPattern)(k[w.summary],w)),O=p.text(k)}var R=t.sort.findIndex((function(t){return t.by==w.id})),T=t.sort[R];T&&!p.content&&(E+=" dhx_grid-sort-icon--".concat(T.dir),x+=" dhx_grid-".concat(o,"-cell--sorted "),D="asc"===T.dir?"ascending":"descending");var M=(0,l.isSortable)(t,w)&&p.text&&"footer"!==o&&!1!==p.headerSort;M&&(x+=" dhx_grid-header-cell--sortable");var I=0===y?"dhx_first-column-cell":"",H=y===c.length-1?"dhx_last-column-cell":"";p.content||(p.align?x+=" dhx_grid-header-cell--align_".concat(p.align," "):x+=" dhx_grid-header-cell--".concat("number"===w.type||"date"===w.type?"align_right":"align_left"," ")),x+="".concat(I," ").concat(H);var P=void 0!==w.resizable?w.resizable:t.resizable;if(P){var F=t.rightSplit&&t.$scrollBarWidth.xState&&t.fixedColumns.right.includes(w);P=(0,r.el)("div",{class:"dhx_resizer_grip_wrap","aria-hidden":"true"},[(0,r.el)("div",{class:"dhx_resizer_grip"+(F?" dhx_resizer_grip--left":" dhx_resizer_grip--right"),dhx_resized:w.id,style:{height:"".concat(100*d.length,"%")}},[(0,r.el)("div",{class:"dhx_resizer_grip_line"})])]);var A=w.header&&(null===(b=w.header[0])||void 0===b?void 0:b.colspan);A&&(i=A,u=1),i&&u!==i&&(0===_&&(P=null),u++),"footer"===o&&(P=null)}p.align&&(x+=" dhx_align-".concat(p.align)),e.footerAtBottom&&(x+=" dhx_grid-footer-at-bottom");var $=function(t,e,i){var n={"aria-colindex":e,tabindex:-1,"data-dhx-row-index":_};return"footer"===t||p.content?n.role="gridcell":(n.role="columnheader",n["aria-sort"]=i),n};if(p.content)return(0,r.el)(".dhx_grid-".concat(o,"-cell.dhx_grid-custom-content-cell"),n(n({class:x.trim(),"data-dhx-id":w.id,"data-dhx-text-id":p.id,_key:w.id,style:{width:w.$width,height:"footer"===o?m+h.BORDERS/2+"px":m+"px"}},g(w,o,t,p)),$(o,C,D)),[v(p,w,t,0,""),P||null]);var j="dhx_grid-header-cell-text_content";return a&&(j+=" dhx_grid-header-cell-text_content-auto-height"),(0,r.el)(".dhx_grid-".concat(o,"-cell"),n(n({class:x.trim(),"data-dhx-id":w.id,"data-dhx-text-id":p.id,_key:w.id,style:{width:w.$width,height:"footer"===o?m+h.BORDERS/2+"px":m+"px"}},g(w,o,t,p)),$(o,C,D)),[(0,r.el)("div.dhx_grid-header-cell-text",{role:"presentation"},[(0,r.el)("span",n(n({class:j},function(t,e){return M?{role:"button","aria-label":"Sort by ".concat(e)}:{}}(0,O)),{".innerHTML":S?O:null}),S?null:O),P||null]),M&&(0,r.el)("div.dhx_grid-sort",[(0,r.el)("div",{class:E,"aria-hidden":"true"}),T&&t.sort.length>1&&(0,r.el)("div.dhx_grid-sort-counter",{"aria-hidden":"true"},[R+1])||null])])})))}))}function m(t,e,i){var o=t.columns,c=t.filteredColumns,d=(0,l.transpose)(c.map((function(t){return t[e.name]||[]}))),p=e.name,_="header"===p?t.headerAutoHeight:t.footerAutoHeight,m="header"===p?t.$headerHeightMap:t.$footerHeightMap,y=0;return d.map((function(d,b){y=0;var x=m[b];return(0,r.el)(".dhx_span-row",{class:"dhx_header-row","aria-hidden":"true"},d.map((function(d,w){var C,S=c[w];if(i===s.Split.right&&0===w&&!(d.colspan>1)){var E=(0,l.transpose)(o.map((function(t){return t[e.name]||[]})));t:for(var D=0;D<E[b].length;D++){var O=E[b][D];if(O.colspan>1)for(var k=o.slice(D,D+O.colspan),R=0;R<k.length;R++)if(k[R].id===S.id){C={cell:O,col:o[D],widthBefore:(0,a.getWidth)(k,R,0),isLastCol:D+O.colspan>=o.length};break t}}}var T=(null==C?void 0:C.cell)||d,M=(null==C?void 0:C.col)||S,I=(0,l.isHtmlEnable)(t,S,d);y+=M.hidden?0:M.$width;var H=0===w?"dhx_first-column-cell":"",P=i?1:t.fixedColumns.right.length+1,F=d.colspan>1&&(0,a.getReducedColspan)(o,S.id,d.colspan),A=(null==C?void 0:C.isLastCol)||w===c.length-P||(F||1)+(w-1)>=c.length-P?"dhx_last-column-cell":"",$=x,j=x*b;if(T.rowspan>1){for(var L=T.rowspan-1;L>0;)$+=m[b+L],L--;$-=1}if(T.rowspan>1||T.colspan>1){j=0;for(D=b-1;D>=0;D--)j+=m[D]}var N=(0,l.isSortable)(t,M)&&T.rowspan>1&&T.text&&"footer"!==e.name&&!1!==T.headerSort,V="dxi dxi-arrow-up dhx_grid-sort-icon",W=t.sort.findIndex((function(t){return t.by==M.id})),z=t.sort[W];z&&!T.content&&(V+=" dhx_grid-sort-icon--".concat(z.dir));var B=M.align?"dhx_align-".concat(M.align):"number"!==M.type&&"percent"!==M.type&&"date"!==M.type||T.colspan>1?"dhx_align-left":"dhx_align-right",G="dhx_grid-".concat(p,"-cell ").concat(H," ").concat(A," ").concat(T.rowspan>1?"dhx_span-cell__rowspan":""," ").concat(T.align?"dhx_align-".concat(T.align):B," ").concat(T.css?T.css:"");!M.$target&&N&&(G+=" dhx_grid-header-cell--sortable"),T.content||(T.align?G+=" dhx_grid-header-cell--align_".concat(T.align," "):G+=" dhx_grid-header-cell--".concat("number"===M.type||"percent"===M.type||"date"===M.type?"align_right":"align_left"," ")),M.$target&&"header"===p&&(G+=" dhx_grid-header-drop-area--".concat(M.$target," ")),e.footerAtBottom&&(G+=" dhx_grid-footer-at-bottom");var Y=T.text;if("function"==typeof T.text){var U=n(n({},t.commonSummary),t.colSummary[S.id]);"string"==typeof S.summary&&"count"!==S.summary&&(U[S.summary]=(0,f.applyPattern)(U[S.summary],S)),Y=T.text(U)}var X=null;T.content&&((X=v(T,M,t,0,G)).attrs.style=n(n({},X.attrs.style),{width:"100%",borderRight:"0"}));var q="";y-M.$width>0&&(q="var(--dhx-border)");var K="dhx_grid-header-cell-text_content";_&&(K+=" dhx_grid-header-cell-text_content-auto-height");var Z=(0,r.el)("span",{class:K,".innerHTML":I?Y:null},I?null:Y);return T.colspan>1||T.rowspan>1?(0,r.el)(".dhx_span-cell",n({style:{width:(0,a.getWidth)(o,T.colspan,(0,u.findIndex)(o,(function(t){return t.id===M.id}))),height:$,left:y-M.$width-((null==C?void 0:C.widthBefore)||0),borderLeft:q,top:j},class:G.trim(),"data-dhx-id":M.id,"data-dhx-text-id":T.id,tabindex:-1,"data-dhx-row-index":b},g(M,p,t,T)),[X||T.rowspan>1?(0,r.el)("div.dhx_grid-header-cell-text",{role:"presentation"},[Z]):Z,N&&(0,r.el)("div.dhx_grid-sort",[(0,r.el)("div",{class:V,"aria-hidden":"true"}),z&&t.sort.length>1&&(0,r.el)("div.dhx_grid-sort-counter",{"aria-hidden":"true"},[W+1])||null]),i===s.Split.left&&F&&w+F>c.length||C?(0,r.el)(".dhx_grid__cols-border--frozen",{role:"presentation",style:{left:((null==C?void 0:C.widthBefore)||(0,a.getWidth)(c,c.length-w,w))-h.BORDERS/2-(w&&i===s.Split.left?1:0)}}):null]):null})).filter((function(t){return t})))}))}e.getRows=_,e.getFixedSpans=m,e.getFixedRows=function(t,e,i){var a,l=t.leftSplit,s=t.$totalWidth,c=_(t,e),d=m(t,e,i),u=null;if("footer"===e.name&&!e.sticky){var f=t.rightSplit,p=t.fixedColumns,g=function(i){void 0===i&&(i=!1);var o=i?p.right:p.left;return!i&&l>=0||i&&f>=0?_(n(n({},t),{currentColumns:o,$positions:n(n({},t.$positions),{xStart:0,xEnd:i?f:l})}),e):[]};u=o(o([],g(),!0),g(!0),!0)}var v,y=((a={position:"sticky"})[e.position]=0,a);e.sticky||(y.left=-t.scroll.left,v=-t.scroll.left,y.position="relative");var b=null;return"header"===e.name&&(b=t.dropManager?t.dropManager.toHTML({header:!0,mode:i}):null),(0,r.el)(".dhx_".concat(e.name,"-wrapper").concat(t.rightSplit?".dhx_grid__rows_right--fixed":""),{class:e.sticky?"":"dhx_compatible-".concat(e.name),style:n(n({},y),{left:e.sticky?v:0,height:"footer"===e.name?t[e.name+"Height"]+h.BORDERS/2:t[e.name+"Height"],width:e.sticky?s:e.wrapper.width-h.BORDERS}),role:"presentation","data-dhx-drop-area":"header"===e.name?"column":null},[(0,r.el)(".dhx_grid-".concat(e.name).concat(l?".dhx_grid_fixed_left":""),{style:{height:"footer"===e.name?t[e.name+"Height"]+h.BORDERS/2:t[e.name+"Height"],left:v,paddingLeft:e.shifts.x,width:s},role:"presentation"},[(0,r.el)(".dhx_".concat(e.name,"-rows"),n({},{role:"rowgroup"}),o([],c,!0)),(0,r.el)(".dhx_".concat(e.name,"-spans"),{style:{marginLeft:-e.shifts.x},class:"dhx_".concat(e.name,"-rows"),role:"presentation"},d),u&&(0,r.el)(".dhx_".concat(e.name,"-fixed-cols"),{style:{position:"absolute",top:0,left:t.scroll.left+"px",height:"100%"}},u)]),b,(0,r.el)("div",{style:{width:s},role:"presentation"})])},e.getFixedDataRows=function(t,e,i){if(!(i===s.Split.top&&"number"!=typeof t.topSplit||i===s.Split.bottom&&"number"!=typeof t.bottomSplit)){var a=t.$totalWidth,u=t.topSplit,p=t.bottomSplit,g=t.$positions,v=t.data,_=t.$totalHeight,m=t.$width,y=t.headerHeight,b=t.footerHeight,x=t.$scrollBarWidth,w=i===s.Split.bottom,C=w?t.fixedRows.bottom:t.fixedRows.top,S=w?"bottomFixedRows":"topFixedRows",E=(0,c.getCells)(n(n({},t),{data:C,$renderFrom:S,$positions:n(n({},g),{yStart:0,yEnd:w?p:u})})),D=C.reduce((function(t,e){return t+(0,f.getTotalRowHeight)(e)}),0),O=(0,c.getSpans)(n(n({},t),{$renderFrom:S,data:v}),w?s.Split.bottom:s.Split.top),k=(0,l.getTotalHeight)(t.fixedRows.bottom),R=function(o){return(0,d.getFixedCols)(n(n({},t),{headerHeight:0,data:C,$renderFrom:S,scroll:n(n({},t.scroll),{top:-1}),$positions:n(n({},g),{yStart:0,yEnd:w?p:u}),$totalHeight:D,$data:v}),n(n({},e),{shifts:n(n({},e.shifts),{y:0})}),o,i)||[]},T=o(o([],R(s.Split.left),!0),R(s.Split.right),!0),M={overflow:"hidden",width:a+x.y+h.BORDERS<m?a:m-x.y-h.BORDERS};return i===s.Split.bottom&&e.footerAtBottom?(M.top="unset",M.bottom=x.x||-1,M.height=b+D):(M.top=w?_+y+b<e.wrapper.height-x.x-h.BORDERS?_+y-k+h.BORDERS/2:e.wrapper.height-k-b-h.BORDERS/2-x.x:y,M.height=D>e.wrapper.height?e.wrapper.height:D),[(0,r.el)(".dhx_grid-fixed-data-rows-wrap",{class:w?"dhx_grid__rows_bottom--fixed":"",style:M},o(o([(0,r.el)(".dhx_grid-fixed-cols",n(n({onwheel:l.scrollFixedColsAndRows,style:{left:-t.scroll.left+"px",paddingLeft:e.shifts.x,position:"absolute",width:a},_flags:r.KEYED_LIST},(0,c.getHandlers)(0,g.xStart,t)),{role:"rowgroup"}),[(0,r.el)(".dhx_grid-fixed-rows",{class:t.rightSplit?"dhx_grid__rows_right--fixed":""},o(o([],E,!0),[O&&(0,r.el)(".dhx_span-spans",{role:"presentation"},O)],!1))])],T,!0),[t.bottomSplit?(0,r.el)(".dhx_grid__rows-border--frozen",{role:"presentation"}):null],!1))]}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={total:"Total",groupText:"Group",dropAreaTitle:"Group by:",dropAreaPlaceholder:"Drag the column header here"}},function(t,e,i){i(58),i(59),i(60),i(61),i(62),i(63),t.exports=i(67)},function(t,e){Object.values=Object.values?Object.values:function(t){var e=Object.prototype.toString.call(t);if(null==t)throw new TypeError("Cannot convert undefined or null to object");if(~["[object String]","[object Object]","[object Array]","[object Function]"].indexOf(e)){if(Object.keys)return Object.keys(t).map((function(e){return t[e]}));var i=[];for(var n in t)t.hasOwnProperty(n)&&i.push(t[n]);return i}return[]},Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t){"use strict";for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(null==t)throw new TypeError("Cannot convert first argument to object");for(var n=Object(t),o=0;o<e.length;o++){var r=e[o];if(null!=r)for(var a=Object.keys(Object(r)),l=0,s=a.length;l<s;l++){var c=a[l],d=Object.getOwnPropertyDescriptor(r,c);void 0!==d&&d.enumerable&&(n[c]=r[c])}}return n}})},function(t,e){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var i=Object(this),n=i.length>>>0;if(0===n)return!1;var o,r,a=0|e,l=Math.max(a>=0?a:n-Math.abs(a),0);for(;l<n;){if((o=i[l])===(r=t)||"number"==typeof o&&"number"==typeof r&&isNaN(o)&&isNaN(r))return!0;l++}return!1},configurable:!0,writable:!0}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o<i;){var r=e[o];if(t.call(n,r,o,e))return r;o++}},configurable:!0,writable:!0}),Array.prototype.findIndex||(Array.prototype.findIndex=function(t){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,i=Object(this),n=i.length>>>0,o=arguments[1],r=0;r<n;r++)if(e=i[r],t.call(o,e,r,i))return r;return-1})},function(t,e){String.prototype.includes||(String.prototype.includes=function(t,e){"use strict";return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){return e=e||0,this.indexOf(t,e)===e}}),String.prototype.padStart||(String.prototype.padStart=function(t,e){return t>>=0,e=String(e||" "),this.length>t?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),e.slice(0,t)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(t,e){return t>>=0,e=String(e||" "),this.length>t?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),String(this)+e.slice(0,t))})},function(t,e){if(Element&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}if("classList"in SVGElement.prototype||Object.defineProperty(SVGElement.prototype,"classList",{get:function(){var t=this;return{contains:function(e){return-1!==t.className.baseVal.split(" ").indexOf(e)},add:function(e){return t.setAttribute("class",t.getAttribute("class")+" "+e)},remove:function(e){var i=t.getAttribute("class").replace(new RegExp("(\\s|^)".concat(e,"(\\s|$)"),"g"),"$2");t.classList.contains(e)&&t.setAttribute("class",i)},toggle:function(t){this.contains(t)?this.remove(t):this.add(t)}}},configurable:!0}),!Object.entries){var n=Function.bind.call(Function.call,Array.prototype.reduce),o=Function.bind.call(Function.call,Object.prototype.propertyIsEnumerable),r=Function.bind.call(Function.call,Array.prototype.concat);Object.entries=function(t){return n(Object.keys(t),(function(e,i){return r(e,"string"==typeof i&&o(t,i)?[[i,t[i]]]:[])}),[])}}Event.prototype.composedPath||(Event.prototype.composedPath=function(){if(this.path)return this.path;var t=this.target;for(this.path=[];null!==t.parentNode;)this.path.push(t),t=t.parentNode;return this.path.push(document,window),this.path})},function(t,e){Math.sign=Math.sign||function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1}},function(t,e,i){(function(t){t.prototype.finally||(t.prototype.finally=function(t){var e=this.constructor;return this.then((function(i){return e.resolve(t()).then((function(){return i}))}),(function(i){return e.resolve(t()).then((function(){throw i}))}))})}).call(this,i(9))},function(t,e,i){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function r(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new r(o.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new r(o.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},i(65),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,i(22))},function(t,e,i){(function(t,e){!function(t,i){"use strict";if(!t.setImmediate){var n,o,r,a,l,s=1,c={},d=!1,u=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,i=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=i,e}}()?t.MessageChannel?((r=new MessageChannel).port1.onmessage=function(t){p(t.data)},n=function(t){r.port2.postMessage(t)}):u&&"onreadystatechange"in u.createElement("script")?(o=u.documentElement,n=function(t){var e=u.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,o.removeChild(e),e=null},o.appendChild(e)}):n=function(t){setTimeout(p,0,t)}:(a="setImmediate$"+Math.random()+"$",l=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",l,!1):t.attachEvent("onmessage",l),n=function(e){t.postMessage(a+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),i=0;i<e.length;i++)e[i]=arguments[i+1];var o={callback:t,args:e};return c[s]=o,n(s),s++},h.clearImmediate=f}function f(t){delete c[t]}function p(t){if(d)setTimeout(p,0,t);else{var e=c[t];if(e){d=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(i,n)}}(e)}finally{f(t),d=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,i(22),i(66))},function(t,e){var i,n,o=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var s,c=[],d=!1,u=-1;function h(){d&&s&&(d=!1,s.length?c=s.concat(c):u=-1,c.length&&f())}function f(){if(!d){var t=l(h);d=!0;for(var e=c.length;e;){for(s=c,c=[];++u<e;)s&&s[u].run();u=-1,e=c.length}s=null,d=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{return n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];c.push(new p(t,e)),1!==c.length||d||l(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.i18n=e.Grid=e.methods=e.DataProxy=e.DataCollection=e.setTheme=e.awaitRedraw=e.cssManager=void 0,i(68),i(69);var n=i(70);Object.defineProperty(e,"cssManager",{enumerable:!0,get:function(){return n.cssManager}});var o=i(1);Object.defineProperty(e,"awaitRedraw",{enumerable:!0,get:function(){return o.awaitRedraw}}),Object.defineProperty(e,"setTheme",{enumerable:!0,get:function(){return o.setTheme}});var r=i(8);Object.defineProperty(e,"DataCollection",{enumerable:!0,get:function(){return r.DataCollection}}),Object.defineProperty(e,"DataProxy",{enumerable:!0,get:function(){return r.DataProxy}}),Object.defineProperty(e,"methods",{enumerable:!0,get:function(){return r.methods}});var a=i(81);Object.defineProperty(e,"Grid",{enumerable:!0,get:function(){return a.Grid}});var l=i(13),s=i(32),c=i(129),d=window;e.i18n=d.dhx&&d.dhx.i18n?d.dhx.i18n:{},e.i18n.setLocale=c.setLocale,e.i18n.calendar=e.i18n.calendar||l.locale,e.i18n.combobox=e.i18n.combobox||s.default},function(t,e,i){"use strict";i.r(e)},function(t,e,i){"use strict";i.r(e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cssManager=e.CssManager=void 0;var n=i(0),o=function(){function t(){this._classes={};var t=document.createElement("style");t.id="dhx_generated_styles",this._styleCont=document.head.appendChild(t)}return t.prototype.update=function(){this._styleCont.innerHTML!==this._generateCss()&&(document.head.appendChild(this._styleCont),this._styleCont.innerHTML=this._generateCss())},t.prototype.remove=function(t){delete this._classes[t],this.update()},t.prototype.add=function(t,e,i){void 0===i&&(i=!1);var n=this._toCssString(t),o=this._findSameClassId(n);return o&&e&&e!==o?(this._classes[e]=this._classes[o],e):o||this._addNewClass(n,e,i)},t.prototype.get=function(t){if(this._classes[t]){for(var e={},i=0,n=this._classes[t].split(";");i<n.length;i++){var o=n[i];if(o){var r=o.split(":");e[r[0]]=r[1]}}return e}return null},t.prototype.destructor=function(){this._classes=this._styleCont=null},t.prototype._findSameClassId=function(t){for(var e in this._classes)if(t===this._classes[e])return e;return null},t.prototype._addNewClass=function(t,e,i){var o=e||"dhx_generated_class_".concat((0,n.uid)());return this._classes[o]=t,i||this.update(),o},t.prototype._toCssString=function(t){var e="";for(var i in t){var n=t[i],o=i.replace(/[A-Z]{1}/g,(function(t){return"-".concat(t.toLowerCase())}));e+="".concat(o,":").concat(n,";")}return e},t.prototype._generateCss=function(){var t="";for(var e in this._classes){var i=this._classes[e];t+=".".concat(e,"{").concat(i,"}\n")}return t},t}();e.CssManager=o,e.cssManager=new o},function(t,e,i){
13
13
  /**
14
14
  * Copyright (c) 2017, Leon Sorokin
15
15
  * All rights reserved. (MIT Licensed)
@@ -18,4 +18,4 @@ if(window.dhx&&(window.dhx_legacy=dhx,delete window.dhx),function(t,e){"object"=
18
18
  * A thin, fast, dependency-free vdom view layer
19
19
  * @preserve https://github.com/leeoniya/domvm (v3.2.6, micro build)
20
20
  */
21
- t.exports=function(){"use strict";var t=1,e=2,i=3,n=4,o=5,r="undefined"!=typeof window,a=(r?window:{}).requestAnimationFrame,l={};function s(){}var c=Array.isArray;function d(t){return null!=t}function u(t){return null!=t&&t.constructor===Object}function h(t,e,i,n){t.splice.apply(t,[i,n].concat(e))}function f(t){var e=typeof t;return"string"===e||"number"===e}function p(t){return"function"==typeof t}function g(t){return"object"==typeof t&&p(t.then)}function v(t){for(var e=arguments,i=1;i<e.length;i++)for(var n in e[i])t[n]=e[i][n];return t}function _(t,e,i){for(var n;n=e.shift();)0===e.length?t[n]=i:t[n]=t=t[n]||{}}function m(t,e){for(var i=[],n=e;n<t.length;n++)i.push(t[n]);return i}function y(t,e){for(var i in t)if(t[i]!==e[i])return!1;return!0}function b(t,e){var i=t.length;if(e.length!==i)return!1;for(var n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function x(t){if(!a)return t;var e,i,n;function o(){e=0,t.apply(i,n)}return function(){i=this,n=arguments,e||(e=a(o))}}function w(t,e,i){return function(){return t.apply(i,e)}}function C(t){var e,i,n=t.slice(),o=[];o.push(0);for(var r=0,a=t.length;r<a;++r){var l=o[o.length-1];if(t[l]<t[r])n[r]=l,o.push(r);else{for(e=0,i=o.length-1;e<i;){var s=(e+i)/2|0;t[o[s]]<t[r]?e=s+1:i=s}t[r]<t[o[e]]&&(e>0&&(n[r]=o[e-1]),o[e]=r)}}for(i=o[(e=o.length)-1];e-- >0;)o[e]=i,i=n[i];return o}function S(t,e){var i,n=0,o=e.length-1;if(o<=2147483647)for(;n<=o;){if(e[i=n+o>>1]===t)return i;e[i]<t?n=i+1:o=i-1}else for(;n<=o;){if(e[i=Math.floor((n+o)/2)]===t)return i;e[i]<t?n=i+1:o=i-1}return n==e.length?null:n}function E(t){return"o"===t[0]&&"n"===t[1]}function D(t){return"_"===t[0]}function O(t){return"style"===t}function k(t){t&&t.el&&t.el.offsetHeight}function T(t){return null!=t.node&&null!=t.node.el}function R(t,e){switch(e){case"value":case"checked":case"selected":return!0}return!1}function M(t){for(t=t||l;null==t.vm&&t.parent;)t=t.parent;return t.vm}function I(){}var P=I.prototype={constructor:I,type:null,vm:null,key:null,ref:null,data:null,hooks:null,ns:null,el:null,tag:null,attrs:null,body:null,flags:0,_class:null,_diff:null,_dead:!1,_lis:!1,idx:null,parent:null};function H(t){var i=new I;return i.type=e,i.body=t,i}var F={},A=/\[(\w+)(?:=(\w+))?\]/g;function j(t){var e,i,n,o,r=F[t];if(null==r)for(F[t]=r={tag:(e=t.match(/^[-\w]+/))?e[0]:"div",id:(i=t.match(/#([-\w]+)/))?i[1]:null,class:(n=t.match(/\.([-\w.]+)/))?n[1].replace(/\./g," "):null,attrs:null};o=A.exec(t);)null==r.attrs&&(r.attrs={}),r.attrs[o[1]]=o[2]||"";return r}var $=1,L=2,N=4,V=8;function W(e,i,n,o){var r=new I;r.type=t,d(o)&&(r.flags=o),r.attrs=i;var a=j(e);if(r.tag=a.tag,a.id||a.class||a.attrs){var l=r.attrs||{};if(a.id&&!d(l.id)&&(l.id=a.id),a.class&&(r._class=a.class,l.class=a.class+(d(l.class)?" "+l.class:"")),a.attrs)for(var s in a.attrs)d(l[s])||(l[s]=a.attrs[s]);r.attrs=l}var c=r.attrs;return d(c)&&(d(c._key)&&(r.key=c._key),d(c._ref)&&(r.ref=c._ref),d(c._hooks)&&(r.hooks=c._hooks),d(c._data)&&(r.data=c._data),d(c._flags)&&(r.flags=c._flags),d(r.key)||(d(r.ref)?r.key=r.ref:d(c.id)?r.key=c.id:d(c.name)&&(r.key=c.name+("radio"===c.type||"checkbox"===c.type?c.value:"")))),null!=n&&(r.body=n),r}function B(t,e,i){_(t,["refs"].concat(e.split(".")),i)}function z(t){for(;t=t.parent;)t.flags|=$}function G(t,e,i,r){if(t.type!==o&&t.type!==n){t.parent=e,t.idx=i,t.vm=r,null!=t.ref&&B(M(t),t.ref,t);var a=t.hooks,l=r&&r.hooks;(a&&(a.willRemove||a.didRemove)||l&&(l.willUnmount||l.didUnmount))&&z(t),c(t.body)&&Y(t)}}function Y(t){for(var i=t.body,n=0;n<i.length;n++){var o=i[n];!1===o||null==o?i.splice(n--,1):c(o)?h(i,o,n--,1):(null==o.type&&(i[n]=o=H(""+o)),o.type===e?null==o.body||""===o.body?i.splice(n--,1):n>0&&i[n-1].type===e?(i[n-1].body+=o.body,i.splice(n--,1)):G(o,t,n,null):G(o,t,n,null))}}var U={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,order:!0,lineClamp:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function X(t,e){return isNaN(e)||U[t]?e:e+"px"}function q(t,e){var i=(t.attrs||l).style,n=e?(e.attrs||l).style:null;if(null==i||f(i))t.el.style.cssText=i;else{for(var o in i){var r=i[o];(null==n||null!=r&&r!==n[o])&&(t.el.style[o]=X(o,r))}if(n)for(var a in n)null==i[a]&&(t.el.style[a]="")}}var K=[];function Z(t,e,i,n,o){if(null!=t){var r=i.hooks[e];if(r){if("d"!==e[0]||"i"!==e[1]||"d"!==e[2])return r(i,n);o?k(i.parent)&&r(i,n):K.push([r,i,n])}}}function J(t){var e;if(K.length)for(k(t.node);e=K.shift();)e[0](e[1],e[2])}var Q=r?document:null;function tt(t){for(;null==t._node;)t=t.parentNode;return t._node}function et(t,e){return null!=e?Q.createElementNS(e,t):Q.createElement(t)}function it(t){return Q.createTextNode(t)}function nt(t){return Q.createComment(t)}function ot(t){return t.nextSibling}function rt(t){return t.previousSibling}function at(t){var e=t.vm,i=null!=e&&Z(e.hooks,"willUnmount",e,e.data),n=Z(t.hooks,"willRemove",t);if((t.flags&$)===$&&c(t.body))for(var o=0;o<t.body.length;o++)at(t.body[o]);return i||n}function lt(t,e,i){var n=e._node,o=n.vm;if(c(n.body))if((n.flags&$)===$)for(var r=0;r<n.body.length;r++)lt(e,n.body[r].el);else ct(n);delete e._node,t.removeChild(e),Z(n.hooks,"didRemove",n,null,i),null!=o&&(Z(o.hooks,"didUnmount",o,o.data,i),o.node=null)}function st(t,e){var i=e._node;if(!i._dead){var n=at(i);null!=n&&g(n)?(i._dead=!0,n.then(w(lt,[t,e,!0]))):lt(t,e)}}function ct(t){for(var e=t.body,i=0;i<e.length;i++){var n=e[i];delete n.el._node,null!=n.vm&&(n.vm.node=null),c(n.body)&&ct(n)}}function dt(t){var e=t.el;if(0==(t.flags&$))c(t.body)&&ct(t),e.textContent=null;else{var i=e.firstChild;do{var n=ot(i);st(e,i)}while(i=n)}}function ut(t,e,i){var n=e._node,o=null!=e.parentNode,r=e!==i&&o?null:n.vm;null!=r&&Z(r.hooks,"willMount",r,r.data),Z(n.hooks,o?"willReinsert":"willInsert",n),t.insertBefore(e,i),Z(n.hooks,o?"didReinsert":"didInsert",n),null!=r&&Z(r.hooks,"didMount",r,r.data)}function ht(t,e,i){ut(t,e,i?ot(i):null)}var ft={};function pt(t){v(ft,t)}function gt(t){var e=this,i=e,n=m(arguments,1).concat(i,i.data);do{var o=e.onemit,r=o?o[t]:null;if(r){r.apply(e,n);break}}while(e=e.parent());ft[t]&&ft[t].apply(e,n)}var vt=s;function _t(t){vt=t.onevent||vt,t.onemit&&pt(t.onemit)}function mt(t,e,i){t[e]=i}function yt(t,e,i,n,o){var r=t.apply(o,e.concat([i,n,o,o.data]));o.onevent(i,n,o,o.data,e),vt.call(null,i,n,o,o.data,e),!1===r&&(i.preventDefault(),i.stopPropagation())}function bt(t){var e,i,n=tt(t.target),o=M(n),r=t.currentTarget._node.attrs["on"+t.type];if(c(r))yt(e=r[0],i=r.slice(1),t,n,o);else for(var a in r)if(t.target.matches(a)){var l=r[a];c(l)?(e=l[0],i=l.slice(1)):(e=l,i=[]),yt(e,i,t,n,o)}}function xt(t,e,i,n){if(i!==n){var o=t.el;null==i||p(i)?mt(o,e,i):null==n&&mt(o,e,bt)}}function wt(t,e,i){"."===e[0]&&(e=e.substr(1),i=!0),i?t.el[e]="":t.el.removeAttribute(e)}function Ct(t,e,i,n,o){var r=t.el;null==i?!o&&wt(t,e,!1):null!=t.ns?r.setAttribute(e,i):"class"===e?r.className=i:"id"===e||"boolean"==typeof i||n?r[e]=i:"."===e[0]?r[e.substr(1)]=i:r.setAttribute(e,i)}function St(t,e,i){var n=t.attrs||l,o=e.attrs||l;if(n===o);else{for(var r in n){var a=n[r],s=R(t.tag,r),c=s?t.el[r]:o[r];a===c||(O(r)?q(t,e):D(r)||(E(r)?xt(t,r,a,c):Ct(t,r,a,s,i)))}for(var r in o)!(r in n)&&!D(r)&&wt(t,r,R(t.tag,r)||E(r))}}function Et(t,e,i,o){return t.type===n&&(e=t.data,i=t.key,o=t.opts,t=t.view),new Gt(t,e,i,o)}function Dt(t){for(var e=0;e<t.body.length;e++){var r=t.body[e],a=r.type;if(a<=i)ut(t.el,Ot(r));else if(a===n)a=(l=Et(r.view,r.data,r.key,r.opts)._redraw(t,e,!1)).node.type,ut(t.el,Ot(l.node));else if(a===o){var l;(l=r.vm)._redraw(t,e),a=l.node.type,ut(t.el,l.node.el)}}}function Ot(n,o){return null==n.el&&(n.type===t?(n.el=o||et(n.tag,n.ns),null!=n.attrs&&St(n,l,!0),(n.flags&V)===V&&n.body.body(n),c(n.body)?Dt(n):null!=n.body&&""!==n.body&&(n.el.textContent=n.body)):n.type===e?n.el=o||it(n.body):n.type===i&&(n.el=o||nt(n.body))),n.el._node=n,n.el}function kt(t,e){return e[t.idx+1]}function Tt(t,e){return e[t.idx-1]}function Rt(t){return t.parent}window.lisMove=Ht;var Mt=1,It=2;function Pt(t,e,i,n,o,r,a,l){return function(s,c,d,u,h,f){var p,g;if(null!=u[n]){if(null==(p=u[n]._node))return void(u[n]=t(u[n]));if(Rt(p)!==s)return g=t(u[n]),null!=p.vm?p.vm.unmount(!0):st(c,u[n]),void(u[n]=g)}if(u[o]==h)return It;if(null==u[o].el)i(c,Ot(u[o]),u[n]),u[o]=e(u[o],d);else if(u[o].el===u[n])u[o]=e(u[o],d),u[n]=t(u[n]);else{if(f||p!==u[a])return f&&null!=u[n]?Ht(t,e,i,n,o,c,d,p,u):Mt;g=u[n],u[n]=t(g),l(c,g,u[r]),u[r]=g}}}function Ht(t,e,i,n,o,r,a,l,s){if(l._lis)i(r,s[o].el,s[n]),s[o]=e(s[o],a);else{var c=S(l.idx,s.tombs);l._lis=!0;var d=t(s[n]);i(r,s[n],null!=c?a[s.tombs[c]].el:c),null==c?s.tombs.push(l.idx):s.tombs.splice(c,0,l.idx),s[n]=d}}var Ft=Pt(ot,kt,ut,"lftSib","lftNode","rgtSib","rgtNode",ht),At=Pt(rt,Tt,ht,"rgtSib","rgtNode","lftSib","lftNode",ut);function jt(t,e){var i=e.body,n=t.el,o=t.body,r={lftNode:o[0],rgtNode:o[o.length-1],lftSib:(i[0]||l).el,rgtSib:(i[i.length-1]||l).el};t:for(;;){for(;;){var a=Ft(t,n,o,r,null,!1);if(a===Mt)break;if(a===It)break t}for(;;){var s=At(t,n,o,r,r.lftNode,!1);if(s===Mt)break;if(s===It)break t}$t(t,n,o,r);break}}function $t(t,e,i,n){for(var o=Array.prototype.slice.call(e.childNodes),r=[],a=0;a<o.length;a++){var l=o[a]._node;l.parent===t&&r.push(l.idx)}for(var s=C(r).map((function(t){return r[t]})),c=0;c<s.length;c++)i[s[c]]._lis=!0;for(n.tombs=s;Ft(t,e,i,n,null,!0)!==It;);}function Lt(t){return t.el._node.parent!==t.parent}function Nt(t,e,i){return e[i]}function Vt(t,e,i){for(;i<e.length;i++){var r=e[i];if(null!=r.vm){if(t.type===n&&r.vm.view===t.view&&r.vm.key===t.key||t.type===o&&r.vm===t.vm)return r}else if(!Lt(r)&&t.tag===r.tag&&t.type===r.type&&t.key===r.key&&(t.flags&~$)==(r.flags&~$))return r}return null}function Wt(t,e,i){return e[e._keys[t.key]]}function Bt(t,i){Z(i.hooks,"willRecycle",i,t);var n=t.el=i.el,o=i.body,r=t.body;if(n._node=t,t.type!==e||r===o){null==t.attrs&&null==i.attrs||St(t,i,!1);var a=c(o),l=c(r),s=(t.flags&V)===V;a?l||s?zt(t,i):r!==o&&(null!=r?n.textContent=r:dt(i)):l?(dt(i),Dt(t)):r!==o&&(n.firstChild?n.firstChild.nodeValue=r:n.textContent=r),Z(i.hooks,"didRecycle",i,t)}else n.nodeValue=r}function zt(e,r){var a=e.body,l=a.length,s=r.body,c=s.length,d=(e.flags&V)===V,u=(e.flags&L)===L,h=(e.flags&N)===N,f=!u&&e.type===t,p=!0,g=h?Wt:u||d?Nt:Vt;if(h){for(var v={},_=0;_<s.length;_++)v[s[_].key]=_;s._keys=v}if(f&&0===l)return dt(r),void(d&&(e.body=[]));var m,y,b=0,x=!1,w=0;if(d)var C={key:null},S=Array(l);for(_=0;_<l;_++){if(d){var E=!1,D=null;p&&(h&&(C.key=a.key(_)),m=g(C,s,w)),null!=m?(y=m.idx,!0===(D=a.diff(_,m))?((O=m).parent=e,O.idx=_,O._lis=!1):E=!0):E=!0,E&&(G(O=a.tpl(_),e,_),O._diff=null!=D?D:a.diff(_),null!=m&&Bt(O,m)),S[_]=O}else{var O,k=(O=a[_]).type;if(k<=i)(m=p&&g(O,s,w))&&(Bt(O,m),y=m.idx);else if(k===n){if(m=p&&g(O,s,w)){y=m.idx;var R=m.vm._update(O.data,e,_)}else R=Et(O.view,O.data,O.key,O.opts)._redraw(e,_,!1);k=R.node.type}else if(k===o){var M=T(O.vm);k=(R=O.vm._update(O.data,e,_,M)).node.type}}if(!h&&null!=m&&(y===w?++w===c&&l>c&&(m=null,p=!1):x=!0,c>100&&x&&++b%10==0))for(;w<c&&Lt(s[w]);)w++}d&&(e.body=S),f&&jt(e,r)}function Gt(t,e,i,n){var o=this;o.view=t,o.data=e,o.key=i,n&&(o.opts=n,o.config(n));var r=u(t)?t:t.call(o,o,e,i,n);p(r)?o.render=r:(o.render=r.render,o.config(r)),o._redrawAsync=x((function(t){return o.redraw(!0)})),o._updateAsync=x((function(t){return o.update(t,!0)})),o.init&&o.init.call(o,o,o.data,o.key,n)}var Yt=Gt.prototype={constructor:Gt,_diff:null,init:null,view:null,key:null,data:null,state:null,api:null,opts:null,node:null,hooks:null,onevent:s,refs:null,render:null,mount:Ut,unmount:Xt,config:function(t){var e=this;t.init&&(e.init=t.init),t.diff&&(e.diff=t.diff),t.onevent&&(e.onevent=t.onevent),t.hooks&&(e.hooks=v(e.hooks||{},t.hooks)),t.onemit&&(e.onemit=v(e.onemit||{},t.onemit))},parent:function(){return M(this.node.parent)},root:function(){for(var t=this.node;t.parent;)t=t.parent;return t.vm},redraw:function(t){var e=this;return t?e._redraw(null,null,T(e)):e._redrawAsync(),e},update:function(t,e){var i=this;return e?i._update(t,null,null,T(i)):i._updateAsync(t),i},_update:Zt,_redraw:Kt,_redrawAsync:null,_updateAsync:null};function Ut(t,e){var i=this;return e?(dt({el:t,flags:0}),i._redraw(null,null,!1),t.nodeName.toLowerCase()!==i.node.tag?(Ot(i.node),ut(t.parentNode,i.node.el,t),t.parentNode.removeChild(t)):ut(t.parentNode,Ot(i.node,t),t)):(i._redraw(null,null),t&&ut(t,i.node.el)),t&&J(i),i}function Xt(t){var e=this,i=e.node;st(i.el.parentNode,i.el),t||J(e)}function qt(t,e,i,n){return null!=i&&(i.body[n]=e,e.idx=n,e.parent=i,e._lis=!1),t}function Kt(t,e,i){var n,o,r=null==t,a=this,l=a.node&&a.node.el&&a.node.el.parentNode,s=a.node;if(null!=a.diff&&(n=a._diff,a._diff=o=a.diff(a,a.data),null!=s)){var d=c(n)?b:y;if(n===o||d(n,o))return qt(a,s,t,e)}l&&Z(a.hooks,"willRedraw",a,a.data);var u=a.render.call(a,a,a.data,n,o);if(u===s)return qt(a,s,t,e);if(a.refs=null,null!=a.key&&u.key!==a.key&&(u.key=a.key),a.node=u,t?(G(u,t,e,a),t.body[e]=u):s&&s.parent?(G(u,s.parent,s.idx,a),s.parent.body[s.idx]=u):G(u,null,null,a),!1!==i)if(s)if(s.tag!==u.tag||s.key!==u.key){s.vm=u.vm=null;var h=s.el.parentNode,f=ot(s.el);st(h,s.el),ut(h,Ot(u),f),s.el=u.el,u.vm=a}else Bt(u,s);else Ot(u);return l&&Z(a.hooks,"didRedraw",a,a.data),r&&l&&J(a),a}function Zt(t,e,i,n){var o=this;return null!=t&&o.data!==t&&(Z(o.hooks,"willUpdate",o,t),o.data=t),o._redraw(e,i,n)}function Jt(t,e,i,n){var o,r;return null==i?u(e)?o=e:r=e:(o=e,r=i),W(t,o,r,n)}var Qt="http://www.w3.org/2000/svg";function te(t,e,i,n){var o=Jt(t,e,i,n);return o.ns=Qt,o}function ee(t){var e=new I;return e.type=i,e.body=t,e}function ie(t,e,i,n){this.view=t,this.data=e,this.key=i,this.opts=n}function ne(t,e,i,n){return new ie(t,e,i,n)}function oe(t){this.vm=t}function re(t){return new oe(t)}function ae(e){var i=new I;return i.type=t,i.el=i.key=e,i}function le(t,e){var i=t.length,n={items:t,length:i,key:function(i){return e.key(t[i],i)},diff:function(i,n){var o=e.diff(t[i],i);if(null==n)return o;var r=n._diff;return(o===r||c(r)?b(o,r):y(o,r))||o},tpl:function(i){return e.tpl(t[i],i)},map:function(t){return e.tpl=t,n},body:function(t){for(var e=Array(i),o=0;o<i;o++){var r=n.tpl(o);r._diff=n.diff(o),e[o]=r,G(r,t,o)}t.body=e}};return n}ie.prototype={constructor:ie,type:n,view:null,data:null,key:null,opts:null},oe.prototype={constructor:oe,type:o,vm:null};var se={config:_t,ViewModel:Gt,VNode:I,createView:Et,defineElement:Jt,defineSvgElement:te,defineText:H,defineComment:ee,defineView:ne,injectView:re,injectElement:ae,lazyList:le,FIXED_BODY:L,DEEP_REMOVE:$,KEYED_LIST:N,LAZY_LIST:V};function ce(t,e){de(this,t,e)}function de(t,e,i){if(null!=e.type){if(null!=t.vm)return;G(e,t.parent,t.idx,null),t.parent.body[t.idx]=e,Bt(e,t),i&&k(e),J(M(e))}else{var n=Object.create(t);n.attrs=v({},t.attrs);var o=v(t.attrs,e);if(null!=t._class){var r=o.class;o.class=null!=r&&""!==r?t._class+" "+r:t._class}St(t,n),i&&k(t)}}function ue(t,e){var i=t.body;if(c(i))for(var n=0;n<i.length;n++){var o=i[n];null!=o.vm?e.push(o.vm):ue(o,e)}return e}function he(t){var e,i,n=arguments,o=n.length;if(o>1){var r=1;u(n[1])&&(i=n[1],r=2),e=o===r+1&&(f(n[r])||c(n[r])||i&&(i._flags&V)===V)?n[r]:m(n,r)}return W(t,i,e)}function fe(){var t=he.apply(null,arguments);return t.ns=Qt,t}return P.patch=ce,Yt.emit=gt,Yt.onemit=null,Yt.body=function(){return ue(this.node,[])},se.defineElementSpread=he,se.defineSvgElementSpread=fe,se}()},function(t,e,i){"use strict";(function(t){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Loader=void 0;var o=i(0),r=i(10),a=i(12),l=i(0),s=function(){function e(t,e){this._parent=t,this._changes=e}return e.prototype.load=function(t,e){var i=this;if(!t.config||this._parent.events.fire(a.DataEvents.beforeLazyLoad,[]))return this._parent.loadData=t.load().then((function(t){return t?i.parse(t,e):[]})).catch((function(t){i._parent.events.fire(a.DataEvents.loadError,[t])}))},e.prototype.parse=function(t,e){var i=this;if(void 0===e&&(e=a.DataDriver.json),"json"!==e||(0,r.hasJsonOrArrayStructure)(t)||this._parent.events.fire(a.DataEvents.loadError,["Uncaught SyntaxError: Unexpected end of input"]),!((t=(e=(0,r.toDataDriver)(e)).toJsonArray(t))instanceof Array)){var s=t.total_count-1,c=t.from;if(t=t.data,0!==this._parent.getLength())return t.forEach((function(t,e){var a=c+e,s=i._parent.getId(a);if((0,o.isId)(s)){var d=i._parent.getItem(s);if(d&&d.$empty){var u=t.id||d.id;(0,l.isDefined)(t.id)&&i._parent.changeId(s,u,!0),i._parent.update(u,n(n({},t),{$empty:void 0}),!0)}}else(0,r.dhxWarning)("item not found")})),this._parent.events.fire(a.DataEvents.afterLazyLoad,[c,t.length]),this._parent.events.fire(a.DataEvents.change),t;for(var d=[],u=0,h=0;u<=s;u++)u>=c&&u<=c+t.length-1?(d.push(t[h]),h++):d.push({$empty:!0});t=d}return this._parent.getInitialData()&&this._parent.removeAll(),this._parent.$parse(t),t},e.prototype.save=function(e){for(var i=this,n=this._getUniqueOrder(),o=function(n){if(n.saving||n.pending)(0,r.dhxWarning)("item is saving");else{var o=a._findPrevState(n.id);if(o&&o.saving){var l=new t((function(t,a){o.promise.then((function(){n.pending=!1,t(i._setPromise(n,e))})).catch((function(t){i._removeFromOrder(o),i._setPromise(n,e),(0,r.dhxWarning)(t),a(t)}))}));a._addToChain(l),n.pending=!0}else a._setPromise(n,e)}},a=this,l=0,s=n;l<s.length;l++){o(s[l])}n.length&&this._parent.saveData.then((function(){i._saving=!1}))},e.prototype.updateChanges=function(t){this._changes=t},e.prototype._setPromise=function(t,e){var i,n=this;switch(t.status){case"remove":i="delete";break;case"add":i="insert";break;default:i=t.status}return t.promise=e.save(t.obj,i),t.promise.then((function(){n._removeFromOrder(t)})).catch((function(e){t.saving=!1,t.error=!0,(0,r.dhxError)(e)})),t.saving=!0,this._saving=!0,this._addToChain(t.promise),t.promise},e.prototype._addToChain=function(t){this._parent.saveData&&this._saving?this._parent.saveData=this._parent.saveData.then((function(){return t})):this._parent.saveData=t},e.prototype._findPrevState=function(t){for(var e=0,i=this._changes.order;e<i.length;e++){var n=i[e];if(n.id===t)return n}return null},e.prototype._removeFromOrder=function(t){this._changes.order=this._changes.order.filter((function(e){return!(0,r.isEqualObj)(e,t)}))},e.prototype._getUniqueOrder=function(){return this._changes.order.reduce((function(t,e){var i=t.findIndex((function(t){return t.id===e.id})),n=i>-1?t[i]:null;return n&&!1===n.saving&&"add"===n.status?"remove"===e.status?t.splice(i,1):n.obj=e.obj:n&&!1===n.saving&&"update"===n.status?t.splice(i,1,e):t.push(e),t}),[])},e}();e.Loader=s}).call(this,i(9))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.jsonToXML=void 0;var n=4;function o(t){return" ".repeat(t)}function r(t,e){void 0===e&&(e=n);var i=o(e)+"<item>\n";for(var a in t)Array.isArray(t[a])?(i+=o(e+n)+"<".concat(a,">\n"),i+=t[a].map((function(t){return r(t,e+2*n)})).join("\n")+"\n",i+=o(e+n)+"</".concat(a,">\n")):i+=o(e+n)+"<".concat(a,">").concat(t[a],"</").concat(a,">\n");return i+=o(e)+"</item>"}e.jsonToXML=function(t,e){void 0===e&&(e="root");for(var i='<?xml version="1.0" encoding="iso-8859-1"?>\n<'.concat(e,">"),n=0;n<t.length;n++)i+="\n"+r(t[n]);return i+"\n</".concat(e,">")}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sort=void 0;var n=i(10),o=function(){function t(){}return t.prototype.sort=function(t,e){return this._sort(t,e)},t.prototype._createSorter=function(t){var e=this;t&&!t.rule&&(t.rule=function(i,o){var r,a,l=null!==(r=e._checkVal(t.as,i[t.by]))&&void 0!==r?r:"",s=null!==(a=e._checkVal(t.as,o[t.by]))&&void 0!==a?a:"";return(0,n.naturalCompare)(l.toString(),s.toString())})},t.prototype._checkVal=function(t,e){return t?t.call(this,e):e},t.prototype._sort=function(t,e){var i=this;e.forEach((function(t){return i._createSorter(t)}));var n={asc:1,desc:-1},o=t.sort((function(t,o){for(var r=0,a=e;r<a.length;r++){var l=a[r],s=l.rule.call(i,t,o)*(n[l.dir]||n.asc);if(0!==s)return s}return 0})),r=o.findIndex((function(t){return t.$groupSummary}));if(-1!==r){var a=o[r];switch(o.splice(r,1),a.$groupSummary){case"top":o.unshift(a);break;case"bottom":o.push(a)}}return o},t}();e.Sort=o},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;var r=i(0),a=i(37),l=function(){function t(){this._init=[],this._groupSet=new Set,this._groupOrderFields=[]}return t.prototype.group=function(t,e,i){return void 0===i&&(i={}),(null==t?void 0:t.length)&&(null==e?void 0:e.length)&&Array.isArray(t)?(this._init=o([],e,!0),this._groupSet.clear(),this._config=this.getGroupConfig(i),this._groupOrderFields=t.map((function(t){return"string"==typeof t?t:"function"==typeof t?"":"by"in t&&"string"==typeof t.by?t.by:""})),this._group(t,e)):e||[]},t.prototype.ungroup=function(t){var e=this._init;if(this._init=[],this._groupSet.clear(),t){for(var i={},o=function(e){var n=t[e];if(n.$group)return"continue";Object.keys(n).forEach((function(t){t.startsWith("$")&&delete n[t]})),delete n.parent,i[n.id]=n},r=0;r<t.length;r++)o(r);return e.map((function(t){return n(n({},t),i[t.id])}))}return e||[]},t.prototype.isGrouped=function(){return!!this._init.length},t.prototype.getGroupedFields=function(){return this._groupOrderFields},t.prototype.getGroupConfig=function(t){var e;return t?{displayMode:t.displayMode||"column",field:t.field||"group",showMissed:null===(e=t.showMissed)||void 0===e||e}:this._config},t.prototype._group=function(t,e,i,o){var a=this;if(void 0===o&&(o=0),!(o>=t.length)){for(var l=[],s={},c=[],d="",u={},h=0;h<e.length;h++){var f=e[h],p=t[o],g="function"==typeof p||"function"==typeof(null==p?void 0:p.by),v=f[(u=this._getOrderConfig(p,f)).by],_=g?u.by:v;g||v||0===v?(this._groupSet.add(u.by),s[_]||(s[_]=[]),s[_].push(f)):(this._config.showMissed&&(delete f.parent,c.push(f)),"string"==typeof this._config.showMissed&&(d=this._config.showMissed))}var m=Object.keys(s);return d&&m.push(d),m.forEach((function(e){var d,h=s[e]||c,f=i?"".concat(i,":").concat(e):"$".concat((0,r.uid)(),":").concat(e),p={};u.map&&Object.keys(u.map).forEach((function(t){p[t]=a._toAggregate(h,u.map[t])}));var g=n(((d={id:f,$by:u.by,$group:!0,$row:"row"===a._config.displayMode,$count:h.length})[u.by]=e,d),p);"column"===a._config.displayMode&&(g[a._config.field]=e),i&&(g.parent=i),l.push(g),o<t.length-1&&l.push.apply(l,a._group(t,h,f,o+1)),o===t.length-1&&h.forEach((function(t){l.push(n(n({},t),{parent:f}))})),u.summary&&a._addSummaryRow(l,f,u.summary,p)})),d||l.push.apply(l,c),l}},t.prototype._addSummaryRow=function(t,e,i,o){var r=n({id:"".concat(e,":summary"),parent:e,$groupSummary:i},o);if("top"===i){var a=t.findIndex((function(t){return t.id===e}));t.splice(a+1,0,r)}else t.push(r)},t.prototype._toAggregate=function(t,e){if("function"==typeof e)return e(t);var i=e[0],n=e[1];return a.methods[n]?a.methods[n](t,i):""},t.prototype._getOrderConfig=function(t,e){var i={by:"string"==typeof t&&t||"string"==typeof t.by&&t.by||"function"==typeof t&&t(e)||"function"==typeof t.by&&t.by(e)};return t.map&&(i.map=t.map),t.summary&&(i.summary=t.summary),i},t}();e.Group=l},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.TreeCollection=e.addToOrder=void 0;var l=i(0),s=i(33),c=i(15),d=i(10),u=i(12);function h(t,e,i,n){void 0!==n&&-1!==n&&t[i]&&t[i][n]?t[i].splice(n,0,e):(t[i]||(t[i]=[]),t[i].push(e))}e.addToOrder=h;var f=function(t){function e(e,i){var n,o=t.call(this,e,i)||this;o._children={};var r=o._root=e&&e.rootId||"_ROOT_"+(0,l.uid)();return o._children=((n={})[r]=[],n),o._initChildren=null,o}return o(e,t),e.prototype.add=function(t,e,i){var n,o=this;return void 0===e&&(e=-1),void 0===i&&(i=this._root),n=Array.isArray(t)?t.map((function(n,r){return o._add({newItem:n,batch:t,index:e,parent:i,order:r})})):this._add({newItem:t,batch:[t],index:e,parent:i}),this._reapplyFilters(),n},e.prototype.getRoot=function(){return this._root},e.prototype.getParent=function(t,e){if(void 0===e&&(e=!1),!this._pull[t])return null;var i=this._pull[t].parent;return e?this._pull[i]:i},e.prototype.getItems=function(t){return this._children&&this._children[t]?this._children[t]:[]},e.prototype.getLength=function(t){return void 0===t&&(t=this._root),this._children[t]?this._children[t].length:null},e.prototype.removeAll=function(e){var i;if((0,l.isId)(e)){if(this._children[e])for(var n=0,o=a([],this._children[e],!0);n<o.length;n++){var r=o[n];this.remove(r.id)}}else{t.prototype.removeAll.call(this);var s=this._root;this._initChildren=null,this._children=((i={})[s]=[],i)}},e.prototype.update=function(e,i,n){var o=i.parent;!(0,l.isDefined)(o)||this.exists(o)||o===this._root?t.prototype.update.call(this,e,i,n):(0,d.dhxWarning)("Item parent doesn't exist")},e.prototype.getIndex=function(t){var e=this.getParent(t);return e&&this._children[e]?this._children[e].findIndex((function(e){return(null==e?void 0:e.id)==t})):-1},e.prototype.sort=function(t,e,i){var n,o,l=this;if(void 0===i&&(i=!1),(null==e?void 0:e.smartSorting)&&(this._sorter=t),i||this._sortingStates.length&&!(null==e?void 0:e.smartSorting)&&((null===(n=this._sortingStates[0])||void 0===n?void 0:n.smartSorting)||(null==e?void 0:e.smartSorting))||(this._sortingStates=[r(r({},t),e)]),t){if(!i&&(this._initSortOrder=this._initSortOrder||a([],this._initFilterOrder||this._order,!0),!(null==e?void 0:e.smartSorting)&&(null===(o=this._sortingStates[0])||void 0===o?void 0:o.smartSorting))){var s=this._sortingStates.findIndex((function(e){return e.by==t.by}));-1!==s?this._sortingStates[s].dir=t.dir:this._sortingStates.push(t)}this._applySorters()}else this._initSortOrder&&(this._children={},this._order=[],this._sortingStates=[],this._initSortOrder.forEach((function(t){return l._parseItem(t)})),this._sorter=this._initSortOrder=this._initChildren=null,this._initFilterOrder&&(this._initFilterOrder=null,this.filter(null,{$restore:!0},!0)));i||(this._reapplyFilters(),this.events.fire(u.DataEvents.change,[void 0,"sort",t]))},e.prototype.filter=function(t,e,i){if((null==e?void 0:e.$restore)&&(t=this._normalizeFilters(t||this._filters)),!(t&&(null==e?void 0:e.add)||(this._initChildren&&(this._children=this._initChildren,this._initChildren=null),null==e?void 0:e.$restore)))for(var n in this._filters){var o=this._filters[n],r=o.rule,a=o.config;(null==a?void 0:a.permanent)?this._applyFilter(r,a):delete this._filters[n]}var s;if(t&&!(null==e?void 0:e.$restore))s=(null==e?void 0:e.id)||(0,l.uid)(),e||(e={}),e.type=e.type||u.TreeFilterType.all,this._filters[s]={rule:t,config:e},this._applyFilter(t,e);else for(var n in t)this._applyFilter(t[n],this._filters[n].config);if(!i){var c=this._getPureFilters(this._filters);this.events.fire(u.DataEvents.filter,[(0,l.isEmptyObj)(c)?null:c])}return s},e.prototype.restoreOrder=function(){this.resetFilter({permanent:!0},!0),this.sort()},e.prototype.copy=function(t,e,i,n){var o=this;return void 0===i&&(i=this),void 0===n&&(n=this._root),t instanceof Array?t.map((function(t,r){return o._copy(t,e,i,n,r)})):this._copy(t,e,i,n)},e.prototype.move=function(t,e,i,n){var o,r=this;if(void 0===n&&(n=this._root),i=i||this,t instanceof Array){var a=[];return t.forEach((function(t,o){(0,l.isId)(r._move(t,e,i,n,o))?a.push(t):(0,d.throwMoveWarning)(t,r.exists(t))})),a}return null!==(o=this._move(t,e,i,n))&&void 0!==o?o:(0,d.throwMoveWarning)(t,this.exists(t))},e.prototype.forEach=function(t,e,i){if(void 0===e&&(e=this._root),void 0===i&&(i=1/0),this.haveItems(e)&&!(i<1))for(var n=this._children[e],o=0;o<n.length;o++)t.call(this,n[o],o,n),this.haveItems(n[o].id)&&this.forEach(t,n[o].id,--i)},e.prototype.eachChild=function(t,e,i,n){if(void 0===i&&(i=!0),void 0===n&&(n=function(){return!0}),this.haveItems(t))for(var o=0;o<this._children[t].length;o++)e.call(this,this._children[t][o],o),i&&n(this._children[t][o])&&this.eachChild(this._children[t][o].id,e,i,n)},e.prototype.getNearId=function(t){return t},e.prototype.loadItems=function(t,e){var i=this;if(void 0===e&&(e=u.DataDriver.json),this.events.fire(u.DataEvents.beforeItemLoad,[t])){var n=this.config.autoload.toString(),o=n+(n.includes("?")?"&id=".concat(t):"?id=".concat(t));new c.DataProxy(o).load().then((function(n){n=(e=(0,d.toDataDriver)(e)).toJsonArray(n),i._parse_data(n,t),i.events.fire(u.DataEvents.change),i.events.fire(u.DataEvents.afterItemLoad,[t])})).catch((function(t){i.events.fire(u.DataEvents.loadError,[t])}))}},e.prototype.refreshItems=function(t,e){void 0===e&&(e=u.DataDriver.json),this.removeAll(t),this.loadItems(t,e)},e.prototype.eachParent=function(t,e,i){void 0===i&&(i=!1);var n=this.getItem(t);if(n&&(i&&e.call(this,n),n.parent!==this._root)){var o=this.getItem(n.parent);e.call(this,o),this.eachParent(n.parent,e)}},e.prototype.haveItems=function(t){return t in this._children},e.prototype.canCopy=function(t,e){if(t===e)return!1;var i=!0;return this.eachParent(e,(function(e){return e.id===t?i=!1:null})),i},e.prototype.serialize=function(t,e){void 0===t&&(t=u.DataDriver.json);var i=this._serialize(this._root,e),n=(0,d.toDataDriver)(t);if(n)return n.serialize(i)},e.prototype.getId=function(t,e){if(void 0===e&&(e=this._root),this._children[e]&&this._children[e][t])return this._children[e][t].id},e.prototype.map=function(t,e,i){void 0===e&&(e=this._root),void 0===i&&(i=!0);var n=[];if(!this.haveItems(e))return n;for(var o=0;o<this._children[e].length;o++)if(n.push(t.call(this,this._children[e][o],o,this._children)),i){var r=this.map(t,this._children[e][o].id,i);n=n.concat(r)}return n},e.prototype.getRawData=function(e,i,n,o,r){var a;return r=null!=r?r:this._root,this._children[r]?(a=r===this._root?t.prototype.getRawData.call(this,e,i,this._children[r]):this._children[r],2===o?this.flatten(a):a):[]},e.prototype.flatten=function(t){var e=this,i=[];return t.forEach((function(t){i.push(t);var n=e._children[t.id];n&&t.$opened&&(i=i.concat(e.flatten(n)))})),i},e.prototype._add=function(t){var e=t.newItem,i=t.index,n=void 0===i?-1:i,o=t.parent,r=void 0===o?this._root:o,a=t.order,l=void 0===a?0:a,s=t.batch;if(l>0&&-1!==n&&(n+=1),this.events.fire(u.DataEvents.beforeAdd,[e,s,l])){this._setParent(e,r);var c=this._addCore(e,n);if(this._onChange("add",e.id,e),this.events.fire(u.DataEvents.afterAdd,[e,s,l]),Array.isArray(e.items))for(var d=0,h=e.items;d<h.length;d++){var f=h[d];this.add(f,-1,e.id)}return c}},e.prototype._setParent=function(t,e){t.parent=t.parent?t.parent.toString():e;var i=this._pull[t.parent];i&&!i.items&&(i.items=[])},e.prototype._copy=function(t,e,i,n,o){if(void 0===i&&(i=this),void 0===n&&(n=this._root),!this.exists(t))return null;var r=this._children[t];if(o&&(e=-1===e?-1:e+o),i===this&&!this.canCopy(t,n))return null;var a=(0,d.copyWithoutInner)(this.getItem(t),{items:!0});if(i.exists(t)&&(a.id=(0,l.uid)()),(0,d.isTreeCollection)(i)){if(this.exists(t)&&(a.parent=n,i!==this&&n===this._root&&(a.parent=i.getRoot()),i.add(a,e),t=a.id),r)for(var s=0,c=r;s<c.length;s++){var u=c[s].id,h=this.getIndex(u);this.copy(u,h,i,t)}return t}i.add(a,e)},e.prototype._move=function(t,e,i,n,o){if(void 0===i&&(i=this),void 0===n&&(n=this._root),!this.exists(t))return null;if(o&&e<this.getIndex(t)&&(e=-1===e?-1:e+o),i!==this){if(!(0,d.isTreeCollection)(i))return i.add((0,d.copyWithoutInner)(this.getItem(t)),e),void this.remove(t);var r=this.copy(t,e,i,n);return this.remove(t),r}return this.canCopy(t,n)?(this._moveItem(t,n,e),this.events.fire(u.DataEvents.change,[t,"update",this.getItem(t)]),t):null},e.prototype._moveItem=function(t,e,i){var n=this.getParent(t),o=this._initChildren||this._children;if([this._children,this._initChildren].forEach((function(o){if(o&&o[n]){var r=o[n].findIndex((function(e){return e.id===t}));if(-1!==r){var a=o[n].splice(r,1)[0];a.parent=e,h(o,a,e,i),o[n].length||delete o[n]}}})),n!==this._root&&n!==e){var r=this.getItem(n);o[n]?r.items=a([],o[n],!0):delete r.items}e!==this._root&&(this.getItem(e).items=a([],o[e]||[],!0))},e.prototype._reset=function(e){var i;if((0,l.isId)(null==e?void 0:e.id))for(var n=0,o=a([],this._children[null==e?void 0:e.id],!0);n<o.length;n++){var r=o[n];this.remove(r.id)}else{t.prototype._reset.call(this,e);var s=this._root;this._initChildren=null,this._children=((i={})[s]=[],i)}},e.prototype._removeCore=function(t){var e;if(this._pull[t]){var i=this.getParent(t);if(this._removeFromParentList(this._children,i,t),this._initChildren&&this._removeFromParentList(this._initChildren,i,t),Array.isArray(null===(e=this._pull[i])||void 0===e?void 0:e.items)){var n=this._pull[i];n.items=n.items.filter((function(e){return e.id!==t}))}var o=new Set;this._removeChildren(this._children,t,o),this._initChildren&&this._removeChildren(this._initChildren,t,o),this._removeFromOrders(o)}},e.prototype._removeFromParentList=function(t,e,i){t[e]&&(t[e]=t[e].filter((function(t){return t.id!==i})),e!==this._root&&0===t[e].length&&delete t[e])},e.prototype._removeChildren=function(t,e,i){this._pull[e]&&(i.add(e),delete this._pull[e]);var n=t[e];if(n){for(var o=0;o<n.length;o++)this._removeChildren(t,n[o].id,i);delete t[e]}},e.prototype._removeFromOrders=function(t){var e,i;if(0!==t.size){var n=function(e){return!t.has(e.id)};this._order&&(this._order=this._order.filter(n)),(null===(e=this._initFilterOrder)||void 0===e?void 0:e.length)&&(this._initFilterOrder=this._initFilterOrder.filter(n)),(null===(i=this._initSortOrder)||void 0===i?void 0:i.length)&&(this._initSortOrder=this._initSortOrder.filter(n))}},e.prototype._addToOrder=function(e,i,n){var o=this._children,r=this._initChildren,a=i.parent;this._pull[i.id]=i,i.parent&&this._pull[i.parent]&&Array.isArray(this._pull[i.parent].items)&&!this._pull[i.parent].items.find((function(t){return t.id===i.id}))&&this._pull[i.parent].items.push(i),t.prototype._addToOrder.call(this,e,i,n),h(o,i,a,n),r&&h(r,i,a,n)},e.prototype._parse_data=function(t,e){var i,n,o;void 0===e&&(e=this._root);for(var r=0,a=t;r<a.length;r++){var s=a[r];this.config.init&&(s=this.config.init(s)),s&&"object"!=typeof s&&(s={value:s}),s.id=null!==(i=s.id)&&void 0!==i?i:(0,l.uid)(),s.parent=s.parent&&!(null===(o=null===(n=s.parent)||void 0===n?void 0:n.toString())||void 0===o?void 0:o.includes("_ROOT_"))?s.parent:e,this._pull[s.id]&&(0,d.dhxError)("Item ".concat(s.id," already exist")),this._parseItem(s),s.items&&s.items instanceof Object&&this._parse_data(s.items,s.id)}},e.prototype._parseItem=function(t){this._pull[t.id]=t,this._order[this._order.length]=t,this._children[t.parent]||(this._children[t.parent]=[]),this._children[t.parent].push(t)},e.prototype._recursiveFilter=function(t,e,i,n,o){var r=this,a=this._children[i];if(a){var l=function(t){switch(e.type){case u.TreeFilterType.all:return!0;case u.TreeFilterType.level:return n===e.level;case u.TreeFilterType.leafs:return!r.haveItems(t.id)}};if("function"==typeof t){var s=function(e){return l(e)&&t(e)};(c=a.filter(s)).length?o[i]=c:i===this._root&&(o[i]=[])}else{var c;s=function(e){var i,n=!0;for(var o in t)if(t[o].by&&""!==t[o].match&&(n=t[o].compare?t[o].compare(e[t[o].by],t[o].match,e):-1!==(null===(i=e[t[o].by])||void 0===i?void 0:i.toString().toLocaleLowerCase().indexOf(t[o].match.toString().toLowerCase()))),!n)break;return l(e)&&n};(c=a.filter(s)).length?o[i]=c:i===this._root&&(o[i]=[])}for(var d=0,h=a;d<h.length;d++){var f=h[d];this._recursiveFilter(t,e,f.id,n+1,o)}}},e.prototype._serialize=function(t,e){var i=this;return void 0===t&&(t=this._root),this.map((function(t){var n={};for(var o in t)"parent"===o||"items"===o||o.startsWith("$")||(n[o]=t[o]);return e&&(n=e(n)),i.haveItems(t.id)&&(n.items=i._serialize(t.id,e)),n}),t,!1)},e.prototype._applyFilter=function(t,e){var i=this;if(t&&("function"==typeof t||!(0,l.isEmptyObj)(t))){if(!this._checkFilterRule(t))throw new Error("Invalid filter rule");var n;this._initFilterOrder||(this._initFilterOrder=this._order),this._initChildren||(this._initChildren=this._children);var o={};if("function"!=typeof t)if(n={},(0,l.isDefined)(t.by))n[t.by]=t;else for(var r in t)n[r]=t[r];else n=t;this._recursiveFilter(n,e,this._root,0,o),Object.keys(o).forEach((function(t){for(var e=i.getParent(t),n=i.getItem(t);e;)o[e]||(o[e]=[]),n&&!o[e].find((function(t){return t.id===n.id}))&&o[e].push(n),n=i.getItem(e),e=i.getParent(e)})),this._children=o}},e.prototype._normalizeFilters=function(t){var e={};for(var i in t)e[i]=t[i].rule;return e},e.prototype._checkFilterRule=function(e){var i=this;return t.prototype._checkFilterRule.call(this,e)||Object.values(e).every((function(e){return"function"!=typeof e&&t.prototype._checkFilterRule.call(i,e)}))},e.prototype._applySorters=function(){for(var t in this._children)this._sort.sort(this._children[t],this._sortingStates);if(this._initChildren&&Object.keys(this._initChildren).length)for(var t in this._initChildren)this._sort.sort(this._initChildren[t],this._sortingStates)},e}(s.DataCollection);e.TreeCollection=f},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.dragManager=void 0;var r=i(2),a=i(78),l=i(12),s=i(10),c=i(0);var d=function(t){var e;return null===(e=t.name)||void 0===e?void 0:e.includes("grid")},u=function(t){return d(t)&&t.hasOwnProperty("scrollView")},h=function(){function t(){var t=this;this._transferData={},this._canMove=!0,this._isDrag=!1,this._lastTargetItemState=null,this._lastOverItemId=null,this._onMouseMove=function(e){var i,n;if(t._transferData.start){var o=(0,r.getElementFromPoint)(e),a=(0,r.locate)(o,"data-dhx-drop-area"),l="common"===a,s=e.targetTouches?e.targetTouches[0].pageX:e.pageX,c=e.targetTouches?e.targetTouches[0].pageY:e.pageY;"column"===t._transferData.type&&"group"===a&&(t._transferData.type="group",t._transferData.isWasColumn=!0),"group"===t._transferData.type&&"column"===a&&t._transferData.isWasColumn&&!t._transferData.groupOnly&&(t._transferData.type="column");var d=(0,r.locate)(o),u=null!==(n=null===(i=t._transferData.component.data.getItem(d))||void 0===i?void 0:i.id)&&void 0!==n?n:d;if(a===t._transferData.type||l){var h=t._transferData,f=h.x,p=h.y,g=h.start,v=h.componentId;if(!t._transferData.ghost){if(Math.abs(f-s)<3&&Math.abs(p-c)<3)return;var _=t._onDragStart(g,e);if(!_)return void t._endDrop(e);t._transferData.ghost=_,document.body.appendChild(t._transferData.ghost)}var m=(0,r.locate)(o,"data-dhx-widget-id");"column"!==a&&"group"!==a||m!==v?t._onDrag(e):u!==t._lastOverItemId&&(t._lastOverItemId=u,t._onDrag(e))}else t._canMove&&t.cancelCanDrop(e);t._notAllowedDropArea(a!==t._transferData.type&&!l||!t._transferData.groupable&&"group"===a||t._transferData.groupOnly&&"group"!==a&&!l&&t._transferData.start!=u),t._moveGhost(s,c)}},this._onMouseUp=function(e){t._transferData.x&&(t._transferData.ghost?(t._removeGhost(),t._onDrop(e)):t._endDrop(e),e.targetTouches?(document.removeEventListener("touchmove",t._onMouseMove),document.removeEventListener("touchend",t._onMouseUp)):(document.removeEventListener("mousemove",t._onMouseMove),document.removeEventListener("mouseup",t._onMouseUp)))}}return t.prototype.setItem=function(t,e){a.collectionStore.setItem(t,e)},t.prototype.onMouseDown=function(t){var e,i,n=t.event,l=t.itemsForGhost,s=t.ghost,c=t.source,u=t.type,h=t.groupable,f=t.groupOnly;if(1===n.which||n.targetTouches){n.targetTouches?(document.addEventListener("touchmove",this._onMouseMove,!1),document.addEventListener("touchend",this._onMouseUp,!1)):(document.addEventListener("mousemove",this._onMouseMove),document.addEventListener("mouseup",this._onMouseUp));var p=(0,r.getElementFromPoint)(n),g=(0,r.locateNode)(p,"data-dhx-id"),v=(0,r.locateNode)(p,"data-dhx-widget-id"),_=null==v?void 0:v.getAttribute("data-dhx-widget-id"),m=a.collectionStore.getItem(_),y=g&&g.getAttribute("data-dhx-id"),b=g&&(null!==(i=null===(e=m.data.getItem(y))||void 0===e?void 0:e.id)&&void 0!==i?i:y);if(s&&(this._ghost=s),Array.isArray(c)&&c.includes(b)?(this._transferData.source=o([],c,!0),this._itemsForGhost=l):(this._transferData.source=[b],this._itemsForGhost=null),b&&_){var x=(0,r.getBox)(g),w=d(m)?(0,r.getBox)(v).left:x.left,C=n.targetTouches?n.targetTouches[0].pageX:n.pageX,S=n.targetTouches?n.targetTouches[0].pageY:n.pageY;this._transferData.initXOffset="row"===u?C-w:0,this._transferData.initYOffset="row"===u?S-x.top:0,this._transferData.x=C,this._transferData.y=S,this._transferData.componentId=_,this._transferData.component=m,this._transferData.start=b,this._transferData.item=g,this._transferData.type=u,this._transferData.groupable=h,this._transferData.groupOnly=f}}},t.prototype.isDrag=function(){return this._isDrag},t.prototype.cancelCanDrop=function(t){this._canMove=!1;var e=this._transferData,i=e.start,n=e.source,o=e.target,r=e.dropComponentId,s={start:i,source:n,target:o,dragItem:e.type},c=a.collectionStore.getItem(r);c&&o&&c.events.fire(l.DragEvents.cancelDrop,[s,t,this._transferData.type]),this._transferData.dropComponentId=null,this._transferData.target=null},t.prototype._moveGhost=function(t,e){this._transferData.ghost&&(this._transferData.ghost.style.left=t-this._transferData.initXOffset+"px",this._transferData.ghost.style.top=e-this._transferData.initYOffset+"px")},t.prototype._removeGhost=function(){this._ghost=null,document.body.removeChild(this._transferData.ghost)},t.prototype._onDrop=function(t){if(this._canMove){var e=this._transferData,i=e.start,n=e.source,o=e.target,s=e.dropComponentId,c=e.dropPosition,d={start:i,source:n,target:o,dropPosition:c},u=a.collectionStore.getItem(s),h=u&&u.config,f=this._transferData.componentId==(0,r.locate)((0,r.getElementFromPoint)(t),"data-dhx-widget-id");if(!u||"source"===h.dragMode||f&&n.find((function(t){return t==o})))this._endDrop(t);else{if(u.events.fire(l.DragEvents.beforeDrop,[d,t,this._transferData.type])){var p={id:o,component:u},g={id:i,component:this._transferData.component,newId:null};"group"!==this._transferData.type&&this._move(g,p),g.newId&&g.component!==p.component&&(d.start=g.newId),p.component.events.fire(l.DragEvents.afterDrop,[d,t,this._transferData.type])}this._endDrop(t)}}else this._endDrop(t)},t.prototype._onDragStart=function(t,e){var i=this._transferData.component.config,n=this._transferData,o={start:n.start,source:n.source,target:n.target};if("target"===i.dragMode||this._transferData.component._pregroupData)return null;var r="row"===this._transferData.type?function(t,e,i){void 0===i&&(i=!1);var n=t.getBoundingClientRect(),o=document.createElement("div"),r=t.cloneNode(!0),a=window.getComputedStyle(t.parentElement).fontSize;return r.style.width=n.width+"px",r.style.height=n.height+"px",r.style.maxHeight=n.height+"px",r.style.opacity="0.8",r.style.fontSize=a,i&&e&&e.length||o.appendChild(r),e&&e.length&&e.forEach((function(t,e){var r=t.cloneNode(!0);r.style.getPropertyPriority("width")||(r.style.width=n.width+"px"),r.style.height=n.height+"px",r.style.maxHeight=n.height+"px",r.style.top=12*(e+1)-n.height-n.height*e+"px",r.style.left=12*(e+1)+"px",r.style.opacity="0.6",r.style.zIndex="".concat(-e-1),i||(r.style.fontSize=a,r.style.overflow="hidden"),o.appendChild(r)})),o.className="dhx_drag-ghost",o}(this._transferData.item,this._itemsForGhost,d(this._transferData.component)):this._ghost;return this._transferData.component.events.fire(l.DragEvents.beforeDrag,[o,e,r,this._transferData.type])&&(0,c.isId)(t)?(this._transferData.component.events.fire(l.DragEvents.dragStart,[o,e,this._transferData.type]),this._isDrag=!0,this._toggleTextSelection(!0),this._transferData.dragConfig=i,r):null},t.prototype._onDrag=function(t){var e,i,n=(0,r.getElementFromPoint)(t),o=(0,r.locate)(n,"data-dhx-widget-id"),c=a.collectionStore.getItem(o);if(c){var d=!!(0,r.locateNodeByClassName)(n,"dhx_grid-header")||!!(0,r.locateNodeByClassName)(n,"dhx_grid-footer"),u=c.config.columns?c.config:void 0,h=u&&("both"===u.dragItem||"column"===u.dragItem);if(!d||h){var f=(0,r.locate)(n,"data-dhx-id"),p=(0,r.locate)(n,"data-dhx-root-id"),g=this._transferData,v=g.dropComponentId,_=g.start,m=g.source,y=g.target,b=g.componentId,x=function(t){var e=t.targetTouches?t.targetTouches[0].clientY:t.clientY,i=(0,r.locateNode)((0,r.getElementFromPoint)(t));if(!i)return null;var n=i.childNodes[0];if(1===(null==n?void 0:n.nodeType)){var o=n.getBoundingClientRect();return(e-o.top)/o.height}}(t);if("group"!==this._transferData.type){if(!f&&!p)return this.cancelCanDrop(t),this._transferData.dropComponentId=o,this._transferData.target=null,void this._canDrop(t);if(!c.config.group)switch(c.config.dropBehaviour){case"complex":this._transferData.dropPosition=x<=.25?"top":x>=.75?"bottom":"in";break;case"child":this._transferData.dropPosition="in";break;default:this._transferData.dropPosition=x<=.5?"top":"bottom"}if(((null===(e=this._lastTargetItemState)||void 0===e?void 0:e.id)===f&&(null===(i=this._lastTargetItemState)||void 0===i?void 0:i.dropPosition)===this._transferData.dropPosition||!f&&y===p)&&v===o)return}var w={id:_,component:this._transferData.component};if("source"!==c.config.dragMode)if(w.component.events.fire(l.DragEvents.dragOut,[{start:_,source:m,target:y},t,this._transferData.type]),o!==b||!(0,s.isTreeCollection)(w.component.data)||(0,s.isTreeCollection)(w.component.data)&&w.component.data.canCopy(w.id,f)){this.cancelCanDrop(t);var C=this._transferData.target=f||p;this._transferData.dropComponentId=o,this._lastTargetItemState={id:f,dropPosition:this._transferData.dropPosition},w.component.events.fire(l.DragEvents.dragIn,[{start:_,source:m,target:C,dropPosition:this._transferData.dropPosition},t,this._transferData.type])&&this._canDrop(t)}else this.cancelCanDrop(t)}else this._canMove&&this.cancelCanDrop(t)}else this._canMove&&this.cancelCanDrop(t)},t.prototype._move=function(t,e){var i,r=t.component,a=e.component,l=t.component.data,h=e.component.data,f=0,p=e.id,g=(0,s.isTreeCollection)(h),v=g&&e.component.config.dropBehaviour||null,_=r._uid===a._uid,m=t.component.config.columns?t.component.config:void 0,y="column"===this._transferData.type&&(null===(i=null==m?void 0:m.columns)||void 0===i?void 0:i.map((function(t){return t.id})).filter((function(i){return i===t.id||i===e.id})).length);if(y&&t.component===e.component){if(t.id===e.id)return;var b=(x=r.config.columns.map((function(t){return n({},t)}))).findIndex((function(e){return e.id===t.id}));if(-1===(S=x.findIndex((function(t){return t.id===e.id}))))return;return x.splice(S,0,x.splice(b,1)[0]),r.setColumns(x),void r.paint()}if(y&&t.component&&u(t.component)&&e.component&&u(e.component)){b=(x=r.config.columns.map((function(t){return n({},t)}))).findIndex((function(e){return e.id===t.id}));var x,w=a.config.columns.map((function(t){return n({},t)})),C=a.data.getLength(),S=w.findIndex((function(t){return t.id===e.id})),E=[],D=t.id;r.data.forEach((function(e){var i;E.push(((i={id:e.id})[D]=e[t.id],i))})),C?r.data.forEach((function(t,e){var i=a.data.getItem(t.id);i?a.data.update(i.id,n(n({},i),E[e])):a.data.add(E[e])})):a.data.parse(E);var O=x.splice(b,1)[0];return w.find((function(t){return t.id===D}))||w.splice(S,0,O),a.setColumns(w),a.paint(),r.setColumns(x),void r.paint()}var k=e.id===a.config.rootParent,T=this._transferData.dropPosition;switch(v){case"child":break;case"sibling":if(!h.getItem(e.id))return;var R=h.getIndex(t.id),M=h.getIndex(e.id),I=h.getParent(t.id),P=h.getParent(e.id);p=h.getParent(p),"top"===T?f=M-(-1===R||R>M||I!==P?0:1):"bottom"===T&&(f=M+(-1===R||R>M||I!==P?1:0));break;case"complex":if(k)p=e.id,f=h.getLength();else{var H=h.getItem(t.id),F=h.getItem(e.id);if(!F)return;R=h.getIndex(t.id),M=h.getIndex(e.id);var A=(null==H?void 0:H.$level)||0,j=(null==F?void 0:F.$level)||0;"top"===T?(p=h.getParent(p),f=A===j?M-(-1===R||R>M?0:1):M):"bottom"===T&&(p=h.getParent(p),f=A===j?M+(-1===R||R>M?1:0):M+1)}break;default:if((0,c.isId)(e.id)){h.getIndex(t.id)>-1&&(t.newId=(0,c.uid)());R=h.getIndex(t.id),M=h.getIndex(e.id);f="top"===T?M-(-1===R||R>M?0:1):"bottom"===T?M+(-1===R||R>M?1:0):h.getIndex(e.id)}else f=-1}if(this._transferData.dragConfig.dragCopy)this._transferData.source instanceof Array&&this._transferData.source.length>1?this._transferData.source.map((function(t){l.copy(t,f,h,p),f>-1&&f++})):l.copy(t.id,f,h,p);else if(this._transferData.source instanceof Array&&this._transferData.source.length>1)l.move(this._transferData.source,f,h,p);else if(d(a)&&!a.config.columns.length){var $=r.data.getItem(t.id);a.data.parse([n({},$)]),a.setColumns(o([],r.config.columns,!0)),a.paint(),r.data.remove(t.id),r.paint()}else l.move(t.id,f,h,p,t.newId);_||this._transferData.source.forEach((function(t){var e;null===(e=h.getItem(t))||void 0===e||delete e.$draggable,g&&(null==h?void 0:h.haveItems(t))&&h.eachChild(t,(function(t){delete t.$draggable}))}))},t.prototype._endDrop=function(t){if(this._toggleTextSelection(!1),this._notAllowedDropArea(!1),this._transferData.component){var e=this._transferData,i={start:e.start,source:e.source,target:e.target};this._transferData.component.events.fire(l.DragEvents.afterDrag,[i,t,this._transferData.type])}this.cancelCanDrop(t),this._canMove=!0,this._isDrag=!1,this._lastOverItemId=null,this._transferData={},this._transferData.target=null,this._transferData.dropComponentId=null,this._lastTargetItemState=null},t.prototype._canDrop=function(t){this._canMove=!0;var e=this._transferData,i={start:e.start,source:e.source,target:e.target,dropPosition:e.dropPosition},n=a.collectionStore.getItem(this._transferData.dropComponentId);n&&this._transferData.target&&n.events.fire(l.DragEvents.canDrop,[i,t,this._transferData.type])},t.prototype._toggleTextSelection=function(t){t?document.body.classList.add("dhx_no-select"):document.body.classList.remove("dhx_no-select")},t.prototype._notAllowedDropArea=function(t){t?document.body.classList.contains("dhx_drop-area--not-allowed")||document.body.classList.add("dhx_drop-area--not-allowed"):document.body.classList.remove("dhx_drop-area--not-allowed")},t}(),f=window.dhxHelpers=window.dhxHelpers||{};f.dragManager=f.dragManager||new h,e.dragManager=f.dragManager},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.collectionStore=e.CollectionStore=void 0;var n=i(0),o=function(){function t(){this._store={}}return t.prototype.setItem=function(t,e){this._store[t]=e},t.prototype.getItem=function(t){return(0,n.isId)(t)&&this._store[t]?this._store[t]:null},t}();e.CollectionStore=o;var r=window.dhxHelpers=window.dhxHelpers||{};r.collectionStore=r.collectionStore||new o,e.collectionStore=r.collectionStore},function(t,e,i){"use strict";(function(t){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.LazyDataProxy=void 0;var r=i(15),a=i(0),l=i(23),s=function(e){function i(t,i){var n=e.call(this,t)||this;return n.config=(0,a.extend)({from:0,limit:50,delay:50,prepare:0},i),n.updateUrl(t,{from:n.config.from,limit:n.config.limit}),n}return o(i,e),i.prototype.load=function(){var e=this;return new t((function(t,i){e._timeout?(clearTimeout(e._timeout),e._timeout=setTimeout((function(){l.ajax.get(e.url,{responseType:"text"}).then(t).catch(i),e._cooling=!0}),e.config.delay),e._cooling&&(t(null),e._cooling=!1)):(l.ajax.get(e.url,{responseType:"text"}).then(t).catch(i),e._cooling=!0,e._timeout=setTimeout((function(){})))}))},i}(r.DataProxy);e.LazyDataProxy=s}).call(this,i(9))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;var n=i(6),o=i(16),r=i(12),a=i(0),l=function(){function t(t,e,i){var o=this;this.events=i||new n.EventSystem(this),this.config=t,this._data=e,this._selected=null,this._data.events.on(r.DataEvents.removeAll,(function(){o._selected=null})),this._data.events.on(r.DataEvents.change,(function(){if((0,a.isId)(o._selected)){var t=o._data.getNearId(o._selected);t!==o._selected&&(o._selected=null,t&&o.add(t))}}))}return t.prototype.getId=function(){return this._selected},t.prototype.getItem=function(){return(0,a.isId)(this._selected)?this._data.getItem(this._selected):null},t.prototype.remove=function(t){return t=null!=t?t:this._selected,!(0,a.isDefined)(t)||!!this.events.fire(o.SelectionEvents.beforeUnSelect,[t])&&(this._data.update(t,{$selected:!1},!0),this._selected=null,this.events.fire(o.SelectionEvents.afterUnSelect,[t]),!0)},t.prototype.add=function(t){this._selected!==t&&!this.config.disabled&&this._data.exists(t)&&(this.remove(),this._addSingle(t))},t.prototype.enable=function(){this.config.disabled=!1},t.prototype.disable=function(){this.remove(),this.config.disabled=!0},t.prototype._addSingle=function(t){this.events.fire(o.SelectionEvents.beforeSelect,[t])&&(this._selected=t,this._data.update(t,{$selected:!0},!0),this.events.fire(o.SelectionEvents.afterSelect,[t]))},t}();e.Selection=l},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Grid=void 0;var l=i(1),s=i(6),c=i(2),d=i(0),u=i(25),h=i(11),f=i(8),p=i(82),g=i(4),v=i(14),_=i(5),m=i(88),y=i(3),b=i(89),x=i(7),w=i(21),C=i(121),S=i(122),E=i(19),D=i(126),O=i(127),k=i(20),T=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,e,i)||this;if(n._touch={duration:350,dblDuration:300,timer:null,start:!1},n._destructed=!1,n._sortingStates=[],n._dropManager=null,n._commonSummary={},n._colSummary={},n.version="9.3.6",n.name="grid",n.config=(0,d.extend)({rowHeight:40,headerRowHeight:40,footerRowHeight:40,keyNavigation:!0,sortable:!0,columns:[],data:[],tooltip:!0,rootParent:"string"==typeof e&&e||n._uid},n._normalizeConfig(i)),n.content=(0,w.getContent)(n),n._scroll={top:0,left:0},n.config.autoWidth=n.config.autoWidth||n.config.fitToContainer,n.config.adjust=n.config.adjust||n.config.columnsAutoWidth,n.config.editable=n.config.editable||n.config.editing,n.config.leftSplit=n.config.leftSplit||n.config.splitAt,n.config.columns.forEach((function(t){"date"===t.type&&t.format&&(t.dateFormat=t.format)})),n._setHTMLEventHandlers(),n.config.eventHandlers)for(var o=0,r=Object.entries(n.config.eventHandlers);o<r.length;o++){var a=r[o],l=a[0],s=a[1];n._htmlEvents[l]=(0,c.eventHandler)((function(t){return{col:n.getColumn((0,c.locate)(t,"data-dhx-col-id")||(0,c.locate)(t,"data-dhx-id"))||{},row:n.data.getItem((0,c.locate)(t,"data-dhx-id"))||{}}}),s,n._htmlEvents[l])}return n._init(),n._dragInit(),n.config.columns&&n._parseColumns(!0),n._canDataParse()&&n.data.parse(n.config.data),n.selection=new m.Selection(n,{type:"string"==typeof n.config.selection&&n.config.selection||"complex",disabled:!n.config.selection,multiSelection:n.config.multiselection},n.events,n._uid),n.mount(e,n._createView()),i.autoEmptyRow&&0===n.data.getLength()&&(n._addEmptyRow(),n.paint()),n}return o(e,t),e.prototype.destructor=function(){var t;this._destructed=!0,this._destroyContent(),null===(t=this.config.$subRowCells)||void 0===t||t.forEach((function(t){var e;null===(e=t.cell)||void 0===e||e.destructor()})),this.keyManager&&this.keyManager.destructor(),this.events&&this.events.clear(),this._events&&this._events.clear(),this.export=this.content=this.selection=null,this._activeFilters=this._filterData=this._scroll=this._touch=this._htmlEvents=this._hiddenFilters=this.config.$subRowCells=null,this.unmount()},e.prototype.setColumns=function(t){var e=this;this._destroyContent(),this.config.columns=t,this._parseColumns(!0),(0,_.isAutoWidth)(this.config)&&this._applyAutoWidth(),this._setSummary(),this._adjustColumns(),this._checkFilters(),this._checkMarks(),this._normalizeSpans(),this.paint(),this.config.keyNavigation&&(0,l.awaitRedraw)().then((function(){e._initHotKey(!0),e.paint()}))},e.prototype.addRowCss=function(t,e){var i=this.data.getItem(t);if(i){var n=i.$css||"";n.match(new RegExp(e,"g"))||(i.$css=n+" ".concat(e),this.paint())}else(0,f.dhxWarning)('Row with id "'.concat(t,'" not found'))},e.prototype.removeRowCss=function(t,e){var i=this.data.getItem(t);if(i){var n=i.$css?i.$css.replace(e,""):"";i.$css=n,this.paint()}else(0,f.dhxWarning)('Row with id "'.concat(t,'" not found'))},e.prototype.addCellCss=function(t,e,i){var n=this.getColumn(e);if(n){n.$cellCss=n.$cellCss||{};var o=n.$cellCss[t];if(o){var r=o.match(new RegExp(i,"g"))?"":" ".concat(i);n.$cellCss[t]+=r}else this.data.getItem(t)&&(n.$cellCss[t]="".concat(i," "));this.paint()}},e.prototype.removeCellCss=function(t,e,i){var n=this.getColumn(e);n&&(n.$cellCss[t]?(n.$cellCss[t]=n.$cellCss[t].replace(i,""),this.paint()):this.data.getItem(t)&&(n.$cellCss[t]=""))},e.prototype.showColumn=function(t){var e=this.getColumn(t);e&&e.hidden&&this.events.fire(y.GridEvents.beforeColumnShow,[e])&&(this._showColumn(e),this.events.fire(y.GridEvents.afterColumnShow,[e]))},e.prototype.hideColumn=function(t){var e=this.getColumn(t);e&&!e.hidden&&this.events.fire(y.GridEvents.beforeColumnHide,[e])&&(this._hideColumn(e),this.events.fire(y.GridEvents.afterColumnHide,[e]))},e.prototype.isColumnHidden=function(t){var e=this.getColumn(t);if(e)return!!e.hidden},e.prototype.showRow=function(t){if((0,d.isDefined)(t)){var e=t.toString(),i=this.data.getItem(e);i&&i.hidden&&this.events.fire(y.GridEvents.beforeRowShow,[i])&&(this.data.update(e,{hidden:!1}),this._checkFilters(!0),this.paint(),this.events.fire(y.GridEvents.afterRowShow,[i]))}},e.prototype.hideRow=function(t){if((0,d.isDefined)(t)){var e=t.toString(),i=this.data.getItem(e);i&&this.events.fire(y.GridEvents.beforeRowHide,[i])&&(this.data.update(e,{hidden:!0}),this._checkFilters(!0),this._checkSelectFilterValue(),this.paint(),this.events.fire(y.GridEvents.afterRowHide,[i]))}},e.prototype.isRowHidden=function(t){if((0,d.isDefined)(t)){var e=this.data.getItem(t.toString());return e?!!e.hidden:void 0}},e.prototype.getScrollState=function(){return{x:this._scroll.left,y:this._scroll.top}},e.prototype.scroll=function(t,e){var i=this.getRootView().refs.grid_body.el.querySelector(".scroll-view")||this.getRootView().refs.grid_body.el;i.scrollLeft=!t&&0!==t||"number"!=typeof t?i.scrollLeft:t,i.scrollTop=!e&&0!==e||"number"!=typeof e?i.scrollTop:e,this.paint()},e.prototype.scrollTo=function(t,e){var i=this.config,n=i.topSplit,o=i.bottomSplit,r=i.columns,a=i.$width,l=i.$height,s=i.$headerHeight,c=r.filter((function(t){return!t.hidden})),u=this.data.getRawData(0,-1,null,2),h=c.findIndex((function(t){return t.id==e})),f=u.findIndex((function(e){return e.id==t}));if((0,d.isDefined)(h)&&(0,d.isDefined)(f)){var p=this.getScrollState(),v=this.selection.getCell(),m=v&&r.findIndex((function(t){return t.id==v.column.id})),b=v&&u.findIndex((function(t){return t.id==v.row.id})),w=(0,x.getCurrFixedCols)(this.config,y.Split.left).length,C=(0,x.getCurrFixedCols)(this.config,y.Split.right).length,S=w&&m<w,E=C&&m>=r.length-C,D=n&&b<n,O=o&&b>=u.length-o,k=(0,_.getTotalWidth)(c.slice(0,h)),T=(0,_.getTotalHeight)(u.slice(0,f)),R=(0,g.getTotalRowHeight)(u[f]);if(w){var M=(0,_.getTotalWidth)((0,x.getCurrFixedCols)(this.config,y.Split.left));(!S&&!E&&h<m||k-p.x-M<0)&&(k-=M)}if(C){var I=(0,_.getTotalWidth)((0,x.getCurrFixedCols)(this.config,y.Split.right));(!S&&!E&&h>m||a+p.x-k-c[h].$width-I<0)&&(k+=I)}if(n){var P=(0,_.getTotalHeight)(u.slice(0,n));(!D&&!O&&f<b||T-p.y-P<0)&&(T-=P)}if(o){var H=(0,_.getTotalHeight)(u.slice(-o));(!D&&!O&&f>b||l+p.y-s-T-R-H<0)&&(T+=H)}var F=a+p.x,A=l+p.y-s,j=T-p.y-R,$=k-p.x-r[h].$width,L=T+2*R+18-A,N=k+2*r[h].$width+18-F,V=j>0&&L<0?0:j<0?j:L,W=$>0&&N<0?0:$<0?$:N;this.scroll(W+p.x,V+p.y)}},e.prototype.adjustColumnWidth=function(t,e){void 0===e&&(e=!0);var i=this.config.columns.filter((function(t){return!t.hidden})),n=i.filter((function(e){return e.id===t})),o=this._adjustColumnsWidth({rows:this.config.data,cols:n,totalCols:i,adjust:e});this.config.$totalWidth=i.reduce((function(t,e){if(o[e.id]){e.$fixedWidth=!0;var i=e.maxWidth,n=e.minWidth,r=o[e.id];e.$width=r,i&&r>i&&(e.$width=i),n&&e.$width<n&&(e.$width=n)}return t+e.$width}),0),this.paint()},e.prototype.getCellRect=function(t,e){var i,n,o=this.config.columns.filter((function(t){return!t.hidden}));(0,d.isDefined)(e)||(e=this.config.columns[0].id);var r=this.data.getRawData(0,-1),a=this.getSpan(t,e),l=o.findIndex((function(t){return t.id==(a?a.column:e)})),s=r.findIndex((function(e){return e.id==(a?a.row:t)})),c=(0,_.getTotalWidth)(o.slice(0,l)),u=(0,_.getTotalHeight)(r.slice(0,s));if("bottom"===this.config.footerPosition&&"auto"!==this.config.height&&this.config.$height>=this.config.$totalHeight&&this.config.bottomSplit){var h=r.slice(-this.config.bottomSplit)||[],f=h.findIndex((function(e){return e.id===t}));if(h.length&&-1!==f){var p=(0,x.calcScrollBarWidth)(this.config,!!(null===(i=this.scrollView)||void 0===i?void 0:i.config.enable));u=this.config.$height-this.config.$footerHeight-this.config.$headerHeight-(0,_.getTotalHeight)(h.slice(f))-p.x-x.BORDERS}}return{x:c,y:u,height:(null==a?void 0:a.rowspan)>1?(0,v.getSpanHeight)(r,a):(0,g.getTotalRowHeight)(r[s])||0,width:(null==a?void 0:a.colspan)>1?(0,v.getWidth)(this.config.columns,a.colspan,this.config.columns.findIndex((function(t){return t.id===a.column}))):(null===(n=o[l])||void 0===n?void 0:n.$width)||0}},e.prototype.getColumn=function(t){for(var e,i=0,n=null===(e=this.config)||void 0===e?void 0:e.columns;i<n.length;i++){var o=n[i];if(o.id==t)return o}},e.prototype.addSpan=function(t){this.config.spans=this.config.spans||[];var e=(0,d.findIndex)(this.config.spans,(function(e){return"".concat(e.row)==="".concat(t.row)&&"".concat(e.column)==="".concat(t.column)}));e>=0?this.config.spans[e]=t:(this.config.spans.push((0,E.normalizeSpan)(t,this.config,this.data)),this._checkMarks(),this.paint())},e.prototype.getSpan=function(t,e){var i,n=this;if(this.config.spans){var o=this.data.getIndex(t.toString()),r=this.config.columns.findIndex((function(t){return t.id===e})),a=(0,d.findIndex)(this.config.spans,(function(t){var e=n.data.getIndex(t.row.toString()),i=n.config.columns.findIndex((function(e){return e.id===t.column})),a=e,l=t.rowspan?e+t.rowspan:e+1,s=i,c=t.colspan?i+t.colspan:i+1;return o>=a&&o<l&&r>=s&&r<c}));return null===(i=this.config)||void 0===i?void 0:i.spans[a]}},e.prototype.removeSpan=function(t,e){if(this.config.spans){var i=(0,d.findIndex)(this.config.spans,(function(i){return"".concat(i.row)=="".concat(t)&&"".concat(i.column)=="".concat(e)}));this.config.spans.splice(i,1),this.paint()}},e.prototype.editCell=function(t,e,i){var n,o=this.data.getItem(t),r=this.getColumn(e);if(o&&r){var a=r.editorType,l=this.getSpan(o.id,r.id);if(!l||"function"!=typeof l.text){if(i||(i=this.config.autoHeight&&"number"!==r.type?"textarea":"input","date"===r.type&&(i="datePicker"),"boolean"===r.type&&(i="checkbox"),a&&(i=a),(0,d.isDefined)(null==l?void 0:l.text)&&(i=this.config.autoHeight?"textarea":"input")),"number"===r.type)if(!((0,d.isDefined)(null==l?void 0:l.text)&&["input","textarea"].includes(i))&&!["input","select","combobox"].includes(i))return;this.events.fire(y.GridEvents.beforeEditStart,[o,r,i])&&((null===(n=this.config.$editable)||void 0===n?void 0:n.editor)||this.config.$editable&&this.config.$editable.row===t&&this.config.$editable.col===e&&this.config.$editable.editorType===i||(this.config.$editable={row:o.id,col:r.id,isSpan:!!l,editorType:i},this.selection.config.disabled||this.selection.setCell(t.toString(),e.toString()),this.paint(),this.events.fire(y.GridEvents.afterEditStart,[o,r,i])))}}else(0,f.dhxWarning)("item not found")},e.prototype.editEnd=function(t){this.config.$editable&&this.config.$editable.editor&&this.config.$editable.editor.endEdit(t)},e.prototype.getHeaderFilter=function(t){var e=this,i=this.getColumn(t);if(i){var n=null;return i.header.forEach((function(i){i.content&&(n=e.content[i.content].element[t])})),n}},e.prototype.getSummary=function(t){return r(r({},this._commonSummary),t?this._colSummary[t]:{})},e.prototype.getSortingState=function(){var t,e=null===(t=this._sortingStates)||void 0===t?void 0:t[0];return{dir:e.dir,by:e.by}},e.prototype._createView=function(){var t=this;return(0,l.create)({render:function(e,i){return t._destructed?(0,l.el)("div"):(0,b.render)(e,i,t._htmlEvents,t.selection,t._uid)},hooks:this._initHooks()},this)},e.prototype._dragInit=function(){(this.config.dragMode||this.config.dragItem)&&(f.dragManager.setItem(this._uid,this),this._dropManager=new D.DropManager({view:this}),this.config.dragItem||(this.config.dragItem="row"),this.config.dragMode||(this.config.dragMode="both"))},e.prototype._parseColumns=function(t){void 0===t&&(t=!1);var e=this.config.columns.filter((function(t){return!t.hidden}));this.normalizeColumns({config:this.config,columns:e,configChanged:t}),(0,g.countColumns)(this.config,e)},e.prototype.normalizeColumns=function(t){var e,i,n,o=this,r=t.config,a=t.columns,l=t.configChanged;r.$headerHeightMap=[],r.$footerHeightMap=[],r.$headerHeight=r.$footerHeight=0;for(var s=0,c=a;s<c.length;s++){(p=c[s]).htmlEnable=null!==(e=p.htmlEnable)&&void 0!==e?e:r.htmlEnable,p.$cellCss=p.$cellCss||{},(0,g.normalizeArray)(p,"header"),(0,g.normalizeArray)(p,"footer"),p.minWidth&&p.minWidth<20&&(p.minWidth=20),p.maxWidth&&p.maxWidth<20&&(p.maxWidth=20);var d=p.minWidth||100;p.width&&(d=(d=p.maxWidth&&p.minWidth?p.width>=p.minWidth&&p.width<=p.maxWidth?p.width:p.width>=p.maxWidth?p.maxWidth:p.minWidth:p.maxWidth?p.width<=p.maxWidth?p.width:p.maxWidth>100?p.maxWidth:100:p.minWidth?p.width>=p.minWidth?p.width:p.minWidth:p.width)<20?20:d),p.$width=p.$width&&!l?p.$width:d,p.$width>p.maxWidth&&(p.$width=p.maxWidth),p.$width<p.minWidth&&(p.$width=p.minWidth)}for(var u=function(t){if(null===(i=t.header)||void 0===i?void 0:i.length){var e=0;t.header.forEach((function(i,n){(e=r.headerAutoHeight?o.getNormalizeContentHeight(i,t,r):r.headerRowHeight)>(r.$headerHeightMap[n]||0)&&(r.$headerHeightMap[n]=Math.max(e,r.headerRowHeight))}))}if(null===(n=t.footer)||void 0===n?void 0:n.length){var a=0;t.footer.forEach((function(e,i){(a=r.footerAutoHeight?o.getNormalizeContentHeight(e,t,r):r.footerRowHeight)>(r.$footerHeightMap[i]||0)&&(r.$footerHeightMap[i]=Math.max(a,r.footerRowHeight))}))}},h=0,f=a;h<f.length;h++){var p;u(p=f[h])}r.$headerHeight=r.$headerHeightMap.reduce((function(t,e){return t+e}),0),r.$footerHeight=r.$footerHeightMap.reduce((function(t,e){return t+e}),0)},e.prototype.getNormalizeContentHeight=function(t,e,i){return this.config.footerRowHeight},e.prototype._parseData=function(){this._detectColsTypes(),this.config.data=this.data.map((function(t){return t})),this.config.data=this._prepareData(this.data),this._checkMarks(),this._applyLocalFilter(),this._checkFilters()},e.prototype._createCollection=function(){this.data=new f.DataCollection(null,this.events)},e.prototype._getRowIndex=function(t){return this.data.getIndex(t)},e.prototype._setHTMLEventHandlers=function(){var t=this,e=function(e){var i,n=t.getColumn((0,c.locate)(e,"data-dhx-col-id")),o=t.data.getItem((0,c.locate)(e,"data-dhx-id"));if(o&&n&&(0,_.isTooltip)(t.config,n)){var a=void 0;if("combobox"===n.editorType||"select"===n.editorType){var l=(0,g.getEditorOptions)(n,o).find((function(t){var e;return(t instanceof Object?t.id.toString():t)===(null===(e=o[n.id])||void 0===e?void 0:e.toString())}));a=l instanceof Object?l.value:l}else if("multiselect"===n.editorType){var s=null===(i=o[n.id])||void 0===i?void 0:i.toString().split(", ");if(null==s?void 0:s.length)a=(0,g.getEditorOptions)(n,o).filter((function(t){return s.includes(t instanceof Object?t.id.toString():t)})).map((function(t){return t instanceof Object?t.value:t})).join(", ")}var d=(0,g.applyPattern)(a||o[n.id],n),u=function(){return!!d||"boolean"==typeof d};n.tooltipTemplate?d=n.tooltipTemplate(d,o,n)||null:u()&&n.template&&(d=n.template(d,o,n)),u()&&(0,_.showTooltip)(d,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,n)},(0,_.getTooltipConfig)(t.config,n)))}},i=function(e,i){var n;void 0===i&&(i="header");var o=(0,c.locate)(e,"data-dhx-text-id"),a=(0,c.locate)(e,"data-dhx-id"),l=t.getColumn(a);if(o&&l){var s=null===(n=l[i])||void 0===n?void 0:n.find((function(t){return t.id===o}));if((0,_.isContentTooltip)(t.config,l,s,i)){var d=null==s?void 0:s.text,u=t.getSummary(l.id);"function"==typeof d&&(d=d(u)),"function"==typeof(null==s?void 0:s.tooltipTemplate)&&(d=s.tooltipTemplate(r({value:d},u),s,l)||null),(null==d?void 0:d.toString().length)&&(0,_.showTooltip)(d,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,l,s)},(0,_.getTooltipConfig)(t.config,l,s,i)))}}},n=function(e){var i,n=t.getColumn((0,c.locate)(e,"data-dhx-col-id")),o=t.data.getItem((0,c.locate)(e,"data-dhx-id")),a=t.getSpan(o.id,n.id);if(o&&a&&(0,_.isTooltip)(t.config,a)){var l=t.getSummary(n.id),s=null===(i=("function"==typeof a.text?a.text(l):a.text)||(0,g.applyPattern)(o[n.id],n))||void 0===i?void 0:i.toString();a.tooltipTemplate?s=a.tooltipTemplate(r({value:s},l),a)||null:n.template&&(s=n.template(s,o,n)),s&&(0,_.showTooltip)(s,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,n)},(0,_.getTooltipConfig)(t.config,null,a)))}};this._htmlEvents={onclick:(0,c.eventHandler)((function(t){return(0,c.locate)(t)}),{"dhx_grid-header-cell--sortable":function(e,i){var n=e.target.getAttribute("dhx_resized"),o=t.getColumn(i);if(o&&(0,_.isSortable)(t.config,o)&&!n){var r=(0,c.locate)(e,"data-dhx-text-id"),a=o.header.find((function(t){return t.id===r}));t._sort(i,a.sortAs)}},"dhx_grid-expand-cell":function(e,i){e.target.classList.contains("dhx_grid-expand-cell-icon")&&t.events.fire(y.GridEvents.expand,[i])},"dhx_span-expand-cell":function(e,i){e.target.classList.contains("dhx_span-expand-cell-icon")&&t.events.fire(y.GridEvents.expand,[i])}}),onscroll:function(e){t.events.fire(y.GridEvents.scroll,[{y:e.target.scrollTop,x:e.target.scrollLeft}])},onmouseover:function(t){for(var o=[{className:"dhx_grid-header-cell",action:function(t){return i(t,"header")}},{className:"dhx_grid-footer-cell",action:function(t){return i(t,"footer")}},{className:"dhx_grid-cell",action:e},{className:"dhx_span-cell",action:n}],r=0,a=o;r<a.length;r++){var l=a[r],s=l.className,d=l.action,u=(0,c.locateNodeByClassName)(t,s);if(u){d(u);break}}}}},e.prototype._setEventHandlers=function(){var t=this;this.data.events.on(f.DataEvents.load,(function(){if(t._applyLocalFilter(!0),t._parseData(),t._parseColumns(),t.config.autoEmptyRow){var e=t.data.find({by:"$emptyRow",match:!0});e?t.data.move(e.id,t.data.getLength()-1):t._addEmptyRow()}t.config.data instanceof f.DataCollection?(0,l.awaitRedraw)().then((function(){return t._normalizeSpans()})):t._normalizeSpans(),t.paint()})),this.data.events.on(f.DataEvents.change,(function(e,i,n){if("load"!==i&&"add"!==i&&"remove"!==i)if("setPage"!==i){if("sort"===i?t._setSort():"update"===i?t.config.data=t._prepareData(t.data):((0,f.isTreeCollection)(t.data)?t.config.data=t._prepareData(t.data):t._setSummary(),t._adjustColumns()),(0,d.isId)(e)&&(t._checkFilters(),t._checkSelectFilterValue()),t._detectColsTypes(),t._removeMarks(),t._checkMarks(),t.config.autoEmptyRow&&(!t._activeFilters||(0,d.isEmptyObj)(t._activeFilters))){var o=t.data.find({by:"$emptyRow",match:!0});if(o){if(o.id===e)return;t.data.move(o.id,t.data.getLength()-1)}else t._addEmptyRow()}if("sort"===i)t._normalizeSpans();t._render()}else(0,l.awaitRedraw)().then((function(){var e=t.config.columns.find((function(t){return!0!==t.hidden}));t.scrollTo(t.data.getId(n[0]).toString(),e.id.toString()),t._render()}))})),this.data.events.on(f.DataEvents.filter,(function(e){e||t.data.getRawFilters({permanent:!0})||t._applyLocalFilter(),!e||(0,f.isOnlyPermanentFilters)(e)?(t._filterData=t.data.map((function(t){return t}))||[],t._setUniqueData(),t._clearFilterValue()):t._checkFilters(),t._setSummary(),t._removeMarks(),t._checkMarks(),t._normalizeSpans(),t.paint()})),this.data.events.on(f.DataEvents.removeAll,(function(){t._hiddenFilters={},t.config.columns.map((function(t){t.header.map((function(e){!e.content||"selectFilter"!==e.content&&"comboFilter"!==e.content||(t.$uniqueData=[])}))})),(0,d.isEmptyObj)(t._activeFilters)||t.data.resetFilter(),t._clearFilterValue(!0)})),this.data.events.on(f.DataEvents.afterAdd,(function(e,i,n){i.length===++n&&t._handleRow(e.id,"add")})),this.data.events.on(f.DataEvents.afterRemove,(function(e,i,n){i.length===++n&&t._handleRow(e.id,"remove")})),this.events.on(f.DragEvents.beforeDrag,(function(e,i,n,o){if("row"===o)return!t.data.isGrouped()&&t.events.fire(y.GridEvents.beforeRowDrag,[e,i])})),this.events.on(f.DragEvents.dragStart,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.dragRowStart,[e,i]),t._autoScroll("vertical")})),this.events.on(f.DragEvents.dragIn,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.dragRowIn,[e,i])})),this.events.on(f.DragEvents.dragOut,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.dragRowOut,[e,i])})),this.events.on(f.DragEvents.canDrop,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.canRowDrop,[e,i])})),this.events.on(f.DragEvents.cancelDrop,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.cancelRowDrop,[e,i])})),this.events.on(f.DragEvents.beforeDrop,(function(e,i,n){if("row"===n)return t.events.fire(y.GridEvents.beforeRowDrop,[e,i])})),this.events.on(f.DragEvents.afterDrop,(function(e,i,n){var o,r=e.source,l=e.target,s=e.start;if("row"===n){var c=t.data.getItem(e.start);if(!c||r.some((function(t){return t==l})))return;for(var d=0,u=t.config.columns;d<u.length;d++){var h=u[d];void 0===c[h.id]&&t.data.update(c.id,((o={})[h.id]=null,o),!0)}var f=t.data.getInitialData(),p=null==f?void 0:f.findIndex((function(t){return t.id==s})),g=null==f?void 0:f.findIndex((function(t){return t.id==l}));if(p>-1&&g>-1)if((null==r?void 0:r.length)>1){for(var v=[],_=function(t){var e=null==f?void 0:f.findIndex((function(e){return e.id==t})),i=null==f?void 0:f.splice(e,1)[0];v.push(i)},m=0,b=r;m<b.length;m++){_(b[m])}g=null==f?void 0:f.findIndex((function(t){return t.id==l})),g>0&&++g,null==f||f.splice.apply(f,a([g,0],v,!1))}else null==f||f.splice(g,0,null==f?void 0:f.splice(p,1)[0]);t._adjustColumns(),t._checkFilters(),t.paint(),t.events.fire(y.GridEvents.afterRowDrop,[e,i])}})),this.events.on(f.DragEvents.afterDrag,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.afterRowDrag,[e,i]),t._normalizeSpans()})),this.events.on(y.GridEvents.dragPanelItemMouseDown,(function(e,i){t._dragProcess(i,t.data.getItem(e))})),this.events.on(y.GridEvents.cellMouseDown,(function(e,i,n){!t.config.dragPanel&&t._dragProcess(n,e,i)})),this._events.on(y.GridSystemEvents.cellTouchMove,(function(e,i,n){t._touch.start&&n.preventDefault(),t._clearTouchTimer()})),this._events.on(y.GridSystemEvents.cellTouchEnd,(function(){t._touch.start=!1,t._clearTouchTimer()})),this.events.on(y.GridEvents.filterChange,(function(e,i,n,o){var r,a,l;if(t.events.fire(y.GridEvents.beforeFilter,[e,i])){if(t.config.autoEmptyRow){var s=t.data.find({by:"$emptyRow",match:!0});s&&t.data.remove(s.id)}t._activeFilters||(t._activeFilters={});var c=t.getColumn(i),d=c.header.filter((function(t){return t.content===n&&void 0!==t.customFilter}))[0];if("comboFilter"===n&&void 0!==e||"comboFilter"!==n&&""!==e){var u=(0,g.getEditorOptions)(c);"combobox"!==c.editorType&&"select"!==c.editorType&&"multiselect"!==c.editorType||!u||(e=Array.isArray(e)?e.map((function(t){var e;return(null===(e=u.find((function(e){return"string"==typeof e?e===t:e.value===t})))||void 0===e?void 0:e.id)||t})):null!==(a=null===(r=u.find((function(t){return"string"==typeof t?t===e:t.value===e})))||void 0===r?void 0:r.id)&&void 0!==a?a:e);t._activeFilters[i]={by:i,match:e,compare:null!==(l=null==d?void 0:d.customFilter)&&void 0!==l?l:function(e){var i=t.getColumn(e);return function(e,o,r,a){return t.content[n].match({val:e,match:o,obj:r,multi:a,col:i})}}(i),multi:"multiselect"===(null==c?void 0:c.editorType)}}else delete t._activeFilters[i];o||t.data.filter(t._activeFilters)}})),this.events.on(y.GridEvents.scroll,(function(e){t._scroll={top:e.y,left:e.x},t.paint()})),this.events.on(y.GridEvents.cellDblClick,(function(e,i,n){e&&((0,c.locateNodeByClassName)(n,"dhx_boolean-cell")||e.hasOwnProperty("$group")||(!1!==i.editable&&t.config.editable||i.editable)&&t.editCell(e.id,i.id,i.editorType))})),this.events.on(y.GridEvents.afterEditEnd,(function(e,i,n){t._afterEditEndProcess(e,i,n)})),this.events.on(y.GridEvents.headerCellMouseDown,(function(e,i,n){var o=n.target.getAttribute("dhx_resized");if(o&&t.events.fire(y.GridEvents.beforeResizeStart,[i,n])&&(0,C.startResize)(t,o.toString(),n,(function(){t.paint(),t.config.$resizing=null,t.events.fire(y.GridEvents.afterResizeEnd,[i,n])})),n.targetTouches){if(t._touch.timeStamp)t._touch.dblDuration>=t._touch.timeStamp-+n.timeStamp.toFixed()&&(n.preventDefault(),t.events.fire(y.GridEvents.headerCellDblClick,[e,i,n])),t._touch.timeStamp=null;else t._touch.timeStamp=+n.timeStamp.toFixed();setTimeout((function(){t._touch.timeStamp=null}),t._touch.dblDuration)}})),this.events.on(y.GridEvents.footerCellDblClick,(function(e,i,n){if(n.targetTouches){if(t._touch.timeStamp)t._touch.dblDuration>=t._touch.timeStamp-+n.timeStamp.toFixed()&&(n.preventDefault(),t.events.fire(y.GridEvents.footerCellDblClick,[e,i,n])),t._touch.timeStamp=null;else t._touch.timeStamp=+n.timeStamp.toFixed();setTimeout((function(){t._touch.timeStamp=null}),t._touch.dblDuration)}})),this.events.on(y.GridEvents.resize,(function(){return t._parseColumns()})),this.events.on(y.GridEvents.afterResizeEnd,(function(e){var i;t.config.columns=null===(i=t.config.columns)||void 0===i?void 0:i.map((function(t){return t.id==e.id&&(t.width=e.$width),t})),t._parseColumns()}))},e.prototype._afterEditEndProcess=function(t,e,i){var n,o,a=this;if(!(null===(o=this.config.$editable)||void 0===o?void 0:o.editor)||this.config.$editable.col===i.id&&this.config.$editable.row===e.id){var s,c;this.config.$editable?(s=this.config.$editable.row,c=this.config.$editable.col):(s=e.id,c=i.id);var u=this.getSpan(s,c);if((0,d.isDefined)(null==u?void 0:u.text)&&(0,d.isDefined)(t))u.text=t.toString();else{var h=this.data.getItem(s);delete h.$emptyRow,(0,d.isDefined)(t)&&this.data.update(s,r(r({},h),((n={})[c]=t,n)))}this.config.$editable=null,this.paint(),(0,l.awaitRedraw)().then((function(){var t;null===(t=a.selection)||void 0===t||t.restoreFocus()}))}},e.prototype._addEmptyRow=function(){var t=this.data.getId(this.data.getLength()-1),e=this.data.getItem(t),i=this.config.columns.filter((function(t){return!t.hidden}));(0,_.isRowEmpty)(e)||this.data.add(i.reduce((function(t,e){return t[e.id]="",t}),{$emptyRow:!0}))},e.prototype._sort=function(t,e,i){void 0===i&&(i=this.config.multiSort);var n=this.getColumn(t),o=this._sortingStates.find((function(e){return e.by==t}));if(this.events.fire(y.GridEvents.beforeSort,[n,"asc"===(null==o?void 0:o.dir)?"desc":"asc"])){var r="asc";(null==o?void 0:o.by)===t&&(r="asc"===o.dir?"desc":"asc");this.data.sort({by:t,dir:r,as:null!=e?e:function(t){return t&&"date"===n.type?(0,x.getNormalizeDateObject)(t,n.dateFormat).getTime():t?"".concat(t):""}},{smartSorting:i}),this.events.fire(y.GridEvents.afterSort,[n,r])}},e.prototype._setSort=function(){var t,e=null===(t=this.data.getSortingStates())||void 0===t?void 0:t[0];this._sortingStates=e&&[e]||[]},e.prototype._clearTouchTimer=function(){this._touch.timer&&(clearTimeout(this._touch.timer),this._touch.timer=null)},e.prototype._checkFilters=function(t){if(void 0===t&&(t=!1),(0,d.isEmptyObj)(this._activeFilters))t&&this.data.resetFilter(),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData();else{var e=this.data.getRawFilters({permanent:!0});this.data.filter(e,{$restore:!0},!0),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData(),this.data.filter(null,{$restore:!0},!0),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData(!0)}},e.prototype._setUniqueData=function(t){var e=this;void 0===t&&(t=!1),this._filterData&&this.config.columns.forEach((function(i){i.header.forEach((function(n){var o;if(!(null===(o=e._activeFilters)||void 0===o?void 0:o[i.id])&&n.content&&("selectFilter"===n.content||"comboFilter"===n.content)){var r=i.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.multiselection})),a=i.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.filter}));if(!t||t&&!a){var l=(0,g.getNormalizeFilterData)(e._filterData,i.id,r,i.editorType),s=(0,g.getEditorOptions)(i);"combobox"!==i.editorType&&"select"!==i.editorType&&"multiselect"!==i.editorType||!s||(l=l.map((function(t){var e=s.find((function(e){return"string"==typeof e?t===e:t===e.id}));return e&&"string"!=typeof e?e.value:t}))),l="string"!==i.type?Array.from(new Set(l.map((function(t){return(0,g.applyPattern)(t,i)})))):l,t?i.$activeFilterData=l:(i.$uniqueData=l,i.$activeFilterData&&delete i.$activeFilterData)}}}))}))},e.prototype._checkSelectFilterValue=function(){var t,e=null===(t=this.content)||void 0===t?void 0:t.selectFilter;if(e)for(var i in e.value){var n=this.getColumn(i),o=e.value[i];n.hidden||!o||n.$uniqueData.includes(o)||e.element[i].clear()}},e.prototype._clearFilterValue=function(t){var e=this;void 0===t&&(t=!1),["selectFilter","inputFilter","dateFilter"].map((function(t){var i;return null===(i=e.content)||void 0===i?void 0:i[t]})).filter((function(t){return t})).forEach((function(i){for(var n in i.value)!i.value[n]||!t&&e.getColumn(n).hidden||i.element[n].clear(!0)}))},e.prototype._adjustColumns=function(){var t=this,e=this.config.columns.filter((function(t){return!t.hidden})),i=[],n=[],o={};if(e.forEach((function(t){(0,d.isDefined)(t.adjust)?t.adjust&&i.push(t):n.push(t)})),i.length||n.length){var a=this.config.data&&this.config.data.length?this.config.data:this.data.map((function(t){return t}));i.forEach((function(i){o=r(r({},o),t._adjustColumnsWidth({rows:a,cols:[i],totalCols:e,adjust:i.adjust}))})),n.length&&(o=r(r({},o),this._adjustColumnsWidth({rows:a,cols:n,totalCols:e})))}this.config.$totalWidth=e.reduce((function(t,e){if(o[e.id]){e.$fixedWidth=!0;var i=e.maxWidth,n=e.minWidth,r=o[e.id];e.$width=r,i&&r>i&&(e.$width=i),n&&e.$width<n&&(e.$width=n)}return t+e.$width}),0)},e.prototype._prepareData=function(t){var e=this;return(this.config.autoHeight||this.config.headerAutoHeight||this.config.footerAutoHeight)&&(this.config.autoHeight=this.config.headerAutoHeight=this.config.footerAutoHeight=!1),this._normalizeDataType(),this._setSummary(),this._adjustColumns(),t.map((function(t){return t.$height=Number(t.height)||e.config.rowHeight,t}))},e.prototype._adjustColumnsWidth=function(t){var e,i,n,o,r=this,a=t.rows,l=t.cols,s=t.adjust,c=void 0===s?this.config.adjust:s,d={};if("header"===c||!0===c){var u=l.filter((function(t){return t.header}));if(y=(0,g.getMaxColsWidth)(this._prepareColumnData(u,"header"),u,{font:"normal 14.4px Arial"},"header"))for(var h=0,f=Object.entries(y);h<f.length;h++){var p=f[h],v=p[0],m=p[1];d=Object.assign(d,((e={})[v]=+m+24+(o=this.getColumn(v),(0,_.isSortable)(r.config,o)?16:0),e))}}if("footer"===c||!0===c){var y;u=l.filter((function(t){return t.footer}));if(y=(0,g.getMaxColsWidth)(this._prepareColumnData(u,"footer"),u,{font:"normal 14.4px Arial"},"footer"))for(var b=0,x=Object.entries(y);b<x.length;b++){var w=x[b];v=w[0],m=w[1];(d[v]&&d[v]<+m+24||!d[v])&&(d=Object.assign(d,((i={})[v]=+m+24,i)))}}if(("data"===c||!0===c)&&(y=(0,g.getMaxColsWidth)(a,l,{font:"normal 14.4px Arial"},"data")))for(var C=0,S=Object.entries(y);C<S.length;C++){var E=S[C];v=E[0],m=E[1];(d[v]&&d[v]<+m+24||!d[v])&&(d=Object.assign(d,((n={})[v]=+m+24,n)))}return d},e.prototype._prepareColumnData=function(t,e){for(var i,n,o,a=[],l=0;l<t.length;l++){for(var s=[],c=t[l],d=0;d<(null==c?void 0:c[e].length);d++){var u={},h=null===(n=null==c?void 0:c[e][d])||void 0===n?void 0:n.text;if(h){"function"==typeof h&&(h=h(this.getSummary(c.id)));var f=null===(o=null==c?void 0:c[e][d])||void 0===o?void 0:o.htmlEnable;u[c.id]=h||"",f&&(u[c.id]=(0,_.removeHTMLTags)(u[c.id]))}else u[c.id]="";s.push(u)}for(var p=0;p<s.length;p++)for(var g=0,v=Object.entries(s[p]);g<v.length;g++){var m=v[g],y=m[0],b=m[1];a[p]=r({},a[p])||{},a[p]=Object.assign(a[p],((i={})[y]=b,i))}}return a},e.prototype._dragStart=function(t){if(this.config.dragMode&&("row"===this.config.dragItem||"both"===this.config.dragItem)&&!this.config.$editable){var e=this.data.getItem((0,c.locate)(t,"data-dhx-id")).id;t.targetTouches&&(this._touch.start=!0),f.dragManager.onMouseDown({event:t,source:[e],itemsForGhost:[this._getRowGhost([e])],type:"row"})}},e.prototype._dragProcess=function(t,e,i){var n=this;if(t.targetTouches){if(this._touch.timer=setTimeout((function(){n._dragStart(t)}),this._touch.duration),this._touch.timeStamp)this._touch.dblDuration>=this._touch.timeStamp-+t.timeStamp.toFixed()&&((!1!==i.editable&&this.config.editable||i.editable)&&this.editCell(e.id,i.id,i.editorType),t.preventDefault(),this.events.fire(y.GridEvents.cellDblClick,[e,i,t])),this._touch.timeStamp=null;else this._touch.timeStamp=+t.timeStamp.toFixed();setTimeout((function(){n._touch.timeStamp=null}),this._touch.dblDuration)}else this._dragStart(t)},e.prototype._getRowGhost=function(t){for(var e,i=this.config,n=i.$totalWidth,o=i.$width,r=this.getRootNode(),a=(0,x.getCurrFixedCols)(this.config,y.Split.left),l=(0,x.getCurrFixedCols)(this.config,y.Split.right),s=(0,x.calcScrollBarWidth)(this.config,!!(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)),d=[],u=function(e){var i=t[e],u=(0,O.getRowNode)(i,r);if(!u)return"continue";var h=n>o-s.y?o-s.y-x.BORDERS:n;if(a.length||l.length){var f=new Array(3);if(f[1]=u,a.length){var p=(0,O.getRowNode)(i,r,"left");h-=p.offsetWidth,f[0]=p}if(l.length){var g=(0,O.getRowNode)(i,r,"right");h-=g.offsetWidth,f[2]=g}var v=document.createElement("div");return v.style.display="flex",f.forEach((function(t){if(t){var e=t.cloneNode(!0);if(t===u){var i=(0,c.getNodeOffset)(t,r).left-(0,_.getTotalWidth)(a)-x.BORDERS/2;v.appendChild((0,O.getVisibleRowNode)(e,h,i))}else e.removeAttribute("aria-rowindex"),e.style.width=t.offsetWidth+"px",v.appendChild(e)}})),{value:v}}var m=u.cloneNode(!0);d.push((0,O.getVisibleRowNode)(m,h,(0,c.getNodeOffset)(u,r).left-x.BORDERS/2))},h=0;h<t.length;h++){var f=u(h);if("object"==typeof f)return f.value}var p=document.createElement("div");return p.style.setProperty("width","initial","important"),d.forEach((function(t){return p.appendChild(t)})),p},e.prototype._initHooks=function(){var t=this;return{didMount:function(){t._canDataParse(!0)&&(t._container||t._applyAutoWidth(),t.data.parse(t.config.data)),t.config.autoWidth&&t._parseColumns(),t.config.keyNavigation&&(t.keyManager&&t.keyManager.destructor(),t.keyManager=new u.KeyManager((function(e,i){return!(i!==t._uid||!t.events.fire(y.GridEvents.beforeKeyDown,[e]))&&(t.events.fire(y.GridEvents.afterKeyDown,[e]),!0)})),t._initHotKey())}}},e.prototype._normalizeDataType=function(){var t=this,e=this.config.columns.reduce((function(t,e){return"number"===e.type&&t.push(e),t}),[]);e.length&&this.data.forEach((function(i){for(var n,o=0,r=e;o<r.length;o++){var a=r[o],l=(0,g.getValueForNumberColumn)(a,i[a.id]);if(Number.isNaN(l)&&!i.$group)throw new Error("Incorrect data in column with type 'number', see docs: https://docs.dhtmlx.com/suite/grid/api/api_gridcolumn_properties/");i[a.id]!==l&&t.data.update(i.id,((n={})[a.id]=l,n),!0)}}))},e.prototype._applyLocalFilter=function(t){void 0===t&&(t=!1);var e={add:!0,permanent:!0,$local:!0},i=this.data.getRawFilters(),n=Object.keys(i||{}).find((function(t){return i[t].config.$local}));n&&(e.id=n),t?this.data.filter((function(t){return t}),e,!0):this.data.filter((function(t){return t&&!t.hidden}),e,!0)},e.prototype._normalizeSpans=function(){var t,e=this;this.config.spans=null===(t=this.config.spans)||void 0===t?void 0:t.map((function(t){return(0,E.normalizeSpan)(t,e.config,e.data)}))},e.prototype._hideColumn=function(t){t.hidden=!0,this.config.$totalWidth-=t.$width,this._parseColumns(),this.config.data=this._prepareData(this.data);var e=this._activeFilters&&this._activeFilters[t.id];e&&(this._hiddenFilters||(this._hiddenFilters={}),this._hiddenFilters[t.id]=e,delete this._activeFilters[t.id],this._checkFilters()),this._normalizeSpans(),this.paint()},e.prototype._showColumn=function(t){t.hidden=!1,this.config.$totalWidth+=t.$width,this._parseColumns(),this.config.data=this._prepareData(this.data);var e=this._hiddenFilters&&this._hiddenFilters[t.id];e&&(this._activeFilters[t.id]=e,delete this._hiddenFilters[t.id],this._checkFilters(),this._checkSelectFilterValue()),this._normalizeSpans(),this.paint()},e.prototype._setSummary=function(){var t=this,e=this.data.map((function(t){return t})).filter((function(t){return t!=t.$group&&t!=t.$groupSummary}));"tree"===this.config.type&&(e=e.filter((function(e){return!t.data.haveItems(e.id)}))),this.config.summary&&Object.entries(this.config.summary).forEach((function(i){var n=i[0],o=i[1];t._commonSummary[n]=t._applyMethod(o,e)})),this.config.columns.forEach((function(i){var n;if(i.summary){var o=i.id,r=i.summary;t._colSummary[o]||(t._colSummary[o]={}),"string"==typeof r?t._colSummary[o][r]=null===(n=f.methods[r])||void 0===n?void 0:n.call(f.methods,e,o):Object.entries(r).forEach((function(i){var n=i[0],r=i[1];t._colSummary[o][n]=t._applyMethod(r,e,o)}))}}))},e.prototype._init=function(){this.events=new s.EventSystem(this),this._events=new s.EventSystem(this),this._attachDataCollection(),this.export=new p.Exporter({name:"grid",version:this.version,view:this,export:null}),this._setEventHandlers()},e.prototype._applyMethod=function(t,e,i){var n;return"function"==typeof t?t(e):"string"==typeof t&&(null===f.methods||void 0===f.methods?void 0:f.methods[t])?null===f.methods||void 0===f.methods?void 0:f.methods[t](e,i):Array.isArray(t)&&(null===f.methods||void 0===f.methods?void 0:f.methods[null==t?void 0:t[1]])?null===(n=f.methods[t[1]])||void 0===n?void 0:n.call(f.methods,e,t[0]):null},e.prototype._canDataParse=function(t){var e;return void 0===t&&(t=!1),!!((null===(e=this.config.data)||void 0===e?void 0:e.length)&&this.config.data instanceof Array&&this.config.columns)&&(this.config.autoWidth&&this.config.autoHeight?t:!t)},e.prototype._attachDataCollection=function(){if(this.config.data instanceof f.DataCollection)return this.data=this.config.data,this.data.config.collapsed=this.config.collapsed,void(this.config.data=this.data.serialize());this._createCollection()},e.prototype._setMarks=function(t,e){for(var i=[],n=0,o=this.data.map((function(e){return i.push(e[t.id]),{id:e.id,data:e[t.id],row:e}}));n<o.length;n++){var r=o[n],a=e(r.data,i,r.row,t);a&&(t.$cellCss=t.$cellCss||{},t.$cellCss[r.id]+=" "+a)}},e.prototype._checkMarks=function(){var t=this;this.config.columns.map((function(e){var i=e.mark;i&&("function"==typeof i?t._setMarks(e,i):t._setMarks(e,(function(t,e){var n=[];e.forEach((function(t){null!=t&&""!==t&&n.push(parseFloat(t))}));var o=(0,d.getMinArrayNumber)(n),r=(0,d.getMaxArrayNumber)(n);return i.max&&r===parseFloat(t)?i.max:!(!i.min||o!==parseFloat(t))&&i.min})))}))},e.prototype._removeMarks=function(){this.config.columns.forEach((function(t){t.mark&&(t.$cellCss={})}))},e.prototype._detectColsTypes=function(){this.config.columns.forEach((function(t){return t.type?t:t.numberMask?(t.type="number",t):void(t.type||(t.type="string"))}))},e.prototype._destroyContent=function(){for(var t in this.content)"function"==typeof this.content[t].destructor&&this.content[t].destructor()},e.prototype._render=function(){this.paint()},e.prototype._initHotKey=function(t){void 0===t&&(t=!1);var e=(0,S.getKeysHandlers)(this);for(var i in e)this.keyManager.exist(i)||this.keyManager.addHotKey(i,e[i]);if(!t)for(var i in this.config.hotkeys)this.keyManager.addHotKey(i,this.config.hotkeys[i])},e.prototype._normalizeConfig=function(t){return Object.keys(t).forEach((function(e){e.startsWith("$")&&delete t[e]})),t},e.prototype._autoScroll=function(t){var e,i,n,o,r=(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)?null===(i=this.getRootNode())||void 0===i?void 0:i.querySelector(".scroll-view"):null===(n=this.getRootNode())||void 0===n?void 0:n.querySelector(".dhx_grid-body");if(r){var a=null,l=r.getBoundingClientRect(),s=l.top,c=l.bottom,d=l.left,u=l.right,h=l.height,f=l.width,p=30,g=this.config.dragPanel?(null===(o=this.config.dragPanel)||void 0===o?void 0:o.width)||k.defaultDragPanelConfig.width:0,v=function(t,e){t&&r.scrollBy("left"===t?-40:40,0),e&&r.scrollBy(0,"up"===e?-40:40),(t||e)&&(a=setTimeout((function(){v(t,e)}),100))},_=function(e){var i=e.clientX,n=e.clientY,o=null,r=null;switch(t){case"horizontal":i>u-p&&i<u&&n>s&&n<c?o="right":i>d&&i<d+p&&n>s&&n<c&&(o="left");break;case"vertical":n>c-p&&n<c&&i>d-g&&i<u?r="down":n>s&&n<s+p&&i>d-g&&i<u&&(r="up");break;case"auto":i>u-p&&i<u&&n>s&&n<c?o="right":i>d&&i<d+p&&n>s&&n<c&&(o="left"),n>c-p&&n<c&&i>d-g&&i<u?r="down":n>s&&n<s+p&&i>d-g&&i<u&&(r="up")}o||r?a||v(o,r):a&&(clearTimeout(a),a=null)};(f<r.scrollWidth||h<r.scrollHeight)&&(document.addEventListener("pointermove",_),document.addEventListener("pointerup",(function(){document.removeEventListener("pointermove",_),a&&clearTimeout(a)}),{once:!0}))}},e.prototype._applyAutoWidth=function(){var t,e,i=this._container||(null===(t=this.getRootView().node.parent)||void 0===t?void 0:t.el);if(i){var n=(0,b.getElementSizes)(i),o=null===(e=this.scrollView)||void 0===e?void 0:e.config.enable;(0,b.applyAutoWidth)(this.config,n,o)}},e.prototype._handleRow=function(t,e){if((0,d.isId)(t)&&"remove"===e){var i=this.selection.getCells().find((function(e){return e.row.id===t}));i&&this.selection.removeCell(i.row.id,i.column.id)}if(this.config.data=this._prepareData(this.data),(0,d.isId)(t)&&(this._checkFilters(),this._checkSelectFilterValue()),this._detectColsTypes(),this._removeMarks(),this._checkMarks(),this.config.autoEmptyRow&&(!this._activeFilters||(0,d.isEmptyObj)(this._activeFilters))){var n=this.data.find({by:"$emptyRow",match:!0});if(n){if(n.id===t)return;this.data.move(n.id,this.data.getLength()-1)}else this._addEmptyRow()}this._normalizeSpans(),this._render()},e}(h.View);e.Grid=T},function(t,e,i){"use strict";(function(t){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,i,n,o){return new(n||(n=t))((function(t,r){function a(t){try{s(o.next(t))}catch(t){r(t)}}function l(t){try{s(o.throw(t))}catch(t){r(t)}}function s(e){var i;e.done?t(e.value):(i=e.value,i instanceof n?i:new n((function(t){t(i)}))).then(a,l)}s((o=o.apply(e,i||[])).next())}))},r=this&&this.__generator||function(t,e){var i,n,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(l){return function(s){return function(l){if(i)throw new TypeError("Generator is already executing.");for(;r&&(r=0,l[0]&&(a=0)),a;)try{if(i=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=e.call(t,a)}catch(t){l=[6,t],n=0}finally{i=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Exporter=void 0;var l=i(5),s=i(8),c=i(0),d=i(13),u=i(2),h=i(1),f=i(18),p=i(4),g=function(){function e(t){this._xlsxWorker=null,this._name=t.name,this._version=t.version,this._grid=t.view,this._exportConfigCallback=t.export}return e.prototype.pdf=function(t){return this._rawExport(t,"pdf")},e.prototype.png=function(t){return this._rawExport(t,"png")},e.prototype.xlsx=function(t){void 0===t&&(t={});var e=this._getExportConfig("xlsx");return this._xlsxExport(n({url:"https://cdn.dhtmlx.com/libs/json2excel/next/worker.js?vx",name:"grid",tableName:"data"},t),e)},e.prototype.csv=function(e){var i=this;return void 0===e&&(e={}),new t((function(t){var o,r=i._getExportConfig("csv"),a=(e=n(n({asFile:!0,rowDelimiter:"\n",columnDelimiter:",",skipHeader:0},e),r.typeConfig||{})).name||"grid";o="getRoot"in i._grid.data&&e.flat?i.getFlatCSV(e,r):i._getCSV(e,r),e.asFile&&(0,c.downloadFile)(o,"".concat(a,".csv"),"text/csv"),t(o)}))},e.prototype._getExportData=function(t,e){var i,o=this;if(void 0===t&&(t={}),!(0,l.isWasmSupported)())throw new Error("WebAssembly is not supported by your browser");var r={number:"#,##0.00",percent:"#,##0.00%",date:t.dateFormatMask||"dd/mm/yy",string:"@"},a=this._getExportWidget(null,e),s=a.config.columns.filter((function(t){return!t.hidden})),u=a._colSummary;if(!s.length)return{data:[{name:t.tableName||"data",cols:[],rows:[],merged:[],cells:[]}],styles:[]};var h={},g={},_=(0,l.transpose)(s.map((function(t){return(t.header||[]).map((function(e){var i=e.text;return i?(0,l.removeHTMLTags)("string"==typeof i?i||"":i(u[t.id])):""}))}))),y=(0,l.transpose)(s.map((function(t){return(t.footer||[]).map((function(e){var i=e.text;return{text:i?(0,l.removeHTMLTags)("string"==typeof i?i||"":i(u[t.id])):"",content:t.summary,col_id:t.id}}))}))),b=[],x=[],w=new Map;w.set("default",{css:{color:"#000000",background:"#FFFFFF",fontSize:14},index:w.size});var C=new Map,S={},E={},D=a.config.$headerHeightMap.map((function(t){return{height:t}})),O=e.data.map((function(t,i){D.push({height:t.$height});var n="function"==typeof e.rowCss?e.rowCss(t):"";(t.$css||n)&&(E[t.id]="".concat(t.$css||""," ").concat(n||"").trim()),h[t.id]=i;var r=s.map((function(i,n){var r=i.id,a=i.editorType,s=i.type,c=i.options,u=i.patternMask,h=i.numberMask;S[r]=n;var g=e.spans.find((function(e){return e.column===r&&e.row===t.id})),v=(null==g?void 0:g.text)||t[r],_=t.$group&&o._grid.config.columns.find((function(e){return t.$by==e.id}));if((i.options||_)&&(v=(0,p.getOptionValue)(v,_||i)),"multiselect"===a&&c instanceof Array)return(v||"").split(",").map((function(t){var e=t.trim(),i=c.find((function(t){return"string"==typeof t?t===e:t.id==e}));return i?"object"==typeof i?i.value:i:e})).join(", ");if("date"===s){var m=i.dateFormat||"%M %d %Y";if("string"==typeof v){var y=(0,d.stringToDate)(v,m,!0)?(0,d.stringToDate)(v,m):new Date(v);y instanceof Date&&!isNaN(y.valueOf())&&(v=(0,d.getExcelDate)(y))}else v instanceof Date&&(v=(0,d.getExcelDate)(v))}else"number"===s?("string"==typeof v&&u&&(v=(0,f.removePatternMask)(v,u)),"string"==typeof v&&"object"==typeof h&&(v=(0,f.removeNumberMask)(v,h))):v=(0,p.applyPattern)(v,i);return v||n||!t.$groupName?(0,l.removeHTMLTags)(v):"^ ".concat(t.$groupName)}));return r}));a.config.$footerHeightMap.forEach((function(t){return D.push({height:t})}));for(var k=function(t){var i=t.type,o=t.align,a=t.numberMask,d=t.patternMask,f=t.footer,p=t.header,m=n({},t.$cellCss);(e.spans.filter((function(e){return e.column===t.id}))||[]).forEach((function(t){(null==t?void 0:t.css)&&(m[t.row]="".concat(m[t.row]||""," ").concat(t.css).trim())}));var S="number"===i?"right":o;b.push({width:t.$width});var D=s.indexOf(t);g[t.id]=D;var k="";S&&(k+=" align:".concat(S));var T="";T="number"===i?a?"boolean"==typeof a?r.number:function(t){var e=t.prefix,i=t.suffix,n=t.maxIntLength,o=t.maxDecLength,r=void 0===o?2:o,a="";e&&(a+='"'.concat(e,'"'));if(n)for(var l=0;l<n;l++)a+=l===n-1?"0":"#";else a+="#";if(r){a+=".";for(l=0;l<r;l++)a+="#"}i&&(a+="%"===i?i:'"'.concat(i,'"'));return a}(a):"string"==typeof d&&d.includes("0")&&!["#","a","*"].find((function(t){return d.includes(t)}))?function(t){if(!t.includes("0")&&!t.includes("#"))return"";var e=t.split(""),i="",n=!0;return e.forEach((function(t){"0"===t||"#"===t?(n||(i+='"',n=!0),i+=t):(n&&(i+='"',n=!1),i+=t)})),i}(d):r.number:i&&r[i]||"";var R=v(k+=" format:".concat(T));if(w.has(R))C.set("col_".concat(D),R);else{if(j=(0,l.getStyleByClass)("dhx_grid-cell","dhx_grid-cell",w.get("default"))){var M=n(n({},j),{format:T});S&&(M.align=S),M["font-weight"]=M.bold?"bold":"normal",M.fontSize&&(M.fontSize="".concat(M.fontSize,"px")),w.set(R,{css:n(n({},w.get("default").css),M),index:w.size})}C.has("col_".concat(D))||C.set("col_".concat(D),R)}for(var I in f&&f.forEach((function(e,i){var o=e.rowspan,r=void 0===o?0:o,a=e.colspan,s=void 0===a?0:a;if(s||r){var d=O.length+_.length+i;x.push({from:{row:d,column:D},to:{row:d+(r?r-1:0),column:D+(s?s-1:0)}})}var h=e.text?"function"==typeof e.text?e.text(u[t.id]):e.text:"";y[i][D]=n(n({},y[i][D]),{text:(0,l.removeHTMLTags)(h)});var f=T||(0,c.isNumeric)(h)&&"0.00",p="dhx_grid-footer-cell ".concat(e.css||""," ").concat(f," ").concat(e.align),g=v(p);if(!w.has(g)){var m=(0,l.getStyleByClass)(p,"dhx_grid-footer-cell",w.get("default"));if(m){var b=n(n({},m),{f_format:f});e.align&&(b.align=e.align),b["font-weight"]=b.bold?"bold":"normal",b.fontSize&&(b.fontSize="".concat(b.fontSize,"px")),w.set(g,{css:n(n({},w.get("default").css),b),index:w.size})}}C.set("footer_".concat(D,"_").concat(i),g)})),p&&p.forEach((function(t,e){var i=t.rowspan,o=void 0===i?0:i,r=t.colspan,a=void 0===r?0:r;if(a||o){var s=e;x.push({from:{row:s,column:D},to:{row:s+(o?o-1:0),column:D+(a?a-1:0)}})}var c="dhx_grid-header-cell ".concat(t.css||""," ").concat(t.align||""," ").concat(S||""),d=v(c);if(!w.has(d)){var u=(0,l.getStyleByClass)(c,"dhx_grid-header-cell",w.get("default"));if(u){var h=n(n({},u),{format:T});(t.align||S)&&(h.align=t.align||S),w.set(d,{css:n(n({},w.get("default").css),h),index:w.size})}}C.set("header_".concat(D,"_").concat(e),d)})),m){var P="dhx_grid-cell ".concat(m[I].trim()," ").concat(k),H=v(P),F="dhx_grid-row";if(E[I]&&(F+=" ".concat(E[I].trim())),!w.has(H))if(j=(0,l.getStyleByClass)(P,F,w.get("default"))){M=n(n(n({},w.get("default").css),j),{format:T});S&&(M.align=S),M["font-weight"]=M.bold?"bold":"normal",M.fontSize&&(M.fontSize="".concat(M.fontSize,"px")),w.set(H,{css:n({},M),index:w.size})}w.has(H)&&C.set("".concat(h[I],"_").concat(D),H)}for(var I in E)if(!(m||{})[I]){var A="".concat(E[I]," format:").concat(T);S&&(A+=" align:".concat(S));var j,$=v(A);F="dhx_grid-row ".concat(E[I].trim());if(!w.has($))if(j=(0,l.getStyleByClass)("dhx_grid-cell",F,w.get("default"))){M=n(n(n({},w.get("default").css),j),{format:T});S&&(M.align=S),M["font-weight"]=M.bold?"bold":"normal",M.fontSize&&(M.fontSize="".concat(M.fontSize,"px")),w.set($,{css:n({},M),index:w.size})}w.has($)&&C.set("".concat(h[I],"_").concat(D),$)}},T=0,R=s;T<R.length;T++){k(R[T])}var M=[];w.forEach((function(t){var e={};Object.keys(t.css).forEach((function(i){if(t.css[i])return"bold"===i?e.fontWeight="bold":void(e[i]="".concat(t.css[i]))})),e.verticalAlign="center",M.push(n(n({},e),{id:t.index.toString()}))})),M[0].format="#";var I=[];if(_.length){var P=_.map((function(t,e){return t.map((function(t,i){var n=C.get("header_".concat(i,"_").concat(e))||C.get("col_".concat(i))||"default";return{v:""===t?null:t,s:w.get(n).index}}))}));I.push.apply(I,P)}var H=O.map((function(t,e){return t.map((function(t,i){var n=C.get("".concat(e,"_").concat(i))||C.get("col_".concat(i))||"default";return{v:""===t?null:t,s:w.get(n).index}}))}));if(I.push.apply(I,H),y.length){var F=y.map((function(e,i){return e.map((function(e,n){var o,r=e.text,a=e.content,l=e.col_id,s="string"==typeof a,c=a&&(o=u[l],Object.values(o)[0]==r),d=C.get("footer_".concat(n,"_").concat(i))||C.get("col_".concat(n))||"default";return{v:a&&s&&c?m({func:a,startRow:_.length+1,col:n,rowsCount:H.length,functionsMap:t.mapToExcelFormulas}):""===r?null:r,s:w.get(d).index}}))}));I.push.apply(I,F)}if(null===(i=e.spans)||void 0===i?void 0:i.length){var A=e.spans.map((function(t){var e=h[t.row]+_.length,i=g[t.column],n=t.rowspan,o=void 0===n?1:n,r=t.colspan;return{from:{row:e,column:i},to:{row:e+o-1,column:i+(void 0===r?1:r)-1}}}));x.push.apply(x,A)}return a.destructor(),{data:[{name:t.tableName||"data",cells:I,cols:b,rows:D,merged:x}],styles:M}},e.prototype._xlsxExport=function(e,i){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var o,a;return r(this,(function(r){switch(r.label){case 0:return e=n(n({},e),i.typeConfig||{}),o=this._getExportData(e,i),e.url?[4,this._getXlsxWorker(e.url)]:[3,2];case 1:return a=r.sent(),[2,new t((function(t,i){var n=function(r){if("ready"===r.data.type){a.removeEventListener("message",n);var l=r.data.blob;(0,c.downloadFile)(l,"".concat(e.name||"dhtmlx_grid",".xlsx")),t(o)}else"error"===r.data.type&&(a.removeEventListener("message",n),i(r.data))};a.addEventListener("message",n),a.postMessage({type:"convert",data:o})}))];case 2:return[2,o]}}))}))},e.prototype.getFlatCSV=function(t,e){var i=this._grid.data,n=i.getRoot(),o=e.columns,r=o[0],c=i.getMaxLevel(),d="";i.eachChild(n,(function(e){var n=function(t,e){for(var i=[],n=0;n<=c;n++)if(t&&t[r.id]){i[t.$level]=t[r.id];var o=e.getParent(t.id,!0);t=o&&o.id?o:null}else i[n]="";return i}(e,i).join(t.columnDelimiter);d+=n+Object.keys(e).reduce((function(i,n,o){return"id"===n||"parent"===n||n.startsWith("$")||0===o?i:i+t.columnDelimiter+(null===e[n]?"":e[n])}),""),d+=t.rowDelimiter}));var u=function(t,e){for(var i=0;i<t.length;i++)t[i]=e;return t}(new Array(c+1),""),h=(0,l.transpose)(o.map((function(t){return(t.header||[]).map((function(t){return(0,l.removeHTMLTags)("".concat(t.text||" "))}))})));return h=h.map((function(t){return t.splice.apply(t,a([0,1],u,!1)),t})),new s.CsvDriver(t).serialize(h,!0)+t.rowDelimiter+d},e.prototype._getCSV=function(t,e){var i=this._getExportData(t,e),n=new s.CsvDriver(t),o=i.data[0].cells.map((function(t){return t.map((function(t){return t.v}))}));return n.serialize(o,!0)},e.prototype._rawExport=function(e,i){void 0===e&&(e={});var o=document.createElement("div");o.setAttribute("style","display: none;");var r=this._getExportConfig(i),a=this._getExportWidget(o,r);(e=n(n({},r.typeConfig||{}),e)).url=e.url||"https://export.dhtmlx.com/"+this._name+"/"+i+"/"+this._version;var l="boolean"==typeof e.exportStyles||Array.isArray(e.exportStyles)?e.exportStyles:a.config.exportStyles;if("pdf"===i){var c=e.pdf;e.pdf=n({printBackground:!1,format:"A4"},c)}return new t((function(t,n){(0,h.awaitRedraw)().then((function(){var r="";!0===l?r="".concat((0,u.getPageLinksCss)(),"<style>").concat((0,u.getPageInlineCss)(),"</style>"):Array.isArray(l)&&l.length&&(r="".concat((0,u.getPageLinksCss)(l)));var c=o.children[0];null==c||c.setAttribute("data-dhx-theme",e.theme||"light"),"png"===i&&(null==c||c.setAttribute("style","width: ".concat(a.config.width,"px;")));var d="\n\t\t\t\t\t\t".concat(r,"\n\t\t\t\t\t\t").concat(o.innerHTML,"\n\t\t\t\t\t");fetch(e.url,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({raw:d,config:e})}).then((function(t){return t.ok||(0,s.dhxError)("HTTP error, status: ".concat(t.status)),t.blob()})).then((function(n){var r,l=document.createElement("a");l.href=URL.createObjectURL(n),l.download="".concat(e.name||"grid",".").concat(i),l.click(),URL.revokeObjectURL(l.href),a.destructor(),null===(r=o.parentNode)||void 0===r||r.removeChild(o),t()})).catch((function(t){var e;a.destructor(),null===(e=o.parentNode)||void 0===e||e.removeChild(o),n(t)}))})).catch((function(t){var e;a.destructor(),null===(e=o.parentNode)||void 0===e||e.removeChild(o),n(t)}))}))},e.prototype._getExportWidget=function(t,e){var i,o,r=n(n({},e),{keyNavigation:!1,selection:!1,rangeSelection:!1,blockSelection:!1,clipboard:!1,history:!1,resizable:!1,editable:!1});(null===(i=r.data)||void 0===i?void 0:i.length)||(0,s.dhxWarning)("There is no data to export"),(null===(o=r.columns)||void 0===o?void 0:o.length)||(0,s.dhxWarning)("There is no column for export");var a=new this._grid.constructor(t,(0,c.getCloneObject)(r)),l=a.config.$totalWidth,d=a.config.$totalHeight+a.config.$headerHeight+(a.config.$footer?a.config.$footerHeight:0);return a.config.height=d,a.config.width=l,a.paint(),a},e.prototype._getExportConfig=function(t){var e=n({},this._grid.config);if("function"!=typeof this._exportConfigCallback)return n(n({},e),{spans:e.spans||[]});var i=this._exportConfigCallback(e,t),o=this._grid.data.getRawData(0,-1,null,2)||[];return n(n(n({},e),i),{columns:(i.columns?this._getCallbackData(e.columns,i.columns):e.columns)||[],spans:(i.spans?this._getCallbackData(e.spans,i.spans):e.spans)||[],data:(i.data?this._getCallbackData(o,i.data):o)||[]})},e.prototype._getCallbackData=function(t,e){var i=this;return"function"!=typeof e?null:t.map((function(t,n,o){return e((0,c.getCloneObject)(t),n,o,i._grid)})).filter(Boolean)},e.prototype._getXlsxWorker=function(e){return o(this,void 0,void 0,(function(){var i;return r(this,(function(n){return null===this._xlsxWorker&&(i=window.URL.createObjectURL(new Blob(["importScripts('".concat(e,"');")],{type:"text/javascript"})),this._xlsxWorker=new t((function(t){var e=new Worker(i);e.addEventListener("message",(function(i){"init"===i.data.type&&t(e)}))}))),[2,this._xlsxWorker]}))}))},e}();function v(t){return t.split("").reduce((function(t,e){var i=(t<<5)-t+e.charCodeAt(0);return Math.abs(i&i)}),0).toString()}function _(t){for(var e="";t>=0;)e=String.fromCharCode(t%26+65)+e,t=Math.floor(t/26)-1;return e}function m(t){var e=t.func,i=t.startRow,n=t.col,o=t.rowsCount,r=t.functionsMap,a=void 0===r?{}:r,l="".concat(_(n)).concat(i,":").concat(_(n)).concat(o+i-1),s={sum:"=SUM(".concat(l,")"),avg:"=AVERAGE(".concat(l,")"),count:"=COUNT(".concat(l,")"),max:"=MAX(".concat(l,")"),min:"=MIN(".concat(l,")")};return Object.entries(a).forEach((function(t){var e=t[0],i=t[1];s[e]="=".concat(i,"(").concat(l,")")})),s[e]}e.Exporter=g}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(84),e),o(i(85),e),o(i(86),e),o(i(87),e),o(i(26),e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.message=void 0;var n=i(0),o=i(2),r=i(26),a=new WeakMap,l=new Map;function s(t,e){var i=document.createElement("div");return i.setAttribute("data-position",e),i.className="dhx_message-container dhx_message-container--"+e+(t===document.body?" dhx_message-container--in-body":""),i}e.message=function(t){var e;"string"==typeof t&&(t={text:t}),t.position=t.position||r.MessageContainerPosition.topRight;var i=document.createElement("div");i.className="dhx_widget dhx_message "+(t.css||""),i.setAttribute("role","alert");var c=t.text&&(0,n.uid)();c&&i.setAttribute("aria-describedby",c),t.html?i.innerHTML=t.html:(i.innerHTML='<span class="dhx_message__text" id='.concat(c,"></span>\n\t\t").concat(t.icon?'<span class="dhx_message__icon dxi '.concat(t.icon,'"></span>'):""),i.querySelector("#".concat(c)).textContent=t.text);var d=t.node?(0,o.toNode)(t.node):document.body;"static"===getComputedStyle(d).position&&(d.style.position="relative");var u=l.get(d);u?u[t.position]||(u[t.position]={stack:[],container:s(d,t.position)}):l.set(d,((e={})[t.position]={stack:[],container:s(d,t.position)},e));var h=l.get(d)[t.position],f=h.stack,p=h.container;function g(t){void 0===t&&(t=!0),i&&(!function(t,e){e&&clearTimeout(a.get(t));var i=t.parentNode,n=i.getAttribute("data-position"),o=i.parentNode,r=l.get(o);if(r){var s=r[n];if(s){var c=s.stack,d=c.indexOf(t);-1!==d&&(i.removeChild(t),c.splice(d,1),0===c.length&&o.removeChild(i))}}}(i,t),i=null)}if(0===f.length&&d.appendChild(p),f.push(i),p.appendChild(i),t.expire){var v=setTimeout((function(){return g(!1)}),t.expire);a.set(i,v)}return i.onclick=function(){return g()},{close:function(){return g()}}}},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.alert=void 0;var n=i(38),o=i(39),r=i(0);e.alert=function(e){var i=e.buttons&&e.buttons[0]?e.buttons[0]:n.default.apply,a=(0,o.blockScreen)(e.blockerCss);return new t((function(t){var n="dhx_alert__".concat((0,r.uid)(),"_content"),o="dhx_alert__".concat((0,r.uid)(),"_header"),l=document.createElement("div");l.setAttribute("role","alert"),l.setAttribute("aria-modal","true"),e.text&&l.setAttribute("aria-describedby",n),e.header&&l.setAttribute("aria-labelledby",o),l.className="dhx_widget dhx_alert "+(e.css||"");var s=function(e){"Escape"!==e.key&&"Esc"!==e.key||(c(e),t(!1))};function c(t){t.preventDefault(),a(),document.body.removeChild(l),document.removeEventListener("keydown",s)}l.innerHTML="\n\t\t\t".concat(e.header?"<div id=".concat(o,' class="dhx_alert__header"> ').concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t\t").concat(e.text?"<div id=".concat(n,' class="dhx_alert__content">').concat(!1!==e.htmlEnable?e.text:"","</div>"):"",'\n\t\t\t<div class="dhx_alert__footer ').concat(e.buttonsAlignment?"dhx_alert__footer--"+e.buttonsAlignment:"",'">\n\t\t\t\t<button type="button" aria-label="confirm" class="dhx_alert__apply-button dhx_button dhx_button--view_flat dhx_button--color_primary dhx_button--size_medium">').concat(i,"</button>\n\t\t\t</div>"),!1===e.htmlEnable&&(e.header&&(l.querySelector("#".concat(o)).textContent=e.header),e.text&&(l.querySelector("#".concat(n)).textContent=e.text)),document.body.appendChild(l),l.querySelector(".dhx_alert__apply-button").focus(),l.querySelector("button").addEventListener("click",(function(e){c(e),t(!0)})),document.addEventListener("keydown",s)}))}}).call(this,i(9))},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.confirm=void 0;var n=i(38),o=i(39),r=i(0);e.confirm=function(e){e.buttonsAlignment=e.buttonsAlignment||"right";var i=e.buttons&&e.buttons[1]?e.buttons[1]:n.default.apply,a=e.buttons&&e.buttons[0]?e.buttons[0]:n.default.reject,l=(0,o.blockScreen)("dhx_alert__overlay-confirm "+(e.blockerCss||""));return new t((function(t){var n=document.createElement("div");n.setAttribute("role","alertdialog"),n.setAttribute("aria-modal","true");var o,s=e.header&&(0,r.uid)(),c=e.header&&(0,r.uid)();c&&n.setAttribute("aria-describedby",c),s&&n.setAttribute("aria-labelledby",s);var d=function(e){l(),n.removeEventListener("click",u),document.removeEventListener("keydown",h),document.body.removeChild(n),t(e)},u=function(t){"BUTTON"===t.target.tagName&&d(t.target.classList.contains("dhx_alert__confirm-aply"))},h=function(t){"Escape"===t.key||"Esc"===t.key?(n.querySelector(".dhx_alert__confirm-aply").focus(),d(t.target.classList.contains("dhx_alert__confirm-reject"))):"Tab"===t.key&&("aply"===o?(o="reject",n.querySelector(".dhx_alert__confirm-reject").focus()):(o="aply",n.querySelector(".dhx_alert__confirm-aply").focus()),t.preventDefault())};n.className="dhx_widget dhx_alert dhx_alert--confirm"+(e.css?" "+e.css:""),n.innerHTML="\n\t\t".concat(e.header?'<div class="dhx_alert__header" id='.concat(s,"> ").concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t").concat(e.text?'<div class="dhx_alert__content" id='.concat(c,">").concat(!1!==e.htmlEnable?e.text:"","</div>"):"",'\n\t\t\t<div class="dhx_alert__footer ').concat(e.buttonsAlignment?"dhx_alert__footer--"+e.buttonsAlignment:"",'">\n\t\t\t\t<button type="button" aria-label="reject" class="dhx_alert__confirm-reject dhx_button dhx_button--view_link dhx_button--color_primary dhx_button--size_medium">').concat(a,'</button>\n\t\t\t\t<button type="button" aria-label="aply"class="dhx_alert__confirm-aply dhx_button dhx_button--view_flat dhx_button--color_primary dhx_button--size_medium">').concat(i,"</button>\n\t\t\t</div>"),!1===e.htmlEnable&&(e.header&&(n.querySelector("#".concat(s)).textContent=e.header),e.text&&(n.querySelector("#".concat(c)).textContent=e.text)),document.body.appendChild(n),o="aply",n.querySelector(".dhx_alert__confirm-aply").focus(),n.addEventListener("click",u),document.addEventListener("keydown",h)}))}}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.disableTooltip=e.enableTooltip=e.tooltip=e.getZIndex=e.findPosition=void 0;var o=i(2),r=i(26),a=750,l=200;function s(t,e,i,n,o,a){var l,c,d;if(void 0===o&&(o=8),void 0===a&&(a=0),a>1&&(e=r.Position.center),"top"!==e&&"bottom"!==e){var u=t.top+(t.height-n)/2,h=u<0&&window.pageYOffset+u+n<scrollY+window.innerHeight;d=window.pageYOffset+(h?0:u)}switch(e){case r.Position.center:return(c=t.left+window.pageXOffset+(t.width-i)/2)+o<window.pageXOffset&&(c=t.left+window.pageXOffset),{left:c,top:d,pos:l=r.RealPosition.center};case r.Position.right:return l=r.RealPosition.right,(c=t.right+window.pageXOffset+o)+i>window.innerWidth+window.pageXOffset?s(t,r.Position.left,i,n,o,++a):{left:c,top:d,pos:l};case r.Position.left:return l=r.RealPosition.left,(c=window.pageXOffset+t.left-i-o)<0?s(t,r.Position.right,i,n,o,++a):{left:c,top:d,pos:l};case r.Position.top:return l=r.RealPosition.top,(c=window.pageXOffset+t.left+(t.width-i)/2)+i>window.innerWidth+window.pageXOffset?c=window.innerWidth+window.pageXOffset-i:c<0&&(c=0),t.top<n?s(t,r.Position.bottom,i,n,o,++a):{left:c,top:d=window.pageYOffset+t.top-n-o,pos:l};case r.Position.bottom:default:return(c=window.pageXOffset+t.left+(t.width-i)/2)+i>window.innerWidth+window.pageXOffset?c=window.innerWidth+window.pageXOffset-i:c<0&&(c=0),l=r.RealPosition.bottom,(d=window.pageYOffset+t.bottom+o)+n>window.innerHeight+window.pageYOffset?s(t,r.Position.top,i,n,o,++a):{left:c,top:d,pos:l}}}e.findPosition=s;var c=document.createElement("div"),d=document.createElement("span");d.className="dhx_tooltip__text",c.appendChild(d),c.setAttribute("role","tooltip"),c.style.position="absolute";var u,h=null,f=!1,p=null,g=null;function v(t){return t&&(t.classList.contains("dhx_popup--window")&&t.classList.contains("dhx_popup--window_active")||t.classList.contains("dhx_popup--window_modal")||t.classList.contains("dhx_popup"))?1e7:(null==t?void 0:t.classList.contains("dhx_popup--window"))?9999999:t&&t.offsetParent?v(t.offsetParent):null}function _(t,e,i,n,o,a,l){void 0===n&&(n=""),void 0===o&&(o=!1),void 0===a&&(a=8);var u=t.getBoundingClientRect();l?d.innerHTML=e:d.textContent=e,c.style.left=null,c.style.top=null,document.body.appendChild(c),c.className="dhx_widget dhx_tooltip ".concat(o?" dhx_tooltip--forced":""," ").concat(n);var h=c.getBoundingClientRect(),p=s(u,i,h.width,h.height,a),g=p.left,_=p.top,m=p.pos,y=v(t);switch(y&&(c.style.zIndex=y.toString()),m){case r.RealPosition.bottom:case r.RealPosition.top:case r.RealPosition.left:case r.RealPosition.right:case r.RealPosition.center:c.style.left=g+"px",c.style.top=_+"px"}c.className+=" dhx_tooltip--".concat(m),f=!0,o||setTimeout((function(){c.className+=" dhx_tooltip--animate"}))}function m(t,e,i){var n=i.force,o=i.showDelay,s=i.hideDelay,d=i.position,v=i.css,m=i.htmlEnable,y=i.margin;n||(g=setTimeout((function(){_(t,e,d||r.Position.bottom,v,!1,y,m)}),o||a));var b=function(){var e;f&&(e=s,h&&(p=setTimeout((function(){document.body.removeChild(c),f=!1,p=null}),e||l))),clearTimeout(g),t.removeEventListener("mouseleave",b),t.removeEventListener("blur",b),document.removeEventListener("mousedown",b),h=null,u=null};n&&_(t,e,d,v,n,y,m),t.addEventListener("mouseleave",b),t.addEventListener("blur",b),document.addEventListener("mousedown",b),u=b}function y(t,e){var i=(0,o.toNode)(e.node);i!==h&&(u&&(u(),u=null),h=i,p?(clearTimeout(p),p=null,m(i,t,n(n({},e),{force:!0}))):m(i,t,e))}function b(t){var e=(0,o.locateNode)(t,"dhx_tooltip_text");e&&y(e.getAttribute("dhx_tooltip_text"),{position:e.getAttribute("dhx_tooltip_position")||r.Position.bottom,node:e})}e.getZIndex=v,e.tooltip=y,e.enableTooltip=function(){document.addEventListener("mousemove",b)},e.disableTooltip=function(){document.removeEventListener("mousemove",b)}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=e.GridSelectionEvents=void 0;var r,a=i(1),l=i(8),s=i(0),c=i(6),d=i(3),u=i(17),h=i(7),f=i(5),p=i(14),g=i(4);!function(t){t.beforeUnSelect="beforeUnSelect",t.afterUnSelect="afterUnSelect",t.beforeSelect="beforeSelect",t.afterSelect="afterSelect"}(r||(e.GridSelectionEvents=r={}));var v=function(){function t(t,e,i,o){this._grid=t,this._gridId=o,this._selectedCell=null,this._selectedCells=[],this._selectedSet=new Set,this.config=n({type:"complex",disabled:!1,multiSelection:!1},e),this.events=i||new c.EventSystem(this),this._init()}return t.prototype.setCell=function(t,e,i,n){var r,l,s,c,d,h,f,p,g,v,_,m,y,b=this;void 0===i&&(i=!1),void 0===n&&(n=!1);var x="tree"===this._grid.config.type;if(this._gridId&&u.focusManager.getFocusId()!==this._gridId&&u.focusManager.setFocusId(this._gridId),"row"===this.config.type&&(null===(s=this._selectedCells[0])||void 0===s?void 0:s.row.id)===((null==t?void 0:t.id)||t)||"row"!==this.config.type&&(null===(c=this._selectedCells[0])||void 0===c?void 0:c.row.id)===((null==t?void 0:t.id)||t)&&(null===(d=this._selectedCells[0])||void 0===d?void 0:d.column.id)===((null==e?void 0:e.id)||e)){if(i)return this._removeCell(null===(h=this._selectedCells[0])||void 0===h?void 0:h.row,null===(f=this._selectedCells[0])||void 0===f?void 0:f.column),void(0,a.awaitRedraw)().then((function(){b._grid.paint(),b._setBrowserFocus()}));if("row"===this.config.type&&e&&this._selectedCell){var w=this._grid.getColumn(e.id||e);if(w&&w.id!==(null===(p=this._selectedCell.column)||void 0===p?void 0:p.id))return this._selectedCell={row:this._selectedCell.row,column:w},void(0,a.awaitRedraw)().then((function(){return b._setBrowserFocus()}))}if(!this.config.multiSelection||this.config.multiSelection&&1===this._selectedCells.length)return}if(!(this.config.disabled||this._grid.config.$editable||!this.config.multiSelection&&this._selectedCells.length&&!this._removeCell(null===(g=this._selectedCell)||void 0===g?void 0:g.row,null===(v=this._selectedCell)||void 0===v?void 0:v.column))){if(this.config.multiSelection){if(i||n||this._removeCells(),this.isSelectedCell(t,e))return void this.removeCell((null==t?void 0:t.id)||t,(null==e?void 0:e.id)||e);n&&this._selectedCells.length>1&&!x&&o([],this._selectedCells,!0).forEach((function(t,e){var i=t.row,n=t.column;e>0&&b.removeCell(i.id,n.id)}))}t=this._grid.data.getItem(t&&t.id||t);var C=null===(m=null===(_=this._grid.config)||void 0===_?void 0:_.columns)||void 0===m?void 0:m.filter((function(t){return!t.hidden}));if(e||(e=null==C?void 0:C[0]),(e=this._grid.getColumn(e.id||e))&&t){if(this.config.multiSelection&&n&&this._selectedCells.length&&!x){var S=null===(y=this._selectedCells)||void 0===y?void 0:y[0],E=this._grid.data.getIndex(S.row.id),D=this._grid.data.getIndex(t.id);if(E>D&&(E=(r=[D,E])[0],D=r[1]),"cell"===this.config.type||"complex"===this.config.type){var O=C.map((function(t){return t.id})),k=O.indexOf(S.column.id),T=O.indexOf(e.id);if(-1!==k&&-1!==T){k>T&&(k=(l=[T,k])[0],T=l[1]);var R=C.slice(k,T+1);this._grid.data.mapRange(E,D,(function(t){R.forEach((function(e){-1===b._findIndex({row:t,column:e})&&b._setCell(t,e)}))}))}}else this._grid.data.mapRange(E,D,(function(t){-1===b._findIndex({row:t,column:e})&&b._setCell(t,e)}))}else this._setCell(t,e);(0,a.awaitRedraw)().then((function(){b._grid.paint(),b._setBrowserFocus()}))}}},t.prototype.removeCell=function(t,e){var i=this;if(t&&e&&("cell"===this.config.type||"complex"===this.config.type)){var n=this._selectedCells.find((function(i){var n=i.row,o=i.column;return n.id==t&&o.id==e}));n&&this._removeCell(n.row,n.column)}else if(t){this._selectedCells.filter((function(e){return e.row.id==t})).forEach((function(t){var e=t.row,n=t.column;i._removeCell(e,n)}))}else this._removeCells();(0,a.awaitRedraw)().then((function(){i._grid.paint()}))},t.prototype.getCell=function(){return this._selectedCell},t.prototype.getCells=function(){return this._selectedCells},t.prototype.disable=function(){this.removeCell(),this.config.disabled=!0,this._grid.paint()},t.prototype.enable=function(){this.config.disabled=!1,this._grid.paint()},t.prototype.isSelectedCell=function(t,e){var i=(null==t?void 0:t.id)||t,n=(null==e?void 0:e.id)||e;return this._selectedSet.has(this._cellKey(i,n))},t.prototype.restoreFocus=function(){this._setBrowserFocus()},t.prototype.toHTML=function(){var t=this;if(!this._isUnselected()){if(this.config.multiSelection){var e=[],i={};return this._selectedCells.forEach((function(n,o,r){var a=(0,p.normalizeCell)(n,t._grid);e.push(t._toHTML(a.row,a.column,o===r.length-1||"cell"===t.config.type||"complex"===t.config.type,i[n.row.id])),i[n.row.id]=!0})),e}var n=(0,p.normalizeCell)(this._selectedCell,this._grid);return this._toHTML(n.row,n.column,!0)}},t.prototype._setCell=function(t,e){t&&e&&(0,s.isDefined)(t.id)&&(0,s.isDefined)(e.id)&&this.events.fire(r.beforeSelect,[t,e])&&(this._selectedCell={row:t,column:e},this.config.multiSelection?this._selectedCells.push(this._selectedCell):(this._selectedSet.clear(),this._selectedCells=[this._selectedCell]),this._selectedSet.add(this._cellKey(t.id,e.id)),this.events.fire(r.afterSelect,[t,e]))},t.prototype._removeCell=function(t,e,i){var n,o;if(void 0===i&&(i=!1),!(t&&e&&(0,s.isDefined)(t.id)&&(0,s.isDefined)(e.id)))return!1;if(!i&&!this.events.fire(r.beforeUnSelect,[t,e]))return!1;var a=this._selectedCells.findIndex((function(i){return i.row.id===t.id&&i.column.id===e.id}));return this._selectedCells.splice(a,1),this._selectedSet.delete(this._cellKey(t.id,e.id)),this._selectedCell&&e.id===this._selectedCell.column.id&&t.id===this._selectedCell.row.id&&(this._selectedCell=(null===(n=this._selectedCells)||void 0===n?void 0:n[(null===(o=this._selectedCells)||void 0===o?void 0:o.length)-1])||null),!i&&this.events.fire(r.afterUnSelect,[t,e]),!0},t.prototype._removeCells=function(t){var e=this;void 0===t&&(t=!1),this._selectedSet.clear(),o([],this._selectedCells,!0).forEach((function(i){e._removeCell(null==i?void 0:i.row,null==i?void 0:i.column,t)}))},t.prototype._init=function(){var t=this;this._grid.events.on(d.GridEvents.cellClick,(function(e,i,n){t.setCell(e,i,n.ctrlKey||n.metaKey,n.shiftKey)})),this._grid.data.events.on(l.DataEvents.beforeRemove,(function(e){var i,n;if(e&&t._selectedCell&&t._selectedCell.row&&t._selectedCell.row.id===e.id){var o=void 0,r=t._grid.data.getIndex(e.id);if(t._grid.data instanceof l.TreeCollection){var a=t._grid.data.getItems(e.parent);o=(null===(i=a[r+1])||void 0===i?void 0:i.id)||(null===(n=a[r-1])||void 0===n?void 0:n.id)||e.parent}else o=t._grid.data.getId(r+1)||t._grid.data.getId(r-1);(0,s.isId)(o)&&(t.setCell(o),t._grid.paint())}})),this._grid.data.events.on(l.DataEvents.removeAll,(function(){t._removeCells()})),this._grid.data.events.on(l.DataEvents.load,(function(){t._removeCells(!0)}))},t.prototype._toHTML=function(t,e,i,n){var o,r,l,c,u,p,v,_,m,y,b,x,w;void 0===i&&(i=!1),void 0===n&&(n=!1);var C=this._grid.data.getRawData(0,-1,null,2);if(-1===(0,s.findIndex)(C,(function(e){return e.id==t.id})))return null;var S=this._grid.config,E=S.topSplit,D=S.bottomSplit,O=S.$totalWidth,k=S.$totalHeight,T=S.columns,R=null==T?void 0:T.filter((function(t){return!t.hidden})),M={left:(0,h.getCurrFixedCols)(this._grid.config,d.Split.left),right:(0,h.getCurrFixedCols)(this._grid.config,d.Split.right)},I=this._grid.data.getLength(),P={top:E?this._grid.data.getRawData(0,E):[],bottom:D?this._grid.data.getRawData(I-D,I):[]},H={left:null===(o=null==M?void 0:M.left)||void 0===o?void 0:o.map((function(t){return t.id})),right:null===(r=null==M?void 0:M.right)||void 0===r?void 0:r.map((function(t){return t.id}))},F={top:P.top.map((function(t){return t.id})),bottom:P.bottom.map((function(t){return t.id}))},A=null===(l=null==M?void 0:M.left)||void 0===l?void 0:l.reduce((function(t,e){return t+(e.$width||0)}),0),j=null===(c=null==M?void 0:M.right)||void 0===c?void 0:c.reduce((function(t,e){return t+(e.$width||0)}),0),$=P.top.reduce((function(t,e){return t+(0,g.getTotalRowHeight)(e)}),0),L=P.bottom.reduce((function(t,e){return t+(0,g.getTotalRowHeight)(e)}),0),N=this._grid.getCellRect(t.id,e.id);t.$subRowHeight&&t.$opened&&(N.height=N.height-t.$subRowHeight);var V,W,B,z,G=this._grid.getScrollState(),Y=N.y,U=null===(u=F.top)||void 0===u?void 0:u.includes(t.id),X=null===(p=H.left)||void 0===p?void 0:p.includes(e.id),q=M.left.length&&A>N.x-G.x,K=P.top.length&&$>N.y-G.y,Z=N.width,J=N.height,Q=null,tt=null,et=q?A+G.x:N.x;if(q&&(Z-=(X?(0,f.getTotalWidth)(M.left.slice(0,R.indexOf(e))):A)-(N.x-G.x)),K&&(J-=(U?(0,f.getTotalHeight)(P.top.slice(0,C.indexOf(t))):$)-(N.y-G.y)-1,Y+=N.height-J),U)if(Y=N.y+G.y,(nt=this._grid.getSpan(t.id,e.id))&&nt.rowspan>1){var it=C.indexOf(t);Q=(0,f.getTotalHeight)(P.top.slice(it,it+nt.rowspan))}else J=E===F.top.indexOf(t.id)+1?N.height-1:N.height;if(X)if(et=N.x+G.x,(nt=this._grid.getSpan(t.id,e.id))&&nt.colspan>1){it=null==R?void 0:R.indexOf(e);tt=(0,f.getTotalWidth)(M.left.slice(it,it+nt.colspan))}else Z=M.left.length===H.left.indexOf(e.id)+1?N.width-1:N.width;if((null===(v=M.right)||void 0===v?void 0:v.length)||D){var nt=this._grid.getSpan(t.id,e.id),ot=(0,g.getReverseScrollState)(this._grid);if((null===(_=M.right)||void 0===_?void 0:_.length)&&(V=(null===(m=H.right)||void 0===m?void 0:m.includes(e.id))||nt&&R.indexOf(e)+(nt.colspan||1)>R.length-M.right.length,(W=O-j<ot.x+N.x+N.width)&&!V&&(Z-=ot.x+N.x+N.width-O+j),V))if(nt&&!(null===(y=H.right)||void 0===y?void 0:y.includes(nt.column))){it=R.length-R.indexOf(e)-(nt.colspan||1);var rt=O-j;et=N.x+ot.x<rt+1?N.x:rt-ot.x+1,tt=(0,f.getTotalWidth)(it?M.right.slice(0,-it):M.right)-1,Z=N.width-ot.x}else{var at=(null===(b=H.right)||void 0===b?void 0:b.indexOf(e.id))?0:1;et=N.x-ot.x+at,Z=N.width-at}if(D&&(B=F.bottom.includes(t.id)||nt&&C.indexOf(t)+(nt.rowspan||1)>C.length-D,(z=k-L<ot.y+N.y+N.height)&&!B&&(J-=ot.y+N.y+N.height-k+L),B))if(nt&&!F.bottom.includes(nt.row)){var lt=k-L;at=(it=C.length-C.indexOf(t)-(nt.rowspan||1))?0:1;Y=N.y+ot.y<lt?N.y:lt-ot.y,Q=(0,f.getTotalHeight)(it?P.bottom.slice(0,-it):P.bottom)-at,J=N.height-ot.y-at}else Y=N.y,J=N.height-(D===F.bottom.indexOf(t.id)+1?1:0)}var st=null;"row"!==this.config.type&&"complex"!==this.config.type||n||(st=(0,a.el)(".dhx_grid-selected-row",{style:{width:(null===(x=M.left)||void 0===x?void 0:x.length)?O-G.x:O,height:J,minHeight:Q,minWidth:tt,display:J<0&&!Q?"none":"flex",top:Y,left:(null===(w=M.left)||void 0===w?void 0:w.length)?G.x:0,position:"absolute"}}));var ct=null;return"cell"!==this.config.type&&"complex"!==this.config.type||!i||(ct=(0,a.el)(".dhx_grid-selected-cell",{style:{width:Z,height:J,top:Y,minHeight:Q,minWidth:tt,left:et,position:"absolute",display:Z<0&&!tt||J<0&&!Q?"none":"flex",borderLeft:q&&!X?"none":null,borderRight:W&&!V?"none":null,borderTop:K&&!U?"none":null,borderBottom:z&&!B?"none":null}})),(0,a.el)(".dhx_grid-selection",{style:{zIndex:20}},[st,ct])},t.prototype._isUnselected=function(){return!this._selectedCell||!this._selectedCell.row||!this._selectedCell.column||0===this._selectedCells.length},t.prototype._findIndex=function(t){var e=this;void 0===t&&(t=this._selectedCell);var i=-1;return this._selectedCells.some((function(n,o){if("cell"===e.config.type||"complex"===e.config.type){if((0,s.compare)(n.row,t.row)&&(0,s.compare)(n.column,t.column))return i=o,!0}else if("row"===e.config.type&&(0,s.compare)(n.row,t.row))return i=o,!0})),i},t.prototype._cellKey=function(t,e){return"row"===this.config.type?""+t:t+"_"+e},t.prototype._setBrowserFocus=function(){var t=this._grid.getRootView().data.getRootNode();if(t){var e=t.querySelector(".dhx_grid_data");if(e&&this._selectedCell&&this._selectedCell.row&&this._selectedCell.column){var i=e.querySelector('[data-dhx-id="'.concat(this._selectedCell.row.id,'"]')),n=this._grid.getSpan(this._selectedCell.row.id,this._selectedCell.column.id);if(i){var o=n?t.querySelector(".dhx_span-spans"):null,r=o?o.querySelector('[data-dhx-col-id="'.concat(n.column,'"][data-dhx-id="').concat(n.row,'"]')):i.querySelector('[data-dhx-col-id="'.concat(this._selectedCell.column.id,'"]'));r&&(r.tabIndex=0,r.focus({preventScroll:!0}))}}}},t}();e.Selection=v},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.proRender=e.render=e.applyAutoWidth=e.getElementSizes=e.getRenderConfig=void 0;var o=i(1),r=i(2),a=i(4),l=i(5),s=i(3),c=i(19),d=i(54),u=i(55),h=i(0),f=i(7),p=i(115),g=i(116),v=i(117),_=i(20);function m(t,e,i,n){var o=void 0===i?[0,0]:i,r=o[0],a=o[1],l=t[0],s=t[1],c=e[0],d=e[1];return c<=l&&l<=d||c<=s&&s<=d||l<=c&&d<=s||l<r||a&&s>=n-a}function y(t,e,i){var o=t.config,r=o.spans,l=void 0===r?[]:r,c=o.columns,d=o.leftSplit,u=void 0===d?0:d,h=o.topSplit,p=void 0===h?0:h,v=o.rightSplit,_=void 0===v?0:v,y=o.bottomSplit,b=void 0===y?0:y,x=c.filter((function(t){return!t.hidden})),w=(0,a.calculateVisibleRange)(i,t._scroll,o,e),C=x.slice(w.xStart,w.xEnd),S=e.slice(w.yStart,w.yEnd),E=l.filter((function(t){var i;if(!(null===(i=t.$renderFrom)||void 0===i?void 0:i.length))return!1;var n=m(t.$rowsVisibility,[w.yStart,w.yEnd],[p,b],e.length),o=m(t.$colsVisibility,[w.xStart,w.xEnd],[u,_],c.length);return n&&o})),D={left:(0,f.getCurrFixedCols)(o,s.Split.left),right:(0,f.getCurrFixedCols)(o,s.Split.right)},O={top:e.slice(0,o.topSplit||0),bottom:o.bottomSplit?e.slice(-o.bottomSplit):[]};return t.config.$subRowCells&&(0,g.setSubRowCell)(t,S),n(n({},o),{data:e,columns:o.columns,scroll:t._scroll,$positions:w,headerHeight:o.$headerHeight,footerHeight:o.$footerHeight,firstColId:x[0]&&x[0].id,events:t.events,_events:t._events,filteredColumns:x,currentColumns:C,currentRows:S,currentSpans:E,fixedColumns:D,fixedRows:O,sort:t._sortingStates,content:t.content,gridId:t._uid,commonSummary:t._commonSummary,colSummary:t._colSummary,dropManager:t._dropManager,blockSelection:t.block,$renderFrom:"render"})}function b(t){if(t&&(t.tagName||(t=t._parent._container),t)){var e=t.currentStyle||window.getComputedStyle(t),i=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)||0,n=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)||0;return{width:t.clientWidth-i,height:t.clientHeight-n}}}function x(t,e,i){void 0===i&&(i=!1);var r,a=(0,c.getCells)(t),s=t.filteredColumns,d=t.$resizing,u=t.$totalHeight,p=t.$totalWidth,v=t.leftSplit,_=t.$positions,m=t.$scrollBarWidth,y=(0,c.getSpans)(t);if(d){var b=(0,h.findIndex)(s,(function(t){return t.id===d})),x=(0,l.getTotalWidth)(s.slice(0,b))+s[b].$width;r=(0,o.el)(".dhx_grid-resize-line",{style:{top:0,left:x,height:u}})}var w=t.dropManager?t.dropManager.toHTML():null,C=t.blockSelection?t.blockSelection.toHTML():null,S=t.selection?t.selection.toHTML():null;S="string"==typeof S?(0,o.el)("div.dhx_selection",{".innerHTML":S}):S;var E=_,D=i?t.$height-t.$footerHeight-t.$headerHeight-m.x-(t.$footer?1:0)-f.BORDERS:u;return(0,o.el)(".dhx_data-wrap",{style:{height:D,width:p,"padding-left":e.x,"padding-top":e.y},role:"presentation","data-dhx-drop-area":"row"},[(0,o.el)(".dhx_grid_data".concat(v?".dhx_grid_fixed_left":""),n(n({_flags:o.KEYED_LIST},(0,c.getHandlers)(E.yStart,E.xStart,t)),{role:"rowgroup"}),a),(0,g.getSubRowContent)(t),(0,o.el)(".dhx_span-spans",n({role:"presentation"},(0,c.getHandlers)(E.yStart,E.xStart,t)),y),(0,o.el)(".dhx_grid_selection",{_ref:"selection","aria-hidden":"true"},[].concat(S,r)),w,C])}function w(t,e,i){var n=i.height-f.BORDERS;return n=e?n:n-t.headerHeight,t.$footer?e?n:n-t.footerHeight:n}function C(t,e,i){void 0===i&&(i=!1);var n=!i&&t.$totalHeight>=e.height-(t.$headerHeight||0)?(0,r.getScrollbarWidth)():0,o=e.width-f.BORDERS-n;if(!(o<0)){var a=(t.columns||[]).filter((function(t){return!t.hidden})),s=[],c=[],d=!1;a.forEach((function(e){e.width||e.$fixedWidth||!(0,l.isAutoWidth)(t,e)?s.push(e):c.push(e)}));do{d=!1;for(var u=c.reduce((function(t,e){return t+(e.gravity||1)}),0),h=(0,l.getTotalWidth)(s),p=function(t){var e=o>h?(o-h)*((t.gravity||1)/u):0,i=t.minWidth&&e<t.minWidth,n=t.maxWidth&&e>t.maxWidth;if(i||n)return d=!0,t.$width=i?t.minWidth:t.maxWidth,c=c.filter((function(e){return e.id!=t.id})),s.push(t),"break";t.$width=e},g=0,v=c;g<v.length;g++){if("break"===p(v[g]))break}}while(d)}}e.getRenderConfig=y,e.getElementSizes=b,e.applyAutoWidth=C,e.render=function(t,e,i,r,a){var h=b(e._container);t&&t.node&&t.node.parent&&t.node.parent.el&&(h=b(t.node.parent.el));var p=e.config;if(!p)return(0,o.el)("div");if(!p.columns.length)return(0,o.el)(".dhx_grid",{"data-dhx-widget-id":a,"data-dhx-root-id":p.rootParent,"data-dhx-drop-area":"common",role:"empty-grid"});var g=e.data.getRawData(0,-1,null,2);p.columns.reduce((function(t,e){return e.hidden?t:e.hidden}),!0)?p.$totalHeight=0:p.$totalHeight=g.reduce((function(t,e){return t+(e.$height||0)}),0);var v={width:(p.width&&"number"==typeof p.width?p.width:null==h?void 0:h.width)||0,height:(p.height&&"number"==typeof p.height?p.height:null==h?void 0:h.height)||0};(0,l.isAutoWidth)(p)&&(C(p,v),p.$totalWidth=(0,l.getTotalWidth)(p.columns.filter((function(t){return!t.hidden})))),p.$width=v.width,p.$height=v.height;var _=y(e,g,v);_.selection=r,_.datacollection=e.data;var m=(0,c.getShifts)(_);_.$scrollBarWidth=(0,f.calcScrollBarWidth)(_);var S,E,D,O,k=(0,l.isCssSupport)("position","sticky"),T=w(_,k,v),R={wrapper:v,sticky:k,shifts:m,gridBodyHeight:T,footerAtBottom:!1},M=(0,u.getFixedRows)(_,n(n({},R),{name:"header",position:"top"})),I=_.$footer?(0,u.getFixedRows)(_,n(n({},R),{name:"footer",position:"bottom"})):null,P=_.$totalWidth+f.BORDERS<v.width?"dhx_grid-less-width":"",H=_.$totalHeight+f.BORDERS<v.height?"dhx_grid-less-height":"",F=_.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",A=p.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"";if(!t.node){var j=e.getScrollState(),$=j.x,L=j.y;(0,o.awaitRedraw)().then((function(){e.scroll($,L)}))}return(0,o.el)(".dhx_grid.dhx_widget",n({class:(_.css||"")+(k?"":" dhx_grid_border")+(p.multiselection?" dhx_no-select--pointer":""),"data-dhx-widget-id":a,"data-dhx-root-id":p.rootParent,"data-dhx-drop-area":"common"},(S=_.data,E=p.columns,D=_.editable,O=_.multiselection,{role:"tree"===_.type?"treegrid":"grid","aria-rowcount":S.length,"aria-colcount":E.filter((function(t){return!t.hidden})).length,"aria-readonly":D?"false":"true","aria-multiselectable":O?"true":"false"})),[(0,o.resizer)((function(){return e.paint()})),(0,o.el)(".dhx_grid-content",n(n({style:n({},v)},i),{class:"".concat(P," ").concat(H," ").concat(F," ").concat(A).trim(),role:"presentation"}),[(0,o.el)(".dhx_grid-focus-sentinel",{tabindex:0,role:"button","aria-label":"Enter grid"}),k?null:M,(0,o.el)(".dhx_grid-body",{style:{height:T,width:v.width-f.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[(0,o.el)("div",{},[k?M:null,x(_,m),k?I:null])]),(0,d.getFixedColsHeader)(_,R,s.Split.left),(0,d.getFixedColsHeader)(_,R,s.Split.right),(0,d.getFixedCols)(_,R,s.Split.left),(0,d.getFixedCols)(_,R,s.Split.right),(0,u.getFixedDataRows)(_,R,s.Split.top),(0,u.getFixedDataRows)(_,R,s.Split.bottom),k?null:I,(0,o.el)(".dhx_grid-focus-sentinel.dhx_grid-focus-sentinel--end",{tabindex:0,role:"button","aria-label":"Exit grid"})])])},e.proRender=function(t,e,i,r,h){var g,m=b(e._container);t&&t.node&&t.node.parent&&t.node.parent.el&&(m=b(t.node.parent.el));var S=e.config;if(!S)return(0,o.el)("div");if(!S.columns.length)return(0,o.el)(".dhx_grid",{"data-dhx-widget-id":h,"data-dhx-root-id":S.rootParent,"data-dhx-drop-area":"common",role:"empty-grid"});var E,D=e.data.getRawData(0,-1,null,2),O=S.topSplit||0,k=S.bottomSplit||0,T=0,R=0;S.columns.reduce((function(t,e){return e.hidden?t:e.hidden}),!0)?S.$totalHeight=0:S.$totalHeight=D.reduce((function(t,e,i){return O&&i<O+T&&(S.subRow&&(e.$subRowHeight=0,e.$opened=!1),e.hidden&&T++),k&&i>=D.length-k-R&&(S.subRow&&(e.$subRowHeight=0,e.$opened=!1),e.hidden&&R++),e.$index=i,t+(0,a.getTotalRowHeight)(e)}),0);var M="auto"===e.config.height;M&&(E=function(t,e,i){var n,o,r=t._container,a=e.$headerHeight+(e.$footerHeight&&e.$footerHeight+1)+e.$totalHeight+f.BORDERS;if(r){var l=window.getComputedStyle(r),s=l.minHeight,c=l.maxHeight;return a<=parseFloat(s)?parseFloat(s):a>=parseFloat(c)?parseFloat(c):a+(0,f.calcScrollBarWidth)(e,!!(null===(n=t.scrollView)||void 0===n?void 0:n.config.enable),i).x}return a+(i?(0,f.calcScrollBarWidth)(e,!!(null===(o=t.scrollView)||void 0===o?void 0:o.config.enable),i).x:0)}(e,S,m));var I=S.width&&"number"==typeof S.width?S.width:null==m?void 0:m.width,P=S.height&&"number"==typeof S.height?S.height:null==m?void 0:m.height,H={width:I||0,height:(M?E:P)||0},F=null==S?void 0:S.group,A=null==S?void 0:S.dragPanel,j=null==F?void 0:F.panel,$=!!S.dragPanel;j&&(H.height-=F.panelHeight||40),$&&(H.width-=(null==A?void 0:A.width)||_.defaultDragPanelConfig.width),(0,l.isAutoWidth)(S)&&(C(S,H,e.scrollView&&e.scrollView.config.enable),S.$totalWidth=(0,l.getTotalWidth)(S.columns.filter((function(t){return!t.hidden})))),S.$width=H.width,S.$height=H.height;var L=y(e,D,H);L.selection=r,L.datacollection=e.data;var N=(0,c.getShifts)(L);L.$scrollBarWidth=(0,f.calcScrollBarWidth)(L,!!(null===(g=e.scrollView)||void 0===g?void 0:g.config.enable));var V=(0,l.isCssSupport)("position","sticky"),W=w(L,V,H),B={wrapper:H,sticky:V,shifts:N,gridBodyHeight:W,footerAtBottom:!1},z=L.$totalWidth+f.BORDERS<H.width?"dhx_grid-less-width":"",G=L.$totalWidth+f.BORDERS===H.width?"dhx_grid-full-width":"",Y=L.$totalHeight+f.BORDERS<H.height-L.$footerHeight-L.$headerHeight?"dhx_grid-less-height":"",U=L.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",X=S.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"",q="bottom"===S.footerPosition&&!!Y&&!M;B.footerAtBottom=q;var K=(0,u.getFixedRows)(L,n(n({},B),{name:"header",position:"top"})),Z=L.$footer?(0,u.getFixedRows)(L,n(n({},B),{name:"footer",position:"bottom"})):null;if(!t.node){var J=e.getScrollState(),Q=J.x,tt=J.y;(0,o.awaitRedraw)().then((function(){e.scroll(Q,tt)}))}var et=(0,o.el)("div",{},[V?K:null,x(L,N,q),V?Z:null]);return(0,o.el)(".dhx_grid.dhx_widget",{class:(L.css||"")+(V?"":" dhx_grid_border")+(S.multiselection?" dhx_no-select--pointer":""),style:{height:null!=E?E:null},"data-dhx-widget-id":h,"data-dhx-root-id":S.rootParent,role:"tree"===S.type?"treegrid":"grid","aria-rowcount":L.data.length,"aria-colcount":L.filteredColumns.length,"aria-readonly":L.editable?"false":"true","aria-multiselectable":L.multiselection?"true":"false","data-dhx-drop-area":"common"},[(0,o.resizer)((function(){return e.paint()})),j&&(0,p.getGroupPanel)(S.$grouped,e)||null,$&&(0,v.getDragPanelNode)(e,L,B,!!Y)||null,(0,o.el)(".dhx_grid-content",n(n({style:n({},H)},i),{class:"".concat(z," ").concat(Y," ").concat(G," ").concat(U," ").concat(X).trim(),role:"presentation"}),[(0,o.el)(".dhx_grid-focus-sentinel",{tabindex:0,role:"button","aria-label":"Enter grid"}),V?null:K,(0,o.el)(".dhx_grid-body",{style:{height:W,width:H.width-f.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[e.scrollView&&e.scrollView.config.enable?e.scrollView.render([et]):et]),(0,d.getFixedColsHeader)(L,B,s.Split.left),(0,d.getFixedColsHeader)(L,B,s.Split.right),(0,d.getFixedCols)(L,B,s.Split.left),(0,d.getFixedCols)(L,B,s.Split.right),(0,u.getFixedDataRows)(L,B,s.Split.top),(0,u.getFixedDataRows)(L,B,s.Split.bottom),V?null:Z,(0,o.el)(".dhx_grid-focus-sentinel.dhx_grid-focus-sentinel--end",{tabindex:0,role:"button","aria-label":"Exit grid"})])])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditor=void 0;var n,o=i(3),r=i(91),a=i(92),l=i(93),s=i(106),c=i(107),d=i(114),u={cell:{row:null,col:null},editor:null,gridId:null};e.getEditor=function(t,e,i,h){var f="boolean"===e.type?"checkbox":i.$editable.editorType;if(void 0===f&&(f=i.autoHeight?"textarea":"input"),u.cell.row===t.id&&u.cell.col===e.id&&u.gridId===i.gridId&&i.$editable.editor)return u.editor;switch("checkbox"!==f&&(u={cell:{row:t.id,col:e.id},editor:u.editor,gridId:i.gridId}),n||(n=function(){u={cell:{row:null,col:null},editor:null,gridId:null}},i.events.on(o.GridEvents.afterEditEnd,n)),f){case"input":default:return u.editor=new r.InputEditor(t,e,i);case"textarea":return u.editor=new d.TextAreaEditor(t,e,i,h);case"select":return u.editor=new a.SelectEditor(t,e,i);case"datePicker":return u.editor=new l.DateEditor(t,e,i);case"checkbox":return new s.CheckboxEditor(t,e,i);case"multiselect":case"combobox":return u.editor=new c.ComboboxEditor(t,e,i)}}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.InputEditor=void 0;var o=i(1),r=i(3),a=i(0),l=i(4),s=i(18),c=function(){function t(t,e,i){this.prevValue="",this._config=i,this._cell={row:t,col:e},this.type=e.type,this._initHandlers()}return t.prototype.endEdit=function(t){if(this._config.$editable){var e;if(!t&&(e=this._removeValuePattern(this._input.value,!0),"number"===this.type||this._cell.col.numberMask))if(e=parseFloat(e),Number.isNaN(e))e="";else{var i=this._cell.col.editorConfig,n=parseFloat(null==i?void 0:i.min),o=parseFloat(null==i?void 0:i.max);(0,a.isDefined)(null==i?void 0:i.min)&&e<n&&(e=n),(0,a.isDefined)(null==i?void 0:i.max)&&e>o&&(e=o)}this._config.events.fire(r.GridEvents.beforeEditEnd,[e,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[e,this._cell.row,this._cell.col])):this._input.focus()}},t.prototype.toHTML=function(t){var e;(0,a.isDefined)(t)&&(this.type="string"),t=null!==(e=this._input?this._input.value:null!=t?t:this._cell.row[this._cell.col.id])&&void 0!==e?e:"";var i=this._cell.col.numberMask;return(0,a.isDefined)(null==i?void 0:i.maxDecLength)&&(i=n(n({},i),{maxDecLength:void 0})),t=this._applyValuePattern(t,this._input,!0,i),this._config.$editable.editor=this,(0,o.el)("input.dhx_cell-editor.dhx_cell-editor__input",{_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,l.getColumnHeaderText)(this._cell.col),onblur:this._handlers.onBlur,oninput:this._handlers.onInput,value:t})},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onInput:function(){var e=t._removeValuePattern(t._input.value);"number"===t.type&&(t._isValidWord(e)?t.prevValue=e:e=t.prevValue,!t.prevValue.length||"-"===t.prevValue||t._isCorrectRange(parseFloat(t.prevValue))?t._input.classList.remove("dhx_cell-editor__input--not-valid"):t._input.classList.add("dhx_cell-editor__input--not-valid")),t._input.value=t._applyValuePattern(e,t._input)},didInsert:function(e){t._input=e.el,t._input.focus()}}},t.prototype._isValidWord=function(t){var e,i=null===(e=t[t.length-1])||void 0===e?void 0:e.toLocaleLowerCase(),n=function(t,e){return t.toLocaleLowerCase().split(e.toLocaleLowerCase()).length-1};return!t.length||"-"===t||"."===t||"-."===t&&this._cell.col.numberMask||!isNaN(Number(t))&&t.trim().length===t.length||t.replace("-","").length>1&&"e"===i&&!n(this.prevValue,"e")||t.replace("-","").length>1&&"e"===i&&1===n(t,"e")},t.prototype._isCorrectRange=function(t){var e=!0,i=this._cell.col.editorConfig,n=parseFloat(null==i?void 0:i.min),o=parseFloat(null==i?void 0:i.max);return(0,a.isDefined)(null==i?void 0:i.min)&&(0,a.isDefined)(null==i?void 0:i.max)?e=t>=n&&t<=o:(0,a.isDefined)(null==i?void 0:i.min)?e=t>n:(0,a.isDefined)(null==i?void 0:i.max)&&(e=t<o),e},t.prototype._applyValuePattern=function(t,e,i,o){return void 0===i&&(i=!1),this._cell.col.numberMask?(0,s.numberMask)(t.toString(),n(n({},o||this._cell.col.numberMask),{onlyView:i}),e):this._cell.col.patternMask?(0,s.patternMask)(t.toString(),this._cell.col.patternMask,e):t},t.prototype._removeValuePattern=function(t,e){return void 0===e&&(e=!1),this._cell.col.numberMask?(0,s.removeNumberMask)(t,n(n({},this._cell.col.numberMask),{lastCall:e})):this._cell.col.patternMask?(0,s.removePatternMask)(t,this._cell.col.patternMask):t},t}();e.InputEditor=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectEditor=void 0;var n=i(1),o=i(3),r=i(4),a=function(){function t(t,e,i){this._config=i,this._cell={row:t,col:e},this._initHandlers()}return t.prototype.endEdit=function(t){var e;this._config.$editable&&(t||(e=this._input.value),this._config.events.fire(o.GridEvents.beforeEditEnd,[e,this._cell.row,this._cell.col])?(this._input.removeEventListener("blur",this._handlers.onBlur),this._input.removeEventListener("keydown",this._handlers.onkeydown),this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(o.GridEvents.afterEditEnd,[e,this._cell.row,this._cell.col])):this._input.focus())},t.prototype.toHTML=function(){var t=(0,r.getEditorOptions)(this._cell.col,this._cell.row).map((function(t){return"string"==typeof t?{id:"".concat(t),value:t}:t}))||[],e=this._cell.row[this._cell.col.id];this._input&&(e=this._input.options[this._input.selectedIndex].value);var i=t.map((function(t){return(0,n.el)("option",{selected:t.id.toString()===(null==e?void 0:e.toString()),value:t.id},t.value)}));return this._config.$editable.editor=this,(0,n.el)("select.dhx_cell-editor.dhx_cell-editor__select",{_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,r.getColumnHeaderText)(this._cell.col)},i)},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onkeydown:function(e){"Escape"===e.key&&t.endEdit()},didInsert:function(e){var i=e.el;t._input=i,i.focus(),i.addEventListener("blur",t._handlers.onBlur),i.addEventListener("keydown",t._handlers.onkeydown)}}},t}();e.SelectEditor=a},function(t,e,i){"use strict";var n=this&&this.__rest||function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(i[n[o]]=t[n[o]])}return i};Object.defineProperty(e,"__esModule",{value:!0}),e.DateEditor=void 0;var o=i(1),r=i(3),a=i(4),l=i(94),s=i(13),c=i(30),d=function(){function t(t,e,i){var n=this;this._config=i,this._cell={row:t,col:e},this._editorConfig=this._cleanConfig(e),this._calendar=new l.Calendar(null,this._editorConfig),this._calendar.setValue(this._getValue(this._cell.row[this._cell.col.id])),this._value=this._calendar.getValue(),this._cell.row[this._cell.col.id]=this._value,this._popup=new c.Popup,this._popup.attach(this._calendar),this._calendar.events.on(l.CalendarEvents.change,(function(){n.endEdit(!1,!0)})),this._popup.events.on(c.PopupEvents.afterHide,(function(){n.endEdit()})),this._initHandlers()}return t.prototype.endEdit=function(t,e){var i=this;if(this._handlers&&this._config.$editable){var n=this._calendar.config.dateFormat,a=this._cell.row[this._cell.col.id],l=this._input.value;if(!t){if(a instanceof Date||e)return this._value=this._calendar.getValue(),this._input.value=this._value,void this._popup.hide();!(0,s.stringToDate)(l,n,!0)&&l||(!a||l.length!==a.length)&&a&&l||(this._value=l,this._value?this._calendar.setValue(this._value):this._calendar.clear())}var c=this._calendar.getValue(this._editorConfig.asDateObject);this._config.events.fire(r.GridEvents.beforeEditEnd,[c,this._cell.row,this._cell.col])?(this._input.removeEventListener("focus",this._handlers.onFocus),this._input.removeEventListener("change",this._handlers.onChange),document.removeEventListener("mousedown",this._handlers.onOuterClick),(0,o.awaitRedraw)().then((function(){i._popup.destructor(),i._calendar.destructor()})),this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[c,this._cell.row,this._cell.col])):this._input.focus()}},t.prototype.toHTML=function(){var t=this._getValue(this._cell.row[this._cell.col.id]);return this._config.$editable.editor=this,document.addEventListener("mousedown",this._handlers.onOuterClick),(0,o.el)("input.dhx_cell-editor.dhx_cell-editor__input.dhx_cell-editor__datepicker",{_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,a.getColumnHeaderText)(this._cell.col),value:t})},t.prototype._cleanConfig=function(t){var e=t.editorConfig||{},i=(e.value,e.range,e.dateFormat,n(e,["value","range","dateFormat"]));return i.dateFormat=t.dateFormat,i},t.prototype._initHandlers=function(){var t=this;this._handlers={onFocus:function(){(0,o.awaitRedraw)().then((function(){t._popup.show(t._input,{centering:!0,mode:"bottom",theme:t._input})}))},onChange:function(){t.endEdit()},onOuterClick:function(e){if(e.target instanceof Node){var i=t._input&&t._input.contains(e.target),n=t._popup&&t._popup.getRootNode()&&t._popup.getRootNode().contains(e.target);i||n||t._popup.hide()}},didInsert:function(e){var i=e.el;t._input=i,t._input.addEventListener("focus",t._handlers.onFocus),t._input.addEventListener("change",t._handlers.onChange),i.focus(),i.setSelectionRange(i.value.length,i.value.length)}}},t.prototype._getValue=function(t){var e=this._calendar.config.dateFormat||"%M %d %Y";if("string"==typeof t&&!(0,s.stringToDate)(t,e,!0)){var i=new Date(t);if(!(null==i?void 0:i.valueOf()))return"";t=i}return t},t}();e.DateEditor=d},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(95),e),o(i(46),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Calendar=void 0;var l=i(0),s=i(1),c=i(6),d=i(11),u=i(96),h=i(105),f=i(13),p=i(46),g=i(2),v=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,e,(0,l.extend)({weekStart:"sunday",thisMonthOnly:!1,dateFormat:window&&window.dhx&&window.dhx.dateFormat,width:"250px"},i))||this;switch(n._selected=[],n.events=new c.EventSystem,n.config.disabledDates=n.config.disabledDates||n.config.block,n.config.mode=n.config.mode||n.config.view,n.config.dateFormat||(n.config.timePicker?12===n.config.timeFormat?n.config.dateFormat="%d/%m/%y %h:%i %A":n.config.dateFormat="%d/%m/%y %H:%i":n.config.dateFormat="%d/%m/%y"),n.config.value&&n._setSelected(n.config.value),n.config.date?n._currentDate=f.DateHelper.toDateObject(n.config.date,n.config.dateFormat):n._getSelected()?n._currentDate=f.DateHelper.copy(n._getSelected()):n._currentDate=new Date,n.config.mode){case"month":n._currentViewMode="month";break;case"year":n._currentViewMode="year";break;case"timepicker":n._currentViewMode=n.config.timePicker?"timepicker":"calendar";break;default:n._currentViewMode="calendar"}if(n._initHandlers(),n.config.timePicker){n._timepicker=new u.Timepicker(null,{timeFormat:n.config.timeFormat,controls:!0});var o=n._getSelected()||new Date;n._timepicker.setValue(o),n._time=n._timepicker.getValue(),n._timepicker.events.on(u.TimepickerEvents.afterClose,(function(){n._timepicker.setValue(n._time),n.showDate(null,"calendar")})),n._timepicker.events.on(u.TimepickerEvents.afterApply,(function(){var t=n._timepicker.getValue(!0),e=t.hour,i=t.minute,o=t.AM,r=n._getSelected(),a=f.DateHelper.withHoursAndMinutes(n._getSelected()||new Date,e,i,o);n.events.fire(p.CalendarEvents.beforeChange,[a,r,!0])&&(n._selected[n._selected.length-1]=a,n.events.fire(p.CalendarEvents.change,[a,r,!0])),n._time=n._timepicker.getValue(),n.showDate(null,"calendar")}))}return n.mount(e,(0,s.create)({render:function(){return n._draw()}})),n}return o(e,t),e.prototype.setValue=function(t){if(!t||t instanceof Array&&0===t.length)return!1;var e=t instanceof Array?t[0]:t,i=f.DateHelper.toDateObject(e,this.config.dateFormat),n=f.DateHelper.copy(this._getSelected());return!!this.events.fire(p.CalendarEvents.beforeChange,[i,n,!1])&&(this._selected=[],this._setSelected(t),this._timepicker&&(this._timepicker.setValue(i),this._time=this._timepicker.getValue()),this.showDate(this._getSelected()),this.events.fire(p.CalendarEvents.change,[i,n,!1]),this.paint(),!0)},e.prototype.getValue=function(t){var e=this;return void 0===t&&(t=!1),this._selected[0]?this.config.range?t?this._selected.map((function(t){return f.DateHelper.copy(t)})):this._selected.map((function(t){return(0,f.getFormattedDate)(e.config.dateFormat,t)})):t?f.DateHelper.copy(this._selected[0]):(0,f.getFormattedDate)(this.config.dateFormat,this._selected[0]):""},e.prototype.getCurrentMode=function(){return this._currentViewMode},e.prototype.showDate=function(t,e){t&&(this._currentDate=f.DateHelper.copy(t)),e&&(this._currentViewMode=e),this.paint()},e.prototype.destructor=function(){this._linkedCalendar&&this._unlink(),this._timepicker&&this._timepicker.destructor(),this.events&&this.events.clear(),this.config=this.events=null,this._uid=this._selected=this._currentDate=this._currentViewMode=this._handlers=this._timepicker=this._time=null,this.unmount()},e.prototype.clear=function(){var t=this.getValue(!0);this.events.fire(p.CalendarEvents.beforeChange,["",t,!1])&&(this.config.timePicker&&(this._timepicker.clear(),this._time=this._timepicker.getValue()),this._selected=[],this.showDate(null,this.config.mode),this.events.fire(p.CalendarEvents.change,[this.getValue(!0),t,!1,"clear"]))},e.prototype.link=function(t){var e=this;this._linkedCalendar&&this._unlink(),this._linkedCalendar=t;var i=this.getValue(!0),n=t.getValue(!0),o=i&&f.DateHelper.dayStart(i),r=n&&f.DateHelper.dayStart(n);this.config.$rangeMark&&this._linkedCalendar.config.$rangeMark||(this.config.$rangeMark=this._linkedCalendar.config.$rangeMark=function(t){if(o&&r)return t>=o&&t<=r&&function(t){if(f.DateHelper.isSameDay(r,o))return null;var e="dhx_calendar-day--in-range";return f.DateHelper.isSameDay(t,o)&&(e+=" dhx_calendar-day--first-date"),f.DateHelper.isSameDay(t,r)&&(e+=" dhx_calendar-day--last-date"),e}(t)}),this.config.disabledDates&&this._linkedCalendar.config.disabledDates||(this.config.disabledDates=function(t){if(r)return t>r},this._linkedCalendar.config.disabledDates=function(t){if(o)return t<o}),this.config.thisMonthOnly=!0,t.config.thisMonthOnly=!0,this.events.on(p.CalendarEvents.change,(function(t){o=t?f.DateHelper.dayStart(t):null,e._linkedCalendar.paint()}),"link"),this._linkedCalendar.events.on(p.CalendarEvents.change,(function(t){r=t?f.DateHelper.dayStart(t):null,e.paint()}),"link"),this._linkedCalendar.paint(),this.paint()},e.prototype._unlink=function(){this._linkedCalendar&&(this.config.$rangeMark=this._linkedCalendar.config.$rangeMark=null,this.config.disabledDates=this._linkedCalendar.config.disabledDates=null,this.events.detach(p.CalendarEvents.change,"link"),this._linkedCalendar.events.detach(p.CalendarEvents.change,"link"),this._linkedCalendar.paint(),this._linkedCalendar=null)},e.prototype._setSelected=function(t){var e=this,i=t instanceof Array?t[0]:t,n=f.DateHelper.toDateObject(i,this.config.dateFormat);if(t instanceof Array&&this.config.range){var o=[];t.forEach((function(t,i){i<2&&o.push(f.DateHelper.toDateObject(t,e.config.dateFormat))})),2===o.length&&o[0]<=o[1]?o.forEach((function(t){return e._selected.push(t)})):this._selected[0]=o[0]}else this._selected[0]=n},e.prototype._getSelected=function(){return this._selected[this._selected.length-1]},e.prototype._draw=function(){switch(this._currentViewMode){case"calendar":return this.events.fire(p.CalendarEvents.modeChange,["calendar"]),this._drawCalendar();case"month":return this.events.fire(p.CalendarEvents.modeChange,["month"]),this._drawMonthSelector();case"year":return this.events.fire(p.CalendarEvents.modeChange,["year"]),this._drawYearSelector();case"timepicker":return this.events.fire(p.CalendarEvents.modeChange,["timepicker"]),this._drawTimepicker()}},e.prototype._initHandlers=function(){var t=this,e={Up:"ArrowUp",Down:"ArrowDown",Right:"ArrowRight",Left:"ArrowLeft",Esc:"Escape",Spacebar:"Space"},i=function(e){void 0===e&&(e=!1);var i=0;switch(t._currentViewMode){case"calendar":i=e?-7:7;break;case"month":case"year":i=e?-4:4}return i};this._handlers={onkeydown:{".dhx_calendar-year, .dhx_calendar-month, .dhx_calendar-day":function(n,o){switch(function(t){var i;if(t.which>=48&&t.which<=57||t.which>=65&&t.which<=90)i=String.fromCharCode(t.which);else{var n=32===t.which?t.code:t.key;i=(0,g.isIE)()&&e[n]||n}return i}(n)){case"Enter":t._selectDate(n,o);break;case"ArrowLeft":t._moveBrowseFocus(n,o,-1);break;case"ArrowRight":t._moveBrowseFocus(n,o,1);break;case"ArrowUp":t._moveBrowseFocus(n,o,i(!0));break;case"ArrowDown":t._moveBrowseFocus(n,o,i())}}},onclick:{".dhx_calendar-year, .dhx_calendar-month, .dhx_calendar-day":function(e,i){t._selectDate(e,i)},".dhx_calendar-action__cancel":function(){t.showDate(t._getSelected(),"calendar"),t.events.fire(p.CalendarEvents.cancelClick,[])},".dhx_calendar-action__show-month":function(){return t.showDate(null,"month")},".dhx_calendar-action__show-year":function(){return t.showDate(null,"year")},".dhx_calendar-action__next":function(){var e;switch(t._currentViewMode){case"calendar":e=f.DateHelper.addMonth(t._currentDate,1);break;case"month":e=f.DateHelper.addYear(t._currentDate,1);break;case"year":e=f.DateHelper.addYear(t._currentDate,12)}t.showDate(e)},".dhx_calendar-action__prev":function(){var e;switch(t._currentViewMode){case"calendar":e=f.DateHelper.addMonth(t._currentDate,-1);break;case"month":e=f.DateHelper.addYear(t._currentDate,-1);break;case"year":e=f.DateHelper.addYear(t._currentDate,-12)}t.showDate(e)},".dhx_calendar-action__show-timepicker":function(){t._currentViewMode="timepicker",t.paint()}},onmouseover:{".dhx_calendar-day":function(e,i){t.events.fire(p.CalendarEvents.dateMouseOver,[new Date(i.attrs._date),e]),t.events.fire(p.CalendarEvents.dateHover,[new Date(i.attrs._date),e])}}}},e.prototype._getData=function(t){var e,i=this;switch(this._isSelectedInCurrentRange=!1,this.config.weekStart){case"saturday":e=-1;break;case"monday":e=1;break;default:e=0}for(var n=[],o=6,r=f.DateHelper.weekStart(f.DateHelper.monthStart(t),e);o--;){for(var a=f.DateHelper.getWeekNumber(r),l=0,s=7,c=[],d=function(){var e=f.DateHelper.isWeekEnd(r),n=t.getMonth()===r.getMonth(),o=u.config.disabledDates&&u.config.disabledDates(r),a=[];if(u.config.range&&u._selected[0]&&u._selected[1]){var s=function(){if(i._selected[0]&&i._selected[1]){var t=f.DateHelper.dayStart(i._selected[0]),e=f.DateHelper.dayStart(i._selected[1]);return r>=t&&r<=e&&(f.DateHelper.isSameDay(i._selected[0],i._selected[1])?null:"dhx_calendar-day--in-range")}};u.config.$rangeMark=s}if(e&&a.push("dhx_calendar-day--weekend"),n||(u.config.thisMonthOnly?(l++,a.push("dhx_calendar-day--hidden")):a.push("dhx_calendar-day--muffled")),u.config.mark){var d=u.config.mark(r);d&&a.push(d)}u.config.$rangeMark&&((s=u.config.$rangeMark(r))&&a.push(s));o&&(e?a.push("dhx_calendar-day--weekend-disabled"):a.push("dhx_calendar-day--disabled")),u._selected.forEach((function(t,e){if(t&&f.DateHelper.isSameDay(t,r)){i._isSelectedInCurrentRange=!0;var n="dhx_calendar-day--selected";i.config.range&&(n+=" dhx_calendar-day--selected-".concat(0===e?"first ":"last")),a.push(n)}})),c.push({date:r,day:r.getDate(),css:a.join(" ")}),r=f.DateHelper.addDay(r)},u=this;s--;)d();n.push({weekNumber:a,days:c,disabledWeekNumber:7===l})}return n},e.prototype._drawCalendar=function(){var t,e=this,i=this._currentDate,n=this.config,o=n.weekStart,l=n.thisMonthOnly,c=n.css,d=n.timePicker,u=n.width;switch(o){case"saturday":t=a([f.locale.daysShort[6]],f.locale.daysShort.slice(0,-1),!0);break;case"monday":t=a(a([],f.locale.daysShort.slice(1),!0),[f.locale.daysShort[0]],!1);break;default:t=f.locale.daysShort}for(var h,p=t.map((function(t){return(0,s.el)(".dhx_calendar-weekday",t)})),g=this._getData(i),v=!0,_=this._getSelected(),m=function(t){var i={role:"button",tabindex:-1,"aria-pressed":"false"};return t&&(e._isSelectedInCurrentRange?function(t){return t&&_&&t.getTime()===_.getTime()}(t.date)&&(i.tabindex=0,i["aria-pressed"]="true"):v&&(i.tabindex=0),v=!1),i},y=[],b=[],x=0,w=g;x<w.length;x++){var C=w[x],S=C.days.map((function(t){return(0,s.el)("div.dhx_calendar-day",r({class:t.css,_date:t.date},m(t)),t.day)}));!this.config.weekNumbers||C.disabledWeekNumber&&l||b.push((0,s.el)("div",{class:"dhx_calendar-week-number"},C.weekNumber)),y=y.concat(S)}this.config.weekNumbers&&(h=(0,s.el)(".dhx_calendar__week-numbers",b));var E="dhx_calendar dhx_widget"+(c?" "+c:"")+(d?" dhx_calendar--with_timepicker":"")+(this.config.weekNumbers?" dhx_calendar--with_week-numbers":"");return(0,s.el)("div",r({class:E,style:{width:this.config.weekNumbers?parseInt(u.toString())+48+"px":u}},this._handlers),[(0,s.el)(".dhx_calendar__wrapper",[this._drawHeader((0,s.el)("button.dhx_calendar-action__show-month.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--circle",{"aria-live":"polite",type:"button"},f.locale.months[i.getMonth()]+" "+i.getFullYear())),this.config.weekNumbers&&(0,s.el)(".dhx_calendar__dates-wrapper",[(0,s.el)(".dhx_calendar__weekdays",p),(0,s.el)(".dhx_calendar__days",y),h]),!this.config.weekNumbers&&(0,s.el)(".dhx_calendar__weekdays",p),!this.config.weekNumbers&&(0,s.el)(".dhx_calendar__days",y),d?(0,s.el)(".dhx_timepicker__actions",[(0,s.el)("button.dhx_calendar__timepicker-button.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--width_full.dhx_button--circle.dhx_calendar-action__show-timepicker",{type:"button"},[(0,s.el)("span.dhx_button__icon.dxi.dxi-clock-outline"),(0,s.el)("span.dhx_button__text",this._time)])]):null])])},e.prototype._drawMonthSelector=function(){var t=this._currentDate,e=t.getMonth(),i=this._getSelected()?this._getSelected().getFullYear():null,n=this.config,o=n.css,a=n.timePicker,l=n.weekNumbers,c=n.width,d=n.mode,u="dhx_calendar dhx_widget"+(o?" "+o:"")+(a?" dhx_calendar--with_timepicker":"")+(l?" dhx_calendar--with_week-numbers":""),h=!0,p=i===t.getFullYear(),g=function(t){return p&&e===t};return(0,s.el)("div",r({class:u,style:{width:l?parseInt(c.toString())+48+"px":c}},this._handlers),[(0,s.el)(".dhx_calendar__wrapper",[this._drawHeader((0,s.el)("button.dhx_calendar-action__show-year.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--circle",{"aria-live":"polite",type:"button"},t.getFullYear())),(0,s.el)(".dhx_calendar__months",f.locale.monthsShort.map((function(t,e){return(0,s.el)("div",r(r({class:"dhx_calendar-month"+(g(e)?" dhx_calendar-month--selected":"")},function(t,e){var i={role:"button",tabindex:-1,"aria-pressed":"false"};return t&&(p?g(e)&&(i.tabindex=0,i["aria-pressed"]="true"):h&&(i.tabindex=0),h=!1),i}(t,e)),{_date:e}),t)}))),"month"!==d?(0,s.el)(".dhx_calendar__actions",[(0,s.el)("button.dhx_button.dhx_button--color_primary.dhx_button--view_link.dhx_button--size_small.dhx_button--width_full.dhx_button--circle.dhx_calendar-action__cancel",{type:"button"},f.locale.cancel)]):null])])},e.prototype._drawYearSelector=function(){var t=this,e=this._currentDate,i=f.DateHelper.getTwelweYears(e),n=this.config,o=n.css,a=n.timePicker,l=n.weekNumbers,c=n.width,d=n.mode,u="dhx_calendar dhx_widget"+(o?" "+o:"")+(a?" dhx_calendar--with_timepicker":"")+(l?" dhx_calendar--with_week-numbers":""),h=!0,p=this._getSelected()&&i.includes(this._getSelected().getFullYear()),g=function(e){return t._getSelected()&&e===t._getSelected().getFullYear()};return(0,s.el)("div",r({class:u,style:{width:l?parseInt(c.toString())+48+"px":c}},this._handlers),[(0,s.el)(".dhx_calendar__wrapper",[this._drawHeader((0,s.el)("button.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--circle",{"aria-live":"polite",type:"button"},i[0]+"-"+i[i.length-1])),(0,s.el)(".dhx_calendar__years",i.map((function(t){return(0,s.el)("div",r({class:"dhx_calendar-year"+(g(t)?" dhx_calendar-year--selected":""),_date:t},function(t){var e={role:"button",tabindex:-1,"aria-pressed":"false"};return t&&(p?g(t)&&(e.tabindex=0,e["aria-pressed"]="true"):h&&(e.tabindex=0),h=!1),e}(t)),t)}))),"year"!==d&&"month"!==d?(0,s.el)(".dhx_calendar__actions",[(0,s.el)("button.dhx_button.dhx_button--color_primary.dhx_button--view_link.dhx_button--size_small.dhx_button--width_full.dhx_button--circle.dhx_calendar-action__cancel",{type:"button"},f.locale.cancel)]):null])])},e.prototype._drawHeader=function(t){return(0,s.el)(".dhx_calendar__navigation",[(0,s.el)("button.dhx_calendar-navigation__button.dhx_calendar-action__prev"+h.linkButtonClasses+".dhx_button--icon.dhx_button--circle",{"aria-label":"prev",type:"button"},[(0,s.el)(".dhx_button__icon.dxi.dxi-chevron-left")]),t,(0,s.el)("button.dhx_calendar-navigation__button.dhx_calendar-action__next"+h.linkButtonClasses+".dhx_button--icon.dhx_button--circle",{"aria-label":"next",type:"button"},[(0,s.el)(".dhx_button__icon.dxi.dxi-chevron-right")])])},e.prototype._drawTimepicker=function(){var t=this.config,e=t.css,i=t.weekNumbers,n=t.width;return(0,s.el)(".dhx_widget.dhx-calendar",{class:e?" "+e:"",style:{width:i?parseInt(n.toString())+48+"px":n}},[(0,s.inject)(this._timepicker.getRootView())])},e.prototype._selectDate=function(t,e){var i=e.attrs._date,n=f.DateHelper.copy(this._getSelected());switch(this._currentViewMode){case"calendar":var o=this.config.timePicker?f.DateHelper.mergeHoursAndMinutes(i,this._getSelected()||this._currentDate):i;if(!this.events.fire(p.CalendarEvents.beforeChange,[o,n,!0]))return;this.config.range&&1===this._selected.length&&this._selected[0]<=o?this._selected.push(o):(this._selected=[],this._selected[0]=o),e.el.blur(),this.showDate(this._getSelected()),this.events.fire(p.CalendarEvents.change,[i,n,!0]);break;case"month":if("month"!==this.config.mode)f.DateHelper.setMonth(this._currentDate,i),this.showDate(null,"calendar"),this.events.fire(p.CalendarEvents.monthSelected,[i]);else{var r=f.DateHelper.fromYearAndMonth(this._currentDate.getFullYear()||this._getSelected().getFullYear(),i);if(!this.events.fire(p.CalendarEvents.beforeChange,[r,n,!0]))return;this._currentDate=r,this._selected[0]=r,this.events.fire(p.CalendarEvents.change,[this._getSelected(),n,!0]),this.events.fire(p.CalendarEvents.monthSelected,[i]),this.paint()}break;case"year":if("year"!==this.config.mode)f.DateHelper.setYear(this._currentDate,i),this.showDate(null,"month"),this.events.fire(p.CalendarEvents.yearSelected,[i]);else{r=f.DateHelper.fromYear(i);if(!this.events.fire(p.CalendarEvents.beforeChange,[r,n,!0]))return;this._currentDate=r,this._selected[0]=r,this.events.fire(p.CalendarEvents.change,[this._getSelected(),n,!0]),this.events.fire(p.CalendarEvents.yearSelected,[i]),this.paint()}}},e.prototype._moveBrowseFocus=function(t,e,i){if(e){var n=e.parent.body[e.idx+i];if(n){var o=n.el;o&&(t.target.tabIndex=-1,o.tabIndex=0,o.focus({preventScroll:!0}))}}},e}(d.View);e.Calendar=v},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(97),e),o(i(45),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Timepicker=void 0;var a=i(0),l=i(1),s=i(6),c=i(11),d=i(27),u=i(100),h=i(103),f=i(104),p=i(45),g=i(2);function v(t,e){return isNaN(t)?0:Math.min(e,Math.max(0,t))}var _=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,e,(0,a.extend)({timeFormat:24,controls:!1,valueFormat:"string",actions:!1},i))||this;return n.events=new s.EventSystem(n),n._time={hour:0,minute:0,AM:!0},12===n.config.timeFormat&&(n._time.hour=12),n.config.controls=n.config.controls||n.config.actions,n.config.value&&n._setValue(n.config.value),n._initUI(e),n._initHandlers(),n._initEvents(),n}return o(e,t),e.prototype.getValue=function(t){return 12===this.config.timeFormat&&(this._time.hour=this._time.hour%12||12),this._getValue(this._time,t)},e.prototype.setValue=function(t){this._setValue(t),this._hoursSlider.setValue(this._time.hour),this._minutesSlider.setValue(this._time.minute),this._inputsView.paint()},e.prototype.clear=function(){24===this.config.timeFormat?this.setValue("00:00"):this.setValue("12:00AM")},e.prototype.destructor=function(){this._minutesSlider&&this._minutesSlider.destructor(),this._hoursSlider&&this._hoursSlider.destructor(),this.events&&this.events.clear(),this.layout&&this.layout.destructor(),this.config=this.events=null,this._handlers=this._time=this._inputsView=this._minutesSlider=this._hoursSlider=null,this.unmount()},e.prototype.getRootView=function(){return this.layout.getRootView()},e.prototype._getValue=function(t,e){var i=t.hour,n=t.minute,o=t.AM;if(e){var r={hour:i,minute:n};return 12===this.config.timeFormat&&(r.AM=o),r}return(i<10?"0"+i:i)+":"+(n<10?"0"+n:n)+(12===this.config.timeFormat?o?"AM":"PM":"")},e.prototype._setValue=function(t){var e,i=0,n=0;if("number"==typeof t&&(t=new Date(t)),t instanceof Date)i=t.getMinutes(),n=t.getHours();else if(Array.isArray(t))n=v(t[0],23),i=v(t[1],59),t[2]&&"pm"===t[2].toLowerCase()&&(e=!0);else if("string"==typeof t){var o=t.match(/\d+/g);n=v(+o[0],23),i=v(+o[1],59),t.toLowerCase().includes("pm")&&(e=!0)}else"object"==typeof t&&t.hasOwnProperty("hour")&&t.hasOwnProperty("minute")&&(n=t.hour,i=t.minute,e=!t.AM);return e&&n<12&&(n+=12),12===this.config.timeFormat&&!(0,f.isTimeCheck)(t)&&n>=12&&(e=!0),this._time={hour:n,minute:i,AM:!e}},e.prototype._initUI=function(t){var e=this,i={gravity:!1,css:"dhx_widget dhx_timepicker "+(this.config.css?this.config.css:"")+(this.config.controls?" dhx_timepicker--with-controls":""),rows:[{id:"timepicker",css:"dhx_timepicker__inputs"},{id:"hour-slider",css:"dhx_timepicker__hour"},{id:"minute-slider",css:"dhx_timepicker__minute"}]};this.config.controls&&(i.rows.unshift({id:"close-action",css:"dhx_timepicker__close"}),i.rows.push({id:"save-action",css:"dhx_timepicker__save"}));var n=this.layout=new d.Layout(t,i),o=(0,l.create)({render:function(){return e._draw()}}),r=this._inputsView=(0,c.toViewLike)(o),a=this._minutesSlider=new u.Slider(null,{min:0,max:59,step:1,tooltip:!1,labelPosition:"top",label:h.default.minutes,value:this.config.value?this._time.minute:0}),s=this._hoursSlider=new u.Slider(null,{min:0,max:23,step:1,tooltip:!1,labelPosition:"top",label:h.default.hours,value:this.config.value?12===this._time.hour&&this._time.AM?0:this._time.hour:0});if(n.getCell("timepicker").attach(r),n.getCell("hour-slider").attach(s),n.getCell("minute-slider").attach(a),this.config.controls){n.getCell("save-action").attach((function(){return(0,l.el)("button.dhx_timepicker__button-save.dhx_button.dhx_button--view_flat.dhx_button--color_primary.dhx_button--size_small.dhx_button--circle.dhx_button--width_full",{onclick:e._outerHandlers.save,type:"button"},h.default.save)})),n.getCell("close-action").attach((function(){return(0,l.el)("button.dhx_timepicker__button-close.dhx_button.dhx_button--view_link.dhx_button--size_medium.dhx_button--view_link.dhx_button--color_secondary.dhx_button--icon.dhx_button--circle",{_ref:"close",onclick:e._outerHandlers.close,type:"button","aria-label":"close timepicker"},[(0,l.el)("span.dhx_button__icon.dxi.dxi-close")])}))}},e.prototype._initHandlers=function(){var t=this,e=function(e){var i=v(parseInt(e.value,10),59);e.value=i.toString(),t._minutesSlider.setValue(i)},i=function(e){var i=v(parseInt(e.value,10),23);e.value=i.toString(),t._hoursSlider.setValue(i)};this._handlers={onchange:{".dhx_timepicker-input--hour":function(t){return i(t.target)},".dhx_timepicker-input--minutes":function(t){return e(t.target)}},oninput:{".dhx_timepicker-input--hour":function(t){((0,g.isSafari)()||(0,g.isFirefox)())&&i(t.target)},".dhx_timepicker-input--minutes":function(t){((0,g.isSafari)()||(0,g.isFirefox)())&&e(t.target)}}},this._outerHandlers={close:function(){t.events.fire(p.TimepickerEvents.beforeClose,[t.getValue(t._isTimeObj())])&&(t.events.fire(p.TimepickerEvents.afterClose,[t.getValue(t._isTimeObj())]),t.events.fire(p.TimepickerEvents.close,[]))},save:function(){t.events.fire(p.TimepickerEvents.beforeApply,[t.getValue(t._isTimeObj())])&&(t.events.fire(p.TimepickerEvents.afterApply,[t.getValue(t._isTimeObj())]),t.events.fire(p.TimepickerEvents.apply,[t.getValue()]),t.events.fire(p.TimepickerEvents.save,[t._time]))}}},e.prototype._initEvents=function(){var t=this;this._hoursSlider.events.on(u.SliderEvents.beforeChange,(function(e){if(!(e<t._hoursSlider.config.min||e>t._hoursSlider.config.max)){var i=r({},t._time);12===t.config.timeFormat?(i.AM=e<12,i.hour=e%12||12):i.hour=e;var n=t._isTimeObj();return t.events.fire(p.TimepickerEvents.beforeChange,[t._getValue(i,n)])}})),this._hoursSlider.events.on(u.SliderEvents.change,(function(e){if(!(e<t._hoursSlider.config.min||e>t._hoursSlider.config.max)){12===t.config.timeFormat?(t._time.AM=e<12,t._time.hour=e%12||12):t._time.hour=e;var i=t._isTimeObj();t.events.fire(p.TimepickerEvents.change,[t.getValue(i)]),t._inputsView.paint()}})),this._minutesSlider.events.on(u.SliderEvents.beforeChange,(function(e){if(!(e<t._minutesSlider.config.min||e>t._minutesSlider.config.max)){var i=r(r({},t._time),{minute:e}),n=t._isTimeObj();return t.events.fire(p.TimepickerEvents.beforeChange,[t._getValue(i,n)])}})),this._minutesSlider.events.on(u.SliderEvents.change,(function(e){if(!(e<t._minutesSlider.config.min||e>t._minutesSlider.config.max)){t._time.minute=e;var i=t._isTimeObj();t.events.fire(p.TimepickerEvents.change,[t.getValue(i)]),t._inputsView.paint()}}))},e.prototype._draw=function(){return this._minutesSlider.config.label=h.default.minutes,this._hoursSlider.config.label=h.default.hours,(0,l.el)(".dhx_timepicker-inputs",r({},this._handlers),[(0,l.el)("input.dhx_timepicker-input.dhx_timepicker-input--hour",{_key:"hour",_ref:"hour",value:this.getValue(!0).hour.toString().length>1?this.getValue(!0).hour:"0"+this.getValue(!0).hour,"aria-label":"hours"}),(0,l.el)("span.dhx_timepicker-delimer",":"),(0,l.el)("input.dhx_timepicker-input.dhx_timepicker-input--minutes",{_key:"minute",value:this.getValue(!0).minute.toString().length>1?this.getValue(!0).minute:"0"+this.getValue(!0).minute,"aria-label":"minutes"}),12===this.config.timeFormat?(0,l.el)(".dhx_timepicker-ampm",this._time.AM?"AM":"PM"):null])},e.prototype._isTimeObj=function(){var t;return"timeobject"===(null===(t=this.config.valueFormat)||void 0===t?void 0:t.toLowerCase())},e}(c.View);e.Timepicker=_},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMarginSize=e.getBlockRange=void 0,e.getBlockRange=function(t,e,i){return void 0===i&&(i=!0),i?{min:t.left+window.pageXOffset,max:e.right+window.pageXOffset}:{min:t.top+window.pageYOffset,max:e.bottom+window.pageYOffset}},e.getMarginSize=function(t){return t&&("space"===t.type||"wide"===t.type)?12:0}},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProLayout=void 0;var r=i(28),a=i(41),l=function(t){function e(e,i){return t.call(this,e,i)||this}return o(e,t),e.prototype._createCell=function(t){var i;return t.rows||t.cols||t.views?(t.parent=this._root,i=new e(this,t)):i=new a.ProCell(this,t),this._root._all[i.id]=i,t.init&&t.init(i,t),i},e}(r.Layout);e.ProLayout=l},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(101),e),o(i(44),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Slider=void 0;var a=i(0),l=i(1),s=i(6),c=i(25),d=i(11),u=i(30),h=i(44),f=i(2);function p(t,e,i){return t<e?e:t>i?i:t}var g=function(t){function e(e,i){var n=t.call(this,e,(0,a.extend)({mode:"horizontal",min:0,max:100,step:1,tooltip:!0},i))||this;n._disabled=!1,n.config.helpMessage=n.config.helpMessage||n.config.help,void 0!==n.config.thumbLabel&&(n.config.tooltip=n.config.thumbLabel),n.config.labelInline&&(n.config.labelPosition="left"),n.events=new s.EventSystem(n),n._axis="horizontal"===n.config.mode?"clientX":"clientY",n._initStartPosition(),n._keyManager=new c.KeyManager((function(){var t,e;return document.activeElement===(null===(e=null===(t=n.getRootView().refs)||void 0===t?void 0:t[n._isExtraActive?"extraRunner":"runner"])||void 0===e?void 0:e.el)})),n._initHotkeys();var o=(0,l.create)({render:function(){return n._draw()},hooks:{didMount:function(){return n._calcSliderPosition()},didRedraw:function(){return n._calcSliderPosition()}}});return n._initHandlers(),n.mount(e,o),n}return o(e,t),e.prototype.disable=function(){this._disabled=!0,this.paint()},e.prototype.enable=function(){this._disabled=!1,this.paint()},e.prototype.isDisabled=function(){return this._disabled},e.prototype.focus=function(t){this.getRootView().refs[t?"extraRunner":"runner"].el.focus()},e.prototype.blur=function(){this.getRootView().refs[this._isExtraActive?"extraRunner":"runner"].el.blur()},e.prototype.getValue=function(){var t;if(this.config.range){var e=this._getValue(this._currentPosition),i=this._getValue(this._extraCurrentPosition);t=e<i?[e,i]:[i,e]}else t=[this._getValue(this._currentPosition)];return t},e.prototype.setValue=function(t){var e=this._getValue(this._currentPosition);if(Array.isArray(t)&&t.length>1){var i=this._getValue(this._extraCurrentPosition);this.events.fire(h.SliderEvents.beforeChange,[t[0],e,!1])&&(this._setValue(t[0],!1),this.events.fire(h.SliderEvents.change,[t[0],e,!1])),this.events.fire(h.SliderEvents.beforeChange,[t[1],i,!0])&&(this._setValue(t[1],!0),this.events.fire(h.SliderEvents.change,[t[1],i,!0]))}else{if(t=parseFloat(t),isNaN(t))throw new Error("Wrong value type, for more info check documentation https://docs.dhtmlx.com/suite/slider__api__slider_setvalue_method.html");this.events.fire(h.SliderEvents.beforeChange,[t,e,!1])&&(this._setValue(t),this.events.fire(h.SliderEvents.change,[t,e,!1]))}this.paint()},e.prototype.destructor=function(){this._keyManager&&this._keyManager.destructor(),document.body.contains(this._tooltip)&&document.body.removeChild(this._tooltip),this._tooltip=null,this.unmount()},e.prototype._calcSliderPosition=function(){var t=this.getRootView();if(t){var e=t.refs.track.el.getBoundingClientRect();this._offsets={left:e.left+window.pageXOffset,top:e.top+window.pageYOffset},this._length="horizontal"===this.config.mode?e.width:e.height}},e.prototype._initHotkeys=function(){var t=this,e={arrowLeft:function(e){e.preventDefault(),t._move(-t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))},arrowRight:function(e){e.preventDefault(),t._move(t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))},arrowUp:function(e){e.preventDefault(),t._move(t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))},arrowDown:function(e){e.preventDefault(),t._move(-t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))}};for(var i in e)this._keyManager.addHotKey(i,e[i])},e.prototype._move=function(t,e){void 0===e&&(e=!1),this.config.inverse&&(t=-t);var i=this.config,n=i.max,o=i.min,r=e?this._getValue(this._extraCurrentPosition):this._getValue(this._currentPosition),a=r+t;(a>n||a<o)&&(a=r),this.events.fire(h.SliderEvents.beforeChange,[a,r,e])&&(this._setValue(r+t,e),this.events.fire(h.SliderEvents.change,[a,r,e]),this.paint())},e.prototype._initStartPosition=function(){var t=this.config,e=t.max,i=t.min,n=t.range,o=function(t,e,i){var n;return(n=void 0===t?[]:Array.isArray(t)?t:"string"==typeof t?t.split(",").map((function(t){return parseInt(t,10)})):[t])[0]=void 0===n[0]?e:p(n[0],e,i),n[1]=void 0===n[1]?i:p(n[1],e,i),n}(this.config.value,this.config.min,this.config.max),r=o[0],a=o[1];this._currentPosition=(r-i)/(e-i)*100,n&&(this._extraCurrentPosition=(e-a)/(e-i)*100),this._currentPosition=(r-i)/(e-i)*100,n&&(this._extraCurrentPosition=(a-i)/(e-i)*100),this._isInverse()&&(this._currentPosition=100-this._currentPosition,n&&(this._extraCurrentPosition=100-this._extraCurrentPosition))},e.prototype._getValue=function(t){this._isInverse()&&(t=100-t);var e=this.config,i=e.min,n=e.max,o=e.step;if(100===t)return n;if(0===t)return i;var r=t*(n-i)/100,a=r%o,l=a>=o/2?o:0;return+(Number(i)+Number(r)-a+l).toFixed(5)},e.prototype._setValue=function(t,e){void 0===e&&(e=!1);var i=this.config,n=i.max,o=i.min;if(t>n||t<o)return!1;var r=(t-o)/(n-o)*100,a=this._isInverse()?100-r:r;e?this._extraCurrentPosition=a:this._currentPosition=a},e.prototype._initHandlers=function(){var t=this,e=function(e){e.cancelable&&e.preventDefault();var i=((e.targetTouches?e.targetTouches[0][t._axis]:e[t._axis])-t._getBegining())/t._length*100;if(t._findNewDirection){if(Math.abs(t._currentPosition-i)<1)return;i>t._currentPosition?t._possibleRange=[t._currentPosition,100]:t._possibleRange=[0,t._currentPosition],t._findNewDirection=null}t._inSide(i)&&t._updatePosition(i,t._isExtraActive),t.paint()},i=function(n){t.events.fire(h.SliderEvents.mouseup,[n]),setTimeout((function(){t._isMouseMoving=!1,t.paint()}),4),n.targetTouches?(document.removeEventListener("touchend",i),document.removeEventListener("touchmove",e)):(document.removeEventListener("mouseup",i),document.removeEventListener("mousemove",e))},n=function(e){var i;if(!t._disabled&&3!==e.which)if(t.events.fire(h.SliderEvents.mousedown,[e]),t._isMouseMoving=!0,e.target.classList.contains("dhx_slider__thumb--extra")?(t._isExtraActive=!0,i=t._extraCurrentPosition):(t._isExtraActive=!1,i=t._currentPosition),t._findNewDirection=null,t.config.range){var n=t._currentPosition>t._extraCurrentPosition?[t._currentPosition,t._extraCurrentPosition]:[t._extraCurrentPosition,t._currentPosition],o=n[0],r=n[1];t._currentPosition===t._extraCurrentPosition?(t._findNewDirection=i,t._possibleRange=[0,100]):t._possibleRange=i<o?[0,o]:[r,100]}else t._possibleRange=[0,100]};this.config.helpMessage&&(this._helper=new u.Popup({css:"dhx_tooltip dhx_tooltip--forced dhx_tooltip--light"}),this._helper.attachHTML(this.config.helpMessage)),this._handlers={showHelper:function(e){e.preventDefault(),e.stopPropagation(),t._helper.show(e.target,{theme:e.target})},onmousedown:function(t){n(t),document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)},ontouchstart:function(o){t._setTooltip(o),t._mouseIn=!1,n(o),document.addEventListener("touchmove",e,{passive:!1}),document.addEventListener("touchend",i),t.paint()},ontouchend:function(e){t._setTooltip(e),t._mouseIn=!1,t.paint()},onlabelClick:function(){t.getRootView().refs.runner.el.focus()},onclick:function(e){if(!t._disabled&&!t._isMouseMoving&&3!==e.which){var i=(e[t._axis]-t._getBegining())/t._length*100,n=t.getRootView().refs;if(t.config.range)Math.abs(t._currentPosition-i)<Math.abs(t._extraCurrentPosition-i)?(t._updatePosition(i,!1),n.runner.el.focus()):(t._updatePosition(i,!0),n.extraRunner.el.focus());else t._updatePosition(i,!1),n.runner.el.focus();t.paint()}},onmouseover:function(e){t._setTooltip(e),t._mouseIn=!0,t.paint()},onmouseout:function(e){t._setTooltip(e),t._mouseIn=!1,t.paint()},onfocus:function(e){t._setTooltip(e),t._focusIn=!0,t.events.fire(h.SliderEvents.focus,[]),t.paint()},onblur:function(e){t._setTooltip(e),t._focusIn=!1,t.events.fire(h.SliderEvents.blur,[]),t.paint()},onkeydown:function(e){t.events.fire(h.SliderEvents.keydown,[e])}}},e.prototype._getBegining=function(){return"horizontal"===this.config.mode?this._offsets.left-window.pageXOffset:this._offsets.top-window.pageYOffset},e.prototype._inSide=function(t){var e=this._possibleRange;return t<e[0]?(this._updatePosition(e[0],this._isExtraActive),!1):!(t>e[1])||(this._updatePosition(e[1],this._isExtraActive),!1)},e.prototype._updatePosition=function(t,e){void 0===e&&(e=!1),t>100&&(t=100),t<0&&(t=0);var i=this.config,n=i.max,o=i.min,r=e?this._extraCurrentPosition:this._currentPosition,a=this._getValue(r),l=this._getValue(t);if(a!==l&&this.events.fire(h.SliderEvents.beforeChange,[l,a,e])){var s=(l-o)/(n-o)*100,c=this._isInverse()?100-s:s;e?this._extraCurrentPosition=c:this._currentPosition=c,this.events.fire(h.SliderEvents.change,[l,a,e])}},e.prototype._getRunnerStyle=function(t){var e;void 0===t&&(t=!1);var i="horizontal"===this.config.mode?"left":"top",n=t?this._extraCurrentPosition:this._currentPosition;return(e={})[i]=n+"%",e},e.prototype._isInverse=function(){return this.config.inverse&&"horizontal"===this.config.mode||!this.config.inverse&&"vertical"===this.config.mode},e.prototype._getRunnerCss=function(t){return void 0===t&&(t=!1),"dhx_slider__thumb"+(t?" dhx_slider__thumb--extra":"")+(this._isMouseMoving&&(t&&this._isExtraActive||!t&&!this._isExtraActive)?" dhx_slider__thumb--active":"")+(this._disabled?" dhx_slider__thumb--disabled":"")+(this._isNullable(t?this._extraCurrentPosition:this._currentPosition)&&!this.config.range?" dhx_slider__thumb--nullable":"")},e.prototype._draw=function(){var t=this.config,e=t.labelPosition,i=t.mode,n=t.hiddenLabel,o=t.tick,a=t.majorTick,s=t.css,c=t.helpMessage,d=(0,f.getLabelStyle)(r(r({},this.config),{required:!1}));return!this._tooltip||this._mouseIn&&this._focusIn&&this._isMouseMoving||document.body.contains(this._tooltip)&&document.body.removeChild(this._tooltip),(0,l.el)("div",{class:"dhx_slider dhx_slider--mode_"+i+("left"===e?" dhx_slider--label-inline":"")+(n?" dhx_slider--label_sr":"")+(o?" dhx_slider--ticks":"")+(a?" dhx_slider--major-ticks":"")+(s?" "+s:"")+(this._disabled?" dhx_slider--disabled":""),style:{paddingBottom:this.config.tick?"16px":null}},[d?(0,l.el)("label.dhx_label.dhx_slider__label",{style:d.style,class:c?"dhx_label--with-help":"",onclick:this._handlers.onlabelClick},c?[d.label&&(0,l.el)("span.dhx_label__holder",d.label),(0,l.el)("span.dhx_label-help.dxi.dxi-help-circle-outline",{tabindex:"0",role:"button",onclick:this._handlers.showHelper})]:d.label):null,this._drawSlider()])},e.prototype._drawSlider=function(){return(0,l.el)(".dhx_widget.dhx_slider__track-holder",{"data-dhx-widget-id":this._uid},[(0,l.el)(".dhx_slider__track",{_ref:"track",onmouseover:this._handlers.onmouseover,onmouseout:this._handlers.onmouseout,onclick:this._handlers.onclick},[this._getDetector(),(0,l.el)("div",{_ref:"runner",class:this._getRunnerCss(),ontouchstart:this._handlers.ontouchstart,ontouchend:this._handlers.ontouchend,onmousedown:this._handlers.onmousedown,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,onkeydown:this._handlers.onkeydown,style:this._getRunnerStyle(),tabindex:0}),this.config.tooltip&&(this._mouseIn||this._focusIn||this._isMouseMoving)?this._drawTooltip():null,this.config.tooltip&&this.config.range&&(this._mouseIn||this._focusIn||this._isMouseMoving)?this._drawTooltip(!0):null,this.config.range?(0,l.el)("div",{_ref:"extraRunner",class:this._getRunnerCss(!0),ontouchstart:this._handlers.ontouchstart,ontouchend:this._handlers.ontouchend,onmousedown:this._handlers.onmousedown,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,onkeydown:this._handlers.onkeydown,style:this._getRunnerStyle(!0),tabindex:0}):null]),this.config.tick?this._drawTicks():null])},e.prototype._getDetector=function(){var t,e,i;if(this._disabled)return(0,l.el)(".dhx_slider__range");var n="horizontal"===this.config.mode?"left":"top",o="horizontal"===this.config.mode?"width":"height";if(this.config.range){var r=this._currentPosition>this._extraCurrentPosition?[this._currentPosition,this._extraCurrentPosition]:[this._extraCurrentPosition,this._currentPosition],a=r[0],s=r[1];return(0,l.el)(".dhx_slider__range",{style:(t={},t[n]=s+"%",t[o]=a-s+"%",t)})}return this._isInverse()?(0,l.el)(".dhx_slider__range",{style:(e={},e[n]=this._currentPosition+"%",e[o]=100-this._currentPosition+"%",e)}):(0,l.el)(".dhx_slider__range",{style:(i={},i[n]=0,i[o]=this._currentPosition+"%",i)})},e.prototype._drawTooltip=function(t){if(void 0===t&&(t=!1),"none"!==this._activeTooltip&&this.getRootView()){var e="extraTooltip"===this._activeTooltip?this._extraCurrentPosition:this._currentPosition,i="horizontal"===this.config.mode?"left":"top",n="";(t&&this._isExtraActive||!t&&!this._isExtraActive)&&(n+=" dhx_slider__thumb-label--active"),this._tooltip||(this._tooltip=document.createElement("div"));var o="tooltip"===this._activeTooltip?this.getRootView().refs.runner.el.getBoundingClientRect():this.getRootView().refs.extraRunner.el.getBoundingClientRect();this._tooltip.className="dhx_slider__thumb-label"+n,this._tooltip.style.left=o.x+("left"===i?6:-30)+window.pageXOffset+"px",this._tooltip.style.top=o.y+("left"===i?-30:6)+window.pageYOffset+"px",this._tooltip.innerText=this._getValue(e).toString(),document.body.appendChild(this._tooltip)}},e.prototype._getTicks=function(){for(var t=this.config,e=t.max,i=t.min,n=t.step,o=t.tick,r=t.majorTick,a=e-i,l=n*o/a,s=[],c=0,d=0;c<1;){var u=+(Number(i)+c*a).toFixed(5),h=d%r==0;s.push({position:(this._isInverse()?100*(1-c):100*c)+"%",isMultiple:h,label:h&&"function"==typeof this.config.tickTemplate?this.config.tickTemplate(u):null}),c+=l,d++}return s.push({position:(this._isInverse()?0:100)+"%",isMultiple:!0,label:"function"==typeof this.config.tickTemplate?this.config.tickTemplate(e):null}),s},e.prototype._drawTicks=function(){var t="horizontal"===this.config.mode?"left":"top";return(0,l.el)(".dhx_slider__ticks-holder",this._getTicks().map((function(e){var i;return(0,l.el)("div",{class:"dhx_slider__tick"+(e.isMultiple?" dhx_slider__tick--major":""),style:(i={},i[t]=e.position,i)},void 0!==e.label?[(0,l.el)(".dhx_slider__tick-label",e.label)]:null)})))},e.prototype._isNullable=function(t){return this._isInverse()?100===t:0===t},e.prototype._setTooltip=function(t){t.target.classList.contains("dhx_slider__thumb--extra")?this._activeTooltip="extraTooltip":t.target.classList.contains("dhx_slider__thumb")?this._activeTooltip="tooltip":this._activeTooltip="none"},e}(d.View);e.Slider=g},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Popup=void 0;var a=i(0),l=i(1),s=i(6),c=i(2),d=i(11),u=i(43),h=function(t){function e(e){void 0===e&&(e={});var i=t.call(this,null,(0,a.extend)({},e))||this,n=i._popup=document.createElement("div");return n.className="dhx_widget dhx_popup"+(i.config.css?" "+i.config.css:""),n.style.position="absolute",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.setAttribute("aria-live","polite"),i.config.theme&&i._setTheme(i.config.theme),i.mount(n,(0,l.create)({render:function(){return i.toVDOM()}})),i._clickEvent=function(t){return i.events.fire(u.PopupEvents.click,[t])},i.events=e.events||new s.EventSystem(i),i._isActive=!1,i}return o(e,t),e.prototype.show=function(t,e,i){var n=this;void 0===e&&(e={}),this.events.fire(u.PopupEvents.beforeShow,[t])&&(t=(0,c.toNode)(t),this._isActive?this._setPopupSize(t,e):(i&&this.attach(i),e.theme&&this._setTheme(e.theme),this._popup.style.left="0",this._popup.style.top="0",(0,l.awaitRedraw)().then((function(){n._setPopupSize(t,e),n._popup.style.position="fixed",document.body.appendChild(n._popup),n._isActive=!0})).then((function(){n._popup.style.position="absolute",n.events.fire(u.PopupEvents.afterShow,[t]),n._outerClickDestructor=n._detectOuterClick(t)}))))},e.prototype.hide=function(){this._hide(!1,null)},e.prototype.isVisible=function(){return this._isActive},e.prototype.attach=function(t,e){return this._html=null,"object"==typeof t?this._ui=t:"string"==typeof t?this._ui=new window.dhx[t](null,e):"function"==typeof t&&(t.prototype instanceof d.View?this._ui=new t(null,e):this._ui={getRootView:function(){return t(e)}}),this.paint(),this._ui},e.prototype.attachHTML=function(t){this._html=t,this.paint()},e.prototype.getWidget=function(){return this._ui},e.prototype.getContainer=function(){return this.getRootView().refs.content.el},e.prototype.toVDOM=function(){var t;return this._html?t=(0,l.el)(".dhx_popup__inner-html-content",{".innerHTML":this._html}):(t=this._ui?this._ui.getRootView():null)&&t.render&&(t=(0,l.inject)(t)),(0,l.el)("div",{class:"dhx_popup-content",tabindex:0,onclick:this._clickEvent,_key:this._uid,_ref:"content"},[t])},e.prototype.destructor=function(){this.events&&this.events.clear(),this.hide(),this._outerClickDestructor&&this._outerClickDestructor(),this._popup=null},e.prototype._setTheme=function(t){var e;if("string"==typeof t)this._popup.setAttribute("data-dhx-theme",t);else{var i=null===(e=null==t?void 0:t.closest("[data-dhx-theme]"))||void 0===e?void 0:e.getAttribute("data-dhx-theme");i&&this._popup.setAttribute("data-dhx-theme",i)}},e.prototype._setPopupSize=function(t,e,i){var n=this;void 0===i&&(i=3);var o=this._popup.getBoundingClientRect(),a=o.width,l=o.height;if(this._timeout&&(clearTimeout(this._timeout),this._timeout=null),!i||0!==a&&0!==l){var s=(0,c.fitPosition)(t,r(r({centering:!0,mode:"bottom"},e),{width:a,height:l})),d=s.left,u=s.top;if(this._popup.style.left=d,this._popup.style.top=u,e.indent&&0!==e.indent)switch(e.mode){case"top":this._popup.style.top=parseInt(this._popup.style.top.slice(0,-2),null)-parseInt(e.indent.toString(),null)+"px";break;case"bottom":default:this._popup.style.top=parseInt(this._popup.style.top.slice(0,-2),null)+parseInt(e.indent.toString(),null)+"px";break;case"left":this._popup.style.left=parseInt(this._popup.style.left.slice(0,-2),null)-parseInt(e.indent.toString(),null)+"px";break;case"right":this._popup.style.left=parseInt(this._popup.style.left.slice(0,-2),null)+parseInt(e.indent.toString(),null)+"px"}}else this._timeout=setTimeout((function(){n._isActive&&(n._setPopupSize(t,e,i-1),n._timeout=null)}))},e.prototype._detectOuterClick=function(t){var e=this,i=!1,n=new WeakMap,o=function(r){var a=r.target,l=document.querySelectorAll(".dhx_popup");for(i?l.forEach((function(t){return n.has(t)||n.set(t,e._popup)})):(i=Boolean(l.length))&&l.forEach((function(t){return n.set(t,!0)}));a;){if(a===t||a===e._popup||n.get(a)===e._popup)return;a=a.parentNode}e._hide(!0,r)&&document.removeEventListener("mousedown",o)};return document.addEventListener("mousedown",o),function(){return document.removeEventListener("mousedown",o)}},e.prototype._hide=function(t,e){if(this._isActive)return!!this.events.fire(u.PopupEvents.beforeHide,[t,e])&&(document.body.removeChild(this._popup),this._isActive=!1,this._outerClickDestructor&&(this._outerClickDestructor(),this._outerClickDestructor=null),this.events.fire(u.PopupEvents.afterHide,[e]),!0)},e}(d.View);e.Popup=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={hours:"Hours",minutes:"Minutes",save:"Save"}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTimeCheck=void 0,e.isTimeCheck=function(t){return/(^12:[0-5][0-9]?AM$)/i.test(t)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.linkButtonClasses=void 0,e.linkButtonClasses=".dhx_button.dhx_button--view_link.dhx_button--icon.dhx_button--size_medium.dhx_button--color_secondary"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckboxEditor=void 0;var n=i(0),o=i(1),r=i(3),a=i(4),l=function(){function t(t,e,i){this._config=i,this._cell={row:t,col:e},this._initHandlers()}return t.prototype.endEdit=function(){var t=this._checked;this._config.events.fire(r.GridEvents.beforeEditEnd,[t,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.events.fire(r.GridEvents.afterEditEnd,[t,this._cell.row,this._cell.col])):this._input.checked=!t},t.prototype.toHTML=function(){void 0===this._checked&&(this._checked=this._cell.row[this._cell.col.id]);var t=(0,n.uid)();return(0,o.el)("div.dhx_checkbox.dhx_cell-editor__checkbox",[(0,o.el)("label",{style:{display:"none"},for:t},(0,a.getColumnHeaderText)(this._cell.col)),(0,o.el)("input.dhx_checkbox__input",{type:"checkbox",_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","data-dhx-checked":(!!this._checked).toString(),checked:this._checked,id:t,style:{userSelect:"none"}}),(0,o.el)("span.dhx_checkbox__visual-input")])},t.prototype._initHandlers=function(){var t=this;this._handlers={onClick:function(){var e=!t._input.checked;t._config.events.fire(r.GridEvents.beforeEditStart,[t._cell.row,t._cell.col,"checkbox"])?(t._checked=e,t._config.events.fire(r.GridEvents.afterEditStart,[t._cell.row,t._cell.col,"checkbox"]),t.endEdit()):t._input.checked=!e},didInsert:function(e){t._checkbox=e.el.parentNode.lastChild,t._input=e.el.parentNode.querySelector("input"),e.el.parentNode.addEventListener("click",t._handlers.onClick)}}},t}();e.CheckboxEditor=l},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ComboboxEditor=void 0;var o=i(1),r=i(3),a=i(4),l=i(47),s=i(17),c=i(4),d=function(){function t(t,e,i){this._config=i,this._cell={row:t,col:e},this._initHandlers()}return t.prototype.endEdit=function(t){var e=this;if(this._config.$editable){var i;if(!t){var n=this._input.getValue();i="multiselect"===this._cell.col.editorType?n.split(",").join(", "):n}if(this._config.events.fire(r.GridEvents.beforeEditEnd,[i,this._cell.row,this._cell.col])){var o=(0,c.getEditorOptions)(this._cell.col,this._cell.row);this._input.popup.hide(),document.removeEventListener("mousedown",this._handlers.onOuterClick),this._cell.row=this._config.datacollection.getItem(this._cell.row.id),s.focusManager.setFocusId(this._config.gridId),"multiselect"===this._cell.col.editorType?null==i||i.toString().split(", ").forEach((function(t){return e._setCustomOptions(t,o)})):this._setCustomOptions(null==i?void 0:i.toString(),o),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[i,this._cell.row,this._cell.col])}else this._input.focus()}},t.prototype.toHTML=function(){var t=this,e=(0,c.getEditorOptions)(this._cell.col,this._cell.row).map((function(t){return"string"==typeof t?{id:"".concat(t),value:t}:t}))||[];if(!this._input){this._input=new l.ProCombobox(null,n({itemHeight:37,css:"dhx_cell-editor__combobox",multiselection:"multiselect"===this._cell.col.editorType,htmlEnable:this._cell.col.htmlEnable},this._cell.col.editorConfig)),this._input.data.parse(e);var i=this._cell.row[this._cell.col.id],r="multiselect"===this._cell.col.editorType?((null==i?void 0:i.toString())||"").split(", "):i;this._input.setValue(r),this._input.events.on("keydown",this._handlers.onkeydown),this._input.data.events.on("beforeAdd",(function(e){if(e.id!==e.value)return t._input.addOption({id:e.value,value:e.value},!0),!1}))}return document.addEventListener("mousedown",this._handlers.onOuterClick),this._config.$editable.editor=this,(0,o.awaitRedraw)().then((function(){var e=t._input.getRootView().refs.holder.el,i=e.querySelector("input");i&&i.setAttribute("aria-label",(0,a.getColumnHeaderText)(t._cell.col)),t._input.popup.getContainer().style.width=e.offsetWidth+"px",t._input._filter(),t._input.popup.show(e)})),s.focusManager.setFocusId(this._input._uid),(0,o.inject)(this._input.getRootView())},t.prototype._initHandlers=function(){var t=this;this._handlers={onOuterClick:function(e){if(e.target instanceof Node){var i=t._input&&t._input.getRootNode()&&t._input.getRootNode().contains(e.target),n=t._input.popup&&t._input.popup.getRootNode()&&t._input.popup.getRootNode().contains(e.target);i||n||t.endEdit()}},onkeydown:function(e){if("Escape"!==e.key&&"Tab"!==e.key||t.endEdit(),"Enter"===e.key){if(!t._config.events.fire(r.GridEvents.beforeKeyDown,[e]))return;e.stopPropagation(),t.endEdit(),t._config.events.fire(r.GridEvents.afterKeyDown,[e])}}}},t.prototype._setCustomOptions=function(t,e){var i=e.find((function(e){return"string"==typeof e?e===t:e.id.toString()===t}));t&&!i&&(this._cell.col.$customOptions||(this._cell.col.$customOptions=[]),this._cell.col.$customOptions.push(this._input.data.getItem(t)))},t}();e.ComboboxEditor=d},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KEY_CODES=void 0,e.KEY_CODES={BACKSPACE:8,ENTER:13,ESC:27,DOWN_ARROW:40,UP_ARROW:38,LEFT_ARROW:37,RIGHT_ARROW:39}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditor=void 0;var n=i(110);e.getEditor=function(t,e){return new n.InputEditor(t,e)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputEditor=void 0;var n=i(1),o=i(31),r=function(){function t(t,e){var i=this;this._list=e,this._config=e.config,this._item=t,this._list.events.on(o.ListEvents.focusChange,(function(t,e){i._mode&&e!==i._item.id&&i.endEdit()})),this._initHandlers()}return t.prototype.endEdit=function(){if(this._input){var t=this._input.value;this._list.events.fire(o.ListEvents.beforeEditEnd,[t,this._item.id])?(this._input.removeEventListener("blur",this._handlers.onBlur),this._input.removeEventListener("change",this._handlers.onChange),this._input.removeEventListener("keydown",this._handlers.onKeyDown),this._handlers={},this._mode=!1,this._list.events.fire(o.ListEvents.afterEditEnd,[t,this._item.id])):this._input.focus()}},t.prototype.toHTML=function(){this._mode=!0;var t=this._config.itemHeight;return(0,n.el)(".dhx_input__wrapper",{role:"presentation"},[(0,n.el)("div.dhx_input__container",{role:"presentation"},[(0,n.el)("input.dhx_input",{class:this._item.css?" "+this._item.css:"",style:{height:t,width:"100%",padding:"8px 12px"},_hooks:{didInsert:this._handlers.didInsert},_key:this._item.id,"data-dhx-id":this._item.id})])])},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onChange:function(){t.endEdit()},onKeyDown:function(e){"Enter"===e.key&&t._item.value===t._input.value&&t.endEdit(),"Escape"===e.key&&(t._input.value=t._item.value,t.endEdit())},didInsert:function(e){var i=e.el;t._input=i,i.focus(),i.value=t._item.value,i.setSelectionRange(0,i.value.length),i.addEventListener("change",t._handlers.onChange),i.addEventListener("blur",t._handlers.onBlur),i.addEventListener("keydown",t._handlers.onKeyDown)}}},t}();e.InputEditor=r},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.ProList=void 0;var l=i(1),s=i(42),c=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.scrollView=new s.ScrollView((function(){return n.getRootView()})),n.paint(),n}return o(e,t),e.prototype.destructor=function(){t.prototype.destructor.call(this),this.scrollView=null},e.prototype.scrollTo=function(t){var e,i,n=this.getRootView();if(n&&n.node&&n.node.el&&void 0!==t){var o=(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)?null===(i=this.getRootNode())||void 0===i?void 0:i.querySelector(".scroll-view"):this.getRootNode();this._scrollTo(t,o)}},e.prototype._renderList=function(){var t=this,e=this._getRange(),i=this.data.getRawData(e[0],e[1]).map((function(e,i){return t._renderItem(e,i)}));this.config.virtual&&(i=a(a([(0,l.el)(".div",{style:{height:e[2]+"px",_key:"start-key"}})],i,!0),[(0,l.el)(".div",{style:{height:e[3]+"px",_key:"end-key"}})],!1));var n=this.scrollView&&this.scrollView.config.enable,o=(this.config.css?this.config.css:"")+(this.config.multiselection&&this.selection.getItem()?" dhx_no-select--pointer":"")+(n?" dhx_list--scroll-view":"");return(0,l.el)("ul.dhx_widget.dhx_list",r(r({style:{"max-height":this.config.height,position:"relative"},id:this._uid,class:o,"data-dhx-widget-id":this._uid,"data-dhx-drop-area":"row"},this._handlers),this._getListAriaAttrs(this.config,this.data.getLength())),n?[].concat(this.scrollView.render(i)):i)},e}(i(50).List);e.ProList=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyListener=void 0;var n=function(){function t(){var t=this;this._handler=function(e){if(t._isActive){var i=e.key;"Backspace"===i&&t._sequence.length>0&&(t._sequence=t._sequence.slice(0,t._sequence.length-1),t._change()),i.length<2&&(t._sequence+=i,t._change())}},this._sequence="",document.addEventListener("keydown",this._handler)}return t.prototype.startNewListen=function(t){this._isActive=!0,this._sequence="",this._currentAction=t},t.prototype.endListen=function(){this._currentAction=null,this.reset(),this._isActive=!1},t.prototype.reset=function(){this._sequence=""},t.prototype.destructor=function(){document.removeEventListener("keydown",this._handler)},t.prototype._change=function(){this._currentAction(this._sequence),this._addClearTimeout()},t.prototype._addClearTimeout=function(){var t=this;this._clearTimeout&&clearTimeout(this._clearTimeout),this._clearTimeout=setTimeout((function(){t.reset(),t._clearTimeout=null}),2e3)},t}();e.KeyListener=n},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProCombobox=void 0;var r=i(48),a=i(49),l=i(27),s=i(52),c=function(t){function e(e,i){return t.call(this,e,i)||this}return o(e,t),e.prototype._createLayout=function(){var t=this.list=new a.ProList(null,{$template:r.$template,template:this.config.template,htmlEnable:this.config.htmlEnable,virtual:this.config.virtual,keyNavigation:!0,multiselection:this.config.multiselection,itemHeight:this.config.itemHeight,height:this.config.listHeight,data:this.data,eventHandlers:this.config.eventHandlers}),e=this._layout=new l.ProLayout(this.popup.getContainer(),{css:"dhx_combobox-options dhx_combobox__options",rows:[{id:"select-unselect-all",hidden:!this.config.multiselection||!this.config.selectAllButton},{id:"list",height:"content"},{id:"not-found",hidden:!0}],on:{click:{".dhx_combobox__action-select-all":this._handlers.selectAll,".dhx_combobox-options__action-create-option":this._handlers.addOption}}});e.getCell("list").attach(t),this.config.multiselection&&this.config.selectAllButton&&e.getCell("select-unselect-all").attach(s.selectAllView)},e}(r.Combobox);e.ProCombobox=c},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaEditor=void 0;var o=i(1),r=i(3),a=i(0),l=i(4),s=i(4),c=i(18),d=function(){function t(t,e,i,n){this._config=i,this._cell={row:t,col:e},this.type=this._cell.col.type,this._width=this._getCellWidth(n),this._config.firstColId===this._cell.col.id&&this._cell.row.hasOwnProperty("$level")&&(this._width-=(0,s.getTreeCellWidthOffset)(this._cell.row)-12),this._initHandlers()}return t.prototype.endEdit=function(t){var e;this._config.$editable&&(t||(e=this._removeValuePattern(this._input.value,!0),("number"===this.type||this._cell.col.numberMask)&&(e=parseFloat(e),Number.isNaN(e)&&(e=""))),this._config.events.fire(r.GridEvents.beforeEditEnd,[e,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[e,this._cell.row,this._cell.col])):this._input.focus())},t.prototype.toHTML=function(t){var e;(0,a.isDefined)(t)&&(this.type="string"),t=null!==(e=this._input?this._input.value:null!=t?t:this._cell.row[this._cell.col.id])&&void 0!==e?e:"";var i=this._cell.col.numberMask;(0,a.isDefined)(null==i?void 0:i.maxDecLength)&&(i=n(n({},i),{maxDecLength:void 0})),t=this._applyValuePattern(t,this._input,!0,i),this._config.$editable.editor=this;var r=void 0!==this._cell.row.height||this._cell.col.htmlEnable?"dhx_cell-editor dhx_cell-editor__textarea_constant-height":"dhx_cell-editor dhx_cell-editor__textarea";return(0,o.el)("textarea",{_hooks:{didInsert:this._handlers.didInsert},_ref:"textarea",_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,l.getColumnHeaderText)(this._cell.col),value:t,onblur:this._handlers.onBlur,oninput:this._handlers.onInput,onkeydown:this._handlers.onKeydown,class:r,style:{width:this._width}})},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onInput:function(e){var i=t._removeValuePattern(t._input.value);t._input.value=t._applyValuePattern(i,t._input),t._updateHeight(e,t._input.value)},onKeydown:function(e){"Escape"===e.key&&t._updateHeight(e,t._initialValue),"Enter"!==e.key||e.shiftKey||e.preventDefault()},didInsert:function(e){t._input=e.el,t._initialValue=e.el.value,t._input.focus()}}},t.prototype._getCurrentHeight=function(t,e){e=n({width:100,maxHeight:40,lineHeight:20},e);var i=document.createElement("textarea");i.className="dhx_cell-editor dhx_cell-editor__textarea",i.value=t,i.style.width="".concat(e.width,"px"),i.style.lineHeight="".concat(e.lineHeight,"px"),i.style.maxHeight="".concat(e.maxHeight,"px"),i.style.boxSizing="border-box",document.body.appendChild(i);var o=this._getElementHeight(i),r=i.value.split("\n").length,a=Math.round(o/e.lineHeight),l=o<e.maxHeight?e.maxHeight:o;return document.body.removeChild(i),1===r&&r===a?e.maxHeight:l},t.prototype._getElementHeight=function(t){return t.scrollHeight},t.prototype._applyValuePattern=function(t,e,i,o){return void 0===i&&(i=!1),this._cell.col.numberMask?(0,c.numberMask)(t.toString(),n(n({},o||this._cell.col.numberMask),{onlyView:i}),e):this._cell.col.patternMask?(0,c.patternMask)(t.toString(),this._cell.col.patternMask,e):t},t.prototype._removeValuePattern=function(t,e){return void 0===e&&(e=!1),this._cell.col.numberMask?(0,c.removeNumberMask)(t,n(n({},this._cell.col.numberMask),{lastCall:e})):this._cell.col.patternMask?(0,c.removePatternMask)(t,this._cell.col.patternMask):t},t.prototype._getCellWidth=function(t){return t?this._config.columns.slice(t.$colsVisibility[0],t.$colsVisibility[1]+1).reduce((function(t,e){return t+e.$width}),0):this._cell.col.$width},t.prototype._updateHeight=function(t,e){var i,o;if(void 0===this._cell.row.height&&!this._cell.col.htmlEnable){var a=this._getCurrentHeight(e,{width:this._width-2,maxHeight:this._config.rowHeight}),l=n(n({},this._cell.row),((i={})[this._cell.col.id]=e,i)),c=(0,s.getCalculatedRowHeight)((0,s.getMaxRowHeight)({row:l,cols:this._config.columns})),d=(0,s.getCalculatedRowHeight)((0,s.getMaxRowHeight)({row:(o={},o[this._cell.col.id]=l[this._cell.col.id],o),cols:this._config.columns}));if(this._minHeight=c===d?this._config.rowHeight:c,a>=this._minHeight&&a!==this._prevHeight){if(!this._config.events.fire(r.GridEvents.beforeRowResize,[this._cell.row,t,a]))return;this._config.events.fire(r.GridEvents.afterRowResize,[this._cell.row,t,a])}this._prevHeight=a}},t}();e.TextAreaEditor=d},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.getGroupPanel=e.getGroupItem=void 0;var r=i(1),a=i(3),l=i(2),s=i(56);var c={onclick:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemClick,[i,e])},onmousedown:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemMouseDown,[i,e])},ontouchstart:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemMouseDown,[i,e])},ontouchmove:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t._events.fire(a.GridSystemEvents.groupPanelItemTouchMove,[i,e])},ontouchend:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t._events.fire(a.GridSystemEvents.groupPanelItemItemTouchEnd,[i,e])}};function d(t){var e=t.id,i=t.label,n=t.sortDir,o=t.sortOrder,a=t.mode,l=void 0===a?"basic":a,s=t.sortable,c=void 0===s||s,d=t.closable,u=void 0===d||d;return(0,r.el)("div",{role:"option",class:"dhx_grid-group_item dhx_grid-group_item--".concat(l),"data-dhx-group-item-id":e,"data-dhx-id":e,_key:e},[c&&(n&&(0,r.el)("div.dhx_grid-sort",[(0,r.el)("i.dxi.dxi-arrow-up.dhx_grid-group_item-sort.dhx_grid-group_item-sort--".concat(n),{"aria-hidden":"true"}),o&&(0,r.el)("div.dhx_grid-sort-counter",{"aria-hidden":"true"},[o])||null])||(0,r.el)("i.dxi.dxi-sort.dhx_grid-group_item-sort.dhx_grid-group_item-unsorted"))||null,(0,r.el)("span.dhx_grid-group_item-label",i),u&&(0,r.el)("i.dxi.dxi-close-circle.dhx_grid-group_item-remove",{"data-dhx-group-item-remove":"true"})||null])}e.getGroupItem=d,e.getGroupPanel=function(t,e){var i,a;void 0===t&&(t=[]);var l=[];t.forEach((function(e,i){l.push(d(e)),i!==t.length-1&&l.push(function(t){var e=t.id;return(0,r.el)("div.dhx_grid-group_chain",{"aria-hidden":"true","data-dhx-id":e,_key:"chain_".concat(e)},[(0,r.el)("i.dxi.dxi-chevron-right")])}(e))}));var u=Object.entries(c).reduce((function(t,i){var o,r=i[0],a=i[1];return n(n({},t),((o={})[r]=[a,e],o))}),{});return(0,r.el)("section",n({class:"dhx_grid-group_panel","data-dhx-drop-area":"group",role:"presentation",style:{height:(null===(a=null===(i=e.config)||void 0===i?void 0:i.group)||void 0===a?void 0:a.panelHeight)||40}},u),[(0,r.el)("div",{class:"dhx_grid-group_title"},s.default.dropAreaTitle),(0,r.el)("div",{class:"dhx_grid-group_drop-area",role:"listbox"},o([],l.length?l:[(0,r.el)("span",{class:"dhx_grid-group_drop-area-placeholder"},s.default.dropAreaPlaceholder)],!0))])}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.setSubRowCell=e.getSubRowContent=void 0;var o=i(1),r=i(5),a=i(20),l=i(41),s=i(7);function c(t,e,i,o){var r=e(t),s=new l.ProCell(null,{id:"cell"+t.id,css:"dhx_grid_subrow "+(i.css||""),html:"string"==typeof r&&r||null,height:t.$subRowHeight,padding:i.padding});o.set(t.id,n(n(n({},a.defaultSubRowConfig),i),{cell:s})),"function"==typeof(null==r?void 0:r.paint)&&s.attach(r)}e.getSubRowContent=function(t){var e,i=[],n=null===(e=t.subRowConfig)||void 0===e?void 0:e.fullWidth;return t.$subRowCells&&t.currentRows.forEach((function(e){var a;if(e.$opened){var l=t.$subRowCells.get(e.id),c=null===(a=null==l?void 0:l.cell)||void 0===a?void 0:a.getRootView();if(c){var d=(0,r.getTotalHeight)(t.data.slice(0,e.$index))+e.$height;i.push((0,o.el)(".dhx_grid_subrow__container",{_key:"sub"+e.id,role:"region","aria-labelledby":"row-".concat(e.id),"data-dhx-id":e.id,"data-dhx-root-widget-id":t.gridId,tabindex:0,style:{position:"absolute",top:d,width:n?t.$totalWidth:t.$width-t.$scrollBarWidth.y-s.BORDERS}},[(0,o.inject)(c)]))}}})),i.length?(0,o.el)(".dhx_grid_subrow__data",{_flags:o.KEYED_LIST,style:{left:n?0:t.scroll.left},role:"presentation"},i):[]},e.setSubRowCell=function(t,e){for(var i=t.config,o=i.subRowConfig,r=i.$subRowCells,l=i.subRow,s=new Map,d=0;d<e.length;d++){var u=e[d];if(!u.$group){if(!r.has(u.id)||!r.get(u.id).cell){var h=n(n({},a.defaultSubRowConfig),("function"==typeof o?o(u):o)||{});r.set(u.id,h),(u.$opened||h.preserve)&&u.$subRowHeight&&c(u,l,h,r)}s.set(u.id,u.$opened)}}r.forEach((function(t,e){var i;t.preserve||(s.has(e)||r.delete(e),s.get(e)||((null==t?void 0:t.cell)&&(null===(i=t.cell)||void 0===i||i.destructor()),delete t.cell))}))}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.getDragPanelNode=void 0;var r=i(1),a=i(3),l=i(20),s=i(7),c=i(2),d=i(5),u={onclick:function(t,e){var i=(0,c.locate)(e,"data-dhx-id");i&&t.events.fire(a.GridEvents.dragPanelItemClick,[i,e])},onmousedown:function(t,e){var i=(0,c.locate)(e,"data-dhx-id");i&&t.events.fire(a.GridEvents.dragPanelItemMouseDown,[i,e])}};function h(t){return(0,r.el)(".dhx_grid-drag-panel_header",{style:{height:t.$headerHeight},role:"banner","aria-label":"Panel header"})}function f(t,e,i){var n=t.$footer,o=((!i||e.footerAtBottom)&&t.$scrollBarWidth.x||0)+(n&&t.$footerHeight||0);if(!o||!n&&t.$totalHeight<t.$height-t.$headerHeight-t.$footerHeight)return null;var a=s.BORDERS/2,c=t.dragPanel,d={height:o+a};return e.footerAtBottom&&(d.width=c.width||l.defaultDragPanelConfig.width,d.height=d.height+a),(0,r.el)(".dhx_grid-drag-panel_footer".concat(e.footerAtBottom?".dhx_grid-drag-panel_footer--at-bottom":""),{style:d,role:"contentinfo","aria-label":"Panel footer"})}function p(t,e,i){var n=t.$height-t.$headerHeight-s.BORDERS;return(0,r.el)(".dhx_grid-drag-panel_main",{style:{height:n},role:"main","aria-label":"Panel content"},[g(t,e),f(t,e,i),v(t,e,a.Split.top,i),v(t,e,a.Split.bottom,i)])}function g(t,e){var i=t.dragPanel,n=t.currentRows.map((function(t){return _(t,i.icon)}));return(0,r.el)(".dhx_grid-drag-panel_content",{style:{height:t.$totalHeight,paddingTop:e.shifts.y,top:-t.scroll.top},_flags:r.KEYED_LIST,role:"list","aria-label":"Draggable rows"},o([],n,!0))}function v(t,e,i,n){var c=t.dragPanel,u=(i===a.Split.bottom?t.fixedRows.bottom:t.fixedRows.top)||[];if(!u.length)return null;var h=u.map((function(t){return _(t,c.icon)})),f={width:c.width||l.defaultDragPanelConfig.width};if(i===a.Split.bottom&&e.footerAtBottom)f.bottom=t.footerHeight+s.BORDERS/2+(t.$scrollBarWidth.x||-1);else{var p=(0,d.getTotalHeight)(t.fixedRows.bottom),g=t.group?(0,l.getGroupDefaultConfig)(t.group).panelHeight:0;f.top=i===a.Split.bottom?n?t.$totalHeight+t.$headerHeight-p+s.BORDERS/2+g:t.$height-p-t.$footerHeight-s.BORDERS/2-t.$scrollBarWidth.x+g:t.$headerHeight+g}return(0,r.el)(".dhx_grid-drag-panel_content.dhx_grid-drag-panel_content--fixed",{style:f,_flags:r.KEYED_LIST,role:"list","aria-label":"Draggable rows"},o([],h,!0))}function _(t,e){return(0,r.el)(".dhx_grid-drag-panel_item",{"data-dhx-id":t.id,style:{height:t.$height},_key:t.id+"_panel",role:"listitem","aria-label":"Row id ".concat(t.id)},[(0,r.el)("i.dhx_grid-drag-panel_item-icon",{class:e,"aria-hidden":"true"})])}e.getDragPanelNode=function(t,e,i,o){var a;void 0===o&&(o=!1);var s=e.dragPanel,c=Object.entries(u).reduce((function(e,i){var o,r=i[0],a=i[1];return n(n({},e),((o={})[r]=[a,t],o))}),{}),d="dhx_grid-drag-panel ";return o&&(d+="dhx_grid-drag-panel--less-height "),(null===(a=t.config.$grouped)||void 0===a?void 0:a.length)&&(d+="dhx_grid-drag-panel--drag-not-allowed "),s.css&&(d+=s.css),(0,r.el)("section",n({class:d,style:{width:s.width||l.defaultDragPanelConfig.width},role:"region","aria-label":"Drag panel"},c),[h(e),p(e,i,o)])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComboFilter=void 0;var n=i(47),o=i(6),r=i(8),a=i(0),l=i(3),s=i(21),c=function(){function t(t){var e,i=t.column,n=t.config,r=t.headerConfig,l=t.uniqueData,s=t.value,c=t.grid;this.events=new o.EventSystem,this._silentMode=!1,this.column=i,this.config=n,this.data=l,this.value=s,this.filterConfig={},this._grid=c,Object.assign(this.filterConfig,(null==r?void 0:r.filterConfig)||{}),(this.column.htmlEnable||(null===(e=this.config)||void 0===e?void 0:e.htmlEnable)&&!1!==this.column.htmlEnable)&&(this.column.template||!1===this.filterConfig.readonly||(this.filterConfig.readonly=!0),this.filterConfig.template||(this.filterConfig.template=function(t){return t.value})),this.filterConfig.filter||(this.filterConfig.filter=function(t,e){return(0,a.isExistValue)(t.value,e)}),this.initFilter(),this.config&&this.initHandlers()}return t.prototype.initFilter=function(){this._filter=new n.ProCombobox(null,Object.assign({virtual:!0},this.filterConfig)),this.data&&this._filter.data&&this._setData()},t.prototype.initHandlers=function(){var t=this,e=this.column.id.toString();[r.DataEvents.load,r.DataEvents.afterLazyLoad].forEach((function(e){t._grid.events.on(e,(function(){return t._setData()}),!0)})),this._filter.events.on("change",(function(i){var n;i&&((Array.isArray(i)?i.find((function(e){return t._filter.data.getItem(e)})):t._filter.data.getItem(i))&&(n=t._filter.config.multiselection?t._filter.list.selection.getItem().map((function(e){if(e&&t._filter.data.getItem(e.id))return e.value})):t._filter.list.selection.getItem().value));t.value=n,t._grid.events.fire(l.GridEvents.filterChange,[t.value,e,"comboFilter",t._silentMode]),t._silentMode&&void 0===t.value&&(t._silentMode=!1)})),this._grid.events.on(l.GridEvents.filterChange,(function(e){return t.events.fire(s.HeaderFilterEvent.change,[e])}),this),this._filter.popup.events.on("afterHide",(function(){t.filterConfig.multiselection||t._filter.list.selection.getItem()||t.clear()})),this._filter.popup.events.on("afterShow",(function(){!t.filterConfig.multiselection&&(""===t.value||t.filterConfig.readonly&&void 0!==t.value)&&t.clear()})),this._grid.events.on(l.GridEvents.scroll,(function(){var e;t._isFocused&&(null===(e=t._filter.getRootView().refs)||void 0===e?void 0:e.input)&&t._filter.focus()}),this),this._grid.events.on(l.GridEvents.headerCellMouseDown,(function(e,i){i.id!==t.column.id&&t.blur()}),this),this._grid.events.on(l.GridEvents.cellMouseDown,(function(){return t.blur()}),this),this._grid.events.on(r.DataEvents.change,(function(e,i){t.column.hidden||"update"!==i||(t._checkValue(),t._setData(!0))}),this),this._grid.events.on(r.DataEvents.afterAdd,(function(){t.column.hidden||t._setData(!0)})),this._grid.events.on(r.DataEvents.afterRemove,(function(){t.column.hidden||(t._checkValue(),t._setData(!0))})),this._grid.events.on(r.DataEvents.removeAll,(function(){t.clear(!0),t._setData()}),this),this._grid.events.on(l.GridEvents.afterRowShow,(function(){return t._setData(!0)}),this),this._grid.events.on(l.GridEvents.afterRowHide,(function(){t.column.hidden||(t._checkValue(),t._setData(!0))}),this),this._grid.events.on(r.DataEvents.filter,(function(e){t.column.hidden||(!e||(0,r.isOnlyPermanentFilters)(e)?t.clear(!0):t._checkValue(),t.filterConfig.multiselection&&t._filter.popup.isVisible()||t._setData(!0))}),this),this._grid.events.on(l.GridEvents.afterColumnShow,(function(){t.filterConfig.multiselection||(t._checkValue(),t._setData())}),this),this._grid.events.on(l.GridEvents.afterColumnHide,(function(){t.filterConfig.multiselection||t._setData()}),this)},t.prototype.getFilter=function(){return this._filter},t.prototype.setValue=function(t,e){var i,n=this;if(this.filterConfig.multiselection||!Array.isArray(t))if((0,a.isDefined)(t)){if((null==t?void 0:t.length)||""===t){var o=this.filterConfig.multiselection&&Array.isArray(t)?t.map((function(t){var e;return null===(e=n._filter.data.find((function(e){return e.value===t})))||void 0===e?void 0:e.id})):null===(i=this._filter.data.find((function(e){return e.value===t})))||void 0===i?void 0:i.id;this._filter.setValue(o,e)}}else e&&(this._silentMode=!0),this._filter.clear(),this.filterConfig.multiselection||void 0===this.value||(this.value=void 0,this._grid.events.fire(l.GridEvents.filterChange,[this.value,this.column.id,"comboFilter"]))},t.prototype.clear=function(t){void 0!==this.value&&this.setValue(null,t)},t.prototype.focus=function(){var t;this._isFocused=!0,(null===(t=this._filter.getRootView().refs)||void 0===t?void 0:t.input)&&this._filter.focus()},t.prototype.blur=function(){var t;this._isFocused=!1,(null===(t=this._filter.getRootView().refs)||void 0===t?void 0:t.input)&&this._filter.blur()},t.prototype.destructor=function(){var t=this._grid.events;if(t)for(var e in t.events)this._grid.events.detach(e,this);this.events.clear(),this._filter&&this._filter.destructor(),this.config=this.filterConfig=this.data=this.column=this.value=this.events=null},t.prototype._setData=function(t){var e=this;void 0===t&&(t=!1);var i=function(){var t=e.column.$activeFilterData||e.column.$uniqueData;if(e.column.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.filter}))){var i=e._filter.data.reduce((function(t,e){return t[e.value]=e.id,t}),{}),n=t.map((function(t){return i[t]?{id:i[t],value:t}:{value:t}}));e._filter.data.parse(n)}else e._filter.data.parse(t.map((function(t){return{value:t}})))};void 0===this.value?i():t&&this.filterConfig.multiselection&&(i(),this.setValue(this.value,!0))},t.prototype._checkValue=function(){if(void 0!==this.value)for(var t=Array.isArray(this.value)?this.value:[this.value],e=function(e){if(i.column.$uniqueData.includes(e))return"continue";if(t.length>1){var n=i._filter.data.find((function(t){return t.value===e}));i._filter.list.selection.remove(n.id)}else i.clear();return"break"},i=this,n=0,o=t;n<o.length;n++){if("break"===e(o[n]))break}},t}();e.ComboFilter=c},function(t,e,i){"use strict";var n=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.SelectFilter=void 0;var o=i(1),r=i(6),a=i(3),l=i(21),s=i(4),c=function(){function t(t){var e=t.column,i=t.config,n=t.uniqueData,o=void 0===n?[]:n,a=t.value,l=t.grid;this.events=new r.EventSystem,this.column=e,this.config=i,this.data=o,this.value=a||"",this._grid=l,this.initHandlers(),this.toHTML()}return t.prototype.toHTML=function(){var t,e=this;return(0,o.el)("label.dhx_grid-filter__label.dxi.dxi-menu-down",{_ref:"".concat(this.column.id,"_filter")},[(0,o.el)("select.dxi.dxi-menu-down",{type:"text",class:"dhx_input dhx_grid-filter dhx_grid-filter--select","aria-label":"Filter ".concat((0,s.getColumnHeaderText)(this.column)),tabindex:-1,onchange:this._handlers.onchange,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,_key:this.column.id},n([(0,o.el)("option",{value:"",_key:0},"")],null===(t=(this.value?[this.value]:this.data)||[])||void 0===t?void 0:t.map((function(t){return""!==(t=null!=t?t:"")&&(0,o.el)("option",{_key:t,value:t,selected:e.value===t.toString()},t)})),!0))])},t.prototype.getFilter=function(){return this.toHTML()},t.prototype.setValue=function(t,e){this.value=t||"",this.events.fire(l.HeaderFilterEvent.change,[t]),this._grid.events.fire(a.GridEvents.filterChange,[this.value,this.column.id,"selectFilter",e])},t.prototype.clear=function(t){this.setValue("",t)},t.prototype.focus=function(){var t,e;this._isFocused=!0;var i=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;i&&i.focus()},t.prototype.blur=function(){var t,e;this._isFocused=!1;var i=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;i&&i.blur()},t.prototype.initHandlers=function(){var t=this;this._handlers={onchange:function(e){var i,n,o,r,a=(null===(i=e.target)||void 0===i?void 0:i.value)||(null===(o=null===(n=e.composedPath())||void 0===n?void 0:n[0])||void 0===o?void 0:o.value)||(null===(r=e.explicitOriginalTarget)||void 0===r?void 0:r.value);t.setValue(a)},onfocus:function(){t._isFocused=!0},onblur:function(){t._isFocused=!1}},this._grid.events.on(a.GridEvents.scroll,(function(){var e,i,n=null===(i=null===(e=t._grid.getRootView())||void 0===e?void 0:e.refs["".concat(t.column.id,"_filter")])||void 0===i?void 0:i.el;t._isFocused&&n&&(0,o.awaitRedraw)().then((function(){n.focus()}))})),this._grid.events.on(a.GridEvents.headerCellMouseDown,(function(e,i){i.id!==t.column.id&&t.blur()})),this._grid.events.on(a.GridEvents.cellMouseDown,(function(){return t.blur()}))},t}();e.SelectFilter=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFilter=void 0;var n=i(1),o=i(6),r=i(3),a=i(21),l=i(4),s=function(){function t(t){var e=t.column,i=t.config,n=t.id,r=t.value,a=t.headerConfig,l=t.grid;this.events=new o.EventSystem,this.column=e,this.config=i,this.id=n,this.value=r||"",this.filterConfig={},this._grid=l,Object.assign(this.filterConfig,(null==a?void 0:a.filterConfig)||{}),this.initHandlers(),this.toHTML()}return t.prototype.toHTML=function(){var t="Filter ".concat((0,l.getColumnHeaderText)(this.column));return(0,n.el)("div.dhx_grid-filter__label",{"aria-label":t,_ref:"".concat(this.column.id,"_filter")},[(0,n.el)(".dhx_grid-filter__icon.dhx_input__icon",{class:"dxi "+(this.filterConfig.icon||" dxi-magnify")}),(0,n.el)("label",{style:{display:"none"},for:this.id},t),(0,n.el)("input",{type:"text",class:"dhx_input dhx_grid-filter","aria-label":t,tabindex:-1,oninput:this._handlers.onchange,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,_key:this.column.id,id:this.id,value:this.value,placeholder:this.filterConfig.placeholder})])},t.prototype.getFilter=function(){return this.toHTML()},t.prototype.setValue=function(t,e){var i;this.value=t||"",this.events.fire(a.HeaderFilterEvent.change,[this.value]),null===(i=this._grid.events)||void 0===i||i.fire(r.GridEvents.filterChange,[this.value,this.column.id,"inputFilter",e])},t.prototype.clear=function(t){this.setValue("",t)},t.prototype.focus=function(){var t,e,i;this._isFocused=!0;var n=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;n&&(null===(i=n.querySelector("input"))||void 0===i||i.focus())},t.prototype.blur=function(){var t,e,i;this._isFocused=!1;var n=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;n&&(null===(i=n.querySelector("input"))||void 0===i||i.blur())},t.prototype.initHandlers=function(){var t=this;this._handlers={onchange:function(e){var i,n,o,r,a=(null===(i=e.target)||void 0===i?void 0:i.value)||(null===(o=null===(n=e.composedPath())||void 0===n?void 0:n[0])||void 0===o?void 0:o.value)||(null===(r=e.explicitOriginalTarget)||void 0===r?void 0:r.value);t._inputDelay&&clearTimeout(t._inputDelay),t._inputDelay=setTimeout((function(){return t.setValue(a)}),500)},onfocus:function(){t._isFocused=!0},onblur:function(){t._isFocused=!1}},this._grid.events.on(r.GridEvents.scroll,(function(){var e,i,o=null===(i=null===(e=t._grid.getRootView())||void 0===e?void 0:e.refs["".concat(t.column.id,"_filter")])||void 0===i?void 0:i.el;t._isFocused&&o&&(0,n.awaitRedraw)().then((function(){var t;null===(t=o.querySelector("input"))||void 0===t||t.focus()}))})),this._grid.events.on(r.GridEvents.headerCellMouseDown,(function(e,i){i.id!==t.column.id&&t.blur()})),this._grid.events.on(r.GridEvents.cellMouseDown,(function(){return t.blur()}))},t}();e.InputFilter=s},function(t,e,i){"use strict";var n=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.startResize=void 0;var o=i(0),r=i(3),a=i(7);e.startResize=function(t,e,i,l){var s,c=t.config.rightSplit;i.targetTouches&&i.preventDefault();var d=i.targetTouches?i.targetTouches[0].clientX:i.clientX,u=t.config.columns.filter((function(t){return!t.hidden})),h=c?u.slice(-c).map((function(t){return t.id})):[],f=!!(null===(s=t.scrollView)||void 0===s?void 0:s.config.enable),p=c?(0,a.calcScrollBarWidth)(t.config,f).xState:null,g=0;t.config.$resizing=e;var v=function(i){var l,s=(0,o.findIndex)(u,(function(t){return t.id===e})),v=i.targetTouches?i.targetTouches[0].clientX:i.clientX,_=v-t.getRootNode().getBoundingClientRect().left,m=(0,a.calcScrollBarWidth)(t.config,f);if(!(t.config.leftSplit===s+1&&_>=t.config.$width-m.y-2||c&&h.includes(e)&&m.xState!==p)){g=g||u[s].$width;var y=40;"function"==typeof t.data.getMaxLevel&&0===s&&(y*=t.data.getMaxLevel());var b,x=u[s].minWidth||y,w=u[s].maxWidth,C=v-d,S=n([],u,!0),E=g+(p&&h.includes(e)?-C:C);w&&E>=w||E<=x?(E<=x&&(b=x),E>=w&&(b=w)):b=E,S[s].$width=b;for(var D=0;D<S.length;D++){(null!==(l=S[D].adjust)&&void 0!==l?l:t.config.adjust)||(S[D].$fixedWidth=D<=s)}t.events.fire(r.GridEvents.resize,[u[s],i]),t.paint()}},_=function(){i.targetTouches?(document.removeEventListener("touchmove",v),document.removeEventListener("touchend",_)):(document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",_)),l()};i.targetTouches?(document.addEventListener("touchmove",v),document.addEventListener("touchend",_)):(document.addEventListener("mousemove",v),document.addEventListener("mouseup",_)),t.paint()}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getKeysHandlers=void 0;var n=i(2),o=i(14),r=i(17),a=i(5),l=i(123),s=i(124),c=i(125);e.getKeysHandlers=function(t){var e,i,d,u="cell"===t.config.selection||"complex"===t.config.selection||!0===t.config.selection,h=null===(d=null===(i=null===(e=t.getRootView())||void 0===e?void 0:e.refs)||void 0===i?void 0:i.grid_body)||void 0===d?void 0:d.el;if(!t.getRootView()||h){(0,c.initFocusSentinel)(t),(0,c.initEndSentinel)(t),(0,c.restoreZoneTabindex)(t,"header");var f=function(e,i,o){var r,a,s;if(void 0===o&&(o=!1),!(t.config.$editable||(0,n.locateNodeByClassName)(e,"dhx_grid-header-cell")||(0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))){var c=null===(r=t.selection)||void 0===r?void 0:r.getCell(),d=t,u=null===(a=d.range)||void 0===a?void 0:a.getRange();if((c||u)&&h){e.preventDefault();var f,p=i*Math.max(1,Math.floor(h.clientHeight/t.config.rowHeight)),g=t.config.multiselection&&o;if(c)(f=(0,l.walkVisibleRows)(t,c.row.id,p))!==c.row.id&&(t.scrollTo(f.toString(),c.column.id.toString()),t.selection.setCell(f,c.column.id,!1,g));if(u&&"range"===(null===(s=d.block)||void 0===s?void 0:s.config.mode))(f=(0,l.walkVisibleRows)(t,u.yEnd,p))!==u.yEnd&&(0,l.applyRangeMove)(d,t.data.getItem(f),u,"vertical",o)}else h&&(e.preventDefault(),h.scrollTop+=i*h.clientHeight)}},p=function(e,i,n){var o,r;void 0===n&&(n=!1);var a=null===(o=t.selection)||void 0===o?void 0:o.getCell(),s=null===(r=t.range)||void 0===r?void 0:r.getRange();a||s?(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:i,toEnd:!0,shiftUp:n}):h&&(e.preventDefault(),h.scrollTop=i>0?h.scrollHeight:0)},g=function(e,i,o){var r,l,s,c;if(void 0===o&&(o=!1),!(t.config.$editable||(0,n.locateNodeByClassName)(e,"dhx_grid-header-cell")||(0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))){var d=null===(r=t.selection)||void 0===r?void 0:r.getCell(),u=t,h=null===(l=u.range)||void 0===l?void 0:l.getRange();if(d||h){e.preventDefault();var f,p,g=t.config.columns.filter((function(t){return!t.hidden})),v=t.config.multiselection&&o;if(i<0)f=t.data.getId(0),p=g[0].id;else{var _=t.data.getId(t.data.getLength()-1);"tree"===t.config.type&&(_=(0,a.getLastChild)(_,t.data)),f=_,p=g[g.length-1].id}d&&(t.scrollTo(f.toString(),p.toString()),t.selection.setCell(f,p,!1,v)),h&&"range"===(null===(s=u.block)||void 0===s?void 0:s.config.mode)&&(u.scrollTo(f,p),o?u.range.setRange({yEnd:f,xEnd:p},!0):u.range.setRange({yStart:f,yEnd:f,xStart:p,xEnd:p}),null===(c=u.block)||void 0===c||c.restoreFocus())}}};return{enter:function(e){var i,n=(0,c.detectFocusZone)(e);if("header"===n||"footer"===n){var r=e.target;return(0,c.isContentCell)(r)?(e.preventDefault(),void(0,c.activateContentCell)(r)):void(0,c.triggerHeaderSort)(t,e)}u?(i=(0,o.normalizeCell)(t.selection.getCell(),t))&&(0,s.isColumnEditable)(i.column,t.config)&&(t.config.$editable?t.editEnd():"boolean"===i.column.type?(0,s.toggleBooleanCell)(t,i.row,i.column):(0,s.startCellEdit)(t,i)):t.config.$editable?t.editEnd():(i=(0,l.getActiveCell)(t,!1))&&(0,s.isColumnEditable)(i.column,t.config)&&("boolean"===i.column.type?(0,s.toggleBooleanCell)(t,i.row,i.column):(0,s.startCellEdit)(t,i))},f2:function(){if(!t.config.$editable){var e=(0,l.getActiveCell)(t,u);e&&(0,s.isColumnEditable)(e.column,t.config)&&"boolean"!==e.column.type&&(0,s.startCellEdit)(t,e)}},space:function(e){var i=(0,c.detectFocusZone)(e);if("header"!==i&&"footer"!==i){if(!t.config.$editable){var n=(0,l.getActiveCell)(t,u);n&&(0,s.isColumnEditable)(n.column,t.config)&&"boolean"===n.column.type&&(e.preventDefault(),(0,s.toggleBooleanCell)(t,n.row,n.column))}}else(0,c.triggerHeaderSort)(t,e)},escape:function(e){var i,n,o,r,a,l=(0,c.detectFocusZone)(e);if("header"!==l&&"footer"!==l)t.config.$editable&&t.editEnd(!0);else{e.preventDefault();var s=e.target,d=s.closest(".dhx_grid-".concat(l,"-cell, .dhx_span-cell"));if(d&&s!==d&&(0,c.isContentCell)(d))return void(0,c.deactivateContentCell)(d);(0,c.restoreZoneTabindex)(t,l);var u=(0,c.getActiveColumnId)(t)||(0,c.getColIdFromTarget)(s)||(null===(i=(0,c.getVisibleColumns)(t)[0])||void 0===i?void 0:i.id);if(t.config.blockSelection&&(null===(n=t.range)||void 0===n?void 0:n.getRange())){var h=t.range.getRange();t.scrollTo(h.yStart,h.xStart),t.block.restoreFocus(),(null===(o=document.activeElement)||void 0===o?void 0:o.getAttribute("data-dhx-col-id"))||(0,c.transitionToBody)(t,h.xStart,"first")}else if(null===(r=t.selection)||void 0===r?void 0:r.getCell()){var f=t.selection.getCell();t.scrollTo(f.row.id,f.column.id),t.selection.restoreFocus(),(null===(a=document.activeElement)||void 0===a?void 0:a.getAttribute("data-dhx-col-id"))||(0,c.transitionToBody)(t,f.column.id,"first")}else u&&(0,c.transitionToBody)(t,u,"first")}},tab:function(e){var i,n,o,a,s,d,u=(0,c.detectFocusZone)(e);if("header"!==u&&"footer"!==u){t.config.$editable&&t.editEnd();var h=null===(s=t.selection)||void 0===s?void 0:s.getCell(),f=t.config.columns.filter((function(t){return!t.hidden}));if(h){if(h.row.$opened&&h.row.$subRowHeight){var p=t.getSubRow(h.row.id),g=p.view,v=p.element;return void((null==g?void 0:g.name.includes("grid"))?(g.selection.setCell(g.data.getId(0)),r.focusManager.setFocusId(g._uid)):v.focus())}var _=f.indexOf(h.column)+(0,l.getRangedIndex)(t,"right");if(_>=0&&_<f.length)e&&e.preventDefault(),t.scrollTo(h.row.id.toString(),f[_].id.toString()),t.selection.setCell(h.row.id,f[_].id);else if(_>=0){(y=(0,l.getNextVisibleRowId)(t,h.row.id,1))?(e&&e.preventDefault(),t.scrollTo(y.toString(),f[0].id.toString()),t.selection.setCell(y,f[0].id)):(0,c.hasFooter)(t)&&(e&&e.preventDefault(),(0,c.transitionFromBodyToZone)(t,"footer",f[0].id,0))}}else{var m=null===(d=t.range)||void 0===d?void 0:d.getRange();if(m){var y,b=f.findIndex((function(t){return t.id===m.xEnd}))+1;if(b<f.length)e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,m.yEnd,f[b].id);else(y=(0,l.getNextVisibleRowId)(t,m.yEnd,1))?(e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,y,f[0].id)):(0,c.hasFooter)(t)&&(e&&e.preventDefault(),(0,c.transitionFromBodyToZone)(t,"footer",f[0].id,0))}}}else{var x=e.target,w=x.closest(".dhx_grid-".concat(u,"-cell, .dhx_span-cell"));if(w&&x!==w&&(0,c.isContentCell)(w))return e.preventDefault(),void(0,c.deactivateContentCell)(w);if("exit-end"===(0,c.moveZoneFocusTab)(t,e,u,"forward"))if("header"===u){e.preventDefault(),(0,c.restoreZoneTabindex)(t,u);var C=(0,c.getVisibleColumns)(t);(0,c.transitionToBody)(t,null===(i=C[0])||void 0===i?void 0:i.id,"first")}else{(0,c.restoreZoneTabindex)(t,u);var S=(null===(n=t.getRootNode)||void 0===n?void 0:n.call(t))||(null===(a=null===(o=t.getRootView())||void 0===o?void 0:o.data)||void 0===a?void 0:a.getRootNode()),E=null==S?void 0:S.querySelector(".dhx_grid-focus-sentinel--end");E&&(E.setAttribute("tabindex","-1"),setTimeout((function(){return E.setAttribute("tabindex","0")}),0))}}},delete:function(){var e,i;"range"===(null===(e=t.block)||void 0===e?void 0:e.config.mode)&&t.config.editable&&!t.config.$editable&&(0,o.clearCells)(t,null===(i=t.range)||void 0===i?void 0:i.getRangedCells())},"shift+tab":function(e){var i,o,a,s,d,u,h,f,p=(0,c.detectFocusZone)(e);if("header"!==p&&"footer"!==p)if("body"===p&&(0,c.isAtFirstRow)(t)&&(0,c.isAtFirstColumn)(t)){e.preventDefault();var g=(0,c.getVisibleColumns)(t),v=g[g.length-1].id,_=(0,c.getZoneRowCount)(t,"header")-1;(0,c.transitionFromBodyToZone)(t,"header",v,_)}else{t.config.$editable&&t.editEnd();var m=null===(s=t.selection)||void 0===s?void 0:s.getCell(),y=t.config.columns.filter((function(t){return!t.hidden}));if(m){var b=(0,n.locate)(null===(h=null===(u=null===(d=t.getRootView().node)||void 0===d?void 0:d.parent)||void 0===u?void 0:u.parent)||void 0===h?void 0:h.el,"data-dhx-root-widget-id");if(b)return void r.focusManager.setFocusId(b);var x=y.indexOf(m.column)+(0,l.getRangedIndex)(t,"left");if(x>=0&&x<y.length)e&&e.preventDefault(),t.scrollTo(m.row.id.toString(),y[x].id.toString()),t.selection.setCell(m.row.id,y[x].id);else(C=(0,l.getNextVisibleRowId)(t,m.row.id,-1))&&(e&&e.preventDefault(),t.scrollTo(C.toString(),y[y.length-1].id.toString()),t.selection.setCell(C,y[y.length-1].id))}else{var w=null===(f=t.range)||void 0===f?void 0:f.getRange();if(w){var C,S=y.findIndex((function(t){return t.id===w.xEnd}))-1;if(S>=0)e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,w.yEnd,y[S].id);else(C=(0,l.getNextVisibleRowId)(t,w.yEnd,-1))&&(e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,C,y[y.length-1].id))}}}else{var E=e.target,D=E.closest(".dhx_grid-".concat(p,"-cell, .dhx_span-cell"));if(D&&E!==D&&(0,c.isContentCell)(D))return e.preventDefault(),void(0,c.deactivateContentCell)(D);if("exit-start"===(0,c.moveZoneFocusTab)(t,e,p,"backward")){(0,c.restoreZoneTabindex)(t,p);var O=(null===(i=t.getRootNode)||void 0===i?void 0:i.call(t))||(null===(a=null===(o=t.getRootView())||void 0===o?void 0:o.data)||void 0===a?void 0:a.getRootNode()),k=null==O?void 0:O.querySelector(".dhx_grid-focus-sentinel");k&&(k.setAttribute("tabindex","-1"),setTimeout((function(){return k.setAttribute("tabindex","0")}),0))}}},arrowUp:function(e){var i,n=(0,c.detectFocusZone)(e);if("header"!==n&&"footer"!==n){if("body"===n){if((0,c.isAtFirstRow)(t))return e.preventDefault(),void((r=(0,c.getActiveColumnId)(t)||(null===(i=(0,c.getVisibleColumns)(t)[0])||void 0===i?void 0:i.id))&&(0,c.transitionFromBodyToZone)(t,"header",r));(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:(0,l.getRangedIndex)(t,"up")})}}else if(!(0,c.moveZoneFocusVertical)(t,e,n,"up")&&"footer"===n){var o=e.target,r=(0,c.getColIdFromTarget)(o);(0,c.restoreZoneTabindex)(t,"footer"),r&&(0,c.transitionToBody)(t,r,"last")}},"shift+enter":function(e){var i=(0,c.detectFocusZone)(e);"header"!==i&&"footer"!==i||(0,c.triggerHeaderSort)(t,e,!0)},"ctrl+z":function(){var e;(null===(e=t.history)||void 0===e?void 0:e.canUndo())&&t.history.undo()},"ctrl+shift+z":function(){var e;(null===(e=t.history)||void 0===e?void 0:e.canRedo())&&t.history.redo()},"ctrl+enter":function(){var e=(0,l.getActiveCell)(t,u);e&&(e.row.$opened?t.collapse(e.row.id):t.expand(e.row.id))},"ctrl+arrowUp":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:-1,toEnd:!0})},"shift+arrowUp":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:-1,shiftUp:!0})},"ctrl+shift+arrowUp":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:-1,toEnd:!0,shiftUp:!0})},arrowDown:function(e){var i,n=(0,c.detectFocusZone)(e);if("header"!==n&&"footer"!==n){if("body"===n){if((0,c.hasFooter)(t)&&(0,c.isAtLastRow)(t))return e.preventDefault(),void((r=(0,c.getActiveColumnId)(t)||(null===(i=(0,c.getVisibleColumns)(t)[0])||void 0===i?void 0:i.id))&&(0,c.transitionFromBodyToZone)(t,"footer",r,0));(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:(0,l.getRangedIndex)(t,"down")})}}else if(!(0,c.moveZoneFocusVertical)(t,e,n,"down")){var o=e.target,r=(0,c.getColIdFromTarget)(o);(0,c.restoreZoneTabindex)(t,n),r&&(0,c.transitionToBody)(t,r,"footer"===n?"last":"first")}},"ctrl+arrowDown":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:1,toEnd:!0})},"shift+arrowDown":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:1,shiftUp:!0})},"ctrl+shift+arrowDown":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:1,toEnd:!0,shiftUp:!0})},arrowRight:function(e){var i=(0,c.detectFocusZone)(e);if("header"!==i&&"footer"!==i){if("body"===i){if("tree"===t.config.type&&!t.config.$editable){var n=(0,l.getActiveCell)(t,u);if(n&&((0,l.isTreeColumn)(t,n.column.id)||"row"===t.config.selection)){var o=n.row,r=t.data.haveItems(o.id);if(r&&!o.$opened)return e.preventDefault(),void t.expand(o.id);if(r&&o.$opened){var a=t.data.getItems(o.id);if(null==a?void 0:a.length)return e.preventDefault(),void(0,l.navigateToCell)(t,u,a[0].id,n.column.id)}}}(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:(0,l.getRangedIndex)(t,"right")})}}else(0,c.moveZoneFocus)(t,e,i,"right")},"ctrl+arrowRight":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:1,toEnd:!0})},"shift+arrowRight":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:1,shiftUp:!0})},"ctrl+shift+arrowRight":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:1,toEnd:!0,shiftUp:!0})},arrowLeft:function(e){var i=(0,c.detectFocusZone)(e);if("header"!==i&&"footer"!==i){if("body"===i){if("tree"===t.config.type&&!t.config.$editable){var n=(0,l.getActiveCell)(t,u);if(n&&((0,l.isTreeColumn)(t,n.column.id)||"row"===t.config.selection)){var o=n.row;if(t.data.haveItems(o.id)&&o.$opened)return e.preventDefault(),void t.collapse(o.id);var r=t.data.getParent(o.id);if(r&&r!==t.data.getRoot())return e.preventDefault(),void(0,l.navigateToCell)(t,u,r,n.column.id)}}(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:(0,l.getRangedIndex)(t,"left")})}}else(0,c.moveZoneFocus)(t,e,i,"left")},"ctrl+arrowLeft":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:-1,toEnd:!0})},"shift+arrowLeft":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:-1,shiftUp:!0})},"ctrl+shift+arrowLeft":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:-1,toEnd:!0,shiftUp:!0})},pageDown:function(t){return f(t,1)},pageUp:function(t){return f(t,-1)},"shift+pageDown":function(t){return f(t,1,!0)},"shift+pageUp":function(t){return f(t,-1,!0)},home:function(t){return p(t,-1)},end:function(t){return p(t,1)},"shift+home":function(t){return p(t,-1,!0)},"shift+end":function(t){return p(t,1,!0)},"ctrl+home":function(t){return g(t,-1)},"ctrl+end":function(t){return g(t,1)},"ctrl+shift+home":function(t){return g(t,-1,!0)},"ctrl+shift+end":function(t){return g(t,1,!0)}}}}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.navigateToCell=e.isTreeColumn=e.getNextVisibleRowId=e.walkVisibleRows=e.getActiveCell=e.getRangedIndex=e.applyRangeMove=e.move=void 0;var o=i(2),r=i(14),a=i(5);function l(t,e,i,n,o){var r,a="vertical"===n,l=a?e.id:i.yEnd,s=a?i.xEnd:e.id;if(t.scrollTo(l,s),o){var c=a?{yEnd:e.id,xEnd:i.xEnd}:{yEnd:i.yEnd,xEnd:e.id};t.range.setRange(c,!0)}else{c=a?{yStart:e.id,yEnd:e.id,xStart:i.xStart,xEnd:i.xStart}:{yStart:i.yStart,yEnd:i.yStart,xStart:e.id,xEnd:e.id};t.range.setRange(c)}null===(r=t.block)||void 0===r||r.restoreFocus()}e.move=function(t){var e=t.grid,i=t.event;if(!(e.config.$editable||(0,o.locateNodeByClassName)(i,"dhx_grid-header-cell")||(0,o.locateNodeByClassName)(i,"dhx_grid-footer-cell"))){i&&i.preventDefault();var r=e.config.columns.filter((function(t){return!t.hidden}));!function(t){var e=t.grid,i=t.columns,n=t.dir,o=t.rangedIndex,r=t.toEnd,l=t.shiftUp,s=e.selection.getCell(),c=e.config.multiselection&&l;if(!s)return;if("vertical"===n)if(r){var d=e.data.getItem(e.data.getId(0));if(1===o){var u=e.data.getId(e.data.getLength()-1);"tree"===e.config.type&&(u=(0,a.getLastChild)(u,e.data)),d=e.data.getItem(u)}e.scrollTo(d.id.toString(),s.column.id.toString()),e.selection.setCell(d.id,s.column.id,!1,c)}else{d=null;if("tree"===e.config.type){var h=o<0?(0,a.getClosestTop)(s.row.id,e.data):(0,a.getClosestBottom)(s.row.id,e.data);h&&(d=e.data.getItem(h))}else{(f=e.data.getIndex(s.row.id.toString()))+o>=0&&f+o<e.data.getLength()&&(d=e.data.getItem(e.data.getId(f+o)))}d&&(e.scrollTo(d.id.toString(),s.column.id.toString()),e.selection.setCell(d.id,s.column.id,!1,c))}else if(r){d=1===o?i[i.length-1]:i[0];e.scrollTo(s.row.id.toString(),d.id.toString()),e.selection.setCell(s.row.id,d.id,!1,c)}else{var f;(f=i.findIndex((function(t){return t.id==s.column.id})))+o>=0&&f+o<i.length&&(e.scrollTo(s.row.id.toString(),i[f+o].id.toString()),e.selection.setCell(s.row.id,i[f+o].id,!1,c))}}(n(n({},t),{columns:r})),function(t){var e,i=t.grid,o=t.dir,r=i,s=null===(e=r.range)||void 0===e?void 0:e.getRange();if(!s)return;var c="vertical"===o?function(t){var e=t.grid,i=t.rangedCell,n=t.toEnd,o=t.shiftUp,r=t.rangedIndex,l=e,s=l.data,c=l.config;if(n){if(r>0){var d=s.getId(s.getLength()-1);return"tree"===c.type&&(d=(0,a.getLastChild)(d,s)),s.getItem(d)}return s.getItem(s.getId(0))}var u=r<0;if("tree"===c.type){var h=o?i.yEnd:u?i.yStart:i.yEnd,f=u?(0,a.getClosestTop)(h,s):(0,a.getClosestBottom)(h,s);return f?s.getItem(f):null}var p=s.getIndex(i.yStart),g=s.getIndex(i.yEnd),v=o?i.yEnd:s.getId(u?Math.min(p,g):Math.max(p,g)),_=s.getIndex(v)+r;if(_>=0&&_<s.getLength())return s.getItem(s.getId(_));return null}(n(n({},t),{rangedCell:s})):function(t){var e=t.columns,i=t.rangedCell,n=t.toEnd,o=t.shiftUp,r=t.rangedIndex;if(n)return r>0?e[e.length-1]:e[0];var a=e.findIndex((function(t){return t.id===i.xStart})),l=e.findIndex((function(t){return t.id===i.xEnd})),s=r<0,c=(o?l:s?Math.min(a,l):Math.max(a,l))+r;if(c>=0&&c<e.length)return e[c];return null}(n(n({},t),{rangedCell:s}));c&&l(r,c,s,o,t.shiftUp)}(n(n({},t),{columns:r}))}},e.applyRangeMove=l,e.getRangedIndex=function(t,e){var i,n,o=t.selection.getCell(),r=o&&t.getSpan(o.row.id,o.column.id);if(r){if("up"===e||"down"===e){var a=null===(i=t.config.data)||void 0===i?void 0:i.findIndex((function(t){return t.id===r.row})),l=null===(n=t.config.data)||void 0===n?void 0:n.findIndex((function(t){return t.id===o.row.id}));return"up"===e?a-l-1:a+(r.rowspan||1)-l}var s=t.config.columns.filter((function(t){return!t.hidden}));a=s.findIndex((function(t){return t.id===r.column})),l=s.findIndex((function(t){return t.id===o.column.id}));return"left"===e?a-l-1:a+(r.colspan||1)-l}return"down"===e||"right"===e?1:-1},e.getActiveCell=function(t,e){var i;if(e||"row"===t.config.selection)return(0,r.normalizeCell)(t.selection.getCell(),t);var n=null===(i=t.range)||void 0===i?void 0:i.getRange();if((null==n?void 0:n.yEnd)&&(null==n?void 0:n.xEnd)){var o=t.data.getItem(n.yEnd),a=t.config.columns.find((function(t){return t.id===n.xEnd}));if(o&&a)return{row:o,column:a}}return null},e.walkVisibleRows=function(t,e,i){for(var n="tree"===t.config.type,o=i<0,r=Math.abs(i),l=e,s=0;s<r;s++){var c=void 0;if(n)c=o?(0,a.getClosestTop)(l,t.data):(0,a.getClosestBottom)(l,t.data);else{var d=t.data.getIndex(l),u=o?d-1:d+1;if(u<0||u>=t.data.getLength())break;c=t.data.getId(u)}if(!c)break;l=c}return l},e.getNextVisibleRowId=function(t,e,i){if("tree"===t.config.type)return i>0?(0,a.getClosestBottom)(e,t.data):(0,a.getClosestTop)(e,t.data);var n=t.data.getIndex(e)+i;return n>=0&&n<t.data.getLength()?t.data.getId(n):null},e.isTreeColumn=function(t,e){var i;return(null===(i=t.config.columns.filter((function(t){return!t.hidden}))[0])||void 0===i?void 0:i.id)==e},e.navigateToCell=function(t,e,i,n){var o;if(t.scrollTo(i.toString(),n.toString()),e||"row"===t.config.selection)t.selection.setCell(i,n);else{var r=t;r.range&&(r.range.setRange({yStart:i,yEnd:i,xStart:n,xEnd:n}),null===(o=r.block)||void 0===o||o.restoreFocus())}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.startCellEdit=e.toggleBooleanCell=e.isColumnEditable=void 0;var n=i(3);e.isColumnEditable=function(t,e){return!!(!1!==t.editable&&e.editable||t.editable)},e.toggleBooleanCell=function(t,e,i){t.events.fire(n.GridEvents.beforeEditStart,[e,i,"checkbox"])&&(t.events.fire(n.GridEvents.afterEditStart,[e,i,"checkbox"]),t.events.fire(n.GridEvents.beforeEditEnd,[!e[i.id],e,i])&&t.events.fire(n.GridEvents.afterEditEnd,[!e[i.id],e,i]))},e.startCellEdit=function(t,e){t.editCell(e.row.id,e.column.id,e.column.editorType)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initEndSentinel=e.initFocusSentinel=e.restoreZoneTabindex=e.getColIdFromTarget=e.getActiveColumnId=e.hasFooter=e.isAtLastRow=e.isAtFirstRow=e.transitionFromBodyToZone=e.transitionToBody=e.setZoneCellFocus=e.triggerHeaderSort=e.deactivateContentCell=e.activateContentCell=e.isContentCell=e.isAtFirstColumn=e.moveZoneFocusTab=e.moveZoneFocusVertical=e.moveZoneFocus=e.resolveSpanTarget=e.ensureZoneCellVisible=e.findZoneCell=e.getZoneRowCount=e.getColumnSplitSection=e.getVisibleColumns=e.detectFocusZone=void 0;var n=i(2),o=i(5),r=new WeakMap;function a(t){return t.config.columns.filter((function(t){return!t.hidden}))}function l(t,e){var i=a(t),n=i.find((function(t){return t.id===e}));if(!n)return"center";var o=n.$index,r=t.config.leftSplit||0,l=t.config.rightSplit||0;return r>0&&o<r?"left":l>0&&o>=i.length-l?"right":"center"}function s(t,e){var i,n;return"header"===e?(null===(i=t.config.$headerHeightMap)||void 0===i?void 0:i.length)||0:"footer"===e&&(null===(n=t.config.$footerHeightMap)||void 0===n?void 0:n.length)||0}function c(t,e,i,n){var o,r,a,s=(null===(o=t.getRootNode)||void 0===o?void 0:o.call(t))||(null===(a=null===(r=t.getRootView())||void 0===r?void 0:r.data)||void 0===a?void 0:a.getRootNode());if(!s)return null;for(var c=function(t,e,i){var n=[];if("left"===i){(o=t.querySelector(".dhx_".concat(e,"-fixed-cols.dhx_grid__cols_left--fixed")))&&n.push(o)}else if("right"===i){var o;(o=t.querySelector(".dhx_".concat(e,"-fixed-cols.dhx_grid__cols_right--fixed")))&&n.push(o)}else{var r=t.querySelector(".dhx_".concat(e,"-wrapper"));r&&n.push(r)}if(0===n.length){t.querySelectorAll(".dhx_".concat(e,"-wrapper, .dhx_").concat(e,"-fixed-cols")).forEach((function(t){return n.push(t)}))}return n}(s,e,l(t,i)),d=0,u=c;d<u.length;d++){var h=u[d],f=h.querySelector('.dhx_span-cell[data-dhx-id="'.concat(i,'"][data-dhx-row-index="').concat(n,'"]'));if(f)return f;var p=h.querySelector(".dhx_grid-".concat(e,'-cell[data-dhx-id="').concat(i,'"][data-dhx-row-index="').concat(n,'"]'));if(p)return p}var g=s.querySelector('.dhx_span-cell[data-dhx-id="'.concat(i,'"][data-dhx-row-index="').concat(n,'"]'));return g||(s.querySelector(".dhx_grid-".concat(e,'-cell[data-dhx-id="').concat(i,'"][data-dhx-row-index="').concat(n,'"]'))||null)}function d(t,e){var i,n,r;if("center"===l(t,e)){var s=a(t),c=t.config.leftSplit||0,d=s.findIndex((function(t){return t.id===e}));if(!(d<0)){var u=t.getScrollState(),h=(0,o.getTotalWidth)(s.slice(c,d)),f=h+(s[d].$width||0),p=null===(r=null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.refs)||void 0===n?void 0:n.grid_body)||void 0===r?void 0:r.el,g=p?p.clientWidth:t.config.$width,v=c>0?(0,o.getTotalWidth)(s.slice(0,c)):0,_=t.config.rightSplit||0,m=g-v-(_>0?(0,o.getTotalWidth)(s.slice(-_)):0),y=u.x;h<y?t.scroll(h,null):f>y+m&&t.scroll(f-m,null)}}}function u(t,e,i,n){var o,r="footer"===t?"footer":"header",a=n.findIndex((function(t){return t.id===e}));if(a<0)return{colId:e,rowIndex:i};for(var l=0;l<=i;l++)for(var s=0;s<=a;s++){var c=null===(o=n[s][r])||void 0===o?void 0:o[l];if(c){var d=s+(c.colspan||1),u=l+(c.rowspan||1);if(d>a&&u>i&&(l<i||s<a))return{colId:n[s].id,rowIndex:l}}}return{colId:e,rowIndex:i}}e.detectFocusZone=function(t){var e=t.target;if((0,n.locateNodeByClassName)(e,"dhx_grid-header-cell"))return"header";if((0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))return"footer";if((0,n.locateNodeByClassName)(e,"dhx_span-cell"))for(var i=e;i;){if(i.classList){if(i.classList.contains("dhx_header-spans"))return"header";if(i.classList.contains("dhx_footer-spans"))return"footer";if(i.classList.contains("dhx_span-spans"))return"body"}i=i.parentNode}return(0,n.locateNodeByClassName)(e,"dhx_grid-group_item")?"groupPanel":"body"},e.getVisibleColumns=a,e.getColumnSplitSection=l,e.getZoneRowCount=s,e.findZoneCell=c,e.ensureZoneCellVisible=d,e.resolveSpanTarget=u,e.moveZoneFocus=function(t,e,i,n){var o,l;e.preventDefault();var s=e.target,c=s.getAttribute("data-dhx-id"),d=parseInt(s.getAttribute("data-dhx-row-index")||"0",10);if(c){var h=r.get(t),f=null!==(o=null==h?void 0:h.navRowIndex)&&void 0!==o?o:d,g=a(t),v=g.findIndex((function(t){return t.id===c}));if(!(v<0)){var _="footer"===i?"footer":"header",m="right"===n?1:-1,y=v;if("right"===n){var b=null===(l=g[v][_])||void 0===l?void 0:l[d];(null==b?void 0:b.colspan)>1&&(y=v+b.colspan-1)}var x=y+m;if(!(x<0||x>=g.length)){var w=u(i,g[x].id,f,g);p(t,i,w.colId,w.rowIndex,s,f)}}}},e.moveZoneFocusVertical=function(t,e,i,n){var o;e.preventDefault();var r=e.target,l=r.getAttribute("data-dhx-id"),c=parseInt(r.getAttribute("data-dhx-row-index")||"0",10);if(!l)return!1;var d=a(t),h="footer"===i?"footer":"header",f="down"===n?1:-1,g=c;if("down"===n){var v=d.findIndex((function(t){return t.id===l}));if(v>=0){var _=null===(o=d[v][h])||void 0===o?void 0:o[c];(null==_?void 0:_.rowspan)>1&&(g=c+_.rowspan-1)}}var m=g+f,y=s(t,i);if(m<0||m>=y)return!1;var b=u(i,l,m,d);return p(t,i,b.colId,b.rowIndex,r,m),!0},e.moveZoneFocusTab=function(t,e,i,n){var o,l,c=e.target,d=c.getAttribute("data-dhx-id")?c:c.closest("[data-dhx-id]");if(!d)return"forward"===n?"exit-end":"exit-start";var h=d.getAttribute("data-dhx-id"),f=parseInt(d.getAttribute("data-dhx-row-index")||"0",10),g=a(t),v=g.findIndex((function(t){return t.id===h}));if(v<0)return"forward"===n?"exit-end":"exit-start";var _="footer"===i?"footer":"header",m=s(t,i),y="forward"===n?1:-1,b=r.get(t),x=null!==(o=null==b?void 0:b.navRowIndex)&&void 0!==o?o:f,w=v;if("forward"===n){var C=null===(l=g[v][_])||void 0===l?void 0:l[f];(null==C?void 0:C.colspan)>1&&(w=v+C.colspan-1)}for(var S=w+y,E=x,D=g.length*m,O=0;O<D;O++){if("forward"===n&&S>=g.length){if(++E>=m)return"exit-end";S=0}else if("backward"===n&&S<0){if(--E<0)return"exit-start";S=g.length-1}var k=u(i,g[S].id,E,g);if(k.colId!==h||k.rowIndex!==f){if(p(t,i,k.colId,k.rowIndex,c,E))return e.preventDefault(),"moved";S+=y}else S+=y}return"forward"===n?"exit-end":"exit-start"},e.isAtFirstColumn=function(t){var e,i,n=a(t);if(0===n.length)return!0;var o=n[0].id;if(t.config.blockSelection){var r=null===(e=t.range)||void 0===e?void 0:e.getRange();if(r)return r.xStart==o}else{var l=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(l)return l.column.id==o}return!0},e.isContentCell=function(t){return t.classList.contains("dhx_grid-custom-content-cell")};var h=new WeakMap;function f(t){var e=t.querySelector("input, select");if(e){e.setAttribute("tabindex","-1");var i=h.get(e);i&&(e.removeEventListener("keydown",i),h.delete(e))}t.setAttribute("tabindex","0"),t.focus()}function p(t,e,i,n,o,a){o&&o.setAttribute("tabindex","-1"),d(t,i);var l=c(t,e,i,n);if(!l)return!1;l.setAttribute("tabindex","0"),l.focus();var s=r.get(t);return s&&(s.colId=i,s.rowIndex=n,s.navRowIndex=null!=a?a:n),!0}e.activateContentCell=function(t){var e=t.querySelector("input, select");if(e){e.setAttribute("tabindex","0"),e.focus();var i=h.get(e);i&&e.removeEventListener("keydown",i);var n=function(i){"Escape"===i.key&&(i.preventDefault(),e.removeEventListener("keydown",n),h.delete(e),f(t))};e.addEventListener("keydown",n),h.set(e,n)}},e.deactivateContentCell=f,e.triggerHeaderSort=function(t,e,i){var n,r,a=e.target,l=a.getAttribute("data-dhx-id"),s=parseInt(a.getAttribute("data-dhx-row-index")||"0",10);if(l){var c=t.getColumn(l);if(c&&(0,o.isSortable)(t.config,c)){var d=a.getAttribute("data-dhx-text-id"),u=null===(n=c.header)||void 0===n?void 0:n.find((function(t){return t.id===d}));if(!((null==u?void 0:u.content)||(null==u?void 0:u.colspan)>1)){e.preventDefault();var h=t.config.multiSort&&(!i||i&&!(null===(r=t._sortingStates)||void 0===r?void 0:r.length));t._sort(l,null==u?void 0:u.sortAs,h),p(t,"header",l,s)}}}},e.setZoneCellFocus=p,e.transitionToBody=function(t,e,i){var n;0!==t.data.getLength()&&("first"===i?n=t.data.getId(0):(n=t.data.getId(t.data.getLength()-1),"tree"===t.config.type&&(n=(0,o.getLastChild)(n,t.data)||n)),t.config.blockSelection&&t.range?(t.range.setRange({xStart:e,yStart:n,xEnd:e,yEnd:n}),t.scrollTo(n,e),t.block.restoreFocus()):t.selection&&(t.selection.setCell(n,e),t.scrollTo(n,e),t.selection.restoreFocus()),function(t){var e,i,n,o=(null===(e=t.getRootNode)||void 0===e?void 0:e.call(t))||(null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.data)||void 0===n?void 0:n.getRootNode());if(!o)return!1;var r=document.activeElement;return r&&o.contains(r)&&!!r.getAttribute("data-dhx-col-id")}(t)||function(t,e,i){var n,o,r,a=(null===(n=t.getRootNode)||void 0===n?void 0:n.call(t))||(null===(r=null===(o=t.getRootView())||void 0===o?void 0:o.data)||void 0===r?void 0:r.getRootNode());if(a){var l=a.querySelector('[data-dhx-id="'.concat(e,'"] [data-dhx-col-id="').concat(i,'"]'));l&&(l.tabIndex=0,l.focus({preventScroll:!0}))}}(t,n,e))},e.transitionFromBodyToZone=function(t,e,i,n){var o=a(t);if(0!==o.length){void 0===n&&(n=s(t,e)-1);var r=u(e,i,n,o);p(t,e,r.colId,r.rowIndex,void 0,n)}},e.isAtFirstRow=function(t){var e,i;if(t.config.blockSelection){var n=null===(e=t.range)||void 0===e?void 0:e.getRange();if(n)return n.yStart==t.data.getId(0)}else{var o=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(o)return o.row.id==t.data.getId(0)}return!0},e.isAtLastRow=function(t){var e,i;if(0===t.data.getLength())return!0;var n=t.data.getId(t.data.getLength()-1);if("tree"===t.config.type&&(n=(0,o.getLastChild)(n,t.data)||n),t.config.blockSelection){var r=null===(e=t.range)||void 0===e?void 0:e.getRange();if(r)return r.yEnd==n}else{var a=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(a)return a.row.id==n}return!0},e.hasFooter=function(t){return s(t,"footer")>0},e.getActiveColumnId=function(t){var e,i;if(t.config.blockSelection){var n=null===(e=t.range)||void 0===e?void 0:e.getRange();if(n)return n.xStart}else{var o=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(o)return o.column.id}return null},e.getColIdFromTarget=function(t){return(null==t?void 0:t.getAttribute("data-dhx-id"))||null},e.restoreZoneTabindex=function(t,e){var i,n,o,r=(null===(i=t.getRootNode)||void 0===i?void 0:i.call(t))||(null===(o=null===(n=t.getRootView())||void 0===n?void 0:n.data)||void 0===o?void 0:o.getRootNode());if(r){var a=".dhx_grid-".concat(e,"-cell[tabindex], .dhx_").concat(e,"-spans .dhx_span-cell[tabindex]");r.querySelectorAll(a).forEach((function(t){t.setAttribute("tabindex","-1")}));r.querySelectorAll(".dhx_grid-custom-content-cell input, .dhx_grid-custom-content-cell select").forEach((function(t){t.setAttribute("tabindex","-1")}))}},e.initFocusSentinel=function(t){var e,i,n,o=r.get(t);if(!(null==o?void 0:o.initialized)){var l=(null===(e=t.getRootNode)||void 0===e?void 0:e.call(t))||(null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.data)||void 0===n?void 0:n.getRootNode());if(l){var c=l.querySelector(".dhx_grid-focus-sentinel");c&&(o||(o={colId:null,rowIndex:null,navRowIndex:null,initialized:!1},r.set(t,o)),c.addEventListener("focus",(function(){var e=a(t);if(0!==e.length){var i=s(t,"header");if(0!==i){var n=o.colId,r=o.rowIndex;null!==n&&null!==r||(n=e[0].id,r=0),e.some((function(t){return t.id===n}))||(n=e[0].id,r=0),r>=i&&(r=0),p(t,"header",n,r)}}})),o.initialized=!0)}}},e.initEndSentinel=function(t){var e,i,n,o=(null===(e=t.getRootNode)||void 0===e?void 0:e.call(t))||(null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.data)||void 0===n?void 0:n.getRootNode());if(o){var r=o.querySelector(".dhx_grid-focus-sentinel--end");r&&!r.getAttribute("data-dhx-initialized")&&(r.addEventListener("focus",(function(){var e=a(t);if(0!==e.length){var i=s(t,"footer");if(i>0){var n=e[e.length-1].id;p(t,"footer",n,i-1)}else{s(t,"header")>0&&p(t,"header",e[0].id,0)}}})),r.setAttribute("data-dhx-initialized","true"))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropManager=void 0;var n=i(1),o=i(3),r=i(8),a=i(7),l=i(5),s=i(0),c=i(4),d=i(5),u=i(2),h=function(){function t(t){var e=t.view;this._isTreeMode=!1,this._grid=null,this._dragState=null,this._dragType=null,this._grid=e,this._isTreeMode="tree"===this._grid.config.type,this._init()}return t.prototype.toHTML=function(t){var e,i,o=(null===(e=this._grid.config.$grouped)||void 0===e?void 0:e.length)&&this._grid.config.$grouped.some((function(t){return t.notGrouped})),r=(0,s.isDefined)(null===(i=this._dragState)||void 0===i?void 0:i.target)&&!this._grid.config.$resizing&&!o;return(0,n.el)(".dhx_grid-drop",{"aria-hidden":"true"},[r&&this._getDropLineNode(t)])},t.prototype._getDropLineNode=function(t){return!this._dragType||(null==t?void 0:t.header)&&"horizontal"===this._dragType?null:"horizontal"===this._dragType?this._getHorizontalDropLine():this._getVerticalDropLine(t)},t.prototype._getVerticalDropLine=function(t){var e=this,i=void 0===t?{}:t,r=i.header,d=void 0!==r&&r,u=i.mode,h=void 0===u?null:u,f=this._grid.config.columns.filter((function(t){return!t.hidden})),p=f.findIndex((function(t){return t.id==e._dragState.target})),g=f[p];if(!(0,s.isDefined)(g))return null;var v,_,m=this._grid.config,y=m.leftSplit,b=m.rightSplit,x=f.findIndex((function(t){return t.id==e._dragState.start})),w=this._grid.getScrollState(),C=d?this._grid.config.$headerHeight:this._grid.config.$height,S=a.BORDERS,E=d?0:w.y;if(y&&(v=this._isColumnFixed(g,o.Split.left)),b&&(_=this._isColumnFixed(g,o.Split.right)),v&&h===o.Split.right||_&&h===o.Split.left||h&&!_&&!v)return null;var D=0;if(x===p||-1==p)return null;if(D=(0,l.getTotalWidth)(f.slice(0,p+1)),x>p&&(D-=g.$width),f.length-(!_&&b||0)===p+1&&(D-=a.BORDERS),v&&!h&&(D+=w.x),_)if(h){var O=(0,a.getCurrFixedCols)(this._grid.config,o.Split.right),k=O.findIndex((function(t){return t.id==e._dragState.target})),T=O.findIndex((function(t){return t.id==e._dragState.start}));D=(0,l.getTotalWidth)(O.slice(0,k+1)),T>k&&(D-=g.$width),O.length===k+1&&(D-=a.BORDERS)}else D-=(0,c.getReverseScrollState)(this._grid).x;return(0,n.el)(".dhx_grid-drop-line",{style:{height:C,width:S,top:E,left:D}})},t.prototype._getHorizontalDropLine=function(){var t=this._grid.data.getItem(this._dragState.target);if(!(0,s.isDefined)(t)||this._dragState.source.find((function(e){return e==t.id})))return null;var e,i,o=this._grid.config,r=o.topSplit,l=o.bottomSplit,d=this._grid.config.$width,u="in"===this._dragState.dropPosition?t.$height:a.BORDERS,h=this._grid.getScrollState(),f=a.BORDERS/2;r&&(e=this._grid.data.getRawData(0,r).map((function(t){return t.id})).includes(t.id));if(l){var p=this._grid.data.getLength();i=this._grid.data.getRawData(p-l,p).map((function(t){return t.id})).includes(t.id)}var g=this._getTopPosition(t);"bottom"===this._dragState.dropPosition&&(g=this._getBottomPosition(t),t.$index===this._grid.data._order.length-1&&(g-=f)),"in"!==this._dragState.dropPosition&&(g-=f,"top"===this._dragState.dropPosition&&0===t.$index&&(g+=f)),e&&(g+=h.y),i&&(g-=(0,c.getReverseScrollState)(this._grid).y);var v=t.$level&&"in"!==this._dragState.dropPosition?(0,c.getTreeCellWidthOffset)(t,t.$items):0;return(0,n.el)(".dhx_grid-drop-line",{style:{marginLeft:v,height:u,width:d,left:h.x,top:g}})},t.prototype._init=function(){var t=this;this._grid.events.on(r.DragEvents.dragStart,(function(e,i,n){"group"!==n&&"row"===n&&t._toggleRowDraggable(e.source,!0)})),this._grid.events.on(r.DragEvents.dragIn,(function(e,i,n){"group"===n||t._isSameComponent(i)||(t._dragState=e,t._dragType="row"===n?"horizontal":"vertical")})),this._grid.events.on(r.DragEvents.cancelDrop,(function(e,i,n){"group"!==n&&(t._dragState=t._dragType=null)})),this._grid.events.on(r.DragEvents.afterDrag,(function(e,i,n){t._dragState=t._dragType=null,"group"!==n&&"row"===n&&t._toggleRowDraggable(e.source,!1)}))},t.prototype._getNextRow=function(t){var e=this._grid.data.getIndex(t.id)+1,i=this._grid.data.getItem(this._grid.data.getId(e));return i||(i=this._grid.data.getItem((0,d.getLastChild)(t.id,this._grid.data,!0))),i},t.prototype._isColumnFixed=function(t,e){var i=(0,a.getCurrFixedCols)(this._grid.config,e),n=null==i?void 0:i.map((function(t){return t.id}));return null==n?void 0:n.includes(t.id)},t.prototype._getTopPosition=function(t){return this._grid.getCellRect(t.id).y},t.prototype._getBottomPosition=function(t){if(this._isTreeMode&&t.$items){var e=this._getNextRow(t);if(!(0,s.isDefined)(e))return 0;var i=this._getTopPosition(e);return e.$level&&(i+=e.$height-a.BORDERS/2),i}return this._getTopPosition(t)+t.$height},t.prototype._toggleRowDraggable=function(t,e){var i=this;t.forEach((function(t){i._grid.data.update(t,{$draggable:e},!0),i._isTreeMode&&i._grid.data.haveItems(t)&&i._grid.data.eachChild(t,(function(t){i._grid.data.update(t.id,{$draggable:e},!0)}))}))},t.prototype._isSameComponent=function(t){return(0,u.locate)(t.target,"data-dhx-widget-id")!=this._grid._uid},t}();e.DropManager=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getVisibleRowNode=e.getRowNode=void 0,e.getRowNode=function(t,e,i){var n=i?".dhx_grid__cols_".concat(i,"--fixed"):":not(.dhx_grid-fixed-cols-wrap)";return e.querySelector("".concat(n,' .dhx_grid-row[data-dhx-id="').concat(t,'"]'))},e.getVisibleRowNode=function(t,e,i){var n=document.createElement("div");return n.style.width=e+"px",n.style.overflow="hidden",t.style.width=e-i+"px",t.style.marginLeft=i+"px",n.appendChild(t),n}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setLocale=void 0,e.setLocale=function(t,e){var i=this[t];if(i)for(var n in e)i[n]=e[n]}}])})),window.dhx_legacy){if(window.dhx)for(var key in dhx)if("i18n"===key)for(var lang in dhx[key])window.dhx_legacy[key][lang]=dhx[key][lang];else dhx_legacy[key]=dhx[key];window.dhx=dhx_legacy,delete window.dhx_legacy}
21
+ t.exports=function(){"use strict";var t=1,e=2,i=3,n=4,o=5,r="undefined"!=typeof window,a=(r?window:{}).requestAnimationFrame,l={};function s(){}var c=Array.isArray;function d(t){return null!=t}function u(t){return null!=t&&t.constructor===Object}function h(t,e,i,n){t.splice.apply(t,[i,n].concat(e))}function f(t){var e=typeof t;return"string"===e||"number"===e}function p(t){return"function"==typeof t}function g(t){return"object"==typeof t&&p(t.then)}function v(t){for(var e=arguments,i=1;i<e.length;i++)for(var n in e[i])t[n]=e[i][n];return t}function _(t,e,i){for(var n;n=e.shift();)0===e.length?t[n]=i:t[n]=t=t[n]||{}}function m(t,e){for(var i=[],n=e;n<t.length;n++)i.push(t[n]);return i}function y(t,e){for(var i in t)if(t[i]!==e[i])return!1;return!0}function b(t,e){var i=t.length;if(e.length!==i)return!1;for(var n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function x(t){if(!a)return t;var e,i,n;function o(){e=0,t.apply(i,n)}return function(){i=this,n=arguments,e||(e=a(o))}}function w(t,e,i){return function(){return t.apply(i,e)}}function C(t){var e,i,n=t.slice(),o=[];o.push(0);for(var r=0,a=t.length;r<a;++r){var l=o[o.length-1];if(t[l]<t[r])n[r]=l,o.push(r);else{for(e=0,i=o.length-1;e<i;){var s=(e+i)/2|0;t[o[s]]<t[r]?e=s+1:i=s}t[r]<t[o[e]]&&(e>0&&(n[r]=o[e-1]),o[e]=r)}}for(i=o[(e=o.length)-1];e-- >0;)o[e]=i,i=n[i];return o}function S(t,e){var i,n=0,o=e.length-1;if(o<=2147483647)for(;n<=o;){if(e[i=n+o>>1]===t)return i;e[i]<t?n=i+1:o=i-1}else for(;n<=o;){if(e[i=Math.floor((n+o)/2)]===t)return i;e[i]<t?n=i+1:o=i-1}return n==e.length?null:n}function E(t){return"o"===t[0]&&"n"===t[1]}function D(t){return"_"===t[0]}function O(t){return"style"===t}function k(t){t&&t.el&&t.el.offsetHeight}function R(t){return null!=t.node&&null!=t.node.el}function T(t,e){switch(e){case"value":case"checked":case"selected":return!0}return!1}function M(t){for(t=t||l;null==t.vm&&t.parent;)t=t.parent;return t.vm}function I(){}var H=I.prototype={constructor:I,type:null,vm:null,key:null,ref:null,data:null,hooks:null,ns:null,el:null,tag:null,attrs:null,body:null,flags:0,_class:null,_diff:null,_dead:!1,_lis:!1,idx:null,parent:null};function P(t){var i=new I;return i.type=e,i.body=t,i}var F={},A=/\[(\w+)(?:=(\w+))?\]/g;function $(t){var e,i,n,o,r=F[t];if(null==r)for(F[t]=r={tag:(e=t.match(/^[-\w]+/))?e[0]:"div",id:(i=t.match(/#([-\w]+)/))?i[1]:null,class:(n=t.match(/\.([-\w.]+)/))?n[1].replace(/\./g," "):null,attrs:null};o=A.exec(t);)null==r.attrs&&(r.attrs={}),r.attrs[o[1]]=o[2]||"";return r}var j=1,L=2,N=4,V=8;function W(e,i,n,o){var r=new I;r.type=t,d(o)&&(r.flags=o),r.attrs=i;var a=$(e);if(r.tag=a.tag,a.id||a.class||a.attrs){var l=r.attrs||{};if(a.id&&!d(l.id)&&(l.id=a.id),a.class&&(r._class=a.class,l.class=a.class+(d(l.class)?" "+l.class:"")),a.attrs)for(var s in a.attrs)d(l[s])||(l[s]=a.attrs[s]);r.attrs=l}var c=r.attrs;return d(c)&&(d(c._key)&&(r.key=c._key),d(c._ref)&&(r.ref=c._ref),d(c._hooks)&&(r.hooks=c._hooks),d(c._data)&&(r.data=c._data),d(c._flags)&&(r.flags=c._flags),d(r.key)||(d(r.ref)?r.key=r.ref:d(c.id)?r.key=c.id:d(c.name)&&(r.key=c.name+("radio"===c.type||"checkbox"===c.type?c.value:"")))),null!=n&&(r.body=n),r}function z(t,e,i){_(t,["refs"].concat(e.split(".")),i)}function B(t){for(;t=t.parent;)t.flags|=j}function G(t,e,i,r){if(t.type!==o&&t.type!==n){t.parent=e,t.idx=i,t.vm=r,null!=t.ref&&z(M(t),t.ref,t);var a=t.hooks,l=r&&r.hooks;(a&&(a.willRemove||a.didRemove)||l&&(l.willUnmount||l.didUnmount))&&B(t),c(t.body)&&Y(t)}}function Y(t){for(var i=t.body,n=0;n<i.length;n++){var o=i[n];!1===o||null==o?i.splice(n--,1):c(o)?h(i,o,n--,1):(null==o.type&&(i[n]=o=P(""+o)),o.type===e?null==o.body||""===o.body?i.splice(n--,1):n>0&&i[n-1].type===e?(i[n-1].body+=o.body,i.splice(n--,1)):G(o,t,n,null):G(o,t,n,null))}}var U={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,order:!0,lineClamp:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function X(t,e){return isNaN(e)||U[t]?e:e+"px"}function q(t,e){var i=(t.attrs||l).style,n=e?(e.attrs||l).style:null;if(null==i||f(i))t.el.style.cssText=i;else{for(var o in i){var r=i[o];(null==n||null!=r&&r!==n[o])&&(t.el.style[o]=X(o,r))}if(n)for(var a in n)null==i[a]&&(t.el.style[a]="")}}var K=[];function Z(t,e,i,n,o){if(null!=t){var r=i.hooks[e];if(r){if("d"!==e[0]||"i"!==e[1]||"d"!==e[2])return r(i,n);o?k(i.parent)&&r(i,n):K.push([r,i,n])}}}function J(t){var e;if(K.length)for(k(t.node);e=K.shift();)e[0](e[1],e[2])}var Q=r?document:null;function tt(t){for(;null==t._node;)t=t.parentNode;return t._node}function et(t,e){return null!=e?Q.createElementNS(e,t):Q.createElement(t)}function it(t){return Q.createTextNode(t)}function nt(t){return Q.createComment(t)}function ot(t){return t.nextSibling}function rt(t){return t.previousSibling}function at(t){var e=t.vm,i=null!=e&&Z(e.hooks,"willUnmount",e,e.data),n=Z(t.hooks,"willRemove",t);if((t.flags&j)===j&&c(t.body))for(var o=0;o<t.body.length;o++)at(t.body[o]);return i||n}function lt(t,e,i){var n=e._node,o=n.vm;if(c(n.body))if((n.flags&j)===j)for(var r=0;r<n.body.length;r++)lt(e,n.body[r].el);else ct(n);delete e._node,t.removeChild(e),Z(n.hooks,"didRemove",n,null,i),null!=o&&(Z(o.hooks,"didUnmount",o,o.data,i),o.node=null)}function st(t,e){var i=e._node;if(!i._dead){var n=at(i);null!=n&&g(n)?(i._dead=!0,n.then(w(lt,[t,e,!0]))):lt(t,e)}}function ct(t){for(var e=t.body,i=0;i<e.length;i++){var n=e[i];delete n.el._node,null!=n.vm&&(n.vm.node=null),c(n.body)&&ct(n)}}function dt(t){var e=t.el;if(0==(t.flags&j))c(t.body)&&ct(t),e.textContent=null;else{var i=e.firstChild;do{var n=ot(i);st(e,i)}while(i=n)}}function ut(t,e,i){var n=e._node,o=null!=e.parentNode,r=e!==i&&o?null:n.vm;null!=r&&Z(r.hooks,"willMount",r,r.data),Z(n.hooks,o?"willReinsert":"willInsert",n),t.insertBefore(e,i),Z(n.hooks,o?"didReinsert":"didInsert",n),null!=r&&Z(r.hooks,"didMount",r,r.data)}function ht(t,e,i){ut(t,e,i?ot(i):null)}var ft={};function pt(t){v(ft,t)}function gt(t){var e=this,i=e,n=m(arguments,1).concat(i,i.data);do{var o=e.onemit,r=o?o[t]:null;if(r){r.apply(e,n);break}}while(e=e.parent());ft[t]&&ft[t].apply(e,n)}var vt=s;function _t(t){vt=t.onevent||vt,t.onemit&&pt(t.onemit)}function mt(t,e,i){t[e]=i}function yt(t,e,i,n,o){var r=t.apply(o,e.concat([i,n,o,o.data]));o.onevent(i,n,o,o.data,e),vt.call(null,i,n,o,o.data,e),!1===r&&(i.preventDefault(),i.stopPropagation())}function bt(t){var e,i,n=tt(t.target),o=M(n),r=t.currentTarget._node.attrs["on"+t.type];if(c(r))yt(e=r[0],i=r.slice(1),t,n,o);else for(var a in r)if(t.target.matches(a)){var l=r[a];c(l)?(e=l[0],i=l.slice(1)):(e=l,i=[]),yt(e,i,t,n,o)}}function xt(t,e,i,n){if(i!==n){var o=t.el;null==i||p(i)?mt(o,e,i):null==n&&mt(o,e,bt)}}function wt(t,e,i){"."===e[0]&&(e=e.substr(1),i=!0),i?t.el[e]="":t.el.removeAttribute(e)}function Ct(t,e,i,n,o){var r=t.el;null==i?!o&&wt(t,e,!1):null!=t.ns?r.setAttribute(e,i):"class"===e?r.className=i:"id"===e||"boolean"==typeof i||n?r[e]=i:"."===e[0]?r[e.substr(1)]=i:r.setAttribute(e,i)}function St(t,e,i){var n=t.attrs||l,o=e.attrs||l;if(n===o);else{for(var r in n){var a=n[r],s=T(t.tag,r),c=s?t.el[r]:o[r];a===c||(O(r)?q(t,e):D(r)||(E(r)?xt(t,r,a,c):Ct(t,r,a,s,i)))}for(var r in o)!(r in n)&&!D(r)&&wt(t,r,T(t.tag,r)||E(r))}}function Et(t,e,i,o){return t.type===n&&(e=t.data,i=t.key,o=t.opts,t=t.view),new Gt(t,e,i,o)}function Dt(t){for(var e=0;e<t.body.length;e++){var r=t.body[e],a=r.type;if(a<=i)ut(t.el,Ot(r));else if(a===n)a=(l=Et(r.view,r.data,r.key,r.opts)._redraw(t,e,!1)).node.type,ut(t.el,Ot(l.node));else if(a===o){var l;(l=r.vm)._redraw(t,e),a=l.node.type,ut(t.el,l.node.el)}}}function Ot(n,o){return null==n.el&&(n.type===t?(n.el=o||et(n.tag,n.ns),null!=n.attrs&&St(n,l,!0),(n.flags&V)===V&&n.body.body(n),c(n.body)?Dt(n):null!=n.body&&""!==n.body&&(n.el.textContent=n.body)):n.type===e?n.el=o||it(n.body):n.type===i&&(n.el=o||nt(n.body))),n.el._node=n,n.el}function kt(t,e){return e[t.idx+1]}function Rt(t,e){return e[t.idx-1]}function Tt(t){return t.parent}window.lisMove=Pt;var Mt=1,It=2;function Ht(t,e,i,n,o,r,a,l){return function(s,c,d,u,h,f){var p,g;if(null!=u[n]){if(null==(p=u[n]._node))return void(u[n]=t(u[n]));if(Tt(p)!==s)return g=t(u[n]),null!=p.vm?p.vm.unmount(!0):st(c,u[n]),void(u[n]=g)}if(u[o]==h)return It;if(null==u[o].el)i(c,Ot(u[o]),u[n]),u[o]=e(u[o],d);else if(u[o].el===u[n])u[o]=e(u[o],d),u[n]=t(u[n]);else{if(f||p!==u[a])return f&&null!=u[n]?Pt(t,e,i,n,o,c,d,p,u):Mt;g=u[n],u[n]=t(g),l(c,g,u[r]),u[r]=g}}}function Pt(t,e,i,n,o,r,a,l,s){if(l._lis)i(r,s[o].el,s[n]),s[o]=e(s[o],a);else{var c=S(l.idx,s.tombs);l._lis=!0;var d=t(s[n]);i(r,s[n],null!=c?a[s.tombs[c]].el:c),null==c?s.tombs.push(l.idx):s.tombs.splice(c,0,l.idx),s[n]=d}}var Ft=Ht(ot,kt,ut,"lftSib","lftNode","rgtSib","rgtNode",ht),At=Ht(rt,Rt,ht,"rgtSib","rgtNode","lftSib","lftNode",ut);function $t(t,e){var i=e.body,n=t.el,o=t.body,r={lftNode:o[0],rgtNode:o[o.length-1],lftSib:(i[0]||l).el,rgtSib:(i[i.length-1]||l).el};t:for(;;){for(;;){var a=Ft(t,n,o,r,null,!1);if(a===Mt)break;if(a===It)break t}for(;;){var s=At(t,n,o,r,r.lftNode,!1);if(s===Mt)break;if(s===It)break t}jt(t,n,o,r);break}}function jt(t,e,i,n){for(var o=Array.prototype.slice.call(e.childNodes),r=[],a=0;a<o.length;a++){var l=o[a]._node;l.parent===t&&r.push(l.idx)}for(var s=C(r).map((function(t){return r[t]})),c=0;c<s.length;c++)i[s[c]]._lis=!0;for(n.tombs=s;Ft(t,e,i,n,null,!0)!==It;);}function Lt(t){return t.el._node.parent!==t.parent}function Nt(t,e,i){return e[i]}function Vt(t,e,i){for(;i<e.length;i++){var r=e[i];if(null!=r.vm){if(t.type===n&&r.vm.view===t.view&&r.vm.key===t.key||t.type===o&&r.vm===t.vm)return r}else if(!Lt(r)&&t.tag===r.tag&&t.type===r.type&&t.key===r.key&&(t.flags&~j)==(r.flags&~j))return r}return null}function Wt(t,e,i){return e[e._keys[t.key]]}function zt(t,i){Z(i.hooks,"willRecycle",i,t);var n=t.el=i.el,o=i.body,r=t.body;if(n._node=t,t.type!==e||r===o){null==t.attrs&&null==i.attrs||St(t,i,!1);var a=c(o),l=c(r),s=(t.flags&V)===V;a?l||s?Bt(t,i):r!==o&&(null!=r?n.textContent=r:dt(i)):l?(dt(i),Dt(t)):r!==o&&(n.firstChild?n.firstChild.nodeValue=r:n.textContent=r),Z(i.hooks,"didRecycle",i,t)}else n.nodeValue=r}function Bt(e,r){var a=e.body,l=a.length,s=r.body,c=s.length,d=(e.flags&V)===V,u=(e.flags&L)===L,h=(e.flags&N)===N,f=!u&&e.type===t,p=!0,g=h?Wt:u||d?Nt:Vt;if(h){for(var v={},_=0;_<s.length;_++)v[s[_].key]=_;s._keys=v}if(f&&0===l)return dt(r),void(d&&(e.body=[]));var m,y,b=0,x=!1,w=0;if(d)var C={key:null},S=Array(l);for(_=0;_<l;_++){if(d){var E=!1,D=null;p&&(h&&(C.key=a.key(_)),m=g(C,s,w)),null!=m?(y=m.idx,!0===(D=a.diff(_,m))?((O=m).parent=e,O.idx=_,O._lis=!1):E=!0):E=!0,E&&(G(O=a.tpl(_),e,_),O._diff=null!=D?D:a.diff(_),null!=m&&zt(O,m)),S[_]=O}else{var O,k=(O=a[_]).type;if(k<=i)(m=p&&g(O,s,w))&&(zt(O,m),y=m.idx);else if(k===n){if(m=p&&g(O,s,w)){y=m.idx;var T=m.vm._update(O.data,e,_)}else T=Et(O.view,O.data,O.key,O.opts)._redraw(e,_,!1);k=T.node.type}else if(k===o){var M=R(O.vm);k=(T=O.vm._update(O.data,e,_,M)).node.type}}if(!h&&null!=m&&(y===w?++w===c&&l>c&&(m=null,p=!1):x=!0,c>100&&x&&++b%10==0))for(;w<c&&Lt(s[w]);)w++}d&&(e.body=S),f&&$t(e,r)}function Gt(t,e,i,n){var o=this;o.view=t,o.data=e,o.key=i,n&&(o.opts=n,o.config(n));var r=u(t)?t:t.call(o,o,e,i,n);p(r)?o.render=r:(o.render=r.render,o.config(r)),o._redrawAsync=x((function(t){return o.redraw(!0)})),o._updateAsync=x((function(t){return o.update(t,!0)})),o.init&&o.init.call(o,o,o.data,o.key,n)}var Yt=Gt.prototype={constructor:Gt,_diff:null,init:null,view:null,key:null,data:null,state:null,api:null,opts:null,node:null,hooks:null,onevent:s,refs:null,render:null,mount:Ut,unmount:Xt,config:function(t){var e=this;t.init&&(e.init=t.init),t.diff&&(e.diff=t.diff),t.onevent&&(e.onevent=t.onevent),t.hooks&&(e.hooks=v(e.hooks||{},t.hooks)),t.onemit&&(e.onemit=v(e.onemit||{},t.onemit))},parent:function(){return M(this.node.parent)},root:function(){for(var t=this.node;t.parent;)t=t.parent;return t.vm},redraw:function(t){var e=this;return t?e._redraw(null,null,R(e)):e._redrawAsync(),e},update:function(t,e){var i=this;return e?i._update(t,null,null,R(i)):i._updateAsync(t),i},_update:Zt,_redraw:Kt,_redrawAsync:null,_updateAsync:null};function Ut(t,e){var i=this;return e?(dt({el:t,flags:0}),i._redraw(null,null,!1),t.nodeName.toLowerCase()!==i.node.tag?(Ot(i.node),ut(t.parentNode,i.node.el,t),t.parentNode.removeChild(t)):ut(t.parentNode,Ot(i.node,t),t)):(i._redraw(null,null),t&&ut(t,i.node.el)),t&&J(i),i}function Xt(t){var e=this,i=e.node;st(i.el.parentNode,i.el),t||J(e)}function qt(t,e,i,n){return null!=i&&(i.body[n]=e,e.idx=n,e.parent=i,e._lis=!1),t}function Kt(t,e,i){var n,o,r=null==t,a=this,l=a.node&&a.node.el&&a.node.el.parentNode,s=a.node;if(null!=a.diff&&(n=a._diff,a._diff=o=a.diff(a,a.data),null!=s)){var d=c(n)?b:y;if(n===o||d(n,o))return qt(a,s,t,e)}l&&Z(a.hooks,"willRedraw",a,a.data);var u=a.render.call(a,a,a.data,n,o);if(u===s)return qt(a,s,t,e);if(a.refs=null,null!=a.key&&u.key!==a.key&&(u.key=a.key),a.node=u,t?(G(u,t,e,a),t.body[e]=u):s&&s.parent?(G(u,s.parent,s.idx,a),s.parent.body[s.idx]=u):G(u,null,null,a),!1!==i)if(s)if(s.tag!==u.tag||s.key!==u.key){s.vm=u.vm=null;var h=s.el.parentNode,f=ot(s.el);st(h,s.el),ut(h,Ot(u),f),s.el=u.el,u.vm=a}else zt(u,s);else Ot(u);return l&&Z(a.hooks,"didRedraw",a,a.data),r&&l&&J(a),a}function Zt(t,e,i,n){var o=this;return null!=t&&o.data!==t&&(Z(o.hooks,"willUpdate",o,t),o.data=t),o._redraw(e,i,n)}function Jt(t,e,i,n){var o,r;return null==i?u(e)?o=e:r=e:(o=e,r=i),W(t,o,r,n)}var Qt="http://www.w3.org/2000/svg";function te(t,e,i,n){var o=Jt(t,e,i,n);return o.ns=Qt,o}function ee(t){var e=new I;return e.type=i,e.body=t,e}function ie(t,e,i,n){this.view=t,this.data=e,this.key=i,this.opts=n}function ne(t,e,i,n){return new ie(t,e,i,n)}function oe(t){this.vm=t}function re(t){return new oe(t)}function ae(e){var i=new I;return i.type=t,i.el=i.key=e,i}function le(t,e){var i=t.length,n={items:t,length:i,key:function(i){return e.key(t[i],i)},diff:function(i,n){var o=e.diff(t[i],i);if(null==n)return o;var r=n._diff;return(o===r||c(r)?b(o,r):y(o,r))||o},tpl:function(i){return e.tpl(t[i],i)},map:function(t){return e.tpl=t,n},body:function(t){for(var e=Array(i),o=0;o<i;o++){var r=n.tpl(o);r._diff=n.diff(o),e[o]=r,G(r,t,o)}t.body=e}};return n}ie.prototype={constructor:ie,type:n,view:null,data:null,key:null,opts:null},oe.prototype={constructor:oe,type:o,vm:null};var se={config:_t,ViewModel:Gt,VNode:I,createView:Et,defineElement:Jt,defineSvgElement:te,defineText:P,defineComment:ee,defineView:ne,injectView:re,injectElement:ae,lazyList:le,FIXED_BODY:L,DEEP_REMOVE:j,KEYED_LIST:N,LAZY_LIST:V};function ce(t,e){de(this,t,e)}function de(t,e,i){if(null!=e.type){if(null!=t.vm)return;G(e,t.parent,t.idx,null),t.parent.body[t.idx]=e,zt(e,t),i&&k(e),J(M(e))}else{var n=Object.create(t);n.attrs=v({},t.attrs);var o=v(t.attrs,e);if(null!=t._class){var r=o.class;o.class=null!=r&&""!==r?t._class+" "+r:t._class}St(t,n),i&&k(t)}}function ue(t,e){var i=t.body;if(c(i))for(var n=0;n<i.length;n++){var o=i[n];null!=o.vm?e.push(o.vm):ue(o,e)}return e}function he(t){var e,i,n=arguments,o=n.length;if(o>1){var r=1;u(n[1])&&(i=n[1],r=2),e=o===r+1&&(f(n[r])||c(n[r])||i&&(i._flags&V)===V)?n[r]:m(n,r)}return W(t,i,e)}function fe(){var t=he.apply(null,arguments);return t.ns=Qt,t}return H.patch=ce,Yt.emit=gt,Yt.onemit=null,Yt.body=function(){return ue(this.node,[])},se.defineElementSpread=he,se.defineSvgElementSpread=fe,se}()},function(t,e,i){"use strict";(function(t){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Loader=void 0;var o=i(0),r=i(10),a=i(12),l=i(0),s=function(){function e(t,e){this._parent=t,this._changes=e}return e.prototype.load=function(t,e){var i=this;if(!t.config||this._parent.events.fire(a.DataEvents.beforeLazyLoad,[]))return this._parent.loadData=t.load().then((function(t){return t?i.parse(t,e):[]})).catch((function(t){i._parent.events.fire(a.DataEvents.loadError,[t])}))},e.prototype.parse=function(t,e){var i=this;if(void 0===e&&(e=a.DataDriver.json),"json"!==e||(0,r.hasJsonOrArrayStructure)(t)||this._parent.events.fire(a.DataEvents.loadError,["Uncaught SyntaxError: Unexpected end of input"]),!((t=(e=(0,r.toDataDriver)(e)).toJsonArray(t))instanceof Array)){var s=t.total_count-1,c=t.from;if(t=t.data,0!==this._parent.getLength())return t.forEach((function(t,e){var a=c+e,s=i._parent.getId(a);if((0,o.isId)(s)){var d=i._parent.getItem(s);if(d&&d.$empty){var u=t.id||d.id;(0,l.isDefined)(t.id)&&i._parent.changeId(s,u,!0),i._parent.update(u,n(n({},t),{$empty:void 0}),!0)}}else(0,r.dhxWarning)("item not found")})),this._parent.events.fire(a.DataEvents.afterLazyLoad,[c,t.length]),this._parent.events.fire(a.DataEvents.change),t;for(var d=[],u=0,h=0;u<=s;u++)u>=c&&u<=c+t.length-1?(d.push(t[h]),h++):d.push({$empty:!0});t=d}return this._parent.getInitialData()&&this._parent.removeAll(),this._parent.$parse(t),t},e.prototype.save=function(e){for(var i=this,n=this._getUniqueOrder(),o=function(n){if(n.saving||n.pending)(0,r.dhxWarning)("item is saving");else{var o=a._findPrevState(n.id);if(o&&o.saving){var l=new t((function(t,a){o.promise.then((function(){n.pending=!1,t(i._setPromise(n,e))})).catch((function(t){i._removeFromOrder(o),i._setPromise(n,e),(0,r.dhxWarning)(t),a(t)}))}));a._addToChain(l),n.pending=!0}else a._setPromise(n,e)}},a=this,l=0,s=n;l<s.length;l++){o(s[l])}n.length&&this._parent.saveData.then((function(){i._saving=!1}))},e.prototype.updateChanges=function(t){this._changes=t},e.prototype._setPromise=function(t,e){var i,n=this;switch(t.status){case"remove":i="delete";break;case"add":i="insert";break;default:i=t.status}return t.promise=e.save(t.obj,i),t.promise.then((function(){n._removeFromOrder(t)})).catch((function(e){t.saving=!1,t.error=!0,(0,r.dhxError)(e)})),t.saving=!0,this._saving=!0,this._addToChain(t.promise),t.promise},e.prototype._addToChain=function(t){this._parent.saveData&&this._saving?this._parent.saveData=this._parent.saveData.then((function(){return t})):this._parent.saveData=t},e.prototype._findPrevState=function(t){for(var e=0,i=this._changes.order;e<i.length;e++){var n=i[e];if(n.id===t)return n}return null},e.prototype._removeFromOrder=function(t){this._changes.order=this._changes.order.filter((function(e){return!(0,r.isEqualObj)(e,t)}))},e.prototype._getUniqueOrder=function(){return this._changes.order.reduce((function(t,e){var i=t.findIndex((function(t){return t.id===e.id})),n=i>-1?t[i]:null;return n&&!1===n.saving&&"add"===n.status?"remove"===e.status?t.splice(i,1):n.obj=e.obj:n&&!1===n.saving&&"update"===n.status?t.splice(i,1,e):t.push(e),t}),[])},e}();e.Loader=s}).call(this,i(9))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.jsonToXML=void 0;var n=4;function o(t){return" ".repeat(t)}function r(t,e){void 0===e&&(e=n);var i=o(e)+"<item>\n";for(var a in t)Array.isArray(t[a])?(i+=o(e+n)+"<".concat(a,">\n"),i+=t[a].map((function(t){return r(t,e+2*n)})).join("\n")+"\n",i+=o(e+n)+"</".concat(a,">\n")):i+=o(e+n)+"<".concat(a,">").concat(t[a],"</").concat(a,">\n");return i+=o(e)+"</item>"}e.jsonToXML=function(t,e){void 0===e&&(e="root");for(var i='<?xml version="1.0" encoding="iso-8859-1"?>\n<'.concat(e,">"),n=0;n<t.length;n++)i+="\n"+r(t[n]);return i+"\n</".concat(e,">")}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sort=void 0;var n=i(10),o=function(){function t(){}return t.prototype.sort=function(t,e){return this._sort(t,e)},t.prototype._createSorter=function(t){var e=this;t&&!t.rule&&(t.rule=function(i,o){var r,a,l=null!==(r=e._checkVal(t.as,i[t.by]))&&void 0!==r?r:"",s=null!==(a=e._checkVal(t.as,o[t.by]))&&void 0!==a?a:"";return(0,n.naturalCompare)(l.toString(),s.toString())})},t.prototype._checkVal=function(t,e){return t?t.call(this,e):e},t.prototype._sort=function(t,e){var i=this;e.forEach((function(t){return i._createSorter(t)}));var n={asc:1,desc:-1},o=t.sort((function(t,o){for(var r=0,a=e;r<a.length;r++){var l=a[r],s=l.rule.call(i,t,o)*(n[l.dir]||n.asc);if(0!==s)return s}return 0})),r=o.findIndex((function(t){return t.$groupSummary}));if(-1!==r){var a=o[r];switch(o.splice(r,1),a.$groupSummary){case"top":o.unshift(a);break;case"bottom":o.push(a)}}return o},t}();e.Sort=o},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;var r=i(0),a=i(37),l=function(){function t(){this._init=[],this._groupSet=new Set,this._groupOrderFields=[]}return t.prototype.group=function(t,e,i){return void 0===i&&(i={}),(null==t?void 0:t.length)&&(null==e?void 0:e.length)&&Array.isArray(t)?(this._init=o([],e,!0),this._groupSet.clear(),this._config=this.getGroupConfig(i),this._groupOrderFields=t.map((function(t){return"string"==typeof t?t:"function"==typeof t?"":"by"in t&&"string"==typeof t.by?t.by:""})),this._group(t,e)):e||[]},t.prototype.ungroup=function(t){var e=this._init;if(this._init=[],this._groupSet.clear(),t){for(var i={},o=function(e){var n=t[e];if(n.$group)return"continue";Object.keys(n).forEach((function(t){t.startsWith("$")&&delete n[t]})),delete n.parent,i[n.id]=n},r=0;r<t.length;r++)o(r);return e.map((function(t){return n(n({},t),i[t.id])}))}return e||[]},t.prototype.isGrouped=function(){return!!this._init.length},t.prototype.getGroupedFields=function(){return this._groupOrderFields},t.prototype.getGroupConfig=function(t){var e;return t?{displayMode:t.displayMode||"column",field:t.field||"group",showMissed:null===(e=t.showMissed)||void 0===e||e}:this._config},t.prototype._group=function(t,e,i,o){var a=this;if(void 0===o&&(o=0),!(o>=t.length)){for(var l=[],s={},c=[],d="",u={},h=0;h<e.length;h++){var f=e[h],p=t[o],g="function"==typeof p||"function"==typeof(null==p?void 0:p.by),v=f[(u=this._getOrderConfig(p,f)).by],_=g?u.by:v;g||v||0===v?(this._groupSet.add(u.by),s[_]||(s[_]=[]),s[_].push(f)):(this._config.showMissed&&(delete f.parent,c.push(f)),"string"==typeof this._config.showMissed&&(d=this._config.showMissed))}var m=Object.keys(s);return d&&m.push(d),m.forEach((function(e){var d,h=s[e]||c,f=i?"".concat(i,":").concat(e):"$".concat((0,r.uid)(),":").concat(e),p={};u.map&&Object.keys(u.map).forEach((function(t){p[t]=a._toAggregate(h,u.map[t])}));var g=n(((d={id:f,$by:u.by,$group:!0,$row:"row"===a._config.displayMode,$count:h.length})[u.by]=e,d),p);"column"===a._config.displayMode&&(g[a._config.field]=e),i&&(g.parent=i),l.push(g),o<t.length-1&&l.push.apply(l,a._group(t,h,f,o+1)),o===t.length-1&&h.forEach((function(t){l.push(n(n({},t),{parent:f}))})),u.summary&&a._addSummaryRow(l,f,u.summary,p)})),d||l.push.apply(l,c),l}},t.prototype._addSummaryRow=function(t,e,i,o){var r=n({id:"".concat(e,":summary"),parent:e,$groupSummary:i},o);if("top"===i){var a=t.findIndex((function(t){return t.id===e}));t.splice(a+1,0,r)}else t.push(r)},t.prototype._toAggregate=function(t,e){if("function"==typeof e)return e(t);var i=e[0],n=e[1];return a.methods[n]?a.methods[n](t,i):""},t.prototype._getOrderConfig=function(t,e){var i={by:"string"==typeof t&&t||"string"==typeof t.by&&t.by||"function"==typeof t&&t(e)||"function"==typeof t.by&&t.by(e)};return t.map&&(i.map=t.map),t.summary&&(i.summary=t.summary),i},t}();e.Group=l},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.TreeCollection=e.addToOrder=void 0;var l=i(0),s=i(33),c=i(15),d=i(10),u=i(12);function h(t,e,i,n){void 0!==n&&-1!==n&&t[i]&&t[i][n]?t[i].splice(n,0,e):(t[i]||(t[i]=[]),t[i].push(e))}e.addToOrder=h;var f=function(t){function e(e,i){var n,o=t.call(this,e,i)||this;o._children={};var r=o._root=e&&e.rootId||"_ROOT_"+(0,l.uid)();return o._children=((n={})[r]=[],n),o._initChildren=null,o}return o(e,t),e.prototype.add=function(t,e,i){var n,o=this;return void 0===e&&(e=-1),void 0===i&&(i=this._root),n=Array.isArray(t)?t.map((function(n,r){return o._add({newItem:n,batch:t,index:e,parent:i,order:r})})):this._add({newItem:t,batch:[t],index:e,parent:i}),this._reapplyFilters(),n},e.prototype.getRoot=function(){return this._root},e.prototype.getParent=function(t,e){if(void 0===e&&(e=!1),!this._pull[t])return null;var i=this._pull[t].parent;return e?this._pull[i]:i},e.prototype.getItems=function(t){return this._children&&this._children[t]?this._children[t]:[]},e.prototype.getLength=function(t){return void 0===t&&(t=this._root),this._children[t]?this._children[t].length:null},e.prototype.removeAll=function(e){var i;if((0,l.isId)(e)){if(this._children[e])for(var n=0,o=a([],this._children[e],!0);n<o.length;n++){var r=o[n];this.remove(r.id)}}else{t.prototype.removeAll.call(this);var s=this._root;this._initChildren=null,this._children=((i={})[s]=[],i)}},e.prototype.update=function(e,i,n){var o=i.parent;!(0,l.isDefined)(o)||this.exists(o)||o===this._root?t.prototype.update.call(this,e,i,n):(0,d.dhxWarning)("Item parent doesn't exist")},e.prototype.getIndex=function(t){var e=this.getParent(t);return e&&this._children[e]?this._children[e].findIndex((function(e){return(null==e?void 0:e.id)==t})):-1},e.prototype.sort=function(t,e,i){var n,o,l=this;if(void 0===i&&(i=!1),(null==e?void 0:e.smartSorting)&&(this._sorter=t),i||this._sortingStates.length&&!(null==e?void 0:e.smartSorting)&&((null===(n=this._sortingStates[0])||void 0===n?void 0:n.smartSorting)||(null==e?void 0:e.smartSorting))||(this._sortingStates=[r(r({},t),e)]),t){if(!i&&(this._initSortOrder=this._initSortOrder||a([],this._initFilterOrder||this._order,!0),!(null==e?void 0:e.smartSorting)&&(null===(o=this._sortingStates[0])||void 0===o?void 0:o.smartSorting))){var s=this._sortingStates.findIndex((function(e){return e.by==t.by}));-1!==s?this._sortingStates[s].dir=t.dir:this._sortingStates.push(t)}this._applySorters()}else this._initSortOrder&&(this._children={},this._order=[],this._sortingStates=[],this._initSortOrder.forEach((function(t){return l._parseItem(t)})),this._sorter=this._initSortOrder=this._initChildren=null,this._initFilterOrder&&(this._initFilterOrder=null,this.filter(null,{$restore:!0},!0)));i||(this._reapplyFilters(),this.events.fire(u.DataEvents.change,[void 0,"sort",t]))},e.prototype.filter=function(t,e,i){if((null==e?void 0:e.$restore)&&(t=this._normalizeFilters(t||this._filters)),!(t&&(null==e?void 0:e.add)||(this._initChildren&&(this._children=this._initChildren,this._initChildren=null),null==e?void 0:e.$restore)))for(var n in this._filters){var o=this._filters[n],r=o.rule,a=o.config;(null==a?void 0:a.permanent)?this._applyFilter(r,a):delete this._filters[n]}var s;if(t&&!(null==e?void 0:e.$restore))s=(null==e?void 0:e.id)||(0,l.uid)(),e||(e={}),e.type=e.type||u.TreeFilterType.all,this._filters[s]={rule:t,config:e},this._applyFilter(t,e);else for(var n in t)this._applyFilter(t[n],this._filters[n].config);if(!i){var c=this._getPureFilters(this._filters);this.events.fire(u.DataEvents.filter,[(0,l.isEmptyObj)(c)?null:c])}return s},e.prototype.restoreOrder=function(){this.resetFilter({permanent:!0},!0),this.sort()},e.prototype.copy=function(t,e,i,n){var o=this;return void 0===i&&(i=this),void 0===n&&(n=this._root),t instanceof Array?t.map((function(t,r){return o._copy(t,e,i,n,r)})):this._copy(t,e,i,n)},e.prototype.move=function(t,e,i,n){var o,r=this;if(void 0===n&&(n=this._root),i=i||this,t instanceof Array){var a=[];return t.forEach((function(t,o){(0,l.isId)(r._move(t,e,i,n,o))?a.push(t):(0,d.throwMoveWarning)(t,r.exists(t))})),a}return null!==(o=this._move(t,e,i,n))&&void 0!==o?o:(0,d.throwMoveWarning)(t,this.exists(t))},e.prototype.forEach=function(t,e,i){if(void 0===e&&(e=this._root),void 0===i&&(i=1/0),this.haveItems(e)&&!(i<1))for(var n=this._children[e],o=0;o<n.length;o++)t.call(this,n[o],o,n),this.haveItems(n[o].id)&&this.forEach(t,n[o].id,--i)},e.prototype.eachChild=function(t,e,i,n){if(void 0===i&&(i=!0),void 0===n&&(n=function(){return!0}),this.haveItems(t))for(var o=0;o<this._children[t].length;o++)e.call(this,this._children[t][o],o),i&&n(this._children[t][o])&&this.eachChild(this._children[t][o].id,e,i,n)},e.prototype.getNearId=function(t){return t},e.prototype.loadItems=function(t,e){var i=this;if(void 0===e&&(e=u.DataDriver.json),this.events.fire(u.DataEvents.beforeItemLoad,[t])){var n=this.config.autoload.toString(),o=n+(n.includes("?")?"&id=".concat(t):"?id=".concat(t));new c.DataProxy(o).load().then((function(n){n=(e=(0,d.toDataDriver)(e)).toJsonArray(n),i._parse_data(n,t),i.events.fire(u.DataEvents.change),i.events.fire(u.DataEvents.afterItemLoad,[t])})).catch((function(t){i.events.fire(u.DataEvents.loadError,[t])}))}},e.prototype.refreshItems=function(t,e){void 0===e&&(e=u.DataDriver.json),this.removeAll(t),this.loadItems(t,e)},e.prototype.eachParent=function(t,e,i){void 0===i&&(i=!1);var n=this.getItem(t);if(n&&(i&&e.call(this,n),n.parent!==this._root)){var o=this.getItem(n.parent);e.call(this,o),this.eachParent(n.parent,e)}},e.prototype.haveItems=function(t){return t in this._children},e.prototype.canCopy=function(t,e){if(t===e)return!1;var i=!0;return this.eachParent(e,(function(e){return e.id===t?i=!1:null})),i},e.prototype.serialize=function(t,e){void 0===t&&(t=u.DataDriver.json);var i=this._serialize(this._root,e),n=(0,d.toDataDriver)(t);if(n)return n.serialize(i)},e.prototype.getId=function(t,e){if(void 0===e&&(e=this._root),this._children[e]&&this._children[e][t])return this._children[e][t].id},e.prototype.map=function(t,e,i){void 0===e&&(e=this._root),void 0===i&&(i=!0);var n=[];if(!this.haveItems(e))return n;for(var o=0;o<this._children[e].length;o++)if(n.push(t.call(this,this._children[e][o],o,this._children)),i){var r=this.map(t,this._children[e][o].id,i);n=n.concat(r)}return n},e.prototype.getRawData=function(e,i,n,o,r){var a;return r=null!=r?r:this._root,this._children[r]?(a=r===this._root?t.prototype.getRawData.call(this,e,i,this._children[r]):this._children[r],2===o?this.flatten(a):a):[]},e.prototype.flatten=function(t){var e=this,i=[];return t.forEach((function(t){i.push(t);var n=e._children[t.id];n&&t.$opened&&(i=i.concat(e.flatten(n)))})),i},e.prototype._add=function(t){var e=t.newItem,i=t.index,n=void 0===i?-1:i,o=t.parent,r=void 0===o?this._root:o,a=t.order,l=void 0===a?0:a,s=t.batch;if(l>0&&-1!==n&&(n+=1),this.events.fire(u.DataEvents.beforeAdd,[e,s,l])){this._setParent(e,r);var c=this._addCore(e,n);if(this._onChange("add",e.id,e),this.events.fire(u.DataEvents.afterAdd,[e,s,l]),Array.isArray(e.items))for(var d=0,h=e.items;d<h.length;d++){var f=h[d];this.add(f,-1,e.id)}return c}},e.prototype._setParent=function(t,e){t.parent=t.parent?t.parent.toString():e;var i=this._pull[t.parent];i&&!i.items&&(i.items=[])},e.prototype._copy=function(t,e,i,n,o){if(void 0===i&&(i=this),void 0===n&&(n=this._root),!this.exists(t))return null;var r=this._children[t];if(o&&(e=-1===e?-1:e+o),i===this&&!this.canCopy(t,n))return null;var a=(0,d.copyWithoutInner)(this.getItem(t),{items:!0});if(i.exists(t)&&(a.id=(0,l.uid)()),(0,d.isTreeCollection)(i)){if(this.exists(t)&&(a.parent=n,i!==this&&n===this._root&&(a.parent=i.getRoot()),i.add(a,e),t=a.id),r)for(var s=0,c=r;s<c.length;s++){var u=c[s].id,h=this.getIndex(u);this.copy(u,h,i,t)}return t}i.add(a,e)},e.prototype._move=function(t,e,i,n,o){if(void 0===i&&(i=this),void 0===n&&(n=this._root),!this.exists(t))return null;if(o&&e<this.getIndex(t)&&(e=-1===e?-1:e+o),i!==this){if(!(0,d.isTreeCollection)(i))return i.add((0,d.copyWithoutInner)(this.getItem(t)),e),void this.remove(t);var r=this.copy(t,e,i,n);return this.remove(t),r}return this.canCopy(t,n)?(this._moveItem(t,n,e),this.events.fire(u.DataEvents.change,[t,"update",this.getItem(t)]),t):null},e.prototype._moveItem=function(t,e,i){var n=this.getParent(t),o=this._initChildren||this._children;if([this._children,this._initChildren].forEach((function(o){if(o&&o[n]){var r=o[n].findIndex((function(e){return e.id===t}));if(-1!==r){var a=o[n].splice(r,1)[0];a.parent=e,h(o,a,e,i),o[n].length||delete o[n]}}})),n!==this._root&&n!==e){var r=this.getItem(n);o[n]?r.items=a([],o[n],!0):delete r.items}e!==this._root&&(this.getItem(e).items=a([],o[e]||[],!0))},e.prototype._reset=function(e){var i;if((0,l.isId)(null==e?void 0:e.id))for(var n=0,o=a([],this._children[null==e?void 0:e.id],!0);n<o.length;n++){var r=o[n];this.remove(r.id)}else{t.prototype._reset.call(this,e);var s=this._root;this._initChildren=null,this._children=((i={})[s]=[],i)}},e.prototype._removeCore=function(t){var e;if(this._pull[t]){var i=this.getParent(t);if(this._removeFromParentList(this._children,i,t),this._initChildren&&this._removeFromParentList(this._initChildren,i,t),Array.isArray(null===(e=this._pull[i])||void 0===e?void 0:e.items)){var n=this._pull[i];n.items=n.items.filter((function(e){return e.id!==t}))}var o=new Set;this._removeChildren(this._children,t,o),this._initChildren&&this._removeChildren(this._initChildren,t,o),this._removeFromOrders(o)}},e.prototype._removeFromParentList=function(t,e,i){t[e]&&(t[e]=t[e].filter((function(t){return t.id!==i})),e!==this._root&&0===t[e].length&&delete t[e])},e.prototype._removeChildren=function(t,e,i){this._pull[e]&&(i.add(e),delete this._pull[e]);var n=t[e];if(n){for(var o=0;o<n.length;o++)this._removeChildren(t,n[o].id,i);delete t[e]}},e.prototype._removeFromOrders=function(t){var e,i;if(0!==t.size){var n=function(e){return!t.has(e.id)};this._order&&(this._order=this._order.filter(n)),(null===(e=this._initFilterOrder)||void 0===e?void 0:e.length)&&(this._initFilterOrder=this._initFilterOrder.filter(n)),(null===(i=this._initSortOrder)||void 0===i?void 0:i.length)&&(this._initSortOrder=this._initSortOrder.filter(n))}},e.prototype._addToOrder=function(e,i,n){var o=this._children,r=this._initChildren,a=i.parent;this._pull[i.id]=i,i.parent&&this._pull[i.parent]&&Array.isArray(this._pull[i.parent].items)&&!this._pull[i.parent].items.find((function(t){return t.id===i.id}))&&this._pull[i.parent].items.push(i),t.prototype._addToOrder.call(this,e,i,n),h(o,i,a,n),r&&h(r,i,a,n)},e.prototype._parse_data=function(t,e){var i,n,o;void 0===e&&(e=this._root);for(var r=0,a=t;r<a.length;r++){var s=a[r];this.config.init&&(s=this.config.init(s)),s&&"object"!=typeof s&&(s={value:s}),s.id=null!==(i=s.id)&&void 0!==i?i:(0,l.uid)(),s.parent=s.parent&&!(null===(o=null===(n=s.parent)||void 0===n?void 0:n.toString())||void 0===o?void 0:o.includes("_ROOT_"))?s.parent:e,this._pull[s.id]&&(0,d.dhxError)("Item ".concat(s.id," already exist")),this._parseItem(s),s.items&&s.items instanceof Object&&this._parse_data(s.items,s.id)}},e.prototype._parseItem=function(t){this._pull[t.id]=t,this._order[this._order.length]=t,this._children[t.parent]||(this._children[t.parent]=[]),this._children[t.parent].push(t)},e.prototype._recursiveFilter=function(t,e,i,n,o){var r=this,a=this._children[i];if(a){var l=function(t){switch(e.type){case u.TreeFilterType.all:return!0;case u.TreeFilterType.level:return n===e.level;case u.TreeFilterType.leafs:return!r.haveItems(t.id)}};if("function"==typeof t){var s=function(e){return l(e)&&t(e)};(c=a.filter(s)).length?o[i]=c:i===this._root&&(o[i]=[])}else{var c;s=function(e){var i,n=!0;for(var o in t)if(t[o].by&&""!==t[o].match&&(n=t[o].compare?t[o].compare(e[t[o].by],t[o].match,e):-1!==(null===(i=e[t[o].by])||void 0===i?void 0:i.toString().toLocaleLowerCase().indexOf(t[o].match.toString().toLowerCase()))),!n)break;return l(e)&&n};(c=a.filter(s)).length?o[i]=c:i===this._root&&(o[i]=[])}for(var d=0,h=a;d<h.length;d++){var f=h[d];this._recursiveFilter(t,e,f.id,n+1,o)}}},e.prototype._serialize=function(t,e){var i=this;return void 0===t&&(t=this._root),this.map((function(t){var n={};for(var o in t)"parent"===o||"items"===o||o.startsWith("$")||(n[o]=t[o]);return e&&(n=e(n)),i.haveItems(t.id)&&(n.items=i._serialize(t.id,e)),n}),t,!1)},e.prototype._applyFilter=function(t,e){var i=this;if(t&&("function"==typeof t||!(0,l.isEmptyObj)(t))){if(!this._checkFilterRule(t))throw new Error("Invalid filter rule");var n;this._initFilterOrder||(this._initFilterOrder=this._order),this._initChildren||(this._initChildren=this._children);var o={};if("function"!=typeof t)if(n={},(0,l.isDefined)(t.by))n[t.by]=t;else for(var r in t)n[r]=t[r];else n=t;this._recursiveFilter(n,e,this._root,0,o),Object.keys(o).forEach((function(t){for(var e=i.getParent(t),n=i.getItem(t);e;)o[e]||(o[e]=[]),n&&!o[e].find((function(t){return t.id===n.id}))&&o[e].push(n),n=i.getItem(e),e=i.getParent(e)})),this._children=o}},e.prototype._normalizeFilters=function(t){var e={};for(var i in t)e[i]=t[i].rule;return e},e.prototype._checkFilterRule=function(e){var i=this;return t.prototype._checkFilterRule.call(this,e)||Object.values(e).every((function(e){return"function"!=typeof e&&t.prototype._checkFilterRule.call(i,e)}))},e.prototype._applySorters=function(){for(var t in this._children)this._sort.sort(this._children[t],this._sortingStates);if(this._initChildren&&Object.keys(this._initChildren).length)for(var t in this._initChildren)this._sort.sort(this._initChildren[t],this._sortingStates)},e}(s.DataCollection);e.TreeCollection=f},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.dragManager=void 0;var r=i(2),a=i(78),l=i(12),s=i(10),c=i(0);var d=function(t){var e;return null===(e=t.name)||void 0===e?void 0:e.includes("grid")},u=function(t){return d(t)&&t.hasOwnProperty("scrollView")},h=function(){function t(){var t=this;this._transferData={},this._canMove=!0,this._isDrag=!1,this._lastTargetItemState=null,this._lastOverItemId=null,this._onMouseMove=function(e){var i,n;if(t._transferData.start){var o=(0,r.getElementFromPoint)(e),a=(0,r.locate)(o,"data-dhx-drop-area"),l="common"===a,s=e.targetTouches?e.targetTouches[0].pageX:e.pageX,c=e.targetTouches?e.targetTouches[0].pageY:e.pageY;"column"===t._transferData.type&&"group"===a&&(t._transferData.type="group",t._transferData.isWasColumn=!0),"group"===t._transferData.type&&"column"===a&&t._transferData.isWasColumn&&!t._transferData.groupOnly&&(t._transferData.type="column");var d=(0,r.locate)(o),u=null!==(n=null===(i=t._transferData.component.data.getItem(d))||void 0===i?void 0:i.id)&&void 0!==n?n:d;if(a===t._transferData.type||l){var h=t._transferData,f=h.x,p=h.y,g=h.start,v=h.componentId;if(!t._transferData.ghost){if(Math.abs(f-s)<3&&Math.abs(p-c)<3)return;var _=t._onDragStart(g,e);if(!_)return void t._endDrop(e);t._transferData.ghost=_,document.body.appendChild(t._transferData.ghost)}var m=(0,r.locate)(o,"data-dhx-widget-id");"column"!==a&&"group"!==a||m!==v?t._onDrag(e):u!==t._lastOverItemId&&(t._lastOverItemId=u,t._onDrag(e))}else t._canMove&&t.cancelCanDrop(e);t._notAllowedDropArea(a!==t._transferData.type&&!l||!t._transferData.groupable&&"group"===a||t._transferData.groupOnly&&"group"!==a&&!l&&t._transferData.start!=u),t._moveGhost(s,c)}},this._onMouseUp=function(e){t._transferData.x&&(t._transferData.ghost?(t._removeGhost(),t._onDrop(e)):t._endDrop(e),e.targetTouches?(document.removeEventListener("touchmove",t._onMouseMove),document.removeEventListener("touchend",t._onMouseUp)):(document.removeEventListener("mousemove",t._onMouseMove),document.removeEventListener("mouseup",t._onMouseUp)))}}return t.prototype.setItem=function(t,e){a.collectionStore.setItem(t,e)},t.prototype.onMouseDown=function(t){var e,i,n=t.event,l=t.itemsForGhost,s=t.ghost,c=t.source,u=t.type,h=t.groupable,f=t.groupOnly;if(1===n.which||n.targetTouches){n.targetTouches?(document.addEventListener("touchmove",this._onMouseMove,!1),document.addEventListener("touchend",this._onMouseUp,!1)):(document.addEventListener("mousemove",this._onMouseMove),document.addEventListener("mouseup",this._onMouseUp));var p=(0,r.getElementFromPoint)(n),g=(0,r.locateNode)(p,"data-dhx-id"),v=(0,r.locateNode)(p,"data-dhx-widget-id"),_=null==v?void 0:v.getAttribute("data-dhx-widget-id"),m=a.collectionStore.getItem(_),y=g&&g.getAttribute("data-dhx-id"),b=g&&(null!==(i=null===(e=m.data.getItem(y))||void 0===e?void 0:e.id)&&void 0!==i?i:y);if(s&&(this._ghost=s),Array.isArray(c)&&c.includes(b)?(this._transferData.source=o([],c,!0),this._itemsForGhost=l):(this._transferData.source=[b],this._itemsForGhost=null),b&&_){var x=(0,r.getBox)(g),w=d(m)?(0,r.getBox)(v).left:x.left,C=n.targetTouches?n.targetTouches[0].pageX:n.pageX,S=n.targetTouches?n.targetTouches[0].pageY:n.pageY;this._transferData.initXOffset="row"===u?C-w:0,this._transferData.initYOffset="row"===u?S-x.top:0,this._transferData.x=C,this._transferData.y=S,this._transferData.componentId=_,this._transferData.component=m,this._transferData.start=b,this._transferData.item=g,this._transferData.type=u,this._transferData.groupable=h,this._transferData.groupOnly=f}}},t.prototype.isDrag=function(){return this._isDrag},t.prototype.cancelCanDrop=function(t){this._canMove=!1;var e=this._transferData,i=e.start,n=e.source,o=e.target,r=e.dropComponentId,s={start:i,source:n,target:o,dragItem:e.type},c=a.collectionStore.getItem(r);c&&o&&c.events.fire(l.DragEvents.cancelDrop,[s,t,this._transferData.type]),this._transferData.dropComponentId=null,this._transferData.target=null},t.prototype._moveGhost=function(t,e){this._transferData.ghost&&(this._transferData.ghost.style.left=t-this._transferData.initXOffset+"px",this._transferData.ghost.style.top=e-this._transferData.initYOffset+"px")},t.prototype._removeGhost=function(){this._ghost=null,document.body.removeChild(this._transferData.ghost)},t.prototype._onDrop=function(t){if(this._canMove){var e=this._transferData,i=e.start,n=e.source,o=e.target,s=e.dropComponentId,c=e.dropPosition,d={start:i,source:n,target:o,dropPosition:c},u=a.collectionStore.getItem(s),h=u&&u.config,f=this._transferData.componentId==(0,r.locate)((0,r.getElementFromPoint)(t),"data-dhx-widget-id");if(!u||"source"===h.dragMode||f&&n.find((function(t){return t==o})))this._endDrop(t);else{if(u.events.fire(l.DragEvents.beforeDrop,[d,t,this._transferData.type])){var p={id:o,component:u},g={id:i,component:this._transferData.component,newId:null};"group"!==this._transferData.type&&this._move(g,p),g.newId&&g.component!==p.component&&(d.start=g.newId),p.component.events.fire(l.DragEvents.afterDrop,[d,t,this._transferData.type])}this._endDrop(t)}}else this._endDrop(t)},t.prototype._onDragStart=function(t,e){var i=this._transferData.component.config,n=this._transferData,o={start:n.start,source:n.source,target:n.target};if("target"===i.dragMode||this._transferData.component._pregroupData)return null;var r="row"===this._transferData.type?function(t,e,i){void 0===i&&(i=!1);var n=t.getBoundingClientRect(),o=document.createElement("div"),r=t.cloneNode(!0),a=window.getComputedStyle(t.parentElement).fontSize;return r.style.width=n.width+"px",r.style.height=n.height+"px",r.style.maxHeight=n.height+"px",r.style.opacity="0.8",r.style.fontSize=a,i&&e&&e.length||o.appendChild(r),e&&e.length&&e.forEach((function(t,e){var r=t.cloneNode(!0);r.style.getPropertyPriority("width")||(r.style.width=n.width+"px"),r.style.height=n.height+"px",r.style.maxHeight=n.height+"px",r.style.top=12*(e+1)-n.height-n.height*e+"px",r.style.left=12*(e+1)+"px",r.style.opacity="0.6",r.style.zIndex="".concat(-e-1),i||(r.style.fontSize=a,r.style.overflow="hidden"),o.appendChild(r)})),o.className="dhx_drag-ghost",o}(this._transferData.item,this._itemsForGhost,d(this._transferData.component)):this._ghost;return this._transferData.component.events.fire(l.DragEvents.beforeDrag,[o,e,r,this._transferData.type])&&(0,c.isId)(t)?(this._transferData.component.events.fire(l.DragEvents.dragStart,[o,e,this._transferData.type]),this._isDrag=!0,this._toggleTextSelection(!0),this._transferData.dragConfig=i,r):null},t.prototype._onDrag=function(t){var e,i,n=(0,r.getElementFromPoint)(t),o=(0,r.locate)(n,"data-dhx-widget-id"),c=a.collectionStore.getItem(o);if(c){var d=!!(0,r.locateNodeByClassName)(n,"dhx_grid-header")||!!(0,r.locateNodeByClassName)(n,"dhx_grid-footer"),u=c.config.columns?c.config:void 0,h=u&&("both"===u.dragItem||"column"===u.dragItem);if(!d||h){var f=(0,r.locate)(n,"data-dhx-id"),p=(0,r.locate)(n,"data-dhx-root-id"),g=this._transferData,v=g.dropComponentId,_=g.start,m=g.source,y=g.target,b=g.componentId,x=function(t){var e=t.targetTouches?t.targetTouches[0].clientY:t.clientY,i=(0,r.locateNode)((0,r.getElementFromPoint)(t));if(!i)return null;var n=i.childNodes[0];if(1===(null==n?void 0:n.nodeType)){var o=n.getBoundingClientRect();return(e-o.top)/o.height}}(t);if("group"!==this._transferData.type){if(!f&&!p)return this.cancelCanDrop(t),this._transferData.dropComponentId=o,this._transferData.target=null,void this._canDrop(t);if(!c.config.group)switch(c.config.dropBehaviour){case"complex":this._transferData.dropPosition=x<=.25?"top":x>=.75?"bottom":"in";break;case"child":this._transferData.dropPosition="in";break;default:this._transferData.dropPosition=x<=.5?"top":"bottom"}if(((null===(e=this._lastTargetItemState)||void 0===e?void 0:e.id)===f&&(null===(i=this._lastTargetItemState)||void 0===i?void 0:i.dropPosition)===this._transferData.dropPosition||!f&&y===p)&&v===o)return}var w={id:_,component:this._transferData.component};if("source"!==c.config.dragMode)if(w.component.events.fire(l.DragEvents.dragOut,[{start:_,source:m,target:y},t,this._transferData.type]),o!==b||!(0,s.isTreeCollection)(w.component.data)||(0,s.isTreeCollection)(w.component.data)&&w.component.data.canCopy(w.id,f)){this.cancelCanDrop(t);var C=this._transferData.target=f||p;this._transferData.dropComponentId=o,this._lastTargetItemState={id:f,dropPosition:this._transferData.dropPosition},w.component.events.fire(l.DragEvents.dragIn,[{start:_,source:m,target:C,dropPosition:this._transferData.dropPosition},t,this._transferData.type])&&this._canDrop(t)}else this.cancelCanDrop(t)}else this._canMove&&this.cancelCanDrop(t)}else this._canMove&&this.cancelCanDrop(t)},t.prototype._move=function(t,e){var i,r=t.component,a=e.component,l=t.component.data,h=e.component.data,f=0,p=e.id,g=(0,s.isTreeCollection)(h),v=g&&e.component.config.dropBehaviour||null,_=r._uid===a._uid,m=t.component.config.columns?t.component.config:void 0,y="column"===this._transferData.type&&(null===(i=null==m?void 0:m.columns)||void 0===i?void 0:i.map((function(t){return t.id})).filter((function(i){return i===t.id||i===e.id})).length);if(y&&t.component===e.component){if(t.id===e.id)return;var b=(x=r.config.columns.map((function(t){return n({},t)}))).findIndex((function(e){return e.id===t.id}));if(-1===(S=x.findIndex((function(t){return t.id===e.id}))))return;return x.splice(S,0,x.splice(b,1)[0]),r.setColumns(x),void r.paint()}if(y&&t.component&&u(t.component)&&e.component&&u(e.component)){b=(x=r.config.columns.map((function(t){return n({},t)}))).findIndex((function(e){return e.id===t.id}));var x,w=a.config.columns.map((function(t){return n({},t)})),C=a.data.getLength(),S=w.findIndex((function(t){return t.id===e.id})),E=[],D=t.id;r.data.forEach((function(e){var i;E.push(((i={id:e.id})[D]=e[t.id],i))})),C?r.data.forEach((function(t,e){var i=a.data.getItem(t.id);i?a.data.update(i.id,n(n({},i),E[e])):a.data.add(E[e])})):a.data.parse(E);var O=x.splice(b,1)[0];return w.find((function(t){return t.id===D}))||w.splice(S,0,O),a.setColumns(w),a.paint(),r.setColumns(x),void r.paint()}var k=e.id===a.config.rootParent,R=this._transferData.dropPosition;switch(v){case"child":break;case"sibling":if(!h.getItem(e.id))return;var T=h.getIndex(t.id),M=h.getIndex(e.id),I=h.getParent(t.id),H=h.getParent(e.id);p=h.getParent(p),"top"===R?f=M-(-1===T||T>M||I!==H?0:1):"bottom"===R&&(f=M+(-1===T||T>M||I!==H?1:0));break;case"complex":if(k)p=e.id,f=h.getLength();else{var P=h.getItem(t.id),F=h.getItem(e.id);if(!F)return;T=h.getIndex(t.id),M=h.getIndex(e.id);var A=(null==P?void 0:P.$level)||0,$=(null==F?void 0:F.$level)||0;"top"===R?(p=h.getParent(p),f=A===$?M-(-1===T||T>M?0:1):M):"bottom"===R&&(p=h.getParent(p),f=A===$?M+(-1===T||T>M?1:0):M+1)}break;default:if((0,c.isId)(e.id)){h.getIndex(t.id)>-1&&(t.newId=(0,c.uid)());T=h.getIndex(t.id),M=h.getIndex(e.id);f="top"===R?M-(-1===T||T>M?0:1):"bottom"===R?M+(-1===T||T>M?1:0):h.getIndex(e.id)}else f=-1}if(this._transferData.dragConfig.dragCopy)this._transferData.source instanceof Array&&this._transferData.source.length>1?this._transferData.source.map((function(t){l.copy(t,f,h,p),f>-1&&f++})):l.copy(t.id,f,h,p);else if(this._transferData.source instanceof Array&&this._transferData.source.length>1)l.move(this._transferData.source,f,h,p);else if(d(a)&&!a.config.columns.length){var j=r.data.getItem(t.id);a.data.parse([n({},j)]),a.setColumns(o([],r.config.columns,!0)),a.paint(),r.data.remove(t.id),r.paint()}else l.move(t.id,f,h,p,t.newId);_||this._transferData.source.forEach((function(t){var e;null===(e=h.getItem(t))||void 0===e||delete e.$draggable,g&&(null==h?void 0:h.haveItems(t))&&h.eachChild(t,(function(t){delete t.$draggable}))}))},t.prototype._endDrop=function(t){if(this._toggleTextSelection(!1),this._notAllowedDropArea(!1),this._transferData.component){var e=this._transferData,i={start:e.start,source:e.source,target:e.target};this._transferData.component.events.fire(l.DragEvents.afterDrag,[i,t,this._transferData.type])}this.cancelCanDrop(t),this._canMove=!0,this._isDrag=!1,this._lastOverItemId=null,this._transferData={},this._transferData.target=null,this._transferData.dropComponentId=null,this._lastTargetItemState=null},t.prototype._canDrop=function(t){this._canMove=!0;var e=this._transferData,i={start:e.start,source:e.source,target:e.target,dropPosition:e.dropPosition},n=a.collectionStore.getItem(this._transferData.dropComponentId);n&&this._transferData.target&&n.events.fire(l.DragEvents.canDrop,[i,t,this._transferData.type])},t.prototype._toggleTextSelection=function(t){t?document.body.classList.add("dhx_no-select"):document.body.classList.remove("dhx_no-select")},t.prototype._notAllowedDropArea=function(t){t?document.body.classList.contains("dhx_drop-area--not-allowed")||document.body.classList.add("dhx_drop-area--not-allowed"):document.body.classList.remove("dhx_drop-area--not-allowed")},t}(),f=window.dhxHelpers=window.dhxHelpers||{};f.dragManager=f.dragManager||new h,e.dragManager=f.dragManager},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.collectionStore=e.CollectionStore=void 0;var n=i(0),o=function(){function t(){this._store={}}return t.prototype.setItem=function(t,e){this._store[t]=e},t.prototype.getItem=function(t){return(0,n.isId)(t)&&this._store[t]?this._store[t]:null},t}();e.CollectionStore=o;var r=window.dhxHelpers=window.dhxHelpers||{};r.collectionStore=r.collectionStore||new o,e.collectionStore=r.collectionStore},function(t,e,i){"use strict";(function(t){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.LazyDataProxy=void 0;var r=i(15),a=i(0),l=i(23),s=function(e){function i(t,i){var n=e.call(this,t)||this;return n.config=(0,a.extend)({from:0,limit:50,delay:50,prepare:0},i),n.updateUrl(t,{from:n.config.from,limit:n.config.limit}),n}return o(i,e),i.prototype.load=function(){var e=this;return new t((function(t,i){e._timeout?(clearTimeout(e._timeout),e._timeout=setTimeout((function(){l.ajax.get(e.url,{responseType:"text"}).then(t).catch(i),e._cooling=!0}),e.config.delay),e._cooling&&(t(null),e._cooling=!1)):(l.ajax.get(e.url,{responseType:"text"}).then(t).catch(i),e._cooling=!0,e._timeout=setTimeout((function(){})))}))},i}(r.DataProxy);e.LazyDataProxy=s}).call(this,i(9))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;var n=i(6),o=i(16),r=i(12),a=i(0),l=function(){function t(t,e,i){var o=this;this.events=i||new n.EventSystem(this),this.config=t,this._data=e,this._selected=null,this._data.events.on(r.DataEvents.removeAll,(function(){o._selected=null})),this._data.events.on(r.DataEvents.change,(function(){if((0,a.isId)(o._selected)){var t=o._data.getNearId(o._selected);t!==o._selected&&(o._selected=null,t&&o.add(t))}}))}return t.prototype.getId=function(){return this._selected},t.prototype.getItem=function(){return(0,a.isId)(this._selected)?this._data.getItem(this._selected):null},t.prototype.remove=function(t){return t=null!=t?t:this._selected,!(0,a.isDefined)(t)||!!this.events.fire(o.SelectionEvents.beforeUnSelect,[t])&&(this._data.update(t,{$selected:!1},!0),this._selected=null,this.events.fire(o.SelectionEvents.afterUnSelect,[t]),!0)},t.prototype.add=function(t){this._selected!==t&&!this.config.disabled&&this._data.exists(t)&&(this.remove(),this._addSingle(t))},t.prototype.enable=function(){this.config.disabled=!1},t.prototype.disable=function(){this.remove(),this.config.disabled=!0},t.prototype._addSingle=function(t){this.events.fire(o.SelectionEvents.beforeSelect,[t])&&(this._selected=t,this._data.update(t,{$selected:!0},!0),this.events.fire(o.SelectionEvents.afterSelect,[t]))},t}();e.Selection=l},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Grid=void 0;var l=i(1),s=i(6),c=i(2),d=i(0),u=i(25),h=i(11),f=i(8),p=i(82),g=i(4),v=i(14),_=i(5),m=i(88),y=i(89),b=i(3),x=i(90),w=i(7),C=i(21),S=i(122),E=i(123),D=i(19),O=i(127),k=i(128),R=i(20),T=function(t){function e(e,i){void 0===i&&(i={});var n,o=this;if((o=t.call(this,e,i)||this)._touch={duration:350,dblDuration:300,timer:null,start:!1},o._destructed=!1,o._sortingStates=[],o._dropManager=null,o._cachedSizes=null,o._resizeObserver=null,o._rowHeights=new m.PrefixSums,o._colWidths=new m.PrefixSums,o._rowHeightsRebuild=!0,o._observedEl=null,o._commonSummary={},o._colSummary={},o.version="9.3.8",o.name="grid",o.config=(0,d.extend)({rowHeight:40,headerRowHeight:40,footerRowHeight:40,keyNavigation:!0,sortable:!0,columns:[],data:[],tooltip:!0,rootParent:"string"==typeof e&&e||o._uid},o._normalizeConfig(i)),o.content=(0,C.getContent)(o),o._scroll={top:0,left:0},o.config.autoWidth=o.config.autoWidth||o.config.fitToContainer,o.config.adjust=o.config.adjust||o.config.columnsAutoWidth,o.config.editable=o.config.editable||o.config.editing,o.config.leftSplit=o.config.leftSplit||o.config.splitAt,o.config.columns.forEach((function(t){"date"===t.type&&t.format&&(t.dateFormat=t.format)})),o._setHTMLEventHandlers(),o.config.eventHandlers)for(var r=0,a=Object.entries(o.config.eventHandlers);r<a.length;r++){var l=a[r],s=l[0],u=l[1];o._htmlEvents[s]=(0,c.eventHandler)((function(t){return{col:o.getColumn((0,c.locate)(t,"data-dhx-col-id")||(0,c.locate)(t,"data-dhx-id"))||{},row:o.data.getItem((0,c.locate)(t,"data-dhx-id"))||{}}}),u,o._htmlEvents[s])}return o._init(),o._dragInit(),o.config.columns&&o._parseColumns(!0),o._canDataParse()&&o.data.parse(o.config.data),o.selection=new y.Selection(o,{type:"string"==typeof o.config.selection&&o.config.selection||"complex",disabled:!o.config.selection,multiSelection:o.config.multiselection},o.events,o._uid),o.mount(e,o._createView()),(null===(n=o._container)||void 0===n?void 0:n.tagName)&&o._observeResize(o._container),i.autoEmptyRow&&0===o.data.getLength()&&(o._addEmptyRow(),o.paint()),o}return o(e,t),e.prototype.destructor=function(){var t;this._destructed=!0,this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),this._cachedSizes=null,this._observedEl=null,this._rowHeights=null,this._colWidths=null,this._destroyContent(),null===(t=this.config.$subRowCells)||void 0===t||t.forEach((function(t){var e;null===(e=t.cell)||void 0===e||e.destructor()})),this.keyManager&&this.keyManager.destructor(),this.events&&this.events.clear(),this._events&&this._events.clear(),this.export=this.content=this.selection=null,this._activeFilters=this._filterData=this._scroll=this._touch=this._htmlEvents=this._hiddenFilters=this.config.$subRowCells=null,this.unmount()},e.prototype.setColumns=function(t){var e=this;this._destroyContent(),this.config.columns=t,this._parseColumns(!0),(0,_.isAutoWidth)(this.config)&&this._applyAutoWidth(),this._setSummary(),this._adjustColumns(),this._checkFilters(),this._checkMarks(),this._normalizeSpans(),this.paint(),this.config.keyNavigation&&(0,l.awaitRedraw)().then((function(){e._initHotKey(!0),e.paint()}))},e.prototype._rebuildRowHeights=function(t){t||(t=this.data.getRawData(0,-1,null,2));for(var e=this._rowHeights.ensureCapacity(t.length),i=0,n=0;n<t.length;n++){var o=t[n];o.hidden||(e[i+1]=e[i]+(0,g.getTotalRowHeight)(o),i++)}this._rowHeights.setLength(i),this.config.$totalHeight=this._rowHeights.totalSize(),this.config.$rowHeights=this._rowHeights,this._rowHeightsRebuild=!1},e.prototype._rebuildColWidths=function(){for(var t=this.config.columns,e=this._colWidths.ensureCapacity(t.length),i=0,n=0;n<t.length;n++)t[n].hidden||(e[i+1]=e[i]+(t[n].$width||0),i++);this._colWidths.setLength(i),this.config.$totalWidth=this._colWidths.totalSize(),this.config.$colWidths=this._colWidths},e.prototype.addRowCss=function(t,e){var i=this.data.getItem(t);if(i){var n=i.$css||"";n.match(new RegExp(e,"g"))||(i.$css=n+" ".concat(e),this.paint())}else(0,f.dhxWarning)('Row with id "'.concat(t,'" not found'))},e.prototype.removeRowCss=function(t,e){var i=this.data.getItem(t);if(i){var n=i.$css?i.$css.replace(e,""):"";i.$css=n,this.paint()}else(0,f.dhxWarning)('Row with id "'.concat(t,'" not found'))},e.prototype.addCellCss=function(t,e,i){var n=this.getColumn(e);if(n){n.$cellCss=n.$cellCss||{};var o=n.$cellCss[t];if(o){var r=o.match(new RegExp(i,"g"))?"":" ".concat(i);n.$cellCss[t]+=r}else this.data.getItem(t)&&(n.$cellCss[t]="".concat(i," "));this.paint()}},e.prototype.removeCellCss=function(t,e,i){var n=this.getColumn(e);n&&(n.$cellCss[t]?(n.$cellCss[t]=n.$cellCss[t].replace(i,""),this.paint()):this.data.getItem(t)&&(n.$cellCss[t]=""))},e.prototype.showColumn=function(t){var e=this.getColumn(t);e&&e.hidden&&this.events.fire(b.GridEvents.beforeColumnShow,[e])&&(this._showColumn(e),this.events.fire(b.GridEvents.afterColumnShow,[e]))},e.prototype.hideColumn=function(t){var e=this.getColumn(t);e&&!e.hidden&&this.events.fire(b.GridEvents.beforeColumnHide,[e])&&(this._hideColumn(e),this.events.fire(b.GridEvents.afterColumnHide,[e]))},e.prototype.isColumnHidden=function(t){var e=this.getColumn(t);if(e)return!!e.hidden},e.prototype.showRow=function(t){if((0,d.isDefined)(t)){var e=t.toString(),i=this.data.getItem(e);i&&i.hidden&&this.events.fire(b.GridEvents.beforeRowShow,[i])&&(this.data.update(e,{hidden:!1}),this._rowHeightsRebuild=!0,this._checkFilters(!0),this.paint(),this.events.fire(b.GridEvents.afterRowShow,[i]))}},e.prototype.hideRow=function(t){if((0,d.isDefined)(t)){var e=t.toString(),i=this.data.getItem(e);i&&this.events.fire(b.GridEvents.beforeRowHide,[i])&&(this.data.update(e,{hidden:!0}),this._rowHeightsRebuild=!0,this._checkFilters(!0),this._checkSelectFilterValue(),this.paint(),this.events.fire(b.GridEvents.afterRowHide,[i]))}},e.prototype.isRowHidden=function(t){if((0,d.isDefined)(t)){var e=this.data.getItem(t.toString());return e?!!e.hidden:void 0}},e.prototype.getScrollState=function(){return{x:this._scroll.left,y:this._scroll.top}},e.prototype.scroll=function(t,e){var i=this.getRootView().refs.grid_body.el.querySelector(".scroll-view")||this.getRootView().refs.grid_body.el;i.scrollLeft=!t&&0!==t||"number"!=typeof t?i.scrollLeft:t,i.scrollTop=!e&&0!==e||"number"!=typeof e?i.scrollTop:e,this.paint()},e.prototype.scrollTo=function(t,e){var i=this.config,n=i.topSplit,o=i.bottomSplit,r=i.columns,a=i.$width,l=i.$height,s=i.$headerHeight,c=r.filter((function(t){return!t.hidden})),u=this.data.getRawData(0,-1,null,2),h=c.findIndex((function(t){return t.id==e})),f=u.findIndex((function(e){return e.id==t}));if((0,d.isDefined)(h)&&(0,d.isDefined)(f)){var p=this.getScrollState(),v=this.selection.getCell(),_=v&&r.findIndex((function(t){return t.id==v.column.id})),m=v&&u.findIndex((function(t){return t.id==v.row.id})),y=(0,w.getCurrFixedCols)(this.config,b.Split.left).length,x=(0,w.getCurrFixedCols)(this.config,b.Split.right).length,C=y&&_<y,S=x&&_>=r.length-x,E=n&&m<n,D=o&&m>=u.length-o,O=(0,g.colsWidth)(this.config,c,0,h),k=(0,g.rowsHeight)(this.config,u,0,f),R=(0,g.getTotalRowHeight)(u[f]);if(y){var T=(0,g.colsWidth)(this.config,c,0,y);(!C&&!S&&h<_||O-p.x-T<0)&&(O-=T)}if(x){var M=(0,g.colsWidth)(this.config,c,c.length-x,c.length);(!C&&!S&&h>_||a+p.x-O-c[h].$width-M<0)&&(O+=M)}if(n){var I=(0,g.rowsHeight)(this.config,u,0,n);(!E&&!D&&f<m||k-p.y-I<0)&&(k-=I)}if(o){var H=(0,g.rowsHeight)(this.config,u,u.length-o,u.length);(!E&&!D&&f>m||l+p.y-s-k-R-H<0)&&(k+=H)}var P=a+p.x,F=l+p.y-s,A=k-p.y-R,$=O-p.x-r[h].$width,j=k+2*R+18-F,L=O+2*r[h].$width+18-P,N=A>0&&j<0?0:A<0?A:j,V=$>0&&L<0?0:$<0?$:L;this.scroll(V+p.x,N+p.y)}},e.prototype.adjustColumnWidth=function(t,e){void 0===e&&(e=!0);var i=this.config.columns.filter((function(t){return!t.hidden})),n=i.filter((function(e){return e.id===t})),o=this._adjustColumnsWidth({rows:this.config.data,cols:n,totalCols:i,adjust:e});this.config.$totalWidth=i.reduce((function(t,e){if(o[e.id]){e.$fixedWidth=!0;var i=e.maxWidth,n=e.minWidth,r=o[e.id];e.$width=r,i&&r>i&&(e.$width=i),n&&e.$width<n&&(e.$width=n)}return t+e.$width}),0),this.paint()},e.prototype.getCellRect=function(t,e){var i,n,o=this.config.columns.filter((function(t){return!t.hidden}));(0,d.isDefined)(e)||(e=this.config.columns[0].id);var r=this.data.getRawData(0,-1),a=this.getSpan(t,e),l=o.findIndex((function(t){return t.id==(a?a.column:e)})),s=r.findIndex((function(e){return e.id==(a?a.row:t)})),c=(0,g.colsWidth)(this.config,o,0,l),u=(0,g.rowsHeight)(this.config,r,0,s);if("bottom"===this.config.footerPosition&&"auto"!==this.config.height&&this.config.$height>=this.config.$totalHeight&&this.config.bottomSplit){var h=r.slice(-this.config.bottomSplit)||[],f=h.findIndex((function(e){return e.id===t}));if(h.length&&-1!==f){var p=(0,w.calcScrollBarWidth)(this.config,!!(null===(i=this.scrollView)||void 0===i?void 0:i.config.enable));u=this.config.$height-this.config.$footerHeight-this.config.$headerHeight-(0,g.rowsHeight)(this.config,r,r.length-this.config.bottomSplit+f,r.length)-p.x-w.BORDERS}}return{x:c,y:u,height:(null==a?void 0:a.rowspan)>1?(0,v.getSpanHeight)(r,a):(0,g.getTotalRowHeight)(r[s])||0,width:(null==a?void 0:a.colspan)>1?(0,v.getWidth)(this.config.columns,a.colspan,this.config.columns.findIndex((function(t){return t.id===a.column}))):(null===(n=o[l])||void 0===n?void 0:n.$width)||0}},e.prototype.getColumn=function(t){for(var e,i=0,n=null===(e=this.config)||void 0===e?void 0:e.columns;i<n.length;i++){var o=n[i];if(o.id==t)return o}},e.prototype.addSpan=function(t){this.config.spans=this.config.spans||[];var e=(0,d.findIndex)(this.config.spans,(function(e){return"".concat(e.row)==="".concat(t.row)&&"".concat(e.column)==="".concat(t.column)}));e>=0?this.config.spans[e]=t:(this.config.spans.push((0,D.normalizeSpan)(t,this.config,this.data)),this._checkMarks(),this.paint())},e.prototype.getSpan=function(t,e){var i,n=this;if(this.config.spans){var o=this.data.getIndex(t.toString()),r=this.config.columns.findIndex((function(t){return t.id===e})),a=(0,d.findIndex)(this.config.spans,(function(t){var e=n.data.getIndex(t.row.toString()),i=n.config.columns.findIndex((function(e){return e.id===t.column})),a=e,l=t.rowspan?e+t.rowspan:e+1,s=i,c=t.colspan?i+t.colspan:i+1;return o>=a&&o<l&&r>=s&&r<c}));return null===(i=this.config)||void 0===i?void 0:i.spans[a]}},e.prototype.removeSpan=function(t,e){if(this.config.spans){var i=(0,d.findIndex)(this.config.spans,(function(i){return"".concat(i.row)=="".concat(t)&&"".concat(i.column)=="".concat(e)}));this.config.spans.splice(i,1),this.paint()}},e.prototype.editCell=function(t,e,i){var n,o=this.data.getItem(t),r=this.getColumn(e);if(o&&r){var a=r.editorType,l=this.getSpan(o.id,r.id);if(!l||"function"!=typeof l.text){if(i||(i=this.config.autoHeight&&"number"!==r.type?"textarea":"input","date"===r.type&&(i="datePicker"),"boolean"===r.type&&(i="checkbox"),a&&(i=a),(0,d.isDefined)(null==l?void 0:l.text)&&(i=this.config.autoHeight?"textarea":"input")),"number"===r.type)if(!((0,d.isDefined)(null==l?void 0:l.text)&&["input","textarea"].includes(i))&&!["input","select","combobox"].includes(i))return;this.events.fire(b.GridEvents.beforeEditStart,[o,r,i])&&((null===(n=this.config.$editable)||void 0===n?void 0:n.editor)||this.config.$editable&&this.config.$editable.row===t&&this.config.$editable.col===e&&this.config.$editable.editorType===i||(this.config.$editable={row:o.id,col:r.id,isSpan:!!l,editorType:i},this.selection.config.disabled||this.selection.setCell(t.toString(),e.toString()),this.paint(),this.events.fire(b.GridEvents.afterEditStart,[o,r,i])))}}else(0,f.dhxWarning)("item not found")},e.prototype.editEnd=function(t){this.config.$editable&&this.config.$editable.editor&&this.config.$editable.editor.endEdit(t)},e.prototype.getHeaderFilter=function(t){var e=this,i=this.getColumn(t);if(i){var n=null;return i.header.forEach((function(o){if(o.content){var r=e.content[o.content];r&&(r.element[t]||r.toHtml(i,e.config),n=r.element[t])}})),n}},e.prototype.getSummary=function(t){return r(r({},this._commonSummary),t?this._colSummary[t]:{})},e.prototype.getSortingState=function(){var t,e=null===(t=this._sortingStates)||void 0===t?void 0:t[0];return{dir:e.dir,by:e.by}},e.prototype._createView=function(){var t=this;return(0,l.create)({render:function(e,i){return t._destructed?(0,l.el)("div"):(0,x.render)(e,i,t._htmlEvents,t.selection,t._uid)},hooks:this._initHooks()},this)},e.prototype._dragInit=function(){(this.config.dragMode||this.config.dragItem)&&(f.dragManager.setItem(this._uid,this),this._dropManager=new O.DropManager({view:this}),this.config.dragItem||(this.config.dragItem="row"),this.config.dragMode||(this.config.dragMode="both"))},e.prototype._parseColumns=function(t){void 0===t&&(t=!1);var e=this.config.columns.filter((function(t){return!t.hidden}));this.config.$filteredColumns=e,this.normalizeColumns({config:this.config,columns:e,configChanged:t}),(0,g.countColumns)(this.config,e)},e.prototype.normalizeColumns=function(t){var e,i,n,o=this,r=t.config,a=t.columns,l=t.configChanged;r.$headerHeightMap=[],r.$footerHeightMap=[],r.$headerHeight=r.$footerHeight=0;for(var s=0,c=a;s<c.length;s++){(p=c[s]).htmlEnable=null!==(e=p.htmlEnable)&&void 0!==e?e:r.htmlEnable,p.$cellCss=p.$cellCss||{},(0,g.normalizeArray)(p,"header"),(0,g.normalizeArray)(p,"footer"),p.minWidth&&p.minWidth<20&&(p.minWidth=20),p.maxWidth&&p.maxWidth<20&&(p.maxWidth=20);var d=p.minWidth||100;p.width&&(d=(d=p.maxWidth&&p.minWidth?p.width>=p.minWidth&&p.width<=p.maxWidth?p.width:p.width>=p.maxWidth?p.maxWidth:p.minWidth:p.maxWidth?p.width<=p.maxWidth?p.width:p.maxWidth>100?p.maxWidth:100:p.minWidth?p.width>=p.minWidth?p.width:p.minWidth:p.width)<20?20:d),p.$width=p.$width&&!l?p.$width:d,p.$width>p.maxWidth&&(p.$width=p.maxWidth),p.$width<p.minWidth&&(p.$width=p.minWidth)}for(var u=function(t){if(null===(i=t.header)||void 0===i?void 0:i.length){var e=0;t.header.forEach((function(i,n){(e=r.headerAutoHeight?o.getNormalizeContentHeight(i,t,r):r.headerRowHeight)>(r.$headerHeightMap[n]||0)&&(r.$headerHeightMap[n]=Math.max(e,r.headerRowHeight))}))}if(null===(n=t.footer)||void 0===n?void 0:n.length){var a=0;t.footer.forEach((function(e,i){(a=r.footerAutoHeight?o.getNormalizeContentHeight(e,t,r):r.footerRowHeight)>(r.$footerHeightMap[i]||0)&&(r.$footerHeightMap[i]=Math.max(a,r.footerRowHeight))}))}},h=0,f=a;h<f.length;h++){var p;u(p=f[h])}r.$headerHeight=r.$headerHeightMap.reduce((function(t,e){return t+e}),0),r.$footerHeight=r.$footerHeightMap.reduce((function(t,e){return t+e}),0)},e.prototype.getNormalizeContentHeight=function(t,e,i){return this.config.footerRowHeight},e.prototype._parseData=function(){this._rowHeightsRebuild=!0,this._detectColsTypes(),this.config.data=this.data.map((function(t){return t})),this.config.data=this._prepareData(this.data),this._checkMarks(),this._applyLocalFilter(),this._checkFilters()},e.prototype._createCollection=function(){this.data=new f.DataCollection(null,this.events)},e.prototype._getRowIndex=function(t){return this.data.getIndex(t)},e.prototype._setHTMLEventHandlers=function(){var t=this,e=function(e){var i,n=t.getColumn((0,c.locate)(e,"data-dhx-col-id")),o=t.data.getItem((0,c.locate)(e,"data-dhx-id"));if(o&&n&&(0,_.isTooltip)(t.config,n)){var a=void 0;if("combobox"===n.editorType||"select"===n.editorType){var l=(0,g.getEditorOptions)(n,o).find((function(t){var e;return(t instanceof Object?t.id.toString():t)===(null===(e=o[n.id])||void 0===e?void 0:e.toString())}));a=l instanceof Object?l.value:l}else if("multiselect"===n.editorType){var s=null===(i=o[n.id])||void 0===i?void 0:i.toString().split(", ");if(null==s?void 0:s.length)a=(0,g.getEditorOptions)(n,o).filter((function(t){return s.includes(t instanceof Object?t.id.toString():t)})).map((function(t){return t instanceof Object?t.value:t})).join(", ")}var d=(0,g.applyPattern)(a||o[n.id],n),u=function(){return!!d||"boolean"==typeof d};n.tooltipTemplate?d=n.tooltipTemplate(d,o,n)||null:u()&&n.template&&(d=n.template(d,o,n)),u()&&(0,_.showTooltip)(d,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,n)},(0,_.getTooltipConfig)(t.config,n)))}},i=function(e,i){var n;void 0===i&&(i="header");var o=(0,c.locate)(e,"data-dhx-text-id"),a=(0,c.locate)(e,"data-dhx-id"),l=t.getColumn(a);if(o&&l){var s=null===(n=l[i])||void 0===n?void 0:n.find((function(t){return t.id===o}));if((0,_.isContentTooltip)(t.config,l,s,i)){var d=null==s?void 0:s.text,u=t.getSummary(l.id);"function"==typeof d&&(d=d(u)),"function"==typeof(null==s?void 0:s.tooltipTemplate)&&(d=s.tooltipTemplate(r({value:d},u),s,l)||null),(null==d?void 0:d.toString().length)&&(0,_.showTooltip)(d,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,l,s)},(0,_.getTooltipConfig)(t.config,l,s,i)))}}},n=function(e){var i,n=t.getColumn((0,c.locate)(e,"data-dhx-col-id")),o=t.data.getItem((0,c.locate)(e,"data-dhx-id")),a=t.getSpan(o.id,n.id);if(o&&a&&(0,_.isTooltip)(t.config,a)){var l=t.getSummary(n.id),s=null===(i=("function"==typeof a.text?a.text(l):a.text)||(0,g.applyPattern)(o[n.id],n))||void 0===i?void 0:i.toString();a.tooltipTemplate?s=a.tooltipTemplate(r({value:s},l),a)||null:n.template&&(s=n.template(s,o,n)),s&&(0,_.showTooltip)(s,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,n)},(0,_.getTooltipConfig)(t.config,null,a)))}};this._htmlEvents={onclick:(0,c.eventHandler)((function(t){return(0,c.locate)(t)}),{"dhx_grid-header-cell--sortable":function(e,i){var n=e.target.getAttribute("dhx_resized"),o=t.getColumn(i);if(o&&(0,_.isSortable)(t.config,o)&&!n){var r=(0,c.locate)(e,"data-dhx-text-id"),a=o.header.find((function(t){return t.id===r}));t._sort(i,a.sortAs)}},"dhx_grid-expand-cell":function(e,i){e.target.classList.contains("dhx_grid-expand-cell-icon")&&t.events.fire(b.GridEvents.expand,[i])},"dhx_span-expand-cell":function(e,i){e.target.classList.contains("dhx_span-expand-cell-icon")&&t.events.fire(b.GridEvents.expand,[i])}}),onscroll:function(e){t.events.fire(b.GridEvents.scroll,[{y:e.target.scrollTop,x:e.target.scrollLeft}])},onmouseover:function(t){for(var o=[{className:"dhx_grid-header-cell",action:function(t){return i(t,"header")}},{className:"dhx_grid-footer-cell",action:function(t){return i(t,"footer")}},{className:"dhx_grid-cell",action:e},{className:"dhx_span-cell",action:n}],r=0,a=o;r<a.length;r++){var l=a[r],s=l.className,d=l.action,u=(0,c.locateNodeByClassName)(t,s);if(u){d(u);break}}}}},e.prototype._setEventHandlers=function(){var t=this;this.data.events.on(f.DataEvents.load,(function(){if(t._applyLocalFilter(!0),t._parseData(),t._parseColumns(),t.config.autoEmptyRow){var e=t.data.find({by:"$emptyRow",match:!0});e?t.data.move(e.id,t.data.getLength()-1):t._addEmptyRow()}t.config.data instanceof f.DataCollection?(0,l.awaitRedraw)().then((function(){return t._normalizeSpans()})):t._normalizeSpans(),t.paint()})),this.data.events.on(f.DataEvents.change,(function(e,i,n){if("load"!==i&&"add"!==i&&"remove"!==i)if(t._rowHeightsRebuild=!0,"setPage"!==i){if("sort"===i?t._setSort():"update"===i?t.config.data=t._prepareData(t.data):((0,f.isTreeCollection)(t.data)?t.config.data=t._prepareData(t.data):t._setSummary(),t._adjustColumns()),(0,d.isId)(e)&&(t._checkFilters(),t._checkSelectFilterValue()),t._detectColsTypes(),t._removeMarks(),t._checkMarks(),t.config.autoEmptyRow&&(!t._activeFilters||(0,d.isEmptyObj)(t._activeFilters))){var o=t.data.find({by:"$emptyRow",match:!0});if(o){if(o.id===e)return;t.data.move(o.id,t.data.getLength()-1)}else t._addEmptyRow()}if("sort"===i)t._normalizeSpans();t._render()}else(0,l.awaitRedraw)().then((function(){var e=t.config.columns.find((function(t){return!0!==t.hidden}));t.scrollTo(t.data.getId(n[0]).toString(),e.id.toString()),t._render()}))})),this.data.events.on(f.DataEvents.filter,(function(e){t._rowHeightsRebuild=!0,e||t.data.getRawFilters({permanent:!0})||t._applyLocalFilter(),!e||(0,f.isOnlyPermanentFilters)(e)?(t._filterData=t.data.map((function(t){return t}))||[],t._setUniqueData(),t._clearFilterValue()):t._checkFilters(),t._setSummary(),t._removeMarks(),t._checkMarks(),t._normalizeSpans(),t.paint()})),this.data.events.on(f.DataEvents.removeAll,(function(){t._hiddenFilters={},t.config.columns.map((function(t){t.header.map((function(e){!e.content||"selectFilter"!==e.content&&"comboFilter"!==e.content||(t.$uniqueData=[])}))})),(0,d.isEmptyObj)(t._activeFilters)||t.data.resetFilter(),t._clearFilterValue(!0)})),this.data.events.on(f.DataEvents.afterAdd,(function(e,i,n){i.length===++n&&t._handleRow(e.id,"add")})),this.data.events.on(f.DataEvents.afterRemove,(function(e,i,n){i.length===++n&&t._handleRow(e.id,"remove")})),this.events.on(f.DragEvents.beforeDrag,(function(e,i,n,o){if("row"===o)return!t.data.isGrouped()&&t.events.fire(b.GridEvents.beforeRowDrag,[e,i])})),this.events.on(f.DragEvents.dragStart,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.dragRowStart,[e,i]),t._autoScroll("vertical")})),this.events.on(f.DragEvents.dragIn,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.dragRowIn,[e,i])})),this.events.on(f.DragEvents.dragOut,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.dragRowOut,[e,i])})),this.events.on(f.DragEvents.canDrop,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.canRowDrop,[e,i])})),this.events.on(f.DragEvents.cancelDrop,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.cancelRowDrop,[e,i])})),this.events.on(f.DragEvents.beforeDrop,(function(e,i,n){if("row"===n)return t.events.fire(b.GridEvents.beforeRowDrop,[e,i])})),this.events.on(f.DragEvents.afterDrop,(function(e,i,n){var o,r=e.source,l=e.target,s=e.start;if("row"===n){var c=t.data.getItem(e.start);if(!c||r.some((function(t){return t==l})))return;for(var d=0,u=t.config.columns;d<u.length;d++){var h=u[d];void 0===c[h.id]&&t.data.update(c.id,((o={})[h.id]=null,o),!0)}var f=t.data.getInitialData(),p=null==f?void 0:f.findIndex((function(t){return t.id==s})),g=null==f?void 0:f.findIndex((function(t){return t.id==l}));if(p>-1&&g>-1)if((null==r?void 0:r.length)>1){for(var v=[],_=function(t){var e=null==f?void 0:f.findIndex((function(e){return e.id==t})),i=null==f?void 0:f.splice(e,1)[0];v.push(i)},m=0,y=r;m<y.length;m++){_(y[m])}g=null==f?void 0:f.findIndex((function(t){return t.id==l})),g>0&&++g,null==f||f.splice.apply(f,a([g,0],v,!1))}else null==f||f.splice(g,0,null==f?void 0:f.splice(p,1)[0]);t._rowHeightsRebuild=!0,t._adjustColumns(),t._checkFilters(),t.paint(),t.events.fire(b.GridEvents.afterRowDrop,[e,i])}})),this.events.on(f.DragEvents.afterDrag,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.afterRowDrag,[e,i]),t._normalizeSpans()})),this.events.on(b.GridEvents.dragPanelItemMouseDown,(function(e,i){t._dragProcess(i,t.data.getItem(e))})),this.events.on(b.GridEvents.cellMouseDown,(function(e,i,n){!t.config.dragPanel&&t._dragProcess(n,e,i)})),this._events.on(b.GridSystemEvents.cellTouchMove,(function(e,i,n){t._touch.start&&n.preventDefault(),t._clearTouchTimer()})),this._events.on(b.GridSystemEvents.cellTouchEnd,(function(){t._touch.start=!1,t._clearTouchTimer()})),this.events.on(b.GridEvents.filterChange,(function(e,i,n,o){var r,a,l;if(t.events.fire(b.GridEvents.beforeFilter,[e,i])){if(t.config.autoEmptyRow){var s=t.data.find({by:"$emptyRow",match:!0});s&&t.data.remove(s.id)}t._activeFilters||(t._activeFilters={});var c=t.getColumn(i),d=c.header.filter((function(t){return t.content===n&&void 0!==t.customFilter}))[0];if("comboFilter"===n&&void 0!==e||"comboFilter"!==n&&""!==e){var u=(0,g.getEditorOptions)(c);"combobox"!==c.editorType&&"select"!==c.editorType&&"multiselect"!==c.editorType||!u||(e=Array.isArray(e)?e.map((function(t){var e;return(null===(e=u.find((function(e){return"string"==typeof e?e===t:e.value===t})))||void 0===e?void 0:e.id)||t})):null!==(a=null===(r=u.find((function(t){return"string"==typeof t?t===e:t.value===e})))||void 0===r?void 0:r.id)&&void 0!==a?a:e);t._activeFilters[i]={by:i,match:e,compare:null!==(l=null==d?void 0:d.customFilter)&&void 0!==l?l:function(e){var i=t.getColumn(e);return function(e,o,r,a){return t.content[n].match({val:e,match:o,obj:r,multi:a,col:i})}}(i),multi:"multiselect"===(null==c?void 0:c.editorType)}}else delete t._activeFilters[i];o||t.data.filter(t._activeFilters)}})),this.events.on(b.GridEvents.scroll,(function(e){t._scroll={top:e.y,left:e.x},t.paint()})),this.events.on(b.GridEvents.cellDblClick,(function(e,i,n){e&&((0,c.locateNodeByClassName)(n,"dhx_boolean-cell")||e.hasOwnProperty("$group")||(!1!==i.editable&&t.config.editable||i.editable)&&t.editCell(e.id,i.id,i.editorType))})),this.events.on(b.GridEvents.afterEditEnd,(function(e,i,n){t._afterEditEndProcess(e,i,n)})),this.events.on(b.GridEvents.headerCellMouseDown,(function(e,i,n){var o=n.target.getAttribute("dhx_resized");if(o&&t.events.fire(b.GridEvents.beforeResizeStart,[i,n])&&(0,S.startResize)(t,o.toString(),n,(function(){t.paint(),t.config.$resizing=null,t.events.fire(b.GridEvents.afterResizeEnd,[i,n])})),n.targetTouches){if(t._touch.timeStamp)t._touch.dblDuration>=t._touch.timeStamp-+n.timeStamp.toFixed()&&(n.preventDefault(),t.events.fire(b.GridEvents.headerCellDblClick,[e,i,n])),t._touch.timeStamp=null;else t._touch.timeStamp=+n.timeStamp.toFixed();setTimeout((function(){t._touch.timeStamp=null}),t._touch.dblDuration)}})),this.events.on(b.GridEvents.footerCellDblClick,(function(e,i,n){if(n.targetTouches){if(t._touch.timeStamp)t._touch.dblDuration>=t._touch.timeStamp-+n.timeStamp.toFixed()&&(n.preventDefault(),t.events.fire(b.GridEvents.footerCellDblClick,[e,i,n])),t._touch.timeStamp=null;else t._touch.timeStamp=+n.timeStamp.toFixed();setTimeout((function(){t._touch.timeStamp=null}),t._touch.dblDuration)}})),this.events.on(b.GridEvents.resize,(function(){return t._parseColumns()})),this.events.on(b.GridEvents.afterResizeEnd,(function(e){var i;t.config.columns=null===(i=t.config.columns)||void 0===i?void 0:i.map((function(t){return t.id==e.id&&(t.width=e.$width),t})),t._parseColumns()}))},e.prototype._afterEditEndProcess=function(t,e,i){var n,o,a=this;if(!(null===(o=this.config.$editable)||void 0===o?void 0:o.editor)||this.config.$editable.col===i.id&&this.config.$editable.row===e.id){var s,c;this.config.$editable?(s=this.config.$editable.row,c=this.config.$editable.col):(s=e.id,c=i.id);var u=this.getSpan(s,c);if((0,d.isDefined)(null==u?void 0:u.text)&&(0,d.isDefined)(t))u.text=t.toString();else{var h=this.data.getItem(s);delete h.$emptyRow,(0,d.isDefined)(t)&&this.data.update(s,r(r({},h),((n={})[c]=t,n)))}this.config.$editable=null,this.paint(),(0,l.awaitRedraw)().then((function(){var t;null===(t=a.selection)||void 0===t||t.restoreFocus()}))}},e.prototype._addEmptyRow=function(){var t=this.data.getId(this.data.getLength()-1),e=this.data.getItem(t),i=this.config.columns.filter((function(t){return!t.hidden}));(0,_.isRowEmpty)(e)||this.data.add(i.reduce((function(t,e){return t[e.id]="",t}),{$emptyRow:!0}))},e.prototype._sort=function(t,e,i){void 0===i&&(i=this.config.multiSort);var n=this.getColumn(t),o=this._sortingStates.find((function(e){return e.by==t}));if(this.events.fire(b.GridEvents.beforeSort,[n,"asc"===(null==o?void 0:o.dir)?"desc":"asc"])){var r="asc";(null==o?void 0:o.by)===t&&(r="asc"===o.dir?"desc":"asc");this.data.sort({by:t,dir:r,as:null!=e?e:function(t){return t&&"date"===n.type?(0,w.getNormalizeDateObject)(t,n.dateFormat).getTime():t?"".concat(t):""}},{smartSorting:i}),this.events.fire(b.GridEvents.afterSort,[n,r])}},e.prototype._setSort=function(){var t,e=null===(t=this.data.getSortingStates())||void 0===t?void 0:t[0];this._sortingStates=e&&[e]||[]},e.prototype._clearTouchTimer=function(){this._touch.timer&&(clearTimeout(this._touch.timer),this._touch.timer=null)},e.prototype._checkFilters=function(t){if(void 0===t&&(t=!1),(0,d.isEmptyObj)(this._activeFilters))t&&this.data.resetFilter(),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData();else{var e=this.data.getRawFilters({permanent:!0});this.data.filter(e,{$restore:!0},!0),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData(),this.data.filter(null,{$restore:!0},!0),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData(!0)}},e.prototype._setUniqueData=function(t){var e=this;void 0===t&&(t=!1),this._filterData&&this.config.columns.forEach((function(i){i.header.forEach((function(n){var o;if(!(null===(o=e._activeFilters)||void 0===o?void 0:o[i.id])&&n.content&&("selectFilter"===n.content||"comboFilter"===n.content)){var r=i.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.multiselection})),a=i.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.filter}));if(!t||t&&!a){var l=(0,g.getNormalizeFilterData)(e._filterData,i.id,r,i.editorType),s=(0,g.getEditorOptions)(i);"combobox"!==i.editorType&&"select"!==i.editorType&&"multiselect"!==i.editorType||!s||(l=l.map((function(t){var e=s.find((function(e){return"string"==typeof e?t===e:t===e.id}));return e&&"string"!=typeof e?e.value:t}))),l="string"!==i.type?Array.from(new Set(l.map((function(t){return(0,g.applyPattern)(t,i)})))):l,t?i.$activeFilterData=l:(i.$uniqueData=l,i.$activeFilterData&&delete i.$activeFilterData)}}}))}))},e.prototype._checkSelectFilterValue=function(){var t,e=null===(t=this.content)||void 0===t?void 0:t.selectFilter;if(e)for(var i in e.value){var n=this.getColumn(i),o=e.value[i];n.hidden||!o||n.$uniqueData.includes(o)||e.element[i].clear()}},e.prototype._clearFilterValue=function(t){var e=this;void 0===t&&(t=!1),["selectFilter","inputFilter","dateFilter"].map((function(t){var i;return null===(i=e.content)||void 0===i?void 0:i[t]})).filter((function(t){return t})).forEach((function(i){for(var n in i.value)!i.value[n]||!t&&e.getColumn(n).hidden||i.element[n].clear(!0)}))},e.prototype._adjustColumns=function(){var t=this,e=this.config.columns.filter((function(t){return!t.hidden})),i=[],n=[],o={};if(e.forEach((function(t){(0,d.isDefined)(t.adjust)?t.adjust&&i.push(t):n.push(t)})),i.length||n.length){var a=this.config.data&&this.config.data.length?this.config.data:this.data.map((function(t){return t}));i.forEach((function(i){o=r(r({},o),t._adjustColumnsWidth({rows:a,cols:[i],totalCols:e,adjust:i.adjust}))})),n.length&&(o=r(r({},o),this._adjustColumnsWidth({rows:a,cols:n,totalCols:e})))}this.config.$totalWidth=e.reduce((function(t,e){if(o[e.id]){e.$fixedWidth=!0;var i=e.maxWidth,n=e.minWidth,r=o[e.id];e.$width=r,i&&r>i&&(e.$width=i),n&&e.$width<n&&(e.$width=n)}return t+e.$width}),0)},e.prototype._prepareData=function(t){var e=this;return(this.config.autoHeight||this.config.headerAutoHeight||this.config.footerAutoHeight)&&(this.config.autoHeight=this.config.headerAutoHeight=this.config.footerAutoHeight=!1),this._normalizeDataType(),this._setSummary(),this._adjustColumns(),t.map((function(t){return t.$height=Number(t.height)||e.config.rowHeight,t}))},e.prototype._adjustColumnsWidth=function(t){var e,i,n,o,r=this,a=t.rows,l=t.cols,s=t.adjust,c=void 0===s?this.config.adjust:s,d={};if("header"===c||!0===c){var u=l.filter((function(t){return t.header}));if(y=(0,g.getMaxColsWidth)(this._prepareColumnData(u,"header"),u,{font:"normal 14.4px Arial"},"header"))for(var h=0,f=Object.entries(y);h<f.length;h++){var p=f[h],v=p[0],m=p[1];d=Object.assign(d,((e={})[v]=+m+24+(o=this.getColumn(v),(0,_.isSortable)(r.config,o)?16:0),e))}}if("footer"===c||!0===c){var y;u=l.filter((function(t){return t.footer}));if(y=(0,g.getMaxColsWidth)(this._prepareColumnData(u,"footer"),u,{font:"normal 14.4px Arial"},"footer"))for(var b=0,x=Object.entries(y);b<x.length;b++){var w=x[b];v=w[0],m=w[1];(d[v]&&d[v]<+m+24||!d[v])&&(d=Object.assign(d,((i={})[v]=+m+24,i)))}}if(("data"===c||!0===c)&&(y=(0,g.getMaxColsWidth)(a,l,{font:"normal 14.4px Arial"},"data")))for(var C=0,S=Object.entries(y);C<S.length;C++){var E=S[C];v=E[0],m=E[1];(d[v]&&d[v]<+m+24||!d[v])&&(d=Object.assign(d,((n={})[v]=+m+24,n)))}return d},e.prototype._prepareColumnData=function(t,e){for(var i,n,o,a=[],l=0;l<t.length;l++){for(var s=[],c=t[l],d=0;d<(null==c?void 0:c[e].length);d++){var u={},h=null===(n=null==c?void 0:c[e][d])||void 0===n?void 0:n.text;if(h){"function"==typeof h&&(h=h(this.getSummary(c.id)));var f=null===(o=null==c?void 0:c[e][d])||void 0===o?void 0:o.htmlEnable;u[c.id]=h||"",f&&(u[c.id]=(0,_.removeHTMLTags)(u[c.id]))}else u[c.id]="";s.push(u)}for(var p=0;p<s.length;p++)for(var g=0,v=Object.entries(s[p]);g<v.length;g++){var m=v[g],y=m[0],b=m[1];a[p]=r({},a[p])||{},a[p]=Object.assign(a[p],((i={})[y]=b,i))}}return a},e.prototype._dragStart=function(t){if(this.config.dragMode&&("row"===this.config.dragItem||"both"===this.config.dragItem)&&!this.config.$editable){var e=this.data.getItem((0,c.locate)(t,"data-dhx-id")).id;t.targetTouches&&(this._touch.start=!0),f.dragManager.onMouseDown({event:t,source:[e],itemsForGhost:[this._getRowGhost([e])],type:"row"})}},e.prototype._dragProcess=function(t,e,i){var n=this;if(t.targetTouches){if(this._touch.timer=setTimeout((function(){n._dragStart(t)}),this._touch.duration),this._touch.timeStamp)this._touch.dblDuration>=this._touch.timeStamp-+t.timeStamp.toFixed()&&((!1!==i.editable&&this.config.editable||i.editable)&&this.editCell(e.id,i.id,i.editorType),t.preventDefault(),this.events.fire(b.GridEvents.cellDblClick,[e,i,t])),this._touch.timeStamp=null;else this._touch.timeStamp=+t.timeStamp.toFixed();setTimeout((function(){n._touch.timeStamp=null}),this._touch.dblDuration)}else this._dragStart(t)},e.prototype._getRowGhost=function(t){for(var e,i=this.config,n=i.$totalWidth,o=i.$width,r=this.getRootNode(),a=(0,w.getCurrFixedCols)(this.config,b.Split.left),l=(0,w.getCurrFixedCols)(this.config,b.Split.right),s=(0,w.calcScrollBarWidth)(this.config,!!(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)),d=[],u=function(e){var i=t[e],u=(0,k.getRowNode)(i,r);if(!u)return"continue";var h=n>o-s.y?o-s.y-w.BORDERS:n;if(a.length||l.length){var f=new Array(3);if(f[1]=u,a.length){var p=(0,k.getRowNode)(i,r,"left");h-=p.offsetWidth,f[0]=p}if(l.length){var g=(0,k.getRowNode)(i,r,"right");h-=g.offsetWidth,f[2]=g}var v=document.createElement("div");return v.style.display="flex",f.forEach((function(t){if(t){var e=t.cloneNode(!0);if(t===u){var i=(0,c.getNodeOffset)(t,r).left-(0,_.getTotalWidth)(a)-w.BORDERS/2;v.appendChild((0,k.getVisibleRowNode)(e,h,i))}else e.removeAttribute("aria-rowindex"),e.style.width=t.offsetWidth+"px",v.appendChild(e)}})),{value:v}}var m=u.cloneNode(!0);d.push((0,k.getVisibleRowNode)(m,h,(0,c.getNodeOffset)(u,r).left-w.BORDERS/2))},h=0;h<t.length;h++){var f=u(h);if("object"==typeof f)return f.value}var p=document.createElement("div");return p.style.setProperty("width","initial","important"),d.forEach((function(t){return p.appendChild(t)})),p},e.prototype._initHooks=function(){var t=this;return{didMount:function(){t._canDataParse(!0)&&(t._container||t._applyAutoWidth(),t.data.parse(t.config.data)),t.config.autoWidth&&t._parseColumns(),t.config.keyNavigation&&(t.keyManager&&t.keyManager.destructor(),t.keyManager=new u.KeyManager((function(e,i){return!(i!==t._uid||!t.events.fire(b.GridEvents.beforeKeyDown,[e]))&&(t.events.fire(b.GridEvents.afterKeyDown,[e]),!0)})),t._initHotKey())}}},e.prototype._normalizeDataType=function(){var t=this,e=this.config.columns.reduce((function(t,e){return"number"===e.type&&t.push(e),t}),[]);e.length&&this.data.forEach((function(i){for(var n,o=0,r=e;o<r.length;o++){var a=r[o],l=(0,g.getValueForNumberColumn)(a,i[a.id]);if(Number.isNaN(l)&&!i.$group)throw new Error("Incorrect data in column with type 'number', see docs: https://docs.dhtmlx.com/suite/grid/api/api_gridcolumn_properties/");i[a.id]!==l&&t.data.update(i.id,((n={})[a.id]=l,n),!0)}}))},e.prototype._applyLocalFilter=function(t){void 0===t&&(t=!1);var e={add:!0,permanent:!0,$local:!0},i=this.data.getRawFilters(),n=Object.keys(i||{}).find((function(t){return i[t].config.$local}));n&&(e.id=n),t?this.data.filter((function(t){return t}),e,!0):this.data.filter((function(t){return t&&!t.hidden}),e,!0)},e.prototype._normalizeSpans=function(){var t,e=this;this.config.spans=null===(t=this.config.spans)||void 0===t?void 0:t.map((function(t){return(0,D.normalizeSpan)(t,e.config,e.data)}))},e.prototype._hideColumn=function(t){t.hidden=!0,this.config.$totalWidth-=t.$width,this._parseColumns(),this.config.data=this._prepareData(this.data);var e=this._activeFilters&&this._activeFilters[t.id];e&&(this._hiddenFilters||(this._hiddenFilters={}),this._hiddenFilters[t.id]=e,delete this._activeFilters[t.id],this._checkFilters()),this._normalizeSpans(),this.paint()},e.prototype._showColumn=function(t){t.hidden=!1,this.config.$totalWidth+=t.$width,this._parseColumns(),this.config.data=this._prepareData(this.data);var e=this._hiddenFilters&&this._hiddenFilters[t.id];e&&(this._activeFilters[t.id]=e,delete this._hiddenFilters[t.id],this._checkFilters(),this._checkSelectFilterValue()),this._normalizeSpans(),this.paint()},e.prototype._setSummary=function(){var t=this,e=this.data.map((function(t){return t})).filter((function(t){return t!=t.$group&&t!=t.$groupSummary}));"tree"===this.config.type&&(e=e.filter((function(e){return!t.data.haveItems(e.id)}))),this.config.summary&&Object.entries(this.config.summary).forEach((function(i){var n=i[0],o=i[1];t._commonSummary[n]=t._applyMethod(o,e)})),this.config.columns.forEach((function(i){var n;if(i.summary){var o=i.id,r=i.summary;t._colSummary[o]||(t._colSummary[o]={}),"string"==typeof r?t._colSummary[o][r]=null===(n=f.methods[r])||void 0===n?void 0:n.call(f.methods,e,o):Object.entries(r).forEach((function(i){var n=i[0],r=i[1];t._colSummary[o][n]=t._applyMethod(r,e,o)}))}}))},e.prototype._init=function(){this.events=new s.EventSystem(this),this._events=new s.EventSystem(this),this._attachDataCollection(),this.export=new p.Exporter({name:"grid",version:this.version,view:this,export:null}),this._setEventHandlers()},e.prototype._observeResize=function(t){var e=this;t&&t!==this._observedEl&&(this._resizeObserver||"undefined"==typeof ResizeObserver||(this._resizeObserver=new ResizeObserver((function(t){var i,n=null===(i=t[0])||void 0===i?void 0:i.target;if(n&&n.clientWidth){var o=getComputedStyle(n),r=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight)||0,a=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom)||0,l=n.clientWidth-r,s=n.clientHeight-a;if(!e._cachedSizes||e._cachedSizes.width!==l||e._cachedSizes.height!==s){var c=!!e._cachedSizes;e._cachedSizes={width:l,height:s},c&&!e._destructed&&e.paint()}}}))),this._resizeObserver&&(this._observedEl&&this._resizeObserver.unobserve(this._observedEl),this._resizeObserver.observe(t),this._observedEl=t,this._cachedSizes=null))},e.prototype._applyMethod=function(t,e,i){var n;return"function"==typeof t?t(e):"string"==typeof t&&(null===f.methods||void 0===f.methods?void 0:f.methods[t])?null===f.methods||void 0===f.methods?void 0:f.methods[t](e,i):Array.isArray(t)&&(null===f.methods||void 0===f.methods?void 0:f.methods[null==t?void 0:t[1]])?null===(n=f.methods[t[1]])||void 0===n?void 0:n.call(f.methods,e,t[0]):null},e.prototype._canDataParse=function(t){var e;return void 0===t&&(t=!1),!!((null===(e=this.config.data)||void 0===e?void 0:e.length)&&this.config.data instanceof Array&&this.config.columns)&&(this.config.autoWidth&&this.config.autoHeight?t:!t)},e.prototype._attachDataCollection=function(){if(this.config.data instanceof f.DataCollection)return this.data=this.config.data,this.data.config.collapsed=this.config.collapsed,void(this.config.data=this.data.serialize());this._createCollection()},e.prototype._setMarks=function(t,e){for(var i=[],n=0,o=this.data.map((function(e){return i.push(e[t.id]),{id:e.id,data:e[t.id],row:e}}));n<o.length;n++){var r=o[n],a=e(r.data,i,r.row,t);a&&(t.$cellCss=t.$cellCss||{},t.$cellCss[r.id]+=" "+a)}},e.prototype._checkMarks=function(){var t=this;this.config.columns.map((function(e){var i=e.mark;i&&("function"==typeof i?t._setMarks(e,i):t._setMarks(e,(function(t,e){var n=[];e.forEach((function(t){null!=t&&""!==t&&n.push(parseFloat(t))}));var o=(0,d.getMinArrayNumber)(n),r=(0,d.getMaxArrayNumber)(n);return i.max&&r===parseFloat(t)?i.max:!(!i.min||o!==parseFloat(t))&&i.min})))}))},e.prototype._removeMarks=function(){this.config.columns.forEach((function(t){t.mark&&(t.$cellCss={})}))},e.prototype._detectColsTypes=function(){this.config.columns.forEach((function(t){return t.type?t:t.numberMask?(t.type="number",t):void(t.type||(t.type="string"))}))},e.prototype._destroyContent=function(){for(var t in this.content)"function"==typeof this.content[t].destructor&&this.content[t].destructor()},e.prototype._render=function(){this.paint()},e.prototype._initHotKey=function(t){void 0===t&&(t=!1);var e=(0,E.getKeysHandlers)(this);for(var i in e)this.keyManager.exist(i)||this.keyManager.addHotKey(i,e[i]);if(!t)for(var i in this.config.hotkeys)this.keyManager.addHotKey(i,this.config.hotkeys[i])},e.prototype._normalizeConfig=function(t){return Object.keys(t).forEach((function(e){e.startsWith("$")&&delete t[e]})),t},e.prototype._autoScroll=function(t){var e,i,n,o,r=(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)?null===(i=this.getRootNode())||void 0===i?void 0:i.querySelector(".scroll-view"):null===(n=this.getRootNode())||void 0===n?void 0:n.querySelector(".dhx_grid-body");if(r){var a=null,l=r.getBoundingClientRect(),s=l.top,c=l.bottom,d=l.left,u=l.right,h=l.height,f=l.width,p=30,g=this.config.dragPanel?(null===(o=this.config.dragPanel)||void 0===o?void 0:o.width)||R.defaultDragPanelConfig.width:0,v=function(t,e){t&&r.scrollBy("left"===t?-40:40,0),e&&r.scrollBy(0,"up"===e?-40:40),(t||e)&&(a=setTimeout((function(){v(t,e)}),100))},_=function(e){var i=e.clientX,n=e.clientY,o=null,r=null;switch(t){case"horizontal":i>u-p&&i<u&&n>s&&n<c?o="right":i>d&&i<d+p&&n>s&&n<c&&(o="left");break;case"vertical":n>c-p&&n<c&&i>d-g&&i<u?r="down":n>s&&n<s+p&&i>d-g&&i<u&&(r="up");break;case"auto":i>u-p&&i<u&&n>s&&n<c?o="right":i>d&&i<d+p&&n>s&&n<c&&(o="left"),n>c-p&&n<c&&i>d-g&&i<u?r="down":n>s&&n<s+p&&i>d-g&&i<u&&(r="up")}o||r?a||v(o,r):a&&(clearTimeout(a),a=null)};(f<r.scrollWidth||h<r.scrollHeight)&&(document.addEventListener("pointermove",_),document.addEventListener("pointerup",(function(){document.removeEventListener("pointermove",_),a&&clearTimeout(a)}),{once:!0}))}},e.prototype._applyAutoWidth=function(){var t,e,i,n,o=this._container||(null===(i=null===(e=null===(t=this.getRootView())||void 0===t?void 0:t.node)||void 0===e?void 0:e.parent)||void 0===i?void 0:i.el);if(o){var r=(0,x.getElementSizes)(o),a=null===(n=this.scrollView)||void 0===n?void 0:n.config.enable;(0,x.applyAutoWidth)(this.config,r,a)}},e.prototype._handleRow=function(t,e){if(this._rowHeightsRebuild=!0,(0,d.isId)(t)&&"remove"===e){var i=this.selection.getCells().find((function(e){return e.row.id===t}));i&&this.selection.removeCell(i.row.id,i.column.id)}if(this.config.data=this._prepareData(this.data),(0,d.isId)(t)&&(this._checkFilters(),this._checkSelectFilterValue()),this._detectColsTypes(),this._removeMarks(),this._checkMarks(),this.config.autoEmptyRow&&(!this._activeFilters||(0,d.isEmptyObj)(this._activeFilters))){var n=this.data.find({by:"$emptyRow",match:!0});if(n){if(n.id===t)return;this.data.move(n.id,this.data.getLength()-1)}else this._addEmptyRow()}this._normalizeSpans(),this._render()},e}(h.View);e.Grid=T},function(t,e,i){"use strict";(function(t){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,i,n,o){return new(n||(n=t))((function(t,r){function a(t){try{s(o.next(t))}catch(t){r(t)}}function l(t){try{s(o.throw(t))}catch(t){r(t)}}function s(e){var i;e.done?t(e.value):(i=e.value,i instanceof n?i:new n((function(t){t(i)}))).then(a,l)}s((o=o.apply(e,i||[])).next())}))},r=this&&this.__generator||function(t,e){var i,n,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(l){return function(s){return function(l){if(i)throw new TypeError("Generator is already executing.");for(;r&&(r=0,l[0]&&(a=0)),a;)try{if(i=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=e.call(t,a)}catch(t){l=[6,t],n=0}finally{i=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Exporter=void 0;var l=i(5),s=i(8),c=i(0),d=i(13),u=i(2),h=i(1),f=i(18),p=i(4),g=function(){function e(t){this._xlsxWorker=null,this._name=t.name,this._version=t.version,this._grid=t.view,this._exportConfigCallback=t.export}return e.prototype.pdf=function(t){return this._rawExport(t,"pdf")},e.prototype.png=function(t){return this._rawExport(t,"png")},e.prototype.xlsx=function(t){void 0===t&&(t={});var e=this._getExportConfig("xlsx");return this._xlsxExport(n({url:"https://cdn.dhtmlx.com/libs/json2excel/next/worker.js?vx",name:"grid",tableName:"data"},t),e)},e.prototype.csv=function(e){var i=this;return void 0===e&&(e={}),new t((function(t){var o,r=i._getExportConfig("csv"),a=(e=n(n({asFile:!0,rowDelimiter:"\n",columnDelimiter:",",skipHeader:0},e),r.typeConfig||{})).name||"grid";o="getRoot"in i._grid.data&&e.flat?i.getFlatCSV(e,r):i._getCSV(e,r),e.asFile&&(0,c.downloadFile)(o,"".concat(a,".csv"),"text/csv"),t(o)}))},e.prototype._getExportData=function(t,e){var i,o=this;if(void 0===t&&(t={}),!(0,l.isWasmSupported)())throw new Error("WebAssembly is not supported by your browser");var r={number:"#,##0.00",percent:"#,##0.00%",date:t.dateFormatMask||"dd/mm/yy",string:"@"},a=this._getExportWidget(null,e),s=a.config.columns.filter((function(t){return!t.hidden})),u=a._colSummary;if(!s.length)return{data:[{name:t.tableName||"data",cols:[],rows:[],merged:[],cells:[]}],styles:[]};var h={},g={},_=(0,l.transpose)(s.map((function(t){return(t.header||[]).map((function(e){var i=e.text;return i?(0,l.removeHTMLTags)("string"==typeof i?i||"":i(u[t.id])):""}))}))),y=(0,l.transpose)(s.map((function(t){return(t.footer||[]).map((function(e){var i=e.text;return{text:i?(0,l.removeHTMLTags)("string"==typeof i?i||"":i(u[t.id])):"",content:t.summary,col_id:t.id}}))}))),b=[],x=[],w=new Map;w.set("default",{css:{color:"#000000",background:"#FFFFFF",fontSize:14},index:w.size});var C=new Map,S={},E={},D=a.config.$headerHeightMap.map((function(t){return{height:t}})),O=e.data.map((function(t,i){D.push({height:t.$height});var n="function"==typeof e.rowCss?e.rowCss(t):"";(t.$css||n)&&(E[t.id]="".concat(t.$css||""," ").concat(n||"").trim()),h[t.id]=i;var r=s.map((function(i,n){var r=i.id,a=i.editorType,s=i.type,c=i.options,u=i.patternMask,h=i.numberMask;S[r]=n;var g=e.spans.find((function(e){return e.column===r&&e.row===t.id})),v=(null==g?void 0:g.text)||t[r],_=t.$group&&o._grid.config.columns.find((function(e){return t.$by==e.id}));if((i.options||_)&&(v=(0,p.getOptionValue)(v,_||i)),"multiselect"===a&&c instanceof Array)return(v||"").split(",").map((function(t){var e=t.trim(),i=c.find((function(t){return"string"==typeof t?t===e:t.id==e}));return i?"object"==typeof i?i.value:i:e})).join(", ");if("date"===s){var m=i.dateFormat||"%M %d %Y";if("string"==typeof v){var y=(0,d.stringToDate)(v,m,!0)?(0,d.stringToDate)(v,m):new Date(v);y instanceof Date&&!isNaN(y.valueOf())&&(v=(0,d.getExcelDate)(y))}else v instanceof Date&&(v=(0,d.getExcelDate)(v))}else"number"===s?("string"==typeof v&&u&&(v=(0,f.removePatternMask)(v,u)),"string"==typeof v&&"object"==typeof h&&(v=(0,f.removeNumberMask)(v,h))):v=(0,p.applyPattern)(v,i);return v||n||!t.$groupName?(0,l.removeHTMLTags)(v):"^ ".concat(t.$groupName)}));return r}));a.config.$footerHeightMap.forEach((function(t){return D.push({height:t})}));for(var k=function(t){var i=t.type,o=t.align,a=t.numberMask,d=t.patternMask,f=t.footer,p=t.header,m=n({},t.$cellCss);(e.spans.filter((function(e){return e.column===t.id}))||[]).forEach((function(t){(null==t?void 0:t.css)&&(m[t.row]="".concat(m[t.row]||""," ").concat(t.css).trim())}));var S="number"===i?"right":o;b.push({width:t.$width});var D=s.indexOf(t);g[t.id]=D;var k="";S&&(k+=" align:".concat(S));var R="";R="number"===i?a?"boolean"==typeof a?r.number:function(t){var e=t.prefix,i=t.suffix,n=t.maxIntLength,o=t.maxDecLength,r=void 0===o?2:o,a="";e&&(a+='"'.concat(e,'"'));if(n)for(var l=0;l<n;l++)a+=l===n-1?"0":"#";else a+="#";if(r){a+=".";for(l=0;l<r;l++)a+="#"}i&&(a+="%"===i?i:'"'.concat(i,'"'));return a}(a):"string"==typeof d&&d.includes("0")&&!["#","a","*"].find((function(t){return d.includes(t)}))?function(t){if(!t.includes("0")&&!t.includes("#"))return"";var e=t.split(""),i="",n=!0;return e.forEach((function(t){"0"===t||"#"===t?(n||(i+='"',n=!0),i+=t):(n&&(i+='"',n=!1),i+=t)})),i}(d):r.number:i&&r[i]||"";var T=v(k+=" format:".concat(R));if(w.has(T))C.set("col_".concat(D),T);else{if($=(0,l.getStyleByClass)("dhx_grid-cell","dhx_grid-cell",w.get("default"))){var M=n(n({},$),{format:R});S&&(M.align=S),M["font-weight"]=M.bold?"bold":"normal",M.fontSize&&(M.fontSize="".concat(M.fontSize,"px")),w.set(T,{css:n(n({},w.get("default").css),M),index:w.size})}C.has("col_".concat(D))||C.set("col_".concat(D),T)}for(var I in f&&f.forEach((function(e,i){var o=e.rowspan,r=void 0===o?0:o,a=e.colspan,s=void 0===a?0:a;if(s||r){var d=O.length+_.length+i;x.push({from:{row:d,column:D},to:{row:d+(r?r-1:0),column:D+(s?s-1:0)}})}var h=e.text?"function"==typeof e.text?e.text(u[t.id]):e.text:"";y[i][D]=n(n({},y[i][D]),{text:(0,l.removeHTMLTags)(h)});var f=R||(0,c.isNumeric)(h)&&"0.00",p="dhx_grid-footer-cell ".concat(e.css||""," ").concat(f," ").concat(e.align),g=v(p);if(!w.has(g)){var m=(0,l.getStyleByClass)(p,"dhx_grid-footer-cell",w.get("default"));if(m){var b=n(n({},m),{f_format:f});e.align&&(b.align=e.align),b["font-weight"]=b.bold?"bold":"normal",b.fontSize&&(b.fontSize="".concat(b.fontSize,"px")),w.set(g,{css:n(n({},w.get("default").css),b),index:w.size})}}C.set("footer_".concat(D,"_").concat(i),g)})),p&&p.forEach((function(t,e){var i=t.rowspan,o=void 0===i?0:i,r=t.colspan,a=void 0===r?0:r;if(a||o){var s=e;x.push({from:{row:s,column:D},to:{row:s+(o?o-1:0),column:D+(a?a-1:0)}})}var c="dhx_grid-header-cell ".concat(t.css||""," ").concat(t.align||""," ").concat(S||""),d=v(c);if(!w.has(d)){var u=(0,l.getStyleByClass)(c,"dhx_grid-header-cell",w.get("default"));if(u){var h=n(n({},u),{format:R});(t.align||S)&&(h.align=t.align||S),w.set(d,{css:n(n({},w.get("default").css),h),index:w.size})}}C.set("header_".concat(D,"_").concat(e),d)})),m){var H="dhx_grid-cell ".concat(m[I].trim()," ").concat(k),P=v(H),F="dhx_grid-row";if(E[I]&&(F+=" ".concat(E[I].trim())),!w.has(P))if($=(0,l.getStyleByClass)(H,F,w.get("default"))){M=n(n(n({},w.get("default").css),$),{format:R});S&&(M.align=S),M["font-weight"]=M.bold?"bold":"normal",M.fontSize&&(M.fontSize="".concat(M.fontSize,"px")),w.set(P,{css:n({},M),index:w.size})}w.has(P)&&C.set("".concat(h[I],"_").concat(D),P)}for(var I in E)if(!(m||{})[I]){var A="".concat(E[I]," format:").concat(R);S&&(A+=" align:".concat(S));var $,j=v(A);F="dhx_grid-row ".concat(E[I].trim());if(!w.has(j))if($=(0,l.getStyleByClass)("dhx_grid-cell",F,w.get("default"))){M=n(n(n({},w.get("default").css),$),{format:R});S&&(M.align=S),M["font-weight"]=M.bold?"bold":"normal",M.fontSize&&(M.fontSize="".concat(M.fontSize,"px")),w.set(j,{css:n({},M),index:w.size})}w.has(j)&&C.set("".concat(h[I],"_").concat(D),j)}},R=0,T=s;R<T.length;R++){k(T[R])}var M=[];w.forEach((function(t){var e={};Object.keys(t.css).forEach((function(i){if(t.css[i])return"bold"===i?e.fontWeight="bold":void(e[i]="".concat(t.css[i]))})),e.verticalAlign="center",M.push(n(n({},e),{id:t.index.toString()}))})),M[0].format="#";var I=[];if(_.length){var H=_.map((function(t,e){return t.map((function(t,i){var n=C.get("header_".concat(i,"_").concat(e))||C.get("col_".concat(i))||"default";return{v:""===t?null:t,s:w.get(n).index}}))}));I.push.apply(I,H)}var P=O.map((function(t,e){return t.map((function(t,i){var n=C.get("".concat(e,"_").concat(i))||C.get("col_".concat(i))||"default";return{v:""===t?null:t,s:w.get(n).index}}))}));if(I.push.apply(I,P),y.length){var F=y.map((function(e,i){return e.map((function(e,n){var o,r=e.text,a=e.content,l=e.col_id,s="string"==typeof a,c=a&&(o=u[l],Object.values(o)[0]==r),d=C.get("footer_".concat(n,"_").concat(i))||C.get("col_".concat(n))||"default";return{v:a&&s&&c?m({func:a,startRow:_.length+1,col:n,rowsCount:P.length,functionsMap:t.mapToExcelFormulas}):""===r?null:r,s:w.get(d).index}}))}));I.push.apply(I,F)}if(null===(i=e.spans)||void 0===i?void 0:i.length){var A=e.spans.map((function(t){var e=h[t.row]+_.length,i=g[t.column],n=t.rowspan,o=void 0===n?1:n,r=t.colspan;return{from:{row:e,column:i},to:{row:e+o-1,column:i+(void 0===r?1:r)-1}}}));x.push.apply(x,A)}return a.destructor(),{data:[{name:t.tableName||"data",cells:I,cols:b,rows:D,merged:x}],styles:M}},e.prototype._xlsxExport=function(e,i){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var o,a;return r(this,(function(r){switch(r.label){case 0:return e=n(n({},e),i.typeConfig||{}),o=this._getExportData(e,i),e.url?[4,this._getXlsxWorker(e.url)]:[3,2];case 1:return a=r.sent(),[2,new t((function(t,i){var n=function(r){if("ready"===r.data.type){a.removeEventListener("message",n);var l=r.data.blob;(0,c.downloadFile)(l,"".concat(e.name||"dhtmlx_grid",".xlsx")),t(o)}else"error"===r.data.type&&(a.removeEventListener("message",n),i(r.data))};a.addEventListener("message",n),a.postMessage({type:"convert",data:o})}))];case 2:return[2,o]}}))}))},e.prototype.getFlatCSV=function(t,e){var i=this._grid.data,n=i.getRoot(),o=e.columns,r=o[0],c=i.getMaxLevel(),d="";i.eachChild(n,(function(e){var n=function(t,e){for(var i=[],n=0;n<=c;n++)if(t&&t[r.id]){i[t.$level]=t[r.id];var o=e.getParent(t.id,!0);t=o&&o.id?o:null}else i[n]="";return i}(e,i).join(t.columnDelimiter);d+=n+Object.keys(e).reduce((function(i,n,o){return"id"===n||"parent"===n||n.startsWith("$")||0===o?i:i+t.columnDelimiter+(null===e[n]?"":e[n])}),""),d+=t.rowDelimiter}));var u=function(t,e){for(var i=0;i<t.length;i++)t[i]=e;return t}(new Array(c+1),""),h=(0,l.transpose)(o.map((function(t){return(t.header||[]).map((function(t){return(0,l.removeHTMLTags)("".concat(t.text||" "))}))})));return h=h.map((function(t){return t.splice.apply(t,a([0,1],u,!1)),t})),new s.CsvDriver(t).serialize(h,!0)+t.rowDelimiter+d},e.prototype._getCSV=function(t,e){var i=this._getExportData(t,e),n=new s.CsvDriver(t),o=i.data[0].cells.map((function(t){return t.map((function(t){return t.v}))}));return n.serialize(o,!0)},e.prototype._rawExport=function(e,i){void 0===e&&(e={});var o=document.createElement("div");o.setAttribute("style","display: none;");var r=this._getExportConfig(i),a=this._getExportWidget(o,r);(e=n(n({},r.typeConfig||{}),e)).url=e.url||"https://export.dhtmlx.com/"+this._name+"/"+i+"/"+this._version;var l="boolean"==typeof e.exportStyles||Array.isArray(e.exportStyles)?e.exportStyles:a.config.exportStyles;if("pdf"===i){var c=e.pdf;e.pdf=n({printBackground:!1,format:"A4"},c)}return new t((function(t,n){(0,h.awaitRedraw)().then((function(){var r="";!0===l?r="".concat((0,u.getPageLinksCss)(),"<style>").concat((0,u.getPageInlineCss)(),"</style>"):Array.isArray(l)&&l.length&&(r="".concat((0,u.getPageLinksCss)(l)));var c=o.children[0];null==c||c.setAttribute("data-dhx-theme",e.theme||"light"),"png"===i&&(null==c||c.setAttribute("style","width: ".concat(a.config.width,"px;")));var d="\n\t\t\t\t\t\t".concat(r,"\n\t\t\t\t\t\t").concat(o.innerHTML,"\n\t\t\t\t\t");fetch(e.url,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({raw:d,config:e})}).then((function(t){return t.ok||(0,s.dhxError)("HTTP error, status: ".concat(t.status)),t.blob()})).then((function(n){var r,l=document.createElement("a");l.href=URL.createObjectURL(n),l.download="".concat(e.name||"grid",".").concat(i),l.click(),URL.revokeObjectURL(l.href),a.destructor(),null===(r=o.parentNode)||void 0===r||r.removeChild(o),t()})).catch((function(t){var e;a.destructor(),null===(e=o.parentNode)||void 0===e||e.removeChild(o),n(t)}))})).catch((function(t){var e;a.destructor(),null===(e=o.parentNode)||void 0===e||e.removeChild(o),n(t)}))}))},e.prototype._getExportWidget=function(t,e){var i,o,r=n(n({},e),{keyNavigation:!1,selection:!1,rangeSelection:!1,blockSelection:!1,clipboard:!1,history:!1,resizable:!1,editable:!1});(null===(i=r.data)||void 0===i?void 0:i.length)||(0,s.dhxWarning)("There is no data to export"),(null===(o=r.columns)||void 0===o?void 0:o.length)||(0,s.dhxWarning)("There is no column for export");var a=new this._grid.constructor(t,(0,c.getCloneObject)(r)),l=a.config.$totalWidth,d=a.config.$totalHeight+a.config.$headerHeight+(a.config.$footer?a.config.$footerHeight:0);return a.config.height=d,a.config.width=l,a.paint(),a},e.prototype._getExportConfig=function(t){var e=n({},this._grid.config);if("function"!=typeof this._exportConfigCallback)return n(n({},e),{spans:e.spans||[]});var i=this._exportConfigCallback(e,t),o=this._grid.data.getRawData(0,-1,null,2)||[];return n(n(n({},e),i),{columns:(i.columns?this._getCallbackData(e.columns,i.columns):e.columns)||[],spans:(i.spans?this._getCallbackData(e.spans,i.spans):e.spans)||[],data:(i.data?this._getCallbackData(o,i.data):o)||[]})},e.prototype._getCallbackData=function(t,e){var i=this;return"function"!=typeof e?null:t.map((function(t,n,o){return e((0,c.getCloneObject)(t),n,o,i._grid)})).filter(Boolean)},e.prototype._getXlsxWorker=function(e){return o(this,void 0,void 0,(function(){var i;return r(this,(function(n){return null===this._xlsxWorker&&(i=window.URL.createObjectURL(new Blob(["importScripts('".concat(e,"');")],{type:"text/javascript"})),this._xlsxWorker=new t((function(t){var e=new Worker(i);e.addEventListener("message",(function(i){"init"===i.data.type&&t(e)}))}))),[2,this._xlsxWorker]}))}))},e}();function v(t){return t.split("").reduce((function(t,e){var i=(t<<5)-t+e.charCodeAt(0);return Math.abs(i&i)}),0).toString()}function _(t){for(var e="";t>=0;)e=String.fromCharCode(t%26+65)+e,t=Math.floor(t/26)-1;return e}function m(t){var e=t.func,i=t.startRow,n=t.col,o=t.rowsCount,r=t.functionsMap,a=void 0===r?{}:r,l="".concat(_(n)).concat(i,":").concat(_(n)).concat(o+i-1),s={sum:"=SUM(".concat(l,")"),avg:"=AVERAGE(".concat(l,")"),count:"=COUNT(".concat(l,")"),max:"=MAX(".concat(l,")"),min:"=MIN(".concat(l,")")};return Object.entries(a).forEach((function(t){var e=t[0],i=t[1];s[e]="=".concat(i,"(").concat(l,")")})),s[e]}e.Exporter=g}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(84),e),o(i(85),e),o(i(86),e),o(i(87),e),o(i(26),e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.message=void 0;var n=i(0),o=i(2),r=i(26),a=new WeakMap,l=new Map;function s(t,e){var i=document.createElement("div");return i.setAttribute("data-position",e),i.className="dhx_message-container dhx_message-container--"+e+(t===document.body?" dhx_message-container--in-body":""),i}e.message=function(t){var e;"string"==typeof t&&(t={text:t}),t.position=t.position||r.MessageContainerPosition.topRight;var i=document.createElement("div");i.className="dhx_widget dhx_message "+(t.css||""),i.setAttribute("role","alert");var c=t.text&&(0,n.uid)();c&&i.setAttribute("aria-describedby",c),t.html?i.innerHTML=t.html:(i.innerHTML='<span class="dhx_message__text" id='.concat(c,"></span>\n\t\t").concat(t.icon?'<span class="dhx_message__icon dxi '.concat(t.icon,'"></span>'):""),i.querySelector("#".concat(c)).textContent=t.text);var d=t.node?(0,o.toNode)(t.node):document.body;"static"===getComputedStyle(d).position&&(d.style.position="relative");var u=l.get(d);u?u[t.position]||(u[t.position]={stack:[],container:s(d,t.position)}):l.set(d,((e={})[t.position]={stack:[],container:s(d,t.position)},e));var h=l.get(d)[t.position],f=h.stack,p=h.container;function g(t){void 0===t&&(t=!0),i&&(!function(t,e){e&&clearTimeout(a.get(t));var i=t.parentNode,n=i.getAttribute("data-position"),o=i.parentNode,r=l.get(o);if(r){var s=r[n];if(s){var c=s.stack,d=c.indexOf(t);-1!==d&&(i.removeChild(t),c.splice(d,1),0===c.length&&o.removeChild(i))}}}(i,t),i=null)}if(0===f.length&&d.appendChild(p),f.push(i),p.appendChild(i),t.expire){var v=setTimeout((function(){return g(!1)}),t.expire);a.set(i,v)}return i.onclick=function(){return g()},{close:function(){return g()}}}},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.alert=void 0;var n=i(38),o=i(39),r=i(0);e.alert=function(e){var i=e.buttons&&e.buttons[0]?e.buttons[0]:n.default.apply,a=(0,o.blockScreen)(e.blockerCss);return new t((function(t){var n="dhx_alert__".concat((0,r.uid)(),"_content"),o="dhx_alert__".concat((0,r.uid)(),"_header"),l=document.createElement("div");l.setAttribute("role","alert"),l.setAttribute("aria-modal","true"),e.text&&l.setAttribute("aria-describedby",n),e.header&&l.setAttribute("aria-labelledby",o),l.className="dhx_widget dhx_alert "+(e.css||"");var s=function(e){"Escape"!==e.key&&"Esc"!==e.key||(c(e),t(!1))};function c(t){t.preventDefault(),a(),document.body.removeChild(l),document.removeEventListener("keydown",s)}l.innerHTML="\n\t\t\t".concat(e.header?"<div id=".concat(o,' class="dhx_alert__header"> ').concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t\t").concat(e.text?"<div id=".concat(n,' class="dhx_alert__content">').concat(!1!==e.htmlEnable?e.text:"","</div>"):"",'\n\t\t\t<div class="dhx_alert__footer ').concat(e.buttonsAlignment?"dhx_alert__footer--"+e.buttonsAlignment:"",'">\n\t\t\t\t<button type="button" aria-label="confirm" class="dhx_alert__apply-button dhx_button dhx_button--view_flat dhx_button--color_primary dhx_button--size_medium">').concat(i,"</button>\n\t\t\t</div>"),!1===e.htmlEnable&&(e.header&&(l.querySelector("#".concat(o)).textContent=e.header),e.text&&(l.querySelector("#".concat(n)).textContent=e.text)),document.body.appendChild(l),l.querySelector(".dhx_alert__apply-button").focus(),l.querySelector("button").addEventListener("click",(function(e){c(e),t(!0)})),document.addEventListener("keydown",s)}))}}).call(this,i(9))},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.confirm=void 0;var n=i(38),o=i(39),r=i(0);e.confirm=function(e){e.buttonsAlignment=e.buttonsAlignment||"right";var i=e.buttons&&e.buttons[1]?e.buttons[1]:n.default.apply,a=e.buttons&&e.buttons[0]?e.buttons[0]:n.default.reject,l=(0,o.blockScreen)("dhx_alert__overlay-confirm "+(e.blockerCss||""));return new t((function(t){var n=document.createElement("div");n.setAttribute("role","alertdialog"),n.setAttribute("aria-modal","true");var o,s=e.header&&(0,r.uid)(),c=e.header&&(0,r.uid)();c&&n.setAttribute("aria-describedby",c),s&&n.setAttribute("aria-labelledby",s);var d=function(e){l(),n.removeEventListener("click",u),document.removeEventListener("keydown",h),document.body.removeChild(n),t(e)},u=function(t){"BUTTON"===t.target.tagName&&d(t.target.classList.contains("dhx_alert__confirm-aply"))},h=function(t){"Escape"===t.key||"Esc"===t.key?(n.querySelector(".dhx_alert__confirm-aply").focus(),d(t.target.classList.contains("dhx_alert__confirm-reject"))):"Tab"===t.key&&("aply"===o?(o="reject",n.querySelector(".dhx_alert__confirm-reject").focus()):(o="aply",n.querySelector(".dhx_alert__confirm-aply").focus()),t.preventDefault())};n.className="dhx_widget dhx_alert dhx_alert--confirm"+(e.css?" "+e.css:""),n.innerHTML="\n\t\t".concat(e.header?'<div class="dhx_alert__header" id='.concat(s,"> ").concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t").concat(e.text?'<div class="dhx_alert__content" id='.concat(c,">").concat(!1!==e.htmlEnable?e.text:"","</div>"):"",'\n\t\t\t<div class="dhx_alert__footer ').concat(e.buttonsAlignment?"dhx_alert__footer--"+e.buttonsAlignment:"",'">\n\t\t\t\t<button type="button" aria-label="reject" class="dhx_alert__confirm-reject dhx_button dhx_button--view_link dhx_button--color_primary dhx_button--size_medium">').concat(a,'</button>\n\t\t\t\t<button type="button" aria-label="aply"class="dhx_alert__confirm-aply dhx_button dhx_button--view_flat dhx_button--color_primary dhx_button--size_medium">').concat(i,"</button>\n\t\t\t</div>"),!1===e.htmlEnable&&(e.header&&(n.querySelector("#".concat(s)).textContent=e.header),e.text&&(n.querySelector("#".concat(c)).textContent=e.text)),document.body.appendChild(n),o="aply",n.querySelector(".dhx_alert__confirm-aply").focus(),n.addEventListener("click",u),document.addEventListener("keydown",h)}))}}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.disableTooltip=e.enableTooltip=e.tooltip=e.getZIndex=e.findPosition=void 0;var o=i(2),r=i(26),a=750,l=200;function s(t,e,i,n,o,a){var l,c,d;if(void 0===o&&(o=8),void 0===a&&(a=0),a>1&&(e=r.Position.center),"top"!==e&&"bottom"!==e){var u=t.top+(t.height-n)/2,h=u<0&&window.pageYOffset+u+n<scrollY+window.innerHeight;d=window.pageYOffset+(h?0:u)}switch(e){case r.Position.center:return(c=t.left+window.pageXOffset+(t.width-i)/2)+o<window.pageXOffset&&(c=t.left+window.pageXOffset),{left:c,top:d,pos:l=r.RealPosition.center};case r.Position.right:return l=r.RealPosition.right,(c=t.right+window.pageXOffset+o)+i>window.innerWidth+window.pageXOffset?s(t,r.Position.left,i,n,o,++a):{left:c,top:d,pos:l};case r.Position.left:return l=r.RealPosition.left,(c=window.pageXOffset+t.left-i-o)<0?s(t,r.Position.right,i,n,o,++a):{left:c,top:d,pos:l};case r.Position.top:return l=r.RealPosition.top,(c=window.pageXOffset+t.left+(t.width-i)/2)+i>window.innerWidth+window.pageXOffset?c=window.innerWidth+window.pageXOffset-i:c<0&&(c=0),t.top<n?s(t,r.Position.bottom,i,n,o,++a):{left:c,top:d=window.pageYOffset+t.top-n-o,pos:l};case r.Position.bottom:default:return(c=window.pageXOffset+t.left+(t.width-i)/2)+i>window.innerWidth+window.pageXOffset?c=window.innerWidth+window.pageXOffset-i:c<0&&(c=0),l=r.RealPosition.bottom,(d=window.pageYOffset+t.bottom+o)+n>window.innerHeight+window.pageYOffset?s(t,r.Position.top,i,n,o,++a):{left:c,top:d,pos:l}}}e.findPosition=s;var c=document.createElement("div"),d=document.createElement("span");d.className="dhx_tooltip__text",c.appendChild(d),c.setAttribute("role","tooltip"),c.style.position="absolute";var u,h=null,f=!1,p=null,g=null;function v(t){return t&&(t.classList.contains("dhx_popup--window")&&t.classList.contains("dhx_popup--window_active")||t.classList.contains("dhx_popup--window_modal")||t.classList.contains("dhx_popup"))?1e7:(null==t?void 0:t.classList.contains("dhx_popup--window"))?9999999:t&&t.offsetParent?v(t.offsetParent):null}function _(t,e,i,n,o,a,l){void 0===n&&(n=""),void 0===o&&(o=!1),void 0===a&&(a=8);var u=t.getBoundingClientRect();l?d.innerHTML=e:d.textContent=e,c.style.left=null,c.style.top=null,document.body.appendChild(c),c.className="dhx_widget dhx_tooltip ".concat(o?" dhx_tooltip--forced":""," ").concat(n);var h=c.getBoundingClientRect(),p=s(u,i,h.width,h.height,a),g=p.left,_=p.top,m=p.pos,y=v(t);switch(y&&(c.style.zIndex=y.toString()),m){case r.RealPosition.bottom:case r.RealPosition.top:case r.RealPosition.left:case r.RealPosition.right:case r.RealPosition.center:c.style.left=g+"px",c.style.top=_+"px"}c.className+=" dhx_tooltip--".concat(m),f=!0,o||setTimeout((function(){c.className+=" dhx_tooltip--animate"}))}function m(t,e,i){var n=i.force,o=i.showDelay,s=i.hideDelay,d=i.position,v=i.css,m=i.htmlEnable,y=i.margin;n||(g=setTimeout((function(){_(t,e,d||r.Position.bottom,v,!1,y,m)}),o||a));var b=function(){var e;f&&(e=s,h&&(p=setTimeout((function(){document.body.removeChild(c),f=!1,p=null}),e||l))),clearTimeout(g),t.removeEventListener("mouseleave",b),t.removeEventListener("blur",b),document.removeEventListener("mousedown",b),h=null,u=null};n&&_(t,e,d,v,n,y,m),t.addEventListener("mouseleave",b),t.addEventListener("blur",b),document.addEventListener("mousedown",b),u=b}function y(t,e){var i=(0,o.toNode)(e.node);i!==h&&(u&&(u(),u=null),h=i,p?(clearTimeout(p),p=null,m(i,t,n(n({},e),{force:!0}))):m(i,t,e))}function b(t){var e=(0,o.locateNode)(t,"dhx_tooltip_text");e&&y(e.getAttribute("dhx_tooltip_text"),{position:e.getAttribute("dhx_tooltip_position")||r.Position.bottom,node:e})}e.getZIndex=v,e.tooltip=y,e.enableTooltip=function(){document.addEventListener("mousemove",b)},e.disableTooltip=function(){document.removeEventListener("mousemove",b)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrefixSums=void 0;var n=function(){function t(){this._prefix=new Float64Array(1),this._length=0}return t.prototype.ensureCapacity=function(t){return this._prefix.length<t+1&&(this._prefix=new Float64Array(t+1)),this._prefix[0]=0,this._prefix},t.prototype.setLength=function(t){this._length=t},t.prototype.totalSize=function(){return this._prefix[this._length]},t.prototype.rangeSize=function(t,e){var i=t<0?0:t,n=e>this._length?this._length:e;return n<=i?0:this._prefix[n]-this._prefix[i]},t.prototype.itemSize=function(t){return t<0||t>=this._length?0:this._prefix[t+1]-this._prefix[t]},t.prototype.findIndex=function(t){if(0===this._length)return 0;if(t<=0)return 0;if(t>=this._prefix[this._length])return this._length-1;for(var e=0,i=this._length;e<i;){var n=e+i>>1;this._prefix[n+1]>t?i=n:e=n+1}return e},Object.defineProperty(t.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this._length=0,this._prefix=new Float64Array(1)},t}();e.PrefixSums=n},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=e.GridSelectionEvents=void 0;var r,a=i(1),l=i(8),s=i(0),c=i(6),d=i(3),u=i(17),h=i(7),f=i(5),p=i(14),g=i(4);!function(t){t.beforeUnSelect="beforeUnSelect",t.afterUnSelect="afterUnSelect",t.beforeSelect="beforeSelect",t.afterSelect="afterSelect"}(r||(e.GridSelectionEvents=r={}));var v=function(){function t(t,e,i,o){this._grid=t,this._gridId=o,this._selectedCell=null,this._selectedCells=[],this._selectedSet=new Set,this.config=n({type:"complex",disabled:!1,multiSelection:!1},e),this.events=i||new c.EventSystem(this),this._init()}return t.prototype.setCell=function(t,e,i,n){var r,l,s,c,d,h,f,p,g,v,_,m,y,b=this;void 0===i&&(i=!1),void 0===n&&(n=!1);var x="tree"===this._grid.config.type;if(this._gridId&&u.focusManager.getFocusId()!==this._gridId&&u.focusManager.setFocusId(this._gridId),"row"===this.config.type&&(null===(s=this._selectedCells[0])||void 0===s?void 0:s.row.id)===((null==t?void 0:t.id)||t)||"row"!==this.config.type&&(null===(c=this._selectedCells[0])||void 0===c?void 0:c.row.id)===((null==t?void 0:t.id)||t)&&(null===(d=this._selectedCells[0])||void 0===d?void 0:d.column.id)===((null==e?void 0:e.id)||e)){if(i)return this._removeCell(null===(h=this._selectedCells[0])||void 0===h?void 0:h.row,null===(f=this._selectedCells[0])||void 0===f?void 0:f.column),void(0,a.awaitRedraw)().then((function(){b._grid.paint(),b._setBrowserFocus()}));if("row"===this.config.type&&e&&this._selectedCell){var w=this._grid.getColumn(e.id||e);if(w&&w.id!==(null===(p=this._selectedCell.column)||void 0===p?void 0:p.id))return this._selectedCell={row:this._selectedCell.row,column:w},void(0,a.awaitRedraw)().then((function(){return b._setBrowserFocus()}))}if(!this.config.multiSelection||this.config.multiSelection&&1===this._selectedCells.length)return}if(!(this.config.disabled||this._grid.config.$editable||!this.config.multiSelection&&this._selectedCells.length&&!this._removeCell(null===(g=this._selectedCell)||void 0===g?void 0:g.row,null===(v=this._selectedCell)||void 0===v?void 0:v.column))){if(this.config.multiSelection){if(i||n||this._removeCells(),this.isSelectedCell(t,e))return void this.removeCell((null==t?void 0:t.id)||t,(null==e?void 0:e.id)||e);n&&this._selectedCells.length>1&&!x&&o([],this._selectedCells,!0).forEach((function(t,e){var i=t.row,n=t.column;e>0&&b.removeCell(i.id,n.id)}))}t=this._grid.data.getItem(t&&t.id||t);var C=null===(m=null===(_=this._grid.config)||void 0===_?void 0:_.columns)||void 0===m?void 0:m.filter((function(t){return!t.hidden}));if(e||(e=null==C?void 0:C[0]),(e=this._grid.getColumn(e.id||e))&&t){if(this.config.multiSelection&&n&&this._selectedCells.length&&!x){var S=null===(y=this._selectedCells)||void 0===y?void 0:y[0],E=this._grid.data.getIndex(S.row.id),D=this._grid.data.getIndex(t.id);if(E>D&&(E=(r=[D,E])[0],D=r[1]),"cell"===this.config.type||"complex"===this.config.type){var O=C.map((function(t){return t.id})),k=O.indexOf(S.column.id),R=O.indexOf(e.id);if(-1!==k&&-1!==R){k>R&&(k=(l=[R,k])[0],R=l[1]);var T=C.slice(k,R+1);this._grid.data.mapRange(E,D,(function(t){T.forEach((function(e){-1===b._findIndex({row:t,column:e})&&b._setCell(t,e)}))}))}}else this._grid.data.mapRange(E,D,(function(t){-1===b._findIndex({row:t,column:e})&&b._setCell(t,e)}))}else this._setCell(t,e);(0,a.awaitRedraw)().then((function(){b._grid.paint(),b._setBrowserFocus()}))}}},t.prototype.removeCell=function(t,e){var i=this;if(t&&e&&("cell"===this.config.type||"complex"===this.config.type)){var n=this._selectedCells.find((function(i){var n=i.row,o=i.column;return n.id==t&&o.id==e}));n&&this._removeCell(n.row,n.column)}else if(t){this._selectedCells.filter((function(e){return e.row.id==t})).forEach((function(t){var e=t.row,n=t.column;i._removeCell(e,n)}))}else this._removeCells();(0,a.awaitRedraw)().then((function(){i._grid.paint()}))},t.prototype.getCell=function(){return this._selectedCell},t.prototype.getCells=function(){return this._selectedCells},t.prototype.disable=function(){this.removeCell(),this.config.disabled=!0,this._grid.paint()},t.prototype.enable=function(){this.config.disabled=!1,this._grid.paint()},t.prototype.isSelectedCell=function(t,e){var i=(null==t?void 0:t.id)||t,n=(null==e?void 0:e.id)||e;return this._selectedSet.has(this._cellKey(i,n))},t.prototype.restoreFocus=function(){this._setBrowserFocus()},t.prototype.toHTML=function(){var t=this;if(!this._isUnselected()){if(this.config.multiSelection){var e=[],i={};return this._selectedCells.forEach((function(n,o,r){var a=(0,p.normalizeCell)(n,t._grid);e.push(t._toHTML(a.row,a.column,o===r.length-1||"cell"===t.config.type||"complex"===t.config.type,i[n.row.id])),i[n.row.id]=!0})),e}var n=(0,p.normalizeCell)(this._selectedCell,this._grid);return this._toHTML(n.row,n.column,!0)}},t.prototype._setCell=function(t,e){t&&e&&(0,s.isDefined)(t.id)&&(0,s.isDefined)(e.id)&&this.events.fire(r.beforeSelect,[t,e])&&(this._selectedCell={row:t,column:e},this.config.multiSelection?this._selectedCells.push(this._selectedCell):(this._selectedSet.clear(),this._selectedCells=[this._selectedCell]),this._selectedSet.add(this._cellKey(t.id,e.id)),this.events.fire(r.afterSelect,[t,e]))},t.prototype._removeCell=function(t,e,i){var n,o;if(void 0===i&&(i=!1),!(t&&e&&(0,s.isDefined)(t.id)&&(0,s.isDefined)(e.id)))return!1;if(!i&&!this.events.fire(r.beforeUnSelect,[t,e]))return!1;var a=this._selectedCells.findIndex((function(i){return i.row.id===t.id&&i.column.id===e.id}));return this._selectedCells.splice(a,1),this._selectedSet.delete(this._cellKey(t.id,e.id)),this._selectedCell&&e.id===this._selectedCell.column.id&&t.id===this._selectedCell.row.id&&(this._selectedCell=(null===(n=this._selectedCells)||void 0===n?void 0:n[(null===(o=this._selectedCells)||void 0===o?void 0:o.length)-1])||null),!i&&this.events.fire(r.afterUnSelect,[t,e]),!0},t.prototype._removeCells=function(t){var e=this;void 0===t&&(t=!1),this._selectedSet.clear(),o([],this._selectedCells,!0).forEach((function(i){e._removeCell(null==i?void 0:i.row,null==i?void 0:i.column,t)}))},t.prototype._init=function(){var t=this;this._grid.events.on(d.GridEvents.cellClick,(function(e,i,n){t.setCell(e,i,n.ctrlKey||n.metaKey,n.shiftKey)})),this._grid.data.events.on(l.DataEvents.beforeRemove,(function(e){var i,n;if(e&&t._selectedCell&&t._selectedCell.row&&t._selectedCell.row.id===e.id){var o=void 0,r=t._grid.data.getIndex(e.id);if(t._grid.data instanceof l.TreeCollection){var a=t._grid.data.getItems(e.parent);o=(null===(i=a[r+1])||void 0===i?void 0:i.id)||(null===(n=a[r-1])||void 0===n?void 0:n.id)||e.parent}else o=t._grid.data.getId(r+1)||t._grid.data.getId(r-1);(0,s.isId)(o)&&(t.setCell(o),t._grid.paint())}})),this._grid.data.events.on(l.DataEvents.removeAll,(function(){t._removeCells()})),this._grid.data.events.on(l.DataEvents.load,(function(){t._removeCells(!0)}))},t.prototype._toHTML=function(t,e,i,n){var o,r,l,c,u,p,v,_,m,y,b,x,w;void 0===i&&(i=!1),void 0===n&&(n=!1);var C=this._grid.data.getRawData(0,-1,null,2);if(-1===(0,s.findIndex)(C,(function(e){return e.id==t.id})))return null;var S=this._grid.config,E=S.topSplit,D=S.bottomSplit,O=S.$totalWidth,k=S.$totalHeight,R=S.columns,T=null==R?void 0:R.filter((function(t){return!t.hidden})),M={left:(0,h.getCurrFixedCols)(this._grid.config,d.Split.left),right:(0,h.getCurrFixedCols)(this._grid.config,d.Split.right)},I=this._grid.data.getLength(),H={top:E?this._grid.data.getRawData(0,E):[],bottom:D?this._grid.data.getRawData(I-D,I):[]},P={left:null===(o=null==M?void 0:M.left)||void 0===o?void 0:o.map((function(t){return t.id})),right:null===(r=null==M?void 0:M.right)||void 0===r?void 0:r.map((function(t){return t.id}))},F={top:H.top.map((function(t){return t.id})),bottom:H.bottom.map((function(t){return t.id}))},A=null===(l=null==M?void 0:M.left)||void 0===l?void 0:l.reduce((function(t,e){return t+(e.$width||0)}),0),$=null===(c=null==M?void 0:M.right)||void 0===c?void 0:c.reduce((function(t,e){return t+(e.$width||0)}),0),j=H.top.reduce((function(t,e){return t+(0,g.getTotalRowHeight)(e)}),0),L=H.bottom.reduce((function(t,e){return t+(0,g.getTotalRowHeight)(e)}),0),N=this._grid.getCellRect(t.id,e.id);t.$subRowHeight&&t.$opened&&(N.height=N.height-t.$subRowHeight);var V,W,z,B,G=this._grid.getScrollState(),Y=N.y,U=null===(u=F.top)||void 0===u?void 0:u.includes(t.id),X=null===(p=P.left)||void 0===p?void 0:p.includes(e.id),q=M.left.length&&A>N.x-G.x,K=H.top.length&&j>N.y-G.y,Z=N.width,J=N.height,Q=null,tt=null,et=q?A+G.x:N.x;if(q&&(Z-=(X?(0,f.getTotalWidth)(M.left.slice(0,T.indexOf(e))):A)-(N.x-G.x)),K&&(J-=(U?(0,f.getTotalHeight)(H.top.slice(0,C.indexOf(t))):j)-(N.y-G.y)-1,Y+=N.height-J),U)if(Y=N.y+G.y,(nt=this._grid.getSpan(t.id,e.id))&&nt.rowspan>1){var it=C.indexOf(t);Q=(0,f.getTotalHeight)(H.top.slice(it,it+nt.rowspan))}else J=E===F.top.indexOf(t.id)+1?N.height-1:N.height;if(X)if(et=N.x+G.x,(nt=this._grid.getSpan(t.id,e.id))&&nt.colspan>1){it=null==T?void 0:T.indexOf(e);tt=(0,f.getTotalWidth)(M.left.slice(it,it+nt.colspan))}else Z=M.left.length===P.left.indexOf(e.id)+1?N.width-1:N.width;if((null===(v=M.right)||void 0===v?void 0:v.length)||D){var nt=this._grid.getSpan(t.id,e.id),ot=(0,g.getReverseScrollState)(this._grid);if((null===(_=M.right)||void 0===_?void 0:_.length)&&(V=(null===(m=P.right)||void 0===m?void 0:m.includes(e.id))||nt&&T.indexOf(e)+(nt.colspan||1)>T.length-M.right.length,(W=O-$<ot.x+N.x+N.width)&&!V&&(Z-=ot.x+N.x+N.width-O+$),V))if(nt&&!(null===(y=P.right)||void 0===y?void 0:y.includes(nt.column))){it=T.length-T.indexOf(e)-(nt.colspan||1);var rt=O-$;et=N.x+ot.x<rt+1?N.x:rt-ot.x+1,tt=(0,f.getTotalWidth)(it?M.right.slice(0,-it):M.right)-1,Z=N.width-ot.x}else{var at=(null===(b=P.right)||void 0===b?void 0:b.indexOf(e.id))?0:1;et=N.x-ot.x+at,Z=N.width-at}if(D&&(z=F.bottom.includes(t.id)||nt&&C.indexOf(t)+(nt.rowspan||1)>C.length-D,(B=k-L<ot.y+N.y+N.height)&&!z&&(J-=ot.y+N.y+N.height-k+L),z))if(nt&&!F.bottom.includes(nt.row)){var lt=k-L;at=(it=C.length-C.indexOf(t)-(nt.rowspan||1))?0:1;Y=N.y+ot.y<lt?N.y:lt-ot.y,Q=(0,f.getTotalHeight)(it?H.bottom.slice(0,-it):H.bottom)-at,J=N.height-ot.y-at}else Y=N.y,J=N.height-(D===F.bottom.indexOf(t.id)+1?1:0)}var st=null;"row"!==this.config.type&&"complex"!==this.config.type||n||(st=(0,a.el)(".dhx_grid-selected-row",{style:{width:(null===(x=M.left)||void 0===x?void 0:x.length)?O-G.x:O,height:J,minHeight:Q,minWidth:tt,display:J<0&&!Q?"none":"flex",top:Y,left:(null===(w=M.left)||void 0===w?void 0:w.length)?G.x:0,position:"absolute"}}));var ct=null;return"cell"!==this.config.type&&"complex"!==this.config.type||!i||(ct=(0,a.el)(".dhx_grid-selected-cell",{style:{width:Z,height:J,top:Y,minHeight:Q,minWidth:tt,left:et,position:"absolute",display:Z<0&&!tt||J<0&&!Q?"none":"flex",borderLeft:q&&!X?"none":null,borderRight:W&&!V?"none":null,borderTop:K&&!U?"none":null,borderBottom:B&&!z?"none":null}})),(0,a.el)(".dhx_grid-selection",{style:{zIndex:20}},[st,ct])},t.prototype._isUnselected=function(){return!this._selectedCell||!this._selectedCell.row||!this._selectedCell.column||0===this._selectedCells.length},t.prototype._findIndex=function(t){var e=this;void 0===t&&(t=this._selectedCell);var i=-1;return this._selectedCells.some((function(n,o){if("cell"===e.config.type||"complex"===e.config.type){if((0,s.compare)(n.row,t.row)&&(0,s.compare)(n.column,t.column))return i=o,!0}else if("row"===e.config.type&&(0,s.compare)(n.row,t.row))return i=o,!0})),i},t.prototype._cellKey=function(t,e){return"row"===this.config.type?""+t:t+"_"+e},t.prototype._setBrowserFocus=function(){var t=this._grid.getRootView().data.getRootNode();if(t){var e=t.querySelector(".dhx_grid_data");if(e&&this._selectedCell&&this._selectedCell.row&&this._selectedCell.column){var i=e.querySelector('[data-dhx-id="'.concat(this._selectedCell.row.id,'"]')),n=this._grid.getSpan(this._selectedCell.row.id,this._selectedCell.column.id);if(i){var o=n?t.querySelector(".dhx_span-spans"):null,r=o?o.querySelector('[data-dhx-col-id="'.concat(n.column,'"][data-dhx-id="').concat(n.row,'"]')):i.querySelector('[data-dhx-col-id="'.concat(this._selectedCell.column.id,'"]'));r&&(r.tabIndex=0,r.focus({preventScroll:!0}))}}}},t}();e.Selection=v},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.proRender=e.render=e.applyAutoWidth=e.getElementSizes=e.getRenderConfig=void 0;var o=i(1),r=i(2),a=i(4),l=i(5),s=i(8),c=i(3),d=i(19),u=i(54),h=i(55),f=i(0),p=i(7),g=i(116),v=i(117),_=i(118),m=i(20);function y(t,e,i,n){var o=void 0===i?[0,0]:i,r=o[0],a=o[1],l=t[0],s=t[1],c=e[0],d=e[1];return c<=l&&l<=d||c<=s&&s<=d||l<=c&&d<=s||l<r||a&&s>=n-a}function b(t,e,i){var o=t.config,r=o.spans,l=void 0===r?[]:r,d=o.columns,u=o.leftSplit,h=void 0===u?0:u,f=o.topSplit,g=void 0===f?0:f,_=o.rightSplit,m=void 0===_?0:_,b=o.bottomSplit,x=void 0===b?0:b,w=o.$filteredColumns||d.filter((function(t){return!t.hidden})),C=(0,a.calculateVisibleRange)(i,t._scroll,o,e),S=w.slice(C.xStart,C.xEnd),E=e.slice(C.yStart,C.yEnd),D=l.filter((function(t){var i;if(!(null===(i=t.$renderFrom)||void 0===i?void 0:i.length))return!1;var n=y(t.$rowsVisibility,[C.yStart,C.yEnd],[g,x],e.length),o=y(t.$colsVisibility,[C.xStart,C.xEnd],[h,m],d.length);return n&&o})),O={left:(0,p.getCurrFixedCols)(o,c.Split.left),right:(0,p.getCurrFixedCols)(o,c.Split.right)},k={top:e.slice(0,o.topSplit||0),bottom:o.bottomSplit?e.slice(-o.bottomSplit):[]};return t.config.$subRowCells&&(0,v.setSubRowCell)(t,E),n(n({},o),{data:e,columns:o.columns,scroll:t._scroll,$positions:C,headerHeight:o.$headerHeight,footerHeight:o.$footerHeight,firstColId:w[0]&&w[0].id,events:t.events,_events:t._events,filteredColumns:w,currentColumns:S,currentRows:E,currentSpans:D,fixedColumns:O,fixedRows:k,sort:t._sortingStates,content:t.content,gridId:t._uid,commonSummary:t._commonSummary,colSummary:t._colSummary,dropManager:t._dropManager,blockSelection:t.block,$renderFrom:"render",$isDragging:s.dragManager.isDrag()})}function x(t){if(t&&(t.tagName||(t=t._parent._container),t)){var e=t.currentStyle||window.getComputedStyle(t),i=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)||0,n=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)||0;return{width:t.clientWidth-i,height:t.clientHeight-n}}}function w(t,e,i){void 0===i&&(i=!1);var r,a=(0,d.getCells)(t),s=t.filteredColumns,c=t.$resizing,u=t.$totalHeight,h=t.$totalWidth,g=t.leftSplit,_=t.$positions,m=t.$scrollBarWidth,y=(0,d.getSpans)(t);if(c){var b=(0,f.findIndex)(s,(function(t){return t.id===c})),x=(0,l.getTotalWidth)(s.slice(0,b))+s[b].$width;r=(0,o.el)(".dhx_grid-resize-line",{style:{top:0,left:x,height:u}})}var w=t.dropManager?t.dropManager.toHTML():null,C=t.blockSelection?t.blockSelection.toHTML():null,S=t.selection?t.selection.toHTML():null;S="string"==typeof S?(0,o.el)("div.dhx_selection",{".innerHTML":S}):S;var E=_,D=i?t.$height-t.$footerHeight-t.$headerHeight-m.x-(t.$footer?1:0)-p.BORDERS:u;return(0,o.el)(".dhx_data-wrap",{style:{height:D,width:h,"padding-left":e.x,"padding-top":e.y},role:"presentation","data-dhx-drop-area":"row"},[(0,o.el)(".dhx_grid_data".concat(g?".dhx_grid_fixed_left":""),n(n({_flags:o.KEYED_LIST},(0,d.getHandlers)(E.yStart,E.xStart,t)),{role:"rowgroup"}),a),(0,v.getSubRowContent)(t),(0,o.el)(".dhx_span-spans",n({role:"presentation"},(0,d.getHandlers)(E.yStart,E.xStart,t)),y),(0,o.el)(".dhx_grid_selection",{_ref:"selection","aria-hidden":"true"},[].concat(S,r)),w,C])}function C(t,e,i){var n=i.height-p.BORDERS;return n=e?n:n-t.headerHeight,t.$footer?e?n:n-t.footerHeight:n}function S(t,e,i){void 0===i&&(i=!1);var n=!i&&t.$totalHeight>=e.height-(t.$headerHeight||0)?(0,r.getScrollbarWidth)():0,o=e.width-p.BORDERS-n;if(!(o<0)){var a=t.$filteredColumns||(t.columns||[]).filter((function(t){return!t.hidden})),s=[],c=[],d=!1;a.forEach((function(e){e.width||e.$fixedWidth||!(0,l.isAutoWidth)(t,e)?s.push(e):c.push(e)}));do{d=!1;for(var u=c.reduce((function(t,e){return t+(e.gravity||1)}),0),h=(0,l.getTotalWidth)(s),f=function(t){var e=o>h?(o-h)*((t.gravity||1)/u):0,i=t.minWidth&&e<t.minWidth,n=t.maxWidth&&e>t.maxWidth;if(i||n)return d=!0,t.$width=i?t.minWidth:t.maxWidth,c=c.filter((function(e){return e.id!=t.id})),s.push(t),"break";t.$width=e},g=0,v=c;g<v.length;g++){if("break"===f(v[g]))break}}while(d)}}e.getRenderConfig=b,e.getElementSizes=x,e.applyAutoWidth=S,e.render=function(t,e,i,r,a){var s,f,g,v,_,m,y=(null===(f=null===(s=null==t?void 0:t.node)||void 0===s?void 0:s.parent)||void 0===f?void 0:f.el)||e._container;(null==y?void 0:y.tagName)&&e._observeResize&&e._observeResize(y);var E=e._cachedSizes||x(y),D=e.config;if(!D)return(0,o.el)("div");if(!D.columns.length)return(0,o.el)(".dhx_grid",{"data-dhx-widget-id":a,"data-dhx-root-id":D.rootParent,"data-dhx-drop-area":"common",role:"empty-grid"});var O=e.data.getRawData(0,-1,null,2);D.columns.every((function(t){return t.hidden}))?D.$totalHeight=0:e._rowHeightsRebuild&&(null===(v=(g=e)._rebuildRowHeights)||void 0===v||v.call(g,O));var k={width:(D.width&&"number"==typeof D.width?D.width:null==E?void 0:E.width)||0,height:(D.height&&"number"==typeof D.height?D.height:null==E?void 0:E.height)||0};(0,l.isAutoWidth)(D)&&S(D,k),null===(m=(_=e)._rebuildColWidths)||void 0===m||m.call(_),D.$width=k.width,D.$height=k.height;var R=b(e,O,k);R.selection=r,R.datacollection=e.data;var T=(0,d.getShifts)(R);R.$scrollBarWidth=(0,p.calcScrollBarWidth)(R);var M,I,H,P,F=(0,l.isCssSupport)("position","sticky"),A=C(R,F,k),$={wrapper:k,sticky:F,shifts:T,gridBodyHeight:A,footerAtBottom:!1},j=(0,h.getFixedRows)(R,n(n({},$),{name:"header",position:"top"})),L=R.$footer?(0,h.getFixedRows)(R,n(n({},$),{name:"footer",position:"bottom"})):null,N=R.$totalWidth+p.BORDERS<k.width?"dhx_grid-less-width":"",V=R.$totalHeight+p.BORDERS<k.height?"dhx_grid-less-height":"",W=R.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",z=D.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"";if(!t.node){var B=e.getScrollState(),G=B.x,Y=B.y;(0,o.awaitRedraw)().then((function(){e.scroll(G,Y)}))}return(0,o.el)(".dhx_grid.dhx_widget",n({class:(R.css||"")+(F?"":" dhx_grid_border")+(D.multiselection?" dhx_no-select--pointer":""),"data-dhx-widget-id":a,"data-dhx-root-id":D.rootParent,"data-dhx-drop-area":"common"},(M=R.data,I=D.columns,H=R.editable,P=R.multiselection,{role:"tree"===R.type?"treegrid":"grid","aria-rowcount":M.length,"aria-colcount":I.filter((function(t){return!t.hidden})).length,"aria-readonly":H?"false":"true","aria-multiselectable":P?"true":"false"})),[(0,o.resizer)((function(){return e.paint()})),(0,o.el)(".dhx_grid-content",n(n({style:n({},k)},i),{class:"".concat(N," ").concat(V," ").concat(W," ").concat(z).trim(),role:"presentation"}),[(0,o.el)(".dhx_grid-focus-sentinel",{tabindex:0,role:"button","aria-label":"Enter grid"}),F?null:j,(0,o.el)(".dhx_grid-body",{style:{height:A,width:k.width-p.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[(0,o.el)("div",{},[F?j:null,w(R,T),F?L:null])]),(0,u.getFixedColsHeader)(R,$,c.Split.left),(0,u.getFixedColsHeader)(R,$,c.Split.right),(0,u.getFixedCols)(R,$,c.Split.left),(0,u.getFixedCols)(R,$,c.Split.right),(0,h.getFixedDataRows)(R,$,c.Split.top),(0,h.getFixedDataRows)(R,$,c.Split.bottom),F?null:L,(0,o.el)(".dhx_grid-focus-sentinel.dhx_grid-focus-sentinel--end",{tabindex:0,role:"button","aria-label":"Exit grid"})])])},e.proRender=function(t,e,i,r,a){var s,f,v,y,E,D,O,k=(null===(f=null===(s=null==t?void 0:t.node)||void 0===s?void 0:s.parent)||void 0===f?void 0:f.el)||e._container;(null==k?void 0:k.tagName)&&e._observeResize&&e._observeResize(k);var R=e._cachedSizes||x(k),T=e.config;if(!T)return(0,o.el)("div");if(!T.columns.length)return(0,o.el)(".dhx_grid",{"data-dhx-widget-id":a,"data-dhx-root-id":T.rootParent,"data-dhx-drop-area":"common",role:"empty-grid"});var M,I=e.data.getRawData(0,-1,null,2),H=T.topSplit||0,P=T.bottomSplit||0,F=T.columns.every((function(t){return t.hidden}));if(e._rowHeightsRebuild){for(var A=0,$=0,j=0;j<I.length;j++){var L=I[j];H&&j<H+A&&(T.subRow&&(L.$subRowHeight=0,L.$opened=!1),L.hidden&&A++),P&&j>=I.length-P-$&&(T.subRow&&(L.$subRowHeight=0,L.$opened=!1),L.hidden&&$++),L.$index=j}F?(T.$totalHeight=0,e._rowHeightsRebuild=!1):null===(y=(v=e)._rebuildRowHeights)||void 0===y||y.call(v,I)}var N="auto"===e.config.height;N&&(M=function(t,e,i){var n,o,r=t._container,a=e.$headerHeight+(e.$footerHeight&&e.$footerHeight+1)+e.$totalHeight+p.BORDERS;if(r){var l=window.getComputedStyle(r),s=l.minHeight,c=l.maxHeight;return a<=parseFloat(s)?parseFloat(s):a>=parseFloat(c)?parseFloat(c):a+(0,p.calcScrollBarWidth)(e,!!(null===(n=t.scrollView)||void 0===n?void 0:n.config.enable),i).x}return a+(i?(0,p.calcScrollBarWidth)(e,!!(null===(o=t.scrollView)||void 0===o?void 0:o.config.enable),i).x:0)}(e,T,R));var V=T.width&&"number"==typeof T.width?T.width:null==R?void 0:R.width,W=T.height&&"number"==typeof T.height?T.height:null==R?void 0:R.height,z={width:V||0,height:(N?M:W)||0},B=null==T?void 0:T.group,G=null==T?void 0:T.dragPanel,Y=null==B?void 0:B.panel,U=!!T.dragPanel;Y&&(z.height-=B.panelHeight||40),U&&(z.width-=(null==G?void 0:G.width)||m.defaultDragPanelConfig.width),(0,l.isAutoWidth)(T)&&S(T,z,e.scrollView&&e.scrollView.config.enable),null===(D=(E=e)._rebuildColWidths)||void 0===D||D.call(E),T.$width=z.width,T.$height=z.height;var X=b(e,I,z);X.selection=r,X.datacollection=e.data;var q=(0,d.getShifts)(X);X.$scrollBarWidth=(0,p.calcScrollBarWidth)(X,!!(null===(O=e.scrollView)||void 0===O?void 0:O.config.enable));var K=(0,l.isCssSupport)("position","sticky"),Z=C(X,K,z),J={wrapper:z,sticky:K,shifts:q,gridBodyHeight:Z,footerAtBottom:!1},Q=X.$totalWidth+p.BORDERS<z.width?"dhx_grid-less-width":"",tt=X.$totalWidth+p.BORDERS===z.width?"dhx_grid-full-width":"",et=X.$totalHeight+p.BORDERS<z.height-X.$footerHeight-X.$headerHeight?"dhx_grid-less-height":"",it=X.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",nt=T.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"",ot="bottom"===T.footerPosition&&!!et&&!N;J.footerAtBottom=ot;var rt=(0,h.getFixedRows)(X,n(n({},J),{name:"header",position:"top"})),at=X.$footer?(0,h.getFixedRows)(X,n(n({},J),{name:"footer",position:"bottom"})):null;if(!t.node){var lt=e.getScrollState(),st=lt.x,ct=lt.y;(0,o.awaitRedraw)().then((function(){e.scroll(st,ct)}))}var dt=(0,o.el)("div",{},[K?rt:null,w(X,q,ot),K?at:null]);return(0,o.el)(".dhx_grid.dhx_widget",{class:(X.css||"")+(K?"":" dhx_grid_border")+(T.multiselection?" dhx_no-select--pointer":""),style:{height:null!=M?M:null},"data-dhx-widget-id":a,"data-dhx-root-id":T.rootParent,role:"tree"===T.type?"treegrid":"grid","aria-rowcount":X.data.length,"aria-colcount":X.filteredColumns.length,"aria-readonly":X.editable?"false":"true","aria-multiselectable":X.multiselection?"true":"false","data-dhx-drop-area":"common"},[(0,o.resizer)((function(){return e.paint()})),Y&&(0,g.getGroupPanel)(T.$grouped,e)||null,U&&(0,_.getDragPanelNode)(e,X,J,!!et)||null,(0,o.el)(".dhx_grid-content",n(n({style:n({},z)},i),{class:"".concat(Q," ").concat(et," ").concat(tt," ").concat(it," ").concat(nt).trim(),role:"presentation"}),[(0,o.el)(".dhx_grid-focus-sentinel",{tabindex:0,role:"button","aria-label":"Enter grid"}),K?null:rt,(0,o.el)(".dhx_grid-body",{style:{height:Z,width:z.width-p.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[e.scrollView&&e.scrollView.config.enable?e.scrollView.render([dt]):dt]),(0,u.getFixedColsHeader)(X,J,c.Split.left),(0,u.getFixedColsHeader)(X,J,c.Split.right),(0,u.getFixedCols)(X,J,c.Split.left),(0,u.getFixedCols)(X,J,c.Split.right),(0,h.getFixedDataRows)(X,J,c.Split.top),(0,h.getFixedDataRows)(X,J,c.Split.bottom),K?null:at,(0,o.el)(".dhx_grid-focus-sentinel.dhx_grid-focus-sentinel--end",{tabindex:0,role:"button","aria-label":"Exit grid"})])])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditor=void 0;var n,o=i(3),r=i(92),a=i(93),l=i(94),s=i(107),c=i(108),d=i(115),u={cell:{row:null,col:null},editor:null,gridId:null};e.getEditor=function(t,e,i,h){var f="boolean"===e.type?"checkbox":i.$editable.editorType;if(void 0===f&&(f=i.autoHeight?"textarea":"input"),u.cell.row===t.id&&u.cell.col===e.id&&u.gridId===i.gridId&&i.$editable.editor)return u.editor;switch("checkbox"!==f&&(u={cell:{row:t.id,col:e.id},editor:u.editor,gridId:i.gridId}),n||(n=function(){u={cell:{row:null,col:null},editor:null,gridId:null}},i.events.on(o.GridEvents.afterEditEnd,n)),f){case"input":default:return u.editor=new r.InputEditor(t,e,i);case"textarea":return u.editor=new d.TextAreaEditor(t,e,i,h);case"select":return u.editor=new a.SelectEditor(t,e,i);case"datePicker":return u.editor=new l.DateEditor(t,e,i);case"checkbox":return new s.CheckboxEditor(t,e,i);case"multiselect":case"combobox":return u.editor=new c.ComboboxEditor(t,e,i)}}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.InputEditor=void 0;var o=i(1),r=i(3),a=i(0),l=i(4),s=i(18),c=function(){function t(t,e,i){this.prevValue="",this._config=i,this._cell={row:t,col:e},this.type=e.type,this._initHandlers()}return t.prototype.endEdit=function(t){if(this._config.$editable){var e;if(!t&&(e=this._removeValuePattern(this._input.value,!0),"number"===this.type||this._cell.col.numberMask))if(e=parseFloat(e),Number.isNaN(e))e="";else{var i=this._cell.col.editorConfig,n=parseFloat(null==i?void 0:i.min),o=parseFloat(null==i?void 0:i.max);(0,a.isDefined)(null==i?void 0:i.min)&&e<n&&(e=n),(0,a.isDefined)(null==i?void 0:i.max)&&e>o&&(e=o)}this._config.events.fire(r.GridEvents.beforeEditEnd,[e,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[e,this._cell.row,this._cell.col])):this._input.focus()}},t.prototype.toHTML=function(t){var e;(0,a.isDefined)(t)&&(this.type="string"),t=null!==(e=this._input?this._input.value:null!=t?t:this._cell.row[this._cell.col.id])&&void 0!==e?e:"";var i=this._cell.col.numberMask;return(0,a.isDefined)(null==i?void 0:i.maxDecLength)&&(i=n(n({},i),{maxDecLength:void 0})),t=this._applyValuePattern(t,this._input,!0,i),this._config.$editable.editor=this,(0,o.el)("input.dhx_cell-editor.dhx_cell-editor__input",{_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,l.getColumnHeaderText)(this._cell.col),onblur:this._handlers.onBlur,oninput:this._handlers.onInput,value:t})},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onInput:function(){var e=t._removeValuePattern(t._input.value);"number"===t.type&&(t._isValidWord(e)?t.prevValue=e:e=t.prevValue,!t.prevValue.length||"-"===t.prevValue||t._isCorrectRange(parseFloat(t.prevValue))?t._input.classList.remove("dhx_cell-editor__input--not-valid"):t._input.classList.add("dhx_cell-editor__input--not-valid")),t._input.value=t._applyValuePattern(e,t._input)},didInsert:function(e){t._input=e.el,t._input.focus()}}},t.prototype._isValidWord=function(t){var e,i=null===(e=t[t.length-1])||void 0===e?void 0:e.toLocaleLowerCase(),n=function(t,e){return t.toLocaleLowerCase().split(e.toLocaleLowerCase()).length-1};return!t.length||"-"===t||"."===t||"-."===t&&this._cell.col.numberMask||!isNaN(Number(t))&&t.trim().length===t.length||t.replace("-","").length>1&&"e"===i&&!n(this.prevValue,"e")||t.replace("-","").length>1&&"e"===i&&1===n(t,"e")},t.prototype._isCorrectRange=function(t){var e=!0,i=this._cell.col.editorConfig,n=parseFloat(null==i?void 0:i.min),o=parseFloat(null==i?void 0:i.max);return(0,a.isDefined)(null==i?void 0:i.min)&&(0,a.isDefined)(null==i?void 0:i.max)?e=t>=n&&t<=o:(0,a.isDefined)(null==i?void 0:i.min)?e=t>n:(0,a.isDefined)(null==i?void 0:i.max)&&(e=t<o),e},t.prototype._applyValuePattern=function(t,e,i,o){return void 0===i&&(i=!1),this._cell.col.numberMask?(0,s.numberMask)(t.toString(),n(n({},o||this._cell.col.numberMask),{onlyView:i}),e):this._cell.col.patternMask?(0,s.patternMask)(t.toString(),this._cell.col.patternMask,e):t},t.prototype._removeValuePattern=function(t,e){return void 0===e&&(e=!1),this._cell.col.numberMask?(0,s.removeNumberMask)(t,n(n({},this._cell.col.numberMask),{lastCall:e})):this._cell.col.patternMask?(0,s.removePatternMask)(t,this._cell.col.patternMask):t},t}();e.InputEditor=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectEditor=void 0;var n=i(1),o=i(3),r=i(4),a=function(){function t(t,e,i){this._config=i,this._cell={row:t,col:e},this._initHandlers()}return t.prototype.endEdit=function(t){var e;this._config.$editable&&(t||(e=this._input.value),this._config.events.fire(o.GridEvents.beforeEditEnd,[e,this._cell.row,this._cell.col])?(this._input.removeEventListener("blur",this._handlers.onBlur),this._input.removeEventListener("keydown",this._handlers.onkeydown),this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(o.GridEvents.afterEditEnd,[e,this._cell.row,this._cell.col])):this._input.focus())},t.prototype.toHTML=function(){var t=(0,r.getEditorOptions)(this._cell.col,this._cell.row).map((function(t){return"string"==typeof t?{id:"".concat(t),value:t}:t}))||[],e=this._cell.row[this._cell.col.id];this._input&&(e=this._input.options[this._input.selectedIndex].value);var i=t.map((function(t){return(0,n.el)("option",{selected:t.id.toString()===(null==e?void 0:e.toString()),value:t.id},t.value)}));return this._config.$editable.editor=this,(0,n.el)("select.dhx_cell-editor.dhx_cell-editor__select",{_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,r.getColumnHeaderText)(this._cell.col)},i)},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onkeydown:function(e){"Escape"===e.key&&t.endEdit()},didInsert:function(e){var i=e.el;t._input=i,i.focus(),i.addEventListener("blur",t._handlers.onBlur),i.addEventListener("keydown",t._handlers.onkeydown)}}},t}();e.SelectEditor=a},function(t,e,i){"use strict";var n=this&&this.__rest||function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(i[n[o]]=t[n[o]])}return i};Object.defineProperty(e,"__esModule",{value:!0}),e.DateEditor=void 0;var o=i(1),r=i(3),a=i(4),l=i(95),s=i(13),c=i(30),d=function(){function t(t,e,i){var n=this;this._config=i,this._cell={row:t,col:e},this._editorConfig=this._cleanConfig(e),this._calendar=new l.Calendar(null,this._editorConfig),this._calendar.setValue(this._getValue(this._cell.row[this._cell.col.id])),this._value=this._calendar.getValue(),this._cell.row[this._cell.col.id]=this._value,this._popup=new c.Popup,this._popup.attach(this._calendar),this._calendar.events.on(l.CalendarEvents.change,(function(){n.endEdit(!1,!0)})),this._popup.events.on(c.PopupEvents.afterHide,(function(){n.endEdit()})),this._initHandlers()}return t.prototype.endEdit=function(t,e){var i=this;if(this._handlers&&this._config.$editable){var n=this._calendar.config.dateFormat,a=this._cell.row[this._cell.col.id],l=this._input.value;if(!t){if(a instanceof Date||e)return this._value=this._calendar.getValue(),this._input.value=this._value,void this._popup.hide();!(0,s.stringToDate)(l,n,!0)&&l||(!a||l.length!==a.length)&&a&&l||(this._value=l,this._value?this._calendar.setValue(this._value):this._calendar.clear())}var c=this._calendar.getValue(this._editorConfig.asDateObject);this._config.events.fire(r.GridEvents.beforeEditEnd,[c,this._cell.row,this._cell.col])?(this._input.removeEventListener("focus",this._handlers.onFocus),this._input.removeEventListener("change",this._handlers.onChange),document.removeEventListener("mousedown",this._handlers.onOuterClick),(0,o.awaitRedraw)().then((function(){i._popup.destructor(),i._calendar.destructor()})),this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[c,this._cell.row,this._cell.col])):this._input.focus()}},t.prototype.toHTML=function(){var t=this._getValue(this._cell.row[this._cell.col.id]);return this._config.$editable.editor=this,document.addEventListener("mousedown",this._handlers.onOuterClick),(0,o.el)("input.dhx_cell-editor.dhx_cell-editor__input.dhx_cell-editor__datepicker",{_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,a.getColumnHeaderText)(this._cell.col),value:t})},t.prototype._cleanConfig=function(t){var e=t.editorConfig||{},i=(e.value,e.range,e.dateFormat,n(e,["value","range","dateFormat"]));return i.dateFormat=t.dateFormat,i},t.prototype._initHandlers=function(){var t=this;this._handlers={onFocus:function(){(0,o.awaitRedraw)().then((function(){t._popup.show(t._input,{centering:!0,mode:"bottom",theme:t._input})}))},onChange:function(){t.endEdit()},onOuterClick:function(e){if(e.target instanceof Node){var i=t._input&&t._input.contains(e.target),n=t._popup&&t._popup.getRootNode()&&t._popup.getRootNode().contains(e.target);i||n||t._popup.hide()}},didInsert:function(e){var i=e.el;t._input=i,t._input.addEventListener("focus",t._handlers.onFocus),t._input.addEventListener("change",t._handlers.onChange),i.focus(),i.setSelectionRange(i.value.length,i.value.length)}}},t.prototype._getValue=function(t){var e=this._calendar.config.dateFormat||"%M %d %Y";if("string"==typeof t&&!(0,s.stringToDate)(t,e,!0)){var i=new Date(t);if(!(null==i?void 0:i.valueOf()))return"";t=i}return t},t}();e.DateEditor=d},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(96),e),o(i(46),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Calendar=void 0;var l=i(0),s=i(1),c=i(6),d=i(11),u=i(97),h=i(106),f=i(13),p=i(46),g=i(2),v=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,e,(0,l.extend)({weekStart:"sunday",thisMonthOnly:!1,dateFormat:window&&window.dhx&&window.dhx.dateFormat,width:"250px"},i))||this;switch(n._selected=[],n.events=new c.EventSystem,n.config.disabledDates=n.config.disabledDates||n.config.block,n.config.mode=n.config.mode||n.config.view,n.config.dateFormat||(n.config.timePicker?12===n.config.timeFormat?n.config.dateFormat="%d/%m/%y %h:%i %A":n.config.dateFormat="%d/%m/%y %H:%i":n.config.dateFormat="%d/%m/%y"),n.config.value&&n._setSelected(n.config.value),n.config.date?n._currentDate=f.DateHelper.toDateObject(n.config.date,n.config.dateFormat):n._getSelected()?n._currentDate=f.DateHelper.copy(n._getSelected()):n._currentDate=new Date,n.config.mode){case"month":n._currentViewMode="month";break;case"year":n._currentViewMode="year";break;case"timepicker":n._currentViewMode=n.config.timePicker?"timepicker":"calendar";break;default:n._currentViewMode="calendar"}if(n._initHandlers(),n.config.timePicker){n._timepicker=new u.Timepicker(null,{timeFormat:n.config.timeFormat,controls:!0});var o=n._getSelected()||new Date;n._timepicker.setValue(o),n._time=n._timepicker.getValue(),n._timepicker.events.on(u.TimepickerEvents.afterClose,(function(){n._timepicker.setValue(n._time),n.showDate(null,"calendar")})),n._timepicker.events.on(u.TimepickerEvents.afterApply,(function(){var t=n._timepicker.getValue(!0),e=t.hour,i=t.minute,o=t.AM,r=n._getSelected(),a=f.DateHelper.withHoursAndMinutes(n._getSelected()||new Date,e,i,o);n.events.fire(p.CalendarEvents.beforeChange,[a,r,!0])&&(n._selected[n._selected.length-1]=a,n.events.fire(p.CalendarEvents.change,[a,r,!0])),n._time=n._timepicker.getValue(),n.showDate(null,"calendar")}))}return n.mount(e,(0,s.create)({render:function(){return n._draw()}})),n}return o(e,t),e.prototype.setValue=function(t){if(!t||t instanceof Array&&0===t.length)return!1;var e=t instanceof Array?t[0]:t,i=f.DateHelper.toDateObject(e,this.config.dateFormat),n=f.DateHelper.copy(this._getSelected());return!!this.events.fire(p.CalendarEvents.beforeChange,[i,n,!1])&&(this._selected=[],this._setSelected(t),this._timepicker&&(this._timepicker.setValue(i),this._time=this._timepicker.getValue()),this.showDate(this._getSelected()),this.events.fire(p.CalendarEvents.change,[i,n,!1]),this.paint(),!0)},e.prototype.getValue=function(t){var e=this;return void 0===t&&(t=!1),this._selected[0]?this.config.range?t?this._selected.map((function(t){return f.DateHelper.copy(t)})):this._selected.map((function(t){return(0,f.getFormattedDate)(e.config.dateFormat,t)})):t?f.DateHelper.copy(this._selected[0]):(0,f.getFormattedDate)(this.config.dateFormat,this._selected[0]):""},e.prototype.getCurrentMode=function(){return this._currentViewMode},e.prototype.showDate=function(t,e){t&&(this._currentDate=f.DateHelper.copy(t)),e&&(this._currentViewMode=e),this.paint()},e.prototype.destructor=function(){this._linkedCalendar&&this._unlink(),this._timepicker&&this._timepicker.destructor(),this.events&&this.events.clear(),this.config=this.events=null,this._uid=this._selected=this._currentDate=this._currentViewMode=this._handlers=this._timepicker=this._time=null,this.unmount()},e.prototype.clear=function(){var t=this.getValue(!0);this.events.fire(p.CalendarEvents.beforeChange,["",t,!1])&&(this.config.timePicker&&(this._timepicker.clear(),this._time=this._timepicker.getValue()),this._selected=[],this.showDate(null,this.config.mode),this.events.fire(p.CalendarEvents.change,[this.getValue(!0),t,!1,"clear"]))},e.prototype.link=function(t){var e=this;this._linkedCalendar&&this._unlink(),this._linkedCalendar=t;var i=this.getValue(!0),n=t.getValue(!0),o=i&&f.DateHelper.dayStart(i),r=n&&f.DateHelper.dayStart(n);this.config.$rangeMark&&this._linkedCalendar.config.$rangeMark||(this.config.$rangeMark=this._linkedCalendar.config.$rangeMark=function(t){if(o&&r)return t>=o&&t<=r&&function(t){if(f.DateHelper.isSameDay(r,o))return null;var e="dhx_calendar-day--in-range";return f.DateHelper.isSameDay(t,o)&&(e+=" dhx_calendar-day--first-date"),f.DateHelper.isSameDay(t,r)&&(e+=" dhx_calendar-day--last-date"),e}(t)}),this.config.disabledDates&&this._linkedCalendar.config.disabledDates||(this.config.disabledDates=function(t){if(r)return t>r},this._linkedCalendar.config.disabledDates=function(t){if(o)return t<o}),this.config.thisMonthOnly=!0,t.config.thisMonthOnly=!0,this.events.on(p.CalendarEvents.change,(function(t){o=t?f.DateHelper.dayStart(t):null,e._linkedCalendar.paint()}),"link"),this._linkedCalendar.events.on(p.CalendarEvents.change,(function(t){r=t?f.DateHelper.dayStart(t):null,e.paint()}),"link"),this._linkedCalendar.paint(),this.paint()},e.prototype._unlink=function(){this._linkedCalendar&&(this.config.$rangeMark=this._linkedCalendar.config.$rangeMark=null,this.config.disabledDates=this._linkedCalendar.config.disabledDates=null,this.events.detach(p.CalendarEvents.change,"link"),this._linkedCalendar.events.detach(p.CalendarEvents.change,"link"),this._linkedCalendar.paint(),this._linkedCalendar=null)},e.prototype._setSelected=function(t){var e=this,i=t instanceof Array?t[0]:t,n=f.DateHelper.toDateObject(i,this.config.dateFormat);if(t instanceof Array&&this.config.range){var o=[];t.forEach((function(t,i){i<2&&o.push(f.DateHelper.toDateObject(t,e.config.dateFormat))})),2===o.length&&o[0]<=o[1]?o.forEach((function(t){return e._selected.push(t)})):this._selected[0]=o[0]}else this._selected[0]=n},e.prototype._getSelected=function(){return this._selected[this._selected.length-1]},e.prototype._draw=function(){switch(this._currentViewMode){case"calendar":return this.events.fire(p.CalendarEvents.modeChange,["calendar"]),this._drawCalendar();case"month":return this.events.fire(p.CalendarEvents.modeChange,["month"]),this._drawMonthSelector();case"year":return this.events.fire(p.CalendarEvents.modeChange,["year"]),this._drawYearSelector();case"timepicker":return this.events.fire(p.CalendarEvents.modeChange,["timepicker"]),this._drawTimepicker()}},e.prototype._initHandlers=function(){var t=this,e={Up:"ArrowUp",Down:"ArrowDown",Right:"ArrowRight",Left:"ArrowLeft",Esc:"Escape",Spacebar:"Space"},i=function(e){void 0===e&&(e=!1);var i=0;switch(t._currentViewMode){case"calendar":i=e?-7:7;break;case"month":case"year":i=e?-4:4}return i};this._handlers={onkeydown:{".dhx_calendar-year, .dhx_calendar-month, .dhx_calendar-day":function(n,o){switch(function(t){var i;if(t.which>=48&&t.which<=57||t.which>=65&&t.which<=90)i=String.fromCharCode(t.which);else{var n=32===t.which?t.code:t.key;i=(0,g.isIE)()&&e[n]||n}return i}(n)){case"Enter":t._selectDate(n,o);break;case"ArrowLeft":t._moveBrowseFocus(n,o,-1);break;case"ArrowRight":t._moveBrowseFocus(n,o,1);break;case"ArrowUp":t._moveBrowseFocus(n,o,i(!0));break;case"ArrowDown":t._moveBrowseFocus(n,o,i())}}},onclick:{".dhx_calendar-year, .dhx_calendar-month, .dhx_calendar-day":function(e,i){t._selectDate(e,i)},".dhx_calendar-action__cancel":function(){t.showDate(t._getSelected(),"calendar"),t.events.fire(p.CalendarEvents.cancelClick,[])},".dhx_calendar-action__show-month":function(){return t.showDate(null,"month")},".dhx_calendar-action__show-year":function(){return t.showDate(null,"year")},".dhx_calendar-action__next":function(){var e;switch(t._currentViewMode){case"calendar":e=f.DateHelper.addMonth(t._currentDate,1);break;case"month":e=f.DateHelper.addYear(t._currentDate,1);break;case"year":e=f.DateHelper.addYear(t._currentDate,12)}t.showDate(e)},".dhx_calendar-action__prev":function(){var e;switch(t._currentViewMode){case"calendar":e=f.DateHelper.addMonth(t._currentDate,-1);break;case"month":e=f.DateHelper.addYear(t._currentDate,-1);break;case"year":e=f.DateHelper.addYear(t._currentDate,-12)}t.showDate(e)},".dhx_calendar-action__show-timepicker":function(){t._currentViewMode="timepicker",t.paint()}},onmouseover:{".dhx_calendar-day":function(e,i){t.events.fire(p.CalendarEvents.dateMouseOver,[new Date(i.attrs._date),e]),t.events.fire(p.CalendarEvents.dateHover,[new Date(i.attrs._date),e])}}}},e.prototype._getData=function(t){var e,i=this;switch(this._isSelectedInCurrentRange=!1,this.config.weekStart){case"saturday":e=-1;break;case"monday":e=1;break;default:e=0}for(var n=[],o=6,r=f.DateHelper.weekStart(f.DateHelper.monthStart(t),e);o--;){for(var a=f.DateHelper.getWeekNumber(r),l=0,s=7,c=[],d=function(){var e=f.DateHelper.isWeekEnd(r),n=t.getMonth()===r.getMonth(),o=u.config.disabledDates&&u.config.disabledDates(r),a=[];if(u.config.range&&u._selected[0]&&u._selected[1]){var s=function(){if(i._selected[0]&&i._selected[1]){var t=f.DateHelper.dayStart(i._selected[0]),e=f.DateHelper.dayStart(i._selected[1]);return r>=t&&r<=e&&(f.DateHelper.isSameDay(i._selected[0],i._selected[1])?null:"dhx_calendar-day--in-range")}};u.config.$rangeMark=s}if(e&&a.push("dhx_calendar-day--weekend"),n||(u.config.thisMonthOnly?(l++,a.push("dhx_calendar-day--hidden")):a.push("dhx_calendar-day--muffled")),u.config.mark){var d=u.config.mark(r);d&&a.push(d)}u.config.$rangeMark&&((s=u.config.$rangeMark(r))&&a.push(s));o&&(e?a.push("dhx_calendar-day--weekend-disabled"):a.push("dhx_calendar-day--disabled")),u._selected.forEach((function(t,e){if(t&&f.DateHelper.isSameDay(t,r)){i._isSelectedInCurrentRange=!0;var n="dhx_calendar-day--selected";i.config.range&&(n+=" dhx_calendar-day--selected-".concat(0===e?"first ":"last")),a.push(n)}})),c.push({date:r,day:r.getDate(),css:a.join(" ")}),r=f.DateHelper.addDay(r)},u=this;s--;)d();n.push({weekNumber:a,days:c,disabledWeekNumber:7===l})}return n},e.prototype._drawCalendar=function(){var t,e=this,i=this._currentDate,n=this.config,o=n.weekStart,l=n.thisMonthOnly,c=n.css,d=n.timePicker,u=n.width;switch(o){case"saturday":t=a([f.locale.daysShort[6]],f.locale.daysShort.slice(0,-1),!0);break;case"monday":t=a(a([],f.locale.daysShort.slice(1),!0),[f.locale.daysShort[0]],!1);break;default:t=f.locale.daysShort}for(var h,p=t.map((function(t){return(0,s.el)(".dhx_calendar-weekday",t)})),g=this._getData(i),v=!0,_=this._getSelected(),m=function(t){var i={role:"button",tabindex:-1,"aria-pressed":"false"};return t&&(e._isSelectedInCurrentRange?function(t){return t&&_&&t.getTime()===_.getTime()}(t.date)&&(i.tabindex=0,i["aria-pressed"]="true"):v&&(i.tabindex=0),v=!1),i},y=[],b=[],x=0,w=g;x<w.length;x++){var C=w[x],S=C.days.map((function(t){return(0,s.el)("div.dhx_calendar-day",r({class:t.css,_date:t.date},m(t)),t.day)}));!this.config.weekNumbers||C.disabledWeekNumber&&l||b.push((0,s.el)("div",{class:"dhx_calendar-week-number"},C.weekNumber)),y=y.concat(S)}this.config.weekNumbers&&(h=(0,s.el)(".dhx_calendar__week-numbers",b));var E="dhx_calendar dhx_widget"+(c?" "+c:"")+(d?" dhx_calendar--with_timepicker":"")+(this.config.weekNumbers?" dhx_calendar--with_week-numbers":"");return(0,s.el)("div",r({class:E,style:{width:this.config.weekNumbers?parseInt(u.toString())+48+"px":u}},this._handlers),[(0,s.el)(".dhx_calendar__wrapper",[this._drawHeader((0,s.el)("button.dhx_calendar-action__show-month.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--circle",{"aria-live":"polite",type:"button"},f.locale.months[i.getMonth()]+" "+i.getFullYear())),this.config.weekNumbers&&(0,s.el)(".dhx_calendar__dates-wrapper",[(0,s.el)(".dhx_calendar__weekdays",p),(0,s.el)(".dhx_calendar__days",y),h]),!this.config.weekNumbers&&(0,s.el)(".dhx_calendar__weekdays",p),!this.config.weekNumbers&&(0,s.el)(".dhx_calendar__days",y),d?(0,s.el)(".dhx_timepicker__actions",[(0,s.el)("button.dhx_calendar__timepicker-button.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--width_full.dhx_button--circle.dhx_calendar-action__show-timepicker",{type:"button"},[(0,s.el)("span.dhx_button__icon.dxi.dxi-clock-outline"),(0,s.el)("span.dhx_button__text",this._time)])]):null])])},e.prototype._drawMonthSelector=function(){var t=this._currentDate,e=t.getMonth(),i=this._getSelected()?this._getSelected().getFullYear():null,n=this.config,o=n.css,a=n.timePicker,l=n.weekNumbers,c=n.width,d=n.mode,u="dhx_calendar dhx_widget"+(o?" "+o:"")+(a?" dhx_calendar--with_timepicker":"")+(l?" dhx_calendar--with_week-numbers":""),h=!0,p=i===t.getFullYear(),g=function(t){return p&&e===t};return(0,s.el)("div",r({class:u,style:{width:l?parseInt(c.toString())+48+"px":c}},this._handlers),[(0,s.el)(".dhx_calendar__wrapper",[this._drawHeader((0,s.el)("button.dhx_calendar-action__show-year.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--circle",{"aria-live":"polite",type:"button"},t.getFullYear())),(0,s.el)(".dhx_calendar__months",f.locale.monthsShort.map((function(t,e){return(0,s.el)("div",r(r({class:"dhx_calendar-month"+(g(e)?" dhx_calendar-month--selected":"")},function(t,e){var i={role:"button",tabindex:-1,"aria-pressed":"false"};return t&&(p?g(e)&&(i.tabindex=0,i["aria-pressed"]="true"):h&&(i.tabindex=0),h=!1),i}(t,e)),{_date:e}),t)}))),"month"!==d?(0,s.el)(".dhx_calendar__actions",[(0,s.el)("button.dhx_button.dhx_button--color_primary.dhx_button--view_link.dhx_button--size_small.dhx_button--width_full.dhx_button--circle.dhx_calendar-action__cancel",{type:"button"},f.locale.cancel)]):null])])},e.prototype._drawYearSelector=function(){var t=this,e=this._currentDate,i=f.DateHelper.getTwelweYears(e),n=this.config,o=n.css,a=n.timePicker,l=n.weekNumbers,c=n.width,d=n.mode,u="dhx_calendar dhx_widget"+(o?" "+o:"")+(a?" dhx_calendar--with_timepicker":"")+(l?" dhx_calendar--with_week-numbers":""),h=!0,p=this._getSelected()&&i.includes(this._getSelected().getFullYear()),g=function(e){return t._getSelected()&&e===t._getSelected().getFullYear()};return(0,s.el)("div",r({class:u,style:{width:l?parseInt(c.toString())+48+"px":c}},this._handlers),[(0,s.el)(".dhx_calendar__wrapper",[this._drawHeader((0,s.el)("button.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--circle",{"aria-live":"polite",type:"button"},i[0]+"-"+i[i.length-1])),(0,s.el)(".dhx_calendar__years",i.map((function(t){return(0,s.el)("div",r({class:"dhx_calendar-year"+(g(t)?" dhx_calendar-year--selected":""),_date:t},function(t){var e={role:"button",tabindex:-1,"aria-pressed":"false"};return t&&(p?g(t)&&(e.tabindex=0,e["aria-pressed"]="true"):h&&(e.tabindex=0),h=!1),e}(t)),t)}))),"year"!==d&&"month"!==d?(0,s.el)(".dhx_calendar__actions",[(0,s.el)("button.dhx_button.dhx_button--color_primary.dhx_button--view_link.dhx_button--size_small.dhx_button--width_full.dhx_button--circle.dhx_calendar-action__cancel",{type:"button"},f.locale.cancel)]):null])])},e.prototype._drawHeader=function(t){return(0,s.el)(".dhx_calendar__navigation",[(0,s.el)("button.dhx_calendar-navigation__button.dhx_calendar-action__prev"+h.linkButtonClasses+".dhx_button--icon.dhx_button--circle",{"aria-label":"prev",type:"button"},[(0,s.el)(".dhx_button__icon.dxi.dxi-chevron-left")]),t,(0,s.el)("button.dhx_calendar-navigation__button.dhx_calendar-action__next"+h.linkButtonClasses+".dhx_button--icon.dhx_button--circle",{"aria-label":"next",type:"button"},[(0,s.el)(".dhx_button__icon.dxi.dxi-chevron-right")])])},e.prototype._drawTimepicker=function(){var t=this.config,e=t.css,i=t.weekNumbers,n=t.width;return(0,s.el)(".dhx_widget.dhx-calendar",{class:e?" "+e:"",style:{width:i?parseInt(n.toString())+48+"px":n}},[(0,s.inject)(this._timepicker.getRootView())])},e.prototype._selectDate=function(t,e){var i=e.attrs._date,n=f.DateHelper.copy(this._getSelected());switch(this._currentViewMode){case"calendar":var o=this.config.timePicker?f.DateHelper.mergeHoursAndMinutes(i,this._getSelected()||this._currentDate):i;if(!this.events.fire(p.CalendarEvents.beforeChange,[o,n,!0]))return;this.config.range&&1===this._selected.length&&this._selected[0]<=o?this._selected.push(o):(this._selected=[],this._selected[0]=o),e.el.blur(),this.showDate(this._getSelected()),this.events.fire(p.CalendarEvents.change,[i,n,!0]);break;case"month":if("month"!==this.config.mode)f.DateHelper.setMonth(this._currentDate,i),this.showDate(null,"calendar"),this.events.fire(p.CalendarEvents.monthSelected,[i]);else{var r=f.DateHelper.fromYearAndMonth(this._currentDate.getFullYear()||this._getSelected().getFullYear(),i);if(!this.events.fire(p.CalendarEvents.beforeChange,[r,n,!0]))return;this._currentDate=r,this._selected[0]=r,this.events.fire(p.CalendarEvents.change,[this._getSelected(),n,!0]),this.events.fire(p.CalendarEvents.monthSelected,[i]),this.paint()}break;case"year":if("year"!==this.config.mode)f.DateHelper.setYear(this._currentDate,i),this.showDate(null,"month"),this.events.fire(p.CalendarEvents.yearSelected,[i]);else{r=f.DateHelper.fromYear(i);if(!this.events.fire(p.CalendarEvents.beforeChange,[r,n,!0]))return;this._currentDate=r,this._selected[0]=r,this.events.fire(p.CalendarEvents.change,[this._getSelected(),n,!0]),this.events.fire(p.CalendarEvents.yearSelected,[i]),this.paint()}}},e.prototype._moveBrowseFocus=function(t,e,i){if(e){var n=e.parent.body[e.idx+i];if(n){var o=n.el;o&&(t.target.tabIndex=-1,o.tabIndex=0,o.focus({preventScroll:!0}))}}},e}(d.View);e.Calendar=v},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(98),e),o(i(45),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Timepicker=void 0;var a=i(0),l=i(1),s=i(6),c=i(11),d=i(27),u=i(101),h=i(104),f=i(105),p=i(45),g=i(2);function v(t,e){return isNaN(t)?0:Math.min(e,Math.max(0,t))}var _=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,e,(0,a.extend)({timeFormat:24,controls:!1,valueFormat:"string",actions:!1},i))||this;return n.events=new s.EventSystem(n),n._time={hour:0,minute:0,AM:!0},12===n.config.timeFormat&&(n._time.hour=12),n.config.controls=n.config.controls||n.config.actions,n.config.value&&n._setValue(n.config.value),n._initUI(e),n._initHandlers(),n._initEvents(),n}return o(e,t),e.prototype.getValue=function(t){return 12===this.config.timeFormat&&(this._time.hour=this._time.hour%12||12),this._getValue(this._time,t)},e.prototype.setValue=function(t){this._setValue(t),this._hoursSlider.setValue(this._time.hour),this._minutesSlider.setValue(this._time.minute),this._inputsView.paint()},e.prototype.clear=function(){24===this.config.timeFormat?this.setValue("00:00"):this.setValue("12:00AM")},e.prototype.destructor=function(){this._minutesSlider&&this._minutesSlider.destructor(),this._hoursSlider&&this._hoursSlider.destructor(),this.events&&this.events.clear(),this.layout&&this.layout.destructor(),this.config=this.events=null,this._handlers=this._time=this._inputsView=this._minutesSlider=this._hoursSlider=null,this.unmount()},e.prototype.getRootView=function(){return this.layout.getRootView()},e.prototype._getValue=function(t,e){var i=t.hour,n=t.minute,o=t.AM;if(e){var r={hour:i,minute:n};return 12===this.config.timeFormat&&(r.AM=o),r}return(i<10?"0"+i:i)+":"+(n<10?"0"+n:n)+(12===this.config.timeFormat?o?"AM":"PM":"")},e.prototype._setValue=function(t){var e,i=0,n=0;if("number"==typeof t&&(t=new Date(t)),t instanceof Date)i=t.getMinutes(),n=t.getHours();else if(Array.isArray(t))n=v(t[0],23),i=v(t[1],59),t[2]&&"pm"===t[2].toLowerCase()&&(e=!0);else if("string"==typeof t){var o=t.match(/\d+/g);n=v(+o[0],23),i=v(+o[1],59),t.toLowerCase().includes("pm")&&(e=!0)}else"object"==typeof t&&t.hasOwnProperty("hour")&&t.hasOwnProperty("minute")&&(n=t.hour,i=t.minute,e=!t.AM);return e&&n<12&&(n+=12),12===this.config.timeFormat&&!(0,f.isTimeCheck)(t)&&n>=12&&(e=!0),this._time={hour:n,minute:i,AM:!e}},e.prototype._initUI=function(t){var e=this,i={gravity:!1,css:"dhx_widget dhx_timepicker "+(this.config.css?this.config.css:"")+(this.config.controls?" dhx_timepicker--with-controls":""),rows:[{id:"timepicker",css:"dhx_timepicker__inputs"},{id:"hour-slider",css:"dhx_timepicker__hour"},{id:"minute-slider",css:"dhx_timepicker__minute"}]};this.config.controls&&(i.rows.unshift({id:"close-action",css:"dhx_timepicker__close"}),i.rows.push({id:"save-action",css:"dhx_timepicker__save"}));var n=this.layout=new d.Layout(t,i),o=(0,l.create)({render:function(){return e._draw()}}),r=this._inputsView=(0,c.toViewLike)(o),a=this._minutesSlider=new u.Slider(null,{min:0,max:59,step:1,tooltip:!1,labelPosition:"top",label:h.default.minutes,value:this.config.value?this._time.minute:0}),s=this._hoursSlider=new u.Slider(null,{min:0,max:23,step:1,tooltip:!1,labelPosition:"top",label:h.default.hours,value:this.config.value?12===this._time.hour&&this._time.AM?0:this._time.hour:0});if(n.getCell("timepicker").attach(r),n.getCell("hour-slider").attach(s),n.getCell("minute-slider").attach(a),this.config.controls){n.getCell("save-action").attach((function(){return(0,l.el)("button.dhx_timepicker__button-save.dhx_button.dhx_button--view_flat.dhx_button--color_primary.dhx_button--size_small.dhx_button--circle.dhx_button--width_full",{onclick:e._outerHandlers.save,type:"button"},h.default.save)})),n.getCell("close-action").attach((function(){return(0,l.el)("button.dhx_timepicker__button-close.dhx_button.dhx_button--view_link.dhx_button--size_medium.dhx_button--view_link.dhx_button--color_secondary.dhx_button--icon.dhx_button--circle",{_ref:"close",onclick:e._outerHandlers.close,type:"button","aria-label":"close timepicker"},[(0,l.el)("span.dhx_button__icon.dxi.dxi-close")])}))}},e.prototype._initHandlers=function(){var t=this,e=function(e){var i=v(parseInt(e.value,10),59);e.value=i.toString(),t._minutesSlider.setValue(i)},i=function(e){var i=v(parseInt(e.value,10),23);e.value=i.toString(),t._hoursSlider.setValue(i)};this._handlers={onchange:{".dhx_timepicker-input--hour":function(t){return i(t.target)},".dhx_timepicker-input--minutes":function(t){return e(t.target)}},oninput:{".dhx_timepicker-input--hour":function(t){((0,g.isSafari)()||(0,g.isFirefox)())&&i(t.target)},".dhx_timepicker-input--minutes":function(t){((0,g.isSafari)()||(0,g.isFirefox)())&&e(t.target)}}},this._outerHandlers={close:function(){t.events.fire(p.TimepickerEvents.beforeClose,[t.getValue(t._isTimeObj())])&&(t.events.fire(p.TimepickerEvents.afterClose,[t.getValue(t._isTimeObj())]),t.events.fire(p.TimepickerEvents.close,[]))},save:function(){t.events.fire(p.TimepickerEvents.beforeApply,[t.getValue(t._isTimeObj())])&&(t.events.fire(p.TimepickerEvents.afterApply,[t.getValue(t._isTimeObj())]),t.events.fire(p.TimepickerEvents.apply,[t.getValue()]),t.events.fire(p.TimepickerEvents.save,[t._time]))}}},e.prototype._initEvents=function(){var t=this;this._hoursSlider.events.on(u.SliderEvents.beforeChange,(function(e){if(!(e<t._hoursSlider.config.min||e>t._hoursSlider.config.max)){var i=r({},t._time);12===t.config.timeFormat?(i.AM=e<12,i.hour=e%12||12):i.hour=e;var n=t._isTimeObj();return t.events.fire(p.TimepickerEvents.beforeChange,[t._getValue(i,n)])}})),this._hoursSlider.events.on(u.SliderEvents.change,(function(e){if(!(e<t._hoursSlider.config.min||e>t._hoursSlider.config.max)){12===t.config.timeFormat?(t._time.AM=e<12,t._time.hour=e%12||12):t._time.hour=e;var i=t._isTimeObj();t.events.fire(p.TimepickerEvents.change,[t.getValue(i)]),t._inputsView.paint()}})),this._minutesSlider.events.on(u.SliderEvents.beforeChange,(function(e){if(!(e<t._minutesSlider.config.min||e>t._minutesSlider.config.max)){var i=r(r({},t._time),{minute:e}),n=t._isTimeObj();return t.events.fire(p.TimepickerEvents.beforeChange,[t._getValue(i,n)])}})),this._minutesSlider.events.on(u.SliderEvents.change,(function(e){if(!(e<t._minutesSlider.config.min||e>t._minutesSlider.config.max)){t._time.minute=e;var i=t._isTimeObj();t.events.fire(p.TimepickerEvents.change,[t.getValue(i)]),t._inputsView.paint()}}))},e.prototype._draw=function(){return this._minutesSlider.config.label=h.default.minutes,this._hoursSlider.config.label=h.default.hours,(0,l.el)(".dhx_timepicker-inputs",r({},this._handlers),[(0,l.el)("input.dhx_timepicker-input.dhx_timepicker-input--hour",{_key:"hour",_ref:"hour",value:this.getValue(!0).hour.toString().length>1?this.getValue(!0).hour:"0"+this.getValue(!0).hour,"aria-label":"hours"}),(0,l.el)("span.dhx_timepicker-delimer",":"),(0,l.el)("input.dhx_timepicker-input.dhx_timepicker-input--minutes",{_key:"minute",value:this.getValue(!0).minute.toString().length>1?this.getValue(!0).minute:"0"+this.getValue(!0).minute,"aria-label":"minutes"}),12===this.config.timeFormat?(0,l.el)(".dhx_timepicker-ampm",this._time.AM?"AM":"PM"):null])},e.prototype._isTimeObj=function(){var t;return"timeobject"===(null===(t=this.config.valueFormat)||void 0===t?void 0:t.toLowerCase())},e}(c.View);e.Timepicker=_},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMarginSize=e.getBlockRange=void 0,e.getBlockRange=function(t,e,i){return void 0===i&&(i=!0),i?{min:t.left+window.pageXOffset,max:e.right+window.pageXOffset}:{min:t.top+window.pageYOffset,max:e.bottom+window.pageYOffset}},e.getMarginSize=function(t){return t&&("space"===t.type||"wide"===t.type)?12:0}},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProLayout=void 0;var r=i(28),a=i(41),l=function(t){function e(e,i){return t.call(this,e,i)||this}return o(e,t),e.prototype._createCell=function(t){var i;return t.rows||t.cols||t.views?(t.parent=this._root,i=new e(this,t)):i=new a.ProCell(this,t),this._root._all[i.id]=i,t.init&&t.init(i,t),i},e}(r.Layout);e.ProLayout=l},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(102),e),o(i(44),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Slider=void 0;var a=i(0),l=i(1),s=i(6),c=i(25),d=i(11),u=i(30),h=i(44),f=i(2);function p(t,e,i){return t<e?e:t>i?i:t}var g=function(t){function e(e,i){var n=t.call(this,e,(0,a.extend)({mode:"horizontal",min:0,max:100,step:1,tooltip:!0},i))||this;n._disabled=!1,n.config.helpMessage=n.config.helpMessage||n.config.help,void 0!==n.config.thumbLabel&&(n.config.tooltip=n.config.thumbLabel),n.config.labelInline&&(n.config.labelPosition="left"),n.events=new s.EventSystem(n),n._axis="horizontal"===n.config.mode?"clientX":"clientY",n._initStartPosition(),n._keyManager=new c.KeyManager((function(){var t,e;return document.activeElement===(null===(e=null===(t=n.getRootView().refs)||void 0===t?void 0:t[n._isExtraActive?"extraRunner":"runner"])||void 0===e?void 0:e.el)})),n._initHotkeys();var o=(0,l.create)({render:function(){return n._draw()},hooks:{didMount:function(){return n._calcSliderPosition()},didRedraw:function(){return n._calcSliderPosition()}}});return n._initHandlers(),n.mount(e,o),n}return o(e,t),e.prototype.disable=function(){this._disabled=!0,this.paint()},e.prototype.enable=function(){this._disabled=!1,this.paint()},e.prototype.isDisabled=function(){return this._disabled},e.prototype.focus=function(t){this.getRootView().refs[t?"extraRunner":"runner"].el.focus()},e.prototype.blur=function(){this.getRootView().refs[this._isExtraActive?"extraRunner":"runner"].el.blur()},e.prototype.getValue=function(){var t;if(this.config.range){var e=this._getValue(this._currentPosition),i=this._getValue(this._extraCurrentPosition);t=e<i?[e,i]:[i,e]}else t=[this._getValue(this._currentPosition)];return t},e.prototype.setValue=function(t){var e=this._getValue(this._currentPosition);if(Array.isArray(t)&&t.length>1){var i=this._getValue(this._extraCurrentPosition);this.events.fire(h.SliderEvents.beforeChange,[t[0],e,!1])&&(this._setValue(t[0],!1),this.events.fire(h.SliderEvents.change,[t[0],e,!1])),this.events.fire(h.SliderEvents.beforeChange,[t[1],i,!0])&&(this._setValue(t[1],!0),this.events.fire(h.SliderEvents.change,[t[1],i,!0]))}else{if(t=parseFloat(t),isNaN(t))throw new Error("Wrong value type, for more info check documentation https://docs.dhtmlx.com/suite/slider__api__slider_setvalue_method.html");this.events.fire(h.SliderEvents.beforeChange,[t,e,!1])&&(this._setValue(t),this.events.fire(h.SliderEvents.change,[t,e,!1]))}this.paint()},e.prototype.destructor=function(){this._keyManager&&this._keyManager.destructor(),document.body.contains(this._tooltip)&&document.body.removeChild(this._tooltip),this._tooltip=null,this.unmount()},e.prototype._calcSliderPosition=function(){var t=this.getRootView();if(t){var e=t.refs.track.el.getBoundingClientRect();this._offsets={left:e.left+window.pageXOffset,top:e.top+window.pageYOffset},this._length="horizontal"===this.config.mode?e.width:e.height}},e.prototype._initHotkeys=function(){var t=this,e={arrowLeft:function(e){e.preventDefault(),t._move(-t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))},arrowRight:function(e){e.preventDefault(),t._move(t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))},arrowUp:function(e){e.preventDefault(),t._move(t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))},arrowDown:function(e){e.preventDefault(),t._move(-t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))}};for(var i in e)this._keyManager.addHotKey(i,e[i])},e.prototype._move=function(t,e){void 0===e&&(e=!1),this.config.inverse&&(t=-t);var i=this.config,n=i.max,o=i.min,r=e?this._getValue(this._extraCurrentPosition):this._getValue(this._currentPosition),a=r+t;(a>n||a<o)&&(a=r),this.events.fire(h.SliderEvents.beforeChange,[a,r,e])&&(this._setValue(r+t,e),this.events.fire(h.SliderEvents.change,[a,r,e]),this.paint())},e.prototype._initStartPosition=function(){var t=this.config,e=t.max,i=t.min,n=t.range,o=function(t,e,i){var n;return(n=void 0===t?[]:Array.isArray(t)?t:"string"==typeof t?t.split(",").map((function(t){return parseInt(t,10)})):[t])[0]=void 0===n[0]?e:p(n[0],e,i),n[1]=void 0===n[1]?i:p(n[1],e,i),n}(this.config.value,this.config.min,this.config.max),r=o[0],a=o[1];this._currentPosition=(r-i)/(e-i)*100,n&&(this._extraCurrentPosition=(e-a)/(e-i)*100),this._currentPosition=(r-i)/(e-i)*100,n&&(this._extraCurrentPosition=(a-i)/(e-i)*100),this._isInverse()&&(this._currentPosition=100-this._currentPosition,n&&(this._extraCurrentPosition=100-this._extraCurrentPosition))},e.prototype._getValue=function(t){this._isInverse()&&(t=100-t);var e=this.config,i=e.min,n=e.max,o=e.step;if(100===t)return n;if(0===t)return i;var r=t*(n-i)/100,a=r%o,l=a>=o/2?o:0;return+(Number(i)+Number(r)-a+l).toFixed(5)},e.prototype._setValue=function(t,e){void 0===e&&(e=!1);var i=this.config,n=i.max,o=i.min;if(t>n||t<o)return!1;var r=(t-o)/(n-o)*100,a=this._isInverse()?100-r:r;e?this._extraCurrentPosition=a:this._currentPosition=a},e.prototype._initHandlers=function(){var t=this,e=function(e){e.cancelable&&e.preventDefault();var i=((e.targetTouches?e.targetTouches[0][t._axis]:e[t._axis])-t._getBegining())/t._length*100;if(t._findNewDirection){if(Math.abs(t._currentPosition-i)<1)return;i>t._currentPosition?t._possibleRange=[t._currentPosition,100]:t._possibleRange=[0,t._currentPosition],t._findNewDirection=null}t._inSide(i)&&t._updatePosition(i,t._isExtraActive),t.paint()},i=function(n){t.events.fire(h.SliderEvents.mouseup,[n]),setTimeout((function(){t._isMouseMoving=!1,t.paint()}),4),n.targetTouches?(document.removeEventListener("touchend",i),document.removeEventListener("touchmove",e)):(document.removeEventListener("mouseup",i),document.removeEventListener("mousemove",e))},n=function(e){var i;if(!t._disabled&&3!==e.which)if(t.events.fire(h.SliderEvents.mousedown,[e]),t._isMouseMoving=!0,e.target.classList.contains("dhx_slider__thumb--extra")?(t._isExtraActive=!0,i=t._extraCurrentPosition):(t._isExtraActive=!1,i=t._currentPosition),t._findNewDirection=null,t.config.range){var n=t._currentPosition>t._extraCurrentPosition?[t._currentPosition,t._extraCurrentPosition]:[t._extraCurrentPosition,t._currentPosition],o=n[0],r=n[1];t._currentPosition===t._extraCurrentPosition?(t._findNewDirection=i,t._possibleRange=[0,100]):t._possibleRange=i<o?[0,o]:[r,100]}else t._possibleRange=[0,100]};this.config.helpMessage&&(this._helper=new u.Popup({css:"dhx_tooltip dhx_tooltip--forced dhx_tooltip--light"}),this._helper.attachHTML(this.config.helpMessage)),this._handlers={showHelper:function(e){e.preventDefault(),e.stopPropagation(),t._helper.show(e.target,{theme:e.target})},onmousedown:function(t){n(t),document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)},ontouchstart:function(o){t._setTooltip(o),t._mouseIn=!1,n(o),document.addEventListener("touchmove",e,{passive:!1}),document.addEventListener("touchend",i),t.paint()},ontouchend:function(e){t._setTooltip(e),t._mouseIn=!1,t.paint()},onlabelClick:function(){t.getRootView().refs.runner.el.focus()},onclick:function(e){if(!t._disabled&&!t._isMouseMoving&&3!==e.which){var i=(e[t._axis]-t._getBegining())/t._length*100,n=t.getRootView().refs;if(t.config.range)Math.abs(t._currentPosition-i)<Math.abs(t._extraCurrentPosition-i)?(t._updatePosition(i,!1),n.runner.el.focus()):(t._updatePosition(i,!0),n.extraRunner.el.focus());else t._updatePosition(i,!1),n.runner.el.focus();t.paint()}},onmouseover:function(e){t._setTooltip(e),t._mouseIn=!0,t.paint()},onmouseout:function(e){t._setTooltip(e),t._mouseIn=!1,t.paint()},onfocus:function(e){t._setTooltip(e),t._focusIn=!0,t.events.fire(h.SliderEvents.focus,[]),t.paint()},onblur:function(e){t._setTooltip(e),t._focusIn=!1,t.events.fire(h.SliderEvents.blur,[]),t.paint()},onkeydown:function(e){t.events.fire(h.SliderEvents.keydown,[e])}}},e.prototype._getBegining=function(){return"horizontal"===this.config.mode?this._offsets.left-window.pageXOffset:this._offsets.top-window.pageYOffset},e.prototype._inSide=function(t){var e=this._possibleRange;return t<e[0]?(this._updatePosition(e[0],this._isExtraActive),!1):!(t>e[1])||(this._updatePosition(e[1],this._isExtraActive),!1)},e.prototype._updatePosition=function(t,e){void 0===e&&(e=!1),t>100&&(t=100),t<0&&(t=0);var i=this.config,n=i.max,o=i.min,r=e?this._extraCurrentPosition:this._currentPosition,a=this._getValue(r),l=this._getValue(t);if(a!==l&&this.events.fire(h.SliderEvents.beforeChange,[l,a,e])){var s=(l-o)/(n-o)*100,c=this._isInverse()?100-s:s;e?this._extraCurrentPosition=c:this._currentPosition=c,this.events.fire(h.SliderEvents.change,[l,a,e])}},e.prototype._getRunnerStyle=function(t){var e;void 0===t&&(t=!1);var i="horizontal"===this.config.mode?"left":"top",n=t?this._extraCurrentPosition:this._currentPosition;return(e={})[i]=n+"%",e},e.prototype._isInverse=function(){return this.config.inverse&&"horizontal"===this.config.mode||!this.config.inverse&&"vertical"===this.config.mode},e.prototype._getRunnerCss=function(t){return void 0===t&&(t=!1),"dhx_slider__thumb"+(t?" dhx_slider__thumb--extra":"")+(this._isMouseMoving&&(t&&this._isExtraActive||!t&&!this._isExtraActive)?" dhx_slider__thumb--active":"")+(this._disabled?" dhx_slider__thumb--disabled":"")+(this._isNullable(t?this._extraCurrentPosition:this._currentPosition)&&!this.config.range?" dhx_slider__thumb--nullable":"")},e.prototype._draw=function(){var t=this.config,e=t.labelPosition,i=t.mode,n=t.hiddenLabel,o=t.tick,a=t.majorTick,s=t.css,c=t.helpMessage,d=(0,f.getLabelStyle)(r(r({},this.config),{required:!1}));return!this._tooltip||this._mouseIn&&this._focusIn&&this._isMouseMoving||document.body.contains(this._tooltip)&&document.body.removeChild(this._tooltip),(0,l.el)("div",{class:"dhx_slider dhx_slider--mode_"+i+("left"===e?" dhx_slider--label-inline":"")+(n?" dhx_slider--label_sr":"")+(o?" dhx_slider--ticks":"")+(a?" dhx_slider--major-ticks":"")+(s?" "+s:"")+(this._disabled?" dhx_slider--disabled":""),style:{paddingBottom:this.config.tick?"16px":null}},[d?(0,l.el)("label.dhx_label.dhx_slider__label",{style:d.style,class:c?"dhx_label--with-help":"",onclick:this._handlers.onlabelClick},c?[d.label&&(0,l.el)("span.dhx_label__holder",d.label),(0,l.el)("span.dhx_label-help.dxi.dxi-help-circle-outline",{tabindex:"0",role:"button",onclick:this._handlers.showHelper})]:d.label):null,this._drawSlider()])},e.prototype._drawSlider=function(){return(0,l.el)(".dhx_widget.dhx_slider__track-holder",{"data-dhx-widget-id":this._uid},[(0,l.el)(".dhx_slider__track",{_ref:"track",onmouseover:this._handlers.onmouseover,onmouseout:this._handlers.onmouseout,onclick:this._handlers.onclick},[this._getDetector(),(0,l.el)("div",{_ref:"runner",class:this._getRunnerCss(),ontouchstart:this._handlers.ontouchstart,ontouchend:this._handlers.ontouchend,onmousedown:this._handlers.onmousedown,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,onkeydown:this._handlers.onkeydown,style:this._getRunnerStyle(),tabindex:0}),this.config.tooltip&&(this._mouseIn||this._focusIn||this._isMouseMoving)?this._drawTooltip():null,this.config.tooltip&&this.config.range&&(this._mouseIn||this._focusIn||this._isMouseMoving)?this._drawTooltip(!0):null,this.config.range?(0,l.el)("div",{_ref:"extraRunner",class:this._getRunnerCss(!0),ontouchstart:this._handlers.ontouchstart,ontouchend:this._handlers.ontouchend,onmousedown:this._handlers.onmousedown,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,onkeydown:this._handlers.onkeydown,style:this._getRunnerStyle(!0),tabindex:0}):null]),this.config.tick?this._drawTicks():null])},e.prototype._getDetector=function(){var t,e,i;if(this._disabled)return(0,l.el)(".dhx_slider__range");var n="horizontal"===this.config.mode?"left":"top",o="horizontal"===this.config.mode?"width":"height";if(this.config.range){var r=this._currentPosition>this._extraCurrentPosition?[this._currentPosition,this._extraCurrentPosition]:[this._extraCurrentPosition,this._currentPosition],a=r[0],s=r[1];return(0,l.el)(".dhx_slider__range",{style:(t={},t[n]=s+"%",t[o]=a-s+"%",t)})}return this._isInverse()?(0,l.el)(".dhx_slider__range",{style:(e={},e[n]=this._currentPosition+"%",e[o]=100-this._currentPosition+"%",e)}):(0,l.el)(".dhx_slider__range",{style:(i={},i[n]=0,i[o]=this._currentPosition+"%",i)})},e.prototype._drawTooltip=function(t){if(void 0===t&&(t=!1),"none"!==this._activeTooltip&&this.getRootView()){var e="extraTooltip"===this._activeTooltip?this._extraCurrentPosition:this._currentPosition,i="horizontal"===this.config.mode?"left":"top",n="";(t&&this._isExtraActive||!t&&!this._isExtraActive)&&(n+=" dhx_slider__thumb-label--active"),this._tooltip||(this._tooltip=document.createElement("div"));var o="tooltip"===this._activeTooltip?this.getRootView().refs.runner.el.getBoundingClientRect():this.getRootView().refs.extraRunner.el.getBoundingClientRect();this._tooltip.className="dhx_slider__thumb-label"+n,this._tooltip.style.left=o.x+("left"===i?6:-30)+window.pageXOffset+"px",this._tooltip.style.top=o.y+("left"===i?-30:6)+window.pageYOffset+"px",this._tooltip.innerText=this._getValue(e).toString(),document.body.appendChild(this._tooltip)}},e.prototype._getTicks=function(){for(var t=this.config,e=t.max,i=t.min,n=t.step,o=t.tick,r=t.majorTick,a=e-i,l=n*o/a,s=[],c=0,d=0;c<1;){var u=+(Number(i)+c*a).toFixed(5),h=d%r==0;s.push({position:(this._isInverse()?100*(1-c):100*c)+"%",isMultiple:h,label:h&&"function"==typeof this.config.tickTemplate?this.config.tickTemplate(u):null}),c+=l,d++}return s.push({position:(this._isInverse()?0:100)+"%",isMultiple:!0,label:"function"==typeof this.config.tickTemplate?this.config.tickTemplate(e):null}),s},e.prototype._drawTicks=function(){var t="horizontal"===this.config.mode?"left":"top";return(0,l.el)(".dhx_slider__ticks-holder",this._getTicks().map((function(e){var i;return(0,l.el)("div",{class:"dhx_slider__tick"+(e.isMultiple?" dhx_slider__tick--major":""),style:(i={},i[t]=e.position,i)},void 0!==e.label?[(0,l.el)(".dhx_slider__tick-label",e.label)]:null)})))},e.prototype._isNullable=function(t){return this._isInverse()?100===t:0===t},e.prototype._setTooltip=function(t){t.target.classList.contains("dhx_slider__thumb--extra")?this._activeTooltip="extraTooltip":t.target.classList.contains("dhx_slider__thumb")?this._activeTooltip="tooltip":this._activeTooltip="none"},e}(d.View);e.Slider=g},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Popup=void 0;var a=i(0),l=i(1),s=i(6),c=i(2),d=i(11),u=i(43),h=function(t){function e(e){void 0===e&&(e={});var i=t.call(this,null,(0,a.extend)({},e))||this,n=i._popup=document.createElement("div");return n.className="dhx_widget dhx_popup"+(i.config.css?" "+i.config.css:""),n.style.position="absolute",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.setAttribute("aria-live","polite"),i.config.theme&&i._setTheme(i.config.theme),i.mount(n,(0,l.create)({render:function(){return i.toVDOM()}})),i._clickEvent=function(t){return i.events.fire(u.PopupEvents.click,[t])},i.events=e.events||new s.EventSystem(i),i._isActive=!1,i}return o(e,t),e.prototype.show=function(t,e,i){var n=this;void 0===e&&(e={}),this.events.fire(u.PopupEvents.beforeShow,[t])&&(t=(0,c.toNode)(t),this._isActive?this._setPopupSize(t,e):(i&&this.attach(i),e.theme&&this._setTheme(e.theme),this._popup.style.left="0",this._popup.style.top="0",(0,l.awaitRedraw)().then((function(){n._setPopupSize(t,e),n._popup.style.position="fixed",document.body.appendChild(n._popup),n._isActive=!0})).then((function(){n._popup.style.position="absolute",n.events.fire(u.PopupEvents.afterShow,[t]),n._outerClickDestructor=n._detectOuterClick(t)}))))},e.prototype.hide=function(){this._hide(!1,null)},e.prototype.isVisible=function(){return this._isActive},e.prototype.attach=function(t,e){return this._html=null,"object"==typeof t?this._ui=t:"string"==typeof t?this._ui=new window.dhx[t](null,e):"function"==typeof t&&(t.prototype instanceof d.View?this._ui=new t(null,e):this._ui={getRootView:function(){return t(e)}}),this.paint(),this._ui},e.prototype.attachHTML=function(t){this._html=t,this.paint()},e.prototype.getWidget=function(){return this._ui},e.prototype.getContainer=function(){return this.getRootView().refs.content.el},e.prototype.toVDOM=function(){var t;return this._html?t=(0,l.el)(".dhx_popup__inner-html-content",{".innerHTML":this._html}):(t=this._ui?this._ui.getRootView():null)&&t.render&&(t=(0,l.inject)(t)),(0,l.el)("div",{class:"dhx_popup-content",tabindex:0,onclick:this._clickEvent,_key:this._uid,_ref:"content"},[t])},e.prototype.destructor=function(){this.events&&this.events.clear(),this.hide(),this._outerClickDestructor&&this._outerClickDestructor(),this._popup=null},e.prototype._setTheme=function(t){var e;if("string"==typeof t)this._popup.setAttribute("data-dhx-theme",t);else{var i=null===(e=null==t?void 0:t.closest("[data-dhx-theme]"))||void 0===e?void 0:e.getAttribute("data-dhx-theme");i&&this._popup.setAttribute("data-dhx-theme",i)}},e.prototype._setPopupSize=function(t,e,i){var n=this;void 0===i&&(i=3);var o=this._popup.getBoundingClientRect(),a=o.width,l=o.height;if(this._timeout&&(clearTimeout(this._timeout),this._timeout=null),!i||0!==a&&0!==l){var s=(0,c.fitPosition)(t,r(r({centering:!0,mode:"bottom"},e),{width:a,height:l})),d=s.left,u=s.top;if(this._popup.style.left=d,this._popup.style.top=u,e.indent&&0!==e.indent)switch(e.mode){case"top":this._popup.style.top=parseInt(this._popup.style.top.slice(0,-2),null)-parseInt(e.indent.toString(),null)+"px";break;case"bottom":default:this._popup.style.top=parseInt(this._popup.style.top.slice(0,-2),null)+parseInt(e.indent.toString(),null)+"px";break;case"left":this._popup.style.left=parseInt(this._popup.style.left.slice(0,-2),null)-parseInt(e.indent.toString(),null)+"px";break;case"right":this._popup.style.left=parseInt(this._popup.style.left.slice(0,-2),null)+parseInt(e.indent.toString(),null)+"px"}}else this._timeout=setTimeout((function(){n._isActive&&(n._setPopupSize(t,e,i-1),n._timeout=null)}))},e.prototype._detectOuterClick=function(t){var e=this,i=!1,n=new WeakMap,o=function(r){var a=r.target,l=document.querySelectorAll(".dhx_popup");for(i?l.forEach((function(t){return n.has(t)||n.set(t,e._popup)})):(i=Boolean(l.length))&&l.forEach((function(t){return n.set(t,!0)}));a;){if(a===t||a===e._popup||n.get(a)===e._popup)return;a=a.parentNode}e._hide(!0,r)&&document.removeEventListener("mousedown",o)};return document.addEventListener("mousedown",o),function(){return document.removeEventListener("mousedown",o)}},e.prototype._hide=function(t,e){if(this._isActive)return!!this.events.fire(u.PopupEvents.beforeHide,[t,e])&&(document.body.removeChild(this._popup),this._isActive=!1,this._outerClickDestructor&&(this._outerClickDestructor(),this._outerClickDestructor=null),this.events.fire(u.PopupEvents.afterHide,[e]),!0)},e}(d.View);e.Popup=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={hours:"Hours",minutes:"Minutes",save:"Save"}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTimeCheck=void 0,e.isTimeCheck=function(t){return/(^12:[0-5][0-9]?AM$)/i.test(t)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.linkButtonClasses=void 0,e.linkButtonClasses=".dhx_button.dhx_button--view_link.dhx_button--icon.dhx_button--size_medium.dhx_button--color_secondary"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckboxEditor=void 0;var n=i(0),o=i(1),r=i(3),a=i(4),l=function(){function t(t,e,i){this._config=i,this._cell={row:t,col:e},this._initHandlers()}return t.prototype.endEdit=function(){var t=this._checked;this._config.events.fire(r.GridEvents.beforeEditEnd,[t,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.events.fire(r.GridEvents.afterEditEnd,[t,this._cell.row,this._cell.col])):this._input.checked=!t},t.prototype.toHTML=function(){void 0===this._checked&&(this._checked=this._cell.row[this._cell.col.id]);var t=(0,n.uid)();return(0,o.el)("div.dhx_checkbox.dhx_cell-editor__checkbox",[(0,o.el)("label",{style:{display:"none"},for:t},(0,a.getColumnHeaderText)(this._cell.col)),(0,o.el)("input.dhx_checkbox__input",{type:"checkbox",_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","data-dhx-checked":(!!this._checked).toString(),checked:this._checked,id:t,style:{userSelect:"none"}}),(0,o.el)("span.dhx_checkbox__visual-input")])},t.prototype._initHandlers=function(){var t=this;this._handlers={onClick:function(){var e=!t._input.checked;t._config.events.fire(r.GridEvents.beforeEditStart,[t._cell.row,t._cell.col,"checkbox"])?(t._checked=e,t._config.events.fire(r.GridEvents.afterEditStart,[t._cell.row,t._cell.col,"checkbox"]),t.endEdit()):t._input.checked=!e},didInsert:function(e){t._checkbox=e.el.parentNode.lastChild,t._input=e.el.parentNode.querySelector("input"),e.el.parentNode.addEventListener("click",t._handlers.onClick)}}},t}();e.CheckboxEditor=l},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ComboboxEditor=void 0;var o=i(1),r=i(3),a=i(4),l=i(47),s=i(17),c=i(4),d=function(){function t(t,e,i){this._config=i,this._cell={row:t,col:e},this._initHandlers()}return t.prototype.endEdit=function(t){var e=this;if(this._config.$editable){var i;if(!t){var n=this._input.getValue();i="multiselect"===this._cell.col.editorType?n.split(",").join(", "):n}if(this._config.events.fire(r.GridEvents.beforeEditEnd,[i,this._cell.row,this._cell.col])){var o=(0,c.getEditorOptions)(this._cell.col,this._cell.row);this._input.popup.hide(),document.removeEventListener("mousedown",this._handlers.onOuterClick),this._cell.row=this._config.datacollection.getItem(this._cell.row.id),s.focusManager.setFocusId(this._config.gridId),"multiselect"===this._cell.col.editorType?null==i||i.toString().split(", ").forEach((function(t){return e._setCustomOptions(t,o)})):this._setCustomOptions(null==i?void 0:i.toString(),o),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[i,this._cell.row,this._cell.col])}else this._input.focus()}},t.prototype.toHTML=function(){var t=this,e=(0,c.getEditorOptions)(this._cell.col,this._cell.row).map((function(t){return"string"==typeof t?{id:"".concat(t),value:t}:t}))||[];if(!this._input){this._input=new l.ProCombobox(null,n({itemHeight:37,css:"dhx_cell-editor__combobox",multiselection:"multiselect"===this._cell.col.editorType,htmlEnable:this._cell.col.htmlEnable},this._cell.col.editorConfig)),this._input.data.parse(e);var i=this._cell.row[this._cell.col.id],r="multiselect"===this._cell.col.editorType?((null==i?void 0:i.toString())||"").split(", "):i;this._input.setValue(r),this._input.events.on("keydown",this._handlers.onkeydown),this._input.data.events.on("beforeAdd",(function(e){if(e.id!==e.value)return t._input.addOption({id:e.value,value:e.value},!0),!1}))}return document.addEventListener("mousedown",this._handlers.onOuterClick),this._config.$editable.editor=this,(0,o.awaitRedraw)().then((function(){var e=t._input.getRootView().refs.holder.el,i=e.querySelector("input");i&&i.setAttribute("aria-label",(0,a.getColumnHeaderText)(t._cell.col)),t._input.popup.getContainer().style.width=e.offsetWidth+"px",t._input._filter(),t._input.popup.show(e)})),s.focusManager.setFocusId(this._input._uid),(0,o.inject)(this._input.getRootView())},t.prototype._initHandlers=function(){var t=this;this._handlers={onOuterClick:function(e){if(e.target instanceof Node){var i=t._input&&t._input.getRootNode()&&t._input.getRootNode().contains(e.target),n=t._input.popup&&t._input.popup.getRootNode()&&t._input.popup.getRootNode().contains(e.target);i||n||t.endEdit()}},onkeydown:function(e){if("Escape"!==e.key&&"Tab"!==e.key||t.endEdit(),"Enter"===e.key){if(!t._config.events.fire(r.GridEvents.beforeKeyDown,[e]))return;e.stopPropagation(),t.endEdit(),t._config.events.fire(r.GridEvents.afterKeyDown,[e])}}}},t.prototype._setCustomOptions=function(t,e){var i=e.find((function(e){return"string"==typeof e?e===t:e.id.toString()===t}));t&&!i&&(this._cell.col.$customOptions||(this._cell.col.$customOptions=[]),this._cell.col.$customOptions.push(this._input.data.getItem(t)))},t}();e.ComboboxEditor=d},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KEY_CODES=void 0,e.KEY_CODES={BACKSPACE:8,ENTER:13,ESC:27,DOWN_ARROW:40,UP_ARROW:38,LEFT_ARROW:37,RIGHT_ARROW:39}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditor=void 0;var n=i(111);e.getEditor=function(t,e){return new n.InputEditor(t,e)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputEditor=void 0;var n=i(1),o=i(31),r=function(){function t(t,e){var i=this;this._list=e,this._config=e.config,this._item=t,this._list.events.on(o.ListEvents.focusChange,(function(t,e){i._mode&&e!==i._item.id&&i.endEdit()})),this._initHandlers()}return t.prototype.endEdit=function(){if(this._input){var t=this._input.value;this._list.events.fire(o.ListEvents.beforeEditEnd,[t,this._item.id])?(this._input.removeEventListener("blur",this._handlers.onBlur),this._input.removeEventListener("change",this._handlers.onChange),this._input.removeEventListener("keydown",this._handlers.onKeyDown),this._handlers={},this._mode=!1,this._list.events.fire(o.ListEvents.afterEditEnd,[t,this._item.id])):this._input.focus()}},t.prototype.toHTML=function(){this._mode=!0;var t=this._config.itemHeight;return(0,n.el)(".dhx_input__wrapper",{role:"presentation"},[(0,n.el)("div.dhx_input__container",{role:"presentation"},[(0,n.el)("input.dhx_input",{class:this._item.css?" "+this._item.css:"",style:{height:t,width:"100%",padding:"8px 12px"},_hooks:{didInsert:this._handlers.didInsert},_key:this._item.id,"data-dhx-id":this._item.id})])])},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onChange:function(){t.endEdit()},onKeyDown:function(e){"Enter"===e.key&&t._item.value===t._input.value&&t.endEdit(),"Escape"===e.key&&(t._input.value=t._item.value,t.endEdit())},didInsert:function(e){var i=e.el;t._input=i,i.focus(),i.value=t._item.value,i.setSelectionRange(0,i.value.length),i.addEventListener("change",t._handlers.onChange),i.addEventListener("blur",t._handlers.onBlur),i.addEventListener("keydown",t._handlers.onKeyDown)}}},t}();e.InputEditor=r},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.ProList=void 0;var l=i(1),s=i(42),c=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.scrollView=new s.ScrollView((function(){return n.getRootView()})),n.paint(),n}return o(e,t),e.prototype.destructor=function(){t.prototype.destructor.call(this),this.scrollView=null},e.prototype.scrollTo=function(t){var e,i,n=this.getRootView();if(n&&n.node&&n.node.el&&void 0!==t){var o=(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)?null===(i=this.getRootNode())||void 0===i?void 0:i.querySelector(".scroll-view"):this.getRootNode();this._scrollTo(t,o)}},e.prototype._renderList=function(){var t=this,e=this._getRange(),i=this.data.getRawData(e[0],e[1]).map((function(e,i){return t._renderItem(e,i)}));this.config.virtual&&(i=a(a([(0,l.el)(".div",{style:{height:e[2]+"px",_key:"start-key"}})],i,!0),[(0,l.el)(".div",{style:{height:e[3]+"px",_key:"end-key"}})],!1));var n=this.scrollView&&this.scrollView.config.enable,o=(this.config.css?this.config.css:"")+(this.config.multiselection&&this.selection.getItem()?" dhx_no-select--pointer":"")+(n?" dhx_list--scroll-view":"");return(0,l.el)("ul.dhx_widget.dhx_list",r(r({style:{"max-height":this.config.height,position:"relative"},id:this._uid,class:o,"data-dhx-widget-id":this._uid,"data-dhx-drop-area":"row"},this._handlers),this._getListAriaAttrs(this.config,this.data.getLength())),n?[].concat(this.scrollView.render(i)):i)},e}(i(50).List);e.ProList=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyListener=void 0;var n=function(){function t(){var t=this;this._handler=function(e){if(t._isActive){var i=e.key;"Backspace"===i&&t._sequence.length>0&&(t._sequence=t._sequence.slice(0,t._sequence.length-1),t._change()),i.length<2&&(t._sequence+=i,t._change())}},this._sequence="",document.addEventListener("keydown",this._handler)}return t.prototype.startNewListen=function(t){this._isActive=!0,this._sequence="",this._currentAction=t},t.prototype.endListen=function(){this._currentAction=null,this.reset(),this._isActive=!1},t.prototype.reset=function(){this._sequence=""},t.prototype.destructor=function(){document.removeEventListener("keydown",this._handler)},t.prototype._change=function(){this._currentAction(this._sequence),this._addClearTimeout()},t.prototype._addClearTimeout=function(){var t=this;this._clearTimeout&&clearTimeout(this._clearTimeout),this._clearTimeout=setTimeout((function(){t.reset(),t._clearTimeout=null}),2e3)},t}();e.KeyListener=n},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProCombobox=void 0;var r=i(48),a=i(49),l=i(27),s=i(52),c=function(t){function e(e,i){return t.call(this,e,i)||this}return o(e,t),e.prototype._createLayout=function(){var t=this.list=new a.ProList(null,{$template:r.$template,template:this.config.template,htmlEnable:this.config.htmlEnable,virtual:this.config.virtual,keyNavigation:!0,multiselection:this.config.multiselection,itemHeight:this.config.itemHeight,height:this.config.listHeight,data:this.data,eventHandlers:this.config.eventHandlers}),e=this._layout=new l.ProLayout(this.popup.getContainer(),{css:"dhx_combobox-options dhx_combobox__options",rows:[{id:"select-unselect-all",hidden:!this.config.multiselection||!this.config.selectAllButton},{id:"list",height:"content"},{id:"not-found",hidden:!0}],on:{click:{".dhx_combobox__action-select-all":this._handlers.selectAll,".dhx_combobox-options__action-create-option":this._handlers.addOption}}});e.getCell("list").attach(t),this.config.multiselection&&this.config.selectAllButton&&e.getCell("select-unselect-all").attach(s.selectAllView)},e}(r.Combobox);e.ProCombobox=c},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaEditor=void 0;var o=i(1),r=i(3),a=i(0),l=i(4),s=i(4),c=i(18),d=function(){function t(t,e,i,n){this._config=i,this._cell={row:t,col:e},this.type=this._cell.col.type,this._width=this._getCellWidth(n),this._config.firstColId===this._cell.col.id&&this._cell.row.hasOwnProperty("$level")&&(this._width-=(0,s.getTreeCellWidthOffset)(this._cell.row)-12),this._initHandlers()}return t.prototype.endEdit=function(t){var e;this._config.$editable&&(t||(e=this._removeValuePattern(this._input.value,!0),("number"===this.type||this._cell.col.numberMask)&&(e=parseFloat(e),Number.isNaN(e)&&(e=""))),this._config.events.fire(r.GridEvents.beforeEditEnd,[e,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[e,this._cell.row,this._cell.col])):this._input.focus())},t.prototype.toHTML=function(t){var e;(0,a.isDefined)(t)&&(this.type="string"),t=null!==(e=this._input?this._input.value:null!=t?t:this._cell.row[this._cell.col.id])&&void 0!==e?e:"";var i=this._cell.col.numberMask;(0,a.isDefined)(null==i?void 0:i.maxDecLength)&&(i=n(n({},i),{maxDecLength:void 0})),t=this._applyValuePattern(t,this._input,!0,i),this._config.$editable.editor=this;var r=void 0!==this._cell.row.height||this._cell.col.htmlEnable?"dhx_cell-editor dhx_cell-editor__textarea_constant-height":"dhx_cell-editor dhx_cell-editor__textarea";return(0,o.el)("textarea",{_hooks:{didInsert:this._handlers.didInsert},_ref:"textarea",_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,l.getColumnHeaderText)(this._cell.col),value:t,onblur:this._handlers.onBlur,oninput:this._handlers.onInput,onkeydown:this._handlers.onKeydown,class:r,style:{width:this._width}})},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onInput:function(e){var i=t._removeValuePattern(t._input.value);t._input.value=t._applyValuePattern(i,t._input),t._updateHeight(e,t._input.value)},onKeydown:function(e){"Escape"===e.key&&t._updateHeight(e,t._initialValue),"Enter"!==e.key||e.shiftKey||e.preventDefault()},didInsert:function(e){t._input=e.el,t._initialValue=e.el.value,t._input.focus()}}},t.prototype._getCurrentHeight=function(t,e){e=n({width:100,maxHeight:40,lineHeight:20},e);var i=document.createElement("textarea");i.className="dhx_cell-editor dhx_cell-editor__textarea",i.value=t,i.style.width="".concat(e.width,"px"),i.style.lineHeight="".concat(e.lineHeight,"px"),i.style.maxHeight="".concat(e.maxHeight,"px"),i.style.boxSizing="border-box",document.body.appendChild(i);var o=this._getElementHeight(i),r=i.value.split("\n").length,a=Math.round(o/e.lineHeight),l=o<e.maxHeight?e.maxHeight:o;return document.body.removeChild(i),1===r&&r===a?e.maxHeight:l},t.prototype._getElementHeight=function(t){return t.scrollHeight},t.prototype._applyValuePattern=function(t,e,i,o){return void 0===i&&(i=!1),this._cell.col.numberMask?(0,c.numberMask)(t.toString(),n(n({},o||this._cell.col.numberMask),{onlyView:i}),e):this._cell.col.patternMask?(0,c.patternMask)(t.toString(),this._cell.col.patternMask,e):t},t.prototype._removeValuePattern=function(t,e){return void 0===e&&(e=!1),this._cell.col.numberMask?(0,c.removeNumberMask)(t,n(n({},this._cell.col.numberMask),{lastCall:e})):this._cell.col.patternMask?(0,c.removePatternMask)(t,this._cell.col.patternMask):t},t.prototype._getCellWidth=function(t){return t?this._config.columns.slice(t.$colsVisibility[0],t.$colsVisibility[1]+1).reduce((function(t,e){return t+e.$width}),0):this._cell.col.$width},t.prototype._updateHeight=function(t,e){var i,o;if(void 0===this._cell.row.height&&!this._cell.col.htmlEnable){var a=this._getCurrentHeight(e,{width:this._width-2,maxHeight:this._config.rowHeight}),l=n(n({},this._cell.row),((i={})[this._cell.col.id]=e,i)),c=(0,s.getCalculatedRowHeight)((0,s.getMaxRowHeight)({row:l,cols:this._config.columns})),d=(0,s.getCalculatedRowHeight)((0,s.getMaxRowHeight)({row:(o={},o[this._cell.col.id]=l[this._cell.col.id],o),cols:this._config.columns}));if(this._minHeight=c===d?this._config.rowHeight:c,a>=this._minHeight&&a!==this._prevHeight){if(!this._config.events.fire(r.GridEvents.beforeRowResize,[this._cell.row,t,a]))return;this._config.events.fire(r.GridEvents.afterRowResize,[this._cell.row,t,a])}this._prevHeight=a}},t}();e.TextAreaEditor=d},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.getGroupPanel=e.getGroupItem=void 0;var r=i(1),a=i(3),l=i(2),s=i(56);var c={onclick:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemClick,[i,e])},onmousedown:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemMouseDown,[i,e])},ontouchstart:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemMouseDown,[i,e])},ontouchmove:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t._events.fire(a.GridSystemEvents.groupPanelItemTouchMove,[i,e])},ontouchend:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t._events.fire(a.GridSystemEvents.groupPanelItemItemTouchEnd,[i,e])}};function d(t){var e=t.id,i=t.label,n=t.sortDir,o=t.sortOrder,a=t.mode,l=void 0===a?"basic":a,s=t.sortable,c=void 0===s||s,d=t.closable,u=void 0===d||d;return(0,r.el)("div",{role:"option",class:"dhx_grid-group_item dhx_grid-group_item--".concat(l),"data-dhx-group-item-id":e,"data-dhx-id":e,_key:e},[c&&(n&&(0,r.el)("div.dhx_grid-sort",[(0,r.el)("i.dxi.dxi-arrow-up.dhx_grid-group_item-sort.dhx_grid-group_item-sort--".concat(n),{"aria-hidden":"true"}),o&&(0,r.el)("div.dhx_grid-sort-counter",{"aria-hidden":"true"},[o])||null])||(0,r.el)("i.dxi.dxi-sort.dhx_grid-group_item-sort.dhx_grid-group_item-unsorted"))||null,(0,r.el)("span.dhx_grid-group_item-label",i),u&&(0,r.el)("i.dxi.dxi-close-circle.dhx_grid-group_item-remove",{"data-dhx-group-item-remove":"true"})||null])}e.getGroupItem=d,e.getGroupPanel=function(t,e){var i,a;void 0===t&&(t=[]);var l=[];t.forEach((function(e,i){l.push(d(e)),i!==t.length-1&&l.push(function(t){var e=t.id;return(0,r.el)("div.dhx_grid-group_chain",{"aria-hidden":"true","data-dhx-id":e,_key:"chain_".concat(e)},[(0,r.el)("i.dxi.dxi-chevron-right")])}(e))}));var u=Object.entries(c).reduce((function(t,i){var o,r=i[0],a=i[1];return n(n({},t),((o={})[r]=[a,e],o))}),{});return(0,r.el)("section",n({class:"dhx_grid-group_panel","data-dhx-drop-area":"group",role:"presentation",style:{height:(null===(a=null===(i=e.config)||void 0===i?void 0:i.group)||void 0===a?void 0:a.panelHeight)||40}},u),[(0,r.el)("div",{class:"dhx_grid-group_title"},s.default.dropAreaTitle),(0,r.el)("div",{class:"dhx_grid-group_drop-area",role:"listbox"},o([],l.length?l:[(0,r.el)("span",{class:"dhx_grid-group_drop-area-placeholder"},s.default.dropAreaPlaceholder)],!0))])}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.setSubRowCell=e.getSubRowContent=void 0;var o=i(1),r=i(5),a=i(20),l=i(41),s=i(7);function c(t,e,i,o){var r=e(t),s=new l.ProCell(null,{id:"cell"+t.id,css:"dhx_grid_subrow "+(i.css||""),html:"string"==typeof r&&r||null,height:t.$subRowHeight,padding:i.padding});o.set(t.id,n(n(n({},a.defaultSubRowConfig),i),{cell:s})),"function"==typeof(null==r?void 0:r.paint)&&s.attach(r)}e.getSubRowContent=function(t){var e,i=[],n=null===(e=t.subRowConfig)||void 0===e?void 0:e.fullWidth;return t.$subRowCells&&t.currentRows.forEach((function(e){var a;if(e.$opened){var l=t.$subRowCells.get(e.id),c=null===(a=null==l?void 0:l.cell)||void 0===a?void 0:a.getRootView();if(c){var d=(0,r.getTotalHeight)(t.data.slice(0,e.$index))+e.$height;i.push((0,o.el)(".dhx_grid_subrow__container",{_key:"sub"+e.id,role:"region","aria-labelledby":"row-".concat(e.id),"data-dhx-id":e.id,"data-dhx-root-widget-id":t.gridId,tabindex:0,style:{position:"absolute",top:d,width:n?t.$totalWidth:t.$width-t.$scrollBarWidth.y-s.BORDERS}},[(0,o.inject)(c)]))}}})),i.length?(0,o.el)(".dhx_grid_subrow__data",{_flags:o.KEYED_LIST,style:{left:n?0:t.scroll.left},role:"presentation"},i):[]},e.setSubRowCell=function(t,e){for(var i=t.config,o=i.subRowConfig,r=i.$subRowCells,l=i.subRow,s=new Map,d=0;d<e.length;d++){var u=e[d];if(!u.$group){if(!r.has(u.id)||!r.get(u.id).cell){var h=n(n({},a.defaultSubRowConfig),("function"==typeof o?o(u):o)||{});r.set(u.id,h),(u.$opened||h.preserve)&&u.$subRowHeight&&c(u,l,h,r)}s.set(u.id,u.$opened)}}r.forEach((function(t,e){var i;t.preserve||(s.has(e)||r.delete(e),s.get(e)||((null==t?void 0:t.cell)&&(null===(i=t.cell)||void 0===i||i.destructor()),delete t.cell))}))}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.getDragPanelNode=void 0;var r=i(1),a=i(3),l=i(20),s=i(7),c=i(2),d=i(5),u={onclick:function(t,e){var i=(0,c.locate)(e,"data-dhx-id");i&&t.events.fire(a.GridEvents.dragPanelItemClick,[i,e])},onmousedown:function(t,e){var i=(0,c.locate)(e,"data-dhx-id");i&&t.events.fire(a.GridEvents.dragPanelItemMouseDown,[i,e])}};function h(t){return(0,r.el)(".dhx_grid-drag-panel_header",{style:{height:t.$headerHeight},role:"banner","aria-label":"Panel header"})}function f(t,e,i){var n=t.$footer,o=((!i||e.footerAtBottom)&&t.$scrollBarWidth.x||0)+(n&&t.$footerHeight||0);if(!o||!n&&t.$totalHeight<t.$height-t.$headerHeight-t.$footerHeight)return null;var a=s.BORDERS/2,c=t.dragPanel,d={height:o+a};return e.footerAtBottom&&(d.width=c.width||l.defaultDragPanelConfig.width,d.height=d.height+a),(0,r.el)(".dhx_grid-drag-panel_footer".concat(e.footerAtBottom?".dhx_grid-drag-panel_footer--at-bottom":""),{style:d,role:"contentinfo","aria-label":"Panel footer"})}function p(t,e,i){var n=t.$height-t.$headerHeight-s.BORDERS;return(0,r.el)(".dhx_grid-drag-panel_main",{style:{height:n},role:"main","aria-label":"Panel content"},[g(t,e),f(t,e,i),v(t,e,a.Split.top,i),v(t,e,a.Split.bottom,i)])}function g(t,e){var i=t.dragPanel,n=t.currentRows.map((function(t){return _(t,i.icon)}));return(0,r.el)(".dhx_grid-drag-panel_content",{style:{height:t.$totalHeight,paddingTop:e.shifts.y,top:-t.scroll.top},_flags:r.KEYED_LIST,role:"list","aria-label":"Draggable rows"},o([],n,!0))}function v(t,e,i,n){var c=t.dragPanel,u=(i===a.Split.bottom?t.fixedRows.bottom:t.fixedRows.top)||[];if(!u.length)return null;var h=u.map((function(t){return _(t,c.icon)})),f={width:c.width||l.defaultDragPanelConfig.width};if(i===a.Split.bottom&&e.footerAtBottom)f.bottom=t.footerHeight+s.BORDERS/2+(t.$scrollBarWidth.x||-1);else{var p=(0,d.getTotalHeight)(t.fixedRows.bottom),g=t.group?(0,l.getGroupDefaultConfig)(t.group).panelHeight:0;f.top=i===a.Split.bottom?n?t.$totalHeight+t.$headerHeight-p+s.BORDERS/2+g:t.$height-p-t.$footerHeight-s.BORDERS/2-t.$scrollBarWidth.x+g:t.$headerHeight+g}return(0,r.el)(".dhx_grid-drag-panel_content.dhx_grid-drag-panel_content--fixed",{style:f,_flags:r.KEYED_LIST,role:"list","aria-label":"Draggable rows"},o([],h,!0))}function _(t,e){return(0,r.el)(".dhx_grid-drag-panel_item",{"data-dhx-id":t.id,style:{height:t.$height},_key:t.id+"_panel",role:"listitem","aria-label":"Row id ".concat(t.id)},[(0,r.el)("i.dhx_grid-drag-panel_item-icon",{class:e,"aria-hidden":"true"})])}e.getDragPanelNode=function(t,e,i,o){var a;void 0===o&&(o=!1);var s=e.dragPanel,c=Object.entries(u).reduce((function(e,i){var o,r=i[0],a=i[1];return n(n({},e),((o={})[r]=[a,t],o))}),{}),d="dhx_grid-drag-panel ";return o&&(d+="dhx_grid-drag-panel--less-height "),(null===(a=t.config.$grouped)||void 0===a?void 0:a.length)&&(d+="dhx_grid-drag-panel--drag-not-allowed "),s.css&&(d+=s.css),(0,r.el)("section",n({class:d,style:{width:s.width||l.defaultDragPanelConfig.width},role:"region","aria-label":"Drag panel"},c),[h(e),p(e,i,o)])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComboFilter=void 0;var n=i(47),o=i(6),r=i(8),a=i(0),l=i(3),s=i(21),c=function(){function t(t){var e,i=t.column,n=t.config,r=t.headerConfig,l=t.uniqueData,s=t.value,c=t.grid;this.events=new o.EventSystem,this._silentMode=!1,this.column=i,this.config=n,this.data=l,this.value=s,this.filterConfig={},this._grid=c,Object.assign(this.filterConfig,(null==r?void 0:r.filterConfig)||{}),(this.column.htmlEnable||(null===(e=this.config)||void 0===e?void 0:e.htmlEnable)&&!1!==this.column.htmlEnable)&&(this.column.template||!1===this.filterConfig.readonly||(this.filterConfig.readonly=!0),this.filterConfig.template||(this.filterConfig.template=function(t){return t.value})),this.filterConfig.filter||(this.filterConfig.filter=function(t,e){return(0,a.isExistValue)(t.value,e)}),this.initFilter(),this.config&&this.initHandlers()}return t.prototype.initFilter=function(){this._filter=new n.ProCombobox(null,Object.assign({virtual:!0},this.filterConfig)),this.data&&this._filter.data&&this._setData()},t.prototype.initHandlers=function(){var t=this,e=this.column.id.toString();[r.DataEvents.load,r.DataEvents.afterLazyLoad].forEach((function(e){t._grid.events.on(e,(function(){return t._setData()}),!0)})),this._filter.events.on("change",(function(i){var n;i&&((Array.isArray(i)?i.find((function(e){return t._filter.data.getItem(e)})):t._filter.data.getItem(i))&&(n=t._filter.config.multiselection?t._filter.list.selection.getItem().map((function(e){if(e&&t._filter.data.getItem(e.id))return e.value})):t._filter.list.selection.getItem().value));t.value=n,t._grid.events.fire(l.GridEvents.filterChange,[t.value,e,"comboFilter",t._silentMode]),t._silentMode&&void 0===t.value&&(t._silentMode=!1)})),this._grid.events.on(l.GridEvents.filterChange,(function(e){return t.events.fire(s.HeaderFilterEvent.change,[e])}),this),this._filter.popup.events.on("afterHide",(function(){t.filterConfig.multiselection||t._filter.list.selection.getItem()||t.clear()})),this._filter.popup.events.on("afterShow",(function(){!t.filterConfig.multiselection&&(""===t.value||t.filterConfig.readonly&&void 0!==t.value)&&t.clear()})),this._grid.events.on(l.GridEvents.scroll,(function(){var e;t._isFocused&&(null===(e=t._filter.getRootView().refs)||void 0===e?void 0:e.input)&&t._filter.focus()}),this),this._grid.events.on(l.GridEvents.headerCellMouseDown,(function(e,i){i.id!==t.column.id&&t.blur()}),this),this._grid.events.on(l.GridEvents.cellMouseDown,(function(){return t.blur()}),this),this._grid.events.on(r.DataEvents.change,(function(e,i){t.column.hidden||"update"!==i||(t._checkValue(),t._setData(!0))}),this),this._grid.events.on(r.DataEvents.afterAdd,(function(){t.column.hidden||t._setData(!0)})),this._grid.events.on(r.DataEvents.afterRemove,(function(){t.column.hidden||(t._checkValue(),t._setData(!0))})),this._grid.events.on(r.DataEvents.removeAll,(function(){t.clear(!0),t._setData()}),this),this._grid.events.on(l.GridEvents.afterRowShow,(function(){return t._setData(!0)}),this),this._grid.events.on(l.GridEvents.afterRowHide,(function(){t.column.hidden||(t._checkValue(),t._setData(!0))}),this),this._grid.events.on(r.DataEvents.filter,(function(e){t.column.hidden||(!e||(0,r.isOnlyPermanentFilters)(e)?t.clear(!0):t._checkValue(),t.filterConfig.multiselection&&t._filter.popup.isVisible()||t._setData(!0))}),this),this._grid.events.on(l.GridEvents.afterColumnShow,(function(){t.filterConfig.multiselection||(t._checkValue(),t._setData())}),this),this._grid.events.on(l.GridEvents.afterColumnHide,(function(){t.filterConfig.multiselection||t._setData()}),this)},t.prototype.getFilter=function(){return this._filter},t.prototype.setValue=function(t,e){var i,n=this;if(this.filterConfig.multiselection||!Array.isArray(t))if((0,a.isDefined)(t)){if((null==t?void 0:t.length)||""===t){var o=this.filterConfig.multiselection&&Array.isArray(t)?t.map((function(t){var e;return null===(e=n._filter.data.find((function(e){return e.value===t})))||void 0===e?void 0:e.id})):null===(i=this._filter.data.find((function(e){return e.value===t})))||void 0===i?void 0:i.id;this._filter.setValue(o,e)}}else e&&(this._silentMode=!0),this._filter.clear(),this.filterConfig.multiselection||void 0===this.value||(this.value=void 0,this._grid.events.fire(l.GridEvents.filterChange,[this.value,this.column.id,"comboFilter"]))},t.prototype.clear=function(t){void 0!==this.value&&this.setValue(null,t)},t.prototype.focus=function(){var t;this._isFocused=!0,(null===(t=this._filter.getRootView().refs)||void 0===t?void 0:t.input)&&this._filter.focus()},t.prototype.blur=function(){var t;this._isFocused=!1,(null===(t=this._filter.getRootView().refs)||void 0===t?void 0:t.input)&&this._filter.blur()},t.prototype.destructor=function(){var t=this._grid.events;if(t)for(var e in t.events)this._grid.events.detach(e,this);this.events.clear(),this._filter&&this._filter.destructor(),this.config=this.filterConfig=this.data=this.column=this.value=this.events=null},t.prototype._setData=function(t){var e=this;void 0===t&&(t=!1);var i=function(){var t=e.column.$activeFilterData||e.column.$uniqueData;if(e.column.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.filter}))){var i=e._filter.data.reduce((function(t,e){return t[e.value]=e.id,t}),{}),n=t.map((function(t){return i[t]?{id:i[t],value:t}:{value:t}}));e._filter.data.parse(n)}else e._filter.data.parse(t.map((function(t){return{value:t}})))};void 0===this.value?i():t&&this.filterConfig.multiselection&&(i(),this.setValue(this.value,!0))},t.prototype._checkValue=function(){if(void 0!==this.value)for(var t=Array.isArray(this.value)?this.value:[this.value],e=function(e){if(i.column.$uniqueData.includes(e))return"continue";if(t.length>1){var n=i._filter.data.find((function(t){return t.value===e}));i._filter.list.selection.remove(n.id)}else i.clear();return"break"},i=this,n=0,o=t;n<o.length;n++){if("break"===e(o[n]))break}},t}();e.ComboFilter=c},function(t,e,i){"use strict";var n=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.SelectFilter=void 0;var o=i(1),r=i(6),a=i(3),l=i(21),s=i(4),c=function(){function t(t){var e=t.column,i=t.config,n=t.uniqueData,o=void 0===n?[]:n,a=t.value,l=t.grid;this.events=new r.EventSystem,this.column=e,this.config=i,this.data=o,this.value=a||"",this._grid=l,this.initHandlers(),this.toHTML()}return t.prototype.toHTML=function(){var t,e=this;return(0,o.el)("label.dhx_grid-filter__label.dxi.dxi-menu-down",{_ref:"".concat(this.column.id,"_filter")},[(0,o.el)("select.dxi.dxi-menu-down",{type:"text",class:"dhx_input dhx_grid-filter dhx_grid-filter--select","aria-label":"Filter ".concat((0,s.getColumnHeaderText)(this.column)),tabindex:-1,onchange:this._handlers.onchange,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,_key:this.column.id},n([(0,o.el)("option",{value:"",_key:0},"")],null===(t=(this.value?[this.value]:this.data)||[])||void 0===t?void 0:t.map((function(t){return""!==(t=null!=t?t:"")&&(0,o.el)("option",{_key:t,value:t,selected:e.value===t.toString()},t)})),!0))])},t.prototype.getFilter=function(){return this.toHTML()},t.prototype.setValue=function(t,e){this.value=t||"",this.events.fire(l.HeaderFilterEvent.change,[t]),this._grid.events.fire(a.GridEvents.filterChange,[this.value,this.column.id,"selectFilter",e])},t.prototype.clear=function(t){this.setValue("",t)},t.prototype.focus=function(){var t,e;this._isFocused=!0;var i=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;i&&i.focus()},t.prototype.blur=function(){var t,e;this._isFocused=!1;var i=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;i&&i.blur()},t.prototype.initHandlers=function(){var t=this;this._handlers={onchange:function(e){var i,n,o,r,a=(null===(i=e.target)||void 0===i?void 0:i.value)||(null===(o=null===(n=e.composedPath())||void 0===n?void 0:n[0])||void 0===o?void 0:o.value)||(null===(r=e.explicitOriginalTarget)||void 0===r?void 0:r.value);t.setValue(a)},onfocus:function(){t._isFocused=!0},onblur:function(){t._isFocused=!1}},this._grid.events.on(a.GridEvents.scroll,(function(){var e,i,n=null===(i=null===(e=t._grid.getRootView())||void 0===e?void 0:e.refs["".concat(t.column.id,"_filter")])||void 0===i?void 0:i.el;t._isFocused&&n&&(0,o.awaitRedraw)().then((function(){n.focus()}))})),this._grid.events.on(a.GridEvents.headerCellMouseDown,(function(e,i){i.id!==t.column.id&&t.blur()})),this._grid.events.on(a.GridEvents.cellMouseDown,(function(){return t.blur()}))},t}();e.SelectFilter=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFilter=void 0;var n=i(1),o=i(6),r=i(3),a=i(21),l=i(4),s=function(){function t(t){var e=t.column,i=t.config,n=t.id,r=t.value,a=t.headerConfig,l=t.grid;this.events=new o.EventSystem,this.column=e,this.config=i,this.id=n,this.value=r||"",this.filterConfig={},this._grid=l,Object.assign(this.filterConfig,(null==a?void 0:a.filterConfig)||{}),this.initHandlers(),this.toHTML()}return t.prototype.toHTML=function(){var t="Filter ".concat((0,l.getColumnHeaderText)(this.column));return(0,n.el)("div.dhx_grid-filter__label",{"aria-label":t,_ref:"".concat(this.column.id,"_filter")},[(0,n.el)(".dhx_grid-filter__icon.dhx_input__icon",{class:"dxi "+(this.filterConfig.icon||" dxi-magnify")}),(0,n.el)("label",{style:{display:"none"},for:this.id},t),(0,n.el)("input",{type:"text",class:"dhx_input dhx_grid-filter","aria-label":t,tabindex:-1,oninput:this._handlers.onchange,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,_key:this.column.id,id:this.id,value:this.value,placeholder:this.filterConfig.placeholder})])},t.prototype.getFilter=function(){return this.toHTML()},t.prototype.setValue=function(t,e){var i;this.value=t||"",this.events.fire(a.HeaderFilterEvent.change,[this.value]),null===(i=this._grid.events)||void 0===i||i.fire(r.GridEvents.filterChange,[this.value,this.column.id,"inputFilter",e])},t.prototype.clear=function(t){this.setValue("",t)},t.prototype.focus=function(){var t,e,i;this._isFocused=!0;var n=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;n&&(null===(i=n.querySelector("input"))||void 0===i||i.focus())},t.prototype.blur=function(){var t,e,i;this._isFocused=!1;var n=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;n&&(null===(i=n.querySelector("input"))||void 0===i||i.blur())},t.prototype.initHandlers=function(){var t=this;this._handlers={onchange:function(e){var i,n,o,r,a=(null===(i=e.target)||void 0===i?void 0:i.value)||(null===(o=null===(n=e.composedPath())||void 0===n?void 0:n[0])||void 0===o?void 0:o.value)||(null===(r=e.explicitOriginalTarget)||void 0===r?void 0:r.value);t._inputDelay&&clearTimeout(t._inputDelay),t._inputDelay=setTimeout((function(){return t.setValue(a)}),500)},onfocus:function(){t._isFocused=!0},onblur:function(){t._isFocused=!1}},this._grid.events.on(r.GridEvents.scroll,(function(){var e,i,o=null===(i=null===(e=t._grid.getRootView())||void 0===e?void 0:e.refs["".concat(t.column.id,"_filter")])||void 0===i?void 0:i.el;t._isFocused&&o&&(0,n.awaitRedraw)().then((function(){var t;null===(t=o.querySelector("input"))||void 0===t||t.focus()}))})),this._grid.events.on(r.GridEvents.headerCellMouseDown,(function(e,i){i.id!==t.column.id&&t.blur()})),this._grid.events.on(r.GridEvents.cellMouseDown,(function(){return t.blur()}))},t}();e.InputFilter=s},function(t,e,i){"use strict";var n=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.startResize=void 0;var o=i(0),r=i(3),a=i(7);e.startResize=function(t,e,i,l){var s,c=t.config.rightSplit;i.targetTouches&&i.preventDefault();var d=i.targetTouches?i.targetTouches[0].clientX:i.clientX,u=t.config.columns.filter((function(t){return!t.hidden})),h=c?u.slice(-c).map((function(t){return t.id})):[],f=!!(null===(s=t.scrollView)||void 0===s?void 0:s.config.enable),p=c?(0,a.calcScrollBarWidth)(t.config,f).xState:null,g=0;t.config.$resizing=e;var v=function(i){var l,s=(0,o.findIndex)(u,(function(t){return t.id===e})),v=i.targetTouches?i.targetTouches[0].clientX:i.clientX,_=v-t.getRootNode().getBoundingClientRect().left,m=(0,a.calcScrollBarWidth)(t.config,f);if(!(t.config.leftSplit===s+1&&_>=t.config.$width-m.y-2||c&&h.includes(e)&&m.xState!==p)){g=g||u[s].$width;var y=40;"function"==typeof t.data.getMaxLevel&&0===s&&(y*=t.data.getMaxLevel());var b,x=u[s].minWidth||y,w=u[s].maxWidth,C=v-d,S=n([],u,!0),E=g+(p&&h.includes(e)?-C:C);w&&E>=w||E<=x?(E<=x&&(b=x),E>=w&&(b=w)):b=E,S[s].$width=b;for(var D=0;D<S.length;D++){(null!==(l=S[D].adjust)&&void 0!==l?l:t.config.adjust)||(S[D].$fixedWidth=D<=s)}t.events.fire(r.GridEvents.resize,[u[s],i]),t.paint()}},_=function(){i.targetTouches?(document.removeEventListener("touchmove",v),document.removeEventListener("touchend",_)):(document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",_)),l()};i.targetTouches?(document.addEventListener("touchmove",v),document.addEventListener("touchend",_)):(document.addEventListener("mousemove",v),document.addEventListener("mouseup",_)),t.paint()}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getKeysHandlers=void 0;var n=i(2),o=i(14),r=i(17),a=i(5),l=i(124),s=i(125),c=i(126);e.getKeysHandlers=function(t){var e,i,d,u="cell"===t.config.selection||"complex"===t.config.selection||!0===t.config.selection,h=null===(d=null===(i=null===(e=t.getRootView())||void 0===e?void 0:e.refs)||void 0===i?void 0:i.grid_body)||void 0===d?void 0:d.el;if(!t.getRootView()||h){(0,c.initFocusSentinel)(t),(0,c.initEndSentinel)(t),(0,c.restoreZoneTabindex)(t,"header");var f=function(e,i,o){var r,a,s;if(void 0===o&&(o=!1),!(t.config.$editable||(0,n.locateNodeByClassName)(e,"dhx_grid-header-cell")||(0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))){var c=null===(r=t.selection)||void 0===r?void 0:r.getCell(),d=t,u=null===(a=d.range)||void 0===a?void 0:a.getRange();if((c||u)&&h){e.preventDefault();var f,p=i*Math.max(1,Math.floor(h.clientHeight/t.config.rowHeight)),g=t.config.multiselection&&o;if(c)(f=(0,l.walkVisibleRows)(t,c.row.id,p))!==c.row.id&&(t.scrollTo(f.toString(),c.column.id.toString()),t.selection.setCell(f,c.column.id,!1,g));if(u&&"range"===(null===(s=d.block)||void 0===s?void 0:s.config.mode))(f=(0,l.walkVisibleRows)(t,u.yEnd,p))!==u.yEnd&&(0,l.applyRangeMove)(d,t.data.getItem(f),u,"vertical",o)}else h&&(e.preventDefault(),h.scrollTop+=i*h.clientHeight)}},p=function(e,i,n){var o,r;void 0===n&&(n=!1);var a=null===(o=t.selection)||void 0===o?void 0:o.getCell(),s=null===(r=t.range)||void 0===r?void 0:r.getRange();a||s?(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:i,toEnd:!0,shiftUp:n}):h&&(e.preventDefault(),h.scrollTop=i>0?h.scrollHeight:0)},g=function(e,i,o){var r,l,s,c;if(void 0===o&&(o=!1),!(t.config.$editable||(0,n.locateNodeByClassName)(e,"dhx_grid-header-cell")||(0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))){var d=null===(r=t.selection)||void 0===r?void 0:r.getCell(),u=t,h=null===(l=u.range)||void 0===l?void 0:l.getRange();if(d||h){e.preventDefault();var f,p,g=t.config.columns.filter((function(t){return!t.hidden})),v=t.config.multiselection&&o;if(i<0)f=t.data.getId(0),p=g[0].id;else{var _=t.data.getId(t.data.getLength()-1);"tree"===t.config.type&&(_=(0,a.getLastChild)(_,t.data)),f=_,p=g[g.length-1].id}d&&(t.scrollTo(f.toString(),p.toString()),t.selection.setCell(f,p,!1,v)),h&&"range"===(null===(s=u.block)||void 0===s?void 0:s.config.mode)&&(u.scrollTo(f,p),o?u.range.setRange({yEnd:f,xEnd:p},!0):u.range.setRange({yStart:f,yEnd:f,xStart:p,xEnd:p}),null===(c=u.block)||void 0===c||c.restoreFocus())}}};return{enter:function(e){var i,n=(0,c.detectFocusZone)(e);if("header"===n||"footer"===n){var r=e.target;return(0,c.isContentCell)(r)?(e.preventDefault(),void(0,c.activateContentCell)(r)):void(0,c.triggerHeaderSort)(t,e)}u?(i=(0,o.normalizeCell)(t.selection.getCell(),t))&&(0,s.isColumnEditable)(i.column,t.config)&&(t.config.$editable?t.editEnd():"boolean"===i.column.type?(0,s.toggleBooleanCell)(t,i.row,i.column):(0,s.startCellEdit)(t,i)):t.config.$editable?t.editEnd():(i=(0,l.getActiveCell)(t,!1))&&(0,s.isColumnEditable)(i.column,t.config)&&("boolean"===i.column.type?(0,s.toggleBooleanCell)(t,i.row,i.column):(0,s.startCellEdit)(t,i))},f2:function(){if(!t.config.$editable){var e=(0,l.getActiveCell)(t,u);e&&(0,s.isColumnEditable)(e.column,t.config)&&"boolean"!==e.column.type&&(0,s.startCellEdit)(t,e)}},space:function(e){var i=(0,c.detectFocusZone)(e);if("header"!==i&&"footer"!==i){if(!t.config.$editable){var n=(0,l.getActiveCell)(t,u);n&&(0,s.isColumnEditable)(n.column,t.config)&&"boolean"===n.column.type&&(e.preventDefault(),(0,s.toggleBooleanCell)(t,n.row,n.column))}}else(0,c.triggerHeaderSort)(t,e)},escape:function(e){var i,n,o,r,a,l=(0,c.detectFocusZone)(e);if("header"!==l&&"footer"!==l)t.config.$editable&&t.editEnd(!0);else{e.preventDefault();var s=e.target,d=s.closest(".dhx_grid-".concat(l,"-cell, .dhx_span-cell"));if(d&&s!==d&&(0,c.isContentCell)(d))return void(0,c.deactivateContentCell)(d);(0,c.restoreZoneTabindex)(t,l);var u=(0,c.getActiveColumnId)(t)||(0,c.getColIdFromTarget)(s)||(null===(i=(0,c.getVisibleColumns)(t)[0])||void 0===i?void 0:i.id);if(t.config.blockSelection&&(null===(n=t.range)||void 0===n?void 0:n.getRange())){var h=t.range.getRange();t.scrollTo(h.yStart,h.xStart),t.block.restoreFocus(),(null===(o=document.activeElement)||void 0===o?void 0:o.getAttribute("data-dhx-col-id"))||(0,c.transitionToBody)(t,h.xStart,"first")}else if(null===(r=t.selection)||void 0===r?void 0:r.getCell()){var f=t.selection.getCell();t.scrollTo(f.row.id,f.column.id),t.selection.restoreFocus(),(null===(a=document.activeElement)||void 0===a?void 0:a.getAttribute("data-dhx-col-id"))||(0,c.transitionToBody)(t,f.column.id,"first")}else u&&(0,c.transitionToBody)(t,u,"first")}},tab:function(e){var i,n,o,a,s,d,u=(0,c.detectFocusZone)(e);if("header"!==u&&"footer"!==u){t.config.$editable&&t.editEnd();var h=null===(s=t.selection)||void 0===s?void 0:s.getCell(),f=t.config.columns.filter((function(t){return!t.hidden}));if(h){if(h.row.$opened&&h.row.$subRowHeight){var p=t.getSubRow(h.row.id),g=p.view,v=p.element;return void((null==g?void 0:g.name.includes("grid"))?(g.selection.setCell(g.data.getId(0)),r.focusManager.setFocusId(g._uid)):v.focus())}var _=f.indexOf(h.column)+(0,l.getRangedIndex)(t,"right");if(_>=0&&_<f.length)e&&e.preventDefault(),t.scrollTo(h.row.id.toString(),f[_].id.toString()),t.selection.setCell(h.row.id,f[_].id);else if(_>=0){(y=(0,l.getNextVisibleRowId)(t,h.row.id,1))?(e&&e.preventDefault(),t.scrollTo(y.toString(),f[0].id.toString()),t.selection.setCell(y,f[0].id)):(0,c.hasFooter)(t)&&(e&&e.preventDefault(),(0,c.transitionFromBodyToZone)(t,"footer",f[0].id,0))}}else{var m=null===(d=t.range)||void 0===d?void 0:d.getRange();if(m){var y,b=f.findIndex((function(t){return t.id===m.xEnd}))+1;if(b<f.length)e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,m.yEnd,f[b].id);else(y=(0,l.getNextVisibleRowId)(t,m.yEnd,1))?(e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,y,f[0].id)):(0,c.hasFooter)(t)&&(e&&e.preventDefault(),(0,c.transitionFromBodyToZone)(t,"footer",f[0].id,0))}}}else{var x=e.target,w=x.closest(".dhx_grid-".concat(u,"-cell, .dhx_span-cell"));if(w&&x!==w&&(0,c.isContentCell)(w))return e.preventDefault(),void(0,c.deactivateContentCell)(w);if("exit-end"===(0,c.moveZoneFocusTab)(t,e,u,"forward"))if("header"===u){e.preventDefault(),(0,c.restoreZoneTabindex)(t,u);var C=(0,c.getVisibleColumns)(t);(0,c.transitionToBody)(t,null===(i=C[0])||void 0===i?void 0:i.id,"first")}else{(0,c.restoreZoneTabindex)(t,u);var S=(null===(n=t.getRootNode)||void 0===n?void 0:n.call(t))||(null===(a=null===(o=t.getRootView())||void 0===o?void 0:o.data)||void 0===a?void 0:a.getRootNode()),E=null==S?void 0:S.querySelector(".dhx_grid-focus-sentinel--end");E&&(E.setAttribute("tabindex","-1"),setTimeout((function(){return E.setAttribute("tabindex","0")}),0))}}},delete:function(){var e,i;"range"===(null===(e=t.block)||void 0===e?void 0:e.config.mode)&&t.config.editable&&!t.config.$editable&&(0,o.clearCells)(t,null===(i=t.range)||void 0===i?void 0:i.getRangedCells())},"shift+tab":function(e){var i,o,a,s,d,u,h,f,p=(0,c.detectFocusZone)(e);if("header"!==p&&"footer"!==p)if("body"===p&&(0,c.isAtFirstRow)(t)&&(0,c.isAtFirstColumn)(t)){e.preventDefault();var g=(0,c.getVisibleColumns)(t),v=g[g.length-1].id,_=(0,c.getZoneRowCount)(t,"header")-1;(0,c.transitionFromBodyToZone)(t,"header",v,_)}else{t.config.$editable&&t.editEnd();var m=null===(s=t.selection)||void 0===s?void 0:s.getCell(),y=t.config.columns.filter((function(t){return!t.hidden}));if(m){var b=(0,n.locate)(null===(h=null===(u=null===(d=t.getRootView().node)||void 0===d?void 0:d.parent)||void 0===u?void 0:u.parent)||void 0===h?void 0:h.el,"data-dhx-root-widget-id");if(b)return void r.focusManager.setFocusId(b);var x=y.indexOf(m.column)+(0,l.getRangedIndex)(t,"left");if(x>=0&&x<y.length)e&&e.preventDefault(),t.scrollTo(m.row.id.toString(),y[x].id.toString()),t.selection.setCell(m.row.id,y[x].id);else(C=(0,l.getNextVisibleRowId)(t,m.row.id,-1))&&(e&&e.preventDefault(),t.scrollTo(C.toString(),y[y.length-1].id.toString()),t.selection.setCell(C,y[y.length-1].id))}else{var w=null===(f=t.range)||void 0===f?void 0:f.getRange();if(w){var C,S=y.findIndex((function(t){return t.id===w.xEnd}))-1;if(S>=0)e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,w.yEnd,y[S].id);else(C=(0,l.getNextVisibleRowId)(t,w.yEnd,-1))&&(e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,C,y[y.length-1].id))}}}else{var E=e.target,D=E.closest(".dhx_grid-".concat(p,"-cell, .dhx_span-cell"));if(D&&E!==D&&(0,c.isContentCell)(D))return e.preventDefault(),void(0,c.deactivateContentCell)(D);if("exit-start"===(0,c.moveZoneFocusTab)(t,e,p,"backward")){(0,c.restoreZoneTabindex)(t,p);var O=(null===(i=t.getRootNode)||void 0===i?void 0:i.call(t))||(null===(a=null===(o=t.getRootView())||void 0===o?void 0:o.data)||void 0===a?void 0:a.getRootNode()),k=null==O?void 0:O.querySelector(".dhx_grid-focus-sentinel");k&&(k.setAttribute("tabindex","-1"),setTimeout((function(){return k.setAttribute("tabindex","0")}),0))}}},arrowUp:function(e){var i,n=(0,c.detectFocusZone)(e);if("header"!==n&&"footer"!==n){if("body"===n){if((0,c.isAtFirstRow)(t))return e.preventDefault(),void((r=(0,c.getActiveColumnId)(t)||(null===(i=(0,c.getVisibleColumns)(t)[0])||void 0===i?void 0:i.id))&&(0,c.transitionFromBodyToZone)(t,"header",r));(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:(0,l.getRangedIndex)(t,"up")})}}else if(!(0,c.moveZoneFocusVertical)(t,e,n,"up")&&"footer"===n){var o=e.target,r=(0,c.getColIdFromTarget)(o);(0,c.restoreZoneTabindex)(t,"footer"),r&&(0,c.transitionToBody)(t,r,"last")}},"shift+enter":function(e){var i=(0,c.detectFocusZone)(e);"header"!==i&&"footer"!==i||(0,c.triggerHeaderSort)(t,e,!0)},"ctrl+z":function(){var e;(null===(e=t.history)||void 0===e?void 0:e.canUndo())&&t.history.undo()},"ctrl+shift+z":function(){var e;(null===(e=t.history)||void 0===e?void 0:e.canRedo())&&t.history.redo()},"ctrl+enter":function(){var e=(0,l.getActiveCell)(t,u);e&&(e.row.$opened?t.collapse(e.row.id):t.expand(e.row.id))},"ctrl+arrowUp":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:-1,toEnd:!0})},"shift+arrowUp":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:-1,shiftUp:!0})},"ctrl+shift+arrowUp":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:-1,toEnd:!0,shiftUp:!0})},arrowDown:function(e){var i,n=(0,c.detectFocusZone)(e);if("header"!==n&&"footer"!==n){if("body"===n){if((0,c.hasFooter)(t)&&(0,c.isAtLastRow)(t))return e.preventDefault(),void((r=(0,c.getActiveColumnId)(t)||(null===(i=(0,c.getVisibleColumns)(t)[0])||void 0===i?void 0:i.id))&&(0,c.transitionFromBodyToZone)(t,"footer",r,0));(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:(0,l.getRangedIndex)(t,"down")})}}else if(!(0,c.moveZoneFocusVertical)(t,e,n,"down")){var o=e.target,r=(0,c.getColIdFromTarget)(o);(0,c.restoreZoneTabindex)(t,n),r&&(0,c.transitionToBody)(t,r,"footer"===n?"last":"first")}},"ctrl+arrowDown":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:1,toEnd:!0})},"shift+arrowDown":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:1,shiftUp:!0})},"ctrl+shift+arrowDown":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:1,toEnd:!0,shiftUp:!0})},arrowRight:function(e){var i=(0,c.detectFocusZone)(e);if("header"!==i&&"footer"!==i){if("body"===i){if("tree"===t.config.type&&!t.config.$editable){var n=(0,l.getActiveCell)(t,u);if(n&&((0,l.isTreeColumn)(t,n.column.id)||"row"===t.config.selection)){var o=n.row,r=t.data.haveItems(o.id);if(r&&!o.$opened)return e.preventDefault(),void t.expand(o.id);if(r&&o.$opened){var a=t.data.getItems(o.id);if(null==a?void 0:a.length)return e.preventDefault(),void(0,l.navigateToCell)(t,u,a[0].id,n.column.id)}}}(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:(0,l.getRangedIndex)(t,"right")})}}else(0,c.moveZoneFocus)(t,e,i,"right")},"ctrl+arrowRight":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:1,toEnd:!0})},"shift+arrowRight":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:1,shiftUp:!0})},"ctrl+shift+arrowRight":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:1,toEnd:!0,shiftUp:!0})},arrowLeft:function(e){var i=(0,c.detectFocusZone)(e);if("header"!==i&&"footer"!==i){if("body"===i){if("tree"===t.config.type&&!t.config.$editable){var n=(0,l.getActiveCell)(t,u);if(n&&((0,l.isTreeColumn)(t,n.column.id)||"row"===t.config.selection)){var o=n.row;if(t.data.haveItems(o.id)&&o.$opened)return e.preventDefault(),void t.collapse(o.id);var r=t.data.getParent(o.id);if(r&&r!==t.data.getRoot())return e.preventDefault(),void(0,l.navigateToCell)(t,u,r,n.column.id)}}(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:(0,l.getRangedIndex)(t,"left")})}}else(0,c.moveZoneFocus)(t,e,i,"left")},"ctrl+arrowLeft":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:-1,toEnd:!0})},"shift+arrowLeft":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:-1,shiftUp:!0})},"ctrl+shift+arrowLeft":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:-1,toEnd:!0,shiftUp:!0})},pageDown:function(t){return f(t,1)},pageUp:function(t){return f(t,-1)},"shift+pageDown":function(t){return f(t,1,!0)},"shift+pageUp":function(t){return f(t,-1,!0)},home:function(t){return p(t,-1)},end:function(t){return p(t,1)},"shift+home":function(t){return p(t,-1,!0)},"shift+end":function(t){return p(t,1,!0)},"ctrl+home":function(t){return g(t,-1)},"ctrl+end":function(t){return g(t,1)},"ctrl+shift+home":function(t){return g(t,-1,!0)},"ctrl+shift+end":function(t){return g(t,1,!0)}}}}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.navigateToCell=e.isTreeColumn=e.getNextVisibleRowId=e.walkVisibleRows=e.getActiveCell=e.getRangedIndex=e.applyRangeMove=e.move=void 0;var o=i(2),r=i(14),a=i(5);function l(t,e,i,n,o){var r,a="vertical"===n,l=a?e.id:i.yEnd,s=a?i.xEnd:e.id;if(t.scrollTo(l,s),o){var c=a?{yEnd:e.id,xEnd:i.xEnd}:{yEnd:i.yEnd,xEnd:e.id};t.range.setRange(c,!0)}else{c=a?{yStart:e.id,yEnd:e.id,xStart:i.xStart,xEnd:i.xStart}:{yStart:i.yStart,yEnd:i.yStart,xStart:e.id,xEnd:e.id};t.range.setRange(c)}null===(r=t.block)||void 0===r||r.restoreFocus()}e.move=function(t){var e=t.grid,i=t.event;if(!(e.config.$editable||(0,o.locateNodeByClassName)(i,"dhx_grid-header-cell")||(0,o.locateNodeByClassName)(i,"dhx_grid-footer-cell"))){i&&i.preventDefault();var r=e.config.columns.filter((function(t){return!t.hidden}));!function(t){var e=t.grid,i=t.columns,n=t.dir,o=t.rangedIndex,r=t.toEnd,l=t.shiftUp,s=e.selection.getCell(),c=e.config.multiselection&&l;if(!s)return;if("vertical"===n)if(r){var d=e.data.getItem(e.data.getId(0));if(1===o){var u=e.data.getId(e.data.getLength()-1);"tree"===e.config.type&&(u=(0,a.getLastChild)(u,e.data)),d=e.data.getItem(u)}e.scrollTo(d.id.toString(),s.column.id.toString()),e.selection.setCell(d.id,s.column.id,!1,c)}else{d=null;if("tree"===e.config.type){var h=o<0?(0,a.getClosestTop)(s.row.id,e.data):(0,a.getClosestBottom)(s.row.id,e.data);h&&(d=e.data.getItem(h))}else{(f=e.data.getIndex(s.row.id.toString()))+o>=0&&f+o<e.data.getLength()&&(d=e.data.getItem(e.data.getId(f+o)))}d&&(e.scrollTo(d.id.toString(),s.column.id.toString()),e.selection.setCell(d.id,s.column.id,!1,c))}else if(r){d=1===o?i[i.length-1]:i[0];e.scrollTo(s.row.id.toString(),d.id.toString()),e.selection.setCell(s.row.id,d.id,!1,c)}else{var f;(f=i.findIndex((function(t){return t.id==s.column.id})))+o>=0&&f+o<i.length&&(e.scrollTo(s.row.id.toString(),i[f+o].id.toString()),e.selection.setCell(s.row.id,i[f+o].id,!1,c))}}(n(n({},t),{columns:r})),function(t){var e,i=t.grid,o=t.dir,r=i,s=null===(e=r.range)||void 0===e?void 0:e.getRange();if(!s)return;var c="vertical"===o?function(t){var e=t.grid,i=t.rangedCell,n=t.toEnd,o=t.shiftUp,r=t.rangedIndex,l=e,s=l.data,c=l.config;if(n){if(r>0){var d=s.getId(s.getLength()-1);return"tree"===c.type&&(d=(0,a.getLastChild)(d,s)),s.getItem(d)}return s.getItem(s.getId(0))}var u=r<0;if("tree"===c.type){var h=o?i.yEnd:u?i.yStart:i.yEnd,f=u?(0,a.getClosestTop)(h,s):(0,a.getClosestBottom)(h,s);return f?s.getItem(f):null}var p=s.getIndex(i.yStart),g=s.getIndex(i.yEnd),v=o?i.yEnd:s.getId(u?Math.min(p,g):Math.max(p,g)),_=s.getIndex(v)+r;if(_>=0&&_<s.getLength())return s.getItem(s.getId(_));return null}(n(n({},t),{rangedCell:s})):function(t){var e=t.columns,i=t.rangedCell,n=t.toEnd,o=t.shiftUp,r=t.rangedIndex;if(n)return r>0?e[e.length-1]:e[0];var a=e.findIndex((function(t){return t.id===i.xStart})),l=e.findIndex((function(t){return t.id===i.xEnd})),s=r<0,c=(o?l:s?Math.min(a,l):Math.max(a,l))+r;if(c>=0&&c<e.length)return e[c];return null}(n(n({},t),{rangedCell:s}));c&&l(r,c,s,o,t.shiftUp)}(n(n({},t),{columns:r}))}},e.applyRangeMove=l,e.getRangedIndex=function(t,e){var i,n,o=t.selection.getCell(),r=o&&t.getSpan(o.row.id,o.column.id);if(r){if("up"===e||"down"===e){var a=null===(i=t.config.data)||void 0===i?void 0:i.findIndex((function(t){return t.id===r.row})),l=null===(n=t.config.data)||void 0===n?void 0:n.findIndex((function(t){return t.id===o.row.id}));return"up"===e?a-l-1:a+(r.rowspan||1)-l}var s=t.config.columns.filter((function(t){return!t.hidden}));a=s.findIndex((function(t){return t.id===r.column})),l=s.findIndex((function(t){return t.id===o.column.id}));return"left"===e?a-l-1:a+(r.colspan||1)-l}return"down"===e||"right"===e?1:-1},e.getActiveCell=function(t,e){var i;if(e||"row"===t.config.selection)return(0,r.normalizeCell)(t.selection.getCell(),t);var n=null===(i=t.range)||void 0===i?void 0:i.getRange();if((null==n?void 0:n.yEnd)&&(null==n?void 0:n.xEnd)){var o=t.data.getItem(n.yEnd),a=t.config.columns.find((function(t){return t.id===n.xEnd}));if(o&&a)return{row:o,column:a}}return null},e.walkVisibleRows=function(t,e,i){for(var n="tree"===t.config.type,o=i<0,r=Math.abs(i),l=e,s=0;s<r;s++){var c=void 0;if(n)c=o?(0,a.getClosestTop)(l,t.data):(0,a.getClosestBottom)(l,t.data);else{var d=t.data.getIndex(l),u=o?d-1:d+1;if(u<0||u>=t.data.getLength())break;c=t.data.getId(u)}if(!c)break;l=c}return l},e.getNextVisibleRowId=function(t,e,i){if("tree"===t.config.type)return i>0?(0,a.getClosestBottom)(e,t.data):(0,a.getClosestTop)(e,t.data);var n=t.data.getIndex(e)+i;return n>=0&&n<t.data.getLength()?t.data.getId(n):null},e.isTreeColumn=function(t,e){var i;return(null===(i=t.config.columns.filter((function(t){return!t.hidden}))[0])||void 0===i?void 0:i.id)==e},e.navigateToCell=function(t,e,i,n){var o;if(t.scrollTo(i.toString(),n.toString()),e||"row"===t.config.selection)t.selection.setCell(i,n);else{var r=t;r.range&&(r.range.setRange({yStart:i,yEnd:i,xStart:n,xEnd:n}),null===(o=r.block)||void 0===o||o.restoreFocus())}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.startCellEdit=e.toggleBooleanCell=e.isColumnEditable=void 0;var n=i(3);e.isColumnEditable=function(t,e){return!!(!1!==t.editable&&e.editable||t.editable)},e.toggleBooleanCell=function(t,e,i){t.events.fire(n.GridEvents.beforeEditStart,[e,i,"checkbox"])&&(t.events.fire(n.GridEvents.afterEditStart,[e,i,"checkbox"]),t.events.fire(n.GridEvents.beforeEditEnd,[!e[i.id],e,i])&&t.events.fire(n.GridEvents.afterEditEnd,[!e[i.id],e,i]))},e.startCellEdit=function(t,e){t.editCell(e.row.id,e.column.id,e.column.editorType)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initEndSentinel=e.initFocusSentinel=e.restoreZoneTabindex=e.getColIdFromTarget=e.getActiveColumnId=e.hasFooter=e.isAtLastRow=e.isAtFirstRow=e.transitionFromBodyToZone=e.transitionToBody=e.setZoneCellFocus=e.triggerHeaderSort=e.deactivateContentCell=e.activateContentCell=e.isContentCell=e.isAtFirstColumn=e.moveZoneFocusTab=e.moveZoneFocusVertical=e.moveZoneFocus=e.resolveSpanTarget=e.ensureZoneCellVisible=e.findZoneCell=e.getZoneRowCount=e.getColumnSplitSection=e.getVisibleColumns=e.detectFocusZone=void 0;var n=i(2),o=i(5),r=new WeakMap;function a(t){return t.config.columns.filter((function(t){return!t.hidden}))}function l(t,e){var i=a(t),n=i.find((function(t){return t.id===e}));if(!n)return"center";var o=n.$index,r=t.config.leftSplit||0,l=t.config.rightSplit||0;return r>0&&o<r?"left":l>0&&o>=i.length-l?"right":"center"}function s(t,e){var i,n;return"header"===e?(null===(i=t.config.$headerHeightMap)||void 0===i?void 0:i.length)||0:"footer"===e&&(null===(n=t.config.$footerHeightMap)||void 0===n?void 0:n.length)||0}function c(t,e,i,n){var o,r,a,s=(null===(o=t.getRootNode)||void 0===o?void 0:o.call(t))||(null===(a=null===(r=t.getRootView())||void 0===r?void 0:r.data)||void 0===a?void 0:a.getRootNode());if(!s)return null;for(var c=function(t,e,i){var n=[];if("left"===i){(o=t.querySelector(".dhx_".concat(e,"-fixed-cols.dhx_grid__cols_left--fixed")))&&n.push(o)}else if("right"===i){var o;(o=t.querySelector(".dhx_".concat(e,"-fixed-cols.dhx_grid__cols_right--fixed")))&&n.push(o)}else{var r=t.querySelector(".dhx_".concat(e,"-wrapper"));r&&n.push(r)}if(0===n.length){t.querySelectorAll(".dhx_".concat(e,"-wrapper, .dhx_").concat(e,"-fixed-cols")).forEach((function(t){return n.push(t)}))}return n}(s,e,l(t,i)),d=0,u=c;d<u.length;d++){var h=u[d],f=h.querySelector('.dhx_span-cell[data-dhx-id="'.concat(i,'"][data-dhx-row-index="').concat(n,'"]'));if(f)return f;var p=h.querySelector(".dhx_grid-".concat(e,'-cell[data-dhx-id="').concat(i,'"][data-dhx-row-index="').concat(n,'"]'));if(p)return p}var g=s.querySelector('.dhx_span-cell[data-dhx-id="'.concat(i,'"][data-dhx-row-index="').concat(n,'"]'));return g||(s.querySelector(".dhx_grid-".concat(e,'-cell[data-dhx-id="').concat(i,'"][data-dhx-row-index="').concat(n,'"]'))||null)}function d(t,e){var i,n,r;if("center"===l(t,e)){var s=a(t),c=t.config.leftSplit||0,d=s.findIndex((function(t){return t.id===e}));if(!(d<0)){var u=t.getScrollState(),h=(0,o.getTotalWidth)(s.slice(c,d)),f=h+(s[d].$width||0),p=null===(r=null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.refs)||void 0===n?void 0:n.grid_body)||void 0===r?void 0:r.el,g=p?p.clientWidth:t.config.$width,v=c>0?(0,o.getTotalWidth)(s.slice(0,c)):0,_=t.config.rightSplit||0,m=g-v-(_>0?(0,o.getTotalWidth)(s.slice(-_)):0),y=u.x;h<y?t.scroll(h,null):f>y+m&&t.scroll(f-m,null)}}}function u(t,e,i,n){var o,r="footer"===t?"footer":"header",a=n.findIndex((function(t){return t.id===e}));if(a<0)return{colId:e,rowIndex:i};for(var l=0;l<=i;l++)for(var s=0;s<=a;s++){var c=null===(o=n[s][r])||void 0===o?void 0:o[l];if(c){var d=s+(c.colspan||1),u=l+(c.rowspan||1);if(d>a&&u>i&&(l<i||s<a))return{colId:n[s].id,rowIndex:l}}}return{colId:e,rowIndex:i}}e.detectFocusZone=function(t){var e=t.target;if((0,n.locateNodeByClassName)(e,"dhx_grid-header-cell"))return"header";if((0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))return"footer";if((0,n.locateNodeByClassName)(e,"dhx_span-cell"))for(var i=e;i;){if(i.classList){if(i.classList.contains("dhx_header-spans"))return"header";if(i.classList.contains("dhx_footer-spans"))return"footer";if(i.classList.contains("dhx_span-spans"))return"body"}i=i.parentNode}return(0,n.locateNodeByClassName)(e,"dhx_grid-group_item")?"groupPanel":"body"},e.getVisibleColumns=a,e.getColumnSplitSection=l,e.getZoneRowCount=s,e.findZoneCell=c,e.ensureZoneCellVisible=d,e.resolveSpanTarget=u,e.moveZoneFocus=function(t,e,i,n){var o,l;e.preventDefault();var s=e.target,c=s.getAttribute("data-dhx-id"),d=parseInt(s.getAttribute("data-dhx-row-index")||"0",10);if(c){var h=r.get(t),f=null!==(o=null==h?void 0:h.navRowIndex)&&void 0!==o?o:d,g=a(t),v=g.findIndex((function(t){return t.id===c}));if(!(v<0)){var _="footer"===i?"footer":"header",m="right"===n?1:-1,y=v;if("right"===n){var b=null===(l=g[v][_])||void 0===l?void 0:l[d];(null==b?void 0:b.colspan)>1&&(y=v+b.colspan-1)}var x=y+m;if(!(x<0||x>=g.length)){var w=u(i,g[x].id,f,g);p(t,i,w.colId,w.rowIndex,s,f)}}}},e.moveZoneFocusVertical=function(t,e,i,n){var o;e.preventDefault();var r=e.target,l=r.getAttribute("data-dhx-id"),c=parseInt(r.getAttribute("data-dhx-row-index")||"0",10);if(!l)return!1;var d=a(t),h="footer"===i?"footer":"header",f="down"===n?1:-1,g=c;if("down"===n){var v=d.findIndex((function(t){return t.id===l}));if(v>=0){var _=null===(o=d[v][h])||void 0===o?void 0:o[c];(null==_?void 0:_.rowspan)>1&&(g=c+_.rowspan-1)}}var m=g+f,y=s(t,i);if(m<0||m>=y)return!1;var b=u(i,l,m,d);return p(t,i,b.colId,b.rowIndex,r,m),!0},e.moveZoneFocusTab=function(t,e,i,n){var o,l,c=e.target,d=c.getAttribute("data-dhx-id")?c:c.closest("[data-dhx-id]");if(!d)return"forward"===n?"exit-end":"exit-start";var h=d.getAttribute("data-dhx-id"),f=parseInt(d.getAttribute("data-dhx-row-index")||"0",10),g=a(t),v=g.findIndex((function(t){return t.id===h}));if(v<0)return"forward"===n?"exit-end":"exit-start";var _="footer"===i?"footer":"header",m=s(t,i),y="forward"===n?1:-1,b=r.get(t),x=null!==(o=null==b?void 0:b.navRowIndex)&&void 0!==o?o:f,w=v;if("forward"===n){var C=null===(l=g[v][_])||void 0===l?void 0:l[f];(null==C?void 0:C.colspan)>1&&(w=v+C.colspan-1)}for(var S=w+y,E=x,D=g.length*m,O=0;O<D;O++){if("forward"===n&&S>=g.length){if(++E>=m)return"exit-end";S=0}else if("backward"===n&&S<0){if(--E<0)return"exit-start";S=g.length-1}var k=u(i,g[S].id,E,g);if(k.colId!==h||k.rowIndex!==f){if(p(t,i,k.colId,k.rowIndex,c,E))return e.preventDefault(),"moved";S+=y}else S+=y}return"forward"===n?"exit-end":"exit-start"},e.isAtFirstColumn=function(t){var e,i,n=a(t);if(0===n.length)return!0;var o=n[0].id;if(t.config.blockSelection){var r=null===(e=t.range)||void 0===e?void 0:e.getRange();if(r)return r.xStart==o}else{var l=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(l)return l.column.id==o}return!0},e.isContentCell=function(t){return t.classList.contains("dhx_grid-custom-content-cell")};var h=new WeakMap;function f(t){var e=t.querySelector("input, select");if(e){e.setAttribute("tabindex","-1");var i=h.get(e);i&&(e.removeEventListener("keydown",i),h.delete(e))}t.setAttribute("tabindex","0"),t.focus()}function p(t,e,i,n,o,a){o&&o.setAttribute("tabindex","-1"),d(t,i);var l=c(t,e,i,n);if(!l)return!1;l.setAttribute("tabindex","0"),l.focus();var s=r.get(t);return s&&(s.colId=i,s.rowIndex=n,s.navRowIndex=null!=a?a:n),!0}e.activateContentCell=function(t){var e=t.querySelector("input, select");if(e){e.setAttribute("tabindex","0"),e.focus();var i=h.get(e);i&&e.removeEventListener("keydown",i);var n=function(i){"Escape"===i.key&&(i.preventDefault(),e.removeEventListener("keydown",n),h.delete(e),f(t))};e.addEventListener("keydown",n),h.set(e,n)}},e.deactivateContentCell=f,e.triggerHeaderSort=function(t,e,i){var n,r,a=e.target,l=a.getAttribute("data-dhx-id"),s=parseInt(a.getAttribute("data-dhx-row-index")||"0",10);if(l){var c=t.getColumn(l);if(c&&(0,o.isSortable)(t.config,c)){var d=a.getAttribute("data-dhx-text-id"),u=null===(n=c.header)||void 0===n?void 0:n.find((function(t){return t.id===d}));if(!((null==u?void 0:u.content)||(null==u?void 0:u.colspan)>1)){e.preventDefault();var h=t.config.multiSort&&(!i||i&&!(null===(r=t._sortingStates)||void 0===r?void 0:r.length));t._sort(l,null==u?void 0:u.sortAs,h),p(t,"header",l,s)}}}},e.setZoneCellFocus=p,e.transitionToBody=function(t,e,i){var n;0!==t.data.getLength()&&("first"===i?n=t.data.getId(0):(n=t.data.getId(t.data.getLength()-1),"tree"===t.config.type&&(n=(0,o.getLastChild)(n,t.data)||n)),t.config.blockSelection&&t.range?(t.range.setRange({xStart:e,yStart:n,xEnd:e,yEnd:n}),t.scrollTo(n,e),t.block.restoreFocus()):t.selection&&(t.selection.setCell(n,e),t.scrollTo(n,e),t.selection.restoreFocus()),function(t){var e,i,n,o=(null===(e=t.getRootNode)||void 0===e?void 0:e.call(t))||(null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.data)||void 0===n?void 0:n.getRootNode());if(!o)return!1;var r=document.activeElement;return r&&o.contains(r)&&!!r.getAttribute("data-dhx-col-id")}(t)||function(t,e,i){var n,o,r,a=(null===(n=t.getRootNode)||void 0===n?void 0:n.call(t))||(null===(r=null===(o=t.getRootView())||void 0===o?void 0:o.data)||void 0===r?void 0:r.getRootNode());if(a){var l=a.querySelector('[data-dhx-id="'.concat(e,'"] [data-dhx-col-id="').concat(i,'"]'));l&&(l.tabIndex=0,l.focus({preventScroll:!0}))}}(t,n,e))},e.transitionFromBodyToZone=function(t,e,i,n){var o=a(t);if(0!==o.length){void 0===n&&(n=s(t,e)-1);var r=u(e,i,n,o);p(t,e,r.colId,r.rowIndex,void 0,n)}},e.isAtFirstRow=function(t){var e,i;if(t.config.blockSelection){var n=null===(e=t.range)||void 0===e?void 0:e.getRange();if(n)return n.yStart==t.data.getId(0)}else{var o=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(o)return o.row.id==t.data.getId(0)}return!0},e.isAtLastRow=function(t){var e,i;if(0===t.data.getLength())return!0;var n=t.data.getId(t.data.getLength()-1);if("tree"===t.config.type&&(n=(0,o.getLastChild)(n,t.data)||n),t.config.blockSelection){var r=null===(e=t.range)||void 0===e?void 0:e.getRange();if(r)return r.yEnd==n}else{var a=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(a)return a.row.id==n}return!0},e.hasFooter=function(t){return s(t,"footer")>0},e.getActiveColumnId=function(t){var e,i;if(t.config.blockSelection){var n=null===(e=t.range)||void 0===e?void 0:e.getRange();if(n)return n.xStart}else{var o=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(o)return o.column.id}return null},e.getColIdFromTarget=function(t){return(null==t?void 0:t.getAttribute("data-dhx-id"))||null},e.restoreZoneTabindex=function(t,e){var i,n,o,r=(null===(i=t.getRootNode)||void 0===i?void 0:i.call(t))||(null===(o=null===(n=t.getRootView())||void 0===n?void 0:n.data)||void 0===o?void 0:o.getRootNode());if(r){var a=".dhx_grid-".concat(e,"-cell[tabindex], .dhx_").concat(e,"-spans .dhx_span-cell[tabindex]");r.querySelectorAll(a).forEach((function(t){t.setAttribute("tabindex","-1")}));r.querySelectorAll(".dhx_grid-custom-content-cell input, .dhx_grid-custom-content-cell select").forEach((function(t){t.setAttribute("tabindex","-1")}))}},e.initFocusSentinel=function(t){var e,i,n,o=r.get(t);if(!(null==o?void 0:o.initialized)){var l=(null===(e=t.getRootNode)||void 0===e?void 0:e.call(t))||(null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.data)||void 0===n?void 0:n.getRootNode());if(l){var c=l.querySelector(".dhx_grid-focus-sentinel");c&&(o||(o={colId:null,rowIndex:null,navRowIndex:null,initialized:!1},r.set(t,o)),c.addEventListener("focus",(function(){var e=a(t);if(0!==e.length){var i=s(t,"header");if(0!==i){var n=o.colId,r=o.rowIndex;null!==n&&null!==r||(n=e[0].id,r=0),e.some((function(t){return t.id===n}))||(n=e[0].id,r=0),r>=i&&(r=0),p(t,"header",n,r)}}})),o.initialized=!0)}}},e.initEndSentinel=function(t){var e,i,n,o=(null===(e=t.getRootNode)||void 0===e?void 0:e.call(t))||(null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.data)||void 0===n?void 0:n.getRootNode());if(o){var r=o.querySelector(".dhx_grid-focus-sentinel--end");r&&!r.getAttribute("data-dhx-initialized")&&(r.addEventListener("focus",(function(){var e=a(t);if(0!==e.length){var i=s(t,"footer");if(i>0){var n=e[e.length-1].id;p(t,"footer",n,i-1)}else{s(t,"header")>0&&p(t,"header",e[0].id,0)}}})),r.setAttribute("data-dhx-initialized","true"))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropManager=void 0;var n=i(1),o=i(3),r=i(8),a=i(7),l=i(5),s=i(0),c=i(4),d=i(5),u=i(2),h=function(){function t(t){var e=t.view;this._isTreeMode=!1,this._grid=null,this._dragState=null,this._dragType=null,this._grid=e,this._isTreeMode="tree"===this._grid.config.type,this._init()}return t.prototype.toHTML=function(t){var e,i,o=(null===(e=this._grid.config.$grouped)||void 0===e?void 0:e.length)&&this._grid.config.$grouped.some((function(t){return t.notGrouped})),r=(0,s.isDefined)(null===(i=this._dragState)||void 0===i?void 0:i.target)&&!this._grid.config.$resizing&&!o;return(0,n.el)(".dhx_grid-drop",{"aria-hidden":"true"},[r&&this._getDropLineNode(t)])},t.prototype._getDropLineNode=function(t){return!this._dragType||(null==t?void 0:t.header)&&"horizontal"===this._dragType?null:"horizontal"===this._dragType?this._getHorizontalDropLine():this._getVerticalDropLine(t)},t.prototype._getVerticalDropLine=function(t){var e=this,i=void 0===t?{}:t,r=i.header,d=void 0!==r&&r,u=i.mode,h=void 0===u?null:u,f=this._grid.config.columns.filter((function(t){return!t.hidden})),p=f.findIndex((function(t){return t.id==e._dragState.target})),g=f[p];if(!(0,s.isDefined)(g))return null;var v,_,m=this._grid.config,y=m.leftSplit,b=m.rightSplit,x=f.findIndex((function(t){return t.id==e._dragState.start})),w=this._grid.getScrollState(),C=d?this._grid.config.$headerHeight:this._grid.config.$height,S=a.BORDERS,E=d?0:w.y;if(y&&(v=this._isColumnFixed(g,o.Split.left)),b&&(_=this._isColumnFixed(g,o.Split.right)),v&&h===o.Split.right||_&&h===o.Split.left||h&&!_&&!v)return null;var D=0;if(x===p||-1==p)return null;if(D=(0,l.getTotalWidth)(f.slice(0,p+1)),x>p&&(D-=g.$width),f.length-(!_&&b||0)===p+1&&(D-=a.BORDERS),v&&!h&&(D+=w.x),_)if(h){var O=(0,a.getCurrFixedCols)(this._grid.config,o.Split.right),k=O.findIndex((function(t){return t.id==e._dragState.target})),R=O.findIndex((function(t){return t.id==e._dragState.start}));D=(0,l.getTotalWidth)(O.slice(0,k+1)),R>k&&(D-=g.$width),O.length===k+1&&(D-=a.BORDERS)}else D-=(0,c.getReverseScrollState)(this._grid).x;return(0,n.el)(".dhx_grid-drop-line",{style:{height:C,width:S,top:E,left:D}})},t.prototype._getHorizontalDropLine=function(){var t=this._grid.data.getItem(this._dragState.target);if(!(0,s.isDefined)(t)||this._dragState.source.find((function(e){return e==t.id})))return null;var e,i,o=this._grid.config,r=o.topSplit,l=o.bottomSplit,d=this._grid.config.$width,u="in"===this._dragState.dropPosition?t.$height:a.BORDERS,h=this._grid.getScrollState(),f=a.BORDERS/2;r&&(e=this._grid.data.getRawData(0,r).map((function(t){return t.id})).includes(t.id));if(l){var p=this._grid.data.getLength();i=this._grid.data.getRawData(p-l,p).map((function(t){return t.id})).includes(t.id)}var g=this._getTopPosition(t);"bottom"===this._dragState.dropPosition&&(g=this._getBottomPosition(t),t.$index===this._grid.data._order.length-1&&(g-=f)),"in"!==this._dragState.dropPosition&&(g-=f,"top"===this._dragState.dropPosition&&0===t.$index&&(g+=f)),e&&(g+=h.y),i&&(g-=(0,c.getReverseScrollState)(this._grid).y);var v=t.$level&&"in"!==this._dragState.dropPosition?(0,c.getTreeCellWidthOffset)(t,t.$items):0;return(0,n.el)(".dhx_grid-drop-line",{style:{marginLeft:v,height:u,width:d,left:h.x,top:g}})},t.prototype._init=function(){var t=this;this._grid.events.on(r.DragEvents.dragStart,(function(e,i,n){"group"!==n&&"row"===n&&t._toggleRowDraggable(e.source,!0)})),this._grid.events.on(r.DragEvents.dragIn,(function(e,i,n){"group"===n||t._isSameComponent(i)||(t._dragState=e,t._dragType="row"===n?"horizontal":"vertical")})),this._grid.events.on(r.DragEvents.cancelDrop,(function(e,i,n){"group"!==n&&(t._dragState=t._dragType=null)})),this._grid.events.on(r.DragEvents.afterDrag,(function(e,i,n){t._dragState=t._dragType=null,"group"!==n&&"row"===n&&t._toggleRowDraggable(e.source,!1)}))},t.prototype._getNextRow=function(t){var e=this._grid.data.getIndex(t.id)+1,i=this._grid.data.getItem(this._grid.data.getId(e));return i||(i=this._grid.data.getItem((0,d.getLastChild)(t.id,this._grid.data,!0))),i},t.prototype._isColumnFixed=function(t,e){var i=(0,a.getCurrFixedCols)(this._grid.config,e),n=null==i?void 0:i.map((function(t){return t.id}));return null==n?void 0:n.includes(t.id)},t.prototype._getTopPosition=function(t){return this._grid.getCellRect(t.id).y},t.prototype._getBottomPosition=function(t){if(this._isTreeMode&&t.$items){var e=this._getNextRow(t);if(!(0,s.isDefined)(e))return 0;var i=this._getTopPosition(e);return e.$level&&(i+=e.$height-a.BORDERS/2),i}return this._getTopPosition(t)+t.$height},t.prototype._toggleRowDraggable=function(t,e){var i=this;t.forEach((function(t){i._grid.data.update(t,{$draggable:e},!0),i._isTreeMode&&i._grid.data.haveItems(t)&&i._grid.data.eachChild(t,(function(t){i._grid.data.update(t.id,{$draggable:e},!0)}))}))},t.prototype._isSameComponent=function(t){return(0,u.locate)(t.target,"data-dhx-widget-id")!=this._grid._uid},t}();e.DropManager=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getVisibleRowNode=e.getRowNode=void 0,e.getRowNode=function(t,e,i){var n=i?".dhx_grid__cols_".concat(i,"--fixed"):":not(.dhx_grid-fixed-cols-wrap)";return e.querySelector("".concat(n,' .dhx_grid-row[data-dhx-id="').concat(t,'"]'))},e.getVisibleRowNode=function(t,e,i){var n=document.createElement("div");return n.style.width=e+"px",n.style.overflow="hidden",t.style.width=e-i+"px",t.style.marginLeft=i+"px",n.appendChild(t),n}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setLocale=void 0,e.setLocale=function(t,e){var i=this[t];if(i)for(var n in e)i[n]=e[n]}}])})),window.dhx_legacy){if(window.dhx)for(var key in dhx)if("i18n"===key)for(var lang in dhx[key])window.dhx_legacy[key][lang]=dhx[key][lang];else dhx_legacy[key]=dhx[key];window.dhx=dhx_legacy,delete window.dhx_legacy}