@dhtmlx/grid 9.3.3 → 9.3.4
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.
- package/README.md +5 -8
- package/codebase/grid.min.js +2 -2
- package/package.json +4 -3
- package/whatsnew.txt +3 -0
- package/dhtmlx_grid.png +0 -0
- package/dhtmlx_logo.svg +0 -4
package/codebase/grid.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
3
|
|
|
4
|
-
This edition of DHTMLX dhtmlxGrid v.9.3.
|
|
4
|
+
This edition of DHTMLX dhtmlxGrid v.9.3.4 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.
|
|
@@ -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,s={};function l(){}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 s=o[o.length-1];if(t[s]<t[r])n[r]=s,o.push(r);else{for(e=0,i=o.length-1;e<i;){var l=(e+i)/2|0;t[o[l]]<t[r]?e=l+1:i=l}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 M(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 R(t){for(t=t||s;null==t.vm&&t.parent;)t=t.parent;return t.vm}function I(){}var P=I.prototype={constructor:I,type:null,vm:null,key:null,ref:null,data:null,hooks:null,ns:null,el:null,tag:null,attrs:null,body:null,flags:0,_class:null,_diff:null,_dead:!1,_lis:!1,idx:null,parent:null};function H(t){var i=new I;return i.type=e,i.body=t,i}var j={},F=/\[(\w+)(?:=(\w+))?\]/g;function $(t){var e,i,n,o,r=j[t];if(null==r)for(j[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=F.exec(t);)null==r.attrs&&(r.attrs={}),r.attrs[o[1]]=o[2]||"";return r}var A=1,L=2,V=4,N=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 s=r.attrs||{};if(a.id&&!d(s.id)&&(s.id=a.id),a.class&&(r._class=a.class,s.class=a.class+(d(s.class)?" "+s.class:"")),a.attrs)for(var l in a.attrs)d(s[l])||(s[l]=a.attrs[l]);r.attrs=s}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|=A}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(R(t),t.ref,t);var a=t.hooks,s=r&&r.hooks;(a&&(a.willRemove||a.didRemove)||s&&(s.willUnmount||s.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=H(""+o)),o.type===e?null==o.body||""===o.body?i.splice(n--,1):n>0&&i[n-1].type===e?(i[n-1].body+=o.body,i.splice(n--,1)):G(o,t,n,null):G(o,t,n,null))}}var X={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 U(t,e){return isNaN(e)||X[t]?e:e+"px"}function q(t,e){var i=(t.attrs||s).style,n=e?(e.attrs||s).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]=U(o,r))}if(n)for(var a in n)null==i[a]&&(t.el.style[a]="")}}var K=[];function J(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 Z(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&&J(e.hooks,"willUnmount",e,e.data),n=J(t.hooks,"willRemove",t);if((t.flags&A)===A&&c(t.body))for(var o=0;o<t.body.length;o++)at(t.body[o]);return i||n}function st(t,e,i){var n=e._node,o=n.vm;if(c(n.body))if((n.flags&A)===A)for(var r=0;r<n.body.length;r++)st(e,n.body[r].el);else ct(n);delete e._node,t.removeChild(e),J(n.hooks,"didRemove",n,null,i),null!=o&&(J(o.hooks,"didUnmount",o,o.data,i),o.node=null)}function lt(t,e){var i=e._node;if(!i._dead){var n=at(i);null!=n&&g(n)?(i._dead=!0,n.then(w(st,[t,e,!0]))):st(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&A))c(t.body)&&ct(t),e.textContent=null;else{var i=e.firstChild;do{var n=ot(i);lt(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&&J(r.hooks,"willMount",r,r.data),J(n.hooks,o?"willReinsert":"willInsert",n),t.insertBefore(e,i),J(n.hooks,o?"didReinsert":"didInsert",n),null!=r&&J(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=l;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=R(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 s=r[a];c(s)?(e=s[0],i=s.slice(1)):(e=s,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||s,o=e.attrs||s;if(n===o);else{for(var r in n){var a=n[r],l=T(t.tag,r),c=l?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,l,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=(s=Et(r.view,r.data,r.key,r.opts)._redraw(t,e,!1)).node.type,ut(t.el,Ot(s.node));else if(a===o){var s;(s=r.vm)._redraw(t,e),a=s.node.type,ut(t.el,s.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,s,!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 Mt(t,e){return e[t.idx-1]}function Tt(t){return t.parent}window.lisMove=Ht;var Rt=1,It=2;function Pt(t,e,i,n,o,r,a,s){return function(l,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)!==l)return g=t(u[n]),null!=p.vm?p.vm.unmount(!0):lt(c,u[n]),void(u[n]=g)}if(u[o]==h)return It;if(null==u[o].el)i(c,Ot(u[o]),u[n]),u[o]=e(u[o],d);else if(u[o].el===u[n])u[o]=e(u[o],d),u[n]=t(u[n]);else{if(f||p!==u[a])return f&&null!=u[n]?Ht(t,e,i,n,o,c,d,p,u):Rt;g=u[n],u[n]=t(g),s(c,g,u[r]),u[r]=g}}}function Ht(t,e,i,n,o,r,a,s,l){if(s._lis)i(r,l[o].el,l[n]),l[o]=e(l[o],a);else{var c=S(s.idx,l.tombs);s._lis=!0;var d=t(l[n]);i(r,l[n],null!=c?a[l.tombs[c]].el:c),null==c?l.tombs.push(s.idx):l.tombs.splice(c,0,s.idx),l[n]=d}}var jt=Pt(ot,kt,ut,"lftSib","lftNode","rgtSib","rgtNode",ht),Ft=Pt(rt,Mt,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]||s).el,rgtSib:(i[i.length-1]||s).el};t:for(;;){for(;;){var a=jt(t,n,o,r,null,!1);if(a===Rt)break;if(a===It)break t}for(;;){var l=Ft(t,n,o,r,r.lftNode,!1);if(l===Rt)break;if(l===It)break t}At(t,n,o,r);break}}function At(t,e,i,n){for(var o=Array.prototype.slice.call(e.childNodes),r=[],a=0;a<o.length;a++){var s=o[a]._node;s.parent===t&&r.push(s.idx)}for(var l=C(r).map((function(t){return r[t]})),c=0;c<l.length;c++)i[l[c]]._lis=!0;for(n.tombs=l;jt(t,e,i,n,null,!0)!==It;);}function Lt(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(!Lt(r)&&t.tag===r.tag&&t.type===r.type&&t.key===r.key&&(t.flags&~A)==(r.flags&~A))return r}return null}function Wt(t,e,i){return e[e._keys[t.key]]}function zt(t,i){J(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),s=c(r),l=(t.flags&N)===N;a?s||l?Bt(t,i):r!==o&&(null!=r?n.textContent=r:dt(i)):s?(dt(i),Dt(t)):r!==o&&(n.firstChild?n.firstChild.nodeValue=r:n.textContent=r),J(i.hooks,"didRecycle",i,t)}else n.nodeValue=r}function Bt(e,r){var a=e.body,s=a.length,l=r.body,c=l.length,d=(e.flags&N)===N,u=(e.flags&L)===L,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;_<l.length;_++)v[l[_].key]=_;l._keys=v}if(f&&0===s)return dt(r),void(d&&(e.body=[]));var m,y,b=0,x=!1,w=0;if(d)var C={key:null},S=Array(s);for(_=0;_<s;_++){if(d){var E=!1,D=null;p&&(h&&(C.key=a.key(_)),m=g(C,l,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,l,w))&&(zt(O,m),y=m.idx);else if(k===n){if(m=p&&g(O,l,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 R=M(O.vm);k=(T=O.vm._update(O.data,e,_,R)).node.type}}if(!h&&null!=m&&(y===w?++w===c&&s>c&&(m=null,p=!1):x=!0,c>100&&x&&++b%10==0))for(;w<c&&Lt(l[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:l,refs:null,render:null,mount:Xt,unmount:Ut,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 R(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,M(e)):e._redrawAsync(),e},update:function(t,e){var i=this;return e?i._update(t,null,null,M(i)):i._updateAsync(t),i},_update:Jt,_redraw:Kt,_redrawAsync:null,_updateAsync:null};function Xt(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&&Z(i),i}function Ut(t){var e=this,i=e.node;lt(i.el.parentNode,i.el),t||Z(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,s=a.node&&a.node.el&&a.node.el.parentNode,l=a.node;if(null!=a.diff&&(n=a._diff,a._diff=o=a.diff(a,a.data),null!=l)){var d=c(n)?b:y;if(n===o||d(n,o))return qt(a,l,t,e)}s&&J(a.hooks,"willRedraw",a,a.data);var u=a.render.call(a,a,a.data,n,o);if(u===l)return qt(a,l,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):l&&l.parent?(G(u,l.parent,l.idx,a),l.parent.body[l.idx]=u):G(u,null,null,a),!1!==i)if(l)if(l.tag!==u.tag||l.key!==u.key){l.vm=u.vm=null;var h=l.el.parentNode,f=ot(l.el);lt(h,l.el),ut(h,Ot(u),f),l.el=u.el,u.vm=a}else zt(u,l);else Ot(u);return s&&J(a.hooks,"didRedraw",a,a.data),r&&s&&Z(a),a}function Jt(t,e,i,n){var o=this;return null!=t&&o.data!==t&&(J(o.hooks,"willUpdate",o,t),o.data=t),o._redraw(e,i,n)}function Zt(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=Zt(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 se(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 le={config:_t,ViewModel:Gt,VNode:I,createView:Et,defineElement:Zt,defineSvgElement:te,defineText:H,defineComment:ee,defineView:ne,injectView:re,injectElement:ae,lazyList:se,FIXED_BODY:L,DEEP_REMOVE:A,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),Z(R(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 P.patch=ce,Yt.emit=gt,Yt.onemit=null,Yt.body=function(){return ue(this.node,[])},le.defineElementSpread=he,le.defineSvgElementSpread=fe,le}()},function(t,e,i){"use strict";(function(t){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Loader=void 0;var o=i(0),r=i(10),a=i(12),s=i(0),l=function(){function e(t,e){this._parent=t,this._changes=e}return e.prototype.load=function(t,e){var i=this;if(!t.config||this._parent.events.fire(a.DataEvents.beforeLazyLoad,[]))return this._parent.loadData=t.load().then((function(t){return t?i.parse(t,e):[]})).catch((function(t){i._parent.events.fire(a.DataEvents.loadError,[t])}))},e.prototype.parse=function(t,e){var i=this;if(void 0===e&&(e=a.DataDriver.json),"json"!==e||(0,r.hasJsonOrArrayStructure)(t)||this._parent.events.fire(a.DataEvents.loadError,["Uncaught SyntaxError: Unexpected end of input"]),!((t=(e=(0,r.toDataDriver)(e)).toJsonArray(t))instanceof Array)){var l=t.total_count-1,c=t.from;if(t=t.data,0!==this._parent.getLength())return t.forEach((function(t,e){var a=c+e,l=i._parent.getId(a);if((0,o.isId)(l)){var d=i._parent.getItem(l);if(d&&d.$empty){var u=t.id||d.id;(0,s.isDefined)(t.id)&&i._parent.changeId(l,u,!0),i._parent.update(u,n(n({},t),{$empty:void 0}),!0)}}else(0,r.dhxWarning)("item not found")})),this._parent.events.fire(a.DataEvents.afterLazyLoad,[c,t.length]),this._parent.events.fire(a.DataEvents.change),t;for(var d=[],u=0,h=0;u<=l;u++)u>=c&&u<=c+t.length-1?(d.push(t[h]),h++):d.push({$empty:!0});t=d}return this._parent.getInitialData()&&this._parent.removeAll(),this._parent.$parse(t),t},e.prototype.save=function(e){for(var i=this,n=this._getUniqueOrder(),o=function(n){if(n.saving||n.pending)(0,r.dhxWarning)("item is saving");else{var o=a._findPrevState(n.id);if(o&&o.saving){var s=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(s),n.pending=!0}else a._setPromise(n,e)}},a=this,s=0,l=n;s<l.length;s++){o(l[s])}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=l}).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,s=null!==(r=e._checkVal(t.as,i[t.by]))&&void 0!==r?r:"",l=null!==(a=e._checkVal(t.as,o[t.by]))&&void 0!==a?a:"";return(0,n.naturalCompare)(s.toString(),l.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 s=a[r],l=s.rule.call(i,t,o)*(n[s.dir]||n.asc);if(0!==l)return l}return 0})),r=o.findIndex((function(t){return t.$groupSummary}));if(-1!==r){var a=o[r];switch(o.splice(r,1),a.$groupSummary){case"top":o.unshift(a);break;case"bottom":o.push(a)}}return o},t}();e.Sort=o},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;var r=i(0),a=i(37),s=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 s=[],l={},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),l[_]||(l[_]=[]),l[_].push(f)):(this._config.showMissed&&(delete f.parent,c.push(f)),"string"==typeof this._config.showMissed&&(d=this._config.showMissed))}var m=Object.keys(l);return d&&m.push(d),m.forEach((function(e){var d,h=l[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),s.push(g),o<t.length-1&&s.push.apply(s,a._group(t,h,f,o+1)),o===t.length-1&&h.forEach((function(t){s.push(n(n({},t),{parent:f}))})),u.summary&&a._addSummaryRow(s,f,u.summary,p)})),d||s.push.apply(s,c),s}},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=s},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 s=i(0),l=i(33),c=i(14),d=i(10),u=i(12);function h(t,e,i,n){void 0!==n&&-1!==n&&t[i]&&t[i][n]?t[i].splice(n,0,e):(t[i]||(t[i]=[]),t[i].push(e))}e.addToOrder=h;var f=function(t){function e(e,i){var n,o=t.call(this,e,i)||this;o._children={};var r=o._root=e&&e.rootId||"_ROOT_"+(0,s.uid)();return o._children=((n={})[r]=[],n),o._initChildren=null,o}return o(e,t),e.prototype.add=function(t,e,i){var n,o=this;return void 0===e&&(e=-1),void 0===i&&(i=this._root),n=Array.isArray(t)?t.map((function(n,r){return o._add({newItem:n,batch:t,index:e,parent:i,order:r})})):this._add({newItem:t,batch:[t],index:e,parent:i}),this._reapplyFilters(),n},e.prototype.getRoot=function(){return this._root},e.prototype.getParent=function(t,e){if(void 0===e&&(e=!1),!this._pull[t])return null;var i=this._pull[t].parent;return e?this._pull[i]:i},e.prototype.getItems=function(t){return this._children&&this._children[t]?this._children[t]:[]},e.prototype.getLength=function(t){return void 0===t&&(t=this._root),this._children[t]?this._children[t].length:null},e.prototype.removeAll=function(e){var i;if((0,s.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 l=this._root;this._initChildren=null,this._children=((i={})[l]=[],i)}},e.prototype.update=function(e,i,n){var o=i.parent;!(0,s.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,s=this;if(void 0===i&&(i=!1),(null==e?void 0:e.smartSorting)&&(this._sorter=t),i||this._sortingStates.length&&!(null==e?void 0:e.smartSorting)&&((null===(n=this._sortingStates[0])||void 0===n?void 0:n.smartSorting)||(null==e?void 0:e.smartSorting))||(this._sortingStates=[r(r({},t),e)]),t){if(!i&&(this._initSortOrder=this._initSortOrder||a([],this._initFilterOrder||this._order,!0),!(null==e?void 0:e.smartSorting)&&(null===(o=this._sortingStates[0])||void 0===o?void 0:o.smartSorting))){var l=this._sortingStates.findIndex((function(e){return e.by==t.by}));-1!==l?this._sortingStates[l].dir=t.dir:this._sortingStates.push(t)}this._applySorters()}else this._initSortOrder&&(this._children={},this._order=[],this._sortingStates=[],this._initSortOrder.forEach((function(t){return s._parseItem(t)})),this._sorter=this._initSortOrder=this._initChildren=null,this._initFilterOrder&&(this._initFilterOrder=null,this.filter(null,{$restore:!0},!0)));i||(this._reapplyFilters(),this.events.fire(u.DataEvents.change,[void 0,"sort",t]))},e.prototype.filter=function(t,e,i){if((null==e?void 0:e.$restore)&&(t=this._normalizeFilters(t||this._filters)),!(t&&(null==e?void 0:e.add)||(this._initChildren&&(this._children=this._initChildren,this._initChildren=null),null==e?void 0:e.$restore)))for(var n in this._filters){var o=this._filters[n],r=o.rule,a=o.config;(null==a?void 0:a.permanent)?this._applyFilter(r,a):delete this._filters[n]}var l;if(t&&!(null==e?void 0:e.$restore))l=(null==e?void 0:e.id)||(0,s.uid)(),e||(e={}),e.type=e.type||u.TreeFilterType.all,this._filters[l]={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,s.isEmptyObj)(c)?null:c])}return l},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,s.isId)(r._move(t,e,i,n,o))?a.push(t):(0,d.throwMoveWarning)(t,r.exists(t))})),a}return null!==(o=this._move(t,e,i,n))&&void 0!==o?o:(0,d.throwMoveWarning)(t,this.exists(t))},e.prototype.forEach=function(t,e,i){if(void 0===e&&(e=this._root),void 0===i&&(i=1/0),this.haveItems(e)&&!(i<1))for(var n=this._children[e],o=0;o<n.length;o++)t.call(this,n[o],o,n),this.haveItems(n[o].id)&&this.forEach(t,n[o].id,--i)},e.prototype.eachChild=function(t,e,i,n){if(void 0===i&&(i=!0),void 0===n&&(n=function(){return!0}),this.haveItems(t))for(var o=0;o<this._children[t].length;o++)e.call(this,this._children[t][o],o),i&&n(this._children[t][o])&&this.eachChild(this._children[t][o].id,e,i,n)},e.prototype.getNearId=function(t){return t},e.prototype.loadItems=function(t,e){var i=this;if(void 0===e&&(e=u.DataDriver.json),this.events.fire(u.DataEvents.beforeItemLoad,[t])){var n=this.config.autoload.toString(),o=n+(n.includes("?")?"&id=".concat(t):"?id=".concat(t));new c.DataProxy(o).load().then((function(n){n=(e=(0,d.toDataDriver)(e)).toJsonArray(n),i._parse_data(n,t),i.events.fire(u.DataEvents.change),i.events.fire(u.DataEvents.afterItemLoad,[t])})).catch((function(t){i.events.fire(u.DataEvents.loadError,[t])}))}},e.prototype.refreshItems=function(t,e){void 0===e&&(e=u.DataDriver.json),this.removeAll(t),this.loadItems(t,e)},e.prototype.eachParent=function(t,e,i){void 0===i&&(i=!1);var n=this.getItem(t);if(n&&(i&&e.call(this,n),n.parent!==this._root)){var o=this.getItem(n.parent);e.call(this,o),this.eachParent(n.parent,e)}},e.prototype.haveItems=function(t){return t in this._children},e.prototype.canCopy=function(t,e){if(t===e)return!1;var i=!0;return this.eachParent(e,(function(e){return e.id===t?i=!1:null})),i},e.prototype.serialize=function(t,e){void 0===t&&(t=u.DataDriver.json);var i=this._serialize(this._root,e),n=(0,d.toDataDriver)(t);if(n)return n.serialize(i)},e.prototype.getId=function(t,e){if(void 0===e&&(e=this._root),this._children[e]&&this._children[e][t])return this._children[e][t].id},e.prototype.map=function(t,e,i){void 0===e&&(e=this._root),void 0===i&&(i=!0);var n=[];if(!this.haveItems(e))return n;for(var o=0;o<this._children[e].length;o++)if(n.push(t.call(this,this._children[e][o],o,this._children)),i){var r=this.map(t,this._children[e][o].id,i);n=n.concat(r)}return n},e.prototype.getRawData=function(e,i,n,o,r){var a;return r=null!=r?r:this._root,this._children[r]?(a=r===this._root?t.prototype.getRawData.call(this,e,i,this._children[r]):this._children[r],2===o?this.flatten(a):a):[]},e.prototype.flatten=function(t){var e=this,i=[];return t.forEach((function(t){i.push(t);var n=e._children[t.id];n&&t.$opened&&(i=i.concat(e.flatten(n)))})),i},e.prototype._add=function(t){var e=t.newItem,i=t.index,n=void 0===i?-1:i,o=t.parent,r=void 0===o?this._root:o,a=t.order,s=void 0===a?0:a,l=t.batch;if(s>0&&-1!==n&&(n+=1),this.events.fire(u.DataEvents.beforeAdd,[e,l,s])){this._setParent(e,r);var c=this._addCore(e,n);if(this._onChange("add",e.id,e),this.events.fire(u.DataEvents.afterAdd,[e,l,s]),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,s.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 l=0,c=r;l<c.length;l++){var u=c[l].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,s.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 l=this._root;this._initChildren=null,this._children=((i={})[l]=[],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),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]&&this._pull[i.parent].items&&!this._pull[i.parent].items.find((function(t){return t.id===i.id}))&&this._pull[i.parent].items.push(i),t.prototype._addToOrder.call(this,e,i,n),h(o,i,a,n),r&&h(r,i,a,n)},e.prototype._parse_data=function(t,e){var i,n,o;void 0===e&&(e=this._root);for(var r=0,a=t;r<a.length;r++){var l=a[r];this.config.init&&(l=this.config.init(l)),l&&"object"!=typeof l&&(l={value:l}),l.id=null!==(i=l.id)&&void 0!==i?i:(0,s.uid)(),l.parent=l.parent&&!(null===(o=null===(n=l.parent)||void 0===n?void 0:n.toString())||void 0===o?void 0:o.includes("_ROOT_"))?l.parent:e,this._pull[l.id]&&(0,d.dhxError)("Item ".concat(l.id," already exist")),this._parseItem(l),l.items&&l.items instanceof Object&&this._parse_data(l.items,l.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 s=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 l=function(e){return s(e)&&t(e)};(c=a.filter(l)).length?o[i]=c:i===this._root&&(o[i]=[])}else{var c;l=function(e){var i,n=!0;for(var o in t)if(t[o].by&&""!==t[o].match&&(n=t[o].compare?t[o].compare(e[t[o].by],t[o].match,e):-1!==(null===(i=e[t[o].by])||void 0===i?void 0:i.toString().toLocaleLowerCase().indexOf(t[o].match.toString().toLowerCase()))),!n)break;return s(e)&&n};(c=a.filter(l)).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,s.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,s.isDefined)(t.by))n[t.by]=t;else for(var r in t)n[r]=t[r];else n=t;this._recursiveFilter(n,e,this._root,0,o),Object.keys(o).forEach((function(t){for(var e=i.getParent(t),n=i.getItem(t);e;)o[e]||(o[e]=[]),n&&!o[e].find((function(t){return t.id===n.id}))&&o[e].push(n),n=i.getItem(e),e=i.getParent(e)})),this._children=o}},e.prototype._normalizeFilters=function(t){var e={};for(var i in t)e[i]=t[i].rule;return e},e.prototype._checkFilterRule=function(e){var i=this;return t.prototype._checkFilterRule.call(this,e)||Object.values(e).every((function(e){return"function"!=typeof e&&t.prototype._checkFilterRule.call(i,e)}))},e.prototype._applySorters=function(){for(var t in this._children)this._sort.sort(this._children[t],this._sortingStates);if(this._initChildren&&Object.keys(this._initChildren).length)for(var t in this._initChildren)this._sort.sort(this._initChildren[t],this._sortingStates)},e}(l.DataCollection);e.TreeCollection=f},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.dragManager=void 0;var r=i(2),a=i(78),s=i(12),l=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"),s="common"===a,l=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||s){var h=t._transferData,f=h.x,p=h.y,g=h.start,v=h.componentId;if(!t._transferData.ghost){if(Math.abs(f-l)<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&&!s||!t._transferData.groupable&&"group"===a||t._transferData.groupOnly&&"group"!==a&&!s&&t._transferData.start!=u),t._moveGhost(l,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,s=t.itemsForGhost,l=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(l&&(this._ghost=l),Array.isArray(c)&&c.includes(b)?(this._transferData.source=o([],c,!0),this._itemsForGhost=s):(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,l={start:i,source:n,target:o,dragItem:e.type},c=a.collectionStore.getItem(r);c&&o&&c.events.fire(s.DragEvents.cancelDrop,[l,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,l=e.dropComponentId,c=e.dropPosition,d={start:i,source:n,target:o,dropPosition:c},u=a.collectionStore.getItem(l),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(s.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(s.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(s.DragEvents.beforeDrag,[o,e,r,this._transferData.type])&&(0,c.isId)(t)?(this._transferData.component.events.fire(s.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(s.DragEvents.dragOut,[{start:_,source:m,target:y},t,this._transferData.type]),o!==b||!(0,l.isTreeCollection)(w.component.data)||(0,l.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(s.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,s=t.component.data,h=e.component.data,f=0,p=e.id,g=(0,l.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,M=this._transferData.dropPosition;switch(v){case"child":break;case"sibling":if(!h.getItem(e.id))return;var T=h.getIndex(t.id),R=h.getIndex(e.id),I=h.getParent(t.id),P=h.getParent(e.id);p=h.getParent(p),"top"===M?f=R-(-1===T||T>R||I!==P?0:1):"bottom"===M&&(f=R+(-1===T||T>R||I!==P?1:0));break;case"complex":if(k)p=e.id,f=h.getLength();else{var H=h.getItem(t.id),j=h.getItem(e.id);if(!j)return;T=h.getIndex(t.id),R=h.getIndex(e.id);var F=(null==H?void 0:H.$level)||0,$=(null==j?void 0:j.$level)||0;"top"===M?(p=h.getParent(p),f=F===$?R-(-1===T||T>R?0:1):R):"bottom"===M&&(p=h.getParent(p),f=F===$?R+(-1===T||T>R?1:0):R+1)}break;default:if((0,c.isId)(e.id)){h.getIndex(t.id)>-1&&(t.newId=(0,c.uid)());T=h.getIndex(t.id),R=h.getIndex(e.id);f="top"===M?R-(-1===T||T>R?0:1):"bottom"===M?R+(-1===T||T>R?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){s.copy(t,f,h,p),f>-1&&f++})):s.copy(t.id,f,h,p);else if(this._transferData.source instanceof Array&&this._transferData.source.length>1)s.move(this._transferData.source,f,h,p);else if(d(a)&&!a.config.columns.length){var A=r.data.getItem(t.id);a.data.parse([n({},A)]),a.setColumns(o([],r.config.columns,!0)),a.paint(),r.data.remove(t.id),r.paint()}else s.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(s.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(s.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(14),a=i(0),s=i(23),l=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(){s.ajax.get(e.url,{responseType:"text"}).then(t).catch(i),e._cooling=!0}),e.config.delay),e._cooling&&(t(null),e._cooling=!1)):(s.ajax.get(e.url,{responseType:"text"}).then(t).catch(i),e._cooling=!0,e._timeout=setTimeout((function(){})))}))},i}(r.DataProxy);e.LazyDataProxy=l}).call(this,i(9))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;var n=i(4),o=i(16),r=i(12),a=i(0),s=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=s},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 s=i(1),l=i(4),c=i(2),d=i(0),u=i(25),h=i(11),f=i(8),p=i(82),g=i(6),v=i(15),_=i(5),m=i(88),y=i(3),b=i(89),x=i(7),w=i(21),C=i(121),S=i(122),E=i(19),D=i(123),O=i(124),k=i(20),M=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,e,i)||this;if(n._touch={duration:350,dblDuration:300,timer:null,start:!1},n._destructed=!1,n._sortingStates=[],n._dropManager=null,n._commonSummary={},n._colSummary={},n.version="9.3.3",n.name="grid",n.config=(0,d.extend)({rowHeight:40,headerRowHeight:40,footerRowHeight:40,keyNavigation:!0,sortable:!0,columns:[],data:[],tooltip:!0,rootParent:"string"==typeof e&&e||n._uid},n._normalizeConfig(i)),n.content=(0,w.getContent)(n),n._scroll={top:0,left:0},n.config.autoWidth=n.config.autoWidth||n.config.fitToContainer,n.config.adjust=n.config.adjust||n.config.columnsAutoWidth,n.config.editable=n.config.editable||n.config.editing,n.config.leftSplit=n.config.leftSplit||n.config.splitAt,n.config.columns.forEach((function(t){"date"===t.type&&t.format&&(t.dateFormat=t.format)})),n._setHTMLEventHandlers(),n.config.eventHandlers)for(var o=0,r=Object.entries(n.config.eventHandlers);o<r.length;o++){var a=r[o],s=a[0],l=a[1];n._htmlEvents[s]=(0,c.eventHandler)((function(t){return{col:n.getColumn((0,c.locate)(t,"data-dhx-col-id")||(0,c.locate)(t,"data-dhx-id"))||{},row:n.data.getItem((0,c.locate)(t,"data-dhx-id"))||{}}}),l,n._htmlEvents[s])}return n._init(),n._dragInit(),n.config.columns&&n._parseColumns(!0),n._canDataParse()&&n.data.parse(n.config.data),n.selection=new m.Selection(n,{type:"string"==typeof n.config.selection&&n.config.selection||"complex",disabled:!n.config.selection,multiSelection:n.config.multiselection},n.events,n._uid),n.mount(e,n._createView()),i.autoEmptyRow&&0===n.data.getLength()&&(n._addEmptyRow(),n.paint()),n}return o(e,t),e.prototype.destructor=function(){var t;this._destructed=!0,this._destroyContent(),null===(t=this.config.$subRowCells)||void 0===t||t.forEach((function(t){var e;null===(e=t.cell)||void 0===e||e.destructor()})),this.keyManager&&this.keyManager.destructor(),this.events&&this.events.clear(),this._events&&this._events.clear(),this.export=this.content=this.selection=null,this._activeFilters=this._filterData=this._scroll=this._touch=this._htmlEvents=this._hiddenFilters=this.config.$subRowCells=null,this.unmount()},e.prototype.setColumns=function(t){var e=this;this._destroyContent(),this.config.columns=t,this._parseColumns(!0),(0,_.isAutoWidth)(this.config)&&this._applyAutoWidth(),this._setSummary(),this._adjustColumns(),this._checkFilters(),this._checkMarks(),this._normalizeSpans(),this.paint(),this.config.keyNavigation&&(0,s.awaitRedraw)().then((function(){e._initHotKey(!0),e.paint()}))},e.prototype.addRowCss=function(t,e){var i=this.data.getItem(t);if(i){var n=i.$css||"";n.match(new RegExp(e,"g"))||(i.$css=n+" ".concat(e),this.paint())}else(0,f.dhxWarning)('Row with id "'.concat(t,'" not found'))},e.prototype.removeRowCss=function(t,e){var i=this.data.getItem(t);if(i){var n=i.$css?i.$css.replace(e,""):"";i.$css=n,this.paint()}else(0,f.dhxWarning)('Row with id "'.concat(t,'" not found'))},e.prototype.addCellCss=function(t,e,i){var n=this.getColumn(e);if(n){n.$cellCss=n.$cellCss||{};var o=n.$cellCss[t];if(o){var r=o.match(new RegExp(i,"g"))?"":" ".concat(i);n.$cellCss[t]+=r}else this.data.getItem(t)&&(n.$cellCss[t]="".concat(i," "));this.paint()}},e.prototype.removeCellCss=function(t,e,i){var n=this.getColumn(e);n&&(n.$cellCss[t]?(n.$cellCss[t]=n.$cellCss[t].replace(i,""),this.paint()):this.data.getItem(t)&&(n.$cellCss[t]=""))},e.prototype.showColumn=function(t){var e=this.getColumn(t);e&&e.hidden&&this.events.fire(y.GridEvents.beforeColumnShow,[e])&&(this._showColumn(e),this.events.fire(y.GridEvents.afterColumnShow,[e]))},e.prototype.hideColumn=function(t){var e=this.getColumn(t);e&&!e.hidden&&this.events.fire(y.GridEvents.beforeColumnHide,[e])&&(this._hideColumn(e),this.events.fire(y.GridEvents.afterColumnHide,[e]))},e.prototype.isColumnHidden=function(t){var e=this.getColumn(t);if(e)return!!e.hidden},e.prototype.showRow=function(t){if((0,d.isDefined)(t)){var e=t.toString(),i=this.data.getItem(e);i&&i.hidden&&this.events.fire(y.GridEvents.beforeRowShow,[i])&&(this.data.update(e,{hidden:!1}),this._checkFilters(!0),this.paint(),this.events.fire(y.GridEvents.afterRowShow,[i]))}},e.prototype.hideRow=function(t){if((0,d.isDefined)(t)){var e=t.toString(),i=this.data.getItem(e);i&&this.events.fire(y.GridEvents.beforeRowHide,[i])&&(this.data.update(e,{hidden:!0}),this._checkFilters(!0),this._checkSelectFilterValue(),this.paint(),this.events.fire(y.GridEvents.afterRowHide,[i]))}},e.prototype.isRowHidden=function(t){if((0,d.isDefined)(t)){var e=this.data.getItem(t.toString());return e?!!e.hidden:void 0}},e.prototype.getScrollState=function(){return{x:this._scroll.left,y:this._scroll.top}},e.prototype.scroll=function(t,e){var i=this.getRootView().refs.grid_body.el.querySelector(".scroll-view")||this.getRootView().refs.grid_body.el;i.scrollLeft=!t&&0!==t||"number"!=typeof t?i.scrollLeft:t,i.scrollTop=!e&&0!==e||"number"!=typeof e?i.scrollTop:e,this.paint()},e.prototype.scrollTo=function(t,e){var i=this.config,n=i.topSplit,o=i.bottomSplit,r=i.columns,a=i.$width,s=i.$height,l=i.$headerHeight,c=r.filter((function(t){return!t.hidden})),u=this.data.getRawData(0,-1,null,2),h=c.findIndex((function(t){return t.id==e})),f=u.findIndex((function(e){return e.id==t}));if((0,d.isDefined)(h)&&(0,d.isDefined)(f)){var p=this.getScrollState(),v=this.selection.getCell(),m=v&&r.findIndex((function(t){return t.id==v.column.id})),b=v&&u.findIndex((function(t){return t.id==v.row.id})),w=(0,x.getCurrFixedCols)(this.config,y.Split.left).length,C=(0,x.getCurrFixedCols)(this.config,y.Split.right).length,S=w&&m<w,E=C&&m>=r.length-C,D=n&&b<n,O=o&&b>=u.length-o,k=(0,_.getTotalWidth)(c.slice(0,h)),M=(0,_.getTotalHeight)(u.slice(0,f)),T=(0,g.getTotalRowHeight)(u[f]);if(w){var R=(0,_.getTotalWidth)((0,x.getCurrFixedCols)(this.config,y.Split.left));(!S&&!E&&h<m||k-p.x-R<0)&&(k-=R)}if(C){var I=(0,_.getTotalWidth)((0,x.getCurrFixedCols)(this.config,y.Split.right));(!S&&!E&&h>m||a+p.x-k-c[h].$width-I<0)&&(k+=I)}if(n){var P=(0,_.getTotalHeight)(u.slice(0,n));(!D&&!O&&f<b||M-p.y-P<0)&&(M-=P)}if(o){var H=(0,_.getTotalHeight)(u.slice(-o));(!D&&!O&&f>b||s+p.y-l-M-T-H<0)&&(M+=H)}var j=a+p.x,F=s+p.y-l,$=M-p.y-T,A=k-p.x-r[h].$width,L=M+2*T+18-F,V=k+2*r[h].$width+18-j,N=$>0&&L<0?0:$<0?$:L,W=A>0&&V<0?0:A<0?A:V;this.scroll(W+p.x,N+p.y)}},e.prototype.adjustColumnWidth=function(t,e){void 0===e&&(e=!0);var i=this.config.columns.filter((function(t){return!t.hidden})),n=i.filter((function(e){return e.id===t})),o=this._adjustColumnsWidth({rows:this.config.data,cols:n,totalCols:i,adjust:e});this.config.$totalWidth=i.reduce((function(t,e){if(o[e.id]){e.$fixedWidth=!0;var i=e.maxWidth,n=e.minWidth,r=o[e.id];e.$width=r,i&&r>i&&(e.$width=i),n&&e.$width<n&&(e.$width=n)}return t+e.$width}),0),this.paint()},e.prototype.getCellRect=function(t,e){var i,n,o=this.config.columns.filter((function(t){return!t.hidden}));(0,d.isDefined)(e)||(e=this.config.columns[0].id);var r=this.data.getRawData(0,-1),a=this.getSpan(t,e),s=o.findIndex((function(t){return t.id==(a?a.column:e)})),l=r.findIndex((function(e){return e.id==(a?a.row:t)})),c=(0,_.getTotalWidth)(o.slice(0,s)),u=(0,_.getTotalHeight)(r.slice(0,l));if("bottom"===this.config.footerPosition&&"auto"!==this.config.height&&this.config.$height>=this.config.$totalHeight&&this.config.bottomSplit){var h=r.slice(-this.config.bottomSplit)||[],f=h.findIndex((function(e){return e.id===t}));if(h.length&&-1!==f){var p=(0,x.calcScrollBarWidth)(this.config,!!(null===(i=this.scrollView)||void 0===i?void 0:i.config.enable));u=this.config.$height-this.config.$footerHeight-this.config.$headerHeight-(0,_.getTotalHeight)(h.slice(f))-p.x-x.BORDERS}}return{x:c,y:u,height:(null==a?void 0:a.rowspan)>1?(0,v.getSpanHeight)(r,a):(0,g.getTotalRowHeight)(r[l])||0,width:(null==a?void 0:a.colspan)>1?(0,v.getWidth)(this.config.columns,a.colspan,this.config.columns.findIndex((function(t){return t.id===a.column}))):(null===(n=o[s])||void 0===n?void 0:n.$width)||0}},e.prototype.getColumn=function(t){for(var e,i=0,n=null===(e=this.config)||void 0===e?void 0:e.columns;i<n.length;i++){var o=n[i];if(o.id==t)return o}},e.prototype.addSpan=function(t){this.config.spans=this.config.spans||[];var e=(0,d.findIndex)(this.config.spans,(function(e){return"".concat(e.row)==="".concat(t.row)&&"".concat(e.column)==="".concat(t.column)}));e>=0?this.config.spans[e]=t:(this.config.spans.push((0,E.normalizeSpan)(t,this.config,this.data)),this._checkMarks(),this.paint())},e.prototype.getSpan=function(t,e){var i,n=this;if(this.config.spans){var o=this.data.getIndex(t.toString()),r=this.config.columns.findIndex((function(t){return t.id===e})),a=(0,d.findIndex)(this.config.spans,(function(t){var e=n.data.getIndex(t.row.toString()),i=n.config.columns.findIndex((function(e){return e.id===t.column})),a=e,s=t.rowspan?e+t.rowspan:e+1,l=i,c=t.colspan?i+t.colspan:i+1;return o>=a&&o<s&&r>=l&&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,s=this.getSpan(o.id,r.id);if(!s||"function"!=typeof s.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==s?void 0:s.text)&&(i=this.config.autoHeight?"textarea":"input")),"number"===r.type)if(!((0,d.isDefined)(null==s?void 0:s.text)&&["input","textarea"].includes(i))&&!["input","select","combobox"].includes(i))return;this.events.fire(y.GridEvents.beforeEditStart,[o,r,i])&&((null===(n=this.config.$editable)||void 0===n?void 0:n.editor)||this.config.$editable&&this.config.$editable.row===t&&this.config.$editable.col===e&&this.config.$editable.editorType===i||(this.config.$editable={row:o.id,col:r.id,isSpan:!!s,editorType:i},this.selection.config.disabled||this.selection.setCell(t.toString(),e.toString()),this.paint(),this.events.fire(y.GridEvents.afterEditStart,[o,r,i])))}}else(0,f.dhxWarning)("item not found")},e.prototype.editEnd=function(t){this.config.$editable&&this.config.$editable.editor&&this.config.$editable.editor.endEdit(t)},e.prototype.getHeaderFilter=function(t){var e=this,i=this.getColumn(t);if(i){var n=null;return i.header.forEach((function(i){i.content&&(n=e.content[i.content].element[t])})),n}},e.prototype.getSummary=function(t){return r(r({},this._commonSummary),t?this._colSummary[t]:{})},e.prototype.getSortingState=function(){var t,e=null===(t=this._sortingStates)||void 0===t?void 0:t[0];return{dir:e.dir,by:e.by}},e.prototype._createView=function(){var t=this;return(0,s.create)({render:function(e,i){return t._destructed?(0,s.el)("div"):(0,b.render)(e,i,t._htmlEvents,t.selection,t._uid)},hooks:this._initHooks()},this)},e.prototype._dragInit=function(){(this.config.dragMode||this.config.dragItem)&&(f.dragManager.setItem(this._uid,this),this._dropManager=new D.DropManager({view:this}),this.config.dragItem||(this.config.dragItem="row"),this.config.dragMode||(this.config.dragMode="both"))},e.prototype._parseColumns=function(t){void 0===t&&(t=!1);var e=this.config.columns.filter((function(t){return!t.hidden}));this.normalizeColumns({config:this.config,columns:e,configChanged:t}),(0,g.countColumns)(this.config,e)},e.prototype.normalizeColumns=function(t){var e,i,n,o=this,r=t.config,a=t.columns,s=t.configChanged;r.$headerHeightMap=[],r.$footerHeightMap=[],r.$headerHeight=r.$footerHeight=0;for(var l=0,c=a;l<c.length;l++){(p=c[l]).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&&!s?p.$width:d,p.$width>p.maxWidth&&(p.$width=p.maxWidth),p.$width<p.minWidth&&(p.$width=p.minWidth)}for(var u=function(t){if(null===(i=t.header)||void 0===i?void 0:i.length){var e=0;t.header.forEach((function(i,n){(e=r.headerAutoHeight?o.getNormalizeContentHeight(i,t,r):r.headerRowHeight)>(r.$headerHeightMap[n]||0)&&(r.$headerHeightMap[n]=Math.max(e,r.headerRowHeight))}))}if(null===(n=t.footer)||void 0===n?void 0:n.length){var a=0;t.footer.forEach((function(e,i){(a=r.footerAutoHeight?o.getNormalizeContentHeight(e,t,r):r.footerRowHeight)>(r.$footerHeightMap[i]||0)&&(r.$footerHeightMap[i]=Math.max(a,r.footerRowHeight))}))}},h=0,f=a;h<f.length;h++){var p;u(p=f[h])}r.$headerHeight=r.$headerHeightMap.reduce((function(t,e){return t+e}),0),r.$footerHeight=r.$footerHeightMap.reduce((function(t,e){return t+e}),0)},e.prototype.getNormalizeContentHeight=function(t,e,i){return this.config.footerRowHeight},e.prototype._parseData=function(){this._detectColsTypes(),this.config.data=this.data.map((function(t){return t})),this.config.data=this._prepareData(this.data),this._checkMarks(),this._applyLocalFilter(),this._checkFilters()},e.prototype._createCollection=function(){this.data=new f.DataCollection(null,this.events)},e.prototype._getRowIndex=function(t){return this.data.getIndex(t)},e.prototype._setHTMLEventHandlers=function(){var t=this,e=function(e){var i,n=t.getColumn((0,c.locate)(e,"data-dhx-col-id")),o=t.data.getItem((0,c.locate)(e,"data-dhx-id"));if(o&&n&&(0,_.isTooltip)(t.config,n)){var a=void 0;if("combobox"===n.editorType||"select"===n.editorType){var s=(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=s instanceof Object?s.value:s}else if("multiselect"===n.editorType){var l=null===(i=o[n.id])||void 0===i?void 0:i.toString().split(", ");if(null==l?void 0:l.length)a=(0,g.getEditorOptions)(n,o).filter((function(t){return l.includes(t instanceof Object?t.id.toString():t)})).map((function(t){return t instanceof Object?t.value:t})).join(", ")}var d=(0,g.applyPattern)(a||o[n.id],n),u=function(){return!!d||"boolean"==typeof d};n.tooltipTemplate?d=n.tooltipTemplate(d,o,n)||null:u()&&n.template&&(d=n.template(d,o,n)),u()&&(0,_.showTooltip)(d,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,n)},(0,_.getTooltipConfig)(t.config,n)))}},i=function(e,i){var n;void 0===i&&(i="header");var o=(0,c.locate)(e,"data-dhx-text-id"),a=(0,c.locate)(e,"data-dhx-id"),s=t.getColumn(a);if(o&&s){var l=null===(n=s[i])||void 0===n?void 0:n.find((function(t){return t.id===o}));if((0,_.isContentTooltip)(t.config,s,l,i)){var d=null==l?void 0:l.text,u=t.getSummary(s.id);"function"==typeof d&&(d=d(u)),"function"==typeof(null==l?void 0:l.tooltipTemplate)&&(d=l.tooltipTemplate(r({value:d},u),l,s)||null),(null==d?void 0:d.toString().length)&&(0,_.showTooltip)(d,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,s,l)},(0,_.getTooltipConfig)(t.config,s,l,i)))}}},n=function(e){var i,n=t.getColumn((0,c.locate)(e,"data-dhx-col-id")),o=t.data.getItem((0,c.locate)(e,"data-dhx-id")),a=t.getSpan(o.id,n.id);if(o&&a&&(0,_.isTooltip)(t.config,a)){var s=t.getSummary(n.id),l=null===(i=("function"==typeof a.text?a.text(s):a.text)||(0,g.applyPattern)(o[n.id],n))||void 0===i?void 0:i.toString();a.tooltipTemplate?l=a.tooltipTemplate(r({value:l},s),a)||null:n.template&&(l=n.template(l,o,n)),l&&(0,_.showTooltip)(l,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,n)},(0,_.getTooltipConfig)(t.config,null,a)))}};this._htmlEvents={onclick:(0,c.eventHandler)((function(t){return(0,c.locate)(t)}),{"dhx_grid-header-cell--sortable":function(e,i){var n=e.target.getAttribute("dhx_resized"),o=t.getColumn(i);if(o&&(0,_.isSortable)(t.config,o)&&!n){var r=(0,c.locate)(e,"data-dhx-text-id"),a=o.header.find((function(t){return t.id===r}));t._sort(i,a.sortAs)}},"dhx_grid-expand-cell":function(e,i){e.target.classList.contains("dhx_grid-expand-cell-icon")&&t.events.fire(y.GridEvents.expand,[i])},"dhx_span-expand-cell":function(e,i){e.target.classList.contains("dhx_span-expand-cell-icon")&&t.events.fire(y.GridEvents.expand,[i])}}),onscroll:function(e){t.events.fire(y.GridEvents.scroll,[{y:e.target.scrollTop,x:e.target.scrollLeft}])},onmouseover:function(t){for(var o=[{className:"dhx_grid-header-cell",action:function(t){return i(t,"header")}},{className:"dhx_grid-footer-cell",action:function(t){return i(t,"footer")}},{className:"dhx_grid-cell",action:e},{className:"dhx_span-cell",action:n}],r=0,a=o;r<a.length;r++){var s=a[r],l=s.className,d=s.action,u=(0,c.locateNodeByClassName)(t,l);if(u){d(u);break}}}}},e.prototype._setEventHandlers=function(){var t=this;this.data.events.on(f.DataEvents.load,(function(){if(t._applyLocalFilter(!0),t._parseData(),t._parseColumns(),t.config.autoEmptyRow){var e=t.data.find({by:"$emptyRow",match:!0});e?t.data.move(e.id,t.data.getLength()-1):t._addEmptyRow()}t.config.data instanceof f.DataCollection?(0,s.awaitRedraw)().then((function(){return t._normalizeSpans()})):t._normalizeSpans(),t.paint()})),this.data.events.on(f.DataEvents.change,(function(e,i,n){if("load"!==i&&"add"!==i&&"remove"!==i)if("setPage"!==i){if("sort"===i?t._setSort():"update"===i?t.config.data=t._prepareData(t.data):((0,f.isTreeCollection)(t.data)?t.config.data=t._prepareData(t.data):t._setSummary(),t._adjustColumns()),(0,d.isId)(e)&&(t._checkFilters(),t._checkSelectFilterValue()),t._detectColsTypes(),t._removeMarks(),t._checkMarks(),t.config.autoEmptyRow&&(!t._activeFilters||(0,d.isEmptyObj)(t._activeFilters))){var o=t.data.find({by:"$emptyRow",match:!0});if(o){if(o.id===e)return;t.data.move(o.id,t.data.getLength()-1)}else t._addEmptyRow()}if("sort"===i)t._normalizeSpans();t._render()}else(0,s.awaitRedraw)().then((function(){var e=t.config.columns.find((function(t){return!0!==t.hidden}));t.scrollTo(t.data.getId(n[0]).toString(),e.id.toString()),t._render()}))})),this.data.events.on(f.DataEvents.filter,(function(e){e||t.data.getRawFilters({permanent:!0})||t._applyLocalFilter(),!e||(0,f.isOnlyPermanentFilters)(e)?(t._filterData=t.data.map((function(t){return t}))||[],t._setUniqueData(),t._clearFilterValue()):t._checkFilters(),t._setSummary(),t._removeMarks(),t._checkMarks(),t._normalizeSpans(),t.paint()})),this.data.events.on(f.DataEvents.removeAll,(function(){t._hiddenFilters={},t.config.columns.map((function(t){t.header.map((function(e){!e.content||"selectFilter"!==e.content&&"comboFilter"!==e.content||(t.$uniqueData=[])}))})),(0,d.isEmptyObj)(t._activeFilters)||t.data.resetFilter(),t._clearFilterValue(!0)})),this.data.events.on(f.DataEvents.afterAdd,(function(e,i,n){i.length===++n&&t._handleRow(e.id,"add")})),this.data.events.on(f.DataEvents.afterRemove,(function(e,i,n){i.length===++n&&t._handleRow(e.id,"remove")})),this.events.on(f.DragEvents.beforeDrag,(function(e,i,n,o){if("row"===o)return!t.data.isGrouped()&&t.events.fire(y.GridEvents.beforeRowDrag,[e,i])})),this.events.on(f.DragEvents.dragStart,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.dragRowStart,[e,i]),t._autoScroll("vertical")})),this.events.on(f.DragEvents.dragIn,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.dragRowIn,[e,i])})),this.events.on(f.DragEvents.dragOut,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.dragRowOut,[e,i])})),this.events.on(f.DragEvents.canDrop,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.canRowDrop,[e,i])})),this.events.on(f.DragEvents.cancelDrop,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.cancelRowDrop,[e,i])})),this.events.on(f.DragEvents.beforeDrop,(function(e,i,n){if("row"===n)return t.events.fire(y.GridEvents.beforeRowDrop,[e,i])})),this.events.on(f.DragEvents.afterDrop,(function(e,i,n){var o,r=e.source,s=e.target,l=e.start;if("row"===n){var c=t.data.getItem(e.start);if(!c||r.some((function(t){return t==s})))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==l})),g=null==f?void 0:f.findIndex((function(t){return t.id==s}));if(p>-1&&g>-1)if((null==r?void 0:r.length)>1){for(var v=[],_=function(t){var e=null==f?void 0:f.findIndex((function(e){return e.id==t})),i=null==f?void 0:f.splice(e,1)[0];v.push(i)},m=0,b=r;m<b.length;m++){_(b[m])}g=null==f?void 0:f.findIndex((function(t){return t.id==s})),g>0&&++g,null==f||f.splice.apply(f,a([g,0],v,!1))}else null==f||f.splice(g,0,null==f?void 0:f.splice(p,1)[0]);t._adjustColumns(),t._checkFilters(),t.paint(),t.events.fire(y.GridEvents.afterRowDrop,[e,i])}})),this.events.on(f.DragEvents.afterDrag,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.afterRowDrag,[e,i]),t._normalizeSpans()})),this.events.on(y.GridEvents.dragPanelItemMouseDown,(function(e,i){t._dragProcess(i,t.data.getItem(e))})),this.events.on(y.GridEvents.cellMouseDown,(function(e,i,n){!t.config.dragPanel&&t._dragProcess(n,e,i)})),this._events.on(y.GridSystemEvents.cellTouchMove,(function(e,i,n){t._touch.start&&n.preventDefault(),t._clearTouchTimer()})),this._events.on(y.GridSystemEvents.cellTouchEnd,(function(){t._touch.start=!1,t._clearTouchTimer()})),this.events.on(y.GridEvents.filterChange,(function(e,i,n,o){var r,a,s;if(t.events.fire(y.GridEvents.beforeFilter,[e,i])){if(t.config.autoEmptyRow){var l=t.data.find({by:"$emptyRow",match:!0});l&&t.data.remove(l.id)}t._activeFilters||(t._activeFilters={});var c=t.getColumn(i),d=c.header.filter((function(t){return t.content===n&&void 0!==t.customFilter}))[0];if("comboFilter"===n&&void 0!==e||"comboFilter"!==n&&""!==e){var u=(0,g.getEditorOptions)(c);"combobox"!==c.editorType&&"select"!==c.editorType&&"multiselect"!==c.editorType||!u||(e=Array.isArray(e)?e.map((function(t){var e;return(null===(e=u.find((function(e){return"string"==typeof e?e===t:e.value===t})))||void 0===e?void 0:e.id)||t})):null!==(a=null===(r=u.find((function(t){return"string"==typeof t?t===e:t.value===e})))||void 0===r?void 0:r.id)&&void 0!==a?a:e);t._activeFilters[i]={by:i,match:e,compare:null!==(s=null==d?void 0:d.customFilter)&&void 0!==s?s:function(e){var i=t.getColumn(e);return function(e,o,r,a){return t.content[n].match({val:e,match:o,obj:r,multi:a,col:i})}}(i),multi:"multiselect"===(null==c?void 0:c.editorType)}}else delete t._activeFilters[i];o||t.data.filter(t._activeFilters)}})),this.events.on(y.GridEvents.scroll,(function(e){t._scroll={top:e.y,left:e.x},t.paint()})),this.events.on(y.GridEvents.cellDblClick,(function(e,i,n){e&&((0,c.locateNodeByClassName)(n,"dhx_boolean-cell")||e.hasOwnProperty("$group")||(!1!==i.editable&&t.config.editable||i.editable)&&t.editCell(e.id,i.id,i.editorType))})),this.events.on(y.GridEvents.afterEditEnd,(function(e,i,n){t._afterEditEndProcess(e,i,n)})),this.events.on(y.GridEvents.headerCellMouseDown,(function(e,i,n){var o=n.target.getAttribute("dhx_resized");if(o&&t.events.fire(y.GridEvents.beforeResizeStart,[i,n])&&(0,C.startResize)(t,o.toString(),n,(function(){t.paint(),t.config.$resizing=null,t.events.fire(y.GridEvents.afterResizeEnd,[i,n])})),n.targetTouches){if(t._touch.timeStamp)t._touch.dblDuration>=t._touch.timeStamp-+n.timeStamp.toFixed()&&(n.preventDefault(),t.events.fire(y.GridEvents.headerCellDblClick,[e,i,n])),t._touch.timeStamp=null;else t._touch.timeStamp=+n.timeStamp.toFixed();setTimeout((function(){t._touch.timeStamp=null}),t._touch.dblDuration)}})),this.events.on(y.GridEvents.footerCellDblClick,(function(e,i,n){if(n.targetTouches){if(t._touch.timeStamp)t._touch.dblDuration>=t._touch.timeStamp-+n.timeStamp.toFixed()&&(n.preventDefault(),t.events.fire(y.GridEvents.footerCellDblClick,[e,i,n])),t._touch.timeStamp=null;else t._touch.timeStamp=+n.timeStamp.toFixed();setTimeout((function(){t._touch.timeStamp=null}),t._touch.dblDuration)}})),this.events.on(y.GridEvents.resize,(function(){return t._parseColumns()})),this.events.on(y.GridEvents.afterResizeEnd,(function(e){var i;t.config.columns=null===(i=t.config.columns)||void 0===i?void 0:i.map((function(t){return t.id==e.id&&(t.width=e.$width),t})),t._parseColumns()}))},e.prototype._afterEditEndProcess=function(t,e,i){var n,o;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 a,s;this.config.$editable?(a=this.config.$editable.row,s=this.config.$editable.col):(a=e.id,s=i.id);var l=this.getSpan(a,s);if((0,d.isDefined)(null==l?void 0:l.text)&&(0,d.isDefined)(t))l.text=t.toString();else{var c=this.data.getItem(a);delete c.$emptyRow,(0,d.isDefined)(t)&&this.data.update(a,r(r({},c),((n={})[s]=t,n)))}this.config.$editable=null,this.paint()}},e.prototype._addEmptyRow=function(){var t=this.data.getId(this.data.getLength()-1),e=this.data.getItem(t),i=this.config.columns.filter((function(t){return!t.hidden}));(0,_.isRowEmpty)(e)||this.data.add(i.reduce((function(t,e){return t[e.id]="",t}),{$emptyRow:!0}))},e.prototype._sort=function(t,e,i){void 0===i&&(i=this.config.multiSort);var n=this.getColumn(t),o=this._sortingStates.find((function(e){return e.by==t}));if(this.events.fire(y.GridEvents.beforeSort,[n,"asc"===(null==o?void 0:o.dir)?"desc":"asc"])){var r="asc";(null==o?void 0:o.by)===t&&(r="asc"===o.dir?"desc":"asc");this.data.sort({by:t,dir:r,as:null!=e?e:function(t){return t&&"date"===n.type?(0,x.getNormalizeDateObject)(t,n.dateFormat).getTime():t?"".concat(t):""}},{smartSorting:i}),this.events.fire(y.GridEvents.afterSort,[n,r])}},e.prototype._setSort=function(){var t,e=null===(t=this.data.getSortingStates())||void 0===t?void 0:t[0];this._sortingStates=e&&[e]||[]},e.prototype._clearTouchTimer=function(){this._touch.timer&&(clearTimeout(this._touch.timer),this._touch.timer=null)},e.prototype._checkFilters=function(t){if(void 0===t&&(t=!1),(0,d.isEmptyObj)(this._activeFilters))t&&this.data.resetFilter(),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData();else{var e=this.data.getRawFilters({permanent:!0});this.data.filter(e,{$restore:!0},!0),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData(),this.data.filter(null,{$restore:!0},!0),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData(!0)}},e.prototype._setUniqueData=function(t){var e=this;void 0===t&&(t=!1),this._filterData&&this.config.columns.forEach((function(i){i.header.forEach((function(n){var o;if(!(null===(o=e._activeFilters)||void 0===o?void 0:o[i.id])&&n.content&&("selectFilter"===n.content||"comboFilter"===n.content)){var r=i.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.multiselection})),a=i.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.filter}));if(!t||t&&!a){var s=(0,g.getNormalizeFilterData)(e._filterData,i.id,r,i.editorType),l=(0,g.getEditorOptions)(i);"combobox"!==i.editorType&&"select"!==i.editorType&&"multiselect"!==i.editorType||!l||(s=s.map((function(t){var e=l.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,t?i.$activeFilterData=s:(i.$uniqueData=s,i.$activeFilterData&&delete i.$activeFilterData)}}}))}))},e.prototype._checkSelectFilterValue=function(){var t,e=null===(t=this.content)||void 0===t?void 0:t.selectFilter;if(e)for(var i in e.value){var n=this.getColumn(i),o=e.value[i];n.hidden||!o||n.$uniqueData.includes(o)||e.element[i].clear()}},e.prototype._clearFilterValue=function(t){var e=this;void 0===t&&(t=!1),["selectFilter","inputFilter","dateFilter"].map((function(t){var i;return null===(i=e.content)||void 0===i?void 0:i[t]})).filter((function(t){return t})).forEach((function(i){for(var n in i.value)!i.value[n]||!t&&e.getColumn(n).hidden||i.element[n].clear(!0)}))},e.prototype._adjustColumns=function(){var t=this,e=this.config.columns.filter((function(t){return!t.hidden})),i=[],n=[],o={};if(e.forEach((function(t){(0,d.isDefined)(t.adjust)?t.adjust&&i.push(t):n.push(t)})),i.length||n.length){var a=this.config.data&&this.config.data.length?this.config.data:this.data.map((function(t){return t}));i.forEach((function(i){o=r(r({},o),t._adjustColumnsWidth({rows:a,cols:[i],totalCols:e,adjust:i.adjust}))})),n.length&&(o=r(r({},o),this._adjustColumnsWidth({rows:a,cols:n,totalCols:e})))}this.config.$totalWidth=e.reduce((function(t,e){if(o[e.id]){e.$fixedWidth=!0;var i=e.maxWidth,n=e.minWidth,r=o[e.id];e.$width=r,i&&r>i&&(e.$width=i),n&&e.$width<n&&(e.$width=n)}return t+e.$width}),0)},e.prototype._prepareData=function(t){var e=this;return(this.config.autoHeight||this.config.headerAutoHeight||this.config.footerAutoHeight)&&(this.config.autoHeight=this.config.headerAutoHeight=this.config.footerAutoHeight=!1),this._normalizeDataType(),this._setSummary(),this._adjustColumns(),t.map((function(t){return t.$height=Number(t.height)||e.config.rowHeight,t}))},e.prototype._adjustColumnsWidth=function(t){var e,i,n,o,r=this,a=t.rows,s=t.cols,l=t.adjust,c=void 0===l?this.config.adjust:l,d={};if("header"===c||!0===c){var u=s.filter((function(t){return t.header}));if(y=(0,g.getMaxColsWidth)(this._prepareColumnData(u,"header"),u,{font:"normal 14.4px Arial"},"header"))for(var h=0,f=Object.entries(y);h<f.length;h++){var p=f[h],v=p[0],m=p[1];d=Object.assign(d,((e={})[v]=+m+24+(o=this.getColumn(v),(0,_.isSortable)(r.config,o)?16:0),e))}}if("footer"===c||!0===c){var y;u=s.filter((function(t){return t.footer}));if(y=(0,g.getMaxColsWidth)(this._prepareColumnData(u,"footer"),u,{font:"normal 14.4px Arial"},"footer"))for(var b=0,x=Object.entries(y);b<x.length;b++){var w=x[b];v=w[0],m=w[1];(d[v]&&d[v]<+m+24||!d[v])&&(d=Object.assign(d,((i={})[v]=+m+24,i)))}}if(("data"===c||!0===c)&&(y=(0,g.getMaxColsWidth)(a,s,{font:"normal 14.4px Arial"},"data")))for(var C=0,S=Object.entries(y);C<S.length;C++){var E=S[C];v=E[0],m=E[1];(d[v]&&d[v]<+m+24||!d[v])&&(d=Object.assign(d,((n={})[v]=+m+24,n)))}return d},e.prototype._prepareColumnData=function(t,e){for(var i,n,o,a=[],s=0;s<t.length;s++){for(var l=[],c=t[s],d=0;d<(null==c?void 0:c[e].length);d++){var u={},h=null===(n=null==c?void 0:c[e][d])||void 0===n?void 0:n.text;if(h){"function"==typeof h&&(h=h(this.getSummary(c.id)));var f=null===(o=null==c?void 0:c[e][d])||void 0===o?void 0:o.htmlEnable;u[c.id]=h||"",f&&(u[c.id]=(0,_.removeHTMLTags)(u[c.id]))}else u[c.id]="";l.push(u)}for(var p=0;p<l.length;p++)for(var g=0,v=Object.entries(l[p]);g<v.length;g++){var m=v[g],y=m[0],b=m[1];a[p]=r({},a[p])||{},a[p]=Object.assign(a[p],((i={})[y]=b,i))}}return a},e.prototype._dragStart=function(t){if(this.config.dragMode&&("row"===this.config.dragItem||"both"===this.config.dragItem)&&!this.config.$editable){var e=this.data.getItem((0,c.locate)(t,"data-dhx-id")).id;t.targetTouches&&(this._touch.start=!0),f.dragManager.onMouseDown({event:t,source:[e],itemsForGhost:[this._getRowGhost([e])],type:"row"})}},e.prototype._dragProcess=function(t,e,i){var n=this;if(t.targetTouches){if(this._touch.timer=setTimeout((function(){n._dragStart(t)}),this._touch.duration),this._touch.timeStamp)this._touch.dblDuration>=this._touch.timeStamp-+t.timeStamp.toFixed()&&((!1!==i.editable&&this.config.editable||i.editable)&&this.editCell(e.id,i.id,i.editorType),t.preventDefault(),this.events.fire(y.GridEvents.cellDblClick,[e,i,t])),this._touch.timeStamp=null;else this._touch.timeStamp=+t.timeStamp.toFixed();setTimeout((function(){n._touch.timeStamp=null}),this._touch.dblDuration)}else this._dragStart(t)},e.prototype._getRowGhost=function(t){for(var e,i=this.config,n=i.$totalWidth,o=i.$width,r=this.getRootNode(),a=(0,x.getCurrFixedCols)(this.config,y.Split.left),s=(0,x.getCurrFixedCols)(this.config,y.Split.right),l=(0,x.calcScrollBarWidth)(this.config,!!(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)),d=[],u=function(e){var i=t[e],u=(0,O.getRowNode)(i,r);if(!u)return"continue";var h=n>o-l.y?o-l.y-x.BORDERS:n;if(a.length||s.length){var f=new Array(3);if(f[1]=u,a.length){var p=(0,O.getRowNode)(i,r,"left");h-=p.offsetWidth,f[0]=p}if(s.length){var g=(0,O.getRowNode)(i,r,"right");h-=g.offsetWidth,f[2]=g}var v=document.createElement("div");return v.style.display="flex",f.forEach((function(t){if(t){var e=t.cloneNode(!0);if(t===u){var i=(0,c.getNodeOffset)(t,r).left-(0,_.getTotalWidth)(a)-x.BORDERS/2;v.appendChild((0,O.getVisibleRowNode)(e,h,i))}else e.removeAttribute("aria-rowindex"),e.style.width=t.offsetWidth+"px",v.appendChild(e)}})),{value:v}}var m=u.cloneNode(!0);d.push((0,O.getVisibleRowNode)(m,h,(0,c.getNodeOffset)(u,r).left-x.BORDERS/2))},h=0;h<t.length;h++){var f=u(h);if("object"==typeof f)return f.value}var p=document.createElement("div");return p.style.setProperty("width","initial","important"),d.forEach((function(t){return p.appendChild(t)})),p},e.prototype._initHooks=function(){var t=this;return{didMount:function(){t._canDataParse(!0)&&(t._container||t._applyAutoWidth(),t.data.parse(t.config.data)),t.config.autoWidth&&t._parseColumns(),t.config.keyNavigation&&(t.keyManager&&t.keyManager.destructor(),t.keyManager=new u.KeyManager((function(e,i){return!(i!==t._uid||!t.events.fire(y.GridEvents.beforeKeyDown,[e]))&&(t.events.fire(y.GridEvents.afterKeyDown,[e]),!0)})),t._initHotKey())}}},e.prototype._normalizeDataType=function(){var t=this,e=this.config.columns.reduce((function(t,e){return"number"===e.type&&t.push(e),t}),[]);e.length&&this.data.forEach((function(i){for(var n,o=0,r=e;o<r.length;o++){var a=r[o],s=(0,g.getValueForNumberColumn)(a,i[a.id]);if(Number.isNaN(s)&&!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]!==s&&t.data.update(i.id,((n={})[a.id]=s,n),!0)}}))},e.prototype._applyLocalFilter=function(t){void 0===t&&(t=!1);var e={add:!0,permanent:!0,$local:!0},i=this.data.getRawFilters(),n=Object.keys(i||{}).find((function(t){return i[t].config.$local}));n&&(e.id=n),t?this.data.filter((function(t){return t}),e,!0):this.data.filter((function(t){return t&&!t.hidden}),e,!0)},e.prototype._normalizeSpans=function(){var t,e=this;this.config.spans=null===(t=this.config.spans)||void 0===t?void 0:t.map((function(t){return(0,E.normalizeSpan)(t,e.config,e.data)}))},e.prototype._hideColumn=function(t){t.hidden=!0,this.config.$totalWidth-=t.$width,this._parseColumns(),this.config.data=this._prepareData(this.data);var e=this._activeFilters&&this._activeFilters[t.id];e&&(this._hiddenFilters||(this._hiddenFilters={}),this._hiddenFilters[t.id]=e,delete this._activeFilters[t.id],this._checkFilters()),this._normalizeSpans(),this.paint()},e.prototype._showColumn=function(t){t.hidden=!1,this.config.$totalWidth+=t.$width,this._parseColumns(),this.config.data=this._prepareData(this.data);var e=this._hiddenFilters&&this._hiddenFilters[t.id];e&&(this._activeFilters[t.id]=e,delete this._hiddenFilters[t.id],this._checkFilters(),this._checkSelectFilterValue()),this._normalizeSpans(),this.paint()},e.prototype._setSummary=function(){var t=this,e=this.data.map((function(t){return t})).filter((function(t){return t!=t.$group&&t!=t.$groupSummary}));"tree"===this.config.type&&(e=e.filter((function(e){return!t.data.haveItems(e.id)}))),this.config.summary&&Object.entries(this.config.summary).forEach((function(i){var n=i[0],o=i[1];t._commonSummary[n]=t._applyMethod(o,e)})),this.config.columns.forEach((function(i){var n;if(i.summary){var o=i.id,r=i.summary;t._colSummary[o]||(t._colSummary[o]={}),"string"==typeof r?t._colSummary[o][r]=null===(n=f.methods[r])||void 0===n?void 0:n.call(f.methods,e,o):Object.entries(r).forEach((function(i){var n=i[0],r=i[1];t._colSummary[o][n]=t._applyMethod(r,e,o)}))}}))},e.prototype._init=function(){this.events=new l.EventSystem(this),this._events=new l.EventSystem(this),this._attachDataCollection(),this.export=new p.Exporter({name:"grid",version:this.version,view:this,export:null}),this._setEventHandlers()},e.prototype._applyMethod=function(t,e,i){var n;return"function"==typeof t?t(e):"string"==typeof t&&(null===f.methods||void 0===f.methods?void 0:f.methods[t])?null===f.methods||void 0===f.methods?void 0:f.methods[t](e,i):Array.isArray(t)&&(null===f.methods||void 0===f.methods?void 0:f.methods[null==t?void 0:t[1]])?null===(n=f.methods[t[1]])||void 0===n?void 0:n.call(f.methods,e,t[0]):null},e.prototype._canDataParse=function(t){var e;return void 0===t&&(t=!1),!!((null===(e=this.config.data)||void 0===e?void 0:e.length)&&this.config.data instanceof Array&&this.config.columns)&&(this.config.autoWidth&&this.config.autoHeight?t:!t)},e.prototype._attachDataCollection=function(){if(this.config.data instanceof f.DataCollection)return this.data=this.config.data,this.data.config.collapsed=this.config.collapsed,void(this.config.data=this.data.serialize());this._createCollection()},e.prototype._setMarks=function(t,e){for(var i=[],n=0,o=this.data.map((function(e){return i.push(e[t.id]),{id:e.id,data:e[t.id],row:e}}));n<o.length;n++){var r=o[n],a=e(r.data,i,r.row,t);a&&(t.$cellCss=t.$cellCss||{},t.$cellCss[r.id]+=" "+a)}},e.prototype._checkMarks=function(){var t=this;this.config.columns.map((function(e){var i=e.mark;i&&("function"==typeof i?t._setMarks(e,i):t._setMarks(e,(function(t,e){var n=[];e.forEach((function(t){null!=t&&""!==t&&n.push(parseFloat(t))}));var o=(0,d.getMinArrayNumber)(n),r=(0,d.getMaxArrayNumber)(n);return i.max&&r===parseFloat(t)?i.max:!(!i.min||o!==parseFloat(t))&&i.min})))}))},e.prototype._removeMarks=function(){this.config.columns.forEach((function(t){t.mark&&(t.$cellCss={})}))},e.prototype._detectColsTypes=function(){this.config.columns.forEach((function(t){return t.type?t:t.numberMask?(t.type="number",t):void(t.type||(t.type="string"))}))},e.prototype._destroyContent=function(){for(var t in this.content)"function"==typeof this.content[t].destructor&&this.content[t].destructor()},e.prototype._render=function(){this.paint()},e.prototype._initHotKey=function(t){void 0===t&&(t=!1);var e=(0,S.getKeysHandlers)(this);for(var i in e)this.keyManager.exist(i)||this.keyManager.addHotKey(i,e[i]);if(!t)for(var i in this.config.hotkeys)this.keyManager.addHotKey(i,this.config.hotkeys[i])},e.prototype._normalizeConfig=function(t){return Object.keys(t).forEach((function(e){e.startsWith("$")&&delete t[e]})),t},e.prototype._autoScroll=function(t){var e,i,n,o,r=(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)?null===(i=this.getRootNode())||void 0===i?void 0:i.querySelector(".scroll-view"):null===(n=this.getRootNode())||void 0===n?void 0:n.querySelector(".dhx_grid-body");if(r){var a=null,s=r.getBoundingClientRect(),l=s.top,c=s.bottom,d=s.left,u=s.right,h=s.height,f=s.width,p=30,g=this.config.dragPanel?(null===(o=this.config.dragPanel)||void 0===o?void 0:o.width)||k.defaultDragPanelConfig.width:0,v=function(t,e){t&&r.scrollBy("left"===t?-40:40,0),e&&r.scrollBy(0,"up"===e?-40:40),(t||e)&&(a=setTimeout((function(){v(t,e)}),100))},_=function(e){var i=e.clientX,n=e.clientY,o=null,r=null;switch(t){case"horizontal":i>u-p&&i<u&&n>l&&n<c?o="right":i>d&&i<d+p&&n>l&&n<c&&(o="left");break;case"vertical":n>c-p&&n<c&&i>d-g&&i<u?r="down":n>l&&n<l+p&&i>d-g&&i<u&&(r="up");break;case"auto":i>u-p&&i<u&&n>l&&n<c?o="right":i>d&&i<d+p&&n>l&&n<c&&(o="left"),n>c-p&&n<c&&i>d-g&&i<u?r="down":n>l&&n<l+p&&i>d-g&&i<u&&(r="up")}o||r?a||v(o,r):a&&(clearTimeout(a),a=null)};(f<r.scrollWidth||h<r.scrollHeight)&&(document.addEventListener("pointermove",_),document.addEventListener("pointerup",(function(){document.removeEventListener("pointermove",_),a&&clearTimeout(a)}),{once:!0}))}},e.prototype._applyAutoWidth=function(){var t,e,i=this._container||(null===(t=this.getRootView().node.parent)||void 0===t?void 0:t.el);if(i){var n=(0,b.getElementSizes)(i),o=null===(e=this.scrollView)||void 0===e?void 0:e.config.enable;(0,b.applyAutoWidth)(this.config,n,o)}},e.prototype._handleRow=function(t,e){if((0,d.isId)(t)&&"remove"===e){var i=this.selection.getCells().find((function(e){return e.row.id===t}));i&&this.selection.removeCell(i.row.id,i.column.id)}if(this.config.data=this._prepareData(this.data),(0,d.isId)(t)&&(this._checkFilters(),this._checkSelectFilterValue()),this._detectColsTypes(),this._removeMarks(),this._checkMarks(),this.config.autoEmptyRow&&(!this._activeFilters||(0,d.isEmptyObj)(this._activeFilters))){var n=this.data.find({by:"$emptyRow",match:!0});if(n){if(n.id===t)return;this.data.move(n.id,this.data.getLength()-1)}else this._addEmptyRow()}this._normalizeSpans(),this._render()},e}(h.View);e.Grid=M},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{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof n?i:new n((function(t){t(i)}))).then(a,s)}l((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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(l){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(i=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{i=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},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 s=i(5),l=i(8),c=i(0),d=i(13),u=i(2),h=i(1),f=i(18),p=i(6),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,s.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),l=a.config.columns.filter((function(t){return!t.hidden})),u=a._colSummary;if(!l.length)return{data:[{name:t.tableName||"data",cols:[],rows:[],merged:[],cells:[]}],styles:[]};var h={},g={},_=(0,s.transpose)(l.map((function(t){return(t.header||[]).map((function(e){var i=e.text;return i?(0,s.removeHTMLTags)("string"==typeof i?i||"":i(u[t.id])):""}))}))),y=(0,s.transpose)(l.map((function(t){return(t.footer||[]).map((function(e){var i=e.text;return{text:i?(0,s.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=l.map((function(i,n){var r=i.id,a=i.editorType,l=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"===l){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"===l?("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,s.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=l.indexOf(t);g[t.id]=D;var k="";S&&(k+=" align:".concat(S));var M="";M="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 s=0;s<n;s++)a+=s===n-1?"0":"#";else a+="#";if(r){a+=".";for(s=0;s<r;s++)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(M));if(w.has(T))C.set("col_".concat(D),T);else{if($=(0,s.getStyleByClass)("dhx_grid-cell","dhx_grid-cell",w.get("default"))){var R=n(n({},$),{format:M});S&&(R.align=S),R["font-weight"]=R.bold?"bold":"normal",R.fontSize&&(R.fontSize="".concat(R.fontSize,"px")),w.set(T,{css:n(n({},w.get("default").css),R),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,l=void 0===a?0:a;if(l||r){var d=O.length+_.length+i;x.push({from:{row:d,column:D},to:{row:d+(r?r-1:0),column:D+(l?l-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,s.removeHTMLTags)(h)});var f=M||(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,s.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 l=e;x.push({from:{row:l,column:D},to:{row:l+(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,s.getStyleByClass)(c,"dhx_grid-header-cell",w.get("default"));if(u){var h=n(n({},u),{format:M});(t.align||S)&&(h.align=t.align||S),w.set(d,{css:n(n({},w.get("default").css),h),index:w.size})}}C.set("header_".concat(D,"_").concat(e),d)})),m){var P="dhx_grid-cell ".concat(m[I].trim()," ").concat(k),H=v(P),j="dhx_grid-row";if(E[I]&&(j+=" ".concat(E[I].trim())),!w.has(H))if($=(0,s.getStyleByClass)(P,j,w.get("default"))){R=n(n(n({},w.get("default").css),$),{format:M});S&&(R.align=S),R["font-weight"]=R.bold?"bold":"normal",R.fontSize&&(R.fontSize="".concat(R.fontSize,"px")),w.set(H,{css:n({},R),index:w.size})}w.has(H)&&C.set("".concat(h[I],"_").concat(D),H)}for(var I in E)if(!(m||{})[I]){var F="".concat(E[I]," format:").concat(M);S&&(F+=" align:".concat(S));var $,A=v(F);j="dhx_grid-row ".concat(E[I].trim());if(!w.has(A))if($=(0,s.getStyleByClass)("dhx_grid-cell",j,w.get("default"))){R=n(n(n({},w.get("default").css),$),{format:M});S&&(R.align=S),R["font-weight"]=R.bold?"bold":"normal",R.fontSize&&(R.fontSize="".concat(R.fontSize,"px")),w.set(A,{css:n({},R),index:w.size})}w.has(A)&&C.set("".concat(h[I],"_").concat(D),A)}},M=0,T=l;M<T.length;M++){k(T[M])}var R=[];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",R.push(n(n({},e),{id:t.index.toString()}))})),R[0].format="#";var I=[];if(_.length){var P=_.map((function(t,e){return t.map((function(t,i){var n=C.get("header_".concat(i,"_").concat(e))||C.get("col_".concat(i))||"default";return{v:""===t?null:t,s:w.get(n).index}}))}));I.push.apply(I,P)}var H=O.map((function(t,e){return t.map((function(t,i){var n=C.get("".concat(e,"_").concat(i))||C.get("col_".concat(i))||"default";return{v:""===t?null:t,s:w.get(n).index}}))}));if(I.push.apply(I,H),y.length){var j=y.map((function(e,i){return e.map((function(e,n){var o,r=e.text,a=e.content,s=e.col_id,l="string"==typeof a,c=a&&(o=u[s],Object.values(o)[0]==r),d=C.get("footer_".concat(n,"_").concat(i))||C.get("col_".concat(n))||"default";return{v:a&&l&&c?m({func:a,startRow:_.length+1,col:n,rowsCount:H.length,functionsMap:t.mapToExcelFormulas}):""===r?null:r,s:w.get(d).index}}))}));I.push.apply(I,j)}if(null===(i=e.spans)||void 0===i?void 0:i.length){var F=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,F)}return a.destructor(),{data:[{name:t.tableName||"data",cells:I,cols:b,rows:D,merged:x}],styles:R}},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 s=r.data.blob;(0,c.downloadFile)(s,"".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,s.transpose)(o.map((function(t){return(t.header||[]).map((function(t){return(0,s.removeHTMLTags)("".concat(t.text||" "))}))})));return h=h.map((function(t){return t.splice.apply(t,a([0,1],u,!1)),t})),new l.CsvDriver(t).serialize(h,!0)+t.rowDelimiter+d},e.prototype._getCSV=function(t,e){var i=this._getExportData(t,e),n=new l.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 s="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===s?r="".concat((0,u.getPageLinksCss)(),"<style>").concat((0,u.getPageInlineCss)(),"</style>"):Array.isArray(s)&&s.length&&(r="".concat((0,u.getPageLinksCss)(s)));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,l.dhxError)("HTTP error, status: ".concat(t.status)),t.blob()})).then((function(n){var r,s=document.createElement("a");s.href=URL.createObjectURL(n),s.download="".concat(e.name||"grid",".").concat(i),s.click(),URL.revokeObjectURL(s.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,l.dhxWarning)("There is no data to export"),(null===(o=r.columns)||void 0===o?void 0:o.length)||(0,l.dhxWarning)("There is no column for export");var a=new this._grid.constructor(t,(0,c.getCloneObject)(r)),s=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=s,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,s="".concat(_(n)).concat(i,":").concat(_(n)).concat(o+i-1),l={sum:"=SUM(".concat(s,")"),avg:"=AVERAGE(".concat(s,")"),count:"=COUNT(".concat(s,")"),max:"=MAX(".concat(s,")"),min:"=MIN(".concat(s,")")};return Object.entries(a).forEach((function(t){var e=t[0],i=t[1];l[e]="=".concat(i,"(").concat(s,")")})),l[e]}e.Exporter=g}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(84),e),o(i(85),e),o(i(86),e),o(i(87),e),o(i(26),e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.message=void 0;var n=i(0),o=i(2),r=i(26),a=new WeakMap,s=new Map;function l(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=s.get(d);u?u[t.position]||(u[t.position]={stack:[],container:l(d,t.position)}):s.set(d,((e={})[t.position]={stack:[],container:l(d,t.position)},e));var h=s.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=s.get(o);if(r){var l=r[n];if(l){var c=l.stack,d=c.indexOf(t);-1!==d&&(i.removeChild(t),c.splice(d,1),0===c.length&&o.removeChild(i))}}}(i,t),i=null)}if(0===f.length&&d.appendChild(p),f.push(i),p.appendChild(i),t.expire){var v=setTimeout((function(){return g(!1)}),t.expire);a.set(i,v)}return i.onclick=function(){return g()},{close:function(){return g()}}}},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.alert=void 0;var n=i(38),o=i(39),r=i(0);e.alert=function(e){var i=e.buttons&&e.buttons[0]?e.buttons[0]:n.default.apply,a=(0,o.blockScreen)(e.blockerCss);return new t((function(t){var n="dhx_alert__".concat((0,r.uid)(),"_content"),o="dhx_alert__".concat((0,r.uid)(),"_header"),s=document.createElement("div");s.setAttribute("role","alert"),s.setAttribute("aria-modal","true"),e.text&&s.setAttribute("aria-describedby",n),e.header&&s.setAttribute("aria-labelledby",o),s.className="dhx_widget dhx_alert "+(e.css||"");var l=function(e){"Escape"!==e.key&&"Esc"!==e.key||(c(e),t(!1))};function c(t){t.preventDefault(),a(),document.body.removeChild(s),document.removeEventListener("keydown",l)}s.innerHTML="\n\t\t\t".concat(e.header?"<div id=".concat(o,' class="dhx_alert__header"> ').concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t\t").concat(e.text?"<div id=".concat(n,' class="dhx_alert__content">').concat(!1!==e.htmlEnable?e.text:"","</div>"):"",'\n\t\t\t<div class="dhx_alert__footer ').concat(e.buttonsAlignment?"dhx_alert__footer--"+e.buttonsAlignment:"",'">\n\t\t\t\t<button type="button" aria-label="confirm" class="dhx_alert__apply-button dhx_button dhx_button--view_flat dhx_button--color_primary dhx_button--size_medium">').concat(i,"</button>\n\t\t\t</div>"),!1===e.htmlEnable&&(e.header&&(s.querySelector("#".concat(o)).textContent=e.header),e.text&&(s.querySelector("#".concat(n)).textContent=e.text)),document.body.appendChild(s),s.querySelector(".dhx_alert__apply-button").focus(),s.querySelector("button").addEventListener("click",(function(e){c(e),t(!0)})),document.addEventListener("keydown",l)}))}}).call(this,i(9))},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.confirm=void 0;var n=i(38),o=i(39),r=i(0);e.confirm=function(e){e.buttonsAlignment=e.buttonsAlignment||"right";var i=e.buttons&&e.buttons[1]?e.buttons[1]:n.default.apply,a=e.buttons&&e.buttons[0]?e.buttons[0]:n.default.reject,s=(0,o.blockScreen)("dhx_alert__overlay-confirm "+(e.blockerCss||""));return new t((function(t){var n=document.createElement("div");n.setAttribute("role","alertdialog"),n.setAttribute("aria-modal","true");var o,l=e.header&&(0,r.uid)(),c=e.header&&(0,r.uid)();c&&n.setAttribute("aria-describedby",c),l&&n.setAttribute("aria-labelledby",l);var d=function(e){s(),n.removeEventListener("click",u),document.removeEventListener("keydown",h),document.body.removeChild(n),t(e)},u=function(t){"BUTTON"===t.target.tagName&&d(t.target.classList.contains("dhx_alert__confirm-aply"))},h=function(t){"Escape"===t.key||"Esc"===t.key?(n.querySelector(".dhx_alert__confirm-aply").focus(),d(t.target.classList.contains("dhx_alert__confirm-reject"))):"Tab"===t.key&&("aply"===o?(o="reject",n.querySelector(".dhx_alert__confirm-reject").focus()):(o="aply",n.querySelector(".dhx_alert__confirm-aply").focus()),t.preventDefault())};n.className="dhx_widget dhx_alert dhx_alert--confirm"+(e.css?" "+e.css:""),n.innerHTML="\n\t\t".concat(e.header?'<div class="dhx_alert__header" id='.concat(l,"> ").concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t").concat(e.text?'<div class="dhx_alert__content" id='.concat(c,">").concat(!1!==e.htmlEnable?e.text:"","</div>"):"",'\n\t\t\t<div class="dhx_alert__footer ').concat(e.buttonsAlignment?"dhx_alert__footer--"+e.buttonsAlignment:"",'">\n\t\t\t\t<button type="button" aria-label="reject" class="dhx_alert__confirm-reject dhx_button dhx_button--view_link dhx_button--color_primary dhx_button--size_medium">').concat(a,'</button>\n\t\t\t\t<button type="button" aria-label="aply"class="dhx_alert__confirm-aply dhx_button dhx_button--view_flat dhx_button--color_primary dhx_button--size_medium">').concat(i,"</button>\n\t\t\t</div>"),!1===e.htmlEnable&&(e.header&&(n.querySelector("#".concat(l)).textContent=e.header),e.text&&(n.querySelector("#".concat(c)).textContent=e.text)),document.body.appendChild(n),o="aply",n.querySelector(".dhx_alert__confirm-aply").focus(),n.addEventListener("click",u),document.addEventListener("keydown",h)}))}}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.disableTooltip=e.enableTooltip=e.tooltip=e.getZIndex=e.findPosition=void 0;var o=i(2),r=i(26),a=750,s=200;function l(t,e,i,n,o,a){var s,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:s=r.RealPosition.center};case r.Position.right:return s=r.RealPosition.right,(c=t.right+window.pageXOffset+o)+i>window.innerWidth+window.pageXOffset?l(t,r.Position.left,i,n,o,++a):{left:c,top:d,pos:s};case r.Position.left:return s=r.RealPosition.left,(c=window.pageXOffset+t.left-i-o)<0?l(t,r.Position.right,i,n,o,++a):{left:c,top:d,pos:s};case r.Position.top:return s=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?l(t,r.Position.bottom,i,n,o,++a):{left:c,top:d=window.pageYOffset+t.top-n-o,pos:s};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),s=r.RealPosition.bottom,(d=window.pageYOffset+t.bottom+o)+n>window.innerHeight+window.pageYOffset?l(t,r.Position.top,i,n,o,++a):{left:c,top:d,pos:s}}}e.findPosition=l;var c=document.createElement("div"),d=document.createElement("span");d.className="dhx_tooltip__text",c.appendChild(d),c.setAttribute("role","tooltip"),c.style.position="absolute";var u,h=null,f=!1,p=null,g=null;function v(t){return t&&(t.classList.contains("dhx_popup--window")&&t.classList.contains("dhx_popup--window_active")||t.classList.contains("dhx_popup--window_modal")||t.classList.contains("dhx_popup"))?1e7:(null==t?void 0:t.classList.contains("dhx_popup--window"))?9999999:t&&t.offsetParent?v(t.offsetParent):null}function _(t,e,i,n,o,a,s){void 0===n&&(n=""),void 0===o&&(o=!1),void 0===a&&(a=8);var u=t.getBoundingClientRect();s?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=l(u,i,h.width,h.height,a),g=p.left,_=p.top,m=p.pos,y=v(t);switch(y&&(c.style.zIndex=y.toString()),m){case r.RealPosition.bottom:case r.RealPosition.top:case r.RealPosition.left:case r.RealPosition.right:case r.RealPosition.center:c.style.left=g+"px",c.style.top=_+"px"}c.className+=" dhx_tooltip--".concat(m),f=!0,o||setTimeout((function(){c.className+=" dhx_tooltip--animate"}))}function m(t,e,i){var n=i.force,o=i.showDelay,l=i.hideDelay,d=i.position,v=i.css,m=i.htmlEnable,y=i.margin;n||(g=setTimeout((function(){_(t,e,d||r.Position.bottom,v,!1,y,m)}),o||a));var b=function(){var e;f&&(e=l,h&&(p=setTimeout((function(){document.body.removeChild(c),f=!1,p=null}),e||s))),clearTimeout(g),t.removeEventListener("mouseleave",b),t.removeEventListener("blur",b),document.removeEventListener("mousedown",b),h=null,u=null};n&&_(t,e,d,v,n,y,m),t.addEventListener("mouseleave",b),t.addEventListener("blur",b),document.addEventListener("mousedown",b),u=b}function y(t,e){var i=(0,o.toNode)(e.node);i!==h&&(u&&(u(),u=null),h=i,p?(clearTimeout(p),p=null,m(i,t,n(n({},e),{force:!0}))):m(i,t,e))}function b(t){var e=(0,o.locateNode)(t,"dhx_tooltip_text");e&&y(e.getAttribute("dhx_tooltip_text"),{position:e.getAttribute("dhx_tooltip_position")||r.Position.bottom,node:e})}e.getZIndex=v,e.tooltip=y,e.enableTooltip=function(){document.addEventListener("mousemove",b)},e.disableTooltip=function(){document.removeEventListener("mousemove",b)}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=e.GridSelectionEvents=void 0;var r,a=i(1),s=i(8),l=i(0),c=i(4),d=i(3),u=i(17),h=i(7),f=i(5),p=i(15),g=i(6);!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.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,s,l,c,d,h,f,p,g,v,_,m,y=this;void 0===i&&(i=!1),void 0===n&&(n=!1);var b="tree"===this._grid.config.type;if(this._gridId&&u.focusManager.getFocusId()!==this._gridId&&u.focusManager.setFocusId(this._gridId),"row"===this.config.type&&(null===(l=this._selectedCells[0])||void 0===l?void 0:l.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(){y._grid.paint(),y._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===(p=this._selectedCell)||void 0===p?void 0:p.row,null===(g=this._selectedCell)||void 0===g?void 0:g.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&&!b&&o([],this._selectedCells,!0).forEach((function(t,e){var i=t.row,n=t.column;e>0&&y.removeCell(i.id,n.id)}))}t=this._grid.data.getItem(t&&t.id||t);var x=null===(_=null===(v=this._grid.config)||void 0===v?void 0:v.columns)||void 0===_?void 0:_.filter((function(t){return!t.hidden}));if(e||(e=null==x?void 0:x[0]),(e=this._grid.getColumn(e.id||e))&&t){if(this.config.multiSelection&&n&&this._selectedCells.length&&!b){var w=null===(m=this._selectedCells)||void 0===m?void 0:m[0],C=this._grid.data.getIndex(w.row.id),S=this._grid.data.getIndex(t.id);if(C>S&&(C=(r=[S,C])[0],S=r[1]),"cell"===this.config.type||"complex"===this.config.type){var E=x.map((function(t){return t.id})),D=E.indexOf(w.column.id),O=E.indexOf(e.id);if(-1!==D&&-1!==O){D>O&&(D=(s=[O,D])[0],O=s[1]);var k=x.slice(D,O+1);this._grid.data.mapRange(C,S,(function(t){k.forEach((function(e){-1===y._findIndex({row:t,column:e})&&y._setCell(t,e)}))}))}}else this._grid.data.mapRange(C,S,(function(t){-1===y._findIndex({row:t,column:e})&&y._setCell(t,e)}))}else this._setCell(t,e);(0,a.awaitRedraw)().then((function(){y._grid.paint(),y._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.toHTML=function(){var t=this;if(!this._isUnselected()){if(this.config.multiSelection){var e=[],i={};return this._selectedCells.forEach((function(n,o,r){var a=(0,p.normalizeCell)(n,t._grid);e.push(t._toHTML(a.row,a.column,o===r.length-1||"cell"===t.config.type||"complex"===t.config.type,i[n.row.id])),i[n.row.id]=!0})),e}var n=(0,p.normalizeCell)(this._selectedCell,this._grid);return this._toHTML(n.row,n.column,!0)}},t.prototype.isSelectedCell=function(t,e){var i=this;return!!this._selectedCells.find((function(n){return"row"===i.config.type?n.row.id===((null==t?void 0:t.id)||t):n.row.id===((null==t?void 0:t.id)||t)&&n.column.id===((null==e?void 0:e.id)||e)}))},t.prototype._setCell=function(t,e){t&&e&&(0,l.isDefined)(t.id)&&(0,l.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._selectedCells=[this._selectedCell],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,l.isDefined)(t.id)&&(0,l.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._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),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(s.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 s.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,l.isId)(o)&&(t.setCell(o),t._grid.paint())}})),this._grid.data.events.on(s.DataEvents.removeAll,(function(){t._removeCells()})),this._grid.data.events.on(s.DataEvents.load,(function(){t._removeCells(!0)}))},t.prototype._toHTML=function(t,e,i,n){var o,r,s,c,u,p,v,_,m,y,b,x,w;void 0===i&&(i=!1),void 0===n&&(n=!1);var C=this._grid.data.getRawData(0,-1,null,2);if(-1===(0,l.findIndex)(C,(function(e){return e.id==t.id})))return null;var S=this._grid.config,E=S.topSplit,D=S.bottomSplit,O=S.$totalWidth,k=S.$totalHeight,M=S.columns,T=null==M?void 0:M.filter((function(t){return!t.hidden})),R={left:(0,h.getCurrFixedCols)(this._grid.config,d.Split.left),right:(0,h.getCurrFixedCols)(this._grid.config,d.Split.right)},I=this._grid.data.getLength(),P={top:E?this._grid.data.getRawData(0,E):[],bottom:D?this._grid.data.getRawData(I-D,I):[]},H={left:null===(o=null==R?void 0:R.left)||void 0===o?void 0:o.map((function(t){return t.id})),right:null===(r=null==R?void 0:R.right)||void 0===r?void 0:r.map((function(t){return t.id}))},j={top:P.top.map((function(t){return t.id})),bottom:P.bottom.map((function(t){return t.id}))},F=null===(s=null==R?void 0:R.left)||void 0===s?void 0:s.reduce((function(t,e){return t+(e.$width||0)}),0),$=null===(c=null==R?void 0:R.right)||void 0===c?void 0:c.reduce((function(t,e){return t+(e.$width||0)}),0),A=P.top.reduce((function(t,e){return t+(0,g.getTotalRowHeight)(e)}),0),L=P.bottom.reduce((function(t,e){return t+(0,g.getTotalRowHeight)(e)}),0),V=this._grid.getCellRect(t.id,e.id);t.$subRowHeight&&t.$opened&&(V.height=V.height-t.$subRowHeight);var N,W,z,B,G=this._grid.getScrollState(),Y=V.y,X=null===(u=j.top)||void 0===u?void 0:u.includes(t.id),U=null===(p=H.left)||void 0===p?void 0:p.includes(e.id),q=R.left.length&&F>V.x-G.x,K=P.top.length&&A>V.y-G.y,J=V.width,Z=V.height,Q=null,tt=null,et=q?F+G.x:V.x;if(q&&(J-=(U?(0,f.getTotalWidth)(R.left.slice(0,T.indexOf(e))):F)-(V.x-G.x)),K&&(Z-=(X?(0,f.getTotalHeight)(P.top.slice(0,C.indexOf(t))):A)-(V.y-G.y)-1,Y+=V.height-Z),X)if(Y=V.y+G.y,(nt=this._grid.getSpan(t.id,e.id))&&nt.rowspan>1){var it=C.indexOf(t);Q=(0,f.getTotalHeight)(P.top.slice(it,it+nt.rowspan))}else Z=E===j.top.indexOf(t.id)+1?V.height-1:V.height;if(U)if(et=V.x+G.x,(nt=this._grid.getSpan(t.id,e.id))&&nt.colspan>1){it=null==T?void 0:T.indexOf(e);tt=(0,f.getTotalWidth)(R.left.slice(it,it+nt.colspan))}else J=R.left.length===H.left.indexOf(e.id)+1?V.width-1:V.width;if((null===(v=R.right)||void 0===v?void 0:v.length)||D){var nt=this._grid.getSpan(t.id,e.id),ot=(0,g.getReverseScrollState)(this._grid);if((null===(_=R.right)||void 0===_?void 0:_.length)&&(N=(null===(m=H.right)||void 0===m?void 0:m.includes(e.id))||nt&&T.indexOf(e)+(nt.colspan||1)>T.length-R.right.length,(W=O-$<ot.x+V.x+V.width)&&!N&&(J-=ot.x+V.x+V.width-O+$),N))if(nt&&!(null===(y=H.right)||void 0===y?void 0:y.includes(nt.column))){it=T.length-T.indexOf(e)-(nt.colspan||1);var rt=O-$;et=V.x+ot.x<rt+1?V.x:rt-ot.x+1,tt=(0,f.getTotalWidth)(it?R.right.slice(0,-it):R.right)-1,J=V.width-ot.x}else{var at=(null===(b=H.right)||void 0===b?void 0:b.indexOf(e.id))?0:1;et=V.x-ot.x+at,J=V.width-at}if(D&&(z=j.bottom.includes(t.id)||nt&&C.indexOf(t)+(nt.rowspan||1)>C.length-D,(B=k-L<ot.y+V.y+V.height)&&!z&&(Z-=ot.y+V.y+V.height-k+L),z))if(nt&&!j.bottom.includes(nt.row)){var st=k-L;at=(it=C.length-C.indexOf(t)-(nt.rowspan||1))?0:1;Y=V.y+ot.y<st?V.y:st-ot.y,Q=(0,f.getTotalHeight)(it?P.bottom.slice(0,-it):P.bottom)-at,Z=V.height-ot.y-at}else Y=V.y-ot.y,Z=V.height-(D===j.bottom.indexOf(t.id)+1?1:0)}var lt=null;"row"!==this.config.type&&"complex"!==this.config.type||n||(lt=(0,a.el)(".dhx_grid-selected-row",{style:{width:(null===(x=R.left)||void 0===x?void 0:x.length)?O-G.x:O,height:Z,minHeight:Q,minWidth:tt,display:Z<0&&!Q?"none":"flex",top:Y,left:(null===(w=R.left)||void 0===w?void 0:w.length)?G.x:0,position:"absolute"}}));var ct=null;return"cell"!==this.config.type&&"complex"!==this.config.type||!i||(ct=(0,a.el)(".dhx_grid-selected-cell",{style:{width:J,height:Z,top:Y,minHeight:Q,minWidth:tt,left:et,position:"absolute",display:J<0&&!tt||Z<0&&!Q?"none":"flex",borderLeft:q&&!U?"none":null,borderRight:W&&!N?"none":null,borderTop:K&&!X?"none":null,borderBottom:B&&!z?"none":null}})),(0,a.el)(".dhx_grid-selection",{style:{zIndex:20}},[lt,ct])},t.prototype._isUnselected=function(){return!this._selectedCell||!this._selectedCell.row||!this._selectedCell.column||0===this._selectedCells.length},t.prototype._findIndex=function(t){var e=this;void 0===t&&(t=this._selectedCell);var i=-1;return this._selectedCells.some((function(n,o){if("cell"===e.config.type||"complex"===e.config.type){if((0,l.compare)(n.row,t.row)&&(0,l.compare)(n.column,t.column))return i=o,!0}else if("row"===e.config.type&&(0,l.compare)(n.row,t.row))return i=o,!0})),i},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(6),s=i(5),l=i(3),c=i(19),d=i(54),u=i(55),h=i(0),f=i(7),p=i(115),g=i(116),v=i(117),_=i(20);function m(t,e,i,n){var o=void 0===i?[0,0]:i,r=o[0],a=o[1],s=t[0],l=t[1],c=e[0],d=e[1];return c<=s&&s<=d||c<=l&&l<=d||s<=c&&d<=l||s<r||a&&l>=n-a}function y(t,e,i){var o=t.config,r=o.spans,s=void 0===r?[]:r,c=o.columns,d=o.leftSplit,u=void 0===d?0:d,h=o.topSplit,p=void 0===h?0:h,v=o.rightSplit,_=void 0===v?0:v,y=o.bottomSplit,b=void 0===y?0:y,x=c.filter((function(t){return!t.hidden})),w=(0,a.calculateVisibleRange)(i,t._scroll,o,e),C=x.slice(w.xStart,w.xEnd),S=e.slice(w.yStart,w.yEnd),E=s.filter((function(t){var i;if(!(null===(i=t.$renderFrom)||void 0===i?void 0:i.length))return!1;var n=m(t.$rowsVisibility,[w.yStart,w.yEnd],[p,b],e.length),o=m(t.$colsVisibility,[w.xStart,w.xEnd],[u,_],c.length);return n&&o})),D={left:(0,f.getCurrFixedCols)(o,l.Split.left),right:(0,f.getCurrFixedCols)(o,l.Split.right)},O={top:e.slice(0,o.topSplit||0),bottom:o.bottomSplit?e.slice(-o.bottomSplit):[]};return t.config.$subRowCells&&(0,g.setSubRowCell)(t,S),n(n({},o),{data:e,columns:o.columns,scroll:t._scroll,$positions:w,headerHeight:o.$headerHeight,footerHeight:o.$footerHeight,firstColId:x[0]&&x[0].id,events:t.events,_events:t._events,filteredColumns:x,currentColumns:C,currentRows:S,currentSpans:E,fixedColumns:D,fixedRows:O,sort:t._sortingStates,content:t.content,gridId:t._uid,commonSummary:t._commonSummary,colSummary:t._colSummary,dropManager:t._dropManager,blockSelection:t.block,$renderFrom:"render"})}function b(t){if(t&&(t.tagName||(t=t._parent._container),t)){var e=t.currentStyle||window.getComputedStyle(t),i=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)||0,n=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)||0;return{width:t.clientWidth-i,height:t.clientHeight-n}}}function x(t,e,i){void 0===i&&(i=!1);var r,a=(0,c.getCells)(t),l=t.filteredColumns,d=t.$resizing,u=t.$totalHeight,p=t.$totalWidth,v=t.leftSplit,_=t.data,m=t.$positions,y=t.$scrollBarWidth,b=(0,c.getSpans)(t);if(d){var x=(0,h.findIndex)(l,(function(t){return t.id===d})),w=(0,s.getTotalWidth)(l.slice(0,x))+l[x].$width;r=(0,o.el)(".dhx_grid-resize-line",{style:{top:0,left:w,height:u}})}var C=t.dropManager?t.dropManager.toHTML():null,S=t.blockSelection?t.blockSelection.toHTML():null,E=t.selection?t.selection.toHTML():null;E="string"==typeof E?(0,o.el)("div.dhx_selection",{".innerHTML":E}):E;var D,O=m,k=i?t.$height-t.$footerHeight-t.$headerHeight-y.x-(t.$footer?1:0)-f.BORDERS:u;return(0,o.el)(".dhx_data-wrap",{style:{height:k,width:p,"padding-left":e.x,"padding-top":e.y},role:"presentation","data-dhx-drop-area":"row"},[(0,o.el)(".dhx_grid_data".concat(v?".dhx_grid_fixed_left":""),n(n({_flags:o.KEYED_LIST},(0,c.getHandlers)(O.yStart,O.xStart,t)),(D=_.length,{role:"rowgroup","aria-rowcount":D})),a),(0,g.getSubRowContent)(t),(0,o.el)(".dhx_span-spans",n({role:"presentation"},(0,c.getHandlers)(O.yStart,O.xStart,t)),b),(0,o.el)(".dhx_grid_selection",{_ref:"selection","aria-hidden":"true"},[].concat(E,r)),C,S])}function w(t,e,i){var n=i.height-f.BORDERS;return n=e?n:n-t.headerHeight,t.$footer?e?n:n-t.footerHeight:n}function C(t,e,i){void 0===i&&(i=!1);var n=!i&&t.$totalHeight>=e.height-(t.$headerHeight||0)?(0,r.getScrollbarWidth)():0,o=e.width-f.BORDERS-n;if(!(o<0)){var a=(t.columns||[]).filter((function(t){return!t.hidden})),l=[],c=[],d=!1;a.forEach((function(e){e.width||e.$fixedWidth||!(0,s.isAutoWidth)(t,e)?l.push(e):c.push(e)}));do{d=!1;for(var u=c.reduce((function(t,e){return t+(e.gravity||1)}),0),h=(0,s.getTotalWidth)(l),p=function(t){var e=o>h?(o-h)*((t.gravity||1)/u):0,i=t.minWidth&&e<t.minWidth,n=t.maxWidth&&e>t.maxWidth;if(i||n)return d=!0,t.$width=i?t.minWidth:t.maxWidth,c=c.filter((function(e){return e.id!=t.id})),l.push(t),"break";t.$width=e},g=0,v=c;g<v.length;g++){if("break"===p(v[g]))break}}while(d)}}e.getRenderConfig=y,e.getElementSizes=b,e.applyAutoWidth=C,e.render=function(t,e,i,r,a){var h=b(e._container);t&&t.node&&t.node.parent&&t.node.parent.el&&(h=b(t.node.parent.el));var p=e.config;if(!p)return(0,o.el)("div");if(!p.columns.length)return(0,o.el)(".dhx_grid",{"data-dhx-widget-id":a,"data-dhx-root-id":p.rootParent,"data-dhx-drop-area":"common",role:"empty-grid"});var g=e.data.getRawData(0,-1,null,2);p.columns.reduce((function(t,e){return e.hidden?t:e.hidden}),!0)?p.$totalHeight=0:p.$totalHeight=g.reduce((function(t,e){return t+(e.$height||0)}),0);var v={width:(p.width&&"number"==typeof p.width?p.width:null==h?void 0:h.width)||0,height:(p.height&&"number"==typeof p.height?p.height:null==h?void 0:h.height)||0};(0,s.isAutoWidth)(p)&&(C(p,v),p.$totalWidth=(0,s.getTotalWidth)(p.columns.filter((function(t){return!t.hidden})))),p.$width=v.width,p.$height=v.height;var _=y(e,g,v);_.selection=r,_.datacollection=e.data;var m=(0,c.getShifts)(_);_.$scrollBarWidth=(0,f.calcScrollBarWidth)(_);var S,E,D,O,k=(0,s.isCssSupport)("position","sticky"),M=w(_,k,v),T={wrapper:v,sticky:k,shifts:m,gridBodyHeight:M,footerAtBottom:!1},R=(0,u.getFixedRows)(_,n(n({},T),{name:"header",position:"top"})),I=_.$footer?(0,u.getFixedRows)(_,n(n({},T),{name:"footer",position:"bottom"})):null,P=_.$totalWidth+f.BORDERS<v.width?"dhx_grid-less-width":"",H=_.$totalHeight+f.BORDERS<v.height?"dhx_grid-less-height":"",j=_.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",F=p.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"";if(!t.node){var $=e.getScrollState(),A=$.x,L=$.y;(0,o.awaitRedraw)().then((function(){e.scroll(A,L)}))}return(0,o.el)(".dhx_grid.dhx_widget",n({class:(_.css||"")+(k?"":" dhx_grid_border")+(p.multiselection?" dhx_no-select--pointer":""),"data-dhx-widget-id":a,"data-dhx-root-id":p.rootParent,"data-dhx-drop-area":"common"},(S=_.data,E=p.columns,D=_.editable,O=_.multiselection,{role:"grid","aria-rowcount":S.length,"aria-colcount":E.filter((function(t){return!t.hidden})).length,"aria-readonly":D?"false":"true","aria-multiselectable":O?"true":"false"})),[(0,o.resizer)((function(){return e.paint()})),(0,o.el)(".dhx_grid-content",n(n({style:n({},v)},i),{class:"".concat(P," ").concat(H," ").concat(j," ").concat(F).trim(),role:"presentation"}),[k?null:R,(0,o.el)(".dhx_grid-body",{style:{height:M,width:v.width-f.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[(0,o.el)("div",{},[k?R:null,x(_,m),k?I:null])]),(0,d.getFixedColsHeader)(_,T,l.Split.left),(0,d.getFixedColsHeader)(_,T,l.Split.right),(0,d.getFixedCols)(_,T,l.Split.left),(0,d.getFixedCols)(_,T,l.Split.right),(0,u.getFixedDataRows)(_,T,l.Split.top),(0,u.getFixedDataRows)(_,T,l.Split.bottom),k?null:I])])},e.proRender=function(t,e,i,r,h){var g,m=b(e._container);t&&t.node&&t.node.parent&&t.node.parent.el&&(m=b(t.node.parent.el));var S=e.config;if(!S)return(0,o.el)("div");if(!S.columns.length)return(0,o.el)(".dhx_grid",{"data-dhx-widget-id":h,"data-dhx-root-id":S.rootParent,"data-dhx-drop-area":"common",role:"empty-grid"});var E,D=e.data.getRawData(0,-1,null,2),O=S.topSplit||0,k=S.bottomSplit||0,M=0,T=0;S.columns.reduce((function(t,e){return e.hidden?t:e.hidden}),!0)?S.$totalHeight=0:S.$totalHeight=D.reduce((function(t,e,i){return O&&i<O+M&&(S.subRow&&(e.$subRowHeight=0,e.$opened=!1),e.hidden&&M++),k&&i>=D.length-k-T&&(S.subRow&&(e.$subRowHeight=0,e.$opened=!1),e.hidden&&T++),e.$index=i,t+(0,a.getTotalRowHeight)(e)}),0);var R="auto"===e.config.height;R&&(E=function(t,e,i){var n,o,r=t._container,a=e.$headerHeight+(e.$footerHeight&&e.$footerHeight+1)+e.$totalHeight+f.BORDERS;if(r){var s=window.getComputedStyle(r),l=s.minHeight,c=s.maxHeight;return a<=parseFloat(l)?parseFloat(l):a>=parseFloat(c)?parseFloat(c):a+(0,f.calcScrollBarWidth)(e,!!(null===(n=t.scrollView)||void 0===n?void 0:n.config.enable),i).x}return a+(i?(0,f.calcScrollBarWidth)(e,!!(null===(o=t.scrollView)||void 0===o?void 0:o.config.enable),i).x:0)}(e,S,m));var I=S.width&&"number"==typeof S.width?S.width:null==m?void 0:m.width,P=S.height&&"number"==typeof S.height?S.height:null==m?void 0:m.height,H={width:I||0,height:(R?E:P)||0},j=null==S?void 0:S.group,F=null==S?void 0:S.dragPanel,$=null==j?void 0:j.panel,A=!!S.dragPanel;$&&(H.height-=j.panelHeight||40),A&&(H.width-=(null==F?void 0:F.width)||_.defaultDragPanelConfig.width),(0,s.isAutoWidth)(S)&&(C(S,H,e.scrollView&&e.scrollView.config.enable),S.$totalWidth=(0,s.getTotalWidth)(S.columns.filter((function(t){return!t.hidden})))),S.$width=H.width,S.$height=H.height;var L=y(e,D,H);L.selection=r,L.datacollection=e.data;var V=(0,c.getShifts)(L);L.$scrollBarWidth=(0,f.calcScrollBarWidth)(L,!!(null===(g=e.scrollView)||void 0===g?void 0:g.config.enable));var N=(0,s.isCssSupport)("position","sticky"),W=w(L,N,H),z={wrapper:H,sticky:N,shifts:V,gridBodyHeight:W,footerAtBottom:!1},B=L.$totalWidth+f.BORDERS<H.width?"dhx_grid-less-width":"",G=L.$totalWidth+f.BORDERS===H.width?"dhx_grid-full-width":"",Y=L.$totalHeight+f.BORDERS<H.height-L.$footerHeight-L.$headerHeight?"dhx_grid-less-height":"",X=L.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",U=S.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"",q="bottom"===S.footerPosition&&!!Y&&!R;z.footerAtBottom=q;var K=(0,u.getFixedRows)(L,n(n({},z),{name:"header",position:"top"})),J=L.$footer?(0,u.getFixedRows)(L,n(n({},z),{name:"footer",position:"bottom"})):null;if(!t.node){var Z=e.getScrollState(),Q=Z.x,tt=Z.y;(0,o.awaitRedraw)().then((function(){e.scroll(Q,tt)}))}var et=(0,o.el)("div",{},[N?K:null,x(L,V,q),N?J:null]);return(0,o.el)(".dhx_grid.dhx_widget",{class:(L.css||"")+(N?"":" dhx_grid_border")+(S.multiselection?" dhx_no-select--pointer":""),style:{height:null!=E?E:null},"data-dhx-widget-id":h,"data-dhx-root-id":S.rootParent,role:"grid","aria-rowcount":L.data.length,"aria-colcount":L.filteredColumns.length,"data-dhx-drop-area":"common"},[(0,o.resizer)((function(){return e.paint()})),$&&(0,p.getGroupPanel)(S.$grouped,e)||null,A&&(0,v.getDragPanelNode)(e,L,z,!!Y)||null,(0,o.el)(".dhx_grid-content",n(n({style:n({},H)},i),{class:"".concat(B," ").concat(Y," ").concat(G," ").concat(X," ").concat(U).trim(),role:"presentation"}),[N?null:K,(0,o.el)(".dhx_grid-body",{style:{height:W,width:H.width-f.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[e.scrollView&&e.scrollView.config.enable?e.scrollView.render([et]):et]),(0,d.getFixedColsHeader)(L,z,l.Split.left),(0,d.getFixedColsHeader)(L,z,l.Split.right),(0,d.getFixedCols)(L,z,l.Split.left),(0,d.getFixedCols)(L,z,l.Split.right),(0,u.getFixedDataRows)(L,z,l.Split.top),(0,u.getFixedDataRows)(L,z,l.Split.bottom),N?null:J])])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditor=void 0;var n,o=i(3),r=i(91),a=i(92),s=i(93),l=i(106),c=i(107),d=i(114),u={cell:{row:null,col:null},editor:null,gridId:null};e.getEditor=function(t,e,i,h){var f="boolean"===e.type?"checkbox":i.$editable.editorType;if(void 0===f&&(f=i.autoHeight?"textarea":"input"),u.cell.row===t.id&&u.cell.col===e.id&&u.gridId===i.gridId&&i.$editable.editor)return u.editor;switch("checkbox"!==f&&(u={cell:{row:t.id,col:e.id},editor:u.editor,gridId:i.gridId}),n||(n=function(){u={cell:{row:null,col:null},editor:null,gridId:null}},i.events.on(o.GridEvents.afterEditEnd,n)),f){case"input":default:return u.editor=new r.InputEditor(t,e,i);case"textarea":return u.editor=new d.TextAreaEditor(t,e,i,h);case"select":return u.editor=new a.SelectEditor(t,e,i);case"datePicker":return u.editor=new s.DateEditor(t,e,i);case"checkbox":return new l.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),s=i(18),l=function(){function t(t,e,i){this.prevValue="",this._config=i,this._cell={row:t,col:e},this.type=e.type,this._initHandlers()}return t.prototype.endEdit=function(t){if(this._config.$editable){var e;if(!t&&(e=this._removeValuePattern(this._input.value,!0),"number"===this.type||this._cell.col.numberMask))if(e=parseFloat(e),Number.isNaN(e))e="";else{var i=this._cell.col.editorConfig,n=parseFloat(null==i?void 0:i.min),o=parseFloat(null==i?void 0:i.max);(0,a.isDefined)(null==i?void 0:i.min)&&e<n&&(e=n),(0,a.isDefined)(null==i?void 0:i.max)&&e>o&&(e=o)}this._config.events.fire(r.GridEvents.beforeEditEnd,[e,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[e,this._cell.row,this._cell.col])):this._input.focus()}},t.prototype.toHTML=function(t){var e;(0,a.isDefined)(t)&&(this.type="string"),t=null!==(e=this._input?this._input.value:null!=t?t:this._cell.row[this._cell.col.id])&&void 0!==e?e:"";var i=this._cell.col.numberMask;return(0,a.isDefined)(null==i?void 0:i.maxDecLength)&&(i=n(n({},i),{maxDecLength:void 0})),t=this._applyValuePattern(t,this._input,!0,i),this._config.$editable.editor=this,(0,o.el)("input.dhx_cell-editor.dhx_cell-editor__input",{_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor",onblur:this._handlers.onBlur,oninput:this._handlers.onInput,value:t})},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onInput:function(){var e=t._removeValuePattern(t._input.value);"number"===t.type&&(t._isValidWord(e)?t.prevValue=e:e=t.prevValue,!t.prevValue.length||"-"===t.prevValue||t._isCorrectRange(parseFloat(t.prevValue))?t._input.classList.remove("dhx_cell-editor__input--not-valid"):t._input.classList.add("dhx_cell-editor__input--not-valid")),t._input.value=t._applyValuePattern(e,t._input)},didInsert:function(e){t._input=e.el,t._input.focus()}}},t.prototype._isValidWord=function(t){var e,i=null===(e=t[t.length-1])||void 0===e?void 0:e.toLocaleLowerCase(),n=function(t,e){return t.toLocaleLowerCase().split(e.toLocaleLowerCase()).length-1};return!t.length||"-"===t||"."===t||"-."===t&&this._cell.col.numberMask||!isNaN(Number(t))&&t.trim().length===t.length||t.replace("-","").length>1&&"e"===i&&!n(this.prevValue,"e")||t.replace("-","").length>1&&"e"===i&&1===n(t,"e")},t.prototype._isCorrectRange=function(t){var e=!0,i=this._cell.col.editorConfig,n=parseFloat(null==i?void 0:i.min),o=parseFloat(null==i?void 0:i.max);return(0,a.isDefined)(null==i?void 0:i.min)&&(0,a.isDefined)(null==i?void 0:i.max)?e=t>=n&&t<=o:(0,a.isDefined)(null==i?void 0:i.min)?e=t>n:(0,a.isDefined)(null==i?void 0:i.max)&&(e=t<o),e},t.prototype._applyValuePattern=function(t,e,i,o){return void 0===i&&(i=!1),this._cell.col.numberMask?(0,s.numberMask)(t.toString(),n(n({},o||this._cell.col.numberMask),{onlyView:i}),e):this._cell.col.patternMask?(0,s.patternMask)(t.toString(),this._cell.col.patternMask,e):t},t.prototype._removeValuePattern=function(t,e){return void 0===e&&(e=!1),this._cell.col.numberMask?(0,s.removeNumberMask)(t,n(n({},this._cell.col.numberMask),{lastCall:e})):this._cell.col.patternMask?(0,s.removePatternMask)(t,this._cell.col.patternMask):t},t}();e.InputEditor=l},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(6),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"},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(94),s=i(13),l=i(30),c=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 a.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 l.Popup,this._popup.attach(this._calendar),this._calendar.events.on(a.CalendarEvents.change,(function(){n.endEdit(!1,!0)})),this._popup.events.on(l.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",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=c},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(95),e),o(i(46),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Calendar=void 0;var s=i(0),l=i(1),c=i(4),d=i(11),u=i(96),h=i(105),f=i(13),p=i(46),g=i(2),v=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,e,(0,s.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,l.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),s=0,l=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 l=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=l}if(e&&a.push("dhx_calendar-day--weekend"),n||(u.config.thisMonthOnly?(s++,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&&((l=u.config.$rangeMark(r))&&a.push(l));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;l--;)d();n.push({weekNumber:a,days:c,disabledWeekNumber:7===s})}return n},e.prototype._drawCalendar=function(){var t,e=this,i=this._currentDate,n=this.config,o=n.weekStart,s=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,l.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,l.el)("div.dhx_calendar-day",r({class:t.css,_date:t.date},m(t)),t.day)}));!this.config.weekNumbers||C.disabledWeekNumber&&s||b.push((0,l.el)("div",{class:"dhx_calendar-week-number"},C.weekNumber)),y=y.concat(S)}this.config.weekNumbers&&(h=(0,l.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,l.el)("div",r({class:E,style:{width:this.config.weekNumbers?parseInt(u.toString())+48+"px":u}},this._handlers),[(0,l.el)(".dhx_calendar__wrapper",[this._drawHeader((0,l.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,l.el)(".dhx_calendar__dates-wrapper",[(0,l.el)(".dhx_calendar__weekdays",p),(0,l.el)(".dhx_calendar__days",y),h]),!this.config.weekNumbers&&(0,l.el)(".dhx_calendar__weekdays",p),!this.config.weekNumbers&&(0,l.el)(".dhx_calendar__days",y),d?(0,l.el)(".dhx_timepicker__actions",[(0,l.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,l.el)("span.dhx_button__icon.dxi.dxi-clock-outline"),(0,l.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,s=n.weekNumbers,c=n.width,d=n.mode,u="dhx_calendar dhx_widget"+(o?" "+o:"")+(a?" dhx_calendar--with_timepicker":"")+(s?" dhx_calendar--with_week-numbers":""),h=!0,p=i===t.getFullYear(),g=function(t){return p&&e===t};return(0,l.el)("div",r({class:u,style:{width:s?parseInt(c.toString())+48+"px":c}},this._handlers),[(0,l.el)(".dhx_calendar__wrapper",[this._drawHeader((0,l.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,l.el)(".dhx_calendar__months",f.locale.monthsShort.map((function(t,e){return(0,l.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,l.el)(".dhx_calendar__actions",[(0,l.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,s=n.weekNumbers,c=n.width,d=n.mode,u="dhx_calendar dhx_widget"+(o?" "+o:"")+(a?" dhx_calendar--with_timepicker":"")+(s?" 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,l.el)("div",r({class:u,style:{width:s?parseInt(c.toString())+48+"px":c}},this._handlers),[(0,l.el)(".dhx_calendar__wrapper",[this._drawHeader((0,l.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,l.el)(".dhx_calendar__years",i.map((function(t){return(0,l.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,l.el)(".dhx_calendar__actions",[(0,l.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,l.el)(".dhx_calendar__navigation",[(0,l.el)("button.dhx_calendar-navigation__button.dhx_calendar-action__prev"+h.linkButtonClasses+".dhx_button--icon.dhx_button--circle",{"aria-label":"prev",type:"button"},[(0,l.el)(".dhx_button__icon.dxi.dxi-chevron-left")]),t,(0,l.el)("button.dhx_calendar-navigation__button.dhx_calendar-action__next"+h.linkButtonClasses+".dhx_button--icon.dhx_button--circle",{"aria-label":"next",type:"button"},[(0,l.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,l.el)(".dhx_widget.dhx-calendar",{class:e?" "+e:"",style:{width:i?parseInt(n.toString())+48+"px":n}},[(0,l.inject)(this._timepicker.getRootView())])},e.prototype._selectDate=function(t,e){var i=e.attrs._date,n=f.DateHelper.copy(this._getSelected());switch(this._currentViewMode){case"calendar":var o=this.config.timePicker?f.DateHelper.mergeHoursAndMinutes(i,this._getSelected()||this._currentDate):i;if(!this.events.fire(p.CalendarEvents.beforeChange,[o,n,!0]))return;this.config.range&&1===this._selected.length&&this._selected[0]<=o?this._selected.push(o):(this._selected=[],this._selected[0]=o),e.el.blur(),this.showDate(this._getSelected()),this.events.fire(p.CalendarEvents.change,[i,n,!0]);break;case"month":if("month"!==this.config.mode)f.DateHelper.setMonth(this._currentDate,i),this.showDate(null,"calendar"),this.events.fire(p.CalendarEvents.monthSelected,[i]);else{var r=f.DateHelper.fromYearAndMonth(this._currentDate.getFullYear()||this._getSelected().getFullYear(),i);if(!this.events.fire(p.CalendarEvents.beforeChange,[r,n,!0]))return;this._currentDate=r,this._selected[0]=r,this.events.fire(p.CalendarEvents.change,[this._getSelected(),n,!0]),this.events.fire(p.CalendarEvents.monthSelected,[i]),this.paint()}break;case"year":if("year"!==this.config.mode)f.DateHelper.setYear(this._currentDate,i),this.showDate(null,"month"),this.events.fire(p.CalendarEvents.yearSelected,[i]);else{r=f.DateHelper.fromYear(i);if(!this.events.fire(p.CalendarEvents.beforeChange,[r,n,!0]))return;this._currentDate=r,this._selected[0]=r,this.events.fire(p.CalendarEvents.change,[this._getSelected(),n,!0]),this.events.fire(p.CalendarEvents.yearSelected,[i]),this.paint()}}},e.prototype._moveBrowseFocus=function(t,e,i){if(e){var n=e.parent.body[e.idx+i];if(n){var o=n.el;o&&(t.target.tabIndex=-1,o.tabIndex=0,o.focus({preventScroll:!0}))}}},e}(d.View);e.Calendar=v},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(97),e),o(i(45),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Timepicker=void 0;var a=i(0),s=i(1),l=i(4),c=i(11),d=i(27),u=i(100),h=i(103),f=i(104),p=i(45),g=i(2);function v(t,e){return isNaN(t)?0:Math.min(e,Math.max(0,t))}var _=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,e,(0,a.extend)({timeFormat:24,controls:!1,valueFormat:"string",actions:!1},i))||this;return n.events=new l.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,s.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}),l=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(l),n.getCell("minute-slider").attach(a),this.config.controls){n.getCell("save-action").attach((function(){return(0,s.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,s.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,s.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,s.el)(".dhx_timepicker-inputs",r({},this._handlers),[(0,s.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,s.el)("span.dhx_timepicker-delimer",":"),(0,s.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,s.el)(".dhx_timepicker-ampm",this._time.AM?"AM":"PM"):null])},e.prototype._isTimeObj=function(){var t;return"timeobject"===(null===(t=this.config.valueFormat)||void 0===t?void 0:t.toLowerCase())},e}(c.View);e.Timepicker=_},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMarginSize=e.getBlockRange=void 0,e.getBlockRange=function(t,e,i){return void 0===i&&(i=!0),i?{min:t.left+window.pageXOffset,max:e.right+window.pageXOffset}:{min:t.top+window.pageYOffset,max:e.bottom+window.pageYOffset}},e.getMarginSize=function(t){return t&&("space"===t.type||"wide"===t.type)?12:0}},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProLayout=void 0;var r=i(28),a=i(41),s=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=s},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(101),e),o(i(44),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Slider=void 0;var a=i(0),s=i(1),l=i(4),c=i(25),d=i(11),u=i(30),h=i(44),f=i(2);function p(t,e,i){return t<e?e:t>i?i:t}var g=function(t){function e(e,i){var n=t.call(this,e,(0,a.extend)({mode:"horizontal",min:0,max:100,step:1,tooltip:!0},i))||this;n._disabled=!1,n.config.helpMessage=n.config.helpMessage||n.config.help,void 0!==n.config.thumbLabel&&(n.config.tooltip=n.config.thumbLabel),n.config.labelInline&&(n.config.labelPosition="left"),n.events=new l.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,s.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,s=a>=o/2?o:0;return+(Number(i)+Number(r)-a+s).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),s=this._getValue(t);if(a!==s&&this.events.fire(h.SliderEvents.beforeChange,[s,a,e])){var l=(s-o)/(n-o)*100,c=this._isInverse()?100-l:l;e?this._extraCurrentPosition=c:this._currentPosition=c,this.events.fire(h.SliderEvents.change,[s,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,l=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,s.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":"")+(l?" "+l:"")+(this._disabled?" dhx_slider--disabled":""),style:{paddingBottom:this.config.tick?"16px":null}},[d?(0,s.el)("label.dhx_label.dhx_slider__label",{style:d.style,class:c?"dhx_label--with-help":"",onclick:this._handlers.onlabelClick},c?[d.label&&(0,s.el)("span.dhx_label__holder",d.label),(0,s.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,s.el)(".dhx_widget.dhx_slider__track-holder",{"data-dhx-widget-id":this._uid},[(0,s.el)(".dhx_slider__track",{_ref:"track",onmouseover:this._handlers.onmouseover,onmouseout:this._handlers.onmouseout,onclick:this._handlers.onclick},[this._getDetector(),(0,s.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,s.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,s.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],l=r[1];return(0,s.el)(".dhx_slider__range",{style:(t={},t[n]=l+"%",t[o]=a-l+"%",t)})}return this._isInverse()?(0,s.el)(".dhx_slider__range",{style:(e={},e[n]=this._currentPosition+"%",e[o]=100-this._currentPosition+"%",e)}):(0,s.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,s=n*o/a,l=[],c=0,d=0;c<1;){var u=+(Number(i)+c*a).toFixed(5),h=d%r==0;l.push({position:(this._isInverse()?100*(1-c):100*c)+"%",isMultiple:h,label:h&&"function"==typeof this.config.tickTemplate?this.config.tickTemplate(u):null}),c+=s,d++}return l.push({position:(this._isInverse()?0:100)+"%",isMultiple:!0,label:"function"==typeof this.config.tickTemplate?this.config.tickTemplate(e):null}),l},e.prototype._drawTicks=function(){var t="horizontal"===this.config.mode?"left":"top";return(0,s.el)(".dhx_slider__ticks-holder",this._getTicks().map((function(e){var i;return(0,s.el)("div",{class:"dhx_slider__tick"+(e.isMultiple?" dhx_slider__tick--major":""),style:(i={},i[t]=e.position,i)},void 0!==e.label?[(0,s.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),s=i(1),l=i(4),c=i(2),d=i(11),u=i(43),h=function(t){function e(e){void 0===e&&(e={});var i=t.call(this,null,(0,a.extend)({},e))||this,n=i._popup=document.createElement("div");return n.className="dhx_widget dhx_popup"+(i.config.css?" "+i.config.css:""),n.style.position="absolute",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.setAttribute("aria-live","polite"),i.config.theme&&i._setTheme(i.config.theme),i.mount(n,(0,s.create)({render:function(){return i.toVDOM()}})),i._clickEvent=function(t){return i.events.fire(u.PopupEvents.click,[t])},i.events=e.events||new l.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,s.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,s.el)(".dhx_popup__inner-html-content",{".innerHTML":this._html}):(t=this._ui?this._ui.getRootView():null)&&t.render&&(t=(0,s.inject)(t)),(0,s.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,s=o.height;if(this._timeout&&(clearTimeout(this._timeout),this._timeout=null),!i||0!==a&&0!==s){var l=(0,c.fitPosition)(t,r(r({centering:!0,mode:"bottom"},e),{width:a,height:s})),d=l.left,u=l.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,s=document.querySelectorAll(".dhx_popup");for(i?s.forEach((function(t){return n.has(t)||n.set(t,e._popup)})):(i=Boolean(s.length))&&s.forEach((function(t){return n.set(t,!0)}));a;){if(a===t||a===e._popup||n.get(a)===e._popup)return;a=a.parentNode}e._hide(!0,r)&&document.removeEventListener("mousedown",o)};return document.addEventListener("mousedown",o),function(){return document.removeEventListener("mousedown",o)}},e.prototype._hide=function(t,e){if(this._isActive)return!!this.events.fire(u.PopupEvents.beforeHide,[t,e])&&(document.body.removeChild(this._popup),this._isActive=!1,this._outerClickDestructor&&(this._outerClickDestructor(),this._outerClickDestructor=null),this.events.fire(u.PopupEvents.afterHide,[e]),!0)},e}(d.View);e.Popup=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={hours:"Hours",minutes:"Minutes",save:"Save"}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTimeCheck=void 0,e.isTimeCheck=function(t){return/(^12:[0-5][0-9]?AM$)/i.test(t)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.linkButtonClasses=void 0,e.linkButtonClasses=".dhx_button.dhx_button--view_link.dhx_button--icon.dhx_button--size_medium.dhx_button--color_secondary"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckboxEditor=void 0;var n=i(0),o=i(1),r=i(3),a=function(){function t(t,e,i){this._config=i,this._cell={row:t,col:e},this._initHandlers()}return t.prototype.endEdit=function(){var t=this._checked;this._config.events.fire(r.GridEvents.beforeEditEnd,[t,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.events.fire(r.GridEvents.afterEditEnd,[t,this._cell.row,this._cell.col])):this._input.checked=!t},t.prototype.toHTML=function(){void 0===this._checked&&(this._checked=this._cell.row[this._cell.col.id]);var t=(0,n.uid)();return(0,o.el)("div.dhx_checkbox.dhx_cell-editor__checkbox",[(0,o.el)("label",{style:{display:"none"},for:t},this._checked||"false"),(0,o.el)("input.dhx_checkbox__input",{type:"checkbox",_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","data-dhx-checked":(!!this._checked).toString(),checked:this._checked,id:t,style:{userSelect:"none"}}),(0,o.el)("span.dhx_checkbox__visual-input")])},t.prototype._initHandlers=function(){var t=this;this._handlers={onClick:function(){var e=!t._input.checked;t._config.events.fire(r.GridEvents.beforeEditStart,[t._cell.row,t._cell.col,"checkbox"])?(t._checked=e,t._config.events.fire(r.GridEvents.afterEditStart,[t._cell.row,t._cell.col,"checkbox"]),t.endEdit()):t._input.checked=!e},didInsert:function(e){t._checkbox=e.el.parentNode.lastChild,t._input=e.el.parentNode.querySelector("input"),e.el.parentNode.addEventListener("click",t._handlers.onClick)}}},t}();e.CheckboxEditor=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(47),s=i(17),l=i(6),c=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,l.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,l.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 a.ProCombobox(null,n({itemHeight:37,css:"dhx_cell-editor__combobox",multiselection:"multiselect"===this._cell.col.editorType,htmlEnable:this._cell.col.htmlEnable},this._cell.col.editorConfig)),this._input.data.parse(e);var i=this._cell.row[this._cell.col.id],r="multiselect"===this._cell.col.editorType?((null==i?void 0:i.toString())||"").split(", "):i;this._input.setValue(r),this._input.events.on("keydown",this._handlers.onkeydown),this._input.data.events.on("beforeAdd",(function(e){if(e.id!==e.value)return t._input.addOption({id:e.value,value:e.value},!0),!1}))}return document.addEventListener("mousedown",this._handlers.onOuterClick),this._config.$editable.editor=this,(0,o.awaitRedraw)().then((function(){var e=t._input.getRootView().refs.holder.el;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=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KEY_CODES=void 0,e.KEY_CODES={BACKSPACE:8,ENTER:13,ESC:27,DOWN_ARROW:40,UP_ARROW:38,LEFT_ARROW:37,RIGHT_ARROW:39}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditor=void 0;var n=i(110);e.getEditor=function(t,e){return new n.InputEditor(t,e)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputEditor=void 0;var n=i(1),o=i(31),r=function(){function t(t,e){var i=this;this._list=e,this._config=e.config,this._item=t,this._list.events.on(o.ListEvents.focusChange,(function(t,e){i._mode&&e!==i._item.id&&i.endEdit()})),this._initHandlers()}return t.prototype.endEdit=function(){if(this._input){var t=this._input.value;this._list.events.fire(o.ListEvents.beforeEditEnd,[t,this._item.id])?(this._input.removeEventListener("blur",this._handlers.onBlur),this._input.removeEventListener("change",this._handlers.onChange),this._input.removeEventListener("keydown",this._handlers.onKeyDown),this._handlers={},this._mode=!1,this._list.events.fire(o.ListEvents.afterEditEnd,[t,this._item.id])):this._input.focus()}},t.prototype.toHTML=function(){this._mode=!0;var t=this._config.itemHeight;return(0,n.el)(".dhx_input__wrapper",{role:"presentation"},[(0,n.el)("div.dhx_input__container",{role:"presentation"},[(0,n.el)("input.dhx_input",{class:this._item.css?" "+this._item.css:"",style:{height:t,width:"100%",padding:"8px 12px"},_hooks:{didInsert:this._handlers.didInsert},_key:this._item.id,"data-dhx-id":this._item.id})])])},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onChange:function(){t.endEdit()},onKeyDown:function(e){"Enter"===e.key&&t._item.value===t._input.value&&t.endEdit(),"Escape"===e.key&&(t._input.value=t._item.value,t.endEdit())},didInsert:function(e){var i=e.el;t._input=i,i.focus(),i.value=t._item.value,i.setSelectionRange(0,i.value.length),i.addEventListener("change",t._handlers.onChange),i.addEventListener("blur",t._handlers.onBlur),i.addEventListener("keydown",t._handlers.onKeyDown)}}},t}();e.InputEditor=r},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.ProList=void 0;var s=i(1),l=i(42),c=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.scrollView=new l.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,s.el)(".div",{style:{height:e[2]+"px",_key:"start-key"}})],i,!0),[(0,s.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,s.el)("ul.dhx_widget.dhx_list",r(r({style:{"max-height":this.config.height,position:"relative"},id:this._uid,class:o,"data-dhx-widget-id":this._uid,"data-dhx-drop-area":"row"},this._handlers),this._getListAriaAttrs(this.config,this.data.getLength())),n?[].concat(this.scrollView.render(i)):i)},e}(i(50).List);e.ProList=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyListener=void 0;var n=function(){function t(){var t=this;this._handler=function(e){if(t._isActive){var i=e.key;"Backspace"===i&&t._sequence.length>0&&(t._sequence=t._sequence.slice(0,t._sequence.length-1),t._change()),i.length<2&&(t._sequence+=i,t._change())}},this._sequence="",document.addEventListener("keydown",this._handler)}return t.prototype.startNewListen=function(t){this._isActive=!0,this._sequence="",this._currentAction=t},t.prototype.endListen=function(){this._currentAction=null,this.reset(),this._isActive=!1},t.prototype.reset=function(){this._sequence=""},t.prototype.destructor=function(){document.removeEventListener("keydown",this._handler)},t.prototype._change=function(){this._currentAction(this._sequence),this._addClearTimeout()},t.prototype._addClearTimeout=function(){var t=this;this._clearTimeout&&clearTimeout(this._clearTimeout),this._clearTimeout=setTimeout((function(){t.reset(),t._clearTimeout=null}),2e3)},t}();e.KeyListener=n},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProCombobox=void 0;var r=i(48),a=i(49),s=i(27),l=i(52),c=function(t){function e(e,i){return t.call(this,e,i)||this}return o(e,t),e.prototype._createLayout=function(){var t=this.list=new a.ProList(null,{$template:r.$template,template:this.config.template,htmlEnable:this.config.htmlEnable,virtual:this.config.virtual,keyNavigation:!0,multiselection:this.config.multiselection,itemHeight:this.config.itemHeight,height:this.config.listHeight,data:this.data,eventHandlers:this.config.eventHandlers}),e=this._layout=new s.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(l.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),s=i(6),l=i(18),c=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",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),s=o<e.maxHeight?e.maxHeight:o;return document.body.removeChild(i),1===r&&r===a?e.maxHeight:s},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,l.numberMask)(t.toString(),n(n({},o||this._cell.col.numberMask),{onlyView:i}),e):this._cell.col.patternMask?(0,l.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,l.removeNumberMask)(t,n(n({},this._cell.col.numberMask),{lastCall:e})):this._cell.col.patternMask?(0,l.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=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)},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),s=i(2),l=i(56);var c={onclick:function(t,e){var i=(0,s.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemClick,[i,e])},onmousedown:function(t,e){var i=(0,s.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemMouseDown,[i,e])},ontouchstart:function(t,e){var i=(0,s.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemMouseDown,[i,e])},ontouchmove:function(t,e){var i=(0,s.locate)(e,"data-dhx-group-item-id");i&&t._events.fire(a.GridSystemEvents.groupPanelItemTouchMove,[i,e])},ontouchend:function(t,e){var i=(0,s.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,s=void 0===a?"basic":a,l=t.sortable,c=void 0===l||l,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(s),"data-dhx-group-item-id":e,"data-dhx-id":e,_key:e},[c&&(n&&(0,r.el)("div.dhx_grid-sort",[(0,r.el)("i.dxi.dxi-arrow-up.dhx_grid-group_item-sort.dhx_grid-group_item-sort--".concat(n),{"aria-hidden":"true"}),o&&(0,r.el)("div.dhx_grid-sort-counter",{"aria-hidden":"true"},[o])||null])||(0,r.el)("i.dxi.dxi-sort.dhx_grid-group_item-sort.dhx_grid-group_item-unsorted"))||null,(0,r.el)("span.dhx_grid-group_item-label",i),u&&(0,r.el)("i.dxi.dxi-close-circle.dhx_grid-group_item-remove",{"data-dhx-group-item-remove":"true"})||null])}e.getGroupItem=d,e.getGroupPanel=function(t,e){var i,a;void 0===t&&(t=[]);var s=[];t.forEach((function(e,i){s.push(d(e)),i!==t.length-1&&s.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"},l.default.dropAreaTitle),(0,r.el)("div",{class:"dhx_grid-group_drop-area",role:"listbox"},o([],s.length?s:[(0,r.el)("span",{class:"dhx_grid-group_drop-area-placeholder"},l.default.dropAreaPlaceholder)],!0))])}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.setSubRowCell=e.getSubRowContent=void 0;var o=i(1),r=i(5),a=i(20),s=i(41),l=i(7);function c(t,e,i,o){var r=e(t),l=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({},a.defaultSubRowConfig),i),{cell:l})),"function"==typeof(null==r?void 0:r.paint)&&l.attach(r)}e.getSubRowContent=function(t){var e,i=[],n=null===(e=t.subRowConfig)||void 0===e?void 0:e.fullWidth;return t.$subRowCells&&t.currentRows.forEach((function(e){var a;if(e.$opened){var s=t.$subRowCells.get(e.id),c=null===(a=null==s?void 0:s.cell)||void 0===a?void 0:a.getRootView();if(c){var d=(0,r.getTotalHeight)(t.data.slice(0,e.$index))+e.$height;i.push((0,o.el)(".dhx_grid_subrow__container",{_key:"sub"+e.id,role:"region","aria-labelledby":"row-".concat(e.id),"data-dhx-id":e.id,"data-dhx-root-widget-id":t.gridId,tabindex:0,style:{position:"absolute",top:d,width:n?t.$totalWidth:t.$width-t.$scrollBarWidth.y-l.BORDERS}},[(0,o.inject)(c)]))}}})),i.length?(0,o.el)(".dhx_grid_subrow__data",{_flags:o.KEYED_LIST,style:{left:n?0:t.scroll.left},role:"presentation"},i):[]},e.setSubRowCell=function(t,e){for(var i=t.config,o=i.subRowConfig,r=i.$subRowCells,s=i.subRow,l=new Map,d=0;d<e.length;d++){var u=e[d];if(!u.$group){if(!r.has(u.id)||!r.get(u.id).cell){var h=n(n({},a.defaultSubRowConfig),("function"==typeof o?o(u):o)||{});r.set(u.id,h),(u.$opened||h.preserve)&&u.$subRowHeight&&c(u,s,h,r)}l.set(u.id,u.$opened)}}r.forEach((function(t,e){var i;t.preserve||(l.has(e)||r.delete(e),l.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),s=i(20),l=i(7),c=i(2),d=i(5),u={onclick:function(t,e){var i=(0,c.locate)(e,"data-dhx-id");i&&t.events.fire(a.GridEvents.dragPanelItemClick,[i,e])},onmousedown:function(t,e){var i=(0,c.locate)(e,"data-dhx-id");i&&t.events.fire(a.GridEvents.dragPanelItemMouseDown,[i,e])}};function h(t){return(0,r.el)(".dhx_grid-drag-panel_header",{style:{height:t.$headerHeight},role:"banner","aria-label":"Panel header"})}function f(t,e,i){var n=t.$footer,o=((!i||e.footerAtBottom)&&t.$scrollBarWidth.x||0)+(n&&t.$footerHeight||0);if(!o||!n&&t.$totalHeight<t.$height-t.$headerHeight-t.$footerHeight)return null;var a=l.BORDERS/2,c=t.dragPanel,d={height:o+a};return e.footerAtBottom&&(d.width=c.width||s.defaultDragPanelConfig.width,d.height=d.height+a),(0,r.el)(".dhx_grid-drag-panel_footer".concat(e.footerAtBottom?".dhx_grid-drag-panel_footer--at-bottom":""),{style:d,role:"contentinfo","aria-label":"Panel footer"})}function p(t,e,i){var n=t.$height-t.$headerHeight-l.BORDERS;return(0,r.el)(".dhx_grid-drag-panel_main",{style:{height:n},role:"main","aria-label":"Panel content"},[g(t,e),f(t,e,i),v(t,e,a.Split.top,i),v(t,e,a.Split.bottom,i)])}function g(t,e){var i=t.dragPanel,n=t.currentRows.map((function(t){return _(t,i.icon)}));return(0,r.el)(".dhx_grid-drag-panel_content",{style:{height:t.$totalHeight,paddingTop:e.shifts.y,top:-t.scroll.top},_flags:r.KEYED_LIST,role:"list","aria-label":"Draggable rows"},o([],n,!0))}function v(t,e,i,n){var c=t.dragPanel,u=(i===a.Split.bottom?t.fixedRows.bottom:t.fixedRows.top)||[];if(!u.length)return null;var h=u.map((function(t){return _(t,c.icon)})),f={width:c.width||s.defaultDragPanelConfig.width};if(i===a.Split.bottom&&e.footerAtBottom)f.bottom=t.footerHeight+l.BORDERS/2+(t.$scrollBarWidth.x||-1);else{var p=(0,d.getTotalHeight)(t.fixedRows.bottom),g=t.group?(0,s.getGroupDefaultConfig)(t.group).panelHeight:0;f.top=i===a.Split.bottom?n?t.$totalHeight+t.$headerHeight-p+l.BORDERS/2+g:t.$height-p-t.$footerHeight-l.BORDERS/2-t.$scrollBarWidth.x+g:t.$headerHeight+g}return(0,r.el)(".dhx_grid-drag-panel_content.dhx_grid-drag-panel_content--fixed",{style:f,_flags:r.KEYED_LIST,role:"list","aria-label":"Draggable rows"},o([],h,!0))}function _(t,e){return(0,r.el)(".dhx_grid-drag-panel_item",{"data-dhx-id":t.id,style:{height:t.$height},_key:t.id+"_panel",role:"listitem","aria-label":"Row id ".concat(t.id)},[(0,r.el)("i.dhx_grid-drag-panel_item-icon",{class:e,"aria-hidden":"true"})])}e.getDragPanelNode=function(t,e,i,o){var a;void 0===o&&(o=!1);var l=e.dragPanel,c=Object.entries(u).reduce((function(e,i){var o,r=i[0],a=i[1];return n(n({},e),((o={})[r]=[a,t],o))}),{}),d="dhx_grid-drag-panel ";return o&&(d+="dhx_grid-drag-panel--less-height "),(null===(a=t.config.$grouped)||void 0===a?void 0:a.length)&&(d+="dhx_grid-drag-panel--drag-not-allowed "),l.css&&(d+=l.css),(0,r.el)("section",n({class:d,style:{width:l.width||s.defaultDragPanelConfig.width},role:"region","aria-label":"Drag panel"},c),[h(e),p(e,i,o)])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComboFilter=void 0;var n=i(47),o=i(4),r=i(8),a=i(0),s=i(3),l=i(21),c=function(){function t(t){var e,i=t.column,n=t.config,r=t.headerConfig,s=t.uniqueData,l=t.value,c=t.grid;this.events=new o.EventSystem,this._silentMode=!1,this.column=i,this.config=n,this.data=s,this.value=l,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(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(l.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(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(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(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(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,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(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(){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(4),a=i(3),s=i(21),l=function(){function t(t){var e=t.column,i=t.config,n=t.uniqueData,o=void 0===n?[]:n,a=t.value,s=t.grid;this.events=new r.EventSystem,this.column=e,this.config=i,this.data=o,this.value=a||"",this._grid=s,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",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(s.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=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFilter=void 0;var n=i(1),o=i(4),r=i(3),a=i(21),s=function(){function t(t){var e=t.column,i=t.config,n=t.id,r=t.value,a=t.headerConfig,s=t.grid;this.events=new o.EventSystem,this.column=e,this.config=i,this.id=n,this.value=r||"",this.filterConfig={},this._grid=s,Object.assign(this.filterConfig,(null==a?void 0:a.filterConfig)||{}),this.initHandlers(),this.toHTML()}return t.prototype.toHTML=function(){return(0,n.el)("div.dhx_grid-filter__label",{"aria-label":"Type to search",_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"},"aria-label":"Type to search",for:this.id},"Type to search"),(0,n.el)("input",{type:"text",class:"dhx_input dhx_grid-filter",oninput:this._handlers.onchange,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,_key:this.column.id,id:this.id,value:this.value,placeholder:this.filterConfig.placeholder})])},t.prototype.getFilter=function(){return this.toHTML()},t.prototype.setValue=function(t,e){var i;this.value=t||"",this.events.fire(a.HeaderFilterEvent.change,[this.value]),null===(i=this._grid.events)||void 0===i||i.fire(r.GridEvents.filterChange,[this.value,this.column.id,"inputFilter",e])},t.prototype.clear=function(t){this.setValue("",t)},t.prototype.focus=function(){var t,e,i;this._isFocused=!0;var n=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;n&&(null===(i=n.querySelector("input"))||void 0===i||i.focus())},t.prototype.blur=function(){var t,e,i;this._isFocused=!1;var n=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;n&&(null===(i=n.querySelector("input"))||void 0===i||i.blur())},t.prototype.initHandlers=function(){var t=this;this._handlers={onchange:function(e){var i,n,o,r,a=(null===(i=e.target)||void 0===i?void 0:i.value)||(null===(o=null===(n=e.composedPath())||void 0===n?void 0:n[0])||void 0===o?void 0:o.value)||(null===(r=e.explicitOriginalTarget)||void 0===r?void 0:r.value);t._inputDelay&&clearTimeout(t._inputDelay),t._inputDelay=setTimeout((function(){return t.setValue(a)}),500)},onfocus:function(){t._isFocused=!0},onblur:function(){t._isFocused=!1}},this._grid.events.on(r.GridEvents.scroll,(function(){var e,i,o=null===(i=null===(e=t._grid.getRootView())||void 0===e?void 0:e.refs["".concat(t.column.id,"_filter")])||void 0===i?void 0:i.el;t._isFocused&&o&&(0,n.awaitRedraw)().then((function(){var t;null===(t=o.querySelector("input"))||void 0===t||t.focus()}))})),this._grid.events.on(r.GridEvents.headerCellMouseDown,(function(e,i){i.id!==t.column.id&&t.blur()})),this._grid.events.on(r.GridEvents.cellMouseDown,(function(){return t.blur()}))},t}();e.InputFilter=s},function(t,e,i){"use strict";var n=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.startResize=void 0;var o=i(0),r=i(3),a=i(7);e.startResize=function(t,e,i,s){var l,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===(l=t.scrollView)||void 0===l?void 0:l.config.enable),p=c?(0,a.calcScrollBarWidth)(t.config,f).xState:null,g=0;t.config.$resizing=e;var v=function(i){var s,l=(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===l+1&&_>=t.config.$width-m.y-2||c&&h.includes(e)&&m.xState!==p)){g=g||u[l].$width;var y=40;"function"==typeof t.data.getMaxLevel&&0===l&&(y*=t.data.getMaxLevel());var b,x=u[l].minWidth||y,w=u[l].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[l].$width=b;for(var D=0;D<S.length;D++){(null!==(s=S[D].adjust)&&void 0!==s?s:t.config.adjust)||(S[D].$fixedWidth=D<=l)}t.events.fire(r.GridEvents.resize,[u[l],i]),t.paint()}},_=function(){i.targetTouches?(document.removeEventListener("touchmove",v),document.removeEventListener("touchend",_)):(document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",_)),s()};i.targetTouches?(document.addEventListener("touchmove",v),document.addEventListener("touchend",_)):(document.addEventListener("mousemove",v),document.addEventListener("mouseup",_)),t.paint()}},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.getKeysHandlers=void 0;var o=i(3),r=i(2),a=i(15),s=i(17),l=i(5);function c(t){var e=t.grid,i=t.event;if(!e.config.$editable&&!(0,r.locateNodeByClassName)(i,"dhx_grid-header-cell")){i&&i.preventDefault();var o=e.config.columns.filter((function(t){return!t.hidden}));!function(t){var e=t.grid,i=t.columns,n=t.dir,o=t.rangedIndex,r=t.toEnd,a=t.shiftUp,s=e.selection.getCell(),c=e.config.multiselection&&a;if(!s)return;if("vertical"===n)if(r){var d=e.data.getItem(e.data.getId(0));if(1===o){var u=e.data.getId(e.data.getLength()-1);"tree"===e.config.type&&(u=(0,l.getLastChild)(u,e.data)),d=e.data.getItem(u)}e.scrollTo(d.id.toString(),s.column.id.toString()),e.selection.setCell(d.id,s.column.id,!1,c)}else{d=null;if("tree"===e.config.type)d=e.data.getItem(o<0?(0,l.getClosestTop)(s.row.id,e.data):(0,l.getClosestBottom)(s.row.id,e.data));else(h=e.data.getIndex(s.row.id.toString()))+o>=0&&h+o<e.data.getLength()&&(d=e.data.getItem(e.data.getId(h+o)));d&&(e.scrollTo(d.id.toString(),s.column.id.toString()),e.selection.setCell(d.id,s.column.id,!1,c))}else if(r){d=1===o?i[i.length-1]:i[0];e.scrollTo(s.row.id.toString(),d.id.toString()),e.selection.setCell(s.row.id,d.id,!1,c)}else{var h;(h=i.findIndex((function(t){return t.id==s.column.id})))+o>=0&&h+o<i.length&&(e.scrollTo(s.row.id.toString(),i[h+o].id.toString()),e.selection.setCell(s.row.id,i[h+o].id,!1,c))}}(n(n({},t),{columns:o})),function(t){var e,i,o=t.grid,r=t.dir,a=o,s=null===(e=a.range)||void 0===e?void 0:e.getRange();if(!s&&"range"!==(null===(i=a.block)||void 0===i?void 0:i.config.mode))return;var c="vertical"===r?function(t){var e=t.grid,i=t.rangedCell,n=t.toEnd,o=t.shiftUp,r=t.rangedIndex,a=e,s=a.data,c=a.config;if(n){if(r>0){var d=s.getId(s.getLength()-1);return"tree"===c.type&&(d=(0,l.getLastChild)(d,s)),s.getItem(d)}return s.getItem(s.getId(0))}var u=s.getIndex(i.yStart),h=s.getIndex(i.yEnd),f=r<0,p=o?i.yEnd:s.getId(f?Math.min(u,h):Math.max(u,h));if("tree"===c.type){var g=f?(0,l.getClosestTop)(p,s):(0,l.getClosestBottom)(p,s);return g?s.getItem(g):null}var v=s.getIndex(p)+r;if(v>=0&&v<s.getLength())return s.getItem(s.getId(v));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})),s=e.findIndex((function(t){return t.id===i.xEnd})),l=r<0,c=(o?s:l?Math.min(a,s):Math.max(a,s))+r;if(c>=0&&c<e.length)return e[c];return null}(n(n({},t),{rangedCell:s}));c&&function(t,e,i,n,o){var r="vertical"===n,a=r?e.id:i.yEnd,s=r?i.xEnd:e.id;if(t.scrollTo(a,s),o){var l=r?{yEnd:e.id,xEnd:i.xEnd}:{yEnd:i.yEnd,xEnd:e.id};t.range.setRange(l,!0)}else{l=r?{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(l)}}(a,c,s,r,t.shiftUp)}(n(n({},t),{columns:o}))}}function d(t,e){var i,n,o=t.selection.getCell(),r=o&&t.getSpan(o.row.id,o.column.id);if(r){if("up"===e||"down"===e){var a=null===(i=t.config.data)||void 0===i?void 0:i.findIndex((function(t){return t.id===r.row})),s=null===(n=t.config.data)||void 0===n?void 0:n.findIndex((function(t){return t.id===o.row.id}));return"up"===e?a-s-1:a+(r.rowspan||1)-s}var l=t.config.columns.filter((function(t){return!t.hidden}));a=l.findIndex((function(t){return t.id===r.column})),s=l.findIndex((function(t){return t.id===o.column.id}));return"left"===e?a-s-1:a+(r.colspan||1)-s}return"down"===e||"right"===e?1:-1}e.getKeysHandlers=function(t){var e,i,l,u="cell"===t.config.selection||"complex"===t.config.selection||!0===t.config.selection,h={};if(t.getRootView()){var f=null===(l=null===(i=null===(e=t.getRootView())||void 0===e?void 0:e.refs)||void 0===i?void 0:i.grid_body)||void 0===l?void 0:l.el;if(!f)return;h={pageUp:function(t){t.preventDefault(),f.scrollTop-=f.clientHeight},pageDown:function(t){t.preventDefault(),f.scrollTop+=f.clientHeight},home:function(t){t.preventDefault(),f.scrollTop=0},end:function(t){t.preventDefault(),f.scrollTop+=f.scrollHeight}}}return n({enter:function(){if(u){var e=(0,a.normalizeCell)(t.selection.getCell(),t);if(e&&(!1!==e.column.editable&&t.config.editable||e.column.editable))if(t.config.$editable)t.editEnd();else if("boolean"===e.column.type){if(!t.events.fire(o.GridEvents.beforeEditStart,[e.row,e.column,"checkbox"]))return;if(t.events.fire(o.GridEvents.afterEditStart,[e.row,e.column,"checkbox"]),!t.events.fire(o.GridEvents.beforeEditEnd,[!e.row[e.column.id],e.row,e.column]))return;t.events.fire(o.GridEvents.afterEditEnd,[!e.row[e.column.id],e.row,e.column])}else t.editCell(e.row.id,e.column.id,e.column.editorType)}else t.config.$editable&&t.editEnd()},space:function(e){var i,n=(0,a.normalizeCell)(t.selection.getCell(),t);if(u&&(null!==(i=null==n?void 0:n.column.editable)&&void 0!==i?i:t.config.editable)&&!t.config.$editable&&n&&"boolean"===n.column.type){if(e.preventDefault(),!t.events.fire(o.GridEvents.beforeEditStart,[n.row,n.column,"checkbox"]))return;if(t.events.fire(o.GridEvents.afterEditStart,[n.row,n.column,"checkbox"]),!t.events.fire(o.GridEvents.beforeEditEnd,[!n.row[n.column.id],n.row,n.column]))return;t.events.fire(o.GridEvents.afterEditEnd,[!n.row[n.column.id],n.row,n.column])}},escape:function(){t.config.$editable&&t.editEnd(!0)},tab:function(e){if(t.config.selection&&!(0,r.locateNodeByClassName)(e,"dhx_grid-header-cell")){t.config.$editable&&t.editEnd();var i=t.selection.getCell(),n=t.config.columns.filter((function(t){return!t.hidden}));if(i){if(i.row.$opened&&i.row.$subRowHeight){var o=t.getSubRow(i.row.id),a=o.view,l=o.element;return void((null==a?void 0:a.name.includes("grid"))?(a.selection.setCell(a.data.getId(0)),s.focusManager.setFocusId(a._uid)):l.focus())}var c=n.indexOf(i.column)+d(t,"right");if(c>=0&&c<n.length)e&&e.preventDefault(),t.scrollTo(i.row.id.toString(),n[c].id.toString()),t.selection.setCell(i.row.id,n[c].id);else if(c>=0){var u=t.data.getIndex(i.row.id.toString())+1;u<t.data.getLength()&&(e&&e.preventDefault(),t.scrollTo(t.data.getId(u).toString(),n[0].id.toString()),t.selection.setCell(t.data.getId(u),n[0].id))}}}},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,a.clearCells)(t,null===(i=t.range)||void 0===i?void 0:i.getRangedCells())},"shift+tab":function(e){var i,n,o;if(t.config.selection&&!(0,r.locateNodeByClassName)(e,"dhx_grid-header-cell")){t.config.$editable&&t.editEnd();var a=t.selection.getCell(),l=t.config.columns.filter((function(t){return!t.hidden}));if(a){var c=(0,r.locate)(null===(o=null===(n=null===(i=t.getRootView().node)||void 0===i?void 0:i.parent)||void 0===n?void 0:n.parent)||void 0===o?void 0:o.el,"data-dhx-root-widget-id");if(c)return void s.focusManager.setFocusId(c);var u=l.indexOf(a.column)+d(t,"left");if(u>=0&&u<l.length)e&&e.preventDefault(),t.scrollTo(a.row.id.toString(),l[u].id.toString()),t.selection.setCell(a.row.id,l[u].id);else if(u<t.data.getLength()){var h=t.data.getIndex(a.row.id.toString())-1;h>=0&&(e&&e.preventDefault(),t.scrollTo(t.data.getId(h).toString(),l[l.length-1].id.toString()),t.selection.setCell(t.data.getId(h),l[l.length-1].id))}}}},arrowUp:function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:d(t,"up")})},"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,a.normalizeCell)(t.selection.getCell(),t);e&&(e.row.$opened?t.collapse(e.row.id):t.expand(e.row.id))},"ctrl+arrowUp":function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:-1,toEnd:!0})},"shift+arrowUp":function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:-1,shiftUp:!0})},"ctrl+shift+arrowUp":function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:-1,toEnd:!0,shiftUp:!0})},arrowDown:function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:d(t,"down")})},"ctrl+arrowDown":function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:1,toEnd:!0})},"shift+arrowDown":function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:1,shiftUp:!0})},"ctrl+shift+arrowDown":function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:1,toEnd:!0,shiftUp:!0})},arrowRight:function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:d(t,"right")})},"ctrl+arrowRight":function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:1,toEnd:!0})},"shift+arrowRight":function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:1,shiftUp:!0})},"ctrl+shift+arrowRight":function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:1,toEnd:!0,shiftUp:!0})},arrowLeft:function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:d(t,"left")})},"ctrl+arrowLeft":function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:-1,toEnd:!0})},"shift+arrowLeft":function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:-1,shiftUp:!0})},"ctrl+shift+arrowLeft":function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:-1,toEnd:!0,shiftUp:!0})}},h)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropManager=void 0;var n=i(1),o=i(3),r=i(8),a=i(7),s=i(5),l=i(0),c=i(6),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,l.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,l.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,s.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})),M=O.findIndex((function(t){return t.id==e._dragState.start}));D=(0,s.getTotalWidth)(O.slice(0,k+1)),M>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,l.isDefined)(t)||this._dragState.source.find((function(e){return e==t.id})))return null;var e,i,o=this._grid.config,r=o.topSplit,s=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(s){var p=this._grid.data.getLength();i=this._grid.data.getRawData(p-s,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,l.isDefined)(e))return 0;var i=this._getTopPosition(e);return e.$level&&(i+=e.$height-a.BORDERS/2),i}return this._getTopPosition(t)+t.$height},t.prototype._toggleRowDraggable=function(t,e){var i=this;t.forEach((function(t){i._grid.data.update(t,{$draggable:e},!0),i._isTreeMode&&i._grid.data.haveItems(t)&&i._grid.data.eachChild(t,(function(t){i._grid.data.update(t.id,{$draggable:e},!0)}))}))},t.prototype._isSameComponent=function(t){return(0,u.locate)(t.target,"data-dhx-widget-id")!=this._grid._uid},t}();e.DropManager=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getVisibleRowNode=e.getRowNode=void 0,e.getRowNode=function(t,e,i){var n=i?".dhx_grid__cols_".concat(i,"--fixed"):":not(.dhx_grid-fixed-cols-wrap)";return e.querySelector("".concat(n,' .dhx_grid-row[data-dhx-id="').concat(t,'"]'))},e.getVisibleRowNode=function(t,e,i){var n=document.createElement("div");return n.style.width=e+"px",n.style.overflow="hidden",t.style.width=e-i+"px",t.style.marginLeft=i+"px",n.appendChild(t),n}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setLocale=void 0,e.setLocale=function(t,e){var i=this[t];if(i)for(var n in e)i[n]=e[n]}}])})),window.dhx_legacy){if(window.dhx)for(var key in dhx)if("i18n"===key)for(var lang in dhx[key])window.dhx_legacy[key][lang]=dhx[key][lang];else dhx_legacy[key]=dhx[key];window.dhx=dhx_legacy,delete window.dhx_legacy}
|
|
21
|
+
t.exports=function(){"use strict";var t=1,e=2,i=3,n=4,o=5,r="undefined"!=typeof window,a=(r?window:{}).requestAnimationFrame,s={};function l(){}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 s=o[o.length-1];if(t[s]<t[r])n[r]=s,o.push(r);else{for(e=0,i=o.length-1;e<i;){var l=(e+i)/2|0;t[o[l]]<t[r]?e=l+1:i=l}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 M(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 R(t){for(t=t||s;null==t.vm&&t.parent;)t=t.parent;return t.vm}function I(){}var P=I.prototype={constructor:I,type:null,vm:null,key:null,ref:null,data:null,hooks:null,ns:null,el:null,tag:null,attrs:null,body:null,flags:0,_class:null,_diff:null,_dead:!1,_lis:!1,idx:null,parent:null};function H(t){var i=new I;return i.type=e,i.body=t,i}var j={},F=/\[(\w+)(?:=(\w+))?\]/g;function $(t){var e,i,n,o,r=j[t];if(null==r)for(j[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=F.exec(t);)null==r.attrs&&(r.attrs={}),r.attrs[o[1]]=o[2]||"";return r}var A=1,L=2,V=4,N=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 s=r.attrs||{};if(a.id&&!d(s.id)&&(s.id=a.id),a.class&&(r._class=a.class,s.class=a.class+(d(s.class)?" "+s.class:"")),a.attrs)for(var l in a.attrs)d(s[l])||(s[l]=a.attrs[l]);r.attrs=s}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|=A}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(R(t),t.ref,t);var a=t.hooks,s=r&&r.hooks;(a&&(a.willRemove||a.didRemove)||s&&(s.willUnmount||s.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=H(""+o)),o.type===e?null==o.body||""===o.body?i.splice(n--,1):n>0&&i[n-1].type===e?(i[n-1].body+=o.body,i.splice(n--,1)):G(o,t,n,null):G(o,t,n,null))}}var X={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 U(t,e){return isNaN(e)||X[t]?e:e+"px"}function q(t,e){var i=(t.attrs||s).style,n=e?(e.attrs||s).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]=U(o,r))}if(n)for(var a in n)null==i[a]&&(t.el.style[a]="")}}var K=[];function J(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 Z(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&&J(e.hooks,"willUnmount",e,e.data),n=J(t.hooks,"willRemove",t);if((t.flags&A)===A&&c(t.body))for(var o=0;o<t.body.length;o++)at(t.body[o]);return i||n}function st(t,e,i){var n=e._node,o=n.vm;if(c(n.body))if((n.flags&A)===A)for(var r=0;r<n.body.length;r++)st(e,n.body[r].el);else ct(n);delete e._node,t.removeChild(e),J(n.hooks,"didRemove",n,null,i),null!=o&&(J(o.hooks,"didUnmount",o,o.data,i),o.node=null)}function lt(t,e){var i=e._node;if(!i._dead){var n=at(i);null!=n&&g(n)?(i._dead=!0,n.then(w(st,[t,e,!0]))):st(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&A))c(t.body)&&ct(t),e.textContent=null;else{var i=e.firstChild;do{var n=ot(i);lt(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&&J(r.hooks,"willMount",r,r.data),J(n.hooks,o?"willReinsert":"willInsert",n),t.insertBefore(e,i),J(n.hooks,o?"didReinsert":"didInsert",n),null!=r&&J(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=l;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=R(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 s=r[a];c(s)?(e=s[0],i=s.slice(1)):(e=s,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||s,o=e.attrs||s;if(n===o);else{for(var r in n){var a=n[r],l=T(t.tag,r),c=l?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,l,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=(s=Et(r.view,r.data,r.key,r.opts)._redraw(t,e,!1)).node.type,ut(t.el,Ot(s.node));else if(a===o){var s;(s=r.vm)._redraw(t,e),a=s.node.type,ut(t.el,s.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,s,!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 Mt(t,e){return e[t.idx-1]}function Tt(t){return t.parent}window.lisMove=Ht;var Rt=1,It=2;function Pt(t,e,i,n,o,r,a,s){return function(l,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)!==l)return g=t(u[n]),null!=p.vm?p.vm.unmount(!0):lt(c,u[n]),void(u[n]=g)}if(u[o]==h)return It;if(null==u[o].el)i(c,Ot(u[o]),u[n]),u[o]=e(u[o],d);else if(u[o].el===u[n])u[o]=e(u[o],d),u[n]=t(u[n]);else{if(f||p!==u[a])return f&&null!=u[n]?Ht(t,e,i,n,o,c,d,p,u):Rt;g=u[n],u[n]=t(g),s(c,g,u[r]),u[r]=g}}}function Ht(t,e,i,n,o,r,a,s,l){if(s._lis)i(r,l[o].el,l[n]),l[o]=e(l[o],a);else{var c=S(s.idx,l.tombs);s._lis=!0;var d=t(l[n]);i(r,l[n],null!=c?a[l.tombs[c]].el:c),null==c?l.tombs.push(s.idx):l.tombs.splice(c,0,s.idx),l[n]=d}}var jt=Pt(ot,kt,ut,"lftSib","lftNode","rgtSib","rgtNode",ht),Ft=Pt(rt,Mt,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]||s).el,rgtSib:(i[i.length-1]||s).el};t:for(;;){for(;;){var a=jt(t,n,o,r,null,!1);if(a===Rt)break;if(a===It)break t}for(;;){var l=Ft(t,n,o,r,r.lftNode,!1);if(l===Rt)break;if(l===It)break t}At(t,n,o,r);break}}function At(t,e,i,n){for(var o=Array.prototype.slice.call(e.childNodes),r=[],a=0;a<o.length;a++){var s=o[a]._node;s.parent===t&&r.push(s.idx)}for(var l=C(r).map((function(t){return r[t]})),c=0;c<l.length;c++)i[l[c]]._lis=!0;for(n.tombs=l;jt(t,e,i,n,null,!0)!==It;);}function Lt(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(!Lt(r)&&t.tag===r.tag&&t.type===r.type&&t.key===r.key&&(t.flags&~A)==(r.flags&~A))return r}return null}function Wt(t,e,i){return e[e._keys[t.key]]}function zt(t,i){J(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),s=c(r),l=(t.flags&N)===N;a?s||l?Bt(t,i):r!==o&&(null!=r?n.textContent=r:dt(i)):s?(dt(i),Dt(t)):r!==o&&(n.firstChild?n.firstChild.nodeValue=r:n.textContent=r),J(i.hooks,"didRecycle",i,t)}else n.nodeValue=r}function Bt(e,r){var a=e.body,s=a.length,l=r.body,c=l.length,d=(e.flags&N)===N,u=(e.flags&L)===L,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;_<l.length;_++)v[l[_].key]=_;l._keys=v}if(f&&0===s)return dt(r),void(d&&(e.body=[]));var m,y,b=0,x=!1,w=0;if(d)var C={key:null},S=Array(s);for(_=0;_<s;_++){if(d){var E=!1,D=null;p&&(h&&(C.key=a.key(_)),m=g(C,l,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,l,w))&&(zt(O,m),y=m.idx);else if(k===n){if(m=p&&g(O,l,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 R=M(O.vm);k=(T=O.vm._update(O.data,e,_,R)).node.type}}if(!h&&null!=m&&(y===w?++w===c&&s>c&&(m=null,p=!1):x=!0,c>100&&x&&++b%10==0))for(;w<c&&Lt(l[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:l,refs:null,render:null,mount:Xt,unmount:Ut,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 R(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,M(e)):e._redrawAsync(),e},update:function(t,e){var i=this;return e?i._update(t,null,null,M(i)):i._updateAsync(t),i},_update:Jt,_redraw:Kt,_redrawAsync:null,_updateAsync:null};function Xt(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&&Z(i),i}function Ut(t){var e=this,i=e.node;lt(i.el.parentNode,i.el),t||Z(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,s=a.node&&a.node.el&&a.node.el.parentNode,l=a.node;if(null!=a.diff&&(n=a._diff,a._diff=o=a.diff(a,a.data),null!=l)){var d=c(n)?b:y;if(n===o||d(n,o))return qt(a,l,t,e)}s&&J(a.hooks,"willRedraw",a,a.data);var u=a.render.call(a,a,a.data,n,o);if(u===l)return qt(a,l,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):l&&l.parent?(G(u,l.parent,l.idx,a),l.parent.body[l.idx]=u):G(u,null,null,a),!1!==i)if(l)if(l.tag!==u.tag||l.key!==u.key){l.vm=u.vm=null;var h=l.el.parentNode,f=ot(l.el);lt(h,l.el),ut(h,Ot(u),f),l.el=u.el,u.vm=a}else zt(u,l);else Ot(u);return s&&J(a.hooks,"didRedraw",a,a.data),r&&s&&Z(a),a}function Jt(t,e,i,n){var o=this;return null!=t&&o.data!==t&&(J(o.hooks,"willUpdate",o,t),o.data=t),o._redraw(e,i,n)}function Zt(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=Zt(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 se(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 le={config:_t,ViewModel:Gt,VNode:I,createView:Et,defineElement:Zt,defineSvgElement:te,defineText:H,defineComment:ee,defineView:ne,injectView:re,injectElement:ae,lazyList:se,FIXED_BODY:L,DEEP_REMOVE:A,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),Z(R(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 P.patch=ce,Yt.emit=gt,Yt.onemit=null,Yt.body=function(){return ue(this.node,[])},le.defineElementSpread=he,le.defineSvgElementSpread=fe,le}()},function(t,e,i){"use strict";(function(t){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Loader=void 0;var o=i(0),r=i(10),a=i(12),s=i(0),l=function(){function e(t,e){this._parent=t,this._changes=e}return e.prototype.load=function(t,e){var i=this;if(!t.config||this._parent.events.fire(a.DataEvents.beforeLazyLoad,[]))return this._parent.loadData=t.load().then((function(t){return t?i.parse(t,e):[]})).catch((function(t){i._parent.events.fire(a.DataEvents.loadError,[t])}))},e.prototype.parse=function(t,e){var i=this;if(void 0===e&&(e=a.DataDriver.json),"json"!==e||(0,r.hasJsonOrArrayStructure)(t)||this._parent.events.fire(a.DataEvents.loadError,["Uncaught SyntaxError: Unexpected end of input"]),!((t=(e=(0,r.toDataDriver)(e)).toJsonArray(t))instanceof Array)){var l=t.total_count-1,c=t.from;if(t=t.data,0!==this._parent.getLength())return t.forEach((function(t,e){var a=c+e,l=i._parent.getId(a);if((0,o.isId)(l)){var d=i._parent.getItem(l);if(d&&d.$empty){var u=t.id||d.id;(0,s.isDefined)(t.id)&&i._parent.changeId(l,u,!0),i._parent.update(u,n(n({},t),{$empty:void 0}),!0)}}else(0,r.dhxWarning)("item not found")})),this._parent.events.fire(a.DataEvents.afterLazyLoad,[c,t.length]),this._parent.events.fire(a.DataEvents.change),t;for(var d=[],u=0,h=0;u<=l;u++)u>=c&&u<=c+t.length-1?(d.push(t[h]),h++):d.push({$empty:!0});t=d}return this._parent.getInitialData()&&this._parent.removeAll(),this._parent.$parse(t),t},e.prototype.save=function(e){for(var i=this,n=this._getUniqueOrder(),o=function(n){if(n.saving||n.pending)(0,r.dhxWarning)("item is saving");else{var o=a._findPrevState(n.id);if(o&&o.saving){var s=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(s),n.pending=!0}else a._setPromise(n,e)}},a=this,s=0,l=n;s<l.length;s++){o(l[s])}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=l}).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,s=null!==(r=e._checkVal(t.as,i[t.by]))&&void 0!==r?r:"",l=null!==(a=e._checkVal(t.as,o[t.by]))&&void 0!==a?a:"";return(0,n.naturalCompare)(s.toString(),l.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 s=a[r],l=s.rule.call(i,t,o)*(n[s.dir]||n.asc);if(0!==l)return l}return 0})),r=o.findIndex((function(t){return t.$groupSummary}));if(-1!==r){var a=o[r];switch(o.splice(r,1),a.$groupSummary){case"top":o.unshift(a);break;case"bottom":o.push(a)}}return o},t}();e.Sort=o},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;var r=i(0),a=i(37),s=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 s=[],l={},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),l[_]||(l[_]=[]),l[_].push(f)):(this._config.showMissed&&(delete f.parent,c.push(f)),"string"==typeof this._config.showMissed&&(d=this._config.showMissed))}var m=Object.keys(l);return d&&m.push(d),m.forEach((function(e){var d,h=l[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),s.push(g),o<t.length-1&&s.push.apply(s,a._group(t,h,f,o+1)),o===t.length-1&&h.forEach((function(t){s.push(n(n({},t),{parent:f}))})),u.summary&&a._addSummaryRow(s,f,u.summary,p)})),d||s.push.apply(s,c),s}},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=s},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 s=i(0),l=i(33),c=i(14),d=i(10),u=i(12);function h(t,e,i,n){void 0!==n&&-1!==n&&t[i]&&t[i][n]?t[i].splice(n,0,e):(t[i]||(t[i]=[]),t[i].push(e))}e.addToOrder=h;var f=function(t){function e(e,i){var n,o=t.call(this,e,i)||this;o._children={};var r=o._root=e&&e.rootId||"_ROOT_"+(0,s.uid)();return o._children=((n={})[r]=[],n),o._initChildren=null,o}return o(e,t),e.prototype.add=function(t,e,i){var n,o=this;return void 0===e&&(e=-1),void 0===i&&(i=this._root),n=Array.isArray(t)?t.map((function(n,r){return o._add({newItem:n,batch:t,index:e,parent:i,order:r})})):this._add({newItem:t,batch:[t],index:e,parent:i}),this._reapplyFilters(),n},e.prototype.getRoot=function(){return this._root},e.prototype.getParent=function(t,e){if(void 0===e&&(e=!1),!this._pull[t])return null;var i=this._pull[t].parent;return e?this._pull[i]:i},e.prototype.getItems=function(t){return this._children&&this._children[t]?this._children[t]:[]},e.prototype.getLength=function(t){return void 0===t&&(t=this._root),this._children[t]?this._children[t].length:null},e.prototype.removeAll=function(e){var i;if((0,s.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 l=this._root;this._initChildren=null,this._children=((i={})[l]=[],i)}},e.prototype.update=function(e,i,n){var o=i.parent;!(0,s.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,s=this;if(void 0===i&&(i=!1),(null==e?void 0:e.smartSorting)&&(this._sorter=t),i||this._sortingStates.length&&!(null==e?void 0:e.smartSorting)&&((null===(n=this._sortingStates[0])||void 0===n?void 0:n.smartSorting)||(null==e?void 0:e.smartSorting))||(this._sortingStates=[r(r({},t),e)]),t){if(!i&&(this._initSortOrder=this._initSortOrder||a([],this._initFilterOrder||this._order,!0),!(null==e?void 0:e.smartSorting)&&(null===(o=this._sortingStates[0])||void 0===o?void 0:o.smartSorting))){var l=this._sortingStates.findIndex((function(e){return e.by==t.by}));-1!==l?this._sortingStates[l].dir=t.dir:this._sortingStates.push(t)}this._applySorters()}else this._initSortOrder&&(this._children={},this._order=[],this._sortingStates=[],this._initSortOrder.forEach((function(t){return s._parseItem(t)})),this._sorter=this._initSortOrder=this._initChildren=null,this._initFilterOrder&&(this._initFilterOrder=null,this.filter(null,{$restore:!0},!0)));i||(this._reapplyFilters(),this.events.fire(u.DataEvents.change,[void 0,"sort",t]))},e.prototype.filter=function(t,e,i){if((null==e?void 0:e.$restore)&&(t=this._normalizeFilters(t||this._filters)),!(t&&(null==e?void 0:e.add)||(this._initChildren&&(this._children=this._initChildren,this._initChildren=null),null==e?void 0:e.$restore)))for(var n in this._filters){var o=this._filters[n],r=o.rule,a=o.config;(null==a?void 0:a.permanent)?this._applyFilter(r,a):delete this._filters[n]}var l;if(t&&!(null==e?void 0:e.$restore))l=(null==e?void 0:e.id)||(0,s.uid)(),e||(e={}),e.type=e.type||u.TreeFilterType.all,this._filters[l]={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,s.isEmptyObj)(c)?null:c])}return l},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,s.isId)(r._move(t,e,i,n,o))?a.push(t):(0,d.throwMoveWarning)(t,r.exists(t))})),a}return null!==(o=this._move(t,e,i,n))&&void 0!==o?o:(0,d.throwMoveWarning)(t,this.exists(t))},e.prototype.forEach=function(t,e,i){if(void 0===e&&(e=this._root),void 0===i&&(i=1/0),this.haveItems(e)&&!(i<1))for(var n=this._children[e],o=0;o<n.length;o++)t.call(this,n[o],o,n),this.haveItems(n[o].id)&&this.forEach(t,n[o].id,--i)},e.prototype.eachChild=function(t,e,i,n){if(void 0===i&&(i=!0),void 0===n&&(n=function(){return!0}),this.haveItems(t))for(var o=0;o<this._children[t].length;o++)e.call(this,this._children[t][o],o),i&&n(this._children[t][o])&&this.eachChild(this._children[t][o].id,e,i,n)},e.prototype.getNearId=function(t){return t},e.prototype.loadItems=function(t,e){var i=this;if(void 0===e&&(e=u.DataDriver.json),this.events.fire(u.DataEvents.beforeItemLoad,[t])){var n=this.config.autoload.toString(),o=n+(n.includes("?")?"&id=".concat(t):"?id=".concat(t));new c.DataProxy(o).load().then((function(n){n=(e=(0,d.toDataDriver)(e)).toJsonArray(n),i._parse_data(n,t),i.events.fire(u.DataEvents.change),i.events.fire(u.DataEvents.afterItemLoad,[t])})).catch((function(t){i.events.fire(u.DataEvents.loadError,[t])}))}},e.prototype.refreshItems=function(t,e){void 0===e&&(e=u.DataDriver.json),this.removeAll(t),this.loadItems(t,e)},e.prototype.eachParent=function(t,e,i){void 0===i&&(i=!1);var n=this.getItem(t);if(n&&(i&&e.call(this,n),n.parent!==this._root)){var o=this.getItem(n.parent);e.call(this,o),this.eachParent(n.parent,e)}},e.prototype.haveItems=function(t){return t in this._children},e.prototype.canCopy=function(t,e){if(t===e)return!1;var i=!0;return this.eachParent(e,(function(e){return e.id===t?i=!1:null})),i},e.prototype.serialize=function(t,e){void 0===t&&(t=u.DataDriver.json);var i=this._serialize(this._root,e),n=(0,d.toDataDriver)(t);if(n)return n.serialize(i)},e.prototype.getId=function(t,e){if(void 0===e&&(e=this._root),this._children[e]&&this._children[e][t])return this._children[e][t].id},e.prototype.map=function(t,e,i){void 0===e&&(e=this._root),void 0===i&&(i=!0);var n=[];if(!this.haveItems(e))return n;for(var o=0;o<this._children[e].length;o++)if(n.push(t.call(this,this._children[e][o],o,this._children)),i){var r=this.map(t,this._children[e][o].id,i);n=n.concat(r)}return n},e.prototype.getRawData=function(e,i,n,o,r){var a;return r=null!=r?r:this._root,this._children[r]?(a=r===this._root?t.prototype.getRawData.call(this,e,i,this._children[r]):this._children[r],2===o?this.flatten(a):a):[]},e.prototype.flatten=function(t){var e=this,i=[];return t.forEach((function(t){i.push(t);var n=e._children[t.id];n&&t.$opened&&(i=i.concat(e.flatten(n)))})),i},e.prototype._add=function(t){var e=t.newItem,i=t.index,n=void 0===i?-1:i,o=t.parent,r=void 0===o?this._root:o,a=t.order,s=void 0===a?0:a,l=t.batch;if(s>0&&-1!==n&&(n+=1),this.events.fire(u.DataEvents.beforeAdd,[e,l,s])){this._setParent(e,r);var c=this._addCore(e,n);if(this._onChange("add",e.id,e),this.events.fire(u.DataEvents.afterAdd,[e,l,s]),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,s.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 l=0,c=r;l<c.length;l++){var u=c[l].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,s.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 l=this._root;this._initChildren=null,this._children=((i={})[l]=[],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),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]&&this._pull[i.parent].items&&!this._pull[i.parent].items.find((function(t){return t.id===i.id}))&&this._pull[i.parent].items.push(i),t.prototype._addToOrder.call(this,e,i,n),h(o,i,a,n),r&&h(r,i,a,n)},e.prototype._parse_data=function(t,e){var i,n,o;void 0===e&&(e=this._root);for(var r=0,a=t;r<a.length;r++){var l=a[r];this.config.init&&(l=this.config.init(l)),l&&"object"!=typeof l&&(l={value:l}),l.id=null!==(i=l.id)&&void 0!==i?i:(0,s.uid)(),l.parent=l.parent&&!(null===(o=null===(n=l.parent)||void 0===n?void 0:n.toString())||void 0===o?void 0:o.includes("_ROOT_"))?l.parent:e,this._pull[l.id]&&(0,d.dhxError)("Item ".concat(l.id," already exist")),this._parseItem(l),l.items&&l.items instanceof Object&&this._parse_data(l.items,l.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 s=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 l=function(e){return s(e)&&t(e)};(c=a.filter(l)).length?o[i]=c:i===this._root&&(o[i]=[])}else{var c;l=function(e){var i,n=!0;for(var o in t)if(t[o].by&&""!==t[o].match&&(n=t[o].compare?t[o].compare(e[t[o].by],t[o].match,e):-1!==(null===(i=e[t[o].by])||void 0===i?void 0:i.toString().toLocaleLowerCase().indexOf(t[o].match.toString().toLowerCase()))),!n)break;return s(e)&&n};(c=a.filter(l)).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,s.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,s.isDefined)(t.by))n[t.by]=t;else for(var r in t)n[r]=t[r];else n=t;this._recursiveFilter(n,e,this._root,0,o),Object.keys(o).forEach((function(t){for(var e=i.getParent(t),n=i.getItem(t);e;)o[e]||(o[e]=[]),n&&!o[e].find((function(t){return t.id===n.id}))&&o[e].push(n),n=i.getItem(e),e=i.getParent(e)})),this._children=o}},e.prototype._normalizeFilters=function(t){var e={};for(var i in t)e[i]=t[i].rule;return e},e.prototype._checkFilterRule=function(e){var i=this;return t.prototype._checkFilterRule.call(this,e)||Object.values(e).every((function(e){return"function"!=typeof e&&t.prototype._checkFilterRule.call(i,e)}))},e.prototype._applySorters=function(){for(var t in this._children)this._sort.sort(this._children[t],this._sortingStates);if(this._initChildren&&Object.keys(this._initChildren).length)for(var t in this._initChildren)this._sort.sort(this._initChildren[t],this._sortingStates)},e}(l.DataCollection);e.TreeCollection=f},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.dragManager=void 0;var r=i(2),a=i(78),s=i(12),l=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"),s="common"===a,l=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||s){var h=t._transferData,f=h.x,p=h.y,g=h.start,v=h.componentId;if(!t._transferData.ghost){if(Math.abs(f-l)<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&&!s||!t._transferData.groupable&&"group"===a||t._transferData.groupOnly&&"group"!==a&&!s&&t._transferData.start!=u),t._moveGhost(l,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,s=t.itemsForGhost,l=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(l&&(this._ghost=l),Array.isArray(c)&&c.includes(b)?(this._transferData.source=o([],c,!0),this._itemsForGhost=s):(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,l={start:i,source:n,target:o,dragItem:e.type},c=a.collectionStore.getItem(r);c&&o&&c.events.fire(s.DragEvents.cancelDrop,[l,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,l=e.dropComponentId,c=e.dropPosition,d={start:i,source:n,target:o,dropPosition:c},u=a.collectionStore.getItem(l),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(s.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(s.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(s.DragEvents.beforeDrag,[o,e,r,this._transferData.type])&&(0,c.isId)(t)?(this._transferData.component.events.fire(s.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(s.DragEvents.dragOut,[{start:_,source:m,target:y},t,this._transferData.type]),o!==b||!(0,l.isTreeCollection)(w.component.data)||(0,l.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(s.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,s=t.component.data,h=e.component.data,f=0,p=e.id,g=(0,l.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,M=this._transferData.dropPosition;switch(v){case"child":break;case"sibling":if(!h.getItem(e.id))return;var T=h.getIndex(t.id),R=h.getIndex(e.id),I=h.getParent(t.id),P=h.getParent(e.id);p=h.getParent(p),"top"===M?f=R-(-1===T||T>R||I!==P?0:1):"bottom"===M&&(f=R+(-1===T||T>R||I!==P?1:0));break;case"complex":if(k)p=e.id,f=h.getLength();else{var H=h.getItem(t.id),j=h.getItem(e.id);if(!j)return;T=h.getIndex(t.id),R=h.getIndex(e.id);var F=(null==H?void 0:H.$level)||0,$=(null==j?void 0:j.$level)||0;"top"===M?(p=h.getParent(p),f=F===$?R-(-1===T||T>R?0:1):R):"bottom"===M&&(p=h.getParent(p),f=F===$?R+(-1===T||T>R?1:0):R+1)}break;default:if((0,c.isId)(e.id)){h.getIndex(t.id)>-1&&(t.newId=(0,c.uid)());T=h.getIndex(t.id),R=h.getIndex(e.id);f="top"===M?R-(-1===T||T>R?0:1):"bottom"===M?R+(-1===T||T>R?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){s.copy(t,f,h,p),f>-1&&f++})):s.copy(t.id,f,h,p);else if(this._transferData.source instanceof Array&&this._transferData.source.length>1)s.move(this._transferData.source,f,h,p);else if(d(a)&&!a.config.columns.length){var A=r.data.getItem(t.id);a.data.parse([n({},A)]),a.setColumns(o([],r.config.columns,!0)),a.paint(),r.data.remove(t.id),r.paint()}else s.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(s.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(s.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(14),a=i(0),s=i(23),l=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(){s.ajax.get(e.url,{responseType:"text"}).then(t).catch(i),e._cooling=!0}),e.config.delay),e._cooling&&(t(null),e._cooling=!1)):(s.ajax.get(e.url,{responseType:"text"}).then(t).catch(i),e._cooling=!0,e._timeout=setTimeout((function(){})))}))},i}(r.DataProxy);e.LazyDataProxy=l}).call(this,i(9))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;var n=i(4),o=i(16),r=i(12),a=i(0),s=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=s},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 s=i(1),l=i(4),c=i(2),d=i(0),u=i(25),h=i(11),f=i(8),p=i(82),g=i(6),v=i(15),_=i(5),m=i(88),y=i(3),b=i(89),x=i(7),w=i(21),C=i(121),S=i(122),E=i(19),D=i(123),O=i(124),k=i(20),M=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,e,i)||this;if(n._touch={duration:350,dblDuration:300,timer:null,start:!1},n._destructed=!1,n._sortingStates=[],n._dropManager=null,n._commonSummary={},n._colSummary={},n.version="9.3.4",n.name="grid",n.config=(0,d.extend)({rowHeight:40,headerRowHeight:40,footerRowHeight:40,keyNavigation:!0,sortable:!0,columns:[],data:[],tooltip:!0,rootParent:"string"==typeof e&&e||n._uid},n._normalizeConfig(i)),n.content=(0,w.getContent)(n),n._scroll={top:0,left:0},n.config.autoWidth=n.config.autoWidth||n.config.fitToContainer,n.config.adjust=n.config.adjust||n.config.columnsAutoWidth,n.config.editable=n.config.editable||n.config.editing,n.config.leftSplit=n.config.leftSplit||n.config.splitAt,n.config.columns.forEach((function(t){"date"===t.type&&t.format&&(t.dateFormat=t.format)})),n._setHTMLEventHandlers(),n.config.eventHandlers)for(var o=0,r=Object.entries(n.config.eventHandlers);o<r.length;o++){var a=r[o],s=a[0],l=a[1];n._htmlEvents[s]=(0,c.eventHandler)((function(t){return{col:n.getColumn((0,c.locate)(t,"data-dhx-col-id")||(0,c.locate)(t,"data-dhx-id"))||{},row:n.data.getItem((0,c.locate)(t,"data-dhx-id"))||{}}}),l,n._htmlEvents[s])}return n._init(),n._dragInit(),n.config.columns&&n._parseColumns(!0),n._canDataParse()&&n.data.parse(n.config.data),n.selection=new m.Selection(n,{type:"string"==typeof n.config.selection&&n.config.selection||"complex",disabled:!n.config.selection,multiSelection:n.config.multiselection},n.events,n._uid),n.mount(e,n._createView()),i.autoEmptyRow&&0===n.data.getLength()&&(n._addEmptyRow(),n.paint()),n}return o(e,t),e.prototype.destructor=function(){var t;this._destructed=!0,this._destroyContent(),null===(t=this.config.$subRowCells)||void 0===t||t.forEach((function(t){var e;null===(e=t.cell)||void 0===e||e.destructor()})),this.keyManager&&this.keyManager.destructor(),this.events&&this.events.clear(),this._events&&this._events.clear(),this.export=this.content=this.selection=null,this._activeFilters=this._filterData=this._scroll=this._touch=this._htmlEvents=this._hiddenFilters=this.config.$subRowCells=null,this.unmount()},e.prototype.setColumns=function(t){var e=this;this._destroyContent(),this.config.columns=t,this._parseColumns(!0),(0,_.isAutoWidth)(this.config)&&this._applyAutoWidth(),this._setSummary(),this._adjustColumns(),this._checkFilters(),this._checkMarks(),this._normalizeSpans(),this.paint(),this.config.keyNavigation&&(0,s.awaitRedraw)().then((function(){e._initHotKey(!0),e.paint()}))},e.prototype.addRowCss=function(t,e){var i=this.data.getItem(t);if(i){var n=i.$css||"";n.match(new RegExp(e,"g"))||(i.$css=n+" ".concat(e),this.paint())}else(0,f.dhxWarning)('Row with id "'.concat(t,'" not found'))},e.prototype.removeRowCss=function(t,e){var i=this.data.getItem(t);if(i){var n=i.$css?i.$css.replace(e,""):"";i.$css=n,this.paint()}else(0,f.dhxWarning)('Row with id "'.concat(t,'" not found'))},e.prototype.addCellCss=function(t,e,i){var n=this.getColumn(e);if(n){n.$cellCss=n.$cellCss||{};var o=n.$cellCss[t];if(o){var r=o.match(new RegExp(i,"g"))?"":" ".concat(i);n.$cellCss[t]+=r}else this.data.getItem(t)&&(n.$cellCss[t]="".concat(i," "));this.paint()}},e.prototype.removeCellCss=function(t,e,i){var n=this.getColumn(e);n&&(n.$cellCss[t]?(n.$cellCss[t]=n.$cellCss[t].replace(i,""),this.paint()):this.data.getItem(t)&&(n.$cellCss[t]=""))},e.prototype.showColumn=function(t){var e=this.getColumn(t);e&&e.hidden&&this.events.fire(y.GridEvents.beforeColumnShow,[e])&&(this._showColumn(e),this.events.fire(y.GridEvents.afterColumnShow,[e]))},e.prototype.hideColumn=function(t){var e=this.getColumn(t);e&&!e.hidden&&this.events.fire(y.GridEvents.beforeColumnHide,[e])&&(this._hideColumn(e),this.events.fire(y.GridEvents.afterColumnHide,[e]))},e.prototype.isColumnHidden=function(t){var e=this.getColumn(t);if(e)return!!e.hidden},e.prototype.showRow=function(t){if((0,d.isDefined)(t)){var e=t.toString(),i=this.data.getItem(e);i&&i.hidden&&this.events.fire(y.GridEvents.beforeRowShow,[i])&&(this.data.update(e,{hidden:!1}),this._checkFilters(!0),this.paint(),this.events.fire(y.GridEvents.afterRowShow,[i]))}},e.prototype.hideRow=function(t){if((0,d.isDefined)(t)){var e=t.toString(),i=this.data.getItem(e);i&&this.events.fire(y.GridEvents.beforeRowHide,[i])&&(this.data.update(e,{hidden:!0}),this._checkFilters(!0),this._checkSelectFilterValue(),this.paint(),this.events.fire(y.GridEvents.afterRowHide,[i]))}},e.prototype.isRowHidden=function(t){if((0,d.isDefined)(t)){var e=this.data.getItem(t.toString());return e?!!e.hidden:void 0}},e.prototype.getScrollState=function(){return{x:this._scroll.left,y:this._scroll.top}},e.prototype.scroll=function(t,e){var i=this.getRootView().refs.grid_body.el.querySelector(".scroll-view")||this.getRootView().refs.grid_body.el;i.scrollLeft=!t&&0!==t||"number"!=typeof t?i.scrollLeft:t,i.scrollTop=!e&&0!==e||"number"!=typeof e?i.scrollTop:e,this.paint()},e.prototype.scrollTo=function(t,e){var i=this.config,n=i.topSplit,o=i.bottomSplit,r=i.columns,a=i.$width,s=i.$height,l=i.$headerHeight,c=r.filter((function(t){return!t.hidden})),u=this.data.getRawData(0,-1,null,2),h=c.findIndex((function(t){return t.id==e})),f=u.findIndex((function(e){return e.id==t}));if((0,d.isDefined)(h)&&(0,d.isDefined)(f)){var p=this.getScrollState(),v=this.selection.getCell(),m=v&&r.findIndex((function(t){return t.id==v.column.id})),b=v&&u.findIndex((function(t){return t.id==v.row.id})),w=(0,x.getCurrFixedCols)(this.config,y.Split.left).length,C=(0,x.getCurrFixedCols)(this.config,y.Split.right).length,S=w&&m<w,E=C&&m>=r.length-C,D=n&&b<n,O=o&&b>=u.length-o,k=(0,_.getTotalWidth)(c.slice(0,h)),M=(0,_.getTotalHeight)(u.slice(0,f)),T=(0,g.getTotalRowHeight)(u[f]);if(w){var R=(0,_.getTotalWidth)((0,x.getCurrFixedCols)(this.config,y.Split.left));(!S&&!E&&h<m||k-p.x-R<0)&&(k-=R)}if(C){var I=(0,_.getTotalWidth)((0,x.getCurrFixedCols)(this.config,y.Split.right));(!S&&!E&&h>m||a+p.x-k-c[h].$width-I<0)&&(k+=I)}if(n){var P=(0,_.getTotalHeight)(u.slice(0,n));(!D&&!O&&f<b||M-p.y-P<0)&&(M-=P)}if(o){var H=(0,_.getTotalHeight)(u.slice(-o));(!D&&!O&&f>b||s+p.y-l-M-T-H<0)&&(M+=H)}var j=a+p.x,F=s+p.y-l,$=M-p.y-T,A=k-p.x-r[h].$width,L=M+2*T+18-F,V=k+2*r[h].$width+18-j,N=$>0&&L<0?0:$<0?$:L,W=A>0&&V<0?0:A<0?A:V;this.scroll(W+p.x,N+p.y)}},e.prototype.adjustColumnWidth=function(t,e){void 0===e&&(e=!0);var i=this.config.columns.filter((function(t){return!t.hidden})),n=i.filter((function(e){return e.id===t})),o=this._adjustColumnsWidth({rows:this.config.data,cols:n,totalCols:i,adjust:e});this.config.$totalWidth=i.reduce((function(t,e){if(o[e.id]){e.$fixedWidth=!0;var i=e.maxWidth,n=e.minWidth,r=o[e.id];e.$width=r,i&&r>i&&(e.$width=i),n&&e.$width<n&&(e.$width=n)}return t+e.$width}),0),this.paint()},e.prototype.getCellRect=function(t,e){var i,n,o=this.config.columns.filter((function(t){return!t.hidden}));(0,d.isDefined)(e)||(e=this.config.columns[0].id);var r=this.data.getRawData(0,-1),a=this.getSpan(t,e),s=o.findIndex((function(t){return t.id==(a?a.column:e)})),l=r.findIndex((function(e){return e.id==(a?a.row:t)})),c=(0,_.getTotalWidth)(o.slice(0,s)),u=(0,_.getTotalHeight)(r.slice(0,l));if("bottom"===this.config.footerPosition&&"auto"!==this.config.height&&this.config.$height>=this.config.$totalHeight&&this.config.bottomSplit){var h=r.slice(-this.config.bottomSplit)||[],f=h.findIndex((function(e){return e.id===t}));if(h.length&&-1!==f){var p=(0,x.calcScrollBarWidth)(this.config,!!(null===(i=this.scrollView)||void 0===i?void 0:i.config.enable));u=this.config.$height-this.config.$footerHeight-this.config.$headerHeight-(0,_.getTotalHeight)(h.slice(f))-p.x-x.BORDERS}}return{x:c,y:u,height:(null==a?void 0:a.rowspan)>1?(0,v.getSpanHeight)(r,a):(0,g.getTotalRowHeight)(r[l])||0,width:(null==a?void 0:a.colspan)>1?(0,v.getWidth)(this.config.columns,a.colspan,this.config.columns.findIndex((function(t){return t.id===a.column}))):(null===(n=o[s])||void 0===n?void 0:n.$width)||0}},e.prototype.getColumn=function(t){for(var e,i=0,n=null===(e=this.config)||void 0===e?void 0:e.columns;i<n.length;i++){var o=n[i];if(o.id==t)return o}},e.prototype.addSpan=function(t){this.config.spans=this.config.spans||[];var e=(0,d.findIndex)(this.config.spans,(function(e){return"".concat(e.row)==="".concat(t.row)&&"".concat(e.column)==="".concat(t.column)}));e>=0?this.config.spans[e]=t:(this.config.spans.push((0,E.normalizeSpan)(t,this.config,this.data)),this._checkMarks(),this.paint())},e.prototype.getSpan=function(t,e){var i,n=this;if(this.config.spans){var o=this.data.getIndex(t.toString()),r=this.config.columns.findIndex((function(t){return t.id===e})),a=(0,d.findIndex)(this.config.spans,(function(t){var e=n.data.getIndex(t.row.toString()),i=n.config.columns.findIndex((function(e){return e.id===t.column})),a=e,s=t.rowspan?e+t.rowspan:e+1,l=i,c=t.colspan?i+t.colspan:i+1;return o>=a&&o<s&&r>=l&&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,s=this.getSpan(o.id,r.id);if(!s||"function"!=typeof s.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==s?void 0:s.text)&&(i=this.config.autoHeight?"textarea":"input")),"number"===r.type)if(!((0,d.isDefined)(null==s?void 0:s.text)&&["input","textarea"].includes(i))&&!["input","select","combobox"].includes(i))return;this.events.fire(y.GridEvents.beforeEditStart,[o,r,i])&&((null===(n=this.config.$editable)||void 0===n?void 0:n.editor)||this.config.$editable&&this.config.$editable.row===t&&this.config.$editable.col===e&&this.config.$editable.editorType===i||(this.config.$editable={row:o.id,col:r.id,isSpan:!!s,editorType:i},this.selection.config.disabled||this.selection.setCell(t.toString(),e.toString()),this.paint(),this.events.fire(y.GridEvents.afterEditStart,[o,r,i])))}}else(0,f.dhxWarning)("item not found")},e.prototype.editEnd=function(t){this.config.$editable&&this.config.$editable.editor&&this.config.$editable.editor.endEdit(t)},e.prototype.getHeaderFilter=function(t){var e=this,i=this.getColumn(t);if(i){var n=null;return i.header.forEach((function(i){i.content&&(n=e.content[i.content].element[t])})),n}},e.prototype.getSummary=function(t){return r(r({},this._commonSummary),t?this._colSummary[t]:{})},e.prototype.getSortingState=function(){var t,e=null===(t=this._sortingStates)||void 0===t?void 0:t[0];return{dir:e.dir,by:e.by}},e.prototype._createView=function(){var t=this;return(0,s.create)({render:function(e,i){return t._destructed?(0,s.el)("div"):(0,b.render)(e,i,t._htmlEvents,t.selection,t._uid)},hooks:this._initHooks()},this)},e.prototype._dragInit=function(){(this.config.dragMode||this.config.dragItem)&&(f.dragManager.setItem(this._uid,this),this._dropManager=new D.DropManager({view:this}),this.config.dragItem||(this.config.dragItem="row"),this.config.dragMode||(this.config.dragMode="both"))},e.prototype._parseColumns=function(t){void 0===t&&(t=!1);var e=this.config.columns.filter((function(t){return!t.hidden}));this.normalizeColumns({config:this.config,columns:e,configChanged:t}),(0,g.countColumns)(this.config,e)},e.prototype.normalizeColumns=function(t){var e,i,n,o=this,r=t.config,a=t.columns,s=t.configChanged;r.$headerHeightMap=[],r.$footerHeightMap=[],r.$headerHeight=r.$footerHeight=0;for(var l=0,c=a;l<c.length;l++){(p=c[l]).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&&!s?p.$width:d,p.$width>p.maxWidth&&(p.$width=p.maxWidth),p.$width<p.minWidth&&(p.$width=p.minWidth)}for(var u=function(t){if(null===(i=t.header)||void 0===i?void 0:i.length){var e=0;t.header.forEach((function(i,n){(e=r.headerAutoHeight?o.getNormalizeContentHeight(i,t,r):r.headerRowHeight)>(r.$headerHeightMap[n]||0)&&(r.$headerHeightMap[n]=Math.max(e,r.headerRowHeight))}))}if(null===(n=t.footer)||void 0===n?void 0:n.length){var a=0;t.footer.forEach((function(e,i){(a=r.footerAutoHeight?o.getNormalizeContentHeight(e,t,r):r.footerRowHeight)>(r.$footerHeightMap[i]||0)&&(r.$footerHeightMap[i]=Math.max(a,r.footerRowHeight))}))}},h=0,f=a;h<f.length;h++){var p;u(p=f[h])}r.$headerHeight=r.$headerHeightMap.reduce((function(t,e){return t+e}),0),r.$footerHeight=r.$footerHeightMap.reduce((function(t,e){return t+e}),0)},e.prototype.getNormalizeContentHeight=function(t,e,i){return this.config.footerRowHeight},e.prototype._parseData=function(){this._detectColsTypes(),this.config.data=this.data.map((function(t){return t})),this.config.data=this._prepareData(this.data),this._checkMarks(),this._applyLocalFilter(),this._checkFilters()},e.prototype._createCollection=function(){this.data=new f.DataCollection(null,this.events)},e.prototype._getRowIndex=function(t){return this.data.getIndex(t)},e.prototype._setHTMLEventHandlers=function(){var t=this,e=function(e){var i,n=t.getColumn((0,c.locate)(e,"data-dhx-col-id")),o=t.data.getItem((0,c.locate)(e,"data-dhx-id"));if(o&&n&&(0,_.isTooltip)(t.config,n)){var a=void 0;if("combobox"===n.editorType||"select"===n.editorType){var s=(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=s instanceof Object?s.value:s}else if("multiselect"===n.editorType){var l=null===(i=o[n.id])||void 0===i?void 0:i.toString().split(", ");if(null==l?void 0:l.length)a=(0,g.getEditorOptions)(n,o).filter((function(t){return l.includes(t instanceof Object?t.id.toString():t)})).map((function(t){return t instanceof Object?t.value:t})).join(", ")}var d=(0,g.applyPattern)(a||o[n.id],n),u=function(){return!!d||"boolean"==typeof d};n.tooltipTemplate?d=n.tooltipTemplate(d,o,n)||null:u()&&n.template&&(d=n.template(d,o,n)),u()&&(0,_.showTooltip)(d,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,n)},(0,_.getTooltipConfig)(t.config,n)))}},i=function(e,i){var n;void 0===i&&(i="header");var o=(0,c.locate)(e,"data-dhx-text-id"),a=(0,c.locate)(e,"data-dhx-id"),s=t.getColumn(a);if(o&&s){var l=null===(n=s[i])||void 0===n?void 0:n.find((function(t){return t.id===o}));if((0,_.isContentTooltip)(t.config,s,l,i)){var d=null==l?void 0:l.text,u=t.getSummary(s.id);"function"==typeof d&&(d=d(u)),"function"==typeof(null==l?void 0:l.tooltipTemplate)&&(d=l.tooltipTemplate(r({value:d},u),l,s)||null),(null==d?void 0:d.toString().length)&&(0,_.showTooltip)(d,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,s,l)},(0,_.getTooltipConfig)(t.config,s,l,i)))}}},n=function(e){var i,n=t.getColumn((0,c.locate)(e,"data-dhx-col-id")),o=t.data.getItem((0,c.locate)(e,"data-dhx-id")),a=t.getSpan(o.id,n.id);if(o&&a&&(0,_.isTooltip)(t.config,a)){var s=t.getSummary(n.id),l=null===(i=("function"==typeof a.text?a.text(s):a.text)||(0,g.applyPattern)(o[n.id],n))||void 0===i?void 0:i.toString();a.tooltipTemplate?l=a.tooltipTemplate(r({value:l},s),a)||null:n.template&&(l=n.template(l,o,n)),l&&(0,_.showTooltip)(l,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,n)},(0,_.getTooltipConfig)(t.config,null,a)))}};this._htmlEvents={onclick:(0,c.eventHandler)((function(t){return(0,c.locate)(t)}),{"dhx_grid-header-cell--sortable":function(e,i){var n=e.target.getAttribute("dhx_resized"),o=t.getColumn(i);if(o&&(0,_.isSortable)(t.config,o)&&!n){var r=(0,c.locate)(e,"data-dhx-text-id"),a=o.header.find((function(t){return t.id===r}));t._sort(i,a.sortAs)}},"dhx_grid-expand-cell":function(e,i){e.target.classList.contains("dhx_grid-expand-cell-icon")&&t.events.fire(y.GridEvents.expand,[i])},"dhx_span-expand-cell":function(e,i){e.target.classList.contains("dhx_span-expand-cell-icon")&&t.events.fire(y.GridEvents.expand,[i])}}),onscroll:function(e){t.events.fire(y.GridEvents.scroll,[{y:e.target.scrollTop,x:e.target.scrollLeft}])},onmouseover:function(t){for(var o=[{className:"dhx_grid-header-cell",action:function(t){return i(t,"header")}},{className:"dhx_grid-footer-cell",action:function(t){return i(t,"footer")}},{className:"dhx_grid-cell",action:e},{className:"dhx_span-cell",action:n}],r=0,a=o;r<a.length;r++){var s=a[r],l=s.className,d=s.action,u=(0,c.locateNodeByClassName)(t,l);if(u){d(u);break}}}}},e.prototype._setEventHandlers=function(){var t=this;this.data.events.on(f.DataEvents.load,(function(){if(t._applyLocalFilter(!0),t._parseData(),t._parseColumns(),t.config.autoEmptyRow){var e=t.data.find({by:"$emptyRow",match:!0});e?t.data.move(e.id,t.data.getLength()-1):t._addEmptyRow()}t.config.data instanceof f.DataCollection?(0,s.awaitRedraw)().then((function(){return t._normalizeSpans()})):t._normalizeSpans(),t.paint()})),this.data.events.on(f.DataEvents.change,(function(e,i,n){if("load"!==i&&"add"!==i&&"remove"!==i)if("setPage"!==i){if("sort"===i?t._setSort():"update"===i?t.config.data=t._prepareData(t.data):((0,f.isTreeCollection)(t.data)?t.config.data=t._prepareData(t.data):t._setSummary(),t._adjustColumns()),(0,d.isId)(e)&&(t._checkFilters(),t._checkSelectFilterValue()),t._detectColsTypes(),t._removeMarks(),t._checkMarks(),t.config.autoEmptyRow&&(!t._activeFilters||(0,d.isEmptyObj)(t._activeFilters))){var o=t.data.find({by:"$emptyRow",match:!0});if(o){if(o.id===e)return;t.data.move(o.id,t.data.getLength()-1)}else t._addEmptyRow()}if("sort"===i)t._normalizeSpans();t._render()}else(0,s.awaitRedraw)().then((function(){var e=t.config.columns.find((function(t){return!0!==t.hidden}));t.scrollTo(t.data.getId(n[0]).toString(),e.id.toString()),t._render()}))})),this.data.events.on(f.DataEvents.filter,(function(e){e||t.data.getRawFilters({permanent:!0})||t._applyLocalFilter(),!e||(0,f.isOnlyPermanentFilters)(e)?(t._filterData=t.data.map((function(t){return t}))||[],t._setUniqueData(),t._clearFilterValue()):t._checkFilters(),t._setSummary(),t._removeMarks(),t._checkMarks(),t._normalizeSpans(),t.paint()})),this.data.events.on(f.DataEvents.removeAll,(function(){t._hiddenFilters={},t.config.columns.map((function(t){t.header.map((function(e){!e.content||"selectFilter"!==e.content&&"comboFilter"!==e.content||(t.$uniqueData=[])}))})),(0,d.isEmptyObj)(t._activeFilters)||t.data.resetFilter(),t._clearFilterValue(!0)})),this.data.events.on(f.DataEvents.afterAdd,(function(e,i,n){i.length===++n&&t._handleRow(e.id,"add")})),this.data.events.on(f.DataEvents.afterRemove,(function(e,i,n){i.length===++n&&t._handleRow(e.id,"remove")})),this.events.on(f.DragEvents.beforeDrag,(function(e,i,n,o){if("row"===o)return!t.data.isGrouped()&&t.events.fire(y.GridEvents.beforeRowDrag,[e,i])})),this.events.on(f.DragEvents.dragStart,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.dragRowStart,[e,i]),t._autoScroll("vertical")})),this.events.on(f.DragEvents.dragIn,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.dragRowIn,[e,i])})),this.events.on(f.DragEvents.dragOut,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.dragRowOut,[e,i])})),this.events.on(f.DragEvents.canDrop,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.canRowDrop,[e,i])})),this.events.on(f.DragEvents.cancelDrop,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.cancelRowDrop,[e,i])})),this.events.on(f.DragEvents.beforeDrop,(function(e,i,n){if("row"===n)return t.events.fire(y.GridEvents.beforeRowDrop,[e,i])})),this.events.on(f.DragEvents.afterDrop,(function(e,i,n){var o,r=e.source,s=e.target,l=e.start;if("row"===n){var c=t.data.getItem(e.start);if(!c||r.some((function(t){return t==s})))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==l})),g=null==f?void 0:f.findIndex((function(t){return t.id==s}));if(p>-1&&g>-1)if((null==r?void 0:r.length)>1){for(var v=[],_=function(t){var e=null==f?void 0:f.findIndex((function(e){return e.id==t})),i=null==f?void 0:f.splice(e,1)[0];v.push(i)},m=0,b=r;m<b.length;m++){_(b[m])}g=null==f?void 0:f.findIndex((function(t){return t.id==s})),g>0&&++g,null==f||f.splice.apply(f,a([g,0],v,!1))}else null==f||f.splice(g,0,null==f?void 0:f.splice(p,1)[0]);t._adjustColumns(),t._checkFilters(),t.paint(),t.events.fire(y.GridEvents.afterRowDrop,[e,i])}})),this.events.on(f.DragEvents.afterDrag,(function(e,i,n){if("row"===n)t.events.fire(y.GridEvents.afterRowDrag,[e,i]),t._normalizeSpans()})),this.events.on(y.GridEvents.dragPanelItemMouseDown,(function(e,i){t._dragProcess(i,t.data.getItem(e))})),this.events.on(y.GridEvents.cellMouseDown,(function(e,i,n){!t.config.dragPanel&&t._dragProcess(n,e,i)})),this._events.on(y.GridSystemEvents.cellTouchMove,(function(e,i,n){t._touch.start&&n.preventDefault(),t._clearTouchTimer()})),this._events.on(y.GridSystemEvents.cellTouchEnd,(function(){t._touch.start=!1,t._clearTouchTimer()})),this.events.on(y.GridEvents.filterChange,(function(e,i,n,o){var r,a,s;if(t.events.fire(y.GridEvents.beforeFilter,[e,i])){if(t.config.autoEmptyRow){var l=t.data.find({by:"$emptyRow",match:!0});l&&t.data.remove(l.id)}t._activeFilters||(t._activeFilters={});var c=t.getColumn(i),d=c.header.filter((function(t){return t.content===n&&void 0!==t.customFilter}))[0];if("comboFilter"===n&&void 0!==e||"comboFilter"!==n&&""!==e){var u=(0,g.getEditorOptions)(c);"combobox"!==c.editorType&&"select"!==c.editorType&&"multiselect"!==c.editorType||!u||(e=Array.isArray(e)?e.map((function(t){var e;return(null===(e=u.find((function(e){return"string"==typeof e?e===t:e.value===t})))||void 0===e?void 0:e.id)||t})):null!==(a=null===(r=u.find((function(t){return"string"==typeof t?t===e:t.value===e})))||void 0===r?void 0:r.id)&&void 0!==a?a:e);t._activeFilters[i]={by:i,match:e,compare:null!==(s=null==d?void 0:d.customFilter)&&void 0!==s?s:function(e){var i=t.getColumn(e);return function(e,o,r,a){return t.content[n].match({val:e,match:o,obj:r,multi:a,col:i})}}(i),multi:"multiselect"===(null==c?void 0:c.editorType)}}else delete t._activeFilters[i];o||t.data.filter(t._activeFilters)}})),this.events.on(y.GridEvents.scroll,(function(e){t._scroll={top:e.y,left:e.x},t.paint()})),this.events.on(y.GridEvents.cellDblClick,(function(e,i,n){e&&((0,c.locateNodeByClassName)(n,"dhx_boolean-cell")||e.hasOwnProperty("$group")||(!1!==i.editable&&t.config.editable||i.editable)&&t.editCell(e.id,i.id,i.editorType))})),this.events.on(y.GridEvents.afterEditEnd,(function(e,i,n){t._afterEditEndProcess(e,i,n)})),this.events.on(y.GridEvents.headerCellMouseDown,(function(e,i,n){var o=n.target.getAttribute("dhx_resized");if(o&&t.events.fire(y.GridEvents.beforeResizeStart,[i,n])&&(0,C.startResize)(t,o.toString(),n,(function(){t.paint(),t.config.$resizing=null,t.events.fire(y.GridEvents.afterResizeEnd,[i,n])})),n.targetTouches){if(t._touch.timeStamp)t._touch.dblDuration>=t._touch.timeStamp-+n.timeStamp.toFixed()&&(n.preventDefault(),t.events.fire(y.GridEvents.headerCellDblClick,[e,i,n])),t._touch.timeStamp=null;else t._touch.timeStamp=+n.timeStamp.toFixed();setTimeout((function(){t._touch.timeStamp=null}),t._touch.dblDuration)}})),this.events.on(y.GridEvents.footerCellDblClick,(function(e,i,n){if(n.targetTouches){if(t._touch.timeStamp)t._touch.dblDuration>=t._touch.timeStamp-+n.timeStamp.toFixed()&&(n.preventDefault(),t.events.fire(y.GridEvents.footerCellDblClick,[e,i,n])),t._touch.timeStamp=null;else t._touch.timeStamp=+n.timeStamp.toFixed();setTimeout((function(){t._touch.timeStamp=null}),t._touch.dblDuration)}})),this.events.on(y.GridEvents.resize,(function(){return t._parseColumns()})),this.events.on(y.GridEvents.afterResizeEnd,(function(e){var i;t.config.columns=null===(i=t.config.columns)||void 0===i?void 0:i.map((function(t){return t.id==e.id&&(t.width=e.$width),t})),t._parseColumns()}))},e.prototype._afterEditEndProcess=function(t,e,i){var n,o;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 a,s;this.config.$editable?(a=this.config.$editable.row,s=this.config.$editable.col):(a=e.id,s=i.id);var l=this.getSpan(a,s);if((0,d.isDefined)(null==l?void 0:l.text)&&(0,d.isDefined)(t))l.text=t.toString();else{var c=this.data.getItem(a);delete c.$emptyRow,(0,d.isDefined)(t)&&this.data.update(a,r(r({},c),((n={})[s]=t,n)))}this.config.$editable=null,this.paint()}},e.prototype._addEmptyRow=function(){var t=this.data.getId(this.data.getLength()-1),e=this.data.getItem(t),i=this.config.columns.filter((function(t){return!t.hidden}));(0,_.isRowEmpty)(e)||this.data.add(i.reduce((function(t,e){return t[e.id]="",t}),{$emptyRow:!0}))},e.prototype._sort=function(t,e,i){void 0===i&&(i=this.config.multiSort);var n=this.getColumn(t),o=this._sortingStates.find((function(e){return e.by==t}));if(this.events.fire(y.GridEvents.beforeSort,[n,"asc"===(null==o?void 0:o.dir)?"desc":"asc"])){var r="asc";(null==o?void 0:o.by)===t&&(r="asc"===o.dir?"desc":"asc");this.data.sort({by:t,dir:r,as:null!=e?e:function(t){return t&&"date"===n.type?(0,x.getNormalizeDateObject)(t,n.dateFormat).getTime():t?"".concat(t):""}},{smartSorting:i}),this.events.fire(y.GridEvents.afterSort,[n,r])}},e.prototype._setSort=function(){var t,e=null===(t=this.data.getSortingStates())||void 0===t?void 0:t[0];this._sortingStates=e&&[e]||[]},e.prototype._clearTouchTimer=function(){this._touch.timer&&(clearTimeout(this._touch.timer),this._touch.timer=null)},e.prototype._checkFilters=function(t){if(void 0===t&&(t=!1),(0,d.isEmptyObj)(this._activeFilters))t&&this.data.resetFilter(),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData();else{var e=this.data.getRawFilters({permanent:!0});this.data.filter(e,{$restore:!0},!0),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData(),this.data.filter(null,{$restore:!0},!0),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData(!0)}},e.prototype._setUniqueData=function(t){var e=this;void 0===t&&(t=!1),this._filterData&&this.config.columns.forEach((function(i){i.header.forEach((function(n){var o;if(!(null===(o=e._activeFilters)||void 0===o?void 0:o[i.id])&&n.content&&("selectFilter"===n.content||"comboFilter"===n.content)){var r=i.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.multiselection})),a=i.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.filter}));if(!t||t&&!a){var s=(0,g.getNormalizeFilterData)(e._filterData,i.id,r,i.editorType),l=(0,g.getEditorOptions)(i);"combobox"!==i.editorType&&"select"!==i.editorType&&"multiselect"!==i.editorType||!l||(s=s.map((function(t){var e=l.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,t?i.$activeFilterData=s:(i.$uniqueData=s,i.$activeFilterData&&delete i.$activeFilterData)}}}))}))},e.prototype._checkSelectFilterValue=function(){var t,e=null===(t=this.content)||void 0===t?void 0:t.selectFilter;if(e)for(var i in e.value){var n=this.getColumn(i),o=e.value[i];n.hidden||!o||n.$uniqueData.includes(o)||e.element[i].clear()}},e.prototype._clearFilterValue=function(t){var e=this;void 0===t&&(t=!1),["selectFilter","inputFilter","dateFilter"].map((function(t){var i;return null===(i=e.content)||void 0===i?void 0:i[t]})).filter((function(t){return t})).forEach((function(i){for(var n in i.value)!i.value[n]||!t&&e.getColumn(n).hidden||i.element[n].clear(!0)}))},e.prototype._adjustColumns=function(){var t=this,e=this.config.columns.filter((function(t){return!t.hidden})),i=[],n=[],o={};if(e.forEach((function(t){(0,d.isDefined)(t.adjust)?t.adjust&&i.push(t):n.push(t)})),i.length||n.length){var a=this.config.data&&this.config.data.length?this.config.data:this.data.map((function(t){return t}));i.forEach((function(i){o=r(r({},o),t._adjustColumnsWidth({rows:a,cols:[i],totalCols:e,adjust:i.adjust}))})),n.length&&(o=r(r({},o),this._adjustColumnsWidth({rows:a,cols:n,totalCols:e})))}this.config.$totalWidth=e.reduce((function(t,e){if(o[e.id]){e.$fixedWidth=!0;var i=e.maxWidth,n=e.minWidth,r=o[e.id];e.$width=r,i&&r>i&&(e.$width=i),n&&e.$width<n&&(e.$width=n)}return t+e.$width}),0)},e.prototype._prepareData=function(t){var e=this;return(this.config.autoHeight||this.config.headerAutoHeight||this.config.footerAutoHeight)&&(this.config.autoHeight=this.config.headerAutoHeight=this.config.footerAutoHeight=!1),this._normalizeDataType(),this._setSummary(),this._adjustColumns(),t.map((function(t){return t.$height=Number(t.height)||e.config.rowHeight,t}))},e.prototype._adjustColumnsWidth=function(t){var e,i,n,o,r=this,a=t.rows,s=t.cols,l=t.adjust,c=void 0===l?this.config.adjust:l,d={};if("header"===c||!0===c){var u=s.filter((function(t){return t.header}));if(y=(0,g.getMaxColsWidth)(this._prepareColumnData(u,"header"),u,{font:"normal 14.4px Arial"},"header"))for(var h=0,f=Object.entries(y);h<f.length;h++){var p=f[h],v=p[0],m=p[1];d=Object.assign(d,((e={})[v]=+m+24+(o=this.getColumn(v),(0,_.isSortable)(r.config,o)?16:0),e))}}if("footer"===c||!0===c){var y;u=s.filter((function(t){return t.footer}));if(y=(0,g.getMaxColsWidth)(this._prepareColumnData(u,"footer"),u,{font:"normal 14.4px Arial"},"footer"))for(var b=0,x=Object.entries(y);b<x.length;b++){var w=x[b];v=w[0],m=w[1];(d[v]&&d[v]<+m+24||!d[v])&&(d=Object.assign(d,((i={})[v]=+m+24,i)))}}if(("data"===c||!0===c)&&(y=(0,g.getMaxColsWidth)(a,s,{font:"normal 14.4px Arial"},"data")))for(var C=0,S=Object.entries(y);C<S.length;C++){var E=S[C];v=E[0],m=E[1];(d[v]&&d[v]<+m+24||!d[v])&&(d=Object.assign(d,((n={})[v]=+m+24,n)))}return d},e.prototype._prepareColumnData=function(t,e){for(var i,n,o,a=[],s=0;s<t.length;s++){for(var l=[],c=t[s],d=0;d<(null==c?void 0:c[e].length);d++){var u={},h=null===(n=null==c?void 0:c[e][d])||void 0===n?void 0:n.text;if(h){"function"==typeof h&&(h=h(this.getSummary(c.id)));var f=null===(o=null==c?void 0:c[e][d])||void 0===o?void 0:o.htmlEnable;u[c.id]=h||"",f&&(u[c.id]=(0,_.removeHTMLTags)(u[c.id]))}else u[c.id]="";l.push(u)}for(var p=0;p<l.length;p++)for(var g=0,v=Object.entries(l[p]);g<v.length;g++){var m=v[g],y=m[0],b=m[1];a[p]=r({},a[p])||{},a[p]=Object.assign(a[p],((i={})[y]=b,i))}}return a},e.prototype._dragStart=function(t){if(this.config.dragMode&&("row"===this.config.dragItem||"both"===this.config.dragItem)&&!this.config.$editable){var e=this.data.getItem((0,c.locate)(t,"data-dhx-id")).id;t.targetTouches&&(this._touch.start=!0),f.dragManager.onMouseDown({event:t,source:[e],itemsForGhost:[this._getRowGhost([e])],type:"row"})}},e.prototype._dragProcess=function(t,e,i){var n=this;if(t.targetTouches){if(this._touch.timer=setTimeout((function(){n._dragStart(t)}),this._touch.duration),this._touch.timeStamp)this._touch.dblDuration>=this._touch.timeStamp-+t.timeStamp.toFixed()&&((!1!==i.editable&&this.config.editable||i.editable)&&this.editCell(e.id,i.id,i.editorType),t.preventDefault(),this.events.fire(y.GridEvents.cellDblClick,[e,i,t])),this._touch.timeStamp=null;else this._touch.timeStamp=+t.timeStamp.toFixed();setTimeout((function(){n._touch.timeStamp=null}),this._touch.dblDuration)}else this._dragStart(t)},e.prototype._getRowGhost=function(t){for(var e,i=this.config,n=i.$totalWidth,o=i.$width,r=this.getRootNode(),a=(0,x.getCurrFixedCols)(this.config,y.Split.left),s=(0,x.getCurrFixedCols)(this.config,y.Split.right),l=(0,x.calcScrollBarWidth)(this.config,!!(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)),d=[],u=function(e){var i=t[e],u=(0,O.getRowNode)(i,r);if(!u)return"continue";var h=n>o-l.y?o-l.y-x.BORDERS:n;if(a.length||s.length){var f=new Array(3);if(f[1]=u,a.length){var p=(0,O.getRowNode)(i,r,"left");h-=p.offsetWidth,f[0]=p}if(s.length){var g=(0,O.getRowNode)(i,r,"right");h-=g.offsetWidth,f[2]=g}var v=document.createElement("div");return v.style.display="flex",f.forEach((function(t){if(t){var e=t.cloneNode(!0);if(t===u){var i=(0,c.getNodeOffset)(t,r).left-(0,_.getTotalWidth)(a)-x.BORDERS/2;v.appendChild((0,O.getVisibleRowNode)(e,h,i))}else e.removeAttribute("aria-rowindex"),e.style.width=t.offsetWidth+"px",v.appendChild(e)}})),{value:v}}var m=u.cloneNode(!0);d.push((0,O.getVisibleRowNode)(m,h,(0,c.getNodeOffset)(u,r).left-x.BORDERS/2))},h=0;h<t.length;h++){var f=u(h);if("object"==typeof f)return f.value}var p=document.createElement("div");return p.style.setProperty("width","initial","important"),d.forEach((function(t){return p.appendChild(t)})),p},e.prototype._initHooks=function(){var t=this;return{didMount:function(){t._canDataParse(!0)&&(t._container||t._applyAutoWidth(),t.data.parse(t.config.data)),t.config.autoWidth&&t._parseColumns(),t.config.keyNavigation&&(t.keyManager&&t.keyManager.destructor(),t.keyManager=new u.KeyManager((function(e,i){return!(i!==t._uid||!t.events.fire(y.GridEvents.beforeKeyDown,[e]))&&(t.events.fire(y.GridEvents.afterKeyDown,[e]),!0)})),t._initHotKey())}}},e.prototype._normalizeDataType=function(){var t=this,e=this.config.columns.reduce((function(t,e){return"number"===e.type&&t.push(e),t}),[]);e.length&&this.data.forEach((function(i){for(var n,o=0,r=e;o<r.length;o++){var a=r[o],s=(0,g.getValueForNumberColumn)(a,i[a.id]);if(Number.isNaN(s)&&!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]!==s&&t.data.update(i.id,((n={})[a.id]=s,n),!0)}}))},e.prototype._applyLocalFilter=function(t){void 0===t&&(t=!1);var e={add:!0,permanent:!0,$local:!0},i=this.data.getRawFilters(),n=Object.keys(i||{}).find((function(t){return i[t].config.$local}));n&&(e.id=n),t?this.data.filter((function(t){return t}),e,!0):this.data.filter((function(t){return t&&!t.hidden}),e,!0)},e.prototype._normalizeSpans=function(){var t,e=this;this.config.spans=null===(t=this.config.spans)||void 0===t?void 0:t.map((function(t){return(0,E.normalizeSpan)(t,e.config,e.data)}))},e.prototype._hideColumn=function(t){t.hidden=!0,this.config.$totalWidth-=t.$width,this._parseColumns(),this.config.data=this._prepareData(this.data);var e=this._activeFilters&&this._activeFilters[t.id];e&&(this._hiddenFilters||(this._hiddenFilters={}),this._hiddenFilters[t.id]=e,delete this._activeFilters[t.id],this._checkFilters()),this._normalizeSpans(),this.paint()},e.prototype._showColumn=function(t){t.hidden=!1,this.config.$totalWidth+=t.$width,this._parseColumns(),this.config.data=this._prepareData(this.data);var e=this._hiddenFilters&&this._hiddenFilters[t.id];e&&(this._activeFilters[t.id]=e,delete this._hiddenFilters[t.id],this._checkFilters(),this._checkSelectFilterValue()),this._normalizeSpans(),this.paint()},e.prototype._setSummary=function(){var t=this,e=this.data.map((function(t){return t})).filter((function(t){return t!=t.$group&&t!=t.$groupSummary}));"tree"===this.config.type&&(e=e.filter((function(e){return!t.data.haveItems(e.id)}))),this.config.summary&&Object.entries(this.config.summary).forEach((function(i){var n=i[0],o=i[1];t._commonSummary[n]=t._applyMethod(o,e)})),this.config.columns.forEach((function(i){var n;if(i.summary){var o=i.id,r=i.summary;t._colSummary[o]||(t._colSummary[o]={}),"string"==typeof r?t._colSummary[o][r]=null===(n=f.methods[r])||void 0===n?void 0:n.call(f.methods,e,o):Object.entries(r).forEach((function(i){var n=i[0],r=i[1];t._colSummary[o][n]=t._applyMethod(r,e,o)}))}}))},e.prototype._init=function(){this.events=new l.EventSystem(this),this._events=new l.EventSystem(this),this._attachDataCollection(),this.export=new p.Exporter({name:"grid",version:this.version,view:this,export:null}),this._setEventHandlers()},e.prototype._applyMethod=function(t,e,i){var n;return"function"==typeof t?t(e):"string"==typeof t&&(null===f.methods||void 0===f.methods?void 0:f.methods[t])?null===f.methods||void 0===f.methods?void 0:f.methods[t](e,i):Array.isArray(t)&&(null===f.methods||void 0===f.methods?void 0:f.methods[null==t?void 0:t[1]])?null===(n=f.methods[t[1]])||void 0===n?void 0:n.call(f.methods,e,t[0]):null},e.prototype._canDataParse=function(t){var e;return void 0===t&&(t=!1),!!((null===(e=this.config.data)||void 0===e?void 0:e.length)&&this.config.data instanceof Array&&this.config.columns)&&(this.config.autoWidth&&this.config.autoHeight?t:!t)},e.prototype._attachDataCollection=function(){if(this.config.data instanceof f.DataCollection)return this.data=this.config.data,this.data.config.collapsed=this.config.collapsed,void(this.config.data=this.data.serialize());this._createCollection()},e.prototype._setMarks=function(t,e){for(var i=[],n=0,o=this.data.map((function(e){return i.push(e[t.id]),{id:e.id,data:e[t.id],row:e}}));n<o.length;n++){var r=o[n],a=e(r.data,i,r.row,t);a&&(t.$cellCss=t.$cellCss||{},t.$cellCss[r.id]+=" "+a)}},e.prototype._checkMarks=function(){var t=this;this.config.columns.map((function(e){var i=e.mark;i&&("function"==typeof i?t._setMarks(e,i):t._setMarks(e,(function(t,e){var n=[];e.forEach((function(t){null!=t&&""!==t&&n.push(parseFloat(t))}));var o=(0,d.getMinArrayNumber)(n),r=(0,d.getMaxArrayNumber)(n);return i.max&&r===parseFloat(t)?i.max:!(!i.min||o!==parseFloat(t))&&i.min})))}))},e.prototype._removeMarks=function(){this.config.columns.forEach((function(t){t.mark&&(t.$cellCss={})}))},e.prototype._detectColsTypes=function(){this.config.columns.forEach((function(t){return t.type?t:t.numberMask?(t.type="number",t):void(t.type||(t.type="string"))}))},e.prototype._destroyContent=function(){for(var t in this.content)"function"==typeof this.content[t].destructor&&this.content[t].destructor()},e.prototype._render=function(){this.paint()},e.prototype._initHotKey=function(t){void 0===t&&(t=!1);var e=(0,S.getKeysHandlers)(this);for(var i in e)this.keyManager.exist(i)||this.keyManager.addHotKey(i,e[i]);if(!t)for(var i in this.config.hotkeys)this.keyManager.addHotKey(i,this.config.hotkeys[i])},e.prototype._normalizeConfig=function(t){return Object.keys(t).forEach((function(e){e.startsWith("$")&&delete t[e]})),t},e.prototype._autoScroll=function(t){var e,i,n,o,r=(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)?null===(i=this.getRootNode())||void 0===i?void 0:i.querySelector(".scroll-view"):null===(n=this.getRootNode())||void 0===n?void 0:n.querySelector(".dhx_grid-body");if(r){var a=null,s=r.getBoundingClientRect(),l=s.top,c=s.bottom,d=s.left,u=s.right,h=s.height,f=s.width,p=30,g=this.config.dragPanel?(null===(o=this.config.dragPanel)||void 0===o?void 0:o.width)||k.defaultDragPanelConfig.width:0,v=function(t,e){t&&r.scrollBy("left"===t?-40:40,0),e&&r.scrollBy(0,"up"===e?-40:40),(t||e)&&(a=setTimeout((function(){v(t,e)}),100))},_=function(e){var i=e.clientX,n=e.clientY,o=null,r=null;switch(t){case"horizontal":i>u-p&&i<u&&n>l&&n<c?o="right":i>d&&i<d+p&&n>l&&n<c&&(o="left");break;case"vertical":n>c-p&&n<c&&i>d-g&&i<u?r="down":n>l&&n<l+p&&i>d-g&&i<u&&(r="up");break;case"auto":i>u-p&&i<u&&n>l&&n<c?o="right":i>d&&i<d+p&&n>l&&n<c&&(o="left"),n>c-p&&n<c&&i>d-g&&i<u?r="down":n>l&&n<l+p&&i>d-g&&i<u&&(r="up")}o||r?a||v(o,r):a&&(clearTimeout(a),a=null)};(f<r.scrollWidth||h<r.scrollHeight)&&(document.addEventListener("pointermove",_),document.addEventListener("pointerup",(function(){document.removeEventListener("pointermove",_),a&&clearTimeout(a)}),{once:!0}))}},e.prototype._applyAutoWidth=function(){var t,e,i=this._container||(null===(t=this.getRootView().node.parent)||void 0===t?void 0:t.el);if(i){var n=(0,b.getElementSizes)(i),o=null===(e=this.scrollView)||void 0===e?void 0:e.config.enable;(0,b.applyAutoWidth)(this.config,n,o)}},e.prototype._handleRow=function(t,e){if((0,d.isId)(t)&&"remove"===e){var i=this.selection.getCells().find((function(e){return e.row.id===t}));i&&this.selection.removeCell(i.row.id,i.column.id)}if(this.config.data=this._prepareData(this.data),(0,d.isId)(t)&&(this._checkFilters(),this._checkSelectFilterValue()),this._detectColsTypes(),this._removeMarks(),this._checkMarks(),this.config.autoEmptyRow&&(!this._activeFilters||(0,d.isEmptyObj)(this._activeFilters))){var n=this.data.find({by:"$emptyRow",match:!0});if(n){if(n.id===t)return;this.data.move(n.id,this.data.getLength()-1)}else this._addEmptyRow()}this._normalizeSpans(),this._render()},e}(h.View);e.Grid=M},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{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof n?i:new n((function(t){t(i)}))).then(a,s)}l((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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(l){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(i=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{i=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},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 s=i(5),l=i(8),c=i(0),d=i(13),u=i(2),h=i(1),f=i(18),p=i(6),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,s.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),l=a.config.columns.filter((function(t){return!t.hidden})),u=a._colSummary;if(!l.length)return{data:[{name:t.tableName||"data",cols:[],rows:[],merged:[],cells:[]}],styles:[]};var h={},g={},_=(0,s.transpose)(l.map((function(t){return(t.header||[]).map((function(e){var i=e.text;return i?(0,s.removeHTMLTags)("string"==typeof i?i||"":i(u[t.id])):""}))}))),y=(0,s.transpose)(l.map((function(t){return(t.footer||[]).map((function(e){var i=e.text;return{text:i?(0,s.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=l.map((function(i,n){var r=i.id,a=i.editorType,l=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"===l){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"===l?("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,s.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=l.indexOf(t);g[t.id]=D;var k="";S&&(k+=" align:".concat(S));var M="";M="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 s=0;s<n;s++)a+=s===n-1?"0":"#";else a+="#";if(r){a+=".";for(s=0;s<r;s++)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(M));if(w.has(T))C.set("col_".concat(D),T);else{if($=(0,s.getStyleByClass)("dhx_grid-cell","dhx_grid-cell",w.get("default"))){var R=n(n({},$),{format:M});S&&(R.align=S),R["font-weight"]=R.bold?"bold":"normal",R.fontSize&&(R.fontSize="".concat(R.fontSize,"px")),w.set(T,{css:n(n({},w.get("default").css),R),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,l=void 0===a?0:a;if(l||r){var d=O.length+_.length+i;x.push({from:{row:d,column:D},to:{row:d+(r?r-1:0),column:D+(l?l-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,s.removeHTMLTags)(h)});var f=M||(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,s.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 l=e;x.push({from:{row:l,column:D},to:{row:l+(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,s.getStyleByClass)(c,"dhx_grid-header-cell",w.get("default"));if(u){var h=n(n({},u),{format:M});(t.align||S)&&(h.align=t.align||S),w.set(d,{css:n(n({},w.get("default").css),h),index:w.size})}}C.set("header_".concat(D,"_").concat(e),d)})),m){var P="dhx_grid-cell ".concat(m[I].trim()," ").concat(k),H=v(P),j="dhx_grid-row";if(E[I]&&(j+=" ".concat(E[I].trim())),!w.has(H))if($=(0,s.getStyleByClass)(P,j,w.get("default"))){R=n(n(n({},w.get("default").css),$),{format:M});S&&(R.align=S),R["font-weight"]=R.bold?"bold":"normal",R.fontSize&&(R.fontSize="".concat(R.fontSize,"px")),w.set(H,{css:n({},R),index:w.size})}w.has(H)&&C.set("".concat(h[I],"_").concat(D),H)}for(var I in E)if(!(m||{})[I]){var F="".concat(E[I]," format:").concat(M);S&&(F+=" align:".concat(S));var $,A=v(F);j="dhx_grid-row ".concat(E[I].trim());if(!w.has(A))if($=(0,s.getStyleByClass)("dhx_grid-cell",j,w.get("default"))){R=n(n(n({},w.get("default").css),$),{format:M});S&&(R.align=S),R["font-weight"]=R.bold?"bold":"normal",R.fontSize&&(R.fontSize="".concat(R.fontSize,"px")),w.set(A,{css:n({},R),index:w.size})}w.has(A)&&C.set("".concat(h[I],"_").concat(D),A)}},M=0,T=l;M<T.length;M++){k(T[M])}var R=[];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",R.push(n(n({},e),{id:t.index.toString()}))})),R[0].format="#";var I=[];if(_.length){var P=_.map((function(t,e){return t.map((function(t,i){var n=C.get("header_".concat(i,"_").concat(e))||C.get("col_".concat(i))||"default";return{v:""===t?null:t,s:w.get(n).index}}))}));I.push.apply(I,P)}var H=O.map((function(t,e){return t.map((function(t,i){var n=C.get("".concat(e,"_").concat(i))||C.get("col_".concat(i))||"default";return{v:""===t?null:t,s:w.get(n).index}}))}));if(I.push.apply(I,H),y.length){var j=y.map((function(e,i){return e.map((function(e,n){var o,r=e.text,a=e.content,s=e.col_id,l="string"==typeof a,c=a&&(o=u[s],Object.values(o)[0]==r),d=C.get("footer_".concat(n,"_").concat(i))||C.get("col_".concat(n))||"default";return{v:a&&l&&c?m({func:a,startRow:_.length+1,col:n,rowsCount:H.length,functionsMap:t.mapToExcelFormulas}):""===r?null:r,s:w.get(d).index}}))}));I.push.apply(I,j)}if(null===(i=e.spans)||void 0===i?void 0:i.length){var F=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,F)}return a.destructor(),{data:[{name:t.tableName||"data",cells:I,cols:b,rows:D,merged:x}],styles:R}},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 s=r.data.blob;(0,c.downloadFile)(s,"".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,s.transpose)(o.map((function(t){return(t.header||[]).map((function(t){return(0,s.removeHTMLTags)("".concat(t.text||" "))}))})));return h=h.map((function(t){return t.splice.apply(t,a([0,1],u,!1)),t})),new l.CsvDriver(t).serialize(h,!0)+t.rowDelimiter+d},e.prototype._getCSV=function(t,e){var i=this._getExportData(t,e),n=new l.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 s="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===s?r="".concat((0,u.getPageLinksCss)(),"<style>").concat((0,u.getPageInlineCss)(),"</style>"):Array.isArray(s)&&s.length&&(r="".concat((0,u.getPageLinksCss)(s)));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,l.dhxError)("HTTP error, status: ".concat(t.status)),t.blob()})).then((function(n){var r,s=document.createElement("a");s.href=URL.createObjectURL(n),s.download="".concat(e.name||"grid",".").concat(i),s.click(),URL.revokeObjectURL(s.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,l.dhxWarning)("There is no data to export"),(null===(o=r.columns)||void 0===o?void 0:o.length)||(0,l.dhxWarning)("There is no column for export");var a=new this._grid.constructor(t,(0,c.getCloneObject)(r)),s=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=s,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,s="".concat(_(n)).concat(i,":").concat(_(n)).concat(o+i-1),l={sum:"=SUM(".concat(s,")"),avg:"=AVERAGE(".concat(s,")"),count:"=COUNT(".concat(s,")"),max:"=MAX(".concat(s,")"),min:"=MIN(".concat(s,")")};return Object.entries(a).forEach((function(t){var e=t[0],i=t[1];l[e]="=".concat(i,"(").concat(s,")")})),l[e]}e.Exporter=g}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(84),e),o(i(85),e),o(i(86),e),o(i(87),e),o(i(26),e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.message=void 0;var n=i(0),o=i(2),r=i(26),a=new WeakMap,s=new Map;function l(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=s.get(d);u?u[t.position]||(u[t.position]={stack:[],container:l(d,t.position)}):s.set(d,((e={})[t.position]={stack:[],container:l(d,t.position)},e));var h=s.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=s.get(o);if(r){var l=r[n];if(l){var c=l.stack,d=c.indexOf(t);-1!==d&&(i.removeChild(t),c.splice(d,1),0===c.length&&o.removeChild(i))}}}(i,t),i=null)}if(0===f.length&&d.appendChild(p),f.push(i),p.appendChild(i),t.expire){var v=setTimeout((function(){return g(!1)}),t.expire);a.set(i,v)}return i.onclick=function(){return g()},{close:function(){return g()}}}},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.alert=void 0;var n=i(38),o=i(39),r=i(0);e.alert=function(e){var i=e.buttons&&e.buttons[0]?e.buttons[0]:n.default.apply,a=(0,o.blockScreen)(e.blockerCss);return new t((function(t){var n="dhx_alert__".concat((0,r.uid)(),"_content"),o="dhx_alert__".concat((0,r.uid)(),"_header"),s=document.createElement("div");s.setAttribute("role","alert"),s.setAttribute("aria-modal","true"),e.text&&s.setAttribute("aria-describedby",n),e.header&&s.setAttribute("aria-labelledby",o),s.className="dhx_widget dhx_alert "+(e.css||"");var l=function(e){"Escape"!==e.key&&"Esc"!==e.key||(c(e),t(!1))};function c(t){t.preventDefault(),a(),document.body.removeChild(s),document.removeEventListener("keydown",l)}s.innerHTML="\n\t\t\t".concat(e.header?"<div id=".concat(o,' class="dhx_alert__header"> ').concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t\t").concat(e.text?"<div id=".concat(n,' class="dhx_alert__content">').concat(!1!==e.htmlEnable?e.text:"","</div>"):"",'\n\t\t\t<div class="dhx_alert__footer ').concat(e.buttonsAlignment?"dhx_alert__footer--"+e.buttonsAlignment:"",'">\n\t\t\t\t<button type="button" aria-label="confirm" class="dhx_alert__apply-button dhx_button dhx_button--view_flat dhx_button--color_primary dhx_button--size_medium">').concat(i,"</button>\n\t\t\t</div>"),!1===e.htmlEnable&&(e.header&&(s.querySelector("#".concat(o)).textContent=e.header),e.text&&(s.querySelector("#".concat(n)).textContent=e.text)),document.body.appendChild(s),s.querySelector(".dhx_alert__apply-button").focus(),s.querySelector("button").addEventListener("click",(function(e){c(e),t(!0)})),document.addEventListener("keydown",l)}))}}).call(this,i(9))},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.confirm=void 0;var n=i(38),o=i(39),r=i(0);e.confirm=function(e){e.buttonsAlignment=e.buttonsAlignment||"right";var i=e.buttons&&e.buttons[1]?e.buttons[1]:n.default.apply,a=e.buttons&&e.buttons[0]?e.buttons[0]:n.default.reject,s=(0,o.blockScreen)("dhx_alert__overlay-confirm "+(e.blockerCss||""));return new t((function(t){var n=document.createElement("div");n.setAttribute("role","alertdialog"),n.setAttribute("aria-modal","true");var o,l=e.header&&(0,r.uid)(),c=e.header&&(0,r.uid)();c&&n.setAttribute("aria-describedby",c),l&&n.setAttribute("aria-labelledby",l);var d=function(e){s(),n.removeEventListener("click",u),document.removeEventListener("keydown",h),document.body.removeChild(n),t(e)},u=function(t){"BUTTON"===t.target.tagName&&d(t.target.classList.contains("dhx_alert__confirm-aply"))},h=function(t){"Escape"===t.key||"Esc"===t.key?(n.querySelector(".dhx_alert__confirm-aply").focus(),d(t.target.classList.contains("dhx_alert__confirm-reject"))):"Tab"===t.key&&("aply"===o?(o="reject",n.querySelector(".dhx_alert__confirm-reject").focus()):(o="aply",n.querySelector(".dhx_alert__confirm-aply").focus()),t.preventDefault())};n.className="dhx_widget dhx_alert dhx_alert--confirm"+(e.css?" "+e.css:""),n.innerHTML="\n\t\t".concat(e.header?'<div class="dhx_alert__header" id='.concat(l,"> ").concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t").concat(e.text?'<div class="dhx_alert__content" id='.concat(c,">").concat(!1!==e.htmlEnable?e.text:"","</div>"):"",'\n\t\t\t<div class="dhx_alert__footer ').concat(e.buttonsAlignment?"dhx_alert__footer--"+e.buttonsAlignment:"",'">\n\t\t\t\t<button type="button" aria-label="reject" class="dhx_alert__confirm-reject dhx_button dhx_button--view_link dhx_button--color_primary dhx_button--size_medium">').concat(a,'</button>\n\t\t\t\t<button type="button" aria-label="aply"class="dhx_alert__confirm-aply dhx_button dhx_button--view_flat dhx_button--color_primary dhx_button--size_medium">').concat(i,"</button>\n\t\t\t</div>"),!1===e.htmlEnable&&(e.header&&(n.querySelector("#".concat(l)).textContent=e.header),e.text&&(n.querySelector("#".concat(c)).textContent=e.text)),document.body.appendChild(n),o="aply",n.querySelector(".dhx_alert__confirm-aply").focus(),n.addEventListener("click",u),document.addEventListener("keydown",h)}))}}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.disableTooltip=e.enableTooltip=e.tooltip=e.getZIndex=e.findPosition=void 0;var o=i(2),r=i(26),a=750,s=200;function l(t,e,i,n,o,a){var s,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:s=r.RealPosition.center};case r.Position.right:return s=r.RealPosition.right,(c=t.right+window.pageXOffset+o)+i>window.innerWidth+window.pageXOffset?l(t,r.Position.left,i,n,o,++a):{left:c,top:d,pos:s};case r.Position.left:return s=r.RealPosition.left,(c=window.pageXOffset+t.left-i-o)<0?l(t,r.Position.right,i,n,o,++a):{left:c,top:d,pos:s};case r.Position.top:return s=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?l(t,r.Position.bottom,i,n,o,++a):{left:c,top:d=window.pageYOffset+t.top-n-o,pos:s};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),s=r.RealPosition.bottom,(d=window.pageYOffset+t.bottom+o)+n>window.innerHeight+window.pageYOffset?l(t,r.Position.top,i,n,o,++a):{left:c,top:d,pos:s}}}e.findPosition=l;var c=document.createElement("div"),d=document.createElement("span");d.className="dhx_tooltip__text",c.appendChild(d),c.setAttribute("role","tooltip"),c.style.position="absolute";var u,h=null,f=!1,p=null,g=null;function v(t){return t&&(t.classList.contains("dhx_popup--window")&&t.classList.contains("dhx_popup--window_active")||t.classList.contains("dhx_popup--window_modal")||t.classList.contains("dhx_popup"))?1e7:(null==t?void 0:t.classList.contains("dhx_popup--window"))?9999999:t&&t.offsetParent?v(t.offsetParent):null}function _(t,e,i,n,o,a,s){void 0===n&&(n=""),void 0===o&&(o=!1),void 0===a&&(a=8);var u=t.getBoundingClientRect();s?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=l(u,i,h.width,h.height,a),g=p.left,_=p.top,m=p.pos,y=v(t);switch(y&&(c.style.zIndex=y.toString()),m){case r.RealPosition.bottom:case r.RealPosition.top:case r.RealPosition.left:case r.RealPosition.right:case r.RealPosition.center:c.style.left=g+"px",c.style.top=_+"px"}c.className+=" dhx_tooltip--".concat(m),f=!0,o||setTimeout((function(){c.className+=" dhx_tooltip--animate"}))}function m(t,e,i){var n=i.force,o=i.showDelay,l=i.hideDelay,d=i.position,v=i.css,m=i.htmlEnable,y=i.margin;n||(g=setTimeout((function(){_(t,e,d||r.Position.bottom,v,!1,y,m)}),o||a));var b=function(){var e;f&&(e=l,h&&(p=setTimeout((function(){document.body.removeChild(c),f=!1,p=null}),e||s))),clearTimeout(g),t.removeEventListener("mouseleave",b),t.removeEventListener("blur",b),document.removeEventListener("mousedown",b),h=null,u=null};n&&_(t,e,d,v,n,y,m),t.addEventListener("mouseleave",b),t.addEventListener("blur",b),document.addEventListener("mousedown",b),u=b}function y(t,e){var i=(0,o.toNode)(e.node);i!==h&&(u&&(u(),u=null),h=i,p?(clearTimeout(p),p=null,m(i,t,n(n({},e),{force:!0}))):m(i,t,e))}function b(t){var e=(0,o.locateNode)(t,"dhx_tooltip_text");e&&y(e.getAttribute("dhx_tooltip_text"),{position:e.getAttribute("dhx_tooltip_position")||r.Position.bottom,node:e})}e.getZIndex=v,e.tooltip=y,e.enableTooltip=function(){document.addEventListener("mousemove",b)},e.disableTooltip=function(){document.removeEventListener("mousemove",b)}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=e.GridSelectionEvents=void 0;var r,a=i(1),s=i(8),l=i(0),c=i(4),d=i(3),u=i(17),h=i(7),f=i(5),p=i(15),g=i(6);!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.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,s,l,c,d,h,f,p,g,v,_,m,y=this;void 0===i&&(i=!1),void 0===n&&(n=!1);var b="tree"===this._grid.config.type;if(this._gridId&&u.focusManager.getFocusId()!==this._gridId&&u.focusManager.setFocusId(this._gridId),"row"===this.config.type&&(null===(l=this._selectedCells[0])||void 0===l?void 0:l.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(){y._grid.paint(),y._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===(p=this._selectedCell)||void 0===p?void 0:p.row,null===(g=this._selectedCell)||void 0===g?void 0:g.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&&!b&&o([],this._selectedCells,!0).forEach((function(t,e){var i=t.row,n=t.column;e>0&&y.removeCell(i.id,n.id)}))}t=this._grid.data.getItem(t&&t.id||t);var x=null===(_=null===(v=this._grid.config)||void 0===v?void 0:v.columns)||void 0===_?void 0:_.filter((function(t){return!t.hidden}));if(e||(e=null==x?void 0:x[0]),(e=this._grid.getColumn(e.id||e))&&t){if(this.config.multiSelection&&n&&this._selectedCells.length&&!b){var w=null===(m=this._selectedCells)||void 0===m?void 0:m[0],C=this._grid.data.getIndex(w.row.id),S=this._grid.data.getIndex(t.id);if(C>S&&(C=(r=[S,C])[0],S=r[1]),"cell"===this.config.type||"complex"===this.config.type){var E=x.map((function(t){return t.id})),D=E.indexOf(w.column.id),O=E.indexOf(e.id);if(-1!==D&&-1!==O){D>O&&(D=(s=[O,D])[0],O=s[1]);var k=x.slice(D,O+1);this._grid.data.mapRange(C,S,(function(t){k.forEach((function(e){-1===y._findIndex({row:t,column:e})&&y._setCell(t,e)}))}))}}else this._grid.data.mapRange(C,S,(function(t){-1===y._findIndex({row:t,column:e})&&y._setCell(t,e)}))}else this._setCell(t,e);(0,a.awaitRedraw)().then((function(){y._grid.paint(),y._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.toHTML=function(){var t=this;if(!this._isUnselected()){if(this.config.multiSelection){var e=[],i={};return this._selectedCells.forEach((function(n,o,r){var a=(0,p.normalizeCell)(n,t._grid);e.push(t._toHTML(a.row,a.column,o===r.length-1||"cell"===t.config.type||"complex"===t.config.type,i[n.row.id])),i[n.row.id]=!0})),e}var n=(0,p.normalizeCell)(this._selectedCell,this._grid);return this._toHTML(n.row,n.column,!0)}},t.prototype.isSelectedCell=function(t,e){var i=this;return!!this._selectedCells.find((function(n){return"row"===i.config.type?n.row.id===((null==t?void 0:t.id)||t):n.row.id===((null==t?void 0:t.id)||t)&&n.column.id===((null==e?void 0:e.id)||e)}))},t.prototype._setCell=function(t,e){t&&e&&(0,l.isDefined)(t.id)&&(0,l.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._selectedCells=[this._selectedCell],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,l.isDefined)(t.id)&&(0,l.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._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),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(s.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 s.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,l.isId)(o)&&(t.setCell(o),t._grid.paint())}})),this._grid.data.events.on(s.DataEvents.removeAll,(function(){t._removeCells()})),this._grid.data.events.on(s.DataEvents.load,(function(){t._removeCells(!0)}))},t.prototype._toHTML=function(t,e,i,n){var o,r,s,c,u,p,v,_,m,y,b,x,w;void 0===i&&(i=!1),void 0===n&&(n=!1);var C=this._grid.data.getRawData(0,-1,null,2);if(-1===(0,l.findIndex)(C,(function(e){return e.id==t.id})))return null;var S=this._grid.config,E=S.topSplit,D=S.bottomSplit,O=S.$totalWidth,k=S.$totalHeight,M=S.columns,T=null==M?void 0:M.filter((function(t){return!t.hidden})),R={left:(0,h.getCurrFixedCols)(this._grid.config,d.Split.left),right:(0,h.getCurrFixedCols)(this._grid.config,d.Split.right)},I=this._grid.data.getLength(),P={top:E?this._grid.data.getRawData(0,E):[],bottom:D?this._grid.data.getRawData(I-D,I):[]},H={left:null===(o=null==R?void 0:R.left)||void 0===o?void 0:o.map((function(t){return t.id})),right:null===(r=null==R?void 0:R.right)||void 0===r?void 0:r.map((function(t){return t.id}))},j={top:P.top.map((function(t){return t.id})),bottom:P.bottom.map((function(t){return t.id}))},F=null===(s=null==R?void 0:R.left)||void 0===s?void 0:s.reduce((function(t,e){return t+(e.$width||0)}),0),$=null===(c=null==R?void 0:R.right)||void 0===c?void 0:c.reduce((function(t,e){return t+(e.$width||0)}),0),A=P.top.reduce((function(t,e){return t+(0,g.getTotalRowHeight)(e)}),0),L=P.bottom.reduce((function(t,e){return t+(0,g.getTotalRowHeight)(e)}),0),V=this._grid.getCellRect(t.id,e.id);t.$subRowHeight&&t.$opened&&(V.height=V.height-t.$subRowHeight);var N,W,z,B,G=this._grid.getScrollState(),Y=V.y,X=null===(u=j.top)||void 0===u?void 0:u.includes(t.id),U=null===(p=H.left)||void 0===p?void 0:p.includes(e.id),q=R.left.length&&F>V.x-G.x,K=P.top.length&&A>V.y-G.y,J=V.width,Z=V.height,Q=null,tt=null,et=q?F+G.x:V.x;if(q&&(J-=(U?(0,f.getTotalWidth)(R.left.slice(0,T.indexOf(e))):F)-(V.x-G.x)),K&&(Z-=(X?(0,f.getTotalHeight)(P.top.slice(0,C.indexOf(t))):A)-(V.y-G.y)-1,Y+=V.height-Z),X)if(Y=V.y+G.y,(nt=this._grid.getSpan(t.id,e.id))&&nt.rowspan>1){var it=C.indexOf(t);Q=(0,f.getTotalHeight)(P.top.slice(it,it+nt.rowspan))}else Z=E===j.top.indexOf(t.id)+1?V.height-1:V.height;if(U)if(et=V.x+G.x,(nt=this._grid.getSpan(t.id,e.id))&&nt.colspan>1){it=null==T?void 0:T.indexOf(e);tt=(0,f.getTotalWidth)(R.left.slice(it,it+nt.colspan))}else J=R.left.length===H.left.indexOf(e.id)+1?V.width-1:V.width;if((null===(v=R.right)||void 0===v?void 0:v.length)||D){var nt=this._grid.getSpan(t.id,e.id),ot=(0,g.getReverseScrollState)(this._grid);if((null===(_=R.right)||void 0===_?void 0:_.length)&&(N=(null===(m=H.right)||void 0===m?void 0:m.includes(e.id))||nt&&T.indexOf(e)+(nt.colspan||1)>T.length-R.right.length,(W=O-$<ot.x+V.x+V.width)&&!N&&(J-=ot.x+V.x+V.width-O+$),N))if(nt&&!(null===(y=H.right)||void 0===y?void 0:y.includes(nt.column))){it=T.length-T.indexOf(e)-(nt.colspan||1);var rt=O-$;et=V.x+ot.x<rt+1?V.x:rt-ot.x+1,tt=(0,f.getTotalWidth)(it?R.right.slice(0,-it):R.right)-1,J=V.width-ot.x}else{var at=(null===(b=H.right)||void 0===b?void 0:b.indexOf(e.id))?0:1;et=V.x-ot.x+at,J=V.width-at}if(D&&(z=j.bottom.includes(t.id)||nt&&C.indexOf(t)+(nt.rowspan||1)>C.length-D,(B=k-L<ot.y+V.y+V.height)&&!z&&(Z-=ot.y+V.y+V.height-k+L),z))if(nt&&!j.bottom.includes(nt.row)){var st=k-L;at=(it=C.length-C.indexOf(t)-(nt.rowspan||1))?0:1;Y=V.y+ot.y<st?V.y:st-ot.y,Q=(0,f.getTotalHeight)(it?P.bottom.slice(0,-it):P.bottom)-at,Z=V.height-ot.y-at}else Y=V.y-ot.y,Z=V.height-(D===j.bottom.indexOf(t.id)+1?1:0)}var lt=null;"row"!==this.config.type&&"complex"!==this.config.type||n||(lt=(0,a.el)(".dhx_grid-selected-row",{style:{width:(null===(x=R.left)||void 0===x?void 0:x.length)?O-G.x:O,height:Z,minHeight:Q,minWidth:tt,display:Z<0&&!Q?"none":"flex",top:Y,left:(null===(w=R.left)||void 0===w?void 0:w.length)?G.x:0,position:"absolute"}}));var ct=null;return"cell"!==this.config.type&&"complex"!==this.config.type||!i||(ct=(0,a.el)(".dhx_grid-selected-cell",{style:{width:J,height:Z,top:Y,minHeight:Q,minWidth:tt,left:et,position:"absolute",display:J<0&&!tt||Z<0&&!Q?"none":"flex",borderLeft:q&&!U?"none":null,borderRight:W&&!N?"none":null,borderTop:K&&!X?"none":null,borderBottom:B&&!z?"none":null}})),(0,a.el)(".dhx_grid-selection",{style:{zIndex:20}},[lt,ct])},t.prototype._isUnselected=function(){return!this._selectedCell||!this._selectedCell.row||!this._selectedCell.column||0===this._selectedCells.length},t.prototype._findIndex=function(t){var e=this;void 0===t&&(t=this._selectedCell);var i=-1;return this._selectedCells.some((function(n,o){if("cell"===e.config.type||"complex"===e.config.type){if((0,l.compare)(n.row,t.row)&&(0,l.compare)(n.column,t.column))return i=o,!0}else if("row"===e.config.type&&(0,l.compare)(n.row,t.row))return i=o,!0})),i},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(6),s=i(5),l=i(3),c=i(19),d=i(54),u=i(55),h=i(0),f=i(7),p=i(115),g=i(116),v=i(117),_=i(20);function m(t,e,i,n){var o=void 0===i?[0,0]:i,r=o[0],a=o[1],s=t[0],l=t[1],c=e[0],d=e[1];return c<=s&&s<=d||c<=l&&l<=d||s<=c&&d<=l||s<r||a&&l>=n-a}function y(t,e,i){var o=t.config,r=o.spans,s=void 0===r?[]:r,c=o.columns,d=o.leftSplit,u=void 0===d?0:d,h=o.topSplit,p=void 0===h?0:h,v=o.rightSplit,_=void 0===v?0:v,y=o.bottomSplit,b=void 0===y?0:y,x=c.filter((function(t){return!t.hidden})),w=(0,a.calculateVisibleRange)(i,t._scroll,o,e),C=x.slice(w.xStart,w.xEnd),S=e.slice(w.yStart,w.yEnd),E=s.filter((function(t){var i;if(!(null===(i=t.$renderFrom)||void 0===i?void 0:i.length))return!1;var n=m(t.$rowsVisibility,[w.yStart,w.yEnd],[p,b],e.length),o=m(t.$colsVisibility,[w.xStart,w.xEnd],[u,_],c.length);return n&&o})),D={left:(0,f.getCurrFixedCols)(o,l.Split.left),right:(0,f.getCurrFixedCols)(o,l.Split.right)},O={top:e.slice(0,o.topSplit||0),bottom:o.bottomSplit?e.slice(-o.bottomSplit):[]};return t.config.$subRowCells&&(0,g.setSubRowCell)(t,S),n(n({},o),{data:e,columns:o.columns,scroll:t._scroll,$positions:w,headerHeight:o.$headerHeight,footerHeight:o.$footerHeight,firstColId:x[0]&&x[0].id,events:t.events,_events:t._events,filteredColumns:x,currentColumns:C,currentRows:S,currentSpans:E,fixedColumns:D,fixedRows:O,sort:t._sortingStates,content:t.content,gridId:t._uid,commonSummary:t._commonSummary,colSummary:t._colSummary,dropManager:t._dropManager,blockSelection:t.block,$renderFrom:"render"})}function b(t){if(t&&(t.tagName||(t=t._parent._container),t)){var e=t.currentStyle||window.getComputedStyle(t),i=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)||0,n=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)||0;return{width:t.clientWidth-i,height:t.clientHeight-n}}}function x(t,e,i){void 0===i&&(i=!1);var r,a=(0,c.getCells)(t),l=t.filteredColumns,d=t.$resizing,u=t.$totalHeight,p=t.$totalWidth,v=t.leftSplit,_=t.data,m=t.$positions,y=t.$scrollBarWidth,b=(0,c.getSpans)(t);if(d){var x=(0,h.findIndex)(l,(function(t){return t.id===d})),w=(0,s.getTotalWidth)(l.slice(0,x))+l[x].$width;r=(0,o.el)(".dhx_grid-resize-line",{style:{top:0,left:w,height:u}})}var C=t.dropManager?t.dropManager.toHTML():null,S=t.blockSelection?t.blockSelection.toHTML():null,E=t.selection?t.selection.toHTML():null;E="string"==typeof E?(0,o.el)("div.dhx_selection",{".innerHTML":E}):E;var D,O=m,k=i?t.$height-t.$footerHeight-t.$headerHeight-y.x-(t.$footer?1:0)-f.BORDERS:u;return(0,o.el)(".dhx_data-wrap",{style:{height:k,width:p,"padding-left":e.x,"padding-top":e.y},role:"presentation","data-dhx-drop-area":"row"},[(0,o.el)(".dhx_grid_data".concat(v?".dhx_grid_fixed_left":""),n(n({_flags:o.KEYED_LIST},(0,c.getHandlers)(O.yStart,O.xStart,t)),(D=_.length,{role:"rowgroup","aria-rowcount":D})),a),(0,g.getSubRowContent)(t),(0,o.el)(".dhx_span-spans",n({role:"presentation"},(0,c.getHandlers)(O.yStart,O.xStart,t)),b),(0,o.el)(".dhx_grid_selection",{_ref:"selection","aria-hidden":"true"},[].concat(E,r)),C,S])}function w(t,e,i){var n=i.height-f.BORDERS;return n=e?n:n-t.headerHeight,t.$footer?e?n:n-t.footerHeight:n}function C(t,e,i){void 0===i&&(i=!1);var n=!i&&t.$totalHeight>=e.height-(t.$headerHeight||0)?(0,r.getScrollbarWidth)():0,o=e.width-f.BORDERS-n;if(!(o<0)){var a=(t.columns||[]).filter((function(t){return!t.hidden})),l=[],c=[],d=!1;a.forEach((function(e){e.width||e.$fixedWidth||!(0,s.isAutoWidth)(t,e)?l.push(e):c.push(e)}));do{d=!1;for(var u=c.reduce((function(t,e){return t+(e.gravity||1)}),0),h=(0,s.getTotalWidth)(l),p=function(t){var e=o>h?(o-h)*((t.gravity||1)/u):0,i=t.minWidth&&e<t.minWidth,n=t.maxWidth&&e>t.maxWidth;if(i||n)return d=!0,t.$width=i?t.minWidth:t.maxWidth,c=c.filter((function(e){return e.id!=t.id})),l.push(t),"break";t.$width=e},g=0,v=c;g<v.length;g++){if("break"===p(v[g]))break}}while(d)}}e.getRenderConfig=y,e.getElementSizes=b,e.applyAutoWidth=C,e.render=function(t,e,i,r,a){var h=b(e._container);t&&t.node&&t.node.parent&&t.node.parent.el&&(h=b(t.node.parent.el));var p=e.config;if(!p)return(0,o.el)("div");if(!p.columns.length)return(0,o.el)(".dhx_grid",{"data-dhx-widget-id":a,"data-dhx-root-id":p.rootParent,"data-dhx-drop-area":"common",role:"empty-grid"});var g=e.data.getRawData(0,-1,null,2);p.columns.reduce((function(t,e){return e.hidden?t:e.hidden}),!0)?p.$totalHeight=0:p.$totalHeight=g.reduce((function(t,e){return t+(e.$height||0)}),0);var v={width:(p.width&&"number"==typeof p.width?p.width:null==h?void 0:h.width)||0,height:(p.height&&"number"==typeof p.height?p.height:null==h?void 0:h.height)||0};(0,s.isAutoWidth)(p)&&(C(p,v),p.$totalWidth=(0,s.getTotalWidth)(p.columns.filter((function(t){return!t.hidden})))),p.$width=v.width,p.$height=v.height;var _=y(e,g,v);_.selection=r,_.datacollection=e.data;var m=(0,c.getShifts)(_);_.$scrollBarWidth=(0,f.calcScrollBarWidth)(_);var S,E,D,O,k=(0,s.isCssSupport)("position","sticky"),M=w(_,k,v),T={wrapper:v,sticky:k,shifts:m,gridBodyHeight:M,footerAtBottom:!1},R=(0,u.getFixedRows)(_,n(n({},T),{name:"header",position:"top"})),I=_.$footer?(0,u.getFixedRows)(_,n(n({},T),{name:"footer",position:"bottom"})):null,P=_.$totalWidth+f.BORDERS<v.width?"dhx_grid-less-width":"",H=_.$totalHeight+f.BORDERS<v.height?"dhx_grid-less-height":"",j=_.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",F=p.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"";if(!t.node){var $=e.getScrollState(),A=$.x,L=$.y;(0,o.awaitRedraw)().then((function(){e.scroll(A,L)}))}return(0,o.el)(".dhx_grid.dhx_widget",n({class:(_.css||"")+(k?"":" dhx_grid_border")+(p.multiselection?" dhx_no-select--pointer":""),"data-dhx-widget-id":a,"data-dhx-root-id":p.rootParent,"data-dhx-drop-area":"common"},(S=_.data,E=p.columns,D=_.editable,O=_.multiselection,{role:"grid","aria-rowcount":S.length,"aria-colcount":E.filter((function(t){return!t.hidden})).length,"aria-readonly":D?"false":"true","aria-multiselectable":O?"true":"false"})),[(0,o.resizer)((function(){return e.paint()})),(0,o.el)(".dhx_grid-content",n(n({style:n({},v)},i),{class:"".concat(P," ").concat(H," ").concat(j," ").concat(F).trim(),role:"presentation"}),[k?null:R,(0,o.el)(".dhx_grid-body",{style:{height:M,width:v.width-f.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[(0,o.el)("div",{},[k?R:null,x(_,m),k?I:null])]),(0,d.getFixedColsHeader)(_,T,l.Split.left),(0,d.getFixedColsHeader)(_,T,l.Split.right),(0,d.getFixedCols)(_,T,l.Split.left),(0,d.getFixedCols)(_,T,l.Split.right),(0,u.getFixedDataRows)(_,T,l.Split.top),(0,u.getFixedDataRows)(_,T,l.Split.bottom),k?null:I])])},e.proRender=function(t,e,i,r,h){var g,m=b(e._container);t&&t.node&&t.node.parent&&t.node.parent.el&&(m=b(t.node.parent.el));var S=e.config;if(!S)return(0,o.el)("div");if(!S.columns.length)return(0,o.el)(".dhx_grid",{"data-dhx-widget-id":h,"data-dhx-root-id":S.rootParent,"data-dhx-drop-area":"common",role:"empty-grid"});var E,D=e.data.getRawData(0,-1,null,2),O=S.topSplit||0,k=S.bottomSplit||0,M=0,T=0;S.columns.reduce((function(t,e){return e.hidden?t:e.hidden}),!0)?S.$totalHeight=0:S.$totalHeight=D.reduce((function(t,e,i){return O&&i<O+M&&(S.subRow&&(e.$subRowHeight=0,e.$opened=!1),e.hidden&&M++),k&&i>=D.length-k-T&&(S.subRow&&(e.$subRowHeight=0,e.$opened=!1),e.hidden&&T++),e.$index=i,t+(0,a.getTotalRowHeight)(e)}),0);var R="auto"===e.config.height;R&&(E=function(t,e,i){var n,o,r=t._container,a=e.$headerHeight+(e.$footerHeight&&e.$footerHeight+1)+e.$totalHeight+f.BORDERS;if(r){var s=window.getComputedStyle(r),l=s.minHeight,c=s.maxHeight;return a<=parseFloat(l)?parseFloat(l):a>=parseFloat(c)?parseFloat(c):a+(0,f.calcScrollBarWidth)(e,!!(null===(n=t.scrollView)||void 0===n?void 0:n.config.enable),i).x}return a+(i?(0,f.calcScrollBarWidth)(e,!!(null===(o=t.scrollView)||void 0===o?void 0:o.config.enable),i).x:0)}(e,S,m));var I=S.width&&"number"==typeof S.width?S.width:null==m?void 0:m.width,P=S.height&&"number"==typeof S.height?S.height:null==m?void 0:m.height,H={width:I||0,height:(R?E:P)||0},j=null==S?void 0:S.group,F=null==S?void 0:S.dragPanel,$=null==j?void 0:j.panel,A=!!S.dragPanel;$&&(H.height-=j.panelHeight||40),A&&(H.width-=(null==F?void 0:F.width)||_.defaultDragPanelConfig.width),(0,s.isAutoWidth)(S)&&(C(S,H,e.scrollView&&e.scrollView.config.enable),S.$totalWidth=(0,s.getTotalWidth)(S.columns.filter((function(t){return!t.hidden})))),S.$width=H.width,S.$height=H.height;var L=y(e,D,H);L.selection=r,L.datacollection=e.data;var V=(0,c.getShifts)(L);L.$scrollBarWidth=(0,f.calcScrollBarWidth)(L,!!(null===(g=e.scrollView)||void 0===g?void 0:g.config.enable));var N=(0,s.isCssSupport)("position","sticky"),W=w(L,N,H),z={wrapper:H,sticky:N,shifts:V,gridBodyHeight:W,footerAtBottom:!1},B=L.$totalWidth+f.BORDERS<H.width?"dhx_grid-less-width":"",G=L.$totalWidth+f.BORDERS===H.width?"dhx_grid-full-width":"",Y=L.$totalHeight+f.BORDERS<H.height-L.$footerHeight-L.$headerHeight?"dhx_grid-less-height":"",X=L.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",U=S.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"",q="bottom"===S.footerPosition&&!!Y&&!R;z.footerAtBottom=q;var K=(0,u.getFixedRows)(L,n(n({},z),{name:"header",position:"top"})),J=L.$footer?(0,u.getFixedRows)(L,n(n({},z),{name:"footer",position:"bottom"})):null;if(!t.node){var Z=e.getScrollState(),Q=Z.x,tt=Z.y;(0,o.awaitRedraw)().then((function(){e.scroll(Q,tt)}))}var et=(0,o.el)("div",{},[N?K:null,x(L,V,q),N?J:null]);return(0,o.el)(".dhx_grid.dhx_widget",{class:(L.css||"")+(N?"":" dhx_grid_border")+(S.multiselection?" dhx_no-select--pointer":""),style:{height:null!=E?E:null},"data-dhx-widget-id":h,"data-dhx-root-id":S.rootParent,role:"grid","aria-rowcount":L.data.length,"aria-colcount":L.filteredColumns.length,"data-dhx-drop-area":"common"},[(0,o.resizer)((function(){return e.paint()})),$&&(0,p.getGroupPanel)(S.$grouped,e)||null,A&&(0,v.getDragPanelNode)(e,L,z,!!Y)||null,(0,o.el)(".dhx_grid-content",n(n({style:n({},H)},i),{class:"".concat(B," ").concat(Y," ").concat(G," ").concat(X," ").concat(U).trim(),role:"presentation"}),[N?null:K,(0,o.el)(".dhx_grid-body",{style:{height:W,width:H.width-f.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[e.scrollView&&e.scrollView.config.enable?e.scrollView.render([et]):et]),(0,d.getFixedColsHeader)(L,z,l.Split.left),(0,d.getFixedColsHeader)(L,z,l.Split.right),(0,d.getFixedCols)(L,z,l.Split.left),(0,d.getFixedCols)(L,z,l.Split.right),(0,u.getFixedDataRows)(L,z,l.Split.top),(0,u.getFixedDataRows)(L,z,l.Split.bottom),N?null:J])])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditor=void 0;var n,o=i(3),r=i(91),a=i(92),s=i(93),l=i(106),c=i(107),d=i(114),u={cell:{row:null,col:null},editor:null,gridId:null};e.getEditor=function(t,e,i,h){var f="boolean"===e.type?"checkbox":i.$editable.editorType;if(void 0===f&&(f=i.autoHeight?"textarea":"input"),u.cell.row===t.id&&u.cell.col===e.id&&u.gridId===i.gridId&&i.$editable.editor)return u.editor;switch("checkbox"!==f&&(u={cell:{row:t.id,col:e.id},editor:u.editor,gridId:i.gridId}),n||(n=function(){u={cell:{row:null,col:null},editor:null,gridId:null}},i.events.on(o.GridEvents.afterEditEnd,n)),f){case"input":default:return u.editor=new r.InputEditor(t,e,i);case"textarea":return u.editor=new d.TextAreaEditor(t,e,i,h);case"select":return u.editor=new a.SelectEditor(t,e,i);case"datePicker":return u.editor=new s.DateEditor(t,e,i);case"checkbox":return new l.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),s=i(18),l=function(){function t(t,e,i){this.prevValue="",this._config=i,this._cell={row:t,col:e},this.type=e.type,this._initHandlers()}return t.prototype.endEdit=function(t){if(this._config.$editable){var e;if(!t&&(e=this._removeValuePattern(this._input.value,!0),"number"===this.type||this._cell.col.numberMask))if(e=parseFloat(e),Number.isNaN(e))e="";else{var i=this._cell.col.editorConfig,n=parseFloat(null==i?void 0:i.min),o=parseFloat(null==i?void 0:i.max);(0,a.isDefined)(null==i?void 0:i.min)&&e<n&&(e=n),(0,a.isDefined)(null==i?void 0:i.max)&&e>o&&(e=o)}this._config.events.fire(r.GridEvents.beforeEditEnd,[e,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[e,this._cell.row,this._cell.col])):this._input.focus()}},t.prototype.toHTML=function(t){var e;(0,a.isDefined)(t)&&(this.type="string"),t=null!==(e=this._input?this._input.value:null!=t?t:this._cell.row[this._cell.col.id])&&void 0!==e?e:"";var i=this._cell.col.numberMask;return(0,a.isDefined)(null==i?void 0:i.maxDecLength)&&(i=n(n({},i),{maxDecLength:void 0})),t=this._applyValuePattern(t,this._input,!0,i),this._config.$editable.editor=this,(0,o.el)("input.dhx_cell-editor.dhx_cell-editor__input",{_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor",onblur:this._handlers.onBlur,oninput:this._handlers.onInput,value:t})},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onInput:function(){var e=t._removeValuePattern(t._input.value);"number"===t.type&&(t._isValidWord(e)?t.prevValue=e:e=t.prevValue,!t.prevValue.length||"-"===t.prevValue||t._isCorrectRange(parseFloat(t.prevValue))?t._input.classList.remove("dhx_cell-editor__input--not-valid"):t._input.classList.add("dhx_cell-editor__input--not-valid")),t._input.value=t._applyValuePattern(e,t._input)},didInsert:function(e){t._input=e.el,t._input.focus()}}},t.prototype._isValidWord=function(t){var e,i=null===(e=t[t.length-1])||void 0===e?void 0:e.toLocaleLowerCase(),n=function(t,e){return t.toLocaleLowerCase().split(e.toLocaleLowerCase()).length-1};return!t.length||"-"===t||"."===t||"-."===t&&this._cell.col.numberMask||!isNaN(Number(t))&&t.trim().length===t.length||t.replace("-","").length>1&&"e"===i&&!n(this.prevValue,"e")||t.replace("-","").length>1&&"e"===i&&1===n(t,"e")},t.prototype._isCorrectRange=function(t){var e=!0,i=this._cell.col.editorConfig,n=parseFloat(null==i?void 0:i.min),o=parseFloat(null==i?void 0:i.max);return(0,a.isDefined)(null==i?void 0:i.min)&&(0,a.isDefined)(null==i?void 0:i.max)?e=t>=n&&t<=o:(0,a.isDefined)(null==i?void 0:i.min)?e=t>n:(0,a.isDefined)(null==i?void 0:i.max)&&(e=t<o),e},t.prototype._applyValuePattern=function(t,e,i,o){return void 0===i&&(i=!1),this._cell.col.numberMask?(0,s.numberMask)(t.toString(),n(n({},o||this._cell.col.numberMask),{onlyView:i}),e):this._cell.col.patternMask?(0,s.patternMask)(t.toString(),this._cell.col.patternMask,e):t},t.prototype._removeValuePattern=function(t,e){return void 0===e&&(e=!1),this._cell.col.numberMask?(0,s.removeNumberMask)(t,n(n({},this._cell.col.numberMask),{lastCall:e})):this._cell.col.patternMask?(0,s.removePatternMask)(t,this._cell.col.patternMask):t},t}();e.InputEditor=l},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(6),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"},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(94),s=i(13),l=i(30),c=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 a.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 l.Popup,this._popup.attach(this._calendar),this._calendar.events.on(a.CalendarEvents.change,(function(){n.endEdit(!1,!0)})),this._popup.events.on(l.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",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=c},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(95),e),o(i(46),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Calendar=void 0;var s=i(0),l=i(1),c=i(4),d=i(11),u=i(96),h=i(105),f=i(13),p=i(46),g=i(2),v=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,e,(0,s.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,l.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),s=0,l=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 l=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=l}if(e&&a.push("dhx_calendar-day--weekend"),n||(u.config.thisMonthOnly?(s++,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&&((l=u.config.$rangeMark(r))&&a.push(l));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;l--;)d();n.push({weekNumber:a,days:c,disabledWeekNumber:7===s})}return n},e.prototype._drawCalendar=function(){var t,e=this,i=this._currentDate,n=this.config,o=n.weekStart,s=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,l.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,l.el)("div.dhx_calendar-day",r({class:t.css,_date:t.date},m(t)),t.day)}));!this.config.weekNumbers||C.disabledWeekNumber&&s||b.push((0,l.el)("div",{class:"dhx_calendar-week-number"},C.weekNumber)),y=y.concat(S)}this.config.weekNumbers&&(h=(0,l.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,l.el)("div",r({class:E,style:{width:this.config.weekNumbers?parseInt(u.toString())+48+"px":u}},this._handlers),[(0,l.el)(".dhx_calendar__wrapper",[this._drawHeader((0,l.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,l.el)(".dhx_calendar__dates-wrapper",[(0,l.el)(".dhx_calendar__weekdays",p),(0,l.el)(".dhx_calendar__days",y),h]),!this.config.weekNumbers&&(0,l.el)(".dhx_calendar__weekdays",p),!this.config.weekNumbers&&(0,l.el)(".dhx_calendar__days",y),d?(0,l.el)(".dhx_timepicker__actions",[(0,l.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,l.el)("span.dhx_button__icon.dxi.dxi-clock-outline"),(0,l.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,s=n.weekNumbers,c=n.width,d=n.mode,u="dhx_calendar dhx_widget"+(o?" "+o:"")+(a?" dhx_calendar--with_timepicker":"")+(s?" dhx_calendar--with_week-numbers":""),h=!0,p=i===t.getFullYear(),g=function(t){return p&&e===t};return(0,l.el)("div",r({class:u,style:{width:s?parseInt(c.toString())+48+"px":c}},this._handlers),[(0,l.el)(".dhx_calendar__wrapper",[this._drawHeader((0,l.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,l.el)(".dhx_calendar__months",f.locale.monthsShort.map((function(t,e){return(0,l.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,l.el)(".dhx_calendar__actions",[(0,l.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,s=n.weekNumbers,c=n.width,d=n.mode,u="dhx_calendar dhx_widget"+(o?" "+o:"")+(a?" dhx_calendar--with_timepicker":"")+(s?" 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,l.el)("div",r({class:u,style:{width:s?parseInt(c.toString())+48+"px":c}},this._handlers),[(0,l.el)(".dhx_calendar__wrapper",[this._drawHeader((0,l.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,l.el)(".dhx_calendar__years",i.map((function(t){return(0,l.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,l.el)(".dhx_calendar__actions",[(0,l.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,l.el)(".dhx_calendar__navigation",[(0,l.el)("button.dhx_calendar-navigation__button.dhx_calendar-action__prev"+h.linkButtonClasses+".dhx_button--icon.dhx_button--circle",{"aria-label":"prev",type:"button"},[(0,l.el)(".dhx_button__icon.dxi.dxi-chevron-left")]),t,(0,l.el)("button.dhx_calendar-navigation__button.dhx_calendar-action__next"+h.linkButtonClasses+".dhx_button--icon.dhx_button--circle",{"aria-label":"next",type:"button"},[(0,l.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,l.el)(".dhx_widget.dhx-calendar",{class:e?" "+e:"",style:{width:i?parseInt(n.toString())+48+"px":n}},[(0,l.inject)(this._timepicker.getRootView())])},e.prototype._selectDate=function(t,e){var i=e.attrs._date,n=f.DateHelper.copy(this._getSelected());switch(this._currentViewMode){case"calendar":var o=this.config.timePicker?f.DateHelper.mergeHoursAndMinutes(i,this._getSelected()||this._currentDate):i;if(!this.events.fire(p.CalendarEvents.beforeChange,[o,n,!0]))return;this.config.range&&1===this._selected.length&&this._selected[0]<=o?this._selected.push(o):(this._selected=[],this._selected[0]=o),e.el.blur(),this.showDate(this._getSelected()),this.events.fire(p.CalendarEvents.change,[i,n,!0]);break;case"month":if("month"!==this.config.mode)f.DateHelper.setMonth(this._currentDate,i),this.showDate(null,"calendar"),this.events.fire(p.CalendarEvents.monthSelected,[i]);else{var r=f.DateHelper.fromYearAndMonth(this._currentDate.getFullYear()||this._getSelected().getFullYear(),i);if(!this.events.fire(p.CalendarEvents.beforeChange,[r,n,!0]))return;this._currentDate=r,this._selected[0]=r,this.events.fire(p.CalendarEvents.change,[this._getSelected(),n,!0]),this.events.fire(p.CalendarEvents.monthSelected,[i]),this.paint()}break;case"year":if("year"!==this.config.mode)f.DateHelper.setYear(this._currentDate,i),this.showDate(null,"month"),this.events.fire(p.CalendarEvents.yearSelected,[i]);else{r=f.DateHelper.fromYear(i);if(!this.events.fire(p.CalendarEvents.beforeChange,[r,n,!0]))return;this._currentDate=r,this._selected[0]=r,this.events.fire(p.CalendarEvents.change,[this._getSelected(),n,!0]),this.events.fire(p.CalendarEvents.yearSelected,[i]),this.paint()}}},e.prototype._moveBrowseFocus=function(t,e,i){if(e){var n=e.parent.body[e.idx+i];if(n){var o=n.el;o&&(t.target.tabIndex=-1,o.tabIndex=0,o.focus({preventScroll:!0}))}}},e}(d.View);e.Calendar=v},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(97),e),o(i(45),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Timepicker=void 0;var a=i(0),s=i(1),l=i(4),c=i(11),d=i(27),u=i(100),h=i(103),f=i(104),p=i(45),g=i(2);function v(t,e){return isNaN(t)?0:Math.min(e,Math.max(0,t))}var _=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,e,(0,a.extend)({timeFormat:24,controls:!1,valueFormat:"string",actions:!1},i))||this;return n.events=new l.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,s.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}),l=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(l),n.getCell("minute-slider").attach(a),this.config.controls){n.getCell("save-action").attach((function(){return(0,s.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,s.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,s.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,s.el)(".dhx_timepicker-inputs",r({},this._handlers),[(0,s.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,s.el)("span.dhx_timepicker-delimer",":"),(0,s.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,s.el)(".dhx_timepicker-ampm",this._time.AM?"AM":"PM"):null])},e.prototype._isTimeObj=function(){var t;return"timeobject"===(null===(t=this.config.valueFormat)||void 0===t?void 0:t.toLowerCase())},e}(c.View);e.Timepicker=_},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMarginSize=e.getBlockRange=void 0,e.getBlockRange=function(t,e,i){return void 0===i&&(i=!0),i?{min:t.left+window.pageXOffset,max:e.right+window.pageXOffset}:{min:t.top+window.pageYOffset,max:e.bottom+window.pageYOffset}},e.getMarginSize=function(t){return t&&("space"===t.type||"wide"===t.type)?12:0}},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProLayout=void 0;var r=i(28),a=i(41),s=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=s},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(101),e),o(i(44),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Slider=void 0;var a=i(0),s=i(1),l=i(4),c=i(25),d=i(11),u=i(30),h=i(44),f=i(2);function p(t,e,i){return t<e?e:t>i?i:t}var g=function(t){function e(e,i){var n=t.call(this,e,(0,a.extend)({mode:"horizontal",min:0,max:100,step:1,tooltip:!0},i))||this;n._disabled=!1,n.config.helpMessage=n.config.helpMessage||n.config.help,void 0!==n.config.thumbLabel&&(n.config.tooltip=n.config.thumbLabel),n.config.labelInline&&(n.config.labelPosition="left"),n.events=new l.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,s.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,s=a>=o/2?o:0;return+(Number(i)+Number(r)-a+s).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),s=this._getValue(t);if(a!==s&&this.events.fire(h.SliderEvents.beforeChange,[s,a,e])){var l=(s-o)/(n-o)*100,c=this._isInverse()?100-l:l;e?this._extraCurrentPosition=c:this._currentPosition=c,this.events.fire(h.SliderEvents.change,[s,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,l=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,s.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":"")+(l?" "+l:"")+(this._disabled?" dhx_slider--disabled":""),style:{paddingBottom:this.config.tick?"16px":null}},[d?(0,s.el)("label.dhx_label.dhx_slider__label",{style:d.style,class:c?"dhx_label--with-help":"",onclick:this._handlers.onlabelClick},c?[d.label&&(0,s.el)("span.dhx_label__holder",d.label),(0,s.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,s.el)(".dhx_widget.dhx_slider__track-holder",{"data-dhx-widget-id":this._uid},[(0,s.el)(".dhx_slider__track",{_ref:"track",onmouseover:this._handlers.onmouseover,onmouseout:this._handlers.onmouseout,onclick:this._handlers.onclick},[this._getDetector(),(0,s.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,s.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,s.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],l=r[1];return(0,s.el)(".dhx_slider__range",{style:(t={},t[n]=l+"%",t[o]=a-l+"%",t)})}return this._isInverse()?(0,s.el)(".dhx_slider__range",{style:(e={},e[n]=this._currentPosition+"%",e[o]=100-this._currentPosition+"%",e)}):(0,s.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,s=n*o/a,l=[],c=0,d=0;c<1;){var u=+(Number(i)+c*a).toFixed(5),h=d%r==0;l.push({position:(this._isInverse()?100*(1-c):100*c)+"%",isMultiple:h,label:h&&"function"==typeof this.config.tickTemplate?this.config.tickTemplate(u):null}),c+=s,d++}return l.push({position:(this._isInverse()?0:100)+"%",isMultiple:!0,label:"function"==typeof this.config.tickTemplate?this.config.tickTemplate(e):null}),l},e.prototype._drawTicks=function(){var t="horizontal"===this.config.mode?"left":"top";return(0,s.el)(".dhx_slider__ticks-holder",this._getTicks().map((function(e){var i;return(0,s.el)("div",{class:"dhx_slider__tick"+(e.isMultiple?" dhx_slider__tick--major":""),style:(i={},i[t]=e.position,i)},void 0!==e.label?[(0,s.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),s=i(1),l=i(4),c=i(2),d=i(11),u=i(43),h=function(t){function e(e){void 0===e&&(e={});var i=t.call(this,null,(0,a.extend)({},e))||this,n=i._popup=document.createElement("div");return n.className="dhx_widget dhx_popup"+(i.config.css?" "+i.config.css:""),n.style.position="absolute",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.setAttribute("aria-live","polite"),i.config.theme&&i._setTheme(i.config.theme),i.mount(n,(0,s.create)({render:function(){return i.toVDOM()}})),i._clickEvent=function(t){return i.events.fire(u.PopupEvents.click,[t])},i.events=e.events||new l.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,s.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,s.el)(".dhx_popup__inner-html-content",{".innerHTML":this._html}):(t=this._ui?this._ui.getRootView():null)&&t.render&&(t=(0,s.inject)(t)),(0,s.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,s=o.height;if(this._timeout&&(clearTimeout(this._timeout),this._timeout=null),!i||0!==a&&0!==s){var l=(0,c.fitPosition)(t,r(r({centering:!0,mode:"bottom"},e),{width:a,height:s})),d=l.left,u=l.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,s=document.querySelectorAll(".dhx_popup");for(i?s.forEach((function(t){return n.has(t)||n.set(t,e._popup)})):(i=Boolean(s.length))&&s.forEach((function(t){return n.set(t,!0)}));a;){if(a===t||a===e._popup||n.get(a)===e._popup)return;a=a.parentNode}e._hide(!0,r)&&document.removeEventListener("mousedown",o)};return document.addEventListener("mousedown",o),function(){return document.removeEventListener("mousedown",o)}},e.prototype._hide=function(t,e){if(this._isActive)return!!this.events.fire(u.PopupEvents.beforeHide,[t,e])&&(document.body.removeChild(this._popup),this._isActive=!1,this._outerClickDestructor&&(this._outerClickDestructor(),this._outerClickDestructor=null),this.events.fire(u.PopupEvents.afterHide,[e]),!0)},e}(d.View);e.Popup=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={hours:"Hours",minutes:"Minutes",save:"Save"}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTimeCheck=void 0,e.isTimeCheck=function(t){return/(^12:[0-5][0-9]?AM$)/i.test(t)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.linkButtonClasses=void 0,e.linkButtonClasses=".dhx_button.dhx_button--view_link.dhx_button--icon.dhx_button--size_medium.dhx_button--color_secondary"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckboxEditor=void 0;var n=i(0),o=i(1),r=i(3),a=function(){function t(t,e,i){this._config=i,this._cell={row:t,col:e},this._initHandlers()}return t.prototype.endEdit=function(){var t=this._checked;this._config.events.fire(r.GridEvents.beforeEditEnd,[t,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.events.fire(r.GridEvents.afterEditEnd,[t,this._cell.row,this._cell.col])):this._input.checked=!t},t.prototype.toHTML=function(){void 0===this._checked&&(this._checked=this._cell.row[this._cell.col.id]);var t=(0,n.uid)();return(0,o.el)("div.dhx_checkbox.dhx_cell-editor__checkbox",[(0,o.el)("label",{style:{display:"none"},for:t},this._checked||"false"),(0,o.el)("input.dhx_checkbox__input",{type:"checkbox",_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","data-dhx-checked":(!!this._checked).toString(),checked:this._checked,id:t,style:{userSelect:"none"}}),(0,o.el)("span.dhx_checkbox__visual-input")])},t.prototype._initHandlers=function(){var t=this;this._handlers={onClick:function(){var e=!t._input.checked;t._config.events.fire(r.GridEvents.beforeEditStart,[t._cell.row,t._cell.col,"checkbox"])?(t._checked=e,t._config.events.fire(r.GridEvents.afterEditStart,[t._cell.row,t._cell.col,"checkbox"]),t.endEdit()):t._input.checked=!e},didInsert:function(e){t._checkbox=e.el.parentNode.lastChild,t._input=e.el.parentNode.querySelector("input"),e.el.parentNode.addEventListener("click",t._handlers.onClick)}}},t}();e.CheckboxEditor=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(47),s=i(17),l=i(6),c=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,l.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,l.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 a.ProCombobox(null,n({itemHeight:37,css:"dhx_cell-editor__combobox",multiselection:"multiselect"===this._cell.col.editorType,htmlEnable:this._cell.col.htmlEnable},this._cell.col.editorConfig)),this._input.data.parse(e);var i=this._cell.row[this._cell.col.id],r="multiselect"===this._cell.col.editorType?((null==i?void 0:i.toString())||"").split(", "):i;this._input.setValue(r),this._input.events.on("keydown",this._handlers.onkeydown),this._input.data.events.on("beforeAdd",(function(e){if(e.id!==e.value)return t._input.addOption({id:e.value,value:e.value},!0),!1}))}return document.addEventListener("mousedown",this._handlers.onOuterClick),this._config.$editable.editor=this,(0,o.awaitRedraw)().then((function(){var e=t._input.getRootView().refs.holder.el;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=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KEY_CODES=void 0,e.KEY_CODES={BACKSPACE:8,ENTER:13,ESC:27,DOWN_ARROW:40,UP_ARROW:38,LEFT_ARROW:37,RIGHT_ARROW:39}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditor=void 0;var n=i(110);e.getEditor=function(t,e){return new n.InputEditor(t,e)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputEditor=void 0;var n=i(1),o=i(31),r=function(){function t(t,e){var i=this;this._list=e,this._config=e.config,this._item=t,this._list.events.on(o.ListEvents.focusChange,(function(t,e){i._mode&&e!==i._item.id&&i.endEdit()})),this._initHandlers()}return t.prototype.endEdit=function(){if(this._input){var t=this._input.value;this._list.events.fire(o.ListEvents.beforeEditEnd,[t,this._item.id])?(this._input.removeEventListener("blur",this._handlers.onBlur),this._input.removeEventListener("change",this._handlers.onChange),this._input.removeEventListener("keydown",this._handlers.onKeyDown),this._handlers={},this._mode=!1,this._list.events.fire(o.ListEvents.afterEditEnd,[t,this._item.id])):this._input.focus()}},t.prototype.toHTML=function(){this._mode=!0;var t=this._config.itemHeight;return(0,n.el)(".dhx_input__wrapper",{role:"presentation"},[(0,n.el)("div.dhx_input__container",{role:"presentation"},[(0,n.el)("input.dhx_input",{class:this._item.css?" "+this._item.css:"",style:{height:t,width:"100%",padding:"8px 12px"},_hooks:{didInsert:this._handlers.didInsert},_key:this._item.id,"data-dhx-id":this._item.id})])])},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onChange:function(){t.endEdit()},onKeyDown:function(e){"Enter"===e.key&&t._item.value===t._input.value&&t.endEdit(),"Escape"===e.key&&(t._input.value=t._item.value,t.endEdit())},didInsert:function(e){var i=e.el;t._input=i,i.focus(),i.value=t._item.value,i.setSelectionRange(0,i.value.length),i.addEventListener("change",t._handlers.onChange),i.addEventListener("blur",t._handlers.onBlur),i.addEventListener("keydown",t._handlers.onKeyDown)}}},t}();e.InputEditor=r},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.ProList=void 0;var s=i(1),l=i(42),c=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.scrollView=new l.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,s.el)(".div",{style:{height:e[2]+"px",_key:"start-key"}})],i,!0),[(0,s.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,s.el)("ul.dhx_widget.dhx_list",r(r({style:{"max-height":this.config.height,position:"relative"},id:this._uid,class:o,"data-dhx-widget-id":this._uid,"data-dhx-drop-area":"row"},this._handlers),this._getListAriaAttrs(this.config,this.data.getLength())),n?[].concat(this.scrollView.render(i)):i)},e}(i(50).List);e.ProList=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyListener=void 0;var n=function(){function t(){var t=this;this._handler=function(e){if(t._isActive){var i=e.key;"Backspace"===i&&t._sequence.length>0&&(t._sequence=t._sequence.slice(0,t._sequence.length-1),t._change()),i.length<2&&(t._sequence+=i,t._change())}},this._sequence="",document.addEventListener("keydown",this._handler)}return t.prototype.startNewListen=function(t){this._isActive=!0,this._sequence="",this._currentAction=t},t.prototype.endListen=function(){this._currentAction=null,this.reset(),this._isActive=!1},t.prototype.reset=function(){this._sequence=""},t.prototype.destructor=function(){document.removeEventListener("keydown",this._handler)},t.prototype._change=function(){this._currentAction(this._sequence),this._addClearTimeout()},t.prototype._addClearTimeout=function(){var t=this;this._clearTimeout&&clearTimeout(this._clearTimeout),this._clearTimeout=setTimeout((function(){t.reset(),t._clearTimeout=null}),2e3)},t}();e.KeyListener=n},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProCombobox=void 0;var r=i(48),a=i(49),s=i(27),l=i(52),c=function(t){function e(e,i){return t.call(this,e,i)||this}return o(e,t),e.prototype._createLayout=function(){var t=this.list=new a.ProList(null,{$template:r.$template,template:this.config.template,htmlEnable:this.config.htmlEnable,virtual:this.config.virtual,keyNavigation:!0,multiselection:this.config.multiselection,itemHeight:this.config.itemHeight,height:this.config.listHeight,data:this.data,eventHandlers:this.config.eventHandlers}),e=this._layout=new s.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(l.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),s=i(6),l=i(18),c=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",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),s=o<e.maxHeight?e.maxHeight:o;return document.body.removeChild(i),1===r&&r===a?e.maxHeight:s},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,l.numberMask)(t.toString(),n(n({},o||this._cell.col.numberMask),{onlyView:i}),e):this._cell.col.patternMask?(0,l.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,l.removeNumberMask)(t,n(n({},this._cell.col.numberMask),{lastCall:e})):this._cell.col.patternMask?(0,l.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=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)},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),s=i(2),l=i(56);var c={onclick:function(t,e){var i=(0,s.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemClick,[i,e])},onmousedown:function(t,e){var i=(0,s.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemMouseDown,[i,e])},ontouchstart:function(t,e){var i=(0,s.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemMouseDown,[i,e])},ontouchmove:function(t,e){var i=(0,s.locate)(e,"data-dhx-group-item-id");i&&t._events.fire(a.GridSystemEvents.groupPanelItemTouchMove,[i,e])},ontouchend:function(t,e){var i=(0,s.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,s=void 0===a?"basic":a,l=t.sortable,c=void 0===l||l,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(s),"data-dhx-group-item-id":e,"data-dhx-id":e,_key:e},[c&&(n&&(0,r.el)("div.dhx_grid-sort",[(0,r.el)("i.dxi.dxi-arrow-up.dhx_grid-group_item-sort.dhx_grid-group_item-sort--".concat(n),{"aria-hidden":"true"}),o&&(0,r.el)("div.dhx_grid-sort-counter",{"aria-hidden":"true"},[o])||null])||(0,r.el)("i.dxi.dxi-sort.dhx_grid-group_item-sort.dhx_grid-group_item-unsorted"))||null,(0,r.el)("span.dhx_grid-group_item-label",i),u&&(0,r.el)("i.dxi.dxi-close-circle.dhx_grid-group_item-remove",{"data-dhx-group-item-remove":"true"})||null])}e.getGroupItem=d,e.getGroupPanel=function(t,e){var i,a;void 0===t&&(t=[]);var s=[];t.forEach((function(e,i){s.push(d(e)),i!==t.length-1&&s.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"},l.default.dropAreaTitle),(0,r.el)("div",{class:"dhx_grid-group_drop-area",role:"listbox"},o([],s.length?s:[(0,r.el)("span",{class:"dhx_grid-group_drop-area-placeholder"},l.default.dropAreaPlaceholder)],!0))])}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.setSubRowCell=e.getSubRowContent=void 0;var o=i(1),r=i(5),a=i(20),s=i(41),l=i(7);function c(t,e,i,o){var r=e(t),l=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({},a.defaultSubRowConfig),i),{cell:l})),"function"==typeof(null==r?void 0:r.paint)&&l.attach(r)}e.getSubRowContent=function(t){var e,i=[],n=null===(e=t.subRowConfig)||void 0===e?void 0:e.fullWidth;return t.$subRowCells&&t.currentRows.forEach((function(e){var a;if(e.$opened){var s=t.$subRowCells.get(e.id),c=null===(a=null==s?void 0:s.cell)||void 0===a?void 0:a.getRootView();if(c){var d=(0,r.getTotalHeight)(t.data.slice(0,e.$index))+e.$height;i.push((0,o.el)(".dhx_grid_subrow__container",{_key:"sub"+e.id,role:"region","aria-labelledby":"row-".concat(e.id),"data-dhx-id":e.id,"data-dhx-root-widget-id":t.gridId,tabindex:0,style:{position:"absolute",top:d,width:n?t.$totalWidth:t.$width-t.$scrollBarWidth.y-l.BORDERS}},[(0,o.inject)(c)]))}}})),i.length?(0,o.el)(".dhx_grid_subrow__data",{_flags:o.KEYED_LIST,style:{left:n?0:t.scroll.left},role:"presentation"},i):[]},e.setSubRowCell=function(t,e){for(var i=t.config,o=i.subRowConfig,r=i.$subRowCells,s=i.subRow,l=new Map,d=0;d<e.length;d++){var u=e[d];if(!u.$group){if(!r.has(u.id)||!r.get(u.id).cell){var h=n(n({},a.defaultSubRowConfig),("function"==typeof o?o(u):o)||{});r.set(u.id,h),(u.$opened||h.preserve)&&u.$subRowHeight&&c(u,s,h,r)}l.set(u.id,u.$opened)}}r.forEach((function(t,e){var i;t.preserve||(l.has(e)||r.delete(e),l.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),s=i(20),l=i(7),c=i(2),d=i(5),u={onclick:function(t,e){var i=(0,c.locate)(e,"data-dhx-id");i&&t.events.fire(a.GridEvents.dragPanelItemClick,[i,e])},onmousedown:function(t,e){var i=(0,c.locate)(e,"data-dhx-id");i&&t.events.fire(a.GridEvents.dragPanelItemMouseDown,[i,e])}};function h(t){return(0,r.el)(".dhx_grid-drag-panel_header",{style:{height:t.$headerHeight},role:"banner","aria-label":"Panel header"})}function f(t,e,i){var n=t.$footer,o=((!i||e.footerAtBottom)&&t.$scrollBarWidth.x||0)+(n&&t.$footerHeight||0);if(!o||!n&&t.$totalHeight<t.$height-t.$headerHeight-t.$footerHeight)return null;var a=l.BORDERS/2,c=t.dragPanel,d={height:o+a};return e.footerAtBottom&&(d.width=c.width||s.defaultDragPanelConfig.width,d.height=d.height+a),(0,r.el)(".dhx_grid-drag-panel_footer".concat(e.footerAtBottom?".dhx_grid-drag-panel_footer--at-bottom":""),{style:d,role:"contentinfo","aria-label":"Panel footer"})}function p(t,e,i){var n=t.$height-t.$headerHeight-l.BORDERS;return(0,r.el)(".dhx_grid-drag-panel_main",{style:{height:n},role:"main","aria-label":"Panel content"},[g(t,e),f(t,e,i),v(t,e,a.Split.top,i),v(t,e,a.Split.bottom,i)])}function g(t,e){var i=t.dragPanel,n=t.currentRows.map((function(t){return _(t,i.icon)}));return(0,r.el)(".dhx_grid-drag-panel_content",{style:{height:t.$totalHeight,paddingTop:e.shifts.y,top:-t.scroll.top},_flags:r.KEYED_LIST,role:"list","aria-label":"Draggable rows"},o([],n,!0))}function v(t,e,i,n){var c=t.dragPanel,u=(i===a.Split.bottom?t.fixedRows.bottom:t.fixedRows.top)||[];if(!u.length)return null;var h=u.map((function(t){return _(t,c.icon)})),f={width:c.width||s.defaultDragPanelConfig.width};if(i===a.Split.bottom&&e.footerAtBottom)f.bottom=t.footerHeight+l.BORDERS/2+(t.$scrollBarWidth.x||-1);else{var p=(0,d.getTotalHeight)(t.fixedRows.bottom),g=t.group?(0,s.getGroupDefaultConfig)(t.group).panelHeight:0;f.top=i===a.Split.bottom?n?t.$totalHeight+t.$headerHeight-p+l.BORDERS/2+g:t.$height-p-t.$footerHeight-l.BORDERS/2-t.$scrollBarWidth.x+g:t.$headerHeight+g}return(0,r.el)(".dhx_grid-drag-panel_content.dhx_grid-drag-panel_content--fixed",{style:f,_flags:r.KEYED_LIST,role:"list","aria-label":"Draggable rows"},o([],h,!0))}function _(t,e){return(0,r.el)(".dhx_grid-drag-panel_item",{"data-dhx-id":t.id,style:{height:t.$height},_key:t.id+"_panel",role:"listitem","aria-label":"Row id ".concat(t.id)},[(0,r.el)("i.dhx_grid-drag-panel_item-icon",{class:e,"aria-hidden":"true"})])}e.getDragPanelNode=function(t,e,i,o){var a;void 0===o&&(o=!1);var l=e.dragPanel,c=Object.entries(u).reduce((function(e,i){var o,r=i[0],a=i[1];return n(n({},e),((o={})[r]=[a,t],o))}),{}),d="dhx_grid-drag-panel ";return o&&(d+="dhx_grid-drag-panel--less-height "),(null===(a=t.config.$grouped)||void 0===a?void 0:a.length)&&(d+="dhx_grid-drag-panel--drag-not-allowed "),l.css&&(d+=l.css),(0,r.el)("section",n({class:d,style:{width:l.width||s.defaultDragPanelConfig.width},role:"region","aria-label":"Drag panel"},c),[h(e),p(e,i,o)])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComboFilter=void 0;var n=i(47),o=i(4),r=i(8),a=i(0),s=i(3),l=i(21),c=function(){function t(t){var e,i=t.column,n=t.config,r=t.headerConfig,s=t.uniqueData,l=t.value,c=t.grid;this.events=new o.EventSystem,this._silentMode=!1,this.column=i,this.config=n,this.data=s,this.value=l,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(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(l.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(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(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(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(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,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(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(){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(4),a=i(3),s=i(21),l=function(){function t(t){var e=t.column,i=t.config,n=t.uniqueData,o=void 0===n?[]:n,a=t.value,s=t.grid;this.events=new r.EventSystem,this.column=e,this.config=i,this.data=o,this.value=a||"",this._grid=s,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",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(s.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=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFilter=void 0;var n=i(1),o=i(4),r=i(3),a=i(21),s=function(){function t(t){var e=t.column,i=t.config,n=t.id,r=t.value,a=t.headerConfig,s=t.grid;this.events=new o.EventSystem,this.column=e,this.config=i,this.id=n,this.value=r||"",this.filterConfig={},this._grid=s,Object.assign(this.filterConfig,(null==a?void 0:a.filterConfig)||{}),this.initHandlers(),this.toHTML()}return t.prototype.toHTML=function(){return(0,n.el)("div.dhx_grid-filter__label",{"aria-label":"Type to search",_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"},"aria-label":"Type to search",for:this.id},"Type to search"),(0,n.el)("input",{type:"text",class:"dhx_input dhx_grid-filter",oninput:this._handlers.onchange,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,_key:this.column.id,id:this.id,value:this.value,placeholder:this.filterConfig.placeholder})])},t.prototype.getFilter=function(){return this.toHTML()},t.prototype.setValue=function(t,e){var i;this.value=t||"",this.events.fire(a.HeaderFilterEvent.change,[this.value]),null===(i=this._grid.events)||void 0===i||i.fire(r.GridEvents.filterChange,[this.value,this.column.id,"inputFilter",e])},t.prototype.clear=function(t){this.setValue("",t)},t.prototype.focus=function(){var t,e,i;this._isFocused=!0;var n=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;n&&(null===(i=n.querySelector("input"))||void 0===i||i.focus())},t.prototype.blur=function(){var t,e,i;this._isFocused=!1;var n=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;n&&(null===(i=n.querySelector("input"))||void 0===i||i.blur())},t.prototype.initHandlers=function(){var t=this;this._handlers={onchange:function(e){var i,n,o,r,a=(null===(i=e.target)||void 0===i?void 0:i.value)||(null===(o=null===(n=e.composedPath())||void 0===n?void 0:n[0])||void 0===o?void 0:o.value)||(null===(r=e.explicitOriginalTarget)||void 0===r?void 0:r.value);t._inputDelay&&clearTimeout(t._inputDelay),t._inputDelay=setTimeout((function(){return t.setValue(a)}),500)},onfocus:function(){t._isFocused=!0},onblur:function(){t._isFocused=!1}},this._grid.events.on(r.GridEvents.scroll,(function(){var e,i,o=null===(i=null===(e=t._grid.getRootView())||void 0===e?void 0:e.refs["".concat(t.column.id,"_filter")])||void 0===i?void 0:i.el;t._isFocused&&o&&(0,n.awaitRedraw)().then((function(){var t;null===(t=o.querySelector("input"))||void 0===t||t.focus()}))})),this._grid.events.on(r.GridEvents.headerCellMouseDown,(function(e,i){i.id!==t.column.id&&t.blur()})),this._grid.events.on(r.GridEvents.cellMouseDown,(function(){return t.blur()}))},t}();e.InputFilter=s},function(t,e,i){"use strict";var n=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.startResize=void 0;var o=i(0),r=i(3),a=i(7);e.startResize=function(t,e,i,s){var l,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===(l=t.scrollView)||void 0===l?void 0:l.config.enable),p=c?(0,a.calcScrollBarWidth)(t.config,f).xState:null,g=0;t.config.$resizing=e;var v=function(i){var s,l=(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===l+1&&_>=t.config.$width-m.y-2||c&&h.includes(e)&&m.xState!==p)){g=g||u[l].$width;var y=40;"function"==typeof t.data.getMaxLevel&&0===l&&(y*=t.data.getMaxLevel());var b,x=u[l].minWidth||y,w=u[l].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[l].$width=b;for(var D=0;D<S.length;D++){(null!==(s=S[D].adjust)&&void 0!==s?s:t.config.adjust)||(S[D].$fixedWidth=D<=l)}t.events.fire(r.GridEvents.resize,[u[l],i]),t.paint()}},_=function(){i.targetTouches?(document.removeEventListener("touchmove",v),document.removeEventListener("touchend",_)):(document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",_)),s()};i.targetTouches?(document.addEventListener("touchmove",v),document.addEventListener("touchend",_)):(document.addEventListener("mousemove",v),document.addEventListener("mouseup",_)),t.paint()}},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.getKeysHandlers=void 0;var o=i(3),r=i(2),a=i(15),s=i(17),l=i(5);function c(t){var e=t.grid,i=t.event;if(!e.config.$editable&&!(0,r.locateNodeByClassName)(i,"dhx_grid-header-cell")){i&&i.preventDefault();var o=e.config.columns.filter((function(t){return!t.hidden}));!function(t){var e=t.grid,i=t.columns,n=t.dir,o=t.rangedIndex,r=t.toEnd,a=t.shiftUp,s=e.selection.getCell(),c=e.config.multiselection&&a;if(!s)return;if("vertical"===n)if(r){var d=e.data.getItem(e.data.getId(0));if(1===o){var u=e.data.getId(e.data.getLength()-1);"tree"===e.config.type&&(u=(0,l.getLastChild)(u,e.data)),d=e.data.getItem(u)}e.scrollTo(d.id.toString(),s.column.id.toString()),e.selection.setCell(d.id,s.column.id,!1,c)}else{d=null;if("tree"===e.config.type)d=e.data.getItem(o<0?(0,l.getClosestTop)(s.row.id,e.data):(0,l.getClosestBottom)(s.row.id,e.data));else(h=e.data.getIndex(s.row.id.toString()))+o>=0&&h+o<e.data.getLength()&&(d=e.data.getItem(e.data.getId(h+o)));d&&(e.scrollTo(d.id.toString(),s.column.id.toString()),e.selection.setCell(d.id,s.column.id,!1,c))}else if(r){d=1===o?i[i.length-1]:i[0];e.scrollTo(s.row.id.toString(),d.id.toString()),e.selection.setCell(s.row.id,d.id,!1,c)}else{var h;(h=i.findIndex((function(t){return t.id==s.column.id})))+o>=0&&h+o<i.length&&(e.scrollTo(s.row.id.toString(),i[h+o].id.toString()),e.selection.setCell(s.row.id,i[h+o].id,!1,c))}}(n(n({},t),{columns:o})),function(t){var e,i,o=t.grid,r=t.dir,a=o,s=null===(e=a.range)||void 0===e?void 0:e.getRange();if(!s&&"range"!==(null===(i=a.block)||void 0===i?void 0:i.config.mode))return;var c="vertical"===r?function(t){var e=t.grid,i=t.rangedCell,n=t.toEnd,o=t.shiftUp,r=t.rangedIndex,a=e,s=a.data,c=a.config;if(n){if(r>0){var d=s.getId(s.getLength()-1);return"tree"===c.type&&(d=(0,l.getLastChild)(d,s)),s.getItem(d)}return s.getItem(s.getId(0))}var u=s.getIndex(i.yStart),h=s.getIndex(i.yEnd),f=r<0,p=o?i.yEnd:s.getId(f?Math.min(u,h):Math.max(u,h));if("tree"===c.type){var g=f?(0,l.getClosestTop)(p,s):(0,l.getClosestBottom)(p,s);return g?s.getItem(g):null}var v=s.getIndex(p)+r;if(v>=0&&v<s.getLength())return s.getItem(s.getId(v));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})),s=e.findIndex((function(t){return t.id===i.xEnd})),l=r<0,c=(o?s:l?Math.min(a,s):Math.max(a,s))+r;if(c>=0&&c<e.length)return e[c];return null}(n(n({},t),{rangedCell:s}));c&&function(t,e,i,n,o){var r="vertical"===n,a=r?e.id:i.yEnd,s=r?i.xEnd:e.id;if(t.scrollTo(a,s),o){var l=r?{yEnd:e.id,xEnd:i.xEnd}:{yEnd:i.yEnd,xEnd:e.id};t.range.setRange(l,!0)}else{l=r?{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(l)}}(a,c,s,r,t.shiftUp)}(n(n({},t),{columns:o}))}}function d(t,e){var i,n,o=t.selection.getCell(),r=o&&t.getSpan(o.row.id,o.column.id);if(r){if("up"===e||"down"===e){var a=null===(i=t.config.data)||void 0===i?void 0:i.findIndex((function(t){return t.id===r.row})),s=null===(n=t.config.data)||void 0===n?void 0:n.findIndex((function(t){return t.id===o.row.id}));return"up"===e?a-s-1:a+(r.rowspan||1)-s}var l=t.config.columns.filter((function(t){return!t.hidden}));a=l.findIndex((function(t){return t.id===r.column})),s=l.findIndex((function(t){return t.id===o.column.id}));return"left"===e?a-s-1:a+(r.colspan||1)-s}return"down"===e||"right"===e?1:-1}e.getKeysHandlers=function(t){var e,i,l,u="cell"===t.config.selection||"complex"===t.config.selection||!0===t.config.selection,h={};if(t.getRootView()){var f=null===(l=null===(i=null===(e=t.getRootView())||void 0===e?void 0:e.refs)||void 0===i?void 0:i.grid_body)||void 0===l?void 0:l.el;if(!f)return;h={pageUp:function(t){t.preventDefault(),f.scrollTop-=f.clientHeight},pageDown:function(t){t.preventDefault(),f.scrollTop+=f.clientHeight},home:function(t){t.preventDefault(),f.scrollTop=0},end:function(t){t.preventDefault(),f.scrollTop+=f.scrollHeight}}}return n({enter:function(){if(u){var e=(0,a.normalizeCell)(t.selection.getCell(),t);if(e&&(!1!==e.column.editable&&t.config.editable||e.column.editable))if(t.config.$editable)t.editEnd();else if("boolean"===e.column.type){if(!t.events.fire(o.GridEvents.beforeEditStart,[e.row,e.column,"checkbox"]))return;if(t.events.fire(o.GridEvents.afterEditStart,[e.row,e.column,"checkbox"]),!t.events.fire(o.GridEvents.beforeEditEnd,[!e.row[e.column.id],e.row,e.column]))return;t.events.fire(o.GridEvents.afterEditEnd,[!e.row[e.column.id],e.row,e.column])}else t.editCell(e.row.id,e.column.id,e.column.editorType)}else t.config.$editable&&t.editEnd()},space:function(e){var i,n=(0,a.normalizeCell)(t.selection.getCell(),t);if(u&&(null!==(i=null==n?void 0:n.column.editable)&&void 0!==i?i:t.config.editable)&&!t.config.$editable&&n&&"boolean"===n.column.type){if(e.preventDefault(),!t.events.fire(o.GridEvents.beforeEditStart,[n.row,n.column,"checkbox"]))return;if(t.events.fire(o.GridEvents.afterEditStart,[n.row,n.column,"checkbox"]),!t.events.fire(o.GridEvents.beforeEditEnd,[!n.row[n.column.id],n.row,n.column]))return;t.events.fire(o.GridEvents.afterEditEnd,[!n.row[n.column.id],n.row,n.column])}},escape:function(){t.config.$editable&&t.editEnd(!0)},tab:function(e){if(t.config.selection&&!(0,r.locateNodeByClassName)(e,"dhx_grid-header-cell")){t.config.$editable&&t.editEnd();var i=t.selection.getCell(),n=t.config.columns.filter((function(t){return!t.hidden}));if(i){if(i.row.$opened&&i.row.$subRowHeight){var o=t.getSubRow(i.row.id),a=o.view,l=o.element;return void((null==a?void 0:a.name.includes("grid"))?(a.selection.setCell(a.data.getId(0)),s.focusManager.setFocusId(a._uid)):l.focus())}var c=n.indexOf(i.column)+d(t,"right");if(c>=0&&c<n.length)e&&e.preventDefault(),t.scrollTo(i.row.id.toString(),n[c].id.toString()),t.selection.setCell(i.row.id,n[c].id);else if(c>=0){var u=t.data.getIndex(i.row.id.toString())+1;u<t.data.getLength()&&(e&&e.preventDefault(),t.scrollTo(t.data.getId(u).toString(),n[0].id.toString()),t.selection.setCell(t.data.getId(u),n[0].id))}}}},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,a.clearCells)(t,null===(i=t.range)||void 0===i?void 0:i.getRangedCells())},"shift+tab":function(e){var i,n,o;if(t.config.selection&&!(0,r.locateNodeByClassName)(e,"dhx_grid-header-cell")){t.config.$editable&&t.editEnd();var a=t.selection.getCell(),l=t.config.columns.filter((function(t){return!t.hidden}));if(a){var c=(0,r.locate)(null===(o=null===(n=null===(i=t.getRootView().node)||void 0===i?void 0:i.parent)||void 0===n?void 0:n.parent)||void 0===o?void 0:o.el,"data-dhx-root-widget-id");if(c)return void s.focusManager.setFocusId(c);var u=l.indexOf(a.column)+d(t,"left");if(u>=0&&u<l.length)e&&e.preventDefault(),t.scrollTo(a.row.id.toString(),l[u].id.toString()),t.selection.setCell(a.row.id,l[u].id);else if(u<t.data.getLength()){var h=t.data.getIndex(a.row.id.toString())-1;h>=0&&(e&&e.preventDefault(),t.scrollTo(t.data.getId(h).toString(),l[l.length-1].id.toString()),t.selection.setCell(t.data.getId(h),l[l.length-1].id))}}}},arrowUp:function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:d(t,"up")})},"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,a.normalizeCell)(t.selection.getCell(),t);e&&(e.row.$opened?t.collapse(e.row.id):t.expand(e.row.id))},"ctrl+arrowUp":function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:-1,toEnd:!0})},"shift+arrowUp":function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:-1,shiftUp:!0})},"ctrl+shift+arrowUp":function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:-1,toEnd:!0,shiftUp:!0})},arrowDown:function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:d(t,"down")})},"ctrl+arrowDown":function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:1,toEnd:!0})},"shift+arrowDown":function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:1,shiftUp:!0})},"ctrl+shift+arrowDown":function(e){c({grid:t,event:e,dir:"vertical",rangedIndex:1,toEnd:!0,shiftUp:!0})},arrowRight:function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:d(t,"right")})},"ctrl+arrowRight":function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:1,toEnd:!0})},"shift+arrowRight":function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:1,shiftUp:!0})},"ctrl+shift+arrowRight":function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:1,toEnd:!0,shiftUp:!0})},arrowLeft:function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:d(t,"left")})},"ctrl+arrowLeft":function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:-1,toEnd:!0})},"shift+arrowLeft":function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:-1,shiftUp:!0})},"ctrl+shift+arrowLeft":function(e){c({grid:t,event:e,dir:"horizontal",rangedIndex:-1,toEnd:!0,shiftUp:!0})}},h)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropManager=void 0;var n=i(1),o=i(3),r=i(8),a=i(7),s=i(5),l=i(0),c=i(6),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,l.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,l.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,s.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})),M=O.findIndex((function(t){return t.id==e._dragState.start}));D=(0,s.getTotalWidth)(O.slice(0,k+1)),M>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,l.isDefined)(t)||this._dragState.source.find((function(e){return e==t.id})))return null;var e,i,o=this._grid.config,r=o.topSplit,s=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(s){var p=this._grid.data.getLength();i=this._grid.data.getRawData(p-s,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,l.isDefined)(e))return 0;var i=this._getTopPosition(e);return e.$level&&(i+=e.$height-a.BORDERS/2),i}return this._getTopPosition(t)+t.$height},t.prototype._toggleRowDraggable=function(t,e){var i=this;t.forEach((function(t){i._grid.data.update(t,{$draggable:e},!0),i._isTreeMode&&i._grid.data.haveItems(t)&&i._grid.data.eachChild(t,(function(t){i._grid.data.update(t.id,{$draggable:e},!0)}))}))},t.prototype._isSameComponent=function(t){return(0,u.locate)(t.target,"data-dhx-widget-id")!=this._grid._uid},t}();e.DropManager=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getVisibleRowNode=e.getRowNode=void 0,e.getRowNode=function(t,e,i){var n=i?".dhx_grid__cols_".concat(i,"--fixed"):":not(.dhx_grid-fixed-cols-wrap)";return e.querySelector("".concat(n,' .dhx_grid-row[data-dhx-id="').concat(t,'"]'))},e.getVisibleRowNode=function(t,e,i){var n=document.createElement("div");return n.style.width=e+"px",n.style.overflow="hidden",t.style.width=e-i+"px",t.style.marginLeft=i+"px",n.appendChild(t),n}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setLocale=void 0,e.setLocale=function(t,e){var i=this[t];if(i)for(var n in e)i[n]=e[n]}}])})),window.dhx_legacy){if(window.dhx)for(var key in dhx)if("i18n"===key)for(var lang in dhx[key])window.dhx_legacy[key][lang]=dhx[key][lang];else dhx_legacy[key]=dhx[key];window.dhx=dhx_legacy,delete window.dhx_legacy}
|