@dhtmlx/grid 9.3.12 → 9.4.1

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.
Files changed (38) hide show
  1. package/README.md +1 -1
  2. package/codebase/grid.min.css +1 -1
  3. package/codebase/grid.min.js +3 -3
  4. package/codebase/grid.min.js.map +1 -1
  5. package/codebase/types/ts-calendar/sources/Calendar.d.ts +6 -0
  6. package/codebase/types/ts-calendar/sources/helper.d.ts +1 -0
  7. package/codebase/types/ts-calendar/sources/types.d.ts +3 -0
  8. package/codebase/types/ts-common/date.d.ts +2 -0
  9. package/codebase/types/ts-data/sources/datacollection/group.d.ts +11 -0
  10. package/codebase/types/ts-data/sources/datacollection.d.ts +84 -3
  11. package/codebase/types/ts-data/sources/methods.d.ts +8 -3
  12. package/codebase/types/ts-data/sources/treecollection.d.ts +99 -0
  13. package/codebase/types/ts-data/sources/types.d.ts +12 -2
  14. package/codebase/types/ts-grid/sources/ExtendedGrid.d.ts +3 -1
  15. package/codebase/types/ts-grid/sources/Grid.d.ts +10 -2
  16. package/codebase/types/ts-grid/sources/helpers/data.d.ts +16 -1
  17. package/codebase/types/ts-grid/sources/helpers/default.d.ts +1 -0
  18. package/codebase/types/ts-grid/sources/helpers/dom.d.ts +3 -0
  19. package/codebase/types/ts-grid/sources/helpers/zoneFocus.d.ts +15 -4
  20. package/codebase/types/ts-grid/sources/locales/en.d.ts +0 -2
  21. package/codebase/types/ts-grid/sources/modules/History.d.ts +4 -0
  22. package/codebase/types/ts-grid/sources/modules/Selection.d.ts +3 -0
  23. package/codebase/types/ts-grid/sources/types.d.ts +36 -5
  24. package/codebase/types/ts-grid/sources/ui/cells.d.ts +3 -1
  25. package/codebase/types/ts-grid/sources/ui/content/ComboFilter.d.ts +1 -0
  26. package/codebase/types/ts-grid/sources/ui/content/SelectFilter.d.ts +1 -0
  27. package/codebase/types/ts-grid/sources/ui/content.d.ts +6 -2
  28. package/codebase/types/ts-grid/sources/ui/editors/DateEditor.d.ts +1 -0
  29. package/codebase/types/ts-grid/sources/ui/proContent.d.ts +3 -16
  30. package/codebase/types/ts-layout/sources/Cell.d.ts +10 -0
  31. package/codebase/types/ts-layout/sources/helpers/constants.d.ts +2 -0
  32. package/codebase/types/ts-layout/sources/{helpers.d.ts → helpers/helpers.d.ts} +1 -1
  33. package/codebase/types/ts-layout/sources/types.d.ts +2 -1
  34. package/codebase/types/ts-message/sources/locales/en.d.ts +1 -0
  35. package/codebase/types/ts-treegrid/sources/TreeGrid.d.ts +0 -2
  36. package/codebase/types/ts-treegrid/sources/TreeGridCollection.d.ts +2 -1
  37. package/package.json +1 -1
  38. package/whatsnew.txt +74 -0
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
3
 
4
- This edition of DHTMLX dhtmlxGrid v.9.3.12 is licensed under the GNU General Public License v2.0 (GPL v2).
4
+ This edition of DHTMLX dhtmlxGrid v.9.4.1 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=58)}([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(72),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",t.announce="announce"}(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(14),c=i(19),d=i(8);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.isInteractiveTarget=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(84),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.isInteractiveTarget=function(t){var e,i;return!!(null===(i=(e=t).closest)||void 0===i?void 0:i.call(e,"a, button, input, select, textarea, label"))},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";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(13),e),o(i(35),e),o(i(77),e),o(i(78),e),o(i(16),e),o(i(80),e),o(i(10),e),o(i(26),e),o(i(37),e),o(i(81),e),o(i(36),e),o(i(25),e),o(i(39),e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNormalizeDateObject=e.getFooterRowCount=e.getHeaderRowCount=e.getCurrFixedCols=e.calcScrollBarWidth=e.BORDERS=void 0;var n=i(2),o=i(3),r=i(14);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.getHeaderRowCount=function(t){var e;return(null===(e=t.$headerHeightMap)||void 0===e?void 0:e.length)||0},e.getFooterRowCount=function(t){var e;return(null===(e=t.$footerHeightMap)||void 0===e?void 0:e.length)||0},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){(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(24),i(65).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(16),r=i(36);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";Object.defineProperty(e,"__esModule",{value:!0}),e.getLocaleString=void 0;var n=i(20);e.getLocaleString=function(t,e){var i=n.default[t];return"string"!=typeof i?"":e?i.replace(/\{(\w+)\}/g,(function(t,i){var n=e[i];return null==n?t:"".concat(n)})):i}},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.getCellSource=e.getReducedRowspan=e.getReducedColspan=e.getSpanHeight=e.getSourceCellIndex=e.getWidth=void 0;var o=i(14);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.getSourceCellIndex=function(t,e,i){return e+((t-e)%i+i)%i},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.getCellSource=function(t){return t.$activeCell||t.selection},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(25),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";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(){var t=document.body.classList;t.contains("utilityfocus")&&t.remove("utilityfocus")},this._addFocusClass=function(){var t=document.body.classList;t.contains("utilityfocus")||t.add("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;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";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";Object.defineProperty(e,"__esModule",{value:!0});e.default={total:"Total",groupText:"Group",dropAreaTitle:"Group by:",dropAreaPlaceholder:"Drag the column header here",aria_sortedAscending:"Sorted by {column}, ascending",aria_sortedDescending:"Sorted by {column}, descending",aria_filterApplied:"{count} rows match the filter",aria_filterCleared:"Filter cleared, {count} rows",aria_rowsLoaded:"{count} rows loaded",aria_valueOutOfRange:"Value must be between {min} and {max}",aria_valueBelowMin:"Value must be greater than {min}",aria_valueAboveMax:"Value must be less than {max}",aria_valueClamped:"Value corrected to {value}",aria_filter:"Filter {column}",aria_filterByDate:"Filter by date: {column}",aria_sortBy:"Sort by {column}",aria_expandGroup:"Expand group",aria_collapseGroup:"Collapse group",aria_expandRow:"Expand row",aria_collapseRow:"Collapse row",aria_editContent:"Edit content",aria_subRow:"Details for row {id}",aria_enterGrid:"Enter grid",aria_exitGrid:"Exit grid",aria_dragPanel:"Drag panel",aria_panelHeader:"Panel header",aria_panelFooter:"Panel footer",aria_panelContent:"Panel content",aria_draggableRows:"Draggable rows",aria_rowId:"Row id {id}"}},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.resolveCellState=e.getHandlers=void 0;var o=i(0),r=i(1),a=i(15),l=i(5),s=i(3),c=i(92),d=i(2),u=i(4),h=i(12),f=i(8);function p(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 g(t){var e,i,n,r,l,s,c,d=t.$cellState,u=(0,a.getCellSource)(t).getCell(),h="row"===(null===(e=t.selection.config)||void 0===e?void 0:e.type),f=function(t){var e;return!!(null===(e=t.range)||void 0===e?void 0:e.getRange())}(t),p=d?null===(i=d.active)||void 0===i?void 0:i.row:null===(n=null==u?void 0:u.row)||void 0===n?void 0:n.id,g=d?null===(r=d.active)||void 0===r?void 0:r.col:null===(l=null==u?void 0:u.column)||void 0===l?void 0:l.id,v=(0,o.isDefined)(p)&&(0,o.isDefined)(g),_=(null===(s=t.currentRows)||void 0===s?void 0:s[0])||t.fixedRows.top[0]||t.fixedRows.bottom[0],m=(null===(c=t.currentColumns)||void 0===c?void 0:c[0])||t.fixedColumns.left[0]||t.fixedColumns.right[0],y=d&&(0,o.isDefined)(d.editable)?d.editable:t.editable,b=null==d?void 0:d.ranges;return{tabRow:v?p:null==_?void 0:_.id,tabCol:v?g:null==m?void 0:m.id,readonly:y?"false":"true",exposeSelected:!!d||!h||f,isSelected:d?function(t,e){return t===p&&e===g||function(t,e,i){if(!t)return!1;for(var n=0;n<t.length;n++)if(t[n].rows.has(e)&&t[n].cols.has(i))return!0;return!1}(b,t,e)}:function(e,i){return t.selection.isSelectedCell(e,i)||f&&function(t,e,i){return t.range.isRanged({x:i,y:e})}(t,e,i)}}}function v(t){return t.$group?(0,h.getLocaleString)(t.$opened?"aria_collapseGroup":"aria_expandGroup"):(0,h.getLocaleString)(t.$opened?"aria_collapseRow":"aria_expandRow")}function _(t,e,i,n){return(0,c.getEditor)(t,e,i,n)}function m(t){var e=t.$scrollBarWidth,i=t.$totalWidth-t.$width+f.BORDERS+e.y,n=t.$totalHeight-t.$height+t.$headerHeight+t.$footerHeight+f.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:[p,t,e,i,s.GridEvents.cellClick],onmouseover:[p,t,e,i,s.GridEvents.cellMouseOver],onmousedown:[p,t,e,i,s.GridEvents.cellMouseDown],ondblclick:[p,t,e,i,s.GridEvents.cellDblClick],oncontextmenu:[p,t,e,i,s.GridEvents.cellRightClick],ontouchstart:[p,t,e,i,s.GridEvents.cellMouseDown],ontouchmove:[p,t,e,i,s.GridSystemEvents.cellTouchMove],ontouchend:[p,t,e,i,s.GridSystemEvents.cellTouchEnd]}},e.resolveCellState=g,e.getCells=function(t){var e,i;if(!t.data||!t.filteredColumns)return[];var a,s="tree"===t.type,c="row"===(null===(e=t.selection.config)||void 0===e?void 0:e.type),d=t.$positions,h=("render"!==t.$renderFrom?t.data.slice(d.yStart,d.yEnd):t.currentRows)||[],p=t.filteredColumns.slice(d.xStart,d.xEnd),m=g(t),y=function(t){var e=t.currentSpans;if(!e||!e.length)return null;for(var i=null,n=0;n<e.length;n++){var o=e[n],r=o.row,a=o.column,l=o.$rowsVisibility,s=o.$colsVisibility;if((null==l?void 0:l.length)&&(null==s?void 0:s.length)){var c=s[1]-s[0]+1,d=l[1]-l[0]+1;if(!(c<2&&d<2)){i=i||new Map;var u="".concat(r),h=i.get(u);h?h.push({column:a,colspan:c,rowspan:d}):i.set(u,[{column:a,colspan:c,rowspan:d}])}}}return i}(t),b=null!==(i=t.$rowIndexShift)&&void 0!==i?i:d.yStart,x=(0,f.getHeaderRowCount)(t)+b;if(t.$isDragging){var w=document.querySelector(".dhx_drag-ghost");if(w){var C=Array.from(w.querySelectorAll(".dhx_grid-row")).map((function(t){return t.getAttribute("data-dhx-index")})).filter((function(t){return null!==t})).map((function(t){return Number(t)}));C.length&&(a=C.map((function(e){return t.data[e]})).filter((function(t){return t&&!h.find((function(e){return e.id===t.id}))})),h.push.apply(h,a))}}return h.map((function(e,i){var f,g=null==a?void 0:a.some((function(t){return t.id===e.id})),w=h.length-1===i,C=null===(f=t.$subRowCells)||void 0===f?void 0:f.get(e.id),S=y&&y.get("".concat(e.id)),E="";t.rowCss&&(E=t.rowCss(e)),e.$css&&(E+=e.$css);var D=p.map((function(i,a){var s,c;if(!i.hidden){var h=e[i.id],f=(0,o.isDefined)(h)&&i.options?(0,u.getComboEditorValue)(h,i,e):(0,u.applyPattern)(h,i),p=S&&function(t,e){for(var i=0;i<t.length;i++)if("".concat(t[i].column)==="".concat(e))return t[i];return null}(S,i.id),g=i.template?i.template((0,o.isDefined)(f)?f:"",e,i):"boolean"!=typeof(c=f)&&"boolean"!==i.type||"string"==typeof c||e.$group?c||0===c?c:"":"".concat(Boolean(c));"string"==typeof g&&(g=(0,l.isHtmlEnable)(t,i)?(0,r.el)("div.dhx_grid-cell__content",{".innerHTML":g}):g);var y="".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,E=t.filteredColumns;(x||"boolean"===i.type&&(t.editable&&(null===(s=i.editable)||void 0===s||s)||!t.editable&&i.editable)&&!e.$group)&&(g=_(e,i,t).toHTML(),y+=" dhx_grid-cell__editable",w===E.indexOf(i)+1&&(b-=1));var D=t.firstColId===i.id&&(null==C?void 0:C.toggleIcon)&&!!(null==C?void 0:C.height);return"tree"===t.type&&t.firstColId===i.id||D?function(t,e,i,o,a,l,s,c){void 0===s&&(s=!1),void 0===c&&(c=1);var d=o.$editable&&o.$editable.row===e.id&&o.$editable.col===i.id,h=!o.fixedColumns.left.length||"leftFixedCols"===o.$renderFrom,f=i.align?"dhx_align-".concat(i.align):"dhx_align-left",p="";h&&(p="dhx_tree-cell ".concat(i.$cellCss[e.id]||""," ").concat(f),(e.$items||s)&&(p+=" dhx_grid-expand-cell"),d&&(p+=" dhx_tree-editing-cell"),o.dragMode&&!d&&(p+=e.$draggable?" dhx_grid-cell--draggable":""));var g=(0,u.getTreeCellWidthOffset)(e,!0);return(0,r.el)(".dhx_grid-cell",n({class:p,style:{width:i.$width,height:e.$height,padding:e.$items?0:"0 0 0 ".concat(g,"px")},"data-dhx-col-id":i.id},function(t,i){return n(n(n(n({role:t.$rowHeader?"rowheader":"gridcell","aria-colindex":i,"aria-readonly":a.readonly},a.exposeSelected&&{"aria-selected":a.isSelected(e.id,t.id)?"true":"false"}),(null==l?void 0:l.colspan)>1&&{"aria-colspan":l.colspan}),(null==l?void 0:l.rowspan)>1&&{"aria-rowspan":l.rowspan}),{tabindex:e.id===a.tabRow&&t.id===a.tabCol?0:-1})}(i,c)),h?[e.$items||s?(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":v(t)}}(e)),{style:{padding:e.$level?"0 0 0 ".concat(4+g,"px"):"0 0 0 4px"}})):null,(0,r.el)(".dhx_tree-cell",{class:f+"".concat(o.autoHeight?" dhx_tree-cell_auto-height":"")},[t])]:null)}(g,e,i,t,m,p,D,d.xStart+a+1):(t.dragMode&&!x&&(y+=e.$draggable?" dhx_grid-cell--draggable":""),i.align&&(y+=" dhx_align-".concat(i.align)),(0,l.isHtmlEnable)(t,i)&&(y+=" dhx_grid-cell__content_html-enable"),t.autoHeight&&(y+=" dhx_grid-cell__content_auto-height"),(0,r.el)(".dhx_grid-cell",n({class:y,style:{width:b,height:e.$height+"px"},_key:i.id,"data-dhx-col-id":i.id},function(t,i){return n(n(n(n({role:t.$rowHeader?"rowheader":"gridcell","aria-colindex":i,"aria-readonly":m.readonly},m.exposeSelected&&{"aria-selected":m.isSelected(e.id,t.id)?"true":"false"}),(null==p?void 0:p.colspan)>1&&{"aria-colspan":p.colspan}),(null==p?void 0:p.rowspan)>1&&{"aria-rowspan":p.rowspan}),{tabindex:e.id===m.tabRow&&t.id===m.tabCol?0:-1})}(i,d.xStart+a+1)),[g]))}})),O=(0,u.getTotalRowHeight)(e);return(0,r.el)(".dhx_grid-row",n({style:{height:w?O+1:O,display:g?"none":null},"data-dhx-id":e.id,"data-dhx-index":b+i,class:E,_key:e.id,_flags:r.KEYED_LIST},g?{}:function(e,i){var o,r=n({role:"row","aria-rowindex":e},c&&{"aria-selected":t.selection.isSelectedCell(i.id)?"true":"false"});return s&&i&&(r["aria-level"]=(null!==(o=i.$level)&&void 0!==o?o:0)+1,i.$items&&(r["aria-expanded"]=i.$opened?"true":"false")),r}(x+i+1,e)),D)}))},e.getSpans=function(t,e){var i,c,d=[],h=t.columns,p=t.filteredColumns,g=t.data,y=t.currentSpans,b=t.bottomSplit,x=void 0===b?0:b;if(!p.length||!y)return null;for(var w=t.fixedColumns.right.length,C=y.filter((function(e){var i;return null===(i=e.$renderFrom)||void 0===i?void 0:i.includes(t.$renderFrom)})),S=C.sort((function(t,e){return"string"==typeof t.row&&"string"==typeof e.row?t.row.localeCompare(e.row):t.row-e.row})),E=function(y){var b=S[y].row,C=S[y].column,E=S[y].$rowsVisibility[1]-S[y].$rowsVisibility[0]+1,D=S[y].$colsVisibility[1]-S[y].$colsVisibility[0]+1,O=S[y].text,k=S[y].css,R=e===s.Split.bottom&&t.$renderFrom.endsWith("FixedCols"),T=R?t.$data:g,M=null==p?void 0:p.findIndex((function(t){return"".concat(t.id)==="".concat(C)})),I=null==T?void 0:T.findIndex((function(t){return"".concat(t.id)==="".concat(b)}));if(M<0||I<0)return"continue";if(R){var H=t.$data[I+E-1];if(!g.find((function(t){return t.id===(null==H?void 0:H.id)})))return"continue"}var P=p[M],F=T[I],A=P.$cellCss[b],$=(0,o.isDefined)(S[y].text)?"string":P.type;if(P.hidden)return"continue";var L=void 0;if((0,o.isDefined)(O))if("function"==typeof O){var j=n(n({},t.commonSummary),t.colSummary[C]);"string"==typeof P.summary&&"count"!==P.summary&&(j[P.summary]=(0,u.applyPattern)(j[P.summary],P)),L=O(j)}else L=O.toString();else L=void 0===F[C]?"":(0,u.applyPattern)(F[C],P);if("function"!=typeof O){var N=P.template||function(t,e,i){return t||0===t?t:""};L=N(L,F,P)}var V=(0,l.isHtmlEnable)(t,P);L="string"==typeof L?(0,r.el)("div.dhx_span-cell-content",{class:t.autoHeight?" dhx_grid-cell__content_auto-height":"",".innerHTML":V?L:null},V?null:L):L;var W=void 0;if("bottomFixedRows"===t.$renderFrom||R){var z=T.length-x;W=I<z?-(0,u.rowsHeight)(t,T,I,z):(0,u.rowsHeight)(t,T,z,I)}else W=(0,u.rowsHeight)(t,T,0,I)-(e?0:1);var B=0;if("rightFixedCols"===t.$renderFrom){var G=p.length-t.fixedColumns.right.length;B=M<G?-(0,u.colsWidth)(t,p,M,G):(0,u.colsWidth)(t,p,G,M)}else B=(0,u.colsWidth)(t,p,0,M);var Y=F.$items&&0===M,U=M===p.length-1,X=M+D===p.length,q=w&&M===p.length-w,K=e===s.Split.bottom&&t.fixedRows.bottom.find((function(t){return t.id===b})),Z=!!x&&I+E>T.length-x,J=!!w&&M+D===p.length-w,Q=P.header[0].text?" dhx_span-cell":" dhx_span-cell dhx_span-cell--title";Q+=Y?" dhx_span-expand-cell":"",Q+=A?" ".concat(A):"",Q+=k?" ".concat(k):"",Q+=0===I?" dhx_span-first-row":"",Q+=I+E===T.length?" dhx_grid__span_bottom--last-row":"",Q+=0===M||q?" dhx_span-first-col":"",Q+=U||X?" dhx_span-last-col":"",Q+=1===D?" dhx_span-".concat(P.type||"string","-cell"):" dhx_span-string-cell",Q+=P.align?" dhx_align-".concat(P.align):" dhx_".concat($,"-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(D>1){var et=h.findIndex((function(t){return t.id===C}));tt=(0,a.getWidth)(h,S[y].colspan,et)}else tt=P.$width;var it=void 0;if(E>1){if(it=(0,a.getSpanHeight)(T,S[y]),e===s.Split.top&&t.$renderFrom.endsWith("FixedCols")){var nt=I+E-T.length;if(nt>0){var ot=t.fixedRows.top.length;it+=(0,l.getTotalHeight)(t.$data.slice(ot,ot+nt))}}}else it=F.$height;var rt=null;if((null===(i=t.$editable)||void 0===i?void 0:i.isSpan)&&t.$editable.row===b&&t.$editable.col===C||"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&&M+D<=st||w&&M>=p.length-w,dt=I<lt||I+E>T.length-x,ut=lt&&I+E<=lt||x&&I>=T.length-x,ht=M<st||M+D>p.length-w;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=S[y].text,yt=0;if(L=_(F,P,t,S[y]).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-f.BORDERS:t.$totalHeight,Ct=W+it-gt.top,St=W-bt<gt.top,Et=Ct>wt-xt;St&&Et&&pt.xState&&(yt=1),W=St?gt.top+bt-(bt&&!ct?1:0):W,it=Et?wt-W-xt+gt.top-yt:St?Ct-bt:it}if("render"===t.$renderFrom){if(rt=14,_t.left.find((function(t){return t.id===C}))&&(B=gt.left+(0,l.getTotalWidth)(_t.left.slice(0,M)),!ct)){var Dt=(0,l.getTotalWidth)(_t.left.slice(M,st));tt=tt-gt.left>Dt?tt-gt.left:Dt}if(vt.top.find((function(t){return t.id===b}))&&(W=gt.top+(0,l.getTotalHeight)(vt.top.slice(0,I)),!ut)){var Ot=(0,l.getTotalHeight)(t.fixedRows.top.slice(I,t.topSplit));it=it>0?Ot+it-yt:Ot}if(_t.right.find((function(t){return t===p[p.indexOf(P)+D-1]}))){var kt=p.length,Rt=m(t),Tt=kt-p.indexOf(P)-D,Mt=(Dt=Tt?(0,l.getTotalWidth)(_t.right.slice(0,-Tt)):(0,l.getTotalWidth)(_t.right),(0,l.getTotalWidth)(p.slice(M,kt-w)));B=Rt.x>Mt?B-Rt.x+Mt:B,ct||(tt=Rt.x<Mt?tt-Rt.x-1:Dt-1)}if(vt.bottom.find((function(t){return t===T[T.indexOf(F)+E-1]}))){kt=T.length,Rt=m(t);var It=kt-T.indexOf(F)-E,Ht=(Ot=It?(0,l.getTotalHeight)(vt.bottom.slice(0,-It)):(0,l.getTotalHeight)(t.fixedRows.bottom),(0,l.getTotalHeight)(T.slice(I,kt-x)));W=Rt.y>Ht?W-Rt.y+Ht:W,ut||(it=Rt.y<Ht?Ot+it-yt-(It?-1:yt?0:1):Ot-(It?-1:1))}}st===M+1&&(tt-=1),M===p.length-w&&(B+=1,tt-=1)}}d.push((0,r.el)("div",{class:Q,style:{width:tt,height:it,top:W,left:B,zIndex:rt},"data-dhx-col-id":C,"data-dhx-id":b},[Y?(0,r.el)(".dhx_span-expand-cell-icon",{class:F.$opened?"dxi dxi-chevron-down":"dxi dxi-chevron-right","data-dhx-id":F.id,role:"button","aria-label":v(F),style:{padding:"0 0 0 ".concat(4+(0,u.getTreeCellWidthOffset)(F,!0),"px")}}):null,L]))},D=0;D<S.length;D++)E(D);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,h=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==h})),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,f.getCurrFixedCols)(e,s.Split.left).length,D=(0,f.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(20);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(120),s=i(121),c=i(122);!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(13),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(30),e),o(i(101),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)});Object.defineProperty(e,"__esModule",{value:!0}),e.Layout=void 0;var r=i(31),a=i(42),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(104),e),o(i(45),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(73),l=i(75),s=i(16),c=i(10),d=i(13),u=i(0),h=i(76),f=i(26),p=i(38),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),d.DataDriver.json,!0),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._reapplyRules(),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._reapplyRules()}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=t||{},n=i.id,o=i.permanent;return(0,u.isEmptyObj)(t)?this._dropNonPermanentFilters():o?this._filters={}:n&&delete this._filters[n],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=t?[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(n({},t))}this._applySorters()}else this._initSortOrder&&this._resetSorting();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=o([],this._order,!0),i=0;i<e.length;i++)t.call(this,e[i],i,e)},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,e){e&&this._resetRules();var i=this.config.approximate;i&&(t=this._approximate(t,i.value,i.maxNum)),this._parse_data(t),this._reapplyRules(),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=o([],this._order,!0),i=[],n=0;n<e.length;n++)i.push(t.call(this,e[n],n,e));return i},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._resetSorting=function(){this._sortingStates=[],this._sorter=null,this._initSortOrder&&(this._order=this._initSortOrder,this._initSortOrder=null,this._initFilterOrder&&(this._initFilterOrder=null,this.filter(null,{$restore:!0},!0)))},t.prototype._dropNonPermanentFilters=function(){var t;for(var e in this._filters)(null===(t=this._filters[e].config)||void 0===t?void 0:t.permanent)||delete this._filters[e]},t.prototype._resetRules=function(){this._resetSorting(),this._dropNonPermanentFilters()},t.prototype._reapplyRules=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,!i)},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(37),r=i(26),a=i(38);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(74);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",aria_confirm:"confirm",aria_reject:"reject",aria_apply:"apply"}},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(31),d=i(100),u=i(6),h=i(30),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,o,s;if(this._saveTheme(),null===this.config&&(this.config={}),!this.config.hidden){var c,d=this.config.$fieldset,u=this._calculateStyle(),h=(0,a.isDefined)(this.config.padding)?isNaN(Number(this.config.padding))?{padding:this.config.padding}:{padding:"".concat(this.config.padding,"px")}:"",f=this.config.full||this.config.html?u:r(r({},u),h),p=this._checkProgress()?this._getProgressBar():null;if(!this.config.html)if(this._ui){var g=this._ui.getRootView();g.render&&(g=(0,l.inject)(g)),c=[g]}else c=t||null;var v=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,_={};if(this.config.on)for(var m in this.config.on)_["on"+m]=this.config.on[m];var y="",b=this.config.cols||this.config.rows;if(this.config.type&&b)switch(this.config.type){case"line":y=" dhx_layout-line";break;case"wide":y=" dhx_layout-wide";break;case"space":y=" dhx_layout-space"}var x=d?(0,l.el)("fieldset.dhx_form-fieldset",{class:this.config.$disabled?" dhx_form-fieldset--disabled":"",style:h,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(c))]):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({},h),{height:"calc(100% - ".concat(this.config.headerHeight||37,"px)")}),class:this._getCss(!0)+" dhx_layout-cell-content"+(this.config.type?y:"")},this.config.html?[(0,l.el)("div",{".innerHTML":this.config.html,class:"dhx_layout-cell dhx_layout-cell-inner_html"})]:c)]:!this.config.html||this.config.rows&&this.config.cols&&this.config.views?c:[this.config.collapsed?null:(0,l.el)(".dhx_layout-cell-content",{style:h},[(0,l.el)(".dhx_layout-cell-inner_html",{".innerHTML":this.config.html})])],w=(0,l.el)("div",r(r(((e={_key:this.config.id||this._uid,_ref:this._uid})["aria-label"]=this.config.id&&(null===(n=null===(i=this._parent)||void 0===i?void 0:i.config)||void 0===n?void 0:n.views)?"tab-content-"+this.config.id:null,e["data-cell-id"]=null!==(o=this.config.id)&&void 0!==o?o:null,e["data-dhx-theme"]=null!==(s=this._theme)&&void 0!==s?s:null,e),_),{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?y:""),style:d?u:f}),x||p?[].concat(x,p):null);return v?[].concat(w,v):w}},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(44),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,o,s;if(this._saveTheme(),null===this.config&&(this.config={}),!this.config.hidden){var c,d=this.config.$fieldset,u=this._calculateStyle(),h=(0,a.isDefined)(this.config.padding)?isNaN(Number(this.config.padding))?{padding:this.config.padding}:{padding:"".concat(this.config.padding,"px")}:"",f=this.config.full||this.config.html?u:r(r({},u),h),p=this._checkProgress()?this._getProgressBar():null;if(!this.config.html)if(this._ui){var g=this._ui.getRootView();g.render&&(g=(0,l.inject)(g)),c=g?[this.scrollView.render(g)]:g||null}else c=t?this.scrollView.render([t]):t||null;var v=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,_={};if(this.config.on)for(var m in this.config.on)_["on"+m]=this.config.on[m];var y="",b=this.config.cols||this.config.rows;if(this.config.type&&b)switch(this.config.type){case"line":y=" dhx_layout-line";break;case"wide":y=" dhx_layout-wide";break;case"space":y=" dhx_layout-space"}var x=(0,l.el)(".dhx_layout-cell-content",{_key:"".concat(this._uid,"_html"),style:h},[(0,l.el)(".dhx_layout-cell-inner_html",{".innerHTML":this.config.html})]),w=d?(0,l.el)("fieldset.dhx_form-fieldset",{class:this.config.$disabled?" dhx_form-fieldset--disabled":"",style:h,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(c))]):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({},h),{height:"calc(100% - ".concat(this.config.headerHeight||37,"px)")}),class:this._getCss(!0)+" dhx_layout-cell-content"+(this.config.type?y:"")},this.config.html?[(0,l.el)("div",{".innerHTML":this.config.html,class:"dhx_layout-cell dhx_layout-cell-inner_html"})]:c)]:!this.config.html||this.config.rows&&this.config.cols&&this.config.views?c:[this.config.collapsed?null:this.scrollView&&this.scrollView.config.enable&&this.getParent()?this.scrollView.render([x],this._uid):x],C=(0,l.el)("div",r(r(((e={_key:this.config.id||this._uid,_ref:this._uid})["aria-label"]=this.config.id&&(null===(n=null===(i=this._parent)||void 0===i?void 0:i.config)||void 0===n?void 0:n.views)?"tab-content-"+this.config.id:null,e["data-cell-id"]=null!==(o=this.config.id)&&void 0!==o?o:null,e["data-dhx-theme"]=null!==(s=this._theme)&&void 0!==s?s:null,e),_),{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?y:""),style:d?u:f}),w||p?[].concat(w,p):null);return v?[].concat(C,v):C}},e}(i(42).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(50),e),o(i(115),e),o(i(55),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(110),u=i(11),h=i(7),f=i(29),p=i(51),g=i(32),v=i(114),_=i(34),m=i(18),y=i(54),b=i(55);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=i.ariaLabel,v=n?null:this.data.getItem(this.list.selection.getId()),_=!this.list.selection.getId()||"object"==typeof this.list.selection.getId()&&0===this.list.selection.getId().length,m=(0,c.getLabelStyle)(this.config),y=!this.config.multiselection&&(this.config.readOnly||!this.popup.isVisible()),x=y&&this.config.htmlEnable&&this.config.template,w=y&&((null==v?void 0:v.icon)||(null==v?void 0:v.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):"")},[m?(0,l.el)("label.dhx_label.dhx_combobox__label",{style:m.style,class:h?"dhx_label--with-help":"",onclick:this._handlers.oninputclick},h?[(m.label||s)&&(0,l.el)("span.dhx_label__holder",m.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)})]:m.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",[(x||w)&&v?(0,l.el)("div.dhx_combobox-input__template",{".innerHTML":x?this.config.template(v):null},w?[(0,e.$template)(v)]: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:_&&p?p:void 0,value:f&&v?this._getItemText(v):this._state.value,readOnly:f||d,required:s,role:"combobox","aria-label":g||(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(52),e),o(i(113),e),o(i(53),e),o(i(33),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(7),c=i(1),d=i(27),u=i(18),h=i(11),f=i(53),p=i(2),g=i(33),v=i(111);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(18),o=i(7),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(34);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(21),s=i(57),c=i(5),d=i(8);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),L=e.wrapper.width-x.y-d.BORDERS,j=h?g<L?g-D:L-D:0,N={position:"absolute",left:j,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:j,height:W,paddingTop:_,overflow:"hidden",width:D},role:"presentation","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(15),l=i(5),s=i(3),c=i(21),d=i(56),u=i(0),h=i(8),f=i(4),p=i(12);function g(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 v(t,e,i,n){return{onclick:[g,n,t,i,s.GridEvents[e+"CellClick"]],onmouseover:[g,n,t,i,s.GridEvents[e+"CellMouseOver"]],onmousedown:[g,n,t,i,s.GridEvents[e+"CellMouseDown"]],ontouchstart:[g,n,t,i,s.GridEvents[e+"CellMouseDown"]],ondblclick:[g,n,t,i,s.GridEvents[e+"CellDblClick"]],oncontextmenu:[g,n,t,i,s.GridEvents[e+"CellRightClick"]],ontouchmove:[g,n,t,i,s.GridSystemEvents[e+"CellTouchMove"]],ontouchend:[g,n,t,i,s.GridSystemEvents[e+"CelltouchEnd"]]}}function _(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 m(t,e){if(!t.data||!t.filteredColumns)return[];var i,o=e.name,a="footer"===o?(0,h.getHeaderRowCount)(t)+(t.$data||t.data).length:0,s="header"===o?t.headerAutoHeight:t.footerAutoHeight,c=t.$positions,d=t.currentColumns,u=function(t,e){var i=t.map((function(t){return t[e]||[{}]}));return(0,l.transpose)(i)}(d,o),g=1;return u.map((function(m,y){var b=("header"===o?t.$headerHeightMap:t.$footerHeightMap)[y];return(0,r.el)(".dhx_".concat(o,"-row"),n({style:{height:b}},{role:"row","aria-rowindex":a+y+1}),m.map((function(a,m){var x,w=a.css||"",C=d[m],S=c.xStart+m+1,E=(0,l.isHtmlEnable)(t,C,a),D="dxi dxi-arrow-up dhx_grid-sort-icon",O="none",k=a.text;if("function"==typeof a.text){var R=n(n({},t.commonSummary),t.colSummary[C.id]);"string"==typeof C.summary&&"count"!==C.summary&&(R[C.summary]=(0,f.applyPattern)(R[C.summary],C)),k=a.text(R)}var T=t.sort.findIndex((function(t){return t.by==C.id})),M=t.sort[T];M&&!a.content&&(D+=" dhx_grid-sort-icon--".concat(M.dir),w+=" dhx_grid-".concat(o,"-cell--sorted "),O="asc"===M.dir?"ascending":"descending");var I=(0,l.isSortable)(t,C)&&a.text&&"footer"!==o&&!1!==a.headerSort;I&&(w+=" dhx_grid-header-cell--sortable");var H=!(!a.text||a.colspan>1)&&(I||!!M),P=0===m?"dhx_first-column-cell":"",F=m===d.length-1?"dhx_last-column-cell":"";a.content||(a.align?w+=" dhx_grid-header-cell--align_".concat(a.align," "):w+=" dhx_grid-header-cell--".concat("number"===C.type||"date"===C.type?"align_right":"align_left"," ")),w+="".concat(P," ").concat(F);var A=void 0!==C.resizable?C.resizable:t.resizable;if(A){var $=t.rightSplit&&t.$scrollBarWidth.xState&&t.fixedColumns.right.includes(C);A=(0,r.el)("div",{class:"dhx_resizer_grip_wrap","aria-hidden":"true"},[(0,r.el)("div",{class:"dhx_resizer_grip"+($?" dhx_resizer_grip--left":" dhx_resizer_grip--right"),dhx_resized:C.id,style:{height:"".concat(100*u.length,"%")}},[(0,r.el)("div",{class:"dhx_resizer_grip_line"})])]);var L=C.header&&(null===(x=C.header[0])||void 0===x?void 0:x.colspan);L&&(i=L,g=1),i&&g!==i&&(0===y&&(A=null),g++),"footer"===o&&(A=null)}a.align&&(w+=" dhx_align-".concat(a.align)),e.footerAtBottom&&(w+=" dhx_grid-footer-at-bottom");var j=function(t,e,i){var n={"aria-colindex":e,tabindex:-1,"data-dhx-row-index":y};return"footer"===t||a.content?n.role="gridcell":(n.role="columnheader",H&&(n["aria-sort"]=i)),n};if(a.content)return(0,r.el)(".dhx_grid-".concat(o,"-cell.dhx_grid-custom-content-cell"),n(n({class:w.trim(),"data-dhx-id":C.id,"data-dhx-text-id":a.id,_key:C.id,style:{width:C.$width,height:"footer"===o?b+h.BORDERS/2+"px":b+"px"}},v(C,o,t,a)),j(o,S,O)),[_(a,C,t,0,""),A||null]);var N="dhx_grid-header-cell-text_content";return s&&(N+=" dhx_grid-header-cell-text_content-auto-height"),(0,r.el)(".dhx_grid-".concat(o,"-cell"),n(n({class:w.trim(),"data-dhx-id":C.id,"data-dhx-text-id":a.id,_key:C.id,style:{width:C.$width,height:"footer"===o?b+h.BORDERS/2+"px":b+"px"}},v(C,o,t,a)),j(o,S,O)),[(0,r.el)("div.dhx_grid-header-cell-text",{role:"presentation"},[(0,r.el)("span",n(n({class:N},function(t,e){return I?{role:"button","aria-label":(0,p.getLocaleString)("aria_sortBy",{column:"".concat(e)})}:{}}(0,k)),{".innerHTML":E?k:null}),E?null:k),A||null]),I&&(0,r.el)("div.dhx_grid-sort",[(0,r.el)("div",{class:D,"aria-hidden":"true"}),M&&t.sort.length>1&&(0,r.el)("div.dhx_grid-sort-counter",{"aria-hidden":"true"},[T+1])||null])])})))}))}function y(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,g="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,L=x*b;if(T.rowspan>1){for(var j=T.rowspan-1;j>0;)$+=m[b+j],j--;$-=1}if(T.rowspan>1||T.colspan>1){L=0;for(D=b-1;D>=0;D--)L+=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=_(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";g&&(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:L},class:G.trim(),"data-dhx-id":M.id,"data-dhx-text-id":T.id,tabindex:-1,"data-dhx-row-index":b},v(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=m,e.getFixedSpans=y,e.getFixedRows=function(t,e,i){var a,l=t.leftSplit,s=t.$totalWidth,c=m(t,e),d=y(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?m(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,_=((a={position:"sticky"})[e.position]=0,a);e.sticky||(_.left=-t.scroll.left,v=-t.scroll.left,_.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({},_),{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=w?Math.max(0,v.length-C.length):0,D=(0,c.getCells)(n(n({},t),{data:C,$renderFrom:S,$rowIndexShift:E,$positions:n(n({},g),{yStart:0,yEnd:w?p:u})})),O=C.reduce((function(t,e){return t+(0,f.getTotalRowHeight)(e)}),0),k=(0,c.getSpans)(n(n({},t),{$renderFrom:S,data:v}),w?s.Split.bottom:s.Split.top),R=(0,l.getTotalHeight)(t.fixedRows.bottom),T=function(o){return(0,d.getFixedCols)(n(n({},t),{headerHeight:0,data:C,$renderFrom:S,$rowIndexShift:E,scroll:n(n({},t.scroll),{top:-1}),$positions:n(n({},g),{yStart:0,yEnd:w?p:u}),$totalHeight:O,$data:v}),n(n({},e),{shifts:n(n({},e.shifts),{y:0})}),o,i)||[]},M=o(o([],T(s.Split.left),!0),T(s.Split.right),!0),I={overflow:"hidden",width:a+x.y+h.BORDERS<m?a:m-x.y-h.BORDERS};return i===s.Split.bottom&&e.footerAtBottom?(I.top="unset",I.bottom=x.x||-1,I.height=b+O):(I.top=w?_+y+b<e.wrapper.height-x.x-h.BORDERS?_+y-R+h.BORDERS/2:e.wrapper.height-R-b-h.BORDERS/2-x.x:y,I.height=O>e.wrapper.height?e.wrapper.height:O),[(0,r.el)(".dhx_grid-fixed-data-rows-wrap",{class:w?"dhx_grid__rows_bottom--fixed":"",style:I},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([],D,!0),[k&&(0,r.el)(".dhx_span-spans",{role:"presentation"},k)],!1))])],M,!0),[t.bottomSplit?(0,r.el)(".dhx_grid__rows-border--frozen",{role:"presentation"}):null],!1))]}}},function(t,e,i){i(59),i(60),i(61),i(62),i(63),i(64),t.exports=i(68)},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(66),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(24))},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(24),i(67))},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(69),i(70);var n=i(71);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(7);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(82);Object.defineProperty(e,"Grid",{enumerable:!0,get:function(){return a.Grid}});var l=i(14),s=i(34),c=i(131),d=i(20),u=window;e.i18n=u.dhx&&u.dhx.i18n?u.dhx.i18n:{},e.i18n.setLocale=c.setLocale,e.i18n.calendar=e.i18n.calendar||l.locale,e.i18n.combobox=e.i18n.combobox||s.default,e.i18n.grid=e.i18n.grid||d.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=60)}([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(74),o=i(2);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;var r=n.ViewModel.prototype._redraw;function a(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)}}})}n.ViewModel.prototype._redraw=function(t,e,i){return!1!==i&&this.node&&!this.node.el&&(this.node=null),r.call(this,t,e,i)},e.disableHelp=function(){n.DEVMODE.mutations=!1,n.DEVMODE.warnings=!1,n.DEVMODE.verbose=!1,n.DEVMODE.UNKEYED_INPUT=!1},e.resizer=a,e.resizeHandler=function(t,i){return(0,e.create)({render:function(){return a(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",t.announce="announce"}(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.resolveFilterOptions=e.getFilterOptions=e.normalizeOptions=e.getEditorOptions=e.applyPattern=e.getMaxColsWidth=e.getTreeCellWidthOffset=e.getCalculatedRowHeight=e.getMaxRowHeight=e.getNormalizeFilterData=e.calculateVisibleRange=e.countColumns=e.measureTextHeight=e.resolveFixedRowHeight=e.normalizeArray=e.colsWidth=e.rowsHeight=e.getTotalRowHeight=void 0;var r=i(0),a=i(3),l=i(18),s=i(5),c=i(14),d=i(21),u=i(8);function h(t){return(null==t?void 0:t.$height)+((null==t?void 0:t.$opened)&&(null==t?void 0:t.$subRowHeight)||0)||0}function f(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]:h(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=h,e.rowsHeight=function(t,e,i,n){return t.$rowHeights?t.$rowHeights.rangeSize(i,n):(0,s.getTotalHeight)(e.slice(i,n))},e.colsWidth=function(t,e,i,n){return t.$colWidths?t.$colWidths.rangeSize(i,n):(0,s.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.resolveFixedRowHeight=function(t,e){if(Array.isArray(t)){var i=t[e];return"auto"===i?{height:l.DEFAULT_ROW_HEIGHT,auto:!0}:{height:"number"==typeof i&&i>0?i:l.DEFAULT_ROW_HEIGHT,auto:!1}}return{height:"number"==typeof t&&t>0?t:l.DEFAULT_ROW_HEIGHT,auto:null}},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,l=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,s.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*l},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,l=i.leftSplit||0,c=i.rightSplit||0,d=o+r>0,h=l+c>0,p=i.$rowHeights,g=i.$colWidths,v=0;d&&(p?(o&&(v+=p.rangeSize(0,o)),r&&(v+=p.rangeSize(p.length-r,p.length))):v=(0,s.getTotalHeight)(n.slice(0,o))+(r?(0,s.getTotalHeight)(n.slice(-r)):0));var _=0,m=l;if(h){var y=(0,u.getCurrFixedCols)(i,a.Split.left),b=(0,u.getCurrFixedCols)(i,a.Split.right);m=y.length,_=(0,s.getTotalWidth)(y)+(0,s.getTotalWidth)(b)}var x,w,C=t.height-(i.$headerHeight||0)-(i.$footerHeight||0)-v,S=t.width-_;if(p&&!d){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=d?n.slice(o,-r||n.length):n;x=f(C,e.top,k,"$height")}if(g&&!h){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 I=h?i.columns.slice(l,-c||i.columns.length):i.columns;w=f(S,e.left,I,"$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,l=void 0===a?{font:"14.4px Arial",lineHeight:20}:a,c=24+u.BORDERS,d=document.createElement("canvas"),h=d.getContext("2d",{alpha:!1});h.font=l.font;for(var f={},g=n.length,v=0;v<g;v++)f[n[v].id]={width:n[v].$width-c||0,col:n[v]};for(var _=[],y=[],b=0,x=Object.entries(o);b<x.length;b++){var w=x[b],C=w[0],S=w[1],E=null===(e=f[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?m(S,E,o):p(S,E);var D="";if("function"==typeof E.template){var O=E.template(S,o,f[C].col);D=E.htmlEnable?(0,s.removeHTMLTags)(O):O.toString()}else D="string"==typeof S?E.htmlEnable?(0,s.removeHTMLTags)(S):S:S.toString();var k=Math.ceil(h.measureText(D).width/f[C].width);k>1&&(k=(0,r.getTextLines)({ctx:h,text:D,maxWidth:null===(i=f[C])||void 0===i?void 0:i.width}).length),y.push(k),_.push(D.split("\n").length)}}var R=Math.max((0,r.getMaxArrayNumber)(_),(0,r.getMaxArrayNumber)(y));return d.remove(),R*l.lineHeight};e.getCalculatedRowHeight=function(t,e){var i=(e=n({rowHeight:l.DEFAULT_ROW_HEIGHT,verticalOffset:10},e)).rowHeight<l.DEFAULT_ROW_HEIGHT?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 p(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,c.stringToDate)(t,i,!0)){var o=new Date(t);(null==o?void 0:o.valueOf())&&(t=(0,c.getFormattedDate)(i,o))}}else"object"==typeof t&&(t=(0,c.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,d.numberMask)(t,n(n({},e.numberMask),{onlyView:!0}))}return e.patternMask?(0,d.patternMask)(t,e.patternMask):t}function g(t,e){return o(o([],("function"==typeof t.options?t.options(t,e):t.options)||[],!0),t.$customOptions||[],!0)}function v(t){return(t||[]).map((function(t){return null===t||"object"!=typeof t||t instanceof Date?{id:"".concat(t),value:"".concat(t)}:{id:"".concat(t.id),value:"".concat(t.value)}}))}function _(t,e){var i,n,o=null===(i=t.header)||void 0===i?void 0:i.find((function(t){var i;return t.content===e&&void 0!==(null===(i=t.filterConfig)||void 0===i?void 0:i.options)}));return null===(n=null==o?void 0:o.filterConfig)||void 0===n?void 0:n.options}function m(t,e,i){var n=g(e,i);return"multiselect"===e.editorType&&"string"==typeof t?t.split(",").map((function(t){return y(t.trim(),n)})).join(", "):y(t,n)}function y(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,l=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<l;u++)for(var h=0,f=Object.entries(t[u]);h<f.length;h++){var g=f[h],v=g[0],_=g[1],y=null===(o=r[v])||void 0===o?void 0:o.col;if(y&&"height"!==v&&!v.startsWith("$")&&("string"==typeof _||"number"==typeof _||_ instanceof Date||Array.isArray(_))){_="combobox"===y.editorType||"multiselect"===y.editorType?m(_,y,t[u]):_,"header"!==n&&(_=p(_,y));var b=void 0;if("function"==typeof(null==y?void 0:y.template)&&"data"===n){var x=y.template(_,t[u],y);b=y.htmlEnable?(0,s.removeHTMLTags)(x):x}else b=y.htmlEnable?(0,s.removeHTMLTags)(_):_.toString();var w=d.measureText(b).width;w>r[v].width&&(r[v].width=w)}}c.remove();for(var C={},S=0,E=Object.entries(r);S<E.length;S++){var D=E[S];v=D[0],_=D[1];C[v]=Math.ceil(_.width)}return C},e.applyPattern=p,e.getEditorOptions=g,e.normalizeOptions=v,e.getFilterOptions=_,e.resolveFilterOptions=function(t,e,i){void 0===i&&(i=[]);var n=_(t,e),o=v(i);return n?Array.isArray(n)?v(n):v(n(o,t)||[]):o},e.getOptionValue=function(t,e){var i=g(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=m,e.getEditorValue=y,e.getReverseScrollState=function(t){var e,i=t.getScrollState(),n=(0,u.calcScrollBarWidth)(t.config,!!(null===(e=t.scrollView)||void 0===e?void 0:e.config.enable)),o=t.config.$totalWidth-t.config.$width+u.BORDERS+n.y,r=t.config.$totalHeight-t.config.$height+t.config.$headerHeight+t.config.$footerHeight+u.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.isInteractiveTarget=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(86),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.isInteractiveTarget=function(t){var e,i;return!!(null===(i=(e=t).closest)||void 0===i?void 0:i.call(e,"a, button, input, select, textarea, label"))},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";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(13),e),o(i(36),e),o(i(79),e),o(i(80),e),o(i(16),e),o(i(82),e),o(i(10),e),o(i(26),e),o(i(38),e),o(i(83),e),o(i(37),e),o(i(25),e),o(i(40),e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNormalizeDateObject=e.getFooterRowCount=e.getHeaderRowCount=e.getCurrFixedCols=e.calcScrollBarWidth=e.BORDERS=void 0;var n=i(2),o=i(3),r=i(14);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.getHeaderRowCount=function(t){var e;return(null===(e=t.$headerHeightMap)||void 0===e?void 0:e.length)||0},e.getFooterRowCount=function(t){var e;return(null===(e=t.$footerHeightMap)||void 0===e?void 0:e.length)||0},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){(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(24),i(67).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(16),r=i(37);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";Object.defineProperty(e,"__esModule",{value:!0}),e.getLocaleString=void 0;var n=i(20);e.getLocaleString=function(t,e){var i=n.default[t];return"string"!=typeof i?"":e?i.replace(/\{(\w+)\}/g,(function(t,i){var n=e[i];return null==n?t:"".concat(n)})):i}},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",today:"Today",clear:"Clear"};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.getCellSource=e.getReducedRowspan=e.getReducedColspan=e.getSpanHeight=e.getSourceCellIndex=e.getWidth=void 0;var o=i(14);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.getSourceCellIndex=function(t,e,i){return e+((t-e)%i+i)%i},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.getCellSource=function(t){return t.$activeCell||t.selection},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(25),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";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(){var t=document.body.classList;t.contains("utilityfocus")&&t.remove("utilityfocus")},this._addFocusClass=function(){var t=document.body.classList;t.contains("utilityfocus")||t.add("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.defaultHistoryConfig=e.defaultDragPanelConfig=e.defaultSubRowConfig=e.getGroupDefaultConfig=e.DEFAULT_ROW_HEIGHT=void 0;var o=i(20);e.DEFAULT_ROW_HEIGHT=40;e.getGroupDefaultConfig=function(t){return"boolean"==typeof t&&(t={}),n(n({type:"column",panel:!0,panelHeight:40,hideableColumns:!0,showMissed:!0,showEmptyGroups:!1,counter:!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";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.default={total:"Total",groupText:"Group",dropAreaTitle:"Group by:",dropAreaPlaceholder:"Drag the column header here",aria_sortedAscending:"Sorted by {column}, ascending",aria_sortedDescending:"Sorted by {column}, descending",aria_filterApplied:"{count} rows match the filter",aria_filterCleared:"Filter cleared, {count} rows",aria_rowsLoaded:"{count} rows loaded",aria_valueOutOfRange:"Value must be between {min} and {max}",aria_valueBelowMin:"Value must be greater than {min}",aria_valueAboveMax:"Value must be less than {max}",aria_valueClamped:"Value corrected to {value}",aria_filter:"Filter {column}",aria_filterByDate:"Filter by date: {column}",aria_sortBy:"Sort by {column}",aria_expandGroup:"Expand group",aria_collapseGroup:"Collapse group",aria_expandRow:"Expand row",aria_collapseRow:"Collapse row",aria_editContent:"Edit content",aria_subRow:"Details for row {id}",aria_dragPanel:"Drag panel",aria_panelHeader:"Panel header",aria_panelFooter:"Panel footer",aria_panelContent:"Panel content",aria_draggableRows:"Draggable rows",aria_rowId:"Row id {id}"}},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.resolveCellState=e.getHandlers=void 0;var o=i(0),r=i(1),a=i(15),l=i(5),s=i(3),c=i(94),d=i(2),u=i(4),h=i(12),f=i(8);function p(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 g(t){var e,i,n,r,l,s,c,d=t.$cellState,u=(0,a.getCellSource)(t).getCell(),h="row"===(null===(e=t.selection.config)||void 0===e?void 0:e.type),f=function(t){var e;return!!(null===(e=t.range)||void 0===e?void 0:e.getRange())}(t),p=d?null===(i=d.active)||void 0===i?void 0:i.row:null===(n=null==u?void 0:u.row)||void 0===n?void 0:n.id,g=d?null===(r=d.active)||void 0===r?void 0:r.col:null===(l=null==u?void 0:u.column)||void 0===l?void 0:l.id,v=(0,o.isDefined)(p)&&(0,o.isDefined)(g),_=(null===(s=t.currentRows)||void 0===s?void 0:s[0])||t.fixedRows.top[0]||t.fixedRows.bottom[0],m=(null===(c=t.currentColumns)||void 0===c?void 0:c[0])||t.fixedColumns.left[0]||t.fixedColumns.right[0],y=d&&(0,o.isDefined)(d.editable)?d.editable:t.editable,b=null==d?void 0:d.ranges;return{tabRow:v?p:null==_?void 0:_.id,tabCol:v?g:null==m?void 0:m.id,readonly:y?"false":"true",readonlyCells:null==d?void 0:d.readonlyCells,exposeSelected:!!d||!h||f,isSelected:d?function(t,e){return t===p&&e===g||function(t,e,i){if(!t)return!1;for(var n=0;n<t.length;n++)if(t[n].rows.has(e)&&t[n].cols.has(i))return!0;return!1}(b,t,e)}:function(e,i){return t.selection.isSelectedCell(e,i)||f&&function(t,e,i){return t.range.isRanged({x:i,y:e})}(t,e,i)}}}function v(t){return t.$group?(0,h.getLocaleString)(t.$opened?"aria_collapseGroup":"aria_expandGroup"):(0,h.getLocaleString)(t.$opened?"aria_collapseRow":"aria_expandRow")}function _(t,e,i,n){return(0,c.getEditor)(t,e,i,n)}function m(t){var e=t.$scrollBarWidth,i=t.$totalWidth-t.$width+f.BORDERS+e.y,n=t.$totalHeight-t.$height+t.$headerHeight+t.$footerHeight+f.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:[p,t,e,i,s.GridEvents.cellClick],onmouseover:[p,t,e,i,s.GridEvents.cellMouseOver],onmousedown:[p,t,e,i,s.GridEvents.cellMouseDown],ondblclick:[p,t,e,i,s.GridEvents.cellDblClick],oncontextmenu:[p,t,e,i,s.GridEvents.cellRightClick],ontouchstart:[p,t,e,i,s.GridEvents.cellMouseDown],ontouchmove:[p,t,e,i,s.GridSystemEvents.cellTouchMove],ontouchend:[p,t,e,i,s.GridSystemEvents.cellTouchEnd]}},e.resolveCellState=g,e.getCells=function(t){var e,i;if(!t.data||!t.filteredColumns)return[];var a,s="tree"===t.type,c="row"===(null===(e=t.selection.config)||void 0===e?void 0:e.type),d=t.$positions,h=("render"!==t.$renderFrom?t.data.slice(d.yStart,d.yEnd):t.currentRows)||[],p=t.filteredColumns.slice(d.xStart,d.xEnd),m=g(t),y=function(t){var e=t.currentSpans;if(!e||!e.length)return null;for(var i=null,n=0;n<e.length;n++){var o=e[n],r=o.row,a=o.column,l=o.$rowsVisibility,s=o.$colsVisibility;if((null==l?void 0:l.length)&&(null==s?void 0:s.length)){var c=s[1]-s[0]+1,d=l[1]-l[0]+1;if(!(c<2&&d<2)){i=i||new Map;var u="".concat(r),h=i.get(u);h?h.push({column:a,colspan:c,rowspan:d}):i.set(u,[{column:a,colspan:c,rowspan:d}])}}}return i}(t),b=null!==(i=t.$rowIndexShift)&&void 0!==i?i:d.yStart,x=(0,f.getHeaderRowCount)(t)+b;if(t.$isDragging){var w=document.querySelector(".dhx_drag-ghost");if(w){var C=Array.from(w.querySelectorAll(".dhx_grid-row")).map((function(t){return t.getAttribute("data-dhx-index")})).filter((function(t){return null!==t})).map((function(t){return Number(t)}));C.length&&(a=C.map((function(e){return t.data[e]})).filter((function(t){return t&&!h.find((function(e){return e.id===t.id}))})),h.push.apply(h,a))}}return h.map((function(e,i){var f,g,w,C=null==a?void 0:a.some((function(t){return t.id===e.id})),S=h.length-1===i,E=null===(f=t.$subRowCells)||void 0===f?void 0:f.get(e.id),D=y&&y.get("".concat(e.id)),O=b+i,k=x+i+1,R=null===(g=m.readonlyCells)||void 0===g?void 0:g.get(e.id),T=null===(w=t.$spanAreas)||void 0===w?void 0:w.filter((function(t){return t.rowStart<=O&&O<=t.rowEnd})),I="";t.rowCss&&(I=t.rowCss(e)),e.$css&&(I+=e.$css);var M=p.map((function(i,a){var s,c;if(!i.hidden){var h=e[i.id],f=(0,o.isDefined)(h)&&i.options?(0,u.getComboEditorValue)(h,i,e):(0,u.applyPattern)(h,i),p=D&&function(t,e){for(var i=0;i<t.length;i++)if("".concat(t[i].column)==="".concat(e))return t[i];return null}(D,i.id),g=(null==T?void 0:T.length)&&function(t,e,i){for(var n=0;n<t.length;n++){var o=t[n];if((e!==o.rowStart||"".concat(i)!=="".concat(o.column))&&o.columns.has("".concat(i)))return!0}return!1}(T,O,i.id)?{"aria-hidden":"true"}:function(t,i){return n(n(n(n({role:t.$rowHeader?"rowheader":"gridcell","aria-colindex":i,"aria-readonly":(null==R?void 0:R.has(t.id))?"true":m.readonly},m.exposeSelected&&{"aria-selected":m.isSelected(e.id,t.id)?"true":"false"}),(null==p?void 0:p.colspan)>1&&{"aria-colspan":p.colspan}),(null==p?void 0:p.rowspan)>1&&{"aria-rowspan":p.rowspan}),{tabindex:e.id===m.tabRow&&t.id===m.tabCol?0:-1})}(i,d.xStart+a+1),y=i.template?i.template((0,o.isDefined)(f)?f:"",e,i):"boolean"!=typeof(c=f)&&"boolean"!==i.type||"string"==typeof c||e.$group?c||0===c?c:"":"".concat(Boolean(c));"string"==typeof y&&(y=(0,l.isHtmlEnable)(t,i)?(0,r.el)("div.dhx_grid-cell__content",{".innerHTML":y}):y);var b="".concat(i.$cellCss&&i.$cellCss[e.id]||""," dhx_").concat(i.type,"-cell").replace(/\s+/g," "),x=i.$width,w=t.$editable&&t.$editable.row===e.id&&t.$editable.col===i.id&&!t.$editable.isSpan,C=t.leftSplit,S=t.filteredColumns;(w||"boolean"===i.type&&(t.editable&&(null===(s=i.editable)||void 0===s||s)||!t.editable&&i.editable)&&!e.$group)&&(y=_(e,i,t).toHTML(),b+=" dhx_grid-cell__editable",C===S.indexOf(i)+1&&(x-=1));var k=t.firstColId===i.id&&(null==E?void 0:E.toggleIcon)&&!!(null==E?void 0:E.height);return"tree"===t.type&&t.firstColId===i.id||k?function(t,e,i,o,a,l){void 0===l&&(l=!1);var s=o.$editable&&o.$editable.row===e.id&&o.$editable.col===i.id,c=!o.fixedColumns.left.length||"leftFixedCols"===o.$renderFrom,d=i.align?"dhx_align-".concat(i.align):"dhx_align-left",h="";c&&(h="dhx_tree-cell ".concat(i.$cellCss[e.id]||""," ").concat(d),(e.$items||l)&&(h+=" dhx_grid-expand-cell"),s&&(h+=" dhx_tree-editing-cell"),o.dragMode&&!s&&(h+=e.$draggable?" dhx_grid-cell--draggable":""));var f=(0,u.getTreeCellWidthOffset)(e,!0);return(0,r.el)(".dhx_grid-cell",n({class:h,style:{width:i.$width,height:e.$height,padding:e.$items?0:"0 0 0 ".concat(f,"px")},"data-dhx-col-id":i.id},a),c?[e.$items||l?(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":v(t)}}(e)),{style:{padding:e.$level?"0 0 0 ".concat(4+f,"px"):"0 0 0 4px"}})):null,(0,r.el)(".dhx_tree-cell",{class:d+"".concat(o.autoHeight?" dhx_tree-cell_auto-height":"")},[t])]:null)}(y,e,i,t,g,k):(t.dragMode&&!w&&(b+=e.$draggable?" dhx_grid-cell--draggable":""),i.align&&(b+=" dhx_align-".concat(i.align)),(0,l.isHtmlEnable)(t,i)&&(b+=" dhx_grid-cell__content_html-enable"),t.autoHeight&&(b+=" dhx_grid-cell__content_auto-height"),(0,r.el)(".dhx_grid-cell",n({class:b,style:{width:x,height:e.$height+"px"},_key:i.id,"data-dhx-col-id":i.id},g),[y]))}})),H=(0,u.getTotalRowHeight)(e);return(0,r.el)(".dhx_grid-row",n({style:{height:S?H+1:H,display:C?"none":null},"data-dhx-id":e.id,"data-dhx-index":b+i,class:I,_key:e.id,_flags:r.KEYED_LIST},C?{}:function(e,i){var o,r=n({role:"row","aria-rowindex":e},c&&{"aria-selected":t.selection.isSelectedCell(i.id)?"true":"false"});return s&&i&&(r["aria-level"]=(null!==(o=i.$level)&&void 0!==o?o:0)+1,i.$items&&(r["aria-expanded"]=i.$opened?"true":"false")),r}(k,e)),M)}))},e.getSpans=function(t,e){var i,c,d,h=[],p=t.columns,g=t.filteredColumns,y=t.data,b=t.currentSpans,x=t.bottomSplit,w=void 0===x?0:x;if(!g.length||!b)return null;for(var C=t.fixedColumns.right.length,S=b.filter((function(e){var i;return null===(i=e.$renderFrom)||void 0===i?void 0:i.includes(t.$renderFrom)})),E=S.sort((function(t,e){return"string"==typeof t.row&&"string"==typeof e.row?t.row.localeCompare(e.row):t.row-e.row})),D=function(b){var x=E[b].row,S=E[b].column,D=E[b].$rowsVisibility[1]-E[b].$rowsVisibility[0]+1,O=E[b].$colsVisibility[1]-E[b].$colsVisibility[0]+1,k=E[b].text,R=E[b].css,T=e===s.Split.bottom&&t.$renderFrom.endsWith("FixedCols"),I=T?t.$data:y,M=null==g?void 0:g.findIndex((function(t){return"".concat(t.id)==="".concat(S)})),H=null==I?void 0:I.findIndex((function(t){return"".concat(t.id)==="".concat(x)}));if(M<0||H<0)return"continue";if(T){var P=t.$data[H+D-1];if(!y.find((function(t){return t.id===(null==P?void 0:P.id)})))return"continue"}var F=g[M],A=I[H],$=F.$cellCss[x],L=(0,o.isDefined)(E[b].text)?"string":F.type;if(F.hidden)return"continue";var j=void 0;if((0,o.isDefined)(k))if("function"==typeof k){var V=n(n({},t.commonSummary),t.colSummary[S]);"string"==typeof F.summary&&"count"!==F.summary&&(V[F.summary]=(0,u.applyPattern)(V[F.summary],F)),j=k(V)}else j=k.toString();else j=void 0===A[S]?"":(0,u.applyPattern)(A[S],F);if("function"!=typeof k){var N=F.template||function(t,e,i){return t||0===t?t:""};j=N(j,A,F)}var W=(0,l.isHtmlEnable)(t,F);j="string"==typeof j?(0,r.el)("div.dhx_span-cell-content",{class:t.autoHeight?" dhx_grid-cell__content_auto-height":"",".innerHTML":W?j:null},W?null:j):j;var z=void 0;if("bottomFixedRows"===t.$renderFrom||T){var B=I.length-w;z=H<B?-(0,u.rowsHeight)(t,I,H,B):(0,u.rowsHeight)(t,I,B,H)}else z=(0,u.rowsHeight)(t,I,0,H)-(e?0:1);var G=0;if("rightFixedCols"===t.$renderFrom){var Y=g.length-t.fixedColumns.right.length;G=M<Y?-(0,u.colsWidth)(t,g,M,Y):(0,u.colsWidth)(t,g,Y,M)}else G=(0,u.colsWidth)(t,g,0,M);var U=A.$items&&0===M,X=M===g.length-1,q=M+O===g.length,K=C&&M===g.length-C,Z=e===s.Split.bottom&&t.fixedRows.bottom.find((function(t){return t.id===x})),J=!!w&&H+D>I.length-w,Q=!!C&&M+O===g.length-C,tt=F.header[0].text?" dhx_span-cell":" dhx_span-cell dhx_span-cell--title";tt+=U?" dhx_span-expand-cell":"",tt+=$?" ".concat($):"",tt+=R?" ".concat(R):"",tt+=0===H?" dhx_span-first-row":"",tt+=H+D===I.length?" dhx_grid__span_bottom--last-row":"",tt+=0===M||K?" dhx_span-first-col":"",tt+=X||q?" dhx_span-last-col":"",tt+=1===O?" dhx_span-".concat(F.type||"string","-cell"):" dhx_span-string-cell",tt+=F.align?" dhx_align-".concat(F.align):" dhx_".concat(L,"-cell"),tt+=Z?" dhx_grid__span_bottom--all-fixed":"",tt+=J?" dhx_grid__span_bottom--part-fixed":"",tt+=Q?" dhx_grid__span_right--before-fixed":"";var et=void 0;if(O>1){var it=p.findIndex((function(t){return t.id===S}));et=(0,a.getWidth)(p,E[b].colspan,it)}else et=F.$width;var nt=void 0;if(D>1){if(nt=(0,a.getSpanHeight)(I,E[b]),e===s.Split.top&&t.$renderFrom.endsWith("FixedCols")){var ot=H+D-I.length;if(ot>0){var rt=t.fixedRows.top.length;nt+=(0,l.getTotalHeight)(t.$data.slice(rt,rt+ot))}}}else nt=A.$height;var at=null;if((null===(i=t.$editable)||void 0===i?void 0:i.isSpan)&&t.$editable.row===x&&t.$editable.col===S||"boolean"===F.type&&(t.editable&&(null===(c=F.editable)||void 0===c||c)||!t.editable&&F.editable)){var lt=t.topSplit,st=void 0===lt?0:lt,ct=t.fixedColumns.left.length,dt=ct&&M+O<=ct||C&&M>=g.length-C,ut=H<st||H+D>I.length-w,ht=st&&H+D<=st||w&&H>=I.length-w,ft=M<ct||M+O>g.length-C;if("render"===t.$renderFrom||dt&&!ut||ht&&!ft){var pt=t.$height,gt=t.$scrollBarWidth,vt=t.scroll,_t=t.fixedRows,mt=t.fixedColumns,yt=E[b].text,bt=0;if(j=_(A,F,t,E[b]).toHTML(yt),tt+=" dhx_span__editable",!ht){var xt=(0,l.getTotalHeight)(_t.top),wt=(0,l.getTotalHeight)(_t.bottom),Ct=gt.yState?pt-t.$headerHeight-t.$footerHeight-gt.x-f.BORDERS:t.$totalHeight,St=z+nt-vt.top,Et=z-xt<vt.top,Dt=St>Ct-wt;Et&&Dt&&gt.xState&&(bt=1),z=Et?vt.top+xt-(xt&&!dt?1:0):z,nt=Dt?Ct-z-wt+vt.top-bt:Et?St-xt:nt}if("render"===t.$renderFrom){if(at=14,mt.left.find((function(t){return t.id===S}))&&(G=vt.left+(0,l.getTotalWidth)(mt.left.slice(0,M)),!dt)){var Ot=(0,l.getTotalWidth)(mt.left.slice(M,ct));et=et-vt.left>Ot?et-vt.left:Ot}if(_t.top.find((function(t){return t.id===x}))&&(z=vt.top+(0,l.getTotalHeight)(_t.top.slice(0,H)),!ht)){var kt=(0,l.getTotalHeight)(t.fixedRows.top.slice(H,t.topSplit));nt=nt>0?kt+nt-bt:kt}if(mt.right.find((function(t){return t===g[g.indexOf(F)+O-1]}))){var Rt=g.length,Tt=m(t),It=Rt-g.indexOf(F)-O,Mt=(Ot=It?(0,l.getTotalWidth)(mt.right.slice(0,-It)):(0,l.getTotalWidth)(mt.right),(0,l.getTotalWidth)(g.slice(M,Rt-C)));G=Tt.x>Mt?G-Tt.x+Mt:G,dt||(et=Tt.x<Mt?et-Tt.x-1:Ot-1)}if(_t.bottom.find((function(t){return t===I[I.indexOf(A)+D-1]}))){Rt=I.length,Tt=m(t);var Ht=Rt-I.indexOf(A)-D,Pt=(kt=Ht?(0,l.getTotalHeight)(_t.bottom.slice(0,-Ht)):(0,l.getTotalHeight)(t.fixedRows.bottom),(0,l.getTotalHeight)(I.slice(H,Rt-w)));z=Tt.y>Pt?z-Tt.y+Pt:z,ht||(nt=Tt.y<Pt?kt+nt-bt-(Ht?-1:bt?0:1):kt-(Ht?-1:1))}}ct===M+1&&(et-=1),M===g.length-C&&(G+=1,et-=1)}}h.push((0,r.el)("div",n({class:tt,style:{width:et,height:nt,top:z,left:G,zIndex:at},"data-dhx-col-id":S,"data-dhx-id":x},(null===(d=t.$cellState)||void 0===d?void 0:d.hideSpans)&&{"aria-hidden":"true"}),[U?(0,r.el)(".dhx_span-expand-cell-icon",{class:A.$opened?"dxi dxi-chevron-down":"dxi dxi-chevron-right","data-dhx-id":A.id,role:"button","aria-label":v(A),style:{padding:"0 0 0 ".concat(4+(0,u.getTreeCellWidthOffset)(A,!0),"px")}}):null,j]))},O=0;O<E.length;O++)D(O);return h},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,h=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==h})),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,f.getCurrFixedCols)(e,s.Split.left).length,D=(0,f.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";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(123),s=i(124),c=i(125);!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;if(!i)return!0;var o=(0,r.applyPattern)(e,n);return!(!(null==n?void 0:n.$filterOptions)||!(0,a.isDefined)(e)||e.toString()!=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,l=void 0!==o&&o,s=t.col,c=(0,r.applyPattern)(e,s),d=function(t){return(null==s?void 0:s.$filterOptions)?(0,a.isDefined)(e)&&"".concat(e)===t||"".concat(c)===t:c===t};if(Array.isArray(n)){for(var u=!1,h=function(t){if(u=l&&"string"==typeof c?c.split(", ").some((function(e){return e===n[t]})):d(n[t]))return"break"},f=0;f<n.length;f++){if("break"===h(f))break}return!n||!n.length||u}return void 0===n||d(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(13),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";Object.defineProperty(e,"__esModule",{value:!0}),e.getVisibleRowNode=e.getCellNode=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.getCellNode=function(t,e,i,n){var o=n?'.dhx_span-spans [data-dhx-col-id="'.concat(n.column,'"][data-dhx-id="').concat(n.row,'"]'):'[data-dhx-id="'.concat(e,'"] [data-dhx-col-id="').concat(i,'"]');return t.querySelector(o)},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";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(31),e),o(i(104),e),o(i(32),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(32),a=i(44),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(107),e),o(i(47),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(75),l=i(77),s=i(16),c=i(10),d=i(13),u=i(0),h=i(78),f=i(26),p=i(39),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),d.DataDriver.json,!0),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._reapplyRules(),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._reapplyRules()}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.getVisibleIndex=function(t){if(!(0,u.isId)(t)||!(0,u.isDefined)(this._pull[t])||this._pull[t].hidden)return-1;for(var e=this._range?this._range[0]:0,i=this._range?Math.min(this._range[1],this._order.length):this._order.length,n=0,o=e;o<i;o++){var r=this._order[o];if((null==r?void 0:r.id)==t)return n;(null==r?void 0:r.hidden)||n++}return-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((null==e?void 0:e.$restore)&&(null==e?void 0:e.add)||this._recalculateGroups(),!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=t||{},n=i.id,o=i.permanent;return(0,u.isEmptyObj)(t)?this._dropNonPermanentFilters():o?this._filters={}:n&&delete this._filters[n],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=t?[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(n({},t))}this._applySorters()}else this._initSortOrder&&this._resetSorting();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=o([],this._order,!0),i=0;i<e.length;i++)t.call(this,e[i],i,e)},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,e){e&&this._resetRules();var i=this.config.approximate;i&&(t=this._approximate(t,i.value,i.maxNum)),this._parse_data(t),this._reapplyRules(),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){return void 0===e&&(e=(0,u.uid)()),(0,u.isId)(e)?t==e?e:this.exists(t)?this.exists(e)?((0,c.dhxWarning)("item with ID ".concat(e," already exists")),t):this.isGrouped()?((0,c.dhxWarning)("the id can't be changed while the data is grouped"),t):(this._changeIdCore(t,e),i||this._onChange("update",e,this._pull[e],{oldId:t}),e):((0,c.dhxWarning)("item not found"),t):((0,c.dhxWarning)("the new id is not valid"),t)},t.prototype.isSaved=function(){return!this._changes.order.length},t.prototype.map=function(t){for(var e=o([],this._order,!0),i=[],n=0;n<e.length;n++)i.push(t.call(this,e[n],n,e));return i},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])&&(o.$group&&!(0,c.isTreeCollection)(this)?this._getGroupSubtree(o.id).forEach((function(t){return n._removeCore(t)})):this._removeCore(o.id),e.length===i+1&&this._recalculateGroups(),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._changeIdCore=function(t,e){var i=this._pull[t];i.id=e,this._pull[e]=i,delete this._pull[t],this._remapChanges(t,e)},t.prototype._remapChanges=function(t,e){for(var i=0,n=this._changes.order;i<n.length;i++){var o=n[i];o.id===t&&(o.id=e,o.obj&&(o.obj.id=e))}},t.prototype._onChange=function(t,e,i,o){for(var r=0,a=0,l=this._changes.order;a<l.length;a++){var s=l[a],c=this._changes.order.indexOf(s);if(s.id===e&&!s.saving&&(r+=1,c===this._changes.order.length-1||this._changes.order[c+1].id!==e)){if(s.error&&(s.error=!1),s=n(n({},s),{obj:i,status:t}),(r+=1)>10?this._changes.order.splice(c,r-10,s):this._changes.order.splice(c+1,0,s),this._loader.updateChanges(this._changes),"remove"===t&&i.$emptyRow)return;return void this._fireChange(e,t,i,o)}}this._changes.order.push({id:e,status:t,obj:n({},i),saving:!1}),this._loader.updateChanges(this._changes),this._fireChange(e,t,i,o)},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._group.isGrouped(),n=this._order.filter((function(t){return i&&(t.$group||t.$groupSummary)||e(t)}));this._initFilterOrder||(this._initFilterOrder=this._order),this._order=n}},t.prototype._resetSorting=function(){this._sortingStates=[],this._sorter=null,this._initSortOrder&&(this._order=this._initSortOrder,this._initSortOrder=null,this._initFilterOrder&&(this._initFilterOrder=null,this.filter(null,{$restore:!0},!0)))},t.prototype._dropNonPermanentFilters=function(){var t;for(var e in this._filters)(null===(t=this._filters[e].config)||void 0===t?void 0:t.permanent)||delete this._filters[e]},t.prototype._resetRules=function(){this._resetSorting(),this._dropNonPermanentFilters()},t.prototype._reapplyRules=function(){var t=this.getFilters({permanent:!0});t&&this.filter(t,{$restore:!0,add:!0},!0),this._sorter&&this._applySorters(),this._recalculateGroups()},t.prototype._recalculateGroups=function(){var t;if(this._group.isGrouped()){for(var e=new Map,i=new Map,n=0,o=this._order;n<o.length;n++){if(!(h=o[n]).$group&&!h.$groupSummary)for(var r=h.parent;(0,u.isDefined)(r)&&this._pull[r];){if(i.set(r,(i.get(r)||0)+1),this._group.hasMap(r)){var a=e.get(r)||[];a.push(h),e.set(r,a)}r=this._pull[r].parent}}for(var l=this._initFilterOrder?this._countGroupItems(this._initFilterOrder):i,s=new Set,c=0,d=this._order;c<d.length;c++){var h;if((h=d[c]).$group){var f=i.get(h.id)||0,p=this._group.recalculate(h,e.get(h.id)||[],f,l.get(h.id)||0);if(p){var g=this._pull["".concat(h.id,":summary")];g&&Object.assign(g,p)}f||s.add("".concat(h.id))}}s.size&&!(null===(t=this._group.getGroupConfig())||void 0===t?void 0:t.showEmptyGroups)&&this._dropGroups(s)}},t.prototype._getGroupSubtree=function(t){for(var e=[],i=0,n=this._initFilterOrder||this._order;i<n.length;i++)for(var o=n[i],r=o.parent;(0,u.isDefined)(r)&&this._pull[r];){if("".concat(r)==="".concat(t)){e.push(o.id);break}r=this._pull[r].parent}return e.push(t),e},t.prototype._dropGroups=function(t){var e=this;this._initFilterOrder?this._order=this._order.filter((function(e){return!t.has("".concat(e.id))&&!t.has("".concat(e.parent))})):t.forEach((function(t){e._removeCore("".concat(t,":summary")),e._removeCore(t)}))},t.prototype._countGroupItems=function(t){for(var e=new Map,i=0,n=t;i<n.length;i++){var o=n[i];if(!o.$group&&!o.$groupSummary)for(var r=o.parent;(0,u.isDefined)(r)&&this._pull[r];)e.set(r,(e.get(r)||0)+1),r=this._pull[r].parent}return e},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,!i)},t.prototype._fireChange=function(t,e,i,n){this.events.fire(d.DataEvents.change,n?[t,e,i,n]:[t,e,i])},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(38),r=i(26),a=i(39);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(76);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(null==t?void 0:t.length)?parseFloat((t.reduce((function(t,i){return t+(+i[e]||0)}),0)/t.length).toFixed(12)):null},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(null==t?void 0:t.length)?Math.min.apply(Math,t.map((function(t){return+t[e]}))):null},max:function(t,e){return(null==t?void 0:t.length)?Math.max.apply(Math,t.map((function(t){return+t[e]}))):null}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={apply:"apply",reject:"reject",aria_alert:"message",aria_confirm:"confirm",aria_reject:"reject",aria_apply:"apply"}},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";Object.defineProperty(e,"__esModule",{value:!0}),e.initEndSentinel=e.initFocusSentinel=e.exitThroughSentinel=e.restoreZoneTabindex=e.getColIdFromTarget=e.getActiveColumnId=e.hasFooter=e.isAtLastRow=e.isAtFirstRow=e.transitionFromBodyToZone=e.transitionToBody=e.isFocusInBody=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(1),r=i(5),a=i(15),l=new WeakMap;function s(t){var e=l.get(t);return e||(e={colId:null,rowIndex:null,navRowIndex:null,initialized:!1,exiting:!1},l.set(t,e)),e}function c(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"}function d(t){return t.config.columns.filter((function(t){return!t.hidden}))}function u(t,e){var i=d(t),n=i.find((function(t){return t.id===e}));if(!n)return"center";var o=n.$index,r=t.config.leftSplit||0,a=t.config.rightSplit||0;return r>0&&o<r?"left":a>0&&o>=i.length-a?"right":"center"}function h(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 f(t,e,i,n){var o,r,a,l=(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(!l)return null;for(var s=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}(l,e,u(t,i)),c=0,d=s;c<d.length;c++){var h=d[c],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=l.querySelector('.dhx_span-cell[data-dhx-id="'.concat(i,'"][data-dhx-row-index="').concat(n,'"]'));return g||(l.querySelector(".dhx_grid-".concat(e,'-cell[data-dhx-id="').concat(i,'"][data-dhx-row-index="').concat(n,'"]'))||null)}function p(t,e){var i,n,o;if("center"!==u(t,e))return!1;var a=d(t),l=t.config.leftSplit||0,s=a.findIndex((function(t){return t.id===e}));if(s<0)return!1;var c=t.getScrollState(),h=(0,r.getTotalWidth)(a.slice(l,s)),f=h+(a[s].$width||0),p=null===(o=null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.refs)||void 0===n?void 0:n.grid_body)||void 0===o?void 0:o.el,g=p?p.clientWidth:t.config.$width,v=l>0?(0,r.getTotalWidth)(a.slice(0,l)):0,_=t.config.rightSplit||0,m=g-v-(_>0?(0,r.getTotalWidth)(a.slice(-_)):0),y=c.x;return h<y?(t.scroll(h,null),!0):f>y+m&&(t.scroll(f-m,null),!0)}function g(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=c,e.getVisibleColumns=d,e.getColumnSplitSection=u,e.getZoneRowCount=h,e.findZoneCell=f,e.ensureZoneCellVisible=p,e.resolveSpanTarget=g,e.moveZoneFocus=function(t,e,i,n){var o,r;e.preventDefault();var a=e.target,s=a.getAttribute("data-dhx-id"),c=parseInt(a.getAttribute("data-dhx-row-index")||"0",10);if(s){var u=l.get(t),h=null!==(o=null==u?void 0:u.navRowIndex)&&void 0!==o?o:c,f=d(t),p=f.findIndex((function(t){return t.id===s}));if(!(p<0)){var v="footer"===i?"footer":"header",_="right"===n?1:-1,y=p;if("right"===n){var b=null===(r=f[p][v])||void 0===r?void 0:r[c];(null==b?void 0:b.colspan)>1&&(y=p+b.colspan-1)}var x=y+_;if(!(x<0||x>=f.length)){var w=g(i,f[x].id,h,f);m(t,i,w.colId,w.rowIndex,a,h)}}}},e.moveZoneFocusVertical=function(t,e,i,n){var o;e.preventDefault();var r=e.target,a=r.getAttribute("data-dhx-id"),l=parseInt(r.getAttribute("data-dhx-row-index")||"0",10);if(!a)return!1;var s=d(t),c="footer"===i?"footer":"header",u="down"===n?1:-1,f=l;if("down"===n){var p=s.findIndex((function(t){return t.id===a}));if(p>=0){var v=null===(o=s[p][c])||void 0===o?void 0:o[l];(null==v?void 0:v.rowspan)>1&&(f=l+v.rowspan-1)}}var _=f+u,y=h(t,i);if(_<0||_>=y)return!1;var b=g(i,a,_,s);return m(t,i,b.colId,b.rowIndex,r,_),!0},e.moveZoneFocusTab=function(t,e,i,n){var o,r,a=e.target,s=a.getAttribute("data-dhx-id")?a:a.closest("[data-dhx-id]");if(!s)return"forward"===n?"exit-end":"exit-start";var c=s.getAttribute("data-dhx-id"),u=parseInt(s.getAttribute("data-dhx-row-index")||"0",10),f=d(t),p=f.findIndex((function(t){return t.id===c}));if(p<0)return"forward"===n?"exit-end":"exit-start";var v="footer"===i?"footer":"header",_=h(t,i),y="forward"===n?1:-1,b=l.get(t),x=null!==(o=null==b?void 0:b.navRowIndex)&&void 0!==o?o:u,w=p;if("forward"===n){var C=null===(r=f[p][v])||void 0===r?void 0:r[u];(null==C?void 0:C.colspan)>1&&(w=p+C.colspan-1)}for(var S=w+y,E=x,D=f.length*_,O=0;O<D;O++){if("forward"===n&&S>=f.length){if(++E>=_)return"exit-end";S=0}else if("backward"===n&&S<0){if(--E<0)return"exit-start";S=f.length-1}var k=g(i,f[S].id,E,f);if(k.colId!==c||k.rowIndex!==u){if(m(t,i,k.colId,k.rowIndex,a,E))return e.preventDefault(),"moved";S+=y}else S+=y}return"forward"===n?"exit-end":"exit-start"},e.isAtFirstColumn=function(t){var e,i=d(t);if(0===i.length)return!0;var n=i[0].id;if(t.config.blockSelection){var o=null===(e=t.range)||void 0===e?void 0:e.getRange();if(o)return o.xStart==n}else{var r=(0,a.getCellSource)(t).getCell();if(r)return r.column.id==n}return!0},e.isContentCell=function(t){return t.classList.contains("dhx_grid-custom-content-cell")};var v=new WeakMap;function _(t){var e=t.querySelector("input, select");if(e){e.setAttribute("tabindex","-1");var i=v.get(e);i&&(e.removeEventListener("keydown",i),v.delete(e))}t.setAttribute("tabindex","0"),t.focus()}function m(t,e,i,n,r,a){r&&r.setAttribute("tabindex","-1");var s=p(t,i),c=f(t,e,i,n);if(c)c.setAttribute("tabindex","0"),c.focus();else{if(!s)return!1;var d=document.activeElement;(0,o.awaitRedraw)().then((function(){if(document.activeElement===d){var o=f(t,e,i,n);o&&(o.setAttribute("tabindex","0"),o.focus())}}))}var u=l.get(t);return u&&(u.colId=i,u.rowIndex=n,u.navRowIndex=null!=a?a:n),!0}function y(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")}function b(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}))}}e.activateContentCell=function(t){var e=t.querySelector("input, select");if(e){e.setAttribute("tabindex","0"),e.focus();var i=v.get(e);i&&e.removeEventListener("keydown",i);var n=function(i){"Escape"===i.key&&(i.preventDefault(),e.removeEventListener("keydown",n),v.delete(e),_(t))};e.addEventListener("keydown",n),v.set(e,n)}},e.deactivateContentCell=_,e.triggerHeaderSort=function(t,e,i){var n,o,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,r.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===(o=t._sortingStates)||void 0===o?void 0:o.length));t._sort(l,null==u?void 0:u.sortAs,h),m(t,"header",l,s)}}}},e.setZoneCellFocus=m,e.isFocusInBody=function(t){var e,i,n,o=document.activeElement;if(!o||o===document.body)return!0;var r=(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());return!!(null==r?void 0:r.contains(o))&&"body"===c({target:o})},e.transitionToBody=function(t,e,i){var n;if(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,r.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&&((0,a.getCellSource)(t).setCell(n,e),t.scrollTo(n,e),(0,a.getCellSource)(t).restoreFocus()),y(t)||b(t,n,e),!y(t))){var l=document.activeElement;(0,o.awaitRedraw)().then((function(){document.activeElement!==l||y(t)||b(t,n,e)}))}},e.transitionFromBodyToZone=function(t,e,i,n){var o=d(t);if(0!==o.length){void 0===n&&(n=h(t,e)-1);var r=g(e,i,n,o);m(t,e,r.colId,r.rowIndex,void 0,n)}},e.isAtFirstRow=function(t){var e;if(t.config.blockSelection){var i=null===(e=t.range)||void 0===e?void 0:e.getRange();if(i)return i.yStart==t.data.getId(0)}else{var n=(0,a.getCellSource)(t).getCell();if(n)return n.row.id==t.data.getId(0)}return!0},e.isAtLastRow=function(t){var e;if(0===t.data.getLength())return!0;var i=t.data.getId(t.data.getLength()-1);if("tree"===t.config.type&&(i=(0,r.getLastChild)(i,t.data)||i),t.config.blockSelection){var n=null===(e=t.range)||void 0===e?void 0:e.getRange();if(n)return n.yEnd==i}else{var o=(0,a.getCellSource)(t).getCell();if(o)return o.row.id==i}return!0},e.hasFooter=function(t){return h(t,"footer")>0},e.getActiveColumnId=function(t){var e;if(t.config.blockSelection){var i=null===(e=t.range)||void 0===e?void 0:e.getRange();if(i)return i.xStart}else{var n=(0,a.getCellSource)(t).getCell();if(n)return n.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.exitThroughSentinel=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)return!1;var a=r.querySelector("forward"===e?".dhx_grid-focus-sentinel--end":".dhx_grid-focus-sentinel");if(!a)return!1;var l=s(t);return l.exiting=!0,a.focus({preventScroll:!0}),l.exiting=!1,!0},e.initFocusSentinel=function(t){var e,i,n,o=s(t);if(!o.initialized){var r=(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(r){var a=r.querySelector(".dhx_grid-focus-sentinel");a&&(a.addEventListener("focus",(function(){if(o.exiting)o.exiting=!1;else{var e=d(t);if(0!==e.length){var i=h(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),m(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");if(r&&!r.getAttribute("data-dhx-initialized")){var a=s(t);r.addEventListener("focus",(function(){if(a.exiting)a.exiting=!1;else{var e=d(t);if(0!==e.length){var i=h(t,"footer");if(i>0){var n=e[e.length-1].id;m(t,"footer",n,i-1)}else{h(t,"header")>0&&m(t,"header",e[0].id,0)}}}})),r.setAttribute("data-dhx-initialized","true")}}}},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(2),c=i(11),d=i(32),u=i(102),h=i(103),f=i(6),p=i(31),g=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 f.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(d.LayoutEvents.beforeHide,[this.id])&&(this.config.hidden=!0,this._resetCellsSize(),this._parent&&this._parent.paint&&this._parent.paint(),this.events.fire(d.LayoutEvents.afterHide,[this.id]))},e.prototype.show=function(){this.events.fire(d.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(d.LayoutEvents.afterShow,[this.id]))},e.prototype.expand=function(){this.events.fire(d.LayoutEvents.beforeExpand,[this.id])&&(this.config.collapsed=!1,this._checkNextSize()||this._checkNextSize(this._getAnyFlexCell()),this.events.fire(d.LayoutEvents.afterExpand,[this.id]),this.paint())},e.prototype.collapse=function(){this.events.fire(d.LayoutEvents.beforeCollapse,[this.id])&&(this._saveHeaderSize(),this.config.collapsed=!0,this._checkNextSize()||this._checkNextSize(this._getAnyFlexCell()),this.events.fire(d.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 c.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,o,s;if(this._saveTheme(),null===this.config&&(this.config={}),!this.config.hidden){var c,d=this.config.$fieldset,u=this._calculateStyle(),h=(0,a.isDefined)(this.config.padding)?isNaN(Number(this.config.padding))?{padding:this.config.padding}:{padding:"".concat(this.config.padding,"px")}:"",f=this.config.full||this.config.html?u:r(r({},u),h),p=this._checkProgress()?this._getProgressBar():null;if(!this.config.html)if(this._ui){var g=this._ui.getRootView();g.render&&(g=(0,l.inject)(g)),c=[g]}else c=t||null;var v=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,_={};if(this.config.on)for(var m in this.config.on)_["on"+m]=this.config.on[m];var y="",b=this.config.cols||this.config.rows;if(this.config.type&&b)switch(this.config.type){case"line":y=" dhx_layout-line";break;case"wide":y=" dhx_layout-wide";break;case"space":y=" dhx_layout-space"}var x=d?(0,l.el)("fieldset.dhx_form-fieldset",{class:this.config.$disabled?" dhx_form-fieldset--disabled":"",style:h,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(c))]):this.config.full?[this._renderHeader(),this.config.collapsed?null:(0,l.el)("div",{style:h,class:this._getCss(!0)+" dhx_layout-cell-content"+(this.config.type?y:"")},this.config.html?[(0,l.el)("div",{".innerHTML":this.config.html,class:"dhx_layout-cell dhx_layout-cell-inner_html"})]:c)]:!this.config.html||this.config.rows&&this.config.cols&&this.config.views?c:[this.config.collapsed?null:(0,l.el)(".dhx_layout-cell-content",{style:h},[(0,l.el)(".dhx_layout-cell-inner_html",{".innerHTML":this.config.html})])],w=(0,l.el)("div",r(r(((e={_key:this.config.id||this._uid,_ref:this._uid})["aria-label"]=this.config.id&&(null===(n=null===(i=this._parent)||void 0===i?void 0:i.config)||void 0===n?void 0:n.views)?"tab-content-"+this.config.id:null,e["data-cell-id"]=null!==(o=this.config.id)&&void 0!==o?o:null,e["data-dhx-theme"]=null!==(s=this._theme)&&void 0!==s?s:null,e),_),{class:this._getCss(!1)+(this.config.css?" "+this.config.css:"")+(this.config.full&&!d?" dhx_layout-cell--full":"")+(this.config.collapsed?" dhx_layout-cell--collapsed":"")+(this.config.resizable?" dhx_layout-cell--resizable":"")+(this.config.type&&!this.config.full?y:""),style:d?u:f}),x||p?[].concat(x,p):null);return v?[].concat(w,v):w}},e.prototype._renderHeader=function(){return(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":""),_ref:this._uid+"_header",style:this._getHeaderStyle(),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._renderCellHeaderContent(),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"})])},e.prototype._isRotatedHeader=function(){return Boolean(this.config.collapsed&&this._isXDirection())},e.prototype._getHeaderStyle=function(){var t=this.config.headerHeight,e={height:t};return this._isRotatedHeader()&&(e.minWidth=t||this._headerSize||h.DEFAULT_CELL_HEADER_WIDTH),e},e.prototype._saveHeaderSize=function(){var t,e,i=null===(e=null===(t=this._parent)||void 0===t?void 0:t.getRefs(this._uid+"_header"))||void 0===e?void 0:e.el;(null==i?void 0:i.offsetHeight)&&(this._headerSize=i.offsetHeight)},e.prototype._renderCellHeaderContent=function(){var t=this.config.header;if(!t)return null;if("function"!=typeof t)return(0,l.el)("h3.dhx_layout-cell-header__title",t);var e=t(this.config),i="".concat(this._uid,"_header");if(e&&"string"!=typeof e){var n=e.getRootView?e.getRootView():e;return n.render&&(n=(0,l.inject)(n)),(0,l.el)(".dhx_layout-cell-header__custom.dhx_layout-cell-header__custom--widget",{_key:i},[n])}return(0,l.el)(".dhx_layout-cell-header__custom",{_key:i,".innerHTML":e||""})},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(e)},collapse:function(){t.config.collapsable&&t.collapse()},expand:function(){t.config.collapsable&&t.expand()},toggle:function(e){t.config.collapsable&&(e&&(0,s.locateNodeByClassName)(e,"dhx_layout-cell-header__custom")||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 c=function(e){var i;return parseInt(null===(i=t.config[e])||void 0===i?void 0:i.toString())},u=c(o?"maxWidth":"maxHeight"),h=c(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(d.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(d.LayoutEvents.afterResizeEnd,[t.id])},o=function(i){if(i.targetTouches&&i.preventDefault(),3!==i.which&&(e.isActive&&n(i),t.events.fire(d.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(),c=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,u.getMarginSize)(t.getParent().config),e.range=(0,u.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?c.width:c.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&&(i+=this._getCellSize(n._cells[a]));return i},e.prototype._getCellSize=function(t){var e,i=this._isXDirection(),n=null===(e=t.getCellView())||void 0===e?void 0:e.el,o=n&&(i?n.offsetWidth:n.offsetHeight);return o||(i?h.DEFAULT_CELL_HEADER_WIDTH:Number(t.config.headerHeight)||h.DEFAULT_CELL_HEADER_HEIGHT)},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 p.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}(c.View);e.Cell=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.ProCell=void 0;var a=i(0),l=i(1),s=i(46),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,o,s;if(this._saveTheme(),null===this.config&&(this.config={}),!this.config.hidden){var c,d=this.config.$fieldset,u=this._calculateStyle(),h=(0,a.isDefined)(this.config.padding)?isNaN(Number(this.config.padding))?{padding:this.config.padding}:{padding:"".concat(this.config.padding,"px")}:"",f=this.config.full||this.config.html?u:r(r({},u),h),p=this._checkProgress()?this._getProgressBar():null;if(!this.config.html)if(this._ui){var g=this._ui.getRootView();g.render&&(g=(0,l.inject)(g)),c=g?[this.scrollView.render(g)]:g||null}else c=t?this.scrollView.render([t]):t||null;var v=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,_={};if(this.config.on)for(var m in this.config.on)_["on"+m]=this.config.on[m];var y="",b=this.config.cols||this.config.rows;if(this.config.type&&b)switch(this.config.type){case"line":y=" dhx_layout-line";break;case"wide":y=" dhx_layout-wide";break;case"space":y=" dhx_layout-space"}var x=(0,l.el)(".dhx_layout-cell-content",{_key:"".concat(this._uid,"_html"),style:h},[(0,l.el)(".dhx_layout-cell-inner_html",{".innerHTML":this.config.html})]),w=d?(0,l.el)("fieldset.dhx_form-fieldset",{class:this.config.$disabled?" dhx_form-fieldset--disabled":"",style:h,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(c))]):this.config.full?[this._renderHeader(),this.config.collapsed?null:(0,l.el)("div",{style:h,class:this._getCss(!0)+" dhx_layout-cell-content"+(this.config.type?y:"")},this.config.html?[(0,l.el)("div",{".innerHTML":this.config.html,class:"dhx_layout-cell dhx_layout-cell-inner_html"})]:c)]:!this.config.html||this.config.rows&&this.config.cols&&this.config.views?c:[this.config.collapsed?null:this.scrollView&&this.scrollView.config.enable&&this.getParent()?this.scrollView.render([x],this._uid):x],C=(0,l.el)("div",r(r(((e={_key:this.config.id||this._uid,_ref:this._uid})["aria-label"]=this.config.id&&(null===(n=null===(i=this._parent)||void 0===i?void 0:i.config)||void 0===n?void 0:n.views)?"tab-content-"+this.config.id:null,e["data-cell-id"]=null!==(o=this.config.id)&&void 0!==o?o:null,e["data-dhx-theme"]=null!==(s=this._theme)&&void 0!==s?s:null,e),_),{class:this._getCss(!1)+(this.config.css?" "+this.config.css:"")+(this.config.full&&!d?" dhx_layout-cell--full":"")+(this.config.collapsed?" dhx_layout-cell--collapsed":"")+(this.config.resizable?" dhx_layout-cell--resizable":"")+(this.config.type&&!this.config.full?y:""),style:d?u:f}),w||p?[].concat(w,p):null);return v?[].concat(C,v):C}},e}(i(44).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(52),e),o(i(118),e),o(i(57),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(113),u=i(11),h=i(7),f=i(30),p=i(53),g=i(33),v=i(117),_=i(35),m=i(19),y=i(56),b=i(57);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=i.ariaLabel,v=n?null:this.data.getItem(this.list.selection.getId()),_=!this.list.selection.getId()||"object"==typeof this.list.selection.getId()&&0===this.list.selection.getId().length,m=(0,c.getLabelStyle)(this.config),y=!this.config.multiselection&&(this.config.readOnly||!this.popup.isVisible()),x=y&&this.config.htmlEnable&&this.config.template,w=y&&((null==v?void 0:v.icon)||(null==v?void 0:v.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):"")},[m?(0,l.el)("label.dhx_label.dhx_combobox__label",{style:m.style,class:h?"dhx_label--with-help":"",onclick:this._handlers.oninputclick},h?[(m.label||s)&&(0,l.el)("span.dhx_label__holder",m.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)})]:m.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",[(x||w)&&v?(0,l.el)("div.dhx_combobox-input__template",{".innerHTML":x?this.config.template(v):null},w?[(0,e.$template)(v)]: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:_&&p?p:void 0,value:f&&v?this._getItemText(v):this._state.value,readOnly:f||d,required:s,role:"combobox","aria-label":g||(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(54),e),o(i(116),e),o(i(55),e),o(i(34),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(7),c=i(1),d=i(27),u=i(19),h=i(11),f=i(55),p=i(2),g=i(34),v=i(114);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,o){o&&(0,l.isId)(o.oldId)&&o.oldId===n._focus&&(n._focus=t),"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(19),o=i(7),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)})),this._data.events.on(o.DataEvents.change,(function(t,e,i,o){if(o&&(0,r.isId)(o.oldId)){var a=n._selected.indexOf(o.oldId);-1!==a&&(n._selected[a]=t),o.oldId===n._nextSelection&&(n._nextSelection=t)}}))}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(35);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(22),s=i(59),c=i(5),d=i(8);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:"presentation"}),_.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 I=n(n({},t),{$positions:n(n({},y),{xStart:0,xEnd:f})}),M=(0,l.getCells)(n(n({},I),{filteredColumns:p,$renderFrom:E})),H=e.sticky,P=n(n({},e),{name:"footer",position:"bottom"}),F=(0,s.getRows)(n(n({},I),{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),L=e.wrapper.width-x.y-d.BORDERS,j=h?g<L?g-D:L-D:0,V={position:"absolute",left:j,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},N=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:V},{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:j,height:W,paddingTop:_,overflow:"hidden",width:D},role:"presentation","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([],M,!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}})]),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.getFixedDataRows=e.getFixedRows=e.getFixedSpans=e.getRows=void 0;var r=i(1),a=i(15),l=i(5),s=i(3),c=i(22),d=i(58),u=i(0),h=i(8),f=i(4),p=i(12);function g(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 v(t,e,i,n){return{onclick:[g,n,t,i,s.GridEvents[e+"CellClick"]],onmouseover:[g,n,t,i,s.GridEvents[e+"CellMouseOver"]],onmousedown:[g,n,t,i,s.GridEvents[e+"CellMouseDown"]],ontouchstart:[g,n,t,i,s.GridEvents[e+"CellMouseDown"]],ondblclick:[g,n,t,i,s.GridEvents[e+"CellDblClick"]],oncontextmenu:[g,n,t,i,s.GridEvents[e+"CellRightClick"]],ontouchmove:[g,n,t,i,s.GridSystemEvents[e+"CellTouchMove"]],ontouchend:[g,n,t,i,s.GridSystemEvents[e+"CelltouchEnd"]]}}function _(t,e){return("header"===e?t.$headerHeightMap:t.$footerHeightMap)||[]}function m(t,e){return("header"===e?t.$headerAutoHeightMap:t.$footerAutoHeightMap)||[]}function y(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 b(t,e){if(!t.data||!t.filteredColumns)return[];var i,o=e.name,a="footer"===o?(0,h.getHeaderRowCount)(t)+(t.$data||t.data).length:0,s=_(t,o),c=m(t,o),d=t.$positions,u=t.currentColumns,g=function(t,e){var i=t.map((function(t){return t[e]||[{}]}));return(0,l.transpose)(i)}(u,o),b=1;return g.map((function(g,_){var m=s[_],x=c[_],w=function(t,e){return t.slice(e).reduce((function(t,e){return t+(e||0)}),0)}(s,_);return(0,r.el)(".dhx_".concat(o,"-row"),n({style:{height:m}},{role:"row","aria-rowindex":a+_+1}),g.map((function(a,s){var c,g=a.css||"",C=u[s],S=d.xStart+s+1,E=(0,l.isHtmlEnable)(t,C,a),D="dxi dxi-arrow-up dhx_grid-sort-icon",O="none",k=a.text;if("function"==typeof a.text){var R=n(n({},t.commonSummary),t.colSummary[C.id]);"string"==typeof C.summary&&"count"!==C.summary&&(R[C.summary]=(0,f.applyPattern)(R[C.summary],C)),k=a.text(R)}var T=t.sort.findIndex((function(t){return t.by==C.id})),I=t.sort[T];I&&!a.content&&(D+=" dhx_grid-sort-icon--".concat(I.dir),g+=" dhx_grid-".concat(o,"-cell--sorted "),O="asc"===I.dir?"ascending":"descending");var M=(0,l.isSortable)(t,C)&&a.text&&"footer"!==o&&!1!==a.headerSort;M&&(g+=" dhx_grid-header-cell--sortable");var H=!(!a.text||a.colspan>1)&&(M||!!I),P=0===s?"dhx_first-column-cell":"",F=s===u.length-1?"dhx_last-column-cell":"";a.content||(a.align?g+=" dhx_grid-header-cell--align_".concat(a.align," "):g+=" dhx_grid-header-cell--".concat("number"===C.type||"date"===C.type?"align_right":"align_left"," ")),g+="".concat(P," ").concat(F);var A=void 0!==C.resizable?C.resizable:t.resizable;if(A){var $=t.rightSplit&&t.$scrollBarWidth.xState&&t.fixedColumns.right.includes(C);A=(0,r.el)("div",{class:"dhx_resizer_grip_wrap","aria-hidden":"true"},[(0,r.el)("div",{class:"dhx_resizer_grip"+($?" dhx_resizer_grip--left":" dhx_resizer_grip--right"),dhx_resized:C.id,style:{height:w}},[(0,r.el)("div",{class:"dhx_resizer_grip_line"})])]);var L=C.header&&(null===(c=C.header[0])||void 0===c?void 0:c.colspan);L&&(i=L,b=1),i&&b!==i&&(0===_&&(A=null),b++),"footer"===o&&(A=null)}a.align&&(g+=" dhx_align-".concat(a.align)),e.footerAtBottom&&(g+=" 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||a.content?n.role="gridcell":(n.role="columnheader",H&&(n["aria-sort"]=i)),n};if(a.content)return(0,r.el)(".dhx_grid-".concat(o,"-cell.dhx_grid-custom-content-cell"),n(n({class:g.trim(),"data-dhx-id":C.id,"data-dhx-text-id":a.id,_key:C.id,style:{width:C.$width,height:"footer"===o?m+h.BORDERS/2+"px":m+"px"}},v(C,o,t,a)),j(o,S,O)),[y(a,C,t,0,""),A||null]);var V="dhx_grid-header-cell-text_content";return x&&(V+=" dhx_grid-header-cell-text_content-auto-height"),(0,r.el)(".dhx_grid-".concat(o,"-cell"),n(n({class:g.trim(),"data-dhx-id":C.id,"data-dhx-text-id":a.id,_key:C.id,style:{width:C.$width,height:"footer"===o?m+h.BORDERS/2+"px":m+"px"}},v(C,o,t,a)),j(o,S,O)),[(0,r.el)("div.dhx_grid-header-cell-text",{role:"presentation"},[(0,r.el)("span",n(n({class:V},function(t,e){return M?{role:"button","aria-label":(0,p.getLocaleString)("aria_sortBy",{column:"".concat(e)})}:{}}(0,k)),{".innerHTML":E?k:null}),E?null:k),A||null]),M&&(0,r.el)("div.dhx_grid-sort",[(0,r.el)("div",{class:D,"aria-hidden":"true"}),I&&t.sort.length>1&&(0,r.el)("div.dhx_grid-sort-counter",{"aria-hidden":"true"},[T+1])||null])])})))}))}function x(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,g=_(t,p),b=m(t,p),x=0;return d.map((function(d,_){x=0;var m=g[_],w=b[_],C=function(t,e){return t.slice(0,e).reduce((function(t,e){return t+(e||0)}),0)}(g,_);return(0,r.el)(".dhx_span-row",{class:"dhx_header-row","aria-hidden":"true"},d.map((function(d,b){var S,E=c[b];if(i===s.Split.right&&0===b&&!(d.colspan>1)){var D=(0,l.transpose)(o.map((function(t){return t[e.name]||[]})));t:for(var O=0;O<D[_].length;O++){var k=D[_][O];if(k.colspan>1)for(var R=o.slice(O,O+k.colspan),T=0;T<R.length;T++)if(R[T].id===E.id){S={cell:k,col:o[O],widthBefore:(0,a.getWidth)(R,T,0),isLastCol:O+k.colspan>=o.length};break t}}}var I=(null==S?void 0:S.cell)||d,M=(null==S?void 0:S.col)||E,H=(0,l.isHtmlEnable)(t,E,d);x+=M.hidden?0:M.$width;var P=0===b?"dhx_first-column-cell":"",F=i?1:t.fixedColumns.right.length+1,A=d.colspan>1&&(0,a.getReducedColspan)(o,E.id,d.colspan),$=(null==S?void 0:S.isLastCol)||b===c.length-F||(A||1)+(b-1)>=c.length-F?"dhx_last-column-cell":"",L=m;if(I.rowspan>1){for(var j=I.rowspan-1;j>0;)L+=g[_+j],j--;L-=1}var V=(0,l.isSortable)(t,M)&&I.rowspan>1&&I.text&&"footer"!==e.name&&!1!==I.headerSort,N="dxi dxi-arrow-up dhx_grid-sort-icon",W=t.sort.findIndex((function(t){return t.by==M.id})),z=t.sort[W];z&&!I.content&&(N+=" 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||I.colspan>1?"dhx_align-left":"dhx_align-right",G="dhx_grid-".concat(p,"-cell ").concat(P," ").concat($," ").concat(I.rowspan>1?"dhx_span-cell__rowspan":""," ").concat(I.align?"dhx_align-".concat(I.align):B," ").concat(I.css?I.css:"");!M.$target&&V&&(G+=" dhx_grid-header-cell--sortable"),I.content||(I.align?G+=" dhx_grid-header-cell--align_".concat(I.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=I.text;if("function"==typeof I.text){var U=n(n({},t.commonSummary),t.colSummary[E.id]);"string"==typeof E.summary&&"count"!==E.summary&&(U[E.summary]=(0,f.applyPattern)(U[E.summary],E)),Y=I.text(U)}var X=null;I.content&&((X=y(I,M,t,0,G)).attrs.style=n(n({},X.attrs.style),{width:"100%",borderRight:"0"}));var q="";x-M.$width>0&&(q="var(--dhx-border)");var K="dhx_grid-header-cell-text_content";w&&(K+=" dhx_grid-header-cell-text_content-auto-height");var Z=(0,r.el)("span",{class:K,".innerHTML":H?Y:null},H?null:Y);return I.colspan>1||I.rowspan>1?(0,r.el)(".dhx_span-cell",n({style:{width:(0,a.getWidth)(o,I.colspan,(0,u.findIndex)(o,(function(t){return t.id===M.id}))),height:L,left:x-M.$width-((null==S?void 0:S.widthBefore)||0),borderLeft:q,top:C},class:G.trim(),"data-dhx-id":M.id,"data-dhx-text-id":I.id,tabindex:-1,"data-dhx-row-index":_},v(M,p,t,I)),[X||I.rowspan>1?(0,r.el)("div.dhx_grid-header-cell-text",{role:"presentation"},[Z]):Z,V&&(0,r.el)("div.dhx_grid-sort",[(0,r.el)("div",{class:N,"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&&A&&b+A>c.length||S?(0,r.el)(".dhx_grid__cols-border--frozen",{role:"presentation",style:{left:((null==S?void 0:S.widthBefore)||(0,a.getWidth)(c,c.length-b,b))-h.BORDERS/2-(b&&i===s.Split.left?1:0)}}):null]):null})).filter((function(t){return t})))}))}e.getRows=b,e.getFixedSpans=x,e.getFixedRows=function(t,e,i){var a,l=t.leftSplit,s=t.$totalWidth,c=b(t,e),d=x(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?b(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,_=((a={position:"sticky"})[e.position]=0,a);e.sticky||(_.left=-t.scroll.left,v=-t.scroll.left,_.position="relative");var m=null;return"header"===e.name&&(m=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({},_),{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)]),m,(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=w?Math.max(0,v.length-C.length):0,D=(0,c.getCells)(n(n({},t),{data:C,$renderFrom:S,$rowIndexShift:E,$positions:n(n({},g),{yStart:0,yEnd:w?p:u})})),O=C.reduce((function(t,e){return t+(0,f.getTotalRowHeight)(e)}),0),k=(0,c.getSpans)(n(n({},t),{$renderFrom:S,data:v}),w?s.Split.bottom:s.Split.top),R=(0,l.getTotalHeight)(t.fixedRows.bottom),T=function(o){return(0,d.getFixedCols)(n(n({},t),{headerHeight:0,data:C,$renderFrom:S,$rowIndexShift:E,scroll:n(n({},t.scroll),{top:-1}),$positions:n(n({},g),{yStart:0,yEnd:w?p:u}),$totalHeight:O,$data:v}),n(n({},e),{shifts:n(n({},e.shifts),{y:0})}),o,i)||[]},I=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+O):(M.top=w?_+y+b<e.wrapper.height-x.x-h.BORDERS?_+y-R+h.BORDERS/2:e.wrapper.height-R-b-h.BORDERS/2-x.x:y,M.height=O>e.wrapper.height?e.wrapper.height:O),[(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([],D,!0),[k&&(0,r.el)(".dhx_span-spans",{role:"presentation"},k)],!1))])],I,!0),[t.bottomSplit?(0,r.el)(".dhx_grid__rows-border--frozen",{role:"presentation"}):null],!1))]}}},function(t,e,i){i(61),i(62),i(63),i(64),i(65),i(66),t.exports=i(70)},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(68),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(24))},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(24),i(69))},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(71),i(72);var n=i(73);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(7);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(84);Object.defineProperty(e,"Grid",{enumerable:!0,get:function(){return a.Grid}});var l=i(14),s=i(35),c=i(132),d=i(20),u=window;e.i18n=u.dhx&&u.dhx.i18n?u.dhx.i18n:{},e.i18n.setLocale=c.setLocale,e.i18n.calendar=e.i18n.calendar||l.locale,e.i18n.combobox=e.i18n.combobox||s.default,e.i18n.grid=e.i18n.grid||d.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 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 L=1,j=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|=L}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&L)===L&&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&L)===L)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&L))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}Lt(t,n,o,r);break}}function Lt(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 jt(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(!jt(r)&&t.tag===r.tag&&t.type===r.type&&t.key===r.key&&(t.flags&~L)==(r.flags&~L))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&j)===j,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&&jt(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:j,DEEP_REMOVE:L,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(13),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,!0):[]})).catch((function(t){i._parent.events.fire(a.DataEvents.loadError,[t])}))},e.prototype.parse=function(t,e,i){var s=this;if(void 0===e&&(e=a.DataDriver.json),void 0===i&&(i=!1),"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 c=t.total_count-1,d=t.from;if(t=t.data,0!==this._parent.getLength())return t.forEach((function(t,e){var i=d+e,a=s._parent.getId(i);if((0,o.isId)(a)){var c=s._parent.getItem(a);if(c&&c.$empty){var u=t.id||c.id;(0,l.isDefined)(t.id)&&s._parent.changeId(a,u,!0),s._parent.update(u,n(n({},t),{$empty:void 0}),!0)}}else(0,r.dhxWarning)("item not found")})),this._parent.events.fire(a.DataEvents.afterLazyLoad,[d,t.length]),this._parent.events.fire(a.DataEvents.change),t;for(var u=[],h=0,f=0;h<=c;h++)h>=d&&h<=d+t.length-1?(u.push(t[f]),f++):u.push({$empty:!0});t=u}return this._parent.getInitialData()&&this._parent.removeAll(),this._parent.$parse(t,i),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(39),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(35),c=i(16),d=i(10),u=i(13);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._reapplyRules(),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;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=t?[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 l=this._sortingStates.findIndex((function(e){return e.by==t.by}));-1!==l?this._sortingStates[l].dir=t.dir:this._sortingStates.push(r({},t))}this._applySorters()}else this._initSortOrder&&this._resetSorting();i||(this._reapplyRules(),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=a([],this._children[e],!0),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=a([],this._children[e],!0),r=0;r<o.length;r++)if(n.push(t.call(this,o[r],r,this._children)),i){var l=this.map(t,o[r].id,i);n=n.concat(l)}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),e===this._order&&(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,t[o].multi):-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._resetSorting=function(){var t=this;this._sortingStates=[],this._sorter=null,this._initSortOrder&&(this._children={},this._order=[],this._initSortOrder.forEach((function(e){return t._parseItem(e)})),this._initSortOrder=this._initChildren=null,this._initFilterOrder&&(this._initFilterOrder=null,this.filter(null,{$restore:!0},!0)))},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(79),l=i(13),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 L=r.data.getItem(t.id);a.data.parse([n({},L)]),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(16),a=i(0),l=i(25),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(18),r=i(13),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(27),h=i(11),f=i(7),p=i(83),g=i(4),v=i(12),_=i(15),m=i(5),y=i(89),b=i(90),x=i(3),w=i(91),C=i(8),S=i(23),E=i(123),D=i(124),O=i(21),k=i(128),R=i(129),T=i(130),M=i(22),I=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 y.PrefixSums,o._colWidths=new y.PrefixSums,o._rowHeightsRebuild=!0,o._observedEl=null,o._liveRegion=null,o._commonSummary={},o._colSummary={},o.version="9.3.12",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,S.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 b.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.config.keyNavigation||o.config.selection||o.config.blockSelection||o.config.rangeSelection||o.config.clipboard||(o.$activeCell=new R.ActiveCell(o,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,e,i,n;this._destructed=!0,null===(t=this.getRootNode())||void 0===t||t.removeEventListener("focusin",this._tooltipFocusHandler),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),this._cachedSizes=null,this._observedEl=null,this._rowHeights=null,this._colWidths=null,null===(i=null===(e=this._liveRegion)||void 0===e?void 0:e.parentNode)||void 0===i||i.removeChild(this._liveRegion),this._liveRegion=null,this._destroyContent(),null===(n=this.config.$subRowCells)||void 0===n||n.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.$activeCell&&this.$activeCell.destructor(),this.export=this.content=this.selection=this.$activeCell=null,this._tooltipFocusHandler=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,m.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(x.GridEvents.beforeColumnShow,[e])&&(this._showColumn(e),this.events.fire(x.GridEvents.afterColumnShow,[e]))},e.prototype.hideColumn=function(t){var e=this.getColumn(t);e&&!e.hidden&&this.events.fire(x.GridEvents.beforeColumnHide,[e])&&(this._hideColumn(e),this.events.fire(x.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(x.GridEvents.beforeRowShow,[i])&&(this.data.update(e,{hidden:!1}),this._rowHeightsRebuild=!0,this._checkFilters(!0),this.paint(),this.events.fire(x.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(x.GridEvents.beforeRowHide,[i])&&(this.data.update(e,{hidden:!0}),this._rowHeightsRebuild=!0,this._checkFilters(!0),this._checkSelectFilterValue(),this.paint(),this.events.fire(x.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=i.$footerHeight,u=r.filter((function(t){return!t.hidden})),h=this.data.getRawData(0,-1,null,2),f=u.findIndex((function(t){return t.id==e})),p=h.findIndex((function(e){return e.id==t}));if((0,d.isDefined)(f)&&(0,d.isDefined)(p)){var v=this.getScrollState(),m=(0,_.getCellSource)(this).getCell(),y=m&&r.findIndex((function(t){return t.id==m.column.id})),b=m&&h.findIndex((function(t){return t.id==m.row.id})),w=(0,C.getCurrFixedCols)(this.config,x.Split.left).length,S=(0,C.getCurrFixedCols)(this.config,x.Split.right).length,E=w&&y<w,D=S&&y>=r.length-S,O=n&&b<n,k=o&&b>=h.length-o,R=(0,g.colsWidth)(this.config,u,0,f),T=(0,g.rowsHeight)(this.config,h,0,p),M=(0,g.getTotalRowHeight)(h[p]);if(w){var I=(0,g.colsWidth)(this.config,u,0,w);(!E&&!D&&f<y||R-v.x-I<0)&&(R-=I)}if(S){var H=(0,g.colsWidth)(this.config,u,u.length-S,u.length);(!E&&!D&&f>y||a+v.x-R-u[f].$width-H<0)&&(R+=H)}if(n){var P=(0,g.rowsHeight)(this.config,h,0,n);(!O&&!k&&p<b||T-v.y-P<0)&&(T-=P)}if(o){var F=(0,g.rowsHeight)(this.config,h,h.length-o,h.length);(!O&&!k&&p>b||l+v.y-s-T-M-F<0)&&(T+=F)}var A=a+v.x,$=l+v.y-s-c,L=r[f].$width,j=T-v.y,N=R-v.x,V=T+2*M+18-$,W=R+L+18-A,z=j>=0&&V<0?0:j<0?j:V,B=N>=0&&W<0?0:N<0?N:W;this.scroll(B+v.x,z+v.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,C.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-C.BORDERS}}return{x:c,y:u,height:(null==a?void 0:a.rowspan)>1?(0,_.getSpanHeight)(r,a):(0,g.getTotalRowHeight)(r[s])||0,width:(null==a?void 0:a.colspan)>1?(0,_.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,O.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(x.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.$activeCell?this.$activeCell.setCell(t.toString(),e.toString()):this.selection.config.disabled||this.selection.setCell(t.toString(),e.toString()),this.paint(),this.events.fire(x.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.announce=function(t){if(!this._destructed){var e=this._getLiveRegion();if(e)if(t){var i=t.replace("​","");e.textContent=e.textContent===i?i+"​":i}else e.textContent=""}},e.prototype._getLiveRegion=function(){if(this._liveRegion)return this._liveRegion;var t=this.getRootNode(),e=t&&t.parentNode;if(!e)return null;var i=document.createElement("div");return i.className="dhx_grid-live-region dhx_visually-hidden",i.setAttribute("role","status"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),e.insertBefore(i,t.nextSibling),this._liveRegion=i,i},e.prototype.getSortingState=function(){var t,e=null===(t=this._sortingStates)||void 0===t?void 0:t[0];return{dir:null==e?void 0:e.dir,by:null==e?void 0: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,w.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 k.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,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,m.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,m.showTooltip)(d,r({node:e,htmlEnable:(0,m.isHtmlEnable)(t.config,l,s)},(0,m.getTooltipConfig)(t.config,l,s,i)))}}},i=[{className:"dhx_grid-header-cell",action:function(t){return e(t,"header")}},{className:"dhx_grid-footer-cell",action:function(t){return e(t,"footer")}},{className:"dhx_grid-cell",action: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,m.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,m.showTooltip)(d,r({node:e,htmlEnable:(0,m.isHtmlEnable)(t.config,n)},(0,m.getTooltipConfig)(t.config,n)))}}},{className:"dhx_span-cell",action: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,m.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,m.showTooltip)(s,r({node:e,htmlEnable:(0,m.isHtmlEnable)(t.config,n)},(0,m.getTooltipConfig)(t.config,null,a)))}}}],n=function(t){for(var e=0,n=i;e<n.length;e++){var o=n[e],r=o.className,a=o.action,l=(0,c.locateNodeByClassName)(t,r);if(l){a(l);break}}};this._tooltipFocusHandler=n,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,m.isSortable)(t.config,o)&&!n){if((0,m.isInteractiveTarget)(e.target))return;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(x.GridEvents.expand,[i])},"dhx_span-expand-cell":function(e,i){e.target.classList.contains("dhx_span-expand-cell-icon")&&t.events.fire(x.GridEvents.expand,[i])}}),onscroll:function(e){t.events.fire(x.GridEvents.scroll,[{y:e.target.scrollTop,x:e.target.scrollLeft}])},onmouseover:n}},e.prototype._setEventHandlers=function(){var t=this;this.data.events.on(f.DataEvents.load,(function(){if(t._applyLocalFilter(!0),t._setSort(),t._resetFilterUI(),t._parseData(),t._checkFilters(),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.announce((0,v.getLocaleString)("aria_rowsLoaded",{count:t.data.getLength()})),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(){(0,d.isEmptyObj)(t._activeFilters)||t.data.resetFilter(),t._resetFilterUI()})),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(x.GridEvents.beforeRowDrag,[e,i])})),this.events.on(f.DragEvents.dragStart,(function(e,i,n){if("row"===n)t.events.fire(x.GridEvents.dragRowStart,[e,i]),t._autoScroll("vertical")})),this.events.on(f.DragEvents.dragIn,(function(e,i,n){if("row"===n)t.events.fire(x.GridEvents.dragRowIn,[e,i])})),this.events.on(f.DragEvents.dragOut,(function(e,i,n){if("row"===n)t.events.fire(x.GridEvents.dragRowOut,[e,i])})),this.events.on(f.DragEvents.canDrop,(function(e,i,n){if("row"===n)t.events.fire(x.GridEvents.canRowDrop,[e,i])})),this.events.on(f.DragEvents.cancelDrop,(function(e,i,n){if("row"===n)t.events.fire(x.GridEvents.cancelRowDrop,[e,i])})),this.events.on(f.DragEvents.beforeDrop,(function(e,i,n){if("row"===n)return t.events.fire(x.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(x.GridEvents.afterRowDrop,[e,i])}})),this.events.on(f.DragEvents.afterDrag,(function(e,i,n){if("row"===n)t.events.fire(x.GridEvents.afterRowDrag,[e,i]),t._normalizeSpans()})),this.events.on(x.GridEvents.dragPanelItemMouseDown,(function(e,i){t._dragProcess(i,t.data.getItem(e))})),this.events.on(x.GridEvents.cellMouseDown,(function(e,i,n){!t.config.dragPanel&&t._dragProcess(n,e,i)})),this._events.on(x.GridSystemEvents.cellTouchMove,(function(e,i,n){t._touch.start&&n.preventDefault(),t._clearTouchTimer()})),this._events.on(x.GridSystemEvents.cellTouchEnd,(function(){t._touch.start=!1,t._clearTouchTimer()})),this._events.on(x.GridSystemEvents.announce,(function(e){t.announce(e)})),this.events.on(x.GridEvents.filterChange,(function(e,i,n,o){var r,a,l;if(t.events.fire(x.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),u=c.header.filter((function(t){return t.content===n&&void 0!==t.customFilter}))[0];if("comboFilter"===n&&void 0!==e||"comboFilter"!==n&&""!==e){var h=(0,g.getEditorOptions)(c);"combobox"!==c.editorType&&"select"!==c.editorType&&"multiselect"!==c.editorType||!h||(e=Array.isArray(e)?e.map((function(t){var e;return(null===(e=h.find((function(e){return"string"==typeof e?e===t:e.value===t})))||void 0===e?void 0:e.id)||t})):null!==(a=null===(r=h.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==u?void 0:u.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),t.announce((0,v.getLocaleString)((0,d.isEmptyObj)(t._activeFilters)?"aria_filterCleared":"aria_filterApplied",{count:t.data.getLength()})))}})),this.events.on(x.GridEvents.scroll,(function(e){t._scroll={top:e.y,left:e.x},t.paint()})),this.events.on(x.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(x.GridEvents.afterEditEnd,(function(e,i,n){t._afterEditEndProcess(e,i,n)})),this.events.on(x.GridEvents.headerCellMouseDown,(function(e,i,n){var o=n.target.getAttribute("dhx_resized");if(o&&t.events.fire(x.GridEvents.beforeResizeStart,[i,n])&&(0,E.startResize)(t,o.toString(),n,(function(){t.paint(),t.config.$resizing=null,t.events.fire(x.GridEvents.afterResizeEnd,[i,n])})),n.targetTouches){if(t._touch.timeStamp)t._touch.dblDuration>=t._touch.timeStamp-+n.timeStamp.toFixed()&&(n.preventDefault(),t.events.fire(x.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(x.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(x.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(x.GridEvents.resize,(function(){return t._parseColumns()})),this.events.on(x.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),this.config.$editable=null;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.paint(),(0,l.awaitRedraw)().then((function(){var t;null===(t=(0,_.getCellSource)(a))||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,m.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(x.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,C.getNormalizeDateObject)(t,n.dateFormat).getTime():t?"".concat(t):""}},{smartSorting:i}),this.announce((0,v.getLocaleString)("asc"===r?"aria_sortedAscending":"aria_sortedDescending",{column:n?(0,g.getColumnHeaderText)(n):"".concat(t)})),this.events.fire(x.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._resetFilterUI=function(){this._activeFilters={},this._hiddenFilters={},this.config.columns.forEach((function(t){var e;null===(e=t.header)||void 0===e||e.forEach((function(e){!e.content||"selectFilter"!==e.content&&"comboFilter"!==e.content||(t.$uniqueData=[])}))})),this._clearFilterValue(!0)},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],_=p[1];d=Object.assign(d,((e={})[v]=+_+24+(o=this.getColumn(v),(0,m.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],_=w[1];(d[v]&&d[v]<+_+24||!d[v])&&(d=Object.assign(d,((i={})[v]=+_+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],_=E[1];(d[v]&&d[v]<+_+24||!d[v])&&(d=Object.assign(d,((n={})[v]=+_+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,m.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 _=v[g],y=_[0],b=_[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(x.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,C.getCurrFixedCols)(this.config,x.Split.left),l=(0,C.getCurrFixedCols)(this.config,x.Split.right),s=(0,C.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,T.getRowNode)(i,r);if(!u)return"continue";var h=n>o-s.y?o-s.y-C.BORDERS:n;if(a.length||l.length){var f=new Array(3);if(f[1]=u,a.length){var p=(0,T.getRowNode)(i,r,"left");h-=p.offsetWidth,f[0]=p}if(l.length){var g=(0,T.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,m.getTotalWidth)(a)-C.BORDERS/2;v.appendChild((0,T.getVisibleRowNode)(e,h,i))}else e.removeAttribute("aria-rowindex"),e.removeAttribute("data-dhx-index"),e.style.width=t.offsetWidth+"px",v.appendChild(e)}})),{value:v}}var _=u.cloneNode(!0);d.push((0,T.getVisibleRowNode)(_,h,(0,c.getNodeOffset)(u,r).left-C.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(){var e;null===(e=t.getRootNode())||void 0===e||e.addEventListener("focusin",t._tooltipFocusHandler),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(x.GridEvents.beforeKeyDown,[e]))&&(t.events.fire(x.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,O.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&&((0,d.isDefined)(t.$cellCss)||(t.$cellCss={}),(0,d.isDefined)(t.$cellCss[r.id])||(t.$cellCss[r.id]=""),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,D.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)||M.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,w.getElementSizes)(o),a=null===(n=this.scrollView)||void 0===n?void 0:n.config.enable;(0,w.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=I},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(7),c=i(0),d=i(14),u=i(2),h=i(1),f=i(19),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 $,L=v(A);F="dhx_grid-row ".concat(E[I].trim());if(!w.has(L))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(L,{css:n({},M),index:w.size})}w.has(L)&&C.set("".concat(h[I],"_").concat(D),L)}},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(85),e),o(i(86),e),o(i(87),e),o(i(88),e),o(i(28),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(28),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(40),o=i(41),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 o="dhx_alert__".concat((0,r.uid)(),"_content"),l="dhx_alert__".concat((0,r.uid)(),"_header"),s=document.createElement("div");s.setAttribute("role","alert"),s.setAttribute("aria-modal","true"),e.text&&s.setAttribute("aria-describedby",o),e.header&&s.setAttribute("aria-labelledby",l),s.className="dhx_widget dhx_alert "+(e.css||"");var c=function(e){"Escape"!==e.key&&"Esc"!==e.key||(d(e),t(!1))};function d(t){t.preventDefault(),a(),document.body.removeChild(s),document.removeEventListener("keydown",c)}s.innerHTML="\n\t\t\t".concat(e.header?"<div id=".concat(l,' class="dhx_alert__header"> ').concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t\t").concat(e.text?"<div id=".concat(o,' 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="').concat(n.default.aria_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&&(s.querySelector("#".concat(l)).textContent=e.header),e.text&&(s.querySelector("#".concat(o)).textContent=e.text)),document.body.appendChild(s),s.querySelector(".dhx_alert__apply-button").focus(),s.querySelector("button").addEventListener("click",(function(e){d(e),t(!0)})),document.addEventListener("keydown",c)}))}}).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(40),o=i(41),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 o=document.createElement("div");o.setAttribute("role","alertdialog"),o.setAttribute("aria-modal","true");var s,c=e.header&&(0,r.uid)(),d=e.header&&(0,r.uid)();d&&o.setAttribute("aria-describedby",d),c&&o.setAttribute("aria-labelledby",c);var u=function(e){l(),o.removeEventListener("click",h),document.removeEventListener("keydown",f),document.body.removeChild(o),t(e)},h=function(t){"BUTTON"===t.target.tagName&&u(t.target.classList.contains("dhx_alert__confirm-aply"))},f=function(t){"Escape"===t.key||"Esc"===t.key?(o.querySelector(".dhx_alert__confirm-aply").focus(),u(t.target.classList.contains("dhx_alert__confirm-reject"))):"Tab"===t.key&&("aply"===s?(s="reject",o.querySelector(".dhx_alert__confirm-reject").focus()):(s="aply",o.querySelector(".dhx_alert__confirm-aply").focus()),t.preventDefault())};o.className="dhx_widget dhx_alert dhx_alert--confirm"+(e.css?" "+e.css:""),o.innerHTML="\n\t\t".concat(e.header?'<div class="dhx_alert__header" id='.concat(c,"> ").concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t").concat(e.text?'<div class="dhx_alert__content" id='.concat(d,">").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="').concat(n.default.aria_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="').concat(n.default.aria_apply,'" 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&&(o.querySelector("#".concat(c)).textContent=e.header),e.text&&(o.querySelector("#".concat(d)).textContent=e.text)),document.body.appendChild(o),s="aply",o.querySelector(".dhx_alert__confirm-aply").focus(),o.addEventListener("click",h),document.addEventListener("keydown",f)}))}}).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(28),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,v=null;function _(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?_(t.offsetParent):null}function m(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,v=p.top,m=p.pos,y=_(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=v+"px"}c.className+=" dhx_tooltip--".concat(m),f=!0,o||setTimeout((function(){c.className+=" dhx_tooltip--animate"}))}function y(){p&&(clearTimeout(p),p=null)}function b(){c.parentNode&&c.parentNode.removeChild(c),f=!1}function x(t){p=setTimeout((function(){b(),p=null}),t||l)}function w(t,e,i){var n=i.force,o=i.showDelay,l=i.hideDelay,s=i.position,c=i.css,d=i.htmlEnable,p=i.margin;v=l,n||(g=setTimeout((function(){m(t,e,s||r.Position.bottom,c,!1,p,d)}),o||a));var _=function(t){"Escape"===t.key&&(clearTimeout(g),y(),b())},w=function(){var e;f&&(e=l,h&&x(e)),clearTimeout(g),t.removeEventListener("mouseleave",w),t.removeEventListener("blur",w),document.removeEventListener("mousedown",w),document.removeEventListener("keydown",_),h=null,u=null};n&&m(t,e,s,c,n,p,d),t.addEventListener("mouseleave",w),t.addEventListener("blur",w),document.addEventListener("mousedown",w),document.addEventListener("keydown",_),u=w}function C(t,e){var i=(0,o.toNode)(e.node);i!==h&&(u&&(u(),u=null),h=i,p?(clearTimeout(p),p=null,w(i,t,n(n({},e),{force:!0}))):w(i,t,e))}function S(t){var e=(0,o.locateNode)(t,"dhx_tooltip_text");e&&C(e.getAttribute("dhx_tooltip_text"),{position:e.getAttribute("dhx_tooltip_position")||r.Position.bottom,node:e})}e.getZIndex=_,c.addEventListener("mouseenter",y),c.addEventListener("mouseleave",(function(){f&&x(v)})),e.tooltip=C,e.enableTooltip=function(){document.addEventListener("mousemove",S),document.addEventListener("focusin",S)},e.disableTooltip=function(){document.removeEventListener("mousemove",S),document.removeEventListener("focusin",S)}},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(7),s=i(0),c=i(6),d=i(3),u=i(17),h=i(8),f=i(5),p=i(15),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=[],n=new Set,r=[];if(this._selectedCells.forEach((function(e,i){var o=(0,p.normalizeCell)(e,t._grid),a=String(o.row.id)+"_"+String(o.column.id);n.has(a)||(n.add(a),r.push({nCell:o,index:i,layout:t._getSelectionLayout(o.row,o.column),span:t._grid.getSpan(o.row.id,o.column.id)}))})),"row"===this.config.type||"complex"===this.config.type){var l=new Set,s=new Set;r.forEach((function(i){var n=i.nCell,o=i.layout,r=i.span;if(o&&(null==r?void 0:r.rowspan)&&!(r.rowspan<=1)){var c=String(n.row.id);if(!l.has(c)){l.add(c),e.push((0,a.el)(".dhx_grid-selection",{style:{zIndex:20}},[(0,a.el)(".dhx_grid-selected-row",{style:o.rowStyle})]));for(var d=t._grid.data.getIndex(r.row),u=0;u<r.rowspan;u++){var h=t._grid.data.getId(d+u);void 0!==h&&s.add(String(h))}}}})),r.forEach((function(t){var i=t.nCell,n=t.layout,o=t.span;if(n&&!((null==o?void 0:o.rowspan)>1)){var r=String(i.row.id);l.has(r)||s.has(r)||(l.add(r),e.push((0,a.el)(".dhx_grid-selection",{style:{zIndex:20}},[(0,a.el)(".dhx_grid-selected-row",{style:n.rowStyle})])))}}))}return r.forEach((function(e){var n=e.index,o=e.layout;if(o){var r=n===t._selectedCells.length-1||"cell"===t.config.type||"complex"===t.config.type;"cell"!==t.config.type&&"complex"!==t.config.type||!r||i.push((0,a.el)(".dhx_grid-selection",{style:{zIndex:20}},[(0,a.el)(".dhx_grid-selected-cell",{style:o.cellStyle})]))}})),o(o([],e,!0),i,!0)}var c=(0,p.normalizeCell)(this._selectedCell,this._grid);return this._toHTML(c.row,c.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){void 0===i&&(i=!1),void 0===n&&(n=!1);var o=this._getSelectionLayout(t,e);if(!o)return null;var r=null;"row"!==this.config.type&&"complex"!==this.config.type||n||(r=(0,a.el)(".dhx_grid-selected-row",{style:o.rowStyle}));var l=null;return"cell"!==this.config.type&&"complex"!==this.config.type||!i||(l=(0,a.el)(".dhx_grid-selected-cell",{style:o.cellStyle})),(0,a.el)(".dhx_grid-selection",{style:{zIndex:20}},[r,l])},t.prototype._getSelectionLayout=function(t,e){var i,n,o,r,a,l,c,u,p,v,_,m,y,b=this._grid.data.getRawData(0,-1,null,2);if(-1===(0,s.findIndex)(b,(function(e){return e.id==t.id})))return null;var x=this._grid.config,w=x.topSplit,C=x.bottomSplit,S=x.$totalWidth,E=x.$totalHeight,D=x.columns,O=null==D?void 0:D.filter((function(t){return!t.hidden})),k={left:(0,h.getCurrFixedCols)(this._grid.config,d.Split.left),right:(0,h.getCurrFixedCols)(this._grid.config,d.Split.right)},R=this._grid.data.getLength(),T={top:w?this._grid.data.getRawData(0,w):[],bottom:C?this._grid.data.getRawData(R-C,R):[]},M={left:null===(i=null==k?void 0:k.left)||void 0===i?void 0:i.map((function(t){return t.id})),right:null===(n=null==k?void 0:k.right)||void 0===n?void 0:n.map((function(t){return t.id}))},I={top:T.top.map((function(t){return t.id})),bottom:T.bottom.map((function(t){return t.id}))},H=null===(o=null==k?void 0:k.left)||void 0===o?void 0:o.reduce((function(t,e){return t+(e.$width||0)}),0),P=null===(r=null==k?void 0:k.right)||void 0===r?void 0:r.reduce((function(t,e){return t+(e.$width||0)}),0),F=T.top.reduce((function(t,e){return t+(0,g.getTotalRowHeight)(e)}),0),A=T.bottom.reduce((function(t,e){return t+(0,g.getTotalRowHeight)(e)}),0),$=this._grid.getCellRect(t.id,e.id);t.$subRowHeight&&t.$opened&&($.height=$.height-t.$subRowHeight);var L,j,N,V,W=this._grid.getScrollState(),z=$.y,B=null===(a=I.top)||void 0===a?void 0:a.includes(t.id),G=null===(l=M.left)||void 0===l?void 0:l.includes(e.id),Y=k.left.length&&H>$.x-W.x,U=T.top.length&&F>$.y-W.y,X=$.width,q=$.height,K=null,Z=null,J=Y?H+W.x:$.x;if(Y&&(X-=(G?(0,f.getTotalWidth)(k.left.slice(0,O.indexOf(e))):H)-($.x-W.x)),U&&(q-=(B?(0,f.getTotalHeight)(T.top.slice(0,b.indexOf(t))):F)-($.y-W.y)-1,z+=$.height-q),B)if(z=$.y+W.y,(tt=this._grid.getSpan(t.id,e.id))&&tt.rowspan>1){var Q=b.indexOf(t);K=(0,f.getTotalHeight)(T.top.slice(Q,Q+tt.rowspan))}else q=w===I.top.indexOf(t.id)+1?$.height-1:$.height;if(G)if(J=$.x+W.x,(tt=this._grid.getSpan(t.id,e.id))&&tt.colspan>1){Q=null==O?void 0:O.indexOf(e);Z=(0,f.getTotalWidth)(k.left.slice(Q,Q+tt.colspan))}else X=k.left.length===M.left.indexOf(e.id)+1?$.width-1:$.width;if((null===(c=k.right)||void 0===c?void 0:c.length)||C){var tt=this._grid.getSpan(t.id,e.id),et=(0,g.getReverseScrollState)(this._grid);if((null===(u=k.right)||void 0===u?void 0:u.length)&&(L=(null===(p=M.right)||void 0===p?void 0:p.includes(e.id))||tt&&O.indexOf(e)+(tt.colspan||1)>O.length-k.right.length,(j=S-P<et.x+$.x+$.width)&&!L&&(X-=et.x+$.x+$.width-S+P),L))if(tt&&!(null===(v=M.right)||void 0===v?void 0:v.includes(tt.column))){Q=O.length-O.indexOf(e)-(tt.colspan||1);var it=S-P;J=$.x+et.x<it+1?$.x:it-et.x+1,Z=(0,f.getTotalWidth)(Q?k.right.slice(0,-Q):k.right)-1,X=$.width-et.x}else{var nt=(null===(_=M.right)||void 0===_?void 0:_.indexOf(e.id))?0:1;J=$.x-et.x+nt,X=$.width-nt}if(C&&(N=I.bottom.includes(t.id)||tt&&b.indexOf(t)+(tt.rowspan||1)>b.length-C,(V=E-A<et.y+$.y+$.height)&&!N&&(q-=et.y+$.y+$.height-E+A),N))if(tt&&!I.bottom.includes(tt.row)){var ot=E-A;nt=(Q=b.length-b.indexOf(t)-(tt.rowspan||1))?0:1;z=$.y+et.y<ot?$.y:ot-et.y,K=(0,f.getTotalHeight)(Q?T.bottom.slice(0,-Q):T.bottom)-nt,q=$.height-et.y-nt}else z=$.y,q=$.height-(C===I.bottom.indexOf(t.id)+1?1:0)}return{rowStyle:{width:(null===(m=k.left)||void 0===m?void 0:m.length)?S-W.x:S,height:q,minHeight:K,minWidth:Z,display:q<0&&!K?"none":"flex",top:z,left:(null===(y=k.left)||void 0===y?void 0:y.length)?W.x:0,position:"absolute"},cellStyle:{width:X,height:q,top:z,minHeight:K,minWidth:Z,left:J,position:"absolute",display:X<0&&!Z||q<0&&!K?"none":"flex",borderLeft:Y&&!G?"none":null,borderRight:j&&!L?"none":null,borderTop:U&&!B?"none":null,borderBottom:V&&!N?"none":null}}},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(7),c=i(3),d=i(21),u=i(56),h=i(57),f=i(0),p=i(8),g=i(117),v=i(118),_=i(119),m=i(22);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,range:t.range,$activeCell:t.$activeCell,$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,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","data-dhx-empty":"true",role:"presentation"},[(0,o.el)(".dhx_visually-hidden",{role:"grid","aria-rowcount":0,"aria-colcount":0})]);var M=e.data.getRawData(0,-1,null,2);T.columns.every((function(t){return t.hidden}))?T.$totalHeight=0:e._rowHeightsRebuild&&(null===(v=(g=e)._rebuildRowHeights)||void 0===v||v.call(g,M));var I={width:(T.width&&"number"==typeof T.width?T.width:null==R?void 0:R.width)||0,height:(T.height&&"number"==typeof T.height?T.height:null==R?void 0:R.height)||0};(0,l.isAutoWidth)(T)&&S(T,I),null===(m=(_=e)._rebuildColWidths)||void 0===m||m.call(_),T.$width=I.width,T.$height=I.height;var H=b(e,M,I);H.selection=r,H.datacollection=e.data;var P=(0,d.getShifts)(H);H.$scrollBarWidth=(0,p.calcScrollBarWidth)(H);var F,A,$,L,j,N=(0,l.isCssSupport)("position","sticky"),V=C(H,N,I),W={wrapper:I,sticky:N,shifts:P,gridBodyHeight:V,footerAtBottom:!1},z=(0,h.getFixedRows)(H,n(n({},W),{name:"header",position:"top"})),B=H.$footer?(0,h.getFixedRows)(H,n(n({},W),{name:"footer",position:"bottom"})):null,G=H.$totalWidth+p.BORDERS<I.width?"dhx_grid-less-width":"",Y=H.$totalHeight+p.BORDERS<I.height?"dhx_grid-less-height":"",U=H.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",X=T.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"";if(!t.node){var q=e.getScrollState(),K=q.x,Z=q.y;(0,o.awaitRedraw)().then((function(){e.scroll(K,Z)}))}return(0,o.el)(".dhx_grid.dhx_widget",{class:(H.css||"")+(N?"":" dhx_grid_border")+(T.multiselection?" dhx_no-select--pointer":""),"data-dhx-widget-id":a,"data-dhx-root-id":T.rootParent,"data-dhx-drop-area":"common",role:"presentation"},[(0,o.resizer)((function(){return e.paint()})),(0,o.el)(".dhx_grid-focus-sentinel",{tabindex:0}),(0,o.el)(".dhx_grid-content",n(n(n({style:n({},I)},i),{class:"".concat(G," ").concat(Y," ").concat(U," ").concat(X).trim()}),(F=H.data,A=T.columns,$=null!==(E=null===(y=H.$cellState)||void 0===y?void 0:y.editable)&&void 0!==E?E:H.editable,L=null!==(O=null===(D=H.$cellState)||void 0===D?void 0:D.multiselectable)&&void 0!==O?O:H.multiselection||!!H.blockSelection,j=H.type,{role:"tree"===j?"treegrid":"grid","aria-rowcount":F.length+(0,p.getHeaderRowCount)(H)+(0,p.getFooterRowCount)(H),"aria-colcount":A.filter((function(t){return!t.hidden})).length,"aria-readonly":$?"false":"true","aria-multiselectable":L?"true":"false"})),[N?null:z,(0,o.el)(".dhx_grid-body",{style:{height:V,width:I.width-p.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[(0,o.el)("div",{},[N?z:null,w(H,P),N?B:null])]),(0,u.getFixedColsHeader)(H,W,c.Split.left),(0,u.getFixedColsHeader)(H,W,c.Split.right),(0,u.getFixedCols)(H,W,c.Split.left),(0,u.getFixedCols)(H,W,c.Split.right),(0,h.getFixedDataRows)(H,W,c.Split.top),(0,h.getFixedDataRows)(H,W,c.Split.bottom),N?null:B]),(0,o.el)(".dhx_grid-focus-sentinel.dhx_grid-focus-sentinel--end",{tabindex:0})])},e.proRender=function(t,e,i,r,a){var s,f,v,y,E,D,O,k,R,T,M,I=(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==I?void 0:I.tagName)&&e._observeResize&&e._observeResize(I);var H=e._cachedSizes||x(I),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","data-dhx-empty":"true",role:"presentation"},[(0,o.el)(".dhx_visually-hidden",{role:"tree"===P.type?"treegrid":"grid","aria-rowcount":0,"aria-colcount":0})]);var F,A=e.data.getRawData(0,-1,null,2),$=P.topSplit||0,L=P.bottomSplit||0,j=P.columns.every((function(t){return t.hidden}));if(e._rowHeightsRebuild){for(var N=0,V=0,W=0;W<A.length;W++){var z=A[W];$&&W<$+N&&(P.subRow&&(z.$subRowHeight=0,z.$opened=!1),z.hidden&&N++),L&&W>=A.length-L-V&&(P.subRow&&(z.$subRowHeight=0,z.$opened=!1),z.hidden&&V++),z.$index=W}j?(P.$totalHeight=0,e._rowHeightsRebuild=!1):null===(y=(v=e)._rebuildRowHeights)||void 0===y||y.call(v,A)}var B="auto"===e.config.height;B&&(F=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,P,H));var G=P.width&&"number"==typeof P.width?P.width:null==H?void 0:H.width,Y=P.height&&"number"==typeof P.height?P.height:null==H?void 0:H.height,U={width:G||0,height:(B?F:Y)||0},X=null==P?void 0:P.group,q=null==P?void 0:P.dragPanel,K=null==X?void 0:X.panel,Z=!!P.dragPanel;K&&(U.height-=X.panelHeight||40),Z&&(U.width-=(null==q?void 0:q.width)||m.defaultDragPanelConfig.width),(0,l.isAutoWidth)(P)&&S(P,U,e.scrollView&&e.scrollView.config.enable),null===(D=(E=e)._rebuildColWidths)||void 0===D||D.call(E),P.$width=U.width,P.$height=U.height;var J=b(e,A,U);J.selection=r,J.datacollection=e.data;var Q=(0,d.getShifts)(J);J.$scrollBarWidth=(0,p.calcScrollBarWidth)(J,!!(null===(O=e.scrollView)||void 0===O?void 0:O.config.enable));var tt=(0,l.isCssSupport)("position","sticky"),et=C(J,tt,U),it={wrapper:U,sticky:tt,shifts:Q,gridBodyHeight:et,footerAtBottom:!1},nt=J.$totalWidth+p.BORDERS<U.width?"dhx_grid-less-width":"",ot=J.$totalWidth+p.BORDERS===U.width?"dhx_grid-full-width":"",rt=J.$totalHeight+p.BORDERS<U.height-J.$footerHeight-J.$headerHeight?"dhx_grid-less-height":"",at=J.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",lt=P.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"",st="bottom"===P.footerPosition&&!!rt&&!B;it.footerAtBottom=st;var ct=null!==(R=null===(k=J.$cellState)||void 0===k?void 0:k.editable)&&void 0!==R?R:J.editable,dt=null!==(M=null===(T=J.$cellState)||void 0===T?void 0:T.multiselectable)&&void 0!==M?M:J.multiselection||!!J.blockSelection,ut=(0,h.getFixedRows)(J,n(n({},it),{name:"header",position:"top"})),ht=J.$footer?(0,h.getFixedRows)(J,n(n({},it),{name:"footer",position:"bottom"})):null;if(!t.node){var ft=e.getScrollState(),pt=ft.x,gt=ft.y;(0,o.awaitRedraw)().then((function(){e.scroll(pt,gt)}))}var vt=(0,o.el)("div",{},[tt?ut:null,w(J,Q,st),tt?ht:null]);return(0,o.el)(".dhx_grid.dhx_widget",{class:(J.css||"")+(tt?"":" dhx_grid_border")+(P.multiselection?" dhx_no-select--pointer":""),style:{height:null!=F?F:null},"data-dhx-widget-id":a,"data-dhx-root-id":P.rootParent,role:"presentation","data-dhx-drop-area":"common"},[(0,o.resizer)((function(){return e.paint()})),K&&(0,g.getGroupPanel)(P.$grouped,e)||null,Z&&(0,_.getDragPanelNode)(e,J,it,!!rt)||null,(0,o.el)(".dhx_grid-focus-sentinel",{tabindex:0}),(0,o.el)(".dhx_grid-content",n(n({style:n({},U)},i),{class:"".concat(nt," ").concat(rt," ").concat(ot," ").concat(at," ").concat(lt).trim(),role:"tree"===P.type?"treegrid":"grid","aria-rowcount":J.data.length+(0,p.getHeaderRowCount)(J)+(0,p.getFooterRowCount)(J),"aria-colcount":J.filteredColumns.length,"aria-readonly":ct?"false":"true","aria-multiselectable":dt?"true":"false"}),[tt?null:ut,(0,o.el)(".dhx_grid-body",{style:{height:et,width:U.width-p.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[e.scrollView&&e.scrollView.config.enable?e.scrollView.render([vt]):vt]),(0,u.getFixedColsHeader)(J,it,c.Split.left),(0,u.getFixedColsHeader)(J,it,c.Split.right),(0,u.getFixedCols)(J,it,c.Split.left),(0,u.getFixedCols)(J,it,c.Split.right),(0,h.getFixedDataRows)(J,it,c.Split.top),(0,h.getFixedDataRows)(J,it,c.Split.bottom),tt?null:ht]),(0,o.el)(".dhx_grid-focus-sentinel.dhx_grid-focus-sentinel--end",{tabindex:0})])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditor=void 0;var n,o=i(3),r=i(93),a=i(94),l=i(95),s=i(108),c=i(109),d=i(116),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(12),c=i(19),d=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){var e;if(this._config.$editable){var i;if(!t&&(i=this._removeValuePattern(this._input.value,!0),"number"===this.type||this._cell.col.numberMask))if(i=parseFloat(i),Number.isNaN(i))i="";else{var n=this._cell.col.editorConfig,o=parseFloat(null==n?void 0:n.min),l=parseFloat(null==n?void 0:n.max),c=i;(0,a.isDefined)(null==n?void 0:n.min)&&i<o&&(i=o),(0,a.isDefined)(null==n?void 0:n.max)&&i>l&&(i=l),i!==c&&(null===(e=this._config._events)||void 0===e||e.fire(r.GridSystemEvents.announce,[(0,s.getLocaleString)("aria_valueClamped",{value:i})]))}this._config.events.fire(r.GridEvents.beforeEditEnd,[i,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,[i,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}));var r=this._isValueInvalid(t);return 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),"aria-invalid":r?"true":"false",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._setValidity(!t.prevValue.length||"-"===t.prevValue||t._isCorrectRange(parseFloat(t.prevValue)))),t._input.value=t._applyValuePattern(e,t._input)},didInsert:function(e){t._input=e.el,t._input.focus()}}},t.prototype._setValidity=function(t){var e,i="true"===this._input.getAttribute("aria-invalid");if(t?this._input.classList.remove("dhx_cell-editor__input--not-valid"):this._input.classList.add("dhx_cell-editor__input--not-valid"),this._input.setAttribute("aria-invalid",t?"false":"true"),!t&&!i){var n=this._getRangeMessage();n&&(null===(e=this._config._events)||void 0===e||e.fire(r.GridSystemEvents.announce,[n]))}},t.prototype._isValueInvalid=function(t){if("number"!==this.type)return!1;var e=parseFloat(this._removeValuePattern("".concat(t)));return!Number.isNaN(e)&&!this._isCorrectRange(e)},t.prototype._getRangeMessage=function(){var t=this._cell.col.editorConfig;return(0,a.isDefined)(null==t?void 0:t.min)&&(0,a.isDefined)(null==t?void 0:t.max)?(0,s.getLocaleString)("aria_valueOutOfRange",{min:t.min,max:t.max}):(0,a.isDefined)(null==t?void 0:t.min)?(0,s.getLocaleString)("aria_valueBelowMin",{min:t.min}):(0,a.isDefined)(null==t?void 0:t.max)?(0,s.getLocaleString)("aria_valueAboveMax",{max:t.max}):""},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,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}();e.InputEditor=d},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(96),s=i(14),c=i(32),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(97),e),o(i(48),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(98),h=i(107),f=i(14),p=i(48),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(99),e),o(i(47),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(29),u=i(102),h=i(105),f=i(106),p=i(47),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(30),a=i(43),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(103),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)};Object.defineProperty(e,"__esModule",{value:!0}),e.Slider=void 0;var a=i(0),l=i(1),s=i(6),c=i(27),d=i(11),u=i(32),h=i(46),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(45),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("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(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(){var t=this._checked;this._config.events.fire(o.GridEvents.beforeEditEnd,[t,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.events.fire(o.GridEvents.afterEditEnd,[t,this._cell.row,this._cell.col])):this._input.checked=!t},t.prototype.toHTML=function(){return void 0===this._checked&&(this._checked=this._cell.row[this._cell.col.id]),(0,n.el)("div.dhx_checkbox.dhx_cell-editor__checkbox",[(0,n.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,"aria-label":(0,r.getColumnHeaderText)(this._cell.col),style:{userSelect:"none"}}),(0,n.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(o.GridEvents.beforeEditStart,[t._cell.row,t._cell.col,"checkbox"])?(t._checked=e,t._config.events.fire(o.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=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.ComboboxEditor=void 0;var o=i(1),r=i(3),a=i(4),l=i(49),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,ariaLabel:(0,a.getColumnHeaderText)(this._cell.col)},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;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(112);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(33),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(44),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(52).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(50),a=i(51),l=i(29),s=i(54),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(19),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(20);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","aria-hidden":"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(12),l=i(22),s=i(43),c=i(8);function d(t,e,i,o){var r=e(t),a=new s.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({},l.defaultSubRowConfig),i),{cell:a})),"function"==typeof(null==r?void 0:r.paint)&&a.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 l;if(e.$opened){var s=t.$subRowCells.get(e.id),d=null===(l=null==s?void 0:s.cell)||void 0===l?void 0:l.getRootView();if(d){var u=(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-label":(0,a.getLocaleString)("aria_subRow",{id:e.id}),"data-dhx-id":e.id,"data-dhx-root-widget-id":t.gridId,tabindex:0,style:{position:"absolute",top:u,width:n?t.$totalWidth:t.$width-t.$scrollBarWidth.y-c.BORDERS}},[(0,o.inject)(d)]))}}})),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,a=i.subRow,s=new Map,c=0;c<e.length;c++){var u=e[c];if(!u.$group){if(!r.has(u.id)||!r.get(u.id).cell){var h=n(n({},l.defaultSubRowConfig),("function"==typeof o?o(u):o)||{});r.set(u.id,h),(u.$opened||h.preserve)&&u.$subRowHeight&&d(u,a,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(22),s=i(8),c=i(2),d=i(5),u=i(12),h={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 f(t){return(0,r.el)(".dhx_grid-drag-panel_header",{style:{height:t.$headerHeight},role:"banner","aria-label":(0,u.getLocaleString)("aria_panelHeader")})}function p(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":(0,u.getLocaleString)("aria_panelFooter")})}function g(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":(0,u.getLocaleString)("aria_panelContent")},[v(t,e),p(t,e,i),_(t,e,a.Split.top,i),_(t,e,a.Split.bottom,i)])}function v(t,e){var i=t.dragPanel,n=t.currentRows.map((function(t){return m(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":(0,u.getLocaleString)("aria_draggableRows")},o([],n,!0))}function _(t,e,i,n){var c=t.dragPanel,h=(i===a.Split.bottom?t.fixedRows.bottom:t.fixedRows.top)||[];if(!h.length)return null;var f=h.map((function(t){return m(t,c.icon)})),p={width:c.width||l.defaultDragPanelConfig.width};if(i===a.Split.bottom&&e.footerAtBottom)p.bottom=t.footerHeight+s.BORDERS/2+(t.$scrollBarWidth.x||-1);else{var g=(0,d.getTotalHeight)(t.fixedRows.bottom),v=t.group?(0,l.getGroupDefaultConfig)(t.group).panelHeight:0;p.top=i===a.Split.bottom?n?t.$totalHeight+t.$headerHeight-g+s.BORDERS/2+v:t.$height-g-t.$footerHeight-s.BORDERS/2-t.$scrollBarWidth.x+v:t.$headerHeight+v}return(0,r.el)(".dhx_grid-drag-panel_content.dhx_grid-drag-panel_content--fixed",{style:p,_flags:r.KEYED_LIST,role:"list","aria-label":(0,u.getLocaleString)("aria_draggableRows")},o([],f,!0))}function m(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":(0,u.getLocaleString)("aria_rowId",{id: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(h).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":(0,u.getLocaleString)("aria_dragPanel")},c),[f(e),g(e,i,o)])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComboFilter=void 0;var n=i(49),o=i(6),r=i(7),a=i(0),l=i(3),s=i(23),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(23),s=i(4),c=i(12),d=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":(0,c.getLocaleString)("aria_filter",{column:(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=d},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(23),l=i(4),s=i(12),c=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=(0,s.getLocaleString)("aria_filter",{column:(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=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.startResize=void 0;var o=i(0),r=i(3),a=i(8);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(15),r=i(17),a=i(5),l=i(125),s=i(126),c=i(127);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,r){var a,s;if(void 0===r&&(r=!1),!(t.config.$editable||(0,n.locateNodeByClassName)(e,"dhx_grid-header-cell")||(0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))){var c=(0,o.getCellSource)(t).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&&r;if(c)(f=(0,l.walkVisibleRows)(t,c.row.id,p))!==c.row.id&&(t.scrollTo(f.toString(),c.column.id.toString()),(0,o.getCellSource)(t).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",r)}else h&&(e.preventDefault(),h.scrollTop+=i*h.clientHeight)}},p=function(e,i,n){var r;void 0===n&&(n=!1);var a=(0,o.getCellSource)(t).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,r){var l,s,c;if(void 0===r&&(r=!1),!(t.config.$editable||(0,n.locateNodeByClassName)(e,"dhx_grid-header-cell")||(0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))){var d=(0,o.getCellSource)(t).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&&r;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()),(0,o.getCellSource)(t).setCell(f,p,!1,v)),h&&"range"===(null===(s=u.block)||void 0===s?void 0:s.config.mode)&&(u.scrollTo(f,p),r?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)((0,o.getCellSource)(t).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,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===(r=document.activeElement)||void 0===r?void 0:r.getAttribute("data-dhx-col-id"))||(0,c.transitionToBody)(t,h.xStart,"first")}else if((0,o.getCellSource)(t).getCell()){var f=(0,o.getCellSource)(t).getCell();t.scrollTo(f.row.id,f.column.id),(0,o.getCellSource)(t).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,a=(0,c.detectFocusZone)(e);if("header"!==a&&"footer"!==a){t.config.$editable&&t.editEnd();var s=(0,o.getCellSource)(t).getCell(),d=t.config.columns.filter((function(t){return!t.hidden}));if(s){if(s.row.$opened&&s.row.$subRowHeight){var u=t.getSubRow(s.row.id),h=u.view,f=u.element;return void((null==h?void 0:h.name.includes("grid"))?((0,o.getCellSource)(h).setCell(h.data.getId(0)),r.focusManager.setFocusId(h._uid)):f.focus())}var p=d.indexOf(s.column)+(0,l.getRangedIndex)(t,"right");if(p>=0&&p<d.length)e&&e.preventDefault(),t.scrollTo(s.row.id.toString(),d[p].id.toString()),(0,o.getCellSource)(t).setCell(s.row.id,d[p].id);else if(p>=0){(v=(0,l.getNextVisibleRowId)(t,s.row.id,1))?(e&&e.preventDefault(),t.scrollTo(v.toString(),d[0].id.toString()),(0,o.getCellSource)(t).setCell(v,d[0].id)):(0,c.hasFooter)(t)&&(e&&e.preventDefault(),(0,c.transitionFromBodyToZone)(t,"footer",d[0].id,0))}}else{var g=null===(n=t.range)||void 0===n?void 0:n.getRange();if(g){var v,_=d.findIndex((function(t){return t.id===g.xEnd}))+1;if(_<d.length)e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,g.yEnd,d[_].id);else(v=(0,l.getNextVisibleRowId)(t,g.yEnd,1))?(e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,v,d[0].id)):(0,c.hasFooter)(t)&&(e&&e.preventDefault(),(0,c.transitionFromBodyToZone)(t,"footer",d[0].id,0))}}}else{var m=e.target,y=m.closest(".dhx_grid-".concat(a,"-cell, .dhx_span-cell"));if(y&&m!==y&&(0,c.isContentCell)(y))return e.preventDefault(),void(0,c.deactivateContentCell)(y);if("exit-end"===(0,c.moveZoneFocusTab)(t,e,a,"forward"))if("header"===a){e.preventDefault(),(0,c.restoreZoneTabindex)(t,a);var b=(0,c.getVisibleColumns)(t);(0,c.transitionToBody)(t,null===(i=b[0])||void 0===i?void 0:i.id,"first")}else(0,c.restoreZoneTabindex)(t,a),(0,c.exitThroughSentinel)(t,"forward")}},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,a,s,d,u=(0,c.detectFocusZone)(e);if("header"===u||"footer"===u){var h=e.target,f=h.closest(".dhx_grid-".concat(u,"-cell, .dhx_span-cell"));return f&&h!==f&&(0,c.isContentCell)(f)?(e.preventDefault(),void(0,c.deactivateContentCell)(f)):void("exit-start"===(0,c.moveZoneFocusTab)(t,e,u,"backward")&&((0,c.restoreZoneTabindex)(t,u),(0,c.exitThroughSentinel)(t,"backward")))}if("body"===u&&(0,c.isAtFirstRow)(t)&&(0,c.isAtFirstColumn)(t)){e.preventDefault();var p=(0,c.getVisibleColumns)(t),g=p[p.length-1].id,v=(0,c.getZoneRowCount)(t,"header")-1;(0,c.transitionFromBodyToZone)(t,"header",g,v)}else{t.config.$editable&&t.editEnd();var _=(0,o.getCellSource)(t).getCell(),m=t.config.columns.filter((function(t){return!t.hidden}));if(_){var y=(0,n.locate)(null===(s=null===(a=null===(i=t.getRootView().node)||void 0===i?void 0:i.parent)||void 0===a?void 0:a.parent)||void 0===s?void 0:s.el,"data-dhx-root-widget-id");if(y)return void r.focusManager.setFocusId(y);var b=m.indexOf(_.column)+(0,l.getRangedIndex)(t,"left");if(b>=0&&b<m.length)e&&e.preventDefault(),t.scrollTo(_.row.id.toString(),m[b].id.toString()),(0,o.getCellSource)(t).setCell(_.row.id,m[b].id);else(w=(0,l.getNextVisibleRowId)(t,_.row.id,-1))&&(e&&e.preventDefault(),t.scrollTo(w.toString(),m[m.length-1].id.toString()),(0,o.getCellSource)(t).setCell(w,m[m.length-1].id))}else{var x=null===(d=t.range)||void 0===d?void 0:d.getRange();if(x){var w,C=m.findIndex((function(t){return t.id===x.xEnd}))-1;if(C>=0)e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,x.yEnd,m[C].id);else(w=(0,l.getNextVisibleRowId)(t,x.yEnd,-1))&&(e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,w,m[m.length-1].id))}}}},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(15),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 s=e.config.columns.filter((function(t){return!t.hidden}));!function(t){var e=t.grid,i=t.columns,n=t.dir,o=t.rangedIndex,l=t.toEnd,s=t.shiftUp,c=(0,r.getCellSource)(e).getCell(),d=e.config.multiselection&&s;if(!c)return;if("vertical"===n)if(l){var u=e.data.getItem(e.data.getId(0));if(1===o){var h=e.data.getId(e.data.getLength()-1);"tree"===e.config.type&&(h=(0,a.getLastChild)(h,e.data)),u=e.data.getItem(h)}e.scrollTo(u.id.toString(),c.column.id.toString()),(0,r.getCellSource)(e).setCell(u.id,c.column.id,!1,d)}else{u=null;if("tree"===e.config.type){var f=o<0?(0,a.getClosestTop)(c.row.id,e.data):(0,a.getClosestBottom)(c.row.id,e.data);f&&(u=e.data.getItem(f))}else{(p=e.data.getIndex(c.row.id.toString()))+o>=0&&p+o<e.data.getLength()&&(u=e.data.getItem(e.data.getId(p+o)))}u&&(e.scrollTo(u.id.toString(),c.column.id.toString()),(0,r.getCellSource)(e).setCell(u.id,c.column.id,!1,d))}else if(l){u=1===o?i[i.length-1]:i[0];e.scrollTo(c.row.id.toString(),u.id.toString()),(0,r.getCellSource)(e).setCell(c.row.id,u.id,!1,d)}else{var p;(p=i.findIndex((function(t){return t.id==c.column.id})))+o>=0&&p+o<i.length&&(e.scrollTo(c.row.id.toString(),i[p+o].id.toString()),(0,r.getCellSource)(e).setCell(c.row.id,i[p+o].id,!1,d))}}(n(n({},t),{columns:s})),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:s}))}},e.applyRangeMove=l,e.getRangedIndex=function(t,e){var i,n,o=(0,r.getCellSource)(t).getCell(),a=o&&t.getSpan(o.row.id,o.column.id);if(a){if("up"===e||"down"===e){var l=null===(i=t.config.data)||void 0===i?void 0:i.findIndex((function(t){return t.id===a.row})),s=null===(n=t.config.data)||void 0===n?void 0:n.findIndex((function(t){return t.id===o.row.id}));return"up"===e?l-s-1:l+(a.rowspan||1)-s}var c=t.config.columns.filter((function(t){return!t.hidden}));l=c.findIndex((function(t){return t.id===a.column})),s=c.findIndex((function(t){return t.id===o.column.id}));return"left"===e?l-s-1:l+(a.colspan||1)-s}return"down"===e||"right"===e?1:-1},e.getActiveCell=function(t,e){var i;if(t.$activeCell)return(0,r.normalizeCell)(t.$activeCell.getCell(),t);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()),t.$activeCell||e||"row"===t.config.selection)(0,r.getCellSource)(t).setCell(i,n);else{var a=t;a.range&&(a.range.setRange({yStart:i,yEnd:i,xStart:n,xEnd:n}),null===(o=a.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.exitThroughSentinel=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=i(15),a=new WeakMap;function l(t){var e=a.get(t);return e||(e={colId:null,rowIndex:null,navRowIndex:null,initialized:!1,exiting:!1},a.set(t,e)),e}function s(t){return t.config.columns.filter((function(t){return!t.hidden}))}function c(t,e){var i=s(t),n=i.find((function(t){return t.id===e}));if(!n)return"center";var o=n.$index,r=t.config.leftSplit||0,a=t.config.rightSplit||0;return r>0&&o<r?"left":a>0&&o>=i.length-a?"right":"center"}function d(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 u(t,e,i,n){var o,r,a,l=(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(!l)return null;for(var s=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}(l,e,c(t,i)),d=0,u=s;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=l.querySelector('.dhx_span-cell[data-dhx-id="'.concat(i,'"][data-dhx-row-index="').concat(n,'"]'));return g||(l.querySelector(".dhx_grid-".concat(e,'-cell[data-dhx-id="').concat(i,'"][data-dhx-row-index="').concat(n,'"]'))||null)}function h(t,e){var i,n,r;if("center"===c(t,e)){var a=s(t),l=t.config.leftSplit||0,d=a.findIndex((function(t){return t.id===e}));if(!(d<0)){var u=t.getScrollState(),h=(0,o.getTotalWidth)(a.slice(l,d)),f=h+(a[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=l>0?(0,o.getTotalWidth)(a.slice(0,l)):0,_=t.config.rightSplit||0,m=g-v-(_>0?(0,o.getTotalWidth)(a.slice(-_)):0),y=u.x;h<y?t.scroll(h,null):f>y+m&&t.scroll(f-m,null)}}}function f(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=s,e.getColumnSplitSection=c,e.getZoneRowCount=d,e.findZoneCell=u,e.ensureZoneCellVisible=h,e.resolveSpanTarget=f,e.moveZoneFocus=function(t,e,i,n){var o,r;e.preventDefault();var l=e.target,c=l.getAttribute("data-dhx-id"),d=parseInt(l.getAttribute("data-dhx-row-index")||"0",10);if(c){var u=a.get(t),h=null!==(o=null==u?void 0:u.navRowIndex)&&void 0!==o?o:d,p=s(t),g=p.findIndex((function(t){return t.id===c}));if(!(g<0)){var _="footer"===i?"footer":"header",m="right"===n?1:-1,y=g;if("right"===n){var b=null===(r=p[g][_])||void 0===r?void 0:r[d];(null==b?void 0:b.colspan)>1&&(y=g+b.colspan-1)}var x=y+m;if(!(x<0||x>=p.length)){var w=f(i,p[x].id,h,p);v(t,i,w.colId,w.rowIndex,l,h)}}}},e.moveZoneFocusVertical=function(t,e,i,n){var o;e.preventDefault();var r=e.target,a=r.getAttribute("data-dhx-id"),l=parseInt(r.getAttribute("data-dhx-row-index")||"0",10);if(!a)return!1;var c=s(t),u="footer"===i?"footer":"header",h="down"===n?1:-1,p=l;if("down"===n){var g=c.findIndex((function(t){return t.id===a}));if(g>=0){var _=null===(o=c[g][u])||void 0===o?void 0:o[l];(null==_?void 0:_.rowspan)>1&&(p=l+_.rowspan-1)}}var m=p+h,y=d(t,i);if(m<0||m>=y)return!1;var b=f(i,a,m,c);return v(t,i,b.colId,b.rowIndex,r,m),!0},e.moveZoneFocusTab=function(t,e,i,n){var o,r,l=e.target,c=l.getAttribute("data-dhx-id")?l:l.closest("[data-dhx-id]");if(!c)return"forward"===n?"exit-end":"exit-start";var u=c.getAttribute("data-dhx-id"),h=parseInt(c.getAttribute("data-dhx-row-index")||"0",10),p=s(t),g=p.findIndex((function(t){return t.id===u}));if(g<0)return"forward"===n?"exit-end":"exit-start";var _="footer"===i?"footer":"header",m=d(t,i),y="forward"===n?1:-1,b=a.get(t),x=null!==(o=null==b?void 0:b.navRowIndex)&&void 0!==o?o:h,w=g;if("forward"===n){var C=null===(r=p[g][_])||void 0===r?void 0:r[h];(null==C?void 0:C.colspan)>1&&(w=g+C.colspan-1)}for(var S=w+y,E=x,D=p.length*m,O=0;O<D;O++){if("forward"===n&&S>=p.length){if(++E>=m)return"exit-end";S=0}else if("backward"===n&&S<0){if(--E<0)return"exit-start";S=p.length-1}var k=f(i,p[S].id,E,p);if(k.colId!==u||k.rowIndex!==h){if(v(t,i,k.colId,k.rowIndex,l,E))return e.preventDefault(),"moved";S+=y}else S+=y}return"forward"===n?"exit-end":"exit-start"},e.isAtFirstColumn=function(t){var e,i=s(t);if(0===i.length)return!0;var n=i[0].id;if(t.config.blockSelection){var o=null===(e=t.range)||void 0===e?void 0:e.getRange();if(o)return o.xStart==n}else{var a=(0,r.getCellSource)(t).getCell();if(a)return a.column.id==n}return!0},e.isContentCell=function(t){return t.classList.contains("dhx_grid-custom-content-cell")};var p=new WeakMap;function g(t){var e=t.querySelector("input, select");if(e){e.setAttribute("tabindex","-1");var i=p.get(e);i&&(e.removeEventListener("keydown",i),p.delete(e))}t.setAttribute("tabindex","0"),t.focus()}function v(t,e,i,n,o,r){o&&o.setAttribute("tabindex","-1"),h(t,i);var l=u(t,e,i,n);if(!l)return!1;l.setAttribute("tabindex","0"),l.focus();var s=a.get(t);return s&&(s.colId=i,s.rowIndex=n,s.navRowIndex=null!=r?r:n),!0}e.activateContentCell=function(t){var e=t.querySelector("input, select");if(e){e.setAttribute("tabindex","0"),e.focus();var i=p.get(e);i&&e.removeEventListener("keydown",i);var n=function(i){"Escape"===i.key&&(i.preventDefault(),e.removeEventListener("keydown",n),p.delete(e),g(t))};e.addEventListener("keydown",n),p.set(e,n)}},e.deactivateContentCell=g,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),v(t,"header",l,s)}}}},e.setZoneCellFocus=v,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&&((0,r.getCellSource)(t).setCell(n,e),t.scrollTo(n,e),(0,r.getCellSource)(t).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=s(t);if(0!==o.length){void 0===n&&(n=d(t,e)-1);var r=f(e,i,n,o);v(t,e,r.colId,r.rowIndex,void 0,n)}},e.isAtFirstRow=function(t){var e;if(t.config.blockSelection){var i=null===(e=t.range)||void 0===e?void 0:e.getRange();if(i)return i.yStart==t.data.getId(0)}else{var n=(0,r.getCellSource)(t).getCell();if(n)return n.row.id==t.data.getId(0)}return!0},e.isAtLastRow=function(t){var e;if(0===t.data.getLength())return!0;var i=t.data.getId(t.data.getLength()-1);if("tree"===t.config.type&&(i=(0,o.getLastChild)(i,t.data)||i),t.config.blockSelection){var n=null===(e=t.range)||void 0===e?void 0:e.getRange();if(n)return n.yEnd==i}else{var a=(0,r.getCellSource)(t).getCell();if(a)return a.row.id==i}return!0},e.hasFooter=function(t){return d(t,"footer")>0},e.getActiveColumnId=function(t){var e;if(t.config.blockSelection){var i=null===(e=t.range)||void 0===e?void 0:e.getRange();if(i)return i.xStart}else{var n=(0,r.getCellSource)(t).getCell();if(n)return n.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.exitThroughSentinel=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)return!1;var a=r.querySelector("forward"===e?".dhx_grid-focus-sentinel--end":".dhx_grid-focus-sentinel");if(!a)return!1;var s=l(t);return s.exiting=!0,a.focus({preventScroll:!0}),s.exiting=!1,!0},e.initFocusSentinel=function(t){var e,i,n,o=l(t);if(!o.initialized){var r=(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(r){var a=r.querySelector(".dhx_grid-focus-sentinel");a&&(a.addEventListener("focus",(function(){if(o.exiting)o.exiting=!1;else{var e=s(t);if(0!==e.length){var i=d(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),v(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");if(r&&!r.getAttribute("data-dhx-initialized")){var a=l(t);r.addEventListener("focus",(function(){if(a.exiting)a.exiting=!1;else{var e=s(t);if(0!==e.length){var i=d(t,"footer");if(i>0){var n=e[e.length-1].id;v(t,"footer",n,i-1)}else{d(t,"header")>0&&v(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(7),a=i(8),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.ActiveCell=void 0;var n=i(1),o=i(7),r=i(17),a=i(3),l=function(){function t(t,e){this._grid=t,this._gridId=e,this._cell=null,this._init()}return t.prototype.setCell=function(t,e){var i,o,a=this;if(!this._grid.config.$editable){this._gridId&&r.focusManager.getFocusId()!==this._gridId&&r.focusManager.setFocusId(this._gridId);var l=this._grid.data.getItem(t&&t.id||t);e||(e=null===(o=null===(i=this._grid.config)||void 0===i?void 0:i.columns)||void 0===o?void 0:o.filter((function(t){return!t.hidden}))[0]);var s=e&&this._grid.getColumn(e.id||e);l&&s&&(this._cell={row:l,column:s},(0,n.awaitRedraw)().then((function(){a._grid.config.$editable||(a._grid.paint(),a._setBrowserFocus())})))}},t.prototype.getCell=function(){return this._cell},t.prototype.restoreFocus=function(){this._setBrowserFocus()},t.prototype.destructor=function(){this._cell=null},t.prototype._init=function(){var t=this;this._grid.events.on(a.GridEvents.cellClick,(function(e,i){t.setCell(e,i)})),this._grid.data.events.on(o.DataEvents.removeAll,(function(){t._cell=null})),this._grid.data.events.on(o.DataEvents.load,(function(){t._cell=null}))},t.prototype._setBrowserFocus=function(){var t,e;if(this._cell){var i=this._grid.getRootNode()||(null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.data)||void 0===e?void 0:e.getRootNode());if(i){var n=this._cell,o=n.row,r=n.column,a=this._grid.getSpan(o.id,r.id),l=a?'.dhx_span-spans [data-dhx-col-id="'.concat(a.column,'"][data-dhx-id="').concat(a.row,'"]'):'[data-dhx-id="'.concat(o.id,'"] [data-dhx-col-id="').concat(r.id,'"]'),s=i.querySelector(l);null==s||s.focus({preventScroll:!0})}}},t}();e.ActiveCell=l},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 I(t){for(t=t||l;null==t.vm&&t.parent;)t=t.parent;return t.vm}function M(){}var H=M.prototype={constructor:M,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 M;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 L=1,j=2,V=4,N=8;function W(e,i,n,o){var r=new M;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|=L}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(I(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&L)===L&&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&L)===L)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&L))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=I(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&N)===N&&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 It=1,Mt=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 Mt;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):It;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===It)break;if(a===Mt)break t}for(;;){var s=At(t,n,o,r,r.lftNode,!1);if(s===It)break;if(s===Mt)break t}Lt(t,n,o,r);break}}function Lt(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)!==Mt;);}function jt(t){return t.el._node.parent!==t.parent}function Vt(t,e,i){return e[i]}function Nt(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(!jt(r)&&t.tag===r.tag&&t.type===r.type&&t.key===r.key&&(t.flags&~L)==(r.flags&~L))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&N)===N;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&N)===N,u=(e.flags&j)===j,h=(e.flags&V)===V,f=!u&&e.type===t,p=!0,g=h?Wt:u||d?Vt:Nt;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 I=R(O.vm);k=(T=O.vm._update(O.data,e,_,I)).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&&jt(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 I(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 M;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 M;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:M,createView:Et,defineElement:Jt,defineSvgElement:te,defineText:P,defineComment:ee,defineView:ne,injectView:re,injectElement:ae,lazyList:le,FIXED_BODY:j,DEEP_REMOVE:L,KEYED_LIST:V,LAZY_LIST:N};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(I(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&N)===N)?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(13),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,!0):[]})).catch((function(t){i._parent.events.fire(a.DataEvents.loadError,[t])}))},e.prototype.parse=function(t,e,i){var s=this;if(void 0===e&&(e=a.DataDriver.json),void 0===i&&(i=!1),"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 c=t.total_count-1,d=t.from;if(t=t.data,0!==this._parent.getLength())return t.forEach((function(t,e){var i=d+e,a=s._parent.getId(i);if((0,o.isId)(a)){var c=s._parent.getItem(a);if(c&&c.$empty){var u=t.id||c.id;(0,l.isDefined)(t.id)&&s._parent.changeId(a,u,!0),s._parent.update(u,n(n({},t),{$empty:void 0}),!0)}}else(0,r.dhxWarning)("item not found")})),this._parent.events.fire(a.DataEvents.afterLazyLoad,[d,t.length]),this._parent.events.fire(a.DataEvents.change),t;for(var u=[],h=0,f=0;h<=c;h++)h>=d&&h<=d+t.length-1?(u.push(t[f]),f++):u.push({$empty:!0});t=u}return this._parent.getInitialData()&&this._parent.removeAll(),this._parent.$parse(t,i),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(40),l=function(){function t(){this._init=[],this._groupSet=new Set,this._groupOrderFields=[],this._nodes=new Map}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._nodes.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(),this._nodes.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,i;return t?{displayMode:t.displayMode||"column",field:t.field||"group",showMissed:null===(e=t.showMissed)||void 0===e||e,showEmptyGroups:null!==(i=t.showEmptyGroups)&&void 0!==i&&i}:this._config},t.prototype.recalculate=function(t,e,i,n){var o=this;void 0===i&&(i=null==e?void 0:e.length),void 0===n&&(n=i);var r=this._nodes.get(null==t?void 0:t.id);if(!r)return null;t.$count=i,t.$totalCount=n;var a={};return r.map&&(Object.keys(r.map).forEach((function(t){a[t]=o._toAggregate(e,r.map[t])})),Object.assign(t,a)),a},t.prototype.hasMap=function(t){var e;return!!(null===(e=this._nodes.get(t))||void 0===e?void 0:e.map)},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,$totalCount:h.length})[u.by]=e,d),p);a._nodes.set(f,u),"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(36),c=i(16),d=i(10),u=i(13);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._reapplyRules(),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.getVisibleIndex=function(t,e){if(void 0===e&&(e=!1),!(0,l.isId)(t))return-1;var i=this._pull[t];if(!i||i.hidden)return-1;for(var n=i;n.parent!==this._root;){var o=this._pull[n.parent];if(!o||o.hidden||!this._isOpened(o))return-1;n=o}var r=this._getRootBounds(),a=r[0],s=r[1];if(this._range){var c=this.getIndex(n.id);if(c<a||c>=s)return-1}return e?this._getFlatVisibleIndex(i,a):this._getBranchVisibleIndex(i,a,s)},e.prototype.sort=function(t,e,i){var n,o;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=t?[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 l=this._sortingStates.findIndex((function(e){return e.by==t.by}));-1!==l?this._sortingStates[l].dir=t.dir:this._sortingStates.push(r({},t))}this._applySorters()}else this._initSortOrder&&this._resetSorting();i||(this._reapplyRules(),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((null==e?void 0:e.$restore)&&(null==e?void 0:e.add)||this._recalculateGroups(),!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=a([],this._children[e],!0),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=a([],this._children[e],!0),r=0;r<o.length;r++)if(n.push(t.call(this,o[r],r,this._children)),i){var l=this.map(t,o[r].id,i);n=n.concat(l)}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._isOpened=function(t){return Boolean(t.$opened||t.opened)},e.prototype._getRootBounds=function(){var t,e=(null===(t=this._children[this._root])||void 0===t?void 0:t.length)||0;return this._range?[this._range[0],Math.min(this._range[1],e)]:[0,e]},e.prototype._getBranchVisibleIndex=function(t,e,i){var n,o,r=this._children[t.parent];if(!r)return-1;for(var a=t.parent===this._root,l=a?e:0,s=a?i:r.length,c=0,d=l;d<s;d++){if((null===(n=r[d])||void 0===n?void 0:n.id)==t.id)return c;(null===(o=r[d])||void 0===o?void 0:o.hidden)||c++}return-1},e.prototype._getFlatVisibleIndex=function(t,e){for(var i=0,n=t;n;){var o=this._children[n.parent];if(!o)return-1;var r=n.parent===this._root,a=o.findIndex((function(t){return(null==t?void 0:t.id)==n.id}));if(-1===a)return-1;for(var l=r?e:0;l<a;l++)i+=this._getVisibleCount(o[l]);if(r)return i;i++,n=this._pull[n.parent]}return-1},e.prototype._getVisibleCount=function(t){if(!t||t.hidden)return 0;var e=1,i=this._children[t.id];if(i&&this._isOpened(t))for(var n=0,o=i;n<o.length;n++){var r=o[n];e+=this._getVisibleCount(r)}return e},e.prototype.flatten=function(t){var e=this,i=[];return t.forEach((function(t){i.push(t);var n=e._children[t.id];n&&e._isOpened(t)&&(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.changeId=function(e,i,n){return e==this._root||(0,l.isDefined)(i)&&i==this._root?((0,d.dhxWarning)("the root id can't be changed"),e):t.prototype.changeId.call(this,e,i,n)},e.prototype._changeIdCore=function(e,i){t.prototype._changeIdCore.call(this,e,i),[this._children,this._initChildren].forEach((function(t){if(t&&t[e]){t[i]=t[e],delete t[e];for(var n=0,o=t[i];n<o.length;n++){o[n].parent=i}}}))},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),e===this._order&&(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)}},s=this._group.isGrouped(),c=function(t){return s&&Boolean(t.$group||t.$groupSummary)};if("function"==typeof t){var d=function(e){return c(e)||l(e)&&t(e)};(h=a.filter(d)).length?o[i]=h:i===this._root&&(o[i]=[])}else{var h;d=function(e){var i;if(c(e))return!0;var 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,t[o].multi):-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};(h=a.filter(d)).length?o[i]=h:i===this._root&&(o[i]=[])}for(var f=0,p=a;f<p.length;f++){var g=p[f];this._recursiveFilter(t,e,g.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._recalculateGroups=function(){var t,e=this;if(this._group.isGrouped()){var i=this._initChildren?this._countTreeGroups(this._initChildren):null,n=[],o=new Set,r=function(t){var a=n.length,l=e._children[t];if(l)for(var s=0,c=l;s<c.length;s++){var d=c[s];d.$groupSummary||(d.$group?r(d.id):n.push(d))}var u=e._pull[t];if(null==u?void 0:u.$group){var h=n.length-a,f=e._group.recalculate(u,e._group.hasMap(t)?n.slice(a):null,h,i?i.get(t)||0:h);if(f){var p=e._pull["".concat(t,":summary")];p&&Object.assign(p,f)}h||o.add("".concat(t))}};r(this._root),o.size&&!(null===(t=this._group.getGroupConfig())||void 0===t?void 0:t.showEmptyGroups)&&this._dropGroups(o)}},e.prototype._countTreeGroups=function(t){var e=this,i=new Map,n=function(o){var r,a=0,l=t[o];if(l)for(var s=0,c=l;s<c.length;s++){var d=c[s];d.$groupSummary||(a+=d.$group?n(d.id):1)}return(null===(r=e._pull[o])||void 0===r?void 0:r.$group)&&i.set(o,a),a};return n(this._root),i},e.prototype._dropGroups=function(t){var e=this;if(this._initChildren){var i=new Set;t.forEach((function(t){var n,o=null===(n=e._pull[t])||void 0===n?void 0:n.parent;(0,l.isDefined)(o)&&i.add(o),delete e._children[t]})),i.forEach((function(i){var n=e._children[i];if(n){var o=n.filter((function(e){return!t.has("".concat(e.id))}));o.length||i===e._root?e._children[i]=o:delete e._children[i]}}))}else t.forEach((function(t){return e._removeCore(t)}))},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._resetSorting=function(){var t=this;this._sortingStates=[],this._sorter=null,this._initSortOrder&&(this._children={},this._order=[],this._initSortOrder.forEach((function(e){return t._parseItem(e)})),this._initSortOrder=this._initChildren=null,this._initFilterOrder&&(this._initFilterOrder=null,this.filter(null,{$restore:!0},!0)))},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(81),l=i(13),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),I=h.getIndex(e.id),M=h.getParent(t.id),H=h.getParent(e.id);p=h.getParent(p),"top"===R?f=I-(-1===T||T>I||M!==H?0:1):"bottom"===R&&(f=I+(-1===T||T>I||M!==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),I=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===$?I-(-1===T||T>I?0:1):I):"bottom"===R&&(p=h.getParent(p),f=A===$?I+(-1===T||T>I?1:0):I+1)}break;default:if((0,c.isId)(e.id)){h.getIndex(t.id)>-1&&(t.newId=(0,c.uid)());T=h.getIndex(t.id),I=h.getIndex(e.id);f="top"===R?I-(-1===T||T>I?0:1):"bottom"===R?I+(-1===T||T>I?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 L=r.data.getItem(t.id);a.data.parse([n({},L)]),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(16),a=i(0),l=i(25),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(19),r=i(13),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(t,e,i,n){if(n&&(0,a.isId)(n.oldId)&&n.oldId===o._selected)o._selected=t;else if((0,a.isId)(o._selected)){var r=o._data.getNearId(o._selected);r!==o._selected&&(o._selected=null,r&&o.add(r))}}))}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(27),h=i(11),f=i(7),p=i(85),g=i(4),v=i(12),_=i(15),m=i(43),y=i(5),b=i(91),x=i(92),w=i(3),C=i(93),S=i(8),E=i(23),D=i(126),O=i(127),k=i(22),R=i(130),T=i(131),I=i(29),M=i(18),H=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 b.PrefixSums,o._colWidths=new b.PrefixSums,o._rowHeightsRebuild=!0,o._observedEl=null,o._liveRegion=null,o._commonSummary={},o._colSummary={},o.version="9.4.1",o.name="grid",o.config=(0,d.extend)({rowHeight:M.DEFAULT_ROW_HEIGHT,headerRowHeight:M.DEFAULT_ROW_HEIGHT,footerRowHeight:M.DEFAULT_ROW_HEIGHT,keyNavigation:!0,sortable:!0,columns:[],data:[],tooltip:!0,rootParent:"string"==typeof e&&e||o._uid},o._normalizeConfig(i)),o.content=(0,E.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 x.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.config.keyNavigation||o.config.selection||o.config.blockSelection||o.config.rangeSelection||o.config.clipboard||(o.$activeCell=new T.ActiveCell(o,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,e,i,n;this._destructed=!0,null===(t=this.getRootNode())||void 0===t||t.removeEventListener("focusin",this._tooltipFocusHandler),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),this._cachedSizes=null,this._observedEl=null,this._rowHeights=null,this._colWidths=null,null===(i=null===(e=this._liveRegion)||void 0===e?void 0:e.parentNode)||void 0===i||i.removeChild(this._liveRegion),this._liveRegion=null,this._destroyContent(),null===(n=this.config.$subRowCells)||void 0===n||n.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.$activeCell&&this.$activeCell.destructor(),this.export=this.content=this.selection=this.$activeCell=null,this._tooltipFocusHandler=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,y.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(w.GridEvents.beforeColumnShow,[e])&&(this._showColumn(e),this.events.fire(w.GridEvents.afterColumnShow,[e]))},e.prototype.hideColumn=function(t){var e=this.getColumn(t);e&&!e.hidden&&this.events.fire(w.GridEvents.beforeColumnHide,[e])&&(this._hideColumn(e),this.events.fire(w.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(w.GridEvents.beforeRowShow,[i])&&(this.data.update(e,{hidden:!1}),this._rowHeightsRebuild=!0,this._checkFilters(!0),this.paint(),this.events.fire(w.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(w.GridEvents.beforeRowHide,[i])&&(this.data.update(e,{hidden:!0}),this._rowHeightsRebuild=!0,this._checkFilters(!0),this._checkSelectFilterValue(),this.paint(),this.events.fire(w.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=i.$footerHeight,u=r.filter((function(t){return!t.hidden})),h=this.data.getRawData(0,-1,null,2),f=u.findIndex((function(t){return t.id==e})),p=h.findIndex((function(e){return e.id==t}));if((0,d.isDefined)(f)&&(0,d.isDefined)(p)){var v=this.getScrollState(),m=(0,_.getCellSource)(this).getCell(),y=m&&r.findIndex((function(t){return t.id==m.column.id})),b=m&&h.findIndex((function(t){return t.id==m.row.id})),x=(0,S.getCurrFixedCols)(this.config,w.Split.left).length,C=(0,S.getCurrFixedCols)(this.config,w.Split.right).length,E=x&&y<x,D=C&&y>=r.length-C,O=n&&b<n,k=o&&b>=h.length-o,R=(0,g.colsWidth)(this.config,u,0,f),T=(0,g.rowsHeight)(this.config,h,0,p),I=(0,g.getTotalRowHeight)(h[p]);if(x){var M=(0,g.colsWidth)(this.config,u,0,x);(!E&&!D&&f<y||R-v.x-M<0)&&(R-=M)}if(C){var H=(0,g.colsWidth)(this.config,u,u.length-C,u.length);(!E&&!D&&f>y||a+v.x-R-u[f].$width-H<0)&&(R+=H)}if(n){var P=(0,g.rowsHeight)(this.config,h,0,n);(!O&&!k&&p<b||T-v.y-P<0)&&(T-=P)}if(o){var F=(0,g.rowsHeight)(this.config,h,h.length-o,h.length);(!O&&!k&&p>b||l+v.y-s-T-I-F<0)&&(T+=F)}var A=a+v.x,$=l+v.y-s-c,L=r[f].$width,j=T-v.y,V=R-v.x,N=T+2*I+18-$,W=R+L+18-A,z=j>=0&&N<0?0:j<0?j:N,B=V>=0&&W<0?0:V<0?V:W;this.scroll(B+v.x,z+v.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,S.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-S.BORDERS}}return{x:c,y:u,height:(null==a?void 0:a.rowspan)>1?(0,_.getSpanHeight)(r,a):(0,g.getTotalRowHeight)(r[s])||0,width:(null==a?void 0:a.colspan)>1?(0,_.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,k.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(w.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.$activeCell?this.$activeCell.setCell(t.toString(),e.toString()):this.selection.config.disabled||this.selection.setCell(t.toString(),e.toString()),this.paint(),this.events.fire(w.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.announce=function(t){if(!this._destructed){var e=this._getLiveRegion();if(e)if(t){var i=t.replace("​","");e.textContent=e.textContent===i?i+"​":i}else e.textContent=""}},e.prototype._getLiveRegion=function(){if(this._liveRegion)return this._liveRegion;var t=this.getRootNode(),e=t&&t.parentNode;if(!e)return null;var i=document.createElement("div");return i.className="dhx_grid-live-region dhx_visually-hidden",i.setAttribute("role","status"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),e.insertBefore(i,t.nextSibling),this._liveRegion=i,i},e.prototype.getSortingState=function(){var t,e=null===(t=this._sortingStates)||void 0===t?void 0:t[0];return{dir:null==e?void 0:e.dir,by:null==e?void 0: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,C.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 R.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){for(var e,i=t.config,n=t.columns,o=t.configChanged,r=0,a=n;r<a.length;r++){var l=a[r];l.htmlEnable=null!==(e=l.htmlEnable)&&void 0!==e?e:i.htmlEnable,l.$cellCss=l.$cellCss||{},(0,g.normalizeArray)(l,"header"),(0,g.normalizeArray)(l,"footer"),l.minWidth&&l.minWidth<20&&(l.minWidth=20),l.maxWidth&&l.maxWidth<20&&(l.maxWidth=20);var s=l.minWidth||100;l.width&&(s=(s=l.maxWidth&&l.minWidth?l.width>=l.minWidth&&l.width<=l.maxWidth?l.width:l.width>=l.maxWidth?l.maxWidth:l.minWidth:l.maxWidth?l.width<=l.maxWidth?l.width:l.maxWidth>100?l.maxWidth:100:l.minWidth?l.width>=l.minWidth?l.width:l.minWidth:l.width)<20?20:s),l.$width=l.$width&&!o?l.$width:s,l.$width>l.maxWidth&&(l.$width=l.maxWidth),l.$width<l.minWidth&&(l.$width=l.minWidth)}this._buildFixedRowsHeightMap(i,n,"header"),this._buildFixedRowsHeightMap(i,n,"footer"),i.$headerHeight=i.$headerHeightMap.reduce((function(t,e){return t+e}),0),i.$footerHeight=i.$footerHeightMap.reduce((function(t,e){return t+e}),0)},e.prototype._buildFixedRowsHeightMap=function(t,e,i){for(var n,o=[],r=[],a=e.reduce((function(t,e){var n;return Math.max(t,(null===(n=e[i])||void 0===n?void 0:n.length)||0)}),0),l=0;l<a;l++){var s=this._resolveFixedRowLevel(i,l,t),c=s.height,d=s.auto,u=c;if(d)for(var h=0,f=e;h<f.length;h++){var p=f[h],g=null===(n=p[i])||void 0===n?void 0:n[l];g&&(u=Math.max(u,this.getNormalizeContentHeight(g,p,t)))}o[l]=u,r[l]=d}"header"===i?(t.$headerHeightMap=o,t.$headerAutoHeightMap=r):(t.$footerHeightMap=o,t.$footerAutoHeightMap=r)},e.prototype._resolveFixedRowLevel=function(t,e,i){return{height:(0,g.resolveFixedRowHeight)(i["".concat(t,"RowHeight")],e).height,auto:!1}},e.prototype.getNormalizeContentHeight=function(t,e,i){return M.DEFAULT_ROW_HEIGHT},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._setHTMLEventHandlers=function(){var t=this,e=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,y.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,y.showTooltip)(d,r({node:e,htmlEnable:(0,y.isHtmlEnable)(t.config,l,s)},(0,y.getTooltipConfig)(t.config,l,s,i)))}}},i=[{className:"dhx_grid-header-cell",action:function(t){return e(t,"header")}},{className:"dhx_grid-footer-cell",action:function(t){return e(t,"footer")}},{className:"dhx_grid-cell",action: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,y.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,y.showTooltip)(d,r({node:e,htmlEnable:(0,y.isHtmlEnable)(t.config,n)},(0,y.getTooltipConfig)(t.config,n)))}}},{className:"dhx_span-cell",action: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,y.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,y.showTooltip)(s,r({node:e,htmlEnable:(0,y.isHtmlEnable)(t.config,n)},(0,y.getTooltipConfig)(t.config,null,a)))}}}],n=function(t){for(var e=0,n=i;e<n.length;e++){var o=n[e],r=o.className,a=o.action,l=(0,c.locateNodeByClassName)(t,r);if(l){a(l);break}}};this._tooltipFocusHandler=n,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,y.isSortable)(t.config,o)&&!n){if((0,y.isInteractiveTarget)(e.target))return;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(w.GridEvents.expand,[i])},"dhx_span-expand-cell":function(e,i){e.target.classList.contains("dhx_span-expand-cell-icon")&&t.events.fire(w.GridEvents.expand,[i])}}),onscroll:function(e){t.events.fire(w.GridEvents.scroll,[{y:e.target.scrollTop,x:e.target.scrollLeft}])},onmouseover:n}},e.prototype._setEventHandlers=function(){var t=this;this.data.events.on(f.DataEvents.load,(function(){if(t._applyLocalFilter(!0),t._setSort(),t._resetFilterUI(),t._parseData(),t._checkFilters(),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.announce((0,v.getLocaleString)("aria_rowsLoaded",{count:t.data.getLength()})),t.paint()})),this.data.events.on(f.DataEvents.change,(function(e,i,n,o){if(o&&(0,d.isId)(o.oldId)&&t._remapRowId(o.oldId,e),"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 r=t.data.find({by:"$emptyRow",match:!0});if(r){if(r.id===e)return;t.data.move(r.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(){(0,d.isEmptyObj)(t._activeFilters)||t.data.resetFilter(),t._resetFilterUI()})),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(w.GridEvents.beforeRowDrag,[e,i])})),this.events.on(f.DragEvents.dragStart,(function(e,i,n){if("row"===n)t.events.fire(w.GridEvents.dragRowStart,[e,i]),t._autoScroll("vertical")})),this.events.on(f.DragEvents.dragIn,(function(e,i,n){if("row"===n)t.events.fire(w.GridEvents.dragRowIn,[e,i])})),this.events.on(f.DragEvents.dragOut,(function(e,i,n){if("row"===n)t.events.fire(w.GridEvents.dragRowOut,[e,i])})),this.events.on(f.DragEvents.canDrop,(function(e,i,n){if("row"===n)t.events.fire(w.GridEvents.canRowDrop,[e,i])})),this.events.on(f.DragEvents.cancelDrop,(function(e,i,n){if("row"===n)t.events.fire(w.GridEvents.cancelRowDrop,[e,i])})),this.events.on(f.DragEvents.beforeDrop,(function(e,i,n){if("row"===n)return t.events.fire(w.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(w.GridEvents.afterRowDrop,[e,i])}})),this.events.on(f.DragEvents.afterDrag,(function(e,i,n){if("row"===n)t.events.fire(w.GridEvents.afterRowDrag,[e,i]),t._normalizeSpans()})),this.events.on(w.GridEvents.dragPanelItemMouseDown,(function(e,i){t._dragProcess(i,t.data.getItem(e))})),this.events.on(w.GridEvents.cellMouseDown,(function(e,i,n){!t.config.dragPanel&&t._dragProcess(n,e,i)})),this._events.on(w.GridSystemEvents.cellTouchMove,(function(e,i,n){t._touch.start&&n.preventDefault(),t._clearTouchTimer()})),this._events.on(w.GridSystemEvents.cellTouchEnd,(function(){t._touch.start=!1,t._clearTouchTimer()})),this._events.on(w.GridSystemEvents.announce,(function(e){t.announce(e)})),this.events.on(w.GridEvents.filterChange,(function(e,i,n,o){var r,a,l;if(t.events.fire(w.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),u=c.header.filter((function(t){return t.content===n&&void 0!==t.customFilter}))[0];if("comboFilter"===n&&void 0!==e||"comboFilter"!==n&&""!==e){var h=(0,g.getEditorOptions)(c);c.$filterOptions||"combobox"!==c.editorType&&"select"!==c.editorType&&"multiselect"!==c.editorType||!h||(e=Array.isArray(e)?e.map((function(t){var e;return(null===(e=h.find((function(e){return"string"==typeof e?e===t:e.value===t})))||void 0===e?void 0:e.id)||t})):null!==(a=null===(r=h.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==u?void 0:u.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),t.announce((0,v.getLocaleString)((0,d.isEmptyObj)(t._activeFilters)?"aria_filterCleared":"aria_filterApplied",{count:t.data.getLength()})))}})),this.events.on(w.GridEvents.scroll,(function(e){t._scroll={top:e.y,left:e.x},t.paint()})),this.events.on(w.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(w.GridEvents.afterEditEnd,(function(e,i,n){t._afterEditEndProcess(e,i,n)})),this.events.on(w.GridEvents.headerCellMouseDown,(function(e,i,n){var o=n.target.getAttribute("dhx_resized");if(o&&t.events.fire(w.GridEvents.beforeResizeStart,[i,n])&&(0,D.startResize)(t,o.toString(),n,(function(){t.paint(),t.config.$resizing=null,t.events.fire(w.GridEvents.afterResizeEnd,[i,n])})),n.targetTouches){if(t._touch.timeStamp)t._touch.dblDuration>=t._touch.timeStamp-+n.timeStamp.toFixed()&&(n.preventDefault(),t.events.fire(w.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(w.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(w.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(w.GridEvents.resize,(function(){return t._parseColumns()})),this.events.on(w.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),this.config.$editable=null;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.paint(),(0,l.awaitRedraw)().then((function(){var t;(0,m.isFocusInBody)(a)&&(null===(t=(0,_.getCellSource)(a))||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,y.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(w.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,S.getNormalizeDateObject)(t,n.dateFormat).getTime():t?"".concat(t):""}},{smartSorting:i}),this.announce((0,v.getLocaleString)("asc"===r?"aria_sortedAscending":"aria_sortedDescending",{column:n?(0,g.getColumnHeaderText)(n):"".concat(t)})),this.events.fire(w.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=(0,g.getFilterOptions)(i,n.content);if(Array.isArray(r))return void(t||(i.$filterOptions=(0,g.resolveFilterOptions)(i,n.content),i.$uniqueData=i.$filterOptions.map((function(t){return t.id})),i.$activeFilterData&&delete i.$activeFilterData));var a=i.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.multiselection})),l=i.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.filter}));if(!t||t&&!l){var s=(0,g.getNormalizeFilterData)(e._filterData,i.id,a,i.editorType),c=(0,g.getEditorOptions)(i);"combobox"!==i.editorType&&"select"!==i.editorType&&"multiselect"!==i.editorType||!c||(s=s.map((function(t){var e=c.find((function(e){return"string"==typeof e?t===e:t===e.id}));return e&&"string"!=typeof e?e.value:t}))),s="string"!==i.type?Array.from(new Set(s.map((function(t){return(0,g.applyPattern)(t,i)})))):s,r&&(i.$filterOptions=(0,g.resolveFilterOptions)(i,n.content,s),s=i.$filterOptions.map((function(t){return t.id}))),t?i.$activeFilterData=s:(i.$uniqueData=s,i.$activeFilterData&&delete i.$activeFilterData)}}}))}))},e.prototype._checkSelectFilterValue=function(){var t,e,i=null===(t=this.content)||void 0===t?void 0:t.selectFilter;if(i)for(var n in i.value){var o=this.getColumn(n),r=i.value[n];o.hidden||!r||(null===(e=o.$uniqueData)||void 0===e?void 0:e.includes(r))||i.element[n].clear()}},e.prototype._resetFilterUI=function(){this._activeFilters={},this._hiddenFilters={},this.config.columns.forEach((function(t){var e;null===(e=t.header)||void 0===e||e.forEach((function(e){!e.content||"selectFilter"!==e.content&&"comboFilter"!==e.content||(t.$uniqueData=t.$filterOptions?t.$filterOptions.map((function(t){return t.id})):[])}))})),this._clearFilterValue(!0)},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(m=(0,g.getMaxColsWidth)(this._prepareColumnData(u,"header"),u,{font:"normal 14.4px Arial"},"header"))for(var h=0,f=Object.entries(m);h<f.length;h++){var p=f[h],v=p[0],_=p[1];d=Object.assign(d,((e={})[v]=+_+24+(o=this.getColumn(v),(0,y.isSortable)(r.config,o)?16:0),e))}}if("footer"===c||!0===c){var m;u=l.filter((function(t){return t.footer}));if(m=(0,g.getMaxColsWidth)(this._prepareColumnData(u,"footer"),u,{font:"normal 14.4px Arial"},"footer"))for(var b=0,x=Object.entries(m);b<x.length;b++){var w=x[b];v=w[0],_=w[1];(d[v]&&d[v]<+_+24||!d[v])&&(d=Object.assign(d,((i={})[v]=+_+24,i)))}}if(("data"===c||!0===c)&&(m=(0,g.getMaxColsWidth)(a,l,{font:"normal 14.4px Arial"},"data")))for(var C=0,S=Object.entries(m);C<S.length;C++){var E=S[C];v=E[0],_=E[1];(d[v]&&d[v]<+_+24||!d[v])&&(d=Object.assign(d,((n={})[v]=+_+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,y.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 _=v[g],m=_[0],b=_[1];a[p]=r({},a[p])||{},a[p]=Object.assign(a[p],((i={})[m]=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(w.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,S.getCurrFixedCols)(this.config,w.Split.left),l=(0,S.getCurrFixedCols)(this.config,w.Split.right),s=(0,S.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,I.getRowNode)(i,r);if(!u)return"continue";var h=n>o-s.y?o-s.y-S.BORDERS:n;if(a.length||l.length){var f=new Array(3);if(f[1]=u,a.length){var p=(0,I.getRowNode)(i,r,"left");h-=p.offsetWidth,f[0]=p}if(l.length){var g=(0,I.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,y.getTotalWidth)(a)-S.BORDERS/2;v.appendChild((0,I.getVisibleRowNode)(e,h,i))}else e.removeAttribute("aria-rowindex"),e.removeAttribute("data-dhx-index"),e.style.width=t.offsetWidth+"px",v.appendChild(e)}})),{value:v}}var _=u.cloneNode(!0);d.push((0,I.getVisibleRowNode)(_,h,(0,c.getNodeOffset)(u,r).left-S.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(){var e;null===(e=t.getRootNode())||void 0===e||e.addEventListener("focusin",t._tooltipFocusHandler),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(w.GridEvents.beforeKeyDown,[e]))&&(t.events.fire(w.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,k.normalizeSpan)(t,e.config,e.data)}))},e.prototype._remapRowId=function(t,e){var i,n,o;null===(i=this.config.spans)||void 0===i||i.forEach((function(i){"".concat(i.row)==="".concat(t)&&(i.row=e)})),null===(n=this.config.columns)||void 0===n||n.forEach((function(i){i.$cellCss&&(0,d.isDefined)(i.$cellCss[t])&&(i.$cellCss[e]=i.$cellCss[t],delete i.$cellCss[t])})),null===(o=this.selection)||void 0===o||o.remapRows(),this._normalizeSpans()},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.$group&&!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&&((0,d.isDefined)(t.$cellCss)||(t.$cellCss={}),(0,d.isDefined)(t.$cellCss[r.id])||(t.$cellCss[r.id]=""),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,O.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)||M.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,C.getElementSizes)(o),a=null===(n=this.scrollView)||void 0===n?void 0:n.config.enable;(0,C.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=H},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(7),c=i(0),d=i(14),u=i(2),h=i(1),f=i(21),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 I=n(n({},$),{format:R});S&&(I.align=S),I["font-weight"]=I.bold?"bold":"normal",I.fontSize&&(I.fontSize="".concat(I.fontSize,"px")),w.set(T,{css:n(n({},w.get("default").css),I),index:w.size})}C.has("col_".concat(D))||C.set("col_".concat(D),T)}for(var M 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[M].trim()," ").concat(k),P=v(H),F="dhx_grid-row";if(E[M]&&(F+=" ".concat(E[M].trim())),!w.has(P))if($=(0,l.getStyleByClass)(H,F,w.get("default"))){I=n(n(n({},w.get("default").css),$),{format:R});S&&(I.align=S),I["font-weight"]=I.bold?"bold":"normal",I.fontSize&&(I.fontSize="".concat(I.fontSize,"px")),w.set(P,{css:n({},I),index:w.size})}w.has(P)&&C.set("".concat(h[M],"_").concat(D),P)}for(var M in E)if(!(m||{})[M]){var A="".concat(E[M]," format:").concat(R);S&&(A+=" align:".concat(S));var $,L=v(A);F="dhx_grid-row ".concat(E[M].trim());if(!w.has(L))if($=(0,l.getStyleByClass)("dhx_grid-cell",F,w.get("default"))){I=n(n(n({},w.get("default").css),$),{format:R});S&&(I.align=S),I["font-weight"]=I.bold?"bold":"normal",I.fontSize&&(I.fontSize="".concat(I.fontSize,"px")),w.set(L,{css:n({},I),index:w.size})}w.has(L)&&C.set("".concat(h[M],"_").concat(D),L)}},R=0,T=s;R<T.length;R++){k(T[R])}var I=[];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",I.push(n(n({},e),{id:t.index.toString()}))})),I[0].format="#";var M=[];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}}))}));M.push.apply(M,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(M.push.apply(M,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}}))}));M.push.apply(M,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:M,cols:b,rows:D,merged:x}],styles:I}},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(87),e),o(i(88),e),o(i(89),e),o(i(90),e),o(i(28),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(28),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(41),o=i(42),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 o="dhx_alert__".concat((0,r.uid)(),"_content"),l="dhx_alert__".concat((0,r.uid)(),"_header"),s=document.createElement("div");s.setAttribute("role","alertdialog"),s.setAttribute("aria-modal","true"),e.text&&s.setAttribute("aria-describedby",o),e.header?s.setAttribute("aria-labelledby",l):s.setAttribute("aria-label",n.default.aria_alert),s.className="dhx_widget dhx_alert "+(e.css||"");var c=function(e){"Escape"!==e.key&&"Esc"!==e.key||(d(e),t(!1))};function d(t){t.preventDefault(),a(),document.body.removeChild(s),document.removeEventListener("keydown",c)}s.innerHTML="\n\t\t\t".concat(e.header?"<div id=".concat(l,' class="dhx_alert__header"> ').concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t\t").concat(e.text?"<div id=".concat(o,' 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="').concat(n.default.aria_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&&(s.querySelector("#".concat(l)).textContent=e.header),e.text&&(s.querySelector("#".concat(o)).textContent=e.text)),document.body.appendChild(s),s.querySelector(".dhx_alert__apply-button").focus(),s.querySelector("button").addEventListener("click",(function(e){d(e),t(!0)})),document.addEventListener("keydown",c)}))}}).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(41),o=i(42),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 o=document.createElement("div");o.setAttribute("role","alertdialog"),o.setAttribute("aria-modal","true");var s,c=e.header&&(0,r.uid)(),d=e.header&&(0,r.uid)();d&&o.setAttribute("aria-describedby",d),c&&o.setAttribute("aria-labelledby",c);var u=function(e){l(),o.removeEventListener("click",h),document.removeEventListener("keydown",f),document.body.removeChild(o),t(e)},h=function(t){"BUTTON"===t.target.tagName&&u(t.target.classList.contains("dhx_alert__confirm-aply"))},f=function(t){"Escape"===t.key||"Esc"===t.key?(o.querySelector(".dhx_alert__confirm-aply").focus(),u(t.target.classList.contains("dhx_alert__confirm-reject"))):"Tab"===t.key&&("aply"===s?(s="reject",o.querySelector(".dhx_alert__confirm-reject").focus()):(s="aply",o.querySelector(".dhx_alert__confirm-aply").focus()),t.preventDefault())};o.className="dhx_widget dhx_alert dhx_alert--confirm"+(e.css?" "+e.css:""),o.innerHTML="\n\t\t".concat(e.header?'<div class="dhx_alert__header" id='.concat(c,"> ").concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t").concat(e.text?'<div class="dhx_alert__content" id='.concat(d,">").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="').concat(n.default.aria_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="').concat(n.default.aria_apply,'" 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&&(o.querySelector("#".concat(c)).textContent=e.header),e.text&&(o.querySelector("#".concat(d)).textContent=e.text)),document.body.appendChild(o),s="aply",o.querySelector(".dhx_alert__confirm-aply").focus(),o.addEventListener("click",h),document.addEventListener("keydown",f)}))}}).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(28),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,v=null;function _(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?_(t.offsetParent):null}function m(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,v=p.top,m=p.pos,y=_(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=v+"px"}c.className+=" dhx_tooltip--".concat(m),f=!0,o||setTimeout((function(){c.className+=" dhx_tooltip--animate"}))}function y(){p&&(clearTimeout(p),p=null)}function b(){c.parentNode&&c.parentNode.removeChild(c),f=!1}function x(t){p=setTimeout((function(){b(),p=null}),t||l)}function w(t,e,i){var n=i.force,o=i.showDelay,l=i.hideDelay,s=i.position,c=i.css,d=i.htmlEnable,p=i.margin;v=l,n||(g=setTimeout((function(){m(t,e,s||r.Position.bottom,c,!1,p,d)}),o||a));var _=function(t){"Escape"===t.key&&(clearTimeout(g),y(),b())},w=function(){var e;f&&(e=l,h&&x(e)),clearTimeout(g),t.removeEventListener("mouseleave",w),t.removeEventListener("blur",w),document.removeEventListener("mousedown",w),document.removeEventListener("keydown",_),h=null,u=null};n&&m(t,e,s,c,n,p,d),t.addEventListener("mouseleave",w),t.addEventListener("blur",w),document.addEventListener("mousedown",w),document.addEventListener("keydown",_),u=w}function C(t,e){var i=(0,o.toNode)(e.node);i!==h&&(u&&(u(),u=null),h=i,p?(clearTimeout(p),p=null,w(i,t,n(n({},e),{force:!0}))):w(i,t,e))}function S(t){var e=(0,o.locateNode)(t,"dhx_tooltip_text");e&&C(e.getAttribute("dhx_tooltip_text"),{position:e.getAttribute("dhx_tooltip_position")||r.Position.bottom,node:e})}e.getZIndex=_,c.addEventListener("mouseenter",y),c.addEventListener("mouseleave",(function(){f&&x(v)})),e.tooltip=C,e.enableTooltip=function(){document.addEventListener("mousemove",S),document.addEventListener("focusin",S)},e.disableTooltip=function(){document.removeEventListener("mousemove",S),document.removeEventListener("focusin",S)}},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(7),s=i(0),c=i(6),d=i(3),u=i(17),h=i(8),f=i(5),p=i(15),g=i(29),v=i(4);!function(t){t.beforeUnSelect="beforeUnSelect",t.afterUnSelect="afterUnSelect",t.beforeSelect="beforeSelect",t.afterSelect="afterSelect"}(r||(e.GridSelectionEvents=r={}));var _=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.remapRows=function(){this._selectedSet.clear();for(var t=0,e=this._selectedCells;t<e.length;t++){var i=e[t];(null==i?void 0:i.row)&&(null==i?void 0:i.column)&&this._selectedSet.add(this._cellKey(i.row.id,i.column.id))}},t.prototype.toHTML=function(){var t=this;if(!this._isUnselected()){if(this.config.multiSelection){var e=[],i=[],n=new Set,r=[];if(this._selectedCells.forEach((function(e,i){var o=(0,p.normalizeCell)(e,t._grid),a=String(o.row.id)+"_"+String(o.column.id);n.has(a)||(n.add(a),r.push({nCell:o,index:i,layout:t._getSelectionLayout(o.row,o.column),span:t._grid.getSpan(o.row.id,o.column.id)}))})),"row"===this.config.type||"complex"===this.config.type){var l=new Set,s=new Set;r.forEach((function(i){var n=i.nCell,o=i.layout,r=i.span;if(o&&(null==r?void 0:r.rowspan)&&!(r.rowspan<=1)){var c=String(n.row.id);if(!l.has(c)){l.add(c),e.push((0,a.el)(".dhx_grid-selection",{style:{zIndex:20}},[(0,a.el)(".dhx_grid-selected-row",{style:o.rowStyle})]));for(var d=t._grid.data.getIndex(r.row),u=0;u<r.rowspan;u++){var h=t._grid.data.getId(d+u);void 0!==h&&s.add(String(h))}}}})),r.forEach((function(t){var i=t.nCell,n=t.layout,o=t.span;if(n&&!((null==o?void 0:o.rowspan)>1)){var r=String(i.row.id);l.has(r)||s.has(r)||(l.add(r),e.push((0,a.el)(".dhx_grid-selection",{style:{zIndex:20}},[(0,a.el)(".dhx_grid-selected-row",{style:n.rowStyle})])))}}))}return r.forEach((function(e){var n=e.index,o=e.layout;if(o){var r=n===t._selectedCells.length-1||"cell"===t.config.type||"complex"===t.config.type;"cell"!==t.config.type&&"complex"!==t.config.type||!r||i.push((0,a.el)(".dhx_grid-selection",{style:{zIndex:20}},[(0,a.el)(".dhx_grid-selected-cell",{style:o.cellStyle})]))}})),o(o([],e,!0),i,!0)}var c=(0,p.normalizeCell)(this._selectedCell,this._grid);return this._toHTML(c.row,c.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){void 0===i&&(i=!1),void 0===n&&(n=!1);var o=this._getSelectionLayout(t,e);if(!o)return null;var r=null;"row"!==this.config.type&&"complex"!==this.config.type||n||(r=(0,a.el)(".dhx_grid-selected-row",{style:o.rowStyle}));var l=null;return"cell"!==this.config.type&&"complex"!==this.config.type||!i||(l=(0,a.el)(".dhx_grid-selected-cell",{style:o.cellStyle})),(0,a.el)(".dhx_grid-selection",{style:{zIndex:20}},[r,l])},t.prototype._getSelectionLayout=function(t,e){var i,n,o,r,a,l,c,u,p,g,_,m,y,b=this._grid.data.getRawData(0,-1,null,2);if(-1===(0,s.findIndex)(b,(function(e){return e.id==t.id})))return null;var x=this._grid.config,w=x.topSplit,C=x.bottomSplit,S=x.$totalWidth,E=x.$totalHeight,D=x.columns,O=null==D?void 0:D.filter((function(t){return!t.hidden})),k={left:(0,h.getCurrFixedCols)(this._grid.config,d.Split.left),right:(0,h.getCurrFixedCols)(this._grid.config,d.Split.right)},R=this._grid.data.getLength(),T={top:w?this._grid.data.getRawData(0,w):[],bottom:C?this._grid.data.getRawData(R-C,R):[]},I={left:null===(i=null==k?void 0:k.left)||void 0===i?void 0:i.map((function(t){return t.id})),right:null===(n=null==k?void 0:k.right)||void 0===n?void 0:n.map((function(t){return t.id}))},M={top:T.top.map((function(t){return t.id})),bottom:T.bottom.map((function(t){return t.id}))},H=null===(o=null==k?void 0:k.left)||void 0===o?void 0:o.reduce((function(t,e){return t+(e.$width||0)}),0),P=null===(r=null==k?void 0:k.right)||void 0===r?void 0:r.reduce((function(t,e){return t+(e.$width||0)}),0),F=T.top.reduce((function(t,e){return t+(0,v.getTotalRowHeight)(e)}),0),A=T.bottom.reduce((function(t,e){return t+(0,v.getTotalRowHeight)(e)}),0),$=this._grid.getCellRect(t.id,e.id);t.$subRowHeight&&t.$opened&&($.height=$.height-t.$subRowHeight);var L,j,V,N,W=this._grid.getScrollState(),z=$.y,B=null===(a=M.top)||void 0===a?void 0:a.includes(t.id),G=null===(l=I.left)||void 0===l?void 0:l.includes(e.id),Y=k.left.length&&H>$.x-W.x,U=T.top.length&&F>$.y-W.y,X=$.width,q=$.height,K=null,Z=null,J=Y?H+W.x:$.x;if(Y&&(X-=(G?(0,f.getTotalWidth)(k.left.slice(0,O.indexOf(e))):H)-($.x-W.x)),U&&(q-=(B?(0,f.getTotalHeight)(T.top.slice(0,b.indexOf(t))):F)-($.y-W.y)-1,z+=$.height-q),B)if(z=$.y+W.y,(tt=this._grid.getSpan(t.id,e.id))&&tt.rowspan>1){var Q=b.indexOf(t);K=(0,f.getTotalHeight)(T.top.slice(Q,Q+tt.rowspan))}else q=w===M.top.indexOf(t.id)+1?$.height-1:$.height;if(G)if(J=$.x+W.x,(tt=this._grid.getSpan(t.id,e.id))&&tt.colspan>1){Q=null==O?void 0:O.indexOf(e);Z=(0,f.getTotalWidth)(k.left.slice(Q,Q+tt.colspan))}else X=k.left.length===I.left.indexOf(e.id)+1?$.width-1:$.width;if((null===(c=k.right)||void 0===c?void 0:c.length)||C){var tt=this._grid.getSpan(t.id,e.id),et=(0,v.getReverseScrollState)(this._grid);if((null===(u=k.right)||void 0===u?void 0:u.length)&&(L=(null===(p=I.right)||void 0===p?void 0:p.includes(e.id))||tt&&O.indexOf(e)+(tt.colspan||1)>O.length-k.right.length,(j=S-P<et.x+$.x+$.width)&&!L&&(X-=et.x+$.x+$.width-S+P),L))if(tt&&!(null===(g=I.right)||void 0===g?void 0:g.includes(tt.column))){Q=O.length-O.indexOf(e)-(tt.colspan||1);var it=S-P;J=$.x+et.x<it+1?$.x:it-et.x+1,Z=(0,f.getTotalWidth)(Q?k.right.slice(0,-Q):k.right)-1,X=$.width-et.x}else{var nt=(null===(_=I.right)||void 0===_?void 0:_.indexOf(e.id))?0:1;J=$.x-et.x+nt,X=$.width-nt}if(C&&(V=M.bottom.includes(t.id)||tt&&b.indexOf(t)+(tt.rowspan||1)>b.length-C,(N=E-A<et.y+$.y+$.height)&&!V&&(q-=et.y+$.y+$.height-E+A),V))if(tt&&!M.bottom.includes(tt.row)){var ot=E-A;nt=(Q=b.length-b.indexOf(t)-(tt.rowspan||1))?0:1;z=$.y+et.y<ot?$.y:ot-et.y,K=(0,f.getTotalHeight)(Q?T.bottom.slice(0,-Q):T.bottom)-nt,q=$.height-et.y-nt}else z=$.y,q=$.height-(C===M.bottom.indexOf(t.id)+1?1:0)}return{rowStyle:{width:(null===(m=k.left)||void 0===m?void 0:m.length)?S-W.x:S,height:q,minHeight:K,minWidth:Z,display:q<0&&!K?"none":"flex",top:z,left:(null===(y=k.left)||void 0===y?void 0:y.length)?W.x:0,position:"absolute"},cellStyle:{width:X,height:q,top:z,minHeight:K,minWidth:Z,left:J,position:"absolute",display:X<0&&!Z||q<0&&!K?"none":"flex",borderLeft:Y&&!G?"none":null,borderRight:j&&!L?"none":null,borderTop:U&&!B?"none":null,borderBottom:N&&!V?"none":null}}},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,e,i=this._grid.getRootView().data.getRootNode();if(i&&(null===(t=this._selectedCell)||void 0===t?void 0:t.row)&&(null===(e=this._selectedCell)||void 0===e?void 0:e.column)){var n=this._selectedCell,o=n.row,r=n.column,a=this._grid.getSpan(o.id,r.id),l=(0,g.getCellNode)(i,o.id,r.id,a);l&&(l.tabIndex=0,l.focus({preventScroll:!0}))}},t}();e.Selection=_},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(7),c=i(3),d=i(22),u=i(58),h=i(59),f=i(0),p=i(8),g=i(120),v=i(121),_=i(122),m=i(18);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 n;if(!(null===(n=t.$cellState)||void 0===n?void 0:n.hideSpans)||!e.length)return null;for(var o=null,r=0;r<e.length;r++){var a=e[r],l=a.column,s=a.$rowsVisibility,c=a.$colsVisibility;if((null==s?void 0:s.length)&&(null==c?void 0:c.length)&&(s[0]!==s[1]||c[0]!==c[1])){for(var d=new Set,u=c[0];u<=c[1];u++){var h=i[u];h&&d.add("".concat(h.id))}(o=o||[]).push({column:l,rowStart:s[0],rowEnd:s[1],columns:d})}}return o}function x(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:_,x=o.bottomSplit,w=void 0===x?0:x,C=o.$filteredColumns||d.filter((function(t){return!t.hidden})),S=(0,a.calculateVisibleRange)(i,t._scroll,o,e),E=C.slice(S.xStart,S.xEnd),D=e.slice(S.yStart,S.yEnd),O=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,[S.yStart,S.yEnd],[g,w],e.length),o=y(t.$colsVisibility,[S.xStart,S.xEnd],[h,m],d.length);return n&&o})),k={left:(0,p.getCurrFixedCols)(o,c.Split.left),right:(0,p.getCurrFixedCols)(o,c.Split.right)},R={top:e.slice(0,o.topSplit||0),bottom:o.bottomSplit?e.slice(-o.bottomSplit):[]};return t.config.$subRowCells&&(0,v.setSubRowCell)(t,D),n(n({},o),{data:e,columns:o.columns,scroll:t._scroll,$positions:S,headerHeight:o.$headerHeight,footerHeight:o.$footerHeight,firstColId:C[0]&&C[0].id,events:t.events,_events:t._events,filteredColumns:C,currentColumns:E,currentRows:D,currentSpans:O,fixedColumns:k,fixedRows:R,sort:t._sortingStates,content:t.content,gridId:t._uid,commonSummary:t._commonSummary,colSummary:t._colSummary,dropManager:t._dropManager,blockSelection:t.block,range:t.range,$activeCell:t.$activeCell,$renderFrom:"render",$isDragging:s.dragManager.isDrag(),$spanAreas:b(o,O,C)})}function w(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 C(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 S(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 E(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=x,e.getElementSizes=w,e.applyAutoWidth=E,e.render=function(t,e,i,r,a){var s,f,g,v,_,m,y,b,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||w(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","data-dhx-empty":"true",role:"presentation"},[(0,o.el)(".dhx_visually-hidden",{role:"grid","aria-label":T.ariaLabel,"aria-rowcount":0,"aria-colcount":0})]);var I=e.data.getRawData(0,-1,null,2);T.columns.every((function(t){return t.hidden}))?T.$totalHeight=0:e._rowHeightsRebuild&&(null===(v=(g=e)._rebuildRowHeights)||void 0===v||v.call(g,I));var M={width:(T.width&&"number"==typeof T.width?T.width:null==R?void 0:R.width)||0,height:(T.height&&"number"==typeof T.height?T.height:null==R?void 0:R.height)||0};(0,l.isAutoWidth)(T)&&E(T,M),null===(m=(_=e)._rebuildColWidths)||void 0===m||m.call(_),T.$width=M.width,T.$height=M.height;var H=x(e,I,M);H.selection=r,H.datacollection=e.data;var P=(0,d.getShifts)(H);H.$scrollBarWidth=(0,p.calcScrollBarWidth)(H);var F,A,$,L,j,V=(0,l.isCssSupport)("position","sticky"),N=S(H,V,M),W={wrapper:M,sticky:V,shifts:P,gridBodyHeight:N,footerAtBottom:!1},z=(0,h.getFixedRows)(H,n(n({},W),{name:"header",position:"top"})),B=H.$footer?(0,h.getFixedRows)(H,n(n({},W),{name:"footer",position:"bottom"})):null,G=H.$totalWidth+p.BORDERS<M.width?"dhx_grid-less-width":"",Y=H.$totalHeight+p.BORDERS<M.height?"dhx_grid-less-height":"",U=H.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",X=T.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"";if(!t.node){var q=e.getScrollState(),K=q.x,Z=q.y;(0,o.awaitRedraw)().then((function(){e.scroll(K,Z)}))}return(0,o.el)(".dhx_grid.dhx_widget",{class:(H.css||"")+(V?"":" dhx_grid_border")+(T.multiselection?" dhx_no-select--pointer":""),"data-dhx-widget-id":a,"data-dhx-root-id":T.rootParent,"data-dhx-drop-area":"common",role:"presentation"},[(0,o.resizer)((function(){return e.paint()})),(0,o.el)(".dhx_grid-focus-sentinel",{tabindex:0}),(0,o.el)(".dhx_grid-content",n(n(n({style:n({},M)},i),{class:"".concat(G," ").concat(Y," ").concat(U," ").concat(X).trim()}),(F=H.data,A=T.columns,$=null!==(b=null===(y=H.$cellState)||void 0===y?void 0:y.editable)&&void 0!==b?b:H.editable,L=null!==(O=null===(D=H.$cellState)||void 0===D?void 0:D.multiselectable)&&void 0!==O?O:H.multiselection||!!H.blockSelection,j=H.type,{role:"tree"===j?"treegrid":"grid","aria-label":T.ariaLabel,"aria-rowcount":F.length+(0,p.getHeaderRowCount)(H)+(0,p.getFooterRowCount)(H),"aria-colcount":A.filter((function(t){return!t.hidden})).length,"aria-readonly":$?"false":"true","aria-multiselectable":L?"true":"false"})),[V?null:z,(0,o.el)(".dhx_grid-body",{style:{height:N,width:M.width-p.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[(0,o.el)("div",{},[V?z:null,C(H,P),V?B:null])]),(0,u.getFixedColsHeader)(H,W,c.Split.left),(0,u.getFixedColsHeader)(H,W,c.Split.right),(0,u.getFixedCols)(H,W,c.Split.left),(0,u.getFixedCols)(H,W,c.Split.right),(0,h.getFixedDataRows)(H,W,c.Split.top),(0,h.getFixedDataRows)(H,W,c.Split.bottom),V?null:B]),(0,o.el)(".dhx_grid-focus-sentinel.dhx_grid-focus-sentinel--end",{tabindex:0})])},e.proRender=function(t,e,i,r,a){var s,f,v,y,b,D,O,k,R,T,I,M=(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==M?void 0:M.tagName)&&e._observeResize&&e._observeResize(M);var H=e._cachedSizes||w(M),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","data-dhx-empty":"true",role:"presentation"},[(0,o.el)(".dhx_visually-hidden",{role:"tree"===P.type?"treegrid":"grid","aria-label":P.ariaLabel,"aria-rowcount":0,"aria-colcount":0})]);var F,A=e.data.getRawData(0,-1,null,2),$=P.topSplit||0,L=P.bottomSplit||0,j=P.columns.every((function(t){return t.hidden}));if(e._rowHeightsRebuild){for(var V=0,N=0,W=0;W<A.length;W++){var z=A[W];$&&W<$+V&&(P.subRow&&(z.$subRowHeight=0,z.$opened=!1),z.hidden&&V++),L&&W>=A.length-L-N&&(P.subRow&&(z.$subRowHeight=0,z.$opened=!1),z.hidden&&N++),z.$index=W}j?(P.$totalHeight=0,e._rowHeightsRebuild=!1):null===(y=(v=e)._rebuildRowHeights)||void 0===y||y.call(v,A)}var B="auto"===e.config.height;B&&(F=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,P,H));var G=P.width&&"number"==typeof P.width?P.width:null==H?void 0:H.width,Y=P.height&&"number"==typeof P.height?P.height:null==H?void 0:H.height,U={width:G||0,height:(B?F:Y)||0},X=null==P?void 0:P.group,q=null==P?void 0:P.dragPanel,K=null==X?void 0:X.panel,Z=!!P.dragPanel;K&&(U.height-=X.panelHeight||40),Z&&(U.width-=(null==q?void 0:q.width)||m.defaultDragPanelConfig.width),(0,l.isAutoWidth)(P)&&E(P,U,e.scrollView&&e.scrollView.config.enable),null===(D=(b=e)._rebuildColWidths)||void 0===D||D.call(b),P.$width=U.width,P.$height=U.height;var J=x(e,A,U);J.selection=r,J.datacollection=e.data;var Q=(0,d.getShifts)(J);J.$scrollBarWidth=(0,p.calcScrollBarWidth)(J,!!(null===(O=e.scrollView)||void 0===O?void 0:O.config.enable));var tt=(0,l.isCssSupport)("position","sticky"),et=S(J,tt,U),it={wrapper:U,sticky:tt,shifts:Q,gridBodyHeight:et,footerAtBottom:!1},nt=J.$totalWidth+p.BORDERS<U.width?"dhx_grid-less-width":"",ot=J.$totalWidth+p.BORDERS===U.width?"dhx_grid-full-width":"",rt=J.$totalHeight+p.BORDERS<U.height-J.$footerHeight-J.$headerHeight?"dhx_grid-less-height":"",at=J.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",lt=P.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"",st="bottom"===P.footerPosition&&!!rt&&!B;it.footerAtBottom=st;var ct=null!==(R=null===(k=J.$cellState)||void 0===k?void 0:k.editable)&&void 0!==R?R:J.editable,dt=null!==(I=null===(T=J.$cellState)||void 0===T?void 0:T.multiselectable)&&void 0!==I?I:J.multiselection||!!J.blockSelection,ut=(0,h.getFixedRows)(J,n(n({},it),{name:"header",position:"top"})),ht=J.$footer?(0,h.getFixedRows)(J,n(n({},it),{name:"footer",position:"bottom"})):null;if(!t.node){var ft=e.getScrollState(),pt=ft.x,gt=ft.y;(0,o.awaitRedraw)().then((function(){e.scroll(pt,gt)}))}var vt=(0,o.el)("div",{},[tt?ut:null,C(J,Q,st),tt?ht:null]);return(0,o.el)(".dhx_grid.dhx_widget",{class:(J.css||"")+(tt?"":" dhx_grid_border")+(P.multiselection?" dhx_no-select--pointer":""),style:{height:null!=F?F:null},"data-dhx-widget-id":a,"data-dhx-root-id":P.rootParent,role:"presentation","data-dhx-drop-area":"common"},[(0,o.resizer)((function(){return e.paint()})),K&&(0,g.getGroupPanel)(P.$grouped,e)||null,Z&&(0,_.getDragPanelNode)(e,J,it,!!rt)||null,(0,o.el)(".dhx_grid-focus-sentinel",{tabindex:0}),(0,o.el)(".dhx_grid-content",n(n({style:n({},U)},i),{class:"".concat(nt," ").concat(rt," ").concat(ot," ").concat(at," ").concat(lt).trim(),role:"tree"===P.type?"treegrid":"grid","aria-label":P.ariaLabel,"aria-rowcount":J.data.length+(0,p.getHeaderRowCount)(J)+(0,p.getFooterRowCount)(J),"aria-colcount":J.filteredColumns.length,"aria-readonly":ct?"false":"true","aria-multiselectable":dt?"true":"false"}),[tt?null:ut,(0,o.el)(".dhx_grid-body",{style:{height:et,width:U.width-p.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[e.scrollView&&e.scrollView.config.enable?e.scrollView.render([vt]):vt]),(0,u.getFixedColsHeader)(J,it,c.Split.left),(0,u.getFixedColsHeader)(J,it,c.Split.right),(0,u.getFixedCols)(J,it,c.Split.left),(0,u.getFixedCols)(J,it,c.Split.right),(0,h.getFixedDataRows)(J,it,c.Split.top),(0,h.getFixedDataRows)(J,it,c.Split.bottom),tt?null:ht]),(0,o.el)(".dhx_grid-focus-sentinel.dhx_grid-focus-sentinel--end",{tabindex:0})])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditor=void 0;var n,o=i(3),r=i(95),a=i(96),l=i(97),s=i(111),c=i(112),d=i(119),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(12),c=i(21),d=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){var e;if(this._config.$editable){var i;if(!t&&(i=this._removeValuePattern(this._input.value,!0),"number"===this.type||this._cell.col.numberMask))if(i=parseFloat(i),Number.isNaN(i))i="";else{var n=this._cell.col.editorConfig,o=parseFloat(null==n?void 0:n.min),l=parseFloat(null==n?void 0:n.max),c=i;(0,a.isDefined)(null==n?void 0:n.min)&&i<o&&(i=o),(0,a.isDefined)(null==n?void 0:n.max)&&i>l&&(i=l),i!==c&&(null===(e=this._config._events)||void 0===e||e.fire(r.GridSystemEvents.announce,[(0,s.getLocaleString)("aria_valueClamped",{value:i})]))}this._config.events.fire(r.GridEvents.beforeEditEnd,[i,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,[i,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}));var r=this._isValueInvalid(t);return 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),"aria-invalid":r?"true":"false",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._setValidity(!t.prevValue.length||"-"===t.prevValue||t._isCorrectRange(parseFloat(t.prevValue)))),t._input.value=t._applyValuePattern(e,t._input)},didInsert:function(e){t._input=e.el,t._input.focus()}}},t.prototype._setValidity=function(t){var e,i="true"===this._input.getAttribute("aria-invalid");if(t?this._input.classList.remove("dhx_cell-editor__input--not-valid"):this._input.classList.add("dhx_cell-editor__input--not-valid"),this._input.setAttribute("aria-invalid",t?"false":"true"),!t&&!i){var n=this._getRangeMessage();n&&(null===(e=this._config._events)||void 0===e||e.fire(r.GridSystemEvents.announce,[n]))}},t.prototype._isValueInvalid=function(t){if("number"!==this.type)return!1;var e=parseFloat(this._removeValuePattern("".concat(t)));return!Number.isNaN(e)&&!this._isCorrectRange(e)},t.prototype._getRangeMessage=function(){var t=this._cell.col.editorConfig;return(0,a.isDefined)(null==t?void 0:t.min)&&(0,a.isDefined)(null==t?void 0:t.max)?(0,s.getLocaleString)("aria_valueOutOfRange",{min:t.min,max:t.max}):(0,a.isDefined)(null==t?void 0:t.min)?(0,s.getLocaleString)("aria_valueBelowMin",{min:t.min}):(0,a.isDefined)(null==t?void 0:t.max)?(0,s.getLocaleString)("aria_valueAboveMax",{max:t.max}):""},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,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}();e.InputEditor=d},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(98),s=i(14),c=i(33),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(99),e),o(i(50),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(100),h=i(110),f=i(14),p=i(50),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,-1!==n._normalizeControls().indexOf("timepicker")&&(n.config.timePicker=!0),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||Array.isArray(t)&&0===t.length)return!1;var e=Array.isArray(t)?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(){this._clear(!1)},e.prototype._clear=function(t){var e=this._getSelected(),i=e?f.DateHelper.copy(e):null;i&&!this.events.fire(p.CalendarEvents.beforeChange,["",i,t])||(this.config.timePicker&&(this._timepicker.clear(),this._time=this._timepicker.getValue()),this._selected=[],this.showDate(null,this.config.mode),i&&this.events.fire(p.CalendarEvents.change,["",i,t,"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=Array.isArray(t)?t[0]:t,n=f.DateHelper.toDateObject(i,this.config.dateFormat);if(Array.isArray(t)&&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._normalizeControls=function(){var t=this.config,e=t.controls,i=t.timePicker,n=["clear","today","timepicker","spacer"],o=[];return!0===e?o=["spacer","clear","today"]:Array.isArray(e)&&e.forEach((function(t){var e=t.toLowerCase();-1!==n.indexOf(e)&&o.push(e)})),i&&-1===o.indexOf("timepicker")&&o.unshift("timepicker"),o},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()},".dhx_calendar-action__clear":function(){return t._clear(!0)},".dhx_calendar-action__today":function(){return t._selectToday()}},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),this._drawControls()])])},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._drawControls=function(){var t=this,e=this._normalizeControls();if(!e.length)return null;var i=1===e.length&&"spacer"!==e[0];return(0,s.el)(".dhx_calendar__toolbar",{class:i?"dhx_calendar__toolbar--full":""},e.map((function(e){switch(e){case"spacer":return(0,s.el)(".dhx_calendar__toolbar-spacer");case"timepicker":return t._drawTimepickerControl(i);case"clear":case"today":return t._drawControlButton(e,i)}})))},e.prototype._drawControlButton=function(t,e){void 0===e&&(e=!1);var i=f.locale[t];return(0,s.el)((0,h.getControlButtonClass)(t,e),{type:"button"},i)},e.prototype._drawTimepickerControl=function(t){return void 0===t&&(t=!1),(0,s.el)((0,h.getControlButtonClass)("timepicker",t),{type:"button"},[(0,s.el)("span.dhx_button__icon.dxi.dxi-clock-outline"),(0,s.el)("span.dhx_button__text",this._time)])},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._selectToday=function(){var t=f.DateHelper.copy(this._getSelected()),e=new Date,i=this.config.timePicker?f.DateHelper.mergeHoursAndMinutes(e,this._getSelected()||this._currentDate):f.DateHelper.dayStart(e);this.events.fire(p.CalendarEvents.beforeChange,[i,t,!0])&&(this._selected=[],this._selected[0]=i,this._timepicker&&(this._timepicker.setValue(i),this._time=this._timepicker.getValue()),this.showDate(i,"calendar"),this.events.fire(p.CalendarEvents.change,[i,t,!0]))},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(101),e),o(i(49),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(30),u=i(105),h=i(108),f=i(109),p=i(49),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";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_CELL_HEADER_WIDTH=e.DEFAULT_CELL_HEADER_HEIGHT=void 0,e.DEFAULT_CELL_HEADER_HEIGHT=37,e.DEFAULT_CELL_HEADER_WIDTH=45},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(31),a=i(45),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(106),e),o(i(48),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(27),d=i(11),u=i(33),h=i(48),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(47),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("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.getControlButtonClass=e.linkButtonClasses=void 0,e.linkButtonClasses=".dhx_button.dhx_button--view_link.dhx_button--icon.dhx_button--size_medium.dhx_button--color_secondary";var n=".dhx_calendar__toolbar-button.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--circle",o={clear:"button.dhx_calendar-action__clear"+n,today:"button.dhx_calendar-action__today"+n,timepicker:"button.dhx_calendar__timepicker-button"+n+".dhx_calendar-action__show-timepicker"};e.getControlButtonClass=function(t,e){return void 0===e&&(e=!1),o[t]+(e?".dhx_button--width_full":"")}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckboxEditor=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(){var t=this._checked;this._config.events.fire(o.GridEvents.beforeEditEnd,[t,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.events.fire(o.GridEvents.afterEditEnd,[t,this._cell.row,this._cell.col])):this._input.checked=!t},t.prototype.toHTML=function(){return void 0===this._checked&&(this._checked=this._cell.row[this._cell.col.id]),(0,n.el)("div.dhx_checkbox.dhx_cell-editor__checkbox",[(0,n.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,"aria-label":(0,r.getColumnHeaderText)(this._cell.col),style:{userSelect:"none"}}),(0,n.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(o.GridEvents.beforeEditStart,[t._cell.row,t._cell.col,"checkbox"])?(t._checked=e,t._config.events.fire(o.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=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.ComboboxEditor=void 0;var o=i(1),r=i(3),a=i(4),l=i(51),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,ariaLabel:(0,a.getColumnHeaderText)(this._cell.col)},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;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(115);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(34),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(46),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(54).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(52),a=i(53),l=i(30),s=i(56),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(21),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(20);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","aria-hidden":"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(12),l=i(18),s=i(45),c=i(8);function d(t,e,i,o){var r=e(t),a=new s.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({},l.defaultSubRowConfig),i),{cell:a})),"function"==typeof(null==r?void 0:r.paint)&&a.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 l;if(e.$opened){var s=t.$subRowCells.get(e.id),d=null===(l=null==s?void 0:s.cell)||void 0===l?void 0:l.getRootView();if(d){var u=(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-label":(0,a.getLocaleString)("aria_subRow",{id:e.id}),"data-dhx-id":e.id,"data-dhx-root-widget-id":t.gridId,tabindex:0,style:{position:"absolute",top:u,width:n?t.$totalWidth:t.$width-t.$scrollBarWidth.y-c.BORDERS}},[(0,o.inject)(d)]))}}})),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,a=i.subRow,s=new Map,c=0;c<e.length;c++){var u=e[c];if(!u.$group){if(!r.has(u.id)||!r.get(u.id).cell){var h=n(n({},l.defaultSubRowConfig),("function"==typeof o?o(u):o)||{});r.set(u.id,h),(u.$opened||h.preserve)&&u.$subRowHeight&&d(u,a,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(18),s=i(8),c=i(2),d=i(5),u=i(12),h={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 f(t){return(0,r.el)(".dhx_grid-drag-panel_header",{style:{height:t.$headerHeight},role:"banner","aria-label":(0,u.getLocaleString)("aria_panelHeader")})}function p(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":(0,u.getLocaleString)("aria_panelFooter")})}function g(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":(0,u.getLocaleString)("aria_panelContent")},[v(t,e),p(t,e,i),_(t,e,a.Split.top,i),_(t,e,a.Split.bottom,i)])}function v(t,e){var i=t.dragPanel,n=t.currentRows.map((function(t){return m(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":(0,u.getLocaleString)("aria_draggableRows")},o([],n,!0))}function _(t,e,i,n){var c=t.dragPanel,h=(i===a.Split.bottom?t.fixedRows.bottom:t.fixedRows.top)||[];if(!h.length)return null;var f=h.map((function(t){return m(t,c.icon)})),p={width:c.width||l.defaultDragPanelConfig.width};if(i===a.Split.bottom&&e.footerAtBottom)p.bottom=t.footerHeight+s.BORDERS/2+(t.$scrollBarWidth.x||-1);else{var g=(0,d.getTotalHeight)(t.fixedRows.bottom),v=t.group?(0,l.getGroupDefaultConfig)(t.group).panelHeight:0;p.top=i===a.Split.bottom?n?t.$totalHeight+t.$headerHeight-g+s.BORDERS/2+v:t.$height-g-t.$footerHeight-s.BORDERS/2-t.$scrollBarWidth.x+v:t.$headerHeight+v}return(0,r.el)(".dhx_grid-drag-panel_content.dhx_grid-drag-panel_content--fixed",{style:p,_flags:r.KEYED_LIST,role:"list","aria-label":(0,u.getLocaleString)("aria_draggableRows")},o([],f,!0))}function m(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":(0,u.getLocaleString)("aria_rowId",{id: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(h).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":(0,u.getLocaleString)("aria_dragPanel")},c),[f(e),g(e,i,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.ComboFilter=void 0;var o=i(51),r=i(6),a=i(7),l=i(0),s=i(3),c=i(23),d=function(){function t(t){var e,i=t.column,n=t.config,o=t.headerConfig,a=t.uniqueData,s=t.value,c=t.grid;this.events=new r.EventSystem,this._silentMode=!1,this.column=i,this.config=n,this.data=a,this.value=s,this.filterConfig={},this._grid=c,Object.assign(this.filterConfig,(null==o?void 0:o.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,l.isExistValue)(t.value,e)}),this.initFilter(),this.config&&this.initHandlers()}return t.prototype.initFilter=function(){var t=n({},this.filterConfig);delete t.options,this._filter=new o.ProCombobox(null,Object.assign({virtual:!0},t)),this.data&&this._filter.data&&this._setData()},t.prototype.initHandlers=function(){var t=this,e=this.column.id.toString();[a.DataEvents.load,a.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 t._getFilterValue(e)})):t._getFilterValue(t._filter.list.selection.getItem())));t.value=n,t._grid.events.fire(s.GridEvents.filterChange,[t.value,e,"comboFilter",t._silentMode]),t._silentMode&&void 0===t.value&&(t._silentMode=!1)})),this._grid.events.on(s.GridEvents.filterChange,(function(e){return t.events.fire(c.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(s.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(s.GridEvents.headerCellMouseDown,(function(e,i){i.id!==t.column.id&&t.blur()}),this),this._grid.events.on(s.GridEvents.cellMouseDown,(function(){return t.blur()}),this),this._grid.events.on(a.DataEvents.change,(function(e,i){t.column.hidden||"update"!==i||(t._checkValue(),t._setData(!0))}),this),this._grid.events.on(a.DataEvents.afterAdd,(function(){t.column.hidden||t._setData(!0)})),this._grid.events.on(a.DataEvents.afterRemove,(function(){t.column.hidden||(t._checkValue(),t._setData(!0))})),this._grid.events.on(a.DataEvents.removeAll,(function(){t.clear(!0),t._setData()}),this),this._grid.events.on(s.GridEvents.afterRowShow,(function(){return t._setData(!0)}),this),this._grid.events.on(s.GridEvents.afterRowHide,(function(){t.column.hidden||(t._checkValue(),t._setData(!0))}),this),this._grid.events.on(a.DataEvents.filter,(function(e){t.column.hidden||(!e||(0,a.isOnlyPermanentFilters)(e)?t.clear(!0):t._checkValue(),t.filterConfig.multiselection&&t._filter.popup.isVisible()||t._setData(!0))}),this),this._grid.events.on(s.GridEvents.afterColumnShow,(function(){t.filterConfig.multiselection||(t._checkValue(),t._setData())}),this),this._grid.events.on(s.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,l.isDefined)(t)){if((null==t?void 0:t.length)||""===t){var o=this.column.$filterOptions?t: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(s.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(){if(e.column.$filterOptions)e._filter.data.parse(e.column.$filterOptions.map((function(t){return n({},t)})));else{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}),{}),o=t.map((function(t){return i[t]?{id:i[t],value:t}:{value:t}}));e._filter.data.parse(o)}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._getFilterValue=function(t){if(t)return this.column.$filterOptions?"".concat(t.id):t.value},t.prototype._checkValue=function(){var t,e=this;if(void 0!==this.value)for(var i=Array.isArray(this.value)?this.value:[this.value],n=function(n){if(null===(t=o.column.$uniqueData)||void 0===t?void 0:t.includes(n))return"continue";if(i.length>1){var r=o._filter.data.find((function(t){return e.column.$filterOptions?"".concat(t.id)===n:t.value===n}));o._filter.list.selection.remove(r.id)}else o.clear();return"break"},o=this,r=0,a=i;r<a.length;r++){if("break"===n(a[r]))break}},t}();e.ComboFilter=d},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(23),s=i(4),c=i(12),d=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=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":(0,c.getLocaleString)("aria_filter",{column:(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},"")],this._getOptions().map((function(e){return""!==e.id&&(0,o.el)("option",{_key:e.id,value:e.id,selected:t.value===e.id.toString()},e.value)})),!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._getOptions=function(){return this.column.$filterOptions?this.column.$filterOptions:((this.value?[this.value]:this.data)||[]).map((function(t){return{id:t=null!=t?t:"",value:t}}))},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=d},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(23),l=i(4),s=i(12),c=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=(0,s.getLocaleString)("aria_filter",{column:(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=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.startResize=void 0;var o=i(0),r=i(3),a=i(8);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(15),r=i(17),a=i(5),l=i(128),s=i(129),c=i(43);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,r){var a,s;if(void 0===r&&(r=!1),!(t.config.$editable||(0,n.locateNodeByClassName)(e,"dhx_grid-header-cell")||(0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))){var c=(0,o.getCellSource)(t).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&&r;if(c)(f=(0,l.walkVisibleRows)(t,c.row.id,p))!==c.row.id&&(t.scrollTo(f.toString(),c.column.id.toString()),(0,o.getCellSource)(t).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",r)}else h&&(e.preventDefault(),h.scrollTop+=i*h.clientHeight)}},p=function(e,i,n){var r;void 0===n&&(n=!1);var a=(0,o.getCellSource)(t).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,r){var l,s,c;if(void 0===r&&(r=!1),!(t.config.$editable||(0,n.locateNodeByClassName)(e,"dhx_grid-header-cell")||(0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))){var d=(0,o.getCellSource)(t).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&&r;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()),(0,o.getCellSource)(t).setCell(f,p,!1,v)),h&&"range"===(null===(s=u.block)||void 0===s?void 0:s.config.mode)&&(u.scrollTo(f,p),r?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("header"===n&&(0,c.triggerHeaderSort)(t,e))}u?(i=(0,o.normalizeCell)((0,o.getCellSource)(t).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"header"===i&&(0,c.triggerHeaderSort)(t,e)},escape:function(e){var i,n,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===(r=document.activeElement)||void 0===r?void 0:r.getAttribute("data-dhx-col-id"))||(0,c.transitionToBody)(t,h.xStart,"first")}else if((0,o.getCellSource)(t).getCell()){var f=(0,o.getCellSource)(t).getCell();t.scrollTo(f.row.id,f.column.id),(0,o.getCellSource)(t).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,a,s=(0,c.detectFocusZone)(e);if("header"!==s&&"footer"!==s){t.config.$editable&&t.editEnd();var d=(0,o.getCellSource)(t).getCell(),u=t.config.columns.filter((function(t){return!t.hidden}));if(d){if(d.row.$opened&&d.row.$subRowHeight){var h=t.getSubRow(d.row.id),f=h.view,p=h.element;return void((null==f?void 0:f.name.includes("grid"))?((0,o.getCellSource)(f).setCell(f.data.getId(0)),r.focusManager.setFocusId(f._uid)):p.focus())}var g=u.indexOf(d.column)+(0,l.getRangedIndex)(t,"right");if(g>=0&&g<u.length)e&&e.preventDefault(),t.scrollTo(d.row.id.toString(),u[g].id.toString()),(0,o.getCellSource)(t).setCell(d.row.id,u[g].id);else if(g>=0){(_=(0,l.getNextVisibleRowId)(t,d.row.id,1))?(e&&e.preventDefault(),t.scrollTo(_.toString(),u[0].id.toString()),(0,o.getCellSource)(t).setCell(_,u[0].id)):(0,c.hasFooter)(t)?(e&&e.preventDefault(),(0,c.transitionFromBodyToZone)(t,"footer",u[0].id,0)):(0,c.exitThroughSentinel)(t,"forward")}}else{var v=null===(a=t.range)||void 0===a?void 0:a.getRange();if(v){var _,m=u.findIndex((function(t){return t.id===v.xEnd}))+1;if(m<u.length)e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,v.yEnd,u[m].id);else(_=(0,l.getNextVisibleRowId)(t,v.yEnd,1))?(e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,_,u[0].id)):(0,c.hasFooter)(t)?(e&&e.preventDefault(),(0,c.transitionFromBodyToZone)(t,"footer",u[0].id,0)):(0,c.exitThroughSentinel)(t,"forward")}}}else{var y=e.target,b=y.closest(".dhx_grid-".concat(s,"-cell, .dhx_span-cell"));if(b&&y!==b&&(0,c.isContentCell)(b))return e.preventDefault(),void(0,c.deactivateContentCell)(b);if("exit-end"===(0,c.moveZoneFocusTab)(t,e,s,"forward")){(0,c.restoreZoneTabindex)(t,s);var x=(0,c.getVisibleColumns)(t);"header"===s&&t.data.getLength()?(e.preventDefault(),(0,c.transitionToBody)(t,null===(i=x[0])||void 0===i?void 0:i.id,"first")):"header"===s&&(0,c.hasFooter)(t)?(e.preventDefault(),(0,c.transitionFromBodyToZone)(t,"footer",null===(n=x[0])||void 0===n?void 0:n.id,0)):(0,c.exitThroughSentinel)(t,"forward")}}},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,a,s,d,u,h=(0,c.detectFocusZone)(e);if("header"!==h&&"footer"!==h)if("body"===h&&(0,c.isAtFirstRow)(t)&&(0,c.isAtFirstColumn)(t)){e.preventDefault();var f=(0,c.getVisibleColumns)(t),p=(E=f[f.length-1].id,(0,c.getZoneRowCount)(t,"header")-1);(0,c.transitionFromBodyToZone)(t,"header",E,p)}else{t.config.$editable&&t.editEnd();var g=(0,o.getCellSource)(t).getCell(),v=t.config.columns.filter((function(t){return!t.hidden}));if(g){var _=(0,n.locate)(null===(d=null===(s=null===(a=t.getRootView().node)||void 0===a?void 0:a.parent)||void 0===s?void 0:s.parent)||void 0===d?void 0:d.el,"data-dhx-root-widget-id");if(_)return void r.focusManager.setFocusId(_);var m=v.indexOf(g.column)+(0,l.getRangedIndex)(t,"left");if(m>=0&&m<v.length)e&&e.preventDefault(),t.scrollTo(g.row.id.toString(),v[m].id.toString()),(0,o.getCellSource)(t).setCell(g.row.id,v[m].id);else(b=(0,l.getNextVisibleRowId)(t,g.row.id,-1))&&(e&&e.preventDefault(),t.scrollTo(b.toString(),v[v.length-1].id.toString()),(0,o.getCellSource)(t).setCell(b,v[v.length-1].id))}else{var y=null===(u=t.range)||void 0===u?void 0:u.getRange();if(y){var b,x=v.findIndex((function(t){return t.id===y.xEnd}))-1;if(x>=0)e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,y.yEnd,v[x].id);else(b=(0,l.getNextVisibleRowId)(t,y.yEnd,-1))&&(e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,b,v[v.length-1].id))}}}else{var w=e.target,C=w.closest(".dhx_grid-".concat(h,"-cell, .dhx_span-cell"));if(C&&w!==C&&(0,c.isContentCell)(C))return e.preventDefault(),void(0,c.deactivateContentCell)(C);if("exit-start"===(0,c.moveZoneFocusTab)(t,e,h,"backward")){(0,c.restoreZoneTabindex)(t,h);var S=(0,c.getVisibleColumns)(t),E=null===(i=S[S.length-1])||void 0===i?void 0:i.id;"footer"===h&&t.data.getLength()?(e.preventDefault(),(0,c.transitionToBody)(t,E,"last")):"footer"===h&&(0,c.getZoneRowCount)(t,"header")?(e.preventDefault(),(0,c.transitionFromBodyToZone)(t,"header",E)):(0,c.exitThroughSentinel)(t,"backward")}}},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||"header"===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(15),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 s=e.config.columns.filter((function(t){return!t.hidden}));!function(t){var e=t.grid,i=t.columns,n=t.dir,o=t.rangedIndex,l=t.toEnd,s=t.shiftUp,c=(0,r.getCellSource)(e).getCell(),d=e.config.multiselection&&s;if(!c)return;if("vertical"===n)if(l){var u=e.data.getItem(e.data.getId(0));if(1===o){var h=e.data.getId(e.data.getLength()-1);"tree"===e.config.type&&(h=(0,a.getLastChild)(h,e.data)),u=e.data.getItem(h)}e.scrollTo(u.id.toString(),c.column.id.toString()),(0,r.getCellSource)(e).setCell(u.id,c.column.id,!1,d)}else{u=null;if("tree"===e.config.type){var f=o<0?(0,a.getClosestTop)(c.row.id,e.data):(0,a.getClosestBottom)(c.row.id,e.data);f&&(u=e.data.getItem(f))}else{(p=e.data.getIndex(c.row.id.toString()))+o>=0&&p+o<e.data.getLength()&&(u=e.data.getItem(e.data.getId(p+o)))}u&&(e.scrollTo(u.id.toString(),c.column.id.toString()),(0,r.getCellSource)(e).setCell(u.id,c.column.id,!1,d))}else if(l){u=1===o?i[i.length-1]:i[0];e.scrollTo(c.row.id.toString(),u.id.toString()),(0,r.getCellSource)(e).setCell(c.row.id,u.id,!1,d)}else{var p;(p=i.findIndex((function(t){return t.id==c.column.id})))+o>=0&&p+o<i.length&&(e.scrollTo(c.row.id.toString(),i[p+o].id.toString()),(0,r.getCellSource)(e).setCell(c.row.id,i[p+o].id,!1,d))}}(n(n({},t),{columns:s})),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:s}))}},e.applyRangeMove=l,e.getRangedIndex=function(t,e){var i,n,o=(0,r.getCellSource)(t).getCell(),a=o&&t.getSpan(o.row.id,o.column.id);if(a){if("up"===e||"down"===e){var l=null===(i=t.config.data)||void 0===i?void 0:i.findIndex((function(t){return t.id===a.row})),s=null===(n=t.config.data)||void 0===n?void 0:n.findIndex((function(t){return t.id===o.row.id}));return"up"===e?l-s-1:l+(a.rowspan||1)-s}var c=t.config.columns.filter((function(t){return!t.hidden}));l=c.findIndex((function(t){return t.id===a.column})),s=c.findIndex((function(t){return t.id===o.column.id}));return"left"===e?l-s-1:l+(a.colspan||1)-s}return"down"===e||"right"===e?1:-1},e.getActiveCell=function(t,e){var i;if(t.$activeCell)return(0,r.normalizeCell)(t.$activeCell.getCell(),t);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()),t.$activeCell||e||"row"===t.config.selection)(0,r.getCellSource)(t).setCell(i,n);else{var a=t;a.range&&(a.range.setRange({yStart:i,yEnd:i,xStart:n,xEnd:n}),null===(o=a.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.DropManager=void 0;var n=i(1),o=i(3),r=i(7),a=i(8),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.ActiveCell=void 0;var n=i(1),o=i(7),r=i(17),a=i(3),l=i(29),s=function(){function t(t,e){this._grid=t,this._gridId=e,this._cell=null,this._init()}return t.prototype.setCell=function(t,e){var i,o,a=this;if(!this._grid.config.$editable){this._gridId&&r.focusManager.getFocusId()!==this._gridId&&r.focusManager.setFocusId(this._gridId);var l=this._grid.data.getItem(t&&t.id||t);e||(e=null===(o=null===(i=this._grid.config)||void 0===i?void 0:i.columns)||void 0===o?void 0:o.filter((function(t){return!t.hidden}))[0]);var s=e&&this._grid.getColumn(e.id||e);l&&s&&(this._cell={row:l,column:s},(0,n.awaitRedraw)().then((function(){a._grid.config.$editable||(a._grid.paint(),a._setBrowserFocus())})))}},t.prototype.getCell=function(){return this._cell},t.prototype.restoreFocus=function(){this._setBrowserFocus()},t.prototype.destructor=function(){this._cell=null},t.prototype._init=function(){var t=this;this._grid.events.on(a.GridEvents.cellClick,(function(e,i){t.setCell(e,i)})),this._grid.data.events.on(o.DataEvents.removeAll,(function(){t._cell=null})),this._grid.data.events.on(o.DataEvents.load,(function(){t._cell=null}))},t.prototype._setBrowserFocus=function(){var t,e,i;if(this._cell){var n=this._grid.getRootNode()||(null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.data)||void 0===e?void 0:e.getRootNode());if(n){var o=this._cell,r=o.row,a=o.column,s=this._grid.getSpan(r.id,a.id);null===(i=(0,l.getCellNode)(n,r.id,a.id,s))||void 0===i||i.focus({preventScroll:!0})}}},t}();e.ActiveCell=s},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}