@syncfusion/ej2-treegrid 24.1.46 → 24.2.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/ej2-treegrid.min.js +2 -2
  3. package/dist/ej2-treegrid.umd.min.js +2 -2
  4. package/dist/ej2-treegrid.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-treegrid.es2015.js +8 -28
  6. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  7. package/dist/es6/ej2-treegrid.es5.js +6 -27
  8. package/dist/es6/ej2-treegrid.es5.js.map +1 -1
  9. package/dist/global/ej2-treegrid.min.js +2 -2
  10. package/dist/global/ej2-treegrid.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +9 -9
  13. package/src/treegrid/actions/context-menu.js +1 -0
  14. package/src/treegrid/actions/infinite-scroll.d.ts +0 -1
  15. package/src/treegrid/actions/infinite-scroll.js +2 -24
  16. package/src/treegrid/actions/page.js +2 -2
  17. package/src/treegrid/base/data.js +1 -1
  18. package/src/treegrid/base/treegrid.js +1 -1
  19. package/styles/bootstrap-dark.css +1 -2
  20. package/styles/bootstrap.css +1 -2
  21. package/styles/bootstrap4.css +1 -2
  22. package/styles/bootstrap5-dark.css +1 -2
  23. package/styles/bootstrap5.css +1 -2
  24. package/styles/fabric-dark.css +1 -2
  25. package/styles/fabric.css +1 -2
  26. package/styles/fluent-dark.css +1 -2
  27. package/styles/fluent.css +1 -2
  28. package/styles/highcontrast-light.css +1 -2
  29. package/styles/highcontrast.css +1 -2
  30. package/styles/material-dark.css +1 -2
  31. package/styles/material.css +1 -2
  32. package/styles/material3-dark.css +1 -2
  33. package/styles/material3.css +1 -2
  34. package/styles/tailwind-dark.css +1 -2
  35. package/styles/tailwind.css +1 -2
  36. package/styles/treegrid/_layout.scss +1 -2
  37. package/styles/treegrid/bootstrap-dark.css +1 -2
  38. package/styles/treegrid/bootstrap.css +1 -2
  39. package/styles/treegrid/bootstrap4.css +1 -2
  40. package/styles/treegrid/bootstrap5-dark.css +1 -2
  41. package/styles/treegrid/bootstrap5.css +1 -2
  42. package/styles/treegrid/fabric-dark.css +1 -2
  43. package/styles/treegrid/fabric.css +1 -2
  44. package/styles/treegrid/fluent-dark.css +1 -2
  45. package/styles/treegrid/fluent.css +1 -2
  46. package/styles/treegrid/highcontrast-light.css +1 -2
  47. package/styles/treegrid/highcontrast.css +1 -2
  48. package/styles/treegrid/material-dark.css +1 -2
  49. package/styles/treegrid/material.css +1 -2
  50. package/styles/treegrid/material3-dark.css +1 -2
  51. package/styles/treegrid/material3.css +1 -2
  52. package/styles/treegrid/tailwind-dark.css +1 -2
  53. package/styles/treegrid/tailwind.css +1 -2
@@ -1,10 +1,10 @@
1
1
  /*!
2
2
  * filename: ej2-treegrid.min.js
3
- * version : 24.1.46
3
+ * version : 24.2.4
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
7
7
  * licensing@syncfusion.com. Any infringement will be prosecuted under
8
8
  * applicable laws.
9
9
  */
10
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionGrids"),require("SyncfusionBase"),require("SyncfusionData"),require("SyncfusionPopups"),require("SyncfusionButtons")):"function"==typeof define&&define.amd?define(["SyncfusionGrids","SyncfusionBase","SyncfusionData","SyncfusionPopups","SyncfusionButtons"],t):"object"==typeof exports?exports.SyncfusionTreegrid=t(require("SyncfusionGrids"),require("SyncfusionBase"),require("SyncfusionData"),require("SyncfusionPopups"),require("SyncfusionButtons")):e.SyncfusionTreegrid=t(e.SyncfusionGrids,e.SyncfusionBase,e.SyncfusionData,e.SyncfusionPopups,e.SyncfusionButtons)}(this,function(e,t,i,r,n){return function(e){function t(r){if(i[r])return i[r].exports;var n=i[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,r){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=27)}([function(t,i){t.exports=e},function(e,i){e.exports=t},function(e,t,i){"use strict";i.d(t,"K",function(){return r}),i.d(t,"J",function(){return n}),i.d(t,"L",function(){return o}),i.d(t,"D",function(){return a}),i.d(t,"M",function(){return s}),i.d(t,"v",function(){return d}),i.d(t,"N",function(){return l}),i.d(t,"h",function(){return p}),i.d(t,"O",function(){return c}),i.d(t,"E",function(){return h}),i.d(t,"j",function(){return u}),i.d(t,"F",function(){return g}),i.d(t,"G",function(){return f}),i.d(t,"I",function(){return y}),i.d(t,"H",function(){return m}),i.d(t,"P",function(){return v}),i.d(t,"Q",function(){return S}),i.d(t,"R",function(){return I}),i.d(t,"S",function(){return w}),i.d(t,"T",function(){return R}),i.d(t,"U",function(){return x}),i.d(t,"b",function(){return C}),i.d(t,"a",function(){return b}),i.d(t,"V",function(){return D}),i.d(t,"W",function(){return M}),i.d(t,"X",function(){return O}),i.d(t,"C",function(){return P}),i.d(t,"Y",function(){return E}),i.d(t,"Z",function(){return A}),i.d(t,"k",function(){return N}),i.d(t,"l",function(){return _}),i.d(t,"m",function(){return k}),i.d(t,"n",function(){return U}),i.d(t,"o",function(){return q}),i.d(t,"x",function(){return V}),i.d(t,"r",function(){return B}),i.d(t,"_0",function(){return T}),i.d(t,"p",function(){return L}),i.d(t,"y",function(){return j}),i.d(t,"A",function(){return z}),i.d(t,"z",function(){return F}),i.d(t,"B",function(){return G}),i.d(t,"w",function(){return H}),i.d(t,"q",function(){return Q}),i.d(t,"_1",function(){return K}),i.d(t,"s",function(){return W}),i.d(t,"_2",function(){return Y}),i.d(t,"d",function(){return J}),i.d(t,"c",function(){return X}),i.d(t,"e",function(){return Z}),i.d(t,"f",function(){return $}),i.d(t,"t",function(){return ee}),i.d(t,"u",function(){return te}),i.d(t,"_3",function(){return ie}),i.d(t,"_4",function(){return re}),i.d(t,"_5",function(){return ne}),i.d(t,"_6",function(){return oe}),i.d(t,"_7",function(){return ae}),i.d(t,"_8",function(){return se}),i.d(t,"_9",function(){return de}),i.d(t,"_10",function(){return le}),i.d(t,"_11",function(){return pe}),i.d(t,"_12",function(){return ce}),i.d(t,"i",function(){return he}),i.d(t,"_13",function(){return ue}),i.d(t,"_14",function(){return ge}),i.d(t,"_15",function(){return fe}),i.d(t,"_16",function(){return ye}),i.d(t,"_17",function(){return me}),i.d(t,"_18",function(){return ve}),i.d(t,"_19",function(){return Se}),i.d(t,"_20",function(){return Ie}),i.d(t,"_21",function(){return we}),i.d(t,"_22",function(){return Re}),i.d(t,"_23",function(){return xe}),i.d(t,"_24",function(){return Ce}),i.d(t,"_25",function(){return be}),i.d(t,"g",function(){return De}),i.d(t,"_26",function(){return Me});var r="load",n="rowDataBound",o="dataBound",a="queryCellInfo",s="beforeDataBound",d="actionBegin",l="dataStateChange",p="actionComplete",c="rowSelecting",h="rowSelected",u="checkboxChange",g="rowDeselected",f="toolbarClick",y="beforeExcelExport",m="beforePdfExport",v="resizeStop",S="expanded",I="expanding",w="collapsed",R="collapsing",x="remoteExpand",C="localPagedExpandCollapse",b="pagingActions",D="printGrid-Init",M="contextMenuOpen",O="contextMenuClick",P="beforeCopy",E="beforePaste",A="savePreviousRowPosition",N="crudAction",_="beginEdit",k="beginAdd",U="recordDoubleClick",q="cellSave",V="cellSaved",B="cellEdit",T="batchDelete",L="batchCancel",j="batchAdd",z="beforeBatchDelete",F="beforeBatchAdd",G="beforeBatchSave",H="batchSave",Q="key-pressed",K="update-data",W="double-tap",Y="virtualColumnIndex",J="virtual-action-args",X="destroy",Z="data-listener",$="index-modifier",ee="edit-form",te="before-batch-cancel",ie="batcheditform-rendered",re="detailDataBound",ne="rowDrag",oe="rowDragStartHelper",ae="rowDrop",se="rowDragStart",de="rows-add",le="rows-remove",pe="row-draging",ce="row-dropped",he="auto-col",ue="rowDeselecting",ge="e-headercontent",fe="e-movablecontent",ye="e-movableheader",me="e-frozencontent",ve="e-frozenheader",Se="e-content",Ie="e-table",we="Left-Right",Re="frozen-right",xe="frozen-left",Ce="data-colindex",be="aria-colindex",De="data-rowindex",Me="aria-rowindex"},function(e,t,i){"use strict";function r(e){if(e.dataSource instanceof y.DataManager){var t=e.dataSource.adaptor;return t instanceof y.ODataAdaptor||t instanceof y.WebApiAdaptor||t instanceof y.WebMethodAdaptor||t instanceof y.CacheAdaptor||t instanceof y.UrlAdaptor}return!1}function n(e){return!!(e.dataSource&&"result"in e.dataSource)}function o(e){for(var t=0;t<e.columns.length;t++)if(e.columns[parseInt(t.toString(),10)].showCheckbox)return!0;return!1}function a(e){return!((i.i(m.isNullOrUndefined)(e.grid.searchSettings.key)||""===e.grid.searchSettings.key||"Child"!==e.searchSettings.hierarchyMode&&"None"!==e.searchSettings.hierarchyMode)&&(!e.allowFiltering||!e.grid.filterSettings.columns.length||"Child"!==e.filterSettings.hierarchyMode&&"None"!==e.filterSettings.hierarchyMode))}function s(e){for(var t=[],r=Object.keys(e).length,n=0,o=r;n<o;n++){i.i(f.getObject)("hasChildRecords",e[parseInt(n.toString(),10)])&&t.push(e[parseInt(n.toString(),10)])}return t}function d(e,t,r){var n,o=i.i(m.isNullOrUndefined)(t.parentItem)?null:u(e,t.parentItem.uniqueID);return null==o||(!e.initialRender||i.i(m.isNullOrUndefined)(o[e.expandStateMapping])||o[e.expandStateMapping]?!1!==o.expanded&&(!o.parentItem||(n=u(e,o.parentItem.uniqueID),n&&e.initialRender&&!i.i(m.isNullOrUndefined)(n[e.expandStateMapping])&&!n[e.expandStateMapping]?(n.expanded=!1,!1):(!n||!1!==n.expanded)&&(!n||d(e,n,r)))):(o.expanded=!1,!1))}function l(e){var t=[];if(i.i(m.isNullOrUndefined)(e)||!e.hasChildRecords&&!i.i(m.isNullOrUndefined)(e.childRecords)&&!e.childRecords.length)return[];if(!i.i(m.isNullOrUndefined)(e.childRecords))for(var r=e.childRecords.filter(function(e){return!e.isSummaryRow}),n=Object.keys(r),o=0,a=n.length;o<a;o++)t.push(r[parseInt(o.toString(),10)]),(r[parseInt(o.toString(),10)].hasChildRecords||!i.i(m.isNullOrUndefined)(r[parseInt(o.toString(),10)].childRecords)&&r[parseInt(o.toString(),10)].childRecords.length)&&(t=t.concat(l(r[parseInt(o.toString(),10)])));return t}function p(e){if(r(e)){var t=e.dataSource;return!i.i(m.isNullOrUndefined)(t.ready)}return!0}function c(e){for(var t,i,r=[],n=0;e&&n<e.length;n++){i=Object.keys(e[parseInt(n.toString(),10)]),t={};for(var o=0;o<i.length;o++)t[i[parseInt(o.toString(),10)]]=e[parseInt(n.toString(),10)][i[parseInt(o.toString(),10)]];r.push(t)}return r}function h(e){return delete e.hasChildRecords,delete e.childRecords,delete e.index,delete e.parentItem,delete e.level,delete e.taskData,delete e.uniqueID,e}function u(e,t,i){if(i){return e.uniqueIDFilterCollection[""+t]}return e.uniqueIDCollection[""+t]}function g(e){var t=window.getComputedStyle(e);return"none"===t.display||"hidden"===t.visibility}t.a=r,t.b=n,t.c=o,t.d=a,t.e=s,t.f=d,t.g=l,t.h=p,t.i=c,t.j=h,t.k=u,t.l=g;var f=i(0),y=(i.n(f),i(4)),m=(i.n(y),i(1));i.n(m)},function(e,t){e.exports=i},function(e,t,i){"use strict";function r(e,t,r,p,c,h,u){var g,f,y,m=e.value,v=e.action,S=t.grid.getPrimaryKeyFieldNames()[0],I=t.dataSource instanceof d.DataManager?t.dataSource.dataSource.json:t.dataSource,w=[],R=m,x=!1;if("Batch"===t.editSettings.mode&&(y=t.grid.editModule.getBatchChanges()),"add"===v||"batchsave"===v&&"Batch"===t.editSettings.mode&&y.addedRecords.length){var C=n(e,I,t,r,p,c,u);m=C.value,x=C.isSkip}if(m instanceof Array?w=i.i(l.i)(m):w.push(i.i(s.extend)({},m)),!x&&("add"!==v||"Top"!==t.editSettings.newRowPosition&&"Bottom"!==t.editSettings.newRowPosition))for(var b=0;b<w.length;b++){"object"==typeof w[parseInt(b.toString(),10)][""+S]&&(w[parseInt(b.toString(),10)]=w[parseInt(b.toString(),10)][""+S]);var D=w[parseInt(b.toString(),10)].taskData?Object.keys(w[parseInt(b.toString(),10)].taskData):Object.keys(w[parseInt(b.toString(),10)]);g=I.length;for(;g--&&g>=0;){var M=function(){if(I[parseInt(g.toString(),10)][""+S]===w[parseInt(b.toString(),10)][""+S]){if("delete"!==v){if("edit"===v){for(f=0;f<D.length;f++)if(Object.prototype.hasOwnProperty.call(I[parseInt(g.toString(),10)],D[parseInt(f.toString(),10)])&&("Cell"!==t.editSettings.mode||!i.i(s.isNullOrUndefined)(y)&&0===y.changedRecords.length||D[parseInt(f.toString(),10)]===h)){var e=i.i(l.k)(t,w[parseInt(b.toString(),10)].uniqueID);I[parseInt(g.toString(),10)][D[parseInt(f.toString(),10)]]=w[parseInt(b.toString(),10)][D[parseInt(f.toString(),10)]],e&&e.taskData&&(e.taskData[D[parseInt(f.toString(),10)]]=e[D[parseInt(f.toString(),10)]]=I[parseInt(g.toString(),10)][D[parseInt(f.toString(),10)]])}}else if("add"===v||"batchsave"===v){var n=void 0;"Child"===t.editSettings.newRowPosition?r?(R.taskData[""+t.parentIdMapping]=I[parseInt(g.toString(),10)][""+t.idMapping],I.splice(g+1,0,R.taskData)):(Object.prototype.hasOwnProperty.call(I[parseInt(g.toString(),10)],t.childMapping)||(I[parseInt(g.toString(),10)][""+t.childMapping]=[]),I[parseInt(g.toString(),10)][""+t.childMapping].push(R.taskData),a(S,I[parseInt(g.toString(),10)],v,t,r,R)):"Below"===t.editSettings.newRowPosition?(I.splice(g+1,0,R.taskData),i.i(s.isNullOrUndefined)(R.parentItem)||a(S,I[g+1],v,t,r,R)):p?"Above"===t.editSettings.newRowPosition&&(I.splice(g,0,R.taskData),i.i(s.isNullOrUndefined)(R.parentItem)||a(S,I[parseInt(g.toString(),10)],v,t,r,R)):(n=0,I.splice(n,0,R.taskData))}return"break"}var d=I[parseInt(g.toString(),10)];if(I.splice(g,1),r){if(!i.i(s.isNullOrUndefined)(d[""+t.parentIdMapping]))for(var c=t.flatData.filter(function(e){return e[""+t.idMapping]===d[""+t.parentIdMapping]})[0],u=c?c[""+t.childMapping]:[],m=u.length-1;m>=0;m--)if(u[parseInt(m.toString(),10)][""+t.idMapping]===d[""+t.idMapping]){t.enableImmutableMode||c.childRecords.length!==c.Children.length||c.childRecords.splice(m,1),u.splice(m,1),u.length||(c.hasChildRecords=!1,a(S,c,v,t,r));break}return"break"}}else i.i(s.isNullOrUndefined)(I[parseInt(g.toString(),10)][""+t.childMapping])||o(I[parseInt(g.toString(),10)][""+t.childMapping],w[parseInt(b.toString(),10)],v,S,t,r,R,h)&&a(S,I[parseInt(g.toString(),10)],v,t,r)}();if("break"===M)break}}}function n(e,t,r,n,o,a,d){var p,c=!1,h=r.grid.getCurrentViewRecords();switch(p=i.i(s.extend)({},e.value),p=i.i(l.j)(p),r.editSettings.newRowPosition){case"Top":t.unshift(p),c=!0;break;case"Bottom":t.push(p),c=!0;break;case"Above":i.i(s.isNullOrUndefined)(d)?(p=i.i(s.extend)({},h[o+1]),p=i.i(l.j)(p)):(p=i.i(s.extend)({},d),p=i.i(l.j)(p));break;case"Below":case"Child":if(i.i(s.isNullOrUndefined)(d)){var u=r.grid.getPrimaryKeyFieldNames()[0],g=h[parseInt(o.toString(),10)];p=!i.i(s.isNullOrUndefined)(g)&&g[""+u]===e.value[""+u]||-1!==a?i.i(s.extend)({},g):i.i(s.extend)({},e.value),p=i.i(l.j)(p);r.editModule.internalProperties.taskData=p}else p=i.i(s.extend)({},d),p=i.i(l.j)(p);-1===a&&(t.unshift(p),c=!0)}return{value:p,isSkip:c}}function o(e,t,r,n,d,p,c,h){for(var u=!1,g=e.length;g--&&g>=0;)if(e[parseInt(g.toString(),10)][""+n]===t[""+n]||p&&e[parseInt(g.toString(),10)][d.parentIdMapping]===t[d.idMapping]){if("edit"===r){for(var f=Object.keys(t),y=i.i(l.k)(d,t.uniqueID),m=0;m<f.length;m++)if(Object.prototype.hasOwnProperty.call(e[parseInt(g.toString(),10)],f[parseInt(m.toString(),10)])&&("Cell"!==d.editSettings.mode||f[parseInt(m.toString(),10)]===h)&&(y[f[parseInt(m.toString(),10)]]=y.taskData[f[parseInt(m.toString(),10)]]=e[parseInt(g.toString(),10)][f[parseInt(m.toString(),10)]]=t[f[parseInt(m.toString(),10)]],"Normal"===d.grid.editSettings.mode&&"Cell"===d.editSettings.mode)){d.grid.editModule.editModule.editRowIndex=t.index,d.grid.editModule.editModule.updateCurrentViewData(t)}break}"add"===r||"batchsave"===r?"Child"===d.editSettings.newRowPosition?p?(c[""+d.parentIdMapping]=e[parseInt(g.toString(),10)][d.idMapping],e.splice(g+1,0,c),a(n,e[parseInt(g.toString(),10)],r,d,p,c)):(Object.prototype.hasOwnProperty.call(e[parseInt(g.toString(),10)],d.childMapping)||(e[parseInt(g.toString(),10)][d.childMapping]=[]),e[parseInt(g.toString(),10)][d.childMapping].push(c.taskData),a(n,e[parseInt(g.toString(),10)],r,d,p,c)):"Above"===d.editSettings.newRowPosition?(e.splice(g,0,c.taskData),i.i(s.isNullOrUndefined)(c.parentItem)||a(n,e[parseInt(g.toString(),10)],r,d,p,c)):"Below"===d.editSettings.newRowPosition&&(e.splice(g+1,0,c.taskData),i.i(s.isNullOrUndefined)(c.parentItem)||a(n,e[parseInt(g.toString(),10)],r,d,p,c)):(e.splice(g,1),e.length||(u=!0))}else i.i(s.isNullOrUndefined)(e[parseInt(g.toString(),10)][d.childMapping])||o(e[parseInt(g.toString(),10)][d.childMapping],t,r,n,d,p,c,h)&&a(n,e[parseInt(g.toString(),10)],r,d,p);return u}function a(e,t,r,n,o,a){if("Above"!==n.editSettings.newRowPosition&&"Below"!==n.editSettings.newRowPosition||"add"!==r&&"batchsave"!==r||i.i(s.isNullOrUndefined)(a.parentItem)){var p,c=n.grid.getCurrentViewRecords();if(c.map(function(i,r){if(i[""+e]===t[""+e])return void(p=r)}),n.enableVirtualization&&i.i(s.isNullOrUndefined)(p)){var h=i.i(s.getValue)("uniqueIDCollection."+a.parentUniqueID,n);t=h}if(i.i(s.isNullOrUndefined)(p)||(t=c[parseInt(p.toString(),10)]),n.enableVirtualization&&i.i(s.isNullOrUndefined)(t)&&!i.i(s.isNullOrUndefined)(a)&&(t=i.i(s.getValue)("uniqueIDCollection."+a.parentUniqueID,n)),o||i.i(s.isNullOrUndefined)(t.childRecords)||!t.childRecords.length?t.hasChildRecords=!1:t.hasChildRecords=!0,"add"===r||"batchsave"===r){t.expanded=!0,t.hasChildRecords=!0,n.sortSettings.columns.length&&i.i(s.isNullOrUndefined)(a)&&(a=c.filter(function(e){return e.parentUniqueID===t.uniqueID?e:null}));var u=a?a instanceof Array?a[0]:a:c[p+1];"Below"!==n.editSettings.newRowPosition&&(Object.prototype.hasOwnProperty.call(t,"childRecords")?i.i(s.isNullOrUndefined)(a)||t[""+e]===a[""+e]||t.childRecords.push(a):t.childRecords=[],-1===t.childRecords.indexOf(u)&&t[""+e]!==a[""+e]&&t.childRecords.unshift(u),o&&(Object.prototype.hasOwnProperty.call(t,n.childMapping)||(t[n.childMapping]=[]),-1===t[""+n.childMapping].indexOf(u)&&t[""+e]!==a[""+e]&&t[n.childMapping].unshift(u)))}for(var g=n.grid.getPrimaryKeyFieldNames()[0],f=n.grid.dataSource instanceof d.DataManager?n.grid.dataSource.dataSource.json:n.grid.dataSource,y=0;y<f.length;y++)if(f[parseInt(y.toString(),10)][""+g]===t[""+g]){f[parseInt(y.toString(),10)]=t;break}n.grid.setRowData(e,t);var m=n.getRowByIndex(p);"Batch"===n.editSettings.mode&&(m="add"===r?n.getRows()[n.grid.getCurrentViewRecords().indexOf(t)]:n.getRows()[n.grid.getRowIndexByPrimaryKey(t[""+e])]);var v=void 0;if((n.frozenRows||n.getFrozenColumns())&&(v=n.getRowByIndex(p)),!n.enableVirtualization&&!i.i(s.isNullOrUndefined)(m)||!i.i(s.isNullOrUndefined)(v)){var S=n.treeColumnIndex;n.allowRowDragAndDrop&&n.enableImmutableMode&&(S+=1),n.renderModule.cellRender({data:t,cell:m.cells[parseInt(S.toString(),10)]?m.cells[parseInt(S.toString(),10)]:v.cells[S-n.getFrozenColumns()],column:n.grid.getColumns()[n.treeColumnIndex],requestType:r}),(n.enableImmutableMode&&"indenting"===n.action||"outdenting"===n.action)&&n.renderModule.RowModifier({data:t,row:m})}}else{i.i(l.k)(n,a.parentItem.uniqueID).childRecords.push(a)}}t.a=r,t.b=a;var s=i(1),d=(i.n(s),i(4)),l=(i.n(d),i(3))},function(e,t){e.exports=r},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(2),n=i(1),o=(i.n(n),i(0)),a=(i.n(o),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),s=function(e){function t(t,i){var r=e.call(this,t.grid,i)||this;return r.treeCopyContent="",r.copiedUniqueIdCollection=[],r.treeGridParent=t,r.serviceLocator=i,r}return a(t,e),t.prototype.setCopyData=function(t){var i=this.treeGridParent.getCurrentViewRecords();if(""===window.getSelection().toString()){this.clipBoardTextArea.value=this.copyContent="";var o=this.treeGridParent.grid.getRows();if("Cell"!==this.treeGridParent.selectionSettings.mode){for(var a=this.treeGridParent.getSelectedRowIndexes().sort(function(e,t){return e-t}),s=0;s<a.length;s++)if(s>0&&(this.treeCopyContent+="\n"),!o[a[parseInt(s.toString(),10)]].classList.contains("e-summaryrow")){var d=[].slice.call(o[a[parseInt(s.toString(),10)]].querySelectorAll(".e-rowcell")),l=this.treeGridParent.getSelectedRecords()[parseInt(s.toString(),10)].uniqueID;-1===this.copiedUniqueIdCollection.indexOf(l)&&("Parent"!==this.treeGridParent.copyHierarchyMode&&"Both"!==this.treeGridParent.copyHierarchyMode||this.parentContentData(i,a[parseInt(s.toString(),10)],o,t,s),this.getCopyData(d,!1,"\t",t),this.treeCopyContent+=this.copyContent,this.copiedUniqueIdCollection.push(l),this.copyContent="","Child"!==this.treeGridParent.copyHierarchyMode&&"Both"!==this.treeGridParent.copyHierarchyMode||this.childContentData(i,a[parseInt(s.toString(),10)],o,t))}if(t){for(var p=[],s=0;s<this.treeGridParent.getVisibleColumns().length;s++)p[parseInt(s.toString(),10)]=this.treeGridParent.getVisibleColumns()[parseInt(s.toString(),10)].headerText;this.getCopyData(p,!1,"\t",t),this.treeCopyContent=this.copyContent+"\n"+this.treeCopyContent}var c={data:this.treeCopyContent,cancel:!1};if(this.treeGridParent.trigger(r.C,c),c.cancel)return;this.clipBoardTextArea.value=this.copyContent=c.data,n.Browser.userAgent.match(/ipad|ipod|iphone/i)?this.clipBoardTextArea.setSelectionRange(0,this.clipBoardTextArea.value.length):this.clipBoardTextArea.select(),this.isSelect=!0,this.copiedUniqueIdCollection=[],this.treeCopyContent=""}else e.prototype.setCopyData.call(this,t)}},t.prototype.parentContentData=function(e,t,r,o,a){if(!i.i(n.isNullOrUndefined)(e[parseInt(t.toString(),10)].parentItem))for(var s=e[parseInt(t.toString(),10)].parentItem.level,d=0;d<s+1;d++)for(var l=0;l<e.length;l++)if(!i.i(n.isNullOrUndefined)(e[parseInt(t.toString(),10)].parentItem)&&e[parseInt(l.toString(),10)].uniqueID===e[parseInt(t.toString(),10)].parentItem.uniqueID){t=l;var p=[].slice.call(r[parseInt(t.toString(),10)].querySelectorAll(".e-rowcell")),c=e[parseInt(l.toString(),10)].uniqueID;if(-1===this.copiedUniqueIdCollection.indexOf(c)){this.getCopyData(p,!1,"\t",o),this.treeCopyContent=a>0?this.treeCopyContent+this.copyContent+"\n":this.copyContent+"\n"+this.treeCopyContent,this.copiedUniqueIdCollection.push(c),this.copyContent="";break}}},t.prototype.copy=function(t){e.prototype.copy.call(this,t)},t.prototype.paste=function(t,i,r){e.prototype.paste.call(this,t,i,r)},t.prototype.getModuleName=function(){return"clipboard"},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.childContentData=function(e,t,r,o){if(e[parseInt(t.toString(),10)].hasChildRecords)for(var a=e[parseInt(t.toString(),10)].childRecords,s=0;s<a.length;s++)for(var d=0;d<e.length;d++)if(!i.i(n.isNullOrUndefined)(a[parseInt(s.toString(),10)].uniqueID)&&e[parseInt(d.toString(),10)].uniqueID===a[parseInt(s.toString(),10)].uniqueID){if(!i.i(n.isNullOrUndefined)(r[parseInt(d.toString(),10)])&&!r[parseInt(d.toString(),10)].classList.contains("e-summaryrow")){var l=[].slice.call(r[parseInt(d.toString(),10)].querySelectorAll(".e-rowcell")),p=e[parseInt(d.toString(),10)].uniqueID;-1===this.copiedUniqueIdCollection.indexOf(p)&&(this.getCopyData(l,!1,"\t",o),this.treeCopyContent+="\n"+this.copyContent,this.copyContent="",this.copiedUniqueIdCollection.push(p),this.childContentData(e,d,r,o))}break}},t}(o.Clipboard)},function(e,t,i){"use strict";i.d(t,"a",function(){return l}),i.d(t,"b",function(){return p});var r=i(1),n=(i.n(r),i(0)),o=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a="https://ej2.syncfusion.com/documentation/treegrid",s="https://ej2.syncfusion.com/documentation",d=!1,l=function(e){function t(t){return n.Grid.Inject(n.Logger),e.call(this,t)||this}return o(t,e),t.prototype.getModuleName=function(){return"logger"},t.prototype.log=function(e,t){e instanceof Array||(e=[e]);for(var o=e,l=0;l<o.length;l++){var p=n.detailLists[o[parseInt(l.toString(),10)]],c=p.check(t,this.parent);if(c.success){var h=p.generateMessage(t,this.parent,c.options);h=h.replace("EJ2Grid","EJ2TreeGrid").replace("* Hierarchy Grid","").replace("* Grouping",""),d&&"primary_column_missing"===o[parseInt(l.toString(),10)]&&(h=h.replace("Editing","Row DragAndDrop"),d=!1);var u=h.indexOf("https"),g=h.substring(u);"module_missing"===o[parseInt(l.toString(),10)]?h=h.replace(g,a+"/modules"):"primary_column_missing"===o[parseInt(l.toString(),10)]||"selection_key_missing"===o[parseInt(l.toString(),10)]?h=h.replace(g,s+"/api/treegrid/column/#isprimarykey"):"grid_remote_edit"===o[parseInt(l.toString(),10)]?h=h.replace(g,a+"/edit"):"virtual_height"===o[parseInt(l.toString(),10)]?h=h.replace(g,a+"/virtual"):"check_datasource_columns"===o[parseInt(l.toString(),10)]?h=h.replace(g,a+"/columns"):"locale_missing"===o[parseInt(l.toString(),10)]&&(h=h.replace(g,a+"/global-local/#localization")),"datasource_syntax_mismatch"===o[parseInt(l.toString(),10)]?i.i(r.isNullOrUndefined)(this.treeGridObj)||i.i(r.isNullOrUndefined)(this.treeGridObj.dataStateChange)||console[p.logType](h):console[p.logType](h)}}},t.prototype.treeLog=function(e,t,i){this.treeGridObj=i,e instanceof Array||(e=[e]);var r=e;i.allowRowDragAndDrop&&!i.columns.filter(function(e){return e.isPrimaryKey}).length&&(d=!0,this.log("primary_column_missing",t));for(var n=0;n<r.length;n++){var o=p[r[parseInt(n.toString(),10)]],a=o.check(t,i);if(a.success){var s=o.generateMessage(t,i,a.options);console[o.logType](s)}}},t}(n.Logger),p={mapping_fields_missing:{type:"mapping_fields_missing",logType:"error",check:function(e,t){var n={success:!1};return(i.i(r.isNullOrUndefined)(t.idMapping)&&i.i(r.isNullOrUndefined)(t.childMapping)&&i.i(r.isNullOrUndefined)(t.parentIdMapping)||!i.i(r.isNullOrUndefined)(t.idMapping)&&i.i(r.isNullOrUndefined)(t.parentIdMapping)||i.i(r.isNullOrUndefined)(t.idMapping)&&!i.i(r.isNullOrUndefined)(t.parentIdMapping))&&(n={success:!0}),n},generateMessage:function(){return"[EJ2TreeGrid.Error]: MAPPING FIELDS MISSING \nOne of the following fields is missing. It is required for the hierarchical relationship of records in TreeGrid:\n* childMapping\n* idMapping\n* parentIdMapping\nRefer to the following documentation links for more details.\n"+s+"/api/treegrid#childmapping\n"+s+"/api/treegrid#idmapping\n"+s+"/api/treegrid#$parentidmapping"}}}},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){r.Grid.Inject(r.Reorder),this.parent=e,this.addEventListener()}return e.prototype.getModuleName=function(){return"reorder"},e.prototype.addEventListener=function(){this.parent.on("getColumnIndex",this.getTreeColumn,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off("getColumnIndex",this.getTreeColumn)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.getTreeColumn=function(){for(var e,t=this.parent.columnModel[this.parent.treeColumnIndex],n=this.parent.getColumns(),o=0;o<n.length;o++){if(i.i(r.getObject)("field",t)===i.i(r.getObject)("field",n[parseInt(o.toString(),10)])){e=o;break}}this.parent.setProperties({treeColumnIndex:e},!0)},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){r.Grid.Inject(r.Resize),this.parent=e}return e.prototype.autoFitColumns=function(e){this.parent.grid.autoFitColumns(e)},e.prototype.getModuleName=function(){return"resize"},e.prototype.destroy=function(){this.parent.isDestroyed||this.parent.grid.resizeModule.destroy()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(1),n=(i.n(r),i(55)),o=(i.n(n),i(0)),a=(i.n(o),i(2)),s=i(3),d=function(){function e(e){this.parent=e,this.selectedItems=[],this.selectedIndexes=[],this.filteredList=[],this.searchingRecords=[],this.addEventListener()}return e.prototype.getModuleName=function(){return"selection"},e.prototype.addEventListener=function(){this.parent.on("dataBoundArg",this.headerCheckbox,this),this.parent.on("columnCheckbox",this.columnCheckbox,this),this.parent.on("updateGridActions",this.updateGridActions,this),this.parent.grid.on("colgroup-refresh",this.headerCheckbox,this),this.parent.on("checkboxSelection",this.checkboxSelection,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("dataBoundArg",this.headerCheckbox),this.parent.off("columnCheckbox",this.columnCheckbox),this.parent.grid.off("colgroup-refresh",this.headerCheckbox),this.parent.off("checkboxSelection",this.checkboxSelection),this.parent.off("updateGridActions",this.updateGridActions))},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.checkboxSelection=function(e){var t,r=i.i(o.getObject)("target",e),n=i.i(o.parentsUntil)(r,"e-checkbox-wrapper");if(n&&n.querySelectorAll(".e-treecheckselect").length>0){t=n.querySelector('input[type="checkbox"]');var a=[];a.push(r.closest("tr").rowIndex),this.selectCheckboxes(a),this.triggerChkChangeEvent(t,t.nextElementSibling.classList.contains("e-check"),r.closest("tr"))}else if(n&&n.querySelectorAll(".e-treeselectall").length>0&&this.parent.autoCheckHierarchy){var s=!n.querySelector(".e-frame").classList.contains("e-check")&&!n.querySelector(".e-frame").classList.contains("e-stop");this.headerSelection(s),t=n.querySelector('input[type="checkbox"]'),this.triggerChkChangeEvent(t,s,r.closest("tr"))}},e.prototype.triggerChkChangeEvent=function(e,t,i){var r=this.parent.getCurrentViewRecords()[i.rowIndex],n={checked:t,target:e,rowElement:i,rowData:e.classList.contains("e-treeselectall")?this.parent.getCheckedRecords():r};this.parent.trigger(a.j,n)},e.prototype.getCheckboxcolumnIndex=function(){for(var e,t,i=this.parent.stackedHeader?this.parent.columnModel:this.parent.columns,r=0;r<i.length;r++)i[parseInt(r.toString(),10)].showCheckbox&&(e=i[parseInt(r.toString(),10)].uid);for(var n=this.parent.getHeaderContent().querySelectorAll(".e-headercelldiv").length,o=0;o<n;o++){this.parent.getHeaderContent().querySelectorAll(".e-headercelldiv")[parseInt(o.toString(),10)].getAttribute("e-mappinguid")===e&&(t=o)}return t},e.prototype.headerCheckbox=function(){if(this.columnIndex=this.getCheckboxcolumnIndex(),this.columnIndex>-1&&0===this.parent.getHeaderContent().querySelectorAll(".e-treeselectall").length){var e=this.parent.getHeaderContent().querySelectorAll(".e-headercelldiv")[this.columnIndex],t=this.parent.createElement("input",{className:"e-treeselectall",attrs:{type:"checkbox"}}),o=i.i(n.createCheckBox)(this.parent.createElement,!1,{checked:!1,label:" "});o.classList.add("e-hierarchycheckbox"),o.insertBefore(t.cloneNode(),o.firstChild),i.i(r.isNullOrUndefined)(e)||e.insertBefore(o,e.firstChild),this.parent.autoCheckHierarchy&&this.headerSelection()}else if(this.columnIndex>-1&&this.parent.getHeaderContent().querySelectorAll(".e-treeselectall").length>0){var o=this.parent.getHeaderContent().querySelectorAll(".e-checkbox-wrapper")[0],a=o.querySelector(".e-frame").classList.contains("e-check");this.parent.autoCheckHierarchy&&a&&this.headerSelection(a)}},e.prototype.renderColumnCheckbox=function(e){var t=this.parent.createElement("input",{className:"e-treecheckselect",attrs:{type:"checkbox","aria-label":"checkbox"}}),o=e.data;e.cell.classList.add("e-treegridcheckbox"),e.cell.setAttribute("aria-label","checkbox");var a=!i.i(r.isNullOrUndefined)(o.checkboxState)&&"uncheck"!==o.checkboxState,s=i.i(n.createCheckBox)(this.parent.createElement,!1,{checked:a,label:" "});if(s.classList.add("e-hierarchycheckbox"),this.parent.allowTextWrap&&(s.querySelector(".e-frame").style.width="18px"),"indeterminate"===o.checkboxState){var d=s.querySelectorAll(".e-frame")[0];i.i(r.removeClass)([d],["e-check","e-stop","e-uncheck"]),s.querySelector(".e-frame").classList.add("e-stop")}return s.insertBefore(t.cloneNode(),s.firstChild),s},e.prototype.columnCheckbox=function(e){var t=this.renderColumnCheckbox(e),n=e.cell.querySelector(".e-treecolumn-container");if(i.i(r.isNullOrUndefined)(n)){var o=this.parent.createElement("span",{className:"e-treecheckbox"}),a=e.cell.innerHTML;e.cell.innerHTML="",o.innerHTML=a;var s=this.parent.createElement("div",{className:"e-treecheckbox-container"});s.appendChild(t),s.appendChild(o),e.cell.appendChild(s)}else e.cell.querySelector(".e-hierarchycheckbox")||n.insertBefore(t,n.querySelectorAll(".e-treecell")[0])},e.prototype.selectCheckboxes=function(e){for(var t=0;t<e.length;t++){var r=this.parent.getCurrentViewRecords()[e[parseInt(t.toString(),10)]],n=i.i(s.k)(this.parent,r.uniqueID);r=n;var o="uncheck"===r.checkboxState?"check":"uncheck";r.checkboxState=o;for(var a=Object.keys(r),d=0;d<a.length;d++)Object.prototype.hasOwnProperty.call(n,a[parseInt(d.toString(),10)])&&(n[a[parseInt(d.toString(),10)]]=r[a[parseInt(d.toString(),10)]]);this.traverSelection(r,o,!1),this.parent.autoCheckHierarchy&&this.headerSelection()}},e.prototype.traverSelection=function(e,t,n){var o=0;if(this.updateSelectedItems(e,t),!n&&e.parentItem&&this.parent.autoCheckHierarchy&&this.updateParentSelection(e.parentItem),e.childRecords&&this.parent.autoCheckHierarchy){var a=e.childRecords;!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.parent.filterModule.filteredResult.length>0&&this.parent.autoCheckHierarchy&&(a=this.getFilteredChildRecords(a)),o=a.length;for(var s=0;s<o;s++)a[parseInt(s.toString(),10)].isSummaryRow||(a[parseInt(s.toString(),10)].hasChildRecords?this.traverSelection(a[parseInt(s.toString(),10)],t,!0):this.updateSelectedItems(a[parseInt(s.toString(),10)],t))}},e.prototype.getFilteredChildRecords=function(e){var t=this;return e.filter(function(e){return t.parent.filterModule.filteredResult.indexOf(e)>-1})},e.prototype.updateParentSelection=function(e){var t=0,n=[],o=i.i(s.k)(this.parent,e.uniqueID);o&&o.childRecords&&(n=o.childRecords),!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.parent.filterModule.filteredResult.length>0&&this.parent.autoCheckHierarchy&&(n=this.getFilteredChildRecords(n)),t=n&&n.length;var a=0,d=0;if(!i.i(r.isNullOrUndefined)(o)){for(var l=0;l<n.length;l++){var p=i.i(s.k)(this.parent,n[parseInt(l.toString(),10)].uniqueID),c=p;i.i(r.isNullOrUndefined)(c)||("indeterminate"===c.checkboxState?a++:"check"===c.checkboxState&&d++)}a>0||d>0&&d!==t?o.checkboxState="indeterminate":(0!==d||o.hasFilteredChildRecords&&!i.i(r.isNullOrUndefined)(o.hasFilteredChildRecords)||i.i(r.isNullOrUndefined)(this.parent.dataResults.actionArgs)||"searching"!==this.parent.dataResults.actionArgs.requestType&&"filtering"!==this.parent.dataResults.actionArgs.requestType||"check"!==o.checkboxState)&&(0===d&&0===a||0===d&&o.hasFilteredChildRecords&&!i.i(r.isNullOrUndefined)(this.parent.dataResults.actionArgs)&&("searching"===this.parent.dataResults.actionArgs.requestType||"filtering"===this.parent.dataResults.actionArgs.requestType)&&"check"===o.checkboxState)?o.checkboxState="uncheck":o.checkboxState="check",this.updateSelectedItems(o,o.checkboxState),o.parentItem&&this.updateParentSelection(o.parentItem)}},e.prototype.headerSelection=function(e){var t=this,n=0,o=!1;if(!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.parent.filterModule.filteredResult.length>0){var a=this.parent.filterModule.filteredResult;0===this.filteredList.length&&(this.filteredList=a),this.parent.grid.searchSettings.key.length?this.searchingRecords=a:this.filteredList!==a?(this.filteredList=a,o=!0):o=!1}this.filteredList.length>0&&(this.parent.filterSettings.columns.length||!this.filteredList.length||this.parent.grid.searchSettings.key.length||(this.filteredList=[]),this.searchingRecords.length&&!i.i(r.isNullOrUndefined)(e)&&(this.filteredList=this.searchingRecords));var d;if(d=!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&0===this.parent.filterModule.filteredResult.length&&0===this.parent.getCurrentViewRecords().length&&this.parent.filterSettings.columns.length>0?this.filteredList:!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.filteredList.length>0?this.filteredList:this.parent.flatData,d=i.i(s.a)(this.parent)?this.parent.getCurrentViewRecords():d,!i.i(r.isNullOrUndefined)(e))for(var l=0;l<d.length;l++)if(e){if("check"===d[parseInt(l.toString(),10)].checkboxState)continue;if(o)continue;d[parseInt(l.toString(),10)].checkboxState="check",this.updateSelectedItems(d[parseInt(l.toString(),10)],d[parseInt(l.toString(),10)].checkboxState)}else this.selectedItems.indexOf(d[parseInt(l.toString(),10)])>-1&&(d[parseInt(l.toString(),10)].checkboxState="uncheck",this.updateSelectedItems(d[parseInt(l.toString(),10)],d[parseInt(l.toString(),10)].checkboxState),this.parent.autoCheckHierarchy&&this.updateParentSelection(d[parseInt(l.toString(),10)]));!1===e&&this.parent.enableVirtualization&&(this.selectedItems=[],this.selectedIndexes=[],d.filter(function(e){e.checkboxState="uncheck",t.updateSelectedItems(e,e.checkboxState)})),n=this.selectedItems.length;var p=this.parent.getHeaderContent().querySelectorAll(".e-frame")[0];n>0&&d.length>0?n===d.length||e?(i.i(r.removeClass)([p],["e-stop"]),p.classList.add("e-check")):(i.i(r.removeClass)([p],["e-check"]),p.classList.add("e-stop")):i.i(r.removeClass)([p],["e-check","e-stop"])},e.prototype.updateSelectedItems=function(e,t){var n,o,a=this.parent.grid.currentViewData.filter(function(t){return t.uniqueID===e.uniqueID}),d=this.parent.grid.currentViewData.indexOf(a[0]),l=i.i(s.k)(this.parent,e.uniqueID),p=this.parent.getRows()[parseInt(d.toString(),10)];if(d>-1){var c=void 0;(this.parent.frozenRows||this.parent.getFrozenColumns())&&(c=this.parent.getDataRows()[parseInt(d.toString(),10)]),o=p.querySelectorAll(".e-hierarchycheckbox .e-frame")[0]?p.querySelectorAll(".e-hierarchycheckbox .e-frame")[0]:c.querySelectorAll(".e-hierarchycheckbox .e-frame")[0],i.i(r.isNullOrUndefined)(o)||i.i(r.removeClass)([o],["e-check","e-stop","e-uncheck"])}if(n=l,i.i(r.isNullOrUndefined)(n)&&(n=e),n.checkboxState=t,"check"===t&&i.i(r.isNullOrUndefined)(e.isSummaryRow))-1!==d&&-1===this.selectedIndexes.indexOf(d)&&this.selectedIndexes.push(d),-1===this.selectedItems.indexOf(n)&&-1!==d&&!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.parent.filterModule.filteredResult.length>0&&this.selectedItems.push(n),-1===this.selectedItems.indexOf(n)&&(this.parent.enableVirtualization||this.parent.allowPaging)&&!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.parent.filterModule.filteredResult.length>0&&this.selectedItems.push(n),-1!==this.selectedItems.indexOf(n)||i.i(r.isNullOrUndefined)(this.parent.filterModule)||0!==this.parent.filterModule.filteredResult.length||this.selectedItems.push(n),-1===this.selectedItems.indexOf(n)&&i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.selectedItems.push(n);else if(("uncheck"===t||"indeterminate"===t)&&i.i(r.isNullOrUndefined)(e.isSummaryRow)){var h=this.selectedItems.indexOf(n);if(-1!==h&&this.selectedItems.splice(h,1),-1!==this.selectedIndexes.indexOf(d)){var u=this.selectedIndexes.indexOf(d);this.selectedIndexes.splice(u,1)}}var g="indeterminate"===t?"e-stop":"e-"+t;if(d>-1&&!i.i(r.isNullOrUndefined)(o)){o.classList.add(g);p.querySelector(".e-treecheckselect").setAttribute("aria-checked","check"===t?"true":"uncheck"===t?"false":"mixed")}},e.prototype.updateGridActions=function(e){var t,n,o=this,a=e.requestType;if(i.i(s.c)(this.parent)&&this.parent.autoCheckHierarchy)if("sorting"===a||"paging"===a){var d=this.parent.grid.getRows();t=this.parent.getCurrentViewRecords(),n=t.length,this.selectedIndexes=[];for(var l=0;l<n;l++)d[parseInt(l.toString(),10)].classList.contains("e-summaryrow")||this.updateSelectedItems(t[parseInt(l.toString(),10)],t[parseInt(l.toString(),10)].checkboxState)}else if("delete"===a||"add"===e.action){var p=[];"delete"===a?p=e.data:p.push(e.data);for(var l=0;l<p.length;l++){if("delete"===a){var c=this.parent.flatData.indexOf(p[parseInt(l.toString(),10)]),h=this.selectedIndexes.indexOf(c);this.selectedIndexes.splice(h,1),this.updateSelectedItems(p[parseInt(l.toString(),10)],"uncheck")}i.i(r.isNullOrUndefined)(p[parseInt(l.toString(),10)].parentItem)||this.updateParentSelection(p[parseInt(l.toString(),10)].parentItem)}}else"add"===e.requestType&&this.parent.autoCheckHierarchy?e.data.checkboxState="uncheck":("filtering"===a||"searching"===a||"refresh"===a&&!i.i(s.a)(this.parent))&&(this.selectedItems=[],this.selectedIndexes=[],t=!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.parent.filterModule.filteredResult.length>0?this.parent.filterModule.filteredResult:this.parent.flatData,t.forEach(function(e){if(o.parent.enableVirtualization){e.hasChildRecords&&e.childRecords.length>0?o.updateParentSelection(e):o.updateSelectedItems(e,e.checkboxState);var t=i.i(s.g)(e);t=o.getFilteredChildRecords(t);for(var n=0;n<t.length;n++)t[parseInt(n.toString(),10)].hasChildRecords?o.updateParentSelection(t[parseInt(n.toString(),10)]):t[parseInt(n.toString(),10)].hasChildRecords||i.i(r.isNullOrUndefined)(t[parseInt(n.toString(),10)])||o.updateSelectedItems(t[parseInt(n.toString(),10)],t[parseInt(n.toString(),10)].checkboxState)}else e.hasChildRecords?o.updateParentSelection(e):o.updateSelectedItems(e,e.checkboxState)}),this.headerSelection())},e.prototype.getCheckedrecords=function(){return this.selectedItems},e.prototype.getCheckedRowIndexes=function(){return this.selectedIndexes},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(1),n=(i.n(r),i(4)),o=(i.n(n),i(6)),a=(i.n(o),i(0)),s=(i.n(a),i(3)),d=i(2),l=function(){function e(e){this.addedRecords="addedRecords",this.parent=e,this.parentItems=[],this.taskIds=[],this.hierarchyData=[],this.storedIndex=-1,this.sortedData=[],this.isSortAction=!1,this.addEventListener(),this.dataResults={},this.isSelfReference=!i.i(r.isNullOrUndefined)(this.parent.parentIdMapping)}return e.prototype.addEventListener=function(){this.parent.on("updateRemoteLevel",this.updateParentRemoteData,this),this.parent.grid.on("sorting-begin",this.beginSorting,this),this.parent.on("updateAction",this.updateData,this),this.parent.on(d.U,this.collectExpandingRecs,this),this.parent.on("dataProcessor",this.dataProcessor,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(d.U,this.collectExpandingRecs),this.parent.off("updateRemoteLevel",this.updateParentRemoteData),this.parent.off("updateAction",this.updateData),this.parent.off("dataProcessor",this.dataProcessor),this.parent.grid.off("sorting-begin",this.beginSorting))},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.isRemote=function(){return this.parent.dataSource instanceof n.DataManager},e.prototype.convertToFlatData=function(e){var t=this;if(this.parent.flatData=0!==Object.keys(e).length||this.parent.dataSource instanceof n.DataManager?[]:this.parent.dataSource,this.parent.parentData=[],i.i(s.a)(this.parent)&&!i.i(s.h)(this.parent)&&e instanceof n.DataManager&&!(e instanceof Array)){var o=this.parent.dataSource;if(this.parent.parentIdMapping){if(this.parent.query=i.i(r.isNullOrUndefined)(this.parent.query)?new n.Query:this.parent.query,this.parent.parentIdMapping){var a=this.parent.query.params.filter(function(e){return"IdMapping"===e.key});this.parent.initialRender&&!a.length&&(this.parent.query.where(this.parent.parentIdMapping,"equal",null),this.parent.query.addParams("IdMapping",this.parent.idMapping))}if(!this.parent.hasChildMapping){var d=this.parent.query.clone();d.queries=[],d=d.select([this.parent.parentIdMapping]),d.isCountRequired=!0,o.executeQuery(d).then(function(e){t.parentItems=n.DataUtil.distinct(e.result,t.parent.parentIdMapping,!1);var o;0===(o=e.result?0:1)&&(i.i(r.setValue)("grid.contentModule.isLoaded",!0,t.parent),i.i(r.isNullOrUndefined)(t.zerothLevelData)||(i.i(r.setValue)("cancel",!1,t.zerothLevelData),i.i(r.getValue)("grid.renderModule",t.parent).dataManagerSuccess(t.zerothLevelData),t.zerothLevelData=null),t.parent.grid.hideSpinner())})}}}else e instanceof Array&&this.convertJSONData(e)},e.prototype.convertJSONData=function(e){if(this.hierarchyData=[],this.taskIds=[],this.parent.idMapping)for(var t=Object.keys(e),o=0;o<t.length;o++){var a=e[parseInt(o.toString(),10)];this.hierarchyData.push(i.i(r.extend)({},a)),i.i(r.isNullOrUndefined)(a[this.parent.idMapping])||this.taskIds.push(a[this.parent.idMapping])}else this.hierarchyData=e;if(this.isSelfReference){for(var s=[],d=new n.DataManager(this.hierarchyData).executeLocal((new n.Query).group(this.parent.parentIdMapping)),o=0;o<d.length;o++){var l=d[parseInt(o.toString(),10)],p=this.taskIds.indexOf(l.key);if(!i.i(r.isNullOrUndefined)(l.key)&&p>-1){var c=l.items;this.hierarchyData[parseInt(p.toString(),10)][this.parent.childMapping]=c}else s.push.apply(s,l.items)}this.hierarchyData=this.selfReferenceUpdate(s)}if(Object.keys(this.hierarchyData).length)this.createRecords(this.hierarchyData);else{var h=!(this.parent.dataSource instanceof n.DataManager)&&this.parent.isGantt;this.parent.flatData=h?this.parent.dataSource:[]}this.storedIndex=-1},e.prototype.selfReferenceUpdate=function(e){for(var t=[];this.hierarchyData.length>0&&e.length>0;){var i=e.indexOf(this.hierarchyData[0]);-1===i?this.hierarchyData.shift():(t.push(this.hierarchyData.shift()),e.splice(i,1))}return t},e.prototype.updateParentRemoteData=function(e){i.i(s.a)(this.parent)&&this.parent.enableVirtualization&&"virtualscroll"===e.actionArgs.requestType&&this.parent.hideSpinner();var t=e.result;if(i.i(s.a)(this.parent)&&this.parent.enableVirtualization&&("virtualscroll"===e.actionArgs.requestType||"clearFilter"===e.actionArgs.action||""===e.actionArgs.searchString)&&(this.parent.query.expands=[]),this.parent.hasChildMapping||this.parentItems.length||this.parent.loadChildOnDemand)if(this.parent.loadChildOnDemand){i.i(r.isNullOrUndefined)(t)||this.parent.loadChildOnDemand&&i.i(s.b)(this.parent)&&!i.i(r.isNullOrUndefined)(this.parent.dataResults.expandRecord)||i.i(s.a)(this.parent)&&this.parent.loadChildOnDemand&&e.actionArgs.isExpandCollapse&&this.parent.enableVirtualization||this.convertToFlatData(t)}else for(var n=this,o=0;o<t.length;o++)!function(e){if(i.i(s.b)(n.parent)&&t[parseInt(e.toString(),10)].hasChildRecords&&n.parent.initialRender&&(t[parseInt(e.toString(),10)].expanded=!1),i.i(s.a)(n.parent)&&n.parent.enableVirtualization){var o=[],d=n.parent;t.filter(function(i){i[""+d.parentIdMapping]===t[parseInt(e.toString(),10)][""+d.idMapping]&&o.push(i)}),o.length?t[parseInt(e.toString(),10)].expanded=!0:t[parseInt(e.toString(),10)].hasChildRecords&&(t[parseInt(e.toString(),10)].expanded=!1)}i.i(r.isNullOrUndefined)(t[parseInt(e.toString(),10)].index)&&(t[parseInt(e.toString(),10)].taskData=i.i(r.extend)({},t[parseInt(e.toString(),10)]),t[parseInt(e.toString(),10)].uniqueID=i.i(a.getUid)(n.parent.element.id+"_data_"),i.i(r.setValue)("uniqueIDCollection."+t[parseInt(e.toString(),10)].uniqueID,t[parseInt(e.toString(),10)],n.parent),t[parseInt(e.toString(),10)].level=0,i.i(s.a)(n.parent)&&n.parent.enableVirtualization&&t[parseInt(e.toString(),10)][""+n.parent.parentIdMapping]&&0===t[parseInt(e.toString(),10)].level&&(t[parseInt(e.toString(),10)].level=t[parseInt(e.toString(),10)].level+1),t[parseInt(e.toString(),10)].index=Math.ceil(1e3*Math.random()),(t[parseInt(e.toString(),10)][n.parent.hasChildMapping]||-1!==n.parentItems.indexOf(t[parseInt(e.toString(),10)][n.parent.idMapping]))&&(t[parseInt(e.toString(),10)].hasChildRecords=!0),t[parseInt(e.toString(),10)].checkboxState="uncheck")}(o);else this.zerothLevelData=e,i.i(r.setValue)("cancel",!0,e);if(i.i(s.a)(this.parent)&&this.parent.loadChildOnDemand&&e.actionArgs.isExpandCollapse&&this.parent.enableVirtualization?e.result=t:i.i(s.a)(this.parent)&&this.parent.enableVirtualization&&!this.parent.loadChildOnDemand?e.result=t:e.result=this.parent.loadChildOnDemand?this.parent.flatData:t,i.i(s.a)(this.parent)&&this.parent.enableVirtualization&&this.parent.loadChildOnDemand&&this.parent.grid.aggregates.length&&0===this.parent.grid.sortSettings.columns.length&&0===this.parent.grid.filterSettings.columns.length&&!this.parent.grid.searchSettings.key.length){var d=e.query.queries.filter(function(e){return"onAggregates"===e.fn});e.result=this.parent.summaryModule.calculateSummaryValue(d,this.parent.flatData,!0)}this.parent.notify("updateResults",e)},e.prototype.collectExpandingRecs=function(e,t){var n=this.parent.getRows();if(this.parent.rowTemplate){var o=this.parent.getContentTable().rows;n=[].slice.call(o)}var a;if(e.rows.length>0){t||(e.record.expanded=!0);for(var s=0;s<e.rows.length;s++){if(e.rows[parseInt(s.toString(),10)].style.display="table-row",this.parent.loadChildOnDemand){var d=e.rows[parseInt(s.toString(),10)].getElementsByClassName("e-treegridcollapse")[0];a=this.parent.rowTemplate?this.parent.grid.getCurrentViewRecords()[e.rows[parseInt(s.toString(),10)].rowIndex]:this.parent.grid.getRowObjectFromUID(e.rows[parseInt(s.toString(),10)].getAttribute("data-Uid")).data,!i.i(r.isNullOrUndefined)(d)&&a.expanded&&(i.i(r.addClass)([d],"e-treegridexpand"),i.i(r.removeClass)([d],"e-treegridcollapse"));var l=[];l=n.filter(function(e){return e.querySelector(".e-gridrowindex"+a.index+"level"+(a.level+1))}),l.length&&a.expanded&&this.collectExpandingRecs({record:a,rows:l,parentRow:e.parentRow},!0)}var p=e.rows[parseInt(s.toString(),10)].querySelector(".e-detailrowcollapse");i.i(r.isNullOrUndefined)(p)||this.parent.grid.detailRowModule.expand(p)}}else this.fetchRemoteChildData({action:e.name,record:e.record,rows:e.rows,parentRow:e.parentRow})},e.prototype.fetchRemoteChildData=function(e){var t=this,s={row:e.parentRow,data:e.record},l=this.parent.dataSource,p=this.parent.grid.getDataModule().generateQuery(),c=p.queries.filter(function(e){return"onPage"!==e.fn&&"onWhere"!==e.fn});if(p.queries=c,p.isCountRequired=!0,this.parent.enableVirtualization&&"remoteExpand"===e.action){p.take(this.parent.pageSettings.pageSize);var h=[];h.push("ExpandingAction",parseInt(e.record[this.parent.idMapping],10).toString()),p.expand(h)}else if(this.parent.enableVirtualization&&"collapse"===e.action){p.take(this.parent.grid.pageSettings.pageSize);var h=[];h.push("CollapsingAction",parseInt(e.record[this.parent.idMapping],10).toString()),p.expand(h)}if(p.where(this.parent.parentIdMapping,"equal",e.record[this.parent.idMapping]),"remoteExpand"===e.action&&this.parent.grid.filterModule&&this.parent.grid.filterModule.value){var u=this.parent.grid.getDataModule().generateQuery().queries.filter(function(e){return"onPage"!==e.fn&&void 0!==e.e.predicates});p.queries.push(u[0])}i.i(o.showSpinner)(this.parent.element),l.executeQuery(p).then(function(l){var p,c=t.parent.grid.currentViewData.slice(),h=t.parent.idMapping;if(t.parent.isGantt&&!t.parent.loadChildOnDemand&&t.parent.hasChildMapping){for(var u=0;u<t.parent.grid.currentViewData.length;u++)if(e.record[h]===t.parent.grid.currentViewData[u][h]){p=u;break}}else p=c.indexOf(e.record);if(t.parent.enableVirtualization&&("collapse"===e.action||"remoteExpand"===e.action)){c=[];for(var u=0;u<p;u++)c.push(t.parent.grid.currentViewData[parseInt(u.toString(),10)])}-1===p&&t.parent.grid.getRowsObject().forEach(function(t){t.data.uniqueID===e.record.uniqueID&&(p=t.index)});var g=i.i(a.getObject)("actual.nextLevel",l),f=l.result,y=[];if("remoteExpand"===e.action&&t.parent.grid.filterModule&&t.parent.grid.filterModule.value){for(var u=0;u<c.length;u++)Object.prototype.hasOwnProperty.call(c[parseInt(u.toString(),10)],t.parent.parentIdMapping)&&null!==c[parseInt(u.toString(),10)][""+t.parent.parentIdMapping]&&0===c[parseInt(u.toString(),10)].level&&(c.splice(u,1),u--);for(var u=0;u<f.length;u++)e.record[""+t.parent.idMapping]!==f[parseInt(u.toString(),10)][""+t.parent.idMapping]&&e.record[""+t.parent.idMapping]===f[parseInt(u.toString(),10)][""+t.parent.parentIdMapping]&&Object.prototype.hasOwnProperty.call(f,u)&&y.push(f[parseInt(u.toString(),10)]);f=y}if(t.parent.enableVirtualization&&"remoteExpand"===e.action){e.record.childRecords=[];for(var u=0;u<f.length;u++)e.record[""+t.parent.idMapping]!==f[parseInt(u.toString(),10)][""+t.parent.idMapping]&&e.record[""+t.parent.idMapping]===f[parseInt(u.toString(),10)][""+t.parent.parentIdMapping]&&Object.prototype.hasOwnProperty.call(f,u)&&e.record.childRecords.push(f[parseInt(u.toString(),10)])}else e.record.childRecords=f;for(var m=0;m<f.length;m++){if(t.parent.enableVirtualization&&f[parseInt(m.toString(),10)][""+t.parent.idMapping]===e.record[""+t.parent.idMapping]&&"remoteExpand"===e.action)t.parent.remoteExpandedData.push(e.record);else if(t.parent.enableVirtualization&&f[parseInt(m.toString(),10)][""+t.parent.idMapping]===e.record[""+t.parent.idMapping]&&"collapse"===e.action)for(var u=0;u<t.parent.remoteExpandedData.length;u++)e.record[""+t.parent.idMapping]===t.parent.remoteExpandedData[parseInt(u.toString(),10)][""+t.parent.idMapping]&&t.parent.remoteExpandedData.splice(u,1);if(f[parseInt(m.toString(),10)].taskData=i.i(r.extend)({},f[parseInt(m.toString(),10)]),f[parseInt(m.toString(),10)][""+t.parent.parentIdMapping]&&t.parent.enableVirtualization&&t.parent.remoteExpandedData.length){for(var u=0;u<t.parent.remoteExpandedData.length;u++)if(f[parseInt(m.toString(),10)][""+t.parent.parentIdMapping]===t.parent.remoteExpandedData[parseInt(u.toString(),10)][""+t.parent.idMapping]){f[parseInt(m.toString(),10)].level=t.parent.remoteExpandedData[parseInt(u.toString(),10)].level+1;var v=t.parent.remoteExpandedData[parseInt(u.toString(),10)];delete v.childRecords,f[parseInt(m.toString(),10)].parentItem=v,f[parseInt(m.toString(),10)].parentUniqueID=e.record.uniqueID}}else if(t.parent.enableVirtualization)if(!f[parseInt(m.toString(),10)][""+t.parent.hasChildMapping]&&-1===t.parentItems.indexOf(f[parseInt(m.toString(),10)][""+t.parent.idMapping])||g&&!g[parseInt(m.toString(),10)]){var v=i.i(r.extend)({},e.record);delete v.childRecords,f[parseInt(m.toString(),10)].parentItem=v,f[parseInt(m.toString(),10)].parentUniqueID=e.record.uniqueID}else i.i(r.isNullOrUndefined)(f[parseInt(m.toString(),10)][""+t.parent.parentIdMapping])?(f[parseInt(m.toString(),10)].level=0,"remoteExpand"===e.action&&(f[parseInt(m.toString(),10)].childRecords=[],f[parseInt(m.toString(),10)].childRecords=e.record.childRecords)):f[parseInt(m.toString(),10)].level=e.record.level;else{f[parseInt(m.toString(),10)].level=e.record.level+1;var v=i.i(r.extend)({},e.record);delete v.childRecords,f[parseInt(m.toString(),10)].parentItem=v,f[parseInt(m.toString(),10)].parentUniqueID=e.record.uniqueID}if(f[parseInt(m.toString(),10)].index=Math.ceil(1e3*Math.random()),f[parseInt(m.toString(),10)].uniqueID=i.i(a.getUid)(t.parent.element.id+"_data_"),f[parseInt(m.toString(),10)].checkboxState="uncheck",t.parent.enableVirtualization&&i.i(r.isNullOrUndefined)(f[parseInt(m.toString(),10)].level))for(var S=0;S<t.parent.grid.currentViewData.length;S++)t.parent.grid.currentViewData[parseInt(S.toString(),10)][""+t.parent.idMapping]===f[parseInt(m.toString(),10)][""+t.parent.parentIdMapping]&&(f[parseInt(m.toString(),10)].level=t.parent.grid.currentViewData[parseInt(S.toString(),10)].level+1);if(i.i(r.setValue)("uniqueIDCollection."+f[parseInt(m.toString(),10)].uniqueID,f[parseInt(m.toString(),10)],t.parent),(f[parseInt(m.toString(),10)][""+t.parent.hasChildMapping]||-1!==t.parentItems.indexOf(f[parseInt(m.toString(),10)][""+t.parent.idMapping]))&&(!g||g[parseInt(m.toString(),10)]))if(f[parseInt(m.toString(),10)].hasChildRecords=!0,t.parent.enableVirtualization&&t.parent.loadChildOnDemand){for(var u=0;u<t.parent.remoteCollapsedData.length;u++)f[parseInt(m.toString(),10)][""+t.parent.idMapping]===t.parent.remoteCollapsedData[parseInt(u.toString(),10)][""+t.parent.idMapping]&&(f[parseInt(m.toString(),10)].expanded=t.parent.remoteCollapsedData[parseInt(u.toString(),10)].expanded);if("collapse"===e.action&&f[parseInt(m.toString(),10)][""+t.parent.idMapping]!==e.record[""+t.parent.idMapping]&&!1!==f[parseInt(m.toString(),10)].expanded)f[parseInt(m.toString(),10)].expanded=!0;else if("collapse"===e.action&&f[parseInt(m.toString(),10)][""+t.parent.idMapping]===e.record[""+t.parent.idMapping])f[parseInt(m.toString(),10)].expanded=!1,t.parent.remoteCollapsedData.push(e.record);else if("remoteExpand"===e.action){for(var u=0;u<t.parent.grid.currentViewData.length;u++)t.parent.grid.currentViewData[parseInt(u.toString(),10)][""+t.parent.idMapping]===f[parseInt(m.toString(),10)][""+t.parent.idMapping]&&f.splice(m,1,t.parent.grid.currentViewData[parseInt(u.toString(),10)]);if(f[parseInt(m.toString(),10)][t.parent.idMapping]===e.record[""+t.parent.idMapping])for(var u=0;u<t.parent.remoteCollapsedData.length;u++)e.record[""+t.parent.idMapping]===t.parent.remoteCollapsedData[parseInt(u.toString(),10)][""+t.parent.idMapping]&&t.parent.remoteCollapsedData.splice(u,1);!1!==f[parseInt(m.toString(),10)].expanded&&(f[parseInt(m.toString(),10)].expanded=!0)}}else t.parent.enableVirtualization&&f[parseInt(m.toString(),10)][""+t.parent.idMapping]===e.record[""+t.parent.idMapping]&&"collapse"!==e.action?f[parseInt(m.toString(),10)].expanded=!0:t.parent.enableVirtualization&&t.parent.loadChildOnDemand||(f[parseInt(m.toString(),10)].expanded=!1);c.splice(p+m+1,0,f[parseInt(m.toString(),10)])}if(i.i(r.setValue)("result",c,l),i.i(r.setValue)("action","beforecontentrender",l),t.parent.trigger(d.h,l),i.i(o.hideSpinner)(t.parent.element),t.parent.grid.aggregates.length>0&&!t.parent.enableVirtualization){var I=i.i(a.getObject)("query",l);if(i.i(r.isNullOrUndefined)(I)&&(I=i.i(r.getValue)("grid.renderModule.data",t.parent).aggregateQuery(new n.Query)),!i.i(r.isNullOrUndefined)(I)){var w=I.queries.filter(function(e){return"onAggregates"===e.fn});l.result=t.parent.summaryModule.calculateSummaryValue(w,l.result,!0)}}t.parent.enableVirtualization&&(t.parent.grid.pageSettings.totalRecordsCount=l.count),l.count=t.parent.grid.pageSettings.totalRecordsCount;var R={};t.parent.enableVirtualization&&t.remoteVirtualAction(R);var x={index:p,childData:f};t.parent.enableInfiniteScrolling?t.parent.notify("infinite-remote-expand",x):i.i(r.getValue)("grid.renderModule",t.parent).dataManagerSuccess(l,R),t.parent.trigger(d.Q,s)})},e.prototype.remoteVirtualAction=function(e){e.requestType="refresh",i.i(r.setValue)("isExpandCollapse",!0,e);var t=i.i(r.getValue)("grid.contentModule",this.parent),n=i.i(r.getValue)("currentInfo",t),o=i.i(r.getValue)("prevInfo",t);n.loadNext&&this.parent.grid.pageSettings.currentPage===n.nextInfo.page&&(this.parent.grid.pageSettings.currentPage=o.page)},e.prototype.beginSorting=function(){if(this.isSortAction=!0,i.i(s.a)(this.parent)&&this.parent.enableVirtualization){var e=this.parent.query.queries.indexOf(this.parent.query.queries.filter(function(e){return"onSortBy"===e.fn})[0]);-1!==e&&this.parent.query.queries.splice(e,1),0===this.parent.grid.sortSettings.columns.length&&this.parent.query.sortBy(null,null)}},e.prototype.createRecords=function(e,t){for(var n=[],o=Object.keys(e),d=0,l=o.length;d<l;d++){var p=i.i(r.extend)({},e[parseInt(d.toString(),10)]);p.taskData=e[parseInt(d.toString(),10)];var c=0;if(this.storedIndex++,Object.prototype.hasOwnProperty.call(p,"index")||(p.index=this.storedIndex),(!i.i(r.isNullOrUndefined)(p[this.parent.childMapping])&&!i.i(s.b)(this.parent)||p[this.parent.hasChildMapping]&&i.i(s.b)(this.parent))&&(p.hasChildRecords=!0,this.parent.enableCollapseAll||!i.i(r.isNullOrUndefined)(this.parent.dataStateChange)&&i.i(r.isNullOrUndefined)(p[this.parent.childMapping])?p.expanded=!1:p.expanded=!!i.i(r.isNullOrUndefined)(p[this.parent.expandStateMapping])||p[this.parent.expandStateMapping]),Object.prototype.hasOwnProperty.call(p,"index")||(p.index=(p.hasChildRecords,this.storedIndex)),this.isSelfReference&&i.i(r.isNullOrUndefined)(p[this.parent.parentIdMapping])&&this.parent.parentData.push(p),p.uniqueID=i.i(a.getUid)(this.parent.element.id+"_data_"),i.i(r.setValue)("uniqueIDCollection."+p.uniqueID,p,this.parent),!i.i(r.isNullOrUndefined)(t)){var h=i.i(r.extend)({},t);delete h.childRecords,delete h[this.parent.childMapping],this.isSelfReference&&delete h.taskData[this.parent.childMapping],p.parentItem=h,p.parentUniqueID=h.uniqueID,c=t.level+1}Object.prototype.hasOwnProperty.call(p,"level")||(p.level=c),p.checkboxState="uncheck";if(this.parent.enableVirtualization&&this.parent.loadChildOnDemand&&i.i(s.a)(this.parent)&&!this.parent.initialRender){if(!p.hasChildRecords&&i.i(r.isNullOrUndefined)(p[""+this.parent.parentIdMapping])){p.hasChildRecords=!0;for(var u=0;u<this.parent.remoteCollapsedData.length;u++)this.parent.remoteCollapsedData[parseInt(u.toString(),10)][""+this.parent.idMapping]===p[""+this.parent.idMapping]&&(p.expanded=!1)}else 0===p.level&&i.i(r.isNullOrUndefined)(t)&&!p.hasChildRecords&&(p.level=p.level+1);p[""+this.parent.hasChildMapping]&&!i.i(r.isNullOrUndefined)(p[""+this.parent.expandStateMapping])&&(p.expanded=p[""+this.parent.expandStateMapping],p.hasChildRecords=!0),this.parent.flatData.push(p)}else(i.i(r.isNullOrUndefined)(p[""+this.parent.parentIdMapping])||p.parentItem)&&(this.parent.flatData.push(p),this.parent.infiniteScrollData.push(p));if(this.isSelfReference||0!==p.level||this.parent.parentData.push(p),!i.i(r.isNullOrUndefined)(p[this.parent.childMapping]&&p[this.parent.childMapping].length)){var g=this.createRecords(p[this.parent.childMapping],p);p.childRecords=g}n.push(p)}return n},e.prototype.dataProcessor=function(e){var t,o=i.i(a.getObject)("isExport",e),d=i.i(a.getObject)("expresults",e),l=i.i(a.getObject)("exportType",e),p=i.i(a.getObject)("isPrinting",e),c=i.i(a.getObject)("actionArgs",e),h=i.i(a.getObject)("requestType",e),u=i.i(a.getObject)("data",e),g=i.i(a.getObject)("action",e),f=c,y=this.parent.getPrimaryKeyFieldNames()[0],m=i.i(a.getObject)("data",f);i.i(r.isNullOrUndefined)(f)||i.i(r.isNullOrUndefined)(f.action)||"add"!==f.action||i.i(r.isNullOrUndefined)(f.data)||!i.i(r.isNullOrUndefined)(f.data[""+y])||(f.data[""+y]=e.result[f.index][""+y],m.taskData[""+y]=e.result[f.index][""+y]),(!i.i(r.isNullOrUndefined)(c)&&Object.keys(c).length||"save"===h)&&(h=h||c.requestType,u=u||i.i(a.getObject)("data",c),g=g||i.i(a.getObject)("action",c),"Batch"===this.parent.editSettings.mode&&(this.batchChanges=this.parent.grid.editModule.getBatchChanges()),this.parent.isLocalData&&this.updateAction(u,g,h)),t=o&&!i.i(r.isNullOrUndefined)(d)?d:i.i(s.b)(this.parent)?i.i(r.getValue)("result",this.parent.grid.dataSource):this.parent.grid.dataSource;var v,S,I=t instanceof n.DataManager?t.dataSource.json:t,w=i.i(s.b)(this.parent)?i.i(r.getValue)("count",this.parent.dataSource):I.length,R=new n.Query,x=i.i(a.getObject)("query",e);if(i.i(r.isNullOrUndefined)(x)||(v=x.queries.filter(function(e){return"onWhere"===e.fn}),S=x.queries.filter(function(e){return"onSearch"===e.fn})),this.parent.grid.allowFiltering&&this.parent.grid.filterSettings.columns.length||this.parent.grid.searchSettings.key.length>0||!i.i(r.isNullOrUndefined)(x)&&(v.length||S.length)&&this.parent.isLocalData){i.i(r.isNullOrUndefined)(x)&&(x=new n.Query,x=i.i(r.getValue)("grid.renderModule.data",this.parent).filterQuery(x),x=i.i(r.getValue)("grid.renderModule.data",this.parent).searchQuery(x));var C=x.queries.filter(function(e){return"onWhere"===e.fn}),b=x.queries.filter(function(e){return"onSearch"===e.fn});R.queries=C.concat(b);var D=new n.DataManager(I).executeLocal(R);if(this.parent.notify("updateFilterRecs",{data:D}),I=this.dataResults.result,this.dataResults.result=null,this.parent.grid.aggregates.length>0){var M=i.i(a.getObject)("query",e);if(i.i(r.isNullOrUndefined)(x)&&(x=i.i(r.getValue)("grid.renderModule.data",this.parent).aggregateQuery(new n.Query)),!i.i(r.isNullOrUndefined)(M)){var O=M.queries.filter(function(e){return"onAggregates"===e.fn});I=this.parent.summaryModule.calculateSummaryValue(O,I,!0)}}}if(this.parent.grid.aggregates.length&&0===this.parent.grid.sortSettings.columns.length&&0===this.parent.grid.filterSettings.columns.length&&!this.parent.grid.searchSettings.key.length){var P=i.i(a.getObject)("query",e);i.i(r.isNullOrUndefined)(P)&&(P=i.i(r.getValue)("grid.renderModule.data",this.parent).aggregateQuery(new n.Query));var O=P.queries.filter(function(e){return"onAggregates"===e.fn});I=this.parent.summaryModule.calculateSummaryValue(O,this.parent.flatData,!0)}if(this.parent.grid.sortSettings.columns.length>0||this.isSortAction){this.isSortAction=!1;for(var E=this.parent.parentData,M=i.i(a.getObject)("query",e),A=new n.Query,N=this.parent.grid.sortSettings.columns.length-1;N>=0;N--){var _=this.parent.grid.renderModule.data.getColumnByField(this.parent.grid.sortSettings.columns[parseInt(N.toString(),10)].field),k=_.sortComparer&&i.i(s.h)(this.parent)?_.sortComparer.bind(_):this.parent.grid.sortSettings.columns[parseInt(N.toString(),10)].direction;A.sortBy(this.parent.grid.sortSettings.columns[parseInt(N.toString(),10)].field,k)}var U=new n.DataManager(E).executeLocal(A);if(this.parent.allowRowDragAndDrop&&!i.i(r.isNullOrUndefined)(this.parent.rowDragAndDropModule.draggedRecord)&&this.parent.rowDragAndDropModule.droppedRecord.hasChildRecords&&"middleSegment"!==this.parent.rowDragAndDropModule.dropPosition){var q=U.indexOf(this.parent.rowDragAndDropModule.draggedRecord);U.splice(q,1);var V=U.indexOf(this.parent.rowDragAndDropModule.droppedRecord);this.parent.rowDragAndDropModule.droppedRecord.hasChildRecords&&"topSegment"===this.parent.rowDragAndDropModule.dropPosition?U.splice(V,0,this.parent.rowDragAndDropModule.draggedRecord):"bottomSegment"===this.parent.rowDragAndDropModule.dropPosition&&U.splice(V+1,0,this.parent.rowDragAndDropModule.draggedRecord)}var B={modifiedData:U,filteredData:I,srtQry:A};if(this.parent.notify("createSort",B),I=B.modifiedData,this.dataResults.result=null,this.sortedData=I,this.parent.notify("updateModel",{}),this.parent.grid.aggregates.length>0&&!i.i(r.isNullOrUndefined)(M)){var T=i.i(a.getObject)("query",e),O=T.queries.filter(function(e){return"onAggregates"===e.fn});I=this.parent.summaryModule.calculateSummaryValue(O,this.sortedData,!1)}}w=i.i(s.b)(this.parent)?i.i(r.getValue)("count",this.parent.dataSource):I.length;var L=this.paging(I,w,o,p,l,e);I=L.result,w=L.count,e.result=I,e.count=w,this.parent.notify("updateResults",e)},e.prototype.paging=function(e,t,n,o,a,l){if(!this.parent.allowPaging||n&&"CurrentPage"!==a||o&&"CurrentPage"!==this.parent.printMode){if((this.parent.enableVirtualization||this.parent.enableInfiniteScrolling)&&(!n||"CurrentPage"===a)&&"save"!==i.i(r.getValue)("requestType",l)){var p=this.parent.enableInfiniteScrolling?l:i.i(r.getValue)("actionArgs",l);this.parent.notify(d.a,{result:e,count:t,actionArgs:p}),e=this.dataResults.result,t=this.dataResults.count}}else this.parent.notify(d.a,{result:e,count:t}),e=this.dataResults.result,t=i.i(s.b)(this.parent)?i.i(r.getValue)("count",this.parent.dataSource):this.dataResults.count;if((!0===o||l.isPdfExport&&(i.i(r.isNullOrUndefined)(l.isCollapsedStatePersist)||l.isCollapsedStatePersist))&&"AllPages"===this.parent.printMode){for(var c=[],h=0;h<e.length;h++){i.i(s.f)(this.parent,e[parseInt(h.toString(),10)],this.parent.parentData)&&c.push(e[parseInt(h.toString(),10)])}e=c,t=e.length}return{result:e,count:t}},e.prototype.updateData=function(e){this.dataResults=e},e.prototype.updateAction=function(e,t,i){"delete"!==i&&"save"!==i||this.parent.notify(d.k,{value:e,action:t||i}),"batchsave"===i&&"Batch"===this.parent.editSettings.mode&&this.parent.notify(d.w,{})},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return r}),i.d(t,"b",function(){return n});var r;!function(e){e[e.Add=0]="Add",e[e.Edit=1]="Edit",e[e.Update=2]="Update",e[e.Delete=3]="Delete",e[e.Cancel=4]="Cancel",e[e.Search=5]="Search",e[e.ExpandAll=6]="ExpandAll",e[e.CollapseAll=7]="CollapseAll",e[e.ExcelExport=8]="ExcelExport",e[e.PdfExport=9]="PdfExport",e[e.CsvExport=10]="CsvExport",e[e.Print=11]="Print",e[e.RowIndent=12]="RowIndent",e[e.RowOutdent=13]="RowOutdent"}(r||(r={}));var n;!function(e){e[e.AutoFit=0]="AutoFit",e[e.AutoFitAll=1]="AutoFitAll",e[e.SortAscending=2]="SortAscending",e[e.SortDescending=3]="SortDescending",e[e.Edit=4]="Edit",e[e.Delete=5]="Delete",e[e.Save=6]="Save",e[e.Cancel=7]="Cancel",e[e.PdfExport=8]="PdfExport",e[e.ExcelExport=9]="ExcelExport",e[e.CsvExport=10]="CsvExport",e[e.FirstPage=11]="FirstPage",e[e.PrevPage=12]="PrevPage",e[e.LastPage=13]="LastPage",e[e.NextPage=14]="NextPage",e[e.AddRow=15]="AddRow",e[e.RowIndent=16]="RowIndent",e[e.RowOutdent=17]="RowOutdent"}(n||(n={}))},function(e,t,i){"use strict";i.d(t,"a",function(){return a}),i.d(t,"b",function(){return s}),i.d(t,"c",function(){return d});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(){function e(e){this.allowEditing=!0,this.edit={},this.disableHtmlEncode=!0,this.allowReordering=!0,this.showColumnMenu=!0,this.allowFiltering=!0,this.allowSorting=!0,this.allowResizing=!0,this.filter={},i.i(r.merge)(this,e)}return e.prototype.setProperties=function(e){for(var t=Object.keys(e),i=0;i<t.length;i++)if(this[t[parseInt(i.toString(),10)]]=e[t[parseInt(i.toString(),10)]],this.parent&&this.parent.isReact&&"template"===t[parseInt(i.toString(),10)]){this.parent.clipboardModule.treeGridParent.renderModule.refreshReactColumnTemplateByUid(this.uid)}},e}(),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)(null)],t.prototype,"columns",void 0),t}(a),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)(!1)],t.prototype,"allowAdding",void 0),o([i.i(r.Property)(!1)],t.prototype,"allowEditing",void 0),o([i.i(r.Property)(!1)],t.prototype,"allowDeleting",void 0),o([i.i(r.Property)("Cell")],t.prototype,"mode",void 0),o([i.i(r.Property)("Top")],t.prototype,"newRowPosition",void 0),o([i.i(r.Property)(!0)],t.prototype,"allowEditOnDblClick",void 0),o([i.i(r.Property)(!0)],t.prototype,"showConfirmDialog",void 0),o([i.i(r.Property)(!1)],t.prototype,"showDeleteConfirmDialog",void 0),o([i.i(r.Property)("")],t.prototype,"template",void 0),o([i.i(r.Property)({})],t.prototype,"dialog",void 0),o([i.i(r.Property)(!1)],t.prototype,"allowNextRowEdit",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a}),i.d(t,"b",function(){return s});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)()],t.prototype,"field",void 0),o([i.i(r.Property)()],t.prototype,"operator",void 0),o([i.i(r.Property)()],t.prototype,"value",void 0),o([i.i(r.Property)()],t.prototype,"matchCase",void 0),o([i.i(r.Property)()],t.prototype,"ignoreAccent",void 0),o([i.i(r.Property)()],t.prototype,"predicate",void 0),o([i.i(r.Property)({})],t.prototype,"actualFilterValue",void 0),o([i.i(r.Property)({})],t.prototype,"actualOperator",void 0),o([i.i(r.Property)()],t.prototype,"type",void 0),o([i.i(r.Property)()],t.prototype,"ejpredicate",void 0),o([i.i(r.Property)()],t.prototype,"uid",void 0),o([i.i(r.Property)()],t.prototype,"isForeignKey",void 0),t}(r.ChildProperty),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Collection)([],a)],t.prototype,"columns",void 0),o([i.i(r.Property)("FilterBar")],t.prototype,"type",void 0),o([i.i(r.Property)()],t.prototype,"mode",void 0),o([i.i(r.Property)(!0)],t.prototype,"showFilterBarStatus",void 0),o([i.i(r.Property)(1500)],t.prototype,"immediateModeDelay",void 0),o([i.i(r.Property)()],t.prototype,"operators",void 0),o([i.i(r.Property)(!1)],t.prototype,"ignoreAccent",void 0),o([i.i(r.Property)("Parent")],t.prototype,"hierarchyMode",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)(!1)],t.prototype,"enableCache",void 0),o([i.i(r.Property)(3)],t.prototype,"maxBlocks",void 0),o([i.i(r.Property)(3)],t.prototype,"initialBlocks",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)("Spinner")],t.prototype,"indicatorType",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)(12)],t.prototype,"pageSize",void 0),o([i.i(r.Property)(8)],t.prototype,"pageCount",void 0),o([i.i(r.Property)(1)],t.prototype,"currentPage",void 0),o([i.i(r.Property)()],t.prototype,"totalRecordsCount",void 0),o([i.i(r.Property)(!1)],t.prototype,"enableQueryString",void 0),o([i.i(r.Property)(!1)],t.prototype,"pageSizes",void 0),o([i.i(r.Property)(null)],t.prototype,"template",void 0),o([i.i(r.Property)("All")],t.prototype,"pageSizeMode",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)()],t.prototype,"fields",void 0),o([i.i(r.Property)(!1)],t.prototype,"ignoreCase",void 0),o([i.i(r.Property)("contains")],t.prototype,"operator",void 0),o([i.i(r.Property)()],t.prototype,"key",void 0),o([i.i(r.Property)()],t.prototype,"hierarchyMode",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)("Row")],t.prototype,"mode",void 0),o([i.i(r.Property)("Flow")],t.prototype,"cellSelectionMode",void 0),o([i.i(r.Property)("Single")],t.prototype,"type",void 0),o([i.i(r.Property)(!1)],t.prototype,"persistSelection",void 0),o([i.i(r.Property)("Default")],t.prototype,"checkboxMode",void 0),o([i.i(r.Property)(!1)],t.prototype,"checkboxOnly",void 0),o([i.i(r.Property)(!0)],t.prototype,"enableToggle",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a}),i.d(t,"b",function(){return s});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)()],t.prototype,"field",void 0),o([i.i(r.Property)()],t.prototype,"direction",void 0),t}(r.ChildProperty),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Collection)([],a)],t.prototype,"columns",void 0),o([i.i(r.Property)(!0)],t.prototype,"allowUnsort",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s}),i.d(t,"b",function(){return d});var r=i(1),n=(i.n(r),i(0)),o=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.intl=new r.Internationalization,t.templateFn={},t}return o(t,e),t.prototype.setFormatter=function(e){this.format&&(this.format.skeleton||this.format.format)&&(this.formatFn=this.getFormatFunction(this.format))},t.prototype.getFormatFunction=function(e){return e.type?this.intl.getDateFormat(e):this.intl.getNumberFormat(e)},t.prototype.getFormatter=function(){return this.formatFn},t.prototype.setTemplate=function(e){void 0===e&&(e={}),void 0!==this.footerTemplate&&(this.templateFn[i.i(r.getEnumValue)(n.CellType,n.CellType.Summary)]={fn:i.i(r.compile)(this.footerTemplate,e),property:"footerTemplate"})},t.prototype.getTemplate=function(e){return this.templateFn[i.i(r.getEnumValue)(n.CellType,e)]},t.prototype.setPropertiesSilent=function(e){this.setProperties(e,!0)},a([i.i(r.Property)()],t.prototype,"type",void 0),a([i.i(r.Property)()],t.prototype,"footerTemplate",void 0),a([i.i(r.Property)()],t.prototype,"field",void 0),a([i.i(r.Property)()],t.prototype,"format",void 0),a([i.i(r.Property)()],t.prototype,"columnName",void 0),a([i.i(r.Property)()],t.prototype,"customAggregate",void 0),t}(r.ChildProperty),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),a([i.i(r.Collection)([],s)],t.prototype,"columns",void 0),a([i.i(r.Property)(!0)],t.prototype,"showChildSummary",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),i(2)),a=i(3),s=function(){function e(e){this.parent=e,this.templateResult=null,this.parent.grid.on("template-result",this.columnTemplateResult,this),this.parent.grid.on("reactTemplateRender",this.reactTemplateRender,this)}return e.prototype.RowModifier=function(e){if(e.data){var t=e.data,s=t.parentItem;if(!i.i(n.isNullOrUndefined)(t.parentItem)&&!i.i(a.d)(this.parent)&&(!this.parent.allowPaging||"Root"===this.parent.pageSettings.pageSizeMode||i.i(a.a)(this.parent)&&!i.i(a.h)(this.parent))){if((this.parent.initialRender&&(!(i.i(n.isNullOrUndefined)(s[this.parent.expandStateMapping])||s[this.parent.expandStateMapping])||this.parent.enableCollapseAll)||!i.i(a.f)(this.parent,e.data,this.parent.grid.getCurrentViewRecords()))&&!i.i(n.isNullOrUndefined)(e.row)){e.row.style.display="none";var d=this.parent.grid.getRowsObject();this.parent.grid.isFrozenGrid()||i.i(n.isNullOrUndefined)(e.row.getAttribute("data-uid"))||(d.filter(function(t){return t.uid===e.row.getAttribute("data-uid")})[0].visible=!1)}}if(i.i(a.a)(this.parent)&&!i.i(a.h)(this.parent)){var l=this.parent,p=this.parent.getCurrentViewRecords().filter(function(e){return i.i(n.getValue)(l.idMapping,e)===i.i(n.getValue)(l.parentIdMapping,t)});if(p.length>0&&!p[0].isSummaryRow&&!i.i(n.isNullOrUndefined)(e.row)){var c=p[0].expanded?"table-row":"none";e.row.setAttribute("style","display: "+c+";")}}i.i(r.getObject)("isSummaryRow",e.data)&&i.i(n.addClass)([e.row],"e-summaryrow"),i.i(n.isNullOrUndefined)(e.row)||(e.row.querySelector(".e-treegridexpand")?e.row.setAttribute("aria-expanded","true"):e.row.querySelector(".e-treegridcollapse")&&e.row.setAttribute("aria-expanded","false"),this.parent.enableCollapseAll&&this.parent.initialRender&&(i.i(n.isNullOrUndefined)(t.parentItem)||(e.row.style.display="none")));if(this.parent.rowDragAndDropModule&&this.parent.grid.rowDragAndDropModule&&(this.parent.grid.rowDragAndDropModule.dragStartData||this.parent.rowDragAndDropModule.draggedRecord)&&this.parent.getContentTable().scrollHeight<=this.parent.getContent().clientHeight){this.parent.getVisibleRecords()[this.parent.getVisibleRecords().length-1].uniqueID!==e.data.uniqueID||i.i(n.isNullOrUndefined)(e.row)||e.row.cells[0].classList.contains("e-lastrowcell")||this.parent.lastRowBorder(e.row,!0)}if(this.parent.isReact){var h=this;h.parent.renderReactTemplates(function(){h.parent.trigger(o.J,e)})}else this.parent.trigger(o.J,e)}},e.prototype.cellRender=function(e){if(e.data){var t,s,d=this.parent.grid,l=e.data,p=i.i(n.isNullOrUndefined)(l.filterLevel),c=p?l.level:l.filterLevel,h=0,u=this.parent.getColumnByUid(e.column.uid),g=l.isSummaryRow,f=this.parent.getFrozenColumns();t=i.i(n.isNullOrUndefined)(l.parentItem)?l.index:l.parentItem.index;if((this.parent.enableColumnVirtualization&&!this.parent.initialRender?this.parent.getVirtualColIndexByUid(e.column.uid):d.getColumnIndexByUid(e.column.uid))!==this.parent.treeColumnIndex||"add"!==e.requestType&&"rowDragAndDrop"!==e.requestType&&"delete"!==e.requestType&&!i.i(n.isNullOrUndefined)(e.cell.querySelector(".e-treecell")))this.templateResult&&(this.templateResult=null);else{for(var y=i.i(n.createElement)("div",{className:"e-treecolumn-container"}),m=i.i(n.createElement)("span",{className:"e-icons e-none",styles:"width: 10px; display: inline-block"}),v=0;v<c;v++)h+=10,y.appendChild(m.cloneNode());var S=i.i(n.isNullOrUndefined)(l.hasFilteredChildRecords)?l.hasChildRecords:l.hasFilteredChildRecords;if(S&&!i.i(n.isNullOrUndefined)(l.childRecords)&&(S=this.parent.isFromGantt&&!this.parent.loadChildOnDemand?l.hasChildRecords:!(0===l.childRecords.length)),S){i.i(n.addClass)([e.cell],"e-treerowcell"),e.cell.setAttribute("aria-expanded",l.expanded?"true":"false");var I=i.i(n.createElement)("span",{className:"e-icons"}),w=void 0;w=this.parent.initialRender?l.expanded&&(i.i(n.isNullOrUndefined)(l[this.parent.expandStateMapping])||l[this.parent.expandStateMapping])&&!this.parent.enableCollapseAll:!(!l.expanded||!i.i(a.f)(this.parent,l,this.parent.grid.getCurrentViewRecords())),i.i(n.addClass)([I],w?"e-treegridexpand":"e-treegridcollapse"),h+=18,y.appendChild(I),m.style.width="4px",h+=7,y.appendChild(m.cloneNode())}else(c||!c&&!l.level)&&(h+=20,y.appendChild(m.cloneNode()),y.appendChild(m.cloneNode()));s=i.i(n.createElement)("span",{className:"e-treecell"}),this.parent.allowTextWrap&&(s.style.width="Calc(100% - "+h+"px)"),i.i(n.addClass)([e.cell],"e-gridrowindex"+t+"level"+l.level),this.updateTreeCell(e,s),y.appendChild(s),e.cell.appendChild(y)}if(d.getFrozenLeftColumnsCount()>0||d.getFrozenRightColumnsCount()>0){var R=d.getFrozenRightColumns(),x=d.getFrozenLeftColumns(),C=d.getMovableColumns();R.length>0&&R[0].field===e.column.field?i.i(n.addClass)([e.cell],"e-gridrowindex"+t+"level"+l.level):x.length>0&&x[0].field===e.column.field?i.i(n.addClass)([e.cell],"e-gridrowindex"+t+"level"+l.level):C.length>0&&C[0].field===e.column.field&&i.i(n.addClass)([e.cell],"e-gridrowindex"+t+"level"+l.level)}else f>this.parent.treeColumnIndex&&f>0&&d.getColumnIndexByUid(e.column.uid)===f?i.i(n.addClass)([e.cell],"e-gridrowindex"+t+"level"+l.level):f<this.parent.treeColumnIndex&&f>0&&(d.getColumnIndexByUid(e.column.uid)===f||d.getColumnIndexByUid(e.column.uid)===f-1)?i.i(n.addClass)([e.cell],"e-gridrowindex"+t+"level"+l.level):f===this.parent.treeColumnIndex&&f>0&&d.getColumnIndexByUid(e.column.uid)===this.parent.treeColumnIndex-1&&i.i(n.addClass)([e.cell],"e-gridrowindex"+t+"level"+l.level);if(!i.i(n.isNullOrUndefined)(u)&&u.showCheckbox&&(this.parent.notify("columnCheckbox",e),this.parent.allowTextWrap)){var b=e.cell.querySelectorAll(".e-frame")[0];h+=parseInt(b.style.width,16),h+=10,s=d.getColumnIndexByUid(e.column.uid)===this.parent.treeColumnIndex?e.cell.querySelector(".e-treecell"):e.cell.querySelector(".e-treecheckbox"),s.style.width="Calc(100% - "+h+"px)"}if(g){i.i(n.addClass)([e.cell],"e-summarycell");var D=i.i(r.getObject)(e.column.field,e.data);D=i.i(n.isNullOrUndefined)(D)?null:D,null!=e.cell.querySelector(".e-treecell")?e.cell.querySelector(".e-treecell").innerHTML=D:e.column.template?e.cell.innerHTML=null:e.cell.innerHTML=D}this.parent.args=e,(i.i(n.isNullOrUndefined)(this.parent.rowTemplate)&&!this.parent.isReact||this.parent.isReact&&!e.column.template)&&this.parent.trigger(o.D,e)}},e.prototype.updateTreeCell=function(e,t){var a=i.i(n.getValue)("columnModel",this.parent),s=a[this.parent.treeColumnIndex],d=e.column.index;i.i(n.isNullOrUndefined)(s.field)&&e.cell.setAttribute("data-colindex",d+""),s.field!==e.column.field||i.i(n.isNullOrUndefined)(s.template)||(e.column.template=s.template,e.column.templateFn=i.i(r.templateCompiler)(e.column.template),e.cell.classList.add("e-templatecell"));var l=null!=e.cell.querySelector(".e-treecell")?e.cell.querySelector(".e-treecell").innerHTML:e.cell.innerHTML;if("object"==typeof e.column.template&&this.templateResult)i.i(r.appendChildren)(t,this.templateResult),this.templateResult=null,e.cell.innerHTML="";else if(e.cell.classList.contains("e-templatecell")){var p=e.cell.children.length,c=this.parent.element.id+e.column.uid;if(s.field!==e.column.field||i.i(n.isNullOrUndefined)(s.template))for(var h=0;h<p;p=e.cell.children.length)t.appendChild(e.cell.children[parseInt(h.toString(),10)]);else{if(this.parent.isReact&&"string"!=typeof e.column.template){e.column.templateFn(e.data,this.parent,"columnTemplate",c,null,null,t),i.i(n.isNullOrUndefined)(this.parent.grid.portals)&&(this.parent.grid.portals=this.parent.portals),this.parent.notify("renderReactTemplate",this.parent.portals);var u=this;u.parent.renderReactTemplates(function(){u.parent.trigger(o.D,e)})}else{var g=e.column.templateFn(i.i(r.extend)({index:""},e.data),this.parent,"template",c,this.parent.isStringTemplate);i.i(r.appendChildren)(t,g)}delete e.column.template,delete e.column.templateFn,e.cell.innerHTML=""}}else t.innerHTML=l,e.cell.innerHTML=""},e.prototype.refreshReactColumnTemplateByUid=function(e){var t=this;this.parent.isReact&&this.parent.clearTemplate(["columnTemplate"],void 0,function(){for(var o=t.parent.grid.getRowsObject(),a=t.parent.grid.getIndentCount(),s=t.parent.grid.getNormalizedColumnIndex(e),d=0;d<o.length;d++)if(o[parseInt(d.toString(),10)].isDataRow&&!i.i(n.isNullOrUndefined)(o[parseInt(d.toString(),10)].index)){var l=o[parseInt(d.toString(),10)].cells[parseInt(s.toString(),10)],p=new r.CellRenderer(t.parent.grid,t.parent.grid.serviceLocator),c=t.parent.getCellFromIndex(o[parseInt(d.toString(),10)].index,s-a);p.refreshTD(c,l,o[parseInt(d.toString(),10)].data,{index:o[parseInt(d.toString(),10)].index});var h=t.parent.getRows()[parseInt(d.toString(),10)].cells[parseInt(s.toString(),10)];t.cellRender({data:o[parseInt(d.toString(),10)].data,cell:h,column:l.column})}})},e.prototype.columnTemplateResult=function(e){this.templateResult=e.template},e.prototype.reactTemplateRender=function(e,t){this.parent.portals=e,this.parent.notify("renderReactTemplate",this.parent.portals),this.parent.renderReactTemplates(t)},e.prototype.destroy=function(){this.parent.grid.off("template-result",this.columnTemplateResult),this.parent.grid.off("reactTemplateRender",this.reactTemplateRender)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(0),n=(i.n(r),i(2)),o=i(1),a=(i.n(o),i(4)),s=(i.n(a),i(3)),d=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),l=function(e){function t(t){var i=e.call(this,t)||this;return i.addEventListener(),i}return d(t,e),t.prototype.addEventListener=function(){this.parent.on(n.e,this.getDatas,this)},t.prototype.getDatas=function(e){this.visualData=e.data},t.prototype.getDataInfo=function(){return e.prototype.getData.call(this)},t.prototype.generateRows=function(t,r){!i.i(o.isNullOrUndefined)(r.virtualInfo)&&r.virtualInfo.loadNext&&r.virtualInfo.nextInfo.page!==this.parent.pageSettings.currentPage?this.parent.setProperties({pageSettings:{currentPage:r.virtualInfo.nextInfo.page}},!0):i.i(o.isNullOrUndefined)(r.virtualInfo)||r.virtualInfo.loadNext||r.virtualInfo.page===this.parent.pageSettings.currentPage||this.parent.setProperties({pageSettings:{currentPage:r.virtualInfo.page}},!0);var n=this.getDataInfo();if(i.i(o.isNullOrUndefined)(r.virtualInfo)||("right"!==r.virtualInfo.direction&&"left"!==r.virtualInfo.direction?(this.parent.dataSource instanceof a.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&!this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url||i.i(s.b)(this.parent))&&1!==r.virtualInfo.blockIndexes.length||(r.virtualInfo.blockIndexes=n.blockIndexes):r.virtualInfo.blockIndexes=this.getBlockIndexes(r.virtualInfo.page)),this.parent.dataSource instanceof a.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&!this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url||i.i(s.b)(this.parent))return e.prototype.generateRows.call(this,t,r);i.i(o.isNullOrUndefined)(r.requestType)||"collapseAll"!==r.requestType.toString()||(r.requestType="refresh");for(var d=e.prototype.generateRows.call(this,t,r),l=0;l<d.length;l++)d[parseInt(l.toString(),10)].index=this.visualData.indexOf(d[parseInt(l.toString(),10)].data);return d},t.prototype.checkAndResetCache=function(e){var t=["paging","refresh","sorting","filtering","searching","reorder","save","delete"].some(function(t){return e===t});if(this.parent.dataSource instanceof a.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&!this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url||i.i(s.b)(this.parent)){var r=this.model.currentPage;t?(this.cache={},this.data={},this.groups={}):"virtualscroll"===e&&this.cache[parseInt(r.toString(),10)]&&this.cache[parseInt(r.toString(),10)].length>this.parent.contentModule.getBlockSize()&&delete this.cache[parseInt(r.toString(),10)]}else(t||"virtualscroll"===e)&&(this.cache={},this.data={},this.groups={});return t},t}(r.VirtualRowModelGenerator)},function(e,t,i){"use strict";var r=i(48);i.d(t,"o",function(){return r.a}),i.d(t,"p",function(){return r.b}),i.d(t,"q",function(){return r.c}),i.d(t,"r",function(){return r.d}),i.d(t,"s",function(){return r.e}),i.d(t,"t",function(){return r.f}),i.d(t,"u",function(){return r.g}),i.d(t,"v",function(){return r.h}),i.d(t,"w",function(){return r.i}),i.d(t,"x",function(){return r.j}),i.d(t,"y",function(){return r.k}),i.d(t,"z",function(){return r.l}),i.d(t,"A",function(){return r.m}),i.d(t,"B",function(){return r.n}),i.d(t,"C",function(){return r.o}),i.d(t,"D",function(){return r.p}),i.d(t,"E",function(){return r.q}),i.d(t,"F",function(){return r.r}),i.d(t,"G",function(){return r.s}),i.d(t,"H",function(){return r.t}),i.d(t,"I",function(){return r.u}),i.d(t,"J",function(){return r.v}),i.d(t,"K",function(){return r.w}),i.d(t,"L",function(){return r.x}),i.d(t,"M",function(){return r.y}),i.d(t,"N",function(){return r.z}),i.d(t,"O",function(){return r.A}),i.d(t,"P",function(){return r.B}),i.d(t,"Q",function(){return r.C}),i.d(t,"R",function(){return r.D}),i.d(t,"S",function(){return r.E}),i.d(t,"T",function(){return r.F}),i.d(t,"U",function(){return r.G}),i.d(t,"V",function(){return r.H}),i.d(t,"W",function(){return r.I}),i.d(t,"X",function(){return r.J}),i.d(t,"Y",function(){return r.K}),i.d(t,"Z",function(){return r.L}),i.d(t,"_0",function(){return r.M}),i.d(t,"_1",function(){return r.N}),i.d(t,"_2",function(){return r.O}),i.d(t,"_3",function(){return r.P}),i.d(t,"_4",function(){return r.Q}),i.d(t,"_5",function(){return r.R}),i.d(t,"_6",function(){return r.S}),i.d(t,"_7",function(){return r.T}),i.d(t,"_8",function(){return r.U}),i.d(t,"_9",function(){return r.V}),i.d(t,"_10",function(){return r.W}),i.d(t,"_11",function(){return r.X}),i.d(t,"_12",function(){return r.Y}),i.d(t,"_13",function(){return r.Z}),i.d(t,"_14",function(){return r._0}),i.d(t,"_15",function(){return r._1}),i.d(t,"_16",function(){return r._2}),i.d(t,"_17",function(){return r._3}),i.d(t,"_18",function(){return r._4}),i.d(t,"_19",function(){return r._5}),i.d(t,"_20",function(){return r._6}),i.d(t,"_21",function(){return r._7}),i.d(t,"_22",function(){return r._8}),i.d(t,"_23",function(){return r._9}),i.d(t,"_24",function(){return r._10}),i.d(t,"_25",function(){return r._11}),i.d(t,"_26",function(){return r._12}),i.d(t,"_27",function(){return r._13}),i.d(t,"_28",function(){return r._14}),i.d(t,"_29",function(){return r._15}),i.d(t,"_30",function(){return r._16}),i.d(t,"_31",function(){return r._17}),i.d(t,"_32",function(){return r._18}),i.d(t,"_33",function(){return r._19}),i.d(t,"_34",function(){return r._20}),i.d(t,"_35",function(){return r._21}),i.d(t,"_36",function(){return r._22}),i.d(t,"_37",function(){return r._23}),i.d(t,"_38",function(){return r._24}),i.d(t,"_39",function(){return r._25}),i.d(t,"_40",function(){return r._26}),i.d(t,"_41",function(){return r._27}),i.d(t,"_42",function(){return r._28}),i.d(t,"_43",function(){return r._29}),i.d(t,"_44",function(){return r._30}),i.d(t,"_45",function(){return r._31});var n=i(50);i.d(t,"_46",function(){return n.a}),i.d(t,"_47",function(){return n.b}),i.d(t,"_48",function(){return n.c}),i.d(t,"_49",function(){return n.d}),i.d(t,"_50",function(){return n.e}),i.d(t,"_51",function(){return n.f}),i.d(t,"_52",function(){return n.g}),i.d(t,"_53",function(){return n.h}),i.d(t,"_54",function(){return n.i}),i.d(t,"_55",function(){return n.j}),i.d(t,"_56",function(){return n.k}),i.d(t,"_57",function(){return n.l}),i.d(t,"_58",function(){return n.m}),i.d(t,"_59",function(){return n.n}),i.d(t,"_60",function(){return n.o}),i.d(t,"_61",function(){return n.p});var o=i(53);i.d(t,"_62",function(){return o.a}),i.d(t,"_63",function(){return o.b});var a=i(3);i.d(t,"a",function(){return a.a}),i.d(t,"b",function(){return a.b}),i.d(t,"c",function(){return a.c}),i.d(t,"d",function(){return a.d}),i.d(t,"e",function(){return a.e}),i.d(t,"f",function(){return a.f}),i.d(t,"g",function(){return a.g}),i.d(t,"h",function(){return a.h}),i.d(t,"i",function(){return a.i}),i.d(t,"j",function(){return a.j}),i.d(t,"k",function(){return a.k}),i.d(t,"l",function(){return a.l});var s=i(13);i.d(t,"m",function(){return s.a}),i.d(t,"n",function(){return s.b});var d=i(38);i.d(t,"_64",function(){return d.a}),i.d(t,"_65",function(){return d.b}),i.d(t,"_66",function(){return d.c}),i.d(t,"_67",function(){return d.d}),i.d(t,"_68",function(){return d.e}),i.d(t,"_69",function(){return d.f}),i.d(t,"_70",function(){return d.g}),i.d(t,"_71",function(){return d.h}),i.d(t,"_72",function(){return d.i}),i.d(t,"_73",function(){return d.j}),i.d(t,"_74",function(){return d.k}),i.d(t,"_75",function(){return d.l}),i.d(t,"_76",function(){return d.m}),i.d(t,"_77",function(){return d.n}),i.d(t,"_78",function(){return d.o}),i.d(t,"_79",function(){return d.p}),i.d(t,"_80",function(){return d.q}),i.d(t,"_81",function(){return d.r}),i.d(t,"_82",function(){return d.s}),i.d(t,"_83",function(){return d.t}),i.d(t,"_84",function(){return d.u})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(26);i.d(t,"isRemoteData",function(){return r.a}),i.d(t,"isCountRequired",function(){return r.b}),i.d(t,"isCheckboxcolumn",function(){return r.c}),i.d(t,"isFilterChildHierarchy",function(){return r.d}),i.d(t,"findParentRecords",function(){return r.e}),i.d(t,"getExpandStatus",function(){return r.f}),i.d(t,"findChildrenRecords",function(){return r.g}),i.d(t,"isOffline",function(){return r.h}),i.d(t,"extendArray",function(){return r.i}),i.d(t,"getPlainData",function(){return r.j}),i.d(t,"getParentData",function(){return r.k}),i.d(t,"isHidden",function(){return r.l}),i.d(t,"ToolbarItem",function(){return r.m}),i.d(t,"ContextMenuItems",function(){return r.n}),i.d(t,"TreeGrid",function(){return r.o}),i.d(t,"load",function(){return r.p}),i.d(t,"rowDataBound",function(){return r.q}),i.d(t,"dataBound",function(){return r.r}),i.d(t,"queryCellInfo",function(){return r.s}),i.d(t,"beforeDataBound",function(){return r.t}),i.d(t,"actionBegin",function(){return r.u}),i.d(t,"dataStateChange",function(){return r.v}),i.d(t,"actionComplete",function(){return r.w}),i.d(t,"rowSelecting",function(){return r.x}),i.d(t,"rowSelected",function(){return r.y}),i.d(t,"checkboxChange",function(){return r.z}),i.d(t,"rowDeselected",function(){return r.A}),i.d(t,"toolbarClick",function(){return r.B}),i.d(t,"beforeExcelExport",function(){return r.C}),i.d(t,"beforePdfExport",function(){return r.D}),i.d(t,"resizeStop",function(){return r.E}),i.d(t,"expanded",function(){return r.F}),i.d(t,"expanding",function(){return r.G}),i.d(t,"collapsed",function(){return r.H}),i.d(t,"collapsing",function(){return r.I}),i.d(t,"remoteExpand",function(){return r.J}),i.d(t,"localPagedExpandCollapse",function(){return r.K}),i.d(t,"pagingActions",function(){return r.L}),i.d(t,"printGridInit",function(){return r.M}),i.d(t,"contextMenuOpen",function(){return r.N}),i.d(t,"contextMenuClick",function(){return r.O}),i.d(t,"beforeCopy",function(){return r.P}),i.d(t,"beforePaste",function(){return r.Q}),i.d(t,"savePreviousRowPosition",function(){return r.R}),i.d(t,"crudAction",function(){return r.S}),i.d(t,"beginEdit",function(){return r.T}),i.d(t,"beginAdd",function(){return r.U}),i.d(t,"recordDoubleClick",function(){return r.V}),i.d(t,"cellSave",function(){return r.W}),i.d(t,"cellSaved",function(){return r.X}),i.d(t,"cellEdit",function(){return r.Y}),i.d(t,"batchDelete",function(){return r.Z}),i.d(t,"batchCancel",function(){return r._0}),i.d(t,"batchAdd",function(){return r._1}),i.d(t,"beforeBatchDelete",function(){return r._2}),i.d(t,"beforeBatchAdd",function(){return r._3}),i.d(t,"beforeBatchSave",function(){return r._4}),i.d(t,"batchSave",function(){return r._5}),i.d(t,"keyPressed",function(){return r._6}),i.d(t,"updateData",function(){return r._7}),i.d(t,"doubleTap",function(){return r._8}),i.d(t,"virtualColumnIndex",function(){return r._9}),i.d(t,"virtualActionArgs",function(){return r._10}),i.d(t,"destroy",function(){return r._11}),i.d(t,"dataListener",function(){return r._12}),i.d(t,"indexModifier",function(){return r._13}),i.d(t,"beforeStartEdit",function(){return r._14}),i.d(t,"beforeBatchCancel",function(){return r._15}),i.d(t,"batchEditFormRendered",function(){return r._16}),i.d(t,"detailDataBound",function(){return r._17}),i.d(t,"rowDrag",function(){return r._18}),i.d(t,"rowDragStartHelper",function(){return r._19}),i.d(t,"rowDrop",function(){return r._20}),i.d(t,"rowDragStart",function(){return r._21}),i.d(t,"rowsAdd",function(){return r._22}),i.d(t,"rowsRemove",function(){return r._23}),i.d(t,"rowdraging",function(){return r._24}),i.d(t,"rowDropped",function(){return r._25}),i.d(t,"autoCol",function(){return r._26}),i.d(t,"rowDeselecting",function(){return r._27}),i.d(t,"headerContent",function(){return r._28}),i.d(t,"movableContent",function(){return r._29}),i.d(t,"movableHeader",function(){return r._30}),i.d(t,"frozenContent",function(){return r._31}),i.d(t,"frozenHeader",function(){return r._32}),i.d(t,"content",function(){return r._33}),i.d(t,"table",function(){return r._34}),i.d(t,"leftRight",function(){return r._35}),i.d(t,"frozenRight",function(){return r._36}),i.d(t,"frozenLeft",function(){return r._37}),i.d(t,"dataColIndex",function(){return r._38}),i.d(t,"ariaColIndex",function(){return r._39}),i.d(t,"dataRowIndex",function(){return r._40}),i.d(t,"ariaRowIndex",function(){return r._41}),i.d(t,"DataManipulation",function(){return r._42}),i.d(t,"Reorder",function(){return r._43}),i.d(t,"Resize",function(){return r._44}),i.d(t,"RowDD",function(){return r._45}),i.d(t,"Column",function(){return r._46}),i.d(t,"TreeGridColumn",function(){return r._47}),i.d(t,"StackedColumn",function(){return r._48}),i.d(t,"EditSettings",function(){return r._49}),i.d(t,"Predicate",function(){return r._50}),i.d(t,"FilterSettings",function(){return r._51}),i.d(t,"PageSettings",function(){return r._52}),i.d(t,"SearchSettings",function(){return r._53}),i.d(t,"SelectionSettings",function(){return r._54}),i.d(t,"AggregateColumn",function(){return r._55}),i.d(t,"AggregateRow",function(){return r._56}),i.d(t,"SortDescriptor",function(){return r._57}),i.d(t,"SortSettings",function(){return r._58}),i.d(t,"RowDropSettings",function(){return r._59}),i.d(t,"InfiniteScrollSettings",function(){return r._60}),i.d(t,"LoadingIndicator",function(){return r._61}),i.d(t,"Render",function(){return r._62}),i.d(t,"TreeVirtualRowModelGenerator",function(){return r._63}),i.d(t,"Filter",function(){return r._64}),i.d(t,"ExcelExport",function(){return r._65}),i.d(t,"PdfExport",function(){return r._66}),i.d(t,"Page",function(){return r._67}),i.d(t,"Toolbar",function(){return r._68}),i.d(t,"Aggregate",function(){return r._69}),i.d(t,"Sort",function(){return r._70}),i.d(t,"TreeClipboard",function(){return r._71}),i.d(t,"ColumnMenu",function(){return r._72}),i.d(t,"ContextMenu",function(){return r._73}),i.d(t,"Edit",function(){return r._74}),i.d(t,"CommandColumn",function(){return r._75}),i.d(t,"Selection",function(){return r._76}),i.d(t,"DetailRow",function(){return r._77}),i.d(t,"VirtualScroll",function(){return r._78}),i.d(t,"TreeVirtual",function(){return r._79}),i.d(t,"Freeze",function(){return r._80}),i.d(t,"ColumnChooser",function(){return r._81}),i.d(t,"Logger",function(){return r._82}),i.d(t,"treeGridDetails",function(){return r._83}),i.d(t,"InfiniteScroll",function(){return r._84})},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(1),n=(i.n(r),i(2)),o=i(4),a=(i.n(o),i(3)),s=i(0),d=(i.n(s),i(5)),l=function(){function e(e){this.batchChildCount=0,this.addedRecords="addedRecords",this.deletedRecords="deletedRecords",this.batchAddedRecords=[],this.batchDeletedRecords=[],this.batchAddRowRecord=[],this.parent=e,this.isSelfReference=!i.i(r.isNullOrUndefined)(e.parentIdMapping),this.batchRecords=[],this.currentViewRecords=[],this.isAdd=!1,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(n.x,this.cellSaved,this),this.parent.on(n.y,this.batchAdd,this),this.parent.on(n.z,this.beforeBatchAdd,this),this.parent.on(n.w,this.batchSave,this),this.parent.on(n.A,this.beforeBatchDelete,this),this.parent.on(n.B,this.beforeBatchSave,this),this.parent.on("batchPageAction",this.batchPageAction,this),this.parent.on("batchCancelAction",this.batchCancelAction,this),this.parent.grid.on("immutable-batch-cancel",this.immutableBatchAction,this),this.parent.grid.on("next-cell-index",this.nextCellIndex,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(n.x,this.cellSaved),this.parent.off(n.y,this.batchAdd),this.parent.off(n.w,this.batchSave),this.parent.off(n.z,this.beforeBatchAdd),this.parent.off(n.A,this.beforeBatchDelete),this.parent.off(n.B,this.beforeBatchSave),this.parent.off("batchPageAction",this.batchPageAction),this.parent.off("batchCancelAction",this.batchCancelAction),this.parent.grid.off("immutable-batch-cancel",this.immutableBatchAction),this.parent.grid.off("next-cell-index",this.nextCellIndex))},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.getBatchRecords=function(){return this.batchRecords},e.prototype.getAddRowIndex=function(){return this.addRowIndex},e.prototype.getSelectedIndex=function(){return this.selectedIndex},e.prototype.getBatchChildCount=function(){return this.batchChildCount},e.prototype.batchPageAction=function(){var e,t=this.parent.grid.dataSource instanceof o.DataManager?this.parent.grid.dataSource.dataSource.json:this.parent.grid.dataSource,n=this.parent.grid.getPrimaryKeyFieldNames()[0];if(!i.i(r.isNullOrUndefined)(this.batchAddedRecords)&&this.batchAddedRecords.length)for(var a=0;a<this.batchAddedRecords.length;a++)e=t.map(function(e){return e[""+n]}).indexOf(this.batchAddedRecords[parseInt(a.toString(),10)][""+n]),t.splice(e,1);this.batchAddedRecords=this.batchRecords=this.batchAddRowRecord=this.batchDeletedRecords=this.currentViewRecords=[]},e.prototype.cellSaved=function(e){if(e.column.index===this.parent.treeColumnIndex&&this.parent.renderModule.cellRender({data:e.rowData,cell:e.cell,column:this.parent.grid.getColumnByIndex(e.column.index)}),this.isAdd&&"Batch"===this.parent.editSettings.mode&&"Bottom"!==this.parent.editSettings.newRowPosition){var t=this.parent.grid.dataSource instanceof o.DataManager?this.parent.grid.dataSource.dataSource.json:this.parent.grid.dataSource,n=void 0,l=this.parent.grid.getPrimaryKeyFieldNames()[0],p=void 0,c=void 0,h=this.selectedIndex>-1?this.batchRecords[parseInt(this.addRowIndex.toString(),10)].parentItem:null,u=void 0,g=void 0,f=void 0,y="Top"===this.parent.editSettings.newRowPosition||-1===this.selectedIndex?0:"Above"===this.parent.editSettings.newRowPosition?this.addRowIndex:this.addRowIndex+1;if(y=this.getActualRowObjectIndex(y),this.newBatchRowAdded){if(this.batchRecords.length&&(u=this.batchRecords[this.addRowIndex][this.parent.idMapping],f=this.batchRecords[this.addRowIndex][this.parent.parentIdMapping],this.batchRecords[parseInt(this.addRowIndex.toString(),10)].parentItem&&(g=this.batchRecords[parseInt(this.addRowIndex.toString(),10)].parentItem.uniqueID)),this.batchAddedRecords=i.i(a.i)(this.batchAddedRecords),this.batchAddRowRecord=i.i(a.i)(this.batchAddRowRecord),this.batchAddRowRecord.push(this.batchRecords[this.addRowIndex]),n=this.parent.grid.getRowsObject()[parseInt(y.toString(),10)].changes,n.uniqueID=i.i(s.getUid)(this.parent.element.id+"_data_"),i.i(r.setValue)("uniqueIDCollection."+n.uniqueID,n,this.parent),!Object.prototype.hasOwnProperty.call(n,"level")){if(this.batchIndex=-1===this.selectedIndex?0:this.batchIndex,"Child"===this.parent.editSettings.newRowPosition){if(n.primaryParent=h,this.selectedIndex>-1){n.parentItem=i.i(r.extend)({},this.batchRecords[this.addRowIndex]),n.parentUniqueID=n.parentItem.uniqueID,delete n.parentItem.childRecords,delete n.parentItem[this.parent.childMapping],n.level=n.parentItem.level+1,n.index=this.batchIndex;var m=i.i(a.g)(this.batchRecords[this.addRowIndex]).length,v=i.i(a.g)(this.batchRecords[this.addRowIndex])[m-1];v=i.i(r.isNullOrUndefined)(v)?this.batchRecords[this.addRowIndex]:v,p=t.map(function(e){return e[""+l]}).indexOf(v[""+l]),this.isSelfReference&&(n[this.parent.parentIdMapping]=u),i.i(d.b)(l,n.parentItem,"add",this.parent,this.isSelfReference,n)}}else if(("Above"===this.parent.editSettings.newRowPosition||"Below"===this.parent.editSettings.newRowPosition)&&!i.i(r.isNullOrUndefined)(this.batchRecords[this.addRowIndex])){if(n.level=this.batchRecords[parseInt(this.addRowIndex.toString(),10)].level,n.level&&this.selectedIndex>-1&&(n.parentItem=h,n.parentUniqueID=g,delete n.parentItem.childRecords,delete n.parentItem[this.parent.childMapping]),n.index="Below"===this.parent.editSettings.newRowPosition?this.batchIndex:this.batchIndex-1,"Below"===this.parent.editSettings.newRowPosition&&this.selectedIndex>-1){var m=i.i(a.g)(this.batchRecords[this.addRowIndex]).length,v=i.i(a.g)(this.batchRecords[this.addRowIndex])[m-1];v=i.i(r.isNullOrUndefined)(v)?this.batchRecords[this.addRowIndex]:v,p=t.map(function(e){return e[""+l]}).indexOf(v[""+l])}if("Above"===this.parent.editSettings.newRowPosition&&this.selectedIndex>-1){var v=this.batchRecords[this.addRowIndex];p=t.map(function(e){return e[""+l]}).indexOf(v[""+l])}this.isSelfReference&&(n[this.parent.parentIdMapping]=f)}n.index=-1===n.index?0:n.index,n.hasChildRecords=!1,n.childRecords=[],this.batchRecords.splice(n.index,0,n),this.currentViewRecords.splice(n.index,0,n),c=p||n.index,"Above"!==this.parent.editSettings.newRowPosition&&(c=0===n.index?c:c+1),t.splice(c,0,n),this.batchAddedRecords.push(n)}this.parent.grid.getRowsObject()[parseInt(y.toString(),10)].data=n,this.newBatchRowAdded=!1}}},e.prototype.beforeBatchAdd=function(e){if("Cell"===this.parent.editSettings.mode&&this.parent.editModule.isTabLastRow)return e.cancel=!0,void(this.parent.editModule.isTabLastRow=!1);!this.parent.editModule.isAddedRowByMethod||i.i(r.isNullOrUndefined)(this.parent.editModule.addRowIndex)||this.parent.editModule.isAddedRowByContextMenu||-1!==this.parent.grid.selectedRowIndex&&!this.parent.editModule.batchEditModule.isAdd?(this.selectedIndex=this.parent.grid.selectedRowIndex,this.addRowIndex=this.parent.grid.selectedRowIndex>-1?this.parent.grid.selectedRowIndex:0,this.parent.editModule.addRowIndex=this.parent.grid.selectedRowIndex>-1?this.parent.grid.selectedRowIndex:0,this.addRowRecord=this.parent.getSelectedRecords()[0]):(this.selectedIndex=this.parent.editModule.selectedIndex,this.addRowIndex=this.parent.editModule.addRowIndex,this.addRowRecord=this.batchRecords.length?this.batchRecords[this.selectedIndex]:this.parent.getCurrentViewRecords()[this.selectedIndex])},e.prototype.batchAdd=function(e){if("Bottom"!==this.parent.editSettings.newRowPosition){this.isAdd=!0,this.newBatchRowAdded=!0;var t=0;if(this.batchRecords.length||(this.batchAddedRecords=[],this.batchRecords=i.i(a.i)(this.parent.grid.getCurrentViewRecords()),this.currentViewRecords=i.i(a.i)(this.parent.grid.getCurrentViewRecords())),this.parent.editModule.isAddedRowByMethod&&!i.i(r.isNullOrUndefined)(this.parent.editModule.addRowIndex)&&i.i(r.classList)(this.parent.grid.getDataRows()[0],["e-batchrow"],[]),"Top"!==this.parent.editSettings.newRowPosition){var o=this.parent.grid.getCurrentViewRecords();"Batch"===this.parent.editSettings.mode&&(this.parent.getBatchChanges()[this.addedRecords].length>1||this.parent.getBatchChanges()[this.deletedRecords].length)&&(o=this.batchRecords),this.updateChildCount(o),this.parent.notify(n.m,{}),this.batchChildCount=0}this.updateRowIndex();var s=i.i(r.getValue)("focusModule",this.parent.grid),d=this.parent.getContentTable();if(this.parent.getBatchChanges()[this.deletedRecords].length&&"Above"===this.parent.editSettings.newRowPosition?(t=e.row.rowIndex,s.getContent().matrix.matrix=this.matrix):t=d.getElementsByClassName("e-batchrow")[0].rowIndex,s.getContent().matrix.current=[t,s.getContent().matrix.current[1]],this.parent.editModule.isAddedRowByMethod&&!i.i(r.isNullOrUndefined)(this.parent.editModule.addRowIndex)&&!this.parent.editModule.isAddedRowByContextMenu){var l=this.parent.getBatchChanges().addedRecords,p=parseInt(this.parent.getContentTable().getElementsByClassName("e-insertedrow")[l.length-1].getAttribute("data-rowindex"),10);this.batchRecords.splice(p,0,l[l.length-1])}}},e.prototype.beforeBatchDelete=function(e){this.batchRecords.length||(this.batchRecords=i.i(a.i)(this.parent.grid.getCurrentViewRecords()),this.currentViewRecords=i.i(a.i)(this.parent.grid.getCurrentViewRecords()));var t=i.i(r.getValue)("focusModule",this.parent.grid);this.matrix=t.getContent().matrix.matrix;var n,o,s,d=[],l=[],p=this.parent.grid.getPrimaryKeyFieldNames()[0];i.i(r.isNullOrUndefined)(e.row)||-1!==this.parent.getSelectedRows().indexOf(e.row)?(n=this.parent.grid.getSelectedRecords()[this.parent.grid.getSelectedRecords().length-1],o=i.i(a.g)(n),s=this.parent.getSelectedRows()[0].getAttribute("data-uid")):(n=e.rowData,o=i.i(a.g)(n),s=e.row.getAttribute("data-uid"));var c=parseInt(this.parent.grid.getRowElementByUID(s).getAttribute("data-rowindex"),10);if(o.length)for(var h=c+o.length,u=c+1,g=u;g<=h;g++)d.push(this.parent.grid.getDataRows()[parseInt(g.toString(),10)]),(this.parent.frozenRows||this.parent.frozenColumns||this.parent.getFrozenColumns())&&d.push(this.parent.grid.getHeaderContent()[parseInt(g.toString(),10)]);if(!i.i(r.isNullOrUndefined)(n.parentItem)){var f=i.i(a.k)(this.parent,n.parentItem.uniqueID);if(!i.i(r.isNullOrUndefined)(f)&&f.hasChildRecords){var y=f.childRecords.indexOf(n);f.childRecords.splice(y,1)}this.batchDeletedRecords=i.i(a.i)(this.batchDeletedRecords),this.batchDeletedRecords.push(n)}o.push(n),l=o;for(var g=0;g<l.length;g++){var m=this.batchRecords.map(function(e){return e[""+p]}).indexOf(l[parseInt(g.toString(),10)][""+p]);-1!==m&&this.batchRecords.splice(m,1)}for(var g=0;g<d.length;g++)i.i(r.isNullOrUndefined)(d[parseInt(g.toString(),10)])||this.parent.grid.selectionModule.selectedRecords.push(d[parseInt(g.toString(),10)])},e.prototype.updateRowIndex=function(){for(var e=this.parent.grid.getDataRows(),t=0;t<e.length;t++)e[parseInt(t.toString(),10)].setAttribute("data-rowindex",t.toString())},e.prototype.updateChildCount=function(e){for(var t=this.parent.grid.getPrimaryKeyFieldNames()[0],n="Child"===this.parent.editSettings.newRowPosition?"primaryParent":"parentItem",o=0;o<this.parent.getBatchChanges().addedRecords.length;o++)i.i(r.isNullOrUndefined)(this.parent.getBatchChanges().addedRecords[parseInt(o.toString(),10)][""+n])||this.parent.getBatchChanges().addedRecords[parseInt(o.toString(),10)][""+n][""+t]===e[parseInt(this.addRowIndex.toString(),10)][""+t]&&(this.batchChildCount=this.batchChildCount+1)},e.prototype.beforeBatchSave=function(e){var t=e.batchChanges.changedRecords;if(e.batchChanges.changedRecords.length)for(var r=0;r<t.length;r++)i.i(d.a)({value:t[parseInt(r.toString(),10)],action:"edit"},this.parent,this.isSelfReference,this.addRowIndex,this.selectedIndex,void 0);if(e.batchChanges.deletedRecords.length)for(var n=e.batchChanges.deletedRecords,o=n,r=0;r<o.length;r++){this.deleteUniqueID(o[parseInt(r.toString(),10)].uniqueID);for(var s=i.i(a.g)(o[parseInt(r.toString(),10)]),l=0;l<s.length;l++)this.deleteUniqueID(s[parseInt(l.toString(),10)].uniqueID);e.batchChanges.deletedRecords=e.batchChanges.deletedRecords.concat(s)}this.isAdd=!1},e.prototype.deleteUniqueID=function(e){delete this.parent.uniqueIDFilterCollection[""+e];delete this.parent.uniqueIDCollection[""+e]},e.prototype.batchCancelAction=function(){var e,t=this.parent.grid.getCurrentViewRecords(),n=this.parent.grid.dataSource instanceof o.DataManager?this.parent.grid.dataSource.dataSource.json:this.parent.grid.dataSource,s=this.parent.grid.getPrimaryKeyFieldNames()[0];if(!i.i(r.isNullOrUndefined)(this.batchAddedRecords))for(var d=0;d<this.batchAddedRecords.length;d++)if(e=n.map(function(e){return e[""+s]}).indexOf(this.batchAddedRecords[parseInt(d.toString(),10)][""+s]),-1!==e&&n.splice(e,1),"Child"===this.parent.editSettings.newRowPosition&&(e=t.map(function(e){return e[""+s]}).indexOf(this.batchAddedRecords[parseInt(d.toString(),10)].parentItem?this.batchAddedRecords[parseInt(d.toString(),10)].parentItem[""+s]:this.batchAddedRecords[parseInt(d.toString(),10)][""+s]),!i.i(r.isNullOrUndefined)(t[parseInt(e.toString(),10)])))for(var l=t[parseInt(e.toString(),10)].childRecords,p=0;l&&p<l.length;p++)l[parseInt(p.toString(),10)][""+s]===this.batchAddedRecords[parseInt(d.toString(),10)][""+s]&&t[parseInt(e.toString(),10)].childRecords.splice(p,1);if(!i.i(r.isNullOrUndefined)(this.parent.targetElement)){var c=this.parent.targetElement.closest("tr");this.parent.collapseRow(c),this.parent.targetElement=null}if(!i.i(r.isNullOrUndefined)(this.batchDeletedRecords))for(var d=0;d<this.batchDeletedRecords.length;d++)if(!i.i(r.isNullOrUndefined)(this.batchDeletedRecords[parseInt(d.toString(),10)].parentItem)){e=t.map(function(e){return e[""+s]}).indexOf(this.batchDeletedRecords[parseInt(d.toString(),10)].parentItem[""+s]);var h=0===this.batchDeletedRecords[parseInt(d.toString(),10)].index?this.batchDeletedRecords[parseInt(d.toString(),10)].index:this.batchDeletedRecords[parseInt(d.toString(),10)].index-1;i.i(r.isNullOrUndefined)(t[parseInt(e.toString(),10)])||t[parseInt(e.toString(),10)].childRecords.splice(h,0,this.batchDeletedRecords[parseInt(d.toString(),10)])}this.batchAddedRecords=this.batchRecords=this.batchAddRowRecord=this.currentViewRecords=[],this.batchRecords=i.i(a.i)(this.parent.grid.getCurrentViewRecords()),this.batchIndex=0,this.currentViewRecords=i.i(a.i)(this.parent.grid.getCurrentViewRecords()),this.batchDeletedRecords=[],this.parent.grid.renderModule.refresh()},e.prototype.batchSave=function(e){if("Batch"===this.parent.editSettings.mode){var t=void 0,n=Object.hasOwnProperty.call(e,"updatedRecords")?e.updatedRecords:this.parent.getBatchChanges(),s=this.parent.grid.dataSource instanceof o.DataManager?this.parent.grid.dataSource.dataSource.json:this.parent.grid.dataSource,l=this.parent.grid.getCurrentViewRecords(),p=this.parent.grid.getPrimaryKeyFieldNames()[0],c=n.addedRecords,h=void 0,u=void 0,g=void 0;if(c.length>1&&"Bottom"!==this.parent.editSettings.newRowPosition&&c.reverse(),"Bottom"!==this.parent.editSettings.newRowPosition&&!Object.hasOwnProperty.call(e,"updatedRecords")){if(s.splice(s.length-c.length,c.length),this.parent.editModule.isAddedRowByMethod&&c.length&&!i.i(r.isNullOrUndefined)(this.parent.editModule.addRowIndex)&&!this.parent.editModule.isAddedRowByContextMenu){c.reverse();for(var f=0;f<c.length;f++){var y=parseInt(this.parent.getContentTable().getElementsByClassName("e-insertedrow")[parseInt(f.toString(),10)].getAttribute("data-rowindex"),10);s.splice(y,0,c[parseInt(f.toString(),10)])}}if(this.parent.allowPaging||s.length===l.length){var m=i.i(a.i)(s);if(m.length){var v=m.map(function(e){return e[""+p]}).indexOf(l[0][""+p]),S=v+this.parent.grid.pageSettings.pageSize;l=m.splice(v,S)}}else l.length>c.length&&l.splice(l.length-c.length,c.length)}for(0===this.batchAddRowRecord.length&&this.batchAddRowRecord.push(this.parent.flatData[e.index]),this.parent.editModule.isAddedRowByContextMenu&&c.reverse(),t=0;t<c.length;t++){var I=i.i(r.extend)({},c[parseInt(t.toString(),10)]);if(delete I.parentItem,delete I.uniqueID,delete I.index,delete I.level,delete I.hasChildRecords,delete I.childRecords,delete I.parentUniqueID,i.i(r.isNullOrUndefined)(I.primaryParent)||delete I.primaryParent,c.length>1&&this.parent.editModule.isAddedRowByContextMenu){var w=this.parent.editSettings.newRowPosition;this.parent.editSettings.newRowPosition=this.parent.editModule.previousNewRowPosition,this.parent.editModule.previousNewRowPosition=w}if(c[parseInt(t.toString(),10)].taskData=I,g=this.batchAddRowRecord[parseInt(t.toString(),10)],i.i(r.isNullOrUndefined)(g)&&(g=this.batchAddRowRecord[t-1]),this.isSelfReference&&(i.i(r.isNullOrUndefined)(c[parseInt(t.toString(),10)].parentItem)||i.i(d.b)(p,c[parseInt(t.toString(),10)].parentItem,"add",this.parent,this.isSelfReference,c[parseInt(t.toString(),10)])),i.i(r.isNullOrUndefined)(g)||(u=g.index),"Top"!==this.parent.editSettings.newRowPosition&&"Bottom"!==this.parent.editSettings.newRowPosition&&i.i(r.isNullOrUndefined)(c[parseInt(t.toString(),10)].parentItem)&&-1===this.selectedIndex&&(h=-1,g=null),i.i(d.a)({value:c[parseInt(t.toString(),10)],action:"add"},this.parent,this.isSelfReference,u,h,void 0,g),h=null,"Child"===this.parent.editSettings.newRowPosition&&!i.i(r.isNullOrUndefined)(c[parseInt(t.toString(),10)].parentItem)&&(i.i(r.isNullOrUndefined)(this.parent.editModule.addRowIndex)||this.isSelfReference))for(var R=l.map(function(e){return e[""+p]}).indexOf(c[parseInt(t.toString(),10)].parentItem[""+p]),x=l[parseInt(R.toString(),10)].childRecords,C=0;C<x.length;C++)x[parseInt(C.toString(),10)][""+p]===c[parseInt(t.toString(),10)][""+p]&&l[parseInt(R.toString(),10)].childRecords.splice(C,1)}if(n.deletedRecords.length)for(t=0;t<n.deletedRecords.length;t++)i.i(d.a)({value:n.deletedRecords[parseInt(t.toString(),10)],action:"delete"},this.parent,this.isSelfReference,u,h,void 0,g);this.parent.parentData=[];for(var b=0;b<s.length;b++)s[parseInt(b.toString(),10)].index=b,i.i(r.setValue)("uniqueIDCollection."+s[parseInt(b.toString(),10)].uniqueID+".index",b,this.parent),s[parseInt(b.toString(),10)].level||this.parent.parentData.push(s[parseInt(b.toString(),10)])}this.batchAddRowRecord=this.batchAddedRecords=this.batchRecords=this.batchDeletedRecords=this.currentViewRecords=[],this.parent.editModule.isAddedRowByContextMenu&&(this.parent.editModule.isAddedRowByContextMenu=!1)},e.prototype.getActualRowObjectIndex=function(e){var t=this.parent.grid.getDataRows();if(("Below"===this.parent.editSettings.newRowPosition||"Child"===this.parent.editSettings.newRowPosition)&&this.selectedIndex>-1){if(!i.i(r.isNullOrUndefined)(this.batchRecords[this.addRowIndex])&&this.batchRecords[this.addRowIndex].expanded)if(this.parent.getBatchChanges()[this.addedRecords].length>1||this.parent.getBatchChanges()[this.deletedRecords].length){if(e+=i.i(a.g)(this.batchRecords[this.addRowIndex]).length,"Child"!==this.parent.editSettings.newRowPosition){var n=this.getBatchChildCount();e+=n}}else e+=i.i(a.g)(this.batchRecords[this.addRowIndex]).length;e>=t.length&&(e=t.length-1),this.updateChildCount(this.parent.grid.getCurrentViewRecords()),this.batchChildCount&&(e+=this.batchChildCount),this.batchChildCount=0}return e},e.prototype.immutableBatchAction=function(e){e.args.cancel=!0;var t=this.parent.grid.getBatchChanges(),i=[];Object.keys(t).length&&(i=t.addedRecords);for(var r=0;r<i.length;r++)e.rows.splice(i[parseInt(r.toString(),10)].index,1)},e.prototype.nextCellIndex=function(e){this.parent.getSelectedRows().length?e.index=this.parent.getSelectedRows()[0].rowIndex:e.index=this.batchIndex},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){r.Grid.Inject(r.ColumnChooser),this.parent=e}return e.prototype.openColumnChooser=function(e,t){return this.parent.grid.columnChooserModule.openColumnChooser(e,t)},e.prototype.destroy=function(){},e.prototype.getModuleName=function(){return"ColumnChooser"},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){r.Grid.Inject(r.ColumnMenu),this.parent=e}return e.prototype.getColumnMenu=function(){return this.parent.grid.columnMenuModule.getColumnMenu()},e.prototype.destroy=function(){},e.prototype.getModuleName=function(){return"columnMenu"},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){r.Grid.Inject(r.CommandColumn),this.parent=e}return e.prototype.getModuleName=function(){return"commandColumn"},e.prototype.destroy=function(){},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),function(){function e(e){r.Grid.Inject(r.ContextMenu),this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on("contextMenuOpen",this.contextMenuOpen,this),this.parent.on("contextMenuClick",this.contextMenuClick,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("contextMenuOpen",this.contextMenuOpen),this.parent.off("contextMenuClick",this.contextMenuClick))},e.prototype.contextMenuOpen=function(e){var t=i.i(n.select)("#"+this.parent.element.id+"_gridcontrol_cmenu_AddRow",e.element),r=i.i(n.select)("#"+this.parent.element.id+"_gridcontrol_cmenu_Edit",e.element),o=i.i(n.select)("#"+this.parent.element.id+"_gridcontrol_cmenu_Indent",e.element),a=i.i(n.select)("#"+this.parent.element.id+"_gridcontrol_cmenu_Outdent",e.element);t&&(!1===this.parent.grid.editSettings.allowAdding||this.parent.grid.isEdit?t.style.display="none":t.style.display="block"),"Cell"!==this.parent.editSettings.mode&&"Batch"!==this.parent.editSettings.mode||i.i(n.isNullOrUndefined)(r)||r.classList.contains("e-menu-hide")||(r.style.display="none");var s=this.parent,d=s.getSelectedRows()[0];if(!o&&!a||i.i(n.isNullOrUndefined)(d)){if((o||a||s.grid.isEdit)&&i.i(n.isNullOrUndefined)(d)){for(var l=0,p=e.items;l<p.length;l++){var c=p[l];"Outdent"!==c.text&&"Indent"!==c.text||s.grid.contextMenuModule.hiddenItems.push(c.text)}s.grid.contextMenuModule.contextMenu.hideItems(s.grid.contextMenuModule.hiddenItems)}}else{var h=e.event.target.closest("td");if(!i.i(n.isNullOrUndefined)(h)&&(i.i(n.isNullOrUndefined)(h)||h.classList.contains("e-rowcell")&&0===h.querySelectorAll(".e-gridform").length)){if(0===d.rowIndex||s.getSelectedRowIndexes().length>1)o.style.display=a.style.display="none";else if("rowDeselected"!==e.name||!i.i(n.isNullOrUndefined)(d)&&s.grid.isCheckBoxSelection){var u=s.getCurrentViewRecords()[d.rowIndex];i.i(n.isNullOrUndefined)(u)||(u.level>s.getCurrentViewRecords()[d.rowIndex-1].level?o.style.display="none":o.style.display="block",u.level===s.getCurrentViewRecords()[d.rowIndex-1].level&&(o.style.display="block"),0===u.level?a.style.display="none":a.style.display="block")}}else{for(var g=0,f=e.items;g<f.length;g++){var c=f[g];"Outdent"!==c.text&&"Indent"!==c.text||s.grid.contextMenuModule.hiddenItems.push(c.text)}s.grid.contextMenuModule.contextMenu.hideItems(s.grid.contextMenuModule.hiddenItems),o.style.display=a.style.display="none"}}},e.prototype.contextMenuClick=function(e){if("Above"!==e.item.id&&"Below"!==e.item.id&&"Child"!==e.item.id||(this.parent.notify("savePreviousRowPosition",e),this.parent.setProperties({editSettings:{newRowPosition:e.item.id}},!0),this.parent.editModule.isAddedRowByContextMenu=!0,this.parent.addRecord()),(e.item.id===this.parent.element.id+"_gridcontrol_cmenu_Indent"||e.item.id===this.parent.element.id+"_gridcontrol_cmenu_Outdent")&&!i.i(n.isNullOrUndefined)(this.parent.rowDragAndDropModule)){var t=e.item.id===this.parent.element.id+"_gridcontrol_cmenu_Indent"?"indent":"outdent";this.parent.rowDragAndDropModule.indentOutdentAction(null,t)}},e.prototype.getModuleName=function(){return"contextMenu"},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.getContextMenu=function(){return this.parent.grid.contextMenuModule.getContextMenu()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),i(3)),a=function(){function e(e){r.Grid.Inject(r.DetailRow),this.parent=e,this.addEventListener()}return e.prototype.getModuleName=function(){return"detailRow"},e.prototype.addEventListener=function(){this.parent.on("dataBoundArg",this.dataBoundArg,this),this.parent.on("detaildataBound",this.detaildataBound,this),this.parent.grid.on("detail-indentcell-info",this.setIndentVisibility,this),this.parent.on("childRowExpand",this.childRowExpand,this),this.parent.on("rowExpandCollapse",this.rowExpandCollapse,this),this.parent.on("actioncomplete",this.actioncomplete,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("dataBoundArg",this.dataBoundArg),this.parent.off("detaildataBound",this.detaildataBound),this.parent.off("childRowExpand",this.childRowExpand),this.parent.off("rowExpandCollapse",this.rowExpandCollapse),this.parent.off("actioncomplete",this.actioncomplete),this.parent.grid.off("detail-indentcell-info",this.setIndentVisibility))},e.prototype.setIndentVisibility=function(e){e.visible=!1},e.prototype.dataBoundArg=function(){for(var e=this.parent.getRows().filter(function(e){return!e.classList.contains("e-detailrow")}),t=0;t<e.length;t++){var a=e[parseInt(t.toString(),10)].getElementsByClassName("e-detailrowcollapse"),s=this.parent.grid.getRowObjectFromUID(e[parseInt(t.toString(),10)].getAttribute("data-Uid")),d=i.i(r.getObject)("parentItem",this.parent.grid.getCurrentViewRecords()[parseInt(t.toString(),10)]);(i.i(n.isNullOrUndefined)(d)||!i.i(n.isNullOrUndefined)(d)&&i.i(o.f)(this.parent,s.data,this.parent.grid.getCurrentViewRecords()))&&this.parent.grid.detailRowModule.expand(a[0])}},e.prototype.childRowExpand=function(e){var t=e.row.getElementsByClassName("e-detailrowcollapse");i.i(n.isNullOrUndefined)(t[0])||this.parent.grid.detailRowModule.expand(t[0])},e.prototype.rowExpandCollapse=function(e){if(!i.i(o.a)(this.parent))for(var t=0;t<e.detailrows.length;t++)e.detailrows[parseInt(t.toString(),10)].style.display=e.action},e.prototype.detaildataBound=function(e){var t=e.data,r=e.detailElement.parentElement.previousSibling,o=i.i(n.isNullOrUndefined)(t.parentItem)?t.index:t.parentItem.index,a="e-gridrowindex"+o+"level"+t.level,s=r.querySelector("."+a).classList,d=[].slice.call(s).filter(function(e){return e===a}),l=d[0].length,p=d.toString().slice(6,l),c="e-griddetail"+p;i.i(n.addClass)([e.detailElement.parentElement],c)},e.prototype.actioncomplete=function(e){if("beginEdit"===e.requestType||"add"===e.requestType){var t=e.row.querySelectorAll(".e-editcell")[0].getAttribute("colSpan"),n=parseInt(t,10)-1,o=n.toString();e.row.querySelectorAll(".e-editcell")[0].setAttribute("colSpan",o)}for(var a=this.parent.grid.contentModule.getRows(),s=0;s<a.length;s++)a[parseInt(s.toString(),10)].cells[0].visible=!1;i.i(r.getObject)("focusModule",this.parent.grid).refreshMatrix(!0)({rows:this.parent.grid.contentModule.getRows()})},e.prototype.destroy=function(){this.removeEventListener()},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return p});var r=i(0),n=(i.n(r),i(2)),o=i(1),a=(i.n(o),i(4)),s=(i.n(a),i(3)),d=i(5),l=i(28),p=function(){function e(e){this.addedRecords="addedRecords",this.deletedRecords="deletedRecords",this.prevAriaRowIndex="-1",this.isAddedRowByMethod=!1,this.isAddedRowByContextMenu=!1,r.Grid.Inject(r.Edit),this.parent=e,this.isSelfReference=!i.i(o.isNullOrUndefined)(e.parentIdMapping),this.previousNewRowPosition=null,this.internalProperties={},this.batchEditModule=new l.a(this.parent),this.addEventListener()}return e.prototype.getModuleName=function(){return"edit"},e.prototype.addEventListener=function(){this.parent.on(n.k,this.crudAction,this),this.parent.on(n.l,this.beginEdit,this),this.parent.on(n.m,this.beginAdd,this),this.parent.on(n.n,this.recordDoubleClick,this),this.parent.on(n.o,this.cellSave,this),this.parent.on(n.p,this.batchCancel,this),this.parent.grid.on(n.q,this.keyPressed,this),this.parent.grid.on("batchedit-form",this.lastCellTab,this),this.parent.grid.on("content-ready",this.contentready,this),this.parent.on(n.r,this.cellEdit,this),this.parent.on("actionBegin",this.editActionEvents,this),this.parent.on("actionComplete",this.editActionEvents,this),this.parent.grid.on(n.s,this.recordDoubleClick,this),this.parent.grid.on("dblclick",this.gridDblClick,this),this.parent.grid.on("recordAdded",this.customCellSave,this),this.parent.on("savePreviousRowPosition",this.savePreviousRowPosition,this),this.parent.grid.on(n.t,this.beforeStartEdit,this),this.parent.grid.on(n.u,this.beforeBatchCancel,this),this.parent.grid.on("reset-edit-props",this.resetIsOnBatch,this),this.parent.grid.on("get-row-position",this.getRowPosition,this)},e.prototype.gridDblClick=function(e){if(this.doubleClickTarget=e.target,e.target.classList.contains("e-frame")&&0===this.parent.getCurrentViewRecords().length&&(this.doubleClickTarget=null),e.target.classList.contains("e-treegridcollapse")||e.target.classList.contains("e-treegridexpand")){var t=i.i(r.parentsUntil)(e.target,"e-row"),n=t&&parseInt(t.getAttribute("data-rowindex"),10);!i.i(o.isNullOrUndefined)(n)&&n>=0&&this.parent.allowPaging&&(this.parent.grid.getDataRows()[n].dataset.uid=this.parent.grid.contentModule.getRows()[n].uid)}},e.prototype.getRowPosition=function(e){e.newRowPosition=this.parent.editSettings.newRowPosition,e.addRowIndex=this.addRowIndex,e.dataRowIndex=+this.prevAriaRowIndex},e.prototype.beforeStartEdit=function(e){"Cell"===this.parent.editSettings.mode&&this.parent.trigger(n.v,e)},e.prototype.beforeBatchCancel=function(e){"Cell"===this.parent.editSettings.mode&&this.parent.trigger(n.h,e)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(n.k,this.crudAction),this.parent.off(n.l,this.beginEdit),this.parent.off(n.m,this.beginAdd),this.parent.off(n.n,this.recordDoubleClick),this.parent.off(n.p,this.batchCancel),this.parent.grid.off(n.q,this.keyPressed),this.parent.grid.off("batchedit-form",this.lastCellTab),this.parent.grid.off("content-ready",this.contentready),this.parent.off(n.r,this.cellEdit),this.parent.off("actionBegin",this.editActionEvents),this.parent.off("actionComplete",this.editActionEvents),this.parent.grid.off("recordAdded",this.customCellSave),this.parent.grid.off(n.s,this.recordDoubleClick),this.parent.off("savePreviousRowPosition",this.savePreviousRowPosition),this.parent.grid.off(n.t,this.beforeStartEdit),this.parent.grid.off(n.u,this.beforeBatchCancel),this.parent.grid.off("dblclick",this.gridDblClick),this.parent.grid.off("reset-edit-props",this.resetIsOnBatch),this.parent.grid.off("get-row-position",this.getRowPosition))},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.applyFormValidation=function(e){this.parent.grid.editModule.applyFormValidation(e)},e.prototype.editActionEvents=function(e){var t=i.i(r.getObject)("editAction",e),n=i.i(r.getObject)("name",t),d=this.parent,l=d.dataSource.adaptor;if((i.i(s.a)(d)||l instanceof a.RemoteSaveAdaptor)&&"save"===t.requestType&&"add"===t.action&&("Child"===d.editSettings.newRowPosition||"Below"===d.editSettings.newRowPosition||"Above"===d.editSettings.newRowPosition))if("actionBegin"===n){var p=i.i(o.isNullOrUndefined)(t.row)||!Object.keys(t.row).length?this.selectedIndex:t.row.rowIndex-1,c=i.i(o.isNullOrUndefined)(p)||-1===p?-1:d.getCurrentViewRecords()[parseInt(p.toString(),10)][d.getPrimaryKeyFieldNames()[0]];d.grid.query.addParams("relationalKey",c)}else if("actionComplete"===n)for(var h=d.grid.query.params.length,u=0;u<h;u++)"relationalKey"===d.grid.query.params[parseInt(u.toString(),10)].key&&d.grid.query.params.splice(u);this.parent.enableInfiniteScrolling&&"actionComplete"===n&&this.infiniteAddAction(t),"Batch"===this.parent.editSettings.mode&&"paging"===t.requestType&&this.parent.notify("batchPageAction",{})},e.prototype.infiniteAddAction=function(e){if("save"===e.requestType&&"add"===e.action||"delete"===e.requestType){if("Top"!==this.parent.editSettings.newRowPosition&&-1!==this.selectedIndex&&"save"===e.requestType&&"add"===e.action){var t=this.parent.grid.getRowsObject(),n=t.splice(0,1)[0],o=this.addRowIndex,a=this.parent.getCurrentViewRecords();"Below"!==this.parent.editSettings.newRowPosition&&"Child"!==this.parent.editSettings.newRowPosition||(o+=i.i(s.g)(a[o+1]).length),o="Below"===this.parent.editSettings.newRowPosition?o+1:o,t.splice(o,0,n);var d=a.splice(0,1)[0];a.splice(o,0,d),this.updateInfiniteCurrentViewData(d,this.addRowIndex)}var l=this.parent.grid.getRows(),p=this.parent.grid.getRowsObject(),c=this.parent.infiniteScrollSettings.enableCache;c||(i.i(r.resetRowIndex)(this.parent.grid,this.parent.grid.getRowsObject(),this.parent.grid.getRows(),0),this.updateIndex(this.parent.grid.dataSource,this.parent.getRows(),this.parent.getCurrentViewRecords())),!c&&this.parent.getFrozenColumns()>0&&(i.i(r.resetRowIndex)(this.parent.grid,p,l,0),this.updateIndex(this.parent.grid.dataSource,l,this.parent.getCurrentViewRecords()))}},e.prototype.updateInfiniteCurrentViewData=function(e,t){var r=this,n=Math.ceil(t/this.parent.grid.pageSettings.pageSize),a=n>0?n:1,d=t-(a-1)*this.parent.pageSettings.pageSize,l=this.parent.grid.infiniteScrollModule.infiniteCurrentViewData;l[1].splice(0,1);var p=l[parseInt(a.toString(),10)];i.i(o.isNullOrUndefined)(this.addRowRecord)||(p.filter(function(e,t){e.uniqueID===r.addRowRecord.uniqueID&&(d=t)}),(this.addRowRecord.hasChildRecords&&this.addRowRecord.childRecords.length&&"Below"===this.parent.editSettings.newRowPosition||"Child"===this.parent.editSettings.newRowPosition)&&(d+=i.i(s.g)(this.addRowRecord).length)),d>=this.parent.pageSettings.pageSize&&(a+=1,p=l[parseInt(a.toString(),10)],d=d-this.parent.pageSettings.pageSize>=0?d-this.parent.pageSettings.pageSize:0),d="Below"===this.parent.editSettings.newRowPosition?d+1:d,p.splice(d,0,e),this.parent.grid.infiniteScrollModule.updateCurrentViewData()},e.prototype.recordDoubleClick=function(e){var t=e.target;if(!i.i(o.isNullOrUndefined)(t.closest("td.e-rowcell"))&&this.parent.grid.editSettings.allowEditing&&!this.parent.grid.isEdit){var n=this.parent.grid.getColumnByIndex(+t.closest("td.e-rowcell").getAttribute("data-colindex"));if("Cell"===this.parent.editSettings.mode&&!this.isOnBatch&&n&&!n.isPrimaryKey&&this.parent.editSettings.allowEditing&&n.allowEditing&&!t.classList.contains("e-treegridexpand")&&!t.classList.contains("e-treegridcollapse")&&this.parent.editSettings.allowEditOnDblClick){if(this.isOnBatch=!0,this.parent.grid.setProperties({selectedRowIndex:e.rowIndex},!0),this.parent.enableVirtualization){var a=i.i(r.parentsUntil)(e.target,"e-row");this.prevAriaRowIndex=a.getAttribute("data-rowindex"),a.setAttribute("data-rowindex",a.rowIndex+"")}this.updateGridEditMode("Batch")}else"Cell"!==this.parent.editSettings.mode||n.allowEditing&&!n.isPrimaryKey||(this.isOnBatch=!0,this.updateGridEditMode("Batch"))}},e.prototype.updateGridEditMode=function(e){this.parent.grid.setProperties({editSettings:{mode:e}},!0),i.i(r.getObject)("updateEditObj",this.parent.grid.editModule).apply(this.parent.grid.editModule),this.parent.grid.isEdit=!1},e.prototype.resetIsOnBatch=function(){this.parent.enableVirtualization&&"Cell"===this.parent.editSettings.mode&&(this.isOnBatch=!1,this.updateGridEditMode("Normal"))},e.prototype.keyPressed=function(e){this.isOnBatch&&(this.keyPress=e.action),"f2"===e.action&&this.recordDoubleClick(e),"escape"===e.action&&this.parent.closeEdit()},e.prototype.deleteUniqueID=function(e){delete this.parent.uniqueIDFilterCollection[""+e];delete this.parent.uniqueIDCollection[""+e]},e.prototype.cellEdit=function(e){var t=this,r=e.promise;if(delete e.promise,this.parent.enableVirtualization&&!i.i(o.isNullOrUndefined)(this.prevAriaRowIndex)&&"-1"!==this.prevAriaRowIndex&&(e.row.setAttribute("data-rowindex",this.prevAriaRowIndex),this.prevAriaRowIndex=void 0),"enter"!==this.keyPress&&this.parent.trigger(n.r,e,function(e){e.cancel||"Cell"!==t.parent.editSettings.mode?e.cancel&&"Cell"===t.parent.editSettings.mode&&(t.isOnBatch=!1,t.updateGridEditMode("Normal")):t.enableToolbarItems("edit"),i.i(o.isNullOrUndefined)(r)||r.resolve(e)}),this.doubleClickTarget&&(this.doubleClickTarget.classList.contains("e-treegridexpand")||this.doubleClickTarget.classList.contains("e-treegridcollapse")||this.doubleClickTarget.classList.contains("e-summarycell")))return e.cancel=!0,void(this.doubleClickTarget=null);"Cell"===this.parent.editSettings.mode&&("tab"===this.keyPress||"shiftTab"===this.keyPress?this.keyPress=null:"enter"===this.keyPress&&(e.cancel=!0,this.keyPress=null,i.i(o.setValue)("isEditCollapse",!1,this.parent)),e.columnObject.allowEditing||(e.cancel=!0)),this.parent.enableVirtualization&&(this.parent.grid.contentModule.editedRowIndex=this.parent.grid.editModule.editModule.index)},e.prototype.enableToolbarItems=function(e){if(!i.i(o.isNullOrUndefined)(this.parent.grid.toolbarModule)){var t=this.parent.element.id+"_gridcontrol_";this.parent.grid.toolbarModule.enableItems([t+"add",t+"edit",t+"delete"],"save"===e),this.parent.grid.toolbarModule.enableItems([t+"update",t+"cancel"],"edit"===e)}},e.prototype.batchCancel=function(){if("Cell"===this.parent.editSettings.mode){var e=i.i(o.getValue)("editModule.cellDetails",this.parent.grid.editModule),t=this.parent.getCellFromIndex(e.rowIndex,this.parent.treeColumnIndex);this.parent.renderModule.cellRender({data:e.rowData,cell:t,column:this.parent.grid.getColumns()[this.parent.treeColumnIndex]}),this.updateGridEditMode("Normal"),this.isOnBatch=!1}"Batch"===this.parent.editSettings.mode&&this.parent.notify("batchCancelAction",{})},e.prototype.customCellSave=function(e){i.i(s.b)(this.parent)&&"Cell"===this.parent.editSettings.mode&&"edit"===e.action&&(this.updateCell(e,e.rowIndex),this.afterCellSave(e,e.row,e.rowIndex))},e.prototype.cellSave=function(e){var t=this;if("Cell"===this.parent.editSettings.mode&&this.parent.element.querySelector("form")){e.cancel=!0;i.i(o.setValue)("isEditCollapse",!0,this.parent),e.rowData[e.columnName]=e.value;var r;r=i.i(o.isNullOrUndefined)(e.cell)?this.parent.grid.editModule.editModule.form.parentElement.parentNode:e.cell.parentNode;var d,l=this.parent.getPrimaryKeyFieldNames();if(i.i(o.isNullOrUndefined)(r))this.parent.grid.getCurrentViewRecords().filter(function(t,i){if(t[l[0]]===e.rowData[l[0]])return void(d=i)});else{var p=this.parent.getFrozenLeftColumnsCount()>0||this.parent.getFrozenRightColumnsCount()>0;d=p?(this.parent.getRows().indexOf(r),this.parent.getRows().indexOf(r)):-1===this.parent.getRows().indexOf(r)&&this.parent.getFrozenColumns()>0?this.parent.grid.getRows().indexOf(r):this.parent.getRows().indexOf(r)}var c={};if(i.i(o.extend)(c,e),c.cancel=!1,c.type="save",r=this.parent.grid.getRows()[r.rowIndex],this.parent.trigger(n.v,c),c.cancel)this.parent.grid.isEdit=!0;else if(r.rowIndex===this.parent.getCurrentViewRecords().length-1&&"tab"===this.keyPress&&(this.isTabLastRow=!0),i.i(s.a)(this.parent)||this.parent.dataSource instanceof a.DataManager&&this.parent.dataSource.adaptor instanceof a.RemoteSaveAdaptor){if(i.i(s.a)(this.parent)||this.parent.dataSource instanceof a.DataManager&&this.parent.dataSource.adaptor instanceof a.RemoteSaveAdaptor){var h=this.parent.grid.query;if(this.parent.isGantt&&!this.parent.loadChildOnDemand)this.updateCell(e,d),i.i(o.setValue)("isEdit",!1,this.parent.grid),this.afterCellSave(e,r,d);else{var u=null;u=this.parent.grid.dataSource.update(l[0],e.rowData,h.fromTable,h,e.previousValue),u.then(function(n){i.i(o.isNullOrUndefined)(n)||(e.rowData[e.columnName]=n[e.columnName]),t.updateCell(e,d),i.i(o.setValue)("isEdit",!1,t.parent.grid),t.afterCellSave(e,r,d)})}}}else if(i.i(s.b)(this.parent)){var g={requestType:"save",data:e.rowData,action:"edit",row:r,rowIndex:d,rowData:e.rowData,columnName:e.columnName,filterChoiceCount:null,excelSearchOperator:null};this.parent.grid.getDataModule().eventPromise(g,this.parent.grid.query)}else this.updateCell(e,d),i.i(o.setValue)("isEdit",!1,this.parent.grid),this.afterCellSave(e,r,d)}this.parent.enableVirtualization&&(this.parent.grid.contentModule.virtualData={})},e.prototype.afterCellSave=function(e,t,r){this.parent.grid.aggregateModule&&this.parent.grid.aggregateModule.refresh(e.rowData),this.parent.grid.editModule.destroyWidgets([this.parent.grid.getColumnByField(e.columnName)]),this.parent.grid.editModule.formObj.destroy(),"tab"!==this.keyPress&&"shiftTab"!==this.keyPress&&(this.updateGridEditMode("Normal"),this.isOnBatch=!1),this.enableToolbarItems("save"),i.i(o.removeClass)([t],["e-editedrow","e-batchrow"]),i.i(o.removeClass)(t.querySelectorAll(".e-rowcell"),["e-editedbatchcell","e-updatedtd"]),!1!==this.parent.isCellSaveFocus&&this.parent.grid.focusModule.restoreFocus(),i.i(d.a)({value:e.rowData,action:"edit"},this.parent,this.isSelfReference,this.addRowIndex,this.selectedIndex,e.columnName),t.rowIndex===this.parent.getCurrentViewRecords().length-1&&"enter"===this.keyPress&&(this.keyPress=null);var a={type:"save",column:this.parent.getColumnByField(e.columnName),data:e.rowData,previousData:e.previousValue,row:t,target:e.cell};this.parent.aggregates.map(function(e){return!0===e.showChildSummary}).length&&this.parent.grid.refresh(),this.parent.trigger(n.h,a)},e.prototype.lastCellTab=function(){!this.parent.grid.isEdit&&this.isOnBatch&&"tab"===this.keyPress&&"Cell"===this.parent.editSettings.mode&&(this.parent.editSettings.allowNextRowEdit?this.enableToolbarItems("edit"):(this.updateGridEditMode("Normal"),this.isOnBatch=!1,this.keyPress=null))},e.prototype.updateCell=function(e,t){this.parent.grid.editModule.updateCell(t,e.columnName,e.rowData[e.columnName]),this.parent.grid.getRowsObject()[parseInt(t.toString(),10)].data=e.rowData},e.prototype.crudAction=function(e,t){i.i(d.a)(e,this.parent,this.isSelfReference,this.addRowIndex,this.selectedIndex,t,this.addRowRecord),this.parent.parentData=[];for(var r=this.parent.grid.dataSource instanceof a.DataManager?this.parent.grid.dataSource.dataSource.json:this.parent.grid.dataSource,n=0;n<r.length;n++){r[parseInt(n.toString(),10)].index=n;var l=this.parent.grid.getPrimaryKeyFieldNames()[0];e.value[""+l]===r[parseInt(n.toString(),10)][""+l]&&"add"===e.action&&(r[parseInt(n.toString(),10)].level=this.internalProperties.level,r[parseInt(n.toString(),10)].taskData=this.internalProperties.taskData,r[parseInt(n.toString(),10)].uniqueID=this.internalProperties.uniqueID,i.i(o.isNullOrUndefined)(this.internalProperties.parentItem)||(r[parseInt(n.toString(),10)].parentItem=this.internalProperties.parentItem,r[parseInt(n.toString(),10)].parentUniqueID=this.internalProperties.parentUniqueID),r[parseInt(n.toString(),10)].childRecords=this.internalProperties.childRecords),i.i(o.setValue)("uniqueIDCollection."+r[parseInt(n.toString(),10)].uniqueID+".index",n,this.parent);var p=this.parent.dataSource.adaptor;(i.i(s.a)(this.parent)||p instanceof a.RemoteSaveAdaptor)&&i.i(o.setValue)("uniqueIDCollection."+r[parseInt(n.toString(),10)].uniqueID,r[parseInt(n.toString(),10)],this.parent),r[parseInt(n.toString(),10)].level||this.parent.parentData.push(r[parseInt(n.toString(),10)])}this.parent.enableInfiniteScrolling||"add"===e.action&&null!=this.previousNewRowPosition&&(this.parent.setProperties({editSettings:{newRowPosition:this.previousNewRowPosition}},!0),this.previousNewRowPosition=null)},e.prototype.updateIndex=function(e,t,r){for(var n=0;n<this.parent.getDataRows().length;n++){var a=r[parseInt(n.toString(),10)];if(!i.i(o.isNullOrUndefined)(a)){var s=i.i(o.getValue)("uniqueIDCollection."+a.uniqueID+".index",this.parent);if(a.index=s,!i.i(o.isNullOrUndefined)(a.parentItem)){var d=i.i(o.getValue)("uniqueIDCollection."+a.parentItem.uniqueID+".index",this.parent);a.parentItem.index=d}}}var l=-1,p=this.parent.treeColumnIndex;if(this.parent.getFrozenColumns()>0)for(var c=t[0].querySelectorAll(".e-rowcell"),h=0;h<c.length;h++)if(c[parseInt(h.toString(),10)].classList.contains("e-gridrowindex0level0")){p=h;break}for(var u=0;u<this.parent.getRows().length;u++){t[parseInt(u.toString(),10)].classList.contains("e-detailrow")||l++;var g=r[parseInt(l.toString(),10)];if(!i.i(o.isNullOrUndefined)(g)){var s=g.index,f=g.level,y=t[parseInt(u.toString(),10)];i.i(o.isNullOrUndefined)(g.parentItem)||(s=i.i(o.getValue)("uniqueIDCollection."+g.parentItem.uniqueID+".index",this.parent));var m=y.cells[parseInt(p.toString(),10)];if(!i.i(o.isNullOrUndefined)(m)){for(var h=0;h<m.classList.length;h++){var v=m.classList[parseInt(h.toString(),10)],S=/e-gridrowindex/i,I=/e-griddetailrowindex/i,w=v.match(S),R=v.match(I);null!=w&&i.i(o.removeClass)([m],v),null!=R&&i.i(o.removeClass)([m],v)}t[parseInt(u.toString(),10)].classList.contains("e-detailrow")?i.i(o.addClass)([m],"e-griddetailrowindex"+s+"level"+f):i.i(o.addClass)([m],"e-gridrowindex"+s+"level"+f)}}}},e.prototype.beginAdd=function(){var e,t=this.addRowIndex,r=this.parent.grid.getCurrentViewRecords();"Batch"===this.parent.editSettings.mode&&(t=this.batchEditModule.getAddRowIndex(),this.selectedIndex=this.batchEditModule.getSelectedIndex(),(this.parent.getBatchChanges()[this.addedRecords].length>1||this.parent.getBatchChanges()[this.deletedRecords].length)&&(r=this.batchEditModule.getBatchRecords()));var n=this.parent.grid.getDataRows(),a=n.length?+n[0].getAttribute("data-rowindex"):0,d=n.length?+n[n.length-1].getAttribute("data-rowindex"):0,l=this.selectedIndex>=a&&this.selectedIndex<=d,p=this.parent.enableVirtualization&&this.addRowIndex>-1&&"-1"!==this.prevAriaRowIndex;if("Dialog"!==this.parent.editSettings.mode){if("Above"===this.parent.editSettings.newRowPosition)e="before";else if(("Below"===this.parent.editSettings.newRowPosition||"Child"===this.parent.editSettings.newRowPosition)&&(this.selectedIndex>-1||p)&&l&&(e="after",!i.i(o.isNullOrUndefined)(r[parseInt(t.toString(),10)])&&r[parseInt(t.toString(),10)].expanded))if("Batch"===this.parent.editSettings.mode&&(this.parent.getBatchChanges()[this.addedRecords].length>1||this.parent.getBatchChanges()[this.deletedRecords].length)){if(t+=i.i(s.g)(r[parseInt(t.toString(),10)]).length,"Child"!==this.parent.editSettings.newRowPosition){var c=this.batchEditModule.getBatchChildCount();t+=c}}else this.parent.enableVirtualization||(t+=i.i(s.g)(r[parseInt(t.toString(),10)]).length);if((this.selectedIndex>-1||p)&&l&&(t||"Child"===this.parent.editSettings.newRowPosition||"Below"===this.parent.editSettings.newRowPosition)){t>=n.length-1&&(t=n.length-2);var h="rows",u=this.parent.grid.contentModule[""+h][0],g=document.activeElement;n[t+1][""+e](n[0]),i.i(o.setValue)("batchIndex",t+1,this.batchEditModule);var f="Above"===this.parent.editSettings.newRowPosition?t:t+1;if("Batch"===this.parent.editSettings.mode&&(this.parent.grid.contentModule[""+h].splice(0,1),this.parent.grid.contentModule[""+h].splice(f,0,u)),"Row"===this.parent.editSettings.mode||"Cell"===this.parent.editSettings.mode){for(var y=this.parent.grid.getContentTable().querySelectorAll(".e-griderror"),m=0;m<y.length;m++)y[parseInt(m.toString(),10)].remove();i.i(o.setValue)("errorRules",[],this.parent.grid.editModule.formObj)}p&&(this.prevAriaRowIndex="-1"),(!this.parent.enableVirtualization||this.parent.enableVirtualization&&!Object.keys(this.parent.grid.contentModule.emptyRowData).length)&&g.focus(),this.parent.enableVirtualization&&!Object.keys(this.parent.grid.contentModule.emptyRowData).length&&this.parent.grid.contentModule.createEmptyRowdata()}}if("Batch"===this.parent.editSettings.mode&&!i.i(o.isNullOrUndefined)(this.addRowIndex)&&-1!==this.addRowIndex&&this.isAddedRowByMethod&&!this.isAddedRowByContextMenu){t=this.batchEditModule.getAddRowIndex(),this.selectedIndex=this.batchEditModule.getSelectedIndex();var v=this.parent.getBatchChanges().addedRecords,S=void 0;if(v.length)for(var m=0;m<v.length;m++)i.i(o.isNullOrUndefined)(v[parseInt(m.toString(),10)].uniqueID)&&(S=v[parseInt(m.toString(),10)]);var I={action:"add",data:S,index:t,seletedRow:0};this.beginAddEdit(I),this.batchEditModule.batchAddRowRecord.push(this.batchEditModule.addRowRecord),this.batchEditModule.batchAddedRecords.push(I.data)}},e.prototype.beginEdit=function(e){if("refresh"===e.requestType&&this.isOnBatch)return void(e.cancel=!0);if("Cell"===this.parent.editSettings.mode&&"beginEdit"===e.requestType)return void(e.cancel=!0);if(this.doubleClickTarget&&(this.doubleClickTarget.classList.contains("e-treegridexpand")||this.doubleClickTarget.classList.contains("e-treegridcollapse")||this.doubleClickTarget.classList.contains("e-frame")))return e.cancel=!0,void(this.doubleClickTarget=null);if("delete"===e.requestType){var t=e.data;if(i.i(o.isNullOrUndefined)(e.data[0].uniqueID))for(var r=this.parent.getPrimaryKeyFieldNames(),n=this,a=0;a<t.length;a++)!function(i){n.parent.flatData.filter(function(n){n[""+r[0]]===e.data[parseInt(i.toString(),10)][r[0]]&&(t[parseInt(i.toString(),10)]=n)})}(a);for(var a=0;a<t.length;a++){this.deleteUniqueID(t[parseInt(a.toString(),10)].uniqueID);for(var d=i.i(s.g)(t[parseInt(a.toString(),10)]),l=0;l<d.length;l++)this.deleteUniqueID(d[parseInt(l.toString(),10)].uniqueID);e.data=e.data.concat(d)}}if("add"===e.requestType||this.isAddedRowByMethod&&(this.parent.enableVirtualization||this.parent.enableInfiniteScrolling)){if((-1===this.parent.grid.selectedRowIndex&&this.isAddedRowByMethod||e.index!==this.parent.grid.selectedRowIndex)&&0!==e.index||(this.selectedIndex=this.parent.grid.selectedRowIndex),this.parent.enableVirtualization){var p='.e-row[data-rowindex="'+this.selectedIndex+'"]',c=void 0;this.selectedIndex>-1&&"Top"!==this.parent.editSettings.newRowPosition&&"Bottom"!==this.parent.editSettings.newRowPosition?(this.prevAriaRowIndex=this.selectedIndex.toString(),c=this.parent.getContent().querySelector(p),this.addRowIndex=c?c.rowIndex:0):this.prevAriaRowIndex&&"-1"!==this.prevAriaRowIndex?(p='.e-row[data-rowindex="'+this.prevAriaRowIndex+'"]',c=this.parent.getContent().querySelector(p),this.addRowIndex=c?c.rowIndex:0):this.addRowIndex=0}else this.isAddedRowByMethod&&(this.parent.enableVirtualization||this.parent.enableInfiniteScrolling)?0!==e.index?this.addRowIndex=e.index:this.addRowIndex=this.parent.grid.selectedRowIndex:this.addRowIndex=this.parent.grid.selectedRowIndex>-1?this.parent.grid.selectedRowIndex:0;(this.isAddedRowByMethod||this.isAddedRowByContextMenu&&-1!==this.parent.grid.selectedRowIndex)&&(this.parent.enableVirtualization||this.parent.enableInfiniteScrolling)?(this.addRowRecord=this.parent.flatData[this.parent.grid.selectedRowIndex],this.parent.enableVirtualization&&this.isAddedRowByContextMenu&&(this.addRowRecord=this.parent.getCurrentViewRecords()[this.addRowIndex])):this.addRowRecord=this.parent.getSelectedRecords()[0]}this.isAddedRowByMethod&&0!==e.index&&(this.addRowRecord=this.parent.flatData[e.index],this.addRowIndex=e.index),"Child"===this.parent.editSettings.newRowPosition&&i.i(o.isNullOrUndefined)(this.addRowRecord)&&!i.i(o.isNullOrUndefined)(this.parent.getSelectedRecords()[0])&&(this.addRowRecord=this.parent.getSelectedRecords()[0]),i.i(o.isNullOrUndefined)(this.addRowRecord)&&this.parent.getCurrentViewRecords().length>this.addRowIndex&&"save"===e.requestType&&0!==this.parent.getSelectedRecords().length&&(this.addRowRecord=this.parent.getCurrentViewRecords()[this.addRowIndex]),this.isAddedRowByMethod=!1,e=this.beginAddEdit(e)},e.prototype.savePreviousRowPosition=function(){null===this.previousNewRowPosition&&(this.previousNewRowPosition=this.parent.editSettings.newRowPosition)},e.prototype.beginAddEdit=function(e){var t=e.data;if("add"===e.action){var n=this.parent.grid.getPrimaryKeyFieldNames()[0],l=null;t.taskData=i.i(o.isNullOrUndefined)(t.taskData)?i.i(o.extend)({},e.data):t.taskData;var p=void 0;p=this.parent.enableVirtualization&&0!==e.index?this.parent.flatData:"Batch"===this.parent.editSettings.mode&&this.isAddedRowByMethod&&!i.i(o.isNullOrUndefined)(this.addRowIndex)?this.batchEditModule.batchRecords:this.parent.grid.getCurrentViewRecords(),this.parent.enableVirtualization&&0!==e.index&&(this.addRowIndex=this.parent.flatData.indexOf(this.addRowRecord),this.selectedIndex=this.addRowIndex);var c=this.addRowIndex;t.uniqueID=i.i(r.getUid)(this.parent.element.id+"_data_"),i.i(o.setValue)("uniqueIDCollection."+t.uniqueID,t,this.parent);var h=0,u=void 0,g=void 0,f=void 0,y=void 0,m=this.parent.enableVirtualization&&this.addRowIndex>-1&&"-1"!==this.prevAriaRowIndex,v=this.parent.getRows(),S=v.length?p.indexOf(p[0]):0,I=v.length?+v[v.length-1].getAttribute("data-rowindex"):0,w=!(!this.parent.enableVirtualization||0===e.index)||this.selectedIndex>=S&&this.selectedIndex<=I;if(p.length&&(u=p[this.addRowIndex][this.parent.idMapping],y=p[this.addRowIndex][this.parent.parentIdMapping],p[this.addRowIndex].parentItem&&(g=p[this.addRowIndex].parentItem.uniqueID),f=p[this.addRowIndex].parentItem),"Top"!==this.parent.editSettings.newRowPosition&&p.length){if(h=p[this.addRowIndex].level,"Above"===this.parent.editSettings.newRowPosition)l="before",c=p[this.addRowIndex].index;else if("Below"===this.parent.editSettings.newRowPosition){l="after";var R=i.i(s.g)(p[this.addRowIndex]).length,x=p[this.addRowIndex].index;c=R>0?x+R:x}else if("Child"===this.parent.editSettings.newRowPosition){l="after",(this.selectedIndex>-1||m)&&w&&(t.parentItem=i.i(o.extend)({},p[this.addRowIndex]),t.parentUniqueID=t.parentItem.uniqueID,delete t.parentItem.childRecords,delete t.parentItem[this.parent.childMapping]);var C=i.i(s.g)(p[this.addRowIndex]).length,b=p[this.addRowIndex].index;this.selectedIndex>=0&&(t.level=h+1),c=C>0?b+C:b,this.isSelfReference&&(this.parent.isLocalData||-1!==this.parent.editModule.selectedIndex?t.taskData[this.parent.parentIdMapping]=t[this.parent.parentIdMapping]=u:t.taskData[this.parent.parentIdMapping]=t[this.parent.parentIdMapping]=null,i.i(o.isNullOrUndefined)(t.parentItem)||i.i(d.b)(n,t.parentItem,"add",this.parent,this.isSelfReference,t))}if("Above"!==this.parent.editSettings.newRowPosition&&"Below"!==this.parent.editSettings.newRowPosition||((this.selectedIndex>-1||m)&&h&&w&&(t.parentUniqueID=g,t.parentItem=i.i(o.extend)({},f),delete t.parentItem.childRecords,delete t.parentItem[this.parent.childMapping]),t.level=h,this.isSelfReference&&(t.taskData[this.parent.parentIdMapping]=t[this.parent.parentIdMapping]=y,i.i(o.isNullOrUndefined)(t.parentItem)||i.i(d.b)(n,t.parentItem,"add",this.parent,this.isSelfReference,t))),null!=l&&(this.selectedIndex>-1||m)&&w&&(e.index="before"===l?c:c+1),"Bottom"===this.parent.editSettings.newRowPosition){var D=this.parent.grid.dataSource instanceof a.DataManager?this.parent.grid.dataSource.dataSource.json:this.parent.grid.dataSource;e.index=D.length}}i.i(o.isNullOrUndefined)(t.level)&&(t.level=h),t.hasChildRecords=!1,t.childRecords=[],t.index=0}if("add"===e.action&&(this.internalProperties={level:t.level,parentItem:t.parentItem,uniqueID:t.uniqueID,taskData:t.taskData,parentUniqueID:i.i(o.isNullOrUndefined)(t.parentItem)?void 0:t.parentItem.uniqueID,childRecords:t.childRecords}),"delete"===e.requestType)for(var M=e.data,O=0;O<M.length;O++)if(M[parseInt(O.toString(),10)].parentItem){var f=i.i(s.k)(this.parent,M[parseInt(O.toString(),10)].parentItem.uniqueID);if(!i.i(o.isNullOrUndefined)(f)&&f.hasChildRecords){var P=f.childRecords.indexOf(M[parseInt(O.toString(),10)]);f.childRecords.splice(P,1)}}return e},e.prototype.addRecord=function(e,t,r){if(this.parent.editSettings.newRowPosition!==this.previousNewRowPosition&&null!==this.previousNewRowPosition||(this.previousNewRowPosition=this.parent.editSettings.newRowPosition),this.isSelfReference||i.i(o.isNullOrUndefined)(e)||!Object.hasOwnProperty.call(e,this.parent.childMapping))e?(t>-1?(this.selectedIndex=t,this.addRowIndex=t):(this.selectedIndex=this.parent.selectedRowIndex,this.addRowIndex=this.parent.selectedRowIndex),r&&this.parent.setProperties({editSettings:{newRowPosition:r}},!0),this.parent.grid.editModule.addRecord(e,t)):this.parent.grid.editModule.addRecord(e,t);else{var a=[],s=this.parent.editSettings.mode,d=this.parent.grid.editSettings.mode;a.push(e),this.parent.setProperties({editSettings:{mode:"Batch"}},!0),this.parent.grid.setProperties({editSettings:{mode:"Batch"}},!0),i.i(o.isNullOrUndefined)(r)||this.parent.setProperties({editSettings:{newRowPosition:r}},!0);var l={addedRecords:a,changedRecords:[],deletedRecords:[]};this.parent.notify(n.w,{updatedRecords:l,index:t}),this.parent.setProperties({editSettings:{mode:s}},!0),this.parent.grid.setProperties({editSettings:{mode:d}},!0),this.parent.refresh()}},e.prototype.editFormValidate=function(){return this.parent.grid.editModule.editFormValidate()},e.prototype.destroyForm=function(){this.parent.grid.editModule.destroyForm()},e.prototype.contentready=function(e){i.i(o.isNullOrUndefined)(e.args.requestType)||"delete"!==e.args.requestType.toString()&&"save"!==e.args.requestType.toString()&&("Batch"!==this.parent.editSettings.mode||"batchsave"!==e.args.requestType.toString())||(this.updateIndex(this.parent.grid.dataSource,this.parent.getRows(),this.parent.getCurrentViewRecords()),(this.parent.frozenRows||this.parent.getFrozenColumns()||this.parent.frozenColumns)&&this.parent.grid.dataSource.length===this.parent.getDataRows().length&&this.updateIndex(this.parent.grid.dataSource,this.parent.getDataRows(),this.parent.getCurrentViewRecords()))},e.prototype.editCell=function(e,t){"Cell"!==this.parent.editSettings.mode&&"Batch"!==this.parent.editSettings.mode||("Batch"!==this.parent.editSettings.mode&&(this.isOnBatch=!0,this.updateGridEditMode("Batch")),this.parent.grid.editModule.editCell(e,t))},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(0),n=(i.n(r),i(3)),o=i(1),a=(i.n(o),i(4)),s=(i.n(a),i(2)),d=function(){function e(e){this.isCollapsedStatePersist=!1,r.Grid.Inject(r.ExcelExport),this.parent=e,this.dataResults={},this.addEventListener()}return e.prototype.getModuleName=function(){return"ExcelExport"},e.prototype.addEventListener=function(){this.parent.on("updateResults",this.updateExcelResultModel,this),this.parent.on("excelCellInfo",this.excelQueryCellInfo,this),this.parent.grid.on("export-RowDataBound",this.exportRowDataBound,this),this.parent.grid.on("finalPageSetup",this.finalPageSetup,this)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("updateResults",this.updateExcelResultModel),this.parent.off("excelCellInfo",this.excelQueryCellInfo),this.parent.grid.off("export-RowDataBound",this.exportRowDataBound),this.parent.grid.off("finalPageSetup",this.finalPageSetup))},e.prototype.updateExcelResultModel=function(e){this.dataResults=e},e.prototype.Map=function(e,t,n,d,l){var p=this,c=this.parent.dataSource,h=Object();return i.i(o.setValue)("isCsv",l,h),i.i(o.setValue)("cancel",!1,h),i.i(o.isNullOrUndefined)(e)||(this.isCollapsedStatePersist=e.isCollapsedStatePersist),new Promise(function(u){var g=!p.isLocal()||c instanceof a.DataManager?p.parent.dataSource:new a.DataManager(c),f=new a.Query;if(p.isLocal()||(f=p.generateQuery(f),i.i(o.setValue)("query",f,h)),p.parent.trigger(s.I,i.i(o.extend)(h,e)),i.i(r.getObject)("cancel",h))return null;g.executeQuery(f).then(function(r){var a=null;return i.i(o.isNullOrUndefined)(e)||i.i(o.isNullOrUndefined)(e.dataSource)||(a=e.dataSource),e=p.manipulateExportProperties(e,c,r),p.parent.grid.excelExportModule.Map(p.parent.grid,e,t,n,l,d).then(function(t){null!=a?e.dataSource=a:delete e.dataSource,u(t)})})})},e.prototype.generateQuery=function(e,t){return!i.i(o.isNullOrUndefined)(t)&&"CurrentPage"===t.exportType&&this.parent.allowPaging&&(t.exportType="AllPages",e.addParams("ExportType","CurrentPage"),e.where(this.parent.parentIdMapping,"equal",null),e=i.i(r.getObject)("grid.renderModule.data.pageQuery",this.parent)(e)),e},e.prototype.manipulateExportProperties=function(e,t,n){var s=Object();if(i.i(o.setValue)("query",this.parent.grid.getDataModule().generateQuery(!0),s),i.i(o.setValue)("isExport",!0,s),i.i(o.isNullOrUndefined)(e)||i.i(o.isNullOrUndefined)(e.exportType)||i.i(o.setValue)("exportType",e.exportType,s),this.isLocal()||(this.parent.parentData=[],this.parent.dataModule.convertToFlatData(i.i(r.getObject)("result",n)),i.i(o.setValue)("expresults",this.parent.flatData,s)),this.parent.notify("dataProcessor",s),s=this.dataResults,t=i.i(o.isNullOrUndefined)(s.result)?this.parent.flatData.slice(0):s.result,this.isLocal()||(this.parent.flatData=[]),e&&e.dataSource&&this.isLocal()){var d=this.parent.flatData,l=e.dataSource instanceof a.DataManager?e.dataSource.dataSource.json:e.dataSource;this.parent.dataModule.convertToFlatData(l),t=this.parent.flatData,this.parent.flatData=d}return e=i.i(o.isNullOrUndefined)(e)?Object():e,e.dataSource=new a.DataManager({json:t}),e.query=s.query,e},e.prototype.excelQueryCellInfo=function(e){if(this.parent.grid.getColumnIndexByUid(e.column.uid)===this.parent.treeColumnIndex){var t={},r=e.data,n=i.i(o.isNullOrUndefined)(r.filterLevel),a=n?r.level:r.filterLevel;t.indent=a,e.style=t}this.parent.notify("updateResults",e),this.parent.trigger("excelQueryCellInfo",e)},e.prototype.exportRowDataBound=function(e){if("excel"===e.type){var t=e.rowObj.data,r=this.parent.grid.filterSettings.columns.length,a=e.excelRows.length,s=t.level;if(t.parentItem&&i.i(n.k)(this.parent,t.parentItem.uniqueID,Boolean(r))){var d=!1,l=!1,p=i.i(n.f)(this.parent,t,this.parent.parentData);!this.isCollapsedStatePersist||p&&this.parent.isLocalData||(d=!0,l=!t.expanded),e.excelRows[a-1].grouping={outlineLevel:s,isCollapsed:l,isHidden:d}}else t.hasChildRecords&&i.i(o.isNullOrUndefined)(t.parentItem)&&(e.excelRows[a-1].grouping={outlineLevel:s})}},e.prototype.finalPageSetup=function(e){for(var t=0;t<e.worksheets.length;t++)e.worksheets[parseInt(t.toString(),10)].rows&&(e.worksheets[parseInt(t.toString(),10)].pageSetup={isSummaryRowBelow:!1})},e.prototype.isLocal=function(){return!i.i(n.a)(this.parent)&&i.i(n.h)(this.parent)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),i(3)),a=function(){function e(e){r.Grid.Inject(r.Filter),this.parent=e,this.isHierarchyFilter=!1,this.filteredResult=[],this.flatFilteredData=[],this.filteredParentRecs=[],this.addEventListener()}return e.prototype.getModuleName=function(){return"filter"},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.addEventListener=function(){this.parent.on("updateFilterRecs",this.updatedFilteredRecord,this),this.parent.on("clearFilters",this.clearFilterLevel,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("updateFilterRecs",this.updatedFilteredRecord),this.parent.off("clearFilters",this.clearFilterLevel))},e.prototype.updatedFilteredRecord=function(e){i.i(n.setValue)("uniqueIDFilterCollection",{},this.parent),this.flatFilteredData=e.data,this.filteredParentRecs=[],this.filteredResult=[],this.isHierarchyFilter=!1;for(var t=0;t<this.flatFilteredData.length;t++){var a=this.flatFilteredData[parseInt(t.toString(),10)];this.addParentRecord(a);var s=""===this.parent.grid.searchSettings.key?this.parent.filterSettings.hierarchyMode:this.parent.searchSettings.hierarchyMode;"Child"!==s&&"None"!==s||0===this.parent.grid.filterSettings.columns.length&&""===this.parent.grid.searchSettings.key||(this.isHierarchyFilter=!0);var d=i.i(r.getObject)("childRecords",a);!i.i(n.isNullOrUndefined)(d)&&d.length&&i.i(n.setValue)("hasFilteredChildRecords",this.checkChildExsist(a),a);var l=i.i(r.getObject)("parentItem",a);if(!i.i(n.isNullOrUndefined)(l)){var p=i.i(o.k)(this.parent,a.parentItem.uniqueID,!0);i.i(n.setValue)("hasFilteredChildRecords",!0,p),p&&p.parentItem&&this.updateParentFilteredRecord(p)}}this.flatFilteredData.length>0&&this.isHierarchyFilter&&this.updateFilterLevel(),this.parent.notify("updateAction",{result:this.filteredResult})},e.prototype.updateParentFilteredRecord=function(e){var t=i.i(o.k)(this.parent,e.parentItem.uniqueID,!0),r=i.i(n.getValue)("uniqueIDFilterCollection",this.parent);t&&Object.prototype.hasOwnProperty.call(r,t.uniqueID)&&i.i(n.setValue)("hasFilteredChildRecords",!0,t),t&&t.parentItem&&this.updateParentFilteredRecord(t)},e.prototype.addParentRecord=function(e){var t=i.i(o.k)(this.parent,e.parentUniqueID);if("None"!==(""===this.parent.grid.searchSettings.key?this.parent.filterSettings.hierarchyMode:this.parent.searchSettings.hierarchyMode)||0===this.parent.grid.filterSettings.columns.length&&""===this.parent.grid.searchSettings.key)i.i(n.isNullOrUndefined)(t)||("Child"!==(""===this.parent.grid.searchSettings.key?this.parent.filterSettings.hierarchyMode:this.parent.searchSettings.hierarchyMode)||0===this.parent.grid.filterSettings.columns.length&&""===this.parent.grid.searchSettings.key?this.addParentRecord(t):-1!==this.flatFilteredData.indexOf(t)&&this.addParentRecord(t)),-1===this.filteredResult.indexOf(e)&&(this.filteredResult.push(e),i.i(n.setValue)("uniqueIDFilterCollection."+e.uniqueID,e,this.parent));else if(i.i(n.isNullOrUndefined)(t)){if(-1!==this.flatFilteredData.indexOf(e))return void(-1===this.filteredResult.indexOf(e)&&(this.filteredResult.push(e),i.i(n.setValue)("uniqueIDFilterCollection."+e.uniqueID,e,this.parent),e.hasFilteredChildRecords=!0))}else this.addParentRecord(t),-1!==this.flatFilteredData.indexOf(t)||-1!==this.filteredResult.indexOf(t)?-1===this.filteredResult.indexOf(e)&&(this.filteredResult.push(e),i.i(n.setValue)("uniqueIDFilterCollection."+e.uniqueID,e,this.parent)):-1===this.filteredResult.indexOf(e)&&-1!==this.flatFilteredData.indexOf(e)&&(this.filteredResult.push(e),i.i(n.setValue)("uniqueIDFilterCollection."+e.uniqueID,e,this.parent))},e.prototype.checkChildExsist=function(e){for(var t=i.i(r.getObject)("childRecords",e),o=!1,a=0;a<t.length;a++){var s=t[parseInt(a.toString(),10)].childRecords,d=""===this.parent.grid.searchSettings.key?this.parent.filterSettings.hierarchyMode:this.parent.searchSettings.hierarchyMode;if(!("Child"!==d&&"Both"!==d||0===this.parent.grid.filterSettings.columns.length&&""===this.parent.grid.searchSettings.key)){var l=i.i(n.getValue)("uniqueIDFilterCollection",this.parent);Object.prototype.hasOwnProperty.call(l,t[parseInt(a.toString(),10)].uniqueID)||(this.filteredResult.push(t[parseInt(a.toString(),10)]),i.i(n.setValue)("uniqueIDFilterCollection."+t[parseInt(a.toString(),10)].uniqueID,t[parseInt(a.toString(),10)],this.parent),o=!0)}if("None"===d&&(0!==this.parent.grid.filterSettings.columns.length||""!==this.parent.grid.searchSettings.key)&&-1!==this.flatFilteredData.indexOf(t[parseInt(a.toString(),10)])){o=!0;break}!i.i(n.isNullOrUndefined)(s)&&s.length&&(o=this.checkChildExsist(t[parseInt(a.toString(),10)])),"Child"!==d&&"Both"!==d||!t.length||(o=!0)}return o},e.prototype.updateFilterLevel=function(){for(var e=this.filteredResult,t=this.filteredResult.length,r=0;r<t;r++){var n=i.i(o.k)(this.parent,e[parseInt(r.toString(),10)].parentUniqueID);if(-1!==e.indexOf(n)){var a=i.i(o.k)(this.parent,e[parseInt(r.toString(),10)].parentUniqueID,!0);e[parseInt(r.toString(),10)].filterLevel=a.filterLevel+1}else e[parseInt(r.toString(),10)].filterLevel=0,this.filteredParentRecs.push(e[parseInt(r.toString(),10)])}},e.prototype.clearFilterLevel=function(e){var t,r=0,o=e.flatData,a=o.length;for(r;r<a;r++){t=o[parseInt(r.toString(),10)];var s=t.filterLevel;!s&&0!==s&&i.i(n.isNullOrUndefined)(t.hasFilteredChildRecords)||(t.hasFilteredChildRecords=null,t.filterLevel=null)}this.filteredResult=[],this.parent.notify("updateResults",{result:o,count:o.length})},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),function(){function e(e){r.Grid.Inject(r.Freeze),this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on("rowExpandCollapse",this.rowExpandCollapse,this),this.parent.on("dataBoundArg",this.dataBoundArg,this),this.parent.grid.on("dblclick",this.dblClickHandler,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("rowExpandCollapse",this.rowExpandCollapse),this.parent.off("dataBoundArg",this.dataBoundArg),this.parent.grid.off("dblclick",this.dblClickHandler))},e.prototype.rowExpandCollapse=function(e){var t,r,o=this.parent.getDataRows(),a=this.parent.getRows(),s=this.parent.getFrozenLeftColumnsCount()>0||this.parent.getFrozenRightColumnsCount()>0;s&&(r=this.parent.getRows().filter(function(t){return t.querySelector(".e-gridrowindex"+e.record.index+"level"+(e.record.level+1))})),t=e.detailrows.length?e.detailrows:o.filter(function(t){return t.querySelector(".e-gridrowindex"+e.record.index+"level"+(e.record.level+1))});for(var d=0;d<t.length;d++){var l=t[parseInt(d.toString(),10)],p=this.parent.grid.getRowObjectFromUID(l.getAttribute("data-Uid")).data;!i.i(n.isNullOrUndefined)(o)&&l.parentElement.firstElementChild.clientHeight>0&&(l.style.height=l.parentElement.firstElementChild.clientHeight+"px"),l.style.display=e.action,s&&r.length&&(r[parseInt(d.toString(),10)].style.display=e.action);var c="none"===e.action?".e-treecolumn-container .e-treegridcollapse":".e-treecolumn-container .e-treegridexpand";if(a[l.rowIndex].querySelector(c)){for(var h=[],u=0;u<o.length;u++)o[parseInt(u.toString(),10)].querySelector(".e-gridrowindex"+p.index+"level"+(p.level+1))&&h.push(o[parseInt(u.toString(),10)]);if(h.length){var g=this.parent.getCurrentViewRecords()[h[0].rowIndex];this.rowExpandCollapse({detailrows:h,action:e.action,record:g})}}}},e.prototype.dblClickHandler=function(e){i.i(r.parentsUntil)(e.target,"e-rowcell")&&this.parent.grid.editSettings.allowEditOnDblClick&&"Cell"!==this.parent.editSettings.mode&&!e.target.classList.contains("e-treegridcollapse")&&!e.target.classList.contains("e-treegridexpand")&&this.parent.startEdit(i.i(r.parentsUntil)(e.target,"e-row"))},e.prototype.dataBoundArg=function(){this.parent.getColumns().filter(function(e){return e.showCheckbox}).length&&this.parent.freezeModule&&this.parent.initialRender&&i.i(n.addClass)([this.parent.element.getElementsByClassName("e-grid")[0]],"e-checkselection")},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.getModuleName=function(){return"freeze"},e}())},function(e,t,i){"use strict";var r=i(36);i.d(t,"a",function(){return r.a});var n=i(35);i.d(t,"b",function(){return n.a});var o=i(41);i.d(t,"c",function(){return o.a});var a=i(40);i.d(t,"d",function(){return a.a});var s=i(46);i.d(t,"e",function(){return s.a});var d=i(45);i.d(t,"f",function(){return d.a});var l=i(44);i.d(t,"g",function(){return l.a});var p=(i(9),i(10),i(7));i.d(t,"h",function(){return p.a});var c=i(30);i.d(t,"i",function(){return c.a});var h=i(32);i.d(t,"j",function(){return h.a});var u=i(34);i.d(t,"k",function(){return u.a});var g=i(31);i.d(t,"l",function(){return g.a});var f=i(11);i.d(t,"m",function(){return f.a});var y=i(33);i.d(t,"n",function(){return y.a});var m=i(47);i.d(t,"o",function(){return m.a}),i.d(t,"p",function(){return m.b});var v=i(37);i.d(t,"q",function(){return v.a});var S=i(29);i.d(t,"r",function(){return S.a});var I=i(8);i.d(t,"s",function(){return I.a}),i.d(t,"t",function(){return I.b});var w=i(39);i.d(t,"u",function(){return w.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),i(2)),a=i(4),s=(i.n(a),i(3)),d=function(){function e(e){this.parent=e,r.Grid.Inject(r.InfiniteScroll),this.addEventListener()}return e.prototype.getModuleName=function(){return"infiniteScroll"},e.prototype.addEventListener=function(){this.parent.on(o.a,this.infinitePageAction,this),this.parent.on("infinite-remote-expand",this.infiniteRemoteExpand,this),this.parent.grid.on("delete-complete",this.infiniteDeleteHandler,this),this.parent.grid.on("infinite-edit-handler",this.infiniteEditHandler,this),this.parent.grid.on("infinite-crud-cancel",this.createRows,this),this.parent.grid.on("content-ready",this.contentready,this),this.parent.on(o.b,this.collapseExpandInfinitechilds,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("infinite-remote-expand",this.infiniteRemoteExpand),this.parent.grid.off("delete-complete",this.infiniteDeleteHandler),this.parent.grid.off("infinite-edit-handler",this.infiniteEditHandler),this.parent.off(o.a,this.infinitePageAction),this.parent.grid.off("infinite-crud-cancel",this.createRows),this.parent.grid.off("content-ready",this.contentready),this.parent.off(o.b,this.collapseExpandInfinitechilds))},e.prototype.infiniteRemoteExpand=function(e){for(var t=this.parent.grid.getRowsObject(),n=this.parent.grid.infiniteScrollModule.serviceLocator,o=new r.RowRenderer(n,null,this.parent.grid),a=this.parent.getRows(),s=e.index===a.length-1?"after":"before",d=this.parent.grid.getColumns(),l=this.parent.grid.infiniteScrollModule.generateRows(e.childData,e),p=[],c=0;c<l.length;c++)p.push(o.render(l[parseInt(c.toString(),10)],d));t.splice.apply(t,[e.index+1,0].concat(l));for(var c=0;c<p.length;c++)"after"===s?a[e.index+c][""+s](p[parseInt(c.toString(),10)]):a[e.index+c+1][""+s](p[parseInt(c.toString(),10)]),a.splice(e.index+1+c,0,p[parseInt(c.toString(),10)]);i.i(r.resetRowIndex)(this.parent.grid,this.parent.grid.getRowsObject(),this.parent.grid.getRows(),0)},e.prototype.contentready=function(){if(this.parent.infiniteScrollSettings.enableCache&&!i.i(n.isNullOrUndefined)(this.parent.editModule)){this.parent.editModule.updateIndex(this.parent.grid.dataSource,this.parent.getRows(),this.parent.getCurrentViewRecords()),this.parent.getFrozenColumns()&&this.parent.editModule.updateIndex(this.parent.grid.dataSource,this.parent.getDataRows(),this.parent.getCurrentViewRecords())}},e.prototype.collapseExpandInfinitechilds=function(e){e.record.expanded="collapse"!==e.action;var t={result:this.parent.flatData,row:e.row,action:e.action,record:e.record,count:this.parent.flatData.length},r=i.i(n.getValue)("isCollapseAll",this.parent)?"collapseAll":"refresh";i.i(n.getValue)("grid.renderModule",this.parent).dataManagerSuccess(t,{requestType:r})},e.prototype.infinitePageAction=function(e){var t=this,r=new a.DataManager(e.result),o=new a.Predicate("expanded","notequal",null).or("expanded","notequal",void 0),d=r.executeLocal((new a.Query).where(o)),l=d.filter(function(e){return i.i(s.f)(t.parent,e,d)}),p=i.i(n.getValue)("actionArgs",e.actionArgs),c=i.i(n.getValue)("actions",this.parent.grid.infiniteScrollModule);this.parent.grid.infiniteScrollModule.isInitialRender&&!this.parent.initialRender&&(this.parent.grid.pageSettings.currentPage=1);var h=c.some(function(e){return e===p.requestType}),u=!!h||!!this.parent.initialRender;if(this.visualData=l,e.count=l.length,i.i(n.getValue)("isPrinting",e.actionArgs))e.result=l;else{var g=new a.Query,f=this.parent.infiniteScrollSettings.enableCache;f&&this.parent.infiniteScrollSettings.initialBlocks>this.parent.infiniteScrollSettings.maxBlocks&&(this.parent.infiniteScrollSettings.initialBlocks=this.parent.infiniteScrollSettings.maxBlocks);var y=u?this.parent.grid.pageSettings.pageSize*this.parent.infiniteScrollSettings.initialBlocks:this.parent.grid.pageSettings.pageSize,m=this.parent.grid.pageSettings.currentPage;if(i.i(n.isNullOrUndefined)(p))g=g.page(m,y);else{var v=i.i(n.getValue)("lastIndex",this.parent.grid.infiniteScrollModule),S=i.i(n.getValue)("firstIndex",this.parent.grid.infiniteScrollModule);if(f||"delete"!==p.requestType)f&&"delete"===p.requestType||"save"===p.requestType&&"add"===p.action?(g=g.skip(S),g=g.take(this.parent.infiniteScrollSettings.initialBlocks*this.parent.pageSettings.pageSize)):("expand"!==e.actionArgs.action&&"collapse"!==e.actionArgs.action||1===this.parent.grid.pageSettings.currentPage||(m=1,y=this.parent.grid.pageSettings.pageSize*this.parent.grid.pageSettings.currentPage),g=g.page(m,y));else{var I=v-p.data.length+1,w=p.data.length;g=g.skip(I).take(w)}}r.dataSource.json=l,f||i.i(n.isNullOrUndefined)(p)||"save"!==p.requestType||"add"!==p.action?e.result=r.executeLocal(g):e.result=[p.data]}this.parent.notify("updateAction",e)},e.prototype.infiniteEditHandler=function(e){var t=this.parent.grid.infiniteScrollModule.infiniteCurrentViewData,i=Object.keys(t);if("delete"===e.e.requestType&&e.result.length>1)for(var r=1;r<e.result.length;r++)t[i[i.length-1]].push(e.result[parseInt(r.toString(),10)])},e.prototype.infiniteDeleteHandler=function(e){if("delete"===e.requestType){var t=this.parent.grid.getRowsObject(),i=this.parent.getRows(),r=e.data instanceof Array?e.data:[e.data],n=this.parent.grid.getPrimaryKeyFieldNames()[0];if(this.removeRows(i,t,r,n,!0),this.parent.getFrozenColumns()>0){var o=this.parent.grid.getRowsObject(),a=this.parent.grid.getRows();this.removeRows(a,o,r,n)}}},e.prototype.removeRows=function(e,t,r,o,a){for(var s=this,d=0;d<r.length;d++)!function(d){t.filter(function(l,p){if(l.data[""+o]===r[parseInt(d.toString(),10)][""+o]){if(a){var c=Math.ceil((p+1)/s.parent.grid.pageSettings.pageSize);s.parent.grid.infiniteScrollModule.resetInfiniteCurrentViewData(c,p)}t.splice(p,1),i.i(n.remove)(e[parseInt(p.toString(),10)]),e.splice(p,1)}})}(d)},e.prototype.createRows=function(e){var t,o=e.args.e,a=e.row,d=this.parent.grid.infiniteScrollModule.serviceLocator,l=new r.RowRenderer(d,null,this.parent.grid),p=this.parent.getCurrentViewRecords(),c=e.isMovable?this.parent.grid.getRows():this.parent.grid.getDataRows();t=e.isFrozenRight?this.parent.element.querySelector(".e-frozen-right-content").querySelector("tbody"):this.parent.grid.isFrozenGrid()?(e.isMovable,this.parent.grid.getContent().querySelector("tbody")):this.parent.getContent().querySelector("tbody"),this.parent.frozenRows&&(t=e.isFrozenRows&&"add"!==this.parent.grid.infiniteScrollModule.requestType||!e.isFrozenRows&&"add"===this.parent.grid.infiniteScrollModule.requestType?this.parent.grid.isFrozenGrid()?e.isMovable?this.parent.grid.getHeaderContent().querySelector("tbody"):e.isFrozenRight?this.parent.element.querySelector(".e-frozen-right-header").querySelector("tbody"):this.parent.grid.getHeaderContent().querySelector("tbody"):this.parent.getHeaderContent().querySelector("tbody"):t);for(var h,u=this.parent.editModule.addRowIndex,g=0;g<a.length;g++){var f=l.render(a[parseInt(g.toString(),10)],this.parent.grid.getColumns());"save"===o.requestType&&"add"===o.action?-1!==i.i(n.getValue)("selectedIndex",this.parent.editModule)&&"Top"!==this.parent.editSettings.newRowPosition?"Below"===this.parent.editSettings.newRowPosition||"Child"===this.parent.editSettings.newRowPosition?(h="after",u+=i.i(s.g)(p[parseInt(u.toString(),10)]).length,"Child"===this.parent.editSettings.newRowPosition&&(u-=1),c[parseInt(u.toString(),10)][""+h](f)):"Above"===this.parent.editSettings.newRowPosition&&(h="before",c[this.parent.editModule.addRowIndex][""+h](f)):"Bottom"===this.parent.editSettings.newRowPosition?t.appendChild(f):t.insertBefore(f,t.firstElementChild):"delete"===o.requestType&&t.appendChild(f)}e.cancel=!0},e.prototype.destroy=function(){this.removeEventListener()},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(0),n=(i.n(r),i(2)),o=i(4),a=(i.n(o),i(1)),s=(i.n(a),i(3)),d=function(){function e(e){r.Grid.Inject(r.Page),this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(n.b,this.collapseExpandPagedchilds,this),this.parent.on(n.a,this.pageAction,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(n.b,this.collapseExpandPagedchilds),this.parent.off(n.a,this.pageAction))},e.prototype.getModuleName=function(){return"pager"},e.prototype.refresh=function(){this.parent.grid.pagerModule.refresh()},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.goToPage=function(e){this.parent.grid.pagerModule.goToPage(e)},e.prototype.updateExternalMessage=function(e){this.parent.grid.pagerModule.updateExternalMessage(e)},e.prototype.collapseExpandPagedchilds=function(e){if(e.record.expanded="collapse"!==e.action,this.parent.flatData.map(function(t){return t.expanded=t.uniqueID===e.record.uniqueID&&t.expanded!==e.record.expanded?e.record.expanded:t.expanded}),this.parent.enableImmutableMode){var t=this.parent.getPrimaryKeyFieldNames()[0],r=this.parent.flatData.filter(function(i){return i[""+t]===e.record[""+t]});r.length&&(r[0].expanded=e.record.expanded)}var n={result:this.parent.flatData,row:e.row,action:e.action,record:e.record,count:this.parent.flatData.length};if(i.i(a.getValue)("grid.renderModule",this.parent).dataManagerSuccess(n),this.parent.enableImmutableMode){var o=void 0;"collapse"===n.action?(o=n.row.getElementsByClassName("e-treegridexpand")[0],i.i(a.isNullOrUndefined)(o)||(i.i(a.removeClass)([o],"e-treegridexpand"),i.i(a.addClass)([o],"e-treegridcollapse"))):"expand"===n.action&&(o=n.row.getElementsByClassName("e-treegridcollapse")[0],i.i(a.isNullOrUndefined)(o)||(i.i(a.removeClass)([o],"e-treegridcollapse"),i.i(a.addClass)([o],"e-treegridexpand")))}},e.prototype.pageRoot=function(e,t,r){for(var n=i.i(a.isNullOrUndefined)(r)?[]:r,o=this,s=0;s<t.length;s++)!function(i){n.push(t[parseInt(i.toString(),10)]);var r=[];t[parseInt(i.toString(),10)].hasChildRecords&&(r=e.filter(function(e){return t[parseInt(i.toString(),10)].uniqueID===e.parentUniqueID}),n=o.pageRoot(e,r,n))}(s);return n},e.prototype.updatePageSize=function(e){var t=e.result.length,i=this.parent.grid.pagerModule;!0===this.parent.pageSettings.pageSizes&&i.pagerObj.pagerdropdownModule.dropDownListObject.value===i.pagerObj.getLocalizedLabel("All")&&(i.pagerObj.totalRecordsCount=t,this.parent.grid.pageSettings.pageSize=t)},e.prototype.pageAction=function(e){var t=this,r=new o.DataManager(e.result);if("Root"===this.parent.pageSettings.pageSizeMode){var n=[],a=this.parent.grid.filterSettings.columns.length>0&&("Child"===this.parent.filterSettings.hierarchyMode||"None"===this.parent.filterSettings.hierarchyMode)?"filterLevel":"level",d=(new o.Query).where(a,"equal",0);n=r.executeLocal(d),e.count=n.length;var l=this.parent.grid.pageSettings.pageSize,p=this.parent.grid.pageSettings.currentPage,c=l*(p-1);d=d.skip(c).take(l),n=r.executeLocal(d);var h=this.pageRoot(e.result,n);e.result=h}else{var u=new o.DataManager(e.result),g=new o.Predicate("expanded","notequal",null).or("expanded","notequal",void 0),f=u.executeLocal((new o.Query).where(g)),y=void 0;y=!i.i(s.d)(this.parent)||this.parent.searchSettings.key===this.parent.grid.searchSettings.key&&this.parent.filterSettings.columns.length===this.parent.grid.filterSettings.columns.length?f.filter(function(e){return i.i(s.f)(t.parent,e,f)}):f,e.count=y.length;var d=new o.Query,l=this.parent.grid.pageSettings.pageSize;this.updatePageSize(e);var p=this.parent.grid.pageSettings.currentPage;y.length<p*l&&(p=Math.floor(y.length/l)+(y.length%l?1:0),p=p||1,this.parent.grid.setProperties({pageSettings:{currentPage:p}},!0));var c=l*(p-1);d=d.skip(c).take(l),u.dataSource.json=y,e.result=u.executeLocal(d)}this.parent.notify("updateAction",e)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(0),n=(i.n(r),i(3)),o=i(1),a=(i.n(o),i(4)),s=(i.n(a),i(2)),d=function(){function e(e){r.Grid.Inject(r.PdfExport),this.parent=e,this.dataResults={},this.addEventListener()}return e.prototype.getModuleName=function(){return"PdfExport"},e.prototype.addEventListener=function(){this.parent.on("pdfCellInfo",this.pdfQueryCellInfo,this),this.parent.on("updateResults",this.updatePdfResultModel,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("pdfCellInfo",this.pdfQueryCellInfo),this.parent.off("updateResults",this.updatePdfResultModel))},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.updatePdfResultModel=function(e){this.dataResults=e},e.prototype.Map=function(e,t,d,l){var p=this,c=this.parent.dataSource,h=Object(),u=!i.i(n.a)(this.parent)&&i.i(n.h)(this.parent);return i.i(o.setValue)("cancel",!1,h),new Promise(function(n){var g=!u||c instanceof a.DataManager?p.parent.dataSource:new a.DataManager(c),f=new a.Query;if(u||(f=p.generateQuery(f),i.i(o.setValue)("query",f,h)),p.parent.trigger(s.H,i.i(o.extend)(h,e)),i.i(r.getObject)("cancel",h))return null;g.executeQuery(f).then(function(r){var a=null;return i.i(o.isNullOrUndefined)(e)||i.i(o.isNullOrUndefined)(e.dataSource)||(a=e.dataSource),e=p.manipulatePdfProperties(e,c,r),p.parent.grid.pdfExportModule.Map(p.parent.grid,e,t,d,l).then(function(t){null!=a?e.dataSource=a:delete e.dataSource,n(t)})})})},e.prototype.generateQuery=function(e,t){return!i.i(o.isNullOrUndefined)(t)&&"CurrentPage"===t.exportType&&this.parent.allowPaging&&(t.exportType="AllPages",e.addParams("ExportType","CurrentPage"),e.where(this.parent.parentIdMapping,"equal",null),e=i.i(r.getObject)("grid.renderModule.data.pageQuery",this.parent)(e)),e},e.prototype.manipulatePdfProperties=function(e,t,r){var s={},d=!i.i(n.a)(this.parent)&&i.i(n.h)(this.parent);if(i.i(o.setValue)("query",this.parent.grid.getDataModule().generateQuery(!0),s),i.i(o.setValue)("isExport",!0,s),i.i(o.setValue)("isPdfExport",!0,s),i.i(o.isNullOrUndefined)(e)||i.i(o.isNullOrUndefined)(e.isCollapsedStatePersist)||i.i(o.setValue)("isCollapsedStatePersist",e.isCollapsedStatePersist,s),i.i(o.isNullOrUndefined)(e)||i.i(o.isNullOrUndefined)(e.exportType)||i.i(o.setValue)("exportType",e.exportType,s),d||(this.parent.parentData=[],this.parent.dataModule.convertToFlatData(i.i(o.getValue)("result",r)),i.i(o.setValue)("expresults",this.parent.flatData,s)),this.parent.notify("dataProcessor",s),s=this.dataResults,t=i.i(o.isNullOrUndefined)(s.result)?this.parent.flatData.slice(0):s.result,d||(this.parent.flatData=[]),e&&e.dataSource&&d){var l=this.parent.flatData,p=e.dataSource instanceof a.DataManager?e.dataSource.dataSource.json:e.dataSource;this.parent.dataModule.convertToFlatData(p),t=this.parent.flatData,this.parent.flatData=l}return e=i.i(o.isNullOrUndefined)(e)?{}:e,e.dataSource=new a.DataManager({json:t}),e.query=s.query,e},e.prototype.pdfQueryCellInfo=function(e){if(this.parent.grid.getColumnIndexByUid(e.column.uid)===this.parent.treeColumnIndex){var t={},n=i.i(r.getObject)("data",e),a=i.i(o.isNullOrUndefined)(n.filterLevel),s=a?n.level:n.filterLevel;t.paragraphIndent=3*s,e.style=t}this.parent.notify("updateResults",e),this.parent.trigger("pdfQueryCellInfo",e)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(2),n=i(0),o=(i.n(n),i(1)),a=(i.n(o),function(){function e(e){this.parent=e,n.Grid.Inject(n.Print),this.addEventListener()}return e.prototype.getModuleName=function(){return"print"},e.prototype.addEventListener=function(){this.parent.grid.on(r.V,this.printTreeGrid,this)},e.prototype.removeEventListener=function(){this.parent.grid.off(r.V,this.printTreeGrid)},e.prototype.printTreeGrid=function(e){var t=i.i(n.getObject)("printgrid",e),a=i.i(n.getObject)("element",e);t.addEventListener(r.D,this.parent.grid.queryCellInfo),t.addEventListener(r.J,this.parent.grid.rowDataBound),t.addEventListener(r.M,this.parent.grid.beforeDataBound),i.i(o.addClass)([a],"e-treegrid")},e.prototype.print=function(){this.parent.grid.print()},e.prototype.destroy=function(){this.removeEventListener()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),i(4)),a=(i.n(o),i(2)),s=i(5),d=i(3),l=function(){function e(e){this.canDrop=!0,this.isDraggedWithChild=!1,this.modifiedRecords="modifiedRecords",this.selectedRecords="selectedRecords",this.selectedRows="selectedRows",this.hasDropItem=!0,this.isaddtoBottom=!1,r.Grid.Inject(r.RowDD),this.parent=e,this.addEventListener()}return e.prototype.getChildrecordsByParentID=function(e){var t;return t=this.parent.dataSource instanceof o.DataManager&&i.i(d.h)(this.parent)?this.parent.grid.dataSource.dataSource.json:this.parent.grid.dataSource,t.filter(function(t){return t.uniqueID===e})},e.prototype.addEventListener=function(){this.parent.on(a._11,this.Rowdraging,this),this.parent.on(a._12,this.rowDropped,this),this.parent.on(a._9,this.rowsAdded,this),this.parent.on(a._10,this.rowsRemoved,this)},e.prototype.reorderRows=function(e,t,r){var o=this.parent;if(e[0]!==t&&-1!==["above","below","child"].indexOf(r)){"above"===r&&(this.dropPosition="topSegment"),"below"===r&&(this.dropPosition="bottomSegment"),"child"===r&&(this.dropPosition="middleSegment"),this.parent.dropPosition=this.dropPosition;for(var a=[],s=0;s<e.length;s++){var l=this.parent.getRowByIndex(e[parseInt(s.toString(),10)]).rowIndex;a[parseInt(s.toString(),10)]=this.parent.getCurrentViewRecords()[parseInt(l.toString(),10)]}var p={data:a,dropIndex:t};if(i.i(d.b)(this.parent)||this.dropRows(p,!0),o.isLocalData&&(o.flatData=this.orderToIndex(o.flatData)),"outdenting"===this.parent.action&&(i.i(n.isNullOrUndefined)(a[0].parentItem)||(a[0].level=a[0].parentItem.level+1)),this.parent.grid.refresh(),this.parent.enableImmutableMode&&"middleSegment"===this.dropPosition){var l=void 0;this.parent.allowRowDragAndDrop?l=this.parent.treeColumnIndex+1:"indenting"===this.parent.action&&(l=this.parent.treeColumnIndex);var c=this.parent.getRows()[e[0]],h=p.data[0],u=[],g=[];u.push(h),g.push(c);var f=i.i(d.k)(this.parent,p.data[0].parentUniqueID),y=this.parent.getRows()[parseInt(t.toString(),10)];u.push(f),g.push(y),this.parent.updateRowAndCellElements(u,g,l)}if(this.parent.enableImmutableMode&&"outdenting"===this.parent.action){var l=void 0;this.parent.allowRowDragAndDrop?l=this.parent.treeColumnIndex+1:"outdenting"===this.parent.action&&(l=this.parent.treeColumnIndex);var m=p.data[0],c=this.parent.getRows()[e[0]],u=[],g=[];u.push(m),g.push(c),this.parent.updateRowAndCellElements(u,g,l)}}},e.prototype.indentOutdentAction=function(e,t){var r=this.parent,o=-1;if(!i.i(n.isNullOrUndefined)(e)||-1!==this.parent.selectedRowIndex){this.parent.enableVirtualization&&-1!==this.parent.selectedRowIndex?o=this.parent.getSelectedRows()[0].rowIndex:-1!==this.parent.selectedRowIndex&&(o=this.parent.selectedRowIndex),this.selectedItem=i.i(n.isNullOrUndefined)(e)?r.getCurrentViewRecords()[parseInt(o.toString(),10)]:e;var a=this.parent.getPrimaryKeyFieldNames()[0],s=this.parent.grid.getRowIndexByPrimaryKey(this.selectedItem[""+a]);if(this.selectedRow=this.parent[this.selectedRows]=-1!==o?this.parent.getSelectedRows()[0]:this.parent.grid.getRowByIndex(s),this.selectedRecord=this.parent[this.selectedRecords]=-1!==o?r.getCurrentViewRecords()[parseInt(o.toString(),10)]:this.selectedItem,"indent"===t){var d=r.getCurrentViewRecords()[this.selectedRow.rowIndex-1],l=void 0;if(0===this.selectedRow.rowIndex||-1===this.selectedRow.rowIndex||r.getCurrentViewRecords()[this.selectedRow.rowIndex].level-d.level==1)return;if(d.level>this.selectedRecord.level)for(var p=0;p<r.getCurrentViewRecords().length;p++)r.getCurrentViewRecords()[parseInt(p.toString(),10)].taskData===d.parentItem.taskData&&(l=p,r.enableVirtualization&&(l=parseInt(r.getRows()[parseInt(p.toString(),10)].getAttribute("data-rowindex"),10)));else l=this.selectedRow.rowIndex-1;!this.parent.enableVirtualization||!this.selectedRecord||d.level>this.selectedRecord.level||(l=parseInt(this.selectedRow.getAttribute("data-rowindex"),10)-1),r.action="indenting",r.dropIndex=l,this.eventTrigger("indenting",l)}else if("outdent"===t){if(-1===this.selectedRow.rowIndex||0===this.selectedRow.rowIndex||0===r.getCurrentViewRecords()[this.selectedRow.rowIndex].level)return;for(var l=void 0,c=this.selectedRecord.parentItem,p=0;p<r.getCurrentViewRecords().length;p++)r.getCurrentViewRecords()[parseInt(p.toString(),10)].uniqueID===c.uniqueID&&(l=p);this.parent.enableVirtualization&&this.selectedRecord&&(l=parseInt(this.parent.getRows()[parseInt(l.toString(),10)].getAttribute("data-rowindex"),10)),r.action="outdenting",r.dropIndex=l,this.eventTrigger("outdenting",l)}}},e.prototype.eventTrigger=function(e,t){var i=this,r={action:e,cancel:!1,data:[this.parent[this.selectedRecords]],row:this.parent[this.selectedRows]};this.parent.trigger(a.v,r,function(e){e.cancel||("indenting"===e.action?i.parent.enableVirtualization?i.reorderRows([parseInt(i.selectedRow.getAttribute("data-rowindex"),10)],t,"child"):i.reorderRows([i.selectedRow.rowIndex],t,"child"):"outdenting"===e.action&&(i.parent.enableVirtualization?i.reorderRows([parseInt(i.selectedRow.getAttribute("data-rowindex"),10)],t,"below"):i.reorderRows([i.selectedRow.rowIndex],t,"below")))})},e.prototype.orderToIndex=function(e){for(var t=0;t<e.length;t++)if(e[parseInt(t.toString(),10)].index=t,!i.i(n.isNullOrUndefined)(e[parseInt(t.toString(),10)].parentItem)){var r=i.i(n.getValue)("uniqueIDCollection."+e[parseInt(t.toString(),10)].parentUniqueID,this.parent);e[parseInt(t.toString(),10)].parentItem.index=r.index}return e},e.prototype.rowsAdded=function(e){for(var t,r=e.records,a=e.records.length-1;a>-1;a--)if(t=r[parseInt(a.toString(),10)],t.parentUniqueID){var s=r.filter(function(e){return e.uniqueID===t.parentUniqueID});if(s.length){var d=s[0].childRecords.indexOf(t),l=s[0];-1!==d&&(i.i(n.isNullOrUndefined)(this.parent.idMapping)&&(l.childRecords.splice(d,1),l.childRecords.length||(l.hasChildRecords=!1,l.hasFilteredChildRecords=!1)),this.isDraggedWithChild=!0)}}if(i.i(n.isNullOrUndefined)(this.parent.dataSource)||!this.parent.dataSource.length){for(var p,c=this.parent,h=e.records,u=e.records.length,a=u-1;a>-1;a--){p=h[parseInt(a.toString(),10)],!a&&p.hasChildRecords&&(p.taskData[this.parent.parentIdMapping]=null);if(i.i(n.isNullOrUndefined)(c.parentIdMapping)||(c.childMapping=null),i.i(n.isNullOrUndefined)(p.taskData)||i.i(n.isNullOrUndefined)(c.childMapping)||Object.prototype.hasOwnProperty.call(p.taskData,c.childMapping)||(p.taskData[c.childMapping]=[]),Object.prototype.hasOwnProperty.call(p,c.childMapping)&&p[c.childMapping].length&&!this.isDraggedWithChild&&!i.i(n.isNullOrUndefined)(c.parentIdMapping))for(var g=p[c.childMapping],f=0;f<g.length;f++)-1===h.indexOf(g[parseInt(f.toString(),10)])&&(h.splice(f,0,g[parseInt(f.toString(),10)]),g[parseInt(f.toString(),10)].taskData=i.i(n.extend)({},g[parseInt(f.toString(),10)]),a+=1);Object.prototype.hasOwnProperty.call(p,c.parentIdMapping)&&null!==p[c.parentIdMapping]&&!this.isDraggedWithChild&&(p.taskData[c.parentIdMapping]=null,delete p.parentItem,delete p.parentUniqueID),i.i(n.isNullOrUndefined)(c.dataSource)&&(c.dataSource=[]),c.dataSource.splice(0,0,p.taskData)}c.setProperties({dataSource:c.dataSource},!1)}else{for(var a=0;a<r.length;a++)i.i(n.setValue)("uniqueIDCollection."+r[parseInt(a.toString(),10)].uniqueID,r[parseInt(a.toString(),10)],this.parent);var y={data:e.records,dropIndex:e.toIndex};this.parent.dataSource instanceof o.DataManager?(this.treeGridData=this.parent.dataSource.dataSource.json,this.treeData=this.parent.dataSource.dataSource.json):(this.treeGridData=this.parent.grid.dataSource,this.treeData=this.parent.dataSource),i.i(n.isNullOrUndefined)(this.dropPosition)&&(this.dropPosition="bottomSegment",y.dropIndex=this.parent.getCurrentViewRecords().length>1?this.parent.getCurrentViewRecords().length-1:y.dropIndex,y.data=y.data.map(function(e){return e.hasChildRecords&&i.i(n.isNullOrUndefined)(e.parentItem)?(e.level=0,e):(delete e.parentItem,delete e.parentUniqueID,e.level=0,e)})),this.dropRows(y)}},e.prototype.rowsRemoved=function(e){for(var t=0;t<e.records.length;t++)this.draggedRecord=e.records[parseInt(t.toString(),10)],(this.draggedRecord.hasChildRecords||this.draggedRecord.parentItem&&-1!==this.parent.grid.dataSource.indexOf(this.getChildrecordsByParentID(this.draggedRecord.parentUniqueID)[0])||0===this.draggedRecord.level)&&this.deleteDragRow()},e.prototype.refreshGridDataSource=function(){var e,t,r=this.draggedRecord,a=this.droppedRecord,s=this.parent;if(!(e=this.parent.dataSource instanceof o.DataManager&&i.i(d.h)(this.parent)?s.dataSource.dataSource.json:s.dataSource)||i.i(n.isNullOrUndefined)(a)||a.parentItem||i.i(n.isNullOrUndefined)(a.taskData)){if(!this.parent.parentIdMapping&&!i.i(n.isNullOrUndefined)(a)&&a.parentItem&&("topSegment"===this.dropPosition||"bottomSegment"===this.dropPosition))for(var l=this.getChildrecordsByParentID(a.parentUniqueID)[0],p=l.childRecords,c=0;c<p.length;c++)a.parentItem.taskData[this.parent.childMapping][parseInt(c.toString(),10)]=p[parseInt(c.toString(),10)].taskData}else{for(var h=Object.keys(e),c=0;c<h.length;c++)e[parseInt(c.toString(),10)][this.parent.childMapping]===a.taskData[this.parent.childMapping]&&(t=c);"topSegment"===this.dropPosition?this.parent.idMapping||e.splice(t,0,r.taskData):"bottomSegment"===this.dropPosition&&(this.parent.idMapping||e.splice(t+1,0,r.taskData))}this.parent.parentIdMapping&&(r.parentItem?"topSegment"===this.dropPosition||"bottomSegment"===this.dropPosition?(r[this.parent.parentIdMapping]=a[this.parent.parentIdMapping],r.taskData[this.parent.parentIdMapping]=a[this.parent.parentIdMapping]):(r[this.parent.parentIdMapping]=a[this.parent.idMapping],r.taskData[this.parent.parentIdMapping]=a[this.parent.idMapping]):(r.taskData[this.parent.parentIdMapping]=null,r[this.parent.parentIdMapping]=null))},e.prototype.removeFirstrowBorder=function(e){var t="bottomSegment"===this.dropPosition;this.parent.element.getElementsByClassName("e-firstrow-border").length>0&&e&&(0!==e.rowIndex||t)&&this.parent.element.getElementsByClassName("e-firstrow-border")[0].remove()},e.prototype.removeLastrowBorder=function(e){var t,i=e&&(e.classList.contains("e-emptyrow")||e.classList.contains("e-columnheader")||e.classList.contains("e-detailrow"));t=this.parent.enableVirtualization?e&&!i&&this.parent.getRows()[this.parent.getCurrentViewRecords().length-1].getAttribute("data-uid")!==e.getAttribute("data-uid"):e&&!i&&this.parent.getRowByIndex(this.parent.getCurrentViewRecords().length-1).getAttribute("data-uid")!==e.getAttribute("data-uid");var r=t||"topSegment"===this.dropPosition;this.parent.element.getElementsByClassName("e-lastrow-border").length>0&&e&&(t||r)&&this.parent.element.getElementsByClassName("e-lastrow-border")[0].remove()},e.prototype.updateIcon=function(e,t,o){var a=o.target?i.i(n.closest)(o.target,"tr"):null;this.dropPosition=void 0;var s=0;this.removeFirstrowBorder(a),this.removeLastrowBorder(a);for(var d=0;d<o.rows.length;d++)(i.i(n.isNullOrUndefined)(a)||a.getAttribute("data-uid")!==o.rows[parseInt(d.toString(),10)].getAttribute("data-uid"))&&i.i(r.parentsUntil)(o.target,"e-gridcontent")||(this.dropPosition="Invalid",this.addErrorElem());var l=this.parent,p=0,c=l.toolbar&&l.toolbar.length?document.getElementById(l.element.id+"_gridcontrol_toolbarItems").offsetHeight:0,h=this.getOffset(l.element),u=l.getHeaderContent().offsetHeight+h.top+c,g=l.getContent().firstElementChild.scrollTop;i.i(n.isNullOrUndefined)(a)||(s=a.offsetTop-g),p=this.parent.enableVirtualization?a.getBoundingClientRect().top:s+u+0;var f=p+e[0].offsetHeight,y=f-p,m=y/3,v=p+m,S=v+m,I=S+m,w=i.i(r.getObject)("originalEvent.event",o),R=i.i(r.getObject)("originalEvent.event",o),x="mousemove"===w.type?w.pageY:i.i(n.isNullOrUndefined)(R)||i.i(n.isNullOrUndefined)(R.changedTouches)?null:R.changedTouches[0].pageY,C=x<=v,b=x>v&&x<=S,D=x>S&&x<=I;if(C||b||D){if(C&&"Invalid"!==this.dropPosition&&(this.removeChildBorder(),this.dropPosition="topSegment",this.removetopOrBottomBorder(),this.addFirstrowBorder(a),this.removeErrorElem(),this.removeLastrowBorder(a),this.topOrBottomBorder(o.target)),b&&"Invalid"!==this.dropPosition){this.removetopOrBottomBorder();var M=[],O=i.i(n.closest)(o.target,"tr");M=[].slice.call(O.querySelectorAll(".e-rowcell,.e-rowdragdrop,.e-detailrowcollapse")),M.length>0&&this.addRemoveClasses(M,!0,"e-childborder"),this.addLastRowborder(a),this.addFirstrowBorder(a),this.dropPosition="middleSegment"}D&&"Invalid"!==this.dropPosition&&(this.removeErrorElem(),this.removetopOrBottomBorder(),this.removeChildBorder(),this.dropPosition="bottomSegment",this.addLastRowborder(a),this.removeFirstrowBorder(a),this.topOrBottomBorder(o.target))}return this.dropPosition},e.prototype.removeChildBorder=function(){var e=[];e=[].slice.call(this.parent.element.querySelectorAll(".e-childborder")),e.length>0&&this.addRemoveClasses(e,!1,"e-childborder")},e.prototype.addFirstrowBorder=function(e){var t=this.parent.element,r=this.parent;if(e&&0===e.rowIndex&&!e.classList.contains("e-emptyrow")){var o=this.parent.createElement("div",{className:"e-firstrow-border"}),a=this.parent.getHeaderContent(),s=0;r.toolbar&&(s=r.toolbarModule.getToolbar().offsetHeight);var d=!i.i(n.isNullOrUndefined)(this.parent.rowDropSettings.targetID);d&&(o.style.top=this.parent.grid.element.getElementsByClassName("e-gridheader")[0].offsetHeight+s+"px"),o.style.width=d?t.offsetWidth+"px":t.offsetWidth-this.getScrollWidth()+"px",a.querySelectorAll(".e-firstrow-border").length||a.appendChild(o)}},e.prototype.addLastRowborder=function(e){var t=e&&(e.classList.contains("e-emptyrow")||e.classList.contains("e-columnheader")||e.classList.contains("e-detailrow"));if(e&&!t&&this.parent.getRows()[this.parent.getCurrentViewRecords().length-1].getAttribute("data-uid")===e.getAttribute("data-uid")){var i=this.parent.createElement("div",{className:"e-lastrow-border"}),r=this.parent.getContent();i.style.width=this.parent.element.offsetWidth-this.getScrollWidth()+"px",r.querySelectorAll(".e-lastrow-border").length||(r.classList.add("e-treegrid-relative"),r.appendChild(i),i.style.bottom=this.getScrollWidth()+"px")}},e.prototype.getScrollWidth=function(){var e=this.parent.getContent().firstElementChild;return e.scrollWidth>e.offsetWidth?r.Scroll.getScrollBarWidth():0},e.prototype.addErrorElem=function(){var e=document.getElementsByClassName("e-cloneproperties")[0],t=e.querySelectorAll(".e-errorelem").length;if(!t&&!this.parent.rowDropSettings.targetID){var r=document.createElement("div");i.i(n.classList)(r,["e-errorcontainer"],[]),i.i(n.classList)(r,["e-icons","e-errorelem"],[]);var o=e.querySelector(".errorValue"),a=e.querySelector(".e-rowcell").innerHTML;o&&(a=this.parent.sanitize(o.innerHTML),o.parentNode.removeChild(o)),e.querySelector(".e-rowcell").innerHTML="";var s=document.createElement("span");s.className="errorValue",s.style.paddingLeft="16px",s.innerHTML=this.parent.sanitize(a),e.querySelector(".e-rowcell").appendChild(r),e.querySelector(".e-rowcell").appendChild(s);var d=document.querySelector(".e-dropitemscount");if(this.hasDropItem&&d){var l=parseInt(d.style.left,10)+r.offsetWidth+16,p=this.parent.enableRtl?0:l;d.style.left=p+"px",this.hasDropItem=!1}}},e.prototype.removeErrorElem=function(){var e=document.querySelector(".e-errorelem"),t=document.querySelector(".errorValue"),r=document.querySelector(".e-dropitemscount");if(e){if(r){var o=parseInt(r.style.left,10)-e.offsetWidth-16;i.i(n.setStyleAttribute)(t,{paddingLeft:"0px"}),this.parent.enableRtl||i.i(n.setStyleAttribute)(r,{left:o+"px"})}e.remove()}this.hasDropItem=!0},e.prototype.topOrBottomBorder=function(e){var t=[],r=i.i(n.closest)(e,"tr");t=r?[].slice.call(r.querySelectorAll(".e-rowcell,.e-rowdragdrop,.e-detailrowcollapse")):[],t.length&&("topSegment"===this.dropPosition&&(this.addRemoveClasses(t,!0,"e-droptop"),this.parent.element.getElementsByClassName("e-lastrow-dragborder").length>0&&this.parent.element.getElementsByClassName("e-lastrow-dragborder")[0].remove()),"bottomSegment"===this.dropPosition&&this.addRemoveClasses(t,!0,"e-dropbottom"))},e.prototype.removetopOrBottomBorder=function(){var e=[];e=[].slice.call(this.parent.element.querySelectorAll(".e-dropbottom, .e-droptop")),e.length&&(this.addRemoveClasses(e,!1,"e-dropbottom"),this.addRemoveClasses(e,!1,"e-droptop"))},e.prototype.addRemoveClasses=function(e,t,i){for(var r=0,n=e.length;r<n;r++)t?e[parseInt(r.toString(),10)].classList.add(i):e[parseInt(r.toString(),10)].classList.remove(i)},e.prototype.getOffset=function(e){var t=e.getBoundingClientRect(),i=document.body,r=document.documentElement,n=window.pageYOffset||r.scrollTop||i.scrollTop,o=window.pageXOffset||r.scrollLeft||i.scrollLeft,a=r.clientTop||i.clientTop||0,s=r.clientLeft||i.clientLeft||0,d=t.top+n-a,l=t.left+o-s;return{top:Math.round(d),left:Math.round(l)}},e.prototype.Rowdraging=function(e){var t=this.parent,o=this.parent.element.querySelector(".e-cloneproperties");o.style.cursor="";var a=e.target?i.i(n.closest)(e.target,"tr"):null,s=a?a.rowIndex:-1,d=[],l=t.getCurrentViewRecords()[parseInt(s.toString(),10)];if(this.removeErrorElem(),this.canDrop=!0,e.data[0]?d=e.data:d.push(e.data),-1!==s?this.ensuredropPosition(d,l):(this.canDrop=!1,this.addErrorElem()),!t.rowDropSettings.targetID&&this.canDrop&&t.rowDragAndDropModule.updateIcon(e.rows,s,e),i.i(n.isNullOrUndefined)(t.rowDropSettings.targetID)&&!this.canDrop&&this.removetopOrBottomBorder(),t.rowDropSettings.targetID){var p=i.i(r.parentsUntil)(e.target,"e-treegrid");if(p&&p.id===this.parent.rowDropSettings.targetID){p.ej2_instances[0].rowDragAndDropModule.updateIcon(e.rows,s,e)}}if(e.target&&i.i(n.closest)(e.target,"#"+t.rowDropSettings.targetID)){var p=i.i(r.parentsUntil)(e.target,"e-treegrid");p||(o.style.cursor="default")}},e.prototype.rowDropped=function(e){var t=this.parent;if(t.rowDropSettings.targetID?(e.target&&i.i(n.closest)(e.target,"#"+t.rowDropSettings.targetID)||i.i(r.parentsUntil)(e.target,"e-treegrid")&&i.i(r.parentsUntil)(e.target,"e-treegrid").id===t.rowDropSettings.targetID||e.target&&document.getElementById(t.rowDropSettings.targetID))&&(i.i(n.setValue)("dropPosition",this.dropPosition,e),t.trigger(a._7,e),!e.cancel&&t.rowDropSettings.targetID&&(this.dragDropGrid(e),t.isLocalData&&(t.flatData=this.orderToIndex(t.flatData)))):i.i(r.parentsUntil)(e.target,"e-content")&&(this.parent.element.querySelector(".e-errorelem")&&(this.dropPosition="Invalid"),i.i(n.setValue)("dropPosition",this.dropPosition,e),t.trigger(a._7,e),e.cancel||(i.i(d.b)(this.parent)||this.dropRows(e),t.isLocalData&&(t.flatData=this.orderToIndex(t.flatData)),t.grid.refresh(),i.i(n.isNullOrUndefined)(t.getHeaderContent().querySelector(".e-firstrow-border"))||t.getHeaderContent().querySelector(".e-firstrow-border").remove())),this.removetopOrBottomBorder(),this.removeChildBorder(),i.i(n.isNullOrUndefined)(this.parent.element.getElementsByClassName("e-firstrow-border")[0])?i.i(n.isNullOrUndefined)(this.parent.element.getElementsByClassName("e-lastrow-border")[0])||this.parent.element.getElementsByClassName("e-lastrow-border")[0].remove():this.parent.element.getElementsByClassName("e-firstrow-border")[0].remove(),this.parent.enableImmutableMode&&!this.parent.allowPaging&&!i.i(n.isNullOrUndefined)(e.data[0].parentItem)){var o=this.parent.treeColumnIndex;o+=1;var s=this.parent.getPrimaryKeyFieldNames()[0],l=this.parent.grid.getRowIndexByPrimaryKey(e.data[0][""+s]),p=this.parent.getRows()[parseInt(l.toString(),10)],c=e.data[0];if("middleSegment"===this.dropPosition){var h=[],u=[];h.push(c),u.push(p);c=i.i(d.k)(this.parent,e.data[0].parentUniqueID),l=this.parent.grid.getRowIndexByPrimaryKey(c[""+s]);var g=this.parent.getRows()[parseInt(l.toString(),10)];h.push(c),u.push(g);for(var f=0;f<h.length;f++)this.parent.renderModule.cellRender({data:h[parseInt(f.toString(),10)],cell:u[parseInt(f.toString(),10)].cells[parseInt(o.toString(),10)],column:this.parent.grid.getColumns()[this.parent.treeColumnIndex],requestType:"rowDragAndDrop"});var y=g.getElementsByClassName("e-treegridcollapse")[0];i.i(n.isNullOrUndefined)(y)||(i.i(n.removeClass)([y],"e-treegridcollapse"),i.i(n.addClass)([y],"e-treegridexpand"))}else this.parent.renderModule.cellRender({data:c,cell:p.cells[parseInt(o.toString(),10)],column:this.parent.grid.getColumns()[this.parent.treeColumnIndex],requestType:"rowDragAndDrop"})}},e.prototype.dragDropGrid=function(e){var t,o=this.parent,s=i.i(n.closest)(e.target,"tr"),l=isNaN(this.getTargetIdx(s))?0:this.getTargetIdx(s),p=i.i(r.parentsUntil)(e.target,"e-treegrid");if(p&&p.id===this.parent.rowDropSettings.targetID&&!i.i(d.a)(this.parent)&&!i.i(d.b)(this.parent)){t=p.ej2_instances[0];for(var c=o.getSelectedRecords(),h=[],u=0;u<c.length;u++)h[parseInt(u.toString(),10)]=c[parseInt(u.toString(),10)].index;var g=t.dataSource;if(null!==this.parent.idMapping&&(i.i(n.isNullOrUndefined)(this.dropPosition)||"bottomSegment"===this.dropPosition||"Invalid"===this.dropPosition)&&!g.length){for(var f=[],u=0;u<c.length;u++)if(c[parseInt(u.toString(),10)].hasChildRecords){f.push(c[parseInt(u.toString(),10)]);for(var y=i.i(d.g)(c[parseInt(u.toString(),10)]),m=0;m<y.length;m++)f.push(y[parseInt(m.toString(),10)])}f.length&&(c=f)}o.notify(a._10,{indexes:h,records:c}),t.notify(a._9,{toIndex:l,records:c});var v=t.rowDragAndDropModule.treeGridData;if(!i.i(n.isNullOrUndefined)(v))for(var u=0;u<v.length;u++)if(v[parseInt(u.toString(),10)].index=u,!i.i(n.isNullOrUndefined)(v[parseInt(u.toString(),10)].parentItem)){var S=i.i(n.getValue)("uniqueIDCollection."+v[parseInt(u.toString(),10)].parentUniqueID+".index",t);v[parseInt(u.toString(),10)].parentItem.index=S}o.grid.refresh(),t.grid.refresh(),t.grid.dataSource.length>1&&(t.grid.refresh(),i.i(n.isNullOrUndefined)(t.getHeaderContent().querySelector(".e-firstrow-border"))||t.getHeaderContent().querySelector(".e-firstrow-border").remove(),i.i(n.isNullOrUndefined)(t.getContent().querySelector(".e-lastrow-border"))||t.getContent().querySelector(".e-lastrow-border").remove())}i.i(d.b)(this.parent)&&(t=p.ej2_instances[0],o.grid.refresh(),t.grid.refresh())},e.prototype.getTargetIdx=function(e){return e?parseInt(e.getAttribute("data-rowindex"),10):0},e.prototype.getParentData=function(e,t){var r=e.parentItem,n=-1;if(this.parent.enableVirtualization&&-1!==this.parent.selectedRowIndex?n=this.parent.getSelectedRows()[0].rowIndex:-1!==this.parent.selectedRowIndex&&(n=this.parent.selectedRowIndex),"bottomSegment"===this.dropPosition){var o=this.parent.getPrimaryKeyFieldNames()[0],a=-1===n?this.parent.grid.getRowIndexByPrimaryKey(t[0][""+o]):this.parent.getSelectedRowIndexes()[0],s=this.parent.getCurrentViewRecords()[parseInt(a.toString(),10)];this.droppedRecord=i.i(d.k)(this.parent,s.parentItem.uniqueID)}if("middleSegment"===this.dropPosition){this.parent.getCurrentViewRecords()[parseInt(n.toString(),10)].level===r.level?this.droppedRecord=i.i(d.k)(this.parent,r.uniqueID):this.getParentData(r)}},e.prototype.dropRows=function(e,t){if("Invalid"!==this.dropPosition&&!i.i(d.a)(this.parent)){var r,o=this.parent,a=void 0;if(i.i(n.isNullOrUndefined)(e.dropIndex)){var s=this.parent.getPrimaryKeyFieldNames()[0],l=-1===o.selectedRowIndex?this.parent.grid.getRowIndexByPrimaryKey(e.data[0][""+s])-1:o.getSelectedRowIndexes()[0]-1,p=o.getCurrentViewRecords()[parseInt(l.toString(),10)];this.getParentData(p,e.data)}else if(e.dropIndex=e.dropIndex===e.fromIndex?this.getTargetIdx(e.target.parentElement):e.dropIndex,this.parent.enableVirtualization){var c=this.parent.getRowByIndex(e.dropIndex).rowIndex;this.droppedRecord=o.getCurrentViewRecords()[parseInt(c.toString(),10)]}else this.droppedRecord=o.getCurrentViewRecords()[e.dropIndex];var h=[];a=this.droppedRecord,e.data[0]?h=e.data:h.push(e.data),this.parent[this.modifiedRecords].push(e.data[0],a);var u=0,g=this.parent.rowDropSettings.targetID;this.isMultipleGrid=g,g?this.isaddtoBottom=g&&this.isDraggedWithChild:this.ensuredropPosition(h,a);var f=h.length;i.i(n.isNullOrUndefined)(this.parent.idMapping)||h.reverse();for(var y=this,m=0;m<f;m++)!function(s){if(r=h[parseInt(s.toString(),10)],y.draggedRecord=r,"Invalid"!==y.dropPosition){if(o.rowDropSettings.targetID&&!t||y.deleteDragRow(),y.draggedRecord===y.droppedRecord){var d=y.getTargetIdx(e.target.offsetParent.parentElement);isNaN(d)&&(d=y.getTargetIdx(e.target.parentElement)),e.dropIndex=d,a=y.droppedRecord=y.parent.getCurrentViewRecords()[e.dropIndex]}if(a.parentItem||"middleSegment"===y.dropPosition){var l=o.parentData,p=l.indexOf(y.draggedRecord);-1!==p&&l.splice(p,1)}var c=y.treeGridData.indexOf(a);if(y.dropAtTop(c),"bottomSegment"===y.dropPosition){if(a.hasChildRecords?(u=y.getChildCount(a,0),y.parent.parentIdMapping&&y.treeData.splice(c+u+1,0,y.draggedRecord.taskData),y.treeGridData.splice(c+u+1,0,y.draggedRecord)):(y.parent.parentIdMapping&&y.treeData.splice(c+1,0,y.draggedRecord.taskData),y.treeGridData.splice(c+1,0,y.draggedRecord)),i.i(n.isNullOrUndefined)(a.parentItem)&&(delete r.parentItem,delete r.parentUniqueID,r.level=0,y.parent.parentIdMapping&&(r[y.parent.parentIdMapping]=null)),a.parentItem){var g=y.getChildrecordsByParentID(a.parentUniqueID),f=g[0].childRecords,m=f.indexOf(a)+1;f.splice(m,0,r),r.parentItem=a.parentItem,r.parentUniqueID=a.parentUniqueID,r.level=a.level,y.parent.parentIdMapping&&(r[y.parent.parentIdMapping]=a[y.parent.parentIdMapping],r.parentItem=a.parentItem,r.level=a.level)}if(r.hasChildRecords){y.updateChildRecordLevel(r,1),y.updateChildRecord(r,c+u+1)}}y.dropMiddle(c)}if(i.i(n.isNullOrUndefined)(r.parentItem)){var l=o.parentData,p=l.indexOf(y.droppedRecord),v=0;l.filter(function(e){r.uniqueID===e.uniqueID&&v++}),"bottomSegment"===y.dropPosition&&0===v?l.splice(p+1,0,r):"topSegment"===y.dropPosition&&0===v&&l.splice(p,0,r)}o.rowDragAndDropModule.refreshGridDataSource()}(m)}},e.prototype.dropMiddle=function(e){var t=this.parent,r=i.i(d.g)(this.droppedRecord),o=i.i(n.isNullOrUndefined)(r)||0===r.length?e+1:r.length+e+1;"middleSegment"===this.dropPosition&&(t.parentIdMapping?(this.treeData.splice(o,0,this.draggedRecord.taskData),this.treeGridData.splice(o,0,this.draggedRecord)):this.treeGridData.splice(o,0,this.draggedRecord),this.recordLevel(),this.draggedRecord.hasChildRecords&&this.updateChildRecord(this.draggedRecord,o))},e.prototype.dropAtTop=function(e){var t=this.parent;if("topSegment"===this.dropPosition){if(t.parentIdMapping&&this.treeData.splice(e,0,this.draggedRecord.taskData),this.draggedRecord.parentItem=this.treeGridData[parseInt(e.toString(),10)].parentItem,this.draggedRecord.parentUniqueID=this.treeGridData[parseInt(e.toString(),10)].parentUniqueID,this.draggedRecord.level=this.treeGridData[parseInt(e.toString(),10)].level,this.treeGridData.splice(parseInt(e.toString(),10),0,this.draggedRecord),this.draggedRecord.hasChildRecords){this.updateChildRecord(this.draggedRecord,e),this.updateChildRecordLevel(this.draggedRecord,1)}if(this.droppedRecord.parentItem){var i=this.getChildrecordsByParentID(this.droppedRecord.parentUniqueID),r=i[0].childRecords,n=r.indexOf(this.droppedRecord);r.splice(n,0,this.draggedRecord)}}},e.prototype.recordLevel=function(){var e=this.parent,t=this.draggedRecord,r=this.droppedRecord,o=e.childMapping;if(r.hasChildRecords||(r.hasChildRecords=!0,r.hasFilteredChildRecords=!0,(i.i(n.isNullOrUndefined)(r.childRecords)||0===r.childRecords.length)&&(r.childRecords=[],!e.parentIdMapping&&i.i(n.isNullOrUndefined)(r.taskData[""+o])&&(r.taskData[""+o]=[]))),"middleSegment"===this.dropPosition){var a=i.i(n.extend)({},r);delete a.childRecords,t.parentItem=a,t.parentUniqueID=r.uniqueID,r.childRecords.splice(r.childRecords.length,0,t);if(e.isSelfReference&&(r[e.childMapping]=[],r[e.childMapping].splice(r[e.childMapping].length,0,t)),i.i(n.isNullOrUndefined)(t)||e.parentIdMapping||i.i(n.isNullOrUndefined)(r.taskData[""+o])||r.taskData[e.childMapping].splice(r.childRecords.length,0,t.taskData),t.hasChildRecords){t.level=r.level+1,this.updateChildRecordLevel(t,1)}else t.level=r.level+1;r.expanded=!0}},e.prototype.deleteDragRow=function(){this.parent.dataSource instanceof o.DataManager&&i.i(d.h)(this.parent)?(this.treeGridData=this.parent.grid.dataSource.dataSource.json,this.treeData=this.parent.dataSource.dataSource.json):(this.treeGridData=this.parent.grid.dataSource,this.treeData=this.parent.dataSource);var e=i.i(d.k)(this.parent,this.draggedRecord.uniqueID);!i.i(n.isNullOrUndefined)(e.childRecords)&&e.childRecords.length&&(e.hasChildRecords=!0),this.removeRecords(e)},e.prototype.updateChildRecord=function(e,t){var r,o=this.parent,a=0;if(!e.hasChildRecords)return 0;a=e.childRecords.length;for(var s=0;s<a;s++)r=this.isMultipleGrid?e.childRecords[parseInt(s.toString(),10)]:i.i(n.getValue)("uniqueIDCollection."+e.childRecords[parseInt(s.toString(),10)].uniqueID,o),t++,o.flatData.splice(t,0,r),i.i(n.setValue)("uniqueIDCollection."+r.uniqueID,r,this.parent),o.parentIdMapping&&this.treeData.splice(t,0,r.taskData),r.hasChildRecords&&(t=this.updateChildRecord(r,t));return t},e.prototype.updateChildRecordLevel=function(e,t){var r,o=0;if(t++,!e.hasChildRecords)return 0;o=e.childRecords.length;for(var a=0;a<o;a++){r=this.isMultipleGrid?e.childRecords[parseInt(a.toString(),10)]:i.i(n.getValue)("uniqueIDCollection."+e.childRecords[parseInt(a.toString(),10)].uniqueID,this.parent);var s=void 0;e.parentItem&&(s=i.i(d.k)(this.parent,e.parentItem.uniqueID)),i.i(n.isNullOrUndefined)(s)&&!i.i(n.isNullOrUndefined)(e.parentItem)&&(s=e.parentItem),r.level=e.parentItem?s.level+t:e.level+1,r.hasChildRecords&&(t--,t=this.updateChildRecordLevel(r,t))}return t},e.prototype.removeRecords=function(e){var t,r=this.parent;t=this.parent.dataSource instanceof o.DataManager&&i.i(d.h)(this.parent)?this.parent.dataSource.dataSource.json:this.parent.dataSource;var a=e,l=!i.i(n.isNullOrUndefined)(r.parentIdMapping),p=this.getChildrecordsByParentID(a.parentUniqueID)[0];if(a){if(a.parentItem){var c=p?p.childRecords:[],h=0;c&&c.length>0&&(h=c.indexOf(a),p.childRecords.splice(h,1),this.parent.parentIdMapping&&!r.enableImmutableMode||i.i(s.a)({value:a,action:"delete"},this.parent,l,a.index,a.index))}if(r.parentIdMapping){a.hasChildRecords&&a.childRecords.length>0&&this.removeChildItem(a);for(var u=void 0,g=void 0,f=t,y=0;y<f.length;y++)f[parseInt(y.toString(),10)][this.parent.idMapping]===a.taskData[this.parent.idMapping]&&(u=y);for(var y=0;y<this.treeGridData.length;y++)this.treeGridData[parseInt(y.toString(),10)][this.parent.idMapping]===a.taskData[this.parent.idMapping]&&(g=y);-1===u||i.i(n.isNullOrUndefined)(u)||t.splice(u,1),-1===g||i.i(n.isNullOrUndefined)(g)||this.treeGridData.splice(g,1)}var m=this.treeGridData.indexOf(a);if(!r.parentIdMapping){var v=this.parent.parentData.indexOf(a);-1!==v&&(r.parentData.splice(v,1),t.splice(v,1))}if(-1===m&&!r.parentIdMapping)for(var S=r.getPrimaryKeyFieldNames()[0],I=0;I<this.treeGridData.length;I++)this.treeGridData[parseInt(I.toString(),10)][""+S]===a[""+S]&&(m=I);if(!r.parentIdMapping){var w=this.getChildCount(a,0);this.treeGridData.splice(m,w+1)}a.parentItem&&p&&p.childRecords&&!p.childRecords.length&&(p.expanded=!1,p.hasChildRecords=!1,p.hasFilteredChildRecords=!1),-1!==this.parent[this.modifiedRecords].indexOf(p)||i.i(n.isNullOrUndefined)(p)||this.parent[this.modifiedRecords].push(p),i.i(n.isNullOrUndefined)(p)||this.updateModifiedRecords(p)}},e.prototype.updateModifiedRecords=function(e){var t=i.i(d.k)(this.parent,e.parentUniqueID);i.i(n.isNullOrUndefined)(t)||(this.parent[this.modifiedRecords].push(t),this.updateModifiedRecords(t))},e.prototype.removeChildItem=function(e){var t,r,a,s;s=this.parent.dataSource instanceof o.DataManager&&i.i(d.h)(this.parent)?this.parent.dataSource.dataSource.json:this.parent.dataSource;for(var l=0;l<e.childRecords.length;l++){t=e.childRecords[parseInt(l.toString(),10)],!i.i(n.isNullOrUndefined)(t.childRecords)&&t.childRecords.length&&(t.hasChildRecords=!0);var p=void 0;p=this.parent.dataSource instanceof o.DataManager&&i.i(d.h)(this.parent)?this.parent.dataSource.dataSource.json:this.parent.dataSource;for(var c=0;c<p.length;c++)p[parseInt(c.toString(),10)][this.parent.idMapping]===t.taskData[this.parent.idMapping]&&(r=c);for(var h=0;h<this.treeGridData.length;h++)if(this.treeGridData[parseInt(h.toString(),10)][this.parent.idMapping]===t.taskData[this.parent.idMapping]){a=h;break}-1===r||i.i(n.isNullOrUndefined)(r)||s.splice(r,1),-1===a||i.i(n.isNullOrUndefined)(a)||this.treeGridData.splice(a,1),t.hasChildRecords&&this.removeChildItem(t)}},e.prototype.getChildCount=function(e,t){var i;if(!e.hasChildRecords)return 0;for(var r=0;r<e.childRecords.length;r++)i=e.childRecords[parseInt(r.toString(),10)],t++,i.hasChildRecords&&(t=this.getChildCount(i,t));return t},e.prototype.ensuredropPosition=function(e,t){var r=this;e.filter(function(e){if(e.hasChildRecords&&!i.i(n.isNullOrUndefined)(e.childRecords)){if(-1!==e.childRecords.indexOf(t))return r.dropPosition="Invalid",r.addErrorElem(),void(r.canDrop=!1);r.ensuredropPosition(e.childRecords,t)}})},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(a._11,this.Rowdraging),this.parent.off(a._12,this.rowDropped),this.parent.off(a._9,this.rowsAdded),this.parent.off(a._10,this.rowsRemoved))},e.prototype.getModuleName=function(){return"rowDragAndDrop"},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(1),n=(i.n(r),i(4)),o=(i.n(n),i(0)),a=(i.n(o),i(3)),s=function(){function e(e){o.Grid.Inject(o.Sort),this.parent=e,this.taskIds=[],this.flatSortedData=[],this.storedIndex=-1,this.isSelfReference=!i.i(r.isNullOrUndefined)(this.parent.parentIdMapping),this.addEventListener()}return e.prototype.getModuleName=function(){return"sort"},e.prototype.addEventListener=function(){this.parent.on("updateModel",this.updateModel,this),this.parent.on("createSort",this.createdSortedRecords,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("updateModel",this.updateModel),this.parent.off("createSort",this.createdSortedRecords))},e.prototype.createdSortedRecords=function(e){var t=e.modifiedData,i=e.srtQry;this.iterateSort(t,i),this.storedIndex=-1,e.modifiedData=this.flatSortedData,this.flatSortedData=[]},e.prototype.iterateSort=function(e,t){for(var o=0;o<e.length;o++)if(this.parent.grid.filterSettings.columns.length>0||""!==this.parent.grid.searchSettings.key?i.i(r.isNullOrUndefined)(i.i(a.k)(this.parent,e[parseInt(o.toString(),10)].uniqueID,!0))||(this.storedIndex++,this.flatSortedData[this.storedIndex]=e[parseInt(o.toString(),10)]):(this.storedIndex++,this.flatSortedData[this.storedIndex]=e[parseInt(o.toString(),10)]),e[parseInt(o.toString(),10)].hasChildRecords){var s=new n.DataManager(e[parseInt(o.toString(),10)].childRecords).executeLocal(t);if(this.parent.allowRowDragAndDrop&&-1!==e[parseInt(o.toString(),10)].childRecords.indexOf(this.parent.rowDragAndDropModule.draggedRecord)&&"middleSegment"!==this.parent.rowDragAndDropModule.dropPosition){var d=s.indexOf(this.parent.rowDragAndDropModule.draggedRecord);s.splice(d,1);var l=s.indexOf(this.parent.rowDragAndDropModule.droppedRecord);"topSegment"===this.parent.rowDragAndDropModule.dropPosition?s.splice(l,0,this.parent.rowDragAndDropModule.draggedRecord):"bottomSegment"===this.parent.rowDragAndDropModule.dropPosition&&s.splice(l+1,0,this.parent.rowDragAndDropModule.draggedRecord)}this.iterateSort(s,t)}},e.prototype.sortColumn=function(e,t,i){this.parent.grid.sortColumn(e,t,i)},e.prototype.removeSortColumn=function(e){this.parent.grid.removeSortColumn(e)},e.prototype.updateModel=function(){this.parent.setProperties({sortSettings:i.i(o.getActualProperties)(this.parent.grid.sortSettings)},!0)},e.prototype.clearSorting=function(){this.parent.grid.clearSorting(),this.updateModel()},e.prototype.destroy=function(){this.removeEventListener()},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(4),n=(i.n(r),i(0)),o=(i.n(n),i(3)),a=i(1),s=(i.n(a),i(2)),d=function(){function e(e){n.Grid.Inject(n.Aggregate),this.parent=e,this.flatChildRecords=[],this.summaryQuery=[]}return e.prototype.getModuleName=function(){return"summary"},e.prototype.removeEventListener=function(){this.parent.isDestroyed},e.prototype.calculateSummaryValue=function(e,t,r){this.summaryQuery=e;for(var s,d=Object.keys(t).length,l=[],p=0,c=d;p<c;p++){i.i(n.getObject)("isSummaryRow",t[parseInt(p.toString(),10)])||l.push(t[parseInt(p.toString(),10)])}var h,u=i.i(o.e)(l),g=l.slice(),f=Object.keys(this.parent.aggregates).length,y=Object.keys(u).length,m=this.parent.getColumns();if(this.parent.aggregates.filter(function(e){return e.showChildSummary}).length){for(var v=0,c=y;v<c;v++)if(s=u[parseInt(v.toString(),10)],h=this.getChildRecordsLength(s,g)){for(var S=this,I=1,w=f;I<=w;I++)!function(e,t){var o=void 0;o={};for(var d=0;d<m.length;d++){o[""+(i.i(a.isNullOrUndefined)(i.i(n.getObject)("field",m[parseInt(d.toString(),10)]))?m[parseInt(d.toString(),10)]:i.i(n.getObject)("field",m[parseInt(d.toString(),10)]))]=null}if(o=S.createSummaryItem(o,S.parent.aggregates[e-1]),!S.parent.aggregates[e-1].showChildSummary)return"continue";var l;g.map(function(e,t){if(e.uniqueID===s.uniqueID)return void(l=t)});var p=l+h+e,c=i.i(a.extend)({},s);delete c.childRecords,delete c[S.parent.childMapping],i.i(a.setValue)("parentItem",c,o);var u=i.i(n.getObject)("level",c);if(i.i(a.setValue)("level",u+1,o),i.i(a.setValue)("isSummaryRow",!0,o),i.i(a.setValue)("parentUniqueID",c.uniqueID,o),r){var f=i.i(n.getObject)("childRecords",s);f.length&&f.push(o)}g.splice(p,0,o)}(I);this.flatChildRecords=[]}}else{for(var R={},x=0,C=m.length;x<C;x++){R[""+(i.i(a.isNullOrUndefined)(i.i(n.getObject)("field",m[parseInt(x.toString(),10)]))?m[parseInt(x.toString(),10)]:i.i(n.getObject)("field",m[parseInt(x.toString(),10)]))]=null}for(var I=1,b=f;I<=b;I++)this.createSummaryItem(R,this.parent.aggregates[I-1])}return g},e.prototype.getChildRecordsLength=function(e,t){for(var r,o=Object.keys(t).length,s=0,d=o;s<d;s++){r=t[parseInt(s.toString(),10)];if(e===(i.i(a.isNullOrUndefined)(r.parentItem)?null:t.filter(function(e){return e.uniqueID===r.parentItem.uniqueID})[0])){this.flatChildRecords.push(r);if(!i.i(n.getObject)("hasChildRecords",r))continue;this.getChildRecordsLength(r,t)}}return this.flatChildRecords.length},e.prototype.createSummaryItem=function(e,t){for(var n=Object.keys(t.columns).length,o=0,s=n;o<s;o++)for(var d=i.i(a.isNullOrUndefined)(t.columns[parseInt(o.toString(),10)].columnName)?t.columns[parseInt(o.toString(),10)].field:t.columns[parseInt(o.toString(),10)].columnName,l=Object.keys(e),p=0,c=l;p<c.length;p++){var h=c[p];if(h===d)if(this.flatChildRecords.length)e[""+h]=this.getSummaryValues(t.columns[parseInt(o.toString(),10)],this.flatChildRecords);else if(this.parent.isLocalData){var u=this.parent.dataSource instanceof r.DataManager?this.parent.dataSource.dataSource.json:this.parent.flatData;e[""+h]=this.getSummaryValues(t.columns[parseInt(o.toString(),10)],u)}}return e},e.prototype.getSummaryValues=function(e,t){var o=new r.Query,d={},l={},p=i.i(a.isNullOrUndefined)(e.field)?void 0:this.parent.getColumnByField(e.field).type;e.setPropertiesSilent({format:this.getFormatFromType(e.format,p)}),e.setFormatter(this.parent.grid.locale);var c=e.getFormatter()||function(){return function(e){return e}}();e.setTemplate(l);var h=e.getTemplate(2);o.queries=this.summaryQuery,o.requiresCount();var u,g=new r.DataManager(t).executeLocal(o),f=e.type;f=[e.type];for(var y=0;y<f.length;y++){u=f[parseInt(y.toString(),10)];var m=e.field+" - "+f[parseInt(y.toString(),10)].toLowerCase(),v="Custom"!==f[parseInt(y.toString(),10)]?i.i(n.getObject)("aggregates",g):i.i(n.calculateAggregate)(f[parseInt(y.toString(),10)],g,e,this.parent),S=e.columnName,I="Custom"!==f[parseInt(y.toString(),10)]?v[""+m]:v;d[""+S]=d[""+S]||{},d[""+S][""+m]=I,d[""+S][f[parseInt(y.toString(),10)]]=i.i(a.isNullOrUndefined)(v)?" ":c(I)}l.format=e.getFormatter();var w=i.i(a.createElement)("td",{className:"e-summary"});if(this.parent.isReact){h.fn(d[e.columnName],this.parent,h.property,"",null,null,w);var R=this;R.parent.renderReactTemplates(function(){R.parent.trigger(s.D,R.parent.args)})}else i.i(n.appendChildren)(w,h.fn(d[e.columnName],this.parent,h.property));var x=d[""+e.columnName][""+u];return-1===w.innerHTML.indexOf(x)?w.innerHTML+x:w.innerHTML},e.prototype.getFormatFromType=function(e,t){if(i.i(a.isNullOrUndefined)(t)||"string"!=typeof e)return e;var r;switch(t){case"number":r={format:e};break;case"datetime":r={type:"dateTime",skeleton:e};break;case"date":r={type:t,skeleton:e}}return r},e.prototype.destroy=function(){this.removeEventListener()},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(0),n=(i.n(r),i(2)),o=i(1),a=(i.n(o),function(){function e(e){r.Grid.Inject(r.Toolbar),this.parent=e,this.addEventListener()}return e.prototype.getModuleName=function(){return"toolbar"},e.prototype.addEventListener=function(){this.parent.on(n.E,this.refreshToolbar,this),this.parent.on(n.F,this.refreshToolbar,this),this.parent.on(n.G,this.toolbarClickHandler,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(n.E,this.refreshToolbar),this.parent.off(n.F,this.refreshToolbar),this.parent.off(n.G,this.toolbarClickHandler))},e.prototype.refreshToolbar=function(e){var t=this.parent.grid.toolbarModule.getToolbar();if(!i.i(o.isNullOrUndefined)(t)){var r=this.parent,n=void 0,a=void 0,s=r.element.id+"_gridcontrol_indent",d=r.element.id+"_gridcontrol_outdent",l=t.querySelector("#"+s),p=t.querySelector("#"+d),c=e.row,h=r.getSelectedRows()[0];if(i.i(o.isNullOrUndefined)(c[0])||(c=c[0]),c=i.i(o.isNullOrUndefined)(h)||h.rowIndex===c.rowIndex?c:h,null!==l&&null!==p){if(n=t.querySelector("#"+s).parentElement,a=t.querySelector("#"+d).parentElement,0===c.rowIndex||r.getSelectedRowIndexes().length>1)n.classList.add("e-hidden"),a.classList.add("e-hidden");else if("rowDeselected"!==e.name||!i.i(o.isNullOrUndefined)(h)&&r.grid.isCheckBoxSelection){var u=r.getCurrentViewRecords()[c.rowIndex];i.i(o.isNullOrUndefined)(u)||(u.level>r.getCurrentViewRecords()[c.rowIndex-1].level?n.classList.add("e-hidden"):n.classList.remove("e-hidden"),u.level===r.getCurrentViewRecords()[c.rowIndex-1].level&&n.classList.remove("e-hidden"),0===u.level&&a.classList.add("e-hidden"),0!==u.level&&a.classList.remove("e-hidden"))}"rowDeselected"===e.name&&i.i(o.isNullOrUndefined)(h)&&!r.grid.isCheckBoxSelection&&(this.parent.toolbar.includes("Indent")&&n.classList.add("e-hidden"),this.parent.toolbar.includes("Outdent")&&a.classList.add("e-hidden"))}}},e.prototype.toolbarClickHandler=function(e){var t=this.parent;"Cell"===this.parent.editSettings.mode&&"Batch"===this.parent.grid.editSettings.mode&&e.item.id===this.parent.grid.element.id+"_update"&&(e.cancel=!0,this.parent.grid.editModule.saveCell()),e.item.id===this.parent.grid.element.id+"_expandall"&&this.parent.expandAll(),e.item.id===this.parent.grid.element.id+"_collapseall"&&this.parent.collapseAll(),e.item.id===t.grid.element.id+"_indent"&&t.getSelectedRecords().length&&!i.i(o.isNullOrUndefined)(t.rowDragAndDropModule)&&this.parent.rowDragAndDropModule.indentOutdentAction(null,"indent"),e.item.id===t.grid.element.id+"_outdent"&&t.getSelectedRecords().length&&!i.i(o.isNullOrUndefined)(t.rowDragAndDropModule)&&this.parent.rowDragAndDropModule.indentOutdentAction(null,"outdent")},e.prototype.getToolbar=function(){return this.parent.grid.toolbarModule.getToolbar()},e.prototype.enableItems=function(e,t){this.parent.grid.toolbarModule.enableItems(e,t)},e.prototype.destroy=function(){this.removeEventListener()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return p}),i.d(t,"b",function(){return c});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),i(2)),a=i(4),s=(i.n(a),i(3)),d=i(54),l=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),p=function(){function e(e){this.prevstartIndex=-1,this.prevendIndex=-1,this.parent=e,r.Grid.Inject(c),this.addEventListener()}return e.prototype.returnVisualData=function(e){e.data=this.visualData},e.prototype.getModuleName=function(){return"virtualScroll"},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(o.b,this.collapseExpandVirtualchilds,this),this.parent.on(o.a,this.virtualPageAction,this),this.parent.on(o.c,this.destroy,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(o.b,this.collapseExpandVirtualchilds),this.parent.off(o.a,this.virtualPageAction),this.parent.off(o.c,this.destroy))},e.prototype.collapseExpandVirtualchilds=function(e){this.parent.grid.notify(o.d,{isExpandCollapse:!0}),this.expandCollapseRec=e.record,e.record.expanded="collapse"!==e.action;var t={result:this.parent.flatData,row:e.row,action:e.action,record:e.record,count:this.parent.flatData.length};(this.parent.enableVirtualization&&"Cell"===this.parent.selectionSettings.mode||"Row"===this.parent.selectionSettings.mode&&!this.parent.selectionSettings.persistSelection)&&this.parent.grid.clearSelection();var r=i.i(n.getValue)("isCollapseAll",this.parent)?"collapseAll":"refresh";i.i(n.getValue)("grid.renderModule",this.parent).dataManagerSuccess(t,{requestType:r})},e.prototype.virtualPageAction=function(e){var t=this,d=new a.DataManager(e.result),l=new a.Predicate("expanded","notequal",null).or("expanded","notequal",void 0),p=d.executeLocal((new a.Query).where(l)),c=p.filter(function(e){return i.i(s.f)(t.parent,e,p)});this.visualData=c,e.count=c.length,this.parent.grid.notify(o.e,{data:c});var h={startIndex:-1,endIndex:-1,count:e.count,requestType:e.actionArgs.requestType};this.parent.grid.notify(o.f,h);var u=h.startIndex,g=h.endIndex;if(e.count=c.length,-1===u&&-1===g){var f=new a.Query,y=this.parent.grid.pageSettings.pageSize,m=this.parent.grid.pageSettings.currentPage,v=y*(m-1);f=f.skip(v).take(y),d.dataSource.json=c,e.result=d.executeLocal(f)}else{var S=e.actionArgs.requestType;("filtering"===S||"collapseAll"===S||"searching"===S||"refresh"===S&&this.parent.enableCollapseAll&&g>c.length&&i.i(n.isNullOrUndefined)(this.expandCollapseRec))&&(u=0,g=this.parent.grid.pageSettings.pageSize-1,this.parent.grid.getContent().firstElementChild.scrollTop=0,this.parent.grid.notify(o.d,{setTop:!0})),("save"===S&&e.actionArgs.index>=h.count-this.parent.grid.pageSettings.pageSize||"refresh"===S&&this.parent.isGantt&&this.parent.isAddedFromGantt&&this.parent.grid.pageSettings.currentPage===this.parent.grid.contentModule.maxPage)&&(u=h.startIndex+(h.count-h.endIndex),g=h.count,this.parent.isAddedFromGantt=!1);var I=this.parent.grid.contentModule.virtualEle.wrapper,w=i.i(r.getTransformValues)(I).height;if(!i.i(n.isNullOrUndefined)(this.expandCollapseRec)&&("virtualscroll"===e.actionArgs.requestType||"refresh"===e.actionArgs.requestType&&u!==this.prevstartIndex)&&u<this.parent.getRows().length&&g<=u+this.parent.getRows().length&&0===w&&(u=0),!i.i(n.isNullOrUndefined)(this.expandCollapseRec)){var R=this.parent.getRows(),x=c.indexOf(this.expandCollapseRec);c.slice(x,x+R.length).length<R.length&&x>=0&&0!==u?(x=c.length-R.length,x=x>0?x:0,u=x,g=c.length):i.i(n.getValue)("isCollapseAll",this.parent)&&(u=0,g=this.parent.grid.pageSettings.pageSize-1,this.parent.grid.notify(o.d,{setTop:!0}))}!this.parent.enableCollapseAll&&!this.parent.expandStateMapping||i.i(n.isNullOrUndefined)(this.expandCollapseRec)||(e.count<this.parent.getRows()[0].getBoundingClientRect().height?u=0:this.parent.isExpandAll||(u=-1===this.prevstartIndex?0:this.prevstartIndex)),this.expandCollapseRec=null,u=u<0?0:u,0===g&&c.length>0?e.result=c:e.result=c.slice(u,g),this.prevstartIndex=u,this.prevendIndex=g}this.parent.notify("updateAction",e)},e.prototype.destroy=function(){this.removeEventListener()},e}(),c=function(e){function t(t,r){var o=e.call(this,t,r)||this;return i.i(n.getValue)("parent",o).off("initial-load",i.i(n.getValue)("instantiateRenderer",o),o),i.i(n.getValue)("parent",o).on("initial-load",o.instantiateRenderers,o),o}return l(t,e),t.prototype.getModuleName=function(){return"treeVirtualScroll"},t.prototype.instantiateRenderers=function(){var e=i.i(n.getValue)("parent",this);i.i(n.getValue)("parent",this).log(["limitation","virtual_height"],"virtualization");var t=i.i(n.getValue)("locator",this).getService("rendererFactory");e.enableColumnVirtualization&&i.i(n.getValue)("addRenderer",t).apply(t,[r.RenderType.Header,new r.VirtualHeaderRenderer(i.i(n.getValue)("parent",this),i.i(n.getValue)("locator",this))]),i.i(n.getValue)("addRenderer",t).apply(t,[r.RenderType.Content,new d.a(i.i(n.getValue)("parent",this),i.i(n.getValue)("locator",this))]),this.ensurePageSize()},t.prototype.ensurePageSize=function(){var e=i.i(n.getValue)("parent",this),t=e.getRowHeight();i.i(n.isNullOrUndefined)(e.height)||"string"!=typeof e.height||-1===e.height.indexOf("%")||(e.element.style.height=e.height);var r=e.height.toString().indexOf("%")<0?parseInt(e.height.toString(),10):e.element.getBoundingClientRect().height,o=~~(r/t),a=2*o,s=e.pageSettings.pageSize;e.setProperties({pageSettings:{pageSize:s<a?a:s}},!0)},t}(r.VirtualScroll)},function(e,t,i){"use strict";var r=i(49);i.d(t,"a",function(){return r.a});var n=i(2);i.d(t,"b",function(){return n.K}),i.d(t,"c",function(){return n.J}),i.d(t,"d",function(){return n.L}),i.d(t,"e",function(){return n.D}),i.d(t,"f",function(){return n.M}),i.d(t,"g",function(){return n.v}),i.d(t,"h",function(){return n.N}),i.d(t,"i",function(){return n.h}),i.d(t,"j",function(){return n.O}),i.d(t,"k",function(){return n.E}),i.d(t,"l",function(){return n.j}),i.d(t,"m",function(){return n.F}),i.d(t,"n",function(){return n.G}),i.d(t,"o",function(){return n.I}),i.d(t,"p",function(){return n.H}),i.d(t,"q",function(){return n.P}),i.d(t,"r",function(){return n.Q}),i.d(t,"s",function(){return n.R}),i.d(t,"t",function(){return n.S}),i.d(t,"u",function(){return n.T}),i.d(t,"v",function(){return n.U}),i.d(t,"w",function(){return n.b}),i.d(t,"x",function(){return n.a}),i.d(t,"y",function(){return n.V}),i.d(t,"z",function(){return n.W}),i.d(t,"A",function(){return n.X}),i.d(t,"B",function(){return n.C}),i.d(t,"C",function(){return n.Y}),i.d(t,"D",function(){return n.Z}),i.d(t,"E",function(){return n.k}),i.d(t,"F",function(){return n.l}),i.d(t,"G",function(){return n.m}),i.d(t,"H",function(){return n.n}),i.d(t,"I",function(){return n.o}),i.d(t,"J",function(){return n.x}),i.d(t,"K",function(){return n.r}),i.d(t,"L",function(){return n._0}),i.d(t,"M",function(){return n.p}),i.d(t,"N",function(){return n.y}),i.d(t,"O",function(){return n.A}),i.d(t,"P",function(){return n.z}),i.d(t,"Q",function(){return n.B}),i.d(t,"R",function(){return n.w}),i.d(t,"S",function(){return n.q}),i.d(t,"T",function(){return n._1}),i.d(t,"U",function(){return n.s}),i.d(t,"V",function(){return n._2}),i.d(t,"W",function(){return n.d}),i.d(t,"X",function(){return n.c}),i.d(t,"Y",function(){return n.e}),i.d(t,"Z",function(){return n.f}),i.d(t,"_0",function(){return n.t}),i.d(t,"_1",function(){return n.u}),i.d(t,"_2",function(){return n._3}),i.d(t,"_3",function(){return n._4}),i.d(t,"_4",function(){return n._5}),i.d(t,"_5",function(){return n._6}),i.d(t,"_6",function(){return n._7}),i.d(t,"_7",function(){return n._8}),i.d(t,"_8",function(){return n._9}),i.d(t,"_9",function(){return n._10}),i.d(t,"_10",function(){return n._11}),i.d(t,"_11",function(){return n._12}),i.d(t,"_12",function(){return n.i}),i.d(t,"_13",function(){return n._13}),i.d(t,"_14",function(){return n._14}),i.d(t,"_15",function(){return n._15}),i.d(t,"_16",function(){return n._16}),i.d(t,"_17",function(){return n._17}),i.d(t,"_18",function(){return n._18}),i.d(t,"_19",function(){return n._19}),i.d(t,"_20",function(){return n._20}),i.d(t,"_21",function(){return n._21}),i.d(t,"_22",function(){return n._22}),i.d(t,"_23",function(){return n._23}),i.d(t,"_24",function(){return n._24}),i.d(t,"_25",function(){return n._25}),i.d(t,"_26",function(){return n.g}),i.d(t,"_27",function(){return n._26});var o=i(12);i.d(t,"_28",function(){return o.a});var a=i(9);i.d(t,"_29",function(){return a.a});var s=i(10);i.d(t,"_30",function(){return s.a});var d=i(43);i.d(t,"_31",function(){return d.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return E});var r=i(1),n=(i.n(r),i(14)),o=i(0),a=(i.n(o),i(18)),s=i(16),d=i(52),l=i(8),p=i(7),c=i(11),h=i(42),u=i(2),g=i(20),f=i(21),y=i(4),m=(i.n(y),i(6)),v=(i.n(m),i(3)),S=i(24),I=i(12),w=i(13),R=i(19),x=i(23),C=i(15),b=i(22),D=i(5),M=i(17),O=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),P=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},E=function(e){function t(t,n){var a=e.call(this,t,n)||this;a.dataResults={},a.uniqueIDCollection={},a.uniqueIDFilterCollection={},a.changedRecords="changedRecords",a.deletedRecords="deletedRecords",a.addedRecords="addedRecords",a.indentOutdentAction="indentOutdentAction",a.modifiedRecords=[],a.stackedHeader=!1,a.objectEqualityChecker=function(e,t){if(e){for(var i=Object.keys(e),r=!0,n=["Children","childRecords","taskData","uniqueID","parentItem","parentUniqueID","index"],o=0;o<i.length;o++)if(e[i[parseInt(o.toString(),10)]]!==t[i[parseInt(o.toString(),10)]]&&-1===n.indexOf(i[parseInt(o.toString(),10)])){var a=e[i[parseInt(o.toString(),10)]]instanceof Date&&t[i[parseInt(o.toString(),10)]]instanceof Date;if(!a||e[i[parseInt(o.toString(),10)]].getTime()!==t[i[parseInt(o.toString(),10)]].getTime()){r=!1;break}}return r}return!1},E.Inject(c.a),i.i(r.setValue)("mergePersistData",a.mergePersistTreeGridData,a);return i.i(r.isNullOrUndefined)(a.injectedModules.Logger)||o.Grid.Inject(o.Logger),a.grid=new o.Grid,a}O(t,e),E=t,t.prototype.excelExport=function(e,t,i,r){return this.excelExportModule.Map(e,t,i,r,!1)},t.prototype.csvExport=function(e,t,i,r){return this.excelExportModule.Map(e,t,i,r,!0)},t.prototype.pdfExport=function(e,t,i,r){return this.pdfExportModule.Map(e,t,i,r)},t.prototype.serverExcelExport=function(e){this.isExcel=!0,this.exportTreeGrid(e)},t.prototype.serverPdfExport=function(e){this.isExcel=!1,this.exportTreeGrid(e)},t.prototype.serverCsvExport=function(e){this.isExcel=!0,this.exportTreeGrid(e)},t.prototype.exportTreeGrid=function(e){var t=this,i=t.grid.getDataModule().generateQuery(!0),r=(new y.UrlAdaptor).processQuery(new y.DataManager({url:""}),i),n=JSON.parse(r.data),o=JSON.parse(this.addOnPersist(["allowPaging","pageSettings","sortSettings","allowPdfExport","allowExcelExport","aggregates","filterSettings","columns","locale","searchSettings","idMapping","parentIdMapping","childMapping","treeColumnIndex"])),a=["field","headerText","type","format","visible","template","index","width","textAlign","headerTextAlign","columns"];o.filterSettings.columns=n.where,o.searchSettings.fields=n.search&&n.search[0].fields||[],o.sortSettings.columns=n.sorted,o.columns=this.setHeaderText(o.columns,a);var s=this.createElement("form",{id:"ExportForm",styles:"display:none;"}),d=this.createElement("input",{id:"treeGridInput",attrs:{name:"treeGridModel"}});d.value=JSON.stringify(o),s.method="POST",s.action=e,s.appendChild(d),document.body.appendChild(s),s.submit(),s.remove()},t.prototype.setHeaderText=function(e,t){for(var n=0;n<e.length;n++){var a=this.getColumnByUid(e[parseInt(n.toString(),10)].uid);this.stackedHeader&&i.i(r.isNullOrUndefined)(a)&&(a=i.i(r.isNullOrUndefined)(e[parseInt(n.toString(),10)].field)?e[parseInt(n.toString(),10)]:this.getColumnByField(e[parseInt(n.toString(),10)].field)),e[parseInt(n.toString(),10)].headerText=a.headerText,i.i(r.isNullOrUndefined)(a.template)||(e[parseInt(n.toString(),10)].template="true"),e[parseInt(n.toString(),10)].format&&(e[parseInt(n.toString(),10)].format=i.i(o.getNumberFormat)(this.getFormat(a.format),a.type,!1,this.currencyCode),this.isExcel||"datetime"!==a.type&&"date"!==a.type||(e[parseInt(n.toString(),10)].format=e[parseInt(n.toString(),10)].format.toString().replace("AM/PM","tt")),e[parseInt(n.toString(),10)].type=a.type),e[parseInt(n.toString(),10)].columns&&this.setHeaderText(e[parseInt(n.toString(),10)].columns,t);for(var s=Object.keys(e[parseInt(n.toString(),10)]),d=0;d<s.length;d++)t.indexOf(s[parseInt(d.toString(),10)])<0&&delete e[parseInt(n.toString(),10)][s[parseInt(d.toString(),10)]]}return e},t.prototype.getFormat=function(e){return"object"==typeof e?i.i(r.isNullOrUndefined)(e.format)?e.skeleton:e.format:e},t.prototype.getModuleName=function(){return"treegrid"},t.prototype.preRender=function(){this.TreeGridLocale(),this.initProperties(),this.defaultLocale={Above:"Above",Below:"Below",Child:"Child",AddRow:"Add Row",ExpandAll:"Expand All",CollapseAll:"Collapse All",RowIndent:"Indent",RowOutdent:"Outdent"},this.l10n=new r.L10n("treegrid",this.defaultLocale,this.locale),this.isSelfReference&&i.i(r.isNullOrUndefined)(this.childMapping)&&(this.childMapping="Children")},t.prototype.sortByColumn=function(e,t,i){this.sortModule&&this.sortModule.sortColumn(e,t,i)},t.prototype.clearSorting=function(){this.sortModule&&this.sortModule.clearSorting()},t.prototype.removeSortColumn=function(e){this.sortModule&&this.sortModule.removeSortColumn(e)},t.prototype.search=function(e){this.grid.search(e)},t.prototype.autoFitColumns=function(e){this.resizeModule.autoFitColumns(e),this.updateColumnModel()},t.prototype.reorderColumns=function(e,t){this.grid.reorderColumns(e,t)},t.prototype.TreeGridLocale=function(){var e=r.L10n.locale,t={};i.i(r.setValue)(this.locale,{},t);var n;n={},n=i.i(o.getObject)(this.locale,e);var a;a={},a=i.i(o.getObject)(this.getModuleName(),n),i.i(r.setValue)("grid",a,i.i(o.getObject)(this.locale,t)),r.L10n.load(t)},t.prototype.print=function(){this.printModule.print()},t.prototype.treeGridkeyActionHandler=function(e){if(this.allowKeyboard){var t=void 0,n=void 0,o=void 0,a=void 0,s=void 0;switch(e.action){case"ctrlDownArrow":this.expandAll();break;case"ctrlUpArrow":this.collapseAll();break;case"ctrlShiftUpArrow":t=e.target,o=t.closest(".e-rowcell"),i.i(r.isNullOrUndefined)(o)||(a=o.closest("tr"),i.i(r.isNullOrUndefined)(a)||i.i(r.isNullOrUndefined)(a.getElementsByClassName("e-treegridexpand")[0])||this.expandCollapseRequest(a.querySelector(".e-treegridexpand")));break;case"ctrlShiftDownArrow":t=e.target,o=t.closest(".e-rowcell"),i.i(r.isNullOrUndefined)(o)||(a=o.closest("tr"),i.i(r.isNullOrUndefined)(a)||i.i(r.isNullOrUndefined)(a.getElementsByClassName("e-treegridcollapse")[0])||this.expandCollapseRequest(a.querySelector(".e-treegridcollapse")));break;case"downArrow":if(!this.enableVirtualization){t=e.target,n=t.parentElement;var d=n.cellIndex;if("dropdownedit"===this.grid.getColumnByIndex(d).editType&&i.i(r.isNullOrUndefined)(this.grid.getColumnByIndex(d).edit.obj)&&(n=t),null!==(s=this.findnextRowElement(n))){var l=s.rowIndex;this.selectRow(l);var p=e.target.cellIndex,c=s.children[parseInt(p.toString(),10)];i.i(r.addClass)([c],"e-focused"),i.i(r.addClass)([c],"e-focus")}else this.clearSelection()}break;case"upArrow":if(!this.enableVirtualization){t=e.target,n=t.parentElement;var d=n.cellIndex;if("dropdownedit"===this.grid.getColumnByIndex(d).editType&&i.i(r.isNullOrUndefined)(this.grid.getColumnByIndex(d).edit.obj)&&(n=t),null!==(s=this.findPreviousRowElement(n))){var h=s.rowIndex;this.selectRow(h);var u=e.target.cellIndex,g=s.children[parseInt(u.toString(),10)];i.i(r.addClass)([g],"e-focused"),i.i(r.addClass)([g],"e-focus")}else this.clearSelection()}}}},t.prototype.findnextRowElement=function(e){var t=e.nextElementSibling;return null===t||-1===t.className.indexOf("e-summaryrow")&&"none"!==t.style.display||(t=this.findnextRowElement(t)),t},t.prototype.findPreviousRowElement=function(e){var t=e.previousElementSibling;return null===t||-1===t.className.indexOf("e-summaryrow")&&"none"!==t.style.display||(t=this.findPreviousRowElement(t)),t},t.prototype.initProperties=function(){this.defaultLocale={},this.flatData=[],this.infiniteScrollData=[],this.remoteCollapsedData=[],this.remoteExpandedData=[],this.parentData=[],this.columnModel=[],this.isExpandAll=!1,this.isCollapseAll=!1,this.keyConfigs={ctrlDownArrow:"ctrl+downarrow",ctrlUpArrow:"ctrl+uparrow",ctrlShiftUpArrow:"ctrl+shift+uparrow",ctrlShiftDownArrow:"ctrl+shift+downarrow",downArrow:"downArrow",upArrow:"upArrow"},this.isLocalData=!(this.dataSource instanceof y.DataManager)||this.dataSource.dataSource.offline||!i.i(r.isNullOrUndefined)(this.dataSource.ready)||this.dataSource.adaptor instanceof y.RemoteSaveAdaptor,this.isSelfReference=!i.i(r.isNullOrUndefined)(this.parentIdMapping)},t.prototype.wireEvents=function(){r.EventHandler.add(this.grid.element,"click",this.mouseClickHandler,this),r.EventHandler.add(this.element,"touchend",this.mouseClickHandler,this),r.EventHandler.add(this.element,"mousemove",this.mouseMoveHandler,this),this.keyboardModule=new r.KeyboardEvents(this.element,{keyAction:this.treeGridkeyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.allowKeyboard&&(this.element.tabIndex=-1===this.element.tabIndex?0:this.element.tabIndex)},t.prototype.requiredModules=function(){var e=[];if(this.grid.splitFrozenCount(this.getColumns()),this.isDestroyed)return e;e.push({member:"filter",args:[this,this.filterSettings]}),i.i(r.isNullOrUndefined)(this.toolbar)||e.push({member:"toolbar",args:[this]}),this.contextMenuItems&&e.push({member:"contextMenu",args:[this]}),this.allowPaging&&e.push({member:"pager",args:[this,this.pageSettings]}),this.allowReordering&&e.push({member:"reorder",args:[this]}),this.allowSorting&&e.push({member:"sort",args:[this]}),this.aggregates.length>0&&e.push({member:"summary",args:[this]}),e.push({member:"resize",args:[this]}),this.allowExcelExport&&e.push({member:"ExcelExport",args:[this]});var t=this.injectedModules.filter(function(e){return"freeze"===e.prototype.getModuleName()});return(this.frozenColumns||this.frozenRows||this.getFrozenColumns()||this.grid.getFrozenLeftColumnsCount()||this.grid.getFrozenRightColumnsCount()||t.length)&&e.push({member:"freeze",args:[this]}),this.detailTemplate&&e.push({member:"detailRow",args:[this]}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this]}),this.showColumnMenu&&e.push({member:"columnMenu",args:[this]}),this.showColumnChooser&&e.push({member:"ColumnChooser",args:[this]}),this.extendRequiredModules(e),e},t.prototype.extendRequiredModules=function(e){var t=this.injectedModules.filter(function(e){return"rowDragAndDrop"===e.prototype.getModuleName()});(this.allowRowDragAndDrop||t.length)&&(i.i(r.isNullOrUndefined)(this.toolbar)||!this.toolbar.includes("Indent")&&!this.toolbar.includes("Outdent")||(this.isIndentEnabled=!0),e.push({member:"rowDragAndDrop",args:[this]})),(this.editSettings.allowAdding||this.editSettings.allowDeleting||this.editSettings.allowEditing)&&e.push({member:"edit",args:[this]}),this.isCommandColumn(this.columns)&&e.push({member:"commandColumn",args:[this]}),this.allowSelection&&e.push({member:"selection",args:[this]}),this.enableVirtualization&&e.push({member:"virtualScroll",args:[this]}),this.enableInfiniteScrolling&&e.push({member:"infiniteScroll",args:[this]}),e.push({member:"logger",args:[this.grid]})},t.prototype.isCommandColumn=function(e){var t=this;return e.some(function(e){return e.columns?t.isCommandColumn(e.columns):!(!e.commands&&!e.commandsTemplate)})},t.prototype.unwireEvents=function(){this.grid&&this.grid.element&&r.EventHandler.remove(this.grid.element,"click",this.mouseClickHandler)},t.prototype.log=function(e,t){this.loggerModule&&this.loggerModule.treeLog(e,t,this)},t.prototype.render=function(){var e=this;this.isReact&&(this.grid.isReact=!0,this.grid.portals=[]),this.isVue&&(this.grid.isVue=!0,this.grid.vueInstance=this.vueInstance),i.i(m.createSpinner)({target:this.element},this.createElement),this.log(["mapping_fields_missing"]),this.renderModule=new S.a(this),this.dataModule=new I.a(this),this.printModule=new h.a(this),this.trigger(u.K),this.autoGenerateColumns(),this.initialRender=!0,i.i(r.isNullOrUndefined)(this.dataSource)||this.convertTreeData(this.dataSource),this.loadGrid(),this.element.classList.contains("e-treegrid")&&this.rowDropSettings.targetID&&(this.grid.rowDropSettings.targetID+="_gridcontrol"),this.addListener();var t=i.i(r.createElement)("div",{id:this.element.id+"_gridcontrol"});i.i(r.addClass)([this.element],"e-treegrid"),i.i(r.isNullOrUndefined)(this.height)||"string"!=typeof this.height||-1===this.height.indexOf("%")||(this.element.style.height=this.height),i.i(r.isNullOrUndefined)(this.width)||"string"!=typeof this.width||-1===this.width.indexOf("%")||(this.element.style.width=this.width),this.element.appendChild(t);var n=this.grid.requiredModules;this.grid.requiredModules=function(){var e=[];e=n.apply(this);for(var t=0;t<e.length;t++)"virtualscroll"===e[parseInt(t.toString(),10)].member&&(e[parseInt(t.toString(),10)].member="treeVirtualScroll");return e};this.grid.root=this.root?this.root:this,this.grid.appendTo(t),this.element.getElementsByClassName("e-gridcontent")[0].childNodes[0].setAttribute("tabindex","0"),this.element.getElementsByClassName("e-content")[0].querySelector(".e-table").setAttribute("role","treegrid"),this.isIndentEnabled&&this.refreshToolbarItems(),this.wireEvents(),this.renderComplete();var o=this.grid.destroyTemplate;this.grid.destroyTemplate=function(t,n){o.apply(e.grid);e.isReact&&i.i(r.isNullOrUndefined)(e.portals)||e.clearTemplate(t,n)}},t.prototype.refreshToolbarItems=function(){var e=this.toolbarModule.getToolbar(),t=this.element.id+"_gridcontrol_indent",i=this.element.id+"_gridcontrol_outdent",r=e.querySelector("#"+t).parentElement,n=e.querySelector("#"+i).parentElement;r.classList.add("e-hidden"),n.classList.add("e-hidden")},t.prototype.afterGridRender=function(){i.i(r.isNullOrUndefined)(this.grid.clipboardModule)||this.grid.clipboardModule.destroy(),this.clipboardModule=this.grid.clipboardModule=new p.a(this,this.grid.serviceLocator)},t.prototype.convertTreeData=function(e){var t=this;if(i.i(v.b)(this)&&(e=i.i(r.getValue)("result",e)),e instanceof Array&&e.length>0&&Object.prototype.hasOwnProperty.call(e[0],"level"))this.flatData=e,this.flatData.filter(function(e){i.i(r.setValue)("uniqueIDCollection."+e.uniqueID,e,t),0===e.level&&t.parentData.push(e)});else if(i.i(v.b)(this)){var n=i.i(r.getValue)("result",this.dataSource);this.dataModule.convertToFlatData(n)}else this.dataModule.convertToFlatData(e)},t.prototype.bindGridProperties=function(){this.bindedDataSource(),this.grid.enableRtl=this.enableRtl,this.grid.allowKeyboard=this.allowKeyboard,this.grid.columns=this.getGridColumns(this.columns),this.grid.allowExcelExport=this.allowExcelExport,this.grid.allowPdfExport=this.allowPdfExport,this.grid.query=this.query,this.grid.columnQueryMode=this.columnQueryMode,this.grid.allowPaging=this.allowPaging,this.grid.pageSettings=i.i(o.getActualProperties)(this.pageSettings),this.grid.pagerTemplate=this.pagerTemplate,this.grid.showColumnMenu=this.showColumnMenu,this.grid.allowSorting=this.allowSorting,this.grid.allowFiltering=this.allowFiltering,this.grid.enableVirtualization=this.enableVirtualization,this.grid.enableColumnVirtualization=this.enableColumnVirtualization,this.grid.enableInfiniteScrolling=this.enableInfiniteScrolling,this.grid.infiniteScrollSettings=this.infiniteScrollSettings,this.grid.enableVirtualMaskRow=this.enableVirtualMaskRow,this.grid.loadingIndicator=this.loadingIndicator,this.grid.width=this.width,this.grid.height=this.height,this.grid.enableAltRow=this.enableAltRow,this.grid.allowReordering=this.allowReordering,this.grid.allowTextWrap=this.allowTextWrap,this.grid.allowResizing=this.allowResizing,this.grid.enableHover=this.enableHover,this.grid.enableAutoFill=this.enableAutoFill,this.grid.enableAdaptiveUI=this.enableAdaptiveUI,this.grid.enableImmutableMode=this.enableImmutableMode,this.grid.allowRowDragAndDrop=this.allowRowDragAndDrop,this.grid.rowDropSettings=i.i(o.getActualProperties)(this.rowDropSettings),this.grid.rowHeight=this.rowHeight,this.grid.gridLines=this.gridLines,this.grid.allowSelection=this.allowSelection,this.grid.toolbar=i.i(o.getActualProperties)(this.getGridToolbar()),this.grid.toolbarTemplate=this.toolbarTemplate,this.grid.showColumnChooser=this.showColumnChooser,this.grid.filterSettings=i.i(o.getActualProperties)(this.filterSettings),this.grid.selectionSettings=i.i(o.getActualProperties)(this.selectionSettings),this.grid.sortSettings=i.i(o.getActualProperties)(this.sortSettings),this.grid.searchSettings=i.i(o.getActualProperties)(this.searchSettings),this.grid.aggregates=i.i(o.getActualProperties)(this.aggregates),this.grid.textWrapSettings=i.i(o.getActualProperties)(this.textWrapSettings),this.grid.printMode=i.i(o.getActualProperties)(this.printMode),this.grid.locale=i.i(o.getActualProperties)(this.locale),this.grid.selectedRowIndex=this.selectedRowIndex,this.grid.contextMenuItems=i.i(o.getActualProperties)(this.getContextMenu()),this.grid.columnMenuItems=i.i(o.getActualProperties)(this.columnMenuItems),this.grid.editSettings=this.getGridEditSettings(),this.grid.rowTemplate=i.i(o.getActualProperties)(this.rowTemplate),this.grid.detailTemplate=i.i(o.getActualProperties)(this.detailTemplate),this.grid.frozenRows=this.frozenRows,this.grid.frozenColumns=this.frozenColumns,this.grid.clipMode=i.i(o.getActualProperties)(this.clipMode);this.grid.templateDotnetInstance=this.templateDotnetInstance;this.grid.isJsComponent=!0;this.grid.enableHtmlSanitizer=this.enableHtmlSanitizer},t.prototype.triggerEvents=function(e){this.trigger(i.i(o.getObject)("name",e),e)},t.prototype.IsExpandCollapseClicked=function(e){if(!i.i(r.isNullOrUndefined)(e.target)&&(e.target.classList.contains("e-treegridexpand")||e.target.classList.contains("e-treegridcollapse")||e.target.classList.contains("e-summarycell"))&&!this.selectionSettings.checkboxOnly&&(!i.i(r.isNullOrUndefined)(e.data)&&e.data.hasChildRecords||-1!==e.rowIndex&&i.i(r.isNullOrUndefined)(e.data)))return void(e.cancel=!0)},t.prototype.bindGridEvents=function(){var e=this;this.grid.rowSelecting=function(t){e.IsExpandCollapseClicked(t),e.trigger(u.O,t)},this.grid.rowDeselecting=function(t){e.IsExpandCollapseClicked(t),e.trigger(u._13,t)},this.grid.rowSelected=function(t){if(e.enableVirtualization&&t.isHeaderCheckboxClicked&&e.grid.currentViewData.length!==e.grid.selectionModule.selectedRowIndexes.length)for(var i=0;i<e.getRows().length;i++)e.getRows()[parseInt(i.toString(),10)].getElementsByClassName("e-frame e-icons e-uncheck").length&&e.grid.selectionModule.updateRowSelection(e.getRows()[parseInt(i.toString(),10)],e.getCurrentViewRecords()[parseInt(i.toString(),10)].index);e.selectedRowIndex=e.grid.selectedRowIndex,e.notify(u.E,t),e.trigger(u.E,t)},this.grid.rowDeselected=function(t){e.selectedRowIndex=e.grid.selectedRowIndex,i.i(r.isNullOrUndefined)(t.data)||e.notify(u.F,t),e.trigger(u.F,t)},this.grid.resizeStop=function(t){e.updateColumnModel(),e.trigger(u.P,t)},this.grid.excelQueryCellInfo=function(t){e.notify("excelCellInfo",t),t=e.dataResults},this.grid.pdfQueryCellInfo=function(t){e.notify("pdfCellInfo",t),t=e.dataResults},this.grid.checkBoxChange=function(t){e.trigger(u.j,t)},this.grid.pdfExportComplete=this.triggerEvents.bind(this),this.grid.excelExportComplete=this.triggerEvents.bind(this),this.grid.excelHeaderQueryCellInfo=this.triggerEvents.bind(this),this.grid.pdfHeaderQueryCellInfo=this.triggerEvents.bind(this),this.grid.dataSourceChanged=this.triggerEvents.bind(this),this.grid.recordDoubleClick=this.triggerEvents.bind(this),this.grid.cellDeselected=this.triggerEvents.bind(this),this.grid.cellDeselecting=this.triggerEvents.bind(this),this.grid.columnMenuOpen=this.triggerEvents.bind(this),this.grid.columnMenuClick=this.triggerEvents.bind(this),this.grid.cellSelected=this.triggerEvents.bind(this),this.grid.headerCellInfo=this.triggerEvents.bind(this),this.grid.resizeStart=this.triggerEvents.bind(this),this.grid.resizing=this.triggerEvents.bind(this),this.grid.columnDrag=this.triggerEvents.bind(this),this.grid.columnDragStart=this.triggerEvents.bind(this),this.grid.columnDrop=this.triggerEvents.bind(this),this.grid.beforePrint=this.triggerEvents.bind(this),this.grid.beforeCopy=this.triggerEvents.bind(this),this.grid.beforePaste=function(t){for(var i=e.getRows();i[t.rowIndex].classList.contains("e-summaryrow");)t.rowIndex++;e.trigger(u.Y,t)},this.grid.load=function(){if(e.grid.on("initial-end",e.afterGridRender,e),!i.i(r.isNullOrUndefined)(e.loggerModule)){e.loggerModule=e.grid.loggerModule=new l.a(e.grid)}},this.grid.printComplete=this.triggerEvents.bind(this),this.grid.actionFailure=this.triggerEvents.bind(this),this.extendedGridDataBoundEvent(),this.extendedGridEvents(),this.extendedGridActionEvents(),this.extendedGridEditEvents(),this.bindGridDragEvents(),this.bindCallBackEvents()},t.prototype.lastRowBorder=function(e,t){for(var n=0;n<e.cells.length;n++)t?i.i(r.addClass)([e.cells[parseInt(n.toString(),10)]],"e-lastrowcell"):i.i(r.removeClass)([e.cells[parseInt(n.toString(),10)]],"e-lastrowcell")},t.prototype.isPixelHeight=function(){return"auto"!==this.height&&-1===this.height.toString().indexOf("%")},t.prototype.extendedGridDataBoundEvent=function(){var e=this;this.grid.dataBound=function(t){if(e.updateRowTemplate(),e.updateColumnModel(),e.updateAltRow(e.getRows()),e.notify("dataBoundArg",t),i.i(v.a)(e)&&!i.i(v.h)(e)&&!e.hasChildMapping){var n=void 0;n=e.dataResults.result?0:1,i.i(r.setValue)("grid.contentModule.isLoaded",!(n>0),e)}if(e.isPixelHeight()&&e.initialRender)for(var o=e.getContentTable().rows,a=[].slice.call(o),s=a.length-1;s>0;s--)if(!i.i(v.l)(a[parseInt(s.toString(),10)])){a[parseInt(s.toString(),10)].nextElementSibling&&e.lastRowBorder(a[parseInt(s.toString(),10)],!0);break}if(e.enableVirtualization&&e.selectionSettings.persistSelection&&("expand"===e.dataResults.action||"collapse"===e.dataResults.action)){if(e.grid.selectionModule.refreshPersistSelection(),"Single"===e.grid.selectionSettings.type){var d=e.getCurrentViewRecords().indexOf(e.grid.selectionModule.data);e.grid.selectionModule.updateRowSelection(e.getRows()[parseInt(d.toString(),10)],d)}}e.trigger(u.L,t),e.initialRender=!1};var t=this;this.grid.beforeDataBound=function(e){var n=i.i(o.getObject)("action",e);if((i.i(v.a)(t)&&!i.i(v.h)(t)||i.i(v.b)(this))&&"edit"!==n)t.notify("updateRemoteLevel",e),e=t.dataResults;else if(0===t.flatData.length&&i.i(v.h)(t)&&t.dataSource instanceof y.DataManager){var a=t.dataSource;t.dataModule.convertToFlatData(a.dataSource.json),e.result=t.grid.dataSource.dataSource.json=t.flatData}if(i.i(v.a)(t)||i.i(v.b)(this)||i.i(r.isNullOrUndefined)(t.dataSource)||(this.isPrinting&&i.i(r.setValue)("isPrinting",!0,e),t.notify("dataProcessor",e)),i.i(r.extend)(e,t.dataResults),t.enableImmutableMode&&(e.result=e.result.slice()),t.initialRender&&(this.contentModule.objectEqualityChecker=t.objectEqualityChecker),!this.isPrinting){var s=new y.Deferred;return t.trigger(u.M,e,function(e){s.resolve(e)}),s}},this.grid.log=function(t,i){e.loggerModule&&e.loggerModule.log(t,i)}},t.prototype.bindCallBackEvents=function(){var e=this;this.grid.toolbarClick=function(t){if(!(t.item.id===e.grid.element.id+"_excelexport"&&!1===e.allowExcelExport||t.item.id===e.grid.element.id+"_pdfexport"&&!1===e.allowPdfExport||t.item.id===e.grid.element.id+"_csvexport"&&!1===e.allowExcelExport)){var i=new y.Deferred;return e.trigger(u.G,t,function(r){r.cancel||e.notify(u.G,t),i.resolve(r)}),i}},this.grid.cellSelecting=function(t){var n=e.grid.selectionModule.actualTarget;i.i(r.isNullOrUndefined)(n)||!n.classList.contains("e-treegridexpand")&&!n.classList.contains("e-treegridcollapse")||(t.cancel=!0);var a=new y.Deferred;return e.trigger(i.i(o.getObject)("name",t),t,function(e){a.resolve(e)}),a},this.grid.beginEdit=function(t){if(!i.i(r.isNullOrUndefined)(t.row)&&t.row.classList.contains("e-summaryrow"))return void(t.cancel=!0);var n=new y.Deferred;return e.trigger(u.l,t,function(e){n.resolve(e)}),n}},t.prototype.extendedGridEditEvents=function(){var e=this;this.grid.dataStateChange=function(t){e.isExpandRefresh?(e.isExpandRefresh=!1,e.grid.dataSource={result:e.flatData,count:i.i(r.getValue)("count",e.grid.dataSource)}):("infiniteScroll"!==t.action.requestType&&(e.infiniteScrollData=[]),e.trigger(u.N,t))},this.grid.cellSave=function(t){if(e.grid.isContextMenuOpen()){var n=e.grid.contextMenuModule.contextMenu.element.getElementsByClassName("e-selected")[0];(i.i(r.isNullOrUndefined)(n)||n.id!==e.element.id+"_gridcontrol_cmenu_Save")&&(t.cancel=!0)}var o=new y.Deferred;return e.trigger(u.o,t,function(t){t.cancel||e.notify(u.o,t),o.resolve(t)}),o},this.grid.cellSaved=function(t){e.trigger(u.x,t),e.notify(u.x,t)},this.grid.cellEdit=function(t){var i=new y.Deferred;return t.promise=i,e.notify(u.r,t),i},this.grid.batchAdd=function(t){e.trigger(u.y,t),e.notify(u.y,t)},this.grid.beforeBatchSave=function(t){e.trigger(u.B,t),e.notify(u.B,t)},this.grid.beforeBatchAdd=function(t){e.trigger(u.z,t),e.notify(u.z,t)},this.grid.batchDelete=function(t){e.trigger(u._0,t),e.notify(u._0,t)},this.grid.beforeBatchDelete=function(t){e.trigger(u.A,t),e.notify(u.A,t)},this.grid.batchCancel=function(t){"Cell"!==e.editSettings.mode&&e.trigger(u.p,t),e.notify(u.p,t)}},t.prototype.updateRowTemplate=function(){var e=this;this.rowTemplate&&(this.isReact&&0===this.getContentTable().rows.length?setTimeout(function(){if(e.treeColumnRowTemplate(),e.enableCollapseAll)for(var t=e.getCurrentViewRecords(),i=e.getContentTable().rows,r=0;r<i.length;r++){var n={data:t[parseInt(r.toString(),10)],row:i[parseInt(r.toString(),10)]};e.renderModule.RowModifier(n)}},0):this.treeColumnRowTemplate())},t.prototype.bindedDataSource=function(){if(this.dataSource&&i.i(v.b)(this)){var e=this.flatData,t=i.i(r.getValue)("count",this.dataSource);this.grid.dataSource={result:e,count:t}}else this.grid.dataSource=this.dataSource instanceof y.DataManager?new y.DataManager(this.dataSource.dataSource,this.dataSource.defaultQuery,this.dataSource.adaptor):this.flatData;if(this.dataSource instanceof y.DataManager&&(this.dataSource.dataSource.offline||this.dataSource.ready)){this.grid.dataSource.dataSource.json=i.i(v.i)(this.dataSource.dataSource.json),this.grid.dataSource.ready=this.dataSource.ready;var n=this;i.i(r.isNullOrUndefined)(this.grid.dataSource.ready)||this.grid.dataSource.ready.then(function(e){var t=n.grid.dataSource;t.dataSource.offline=!0,t.isDataAvailable=!0,t.dataSource.json=e.result,t.adaptor=new y.JsonAdaptor})}},t.prototype.extendedGridActionEvents=function(){var e=this;this.grid.actionBegin=function(t){if("sorting"===t.requestType&&t.target&&t.target.parentElement&&t.target.parentElement.classList.contains("e-hierarchycheckbox")&&(t.cancel=!0),"reorder"===i.i(o.getObject)("requestType",t)&&e.notify("getColumnIndex",{}),i.i(v.a)(e)&&e.enableVirtualization&&("virtualscroll"===t.requestType?(e.query.expand("VirtualScrollingAction"),e.showSpinner()):"searching"===t.requestType&&""===t.searchString?e.query.expand("ClearSearchingAction"):"clearFilter"===t.action&&e.query.expand("ClearFilteringAction")),e.notify("actionBegin",{editAction:t}),i.i(v.a)(e)||i.i(r.isNullOrUndefined)(e.filterModule)||i.i(v.b)(e)||0!==e.grid.filterSettings.columns.length||0!==e.grid.searchSettings.key.length||(e.notify("clearFilters",{flatData:e.grid.dataSource}),e.grid.setProperties({dataSource:e.dataResults.result},!0),i.i(r.isNullOrUndefined)(e.grid.changedProperties.dataSource)&&(e.grid.renderModule.data.dataManager=e.grid.dataSource instanceof y.DataManager?e.grid.dataSource:i.i(r.isNullOrUndefined)(e.grid.dataSource)?new y.DataManager:new y.DataManager(e.grid.dataSource),e.grid.renderModule.data.isQueryInvokedFromData=!0,e.grid.query=e.grid.query instanceof y.Query?e.grid.query:new y.Query)),"indenting"!==e.action&&"outdenting"!==e.action){var n=new y.Deferred;return e.trigger(u.v,t,function(t){t.cancel||e.notify(u.l,t),n.resolve(t)}),n}},this.grid.actionComplete=function(t){if(e.notify("actioncomplete",t),e.updateColumnModel(),e.updateTreeGridModel(),"reorder"===t.requestType&&e.notify("setColumnIndex",{}),e.notify("actionComplete",{editAction:t}),"add"===t.requestType&&"Top"!==e.editSettings.newRowPosition&&"Bottom"!==e.editSettings.newRowPosition&&e.notify(u.m,t),"batchsave"===t.requestType&&e.notify(u.w,t),e.notify("updateGridActions",t),"save"===t.requestType&&e.aggregates.map(function(e){return!0===e.showChildSummary}).length&&e.grid.refresh(),"filter"===t.action&&(""===e.filterModule.currentFilterObject||!e.enableVirtualization||e.initialRender||i.i(v.a)(e)&&e.enableVirtualization||e.expandAll()),"searching"===t.requestType&&(""===e.searchSettings.key||!e.enableVirtualization||e.initialRender||i.i(v.a)(e)&&e.enableVirtualization||e.expandAll()),"clearFilter"===t.action&&e.enableCollapseAll&&e.collapseAll(),"indenting"===e.action||"outdenting"===e.action){e.action="indenting"===e.action?"indented":"outdented";var r=[e.selectedRecords],n={data:r,dropIndex:e.dropIndex,dropPosition:e.dropPosition,modifiedRecords:e.modifiedRecords,requestType:e.action,row:e.selectedRows};e.trigger(u.h,n);e.getCurrentViewRecords().filter(function(e){return e.uniqueID===r[0].uniqueID}).length||e.refreshToolbarItems(),e.action="",e.selectedRecords=e.selectedRows=e.modifiedRecords=[]}else{if(e.grid.isFrozenGrid()&&e.enableVirtualization&&"movable"===t.tableName){var o=e.grid.element.querySelector("."+u._15),a=e.grid.element.querySelector("."+u._17);o.style.height=a.style.height="auto"}e.trigger(u.h,t)}}},t.prototype.extendedGridEvents=function(){var e=this,t=this;this.grid.recordDoubleClick=function(t){e.trigger(u.n,t),e.notify(u.n,t)},this.grid.detailDataBound=function(t){e.notify("detaildataBound",t),e.trigger(u._4,t)},this.grid.rowDataBound=function(e){i.i(r.isNullOrUndefined)(this.isPrinting)?i.i(r.setValue)("isPrinting",!1,e):i.i(r.setValue)("isPrinting",this.isPrinting,e),t.renderModule.RowModifier(e)},this.grid.queryCellInfo=function(e){i.i(r.isNullOrUndefined)(this.isPrinting)?i.i(r.setValue)("isPrinting",!1,e):i.i(r.setValue)("isPrinting",this.isPrinting,e),t.renderModule.cellRender(e)},this.grid.contextMenuClick=function(t){e.notify(u.X,t),e.trigger(u.X,t)},this.grid.contextMenuOpen=function(t){e.notify(u.W,t),e.trigger(u.W,t)},this.grid.queryCellInfo=function(t){e.renderModule.cellRender(t)}},t.prototype.bindGridDragEvents=function(){var e=this;this.grid.rowDragStartHelper=function(t){e.trigger(u._6,t)},this.grid.rowDragStart=function(t){e.trigger(u._8,t)},this.grid.rowDrag=function(t){if(e.grid.isEdit)return void(t.cancel=!0);e.notify(u._11,t),e.trigger(u._5,t)},this.grid.rowDrop=function(t){if(e.grid.isEdit)return void(t.cancel=!0);e.notify(u._12,t),t.cancel=!0}},t.prototype.loadGrid=function(){this.bindGridProperties(),this.bindGridEvents(),i.i(r.setValue)("registeredTemplate",this.registeredTemplate,this.grid);i.i(r.setValue)("viewContainerRef",this.viewContainerRef,this.grid)},t.prototype.autoGenerateColumns=function(){if(!this.columns.length&&!this.dataModule.isRemote()&&Object.keys(this.dataSource).length){this.columns=[];for(var e=this.dataSource[0],t=Object.keys(e),i=0;i<t.length;i++)-1===[this.childMapping,this.parentIdMapping].indexOf(t[parseInt(i.toString(),10)])&&this.columns.push(t[parseInt(i.toString(),10)])}},t.prototype.getGridEditSettings=function(){var e={};switch(e.allowAdding=this.editSettings.allowAdding,e.allowEditing=this.editSettings.allowEditing,e.allowDeleting=this.editSettings.allowDeleting,e.newRowPosition="Bottom"===this.editSettings.newRowPosition?"Bottom":"Top",e.allowEditOnDblClick=this.editSettings.allowEditOnDblClick,e.showConfirmDialog=this.editSettings.showConfirmDialog,e.template=this.editSettings.template,e.showDeleteConfirmDialog=this.editSettings.showDeleteConfirmDialog,e.allowNextRowEdit=this.editSettings.allowNextRowEdit,e.guid=this.editSettings.guid,e.dialog=this.editSettings.dialog,this.editSettings.mode){case"Dialog":case"Batch":e.mode=this.editSettings.mode;break;case"Row":e.mode="Normal";break;case"Cell":e.mode="Normal",e.showConfirmDialog=!1}return e},t.prototype.getContextMenu=function(){if(this.contextMenuItems){for(var e=[],t=0;t<this.contextMenuItems.length;t++)switch(this.contextMenuItems[parseInt(t.toString(),10)]){case"AddRow":case w.b.AddRow:e.push({text:this.l10n.getConstant("AddRow"),target:".e-content",id:this.element.id+"_gridcontrol_cmenu_AddRow",items:[{text:this.l10n.getConstant("Above"),id:"Above"},{text:this.l10n.getConstant("Below"),id:"Below"},{text:this.l10n.getConstant("Child"),id:"Child"}]});break;case"Indent":case w.b.RowIndent:e.push({text:this.l10n.getConstant("RowIndent"),target:".e-content",iconCss:"e-indent e-icons",id:this.element.id+"_gridcontrol_cmenu_Indent"});break;case"Outdent":case w.b.RowOutdent:e.push({text:this.l10n.getConstant("RowOutdent"),target:".e-content",iconCss:"e-outdent e-icons",id:this.element.id+"_gridcontrol_cmenu_Outdent"});break;default:e.push(this.contextMenuItems[parseInt(t.toString(),10)])}return e}return null},t.prototype.getGridToolbar=function(){if(this.toolbar){this.l10n=new r.L10n("treegrid",this.defaultLocale,this.locale);for(var e=[],t=void 0,i=0;i<this.toolbar.length;i++)switch(this.toolbar[parseInt(i.toString(),10)]){case"Search":case w.a.Search:e.push("Search");break;case"Print":case w.a.Print:e.push("Print");break;case"ExpandAll":case w.a.ExpandAll:t=this.l10n.getConstant("ExpandAll"),e.push({text:t,tooltipText:t,prefixIcon:"e-expand",id:this.element.id+"_gridcontrol_expandall"});break;case"CollapseAll":case w.a.CollapseAll:t=this.l10n.getConstant("CollapseAll"),e.push({text:t,tooltipText:t,prefixIcon:"e-collapse",id:this.element.id+"_gridcontrol_collapseall"});break;case"Indent":case w.a.RowIndent:t=this.l10n.getConstant("RowIndent"),e.push({text:t,tooltipText:t,prefixIcon:"e-indent",id:this.element.id+"_gridcontrol_indent"});break;case"Outdent":case w.a.RowOutdent:t=this.l10n.getConstant("RowOutdent"),e.push({text:t,tooltipText:t,prefixIcon:"e-outdent",id:this.element.id+"_gridcontrol_outdent"});break;default:e.push(this.toolbar[parseInt(i.toString(),10)])}return e}return null},t.prototype.getGridColumns=function(e,t,o){void 0===t&&(t=!0),void 0===o&&(o=0);var a=e;t&&(this.columnModel=[]);var s,d;0===this.columnModel.length&&(o=0===o?-1:o);for(var l=[],p=0;p<a.length;p++){o+=1;var c=this.grid.getColumnByUid(a[parseInt(p.toString(),10)].uid);if(d=c||{},s={},"string"==typeof this.columns[parseInt(p.toString(),10)])d.field=s.field=this.columns[parseInt(p.toString(),10)];else for(var h=0,u=Object.keys(a[parseInt(p.toString(),10)]);h<u.length;h++){var g=u[h];o===this.treeColumnIndex&&"template"===g?s[""+g]=a[parseInt(p.toString(),10)][""+g]:"columns"!==g||i.i(r.isNullOrUndefined)(a[parseInt(p.toString(),10)][""+g])?this.initialRender&&!i.i(r.isNullOrUndefined)(c)&&this.enablePersistence&&"edit"===g?d[""+g]=s[""+g]=c[""+g]:c&&"sortComparer"===g||(d[""+g]=s[""+g]=a[parseInt(p.toString(),10)][""+g]):(d[""+g]=this.getGridColumns(a[parseInt(p.toString(),10)][""+g],!1,this.columnModel.length-1),s[""+g]=a[parseInt(p.toString(),10)][""+g])}s.columns||this.columnModel.push(new n.a(s)),l.push(d),!i.i(r.isNullOrUndefined)(this.columnModel[this.treeColumnIndex])&&this.enableRtl&&d.field===this.columnModel[this.treeColumnIndex].field&&(i.i(r.isNullOrUndefined)(this.treeColumnTextAlign)&&(this.treeColumnTextAlign=this.columnModel[this.treeColumnIndex].textAlign,this.treeColumnField=this.columnModel[this.treeColumnIndex].field),d.textAlign="Right")}return l},t.prototype.onPropertyChanged=function(e){for(var t=Object.keys(e),n=!1,a=0,s=t;a<s.length;a++){var d=s[a];switch(d){case"treeColumnIndex":this.grid.refreshColumns();break;case"allowPaging":this.grid.allowPaging=this.allowPaging;break;case"pageSettings":this.grid.pageSettings=i.i(o.getActualProperties)(this.pageSettings),n=!0;break;case"enableVirtualization":this.grid.enableVirtualization=this.enableVirtualization;break;case"enableColumnVirtualization":this.grid.enableColumnVirtualization=this.enableColumnVirtualization;break;case"toolbar":this.grid.toolbar=this.getGridToolbar();break;case"allowSelection":this.grid.allowSelection=this.allowSelection;break;case"selectionSettings":this.grid.selectionSettings=i.i(o.getActualProperties)(this.selectionSettings);break;case"allowSorting":this.grid.allowSorting=this.allowSorting;break;case"allowMultiSorting":this.grid.allowMultiSorting=this.allowMultiSorting;break;case"sortSettings":this.grid.sortSettings=i.i(o.getActualProperties)(this.sortSettings);break;case"searchSettings":this.grid.searchSettings=i.i(o.getActualProperties)(this.searchSettings);break;case"allowFiltering":this.grid.allowFiltering=this.allowFiltering;break;case"filterSettings":this.initialRender||(this.grid.filterSettings=i.i(o.getActualProperties)(this.filterSettings));break;case"showColumnMenu":this.grid.showColumnMenu=this.showColumnMenu;break;case"allowRowDragAndDrop":this.grid.allowRowDragAndDrop=this.allowRowDragAndDrop;break;case"aggregates":this.grid.aggregates=i.i(o.getActualProperties)(this.aggregates);break;case"enableInfiniteScrolling":this.grid.enableInfiniteScrolling=this.enableInfiniteScrolling;break;case"dataSource":if(this.isLocalData=!(this.dataSource instanceof y.DataManager)||!i.i(r.isNullOrUndefined)(this.dataSource.ready)||this.dataSource.adaptor instanceof y.RemoteSaveAdaptor,this.convertTreeData(this.dataSource),this.isLocalData){if(i.i(v.b)(this)){var l=i.i(r.getValue)("count",this.dataSource);this.grid.dataSource={result:this.flatData,count:l}}else{var p=this.dataSource;this.grid.dataSource=p instanceof y.DataManager?new y.DataManager(p.dataSource,p.defaultQuery,p.adaptor):this.flatData}this.enableVirtualization&&(this.grid.contentModule.isDataSourceChanged=!0)}else this.bindedDataSource(),this.enableVirtualization&&(this.grid.contentModule.removeEventListener(),this.grid.contentModule.eventListener("on"),this.grid.contentModule.renderTable());break;case"query":this.grid.query=this.query;break;case"enableCollapseAll":e[""+d]?this.collapseAll():this.expandAll();break;case"expandStateMapping":this.grid.refresh();break;case"gridLines":this.grid.gridLines=this.gridLines;break;case"rowTemplate":this.grid.rowTemplate=i.i(o.getActualProperties)(this.rowTemplate);break;case"frozenRows":this.grid.frozenRows=this.frozenRows;break;case"frozenColumns":this.grid.frozenColumns=this.frozenColumns;break;case"rowHeight":this.grid.rowHeight=this.rowHeight;break;case"height":i.i(r.isNullOrUndefined)(this.height)||"string"!=typeof this.height||-1===this.height.indexOf("%")||(this.element.style.height=this.height),this.grid.height=this.height;break;case"width":i.i(r.isNullOrUndefined)(this.width)||"string"!=typeof this.width||-1===this.width.indexOf("%")||(this.element.style.width=this.width),this.grid.width=this.width;break;case"locale":this.grid.locale=this.locale,this.TreeGridLocale(),this.grid.toolbar=this.getGridToolbar(),this.grid.contextMenuItems=this.getContextMenu();break;case"selectedRowIndex":this.grid.selectedRowIndex=this.selectedRowIndex;break;case"enableAltRow":this.grid.enableAltRow=this.enableAltRow;break;case"enableHover":this.grid.enableHover=this.enableHover;break;case"enableAutoFill":this.grid.enableAutoFill=this.enableAutoFill;break;case"enableAdaptiveUI":this.grid.enableAdaptiveUI=this.enableAdaptiveUI;break;case"enableImmutableMode":this.grid.enableImmutableMode=this.enableImmutableMode;break;case"allowExcelExport":this.grid.allowExcelExport=this.allowExcelExport;break;case"allowPdfExport":this.grid.allowPdfExport=this.allowPdfExport;break;case"enableRtl":i.i(r.isNullOrUndefined)(this.treeColumnField)||this.updateTreeColumnTextAlign(),this.grid.enableRtl=this.enableRtl;break;case"allowReordering":this.grid.allowReordering=this.allowReordering;break;case"allowResizing":this.grid.allowResizing=this.allowResizing;break;case"textWrapSettings":this.grid.textWrapSettings=i.i(o.getActualProperties)(this.textWrapSettings);break;case"allowTextWrap":this.grid.allowTextWrap=i.i(o.getActualProperties)(this.allowTextWrap),this.grid.refresh();break;case"contextMenuItems":this.grid.contextMenuItems=this.getContextMenu();break;case"showColumnChooser":this.grid.showColumnChooser=this.showColumnChooser;break;case"detailTemplate":this.grid.detailTemplate=i.i(o.getActualProperties)(this.detailTemplate);break;case"columnMenuItems":this.grid.columnMenuItems=i.i(o.getActualProperties)(this.columnMenuItems);break;case"editSettings":this.grid.isEdit&&"Normal"===this.grid.editSettings.mode&&e[""+d].mode&&("Cell"===e[""+d].mode||"Row"===e[""+d].mode)&&this.grid.closeEdit(),this.grid.editSettings=this.getGridEditSettings()}n&&this.grid.refresh()}},t.prototype.updateTreeColumnTextAlign=function(){this.grid.getColumnByField(this.treeColumnField).textAlign=this.enableRtl?"Right":this.treeColumnTextAlign,this.grid.refreshColumns()},t.prototype.destroy=function(){var t=this.element;if(t){var i=!(!t.querySelector(".e-gridheader")||!t.querySelector(".e-gridcontent"));i&&this.unwireEvents(),this.removeListener(),i&&e.prototype.destroy.call(this),this.grid&&this.grid.destroy(),this.dataModule&&this.dataModule.destroy();for(var r=["dataModule","sortModule","renderModule","filterModule","printModule","clipboardModule","excelExportModule","pdfExportModule","toolbarModule","summaryModule","reorderModule","resizeModule","pagerModule","keyboardModule","columnMenuModule","contextMenuModule","editModule","virtualScrollModule","selectionModule","detailRow","rowDragAndDropModule","freezeModule"],n=0;n<r.length;n++)this[r[parseInt(n.toString(),10)]]&&(this[r[parseInt(n.toString(),10)]]=null);this.element.innerHTML="",this.grid=null}},t.prototype.dataBind=function(){i.i(r.isNullOrUndefined)(this.grid)||(!i.i(r.isNullOrUndefined)(this.rowDropSettings.targetID)&&i.i(r.isNullOrUndefined)(document.getElementById(this.grid.rowDropSettings.targetID))&&(document.getElementById(this.rowDropSettings.targetID).id=this.grid.rowDropSettings.targetID,this.rowDropSettings.targetID=this.grid.rowDropSettings.targetID),e.prototype.dataBind.call(this),this.grid.dataBind())},t.prototype.getPersistData=function(){for(var e=["pageSettings","sortSettings","filterSettings","columns","searchSettings","selectedRowIndex","treeColumnIndex"],t={pageSettings:["template","pageSizes","pageSizeMode","enableQueryString","totalRecordsCount","pageCount"],filterSettings:["type","mode","showFilterBarStatus","immediateModeDelay","ignoreAccent","hierarchyMode"],searchSettings:["fields","operator","ignoreCase"],sortSettings:[],columns:[],selectedRowIndex:[]},n=["filter","edit","filterBarTemplate","headerTemplate","template","commandTemplate","commands","dataSource"],o=0;o<e.length;o++)for(var a=this[e[parseInt(o.toString(),10)]],s=0,d=t[e[parseInt(o.toString(),10)]];!i.i(r.isNullOrUndefined)(d)&&s<d.length;s++){var l=d[parseInt(s.toString(),10)];delete a[""+l]}return this.ignoreInArrays(n,this.columns),this.addOnPersist(e)},t.prototype.ignoreInArrays=function(e,t){for(var i=0;i<t.length;i++)t[parseInt(i.toString(),10)].columns?(this.ignoreInColumn(e,t[parseInt(i.toString(),10)]),this.ignoreInArrays(e,t[parseInt(i.toString(),10)].columns)):this.ignoreInColumn(e,t[parseInt(i.toString(),10)])},t.prototype.ignoreInColumn=function(e,t){if(i.i(r.isNullOrUndefined)(t.template))for(var n=0;n<e.length;n++)delete t[e[parseInt(n.toString(),10)]],t.filter={}},t.prototype.mouseClickHandler=function(e){if(i.i(r.isNullOrUndefined)(e.touches)){var t=e.target;if(!t.classList.contains("e-treegridexpand")&&!t.classList.contains("e-treegridcollapse")||this.isEditCollapse||this.grid.isEdit||this.expandCollapseRequest(t),this.isEditCollapse=!1,this.notify("checkboxSelection",{target:t}),this.grid.isCheckBoxSelection&&!this.grid.isPersistSelection&&this.aggregates.map(function(e){return!0===e.showChildSummary}).length){var n=this.grid.getHeaderContent().querySelector(".e-checkselectall");if(this.grid.getSelectedRowIndexes().length===this.getCurrentViewRecords().length){var o=n.nextElementSibling;i.i(r.removeClass)([o],["e-stop","e-uncheck"]),i.i(r.addClass)([o],["e-check"])}}}},t.prototype.mouseMoveHandler=function(e){var t=!1,r=this.getColumns();"EllipsisWithTooltip"===this.clipMode&&(t=!0);var n=i.i(o.parentsUntil)(e.target,"e-ellipsistooltip");if((t||-1!==this.treeColumnIndex&&"EllipsisWithTooltip"===r[this.treeColumnIndex].clipMode)&&null!==n&&parseInt(n.getAttribute("data-colindex"),10)===this.treeColumnIndex&&n.children[0].scrollWidth>n.children[0].clientWidth){new m.Tooltip({content:n.textContent}).appendTo(n)}},t.prototype.getRows=function(){return this.grid.getRows()},t.prototype.getPager=function(){return this.grid.getPager()},t.prototype.addRecord=function(e,t,i){if(this.editModule){this.editModule.isAddedRowByMethod=!0,this.editModule.addRecord(e,t,i)}},t.prototype.closeEdit=function(){this.grid.editModule&&this.grid.editModule.closeEdit()},t.prototype.saveCell=function(){this.grid.editModule&&this.grid.editModule.saveCell()},t.prototype.updateCell=function(e,t,i){this.grid.editModule&&this.grid.editModule.updateCell(e,t,i)},t.prototype.updateRow=function(e,t){if(this.grid.editModule)if(i.i(r.isNullOrUndefined)(e))this.grid.editModule.updateRow(e,t);else{var n=this.grid.getCurrentViewRecords()[parseInt(e.toString(),10)];i.i(r.extend)(n,t),this.grid.editModule.updateRow(e,n)}},t.prototype.deleteRecord=function(e,t){this.grid.editModule&&this.grid.editModule.deleteRecord(e,t)},t.prototype.startEdit=function(e){this.grid.editModule&&this.grid.editModule.startEdit(e)},t.prototype.editCell=function(e,t){this.editModule&&this.editModule.editCell(e,t)},t.prototype.enableToolbarItems=function(e,t){this.grid.toolbarModule&&this.grid.toolbarModule.enableItems(e,t)},t.prototype.endEdit=function(){this.grid.editModule&&this.grid.editModule.endEdit()},t.prototype.openColumnChooser=function(e,t){this.columnChooserModule&&this.columnChooserModule.openColumnChooser(e,t)},t.prototype.deleteRow=function(e){this.grid.editModule&&this.grid.editModule.deleteRow(e)},t.prototype.getPrimaryKeyFieldNames=function(){return this.grid.getPrimaryKeyFieldNames()},t.prototype.setCellValue=function(e,t,n){this.grid.setCellValue(e,t,n);var o=this.grid.getRowIndexByPrimaryKey(e),a=this.getCurrentViewRecords()[parseInt(o.toString(),10)];i.i(r.isNullOrUndefined)(a)||i.i(D.a)({value:a,action:"edit"},this,this.isSelfReference,a.index,this.grid.selectedRowIndex,t)},t.prototype.setRowData=function(e,t){var i=this.getCurrentViewRecords(),r=this.grid.getPrimaryKeyFieldNames()[0],n=0,o={};i.some(function(t){return t[""+r]===e&&(o=t,!0)}),n=o.level,t.level=n,t.index=o.index,t.childRecords=o.childRecords,t.taskData=o.taskData,t.uniqueID=o.uniqueID,t.parentItem=o.parentItem,t.checkboxState=o.checkboxState,t.hasChildRecords=o.hasChildRecords,t.parentUniqueID=o.parentUniqueID,t.expanded=o.expanded,this.grid.setRowData(e,t);var a=this.getVisibleRecords();if(a.length>0&&e===a[a.length-1][""+r]){var s=this.getContentTable(),d=s.scrollHeight,l=this.getContent().clientHeight;this.lastRowBorder(this.getRows()[i.indexOf(o)],d<=l)}},t.prototype.goToPage=function(e){this.grid.pagerModule&&this.grid.pagerModule.goToPage(e)},t.prototype.updateExternalMessage=function(e){this.pagerModule&&this.grid.pagerModule.updateExternalMessage(e)},t.prototype.getCellFromIndex=function(e,t){return this.grid.getCellFromIndex(e,t)},t.prototype.getColumnByField=function(e){return i.i(o.iterateArrayOrObject)(this.columnModel,function(t){if(t.field===e)return t})[0]},t.prototype.getColumnByUid=function(e){var t=this.initialRender?this.grid.columns:this.columns;return this.grid.columns.length!==this.columnModel.length&&(t=this.grid.columnModel),i.i(o.iterateArrayOrObject)(t,function(t){if(t.uid===e)return t})[0]},t.prototype.getColumnFieldNames=function(){return this.grid.getColumnFieldNames()},t.prototype.getFooterContent=function(){return this.grid.getFooterContent()},t.prototype.getFooterContentTable=function(){return this.grid.getFooterContentTable()},t.prototype.showColumns=function(e,t){this.grid.showColumns(e,t),this.updateColumnModel()},t.prototype.hideColumns=function(e,t){this.grid.hideColumns(e,t),this.updateColumnModel()},t.prototype.getColumnHeaderByField=function(e){return this.grid.getColumnHeaderByField(e)},t.prototype.getColumnHeaderByIndex=function(e){return this.grid.getColumnHeaderByIndex(e)},t.prototype.getColumnHeaderByUid=function(e){return this.grid.getColumnHeaderByUid(e)},t.prototype.getColumnIndexByField=function(e){return this.grid.getColumnIndexByField(e)},t.prototype.getVirtualColIndexByUid=function(e){var t=i.i(o.iterateArrayOrObject)(this.grid.columnModel,function(t,i){if(t.uid===e)return i})[0];return i.i(r.isNullOrUndefined)(t)?-1:t},t.prototype.getColumnIndexByUid=function(e){return this.grid.getColumnIndexByUid(e)},t.prototype.getColumns=function(e){return this.updateColumnModel(this.grid.getColumns(e)),this.columnModel},t.prototype.updateColumnModel=function(e){var t,o,a=i.i(r.isNullOrUndefined)(e)?this.grid.getColumns():e;-1!==this.treeColumnIndex&&this.columnModel[this.treeColumnIndex]&&!i.i(r.isNullOrUndefined)(this.columnModel[this.treeColumnIndex].template)&&(t=this.columnModel[this.treeColumnIndex].template,o=this.columnModel[this.treeColumnIndex].field);var s;if(!this.enableColumnVirtualization||this.enableColumnVirtualization&&this.columnModel.length===a.length){this.columnModel=[];for(var d=0;d<a.length;d++){s={};for(var l=0,p=Object.keys(a[parseInt(d.toString(),10)]);l<p.length;l++){var c=p[l];s[""+c]=a[parseInt(d.toString(),10)][""+c]}this.columnModel.push(new n.a(s)),o!==this.columnModel[parseInt(d.toString(),10)].field||"checkbox"===this.columnModel[parseInt(d.toString(),10)].type||i.i(r.isNullOrUndefined)(t)||""===t||(this.columnModel[parseInt(d.toString(),10)].template=t)}}return this.deepMerge=["columns"],this.grid.columns.length!==this.columnModel.length&&(this.stackedHeader=!0),this.stackedHeader&&this.allowResizing&&this.updateColumnsWidth(this.columns),this.stackedHeader||i.i(r.merge)(this.columns,this.columnModel),this.deepMerge=void 0,this.columnModel},t.prototype.updateColumnsWidth=function(e){var t=this;e.forEach(function(e){if(e.columns)t.updateColumnsWidth(e.columns);else if(e.field){var n=t.grid.getColumnByField(e.field);i.i(r.isNullOrUndefined)(n)||(e.width=n.width)}})},t.prototype.getContent=function(){return this.grid.getContent()},t.prototype.mergePersistTreeGridData=function(){this.grid.mergePersistGridData.apply(this)},t.prototype.mergeColumns=function(e,t){this.grid.mergeColumns.apply(this,[e,t])},t.prototype.updateTreeGridModel=function(){this.setProperties({filterSettings:i.i(o.getObject)("properties",this.grid.filterSettings)},!0),this.setProperties({pageSettings:i.i(o.getObject)("properties",this.grid.pageSettings)},!0),this.setProperties({searchSettings:i.i(o.getObject)("properties",this.grid.searchSettings)},!0),this.setProperties({sortSettings:i.i(o.getObject)("properties",this.grid.sortSettings)},!0)},t.prototype.getContentTable=function(){return this.grid.getContentTable()},t.prototype.getDataRows=function(){for(var e=[],t=this.grid.getDataRows(),i=0,r=t.length;i<r;i++)t[parseInt(i.toString(),10)].classList.contains("e-summaryrow")||e.push(t[parseInt(i.toString(),10)]);return e},t.prototype.getCurrentViewRecords=function(){return this.grid.currentViewData.filter(function(e){return i.i(r.isNullOrUndefined)(e.isSummaryRow)})},t.prototype.getBatchChanges=function(){return this.grid.editModule.getBatchChanges()},t.prototype.getHeaderContent=function(){return this.grid.getHeaderContent()},t.prototype.getHeaderTable=function(){return this.grid.getHeaderTable()},t.prototype.getRowByIndex=function(e){return this.grid.getRowByIndex(e)},t.prototype.getRowInfo=function(e){return this.grid.getRowInfo(e)},t.prototype.getUidByColumnField=function(e){return this.grid.getUidByColumnField(e)},t.prototype.getVisibleColumns=function(){for(var e=[],t=0,i=this.columnModel;t<i.length;t++){var r=i[t];r.visible&&e.push(r)}return e},t.prototype.showSpinner=function(){i.i(m.showSpinner)(this.element)},t.prototype.hideSpinner=function(){i.i(m.hideSpinner)(this.element)},t.prototype.refresh=function(){this.uniqueIDCollection={},this.convertTreeData(this.dataSource),i.i(v.b)(this)||(this.dataSource instanceof y.DataManager?this.grid.setProperties({dataSource:new y.DataManager(this.dataSource.dataSource,this.dataSource.defaultQuery,this.dataSource.adaptor)},!0):this.grid.dataSource=this.flatData),this.grid.refresh()},t.prototype.getCheckedRecords=function(){return this.selectionModule.getCheckedrecords()},t.prototype.getVisibleRecords=function(){var e=[],t=this.getCurrentViewRecords();if(this.allowPaging)e=t;else for(var r=0;r<t.length;r++)e.push(t[parseInt(r.toString(),10)]),t[parseInt(r.toString(),10)].expanded||(r+=i.i(v.g)(t[parseInt(r.toString(),10)]).length);return e},t.prototype.getCheckedRowIndexes=function(){return this.selectionModule.getCheckedRowIndexes()},t.prototype.selectCheckboxes=function(e){this.selectionModule.selectCheckboxes(e)},t.prototype.refreshColumns=function(e){i.i(r.isNullOrUndefined)(e)||e?(this.grid.columns=this.getGridColumns(this.columns),this.grid.refreshColumns()):this.grid.setProperties({columns:this.getGridColumns(this.columns)},!0)},t.prototype.refreshHeader=function(){this.grid.refreshHeader()},t.prototype.expandCollapseRequest=function(e){if("Batch"===this.editSettings.mode){if((this.getBatchChanges()[this.changedRecords].length||this.getBatchChanges()[this.deletedRecords].length||this.getBatchChanges()[this.addedRecords].length)&&this.editSettings.showConfirmDialog){var t=this.grid.editModule.dialogObj;return this.grid.editModule.showDialog("CancelEdit",t),void(this.targetElement=e)}}if(this.rowTemplate){var i=e.closest(".e-treerowcell").parentElement,r=this.getCurrentViewRecords()[i.rowIndex];e.classList.contains("e-treegridexpand")?this.collapseRow(i,r):this.expandRow(i,r)}else{var n=this.grid.getRowInfo(e),r=n.rowData;if(this.grid.isFrozenGrid()&&this.enableVirtualization&&!Object.keys(r).length){r=this.grid.contentModule.freezeRows.filter(function(e){return e.uid===n.row.getAttribute("data-uid")})[0].data}this.enableImmutableMode&&(r=this.getCurrentViewRecords()[n.rowIndex]),e.classList.contains("e-treegridexpand")?this.collapseRow(n.row,r):this.expandRow(n.row,r)}},t.prototype.expandRow=function(e,t,n,o){var a=this,s=this.parentData;if(this.enableVirtualization||(s=this.flatData.filter(function(e){return e.hasChildRecords})),t=this.getCollapseExpandRecords(e,t),!i.i(r.isNullOrUndefined)(e)&&e.cells[0].classList.contains("e-lastrowcell")&&this.lastRowBorder(e,!1),this.isExpandAll&&!i.i(v.a)(this)){var d={data:s,row:e,cancel:!1},l=!1;this.grid.pagerModule&&!i.i(r.isNullOrUndefined)(this.grid.pagerModule.pagerObj.pagerdropdownModule)&&(l=!!this.grid.pagerModule.pagerObj.pagerdropdownModule.dropDownListObject.value),this.isExpandingEventTriggered?(!this.allowPaging||l&&"All"===this.grid.pagerModule.pagerObj.pagerdropdownModule.dropDownListObject.value)&&!this.expandAllPrevent&&this.isExpandingEventTriggered&&this.expandRows(e,t,s,n,o):this.trigger(u.R,d,function(i){a.expandAllPrevent=i.cancel,i.cancel||(i.expandAll&&a.expandCollapseAllChildren(t,"expand",n,o),a.expandRows(e,t,s,n,o))}),this.isExpandingEventTriggered=!0}else if(!this.isExpandAll||this.isExpandAll&&i.i(v.a)(this)){var d={data:t,row:e,cancel:!1};this.trigger(u.R,d,function(i){i.cancel||(i.expandAll&&a.expandCollapseAllChildren(t,"expand",n,o),a.expandRows(e,t,s,n,o))})}},t.prototype.expandRows=function(e,t,n,o,a){this.expandCollapse("expand",e,t);if((!i.i(v.a)(this)||i.i(v.h)(this))&&(!i.i(v.b)(this)||!i.i(r.isNullOrUndefined)(t.Children))){var s={data:t,row:e};i.i(r.isNullOrUndefined)(this.expandStateMapping)||this.updateExpandStateMapping(s.data,!0),this.isExpandAll&&!this.isExpandedEventTriggered?(this.isExpandedEventTriggered=!0,s={data:n,row:e},this.trigger(u.Q,s)):this.isExpandAll||this.trigger(u.Q,s)}},t.prototype.expandCollapseAllChildren=function(e,t,n,o){if((i.i(r.isNullOrUndefined)(n)||e[this.getPrimaryKeyFieldNames()[0]]===n)&&(i.i(r.isNullOrUndefined)(o)||o===e.level)){var a=i.i(v.g)(e).filter(function(e){return e.hasChildRecords});a.unshift(e);for(var s=0;s<a.length;s++)this.expandCollapse(t,null,a[parseInt(s.toString(),10)])}},t.prototype.getCollapseExpandRecords=function(e,t){return this.allowPaging&&"All"===this.pageSettings.pageSizeMode&&this.isExpandAll&&i.i(r.isNullOrUndefined)(t)&&!i.i(v.a)(this)?t=this.flatData.filter(function(e){return e.hasChildRecords}):i.i(r.isNullOrUndefined)(t)&&(t=this.detailTemplate?this.grid.getCurrentViewRecords()[e.getAttribute("data-rowindex")]:this.enableVirtualization&&this.isCollapseAll?this.isExpandAll&&-1===e.rowIndex?this.grid.getCurrentViewRecords()[parseInt(e.getAttribute("data-rowindex"),10)]:this.grid.getCurrentViewRecords()[e.rowIndex]:this.grid.getCurrentViewRecords()[parseInt(e.getAttribute("data-rowindex"),10)]),t},t.prototype.collapseRow=function(e,t,r){var n=this,o=this.parentData;if(this.enableVirtualization||(o=this.flatData.filter(function(e){return e.hasChildRecords})),t=this.getCollapseExpandRecords(e,t),this.isCollapseAll&&!i.i(v.a)(this)){var a={data:o,row:e,cancel:!1};this.isCollapsingEventTriggered?this.allowPaging||this.collapseAllPrevent||!this.isCollapsingEventTriggered||this.collapseRows(e,t,o,r):this.trigger(u.T,a,function(i){n.collapseAllPrevent=i.cancel,i.cancel||(i.collapseAll&&n.expandCollapseAllChildren(t,"collapse",r),n.collapseRows(e,t,o,r))}),this.isCollapsingEventTriggered=!0}else if(!this.isCollapseAll||this.isCollapseAll&&i.i(v.a)(this)){var a={data:t,row:e,cancel:!1};this.trigger(u.T,a,function(i){i.cancel||n.collapseRows(e,t,o,r)})}},t.prototype.collapseRows=function(e,t,n,o){this.expandCollapse("collapse",e,t);var a={data:t,row:e};if(!i.i(v.a)(this)&&(i.i(r.isNullOrUndefined)(this.expandStateMapping)||this.updateExpandStateMapping(a.data,!1),this.isCollapseAll&&!this.isCollapsedEventTriggered?(this.isCollapsedEventTriggered=!0,a={data:n,row:e},this.trigger(u.S,a)):this.isCollapseAll||this.trigger(u.S,a),this.enableInfiniteScrolling)){this.grid.getContent().firstElementChild.scrollHeight-this.grid.getContent().firstElementChild.scrollTop<this.grid.getRowHeight()+ +this.height&&this.grid.getContent().firstElementChild.scrollBy(0,this.grid.getRowHeight())}},t.prototype.updateExpandStateMapping=function(e,t){var r=e;if(r.length)for(var n=0;n<r.length;n++)r[parseInt(n.toString(),10)][this.expandStateMapping]=t,i.i(D.a)({value:r[parseInt(n.toString(),10)],action:"edit"},this,this.isSelfReference,r[parseInt(n.toString(),10)].index,this.grid.selectedRowIndex,this.expandStateMapping);else e[""+this.expandStateMapping]=t,i.i(D.a)({value:e,action:"edit"},this,this.isSelfReference,e.index,this.grid.selectedRowIndex,this.expandStateMapping)},t.prototype.expandAtLevel=function(e){if((this.allowPaging&&"All"===this.pageSettings.pageSizeMode||this.enableVirtualization)&&!i.i(v.a)(this)){var t=this.grid.dataSource.filter(function(t){return t.hasChildRecords&&t.level===e&&(t.expanded=!0),t.hasChildRecords&&t.level===e});this.expandAction(t,null,e,!0)}else{var t=this.getRecordDetails(e),r=i.i(o.getObject)("records",t);this.expandAction(r,null,e)}},t.prototype.expandByKey=function(e){this.expandCollapseActionByKey(e,"Expand")},t.prototype.expandAction=function(e,t,n,o){void 0===o&&(o=!1);for(var a=this,s=0;s<e.length;s++)!function(s){if(!i.i(r.isNullOrUndefined)(e[parseInt(s.toString(),10)].parentItem)){var d=e[parseInt(s.toString(),10)].parentItem.uniqueID,l=a.flatData.filter(function(e){return e.uniqueID===d});i.i(v.a)(a)&&(l=a.getCurrentViewRecords().filter(function(e){return e.uniqueID===d})),!1===l[0].expanded?(e.push(l[0]),l[0].expanded=!0):i.i(v.f)(a,l[0],a.parentData)||l[0].expanded&&void 0!==l[0].parentItem&&e.push(l[0])}o||a.expandRow(null,e[parseInt(s.toString(),10)],t,n)}(s);o&&this.expandRow(null,e,t,n)},t.prototype.getRecordDetails=function(e){var t=this.getRows().filter(function(t){return-1!==t.className.indexOf("level"+e)&&(t.querySelector(".e-treegridcollapse")||t.querySelector(".e-treegridexpand"))});return{records:this.getCurrentViewRecords().filter(function(t){return t.level===e&&t.hasChildRecords}),rows:t}},t.prototype.collapseAtLevel=function(e){if((this.allowPaging&&"All"===this.pageSettings.pageSizeMode||this.enableVirtualization)&&!i.i(v.a)(this)){var t=this.grid.dataSource.filter(function(t){return t.hasChildRecords&&t.level===e&&(t.expanded=!1),t.hasChildRecords&&t.level===e});this.collapseAction(t,null,!0)}else{var r=this.getRecordDetails(e),n=i.i(o.getObject)("records",r);this.collapseAction(n)}},t.prototype.collapseByKey=function(e){this.expandCollapseActionByKey(e,"Collapse")},t.prototype.expandCollapseActionByKey=function(e,t){var n=this.getPrimaryKeyFieldNames()[0],o=i.i(v.a)(this)?this.getCurrentViewRecords():this.grid.dataSource;if(!i.i(r.isNullOrUndefined)(n)){var a=o.filter(function(t){return t[""+n].toString()===e.toString()});"Expand"===t?this.expandAction(a,e,null):this.collapseAction(a,e)}},t.prototype.collapseAction=function(e,t,i){if(void 0===i&&(i=!1),i)this.collapseRow(null,e);else for(var r=0;r<e.length;r++)this.collapseRow(null,e[parseInt(r.toString(),10)],t);if(!this.grid.contentModule.isDataSourceChanged&&this.enableVirtualization&&this.getRows()&&this.parentData.length===this.getRows().length){this.grid.contentModule.startIndex=-1,this.grid.contentModule.endIndex=-1}},t.prototype.expandAll=function(){this.isExpandedEventTriggered=!1,this.isExpandingEventTriggered=!1,this.expandCollapseAll("expand")},t.prototype.collapseAll=function(){this.isCollapsedEventTriggered=!1,this.isCollapsingEventTriggered=!1,this.expandCollapseAll("collapse")},t.prototype.expandCollapseAll=function(e){var t=this.getRows().filter(function(t){return t.querySelector(".e-treegrid"+("expand"===e?"collapse":"expand"))});if(!t.length&&this.getRows().length&&t.push(this.getRows()[0]),this.isExpandAll=!0,this.isCollapseAll=!0,(this.allowPaging&&"All"===this.pageSettings.pageSizeMode||this.enableVirtualization||this.enableInfiniteScrolling)&&!i.i(v.a)(this)){if(this.flatData.filter(function(t){t.hasChildRecords&&(t.expanded="collapse"!==e)}),t.length)for(var n=0;n<t.length;n++)"collapse"===e?i.i(r.isNullOrUndefined)(this.getCurrentViewRecords()[t[parseInt(n.toString(),10)].rowIndex])||this.collapseRow(t[parseInt(n.toString(),10)]):this.enableVirtualization?"true"!==t[0].getAttribute("aria-expanded")&&this.expandRow(t[0]):this.expandRow(t[parseInt(n.toString(),10)]);else if(this.allowPaging){var o=this.enableCollapseAll;this.setProperties({enableCollapseAll:!0},!0),this.grid.pagerModule.goToPage(1),this.setProperties({enableCollapseAll:o},!0)}}else for(var n=0;n<t.length;n++)"collapse"===e?this.collapseRow(t[parseInt(n.toString(),10)]):this.expandRow(t[parseInt(n.toString(),10)]);this.isExpandAll=!1,this.isCollapseAll=!1},t.prototype.expandCollapse=function(e,t,n,o){var a,s=this,d={row:t,data:n,childData:[],requestType:e},l=this.grid.currentViewData.filter(function(e){return e.parentUniqueID===n.uniqueID});(!i.i(v.a)(this)&&"expand"===e&&this.isSelfReference&&i.i(v.b)(this)&&!l.length||"collapse"===e||this.isExpandAll&&this.loadChildOnDemand&&!i.i(v.a)(this)&&this.isSelfReference&&i.i(v.b)(this))&&this.updateChildOnDemand(d);var p=this.getRows();if(this.rowTemplate){var c=this.getContentTable().rows;p=[].slice.call(c)}var h;if(i.i(r.isNullOrUndefined)(t)?(h=this.grid.currentViewData.indexOf(n),t=p[parseInt(h.toString(),10)]):h=+t.getAttribute("data-rowindex"),i.i(r.isNullOrUndefined)(t)||t.setAttribute("aria-expanded","expand"===e?"true":"false"),!(this.allowPaging&&"All"===this.pageSettings.pageSizeMode||this.enableVirtualization||this.enableInfiniteScrolling)||i.i(v.a)(this)||i.i(v.b)(this)){var g=void 0;if("expand"===e){if(g="table-row",o||(n.expanded=!0,this.uniqueIDCollection[n.uniqueID].expanded=n.expanded),i.i(r.isNullOrUndefined)(t)||(a=t.getElementsByClassName("e-treegridcollapse")[0]),o&&!i.i(r.isNullOrUndefined)(n[this.expandStateMapping])&&n[this.expandStateMapping]&&i.i(r.isNullOrUndefined)(a)&&(a=t.getElementsByClassName("e-treegridexpand")[0]),i.i(r.isNullOrUndefined)(a))return;a.classList.contains("e-treegridexpand")||i.i(r.addClass)([a],"e-treegridexpand"),i.i(r.removeClass)([a],"e-treegridcollapse")}else{if(g="none",o&&!i.i(v.b)(this)||(n.expanded=!1,this.uniqueIDCollection[n.uniqueID].expanded=n.expanded),i.i(r.isNullOrUndefined)(t)||(a=t.getElementsByClassName("e-treegridexpand")[0]),o&&!i.i(r.isNullOrUndefined)(n[this.expandStateMapping])&&!n[this.expandStateMapping]&&i.i(r.isNullOrUndefined)(a)&&(a=t.getElementsByClassName("e-treegridcollapse")[0]),i.i(r.isNullOrUndefined)(a))return;a.classList.contains("e-treegridcollapse")||i.i(r.addClass)([a],"e-treegridcollapse"),i.i(r.removeClass)([a],"e-treegridexpand")}t.querySelectorAll(".e-treerowcell")[0].setAttribute("aria-expanded","expand"===e?"true":"false");var f=p.filter(function(e){return e.classList.contains("e-griddetailrowindex"+n.index+"level"+(n.level+1))});if(i.i(v.a)(this)&&!i.i(v.h)(this))this.remoteExpand(e,t,n);else{i.i(v.b)(this)&&!l.length&&"collapse"!==e||this.localExpand(e,t,n);var y=this.getVisibleRecords()[this.getVisibleRecords().length-1].index,m=this.getRowByIndex(y);this.grid.getContentTable().clientHeight<=this.grid.getContent().clientHeight&&!i.i(r.isNullOrUndefined)(m)&&!m.cells[0].classList.contains("e-lastrowcell")&&this.lastRowBorder(m,!0)}if(i.i(v.b)(this)&&"expand"===e){var S=this.getCurrentViewRecords(),I=S.filter(function(e){return i.i(v.f)(s,e,s.parentData)});this.dataResults.result=I}if(!i.i(r.isNullOrUndefined)(a)&&a.closest(".e-treerowcell").classList.contains("e-cellselectionbackground")&&(a.closest(".e-treerowcell").classList.remove("e-cellselectionbackground"),a.closest(".e-treerowcell").removeAttribute("aria-selected")),this.isPixelHeight()&&!t.cells[0].classList.contains("e-lastrowcell")){var w=this.getRows(),c=this.getContentTable().rows;w=[].slice.call(c);for(var R=w.length-1;R>=0;R--)if(!i.i(v.l)(w[parseInt(R.toString(),10)])){var x=this.getContentTable(),C=x.scrollHeight,b=this.getContent().clientHeight;this.lastRowBorder(w[parseInt(R.toString(),10)],C<=b);break}}this.notify("rowExpandCollapse",{detailrows:f,action:g,record:n,row:t}),this.updateAltRow(p)}else this.notify(u.b,{action:e,row:t,record:n})},t.prototype.updateChildOnDemand=function(e){var t=this;if("collapse"===e.requestType&&i.i(v.b)(this)){for(var n=this.flatData.slice(),a=0;a<n.length;a++)n[parseInt(a.toString(),10)].parentUniqueID===e.data.uniqueID&&(n.splice(a,1),a-=1);return void(this.dataResults.result=n)}var s=new y.Deferred;e.childDataBind=s.resolve;var d=e.data;this.trigger(u.N,e),s.promise.then(function(){if(e.childData.length){i.i(v.b)(t)&&(t.flatData=t.dataResults.result),t.enableInfiniteScrolling&&i.i(v.b)(t)&&(t.flatData=t.infiniteScrollData);for(var n=t.flatData,a=0,s=0;s<n.length;s++)if(n[parseInt(s.toString(),10)].taskData===d.taskData){a=s;break}for(var l=i.i(r.getValue)("result",t.dataSource),p=i.i(v.i)(e.childData),c=d[t.childMapping]&&d[t.childMapping].length>p.length?d[t.childMapping].length:p.length,s=0;s<c;s++)d[t.childMapping]&&l.filter(function(e,i){e[t.parentIdMapping]===d[t.idMapping]&&l.splice(i,1)}),p[parseInt(s.toString(),10)]?(p[parseInt(s.toString(),10)].level=d.level+1,p[parseInt(s.toString(),10)].index=Math.ceil(1e3*Math.random()),p[parseInt(s.toString(),10)].parentItem=i.i(r.extend)({},d),p[parseInt(s.toString(),10)].taskData=i.i(r.extend)({},p[parseInt(s.toString(),10)]),delete p[parseInt(s.toString(),10)].parentItem.childRecords,delete p[parseInt(s.toString(),10)].taskData.parentItem,p[parseInt(s.toString(),10)].parentUniqueID=d.uniqueID,p[parseInt(s.toString(),10)].uniqueID=i.i(o.getUid)(t.element.id+"_data_"),i.i(r.setValue)("uniqueIDCollection."+p[parseInt(s.toString(),10)].uniqueID,p[parseInt(s.toString(),10)],t),(!i.i(r.isNullOrUndefined)(p[parseInt(s.toString(),10)][t.childMapping])||p[parseInt(s.toString(),10)][t.hasChildMapping]&&i.i(v.b)(t))&&(p[parseInt(s.toString(),10)].hasChildRecords=!0),i.i(v.b)(t)&&d[t.childMapping]&&d[t.childMapping][parseInt(s.toString(),10)]?n.splice(a+1+s,0,p[parseInt(s.toString(),10)]):n.splice(a+1+s,d[t.childMapping]&&d[t.childMapping][parseInt(s.toString(),10)]?1:0,p[parseInt(s.toString(),10)])):n.splice(a+1+s,1);n[parseInt(a.toString(),10)][""+t.childMapping]=p,n[parseInt(a.toString(),10)].childRecords=p,n[parseInt(a.toString(),10)].expanded=!0,i.i(r.setValue)("uniqueIDCollection."+n[parseInt(a.toString(),10)].uniqueID,n[parseInt(a.toString(),10)],t);for(var h=0;h<e.childData.length;h++)l.push(e.childData[parseInt(h.toString(),10)])}i.i(v.b)(t)&&t.loadChildOnDemand&&"expand"===e.requestType&&(t.dataResults.expandRecord={},t.dataResults.expandRecord=e.data),t.isExpandRefresh=!0;var g=t.getContentTable().parentElement.scrollTop;t.grid.refresh(),t.enableInfiniteScrolling&&(t.getContentTable().parentElement.scrollTop=g),t.trigger(u.Q,e)})},t.prototype.remoteExpand=function(e,t,i){var r=this.getRows();if(this.rowTemplate){var n=this.getContentTable().rows;r=[].slice.call(n)}var o={data:i,row:t},a=[];if(a=r.filter(function(e){return e.querySelector(".e-gridrowindex"+i.index+"level"+(i.level+1))||e.querySelector(".e-gridrowindex"+i.index+"level0.e-summarycell")}),"expand"===e){this.notify(u.U,{record:i,rows:a,parentRow:t});var s={row:t,data:i};a.length>0&&this.trigger(u.Q,s)}else"collapse"===e&&this.enableVirtualization?this.dataModule.fetchRemoteChildData({action:e,record:o.data,rows:null,parentRow:o.row}):(this.collapseRemoteChild({record:i,rows:a}),this.trigger(u.S,o))},t.prototype.localExpand=function(e,t,n){var o,a=this.grid.currentViewData.filter(function(e){return e.parentUniqueID===n.uniqueID});this.isPixelHeight()&&t.cells[0].classList.contains("e-lastrowcell")&&this.lastRowBorder(t,!1);var s,d,l=this.getRows();if(this.rowTemplate){var p=this.getContentTable().rows;l=[].slice.call(p)}var c="expand"===e?"table-row":"none",h=this.getPrimaryKeyFieldNames()[0];if(this.enableImmutableMode&&!this.allowPaging){o=[];for(var u=0;u<a.length;u++){var g=this.grid.getRowIndexByPrimaryKey(a[parseInt(u.toString(),10)][""+h]);o.push(this.getRows()[parseInt(g.toString(),10)])}}else o=l.filter(function(e){return e.querySelector(".e-gridrowindex"+n.index+"level"+(n.level+1))});var f=this.grid.getFrozenLeftColumnsCount()>0||this.grid.getFrozenRightColumnsCount()>0;(this.frozenRows||this.frozenColumns||this.getFrozenColumns()||f)&&(s=this.getRows().filter(function(e){return e.querySelector(".e-gridrowindex"+n.index+"level"+(n.level+1))})),f&&(d=this.getRows().filter(function(e){return e.querySelector(".e-gridrowindex"+n.index+"level"+(n.level+1))}));var y=this.grid.getRowsObject(),m=this.grid.currentViewData,S=m.filter(function(e){return e.uniqueID===n.uniqueID}),I=m.indexOf(S[0]);i.i(r.isNullOrUndefined)(y[parseInt(I.toString(),10)].visible)||!1===y[parseInt(I.toString(),10)].visible||(y[parseInt(I.toString(),10)].visible=!0);for(var w=l.filter(function(e){return e.classList.contains("e-griddetailrowindex"+n.index+"level"+(n.level+1))}),u=0;u<o.length;u++){if(i.i(r.isNullOrUndefined)(o[parseInt(u.toString(),10)])||(o[parseInt(u.toString(),10)].style.display=c),!i.i(r.isNullOrUndefined)(o[parseInt(u.toString(),10)])&&!this.allowPaging&&!(this.enableVirtualization||this.enableInfiniteScrolling||i.i(v.a)(this)||i.i(v.b)(this))){y[o[parseInt(u.toString(),10)].rowIndex].visible="none"!==c;var R=m.filter(function(e){return e.uniqueID===S[0].parentUniqueID});!i.i(r.isNullOrUndefined)(R[0])&&l[m.indexOf(R[0])].getElementsByClassName("e-treegridcollapse").length&&(y[parseInt(I.toString(),10)].visible=!1)}i.i(r.isNullOrUndefined)(s)||(s[parseInt(u.toString(),10)].style.display=c),i.i(r.isNullOrUndefined)(d)||(d[parseInt(u.toString(),10)].style.display=c),this.notify("childRowExpand",{row:o[parseInt(u.toString(),10)]}),!i.i(r.isNullOrUndefined)(a[parseInt(u.toString(),10)].childRecords)&&a[parseInt(u.toString(),10)].childRecords.length>0&&("expand"!==e||i.i(r.isNullOrUndefined)(a[parseInt(u.toString(),10)].expanded)||a[parseInt(u.toString(),10)].expanded)&&(this.expandCollapse(e,o[parseInt(u.toString(),10)],a[parseInt(u.toString(),10)],!0),this.frozenColumns<=this.treeColumnIndex&&!i.i(r.isNullOrUndefined)(s)&&this.expandCollapse(e,s[parseInt(u.toString(),10)],a[parseInt(u.toString(),10)],!0))}for(var u=0;u<w.length;u++)i.i(r.isNullOrUndefined)(w[parseInt(u.toString(),10)])||this.allowPaging||this.enableVirtualization||this.enableInfiniteScrolling||i.i(v.a)(this)||i.i(v.b)(this)||(y[w[parseInt(u.toString(),10)].rowIndex].visible="none"!==c,w[parseInt(u.toString(),10)].style.display=c);this.allowPaging||this.enableVirtualization||this.enableInfiniteScrolling||i.i(v.a)(this)||i.i(v.b)(this)||this.grid.notify("refresh-Expand-and-Collapse",{rows:this.grid.getRowsObject()})},t.prototype.updateAltRow=function(e){if(this.enableAltRow&&!this.rowTemplate)for(var t=0,n=0;e&&n<e.length;n++){var o=e[parseInt(n.toString(),10)];"none"!==o.style.display&&(o.classList.contains("e-altrow")&&i.i(r.removeClass)([o],"e-altrow"),t%2==0||o.classList.contains("e-summaryrow")||o.classList.contains("e-detailrow")||i.i(r.addClass)([o],"e-altrow"),o.classList.contains("e-summaryrow")||o.classList.contains("e-detailrow")||t++)}},t.prototype.treeColumnRowTemplate=function(){var e=this.getContentTable().rows;e=[].slice.call(e);for(var t=this.grid.getRowsObject(),i=0;i<e.length;i++){var r=this.grid.getContentTable().rows[parseInt(i.toString(),10)].cells[this.treeColumnIndex],n=e[parseInt(i.toString(),10)],o=0!==t.length?t[parseInt(i.toString(),10)].data:new Object,a={data:o,row:n,cell:r,column:this.getColumns()[this.treeColumnIndex]};this.renderModule.cellRender(a)}},t.prototype.collapseRemoteChild=function(e,t){t||(e.record.expanded=!1);var n,o,a=e.rows,s=[],d=[],l=this.getFrozenLeftColumnsCount()>0||this.getFrozenRightColumnsCount()>0;l&&(s=this.getRows().filter(function(t){return t.querySelector(".e-gridrowindex"+e.record.index+"level"+(e.record.level+1))}),d=this.getRows().filter(function(t){return t.querySelector(".e-gridrowindex"+e.record.index+"level"+(e.record.level+1))}));for(var p=0;p<a.length;p++){a[parseInt(p.toString(),10)].style.display="none",n=a[parseInt(p.toString(),10)];var c=a[parseInt(p.toString(),10)].querySelector(".e-detailrowexpand");if(i.i(r.isNullOrUndefined)(c)||this.grid.detailRowModule.collapse(c),l&&(s[parseInt(p.toString(),10)].style.display="none",d[parseInt(p.toString(),10)].style.display="none",a[parseInt(p.toString(),10)].querySelector(".e-treecolumn-container .e-treegridexpand")||(s[parseInt(p.toString(),10)].querySelector(".e-treecolumn-container .e-treegridexpand")?n=s[parseInt(p.toString(),10)]:d[parseInt(p.toString(),10)].querySelector(".e-treecolumn-container .e-treegridexpand")&&(n=d[parseInt(p.toString(),10)]))),n.querySelector(".e-treecolumn-container .e-treegridexpand")){var h=n.querySelector(".e-treecolumn-container .e-treegridexpand");o=this.rowTemplate?this.grid.getCurrentViewRecords()[a[parseInt(p.toString(),10)].rowIndex]:this.grid.getRowObjectFromUID(a[parseInt(p.toString(),10)].getAttribute("data-Uid")).data,!i.i(r.isNullOrUndefined)(h)&&o.expanded&&(i.i(r.removeClass)([h],"e-treegridexpand"),i.i(r.addClass)([h],"e-treegridcollapse"));for(var u=[],g=this.getRows(),f=0;f<g.length;f++)g[parseInt(f.toString(),10)].querySelector(".e-gridrowindex"+o.index+"level"+(o.level+1))&&u.push(g[parseInt(f.toString(),10)]);u.length&&o.expanded&&this.collapseRemoteChild({record:o,rows:u},!1)}}},t.prototype.sanitize=function(e){return this.enableHtmlSanitizer&&"string"==typeof e?r.SanitizeHtmlHelper.sanitize(e):e},t.prototype.updateRowAndCellElements=function(e,t,i){for(var r=0;r<e.length;r++)this.renderModule.cellRender({data:e[parseInt(r.toString(),10)],cell:t[parseInt(r.toString(),10)].cells[parseInt(i.toString(),10)],column:this.grid.getColumns()[this.treeColumnIndex],requestType:"rowDragAndDrop"}),"indenting"!==this.action&&"outdenting"!==this.action||this.renderModule.RowModifier({data:e[parseInt(r.toString(),10)],row:t[parseInt(r.toString(),10)]})},t.prototype.addListener=function(){this.on("updateResults",this.updateResultModel,this),this.grid.on("initial-end",this.afterGridRender,this)},t.prototype.updateResultModel=function(e){this.dataResults=e},t.prototype.removeListener=function(){this.isDestroyed||(this.off("updateResults",this.updateResultModel),this.grid.off("initial-end",this.afterGridRender))},t.prototype.filterByColumn=function(e,t,i,r,n,o,a,s){this.grid.filterByColumn(e,t,i,r,n,o,a,s)},t.prototype.clearFiltering=function(){this.grid.clearFiltering()},t.prototype.removeFilteredColsByField=function(e,t){this.grid.removeFilteredColsByField(e,t)},t.prototype.selectRow=function(e,t){this.grid.selectRow(e,t)},t.prototype.selectRows=function(e){this.grid.selectRows(e)},t.prototype.clearSelection=function(){this.grid.clearSelection()},t.prototype.copy=function(e){this.clipboardModule.copy(e)},t.prototype.paste=function(e,t,i){this.clipboardModule.paste(e,t,i)},t.prototype.selectCell=function(e,t){this.grid.selectCell(e,t)},t.prototype.getSelectedRows=function(){return this.grid.getSelectedRows()},t.prototype.getMovableCellFromIndex=function(e,t){return this.grid.getCellFromIndex(e,t)},t.prototype.getMovableDataRows=function(){return this.grid.getDataRows()},t.prototype.getMovableRowByIndex=function(e){return this.grid.getRowByIndex(e)},t.prototype.getMovableRows=function(){return this.grid.getRows()},t.prototype.getFrozenRightRowByIndex=function(e){return this.grid.getRowByIndex(e)},t.prototype.getFrozenRightRows=function(){return this.grid.getRows()},t.prototype.getFrozenRightDataRows=function(){return this.grid.getDataRows()},t.prototype.getFrozenRightCellFromIndex=function(e,t){return this.grid.getCellFromIndex(e,t)},t.prototype.getFrozenLeftColumnHeaderByIndex=function(e){return this.grid.getColumnHeaderByIndex(e)},t.prototype.getFrozenRightColumnHeaderByIndex=function(e){return this.grid.getColumnHeaderByIndex(e)},t.prototype.getMovableColumnHeaderByIndex=function(e){return this.grid.getColumnHeaderByIndex(e)},t.prototype.getMovableColumnsCount=function(){return this.grid.getMovableColumnsCount()},t.prototype.getFrozenLeftColumnsCount=function(){return this.grid.getFrozenLeftColumnsCount()},t.prototype.getFrozenRightColumnsCount=function(){return this.grid.getFrozenRightColumnsCount()},t.prototype.getFrozenLeftColumns=function(){return this.updateColumnModel(this.grid.getFrozenLeftColumns()),this.columnModel},t.prototype.getFrozenRightColumns=function(){return this.updateColumnModel(this.grid.getFrozenRightColumns()),this.columnModel},t.prototype.getVisibleMovableCount=function(){return this.grid.getVisibleMovableCount()},t.prototype.getVisibleFrozenRightCount=function(){return this.grid.getVisibleFrozenRightCount()},t.prototype.getVisibleFrozenLeftCount=function(){return this.grid.getVisibleFrozenLeftCount()},t.prototype.getMovableColumns=function(){return this.updateColumnModel(this.grid.getMovableColumns()),this.columnModel},t.prototype.getFrozenColumns=function(){return this.getFrozenCount(this.columns,0)+this.frozenColumns},t.prototype.getFrozenCount=function(e,t){for(var i=0,r=e.length;i<r;i++)e[parseInt(i.toString(),10)].columns?t=this.getFrozenCount(e[parseInt(i.toString(),10)].columns,t):e[parseInt(i.toString(),10)].isFrozen&&t++;return t},t.prototype.getSelectedRowIndexes=function(){return this.grid.getSelectedRowIndexes()},t.prototype.getSelectedRowCellIndexes=function(){return this.grid.getSelectedRowCellIndexes()},t.prototype.getSelectedRecords=function(){return this.grid.getSelectedRecords()},t.prototype.getDataModule=function(){return{baseModule:this.grid.getDataModule(),treeModule:this.dataModule}},t.prototype.reorderRows=function(e,t,i){this.rowDragAndDropModule.reorderRows(e,t,i)},t.prototype.indent=function(e){i.i(r.isNullOrUndefined)(this.rowDragAndDropModule)||(e=e,this.rowDragAndDropModule[this.indentOutdentAction](e,"indent"))},t.prototype.outdent=function(e){i.i(r.isNullOrUndefined)(this.rowDragAndDropModule)||(e=e,this.rowDragAndDropModule[this.indentOutdentAction](e,"outdent"))};var E;return P([i.i(r.Property)(0)],t.prototype,"frozenRows",void 0),P([i.i(r.Property)(0)],t.prototype,"frozenColumns",void 0),P([i.i(r.Property)("Ellipsis")],t.prototype,"clipMode",void 0),P([i.i(r.Property)([])],t.prototype,"columns",void 0),P([i.i(r.Property)(null)],t.prototype,"childMapping",void 0),P([i.i(r.Property)(null)],t.prototype,"hasChildMapping",void 0),P([i.i(r.Property)(0)],t.prototype,"treeColumnIndex",void 0),P([i.i(r.Property)(null)],t.prototype,"idMapping",void 0),P([i.i(r.Property)(null)],t.prototype,"parentIdMapping",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableCollapseAll",void 0),P([i.i(r.Property)(null)],t.prototype,"expandStateMapping",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowRowDragAndDrop",void 0),P([i.i(r.Property)([])],t.prototype,"dataSource",void 0),P([i.i(r.Property)()],t.prototype,"query",void 0),P([i.i(r.Property)()],t.prototype,"cloneQuery",void 0),P([i.i(r.Property)("AllPages")],t.prototype,"printMode",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowPaging",void 0),P([i.i(r.Property)(!1)],t.prototype,"loadChildOnDemand",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowTextWrap",void 0),P([i.i(r.Complex)({},d.a)],t.prototype,"textWrapSettings",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowReordering",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowResizing",void 0),P([i.i(r.Property)(!1)],t.prototype,"autoCheckHierarchy",void 0),P([i.i(r.Complex)({},R.a)],t.prototype,"pageSettings",void 0),P([i.i(r.Complex)({},o.RowDropSettings)],t.prototype,"rowDropSettings",void 0),P([i.i(r.Property)("USD")],t.prototype,"currencyCode",void 0),P([i.i(r.Property)()],t.prototype,"pagerTemplate",void 0),P([i.i(r.Property)(!1)],t.prototype,"showColumnMenu",void 0),P([i.i(r.Property)(!1)],t.prototype,"showColumnChooser",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowSorting",void 0),P([i.i(r.Property)(!0)],t.prototype,"allowMultiSorting",void 0),P([i.i(r.Complex)({},b.b)],t.prototype,"sortSettings",void 0),P([i.i(r.Collection)([],x.b)],t.prototype,"aggregates",void 0),P([i.i(r.Complex)({},C.a)],t.prototype,"editSettings",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowFiltering",void 0),P([i.i(r.Property)()],t.prototype,"detailTemplate",void 0),P([i.i(r.Complex)({},s.b)],t.prototype,"filterSettings",void 0),P([i.i(r.Complex)({},g.a)],t.prototype,"searchSettings",void 0),P([i.i(r.Property)()],t.prototype,"toolbar",void 0),P([i.i(r.Property)()],t.prototype,"toolbarTemplate",void 0),P([i.i(r.Property)("Default")],t.prototype,"gridLines",void 0),P([i.i(r.Property)()],t.prototype,"contextMenuItems",void 0),P([i.i(r.Property)()],t.prototype,"columnMenuItems",void 0),P([i.i(r.Property)()],t.prototype,"rowTemplate",void 0),P([i.i(r.Property)("Parent")],t.prototype,"copyHierarchyMode",void 0),P([i.i(r.Property)(null)],t.prototype,"rowHeight",void 0),P([i.i(r.Property)(!0)],t.prototype,"enableAltRow",void 0),P([i.i(r.Property)(!0)],t.prototype,"allowKeyboard",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableHover",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableAutoFill",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableAdaptiveUI",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableImmutableMode",void 0),P([i.i(r.Property)("auto")],t.prototype,"height",void 0),P([i.i(r.Property)("auto")],t.prototype,"width",void 0),P([i.i(r.Complex)({},a.a)],t.prototype,"loadingIndicator",void 0),P([i.i(r.Property)(!0)],t.prototype,"enableVirtualMaskRow",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableVirtualization",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableColumnVirtualization",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableHtmlSanitizer",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableInfiniteScrolling",void 0),P([i.i(r.Complex)({},M.a)],t.prototype,"infiniteScrollSettings",void 0),P([i.i(r.Property)("All")],t.prototype,"columnQueryMode",void 0),P([i.i(r.Event)()],t.prototype,"created",void 0),P([i.i(r.Event)()],t.prototype,"load",void 0),P([i.i(r.Event)()],t.prototype,"expanding",void 0),P([i.i(r.Event)()],t.prototype,"expanded",void 0),P([i.i(r.Event)()],t.prototype,"collapsing",void 0),P([i.i(r.Event)()],t.prototype,"collapsed",void 0),P([i.i(r.Event)()],t.prototype,"cellSave",void 0),P([i.i(r.Event)()],t.prototype,"cellSaved",void 0),P([i.i(r.Event)()],t.prototype,"actionBegin",void 0),P([i.i(r.Event)()],t.prototype,"actionComplete",void 0),P([i.i(r.Event)()],t.prototype,"beginEdit",void 0),P([i.i(r.Event)()],t.prototype,"batchAdd",void 0),P([i.i(r.Event)()],t.prototype,"batchDelete",void 0),P([i.i(r.Event)()],t.prototype,"batchCancel",void 0),P([i.i(r.Event)()],t.prototype,"beforeBatchAdd",void 0),P([i.i(r.Event)()],t.prototype,"beforeBatchDelete",void 0),P([i.i(r.Event)()],t.prototype,"beforeBatchSave",void 0),P([i.i(r.Event)()],t.prototype,"cellEdit",void 0),P([i.i(r.Event)()],t.prototype,"actionFailure",void 0),P([i.i(r.Event)()],t.prototype,"dataBound",void 0),P([i.i(r.Event)()],t.prototype,"dataSourceChanged",void 0),P([i.i(r.Event)()],t.prototype,"dataStateChange",void 0),P([i.i(r.Event)()],t.prototype,"recordDoubleClick",void 0),P([i.i(r.Event)()],t.prototype,"rowDataBound",void 0),P([i.i(r.Event)()],t.prototype,"detailDataBound",void 0),P([i.i(r.Event)()],t.prototype,"queryCellInfo",void 0),P([i.i(r.Property)(!0)],t.prototype,"allowSelection",void 0),P([i.i(r.Event)()],t.prototype,"rowSelecting",void 0),P([i.i(r.Event)()],t.prototype,"rowSelected",void 0),P([i.i(r.Event)()],t.prototype,"rowDeselecting",void 0),P([i.i(r.Event)()],t.prototype,"rowDeselected",void 0),P([i.i(r.Event)()],t.prototype,"headerCellInfo",void 0),P([i.i(r.Event)()],t.prototype,"cellSelecting",void 0),P([i.i(r.Event)()],t.prototype,"columnMenuOpen",void 0),P([i.i(r.Event)()],t.prototype,"columnMenuClick",void 0),P([i.i(r.Event)()],t.prototype,"cellSelected",void 0),P([i.i(r.Event)()],t.prototype,"cellDeselecting",void 0),P([i.i(r.Event)()],t.prototype,"cellDeselected",void 0),P([i.i(r.Event)()],t.prototype,"resizeStart",void 0),P([i.i(r.Event)()],t.prototype,"resizing",void 0),P([i.i(r.Event)()],t.prototype,"resizeStop",void 0),P([i.i(r.Event)()],t.prototype,"columnDragStart",void 0),P([i.i(r.Event)()],t.prototype,"columnDrag",void 0),P([i.i(r.Event)()],t.prototype,"columnDrop",void 0),P([i.i(r.Event)()],t.prototype,"checkboxChange",void 0),P([i.i(r.Event)()],t.prototype,"printComplete",void 0),P([i.i(r.Event)()],t.prototype,"beforePrint",void 0),P([i.i(r.Event)()],t.prototype,"toolbarClick",void 0),P([i.i(r.Event)()],t.prototype,"beforeDataBound",void 0),P([i.i(r.Event)()],t.prototype,"contextMenuOpen",void 0),P([i.i(r.Event)()],t.prototype,"contextMenuClick",void 0),P([i.i(r.Event)()],t.prototype,"beforeCopy",void 0),P([i.i(r.Event)()],t.prototype,"beforePaste",void 0),P([i.i(r.Event)()],t.prototype,"rowDrag",void 0),P([i.i(r.Event)()],t.prototype,"rowDragStart",void 0),P([i.i(r.Event)()],t.prototype,"rowDragStartHelper",void 0),P([i.i(r.Event)()],t.prototype,"rowDrop",void 0),P([i.i(r.Property)(-1)],t.prototype,"selectedRowIndex",void 0),P([i.i(r.Complex)({},f.a)],t.prototype,"selectionSettings",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowExcelExport",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowPdfExport",void 0),P([i.i(r.Event)()],t.prototype,"pdfQueryCellInfo",void 0),P([i.i(r.Event)()],t.prototype,"pdfHeaderQueryCellInfo",void 0),P([i.i(r.Event)()],t.prototype,"excelQueryCellInfo",void 0),P([i.i(r.Event)()],t.prototype,"excelHeaderQueryCellInfo",void 0),P([i.i(r.Event)()],t.prototype,"beforeExcelExport",void 0),P([i.i(r.Event)()],t.prototype,"excelExportComplete",void 0),P([i.i(r.Event)()],t.prototype,"beforePdfExport",void 0),P([i.i(r.Event)()],t.prototype,"pdfExportComplete",void 0),t=E=P([r.NotifyPropertyChanges],t)}(r.Component)},function(e,t,i){"use strict";var r=i(14);i.d(t,"a",function(){return r.a}),i.d(t,"b",function(){return r.b}),i.d(t,"c",function(){return r.c});var n=i(15);i.d(t,"d",function(){return n.a});var o=i(16);i.d(t,"e",function(){return o.a}),i.d(t,"f",function(){return o.b});var a=i(19);i.d(t,"g",function(){return a.a});var s=i(20);i.d(t,"h",function(){return s.a});var d=i(21);i.d(t,"i",function(){return d.a});var l=i(23);i.d(t,"j",function(){return l.a}),i.d(t,"k",function(){return l.b});var p=i(22);i.d(t,"l",function(){return p.a}),i.d(t,"m",function(){return p.b});var c=i(51);i.d(t,"n",function(){return c.a});var h=i(17);i.d(t,"o",function(){return h.a});var u=i(18);i.d(t,"p",function(){return u.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)()],t.prototype,"targetID",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)("Both")],t.prototype,"wrapMode",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";var r=i(24);i.d(t,"a",function(){return r.a});var n=i(25);i.d(t,"b",function(){return n.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return p});var r=i(0),n=(i.n(r),i(2)),o=i(25),a=i(1),s=(i.n(a),i(4)),d=(i.n(s),i(3)),l=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),p=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.isExpandCollapse=!1,r.translateY=0,r.maxiPage=0,r.recordAdded=!1,r.startIndex=-1,r.endIndex=-1,r.preTranslate=0,r.isRemoteExpand=!1,r.isDataSourceChanged=!1,r.addEventListener(),r}return l(t,e),t.prototype.getModelGenerator=function(){return new o.a(this.parent)},t.prototype.getRowByIndex=function(e){return this.parent.enableVirtualization&&this.parent.isFrozenGrid()?this.getRowCollection(e,!0):this.parent.getDataRows().filter(function(t){return parseInt(t.getAttribute("data-rowindex"),10)===e})[0]},t.prototype.getFrozenRightVirtualRowByIndex=function(e){return this.getRowCollection(e,!1,!1,!0)},t.prototype.getRowCollection=function(e,t,i,r){var o=parseInt(this.parent.getRows()[0].getAttribute(n.g),10),a=this.parent.getDataRows(),s=i?this.parent.getCurrentViewRecords():a,d=s[e-o];return this.parent.frozenRows&&this.parent.pageSettings.currentPage>1&&(d=i?e<=this.parent.frozenRows?this.parent.getRowsObject()[parseInt(e.toString(),10)].data:d:e<=this.parent.frozenRows?a[parseInt(e.toString(),10)]:a[e-o+this.parent.frozenRows]),d},t.prototype.addEventListener=function(){this.parent.on(n.d,this.virtualOtherAction,this),this.parent.on(n.f,this.indexModifier,this)},t.prototype.virtualOtherAction=function(e){e.setTop?(this.translateY=0,this.startIndex=0,this.endIndex=this.parent.pageSettings.pageSize-1):e.isExpandCollapse&&(this.isExpandCollapse=!0)},t.prototype.indexModifier=function(e){var t=this.parent.getContent().querySelector(".e-content");if((this.recordAdded||"delete"===e.requestType&&this.endIndex>e.count-this.parent.pageSettings.pageSize)&&this.startIndex>-1&&this.endIndex>-1){if(this.endIndex>e.count-this.parent.pageSettings.pageSize){var i=~~(t.scrollTop/this.parent.getRowHeight()),r=i+this.parent.getRows().length;r>e.count&&(r=i+(e.count-i)),this.startIndex=r-this.parent.getRows().length,this.endIndex=r}else("Top"!==this.parent.root.editSettings.newRowPosition&&-1!==this.parent.root.editModule.selectedIndex||-1!==this.parent.root.editModule.selectedIndex)&&(this.startIndex+=1,this.endIndex+=1);this.recordAdded=!1}this.isDataSourceChanged&&(this.startIndex=0,this.endIndex=this.parent.pageSettings.pageSize-1),this.endIndex-this.startIndex!==this.parent.pageSettings.pageSize&&this.totalRecords>this.parent.pageSettings.pageSize&&this.endIndex===this.totalRecords?(e.startIndex=this.endIndex-this.parent.pageSettings.pageSize,e.endIndex=this.endIndex):(e.startIndex=this.startIndex,e.endIndex=this.endIndex)},t.prototype.eventListener=function(t){var r=this;this.parent.dataSource instanceof s.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url&&i.i(d.b)(this.parent)?e.prototype.eventListener.call(this,"on"):(this.parent[""+t]("data-ready",this.onDataReady,this),this.parent[""+t]("refresh-virtual-block",this.refreshContentRows,this),this.fn=function(){r.observers.observes(function(e){return r.scrollListeners(e)},r.onEnteredAction(),r.parent),r.parent.off("content-ready",r.fn)},this.parent.addEventListener("dataBound",this.dataBoundEvent.bind(this)),this.parent.addEventListener("rowSelected",this.rowSelectedEvent.bind(this)),this.parent[""+t]("select-virtual-Row",this.toSelectVirtualRow,this),this.parent.on("content-ready",this.fn,this),this.parent.addEventListener(n.h,this.onActionComplete.bind(this)),this.parent[""+t]("virtual-scroll-edit-action-begin",this.beginEdit,this),this.parent[""+t]("virtual-scroll-add-action-begin",this.beginAdd,this),this.parent[""+t]("virtual-scroll-edit-success",this.virtualEditSuccess,this),this.parent[""+t]("edit-reset",this.resetIseditValue,this),this.parent[""+t]("get-virtual-data",this.getData,this),this.parent[""+t]("virtual-scroll-edit-cancel",this.cancelEdit,this),this.parent[""+t]("select-row-on-context-open",this.toSelectRowOnContextOpen,this),this.parent[""+t]("refresh-virtual-editform-cells",this.refreshCell,this),this.parent[""+t]("virtaul-cell-focus",this.cellFocus,this))},t.prototype.cellFocus=function(t){e.prototype.virtualCellFocus.call(this,t)},t.prototype.onDataReady=function(t){if(e.prototype.onDataReady.call(this,t),!(this.parent.dataSource instanceof s.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url&&i.i(d.b)(this.parent))){if(!i.i(a.isNullOrUndefined)(t.count)){if(this.totalRecords=t.count,this.parent.isFrozenGrid()&&t.count<Object.keys(this.parent.dataSource).length){var r=this.parent.enableColumnVirtualization?this.getColumnOffset(this.parent.columns.length-1)+"px":"100%",n=this.parent.getRowHeight()*t.count-this.parent.getRowHeight()*this.parent.pageSettings.pageSize;i.i(a.getValue)("virtualEle",this).setVirtualHeight(n,r)}this.parent.enableColumnVirtualization||this.parent.isFrozenGrid()||i.i(a.getValue)("virtualEle",this).setVirtualHeight(this.parent.getRowHeight()*t.count,"100%")}(!i.i(a.isNullOrUndefined)(t.requestType)&&"collapseAll"===t.requestType.toString()||this.isDataSourceChanged&&(-1===this.startIndex||0===this.startIndex&&0===this.preStartIndex))&&(this.contents.scrollTop=0,this.isDataSourceChanged=!1)}},t.prototype.renderTable=function(){e.prototype.renderTable.call(this),this.parent.dataSource instanceof s.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url&&i.i(d.b)(this.parent)||(i.i(a.getValue)("observer",this).options.debounceEvent=!1,this.observers=new c(i.i(a.getValue)("observer",this).element,i.i(a.getValue)("observer",this).options),this.contents=this.getPanel().firstChild)},t.prototype.getTranslateY=function(t,r,n,o){return this.parent.dataSource instanceof s.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&!this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url||i.i(d.b)(this.parent)?this.isRemoteExpand?(this.isRemoteExpand=!1,this.preTranslate):(this.preTranslate=e.prototype.getTranslateY.call(this,t,r,n,o),e.prototype.getTranslateY.call(this,t,r,n,o)):e.prototype.getTranslateY.call(this,t,r,n,o)},t.prototype.dataBoundEvent=function(){if(!i.i(a.isNullOrUndefined)(this.parent.getRowByIndex(0))&&this.parent.getRows().length&&!this.initialRowTop){var t=this.parent.getRowByIndex(0).getBoundingClientRect().top,r=this.parent.element.getBoundingClientRect().top;this.initialRowTop=t>0?this.parent.getRowByIndex(0).getBoundingClientRect().top-r:this.content.getBoundingClientRect().top-this.parent.getRowByIndex(0).getBoundingClientRect().height}e.prototype.dataBound.call(this)},t.prototype.rowSelectedEvent=function(t){e.prototype.rowSelected.call(this,t)},t.prototype.toSelectVirtualRow=function(t){if(!this.parent.isEdit){i.i(a.isNullOrUndefined)(this.observer.containerRect)&&(this.observer.containerRect=this.observers.containerRect),(i.i(a.isNullOrUndefined)(this.parent.clipboardModule.treeGridParent.editModule)||0!==t.selectedIndex||i.i(a.isNullOrUndefined)(this.parent.clipboardModule.treeGridParent.editModule.addRowIndex))&&e.prototype.selectVirtualRow.call(this,t)}},t.prototype.refreshCell=function(e){e.cells=this.generateCells()},t.prototype.generateCells=function(){for(var e=[],t=0;t<this.parent.columns.length;t++)e.push(this.generateCell(this.parent.columns[parseInt(t.toString(),10)]));return e},t.prototype.generateCell=function(e,t,n,o,s,d){var l={visible:e.visible,isDataCell:!i.i(a.isNullOrUndefined)(e.field||e.template),isTemplate:!i.i(a.isNullOrUndefined)(e.template),rowID:t,column:e,cellType:i.i(a.isNullOrUndefined)(n)?r.CellType.Data:n,colSpan:o,commands:e.commands,isForeignKey:e.isForeignColumn&&e.isForeignColumn(),foreignKeyData:e.isForeignColumn&&e.isForeignColumn()&&i.i(a.getValue)(e.field,d)};return(l.isDataCell||"checkbox"===l.column.type||l.commands)&&(l.index=s),new r.Cell(l)},t.prototype.beginEdit=function(e){this.editedRowIndex=e.index;var t='.e-row[data-rowindex="'+e.index+'"]',i=this.parent.getContent().querySelector(t).rowIndex,r=this.parent.getCurrentViewRecords()[parseInt(i.toString(),10)];e.data=r},t.prototype.beginAdd=function(t){var i={newRowPosition:this.rowPosition,addRowIndex:this.addRowIndex,dataRowIndex:this.dataRowIndex};this.parent.notify("get-row-position",i),this.rowPosition=i.newRowPosition,this.addRowIndex=i.addRowIndex,this.dataRowIndex=i.dataRowIndex;var r=this.parent.getRows(),n=r.length?+r[0].getAttribute("data-rowindex"):0,o=r.length?+r[r.length-1].getAttribute("data-rowindex"):0,a=this.parent.selectedRowIndex>=n&&this.parent.selectedRowIndex<=o;"Top"!==this.rowPosition&&"Bottom"!==this.rowPosition&&(this.isAdd=!0),"Top"!==this.rowPosition&&"Bottom"!==this.rowPosition&&(this.addRowIndex&&-1!==this.addRowIndex||-1!==this.parent.selectedRowIndex&&a)||e.prototype.addActionBegin.call(this,t)},t.prototype.restoreEditState=function(){e.prototype.restoreEdit.call(this)},t.prototype.resetIseditValue=function(){this.parent.notify("reset-edit-props",{}),"Top"!==this.rowPosition&&"Bottom"!==this.rowPosition||!this.isAdd||e.prototype.resetIsedit.call(this)},t.prototype.virtualEditSuccess=function(){var e=this.parent.getContent().querySelector(".e-content");this.isAdd&&e.querySelector(".e-addedrow")&&(this.recordAdded=!0)},t.prototype.cancelEdit=function(t){e.prototype.editCancel.call(this,t)},t.prototype.toSelectRowOnContextOpen=function(t){e.prototype.selectRowOnContextOpen.call(this,t)},t.prototype.restoreNewRow=function(){var e=this.parent.getContent().querySelector(".e-content");this.isAdd&&!e.querySelector(".e-addedrow")&&(this.parent.isEdit=!1,this.parent.editModule.addRecord(null,this.parent.root.editModule.selectedIndex))},t.prototype.getData=function(t){e.prototype.getVirtualData.call(this,t)},t.prototype.onActionComplete=function(t){if("add"===t.requestType){var i={newRowPosition:this.rowPosition,addRowIndex:this.addRowIndex,dataRowIndex:this.dataRowIndex};this.parent.notify("get-row-position",i),this.rowPosition=i.newRowPosition,this.addRowIndex=i.addRowIndex,this.dataRowIndex=this.parent.root.editModule.selectedIndex}e.prototype.actionComplete.call(this,t)},t.prototype.onEnteredAction=function(){var e=this;return function(t,i,r,n,o,s){if(!e.parent.directVirtualRender){!a.Browser.isIE||o||!s||e.preventEvent||e.parent.enableVirtualMaskRow||e.parent.showSpinner(),e.parent.enableVirtualMaskRow&&!e.preventEvent&&setTimeout(function(){e.parent.showMaskRow(i.axis),e.parent.notify("showGanttShimmer",{requestType:"showShimmer"})},0);var d=e.content.getBoundingClientRect().height,l=e.prevInfo.offsets?e.prevInfo.offsets.top:null,p="X"===i.axis,c=e.getColumnOffset(p?e.vgenerator.getColumnIndexes()[0]-1:e.prevInfo.columnIndexes[0]-1);if(p){var h=Object.keys(e.vgenerator.cOffsets).length-e.prevInfo.columnIndexes.length,u=e.vgenerator.cOffsets[h-1];c=c>u?u:c}var g=e.getTranslateY(n.top,d,p&&l===n.top?e.prevInfo:void 0,!0);if(!e.parent.isFrozenGrid()||e.parent.enableVirtualMaskRow){if(e.parent.enableVirtualMaskRow){var f=n.top-e.translateY<0;g=Math.round(e.translateY)>g&&!f?Math.round(e.translateY):g,e.virtualEle.adjustTable(c,g)}else e.virtualEle.adjustTable(c,e.translateY);e.parent.enableColumnVirtualization&&e.header.virtualEle.adjustTable(c,0)}}}},t.prototype.scrollListeners=function(e){this.scrollAfterEdit();var t=e.sentinel,r=this.parent.getRowHeight(),n=this.parent.pageSettings.pageSize-Math.ceil(this.parent.pageSettings.pageSize/2),o=this.parent.getContent().querySelector(".e-content"),l=n*r,p=e.offset.top-this.translateY<0,c=Math.ceil(e.offset.top-this.translateY)+r>=l,h=this.parent.currentViewData;if(p&&"right"!==e.direction&&"left"!==e.direction){var u=+(this.parent.height.toString().indexOf("%")<0?parseInt(this.parent.height.toString(),10):this.parent.element.getBoundingClientRect().height),g=~~(o.scrollTop/r)+Math.ceil(u/r)-this.parent.pageSettings.pageSize;if(g=g>0?g:0,i.i(a.isNullOrUndefined)(this.selectedRowIndex)||-1===this.selectedRowIndex||g===this.selectedRowIndex||(g=this.selectedRowIndex),this.startIndex=g,this.endIndex=g+this.parent.pageSettings.pageSize,this.endIndex>this.totalRecords){var f=this.totalRecords-1,y=this.endIndex%f;this.endIndex=f,this.startIndex=this.startIndex-y<0?0:this.startIndex-y}h.length&&h[0].index>=this.parent.pageSettings.pageSize/2&&h[0].index-this.startIndex<this.parent.pageSettings.pageSize/2&&this.parent.selectionModule.isRowSelected&&(this.startIndex=h[0].index-this.parent.pageSettings.pageSize/2,this.endIndex=this.startIndex+this.parent.pageSettings.pageSize);var m=Math.ceil(e.offset.top/r);m%=this.parent.pageSettings.pageSize;var v=0;if(!i.i(a.isNullOrUndefined)(this.parent.getRows()[parseInt(m.toString(),10)])&&!i.i(a.isNullOrUndefined)(this.parent.getContent().querySelectorAll(".e-content tr")[parseInt(m.toString(),10)])){v=+this.parent.getContent().querySelectorAll(".e-content tr")[parseInt(m.toString(),10)].querySelector("td").getAttribute("index")}0===v?(e.offset.top=o.scrollTop,this.parent.allowRowDragAndDrop?this.translateY=e.offset.top-2*r:this.translateY=e.offset.top):this.translateY=e.offset.top-n*r>0?e.offset.top-n*r+10:0}else if(c&&"right"!==e.direction&&"left"!==e.direction){var S=~~(o.scrollTop/r),I=!(this.selectedRowIndex+this.parent.pageSettings.pageSize<this.totalRecords);i.i(a.isNullOrUndefined)(this.selectedRowIndex)||-1===this.selectedRowIndex||S===this.selectedRowIndex||I||(S=this.selectedRowIndex);var w=S+this.parent.pageSettings.pageSize;w>this.totalRecords&&(w=S+(this.totalRecords-S)),this.startIndex=!I||i.i(a.isNullOrUndefined)(this.selectedRowIndex)?w-this.parent.pageSettings.pageSize:S,this.endIndex=w,S+this.parent.pageSettings.pageSize>this.totalRecords&&this.endIndex-this.startIndex<this.parent.pageSettings.pageSize/2&&this.endIndex-S<this.parent.pageSettings.pageSize/2&&(this.startIndex=w-this.parent.pageSettings.pageSize/2),h.length&&this.startIndex>h[0].index&&this.startIndex-h[0].index<this.parent.pageSettings.pageSize/2&&this.parent.selectionModule.isRowSelected&&(this.startIndex=h[0].index+this.parent.pageSettings.pageSize/2),e.offset.top>r*this.totalRecords?this.translateY=this.getTranslateY(e.offset.top,o.getBoundingClientRect().height):this.totalRecords===this.endIndex?this.translateY=this.totalRecords*r-(this.endIndex-this.startIndex)*r:this.parent.allowRowDragAndDrop?this.translateY=e.offset.top-2*r:this.translateY=e.offset.top}if(c&&e.offset.top<r*this.totalRecords||p||"right"===e.direction||"left"===e.direction||this.parent.dataSource instanceof s.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&!this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url&&(c||p)||i.i(d.b)(this.parent)){var R=this.currentInfo=i.i(a.getValue)("getInfoFromView",this).apply(this,[e.direction,t,e.offset]);this.previousInfo=R,this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization?R.columnIndexes:[]);var x=R.loadNext&&!R.loadSelf?R.nextInfo.page:R.page;this.parent.setProperties({pageSettings:{currentPage:x}},!0),this.requestType="virtualscroll","right"!==e.direction&&"left"!==e.direction&&(R.event="refresh-virtual-block"===R.event?"model-changed":R.event),this.parent.enableVirtualMaskRow&&(this.parent.showMaskRow(t.axis),this.parent.addShimmerEffect(),this.parent.notify("showGanttShimmer",{requestType:"showShimmer"})),this.parent.notify(R.event,{requestType:"virtualscroll",virtualInfo:R,focusElement:e.focusElement})}else this.parent.enableVirtualMaskRow&&(this.parent.removeMaskRow(),this.parent.notify("removeGanttShimmer",{requestType:"hideShimmer"}))},t.prototype.appendContent=function(t,r,o){if(this.parent.dataSource instanceof s.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&!this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url||i.i(d.b)(this.parent)||this.parent.isFrozenGrid())i.i(a.getValue)("isExpandCollapse",o)&&(this.isRemoteExpand=!0),e.prototype.appendContent.call(this,t,r,o),-1!==i.i(a.getValue)("requestTypes",this).indexOf("isFrozen")&&(i.i(a.getValue)("requestTypes",this).splice(i.i(a.getValue)("requestTypes",this).indexOf("isFrozen"),1),this.requestType="isFrozen"===this.requestType?void 0:this.requestType);else{var l=o.virtualInfo.sentinelInfo&&"Y"===o.virtualInfo.sentinelInfo.axis&&i.i(a.getValue)("currentInfo",this).page&&i.i(a.getValue)("currentInfo",this).page!==o.virtualInfo.page?i.i(a.getValue)("currentInfo",this):o.virtualInfo,p=l.columnIndexes[0]-1,c=this.getColumnOffset(p),h=void 0;if(this.parent.enableColumnVirtualization){this.header.virtualEle.adjustTable(c,0);var u=l.columnIndexes;h=this.getColumnOffset(u[u.length-1])-this.getColumnOffset(u[0]-1)+"",this.header.virtualEle.setWrapperWidth(h)}this.virtualEle.setWrapperWidth(h,a.Browser.isIE||"edge"===a.Browser.info.name),t=this.parent.createElement("tbody"),t.appendChild(r);this.getTable().querySelector("tbody").replaceWith(t),this.isExpandCollapse&&0!==this.translateY?this.isExpandCollapse=!1:(this.translateY=this.translateY<0?0:this.translateY,i.i(a.getValue)("virtualEle",this).adjustTable(c,this.translateY)),i.i(a.setValue)("prevInfo",this.previousInfo?this.previousInfo:l,this),"virtualscroll"===o.requestType&&"X"===o.virtualInfo.sentinelInfo.axis&&this.parent.notify(n.i,{});e.prototype.focusCell.call(this,o);this.isAdd&&!this.parent.getContent().querySelector(".e-content").querySelector(".e-addedrow")&&"Top"!==this.rowPosition&&"Bottom"!==this.rowPosition&&(this.dataRowIndex>=this.startIndex?this.restoreNewRow():this.addRowIndex&&this.addRowIndex>-1&&(this.isAdd=!1,this.parent.isEdit=!1)),this.restoreEditState(),e.prototype.restoreAdd.call(this),e.prototype.ensureSelectedRowPosition.call(this)}},t.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("data-ready",this.onDataReady),this.parent.off("content-ready",this.fn),this.parent.off("select-virtual-Row",this.toSelectVirtualRow),this.parent.off("dataBound",this.dataBoundEvent),this.parent.off("rowSelected",this.rowSelectedEvent),this.parent.off(n.d,this.virtualOtherAction),this.parent.off(n.f,this.indexModifier),this.parent.off("virtual-scroll-edit-action-begin",this.beginEdit),this.parent.off("virtual-scroll-add-action-begin",this.beginAdd),this.parent.off("virtual-scroll-edit-success",this.virtualEditSuccess),this.parent.off("edit-reset",this.resetIseditValue),this.parent.off("get-virtual-data",this.getData),this.parent.off("virtual-scroll-edit-cancel",this.cancelEdit),this.parent.off("select-row-on-context-open",this.toSelectRowOnContextOpen),this.parent.off("refresh-virtual-editform-cells",this.refreshCell),this.parent.off("virtaul-cell-focus",this.cellFocus))},t}(r.VirtualContentRenderer),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isWheeling=!1,t.newPos=0,t.lastPos=0,t.timer=0,t}return l(t,e),t.prototype.observes=function(t,r,n){if(e.prototype.containerRect=i.i(a.getValue)("options",this).container.getBoundingClientRect(),a.EventHandler.add(i.i(a.getValue)("options",this).container,"scroll",this.virtualScrollHandlers(t,r,n),this),i.i(a.getValue)("options",this).movableContainer){e.prototype.movableContainerRect=i.i(a.getValue)("options",this).movableContainer.getBoundingClientRect(),a.EventHandler.add(i.i(a.getValue)("options",this).movableContainer,"scroll",this.virtualScrollHandlers(t,r,n),this)}},t.prototype.clear=function(){this.lastPos=null},t.prototype.virtualScrollHandlers=function(e,t,r){var n=this,o="chrome"===a.Browser.info.name?200:100,l=i.i(a.debounce)(e,o),p=i.i(a.debounce)(e,50);return this.options.prevTop=this.options.prevLeft=0,function(o){var a=n.options.movableContainer?n.options.container.scrollTop:o.target.scrollTop,c=n.options.movableContainer?n.options.scrollbar.scrollLeft:o.target.scrollLeft,h=n.options.prevTop<a?"down":"up";h=n.options.prevLeft===c?h:n.options.prevLeft<c?"right":"left",n.options.prevTop=a,n.options.prevLeft=c;var u=n.sentinelInfo[""+h],g=0;if(n.newPos=a,null!=n.lastPos&&(g=n.newPos-n.lastPos),n.lastPos=n.newPos,n.timer&&clearTimeout(n.timer),n.timer=setTimeout(n.clear,0),(g>100||g<-100)&&o&&o.preventDefault&&(o.returnValue=!1,o.preventDefault()),-1!==n.options.axes.indexOf(u.axis)){n.containerRect=n.options.container.getBoundingClientRect();var f=n.check(h);if(u.entered&&("X"===u.axis||r.enableVirtualMaskRow)&&(!n.movableEle||"right"!==h&&"left"!==h?t(n.element,u,h,{top:a,left:c},n.fromWheel,f):t(n.movableEle,u,h,{top:a,left:c},n.fromWheel,f)),f){var y=p;"X"===u.axis?y({direction:h,sentinel:u,offset:{top:a,left:c},focusElement:document.activeElement}):r.dataSource instanceof s.DataManager&&void 0!==r.dataSource.dataSource.url&&!r.dataSource.dataSource.offline&&""!==r.dataSource.dataSource.url||i.i(d.b)(r)||r.enableVirtualMaskRow?(y=r.enableVirtualMaskRow?l:y)({direction:h,sentinel:u,offset:{top:a,left:c},focusElement:document.activeElement}):e({direction:h,sentinel:u,offset:{top:a,left:c},focusElement:document.activeElement})}n.fromWheel=!1}}},t}(r.InterSectionObserver)},function(e,t){e.exports=n}])});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionGrids"),require("SyncfusionBase"),require("SyncfusionData"),require("SyncfusionPopups"),require("SyncfusionButtons")):"function"==typeof define&&define.amd?define(["SyncfusionGrids","SyncfusionBase","SyncfusionData","SyncfusionPopups","SyncfusionButtons"],t):"object"==typeof exports?exports.SyncfusionTreegrid=t(require("SyncfusionGrids"),require("SyncfusionBase"),require("SyncfusionData"),require("SyncfusionPopups"),require("SyncfusionButtons")):e.SyncfusionTreegrid=t(e.SyncfusionGrids,e.SyncfusionBase,e.SyncfusionData,e.SyncfusionPopups,e.SyncfusionButtons)}(this,function(e,t,i,r,n){return function(e){function t(r){if(i[r])return i[r].exports;var n=i[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,r){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=27)}([function(t,i){t.exports=e},function(e,i){e.exports=t},function(e,t,i){"use strict";i.d(t,"K",function(){return r}),i.d(t,"J",function(){return n}),i.d(t,"L",function(){return o}),i.d(t,"D",function(){return a}),i.d(t,"M",function(){return s}),i.d(t,"v",function(){return d}),i.d(t,"N",function(){return l}),i.d(t,"h",function(){return p}),i.d(t,"O",function(){return c}),i.d(t,"E",function(){return h}),i.d(t,"j",function(){return u}),i.d(t,"F",function(){return g}),i.d(t,"G",function(){return f}),i.d(t,"I",function(){return y}),i.d(t,"H",function(){return m}),i.d(t,"P",function(){return v}),i.d(t,"Q",function(){return S}),i.d(t,"R",function(){return I}),i.d(t,"S",function(){return w}),i.d(t,"T",function(){return R}),i.d(t,"U",function(){return x}),i.d(t,"b",function(){return C}),i.d(t,"a",function(){return b}),i.d(t,"V",function(){return D}),i.d(t,"W",function(){return M}),i.d(t,"X",function(){return O}),i.d(t,"C",function(){return P}),i.d(t,"Y",function(){return E}),i.d(t,"Z",function(){return A}),i.d(t,"k",function(){return N}),i.d(t,"l",function(){return _}),i.d(t,"m",function(){return k}),i.d(t,"n",function(){return U}),i.d(t,"o",function(){return q}),i.d(t,"x",function(){return V}),i.d(t,"r",function(){return B}),i.d(t,"_0",function(){return T}),i.d(t,"p",function(){return L}),i.d(t,"y",function(){return j}),i.d(t,"A",function(){return z}),i.d(t,"z",function(){return F}),i.d(t,"B",function(){return G}),i.d(t,"w",function(){return H}),i.d(t,"q",function(){return Q}),i.d(t,"_1",function(){return K}),i.d(t,"s",function(){return W}),i.d(t,"_2",function(){return Y}),i.d(t,"d",function(){return J}),i.d(t,"c",function(){return X}),i.d(t,"e",function(){return Z}),i.d(t,"f",function(){return $}),i.d(t,"t",function(){return ee}),i.d(t,"u",function(){return te}),i.d(t,"_3",function(){return ie}),i.d(t,"_4",function(){return re}),i.d(t,"_5",function(){return ne}),i.d(t,"_6",function(){return oe}),i.d(t,"_7",function(){return ae}),i.d(t,"_8",function(){return se}),i.d(t,"_9",function(){return de}),i.d(t,"_10",function(){return le}),i.d(t,"_11",function(){return pe}),i.d(t,"_12",function(){return ce}),i.d(t,"i",function(){return he}),i.d(t,"_13",function(){return ue}),i.d(t,"_14",function(){return ge}),i.d(t,"_15",function(){return fe}),i.d(t,"_16",function(){return ye}),i.d(t,"_17",function(){return me}),i.d(t,"_18",function(){return ve}),i.d(t,"_19",function(){return Se}),i.d(t,"_20",function(){return Ie}),i.d(t,"_21",function(){return we}),i.d(t,"_22",function(){return Re}),i.d(t,"_23",function(){return xe}),i.d(t,"_24",function(){return Ce}),i.d(t,"_25",function(){return be}),i.d(t,"g",function(){return De}),i.d(t,"_26",function(){return Me});var r="load",n="rowDataBound",o="dataBound",a="queryCellInfo",s="beforeDataBound",d="actionBegin",l="dataStateChange",p="actionComplete",c="rowSelecting",h="rowSelected",u="checkboxChange",g="rowDeselected",f="toolbarClick",y="beforeExcelExport",m="beforePdfExport",v="resizeStop",S="expanded",I="expanding",w="collapsed",R="collapsing",x="remoteExpand",C="localPagedExpandCollapse",b="pagingActions",D="printGrid-Init",M="contextMenuOpen",O="contextMenuClick",P="beforeCopy",E="beforePaste",A="savePreviousRowPosition",N="crudAction",_="beginEdit",k="beginAdd",U="recordDoubleClick",q="cellSave",V="cellSaved",B="cellEdit",T="batchDelete",L="batchCancel",j="batchAdd",z="beforeBatchDelete",F="beforeBatchAdd",G="beforeBatchSave",H="batchSave",Q="key-pressed",K="update-data",W="double-tap",Y="virtualColumnIndex",J="virtual-action-args",X="destroy",Z="data-listener",$="index-modifier",ee="edit-form",te="before-batch-cancel",ie="batcheditform-rendered",re="detailDataBound",ne="rowDrag",oe="rowDragStartHelper",ae="rowDrop",se="rowDragStart",de="rows-add",le="rows-remove",pe="row-draging",ce="row-dropped",he="auto-col",ue="rowDeselecting",ge="e-headercontent",fe="e-movablecontent",ye="e-movableheader",me="e-frozencontent",ve="e-frozenheader",Se="e-content",Ie="e-table",we="Left-Right",Re="frozen-right",xe="frozen-left",Ce="data-colindex",be="aria-colindex",De="data-rowindex",Me="aria-rowindex"},function(e,t,i){"use strict";function r(e){if(e.dataSource instanceof y.DataManager){var t=e.dataSource.adaptor;return t instanceof y.ODataAdaptor||t instanceof y.WebApiAdaptor||t instanceof y.WebMethodAdaptor||t instanceof y.CacheAdaptor||t instanceof y.UrlAdaptor}return!1}function n(e){return!!(e.dataSource&&"result"in e.dataSource)}function o(e){for(var t=0;t<e.columns.length;t++)if(e.columns[parseInt(t.toString(),10)].showCheckbox)return!0;return!1}function a(e){return!((i.i(m.isNullOrUndefined)(e.grid.searchSettings.key)||""===e.grid.searchSettings.key||"Child"!==e.searchSettings.hierarchyMode&&"None"!==e.searchSettings.hierarchyMode)&&(!e.allowFiltering||!e.grid.filterSettings.columns.length||"Child"!==e.filterSettings.hierarchyMode&&"None"!==e.filterSettings.hierarchyMode))}function s(e){for(var t=[],r=Object.keys(e).length,n=0,o=r;n<o;n++){i.i(f.getObject)("hasChildRecords",e[parseInt(n.toString(),10)])&&t.push(e[parseInt(n.toString(),10)])}return t}function d(e,t,r){var n,o=i.i(m.isNullOrUndefined)(t.parentItem)?null:u(e,t.parentItem.uniqueID);return null==o||(!e.initialRender||i.i(m.isNullOrUndefined)(o[e.expandStateMapping])||o[e.expandStateMapping]?!1!==o.expanded&&(!o.parentItem||(n=u(e,o.parentItem.uniqueID),n&&e.initialRender&&!i.i(m.isNullOrUndefined)(n[e.expandStateMapping])&&!n[e.expandStateMapping]?(n.expanded=!1,!1):(!n||!1!==n.expanded)&&(!n||d(e,n,r)))):(o.expanded=!1,!1))}function l(e){var t=[];if(i.i(m.isNullOrUndefined)(e)||!e.hasChildRecords&&!i.i(m.isNullOrUndefined)(e.childRecords)&&!e.childRecords.length)return[];if(!i.i(m.isNullOrUndefined)(e.childRecords))for(var r=e.childRecords.filter(function(e){return!e.isSummaryRow}),n=Object.keys(r),o=0,a=n.length;o<a;o++)t.push(r[parseInt(o.toString(),10)]),(r[parseInt(o.toString(),10)].hasChildRecords||!i.i(m.isNullOrUndefined)(r[parseInt(o.toString(),10)].childRecords)&&r[parseInt(o.toString(),10)].childRecords.length)&&(t=t.concat(l(r[parseInt(o.toString(),10)])));return t}function p(e){if(r(e)){var t=e.dataSource;return!i.i(m.isNullOrUndefined)(t.ready)}return!0}function c(e){for(var t,i,r=[],n=0;e&&n<e.length;n++){i=Object.keys(e[parseInt(n.toString(),10)]),t={};for(var o=0;o<i.length;o++)t[i[parseInt(o.toString(),10)]]=e[parseInt(n.toString(),10)][i[parseInt(o.toString(),10)]];r.push(t)}return r}function h(e){return delete e.hasChildRecords,delete e.childRecords,delete e.index,delete e.parentItem,delete e.level,delete e.taskData,delete e.uniqueID,e}function u(e,t,i){if(i){return e.uniqueIDFilterCollection[""+t]}return e.uniqueIDCollection[""+t]}function g(e){var t=window.getComputedStyle(e);return"none"===t.display||"hidden"===t.visibility}t.a=r,t.b=n,t.c=o,t.d=a,t.e=s,t.f=d,t.g=l,t.h=p,t.i=c,t.j=h,t.k=u,t.l=g;var f=i(0),y=(i.n(f),i(4)),m=(i.n(y),i(1));i.n(m)},function(e,t){e.exports=i},function(e,t,i){"use strict";function r(e,t,r,p,c,h,u){var g,f,y,m=e.value,v=e.action,S=t.grid.getPrimaryKeyFieldNames()[0],I=t.dataSource instanceof d.DataManager?t.dataSource.dataSource.json:t.dataSource,w=[],R=m,x=!1;if("Batch"===t.editSettings.mode&&(y=t.grid.editModule.getBatchChanges()),"add"===v||"batchsave"===v&&"Batch"===t.editSettings.mode&&y.addedRecords.length){var C=n(e,I,t,r,p,c,u);m=C.value,x=C.isSkip}if(m instanceof Array?w=i.i(l.i)(m):w.push(i.i(s.extend)({},m)),!x&&("add"!==v||"Top"!==t.editSettings.newRowPosition&&"Bottom"!==t.editSettings.newRowPosition))for(var b=0;b<w.length;b++){"object"==typeof w[parseInt(b.toString(),10)][""+S]&&(w[parseInt(b.toString(),10)]=w[parseInt(b.toString(),10)][""+S]);var D=w[parseInt(b.toString(),10)].taskData?Object.keys(w[parseInt(b.toString(),10)].taskData):Object.keys(w[parseInt(b.toString(),10)]);g=I.length;for(;g--&&g>=0;){var M=function(){if(I[parseInt(g.toString(),10)][""+S]===w[parseInt(b.toString(),10)][""+S]){if("delete"!==v){if("edit"===v){for(f=0;f<D.length;f++)if(Object.prototype.hasOwnProperty.call(I[parseInt(g.toString(),10)],D[parseInt(f.toString(),10)])&&("Cell"!==t.editSettings.mode||!i.i(s.isNullOrUndefined)(y)&&0===y.changedRecords.length||D[parseInt(f.toString(),10)]===h)){var e=i.i(l.k)(t,w[parseInt(b.toString(),10)].uniqueID);I[parseInt(g.toString(),10)][D[parseInt(f.toString(),10)]]=w[parseInt(b.toString(),10)][D[parseInt(f.toString(),10)]],e&&e.taskData&&(e.taskData[D[parseInt(f.toString(),10)]]=e[D[parseInt(f.toString(),10)]]=I[parseInt(g.toString(),10)][D[parseInt(f.toString(),10)]])}}else if("add"===v||"batchsave"===v){var n=void 0;"Child"===t.editSettings.newRowPosition?r?(R.taskData[""+t.parentIdMapping]=I[parseInt(g.toString(),10)][""+t.idMapping],I.splice(g+1,0,R.taskData)):(Object.prototype.hasOwnProperty.call(I[parseInt(g.toString(),10)],t.childMapping)||(I[parseInt(g.toString(),10)][""+t.childMapping]=[]),I[parseInt(g.toString(),10)][""+t.childMapping].push(R.taskData),a(S,I[parseInt(g.toString(),10)],v,t,r,R)):"Below"===t.editSettings.newRowPosition?(I.splice(g+1,0,R.taskData),i.i(s.isNullOrUndefined)(R.parentItem)||a(S,I[g+1],v,t,r,R)):p?"Above"===t.editSettings.newRowPosition&&(I.splice(g,0,R.taskData),i.i(s.isNullOrUndefined)(R.parentItem)||a(S,I[parseInt(g.toString(),10)],v,t,r,R)):(n=0,I.splice(n,0,R.taskData))}return"break"}var d=I[parseInt(g.toString(),10)];if(I.splice(g,1),r){if(!i.i(s.isNullOrUndefined)(d[""+t.parentIdMapping]))for(var c=t.flatData.filter(function(e){return e[""+t.idMapping]===d[""+t.parentIdMapping]})[0],u=c?c[""+t.childMapping]:[],m=u.length-1;m>=0;m--)if(u[parseInt(m.toString(),10)][""+t.idMapping]===d[""+t.idMapping]){t.enableImmutableMode||c.childRecords.length!==c.Children.length||c.childRecords.splice(m,1),u.splice(m,1),u.length||(c.hasChildRecords=!1,a(S,c,v,t,r));break}return"break"}}else i.i(s.isNullOrUndefined)(I[parseInt(g.toString(),10)][""+t.childMapping])||o(I[parseInt(g.toString(),10)][""+t.childMapping],w[parseInt(b.toString(),10)],v,S,t,r,R,h)&&a(S,I[parseInt(g.toString(),10)],v,t,r)}();if("break"===M)break}}}function n(e,t,r,n,o,a,d){var p,c=!1,h=r.grid.getCurrentViewRecords();switch(p=i.i(s.extend)({},e.value),p=i.i(l.j)(p),r.editSettings.newRowPosition){case"Top":t.unshift(p),c=!0;break;case"Bottom":t.push(p),c=!0;break;case"Above":i.i(s.isNullOrUndefined)(d)?(p=i.i(s.extend)({},h[o+1]),p=i.i(l.j)(p)):(p=i.i(s.extend)({},d),p=i.i(l.j)(p));break;case"Below":case"Child":if(i.i(s.isNullOrUndefined)(d)){var u=r.grid.getPrimaryKeyFieldNames()[0],g=h[parseInt(o.toString(),10)];p=!i.i(s.isNullOrUndefined)(g)&&g[""+u]===e.value[""+u]||-1!==a?i.i(s.extend)({},g):i.i(s.extend)({},e.value),p=i.i(l.j)(p);r.editModule.internalProperties.taskData=p}else p=i.i(s.extend)({},d),p=i.i(l.j)(p);-1===a&&(t.unshift(p),c=!0)}return{value:p,isSkip:c}}function o(e,t,r,n,d,p,c,h){for(var u=!1,g=e.length;g--&&g>=0;)if(e[parseInt(g.toString(),10)][""+n]===t[""+n]||p&&e[parseInt(g.toString(),10)][d.parentIdMapping]===t[d.idMapping]){if("edit"===r){for(var f=Object.keys(t),y=i.i(l.k)(d,t.uniqueID),m=0;m<f.length;m++)if(Object.prototype.hasOwnProperty.call(e[parseInt(g.toString(),10)],f[parseInt(m.toString(),10)])&&("Cell"!==d.editSettings.mode||f[parseInt(m.toString(),10)]===h)&&(y[f[parseInt(m.toString(),10)]]=y.taskData[f[parseInt(m.toString(),10)]]=e[parseInt(g.toString(),10)][f[parseInt(m.toString(),10)]]=t[f[parseInt(m.toString(),10)]],"Normal"===d.grid.editSettings.mode&&"Cell"===d.editSettings.mode)){d.grid.editModule.editModule.editRowIndex=t.index,d.grid.editModule.editModule.updateCurrentViewData(t)}break}"add"===r||"batchsave"===r?"Child"===d.editSettings.newRowPosition?p?(c[""+d.parentIdMapping]=e[parseInt(g.toString(),10)][d.idMapping],e.splice(g+1,0,c),a(n,e[parseInt(g.toString(),10)],r,d,p,c)):(Object.prototype.hasOwnProperty.call(e[parseInt(g.toString(),10)],d.childMapping)||(e[parseInt(g.toString(),10)][d.childMapping]=[]),e[parseInt(g.toString(),10)][d.childMapping].push(c.taskData),a(n,e[parseInt(g.toString(),10)],r,d,p,c)):"Above"===d.editSettings.newRowPosition?(e.splice(g,0,c.taskData),i.i(s.isNullOrUndefined)(c.parentItem)||a(n,e[parseInt(g.toString(),10)],r,d,p,c)):"Below"===d.editSettings.newRowPosition&&(e.splice(g+1,0,c.taskData),i.i(s.isNullOrUndefined)(c.parentItem)||a(n,e[parseInt(g.toString(),10)],r,d,p,c)):(e.splice(g,1),e.length||(u=!0))}else i.i(s.isNullOrUndefined)(e[parseInt(g.toString(),10)][d.childMapping])||o(e[parseInt(g.toString(),10)][d.childMapping],t,r,n,d,p,c,h)&&a(n,e[parseInt(g.toString(),10)],r,d,p);return u}function a(e,t,r,n,o,a){if("Above"!==n.editSettings.newRowPosition&&"Below"!==n.editSettings.newRowPosition||"add"!==r&&"batchsave"!==r||i.i(s.isNullOrUndefined)(a.parentItem)){var p,c=n.grid.getCurrentViewRecords();if(c.map(function(i,r){if(i[""+e]===t[""+e])return void(p=r)}),n.enableVirtualization&&i.i(s.isNullOrUndefined)(p)){var h=i.i(s.getValue)("uniqueIDCollection."+a.parentUniqueID,n);t=h}if(i.i(s.isNullOrUndefined)(p)||(t=c[parseInt(p.toString(),10)]),n.enableVirtualization&&i.i(s.isNullOrUndefined)(t)&&!i.i(s.isNullOrUndefined)(a)&&(t=i.i(s.getValue)("uniqueIDCollection."+a.parentUniqueID,n)),o||i.i(s.isNullOrUndefined)(t.childRecords)||!t.childRecords.length?t.hasChildRecords=!1:t.hasChildRecords=!0,"add"===r||"batchsave"===r){t.expanded=!0,t.hasChildRecords=!0,n.sortSettings.columns.length&&i.i(s.isNullOrUndefined)(a)&&(a=c.filter(function(e){return e.parentUniqueID===t.uniqueID?e:null}));var u=a?a instanceof Array?a[0]:a:c[p+1];"Below"!==n.editSettings.newRowPosition&&(Object.prototype.hasOwnProperty.call(t,"childRecords")?i.i(s.isNullOrUndefined)(a)||t[""+e]===a[""+e]||t.childRecords.push(a):t.childRecords=[],-1===t.childRecords.indexOf(u)&&t[""+e]!==a[""+e]&&t.childRecords.unshift(u),o&&(Object.prototype.hasOwnProperty.call(t,n.childMapping)||(t[n.childMapping]=[]),-1===t[""+n.childMapping].indexOf(u)&&t[""+e]!==a[""+e]&&t[n.childMapping].unshift(u)))}for(var g=n.grid.getPrimaryKeyFieldNames()[0],f=n.grid.dataSource instanceof d.DataManager?n.grid.dataSource.dataSource.json:n.grid.dataSource,y=0;y<f.length;y++)if(f[parseInt(y.toString(),10)][""+g]===t[""+g]){f[parseInt(y.toString(),10)]=t;break}n.grid.setRowData(e,t);var m=n.getRowByIndex(p);"Batch"===n.editSettings.mode&&(m="add"===r?n.getRows()[n.grid.getCurrentViewRecords().indexOf(t)]:n.getRows()[n.grid.getRowIndexByPrimaryKey(t[""+e])]);var v=void 0;if((n.frozenRows||n.getFrozenColumns())&&(v=n.getRowByIndex(p)),!n.enableVirtualization&&!i.i(s.isNullOrUndefined)(m)||!i.i(s.isNullOrUndefined)(v)){var S=n.treeColumnIndex;n.allowRowDragAndDrop&&n.enableImmutableMode&&(S+=1),n.renderModule.cellRender({data:t,cell:m.cells[parseInt(S.toString(),10)]?m.cells[parseInt(S.toString(),10)]:v.cells[S-n.getFrozenColumns()],column:n.grid.getColumns()[n.treeColumnIndex],requestType:r}),(n.enableImmutableMode&&"indenting"===n.action||"outdenting"===n.action)&&n.renderModule.RowModifier({data:t,row:m})}}else{i.i(l.k)(n,a.parentItem.uniqueID).childRecords.push(a)}}t.a=r,t.b=a;var s=i(1),d=(i.n(s),i(4)),l=(i.n(d),i(3))},function(e,t){e.exports=r},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(2),n=i(1),o=(i.n(n),i(0)),a=(i.n(o),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),s=function(e){function t(t,i){var r=e.call(this,t.grid,i)||this;return r.treeCopyContent="",r.copiedUniqueIdCollection=[],r.treeGridParent=t,r.serviceLocator=i,r}return a(t,e),t.prototype.setCopyData=function(t){var i=this.treeGridParent.getCurrentViewRecords();if(""===window.getSelection().toString()){this.clipBoardTextArea.value=this.copyContent="";var o=this.treeGridParent.grid.getRows();if("Cell"!==this.treeGridParent.selectionSettings.mode){for(var a=this.treeGridParent.getSelectedRowIndexes().sort(function(e,t){return e-t}),s=0;s<a.length;s++)if(s>0&&(this.treeCopyContent+="\n"),!o[a[parseInt(s.toString(),10)]].classList.contains("e-summaryrow")){var d=[].slice.call(o[a[parseInt(s.toString(),10)]].querySelectorAll(".e-rowcell")),l=this.treeGridParent.getSelectedRecords()[parseInt(s.toString(),10)].uniqueID;-1===this.copiedUniqueIdCollection.indexOf(l)&&("Parent"!==this.treeGridParent.copyHierarchyMode&&"Both"!==this.treeGridParent.copyHierarchyMode||this.parentContentData(i,a[parseInt(s.toString(),10)],o,t,s),this.getCopyData(d,!1,"\t",t),this.treeCopyContent+=this.copyContent,this.copiedUniqueIdCollection.push(l),this.copyContent="","Child"!==this.treeGridParent.copyHierarchyMode&&"Both"!==this.treeGridParent.copyHierarchyMode||this.childContentData(i,a[parseInt(s.toString(),10)],o,t))}if(t){for(var p=[],s=0;s<this.treeGridParent.getVisibleColumns().length;s++)p[parseInt(s.toString(),10)]=this.treeGridParent.getVisibleColumns()[parseInt(s.toString(),10)].headerText;this.getCopyData(p,!1,"\t",t),this.treeCopyContent=this.copyContent+"\n"+this.treeCopyContent}var c={data:this.treeCopyContent,cancel:!1};if(this.treeGridParent.trigger(r.C,c),c.cancel)return;this.clipBoardTextArea.value=this.copyContent=c.data,n.Browser.userAgent.match(/ipad|ipod|iphone/i)?this.clipBoardTextArea.setSelectionRange(0,this.clipBoardTextArea.value.length):this.clipBoardTextArea.select(),this.isSelect=!0,this.copiedUniqueIdCollection=[],this.treeCopyContent=""}else e.prototype.setCopyData.call(this,t)}},t.prototype.parentContentData=function(e,t,r,o,a){if(!i.i(n.isNullOrUndefined)(e[parseInt(t.toString(),10)].parentItem))for(var s=e[parseInt(t.toString(),10)].parentItem.level,d=0;d<s+1;d++)for(var l=0;l<e.length;l++)if(!i.i(n.isNullOrUndefined)(e[parseInt(t.toString(),10)].parentItem)&&e[parseInt(l.toString(),10)].uniqueID===e[parseInt(t.toString(),10)].parentItem.uniqueID){t=l;var p=[].slice.call(r[parseInt(t.toString(),10)].querySelectorAll(".e-rowcell")),c=e[parseInt(l.toString(),10)].uniqueID;if(-1===this.copiedUniqueIdCollection.indexOf(c)){this.getCopyData(p,!1,"\t",o),this.treeCopyContent=a>0?this.treeCopyContent+this.copyContent+"\n":this.copyContent+"\n"+this.treeCopyContent,this.copiedUniqueIdCollection.push(c),this.copyContent="";break}}},t.prototype.copy=function(t){e.prototype.copy.call(this,t)},t.prototype.paste=function(t,i,r){e.prototype.paste.call(this,t,i,r)},t.prototype.getModuleName=function(){return"clipboard"},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.childContentData=function(e,t,r,o){if(e[parseInt(t.toString(),10)].hasChildRecords)for(var a=e[parseInt(t.toString(),10)].childRecords,s=0;s<a.length;s++)for(var d=0;d<e.length;d++)if(!i.i(n.isNullOrUndefined)(a[parseInt(s.toString(),10)].uniqueID)&&e[parseInt(d.toString(),10)].uniqueID===a[parseInt(s.toString(),10)].uniqueID){if(!i.i(n.isNullOrUndefined)(r[parseInt(d.toString(),10)])&&!r[parseInt(d.toString(),10)].classList.contains("e-summaryrow")){var l=[].slice.call(r[parseInt(d.toString(),10)].querySelectorAll(".e-rowcell")),p=e[parseInt(d.toString(),10)].uniqueID;-1===this.copiedUniqueIdCollection.indexOf(p)&&(this.getCopyData(l,!1,"\t",o),this.treeCopyContent+="\n"+this.copyContent,this.copyContent="",this.copiedUniqueIdCollection.push(p),this.childContentData(e,d,r,o))}break}},t}(o.Clipboard)},function(e,t,i){"use strict";i.d(t,"a",function(){return l}),i.d(t,"b",function(){return p});var r=i(1),n=(i.n(r),i(0)),o=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a="https://ej2.syncfusion.com/documentation/treegrid",s="https://ej2.syncfusion.com/documentation",d=!1,l=function(e){function t(t){return n.Grid.Inject(n.Logger),e.call(this,t)||this}return o(t,e),t.prototype.getModuleName=function(){return"logger"},t.prototype.log=function(e,t){e instanceof Array||(e=[e]);for(var o=e,l=0;l<o.length;l++){var p=n.detailLists[o[parseInt(l.toString(),10)]],c=p.check(t,this.parent);if(c.success){var h=p.generateMessage(t,this.parent,c.options);h=h.replace("EJ2Grid","EJ2TreeGrid").replace("* Hierarchy Grid","").replace("* Grouping",""),d&&"primary_column_missing"===o[parseInt(l.toString(),10)]&&(h=h.replace("Editing","Row DragAndDrop"),d=!1);var u=h.indexOf("https"),g=h.substring(u);"module_missing"===o[parseInt(l.toString(),10)]?h=h.replace(g,a+"/modules"):"primary_column_missing"===o[parseInt(l.toString(),10)]||"selection_key_missing"===o[parseInt(l.toString(),10)]?h=h.replace(g,s+"/api/treegrid/column/#isprimarykey"):"grid_remote_edit"===o[parseInt(l.toString(),10)]?h=h.replace(g,a+"/edit"):"virtual_height"===o[parseInt(l.toString(),10)]?h=h.replace(g,a+"/virtual"):"check_datasource_columns"===o[parseInt(l.toString(),10)]?h=h.replace(g,a+"/columns"):"locale_missing"===o[parseInt(l.toString(),10)]&&(h=h.replace(g,a+"/global-local/#localization")),"datasource_syntax_mismatch"===o[parseInt(l.toString(),10)]?i.i(r.isNullOrUndefined)(this.treeGridObj)||i.i(r.isNullOrUndefined)(this.treeGridObj.dataStateChange)||console[p.logType](h):console[p.logType](h)}}},t.prototype.treeLog=function(e,t,i){this.treeGridObj=i,e instanceof Array||(e=[e]);var r=e;i.allowRowDragAndDrop&&!i.columns.filter(function(e){return e.isPrimaryKey}).length&&(d=!0,this.log("primary_column_missing",t));for(var n=0;n<r.length;n++){var o=p[r[parseInt(n.toString(),10)]],a=o.check(t,i);if(a.success){var s=o.generateMessage(t,i,a.options);console[o.logType](s)}}},t}(n.Logger),p={mapping_fields_missing:{type:"mapping_fields_missing",logType:"error",check:function(e,t){var n={success:!1};return(i.i(r.isNullOrUndefined)(t.idMapping)&&i.i(r.isNullOrUndefined)(t.childMapping)&&i.i(r.isNullOrUndefined)(t.parentIdMapping)||!i.i(r.isNullOrUndefined)(t.idMapping)&&i.i(r.isNullOrUndefined)(t.parentIdMapping)||i.i(r.isNullOrUndefined)(t.idMapping)&&!i.i(r.isNullOrUndefined)(t.parentIdMapping))&&(n={success:!0}),n},generateMessage:function(){return"[EJ2TreeGrid.Error]: MAPPING FIELDS MISSING \nOne of the following fields is missing. It is required for the hierarchical relationship of records in TreeGrid:\n* childMapping\n* idMapping\n* parentIdMapping\nRefer to the following documentation links for more details.\n"+s+"/api/treegrid#childmapping\n"+s+"/api/treegrid#idmapping\n"+s+"/api/treegrid#$parentidmapping"}}}},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){r.Grid.Inject(r.Reorder),this.parent=e,this.addEventListener()}return e.prototype.getModuleName=function(){return"reorder"},e.prototype.addEventListener=function(){this.parent.on("getColumnIndex",this.getTreeColumn,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off("getColumnIndex",this.getTreeColumn)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.getTreeColumn=function(){for(var e,t=this.parent.columnModel[this.parent.treeColumnIndex],n=this.parent.getColumns(),o=0;o<n.length;o++){if(i.i(r.getObject)("field",t)===i.i(r.getObject)("field",n[parseInt(o.toString(),10)])){e=o;break}}this.parent.setProperties({treeColumnIndex:e},!0)},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){r.Grid.Inject(r.Resize),this.parent=e}return e.prototype.autoFitColumns=function(e){this.parent.grid.autoFitColumns(e)},e.prototype.getModuleName=function(){return"resize"},e.prototype.destroy=function(){this.parent.isDestroyed||this.parent.grid.resizeModule.destroy()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(1),n=(i.n(r),i(55)),o=(i.n(n),i(0)),a=(i.n(o),i(2)),s=i(3),d=function(){function e(e){this.parent=e,this.selectedItems=[],this.selectedIndexes=[],this.filteredList=[],this.searchingRecords=[],this.addEventListener()}return e.prototype.getModuleName=function(){return"selection"},e.prototype.addEventListener=function(){this.parent.on("dataBoundArg",this.headerCheckbox,this),this.parent.on("columnCheckbox",this.columnCheckbox,this),this.parent.on("updateGridActions",this.updateGridActions,this),this.parent.grid.on("colgroup-refresh",this.headerCheckbox,this),this.parent.on("checkboxSelection",this.checkboxSelection,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("dataBoundArg",this.headerCheckbox),this.parent.off("columnCheckbox",this.columnCheckbox),this.parent.grid.off("colgroup-refresh",this.headerCheckbox),this.parent.off("checkboxSelection",this.checkboxSelection),this.parent.off("updateGridActions",this.updateGridActions))},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.checkboxSelection=function(e){var t,r=i.i(o.getObject)("target",e),n=i.i(o.parentsUntil)(r,"e-checkbox-wrapper");if(n&&n.querySelectorAll(".e-treecheckselect").length>0){t=n.querySelector('input[type="checkbox"]');var a=[];a.push(r.closest("tr").rowIndex),this.selectCheckboxes(a),this.triggerChkChangeEvent(t,t.nextElementSibling.classList.contains("e-check"),r.closest("tr"))}else if(n&&n.querySelectorAll(".e-treeselectall").length>0&&this.parent.autoCheckHierarchy){var s=!n.querySelector(".e-frame").classList.contains("e-check")&&!n.querySelector(".e-frame").classList.contains("e-stop");this.headerSelection(s),t=n.querySelector('input[type="checkbox"]'),this.triggerChkChangeEvent(t,s,r.closest("tr"))}},e.prototype.triggerChkChangeEvent=function(e,t,i){var r=this.parent.getCurrentViewRecords()[i.rowIndex],n={checked:t,target:e,rowElement:i,rowData:e.classList.contains("e-treeselectall")?this.parent.getCheckedRecords():r};this.parent.trigger(a.j,n)},e.prototype.getCheckboxcolumnIndex=function(){for(var e,t,i=this.parent.stackedHeader?this.parent.columnModel:this.parent.columns,r=0;r<i.length;r++)i[parseInt(r.toString(),10)].showCheckbox&&(e=i[parseInt(r.toString(),10)].uid);for(var n=this.parent.getHeaderContent().querySelectorAll(".e-headercelldiv").length,o=0;o<n;o++){this.parent.getHeaderContent().querySelectorAll(".e-headercelldiv")[parseInt(o.toString(),10)].getAttribute("e-mappinguid")===e&&(t=o)}return t},e.prototype.headerCheckbox=function(){if(this.columnIndex=this.getCheckboxcolumnIndex(),this.columnIndex>-1&&0===this.parent.getHeaderContent().querySelectorAll(".e-treeselectall").length){var e=this.parent.getHeaderContent().querySelectorAll(".e-headercelldiv")[this.columnIndex],t=this.parent.createElement("input",{className:"e-treeselectall",attrs:{type:"checkbox"}}),o=i.i(n.createCheckBox)(this.parent.createElement,!1,{checked:!1,label:" "});o.classList.add("e-hierarchycheckbox"),o.insertBefore(t.cloneNode(),o.firstChild),i.i(r.isNullOrUndefined)(e)||e.insertBefore(o,e.firstChild),this.parent.autoCheckHierarchy&&this.headerSelection()}else if(this.columnIndex>-1&&this.parent.getHeaderContent().querySelectorAll(".e-treeselectall").length>0){var o=this.parent.getHeaderContent().querySelectorAll(".e-checkbox-wrapper")[0],a=o.querySelector(".e-frame").classList.contains("e-check");this.parent.autoCheckHierarchy&&a&&this.headerSelection(a)}},e.prototype.renderColumnCheckbox=function(e){var t=this.parent.createElement("input",{className:"e-treecheckselect",attrs:{type:"checkbox","aria-label":"checkbox"}}),o=e.data;e.cell.classList.add("e-treegridcheckbox"),e.cell.setAttribute("aria-label","checkbox");var a=!i.i(r.isNullOrUndefined)(o.checkboxState)&&"uncheck"!==o.checkboxState,s=i.i(n.createCheckBox)(this.parent.createElement,!1,{checked:a,label:" "});if(s.classList.add("e-hierarchycheckbox"),this.parent.allowTextWrap&&(s.querySelector(".e-frame").style.width="18px"),"indeterminate"===o.checkboxState){var d=s.querySelectorAll(".e-frame")[0];i.i(r.removeClass)([d],["e-check","e-stop","e-uncheck"]),s.querySelector(".e-frame").classList.add("e-stop")}return s.insertBefore(t.cloneNode(),s.firstChild),s},e.prototype.columnCheckbox=function(e){var t=this.renderColumnCheckbox(e),n=e.cell.querySelector(".e-treecolumn-container");if(i.i(r.isNullOrUndefined)(n)){var o=this.parent.createElement("span",{className:"e-treecheckbox"}),a=e.cell.innerHTML;e.cell.innerHTML="",o.innerHTML=a;var s=this.parent.createElement("div",{className:"e-treecheckbox-container"});s.appendChild(t),s.appendChild(o),e.cell.appendChild(s)}else e.cell.querySelector(".e-hierarchycheckbox")||n.insertBefore(t,n.querySelectorAll(".e-treecell")[0])},e.prototype.selectCheckboxes=function(e){for(var t=0;t<e.length;t++){var r=this.parent.getCurrentViewRecords()[e[parseInt(t.toString(),10)]],n=i.i(s.k)(this.parent,r.uniqueID);r=n;var o="uncheck"===r.checkboxState?"check":"uncheck";r.checkboxState=o;for(var a=Object.keys(r),d=0;d<a.length;d++)Object.prototype.hasOwnProperty.call(n,a[parseInt(d.toString(),10)])&&(n[a[parseInt(d.toString(),10)]]=r[a[parseInt(d.toString(),10)]]);this.traverSelection(r,o,!1),this.parent.autoCheckHierarchy&&this.headerSelection()}},e.prototype.traverSelection=function(e,t,n){var o=0;if(this.updateSelectedItems(e,t),!n&&e.parentItem&&this.parent.autoCheckHierarchy&&this.updateParentSelection(e.parentItem),e.childRecords&&this.parent.autoCheckHierarchy){var a=e.childRecords;!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.parent.filterModule.filteredResult.length>0&&this.parent.autoCheckHierarchy&&(a=this.getFilteredChildRecords(a)),o=a.length;for(var s=0;s<o;s++)a[parseInt(s.toString(),10)].isSummaryRow||(a[parseInt(s.toString(),10)].hasChildRecords?this.traverSelection(a[parseInt(s.toString(),10)],t,!0):this.updateSelectedItems(a[parseInt(s.toString(),10)],t))}},e.prototype.getFilteredChildRecords=function(e){var t=this;return e.filter(function(e){return t.parent.filterModule.filteredResult.indexOf(e)>-1})},e.prototype.updateParentSelection=function(e){var t=0,n=[],o=i.i(s.k)(this.parent,e.uniqueID);o&&o.childRecords&&(n=o.childRecords),!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.parent.filterModule.filteredResult.length>0&&this.parent.autoCheckHierarchy&&(n=this.getFilteredChildRecords(n)),t=n&&n.length;var a=0,d=0;if(!i.i(r.isNullOrUndefined)(o)){for(var l=0;l<n.length;l++){var p=i.i(s.k)(this.parent,n[parseInt(l.toString(),10)].uniqueID),c=p;i.i(r.isNullOrUndefined)(c)||("indeterminate"===c.checkboxState?a++:"check"===c.checkboxState&&d++)}a>0||d>0&&d!==t?o.checkboxState="indeterminate":(0!==d||o.hasFilteredChildRecords&&!i.i(r.isNullOrUndefined)(o.hasFilteredChildRecords)||i.i(r.isNullOrUndefined)(this.parent.dataResults.actionArgs)||"searching"!==this.parent.dataResults.actionArgs.requestType&&"filtering"!==this.parent.dataResults.actionArgs.requestType||"check"!==o.checkboxState)&&(0===d&&0===a||0===d&&o.hasFilteredChildRecords&&!i.i(r.isNullOrUndefined)(this.parent.dataResults.actionArgs)&&("searching"===this.parent.dataResults.actionArgs.requestType||"filtering"===this.parent.dataResults.actionArgs.requestType)&&"check"===o.checkboxState)?o.checkboxState="uncheck":o.checkboxState="check",this.updateSelectedItems(o,o.checkboxState),o.parentItem&&this.updateParentSelection(o.parentItem)}},e.prototype.headerSelection=function(e){var t=this,n=0,o=!1;if(!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.parent.filterModule.filteredResult.length>0){var a=this.parent.filterModule.filteredResult;0===this.filteredList.length&&(this.filteredList=a),this.parent.grid.searchSettings.key.length?this.searchingRecords=a:this.filteredList!==a?(this.filteredList=a,o=!0):o=!1}this.filteredList.length>0&&(this.parent.filterSettings.columns.length||!this.filteredList.length||this.parent.grid.searchSettings.key.length||(this.filteredList=[]),this.searchingRecords.length&&!i.i(r.isNullOrUndefined)(e)&&(this.filteredList=this.searchingRecords));var d;if(d=!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&0===this.parent.filterModule.filteredResult.length&&0===this.parent.getCurrentViewRecords().length&&this.parent.filterSettings.columns.length>0?this.filteredList:!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.filteredList.length>0?this.filteredList:this.parent.flatData,d=i.i(s.a)(this.parent)?this.parent.getCurrentViewRecords():d,!i.i(r.isNullOrUndefined)(e))for(var l=0;l<d.length;l++)if(e){if("check"===d[parseInt(l.toString(),10)].checkboxState)continue;if(o)continue;d[parseInt(l.toString(),10)].checkboxState="check",this.updateSelectedItems(d[parseInt(l.toString(),10)],d[parseInt(l.toString(),10)].checkboxState)}else this.selectedItems.indexOf(d[parseInt(l.toString(),10)])>-1&&(d[parseInt(l.toString(),10)].checkboxState="uncheck",this.updateSelectedItems(d[parseInt(l.toString(),10)],d[parseInt(l.toString(),10)].checkboxState),this.parent.autoCheckHierarchy&&this.updateParentSelection(d[parseInt(l.toString(),10)]));!1===e&&this.parent.enableVirtualization&&(this.selectedItems=[],this.selectedIndexes=[],d.filter(function(e){e.checkboxState="uncheck",t.updateSelectedItems(e,e.checkboxState)})),n=this.selectedItems.length;var p=this.parent.getHeaderContent().querySelectorAll(".e-frame")[0];n>0&&d.length>0?n===d.length||e?(i.i(r.removeClass)([p],["e-stop"]),p.classList.add("e-check")):(i.i(r.removeClass)([p],["e-check"]),p.classList.add("e-stop")):i.i(r.removeClass)([p],["e-check","e-stop"])},e.prototype.updateSelectedItems=function(e,t){var n,o,a=this.parent.grid.currentViewData.filter(function(t){return t.uniqueID===e.uniqueID}),d=this.parent.grid.currentViewData.indexOf(a[0]),l=i.i(s.k)(this.parent,e.uniqueID),p=this.parent.getRows()[parseInt(d.toString(),10)];if(d>-1){var c=void 0;(this.parent.frozenRows||this.parent.getFrozenColumns())&&(c=this.parent.getDataRows()[parseInt(d.toString(),10)]),o=p.querySelectorAll(".e-hierarchycheckbox .e-frame")[0]?p.querySelectorAll(".e-hierarchycheckbox .e-frame")[0]:c.querySelectorAll(".e-hierarchycheckbox .e-frame")[0],i.i(r.isNullOrUndefined)(o)||i.i(r.removeClass)([o],["e-check","e-stop","e-uncheck"])}if(n=l,i.i(r.isNullOrUndefined)(n)&&(n=e),n.checkboxState=t,"check"===t&&i.i(r.isNullOrUndefined)(e.isSummaryRow))-1!==d&&-1===this.selectedIndexes.indexOf(d)&&this.selectedIndexes.push(d),-1===this.selectedItems.indexOf(n)&&-1!==d&&!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.parent.filterModule.filteredResult.length>0&&this.selectedItems.push(n),-1===this.selectedItems.indexOf(n)&&(this.parent.enableVirtualization||this.parent.allowPaging)&&!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.parent.filterModule.filteredResult.length>0&&this.selectedItems.push(n),-1!==this.selectedItems.indexOf(n)||i.i(r.isNullOrUndefined)(this.parent.filterModule)||0!==this.parent.filterModule.filteredResult.length||this.selectedItems.push(n),-1===this.selectedItems.indexOf(n)&&i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.selectedItems.push(n);else if(("uncheck"===t||"indeterminate"===t)&&i.i(r.isNullOrUndefined)(e.isSummaryRow)){var h=this.selectedItems.indexOf(n);if(-1!==h&&this.selectedItems.splice(h,1),-1!==this.selectedIndexes.indexOf(d)){var u=this.selectedIndexes.indexOf(d);this.selectedIndexes.splice(u,1)}}var g="indeterminate"===t?"e-stop":"e-"+t;if(d>-1&&!i.i(r.isNullOrUndefined)(o)){o.classList.add(g);p.querySelector(".e-treecheckselect").setAttribute("aria-checked","check"===t?"true":"uncheck"===t?"false":"mixed")}},e.prototype.updateGridActions=function(e){var t,n,o=this,a=e.requestType;if(i.i(s.c)(this.parent)&&this.parent.autoCheckHierarchy)if("sorting"===a||"paging"===a){var d=this.parent.grid.getRows();t=this.parent.getCurrentViewRecords(),n=t.length,this.selectedIndexes=[];for(var l=0;l<n;l++)d[parseInt(l.toString(),10)].classList.contains("e-summaryrow")||this.updateSelectedItems(t[parseInt(l.toString(),10)],t[parseInt(l.toString(),10)].checkboxState)}else if("delete"===a||"add"===e.action){var p=[];"delete"===a?p=e.data:p.push(e.data);for(var l=0;l<p.length;l++){if("delete"===a){var c=this.parent.flatData.indexOf(p[parseInt(l.toString(),10)]),h=this.selectedIndexes.indexOf(c);this.selectedIndexes.splice(h,1),this.updateSelectedItems(p[parseInt(l.toString(),10)],"uncheck")}i.i(r.isNullOrUndefined)(p[parseInt(l.toString(),10)].parentItem)||this.updateParentSelection(p[parseInt(l.toString(),10)].parentItem)}}else"add"===e.requestType&&this.parent.autoCheckHierarchy?e.data.checkboxState="uncheck":("filtering"===a||"searching"===a||"refresh"===a&&!i.i(s.a)(this.parent))&&(this.selectedItems=[],this.selectedIndexes=[],t=!i.i(r.isNullOrUndefined)(this.parent.filterModule)&&this.parent.filterModule.filteredResult.length>0?this.parent.filterModule.filteredResult:this.parent.flatData,t.forEach(function(e){if(o.parent.enableVirtualization){e.hasChildRecords&&e.childRecords.length>0?o.updateParentSelection(e):o.updateSelectedItems(e,e.checkboxState);var t=i.i(s.g)(e);t=o.getFilteredChildRecords(t);for(var n=0;n<t.length;n++)t[parseInt(n.toString(),10)].hasChildRecords?o.updateParentSelection(t[parseInt(n.toString(),10)]):t[parseInt(n.toString(),10)].hasChildRecords||i.i(r.isNullOrUndefined)(t[parseInt(n.toString(),10)])||o.updateSelectedItems(t[parseInt(n.toString(),10)],t[parseInt(n.toString(),10)].checkboxState)}else e.hasChildRecords?o.updateParentSelection(e):o.updateSelectedItems(e,e.checkboxState)}),this.headerSelection())},e.prototype.getCheckedrecords=function(){return this.selectedItems},e.prototype.getCheckedRowIndexes=function(){return this.selectedIndexes},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(1),n=(i.n(r),i(4)),o=(i.n(n),i(6)),a=(i.n(o),i(0)),s=(i.n(a),i(3)),d=i(2),l=function(){function e(e){this.addedRecords="addedRecords",this.parent=e,this.parentItems=[],this.taskIds=[],this.hierarchyData=[],this.storedIndex=-1,this.sortedData=[],this.isSortAction=!1,this.addEventListener(),this.dataResults={},this.isSelfReference=!i.i(r.isNullOrUndefined)(this.parent.parentIdMapping)}return e.prototype.addEventListener=function(){this.parent.on("updateRemoteLevel",this.updateParentRemoteData,this),this.parent.grid.on("sorting-begin",this.beginSorting,this),this.parent.on("updateAction",this.updateData,this),this.parent.on(d.U,this.collectExpandingRecs,this),this.parent.on("dataProcessor",this.dataProcessor,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(d.U,this.collectExpandingRecs),this.parent.off("updateRemoteLevel",this.updateParentRemoteData),this.parent.off("updateAction",this.updateData),this.parent.off("dataProcessor",this.dataProcessor),this.parent.grid.off("sorting-begin",this.beginSorting))},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.isRemote=function(){return this.parent.dataSource instanceof n.DataManager},e.prototype.convertToFlatData=function(e){var t=this;if(this.parent.flatData=0!==Object.keys(e).length||this.parent.dataSource instanceof n.DataManager?[]:this.parent.dataSource,this.parent.parentData=[],i.i(s.a)(this.parent)&&!i.i(s.h)(this.parent)&&e instanceof n.DataManager&&!(e instanceof Array)){var o=this.parent.dataSource;if(this.parent.parentIdMapping){if(this.parent.query=i.i(r.isNullOrUndefined)(this.parent.query)?new n.Query:this.parent.query,this.parent.parentIdMapping){var a=this.parent.query.params.filter(function(e){return"IdMapping"===e.key});this.parent.initialRender&&!a.length&&(this.parent.query.where(this.parent.parentIdMapping,"equal",null),this.parent.query.addParams("IdMapping",this.parent.idMapping))}if(!this.parent.hasChildMapping){var d=this.parent.query.clone();d.queries=[],d=d.select([this.parent.parentIdMapping]),d.isCountRequired=!0,o.executeQuery(d).then(function(e){t.parentItems=n.DataUtil.distinct(e.result,t.parent.parentIdMapping,!1);var o;0===(o=e.result?0:1)&&(i.i(r.setValue)("grid.contentModule.isLoaded",!0,t.parent),i.i(r.isNullOrUndefined)(t.zerothLevelData)||(i.i(r.setValue)("cancel",!1,t.zerothLevelData),i.i(r.getValue)("grid.renderModule",t.parent).dataManagerSuccess(t.zerothLevelData),t.zerothLevelData=null),t.parent.grid.hideSpinner())})}}}else e instanceof Array&&this.convertJSONData(e)},e.prototype.convertJSONData=function(e){if(this.hierarchyData=[],this.taskIds=[],this.parent.idMapping)for(var t=Object.keys(e),o=0;o<t.length;o++){var a=e[parseInt(o.toString(),10)];this.hierarchyData.push(i.i(r.extend)({},a)),i.i(r.isNullOrUndefined)(a[this.parent.idMapping])||this.taskIds.push(a[this.parent.idMapping])}else this.hierarchyData=e;if(this.isSelfReference){for(var s=[],d=new n.DataManager(this.hierarchyData).executeLocal((new n.Query).group(this.parent.parentIdMapping)),o=0;o<d.length;o++){var l=d[parseInt(o.toString(),10)],p=this.taskIds.indexOf(l.key);if(!i.i(r.isNullOrUndefined)(l.key)&&p>-1){var c=l.items;this.hierarchyData[parseInt(p.toString(),10)][this.parent.childMapping]=c}else s.push.apply(s,l.items)}this.hierarchyData=this.selfReferenceUpdate(s)}if(Object.keys(this.hierarchyData).length)this.createRecords(this.hierarchyData);else{var h=!(this.parent.dataSource instanceof n.DataManager)&&this.parent.isGantt;this.parent.flatData=h?this.parent.dataSource:[]}this.storedIndex=-1},e.prototype.selfReferenceUpdate=function(e){for(var t=[];this.hierarchyData.length>0&&e.length>0;){var i=e.indexOf(this.hierarchyData[0]);-1===i?this.hierarchyData.shift():(t.push(this.hierarchyData.shift()),e.splice(i,1))}return t},e.prototype.updateParentRemoteData=function(e){i.i(s.a)(this.parent)&&this.parent.enableVirtualization&&"virtualscroll"===e.actionArgs.requestType&&this.parent.hideSpinner();var t=e.result;if(i.i(s.a)(this.parent)&&this.parent.enableVirtualization&&("virtualscroll"===e.actionArgs.requestType||"clearFilter"===e.actionArgs.action||""===e.actionArgs.searchString)&&(this.parent.query.expands=[]),this.parent.hasChildMapping||this.parentItems.length||this.parent.loadChildOnDemand)if(this.parent.loadChildOnDemand){i.i(r.isNullOrUndefined)(t)||this.parent.loadChildOnDemand&&i.i(s.b)(this.parent)&&!i.i(r.isNullOrUndefined)(this.parent.dataResults.expandRecord)||i.i(s.a)(this.parent)&&this.parent.loadChildOnDemand&&e.actionArgs.isExpandCollapse&&this.parent.enableVirtualization||this.convertToFlatData(t)}else for(var n=this,o=0;o<t.length;o++)!function(e){if(i.i(s.b)(n.parent)&&t[parseInt(e.toString(),10)].hasChildRecords&&n.parent.initialRender&&(t[parseInt(e.toString(),10)].expanded=!1),i.i(s.a)(n.parent)&&n.parent.enableVirtualization){var o=[],d=n.parent;t.filter(function(i){i[""+d.parentIdMapping]===t[parseInt(e.toString(),10)][""+d.idMapping]&&o.push(i)}),o.length?t[parseInt(e.toString(),10)].expanded=!0:t[parseInt(e.toString(),10)].hasChildRecords&&(t[parseInt(e.toString(),10)].expanded=!1)}i.i(r.isNullOrUndefined)(t[parseInt(e.toString(),10)].index)&&(t[parseInt(e.toString(),10)].taskData=i.i(r.extend)({},t[parseInt(e.toString(),10)]),t[parseInt(e.toString(),10)].uniqueID=i.i(a.getUid)(n.parent.element.id+"_data_"),i.i(r.setValue)("uniqueIDCollection."+t[parseInt(e.toString(),10)].uniqueID,t[parseInt(e.toString(),10)],n.parent),t[parseInt(e.toString(),10)].level=0,i.i(s.a)(n.parent)&&n.parent.enableVirtualization&&t[parseInt(e.toString(),10)][""+n.parent.parentIdMapping]&&0===t[parseInt(e.toString(),10)].level&&(t[parseInt(e.toString(),10)].level=t[parseInt(e.toString(),10)].level+1),t[parseInt(e.toString(),10)].index=Math.ceil(1e3*Math.random()),(t[parseInt(e.toString(),10)][n.parent.hasChildMapping]||-1!==n.parentItems.indexOf(t[parseInt(e.toString(),10)][n.parent.idMapping]))&&(t[parseInt(e.toString(),10)].hasChildRecords=!0),t[parseInt(e.toString(),10)].checkboxState="uncheck")}(o);else this.zerothLevelData=e,i.i(r.setValue)("cancel",!0,e);if(i.i(s.a)(this.parent)&&this.parent.loadChildOnDemand&&e.actionArgs.isExpandCollapse&&this.parent.enableVirtualization?e.result=t:i.i(s.a)(this.parent)&&this.parent.enableVirtualization&&!this.parent.loadChildOnDemand?e.result=t:e.result=this.parent.loadChildOnDemand?this.parent.flatData:t,i.i(s.a)(this.parent)&&this.parent.enableVirtualization&&this.parent.loadChildOnDemand&&this.parent.grid.aggregates.length&&0===this.parent.grid.sortSettings.columns.length&&0===this.parent.grid.filterSettings.columns.length&&!this.parent.grid.searchSettings.key.length){var d=e.query.queries.filter(function(e){return"onAggregates"===e.fn});e.result=this.parent.summaryModule.calculateSummaryValue(d,this.parent.flatData,!0)}this.parent.notify("updateResults",e)},e.prototype.collectExpandingRecs=function(e,t){var n=this.parent.getRows();if(this.parent.rowTemplate){var o=this.parent.getContentTable().rows;n=[].slice.call(o)}var a;if(e.rows.length>0){t||(e.record.expanded=!0);for(var s=0;s<e.rows.length;s++){if(e.rows[parseInt(s.toString(),10)].style.display="table-row",this.parent.loadChildOnDemand){var d=e.rows[parseInt(s.toString(),10)].getElementsByClassName("e-treegridcollapse")[0];a=this.parent.rowTemplate?this.parent.grid.getCurrentViewRecords()[e.rows[parseInt(s.toString(),10)].rowIndex]:this.parent.grid.getRowObjectFromUID(e.rows[parseInt(s.toString(),10)].getAttribute("data-Uid")).data,!i.i(r.isNullOrUndefined)(d)&&a.expanded&&(i.i(r.addClass)([d],"e-treegridexpand"),i.i(r.removeClass)([d],"e-treegridcollapse"));var l=[];l=n.filter(function(e){return e.querySelector(".e-gridrowindex"+a.index+"level"+(a.level+1))}),l.length&&a.expanded&&this.collectExpandingRecs({record:a,rows:l,parentRow:e.parentRow},!0)}var p=e.rows[parseInt(s.toString(),10)].querySelector(".e-detailrowcollapse");i.i(r.isNullOrUndefined)(p)||this.parent.grid.detailRowModule.expand(p)}}else this.fetchRemoteChildData({action:e.name,record:e.record,rows:e.rows,parentRow:e.parentRow})},e.prototype.fetchRemoteChildData=function(e){var t=this,s={row:e.parentRow,data:e.record},l=this.parent.dataSource,p=this.parent.grid.getDataModule().generateQuery(),c=p.queries.filter(function(e){return"onPage"!==e.fn&&"onWhere"!==e.fn});if(p.queries=c,p.isCountRequired=!0,this.parent.enableVirtualization&&"remoteExpand"===e.action){p.take(this.parent.pageSettings.pageSize);var h=[];h.push("ExpandingAction",parseInt(e.record[this.parent.idMapping],10).toString()),p.expand(h)}else if(this.parent.enableVirtualization&&"collapse"===e.action){p.take(this.parent.grid.pageSettings.pageSize);var h=[];h.push("CollapsingAction",parseInt(e.record[this.parent.idMapping],10).toString()),p.expand(h)}if(p.where(this.parent.parentIdMapping,"equal",e.record[this.parent.idMapping]),"remoteExpand"===e.action&&this.parent.grid.filterModule&&this.parent.grid.filterModule.value){var u=this.parent.grid.getDataModule().generateQuery().queries.filter(function(e){return"onPage"!==e.fn&&void 0!==e.e.predicates});p.queries.push(u[0])}i.i(o.showSpinner)(this.parent.element),l.executeQuery(p).then(function(l){var p,c=t.parent.grid.currentViewData.slice(),h=t.parent.idMapping;if(t.parent.isGantt&&!t.parent.loadChildOnDemand&&t.parent.hasChildMapping){for(var u=0;u<t.parent.grid.currentViewData.length;u++)if(e.record[h]===t.parent.grid.currentViewData[u][h]){p=u;break}}else p=c.indexOf(e.record);if(t.parent.enableVirtualization&&("collapse"===e.action||"remoteExpand"===e.action)){c=[];for(var u=0;u<p;u++)c.push(t.parent.grid.currentViewData[parseInt(u.toString(),10)])}-1===p&&t.parent.grid.getRowsObject().forEach(function(t){t.data.uniqueID===e.record.uniqueID&&(p=t.index)});var g=i.i(a.getObject)("actual.nextLevel",l),f=l.result,y=[];if("remoteExpand"===e.action&&t.parent.grid.filterModule&&t.parent.grid.filterModule.value){for(var u=0;u<c.length;u++)Object.prototype.hasOwnProperty.call(c[parseInt(u.toString(),10)],t.parent.parentIdMapping)&&null!==c[parseInt(u.toString(),10)][""+t.parent.parentIdMapping]&&0===c[parseInt(u.toString(),10)].level&&(c.splice(u,1),u--);for(var u=0;u<f.length;u++)e.record[""+t.parent.idMapping]!==f[parseInt(u.toString(),10)][""+t.parent.idMapping]&&e.record[""+t.parent.idMapping]===f[parseInt(u.toString(),10)][""+t.parent.parentIdMapping]&&Object.prototype.hasOwnProperty.call(f,u)&&y.push(f[parseInt(u.toString(),10)]);f=y}if(t.parent.enableVirtualization&&"remoteExpand"===e.action){e.record.childRecords=[];for(var u=0;u<f.length;u++)e.record[""+t.parent.idMapping]!==f[parseInt(u.toString(),10)][""+t.parent.idMapping]&&e.record[""+t.parent.idMapping]===f[parseInt(u.toString(),10)][""+t.parent.parentIdMapping]&&Object.prototype.hasOwnProperty.call(f,u)&&e.record.childRecords.push(f[parseInt(u.toString(),10)])}else e.record.childRecords=f;for(var m=0;m<f.length;m++){if(t.parent.enableVirtualization&&f[parseInt(m.toString(),10)][""+t.parent.idMapping]===e.record[""+t.parent.idMapping]&&"remoteExpand"===e.action)t.parent.remoteExpandedData.push(e.record);else if(t.parent.enableVirtualization&&f[parseInt(m.toString(),10)][""+t.parent.idMapping]===e.record[""+t.parent.idMapping]&&"collapse"===e.action)for(var u=0;u<t.parent.remoteExpandedData.length;u++)e.record[""+t.parent.idMapping]===t.parent.remoteExpandedData[parseInt(u.toString(),10)][""+t.parent.idMapping]&&t.parent.remoteExpandedData.splice(u,1);if(f[parseInt(m.toString(),10)].taskData=i.i(r.extend)({},f[parseInt(m.toString(),10)]),f[parseInt(m.toString(),10)][""+t.parent.parentIdMapping]&&t.parent.enableVirtualization&&t.parent.remoteExpandedData.length){for(var u=0;u<t.parent.remoteExpandedData.length;u++)if(f[parseInt(m.toString(),10)][""+t.parent.parentIdMapping]===t.parent.remoteExpandedData[parseInt(u.toString(),10)][""+t.parent.idMapping]){f[parseInt(m.toString(),10)].level=t.parent.remoteExpandedData[parseInt(u.toString(),10)].level+1;var v=t.parent.remoteExpandedData[parseInt(u.toString(),10)];delete v.childRecords,f[parseInt(m.toString(),10)].parentItem=v,f[parseInt(m.toString(),10)].parentUniqueID=e.record.uniqueID}}else if(t.parent.enableVirtualization)if(!f[parseInt(m.toString(),10)][""+t.parent.hasChildMapping]&&-1===t.parentItems.indexOf(f[parseInt(m.toString(),10)][""+t.parent.idMapping])||g&&!g[parseInt(m.toString(),10)]){var v=i.i(r.extend)({},e.record);delete v.childRecords,f[parseInt(m.toString(),10)].parentItem=v,f[parseInt(m.toString(),10)].parentUniqueID=e.record.uniqueID}else i.i(r.isNullOrUndefined)(f[parseInt(m.toString(),10)][""+t.parent.parentIdMapping])?(f[parseInt(m.toString(),10)].level=0,"remoteExpand"===e.action&&(f[parseInt(m.toString(),10)].childRecords=[],f[parseInt(m.toString(),10)].childRecords=e.record.childRecords)):f[parseInt(m.toString(),10)].level=e.record.level;else{f[parseInt(m.toString(),10)].level=e.record.level+1;var v=i.i(r.extend)({},e.record);delete v.childRecords,f[parseInt(m.toString(),10)].parentItem=v,f[parseInt(m.toString(),10)].parentUniqueID=e.record.uniqueID}if(f[parseInt(m.toString(),10)].index=Math.ceil(1e3*Math.random()),f[parseInt(m.toString(),10)].uniqueID=i.i(a.getUid)(t.parent.element.id+"_data_"),f[parseInt(m.toString(),10)].checkboxState="uncheck",t.parent.enableVirtualization&&i.i(r.isNullOrUndefined)(f[parseInt(m.toString(),10)].level))for(var S=0;S<t.parent.grid.currentViewData.length;S++)t.parent.grid.currentViewData[parseInt(S.toString(),10)][""+t.parent.idMapping]===f[parseInt(m.toString(),10)][""+t.parent.parentIdMapping]&&(f[parseInt(m.toString(),10)].level=t.parent.grid.currentViewData[parseInt(S.toString(),10)].level+1);if(i.i(r.setValue)("uniqueIDCollection."+f[parseInt(m.toString(),10)].uniqueID,f[parseInt(m.toString(),10)],t.parent),(f[parseInt(m.toString(),10)][""+t.parent.hasChildMapping]||-1!==t.parentItems.indexOf(f[parseInt(m.toString(),10)][""+t.parent.idMapping]))&&(!g||g[parseInt(m.toString(),10)]))if(f[parseInt(m.toString(),10)].hasChildRecords=!0,t.parent.enableVirtualization&&t.parent.loadChildOnDemand){for(var u=0;u<t.parent.remoteCollapsedData.length;u++)f[parseInt(m.toString(),10)][""+t.parent.idMapping]===t.parent.remoteCollapsedData[parseInt(u.toString(),10)][""+t.parent.idMapping]&&(f[parseInt(m.toString(),10)].expanded=t.parent.remoteCollapsedData[parseInt(u.toString(),10)].expanded);if("collapse"===e.action&&f[parseInt(m.toString(),10)][""+t.parent.idMapping]!==e.record[""+t.parent.idMapping]&&!1!==f[parseInt(m.toString(),10)].expanded)f[parseInt(m.toString(),10)].expanded=!0;else if("collapse"===e.action&&f[parseInt(m.toString(),10)][""+t.parent.idMapping]===e.record[""+t.parent.idMapping])f[parseInt(m.toString(),10)].expanded=!1,t.parent.remoteCollapsedData.push(e.record);else if("remoteExpand"===e.action){for(var u=0;u<t.parent.grid.currentViewData.length;u++)t.parent.grid.currentViewData[parseInt(u.toString(),10)][""+t.parent.idMapping]===f[parseInt(m.toString(),10)][""+t.parent.idMapping]&&f.splice(m,1,t.parent.grid.currentViewData[parseInt(u.toString(),10)]);if(f[parseInt(m.toString(),10)][t.parent.idMapping]===e.record[""+t.parent.idMapping])for(var u=0;u<t.parent.remoteCollapsedData.length;u++)e.record[""+t.parent.idMapping]===t.parent.remoteCollapsedData[parseInt(u.toString(),10)][""+t.parent.idMapping]&&t.parent.remoteCollapsedData.splice(u,1);!1!==f[parseInt(m.toString(),10)].expanded&&(f[parseInt(m.toString(),10)].expanded=!0)}}else t.parent.enableVirtualization&&f[parseInt(m.toString(),10)][""+t.parent.idMapping]===e.record[""+t.parent.idMapping]&&"collapse"!==e.action?f[parseInt(m.toString(),10)].expanded=!0:t.parent.enableVirtualization&&t.parent.loadChildOnDemand||(f[parseInt(m.toString(),10)].expanded=!1);c.splice(p+m+1,0,f[parseInt(m.toString(),10)])}if(i.i(r.setValue)("result",c,l),i.i(r.setValue)("action","beforecontentrender",l),t.parent.trigger(d.h,l),i.i(o.hideSpinner)(t.parent.element),t.parent.grid.aggregates.length>0&&!t.parent.enableVirtualization){var I=i.i(a.getObject)("query",l);if(i.i(r.isNullOrUndefined)(I)&&(I=i.i(r.getValue)("grid.renderModule.data",t.parent).aggregateQuery(new n.Query)),!i.i(r.isNullOrUndefined)(I)){var w=I.queries.filter(function(e){return"onAggregates"===e.fn});l.result=t.parent.summaryModule.calculateSummaryValue(w,l.result,!0)}}t.parent.enableVirtualization&&(t.parent.grid.pageSettings.totalRecordsCount=l.count),l.count=t.parent.grid.pageSettings.totalRecordsCount;var R={};t.parent.enableVirtualization&&t.remoteVirtualAction(R);var x={index:p,childData:f};t.parent.enableInfiniteScrolling?t.parent.notify("infinite-remote-expand",x):i.i(r.getValue)("grid.renderModule",t.parent).dataManagerSuccess(l,R),t.parent.trigger(d.Q,s)})},e.prototype.remoteVirtualAction=function(e){e.requestType="refresh",i.i(r.setValue)("isExpandCollapse",!0,e);var t=i.i(r.getValue)("grid.contentModule",this.parent),n=i.i(r.getValue)("currentInfo",t),o=i.i(r.getValue)("prevInfo",t);n.loadNext&&this.parent.grid.pageSettings.currentPage===n.nextInfo.page&&(this.parent.grid.pageSettings.currentPage=o.page)},e.prototype.beginSorting=function(){if(this.isSortAction=!0,i.i(s.a)(this.parent)&&this.parent.enableVirtualization){var e=this.parent.query.queries.indexOf(this.parent.query.queries.filter(function(e){return"onSortBy"===e.fn})[0]);-1!==e&&this.parent.query.queries.splice(e,1),0===this.parent.grid.sortSettings.columns.length&&this.parent.query.sortBy(null,null)}},e.prototype.createRecords=function(e,t){for(var n=[],o=Object.keys(e),d=0,l=o.length;d<l;d++){var p=i.i(r.extend)({},e[parseInt(d.toString(),10)]);p.taskData=e[parseInt(d.toString(),10)];var c=0;if(this.storedIndex++,Object.prototype.hasOwnProperty.call(p,"index")||(p.index=this.storedIndex),(!i.i(r.isNullOrUndefined)(p[this.parent.childMapping])&&!i.i(s.b)(this.parent)||p[this.parent.hasChildMapping]&&i.i(s.b)(this.parent))&&(p.hasChildRecords=!0,this.parent.enableCollapseAll||!i.i(r.isNullOrUndefined)(this.parent.dataStateChange)&&i.i(r.isNullOrUndefined)(p[this.parent.childMapping])?p.expanded=!1:p.expanded=!!i.i(r.isNullOrUndefined)(p[this.parent.expandStateMapping])||p[this.parent.expandStateMapping]),Object.prototype.hasOwnProperty.call(p,"index")||(p.index=(p.hasChildRecords,this.storedIndex)),this.isSelfReference&&i.i(r.isNullOrUndefined)(p[this.parent.parentIdMapping])&&this.parent.parentData.push(p),p.uniqueID=i.i(a.getUid)(this.parent.element.id+"_data_"),i.i(r.setValue)("uniqueIDCollection."+p.uniqueID,p,this.parent),!i.i(r.isNullOrUndefined)(t)){var h=i.i(r.extend)({},t);delete h.childRecords,delete h[this.parent.childMapping],this.isSelfReference&&delete h.taskData[this.parent.childMapping],p.parentItem=h,p.parentUniqueID=h.uniqueID,c=t.level+1}Object.prototype.hasOwnProperty.call(p,"level")||(p.level=c),p.checkboxState="uncheck";if(this.parent.enableVirtualization&&this.parent.loadChildOnDemand&&i.i(s.a)(this.parent)&&!this.parent.initialRender){if(!p.hasChildRecords&&i.i(r.isNullOrUndefined)(p[""+this.parent.parentIdMapping])){p.hasChildRecords=!0;for(var u=0;u<this.parent.remoteCollapsedData.length;u++)this.parent.remoteCollapsedData[parseInt(u.toString(),10)][""+this.parent.idMapping]===p[""+this.parent.idMapping]&&(p.expanded=!1)}else 0===p.level&&i.i(r.isNullOrUndefined)(t)&&!p.hasChildRecords&&(p.level=p.level+1);p[""+this.parent.hasChildMapping]&&!i.i(r.isNullOrUndefined)(p[""+this.parent.expandStateMapping])&&(p.expanded=p[""+this.parent.expandStateMapping],p.hasChildRecords=!0),this.parent.flatData.push(p)}else(i.i(r.isNullOrUndefined)(p[""+this.parent.parentIdMapping])||p.parentItem)&&(this.parent.flatData.push(p),this.parent.infiniteScrollData.push(p));if(this.isSelfReference||0!==p.level||this.parent.parentData.push(p),!i.i(r.isNullOrUndefined)(p[this.parent.childMapping]&&p[this.parent.childMapping].length)){var g=this.createRecords(p[this.parent.childMapping],p);p.childRecords=g}n.push(p)}return n},e.prototype.dataProcessor=function(e){var t,o=i.i(a.getObject)("isExport",e),d=i.i(a.getObject)("expresults",e),l=i.i(a.getObject)("exportType",e),p=i.i(a.getObject)("isPrinting",e),c=i.i(a.getObject)("actionArgs",e),h=i.i(a.getObject)("requestType",e),u=i.i(a.getObject)("data",e),g=i.i(a.getObject)("action",e),f=c,y=this.parent.getPrimaryKeyFieldNames()[0],m=i.i(a.getObject)("data",f);i.i(r.isNullOrUndefined)(f)||i.i(r.isNullOrUndefined)(f.action)||"add"!==f.action||i.i(r.isNullOrUndefined)(f.data)||!i.i(r.isNullOrUndefined)(f.data[""+y])||(f.data[""+y]=e.result[f.index][""+y],m.taskData[""+y]=e.result[f.index][""+y]),(!i.i(r.isNullOrUndefined)(c)&&Object.keys(c).length||"save"===h)&&(h=h||c.requestType,u=u||i.i(a.getObject)("data",c),g=g||i.i(a.getObject)("action",c),"Batch"===this.parent.editSettings.mode&&(this.batchChanges=this.parent.grid.editModule.getBatchChanges()),this.parent.isLocalData&&this.updateAction(u,g,h)),t=o&&!i.i(r.isNullOrUndefined)(d)?d:i.i(s.b)(this.parent)?i.i(r.getValue)("result",this.parent.grid.dataSource):this.parent.grid.dataSource;var v,S,I=t instanceof n.DataManager?t.dataSource.json:t,w=i.i(s.b)(this.parent)?i.i(r.getValue)("count",this.parent.dataSource):I.length,R=new n.Query,x=i.i(a.getObject)("query",e);if(i.i(r.isNullOrUndefined)(x)||(v=x.queries.filter(function(e){return"onWhere"===e.fn}),S=x.queries.filter(function(e){return"onSearch"===e.fn})),this.parent.grid.allowFiltering&&this.parent.grid.filterSettings.columns.length||this.parent.grid.searchSettings.key.length>0||!i.i(r.isNullOrUndefined)(x)&&(v.length||S.length)&&this.parent.isLocalData){i.i(r.isNullOrUndefined)(x)&&(x=new n.Query,x=i.i(r.getValue)("grid.renderModule.data",this.parent).filterQuery(x),x=i.i(r.getValue)("grid.renderModule.data",this.parent).searchQuery(x));var C=x.queries.filter(function(e){return"onWhere"===e.fn}),b=x.queries.filter(function(e){return"onSearch"===e.fn});R.queries=C.concat(b);var D=new n.DataManager(I).executeLocal(R);if(this.parent.notify("updateFilterRecs",{data:D}),I=this.dataResults.result,this.dataResults.result=null,this.parent.grid.aggregates.length>0){var M=i.i(a.getObject)("query",e);if(i.i(r.isNullOrUndefined)(x)&&(x=i.i(r.getValue)("grid.renderModule.data",this.parent).aggregateQuery(new n.Query)),!i.i(r.isNullOrUndefined)(M)){var O=M.queries.filter(function(e){return"onAggregates"===e.fn});I=this.parent.summaryModule.calculateSummaryValue(O,I,!0)}}}if(this.parent.grid.aggregates.length&&0===this.parent.grid.sortSettings.columns.length&&0===this.parent.grid.filterSettings.columns.length&&!this.parent.grid.searchSettings.key.length){var P=i.i(a.getObject)("query",e);i.i(r.isNullOrUndefined)(P)&&(P=i.i(r.getValue)("grid.renderModule.data",this.parent).aggregateQuery(new n.Query));var O=P.queries.filter(function(e){return"onAggregates"===e.fn});I=this.parent.summaryModule.calculateSummaryValue(O,this.parent.flatData,!0)}if(this.parent.grid.sortSettings.columns.length>0||this.isSortAction){this.isSortAction=!1;for(var E=this.parent.parentData,M=i.i(a.getObject)("query",e),A=new n.Query,N=this.parent.grid.sortSettings.columns.length-1;N>=0;N--){var _=this.parent.grid.renderModule.data.getColumnByField(this.parent.grid.sortSettings.columns[parseInt(N.toString(),10)].field),k=_.sortComparer&&i.i(s.h)(this.parent)?_.sortComparer.bind(_):this.parent.grid.sortSettings.columns[parseInt(N.toString(),10)].direction;A.sortBy(this.parent.grid.sortSettings.columns[parseInt(N.toString(),10)].field,k)}var U=new n.DataManager(E).executeLocal(A);if(this.parent.allowRowDragAndDrop&&!i.i(r.isNullOrUndefined)(this.parent.rowDragAndDropModule.draggedRecord)&&this.parent.rowDragAndDropModule.droppedRecord.hasChildRecords&&"middleSegment"!==this.parent.rowDragAndDropModule.dropPosition){var q=U.indexOf(this.parent.rowDragAndDropModule.draggedRecord);U.splice(q,1);var V=U.indexOf(this.parent.rowDragAndDropModule.droppedRecord);this.parent.rowDragAndDropModule.droppedRecord.hasChildRecords&&"topSegment"===this.parent.rowDragAndDropModule.dropPosition?U.splice(V,0,this.parent.rowDragAndDropModule.draggedRecord):"bottomSegment"===this.parent.rowDragAndDropModule.dropPosition&&U.splice(V+1,0,this.parent.rowDragAndDropModule.draggedRecord)}var B={modifiedData:U,filteredData:I,srtQry:A};if(this.parent.notify("createSort",B),I=B.modifiedData,this.dataResults.result=null,this.sortedData=I,this.parent.notify("updateModel",{}),this.parent.grid.aggregates.length>0&&!i.i(r.isNullOrUndefined)(M)){var T=i.i(a.getObject)("query",e),O=T.queries.filter(function(e){return"onAggregates"===e.fn});I=this.parent.summaryModule.calculateSummaryValue(O,this.sortedData,!1)}}w=i.i(s.b)(this.parent)?i.i(r.getValue)("count",this.parent.dataSource):I.length;var L=this.paging(I,w,o,p,l,e);I=L.result,w=L.count,e.result=I,e.count=w,this.parent.notify("updateResults",e)},e.prototype.paging=function(e,t,n,o,a,l){if(!this.parent.allowPaging||n&&"CurrentPage"!==a||o&&"CurrentPage"!==this.parent.printMode){if((this.parent.enableVirtualization||this.parent.enableInfiniteScrolling)&&(!n||"CurrentPage"===a)&&"save"!==i.i(r.getValue)("requestType",l)){var p=this.parent.enableInfiniteScrolling?l:i.i(r.getValue)("actionArgs",l);this.parent.notify(d.a,{result:e,count:t,actionArgs:p}),e=this.dataResults.result,t=this.dataResults.count}}else this.parent.notify(d.a,{result:e,count:t,actionArgs:l}),e=this.dataResults.result,t=i.i(s.b)(this.parent)?i.i(r.getValue)("count",this.parent.dataSource):this.dataResults.count;if((!0===o||l.isPdfExport&&(i.i(r.isNullOrUndefined)(l.isCollapsedStatePersist)||l.isCollapsedStatePersist))&&"AllPages"===this.parent.printMode){for(var c=[],h=0;h<e.length;h++){i.i(s.f)(this.parent,e[parseInt(h.toString(),10)],this.parent.parentData)&&c.push(e[parseInt(h.toString(),10)])}e=c,t=e.length}return{result:e,count:t}},e.prototype.updateData=function(e){this.dataResults=e},e.prototype.updateAction=function(e,t,i){"delete"!==i&&"save"!==i||this.parent.notify(d.k,{value:e,action:t||i}),"batchsave"===i&&"Batch"===this.parent.editSettings.mode&&this.parent.notify(d.w,{})},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return r}),i.d(t,"b",function(){return n});var r;!function(e){e[e.Add=0]="Add",e[e.Edit=1]="Edit",e[e.Update=2]="Update",e[e.Delete=3]="Delete",e[e.Cancel=4]="Cancel",e[e.Search=5]="Search",e[e.ExpandAll=6]="ExpandAll",e[e.CollapseAll=7]="CollapseAll",e[e.ExcelExport=8]="ExcelExport",e[e.PdfExport=9]="PdfExport",e[e.CsvExport=10]="CsvExport",e[e.Print=11]="Print",e[e.RowIndent=12]="RowIndent",e[e.RowOutdent=13]="RowOutdent"}(r||(r={}));var n;!function(e){e[e.AutoFit=0]="AutoFit",e[e.AutoFitAll=1]="AutoFitAll",e[e.SortAscending=2]="SortAscending",e[e.SortDescending=3]="SortDescending",e[e.Edit=4]="Edit",e[e.Delete=5]="Delete",e[e.Save=6]="Save",e[e.Cancel=7]="Cancel",e[e.PdfExport=8]="PdfExport",e[e.ExcelExport=9]="ExcelExport",e[e.CsvExport=10]="CsvExport",e[e.FirstPage=11]="FirstPage",e[e.PrevPage=12]="PrevPage",e[e.LastPage=13]="LastPage",e[e.NextPage=14]="NextPage",e[e.AddRow=15]="AddRow",e[e.RowIndent=16]="RowIndent",e[e.RowOutdent=17]="RowOutdent"}(n||(n={}))},function(e,t,i){"use strict";i.d(t,"a",function(){return a}),i.d(t,"b",function(){return s}),i.d(t,"c",function(){return d});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(){function e(e){this.allowEditing=!0,this.edit={},this.disableHtmlEncode=!0,this.allowReordering=!0,this.showColumnMenu=!0,this.allowFiltering=!0,this.allowSorting=!0,this.allowResizing=!0,this.filter={},i.i(r.merge)(this,e)}return e.prototype.setProperties=function(e){for(var t=Object.keys(e),i=0;i<t.length;i++)if(this[t[parseInt(i.toString(),10)]]=e[t[parseInt(i.toString(),10)]],this.parent&&this.parent.isReact&&"template"===t[parseInt(i.toString(),10)]){this.parent.clipboardModule.treeGridParent.renderModule.refreshReactColumnTemplateByUid(this.uid)}},e}(),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)(null)],t.prototype,"columns",void 0),t}(a),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)(!1)],t.prototype,"allowAdding",void 0),o([i.i(r.Property)(!1)],t.prototype,"allowEditing",void 0),o([i.i(r.Property)(!1)],t.prototype,"allowDeleting",void 0),o([i.i(r.Property)("Cell")],t.prototype,"mode",void 0),o([i.i(r.Property)("Top")],t.prototype,"newRowPosition",void 0),o([i.i(r.Property)(!0)],t.prototype,"allowEditOnDblClick",void 0),o([i.i(r.Property)(!0)],t.prototype,"showConfirmDialog",void 0),o([i.i(r.Property)(!1)],t.prototype,"showDeleteConfirmDialog",void 0),o([i.i(r.Property)("")],t.prototype,"template",void 0),o([i.i(r.Property)({})],t.prototype,"dialog",void 0),o([i.i(r.Property)(!1)],t.prototype,"allowNextRowEdit",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a}),i.d(t,"b",function(){return s});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)()],t.prototype,"field",void 0),o([i.i(r.Property)()],t.prototype,"operator",void 0),o([i.i(r.Property)()],t.prototype,"value",void 0),o([i.i(r.Property)()],t.prototype,"matchCase",void 0),o([i.i(r.Property)()],t.prototype,"ignoreAccent",void 0),o([i.i(r.Property)()],t.prototype,"predicate",void 0),o([i.i(r.Property)({})],t.prototype,"actualFilterValue",void 0),o([i.i(r.Property)({})],t.prototype,"actualOperator",void 0),o([i.i(r.Property)()],t.prototype,"type",void 0),o([i.i(r.Property)()],t.prototype,"ejpredicate",void 0),o([i.i(r.Property)()],t.prototype,"uid",void 0),o([i.i(r.Property)()],t.prototype,"isForeignKey",void 0),t}(r.ChildProperty),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Collection)([],a)],t.prototype,"columns",void 0),o([i.i(r.Property)("FilterBar")],t.prototype,"type",void 0),o([i.i(r.Property)()],t.prototype,"mode",void 0),o([i.i(r.Property)(!0)],t.prototype,"showFilterBarStatus",void 0),o([i.i(r.Property)(1500)],t.prototype,"immediateModeDelay",void 0),o([i.i(r.Property)()],t.prototype,"operators",void 0),o([i.i(r.Property)(!1)],t.prototype,"ignoreAccent",void 0),o([i.i(r.Property)("Parent")],t.prototype,"hierarchyMode",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)(!1)],t.prototype,"enableCache",void 0),o([i.i(r.Property)(3)],t.prototype,"maxBlocks",void 0),o([i.i(r.Property)(3)],t.prototype,"initialBlocks",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)("Spinner")],t.prototype,"indicatorType",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)(12)],t.prototype,"pageSize",void 0),o([i.i(r.Property)(8)],t.prototype,"pageCount",void 0),o([i.i(r.Property)(1)],t.prototype,"currentPage",void 0),o([i.i(r.Property)()],t.prototype,"totalRecordsCount",void 0),o([i.i(r.Property)(!1)],t.prototype,"enableQueryString",void 0),o([i.i(r.Property)(!1)],t.prototype,"pageSizes",void 0),o([i.i(r.Property)(null)],t.prototype,"template",void 0),o([i.i(r.Property)("All")],t.prototype,"pageSizeMode",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)()],t.prototype,"fields",void 0),o([i.i(r.Property)(!1)],t.prototype,"ignoreCase",void 0),o([i.i(r.Property)("contains")],t.prototype,"operator",void 0),o([i.i(r.Property)()],t.prototype,"key",void 0),o([i.i(r.Property)()],t.prototype,"hierarchyMode",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)("Row")],t.prototype,"mode",void 0),o([i.i(r.Property)("Flow")],t.prototype,"cellSelectionMode",void 0),o([i.i(r.Property)("Single")],t.prototype,"type",void 0),o([i.i(r.Property)(!1)],t.prototype,"persistSelection",void 0),o([i.i(r.Property)("Default")],t.prototype,"checkboxMode",void 0),o([i.i(r.Property)(!1)],t.prototype,"checkboxOnly",void 0),o([i.i(r.Property)(!0)],t.prototype,"enableToggle",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a}),i.d(t,"b",function(){return s});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)()],t.prototype,"field",void 0),o([i.i(r.Property)()],t.prototype,"direction",void 0),t}(r.ChildProperty),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Collection)([],a)],t.prototype,"columns",void 0),o([i.i(r.Property)(!0)],t.prototype,"allowUnsort",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s}),i.d(t,"b",function(){return d});var r=i(1),n=(i.n(r),i(0)),o=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.intl=new r.Internationalization,t.templateFn={},t}return o(t,e),t.prototype.setFormatter=function(e){this.format&&(this.format.skeleton||this.format.format)&&(this.formatFn=this.getFormatFunction(this.format))},t.prototype.getFormatFunction=function(e){return e.type?this.intl.getDateFormat(e):this.intl.getNumberFormat(e)},t.prototype.getFormatter=function(){return this.formatFn},t.prototype.setTemplate=function(e){void 0===e&&(e={}),void 0!==this.footerTemplate&&(this.templateFn[i.i(r.getEnumValue)(n.CellType,n.CellType.Summary)]={fn:i.i(r.compile)(this.footerTemplate,e),property:"footerTemplate"})},t.prototype.getTemplate=function(e){return this.templateFn[i.i(r.getEnumValue)(n.CellType,e)]},t.prototype.setPropertiesSilent=function(e){this.setProperties(e,!0)},a([i.i(r.Property)()],t.prototype,"type",void 0),a([i.i(r.Property)()],t.prototype,"footerTemplate",void 0),a([i.i(r.Property)()],t.prototype,"field",void 0),a([i.i(r.Property)()],t.prototype,"format",void 0),a([i.i(r.Property)()],t.prototype,"columnName",void 0),a([i.i(r.Property)()],t.prototype,"customAggregate",void 0),t}(r.ChildProperty),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),a([i.i(r.Collection)([],s)],t.prototype,"columns",void 0),a([i.i(r.Property)(!0)],t.prototype,"showChildSummary",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),i(2)),a=i(3),s=function(){function e(e){this.parent=e,this.templateResult=null,this.parent.grid.on("template-result",this.columnTemplateResult,this),this.parent.grid.on("reactTemplateRender",this.reactTemplateRender,this)}return e.prototype.RowModifier=function(e){if(e.data){var t=e.data,s=t.parentItem;if(!i.i(n.isNullOrUndefined)(t.parentItem)&&!i.i(a.d)(this.parent)&&(!this.parent.allowPaging||"Root"===this.parent.pageSettings.pageSizeMode||i.i(a.a)(this.parent)&&!i.i(a.h)(this.parent))){if((this.parent.initialRender&&(!(i.i(n.isNullOrUndefined)(s[this.parent.expandStateMapping])||s[this.parent.expandStateMapping])||this.parent.enableCollapseAll)||!i.i(a.f)(this.parent,e.data,this.parent.grid.getCurrentViewRecords()))&&!i.i(n.isNullOrUndefined)(e.row)){e.row.style.display="none";var d=this.parent.grid.getRowsObject();this.parent.grid.isFrozenGrid()||i.i(n.isNullOrUndefined)(e.row.getAttribute("data-uid"))||(d.filter(function(t){return t.uid===e.row.getAttribute("data-uid")})[0].visible=!1)}}if(i.i(a.a)(this.parent)&&!i.i(a.h)(this.parent)){var l=this.parent,p=this.parent.getCurrentViewRecords().filter(function(e){return i.i(n.getValue)(l.idMapping,e)===i.i(n.getValue)(l.parentIdMapping,t)});if(p.length>0&&!p[0].isSummaryRow&&!i.i(n.isNullOrUndefined)(e.row)){var c=p[0].expanded?"table-row":"none";e.row.setAttribute("style","display: "+c+";")}}i.i(r.getObject)("isSummaryRow",e.data)&&i.i(n.addClass)([e.row],"e-summaryrow"),i.i(n.isNullOrUndefined)(e.row)||(e.row.querySelector(".e-treegridexpand")?e.row.setAttribute("aria-expanded","true"):e.row.querySelector(".e-treegridcollapse")&&e.row.setAttribute("aria-expanded","false"),this.parent.enableCollapseAll&&this.parent.initialRender&&(i.i(n.isNullOrUndefined)(t.parentItem)||(e.row.style.display="none")));if(this.parent.rowDragAndDropModule&&this.parent.grid.rowDragAndDropModule&&(this.parent.grid.rowDragAndDropModule.dragStartData||this.parent.rowDragAndDropModule.draggedRecord)&&this.parent.getContentTable().scrollHeight<=this.parent.getContent().clientHeight){this.parent.getVisibleRecords()[this.parent.getVisibleRecords().length-1].uniqueID!==e.data.uniqueID||i.i(n.isNullOrUndefined)(e.row)||e.row.cells[0].classList.contains("e-lastrowcell")||this.parent.lastRowBorder(e.row,!0)}if(this.parent.isReact){var h=this;h.parent.renderReactTemplates(function(){h.parent.trigger(o.J,e)})}else this.parent.trigger(o.J,e)}},e.prototype.cellRender=function(e){if(e.data){var t,s,d=this.parent.grid,l=e.data,p=i.i(n.isNullOrUndefined)(l.filterLevel),c=p?l.level:l.filterLevel,h=0,u=this.parent.getColumnByUid(e.column.uid),g=l.isSummaryRow,f=this.parent.getFrozenColumns();t=i.i(n.isNullOrUndefined)(l.parentItem)?l.index:l.parentItem.index;if((this.parent.enableColumnVirtualization&&!this.parent.initialRender?this.parent.getVirtualColIndexByUid(e.column.uid):d.getColumnIndexByUid(e.column.uid))!==this.parent.treeColumnIndex||"add"!==e.requestType&&"rowDragAndDrop"!==e.requestType&&"delete"!==e.requestType&&!i.i(n.isNullOrUndefined)(e.cell.querySelector(".e-treecell")))this.templateResult&&(this.templateResult=null);else{for(var y=i.i(n.createElement)("div",{className:"e-treecolumn-container"}),m=i.i(n.createElement)("span",{className:"e-icons e-none",styles:"width: 10px; display: inline-block"}),v=0;v<c;v++)h+=10,y.appendChild(m.cloneNode());var S=i.i(n.isNullOrUndefined)(l.hasFilteredChildRecords)?l.hasChildRecords:l.hasFilteredChildRecords;if(S&&!i.i(n.isNullOrUndefined)(l.childRecords)&&(S=this.parent.isFromGantt&&!this.parent.loadChildOnDemand?l.hasChildRecords:!(0===l.childRecords.length)),S){i.i(n.addClass)([e.cell],"e-treerowcell"),e.cell.setAttribute("aria-expanded",l.expanded?"true":"false");var I=i.i(n.createElement)("span",{className:"e-icons"}),w=void 0;w=this.parent.initialRender?l.expanded&&(i.i(n.isNullOrUndefined)(l[this.parent.expandStateMapping])||l[this.parent.expandStateMapping])&&!this.parent.enableCollapseAll:!(!l.expanded||!i.i(a.f)(this.parent,l,this.parent.grid.getCurrentViewRecords())),i.i(n.addClass)([I],w?"e-treegridexpand":"e-treegridcollapse"),h+=18,y.appendChild(I),m.style.width="4px",h+=7,y.appendChild(m.cloneNode())}else(c||!c&&!l.level)&&(h+=20,y.appendChild(m.cloneNode()),y.appendChild(m.cloneNode()));s=i.i(n.createElement)("span",{className:"e-treecell"}),this.parent.allowTextWrap&&(s.style.width="Calc(100% - "+h+"px)"),i.i(n.addClass)([e.cell],"e-gridrowindex"+t+"level"+l.level),this.updateTreeCell(e,s),y.appendChild(s),e.cell.appendChild(y)}if(d.getFrozenLeftColumnsCount()>0||d.getFrozenRightColumnsCount()>0){var R=d.getFrozenRightColumns(),x=d.getFrozenLeftColumns(),C=d.getMovableColumns();R.length>0&&R[0].field===e.column.field?i.i(n.addClass)([e.cell],"e-gridrowindex"+t+"level"+l.level):x.length>0&&x[0].field===e.column.field?i.i(n.addClass)([e.cell],"e-gridrowindex"+t+"level"+l.level):C.length>0&&C[0].field===e.column.field&&i.i(n.addClass)([e.cell],"e-gridrowindex"+t+"level"+l.level)}else f>this.parent.treeColumnIndex&&f>0&&d.getColumnIndexByUid(e.column.uid)===f?i.i(n.addClass)([e.cell],"e-gridrowindex"+t+"level"+l.level):f<this.parent.treeColumnIndex&&f>0&&(d.getColumnIndexByUid(e.column.uid)===f||d.getColumnIndexByUid(e.column.uid)===f-1)?i.i(n.addClass)([e.cell],"e-gridrowindex"+t+"level"+l.level):f===this.parent.treeColumnIndex&&f>0&&d.getColumnIndexByUid(e.column.uid)===this.parent.treeColumnIndex-1&&i.i(n.addClass)([e.cell],"e-gridrowindex"+t+"level"+l.level);if(!i.i(n.isNullOrUndefined)(u)&&u.showCheckbox&&(this.parent.notify("columnCheckbox",e),this.parent.allowTextWrap)){var b=e.cell.querySelectorAll(".e-frame")[0];h+=parseInt(b.style.width,16),h+=10,s=d.getColumnIndexByUid(e.column.uid)===this.parent.treeColumnIndex?e.cell.querySelector(".e-treecell"):e.cell.querySelector(".e-treecheckbox"),s.style.width="Calc(100% - "+h+"px)"}if(g){i.i(n.addClass)([e.cell],"e-summarycell");var D=i.i(r.getObject)(e.column.field,e.data);D=i.i(n.isNullOrUndefined)(D)?null:D,null!=e.cell.querySelector(".e-treecell")?e.cell.querySelector(".e-treecell").innerHTML=D:e.column.template?e.cell.innerHTML=null:e.cell.innerHTML=D}this.parent.args=e,(i.i(n.isNullOrUndefined)(this.parent.rowTemplate)&&!this.parent.isReact||this.parent.isReact&&!e.column.template)&&this.parent.trigger(o.D,e)}},e.prototype.updateTreeCell=function(e,t){var a=i.i(n.getValue)("columnModel",this.parent),s=a[this.parent.treeColumnIndex],d=e.column.index;i.i(n.isNullOrUndefined)(s.field)&&e.cell.setAttribute("data-colindex",d+""),s.field!==e.column.field||i.i(n.isNullOrUndefined)(s.template)||(e.column.template=s.template,e.column.templateFn=i.i(r.templateCompiler)(e.column.template),e.cell.classList.add("e-templatecell"));var l=null!=e.cell.querySelector(".e-treecell")?e.cell.querySelector(".e-treecell").innerHTML:e.cell.innerHTML;if("object"==typeof e.column.template&&this.templateResult)i.i(r.appendChildren)(t,this.templateResult),this.templateResult=null,e.cell.innerHTML="";else if(e.cell.classList.contains("e-templatecell")){var p=e.cell.children.length,c=this.parent.element.id+e.column.uid;if(s.field!==e.column.field||i.i(n.isNullOrUndefined)(s.template))for(var h=0;h<p;p=e.cell.children.length)t.appendChild(e.cell.children[parseInt(h.toString(),10)]);else{if(this.parent.isReact&&"string"!=typeof e.column.template){e.column.templateFn(e.data,this.parent,"columnTemplate",c,null,null,t),i.i(n.isNullOrUndefined)(this.parent.grid.portals)&&(this.parent.grid.portals=this.parent.portals),this.parent.notify("renderReactTemplate",this.parent.portals);var u=this;u.parent.renderReactTemplates(function(){u.parent.trigger(o.D,e)})}else{var g=e.column.templateFn(i.i(r.extend)({index:""},e.data),this.parent,"template",c,this.parent.isStringTemplate);i.i(r.appendChildren)(t,g)}delete e.column.template,delete e.column.templateFn,e.cell.innerHTML=""}}else t.innerHTML=l,e.cell.innerHTML=""},e.prototype.refreshReactColumnTemplateByUid=function(e){var t=this;this.parent.isReact&&this.parent.clearTemplate(["columnTemplate"],void 0,function(){for(var o=t.parent.grid.getRowsObject(),a=t.parent.grid.getIndentCount(),s=t.parent.grid.getNormalizedColumnIndex(e),d=0;d<o.length;d++)if(o[parseInt(d.toString(),10)].isDataRow&&!i.i(n.isNullOrUndefined)(o[parseInt(d.toString(),10)].index)){var l=o[parseInt(d.toString(),10)].cells[parseInt(s.toString(),10)],p=new r.CellRenderer(t.parent.grid,t.parent.grid.serviceLocator),c=t.parent.getCellFromIndex(o[parseInt(d.toString(),10)].index,s-a);p.refreshTD(c,l,o[parseInt(d.toString(),10)].data,{index:o[parseInt(d.toString(),10)].index});var h=t.parent.getRows()[parseInt(d.toString(),10)].cells[parseInt(s.toString(),10)];t.cellRender({data:o[parseInt(d.toString(),10)].data,cell:h,column:l.column})}})},e.prototype.columnTemplateResult=function(e){this.templateResult=e.template},e.prototype.reactTemplateRender=function(e,t){this.parent.portals=e,this.parent.notify("renderReactTemplate",this.parent.portals),this.parent.renderReactTemplates(t)},e.prototype.destroy=function(){this.parent.grid.off("template-result",this.columnTemplateResult),this.parent.grid.off("reactTemplateRender",this.reactTemplateRender)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(0),n=(i.n(r),i(2)),o=i(1),a=(i.n(o),i(4)),s=(i.n(a),i(3)),d=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),l=function(e){function t(t){var i=e.call(this,t)||this;return i.addEventListener(),i}return d(t,e),t.prototype.addEventListener=function(){this.parent.on(n.e,this.getDatas,this)},t.prototype.getDatas=function(e){this.visualData=e.data},t.prototype.getDataInfo=function(){return e.prototype.getData.call(this)},t.prototype.generateRows=function(t,r){!i.i(o.isNullOrUndefined)(r.virtualInfo)&&r.virtualInfo.loadNext&&r.virtualInfo.nextInfo.page!==this.parent.pageSettings.currentPage?this.parent.setProperties({pageSettings:{currentPage:r.virtualInfo.nextInfo.page}},!0):i.i(o.isNullOrUndefined)(r.virtualInfo)||r.virtualInfo.loadNext||r.virtualInfo.page===this.parent.pageSettings.currentPage||this.parent.setProperties({pageSettings:{currentPage:r.virtualInfo.page}},!0);var n=this.getDataInfo();if(i.i(o.isNullOrUndefined)(r.virtualInfo)||("right"!==r.virtualInfo.direction&&"left"!==r.virtualInfo.direction?(this.parent.dataSource instanceof a.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&!this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url||i.i(s.b)(this.parent))&&1!==r.virtualInfo.blockIndexes.length||(r.virtualInfo.blockIndexes=n.blockIndexes):r.virtualInfo.blockIndexes=this.getBlockIndexes(r.virtualInfo.page)),this.parent.dataSource instanceof a.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&!this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url||i.i(s.b)(this.parent))return e.prototype.generateRows.call(this,t,r);i.i(o.isNullOrUndefined)(r.requestType)||"collapseAll"!==r.requestType.toString()||(r.requestType="refresh");for(var d=e.prototype.generateRows.call(this,t,r),l=0;l<d.length;l++)d[parseInt(l.toString(),10)].index=this.visualData.indexOf(d[parseInt(l.toString(),10)].data);return d},t.prototype.checkAndResetCache=function(e){var t=["paging","refresh","sorting","filtering","searching","reorder","save","delete"].some(function(t){return e===t});if(this.parent.dataSource instanceof a.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&!this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url||i.i(s.b)(this.parent)){var r=this.model.currentPage;t?(this.cache={},this.data={},this.groups={}):"virtualscroll"===e&&this.cache[parseInt(r.toString(),10)]&&this.cache[parseInt(r.toString(),10)].length>this.parent.contentModule.getBlockSize()&&delete this.cache[parseInt(r.toString(),10)]}else(t||"virtualscroll"===e)&&(this.cache={},this.data={},this.groups={});return t},t}(r.VirtualRowModelGenerator)},function(e,t,i){"use strict";var r=i(48);i.d(t,"o",function(){return r.a}),i.d(t,"p",function(){return r.b}),i.d(t,"q",function(){return r.c}),i.d(t,"r",function(){return r.d}),i.d(t,"s",function(){return r.e}),i.d(t,"t",function(){return r.f}),i.d(t,"u",function(){return r.g}),i.d(t,"v",function(){return r.h}),i.d(t,"w",function(){return r.i}),i.d(t,"x",function(){return r.j}),i.d(t,"y",function(){return r.k}),i.d(t,"z",function(){return r.l}),i.d(t,"A",function(){return r.m}),i.d(t,"B",function(){return r.n}),i.d(t,"C",function(){return r.o}),i.d(t,"D",function(){return r.p}),i.d(t,"E",function(){return r.q}),i.d(t,"F",function(){return r.r}),i.d(t,"G",function(){return r.s}),i.d(t,"H",function(){return r.t}),i.d(t,"I",function(){return r.u}),i.d(t,"J",function(){return r.v}),i.d(t,"K",function(){return r.w}),i.d(t,"L",function(){return r.x}),i.d(t,"M",function(){return r.y}),i.d(t,"N",function(){return r.z}),i.d(t,"O",function(){return r.A}),i.d(t,"P",function(){return r.B}),i.d(t,"Q",function(){return r.C}),i.d(t,"R",function(){return r.D}),i.d(t,"S",function(){return r.E}),i.d(t,"T",function(){return r.F}),i.d(t,"U",function(){return r.G}),i.d(t,"V",function(){return r.H}),i.d(t,"W",function(){return r.I}),i.d(t,"X",function(){return r.J}),i.d(t,"Y",function(){return r.K}),i.d(t,"Z",function(){return r.L}),i.d(t,"_0",function(){return r.M}),i.d(t,"_1",function(){return r.N}),i.d(t,"_2",function(){return r.O}),i.d(t,"_3",function(){return r.P}),i.d(t,"_4",function(){return r.Q}),i.d(t,"_5",function(){return r.R}),i.d(t,"_6",function(){return r.S}),i.d(t,"_7",function(){return r.T}),i.d(t,"_8",function(){return r.U}),i.d(t,"_9",function(){return r.V}),i.d(t,"_10",function(){return r.W}),i.d(t,"_11",function(){return r.X}),i.d(t,"_12",function(){return r.Y}),i.d(t,"_13",function(){return r.Z}),i.d(t,"_14",function(){return r._0}),i.d(t,"_15",function(){return r._1}),i.d(t,"_16",function(){return r._2}),i.d(t,"_17",function(){return r._3}),i.d(t,"_18",function(){return r._4}),i.d(t,"_19",function(){return r._5}),i.d(t,"_20",function(){return r._6}),i.d(t,"_21",function(){return r._7}),i.d(t,"_22",function(){return r._8}),i.d(t,"_23",function(){return r._9}),i.d(t,"_24",function(){return r._10}),i.d(t,"_25",function(){return r._11}),i.d(t,"_26",function(){return r._12}),i.d(t,"_27",function(){return r._13}),i.d(t,"_28",function(){return r._14}),i.d(t,"_29",function(){return r._15}),i.d(t,"_30",function(){return r._16}),i.d(t,"_31",function(){return r._17}),i.d(t,"_32",function(){return r._18}),i.d(t,"_33",function(){return r._19}),i.d(t,"_34",function(){return r._20}),i.d(t,"_35",function(){return r._21}),i.d(t,"_36",function(){return r._22}),i.d(t,"_37",function(){return r._23}),i.d(t,"_38",function(){return r._24}),i.d(t,"_39",function(){return r._25}),i.d(t,"_40",function(){return r._26}),i.d(t,"_41",function(){return r._27}),i.d(t,"_42",function(){return r._28}),i.d(t,"_43",function(){return r._29}),i.d(t,"_44",function(){return r._30}),i.d(t,"_45",function(){return r._31});var n=i(50);i.d(t,"_46",function(){return n.a}),i.d(t,"_47",function(){return n.b}),i.d(t,"_48",function(){return n.c}),i.d(t,"_49",function(){return n.d}),i.d(t,"_50",function(){return n.e}),i.d(t,"_51",function(){return n.f}),i.d(t,"_52",function(){return n.g}),i.d(t,"_53",function(){return n.h}),i.d(t,"_54",function(){return n.i}),i.d(t,"_55",function(){return n.j}),i.d(t,"_56",function(){return n.k}),i.d(t,"_57",function(){return n.l}),i.d(t,"_58",function(){return n.m}),i.d(t,"_59",function(){return n.n}),i.d(t,"_60",function(){return n.o}),i.d(t,"_61",function(){return n.p});var o=i(53);i.d(t,"_62",function(){return o.a}),i.d(t,"_63",function(){return o.b});var a=i(3);i.d(t,"a",function(){return a.a}),i.d(t,"b",function(){return a.b}),i.d(t,"c",function(){return a.c}),i.d(t,"d",function(){return a.d}),i.d(t,"e",function(){return a.e}),i.d(t,"f",function(){return a.f}),i.d(t,"g",function(){return a.g}),i.d(t,"h",function(){return a.h}),i.d(t,"i",function(){return a.i}),i.d(t,"j",function(){return a.j}),i.d(t,"k",function(){return a.k}),i.d(t,"l",function(){return a.l});var s=i(13);i.d(t,"m",function(){return s.a}),i.d(t,"n",function(){return s.b});var d=i(38);i.d(t,"_64",function(){return d.a}),i.d(t,"_65",function(){return d.b}),i.d(t,"_66",function(){return d.c}),i.d(t,"_67",function(){return d.d}),i.d(t,"_68",function(){return d.e}),i.d(t,"_69",function(){return d.f}),i.d(t,"_70",function(){return d.g}),i.d(t,"_71",function(){return d.h}),i.d(t,"_72",function(){return d.i}),i.d(t,"_73",function(){return d.j}),i.d(t,"_74",function(){return d.k}),i.d(t,"_75",function(){return d.l}),i.d(t,"_76",function(){return d.m}),i.d(t,"_77",function(){return d.n}),i.d(t,"_78",function(){return d.o}),i.d(t,"_79",function(){return d.p}),i.d(t,"_80",function(){return d.q}),i.d(t,"_81",function(){return d.r}),i.d(t,"_82",function(){return d.s}),i.d(t,"_83",function(){return d.t}),i.d(t,"_84",function(){return d.u})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(26);i.d(t,"isRemoteData",function(){return r.a}),i.d(t,"isCountRequired",function(){return r.b}),i.d(t,"isCheckboxcolumn",function(){return r.c}),i.d(t,"isFilterChildHierarchy",function(){return r.d}),i.d(t,"findParentRecords",function(){return r.e}),i.d(t,"getExpandStatus",function(){return r.f}),i.d(t,"findChildrenRecords",function(){return r.g}),i.d(t,"isOffline",function(){return r.h}),i.d(t,"extendArray",function(){return r.i}),i.d(t,"getPlainData",function(){return r.j}),i.d(t,"getParentData",function(){return r.k}),i.d(t,"isHidden",function(){return r.l}),i.d(t,"ToolbarItem",function(){return r.m}),i.d(t,"ContextMenuItems",function(){return r.n}),i.d(t,"TreeGrid",function(){return r.o}),i.d(t,"load",function(){return r.p}),i.d(t,"rowDataBound",function(){return r.q}),i.d(t,"dataBound",function(){return r.r}),i.d(t,"queryCellInfo",function(){return r.s}),i.d(t,"beforeDataBound",function(){return r.t}),i.d(t,"actionBegin",function(){return r.u}),i.d(t,"dataStateChange",function(){return r.v}),i.d(t,"actionComplete",function(){return r.w}),i.d(t,"rowSelecting",function(){return r.x}),i.d(t,"rowSelected",function(){return r.y}),i.d(t,"checkboxChange",function(){return r.z}),i.d(t,"rowDeselected",function(){return r.A}),i.d(t,"toolbarClick",function(){return r.B}),i.d(t,"beforeExcelExport",function(){return r.C}),i.d(t,"beforePdfExport",function(){return r.D}),i.d(t,"resizeStop",function(){return r.E}),i.d(t,"expanded",function(){return r.F}),i.d(t,"expanding",function(){return r.G}),i.d(t,"collapsed",function(){return r.H}),i.d(t,"collapsing",function(){return r.I}),i.d(t,"remoteExpand",function(){return r.J}),i.d(t,"localPagedExpandCollapse",function(){return r.K}),i.d(t,"pagingActions",function(){return r.L}),i.d(t,"printGridInit",function(){return r.M}),i.d(t,"contextMenuOpen",function(){return r.N}),i.d(t,"contextMenuClick",function(){return r.O}),i.d(t,"beforeCopy",function(){return r.P}),i.d(t,"beforePaste",function(){return r.Q}),i.d(t,"savePreviousRowPosition",function(){return r.R}),i.d(t,"crudAction",function(){return r.S}),i.d(t,"beginEdit",function(){return r.T}),i.d(t,"beginAdd",function(){return r.U}),i.d(t,"recordDoubleClick",function(){return r.V}),i.d(t,"cellSave",function(){return r.W}),i.d(t,"cellSaved",function(){return r.X}),i.d(t,"cellEdit",function(){return r.Y}),i.d(t,"batchDelete",function(){return r.Z}),i.d(t,"batchCancel",function(){return r._0}),i.d(t,"batchAdd",function(){return r._1}),i.d(t,"beforeBatchDelete",function(){return r._2}),i.d(t,"beforeBatchAdd",function(){return r._3}),i.d(t,"beforeBatchSave",function(){return r._4}),i.d(t,"batchSave",function(){return r._5}),i.d(t,"keyPressed",function(){return r._6}),i.d(t,"updateData",function(){return r._7}),i.d(t,"doubleTap",function(){return r._8}),i.d(t,"virtualColumnIndex",function(){return r._9}),i.d(t,"virtualActionArgs",function(){return r._10}),i.d(t,"destroy",function(){return r._11}),i.d(t,"dataListener",function(){return r._12}),i.d(t,"indexModifier",function(){return r._13}),i.d(t,"beforeStartEdit",function(){return r._14}),i.d(t,"beforeBatchCancel",function(){return r._15}),i.d(t,"batchEditFormRendered",function(){return r._16}),i.d(t,"detailDataBound",function(){return r._17}),i.d(t,"rowDrag",function(){return r._18}),i.d(t,"rowDragStartHelper",function(){return r._19}),i.d(t,"rowDrop",function(){return r._20}),i.d(t,"rowDragStart",function(){return r._21}),i.d(t,"rowsAdd",function(){return r._22}),i.d(t,"rowsRemove",function(){return r._23}),i.d(t,"rowdraging",function(){return r._24}),i.d(t,"rowDropped",function(){return r._25}),i.d(t,"autoCol",function(){return r._26}),i.d(t,"rowDeselecting",function(){return r._27}),i.d(t,"headerContent",function(){return r._28}),i.d(t,"movableContent",function(){return r._29}),i.d(t,"movableHeader",function(){return r._30}),i.d(t,"frozenContent",function(){return r._31}),i.d(t,"frozenHeader",function(){return r._32}),i.d(t,"content",function(){return r._33}),i.d(t,"table",function(){return r._34}),i.d(t,"leftRight",function(){return r._35}),i.d(t,"frozenRight",function(){return r._36}),i.d(t,"frozenLeft",function(){return r._37}),i.d(t,"dataColIndex",function(){return r._38}),i.d(t,"ariaColIndex",function(){return r._39}),i.d(t,"dataRowIndex",function(){return r._40}),i.d(t,"ariaRowIndex",function(){return r._41}),i.d(t,"DataManipulation",function(){return r._42}),i.d(t,"Reorder",function(){return r._43}),i.d(t,"Resize",function(){return r._44}),i.d(t,"RowDD",function(){return r._45}),i.d(t,"Column",function(){return r._46}),i.d(t,"TreeGridColumn",function(){return r._47}),i.d(t,"StackedColumn",function(){return r._48}),i.d(t,"EditSettings",function(){return r._49}),i.d(t,"Predicate",function(){return r._50}),i.d(t,"FilterSettings",function(){return r._51}),i.d(t,"PageSettings",function(){return r._52}),i.d(t,"SearchSettings",function(){return r._53}),i.d(t,"SelectionSettings",function(){return r._54}),i.d(t,"AggregateColumn",function(){return r._55}),i.d(t,"AggregateRow",function(){return r._56}),i.d(t,"SortDescriptor",function(){return r._57}),i.d(t,"SortSettings",function(){return r._58}),i.d(t,"RowDropSettings",function(){return r._59}),i.d(t,"InfiniteScrollSettings",function(){return r._60}),i.d(t,"LoadingIndicator",function(){return r._61}),i.d(t,"Render",function(){return r._62}),i.d(t,"TreeVirtualRowModelGenerator",function(){return r._63}),i.d(t,"Filter",function(){return r._64}),i.d(t,"ExcelExport",function(){return r._65}),i.d(t,"PdfExport",function(){return r._66}),i.d(t,"Page",function(){return r._67}),i.d(t,"Toolbar",function(){return r._68}),i.d(t,"Aggregate",function(){return r._69}),i.d(t,"Sort",function(){return r._70}),i.d(t,"TreeClipboard",function(){return r._71}),i.d(t,"ColumnMenu",function(){return r._72}),i.d(t,"ContextMenu",function(){return r._73}),i.d(t,"Edit",function(){return r._74}),i.d(t,"CommandColumn",function(){return r._75}),i.d(t,"Selection",function(){return r._76}),i.d(t,"DetailRow",function(){return r._77}),i.d(t,"VirtualScroll",function(){return r._78}),i.d(t,"TreeVirtual",function(){return r._79}),i.d(t,"Freeze",function(){return r._80}),i.d(t,"ColumnChooser",function(){return r._81}),i.d(t,"Logger",function(){return r._82}),i.d(t,"treeGridDetails",function(){return r._83}),i.d(t,"InfiniteScroll",function(){return r._84})},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(1),n=(i.n(r),i(2)),o=i(4),a=(i.n(o),i(3)),s=i(0),d=(i.n(s),i(5)),l=function(){function e(e){this.batchChildCount=0,this.addedRecords="addedRecords",this.deletedRecords="deletedRecords",this.batchAddedRecords=[],this.batchDeletedRecords=[],this.batchAddRowRecord=[],this.parent=e,this.isSelfReference=!i.i(r.isNullOrUndefined)(e.parentIdMapping),this.batchRecords=[],this.currentViewRecords=[],this.isAdd=!1,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(n.x,this.cellSaved,this),this.parent.on(n.y,this.batchAdd,this),this.parent.on(n.z,this.beforeBatchAdd,this),this.parent.on(n.w,this.batchSave,this),this.parent.on(n.A,this.beforeBatchDelete,this),this.parent.on(n.B,this.beforeBatchSave,this),this.parent.on("batchPageAction",this.batchPageAction,this),this.parent.on("batchCancelAction",this.batchCancelAction,this),this.parent.grid.on("immutable-batch-cancel",this.immutableBatchAction,this),this.parent.grid.on("next-cell-index",this.nextCellIndex,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(n.x,this.cellSaved),this.parent.off(n.y,this.batchAdd),this.parent.off(n.w,this.batchSave),this.parent.off(n.z,this.beforeBatchAdd),this.parent.off(n.A,this.beforeBatchDelete),this.parent.off(n.B,this.beforeBatchSave),this.parent.off("batchPageAction",this.batchPageAction),this.parent.off("batchCancelAction",this.batchCancelAction),this.parent.grid.off("immutable-batch-cancel",this.immutableBatchAction),this.parent.grid.off("next-cell-index",this.nextCellIndex))},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.getBatchRecords=function(){return this.batchRecords},e.prototype.getAddRowIndex=function(){return this.addRowIndex},e.prototype.getSelectedIndex=function(){return this.selectedIndex},e.prototype.getBatchChildCount=function(){return this.batchChildCount},e.prototype.batchPageAction=function(){var e,t=this.parent.grid.dataSource instanceof o.DataManager?this.parent.grid.dataSource.dataSource.json:this.parent.grid.dataSource,n=this.parent.grid.getPrimaryKeyFieldNames()[0];if(!i.i(r.isNullOrUndefined)(this.batchAddedRecords)&&this.batchAddedRecords.length)for(var a=0;a<this.batchAddedRecords.length;a++)e=t.map(function(e){return e[""+n]}).indexOf(this.batchAddedRecords[parseInt(a.toString(),10)][""+n]),t.splice(e,1);this.batchAddedRecords=this.batchRecords=this.batchAddRowRecord=this.batchDeletedRecords=this.currentViewRecords=[]},e.prototype.cellSaved=function(e){if(e.column.index===this.parent.treeColumnIndex&&this.parent.renderModule.cellRender({data:e.rowData,cell:e.cell,column:this.parent.grid.getColumnByIndex(e.column.index)}),this.isAdd&&"Batch"===this.parent.editSettings.mode&&"Bottom"!==this.parent.editSettings.newRowPosition){var t=this.parent.grid.dataSource instanceof o.DataManager?this.parent.grid.dataSource.dataSource.json:this.parent.grid.dataSource,n=void 0,l=this.parent.grid.getPrimaryKeyFieldNames()[0],p=void 0,c=void 0,h=this.selectedIndex>-1?this.batchRecords[parseInt(this.addRowIndex.toString(),10)].parentItem:null,u=void 0,g=void 0,f=void 0,y="Top"===this.parent.editSettings.newRowPosition||-1===this.selectedIndex?0:"Above"===this.parent.editSettings.newRowPosition?this.addRowIndex:this.addRowIndex+1;if(y=this.getActualRowObjectIndex(y),this.newBatchRowAdded){if(this.batchRecords.length&&(u=this.batchRecords[this.addRowIndex][this.parent.idMapping],f=this.batchRecords[this.addRowIndex][this.parent.parentIdMapping],this.batchRecords[parseInt(this.addRowIndex.toString(),10)].parentItem&&(g=this.batchRecords[parseInt(this.addRowIndex.toString(),10)].parentItem.uniqueID)),this.batchAddedRecords=i.i(a.i)(this.batchAddedRecords),this.batchAddRowRecord=i.i(a.i)(this.batchAddRowRecord),this.batchAddRowRecord.push(this.batchRecords[this.addRowIndex]),n=this.parent.grid.getRowsObject()[parseInt(y.toString(),10)].changes,n.uniqueID=i.i(s.getUid)(this.parent.element.id+"_data_"),i.i(r.setValue)("uniqueIDCollection."+n.uniqueID,n,this.parent),!Object.prototype.hasOwnProperty.call(n,"level")){if(this.batchIndex=-1===this.selectedIndex?0:this.batchIndex,"Child"===this.parent.editSettings.newRowPosition){if(n.primaryParent=h,this.selectedIndex>-1){n.parentItem=i.i(r.extend)({},this.batchRecords[this.addRowIndex]),n.parentUniqueID=n.parentItem.uniqueID,delete n.parentItem.childRecords,delete n.parentItem[this.parent.childMapping],n.level=n.parentItem.level+1,n.index=this.batchIndex;var m=i.i(a.g)(this.batchRecords[this.addRowIndex]).length,v=i.i(a.g)(this.batchRecords[this.addRowIndex])[m-1];v=i.i(r.isNullOrUndefined)(v)?this.batchRecords[this.addRowIndex]:v,p=t.map(function(e){return e[""+l]}).indexOf(v[""+l]),this.isSelfReference&&(n[this.parent.parentIdMapping]=u),i.i(d.b)(l,n.parentItem,"add",this.parent,this.isSelfReference,n)}}else if(("Above"===this.parent.editSettings.newRowPosition||"Below"===this.parent.editSettings.newRowPosition)&&!i.i(r.isNullOrUndefined)(this.batchRecords[this.addRowIndex])){if(n.level=this.batchRecords[parseInt(this.addRowIndex.toString(),10)].level,n.level&&this.selectedIndex>-1&&(n.parentItem=h,n.parentUniqueID=g,delete n.parentItem.childRecords,delete n.parentItem[this.parent.childMapping]),n.index="Below"===this.parent.editSettings.newRowPosition?this.batchIndex:this.batchIndex-1,"Below"===this.parent.editSettings.newRowPosition&&this.selectedIndex>-1){var m=i.i(a.g)(this.batchRecords[this.addRowIndex]).length,v=i.i(a.g)(this.batchRecords[this.addRowIndex])[m-1];v=i.i(r.isNullOrUndefined)(v)?this.batchRecords[this.addRowIndex]:v,p=t.map(function(e){return e[""+l]}).indexOf(v[""+l])}if("Above"===this.parent.editSettings.newRowPosition&&this.selectedIndex>-1){var v=this.batchRecords[this.addRowIndex];p=t.map(function(e){return e[""+l]}).indexOf(v[""+l])}this.isSelfReference&&(n[this.parent.parentIdMapping]=f)}n.index=-1===n.index?0:n.index,n.hasChildRecords=!1,n.childRecords=[],this.batchRecords.splice(n.index,0,n),this.currentViewRecords.splice(n.index,0,n),c=p||n.index,"Above"!==this.parent.editSettings.newRowPosition&&(c=0===n.index?c:c+1),t.splice(c,0,n),this.batchAddedRecords.push(n)}this.parent.grid.getRowsObject()[parseInt(y.toString(),10)].data=n,this.newBatchRowAdded=!1}}},e.prototype.beforeBatchAdd=function(e){if("Cell"===this.parent.editSettings.mode&&this.parent.editModule.isTabLastRow)return e.cancel=!0,void(this.parent.editModule.isTabLastRow=!1);!this.parent.editModule.isAddedRowByMethod||i.i(r.isNullOrUndefined)(this.parent.editModule.addRowIndex)||this.parent.editModule.isAddedRowByContextMenu||-1!==this.parent.grid.selectedRowIndex&&!this.parent.editModule.batchEditModule.isAdd?(this.selectedIndex=this.parent.grid.selectedRowIndex,this.addRowIndex=this.parent.grid.selectedRowIndex>-1?this.parent.grid.selectedRowIndex:0,this.parent.editModule.addRowIndex=this.parent.grid.selectedRowIndex>-1?this.parent.grid.selectedRowIndex:0,this.addRowRecord=this.parent.getSelectedRecords()[0]):(this.selectedIndex=this.parent.editModule.selectedIndex,this.addRowIndex=this.parent.editModule.addRowIndex,this.addRowRecord=this.batchRecords.length?this.batchRecords[this.selectedIndex]:this.parent.getCurrentViewRecords()[this.selectedIndex])},e.prototype.batchAdd=function(e){if("Bottom"!==this.parent.editSettings.newRowPosition){this.isAdd=!0,this.newBatchRowAdded=!0;var t=0;if(this.batchRecords.length||(this.batchAddedRecords=[],this.batchRecords=i.i(a.i)(this.parent.grid.getCurrentViewRecords()),this.currentViewRecords=i.i(a.i)(this.parent.grid.getCurrentViewRecords())),this.parent.editModule.isAddedRowByMethod&&!i.i(r.isNullOrUndefined)(this.parent.editModule.addRowIndex)&&i.i(r.classList)(this.parent.grid.getDataRows()[0],["e-batchrow"],[]),"Top"!==this.parent.editSettings.newRowPosition){var o=this.parent.grid.getCurrentViewRecords();"Batch"===this.parent.editSettings.mode&&(this.parent.getBatchChanges()[this.addedRecords].length>1||this.parent.getBatchChanges()[this.deletedRecords].length)&&(o=this.batchRecords),this.updateChildCount(o),this.parent.notify(n.m,{}),this.batchChildCount=0}this.updateRowIndex();var s=i.i(r.getValue)("focusModule",this.parent.grid),d=this.parent.getContentTable();if(this.parent.getBatchChanges()[this.deletedRecords].length&&"Above"===this.parent.editSettings.newRowPosition?(t=e.row.rowIndex,s.getContent().matrix.matrix=this.matrix):t=d.getElementsByClassName("e-batchrow")[0].rowIndex,s.getContent().matrix.current=[t,s.getContent().matrix.current[1]],this.parent.editModule.isAddedRowByMethod&&!i.i(r.isNullOrUndefined)(this.parent.editModule.addRowIndex)&&!this.parent.editModule.isAddedRowByContextMenu){var l=this.parent.getBatchChanges().addedRecords,p=parseInt(this.parent.getContentTable().getElementsByClassName("e-insertedrow")[l.length-1].getAttribute("data-rowindex"),10);this.batchRecords.splice(p,0,l[l.length-1])}}},e.prototype.beforeBatchDelete=function(e){this.batchRecords.length||(this.batchRecords=i.i(a.i)(this.parent.grid.getCurrentViewRecords()),this.currentViewRecords=i.i(a.i)(this.parent.grid.getCurrentViewRecords()));var t=i.i(r.getValue)("focusModule",this.parent.grid);this.matrix=t.getContent().matrix.matrix;var n,o,s,d=[],l=[],p=this.parent.grid.getPrimaryKeyFieldNames()[0];i.i(r.isNullOrUndefined)(e.row)||-1!==this.parent.getSelectedRows().indexOf(e.row)?(n=this.parent.grid.getSelectedRecords()[this.parent.grid.getSelectedRecords().length-1],o=i.i(a.g)(n),s=this.parent.getSelectedRows()[0].getAttribute("data-uid")):(n=e.rowData,o=i.i(a.g)(n),s=e.row.getAttribute("data-uid"));var c=parseInt(this.parent.grid.getRowElementByUID(s).getAttribute("data-rowindex"),10);if(o.length)for(var h=c+o.length,u=c+1,g=u;g<=h;g++)d.push(this.parent.grid.getDataRows()[parseInt(g.toString(),10)]),(this.parent.frozenRows||this.parent.frozenColumns||this.parent.getFrozenColumns())&&d.push(this.parent.grid.getHeaderContent()[parseInt(g.toString(),10)]);if(!i.i(r.isNullOrUndefined)(n.parentItem)){var f=i.i(a.k)(this.parent,n.parentItem.uniqueID);if(!i.i(r.isNullOrUndefined)(f)&&f.hasChildRecords){var y=f.childRecords.indexOf(n);f.childRecords.splice(y,1)}this.batchDeletedRecords=i.i(a.i)(this.batchDeletedRecords),this.batchDeletedRecords.push(n)}o.push(n),l=o;for(var g=0;g<l.length;g++){var m=this.batchRecords.map(function(e){return e[""+p]}).indexOf(l[parseInt(g.toString(),10)][""+p]);-1!==m&&this.batchRecords.splice(m,1)}for(var g=0;g<d.length;g++)i.i(r.isNullOrUndefined)(d[parseInt(g.toString(),10)])||this.parent.grid.selectionModule.selectedRecords.push(d[parseInt(g.toString(),10)])},e.prototype.updateRowIndex=function(){for(var e=this.parent.grid.getDataRows(),t=0;t<e.length;t++)e[parseInt(t.toString(),10)].setAttribute("data-rowindex",t.toString())},e.prototype.updateChildCount=function(e){for(var t=this.parent.grid.getPrimaryKeyFieldNames()[0],n="Child"===this.parent.editSettings.newRowPosition?"primaryParent":"parentItem",o=0;o<this.parent.getBatchChanges().addedRecords.length;o++)i.i(r.isNullOrUndefined)(this.parent.getBatchChanges().addedRecords[parseInt(o.toString(),10)][""+n])||this.parent.getBatchChanges().addedRecords[parseInt(o.toString(),10)][""+n][""+t]===e[parseInt(this.addRowIndex.toString(),10)][""+t]&&(this.batchChildCount=this.batchChildCount+1)},e.prototype.beforeBatchSave=function(e){var t=e.batchChanges.changedRecords;if(e.batchChanges.changedRecords.length)for(var r=0;r<t.length;r++)i.i(d.a)({value:t[parseInt(r.toString(),10)],action:"edit"},this.parent,this.isSelfReference,this.addRowIndex,this.selectedIndex,void 0);if(e.batchChanges.deletedRecords.length)for(var n=e.batchChanges.deletedRecords,o=n,r=0;r<o.length;r++){this.deleteUniqueID(o[parseInt(r.toString(),10)].uniqueID);for(var s=i.i(a.g)(o[parseInt(r.toString(),10)]),l=0;l<s.length;l++)this.deleteUniqueID(s[parseInt(l.toString(),10)].uniqueID);e.batchChanges.deletedRecords=e.batchChanges.deletedRecords.concat(s)}this.isAdd=!1},e.prototype.deleteUniqueID=function(e){delete this.parent.uniqueIDFilterCollection[""+e];delete this.parent.uniqueIDCollection[""+e]},e.prototype.batchCancelAction=function(){var e,t=this.parent.grid.getCurrentViewRecords(),n=this.parent.grid.dataSource instanceof o.DataManager?this.parent.grid.dataSource.dataSource.json:this.parent.grid.dataSource,s=this.parent.grid.getPrimaryKeyFieldNames()[0];if(!i.i(r.isNullOrUndefined)(this.batchAddedRecords))for(var d=0;d<this.batchAddedRecords.length;d++)if(e=n.map(function(e){return e[""+s]}).indexOf(this.batchAddedRecords[parseInt(d.toString(),10)][""+s]),-1!==e&&n.splice(e,1),"Child"===this.parent.editSettings.newRowPosition&&(e=t.map(function(e){return e[""+s]}).indexOf(this.batchAddedRecords[parseInt(d.toString(),10)].parentItem?this.batchAddedRecords[parseInt(d.toString(),10)].parentItem[""+s]:this.batchAddedRecords[parseInt(d.toString(),10)][""+s]),!i.i(r.isNullOrUndefined)(t[parseInt(e.toString(),10)])))for(var l=t[parseInt(e.toString(),10)].childRecords,p=0;l&&p<l.length;p++)l[parseInt(p.toString(),10)][""+s]===this.batchAddedRecords[parseInt(d.toString(),10)][""+s]&&t[parseInt(e.toString(),10)].childRecords.splice(p,1);if(!i.i(r.isNullOrUndefined)(this.parent.targetElement)){var c=this.parent.targetElement.closest("tr");this.parent.collapseRow(c),this.parent.targetElement=null}if(!i.i(r.isNullOrUndefined)(this.batchDeletedRecords))for(var d=0;d<this.batchDeletedRecords.length;d++)if(!i.i(r.isNullOrUndefined)(this.batchDeletedRecords[parseInt(d.toString(),10)].parentItem)){e=t.map(function(e){return e[""+s]}).indexOf(this.batchDeletedRecords[parseInt(d.toString(),10)].parentItem[""+s]);var h=0===this.batchDeletedRecords[parseInt(d.toString(),10)].index?this.batchDeletedRecords[parseInt(d.toString(),10)].index:this.batchDeletedRecords[parseInt(d.toString(),10)].index-1;i.i(r.isNullOrUndefined)(t[parseInt(e.toString(),10)])||t[parseInt(e.toString(),10)].childRecords.splice(h,0,this.batchDeletedRecords[parseInt(d.toString(),10)])}this.batchAddedRecords=this.batchRecords=this.batchAddRowRecord=this.currentViewRecords=[],this.batchRecords=i.i(a.i)(this.parent.grid.getCurrentViewRecords()),this.batchIndex=0,this.currentViewRecords=i.i(a.i)(this.parent.grid.getCurrentViewRecords()),this.batchDeletedRecords=[],this.parent.grid.renderModule.refresh()},e.prototype.batchSave=function(e){if("Batch"===this.parent.editSettings.mode){var t=void 0,n=Object.hasOwnProperty.call(e,"updatedRecords")?e.updatedRecords:this.parent.getBatchChanges(),s=this.parent.grid.dataSource instanceof o.DataManager?this.parent.grid.dataSource.dataSource.json:this.parent.grid.dataSource,l=this.parent.grid.getCurrentViewRecords(),p=this.parent.grid.getPrimaryKeyFieldNames()[0],c=n.addedRecords,h=void 0,u=void 0,g=void 0;if(c.length>1&&"Bottom"!==this.parent.editSettings.newRowPosition&&c.reverse(),"Bottom"!==this.parent.editSettings.newRowPosition&&!Object.hasOwnProperty.call(e,"updatedRecords")){if(s.splice(s.length-c.length,c.length),this.parent.editModule.isAddedRowByMethod&&c.length&&!i.i(r.isNullOrUndefined)(this.parent.editModule.addRowIndex)&&!this.parent.editModule.isAddedRowByContextMenu){c.reverse();for(var f=0;f<c.length;f++){var y=parseInt(this.parent.getContentTable().getElementsByClassName("e-insertedrow")[parseInt(f.toString(),10)].getAttribute("data-rowindex"),10);s.splice(y,0,c[parseInt(f.toString(),10)])}}if(this.parent.allowPaging||s.length===l.length){var m=i.i(a.i)(s);if(m.length){var v=m.map(function(e){return e[""+p]}).indexOf(l[0][""+p]),S=v+this.parent.grid.pageSettings.pageSize;l=m.splice(v,S)}}else l.length>c.length&&l.splice(l.length-c.length,c.length)}for(0===this.batchAddRowRecord.length&&this.batchAddRowRecord.push(this.parent.flatData[e.index]),this.parent.editModule.isAddedRowByContextMenu&&c.reverse(),t=0;t<c.length;t++){var I=i.i(r.extend)({},c[parseInt(t.toString(),10)]);if(delete I.parentItem,delete I.uniqueID,delete I.index,delete I.level,delete I.hasChildRecords,delete I.childRecords,delete I.parentUniqueID,i.i(r.isNullOrUndefined)(I.primaryParent)||delete I.primaryParent,c.length>1&&this.parent.editModule.isAddedRowByContextMenu){var w=this.parent.editSettings.newRowPosition;this.parent.editSettings.newRowPosition=this.parent.editModule.previousNewRowPosition,this.parent.editModule.previousNewRowPosition=w}if(c[parseInt(t.toString(),10)].taskData=I,g=this.batchAddRowRecord[parseInt(t.toString(),10)],i.i(r.isNullOrUndefined)(g)&&(g=this.batchAddRowRecord[t-1]),this.isSelfReference&&(i.i(r.isNullOrUndefined)(c[parseInt(t.toString(),10)].parentItem)||i.i(d.b)(p,c[parseInt(t.toString(),10)].parentItem,"add",this.parent,this.isSelfReference,c[parseInt(t.toString(),10)])),i.i(r.isNullOrUndefined)(g)||(u=g.index),"Top"!==this.parent.editSettings.newRowPosition&&"Bottom"!==this.parent.editSettings.newRowPosition&&i.i(r.isNullOrUndefined)(c[parseInt(t.toString(),10)].parentItem)&&-1===this.selectedIndex&&(h=-1,g=null),i.i(d.a)({value:c[parseInt(t.toString(),10)],action:"add"},this.parent,this.isSelfReference,u,h,void 0,g),h=null,"Child"===this.parent.editSettings.newRowPosition&&!i.i(r.isNullOrUndefined)(c[parseInt(t.toString(),10)].parentItem)&&(i.i(r.isNullOrUndefined)(this.parent.editModule.addRowIndex)||this.isSelfReference))for(var R=l.map(function(e){return e[""+p]}).indexOf(c[parseInt(t.toString(),10)].parentItem[""+p]),x=l[parseInt(R.toString(),10)].childRecords,C=0;C<x.length;C++)x[parseInt(C.toString(),10)][""+p]===c[parseInt(t.toString(),10)][""+p]&&l[parseInt(R.toString(),10)].childRecords.splice(C,1)}if(n.deletedRecords.length)for(t=0;t<n.deletedRecords.length;t++)i.i(d.a)({value:n.deletedRecords[parseInt(t.toString(),10)],action:"delete"},this.parent,this.isSelfReference,u,h,void 0,g);this.parent.parentData=[];for(var b=0;b<s.length;b++)s[parseInt(b.toString(),10)].index=b,i.i(r.setValue)("uniqueIDCollection."+s[parseInt(b.toString(),10)].uniqueID+".index",b,this.parent),s[parseInt(b.toString(),10)].level||this.parent.parentData.push(s[parseInt(b.toString(),10)])}this.batchAddRowRecord=this.batchAddedRecords=this.batchRecords=this.batchDeletedRecords=this.currentViewRecords=[],this.parent.editModule.isAddedRowByContextMenu&&(this.parent.editModule.isAddedRowByContextMenu=!1)},e.prototype.getActualRowObjectIndex=function(e){var t=this.parent.grid.getDataRows();if(("Below"===this.parent.editSettings.newRowPosition||"Child"===this.parent.editSettings.newRowPosition)&&this.selectedIndex>-1){if(!i.i(r.isNullOrUndefined)(this.batchRecords[this.addRowIndex])&&this.batchRecords[this.addRowIndex].expanded)if(this.parent.getBatchChanges()[this.addedRecords].length>1||this.parent.getBatchChanges()[this.deletedRecords].length){if(e+=i.i(a.g)(this.batchRecords[this.addRowIndex]).length,"Child"!==this.parent.editSettings.newRowPosition){var n=this.getBatchChildCount();e+=n}}else e+=i.i(a.g)(this.batchRecords[this.addRowIndex]).length;e>=t.length&&(e=t.length-1),this.updateChildCount(this.parent.grid.getCurrentViewRecords()),this.batchChildCount&&(e+=this.batchChildCount),this.batchChildCount=0}return e},e.prototype.immutableBatchAction=function(e){e.args.cancel=!0;var t=this.parent.grid.getBatchChanges(),i=[];Object.keys(t).length&&(i=t.addedRecords);for(var r=0;r<i.length;r++)e.rows.splice(i[parseInt(r.toString(),10)].index,1)},e.prototype.nextCellIndex=function(e){this.parent.getSelectedRows().length?e.index=this.parent.getSelectedRows()[0].rowIndex:e.index=this.batchIndex},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){r.Grid.Inject(r.ColumnChooser),this.parent=e}return e.prototype.openColumnChooser=function(e,t){return this.parent.grid.columnChooserModule.openColumnChooser(e,t)},e.prototype.destroy=function(){},e.prototype.getModuleName=function(){return"ColumnChooser"},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){r.Grid.Inject(r.ColumnMenu),this.parent=e}return e.prototype.getColumnMenu=function(){return this.parent.grid.columnMenuModule.getColumnMenu()},e.prototype.destroy=function(){},e.prototype.getModuleName=function(){return"columnMenu"},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){r.Grid.Inject(r.CommandColumn),this.parent=e}return e.prototype.getModuleName=function(){return"commandColumn"},e.prototype.destroy=function(){},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),function(){function e(e){r.Grid.Inject(r.ContextMenu),this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on("contextMenuOpen",this.contextMenuOpen,this),this.parent.on("contextMenuClick",this.contextMenuClick,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("contextMenuOpen",this.contextMenuOpen),this.parent.off("contextMenuClick",this.contextMenuClick))},e.prototype.contextMenuOpen=function(e){var t=i.i(n.select)("#"+this.parent.element.id+"_gridcontrol_cmenu_AddRow",e.element),r=i.i(n.select)("#"+this.parent.element.id+"_gridcontrol_cmenu_Edit",e.element),o=i.i(n.select)("#"+this.parent.element.id+"_gridcontrol_cmenu_Indent",e.element),a=i.i(n.select)("#"+this.parent.element.id+"_gridcontrol_cmenu_Outdent",e.element);t&&(!1===this.parent.grid.editSettings.allowAdding||this.parent.grid.isEdit?t.style.display="none":t.style.display="block"),"Cell"!==this.parent.editSettings.mode&&"Batch"!==this.parent.editSettings.mode||i.i(n.isNullOrUndefined)(r)||r.classList.contains("e-menu-hide")||(r.style.display="none");var s=this.parent,d=s.getSelectedRows()[0];if(!o&&!a||i.i(n.isNullOrUndefined)(d)){if((o||a||s.grid.isEdit)&&i.i(n.isNullOrUndefined)(d)){for(var l=0,p=e.items;l<p.length;l++){var c=p[l];"Outdent"!==c.text&&"Indent"!==c.text||s.grid.contextMenuModule.hiddenItems.push(c.text)}s.grid.contextMenuModule.contextMenu.hideItems(s.grid.contextMenuModule.hiddenItems),o.style.display=a.style.display="none"}}else{var h=e.event.target.closest("td");if(!i.i(n.isNullOrUndefined)(h)&&(i.i(n.isNullOrUndefined)(h)||h.classList.contains("e-rowcell")&&0===h.querySelectorAll(".e-gridform").length)){if(0===d.rowIndex||s.getSelectedRowIndexes().length>1)o.style.display=a.style.display="none";else if("rowDeselected"!==e.name||!i.i(n.isNullOrUndefined)(d)&&s.grid.isCheckBoxSelection){var u=s.getCurrentViewRecords()[d.rowIndex];i.i(n.isNullOrUndefined)(u)||(u.level>s.getCurrentViewRecords()[d.rowIndex-1].level?o.style.display="none":o.style.display="block",u.level===s.getCurrentViewRecords()[d.rowIndex-1].level&&(o.style.display="block"),0===u.level?a.style.display="none":a.style.display="block")}}else{for(var g=0,f=e.items;g<f.length;g++){var c=f[g];"Outdent"!==c.text&&"Indent"!==c.text||s.grid.contextMenuModule.hiddenItems.push(c.text)}s.grid.contextMenuModule.contextMenu.hideItems(s.grid.contextMenuModule.hiddenItems),o.style.display=a.style.display="none"}}},e.prototype.contextMenuClick=function(e){if("Above"!==e.item.id&&"Below"!==e.item.id&&"Child"!==e.item.id||(this.parent.notify("savePreviousRowPosition",e),this.parent.setProperties({editSettings:{newRowPosition:e.item.id}},!0),this.parent.editModule.isAddedRowByContextMenu=!0,this.parent.addRecord()),(e.item.id===this.parent.element.id+"_gridcontrol_cmenu_Indent"||e.item.id===this.parent.element.id+"_gridcontrol_cmenu_Outdent")&&!i.i(n.isNullOrUndefined)(this.parent.rowDragAndDropModule)){var t=e.item.id===this.parent.element.id+"_gridcontrol_cmenu_Indent"?"indent":"outdent";this.parent.rowDragAndDropModule.indentOutdentAction(null,t)}},e.prototype.getModuleName=function(){return"contextMenu"},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.getContextMenu=function(){return this.parent.grid.contextMenuModule.getContextMenu()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),i(3)),a=function(){function e(e){r.Grid.Inject(r.DetailRow),this.parent=e,this.addEventListener()}return e.prototype.getModuleName=function(){return"detailRow"},e.prototype.addEventListener=function(){this.parent.on("dataBoundArg",this.dataBoundArg,this),this.parent.on("detaildataBound",this.detaildataBound,this),this.parent.grid.on("detail-indentcell-info",this.setIndentVisibility,this),this.parent.on("childRowExpand",this.childRowExpand,this),this.parent.on("rowExpandCollapse",this.rowExpandCollapse,this),this.parent.on("actioncomplete",this.actioncomplete,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("dataBoundArg",this.dataBoundArg),this.parent.off("detaildataBound",this.detaildataBound),this.parent.off("childRowExpand",this.childRowExpand),this.parent.off("rowExpandCollapse",this.rowExpandCollapse),this.parent.off("actioncomplete",this.actioncomplete),this.parent.grid.off("detail-indentcell-info",this.setIndentVisibility))},e.prototype.setIndentVisibility=function(e){e.visible=!1},e.prototype.dataBoundArg=function(){for(var e=this.parent.getRows().filter(function(e){return!e.classList.contains("e-detailrow")}),t=0;t<e.length;t++){var a=e[parseInt(t.toString(),10)].getElementsByClassName("e-detailrowcollapse"),s=this.parent.grid.getRowObjectFromUID(e[parseInt(t.toString(),10)].getAttribute("data-Uid")),d=i.i(r.getObject)("parentItem",this.parent.grid.getCurrentViewRecords()[parseInt(t.toString(),10)]);(i.i(n.isNullOrUndefined)(d)||!i.i(n.isNullOrUndefined)(d)&&i.i(o.f)(this.parent,s.data,this.parent.grid.getCurrentViewRecords()))&&this.parent.grid.detailRowModule.expand(a[0])}},e.prototype.childRowExpand=function(e){var t=e.row.getElementsByClassName("e-detailrowcollapse");i.i(n.isNullOrUndefined)(t[0])||this.parent.grid.detailRowModule.expand(t[0])},e.prototype.rowExpandCollapse=function(e){if(!i.i(o.a)(this.parent))for(var t=0;t<e.detailrows.length;t++)e.detailrows[parseInt(t.toString(),10)].style.display=e.action},e.prototype.detaildataBound=function(e){var t=e.data,r=e.detailElement.parentElement.previousSibling,o=i.i(n.isNullOrUndefined)(t.parentItem)?t.index:t.parentItem.index,a="e-gridrowindex"+o+"level"+t.level,s=r.querySelector("."+a).classList,d=[].slice.call(s).filter(function(e){return e===a}),l=d[0].length,p=d.toString().slice(6,l),c="e-griddetail"+p;i.i(n.addClass)([e.detailElement.parentElement],c)},e.prototype.actioncomplete=function(e){if("beginEdit"===e.requestType||"add"===e.requestType){var t=e.row.querySelectorAll(".e-editcell")[0].getAttribute("colSpan"),n=parseInt(t,10)-1,o=n.toString();e.row.querySelectorAll(".e-editcell")[0].setAttribute("colSpan",o)}for(var a=this.parent.grid.contentModule.getRows(),s=0;s<a.length;s++)a[parseInt(s.toString(),10)].cells[0].visible=!1;i.i(r.getObject)("focusModule",this.parent.grid).refreshMatrix(!0)({rows:this.parent.grid.contentModule.getRows()})},e.prototype.destroy=function(){this.removeEventListener()},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return p});var r=i(0),n=(i.n(r),i(2)),o=i(1),a=(i.n(o),i(4)),s=(i.n(a),i(3)),d=i(5),l=i(28),p=function(){function e(e){this.addedRecords="addedRecords",this.deletedRecords="deletedRecords",this.prevAriaRowIndex="-1",this.isAddedRowByMethod=!1,this.isAddedRowByContextMenu=!1,r.Grid.Inject(r.Edit),this.parent=e,this.isSelfReference=!i.i(o.isNullOrUndefined)(e.parentIdMapping),this.previousNewRowPosition=null,this.internalProperties={},this.batchEditModule=new l.a(this.parent),this.addEventListener()}return e.prototype.getModuleName=function(){return"edit"},e.prototype.addEventListener=function(){this.parent.on(n.k,this.crudAction,this),this.parent.on(n.l,this.beginEdit,this),this.parent.on(n.m,this.beginAdd,this),this.parent.on(n.n,this.recordDoubleClick,this),this.parent.on(n.o,this.cellSave,this),this.parent.on(n.p,this.batchCancel,this),this.parent.grid.on(n.q,this.keyPressed,this),this.parent.grid.on("batchedit-form",this.lastCellTab,this),this.parent.grid.on("content-ready",this.contentready,this),this.parent.on(n.r,this.cellEdit,this),this.parent.on("actionBegin",this.editActionEvents,this),this.parent.on("actionComplete",this.editActionEvents,this),this.parent.grid.on(n.s,this.recordDoubleClick,this),this.parent.grid.on("dblclick",this.gridDblClick,this),this.parent.grid.on("recordAdded",this.customCellSave,this),this.parent.on("savePreviousRowPosition",this.savePreviousRowPosition,this),this.parent.grid.on(n.t,this.beforeStartEdit,this),this.parent.grid.on(n.u,this.beforeBatchCancel,this),this.parent.grid.on("reset-edit-props",this.resetIsOnBatch,this),this.parent.grid.on("get-row-position",this.getRowPosition,this)},e.prototype.gridDblClick=function(e){if(this.doubleClickTarget=e.target,e.target.classList.contains("e-frame")&&0===this.parent.getCurrentViewRecords().length&&(this.doubleClickTarget=null),e.target.classList.contains("e-treegridcollapse")||e.target.classList.contains("e-treegridexpand")){var t=i.i(r.parentsUntil)(e.target,"e-row"),n=t&&parseInt(t.getAttribute("data-rowindex"),10);!i.i(o.isNullOrUndefined)(n)&&n>=0&&this.parent.allowPaging&&(this.parent.grid.getDataRows()[n].dataset.uid=this.parent.grid.contentModule.getRows()[n].uid)}},e.prototype.getRowPosition=function(e){e.newRowPosition=this.parent.editSettings.newRowPosition,e.addRowIndex=this.addRowIndex,e.dataRowIndex=+this.prevAriaRowIndex},e.prototype.beforeStartEdit=function(e){"Cell"===this.parent.editSettings.mode&&this.parent.trigger(n.v,e)},e.prototype.beforeBatchCancel=function(e){"Cell"===this.parent.editSettings.mode&&this.parent.trigger(n.h,e)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(n.k,this.crudAction),this.parent.off(n.l,this.beginEdit),this.parent.off(n.m,this.beginAdd),this.parent.off(n.n,this.recordDoubleClick),this.parent.off(n.p,this.batchCancel),this.parent.grid.off(n.q,this.keyPressed),this.parent.grid.off("batchedit-form",this.lastCellTab),this.parent.grid.off("content-ready",this.contentready),this.parent.off(n.r,this.cellEdit),this.parent.off("actionBegin",this.editActionEvents),this.parent.off("actionComplete",this.editActionEvents),this.parent.grid.off("recordAdded",this.customCellSave),this.parent.grid.off(n.s,this.recordDoubleClick),this.parent.off("savePreviousRowPosition",this.savePreviousRowPosition),this.parent.grid.off(n.t,this.beforeStartEdit),this.parent.grid.off(n.u,this.beforeBatchCancel),this.parent.grid.off("dblclick",this.gridDblClick),this.parent.grid.off("reset-edit-props",this.resetIsOnBatch),this.parent.grid.off("get-row-position",this.getRowPosition))},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.applyFormValidation=function(e){this.parent.grid.editModule.applyFormValidation(e)},e.prototype.editActionEvents=function(e){var t=i.i(r.getObject)("editAction",e),n=i.i(r.getObject)("name",t),d=this.parent,l=d.dataSource.adaptor;if((i.i(s.a)(d)||l instanceof a.RemoteSaveAdaptor)&&"save"===t.requestType&&"add"===t.action&&("Child"===d.editSettings.newRowPosition||"Below"===d.editSettings.newRowPosition||"Above"===d.editSettings.newRowPosition))if("actionBegin"===n){var p=i.i(o.isNullOrUndefined)(t.row)||!Object.keys(t.row).length?this.selectedIndex:t.row.rowIndex-1,c=i.i(o.isNullOrUndefined)(p)||-1===p?-1:d.getCurrentViewRecords()[parseInt(p.toString(),10)][d.getPrimaryKeyFieldNames()[0]];d.grid.query.addParams("relationalKey",c)}else if("actionComplete"===n)for(var h=d.grid.query.params.length,u=0;u<h;u++)"relationalKey"===d.grid.query.params[parseInt(u.toString(),10)].key&&d.grid.query.params.splice(u);this.parent.enableInfiniteScrolling&&"actionComplete"===n&&this.infiniteAddAction(t),"Batch"===this.parent.editSettings.mode&&"paging"===t.requestType&&this.parent.notify("batchPageAction",{})},e.prototype.infiniteAddAction=function(e){if("save"===e.requestType&&"add"===e.action||"delete"===e.requestType){if("Top"!==this.parent.editSettings.newRowPosition&&-1!==this.selectedIndex&&"save"===e.requestType&&"add"===e.action){var t=this.parent.grid.getRowsObject(),n=t.splice(0,1)[0],o=this.addRowIndex,a=this.parent.getCurrentViewRecords();"Below"!==this.parent.editSettings.newRowPosition&&"Child"!==this.parent.editSettings.newRowPosition||(o+=i.i(s.g)(a[o+1]).length),o="Below"===this.parent.editSettings.newRowPosition?o+1:o,t.splice(o,0,n);var d=a.splice(0,1)[0];a.splice(o,0,d),this.updateInfiniteCurrentViewData(d,this.addRowIndex)}var l=this.parent.grid.getRows(),p=this.parent.grid.getRowsObject(),c=this.parent.infiniteScrollSettings.enableCache;c||(i.i(r.resetRowIndex)(this.parent.grid,this.parent.grid.getRowsObject(),this.parent.grid.getRows(),0),this.updateIndex(this.parent.grid.dataSource,this.parent.getRows(),this.parent.getCurrentViewRecords())),!c&&this.parent.getFrozenColumns()>0&&(i.i(r.resetRowIndex)(this.parent.grid,p,l,0),this.updateIndex(this.parent.grid.dataSource,l,this.parent.getCurrentViewRecords()))}},e.prototype.updateInfiniteCurrentViewData=function(e,t){var r=this,n=Math.ceil(t/this.parent.grid.pageSettings.pageSize),a=n>0?n:1,d=t-(a-1)*this.parent.pageSettings.pageSize,l=this.parent.grid.infiniteScrollModule.infiniteCurrentViewData;l[1].splice(0,1);var p=l[parseInt(a.toString(),10)];i.i(o.isNullOrUndefined)(this.addRowRecord)||(p.filter(function(e,t){e.uniqueID===r.addRowRecord.uniqueID&&(d=t)}),(this.addRowRecord.hasChildRecords&&this.addRowRecord.childRecords.length&&"Below"===this.parent.editSettings.newRowPosition||"Child"===this.parent.editSettings.newRowPosition)&&(d+=i.i(s.g)(this.addRowRecord).length)),d>=this.parent.pageSettings.pageSize&&(a+=1,p=l[parseInt(a.toString(),10)],d=d-this.parent.pageSettings.pageSize>=0?d-this.parent.pageSettings.pageSize:0),d="Below"===this.parent.editSettings.newRowPosition?d+1:d,p.splice(d,0,e),this.parent.grid.infiniteScrollModule.updateCurrentViewData()},e.prototype.recordDoubleClick=function(e){var t=e.target;if(!i.i(o.isNullOrUndefined)(t.closest("td.e-rowcell"))&&this.parent.grid.editSettings.allowEditing&&!this.parent.grid.isEdit){var n=this.parent.grid.getColumnByIndex(+t.closest("td.e-rowcell").getAttribute("data-colindex"));if("Cell"===this.parent.editSettings.mode&&!this.isOnBatch&&n&&!n.isPrimaryKey&&this.parent.editSettings.allowEditing&&n.allowEditing&&!t.classList.contains("e-treegridexpand")&&!t.classList.contains("e-treegridcollapse")&&this.parent.editSettings.allowEditOnDblClick){if(this.isOnBatch=!0,this.parent.grid.setProperties({selectedRowIndex:e.rowIndex},!0),this.parent.enableVirtualization){var a=i.i(r.parentsUntil)(e.target,"e-row");this.prevAriaRowIndex=a.getAttribute("data-rowindex"),a.setAttribute("data-rowindex",a.rowIndex+"")}this.updateGridEditMode("Batch")}else"Cell"!==this.parent.editSettings.mode||n.allowEditing&&!n.isPrimaryKey||(this.isOnBatch=!0,this.updateGridEditMode("Batch"))}},e.prototype.updateGridEditMode=function(e){this.parent.grid.setProperties({editSettings:{mode:e}},!0),i.i(r.getObject)("updateEditObj",this.parent.grid.editModule).apply(this.parent.grid.editModule),this.parent.grid.isEdit=!1},e.prototype.resetIsOnBatch=function(){this.parent.enableVirtualization&&"Cell"===this.parent.editSettings.mode&&(this.isOnBatch=!1,this.updateGridEditMode("Normal"))},e.prototype.keyPressed=function(e){this.isOnBatch&&(this.keyPress=e.action),"f2"===e.action&&this.recordDoubleClick(e),"escape"===e.action&&this.parent.closeEdit()},e.prototype.deleteUniqueID=function(e){delete this.parent.uniqueIDFilterCollection[""+e];delete this.parent.uniqueIDCollection[""+e]},e.prototype.cellEdit=function(e){var t=this,r=e.promise;if(delete e.promise,this.parent.enableVirtualization&&!i.i(o.isNullOrUndefined)(this.prevAriaRowIndex)&&"-1"!==this.prevAriaRowIndex&&(e.row.setAttribute("data-rowindex",this.prevAriaRowIndex),this.prevAriaRowIndex=void 0),"enter"!==this.keyPress&&this.parent.trigger(n.r,e,function(e){e.cancel||"Cell"!==t.parent.editSettings.mode?e.cancel&&"Cell"===t.parent.editSettings.mode&&(t.isOnBatch=!1,t.updateGridEditMode("Normal")):t.enableToolbarItems("edit"),i.i(o.isNullOrUndefined)(r)||r.resolve(e)}),this.doubleClickTarget&&(this.doubleClickTarget.classList.contains("e-treegridexpand")||this.doubleClickTarget.classList.contains("e-treegridcollapse")||this.doubleClickTarget.classList.contains("e-summarycell")))return e.cancel=!0,void(this.doubleClickTarget=null);"Cell"===this.parent.editSettings.mode&&("tab"===this.keyPress||"shiftTab"===this.keyPress?this.keyPress=null:"enter"===this.keyPress&&(e.cancel=!0,this.keyPress=null,i.i(o.setValue)("isEditCollapse",!1,this.parent)),e.columnObject.allowEditing||(e.cancel=!0)),this.parent.enableVirtualization&&(this.parent.grid.contentModule.editedRowIndex=this.parent.grid.editModule.editModule.index)},e.prototype.enableToolbarItems=function(e){if(!i.i(o.isNullOrUndefined)(this.parent.grid.toolbarModule)){var t=this.parent.element.id+"_gridcontrol_";this.parent.grid.toolbarModule.enableItems([t+"add",t+"edit",t+"delete"],"save"===e),this.parent.grid.toolbarModule.enableItems([t+"update",t+"cancel"],"edit"===e)}},e.prototype.batchCancel=function(){if("Cell"===this.parent.editSettings.mode){var e=i.i(o.getValue)("editModule.cellDetails",this.parent.grid.editModule),t=this.parent.getCellFromIndex(e.rowIndex,this.parent.treeColumnIndex);this.parent.renderModule.cellRender({data:e.rowData,cell:t,column:this.parent.grid.getColumns()[this.parent.treeColumnIndex]}),this.updateGridEditMode("Normal"),this.isOnBatch=!1}"Batch"===this.parent.editSettings.mode&&this.parent.notify("batchCancelAction",{})},e.prototype.customCellSave=function(e){i.i(s.b)(this.parent)&&"Cell"===this.parent.editSettings.mode&&"edit"===e.action&&(this.updateCell(e,e.rowIndex),this.afterCellSave(e,e.row,e.rowIndex))},e.prototype.cellSave=function(e){var t=this;if("Cell"===this.parent.editSettings.mode&&this.parent.element.querySelector("form")){e.cancel=!0;i.i(o.setValue)("isEditCollapse",!0,this.parent),e.rowData[e.columnName]=e.value;var r;r=i.i(o.isNullOrUndefined)(e.cell)?this.parent.grid.editModule.editModule.form.parentElement.parentNode:e.cell.parentNode;var d,l=this.parent.getPrimaryKeyFieldNames();if(i.i(o.isNullOrUndefined)(r))this.parent.grid.getCurrentViewRecords().filter(function(t,i){if(t[l[0]]===e.rowData[l[0]])return void(d=i)});else{var p=this.parent.getFrozenLeftColumnsCount()>0||this.parent.getFrozenRightColumnsCount()>0;d=p?(this.parent.getRows().indexOf(r),this.parent.getRows().indexOf(r)):-1===this.parent.getRows().indexOf(r)&&this.parent.getFrozenColumns()>0?this.parent.grid.getRows().indexOf(r):this.parent.getRows().indexOf(r)}var c={};if(i.i(o.extend)(c,e),c.cancel=!1,c.type="save",r=this.parent.grid.getRows()[r.rowIndex],this.parent.trigger(n.v,c),c.cancel)this.parent.grid.isEdit=!0;else if(r.rowIndex===this.parent.getCurrentViewRecords().length-1&&"tab"===this.keyPress&&(this.isTabLastRow=!0),i.i(s.a)(this.parent)||this.parent.dataSource instanceof a.DataManager&&this.parent.dataSource.adaptor instanceof a.RemoteSaveAdaptor){if(i.i(s.a)(this.parent)||this.parent.dataSource instanceof a.DataManager&&this.parent.dataSource.adaptor instanceof a.RemoteSaveAdaptor){var h=this.parent.grid.query;if(this.parent.isGantt&&!this.parent.loadChildOnDemand)this.updateCell(e,d),i.i(o.setValue)("isEdit",!1,this.parent.grid),this.afterCellSave(e,r,d);else{var u=null;u=this.parent.grid.dataSource.update(l[0],e.rowData,h.fromTable,h,e.previousValue),u.then(function(n){i.i(o.isNullOrUndefined)(n)||(e.rowData[e.columnName]=n[e.columnName]),t.updateCell(e,d),i.i(o.setValue)("isEdit",!1,t.parent.grid),t.afterCellSave(e,r,d)})}}}else if(i.i(s.b)(this.parent)){var g={requestType:"save",data:e.rowData,action:"edit",row:r,rowIndex:d,rowData:e.rowData,columnName:e.columnName,filterChoiceCount:null,excelSearchOperator:null};this.parent.grid.getDataModule().eventPromise(g,this.parent.grid.query)}else this.updateCell(e,d),i.i(o.setValue)("isEdit",!1,this.parent.grid),this.afterCellSave(e,r,d)}this.parent.enableVirtualization&&(this.parent.grid.contentModule.virtualData={})},e.prototype.afterCellSave=function(e,t,r){this.parent.grid.aggregateModule&&this.parent.grid.aggregateModule.refresh(e.rowData),this.parent.grid.editModule.destroyWidgets([this.parent.grid.getColumnByField(e.columnName)]),this.parent.grid.editModule.formObj.destroy(),"tab"!==this.keyPress&&"shiftTab"!==this.keyPress&&(this.updateGridEditMode("Normal"),this.isOnBatch=!1),this.enableToolbarItems("save"),i.i(o.removeClass)([t],["e-editedrow","e-batchrow"]),i.i(o.removeClass)(t.querySelectorAll(".e-rowcell"),["e-editedbatchcell","e-updatedtd"]),!1!==this.parent.isCellSaveFocus&&this.parent.grid.focusModule.restoreFocus(),i.i(d.a)({value:e.rowData,action:"edit"},this.parent,this.isSelfReference,this.addRowIndex,this.selectedIndex,e.columnName),t.rowIndex===this.parent.getCurrentViewRecords().length-1&&"enter"===this.keyPress&&(this.keyPress=null);var a={type:"save",column:this.parent.getColumnByField(e.columnName),data:e.rowData,previousData:e.previousValue,row:t,target:e.cell};this.parent.aggregates.map(function(e){return!0===e.showChildSummary}).length&&this.parent.grid.refresh(),this.parent.trigger(n.h,a)},e.prototype.lastCellTab=function(){!this.parent.grid.isEdit&&this.isOnBatch&&"tab"===this.keyPress&&"Cell"===this.parent.editSettings.mode&&(this.parent.editSettings.allowNextRowEdit?this.enableToolbarItems("edit"):(this.updateGridEditMode("Normal"),this.isOnBatch=!1,this.keyPress=null))},e.prototype.updateCell=function(e,t){this.parent.grid.editModule.updateCell(t,e.columnName,e.rowData[e.columnName]),this.parent.grid.getRowsObject()[parseInt(t.toString(),10)].data=e.rowData},e.prototype.crudAction=function(e,t){i.i(d.a)(e,this.parent,this.isSelfReference,this.addRowIndex,this.selectedIndex,t,this.addRowRecord),this.parent.parentData=[];for(var r=this.parent.grid.dataSource instanceof a.DataManager?this.parent.grid.dataSource.dataSource.json:this.parent.grid.dataSource,n=0;n<r.length;n++){r[parseInt(n.toString(),10)].index=n;var l=this.parent.grid.getPrimaryKeyFieldNames()[0];e.value[""+l]===r[parseInt(n.toString(),10)][""+l]&&"add"===e.action&&(r[parseInt(n.toString(),10)].level=this.internalProperties.level,r[parseInt(n.toString(),10)].taskData=this.internalProperties.taskData,r[parseInt(n.toString(),10)].uniqueID=this.internalProperties.uniqueID,i.i(o.isNullOrUndefined)(this.internalProperties.parentItem)||(r[parseInt(n.toString(),10)].parentItem=this.internalProperties.parentItem,r[parseInt(n.toString(),10)].parentUniqueID=this.internalProperties.parentUniqueID),r[parseInt(n.toString(),10)].childRecords=this.internalProperties.childRecords),i.i(o.setValue)("uniqueIDCollection."+r[parseInt(n.toString(),10)].uniqueID+".index",n,this.parent);var p=this.parent.dataSource.adaptor;(i.i(s.a)(this.parent)||p instanceof a.RemoteSaveAdaptor)&&i.i(o.setValue)("uniqueIDCollection."+r[parseInt(n.toString(),10)].uniqueID,r[parseInt(n.toString(),10)],this.parent),r[parseInt(n.toString(),10)].level||this.parent.parentData.push(r[parseInt(n.toString(),10)])}this.parent.enableInfiniteScrolling||"add"===e.action&&null!=this.previousNewRowPosition&&(this.parent.setProperties({editSettings:{newRowPosition:this.previousNewRowPosition}},!0),this.previousNewRowPosition=null)},e.prototype.updateIndex=function(e,t,r){for(var n=0;n<this.parent.getDataRows().length;n++){var a=r[parseInt(n.toString(),10)];if(!i.i(o.isNullOrUndefined)(a)){var s=i.i(o.getValue)("uniqueIDCollection."+a.uniqueID+".index",this.parent);if(a.index=s,!i.i(o.isNullOrUndefined)(a.parentItem)){var d=i.i(o.getValue)("uniqueIDCollection."+a.parentItem.uniqueID+".index",this.parent);a.parentItem.index=d}}}var l=-1,p=this.parent.treeColumnIndex;if(this.parent.getFrozenColumns()>0)for(var c=t[0].querySelectorAll(".e-rowcell"),h=0;h<c.length;h++)if(c[parseInt(h.toString(),10)].classList.contains("e-gridrowindex0level0")){p=h;break}for(var u=0;u<this.parent.getRows().length;u++){t[parseInt(u.toString(),10)].classList.contains("e-detailrow")||l++;var g=r[parseInt(l.toString(),10)];if(!i.i(o.isNullOrUndefined)(g)){var s=g.index,f=g.level,y=t[parseInt(u.toString(),10)];i.i(o.isNullOrUndefined)(g.parentItem)||(s=i.i(o.getValue)("uniqueIDCollection."+g.parentItem.uniqueID+".index",this.parent));var m=y.cells[parseInt(p.toString(),10)];if(!i.i(o.isNullOrUndefined)(m)){for(var h=0;h<m.classList.length;h++){var v=m.classList[parseInt(h.toString(),10)],S=/e-gridrowindex/i,I=/e-griddetailrowindex/i,w=v.match(S),R=v.match(I);null!=w&&i.i(o.removeClass)([m],v),null!=R&&i.i(o.removeClass)([m],v)}t[parseInt(u.toString(),10)].classList.contains("e-detailrow")?i.i(o.addClass)([m],"e-griddetailrowindex"+s+"level"+f):i.i(o.addClass)([m],"e-gridrowindex"+s+"level"+f)}}}},e.prototype.beginAdd=function(){var e,t=this.addRowIndex,r=this.parent.grid.getCurrentViewRecords();"Batch"===this.parent.editSettings.mode&&(t=this.batchEditModule.getAddRowIndex(),this.selectedIndex=this.batchEditModule.getSelectedIndex(),(this.parent.getBatchChanges()[this.addedRecords].length>1||this.parent.getBatchChanges()[this.deletedRecords].length)&&(r=this.batchEditModule.getBatchRecords()));var n=this.parent.grid.getDataRows(),a=n.length?+n[0].getAttribute("data-rowindex"):0,d=n.length?+n[n.length-1].getAttribute("data-rowindex"):0,l=this.selectedIndex>=a&&this.selectedIndex<=d,p=this.parent.enableVirtualization&&this.addRowIndex>-1&&"-1"!==this.prevAriaRowIndex;if("Dialog"!==this.parent.editSettings.mode){if("Above"===this.parent.editSettings.newRowPosition)e="before";else if(("Below"===this.parent.editSettings.newRowPosition||"Child"===this.parent.editSettings.newRowPosition)&&(this.selectedIndex>-1||p)&&l&&(e="after",!i.i(o.isNullOrUndefined)(r[parseInt(t.toString(),10)])&&r[parseInt(t.toString(),10)].expanded))if("Batch"===this.parent.editSettings.mode&&(this.parent.getBatchChanges()[this.addedRecords].length>1||this.parent.getBatchChanges()[this.deletedRecords].length)){if(t+=i.i(s.g)(r[parseInt(t.toString(),10)]).length,"Child"!==this.parent.editSettings.newRowPosition){var c=this.batchEditModule.getBatchChildCount();t+=c}}else this.parent.enableVirtualization||(t+=i.i(s.g)(r[parseInt(t.toString(),10)]).length);if((this.selectedIndex>-1||p)&&l&&(t||"Child"===this.parent.editSettings.newRowPosition||"Below"===this.parent.editSettings.newRowPosition)){t>=n.length-1&&(t=n.length-2);var h="rows",u=this.parent.grid.contentModule[""+h][0],g=document.activeElement;n[t+1][""+e](n[0]),i.i(o.setValue)("batchIndex",t+1,this.batchEditModule);var f="Above"===this.parent.editSettings.newRowPosition?t:t+1;if("Batch"===this.parent.editSettings.mode&&(this.parent.grid.contentModule[""+h].splice(0,1),this.parent.grid.contentModule[""+h].splice(f,0,u)),"Row"===this.parent.editSettings.mode||"Cell"===this.parent.editSettings.mode){for(var y=this.parent.grid.getContentTable().querySelectorAll(".e-griderror"),m=0;m<y.length;m++)y[parseInt(m.toString(),10)].remove();i.i(o.setValue)("errorRules",[],this.parent.grid.editModule.formObj)}p&&(this.prevAriaRowIndex="-1"),(!this.parent.enableVirtualization||this.parent.enableVirtualization&&!Object.keys(this.parent.grid.contentModule.emptyRowData).length)&&g.focus(),this.parent.enableVirtualization&&!Object.keys(this.parent.grid.contentModule.emptyRowData).length&&this.parent.grid.contentModule.createEmptyRowdata()}}if("Batch"===this.parent.editSettings.mode&&!i.i(o.isNullOrUndefined)(this.addRowIndex)&&-1!==this.addRowIndex&&this.isAddedRowByMethod&&!this.isAddedRowByContextMenu){t=this.batchEditModule.getAddRowIndex(),this.selectedIndex=this.batchEditModule.getSelectedIndex();var v=this.parent.getBatchChanges().addedRecords,S=void 0;if(v.length)for(var m=0;m<v.length;m++)i.i(o.isNullOrUndefined)(v[parseInt(m.toString(),10)].uniqueID)&&(S=v[parseInt(m.toString(),10)]);var I={action:"add",data:S,index:t,seletedRow:0};this.beginAddEdit(I),this.batchEditModule.batchAddRowRecord.push(this.batchEditModule.addRowRecord),this.batchEditModule.batchAddedRecords.push(I.data)}},e.prototype.beginEdit=function(e){if("refresh"===e.requestType&&this.isOnBatch)return void(e.cancel=!0);if("Cell"===this.parent.editSettings.mode&&"beginEdit"===e.requestType)return void(e.cancel=!0);if(this.doubleClickTarget&&(this.doubleClickTarget.classList.contains("e-treegridexpand")||this.doubleClickTarget.classList.contains("e-treegridcollapse")||this.doubleClickTarget.classList.contains("e-frame")))return e.cancel=!0,void(this.doubleClickTarget=null);if("delete"===e.requestType){var t=e.data;if(i.i(o.isNullOrUndefined)(e.data[0].uniqueID))for(var r=this.parent.getPrimaryKeyFieldNames(),n=this,a=0;a<t.length;a++)!function(i){n.parent.flatData.filter(function(n){n[""+r[0]]===e.data[parseInt(i.toString(),10)][r[0]]&&(t[parseInt(i.toString(),10)]=n)})}(a);for(var a=0;a<t.length;a++){this.deleteUniqueID(t[parseInt(a.toString(),10)].uniqueID);for(var d=i.i(s.g)(t[parseInt(a.toString(),10)]),l=0;l<d.length;l++)this.deleteUniqueID(d[parseInt(l.toString(),10)].uniqueID);e.data=e.data.concat(d)}}if("add"===e.requestType||this.isAddedRowByMethod&&(this.parent.enableVirtualization||this.parent.enableInfiniteScrolling)){if((-1===this.parent.grid.selectedRowIndex&&this.isAddedRowByMethod||e.index!==this.parent.grid.selectedRowIndex)&&0!==e.index||(this.selectedIndex=this.parent.grid.selectedRowIndex),this.parent.enableVirtualization){var p='.e-row[data-rowindex="'+this.selectedIndex+'"]',c=void 0;this.selectedIndex>-1&&"Top"!==this.parent.editSettings.newRowPosition&&"Bottom"!==this.parent.editSettings.newRowPosition?(this.prevAriaRowIndex=this.selectedIndex.toString(),c=this.parent.getContent().querySelector(p),this.addRowIndex=c?c.rowIndex:0):this.prevAriaRowIndex&&"-1"!==this.prevAriaRowIndex?(p='.e-row[data-rowindex="'+this.prevAriaRowIndex+'"]',c=this.parent.getContent().querySelector(p),this.addRowIndex=c?c.rowIndex:0):this.addRowIndex=0}else this.isAddedRowByMethod&&(this.parent.enableVirtualization||this.parent.enableInfiniteScrolling)?0!==e.index?this.addRowIndex=e.index:this.addRowIndex=this.parent.grid.selectedRowIndex:this.addRowIndex=this.parent.grid.selectedRowIndex>-1?this.parent.grid.selectedRowIndex:0;(this.isAddedRowByMethod||this.isAddedRowByContextMenu&&-1!==this.parent.grid.selectedRowIndex)&&(this.parent.enableVirtualization||this.parent.enableInfiniteScrolling)?(this.addRowRecord=this.parent.flatData[this.parent.grid.selectedRowIndex],this.parent.enableVirtualization&&this.isAddedRowByContextMenu&&(this.addRowRecord=this.parent.getCurrentViewRecords()[this.addRowIndex])):this.addRowRecord=this.parent.getSelectedRecords()[0]}this.isAddedRowByMethod&&0!==e.index&&(this.addRowRecord=this.parent.flatData[e.index],this.addRowIndex=e.index),"Child"===this.parent.editSettings.newRowPosition&&i.i(o.isNullOrUndefined)(this.addRowRecord)&&!i.i(o.isNullOrUndefined)(this.parent.getSelectedRecords()[0])&&(this.addRowRecord=this.parent.getSelectedRecords()[0]),i.i(o.isNullOrUndefined)(this.addRowRecord)&&this.parent.getCurrentViewRecords().length>this.addRowIndex&&"save"===e.requestType&&0!==this.parent.getSelectedRecords().length&&(this.addRowRecord=this.parent.getCurrentViewRecords()[this.addRowIndex]),this.isAddedRowByMethod=!1,e=this.beginAddEdit(e)},e.prototype.savePreviousRowPosition=function(){null===this.previousNewRowPosition&&(this.previousNewRowPosition=this.parent.editSettings.newRowPosition)},e.prototype.beginAddEdit=function(e){var t=e.data;if("add"===e.action){var n=this.parent.grid.getPrimaryKeyFieldNames()[0],l=null;t.taskData=i.i(o.isNullOrUndefined)(t.taskData)?i.i(o.extend)({},e.data):t.taskData;var p=void 0;p=this.parent.enableVirtualization&&0!==e.index?this.parent.flatData:"Batch"===this.parent.editSettings.mode&&this.isAddedRowByMethod&&!i.i(o.isNullOrUndefined)(this.addRowIndex)?this.batchEditModule.batchRecords:this.parent.grid.getCurrentViewRecords(),this.parent.enableVirtualization&&0!==e.index&&(this.addRowIndex=this.parent.flatData.indexOf(this.addRowRecord),this.selectedIndex=this.addRowIndex);var c=this.addRowIndex;t.uniqueID=i.i(r.getUid)(this.parent.element.id+"_data_"),i.i(o.setValue)("uniqueIDCollection."+t.uniqueID,t,this.parent);var h=0,u=void 0,g=void 0,f=void 0,y=void 0,m=this.parent.enableVirtualization&&this.addRowIndex>-1&&"-1"!==this.prevAriaRowIndex,v=this.parent.getRows(),S=v.length?p.indexOf(p[0]):0,I=v.length?+v[v.length-1].getAttribute("data-rowindex"):0,w=!(!this.parent.enableVirtualization||0===e.index)||this.selectedIndex>=S&&this.selectedIndex<=I;if(p.length&&(u=p[this.addRowIndex][this.parent.idMapping],y=p[this.addRowIndex][this.parent.parentIdMapping],p[this.addRowIndex].parentItem&&(g=p[this.addRowIndex].parentItem.uniqueID),f=p[this.addRowIndex].parentItem),"Top"!==this.parent.editSettings.newRowPosition&&p.length){if(h=p[this.addRowIndex].level,"Above"===this.parent.editSettings.newRowPosition)l="before",c=p[this.addRowIndex].index;else if("Below"===this.parent.editSettings.newRowPosition){l="after";var R=i.i(s.g)(p[this.addRowIndex]).length,x=p[this.addRowIndex].index;c=R>0?x+R:x}else if("Child"===this.parent.editSettings.newRowPosition){l="after",(this.selectedIndex>-1||m)&&w&&(t.parentItem=i.i(o.extend)({},p[this.addRowIndex]),t.parentUniqueID=t.parentItem.uniqueID,delete t.parentItem.childRecords,delete t.parentItem[this.parent.childMapping]);var C=i.i(s.g)(p[this.addRowIndex]).length,b=p[this.addRowIndex].index;this.selectedIndex>=0&&(t.level=h+1),c=C>0?b+C:b,this.isSelfReference&&(this.parent.isLocalData||-1!==this.parent.editModule.selectedIndex?t.taskData[this.parent.parentIdMapping]=t[this.parent.parentIdMapping]=u:t.taskData[this.parent.parentIdMapping]=t[this.parent.parentIdMapping]=null,i.i(o.isNullOrUndefined)(t.parentItem)||i.i(d.b)(n,t.parentItem,"add",this.parent,this.isSelfReference,t))}if("Above"!==this.parent.editSettings.newRowPosition&&"Below"!==this.parent.editSettings.newRowPosition||((this.selectedIndex>-1||m)&&h&&w&&(t.parentUniqueID=g,t.parentItem=i.i(o.extend)({},f),delete t.parentItem.childRecords,delete t.parentItem[this.parent.childMapping]),t.level=h,this.isSelfReference&&(t.taskData[this.parent.parentIdMapping]=t[this.parent.parentIdMapping]=y,i.i(o.isNullOrUndefined)(t.parentItem)||i.i(d.b)(n,t.parentItem,"add",this.parent,this.isSelfReference,t))),null!=l&&(this.selectedIndex>-1||m)&&w&&(e.index="before"===l?c:c+1),"Bottom"===this.parent.editSettings.newRowPosition){var D=this.parent.grid.dataSource instanceof a.DataManager?this.parent.grid.dataSource.dataSource.json:this.parent.grid.dataSource;e.index=D.length}}i.i(o.isNullOrUndefined)(t.level)&&(t.level=h),t.hasChildRecords=!1,t.childRecords=[],t.index=0}if("add"===e.action&&(this.internalProperties={level:t.level,parentItem:t.parentItem,uniqueID:t.uniqueID,taskData:t.taskData,parentUniqueID:i.i(o.isNullOrUndefined)(t.parentItem)?void 0:t.parentItem.uniqueID,childRecords:t.childRecords}),"delete"===e.requestType)for(var M=e.data,O=0;O<M.length;O++)if(M[parseInt(O.toString(),10)].parentItem){var f=i.i(s.k)(this.parent,M[parseInt(O.toString(),10)].parentItem.uniqueID);if(!i.i(o.isNullOrUndefined)(f)&&f.hasChildRecords){var P=f.childRecords.indexOf(M[parseInt(O.toString(),10)]);f.childRecords.splice(P,1)}}return e},e.prototype.addRecord=function(e,t,r){if(this.parent.editSettings.newRowPosition!==this.previousNewRowPosition&&null!==this.previousNewRowPosition||(this.previousNewRowPosition=this.parent.editSettings.newRowPosition),this.isSelfReference||i.i(o.isNullOrUndefined)(e)||!Object.hasOwnProperty.call(e,this.parent.childMapping))e?(t>-1?(this.selectedIndex=t,this.addRowIndex=t):(this.selectedIndex=this.parent.selectedRowIndex,this.addRowIndex=this.parent.selectedRowIndex),r&&this.parent.setProperties({editSettings:{newRowPosition:r}},!0),this.parent.grid.editModule.addRecord(e,t)):this.parent.grid.editModule.addRecord(e,t);else{var a=[],s=this.parent.editSettings.mode,d=this.parent.grid.editSettings.mode;a.push(e),this.parent.setProperties({editSettings:{mode:"Batch"}},!0),this.parent.grid.setProperties({editSettings:{mode:"Batch"}},!0),i.i(o.isNullOrUndefined)(r)||this.parent.setProperties({editSettings:{newRowPosition:r}},!0);var l={addedRecords:a,changedRecords:[],deletedRecords:[]};this.parent.notify(n.w,{updatedRecords:l,index:t}),this.parent.setProperties({editSettings:{mode:s}},!0),this.parent.grid.setProperties({editSettings:{mode:d}},!0),this.parent.refresh()}},e.prototype.editFormValidate=function(){return this.parent.grid.editModule.editFormValidate()},e.prototype.destroyForm=function(){this.parent.grid.editModule.destroyForm()},e.prototype.contentready=function(e){i.i(o.isNullOrUndefined)(e.args.requestType)||"delete"!==e.args.requestType.toString()&&"save"!==e.args.requestType.toString()&&("Batch"!==this.parent.editSettings.mode||"batchsave"!==e.args.requestType.toString())||(this.updateIndex(this.parent.grid.dataSource,this.parent.getRows(),this.parent.getCurrentViewRecords()),(this.parent.frozenRows||this.parent.getFrozenColumns()||this.parent.frozenColumns)&&this.parent.grid.dataSource.length===this.parent.getDataRows().length&&this.updateIndex(this.parent.grid.dataSource,this.parent.getDataRows(),this.parent.getCurrentViewRecords()))},e.prototype.editCell=function(e,t){"Cell"!==this.parent.editSettings.mode&&"Batch"!==this.parent.editSettings.mode||("Batch"!==this.parent.editSettings.mode&&(this.isOnBatch=!0,this.updateGridEditMode("Batch")),this.parent.grid.editModule.editCell(e,t))},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(0),n=(i.n(r),i(3)),o=i(1),a=(i.n(o),i(4)),s=(i.n(a),i(2)),d=function(){function e(e){this.isCollapsedStatePersist=!1,r.Grid.Inject(r.ExcelExport),this.parent=e,this.dataResults={},this.addEventListener()}return e.prototype.getModuleName=function(){return"ExcelExport"},e.prototype.addEventListener=function(){this.parent.on("updateResults",this.updateExcelResultModel,this),this.parent.on("excelCellInfo",this.excelQueryCellInfo,this),this.parent.grid.on("export-RowDataBound",this.exportRowDataBound,this),this.parent.grid.on("finalPageSetup",this.finalPageSetup,this)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("updateResults",this.updateExcelResultModel),this.parent.off("excelCellInfo",this.excelQueryCellInfo),this.parent.grid.off("export-RowDataBound",this.exportRowDataBound),this.parent.grid.off("finalPageSetup",this.finalPageSetup))},e.prototype.updateExcelResultModel=function(e){this.dataResults=e},e.prototype.Map=function(e,t,n,d,l){var p=this,c=this.parent.dataSource,h=Object();return i.i(o.setValue)("isCsv",l,h),i.i(o.setValue)("cancel",!1,h),i.i(o.isNullOrUndefined)(e)||(this.isCollapsedStatePersist=e.isCollapsedStatePersist),new Promise(function(u){var g=!p.isLocal()||c instanceof a.DataManager?p.parent.dataSource:new a.DataManager(c),f=new a.Query;if(p.isLocal()||(f=p.generateQuery(f),i.i(o.setValue)("query",f,h)),p.parent.trigger(s.I,i.i(o.extend)(h,e)),i.i(r.getObject)("cancel",h))return null;g.executeQuery(f).then(function(r){var a=null;return i.i(o.isNullOrUndefined)(e)||i.i(o.isNullOrUndefined)(e.dataSource)||(a=e.dataSource),e=p.manipulateExportProperties(e,c,r),p.parent.grid.excelExportModule.Map(p.parent.grid,e,t,n,l,d).then(function(t){null!=a?e.dataSource=a:delete e.dataSource,u(t)})})})},e.prototype.generateQuery=function(e,t){return!i.i(o.isNullOrUndefined)(t)&&"CurrentPage"===t.exportType&&this.parent.allowPaging&&(t.exportType="AllPages",e.addParams("ExportType","CurrentPage"),e.where(this.parent.parentIdMapping,"equal",null),e=i.i(r.getObject)("grid.renderModule.data.pageQuery",this.parent)(e)),e},e.prototype.manipulateExportProperties=function(e,t,n){var s=Object();if(i.i(o.setValue)("query",this.parent.grid.getDataModule().generateQuery(!0),s),i.i(o.setValue)("isExport",!0,s),i.i(o.isNullOrUndefined)(e)||i.i(o.isNullOrUndefined)(e.exportType)||i.i(o.setValue)("exportType",e.exportType,s),this.isLocal()||(this.parent.parentData=[],this.parent.dataModule.convertToFlatData(i.i(r.getObject)("result",n)),i.i(o.setValue)("expresults",this.parent.flatData,s)),this.parent.notify("dataProcessor",s),s=this.dataResults,t=i.i(o.isNullOrUndefined)(s.result)?this.parent.flatData.slice(0):s.result,this.isLocal()||(this.parent.flatData=[]),e&&e.dataSource&&this.isLocal()){var d=this.parent.flatData,l=e.dataSource instanceof a.DataManager?e.dataSource.dataSource.json:e.dataSource;this.parent.dataModule.convertToFlatData(l),t=this.parent.flatData,this.parent.flatData=d}return e=i.i(o.isNullOrUndefined)(e)?Object():e,e.dataSource=new a.DataManager({json:t}),e.query=s.query,e},e.prototype.excelQueryCellInfo=function(e){if(this.parent.grid.getColumnIndexByUid(e.column.uid)===this.parent.treeColumnIndex){var t={},r=e.data,n=i.i(o.isNullOrUndefined)(r.filterLevel),a=n?r.level:r.filterLevel;t.indent=a,e.style=t}this.parent.notify("updateResults",e),this.parent.trigger("excelQueryCellInfo",e)},e.prototype.exportRowDataBound=function(e){if("excel"===e.type){var t=e.rowObj.data,r=this.parent.grid.filterSettings.columns.length,a=e.excelRows.length,s=t.level;if(t.parentItem&&i.i(n.k)(this.parent,t.parentItem.uniqueID,Boolean(r))){var d=!1,l=!1,p=i.i(n.f)(this.parent,t,this.parent.parentData);!this.isCollapsedStatePersist||p&&this.parent.isLocalData||(d=!0,l=!t.expanded),e.excelRows[a-1].grouping={outlineLevel:s,isCollapsed:l,isHidden:d}}else t.hasChildRecords&&i.i(o.isNullOrUndefined)(t.parentItem)&&(e.excelRows[a-1].grouping={outlineLevel:s})}},e.prototype.finalPageSetup=function(e){for(var t=0;t<e.worksheets.length;t++)e.worksheets[parseInt(t.toString(),10)].rows&&(e.worksheets[parseInt(t.toString(),10)].pageSetup={isSummaryRowBelow:!1})},e.prototype.isLocal=function(){return!i.i(n.a)(this.parent)&&i.i(n.h)(this.parent)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),i(3)),a=function(){function e(e){r.Grid.Inject(r.Filter),this.parent=e,this.isHierarchyFilter=!1,this.filteredResult=[],this.flatFilteredData=[],this.filteredParentRecs=[],this.addEventListener()}return e.prototype.getModuleName=function(){return"filter"},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.addEventListener=function(){this.parent.on("updateFilterRecs",this.updatedFilteredRecord,this),this.parent.on("clearFilters",this.clearFilterLevel,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("updateFilterRecs",this.updatedFilteredRecord),this.parent.off("clearFilters",this.clearFilterLevel))},e.prototype.updatedFilteredRecord=function(e){i.i(n.setValue)("uniqueIDFilterCollection",{},this.parent),this.flatFilteredData=e.data,this.filteredParentRecs=[],this.filteredResult=[],this.isHierarchyFilter=!1;for(var t=0;t<this.flatFilteredData.length;t++){var a=this.flatFilteredData[parseInt(t.toString(),10)];this.addParentRecord(a);var s=""===this.parent.grid.searchSettings.key?this.parent.filterSettings.hierarchyMode:this.parent.searchSettings.hierarchyMode;"Child"!==s&&"None"!==s||0===this.parent.grid.filterSettings.columns.length&&""===this.parent.grid.searchSettings.key||(this.isHierarchyFilter=!0);var d=i.i(r.getObject)("childRecords",a);!i.i(n.isNullOrUndefined)(d)&&d.length&&i.i(n.setValue)("hasFilteredChildRecords",this.checkChildExsist(a),a);var l=i.i(r.getObject)("parentItem",a);if(!i.i(n.isNullOrUndefined)(l)){var p=i.i(o.k)(this.parent,a.parentItem.uniqueID,!0);i.i(n.setValue)("hasFilteredChildRecords",!0,p),p&&p.parentItem&&this.updateParentFilteredRecord(p)}}this.flatFilteredData.length>0&&this.isHierarchyFilter&&this.updateFilterLevel(),this.parent.notify("updateAction",{result:this.filteredResult})},e.prototype.updateParentFilteredRecord=function(e){var t=i.i(o.k)(this.parent,e.parentItem.uniqueID,!0),r=i.i(n.getValue)("uniqueIDFilterCollection",this.parent);t&&Object.prototype.hasOwnProperty.call(r,t.uniqueID)&&i.i(n.setValue)("hasFilteredChildRecords",!0,t),t&&t.parentItem&&this.updateParentFilteredRecord(t)},e.prototype.addParentRecord=function(e){var t=i.i(o.k)(this.parent,e.parentUniqueID);if("None"!==(""===this.parent.grid.searchSettings.key?this.parent.filterSettings.hierarchyMode:this.parent.searchSettings.hierarchyMode)||0===this.parent.grid.filterSettings.columns.length&&""===this.parent.grid.searchSettings.key)i.i(n.isNullOrUndefined)(t)||("Child"!==(""===this.parent.grid.searchSettings.key?this.parent.filterSettings.hierarchyMode:this.parent.searchSettings.hierarchyMode)||0===this.parent.grid.filterSettings.columns.length&&""===this.parent.grid.searchSettings.key?this.addParentRecord(t):-1!==this.flatFilteredData.indexOf(t)&&this.addParentRecord(t)),-1===this.filteredResult.indexOf(e)&&(this.filteredResult.push(e),i.i(n.setValue)("uniqueIDFilterCollection."+e.uniqueID,e,this.parent));else if(i.i(n.isNullOrUndefined)(t)){if(-1!==this.flatFilteredData.indexOf(e))return void(-1===this.filteredResult.indexOf(e)&&(this.filteredResult.push(e),i.i(n.setValue)("uniqueIDFilterCollection."+e.uniqueID,e,this.parent),e.hasFilteredChildRecords=!0))}else this.addParentRecord(t),-1!==this.flatFilteredData.indexOf(t)||-1!==this.filteredResult.indexOf(t)?-1===this.filteredResult.indexOf(e)&&(this.filteredResult.push(e),i.i(n.setValue)("uniqueIDFilterCollection."+e.uniqueID,e,this.parent)):-1===this.filteredResult.indexOf(e)&&-1!==this.flatFilteredData.indexOf(e)&&(this.filteredResult.push(e),i.i(n.setValue)("uniqueIDFilterCollection."+e.uniqueID,e,this.parent))},e.prototype.checkChildExsist=function(e){for(var t=i.i(r.getObject)("childRecords",e),o=!1,a=0;a<t.length;a++){var s=t[parseInt(a.toString(),10)].childRecords,d=""===this.parent.grid.searchSettings.key?this.parent.filterSettings.hierarchyMode:this.parent.searchSettings.hierarchyMode;if(!("Child"!==d&&"Both"!==d||0===this.parent.grid.filterSettings.columns.length&&""===this.parent.grid.searchSettings.key)){var l=i.i(n.getValue)("uniqueIDFilterCollection",this.parent);Object.prototype.hasOwnProperty.call(l,t[parseInt(a.toString(),10)].uniqueID)||(this.filteredResult.push(t[parseInt(a.toString(),10)]),i.i(n.setValue)("uniqueIDFilterCollection."+t[parseInt(a.toString(),10)].uniqueID,t[parseInt(a.toString(),10)],this.parent),o=!0)}if("None"===d&&(0!==this.parent.grid.filterSettings.columns.length||""!==this.parent.grid.searchSettings.key)&&-1!==this.flatFilteredData.indexOf(t[parseInt(a.toString(),10)])){o=!0;break}!i.i(n.isNullOrUndefined)(s)&&s.length&&(o=this.checkChildExsist(t[parseInt(a.toString(),10)])),"Child"!==d&&"Both"!==d||!t.length||(o=!0)}return o},e.prototype.updateFilterLevel=function(){for(var e=this.filteredResult,t=this.filteredResult.length,r=0;r<t;r++){var n=i.i(o.k)(this.parent,e[parseInt(r.toString(),10)].parentUniqueID);if(-1!==e.indexOf(n)){var a=i.i(o.k)(this.parent,e[parseInt(r.toString(),10)].parentUniqueID,!0);e[parseInt(r.toString(),10)].filterLevel=a.filterLevel+1}else e[parseInt(r.toString(),10)].filterLevel=0,this.filteredParentRecs.push(e[parseInt(r.toString(),10)])}},e.prototype.clearFilterLevel=function(e){var t,r=0,o=e.flatData,a=o.length;for(r;r<a;r++){t=o[parseInt(r.toString(),10)];var s=t.filterLevel;!s&&0!==s&&i.i(n.isNullOrUndefined)(t.hasFilteredChildRecords)||(t.hasFilteredChildRecords=null,t.filterLevel=null)}this.filteredResult=[],this.parent.notify("updateResults",{result:o,count:o.length})},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),function(){function e(e){r.Grid.Inject(r.Freeze),this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on("rowExpandCollapse",this.rowExpandCollapse,this),this.parent.on("dataBoundArg",this.dataBoundArg,this),this.parent.grid.on("dblclick",this.dblClickHandler,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("rowExpandCollapse",this.rowExpandCollapse),this.parent.off("dataBoundArg",this.dataBoundArg),this.parent.grid.off("dblclick",this.dblClickHandler))},e.prototype.rowExpandCollapse=function(e){var t,r,o=this.parent.getDataRows(),a=this.parent.getRows(),s=this.parent.getFrozenLeftColumnsCount()>0||this.parent.getFrozenRightColumnsCount()>0;s&&(r=this.parent.getRows().filter(function(t){return t.querySelector(".e-gridrowindex"+e.record.index+"level"+(e.record.level+1))})),t=e.detailrows.length?e.detailrows:o.filter(function(t){return t.querySelector(".e-gridrowindex"+e.record.index+"level"+(e.record.level+1))});for(var d=0;d<t.length;d++){var l=t[parseInt(d.toString(),10)],p=this.parent.grid.getRowObjectFromUID(l.getAttribute("data-Uid")).data;!i.i(n.isNullOrUndefined)(o)&&l.parentElement.firstElementChild.clientHeight>0&&(l.style.height=l.parentElement.firstElementChild.clientHeight+"px"),l.style.display=e.action,s&&r.length&&(r[parseInt(d.toString(),10)].style.display=e.action);var c="none"===e.action?".e-treecolumn-container .e-treegridcollapse":".e-treecolumn-container .e-treegridexpand";if(a[l.rowIndex].querySelector(c)){for(var h=[],u=0;u<o.length;u++)o[parseInt(u.toString(),10)].querySelector(".e-gridrowindex"+p.index+"level"+(p.level+1))&&h.push(o[parseInt(u.toString(),10)]);if(h.length){var g=this.parent.getCurrentViewRecords()[h[0].rowIndex];this.rowExpandCollapse({detailrows:h,action:e.action,record:g})}}}},e.prototype.dblClickHandler=function(e){i.i(r.parentsUntil)(e.target,"e-rowcell")&&this.parent.grid.editSettings.allowEditOnDblClick&&"Cell"!==this.parent.editSettings.mode&&!e.target.classList.contains("e-treegridcollapse")&&!e.target.classList.contains("e-treegridexpand")&&this.parent.startEdit(i.i(r.parentsUntil)(e.target,"e-row"))},e.prototype.dataBoundArg=function(){this.parent.getColumns().filter(function(e){return e.showCheckbox}).length&&this.parent.freezeModule&&this.parent.initialRender&&i.i(n.addClass)([this.parent.element.getElementsByClassName("e-grid")[0]],"e-checkselection")},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.getModuleName=function(){return"freeze"},e}())},function(e,t,i){"use strict";var r=i(36);i.d(t,"a",function(){return r.a});var n=i(35);i.d(t,"b",function(){return n.a});var o=i(41);i.d(t,"c",function(){return o.a});var a=i(40);i.d(t,"d",function(){return a.a});var s=i(46);i.d(t,"e",function(){return s.a});var d=i(45);i.d(t,"f",function(){return d.a});var l=i(44);i.d(t,"g",function(){return l.a});var p=(i(9),i(10),i(7));i.d(t,"h",function(){return p.a});var c=i(30);i.d(t,"i",function(){return c.a});var h=i(32);i.d(t,"j",function(){return h.a});var u=i(34);i.d(t,"k",function(){return u.a});var g=i(31);i.d(t,"l",function(){return g.a});var f=i(11);i.d(t,"m",function(){return f.a});var y=i(33);i.d(t,"n",function(){return y.a});var m=i(47);i.d(t,"o",function(){return m.a}),i.d(t,"p",function(){return m.b});var v=i(37);i.d(t,"q",function(){return v.a});var S=i(29);i.d(t,"r",function(){return S.a});var I=i(8);i.d(t,"s",function(){return I.a}),i.d(t,"t",function(){return I.b});var w=i(39);i.d(t,"u",function(){return w.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),i(2)),a=i(4),s=(i.n(a),i(3)),d=function(){function e(e){this.parent=e,r.Grid.Inject(r.InfiniteScroll),this.addEventListener()}return e.prototype.getModuleName=function(){return"infiniteScroll"},e.prototype.addEventListener=function(){this.parent.on(o.a,this.infinitePageAction,this),this.parent.on("infinite-remote-expand",this.infiniteRemoteExpand,this),this.parent.grid.on("delete-complete",this.infiniteDeleteHandler,this),this.parent.grid.on("infinite-edit-handler",this.infiniteEditHandler,this),this.parent.grid.on("infinite-crud-cancel",this.createRows,this),this.parent.grid.on("content-ready",this.contentready,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("infinite-remote-expand",this.infiniteRemoteExpand),this.parent.grid.off("delete-complete",this.infiniteDeleteHandler),this.parent.grid.off("infinite-edit-handler",this.infiniteEditHandler),this.parent.off(o.a,this.infinitePageAction),this.parent.grid.off("infinite-crud-cancel",this.createRows),this.parent.grid.off("content-ready",this.contentready))},e.prototype.infiniteRemoteExpand=function(e){for(var t=this.parent.grid.getRowsObject(),n=this.parent.grid.infiniteScrollModule.serviceLocator,o=new r.RowRenderer(n,null,this.parent.grid),a=this.parent.getRows(),s=e.index===a.length-1?"after":"before",d=this.parent.grid.getColumns(),l=this.parent.grid.infiniteScrollModule.generateRows(e.childData,e),p=[],c=0;c<l.length;c++)p.push(o.render(l[parseInt(c.toString(),10)],d));t.splice.apply(t,[e.index+1,0].concat(l));for(var c=0;c<p.length;c++)"after"===s?a[e.index+c][""+s](p[parseInt(c.toString(),10)]):a[e.index+c+1][""+s](p[parseInt(c.toString(),10)]),a.splice(e.index+1+c,0,p[parseInt(c.toString(),10)]);i.i(r.resetRowIndex)(this.parent.grid,this.parent.grid.getRowsObject(),this.parent.grid.getRows(),0)},e.prototype.contentready=function(){if(this.parent.infiniteScrollSettings.enableCache&&!i.i(n.isNullOrUndefined)(this.parent.editModule)){this.parent.editModule.updateIndex(this.parent.grid.dataSource,this.parent.getRows(),this.parent.getCurrentViewRecords()),this.parent.getFrozenColumns()&&this.parent.editModule.updateIndex(this.parent.grid.dataSource,this.parent.getDataRows(),this.parent.getCurrentViewRecords())}},e.prototype.infinitePageAction=function(e){var t=new a.DataManager(e.result),r=new a.Predicate("expanded","notequal",null).or("expanded","notequal",void 0),o=t.executeLocal((new a.Query).where(r)),s=i.i(n.getValue)("actionArgs",e.actionArgs),d=i.i(n.getValue)("actions",this.parent.grid.infiniteScrollModule);this.parent.grid.infiniteScrollModule.isInitialRender&&!this.parent.initialRender&&(this.parent.grid.pageSettings.currentPage=1);var l=d.some(function(e){return e===s.requestType}),p=!!l||!!this.parent.initialRender;if(this.visualData=o,e.count=o.length,i.i(n.getValue)("isPrinting",e.actionArgs))e.result=o;else{var c=new a.Query,h=this.parent.infiniteScrollSettings.enableCache;h&&this.parent.infiniteScrollSettings.initialBlocks>this.parent.infiniteScrollSettings.maxBlocks&&(this.parent.infiniteScrollSettings.initialBlocks=this.parent.infiniteScrollSettings.maxBlocks);var u=p?this.parent.grid.pageSettings.pageSize*this.parent.infiniteScrollSettings.initialBlocks:this.parent.grid.pageSettings.pageSize,g=this.parent.grid.pageSettings.currentPage;if(i.i(n.isNullOrUndefined)(s))c=c.page(g,u);else{var f=i.i(n.getValue)("lastIndex",this.parent.grid.infiniteScrollModule),y=i.i(n.getValue)("firstIndex",this.parent.grid.infiniteScrollModule);if(h||"delete"!==s.requestType)h&&"delete"===s.requestType||"save"===s.requestType&&"add"===s.action?(c=c.skip(y),c=c.take(this.parent.infiniteScrollSettings.initialBlocks*this.parent.pageSettings.pageSize)):c=c.page(g,u);else{var m=f-s.data.length+1,v=s.data.length;c=c.skip(m).take(v)}}t.dataSource.json=o,h||i.i(n.isNullOrUndefined)(s)||"save"!==s.requestType||"add"!==s.action?e.result=t.executeLocal(c):e.result=[s.data]}this.parent.notify("updateAction",e)},e.prototype.infiniteEditHandler=function(e){var t=this.parent.grid.infiniteScrollModule.infiniteCurrentViewData,i=Object.keys(t);if("delete"===e.e.requestType&&e.result.length>1)for(var r=1;r<e.result.length;r++)t[i[i.length-1]].push(e.result[parseInt(r.toString(),10)])},e.prototype.infiniteDeleteHandler=function(e){if("delete"===e.requestType){var t=this.parent.grid.getRowsObject(),i=this.parent.getRows(),r=e.data instanceof Array?e.data:[e.data],n=this.parent.grid.getPrimaryKeyFieldNames()[0];if(this.removeRows(i,t,r,n,!0),this.parent.getFrozenColumns()>0){var o=this.parent.grid.getRowsObject(),a=this.parent.grid.getRows();this.removeRows(a,o,r,n)}}},e.prototype.removeRows=function(e,t,r,o,a){for(var s=this,d=0;d<r.length;d++)!function(d){t.filter(function(l,p){if(l.data[""+o]===r[parseInt(d.toString(),10)][""+o]){if(a){var c=Math.ceil((p+1)/s.parent.grid.pageSettings.pageSize);s.parent.grid.infiniteScrollModule.resetInfiniteCurrentViewData(c,p)}t.splice(p,1),i.i(n.remove)(e[parseInt(p.toString(),10)]),e.splice(p,1)}})}(d)},e.prototype.createRows=function(e){var t,o=e.args.e,a=e.row,d=this.parent.grid.infiniteScrollModule.serviceLocator,l=new r.RowRenderer(d,null,this.parent.grid),p=this.parent.getCurrentViewRecords(),c=e.isMovable?this.parent.grid.getRows():this.parent.grid.getDataRows();t=e.isFrozenRight?this.parent.element.querySelector(".e-frozen-right-content").querySelector("tbody"):this.parent.grid.isFrozenGrid()?(e.isMovable,this.parent.grid.getContent().querySelector("tbody")):this.parent.getContent().querySelector("tbody"),this.parent.frozenRows&&(t=e.isFrozenRows&&"add"!==this.parent.grid.infiniteScrollModule.requestType||!e.isFrozenRows&&"add"===this.parent.grid.infiniteScrollModule.requestType?this.parent.grid.isFrozenGrid()?e.isMovable?this.parent.grid.getHeaderContent().querySelector("tbody"):e.isFrozenRight?this.parent.element.querySelector(".e-frozen-right-header").querySelector("tbody"):this.parent.grid.getHeaderContent().querySelector("tbody"):this.parent.getHeaderContent().querySelector("tbody"):t);for(var h,u=this.parent.editModule.addRowIndex,g=0;g<a.length;g++){var f=l.render(a[parseInt(g.toString(),10)],this.parent.grid.getColumns());"save"===o.requestType&&"add"===o.action?-1!==i.i(n.getValue)("selectedIndex",this.parent.editModule)&&"Top"!==this.parent.editSettings.newRowPosition?"Below"===this.parent.editSettings.newRowPosition||"Child"===this.parent.editSettings.newRowPosition?(h="after",u+=i.i(s.g)(p[parseInt(u.toString(),10)]).length,"Child"===this.parent.editSettings.newRowPosition&&(u-=1),c[parseInt(u.toString(),10)][""+h](f)):"Above"===this.parent.editSettings.newRowPosition&&(h="before",c[this.parent.editModule.addRowIndex][""+h](f)):"Bottom"===this.parent.editSettings.newRowPosition?t.appendChild(f):t.insertBefore(f,t.firstElementChild):"delete"===o.requestType&&t.appendChild(f)}e.cancel=!0},e.prototype.destroy=function(){this.removeEventListener()},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(0),n=(i.n(r),i(2)),o=i(4),a=(i.n(o),i(1)),s=(i.n(a),i(3)),d=function(){function e(e){r.Grid.Inject(r.Page),this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(n.b,this.collapseExpandPagedchilds,this),this.parent.on(n.a,this.pageAction,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(n.b,this.collapseExpandPagedchilds),this.parent.off(n.a,this.pageAction))},e.prototype.getModuleName=function(){return"pager"},e.prototype.refresh=function(){this.parent.grid.pagerModule.refresh()},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.goToPage=function(e){this.parent.grid.pagerModule.goToPage(e)},e.prototype.updateExternalMessage=function(e){this.parent.grid.pagerModule.updateExternalMessage(e)},e.prototype.collapseExpandPagedchilds=function(e){if(e.record.expanded="collapse"!==e.action,this.parent.flatData.map(function(t){return t.expanded=t.uniqueID===e.record.uniqueID&&t.expanded!==e.record.expanded?e.record.expanded:t.expanded}),this.parent.enableImmutableMode){var t=this.parent.getPrimaryKeyFieldNames()[0],r=this.parent.flatData.filter(function(i){return i[""+t]===e.record[""+t]});r.length&&(r[0].expanded=e.record.expanded)}var n={result:this.parent.flatData,row:e.row,action:e.action,record:e.record,count:this.parent.flatData.length};if(i.i(a.getValue)("grid.renderModule",this.parent).dataManagerSuccess(n),this.parent.enableImmutableMode){var o=void 0;"collapse"===n.action?(o=n.row.getElementsByClassName("e-treegridexpand")[0],i.i(a.isNullOrUndefined)(o)||(i.i(a.removeClass)([o],"e-treegridexpand"),i.i(a.addClass)([o],"e-treegridcollapse"))):"expand"===n.action&&(o=n.row.getElementsByClassName("e-treegridcollapse")[0],i.i(a.isNullOrUndefined)(o)||(i.i(a.removeClass)([o],"e-treegridcollapse"),i.i(a.addClass)([o],"e-treegridexpand")))}},e.prototype.pageRoot=function(e,t,r){for(var n=i.i(a.isNullOrUndefined)(r)?[]:r,o=this,s=0;s<t.length;s++)!function(i){n.push(t[parseInt(i.toString(),10)]);var r=[];t[parseInt(i.toString(),10)].hasChildRecords&&(r=e.filter(function(e){return t[parseInt(i.toString(),10)].uniqueID===e.parentUniqueID}),n=o.pageRoot(e,r,n))}(s);return n},e.prototype.updatePageSize=function(e){var t=e.result.length,i=this.parent.grid.pagerModule;!0===this.parent.pageSettings.pageSizes&&i.pagerObj.pagerdropdownModule.dropDownListObject.value===i.pagerObj.getLocalizedLabel("All")&&(i.pagerObj.totalRecordsCount=t,this.parent.grid.pageSettings.pageSize=t)},e.prototype.pageAction=function(e){var t=this,r=new o.DataManager(e.result);if("Root"===this.parent.pageSettings.pageSizeMode){var n=[],a=this.parent.grid.filterSettings.columns.length>0&&("Child"===this.parent.filterSettings.hierarchyMode||"None"===this.parent.filterSettings.hierarchyMode)?"filterLevel":"level",d=(new o.Query).where(a,"equal",0);n=r.executeLocal(d),e.count=n.length;var l=this.parent.grid.pageSettings.pageSize,p=this.parent.grid.pageSettings.currentPage,c=l*(p-1);d=d.skip(c).take(l),n=r.executeLocal(d);var h=this.pageRoot(e.result,n);e.result=h}else{var u=new o.DataManager(e.result),g=new o.Predicate("expanded","notequal",null).or("expanded","notequal",void 0),f=u.executeLocal((new o.Query).where(g)),y=void 0;y=i.i(s.d)(this.parent)&&"collapse"!==e.actionArgs.action&&"expand"!==e.actionArgs.action?f:f.filter(function(e){return i.i(s.f)(t.parent,e,f)}),e.count=y.length;var d=new o.Query,l=this.parent.grid.pageSettings.pageSize;this.updatePageSize(e);var p=this.parent.grid.pageSettings.currentPage;y.length<p*l&&(p=Math.floor(y.length/l)+(y.length%l?1:0),p=p||1,this.parent.grid.setProperties({pageSettings:{currentPage:p}},!0));var c=l*(p-1);d=d.skip(c).take(l),u.dataSource.json=y,e.result=u.executeLocal(d)}this.parent.notify("updateAction",e)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(0),n=(i.n(r),i(3)),o=i(1),a=(i.n(o),i(4)),s=(i.n(a),i(2)),d=function(){function e(e){r.Grid.Inject(r.PdfExport),this.parent=e,this.dataResults={},this.addEventListener()}return e.prototype.getModuleName=function(){return"PdfExport"},e.prototype.addEventListener=function(){this.parent.on("pdfCellInfo",this.pdfQueryCellInfo,this),this.parent.on("updateResults",this.updatePdfResultModel,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("pdfCellInfo",this.pdfQueryCellInfo),this.parent.off("updateResults",this.updatePdfResultModel))},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.updatePdfResultModel=function(e){this.dataResults=e},e.prototype.Map=function(e,t,d,l){var p=this,c=this.parent.dataSource,h=Object(),u=!i.i(n.a)(this.parent)&&i.i(n.h)(this.parent);return i.i(o.setValue)("cancel",!1,h),new Promise(function(n){var g=!u||c instanceof a.DataManager?p.parent.dataSource:new a.DataManager(c),f=new a.Query;if(u||(f=p.generateQuery(f),i.i(o.setValue)("query",f,h)),p.parent.trigger(s.H,i.i(o.extend)(h,e)),i.i(r.getObject)("cancel",h))return null;g.executeQuery(f).then(function(r){var a=null;return i.i(o.isNullOrUndefined)(e)||i.i(o.isNullOrUndefined)(e.dataSource)||(a=e.dataSource),e=p.manipulatePdfProperties(e,c,r),p.parent.grid.pdfExportModule.Map(p.parent.grid,e,t,d,l).then(function(t){null!=a?e.dataSource=a:delete e.dataSource,n(t)})})})},e.prototype.generateQuery=function(e,t){return!i.i(o.isNullOrUndefined)(t)&&"CurrentPage"===t.exportType&&this.parent.allowPaging&&(t.exportType="AllPages",e.addParams("ExportType","CurrentPage"),e.where(this.parent.parentIdMapping,"equal",null),e=i.i(r.getObject)("grid.renderModule.data.pageQuery",this.parent)(e)),e},e.prototype.manipulatePdfProperties=function(e,t,r){var s={},d=!i.i(n.a)(this.parent)&&i.i(n.h)(this.parent);if(i.i(o.setValue)("query",this.parent.grid.getDataModule().generateQuery(!0),s),i.i(o.setValue)("isExport",!0,s),i.i(o.setValue)("isPdfExport",!0,s),i.i(o.isNullOrUndefined)(e)||i.i(o.isNullOrUndefined)(e.isCollapsedStatePersist)||i.i(o.setValue)("isCollapsedStatePersist",e.isCollapsedStatePersist,s),i.i(o.isNullOrUndefined)(e)||i.i(o.isNullOrUndefined)(e.exportType)||i.i(o.setValue)("exportType",e.exportType,s),d||(this.parent.parentData=[],this.parent.dataModule.convertToFlatData(i.i(o.getValue)("result",r)),i.i(o.setValue)("expresults",this.parent.flatData,s)),this.parent.notify("dataProcessor",s),s=this.dataResults,t=i.i(o.isNullOrUndefined)(s.result)?this.parent.flatData.slice(0):s.result,d||(this.parent.flatData=[]),e&&e.dataSource&&d){var l=this.parent.flatData,p=e.dataSource instanceof a.DataManager?e.dataSource.dataSource.json:e.dataSource;this.parent.dataModule.convertToFlatData(p),t=this.parent.flatData,this.parent.flatData=l}return e=i.i(o.isNullOrUndefined)(e)?{}:e,e.dataSource=new a.DataManager({json:t}),e.query=s.query,e},e.prototype.pdfQueryCellInfo=function(e){if(this.parent.grid.getColumnIndexByUid(e.column.uid)===this.parent.treeColumnIndex){var t={},n=i.i(r.getObject)("data",e),a=i.i(o.isNullOrUndefined)(n.filterLevel),s=a?n.level:n.filterLevel;t.paragraphIndent=3*s,e.style=t}this.parent.notify("updateResults",e),this.parent.trigger("pdfQueryCellInfo",e)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(2),n=i(0),o=(i.n(n),i(1)),a=(i.n(o),function(){function e(e){this.parent=e,n.Grid.Inject(n.Print),this.addEventListener()}return e.prototype.getModuleName=function(){return"print"},e.prototype.addEventListener=function(){this.parent.grid.on(r.V,this.printTreeGrid,this)},e.prototype.removeEventListener=function(){this.parent.grid.off(r.V,this.printTreeGrid)},e.prototype.printTreeGrid=function(e){var t=i.i(n.getObject)("printgrid",e),a=i.i(n.getObject)("element",e);t.addEventListener(r.D,this.parent.grid.queryCellInfo),t.addEventListener(r.J,this.parent.grid.rowDataBound),t.addEventListener(r.M,this.parent.grid.beforeDataBound),i.i(o.addClass)([a],"e-treegrid")},e.prototype.print=function(){this.parent.grid.print()},e.prototype.destroy=function(){this.removeEventListener()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),i(4)),a=(i.n(o),i(2)),s=i(5),d=i(3),l=function(){function e(e){this.canDrop=!0,this.isDraggedWithChild=!1,this.modifiedRecords="modifiedRecords",this.selectedRecords="selectedRecords",this.selectedRows="selectedRows",this.hasDropItem=!0,this.isaddtoBottom=!1,r.Grid.Inject(r.RowDD),this.parent=e,this.addEventListener()}return e.prototype.getChildrecordsByParentID=function(e){var t;return t=this.parent.dataSource instanceof o.DataManager&&i.i(d.h)(this.parent)?this.parent.grid.dataSource.dataSource.json:this.parent.grid.dataSource,t.filter(function(t){return t.uniqueID===e})},e.prototype.addEventListener=function(){this.parent.on(a._11,this.Rowdraging,this),this.parent.on(a._12,this.rowDropped,this),this.parent.on(a._9,this.rowsAdded,this),this.parent.on(a._10,this.rowsRemoved,this)},e.prototype.reorderRows=function(e,t,r){var o=this.parent;if(e[0]!==t&&-1!==["above","below","child"].indexOf(r)){"above"===r&&(this.dropPosition="topSegment"),"below"===r&&(this.dropPosition="bottomSegment"),"child"===r&&(this.dropPosition="middleSegment"),this.parent.dropPosition=this.dropPosition;for(var a=[],s=0;s<e.length;s++){var l=this.parent.getRowByIndex(e[parseInt(s.toString(),10)]).rowIndex;a[parseInt(s.toString(),10)]=this.parent.getCurrentViewRecords()[parseInt(l.toString(),10)]}var p={data:a,dropIndex:t};if(i.i(d.b)(this.parent)||this.dropRows(p,!0),o.isLocalData&&(o.flatData=this.orderToIndex(o.flatData)),"outdenting"===this.parent.action&&(i.i(n.isNullOrUndefined)(a[0].parentItem)||(a[0].level=a[0].parentItem.level+1)),this.parent.grid.refresh(),this.parent.enableImmutableMode&&"middleSegment"===this.dropPosition){var l=void 0;this.parent.allowRowDragAndDrop?l=this.parent.treeColumnIndex+1:"indenting"===this.parent.action&&(l=this.parent.treeColumnIndex);var c=this.parent.getRows()[e[0]],h=p.data[0],u=[],g=[];u.push(h),g.push(c);var f=i.i(d.k)(this.parent,p.data[0].parentUniqueID),y=this.parent.getRows()[parseInt(t.toString(),10)];u.push(f),g.push(y),this.parent.updateRowAndCellElements(u,g,l)}if(this.parent.enableImmutableMode&&"outdenting"===this.parent.action){var l=void 0;this.parent.allowRowDragAndDrop?l=this.parent.treeColumnIndex+1:"outdenting"===this.parent.action&&(l=this.parent.treeColumnIndex);var m=p.data[0],c=this.parent.getRows()[e[0]],u=[],g=[];u.push(m),g.push(c),this.parent.updateRowAndCellElements(u,g,l)}}},e.prototype.indentOutdentAction=function(e,t){var r=this.parent,o=-1;if(!i.i(n.isNullOrUndefined)(e)||-1!==this.parent.selectedRowIndex){this.parent.enableVirtualization&&-1!==this.parent.selectedRowIndex?o=this.parent.getSelectedRows()[0].rowIndex:-1!==this.parent.selectedRowIndex&&(o=this.parent.selectedRowIndex),this.selectedItem=i.i(n.isNullOrUndefined)(e)?r.getCurrentViewRecords()[parseInt(o.toString(),10)]:e;var a=this.parent.getPrimaryKeyFieldNames()[0],s=this.parent.grid.getRowIndexByPrimaryKey(this.selectedItem[""+a]);if(this.selectedRow=this.parent[this.selectedRows]=-1!==o?this.parent.getSelectedRows()[0]:this.parent.grid.getRowByIndex(s),this.selectedRecord=this.parent[this.selectedRecords]=-1!==o?r.getCurrentViewRecords()[parseInt(o.toString(),10)]:this.selectedItem,"indent"===t){var d=r.getCurrentViewRecords()[this.selectedRow.rowIndex-1],l=void 0;if(0===this.selectedRow.rowIndex||-1===this.selectedRow.rowIndex||r.getCurrentViewRecords()[this.selectedRow.rowIndex].level-d.level==1)return;if(d.level>this.selectedRecord.level)for(var p=0;p<r.getCurrentViewRecords().length;p++)r.getCurrentViewRecords()[parseInt(p.toString(),10)].taskData===d.parentItem.taskData&&(l=p,r.enableVirtualization&&(l=parseInt(r.getRows()[parseInt(p.toString(),10)].getAttribute("data-rowindex"),10)));else l=this.selectedRow.rowIndex-1;!this.parent.enableVirtualization||!this.selectedRecord||d.level>this.selectedRecord.level||(l=parseInt(this.selectedRow.getAttribute("data-rowindex"),10)-1),r.action="indenting",r.dropIndex=l,this.eventTrigger("indenting",l)}else if("outdent"===t){if(-1===this.selectedRow.rowIndex||0===this.selectedRow.rowIndex||0===r.getCurrentViewRecords()[this.selectedRow.rowIndex].level)return;for(var l=void 0,c=this.selectedRecord.parentItem,p=0;p<r.getCurrentViewRecords().length;p++)r.getCurrentViewRecords()[parseInt(p.toString(),10)].uniqueID===c.uniqueID&&(l=p);this.parent.enableVirtualization&&this.selectedRecord&&(l=parseInt(this.parent.getRows()[parseInt(l.toString(),10)].getAttribute("data-rowindex"),10)),r.action="outdenting",r.dropIndex=l,this.eventTrigger("outdenting",l)}}},e.prototype.eventTrigger=function(e,t){var i=this,r={action:e,cancel:!1,data:[this.parent[this.selectedRecords]],row:this.parent[this.selectedRows]};this.parent.trigger(a.v,r,function(e){e.cancel||("indenting"===e.action?i.parent.enableVirtualization?i.reorderRows([parseInt(i.selectedRow.getAttribute("data-rowindex"),10)],t,"child"):i.reorderRows([i.selectedRow.rowIndex],t,"child"):"outdenting"===e.action&&(i.parent.enableVirtualization?i.reorderRows([parseInt(i.selectedRow.getAttribute("data-rowindex"),10)],t,"below"):i.reorderRows([i.selectedRow.rowIndex],t,"below")))})},e.prototype.orderToIndex=function(e){for(var t=0;t<e.length;t++)if(e[parseInt(t.toString(),10)].index=t,!i.i(n.isNullOrUndefined)(e[parseInt(t.toString(),10)].parentItem)){var r=i.i(n.getValue)("uniqueIDCollection."+e[parseInt(t.toString(),10)].parentUniqueID,this.parent);e[parseInt(t.toString(),10)].parentItem.index=r.index}return e},e.prototype.rowsAdded=function(e){for(var t,r=e.records,a=e.records.length-1;a>-1;a--)if(t=r[parseInt(a.toString(),10)],t.parentUniqueID){var s=r.filter(function(e){return e.uniqueID===t.parentUniqueID});if(s.length){var d=s[0].childRecords.indexOf(t),l=s[0];-1!==d&&(i.i(n.isNullOrUndefined)(this.parent.idMapping)&&(l.childRecords.splice(d,1),l.childRecords.length||(l.hasChildRecords=!1,l.hasFilteredChildRecords=!1)),this.isDraggedWithChild=!0)}}if(i.i(n.isNullOrUndefined)(this.parent.dataSource)||!this.parent.dataSource.length){for(var p,c=this.parent,h=e.records,u=e.records.length,a=u-1;a>-1;a--){p=h[parseInt(a.toString(),10)],!a&&p.hasChildRecords&&(p.taskData[this.parent.parentIdMapping]=null);if(i.i(n.isNullOrUndefined)(c.parentIdMapping)||(c.childMapping=null),i.i(n.isNullOrUndefined)(p.taskData)||i.i(n.isNullOrUndefined)(c.childMapping)||Object.prototype.hasOwnProperty.call(p.taskData,c.childMapping)||(p.taskData[c.childMapping]=[]),Object.prototype.hasOwnProperty.call(p,c.childMapping)&&p[c.childMapping].length&&!this.isDraggedWithChild&&!i.i(n.isNullOrUndefined)(c.parentIdMapping))for(var g=p[c.childMapping],f=0;f<g.length;f++)-1===h.indexOf(g[parseInt(f.toString(),10)])&&(h.splice(f,0,g[parseInt(f.toString(),10)]),g[parseInt(f.toString(),10)].taskData=i.i(n.extend)({},g[parseInt(f.toString(),10)]),a+=1);Object.prototype.hasOwnProperty.call(p,c.parentIdMapping)&&null!==p[c.parentIdMapping]&&!this.isDraggedWithChild&&(p.taskData[c.parentIdMapping]=null,delete p.parentItem,delete p.parentUniqueID),i.i(n.isNullOrUndefined)(c.dataSource)&&(c.dataSource=[]),c.dataSource.splice(0,0,p.taskData)}c.setProperties({dataSource:c.dataSource},!1)}else{for(var a=0;a<r.length;a++)i.i(n.setValue)("uniqueIDCollection."+r[parseInt(a.toString(),10)].uniqueID,r[parseInt(a.toString(),10)],this.parent);var y={data:e.records,dropIndex:e.toIndex};this.parent.dataSource instanceof o.DataManager?(this.treeGridData=this.parent.dataSource.dataSource.json,this.treeData=this.parent.dataSource.dataSource.json):(this.treeGridData=this.parent.grid.dataSource,this.treeData=this.parent.dataSource),i.i(n.isNullOrUndefined)(this.dropPosition)&&(this.dropPosition="bottomSegment",y.dropIndex=this.parent.getCurrentViewRecords().length>1?this.parent.getCurrentViewRecords().length-1:y.dropIndex,y.data=y.data.map(function(e){return e.hasChildRecords&&i.i(n.isNullOrUndefined)(e.parentItem)?(e.level=0,e):(delete e.parentItem,delete e.parentUniqueID,e.level=0,e)})),this.dropRows(y)}},e.prototype.rowsRemoved=function(e){for(var t=0;t<e.records.length;t++)this.draggedRecord=e.records[parseInt(t.toString(),10)],(this.draggedRecord.hasChildRecords||this.draggedRecord.parentItem&&-1!==this.parent.grid.dataSource.indexOf(this.getChildrecordsByParentID(this.draggedRecord.parentUniqueID)[0])||0===this.draggedRecord.level)&&this.deleteDragRow()},e.prototype.refreshGridDataSource=function(){var e,t,r=this.draggedRecord,a=this.droppedRecord,s=this.parent;if(!(e=this.parent.dataSource instanceof o.DataManager&&i.i(d.h)(this.parent)?s.dataSource.dataSource.json:s.dataSource)||i.i(n.isNullOrUndefined)(a)||a.parentItem||i.i(n.isNullOrUndefined)(a.taskData)){if(!this.parent.parentIdMapping&&!i.i(n.isNullOrUndefined)(a)&&a.parentItem&&("topSegment"===this.dropPosition||"bottomSegment"===this.dropPosition))for(var l=this.getChildrecordsByParentID(a.parentUniqueID)[0],p=l.childRecords,c=0;c<p.length;c++)a.parentItem.taskData[this.parent.childMapping][parseInt(c.toString(),10)]=p[parseInt(c.toString(),10)].taskData}else{for(var h=Object.keys(e),c=0;c<h.length;c++)e[parseInt(c.toString(),10)][this.parent.childMapping]===a.taskData[this.parent.childMapping]&&(t=c);"topSegment"===this.dropPosition?this.parent.idMapping||e.splice(t,0,r.taskData):"bottomSegment"===this.dropPosition&&(this.parent.idMapping||e.splice(t+1,0,r.taskData))}this.parent.parentIdMapping&&(r.parentItem?"topSegment"===this.dropPosition||"bottomSegment"===this.dropPosition?(r[this.parent.parentIdMapping]=a[this.parent.parentIdMapping],r.taskData[this.parent.parentIdMapping]=a[this.parent.parentIdMapping]):(r[this.parent.parentIdMapping]=a[this.parent.idMapping],r.taskData[this.parent.parentIdMapping]=a[this.parent.idMapping]):(r.taskData[this.parent.parentIdMapping]=null,r[this.parent.parentIdMapping]=null))},e.prototype.removeFirstrowBorder=function(e){var t="bottomSegment"===this.dropPosition;this.parent.element.getElementsByClassName("e-firstrow-border").length>0&&e&&(0!==e.rowIndex||t)&&this.parent.element.getElementsByClassName("e-firstrow-border")[0].remove()},e.prototype.removeLastrowBorder=function(e){var t,i=e&&(e.classList.contains("e-emptyrow")||e.classList.contains("e-columnheader")||e.classList.contains("e-detailrow"));t=this.parent.enableVirtualization?e&&!i&&this.parent.getRows()[this.parent.getCurrentViewRecords().length-1].getAttribute("data-uid")!==e.getAttribute("data-uid"):e&&!i&&this.parent.getRowByIndex(this.parent.getCurrentViewRecords().length-1).getAttribute("data-uid")!==e.getAttribute("data-uid");var r=t||"topSegment"===this.dropPosition;this.parent.element.getElementsByClassName("e-lastrow-border").length>0&&e&&(t||r)&&this.parent.element.getElementsByClassName("e-lastrow-border")[0].remove()},e.prototype.updateIcon=function(e,t,o){var a=o.target?i.i(n.closest)(o.target,"tr"):null;this.dropPosition=void 0;var s=0;this.removeFirstrowBorder(a),this.removeLastrowBorder(a);for(var d=0;d<o.rows.length;d++)(i.i(n.isNullOrUndefined)(a)||a.getAttribute("data-uid")!==o.rows[parseInt(d.toString(),10)].getAttribute("data-uid"))&&i.i(r.parentsUntil)(o.target,"e-gridcontent")||(this.dropPosition="Invalid",this.addErrorElem());var l=this.parent,p=0,c=l.toolbar&&l.toolbar.length?document.getElementById(l.element.id+"_gridcontrol_toolbarItems").offsetHeight:0,h=this.getOffset(l.element),u=l.getHeaderContent().offsetHeight+h.top+c,g=l.getContent().firstElementChild.scrollTop;i.i(n.isNullOrUndefined)(a)||(s=a.offsetTop-g),p=this.parent.enableVirtualization?a.getBoundingClientRect().top:s+u+0;var f=p+e[0].offsetHeight,y=f-p,m=y/3,v=p+m,S=v+m,I=S+m,w=i.i(r.getObject)("originalEvent.event",o),R=i.i(r.getObject)("originalEvent.event",o),x="mousemove"===w.type?w.pageY:i.i(n.isNullOrUndefined)(R)||i.i(n.isNullOrUndefined)(R.changedTouches)?null:R.changedTouches[0].pageY,C=x<=v,b=x>v&&x<=S,D=x>S&&x<=I;if(C||b||D){if(C&&"Invalid"!==this.dropPosition&&(this.removeChildBorder(),this.dropPosition="topSegment",this.removetopOrBottomBorder(),this.addFirstrowBorder(a),this.removeErrorElem(),this.removeLastrowBorder(a),this.topOrBottomBorder(o.target)),b&&"Invalid"!==this.dropPosition){this.removetopOrBottomBorder();var M=[],O=i.i(n.closest)(o.target,"tr");M=[].slice.call(O.querySelectorAll(".e-rowcell,.e-rowdragdrop,.e-detailrowcollapse")),M.length>0&&this.addRemoveClasses(M,!0,"e-childborder"),this.addLastRowborder(a),this.addFirstrowBorder(a),this.dropPosition="middleSegment"}D&&"Invalid"!==this.dropPosition&&(this.removeErrorElem(),this.removetopOrBottomBorder(),this.removeChildBorder(),this.dropPosition="bottomSegment",this.addLastRowborder(a),this.removeFirstrowBorder(a),this.topOrBottomBorder(o.target))}return this.dropPosition},e.prototype.removeChildBorder=function(){var e=[];e=[].slice.call(this.parent.element.querySelectorAll(".e-childborder")),e.length>0&&this.addRemoveClasses(e,!1,"e-childborder")},e.prototype.addFirstrowBorder=function(e){var t=this.parent.element,r=this.parent;if(e&&0===e.rowIndex&&!e.classList.contains("e-emptyrow")){var o=this.parent.createElement("div",{className:"e-firstrow-border"}),a=this.parent.getHeaderContent(),s=0;r.toolbar&&(s=r.toolbarModule.getToolbar().offsetHeight);var d=!i.i(n.isNullOrUndefined)(this.parent.rowDropSettings.targetID);d&&(o.style.top=this.parent.grid.element.getElementsByClassName("e-gridheader")[0].offsetHeight+s+"px"),o.style.width=d?t.offsetWidth+"px":t.offsetWidth-this.getScrollWidth()+"px",a.querySelectorAll(".e-firstrow-border").length||a.appendChild(o)}},e.prototype.addLastRowborder=function(e){var t=e&&(e.classList.contains("e-emptyrow")||e.classList.contains("e-columnheader")||e.classList.contains("e-detailrow"));if(e&&!t&&this.parent.getRows()[this.parent.getCurrentViewRecords().length-1].getAttribute("data-uid")===e.getAttribute("data-uid")){var i=this.parent.createElement("div",{className:"e-lastrow-border"}),r=this.parent.getContent();i.style.width=this.parent.element.offsetWidth-this.getScrollWidth()+"px",r.querySelectorAll(".e-lastrow-border").length||(r.classList.add("e-treegrid-relative"),r.appendChild(i),i.style.bottom=this.getScrollWidth()+"px")}},e.prototype.getScrollWidth=function(){var e=this.parent.getContent().firstElementChild;return e.scrollWidth>e.offsetWidth?r.Scroll.getScrollBarWidth():0},e.prototype.addErrorElem=function(){var e=document.getElementsByClassName("e-cloneproperties")[0],t=e.querySelectorAll(".e-errorelem").length;if(!t&&!this.parent.rowDropSettings.targetID){var r=document.createElement("div");i.i(n.classList)(r,["e-errorcontainer"],[]),i.i(n.classList)(r,["e-icons","e-errorelem"],[]);var o=e.querySelector(".errorValue"),a=e.querySelector(".e-rowcell").innerHTML;o&&(a=this.parent.sanitize(o.innerHTML),o.parentNode.removeChild(o)),e.querySelector(".e-rowcell").innerHTML="";var s=document.createElement("span");s.className="errorValue",s.style.paddingLeft="16px",s.innerHTML=this.parent.sanitize(a),e.querySelector(".e-rowcell").appendChild(r),e.querySelector(".e-rowcell").appendChild(s);var d=document.querySelector(".e-dropitemscount");if(this.hasDropItem&&d){var l=parseInt(d.style.left,10)+r.offsetWidth+16,p=this.parent.enableRtl?0:l;d.style.left=p+"px",this.hasDropItem=!1}}},e.prototype.removeErrorElem=function(){var e=document.querySelector(".e-errorelem"),t=document.querySelector(".errorValue"),r=document.querySelector(".e-dropitemscount");if(e){if(r){var o=parseInt(r.style.left,10)-e.offsetWidth-16;i.i(n.setStyleAttribute)(t,{paddingLeft:"0px"}),this.parent.enableRtl||i.i(n.setStyleAttribute)(r,{left:o+"px"})}e.remove()}this.hasDropItem=!0},e.prototype.topOrBottomBorder=function(e){var t=[],r=i.i(n.closest)(e,"tr");t=r?[].slice.call(r.querySelectorAll(".e-rowcell,.e-rowdragdrop,.e-detailrowcollapse")):[],t.length&&("topSegment"===this.dropPosition&&(this.addRemoveClasses(t,!0,"e-droptop"),this.parent.element.getElementsByClassName("e-lastrow-dragborder").length>0&&this.parent.element.getElementsByClassName("e-lastrow-dragborder")[0].remove()),"bottomSegment"===this.dropPosition&&this.addRemoveClasses(t,!0,"e-dropbottom"))},e.prototype.removetopOrBottomBorder=function(){var e=[];e=[].slice.call(this.parent.element.querySelectorAll(".e-dropbottom, .e-droptop")),e.length&&(this.addRemoveClasses(e,!1,"e-dropbottom"),this.addRemoveClasses(e,!1,"e-droptop"))},e.prototype.addRemoveClasses=function(e,t,i){for(var r=0,n=e.length;r<n;r++)t?e[parseInt(r.toString(),10)].classList.add(i):e[parseInt(r.toString(),10)].classList.remove(i)},e.prototype.getOffset=function(e){var t=e.getBoundingClientRect(),i=document.body,r=document.documentElement,n=window.pageYOffset||r.scrollTop||i.scrollTop,o=window.pageXOffset||r.scrollLeft||i.scrollLeft,a=r.clientTop||i.clientTop||0,s=r.clientLeft||i.clientLeft||0,d=t.top+n-a,l=t.left+o-s;return{top:Math.round(d),left:Math.round(l)}},e.prototype.Rowdraging=function(e){var t=this.parent,o=this.parent.element.querySelector(".e-cloneproperties");o.style.cursor="";var a=e.target?i.i(n.closest)(e.target,"tr"):null,s=a?a.rowIndex:-1,d=[],l=t.getCurrentViewRecords()[parseInt(s.toString(),10)];if(this.removeErrorElem(),this.canDrop=!0,e.data[0]?d=e.data:d.push(e.data),-1!==s?this.ensuredropPosition(d,l):(this.canDrop=!1,this.addErrorElem()),!t.rowDropSettings.targetID&&this.canDrop&&t.rowDragAndDropModule.updateIcon(e.rows,s,e),i.i(n.isNullOrUndefined)(t.rowDropSettings.targetID)&&!this.canDrop&&this.removetopOrBottomBorder(),t.rowDropSettings.targetID){var p=i.i(r.parentsUntil)(e.target,"e-treegrid");if(p&&p.id===this.parent.rowDropSettings.targetID){p.ej2_instances[0].rowDragAndDropModule.updateIcon(e.rows,s,e)}}if(e.target&&i.i(n.closest)(e.target,"#"+t.rowDropSettings.targetID)){var p=i.i(r.parentsUntil)(e.target,"e-treegrid");p||(o.style.cursor="default")}},e.prototype.rowDropped=function(e){var t=this.parent;if(t.rowDropSettings.targetID?(e.target&&i.i(n.closest)(e.target,"#"+t.rowDropSettings.targetID)||i.i(r.parentsUntil)(e.target,"e-treegrid")&&i.i(r.parentsUntil)(e.target,"e-treegrid").id===t.rowDropSettings.targetID||e.target&&document.getElementById(t.rowDropSettings.targetID))&&(i.i(n.setValue)("dropPosition",this.dropPosition,e),t.trigger(a._7,e),!e.cancel&&t.rowDropSettings.targetID&&(this.dragDropGrid(e),t.isLocalData&&(t.flatData=this.orderToIndex(t.flatData)))):i.i(r.parentsUntil)(e.target,"e-content")&&(this.parent.element.querySelector(".e-errorelem")&&(this.dropPosition="Invalid"),i.i(n.setValue)("dropPosition",this.dropPosition,e),t.trigger(a._7,e),e.cancel||(i.i(d.b)(this.parent)||this.dropRows(e),t.isLocalData&&(t.flatData=this.orderToIndex(t.flatData)),t.grid.refresh(),i.i(n.isNullOrUndefined)(t.getHeaderContent().querySelector(".e-firstrow-border"))||t.getHeaderContent().querySelector(".e-firstrow-border").remove())),this.removetopOrBottomBorder(),this.removeChildBorder(),i.i(n.isNullOrUndefined)(this.parent.element.getElementsByClassName("e-firstrow-border")[0])?i.i(n.isNullOrUndefined)(this.parent.element.getElementsByClassName("e-lastrow-border")[0])||this.parent.element.getElementsByClassName("e-lastrow-border")[0].remove():this.parent.element.getElementsByClassName("e-firstrow-border")[0].remove(),this.parent.enableImmutableMode&&!this.parent.allowPaging&&!i.i(n.isNullOrUndefined)(e.data[0].parentItem)){var o=this.parent.treeColumnIndex;o+=1;var s=this.parent.getPrimaryKeyFieldNames()[0],l=this.parent.grid.getRowIndexByPrimaryKey(e.data[0][""+s]),p=this.parent.getRows()[parseInt(l.toString(),10)],c=e.data[0];if("middleSegment"===this.dropPosition){var h=[],u=[];h.push(c),u.push(p);c=i.i(d.k)(this.parent,e.data[0].parentUniqueID),l=this.parent.grid.getRowIndexByPrimaryKey(c[""+s]);var g=this.parent.getRows()[parseInt(l.toString(),10)];h.push(c),u.push(g);for(var f=0;f<h.length;f++)this.parent.renderModule.cellRender({data:h[parseInt(f.toString(),10)],cell:u[parseInt(f.toString(),10)].cells[parseInt(o.toString(),10)],column:this.parent.grid.getColumns()[this.parent.treeColumnIndex],requestType:"rowDragAndDrop"});var y=g.getElementsByClassName("e-treegridcollapse")[0];i.i(n.isNullOrUndefined)(y)||(i.i(n.removeClass)([y],"e-treegridcollapse"),i.i(n.addClass)([y],"e-treegridexpand"))}else this.parent.renderModule.cellRender({data:c,cell:p.cells[parseInt(o.toString(),10)],column:this.parent.grid.getColumns()[this.parent.treeColumnIndex],requestType:"rowDragAndDrop"})}},e.prototype.dragDropGrid=function(e){var t,o=this.parent,s=i.i(n.closest)(e.target,"tr"),l=isNaN(this.getTargetIdx(s))?0:this.getTargetIdx(s),p=i.i(r.parentsUntil)(e.target,"e-treegrid");if(p&&p.id===this.parent.rowDropSettings.targetID&&!i.i(d.a)(this.parent)&&!i.i(d.b)(this.parent)){t=p.ej2_instances[0];for(var c=o.getSelectedRecords(),h=[],u=0;u<c.length;u++)h[parseInt(u.toString(),10)]=c[parseInt(u.toString(),10)].index;var g=t.dataSource;if(null!==this.parent.idMapping&&(i.i(n.isNullOrUndefined)(this.dropPosition)||"bottomSegment"===this.dropPosition||"Invalid"===this.dropPosition)&&!g.length){for(var f=[],u=0;u<c.length;u++)if(c[parseInt(u.toString(),10)].hasChildRecords){f.push(c[parseInt(u.toString(),10)]);for(var y=i.i(d.g)(c[parseInt(u.toString(),10)]),m=0;m<y.length;m++)f.push(y[parseInt(m.toString(),10)])}f.length&&(c=f)}o.notify(a._10,{indexes:h,records:c}),t.notify(a._9,{toIndex:l,records:c});var v=t.rowDragAndDropModule.treeGridData;if(!i.i(n.isNullOrUndefined)(v))for(var u=0;u<v.length;u++)if(v[parseInt(u.toString(),10)].index=u,!i.i(n.isNullOrUndefined)(v[parseInt(u.toString(),10)].parentItem)){var S=i.i(n.getValue)("uniqueIDCollection."+v[parseInt(u.toString(),10)].parentUniqueID+".index",t);v[parseInt(u.toString(),10)].parentItem.index=S}o.grid.refresh(),t.grid.refresh(),t.grid.dataSource.length>1&&(t.grid.refresh(),i.i(n.isNullOrUndefined)(t.getHeaderContent().querySelector(".e-firstrow-border"))||t.getHeaderContent().querySelector(".e-firstrow-border").remove(),i.i(n.isNullOrUndefined)(t.getContent().querySelector(".e-lastrow-border"))||t.getContent().querySelector(".e-lastrow-border").remove())}i.i(d.b)(this.parent)&&(t=p.ej2_instances[0],o.grid.refresh(),t.grid.refresh())},e.prototype.getTargetIdx=function(e){return e?parseInt(e.getAttribute("data-rowindex"),10):0},e.prototype.getParentData=function(e,t){var r=e.parentItem,n=-1;if(this.parent.enableVirtualization&&-1!==this.parent.selectedRowIndex?n=this.parent.getSelectedRows()[0].rowIndex:-1!==this.parent.selectedRowIndex&&(n=this.parent.selectedRowIndex),"bottomSegment"===this.dropPosition){var o=this.parent.getPrimaryKeyFieldNames()[0],a=-1===n?this.parent.grid.getRowIndexByPrimaryKey(t[0][""+o]):this.parent.getSelectedRowIndexes()[0],s=this.parent.getCurrentViewRecords()[parseInt(a.toString(),10)];this.droppedRecord=i.i(d.k)(this.parent,s.parentItem.uniqueID)}if("middleSegment"===this.dropPosition){this.parent.getCurrentViewRecords()[parseInt(n.toString(),10)].level===r.level?this.droppedRecord=i.i(d.k)(this.parent,r.uniqueID):this.getParentData(r)}},e.prototype.dropRows=function(e,t){if("Invalid"!==this.dropPosition&&!i.i(d.a)(this.parent)){var r,o=this.parent,a=void 0;if(i.i(n.isNullOrUndefined)(e.dropIndex)){var s=this.parent.getPrimaryKeyFieldNames()[0],l=-1===o.selectedRowIndex?this.parent.grid.getRowIndexByPrimaryKey(e.data[0][""+s])-1:o.getSelectedRowIndexes()[0]-1,p=o.getCurrentViewRecords()[parseInt(l.toString(),10)];this.getParentData(p,e.data)}else if(e.dropIndex=e.dropIndex===e.fromIndex?this.getTargetIdx(e.target.parentElement):e.dropIndex,this.parent.enableVirtualization){var c=this.parent.getRowByIndex(e.dropIndex).rowIndex;this.droppedRecord=o.getCurrentViewRecords()[parseInt(c.toString(),10)]}else this.droppedRecord=o.getCurrentViewRecords()[e.dropIndex];var h=[];a=this.droppedRecord,e.data[0]?h=e.data:h.push(e.data),this.parent[this.modifiedRecords].push(e.data[0],a);var u=0,g=this.parent.rowDropSettings.targetID;this.isMultipleGrid=g,g?this.isaddtoBottom=g&&this.isDraggedWithChild:this.ensuredropPosition(h,a);var f=h.length;i.i(n.isNullOrUndefined)(this.parent.idMapping)||h.reverse();for(var y=this,m=0;m<f;m++)!function(s){if(r=h[parseInt(s.toString(),10)],y.draggedRecord=r,"Invalid"!==y.dropPosition){if(o.rowDropSettings.targetID&&!t||y.deleteDragRow(),y.draggedRecord===y.droppedRecord){var d=y.getTargetIdx(e.target.offsetParent.parentElement);isNaN(d)&&(d=y.getTargetIdx(e.target.parentElement)),e.dropIndex=d,a=y.droppedRecord=y.parent.getCurrentViewRecords()[e.dropIndex]}if(a.parentItem||"middleSegment"===y.dropPosition){var l=o.parentData,p=l.indexOf(y.draggedRecord);-1!==p&&l.splice(p,1)}var c=y.treeGridData.indexOf(a);if(y.dropAtTop(c),"bottomSegment"===y.dropPosition){if(a.hasChildRecords?(u=y.getChildCount(a,0),y.parent.parentIdMapping&&y.treeData.splice(c+u+1,0,y.draggedRecord.taskData),y.treeGridData.splice(c+u+1,0,y.draggedRecord)):(y.parent.parentIdMapping&&y.treeData.splice(c+1,0,y.draggedRecord.taskData),y.treeGridData.splice(c+1,0,y.draggedRecord)),i.i(n.isNullOrUndefined)(a.parentItem)&&(delete r.parentItem,delete r.parentUniqueID,r.level=0,y.parent.parentIdMapping&&(r[y.parent.parentIdMapping]=null)),a.parentItem){var g=y.getChildrecordsByParentID(a.parentUniqueID),f=g[0].childRecords,m=f.indexOf(a)+1;f.splice(m,0,r),r.parentItem=a.parentItem,r.parentUniqueID=a.parentUniqueID,r.level=a.level,y.parent.parentIdMapping&&(r[y.parent.parentIdMapping]=a[y.parent.parentIdMapping],r.parentItem=a.parentItem,r.level=a.level)}if(r.hasChildRecords){y.updateChildRecordLevel(r,1),y.updateChildRecord(r,c+u+1)}}y.dropMiddle(c)}if(i.i(n.isNullOrUndefined)(r.parentItem)){var l=o.parentData,p=l.indexOf(y.droppedRecord),v=0;l.filter(function(e){r.uniqueID===e.uniqueID&&v++}),"bottomSegment"===y.dropPosition&&0===v?l.splice(p+1,0,r):"topSegment"===y.dropPosition&&0===v&&l.splice(p,0,r)}o.rowDragAndDropModule.refreshGridDataSource()}(m)}},e.prototype.dropMiddle=function(e){var t=this.parent,r=i.i(d.g)(this.droppedRecord),o=i.i(n.isNullOrUndefined)(r)||0===r.length?e+1:r.length+e+1;"middleSegment"===this.dropPosition&&(t.parentIdMapping?(this.treeData.splice(o,0,this.draggedRecord.taskData),this.treeGridData.splice(o,0,this.draggedRecord)):this.treeGridData.splice(o,0,this.draggedRecord),this.recordLevel(),this.draggedRecord.hasChildRecords&&this.updateChildRecord(this.draggedRecord,o))},e.prototype.dropAtTop=function(e){var t=this.parent;if("topSegment"===this.dropPosition){if(t.parentIdMapping&&this.treeData.splice(e,0,this.draggedRecord.taskData),this.draggedRecord.parentItem=this.treeGridData[parseInt(e.toString(),10)].parentItem,this.draggedRecord.parentUniqueID=this.treeGridData[parseInt(e.toString(),10)].parentUniqueID,this.draggedRecord.level=this.treeGridData[parseInt(e.toString(),10)].level,this.treeGridData.splice(parseInt(e.toString(),10),0,this.draggedRecord),this.draggedRecord.hasChildRecords){this.updateChildRecord(this.draggedRecord,e),this.updateChildRecordLevel(this.draggedRecord,1)}if(this.droppedRecord.parentItem){var i=this.getChildrecordsByParentID(this.droppedRecord.parentUniqueID),r=i[0].childRecords,n=r.indexOf(this.droppedRecord);r.splice(n,0,this.draggedRecord)}}},e.prototype.recordLevel=function(){var e=this.parent,t=this.draggedRecord,r=this.droppedRecord,o=e.childMapping;if(r.hasChildRecords||(r.hasChildRecords=!0,r.hasFilteredChildRecords=!0,(i.i(n.isNullOrUndefined)(r.childRecords)||0===r.childRecords.length)&&(r.childRecords=[],!e.parentIdMapping&&i.i(n.isNullOrUndefined)(r.taskData[""+o])&&(r.taskData[""+o]=[]))),"middleSegment"===this.dropPosition){var a=i.i(n.extend)({},r);delete a.childRecords,t.parentItem=a,t.parentUniqueID=r.uniqueID,r.childRecords.splice(r.childRecords.length,0,t);if(e.isSelfReference&&(r[e.childMapping]=[],r[e.childMapping].splice(r[e.childMapping].length,0,t)),i.i(n.isNullOrUndefined)(t)||e.parentIdMapping||i.i(n.isNullOrUndefined)(r.taskData[""+o])||r.taskData[e.childMapping].splice(r.childRecords.length,0,t.taskData),t.hasChildRecords){t.level=r.level+1,this.updateChildRecordLevel(t,1)}else t.level=r.level+1;r.expanded=!0}},e.prototype.deleteDragRow=function(){this.parent.dataSource instanceof o.DataManager&&i.i(d.h)(this.parent)?(this.treeGridData=this.parent.grid.dataSource.dataSource.json,this.treeData=this.parent.dataSource.dataSource.json):(this.treeGridData=this.parent.grid.dataSource,this.treeData=this.parent.dataSource);var e=i.i(d.k)(this.parent,this.draggedRecord.uniqueID);!i.i(n.isNullOrUndefined)(e.childRecords)&&e.childRecords.length&&(e.hasChildRecords=!0),this.removeRecords(e)},e.prototype.updateChildRecord=function(e,t){var r,o=this.parent,a=0;if(!e.hasChildRecords)return 0;a=e.childRecords.length;for(var s=0;s<a;s++)r=this.isMultipleGrid?e.childRecords[parseInt(s.toString(),10)]:i.i(n.getValue)("uniqueIDCollection."+e.childRecords[parseInt(s.toString(),10)].uniqueID,o),t++,o.flatData.splice(t,0,r),i.i(n.setValue)("uniqueIDCollection."+r.uniqueID,r,this.parent),o.parentIdMapping&&this.treeData.splice(t,0,r.taskData),r.hasChildRecords&&(t=this.updateChildRecord(r,t));return t},e.prototype.updateChildRecordLevel=function(e,t){var r,o=0;if(t++,!e.hasChildRecords)return 0;o=e.childRecords.length;for(var a=0;a<o;a++){r=this.isMultipleGrid?e.childRecords[parseInt(a.toString(),10)]:i.i(n.getValue)("uniqueIDCollection."+e.childRecords[parseInt(a.toString(),10)].uniqueID,this.parent);var s=void 0;e.parentItem&&(s=i.i(d.k)(this.parent,e.parentItem.uniqueID)),i.i(n.isNullOrUndefined)(s)&&!i.i(n.isNullOrUndefined)(e.parentItem)&&(s=e.parentItem),r.level=e.parentItem?s.level+t:e.level+1,r.hasChildRecords&&(t--,t=this.updateChildRecordLevel(r,t))}return t},e.prototype.removeRecords=function(e){var t,r=this.parent;t=this.parent.dataSource instanceof o.DataManager&&i.i(d.h)(this.parent)?this.parent.dataSource.dataSource.json:this.parent.dataSource;var a=e,l=!i.i(n.isNullOrUndefined)(r.parentIdMapping),p=this.getChildrecordsByParentID(a.parentUniqueID)[0];if(a){if(a.parentItem){var c=p?p.childRecords:[],h=0;c&&c.length>0&&(h=c.indexOf(a),p.childRecords.splice(h,1),this.parent.parentIdMapping&&!r.enableImmutableMode||i.i(s.a)({value:a,action:"delete"},this.parent,l,a.index,a.index))}if(r.parentIdMapping){a.hasChildRecords&&a.childRecords.length>0&&this.removeChildItem(a);for(var u=void 0,g=void 0,f=t,y=0;y<f.length;y++)f[parseInt(y.toString(),10)][this.parent.idMapping]===a.taskData[this.parent.idMapping]&&(u=y);for(var y=0;y<this.treeGridData.length;y++)this.treeGridData[parseInt(y.toString(),10)][this.parent.idMapping]===a.taskData[this.parent.idMapping]&&(g=y);-1===u||i.i(n.isNullOrUndefined)(u)||t.splice(u,1),-1===g||i.i(n.isNullOrUndefined)(g)||this.treeGridData.splice(g,1)}var m=this.treeGridData.indexOf(a);if(!r.parentIdMapping){var v=this.parent.parentData.indexOf(a);-1!==v&&(r.parentData.splice(v,1),t.splice(v,1))}if(-1===m&&!r.parentIdMapping)for(var S=r.getPrimaryKeyFieldNames()[0],I=0;I<this.treeGridData.length;I++)this.treeGridData[parseInt(I.toString(),10)][""+S]===a[""+S]&&(m=I);if(!r.parentIdMapping){var w=this.getChildCount(a,0);this.treeGridData.splice(m,w+1)}a.parentItem&&p&&p.childRecords&&!p.childRecords.length&&(p.expanded=!1,p.hasChildRecords=!1,p.hasFilteredChildRecords=!1),-1!==this.parent[this.modifiedRecords].indexOf(p)||i.i(n.isNullOrUndefined)(p)||this.parent[this.modifiedRecords].push(p),i.i(n.isNullOrUndefined)(p)||this.updateModifiedRecords(p)}},e.prototype.updateModifiedRecords=function(e){var t=i.i(d.k)(this.parent,e.parentUniqueID);i.i(n.isNullOrUndefined)(t)||(this.parent[this.modifiedRecords].push(t),this.updateModifiedRecords(t))},e.prototype.removeChildItem=function(e){var t,r,a,s;s=this.parent.dataSource instanceof o.DataManager&&i.i(d.h)(this.parent)?this.parent.dataSource.dataSource.json:this.parent.dataSource;for(var l=0;l<e.childRecords.length;l++){t=e.childRecords[parseInt(l.toString(),10)],!i.i(n.isNullOrUndefined)(t.childRecords)&&t.childRecords.length&&(t.hasChildRecords=!0);var p=void 0;p=this.parent.dataSource instanceof o.DataManager&&i.i(d.h)(this.parent)?this.parent.dataSource.dataSource.json:this.parent.dataSource;for(var c=0;c<p.length;c++)p[parseInt(c.toString(),10)][this.parent.idMapping]===t.taskData[this.parent.idMapping]&&(r=c);for(var h=0;h<this.treeGridData.length;h++)if(this.treeGridData[parseInt(h.toString(),10)][this.parent.idMapping]===t.taskData[this.parent.idMapping]){a=h;break}-1===r||i.i(n.isNullOrUndefined)(r)||s.splice(r,1),-1===a||i.i(n.isNullOrUndefined)(a)||this.treeGridData.splice(a,1),t.hasChildRecords&&this.removeChildItem(t)}},e.prototype.getChildCount=function(e,t){var i;if(!e.hasChildRecords)return 0;for(var r=0;r<e.childRecords.length;r++)i=e.childRecords[parseInt(r.toString(),10)],t++,i.hasChildRecords&&(t=this.getChildCount(i,t));return t},e.prototype.ensuredropPosition=function(e,t){var r=this;e.filter(function(e){if(e.hasChildRecords&&!i.i(n.isNullOrUndefined)(e.childRecords)){if(-1!==e.childRecords.indexOf(t))return r.dropPosition="Invalid",r.addErrorElem(),void(r.canDrop=!1);r.ensuredropPosition(e.childRecords,t)}})},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(a._11,this.Rowdraging),this.parent.off(a._12,this.rowDropped),this.parent.off(a._9,this.rowsAdded),this.parent.off(a._10,this.rowsRemoved))},e.prototype.getModuleName=function(){return"rowDragAndDrop"},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(1),n=(i.n(r),i(4)),o=(i.n(n),i(0)),a=(i.n(o),i(3)),s=function(){function e(e){o.Grid.Inject(o.Sort),this.parent=e,this.taskIds=[],this.flatSortedData=[],this.storedIndex=-1,this.isSelfReference=!i.i(r.isNullOrUndefined)(this.parent.parentIdMapping),this.addEventListener()}return e.prototype.getModuleName=function(){return"sort"},e.prototype.addEventListener=function(){this.parent.on("updateModel",this.updateModel,this),this.parent.on("createSort",this.createdSortedRecords,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("updateModel",this.updateModel),this.parent.off("createSort",this.createdSortedRecords))},e.prototype.createdSortedRecords=function(e){var t=e.modifiedData,i=e.srtQry;this.iterateSort(t,i),this.storedIndex=-1,e.modifiedData=this.flatSortedData,this.flatSortedData=[]},e.prototype.iterateSort=function(e,t){for(var o=0;o<e.length;o++)if(this.parent.grid.filterSettings.columns.length>0||""!==this.parent.grid.searchSettings.key?i.i(r.isNullOrUndefined)(i.i(a.k)(this.parent,e[parseInt(o.toString(),10)].uniqueID,!0))||(this.storedIndex++,this.flatSortedData[this.storedIndex]=e[parseInt(o.toString(),10)]):(this.storedIndex++,this.flatSortedData[this.storedIndex]=e[parseInt(o.toString(),10)]),e[parseInt(o.toString(),10)].hasChildRecords){var s=new n.DataManager(e[parseInt(o.toString(),10)].childRecords).executeLocal(t);if(this.parent.allowRowDragAndDrop&&-1!==e[parseInt(o.toString(),10)].childRecords.indexOf(this.parent.rowDragAndDropModule.draggedRecord)&&"middleSegment"!==this.parent.rowDragAndDropModule.dropPosition){var d=s.indexOf(this.parent.rowDragAndDropModule.draggedRecord);s.splice(d,1);var l=s.indexOf(this.parent.rowDragAndDropModule.droppedRecord);"topSegment"===this.parent.rowDragAndDropModule.dropPosition?s.splice(l,0,this.parent.rowDragAndDropModule.draggedRecord):"bottomSegment"===this.parent.rowDragAndDropModule.dropPosition&&s.splice(l+1,0,this.parent.rowDragAndDropModule.draggedRecord)}this.iterateSort(s,t)}},e.prototype.sortColumn=function(e,t,i){this.parent.grid.sortColumn(e,t,i)},e.prototype.removeSortColumn=function(e){this.parent.grid.removeSortColumn(e)},e.prototype.updateModel=function(){this.parent.setProperties({sortSettings:i.i(o.getActualProperties)(this.parent.grid.sortSettings)},!0)},e.prototype.clearSorting=function(){this.parent.grid.clearSorting(),this.updateModel()},e.prototype.destroy=function(){this.removeEventListener()},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(4),n=(i.n(r),i(0)),o=(i.n(n),i(3)),a=i(1),s=(i.n(a),i(2)),d=function(){function e(e){n.Grid.Inject(n.Aggregate),this.parent=e,this.flatChildRecords=[],this.summaryQuery=[]}return e.prototype.getModuleName=function(){return"summary"},e.prototype.removeEventListener=function(){this.parent.isDestroyed},e.prototype.calculateSummaryValue=function(e,t,r){this.summaryQuery=e;for(var s,d=Object.keys(t).length,l=[],p=0,c=d;p<c;p++){i.i(n.getObject)("isSummaryRow",t[parseInt(p.toString(),10)])||l.push(t[parseInt(p.toString(),10)])}var h,u=i.i(o.e)(l),g=l.slice(),f=Object.keys(this.parent.aggregates).length,y=Object.keys(u).length,m=this.parent.getColumns();if(this.parent.aggregates.filter(function(e){return e.showChildSummary}).length){for(var v=0,c=y;v<c;v++)if(s=u[parseInt(v.toString(),10)],h=this.getChildRecordsLength(s,g)){for(var S=this,I=1,w=f;I<=w;I++)!function(e,t){var o=void 0;o={};for(var d=0;d<m.length;d++){o[""+(i.i(a.isNullOrUndefined)(i.i(n.getObject)("field",m[parseInt(d.toString(),10)]))?m[parseInt(d.toString(),10)]:i.i(n.getObject)("field",m[parseInt(d.toString(),10)]))]=null}if(o=S.createSummaryItem(o,S.parent.aggregates[e-1]),!S.parent.aggregates[e-1].showChildSummary)return"continue";var l;g.map(function(e,t){if(e.uniqueID===s.uniqueID)return void(l=t)});var p=l+h+e,c=i.i(a.extend)({},s);delete c.childRecords,delete c[S.parent.childMapping],i.i(a.setValue)("parentItem",c,o);var u=i.i(n.getObject)("level",c);if(i.i(a.setValue)("level",u+1,o),i.i(a.setValue)("isSummaryRow",!0,o),i.i(a.setValue)("parentUniqueID",c.uniqueID,o),r){var f=i.i(n.getObject)("childRecords",s);f.length&&f.push(o)}g.splice(p,0,o)}(I);this.flatChildRecords=[]}}else{for(var R={},x=0,C=m.length;x<C;x++){R[""+(i.i(a.isNullOrUndefined)(i.i(n.getObject)("field",m[parseInt(x.toString(),10)]))?m[parseInt(x.toString(),10)]:i.i(n.getObject)("field",m[parseInt(x.toString(),10)]))]=null}for(var I=1,b=f;I<=b;I++)this.createSummaryItem(R,this.parent.aggregates[I-1])}return g},e.prototype.getChildRecordsLength=function(e,t){for(var r,o=Object.keys(t).length,s=0,d=o;s<d;s++){r=t[parseInt(s.toString(),10)];if(e===(i.i(a.isNullOrUndefined)(r.parentItem)?null:t.filter(function(e){return e.uniqueID===r.parentItem.uniqueID})[0])){this.flatChildRecords.push(r);if(!i.i(n.getObject)("hasChildRecords",r))continue;this.getChildRecordsLength(r,t)}}return this.flatChildRecords.length},e.prototype.createSummaryItem=function(e,t){for(var n=Object.keys(t.columns).length,o=0,s=n;o<s;o++)for(var d=i.i(a.isNullOrUndefined)(t.columns[parseInt(o.toString(),10)].columnName)?t.columns[parseInt(o.toString(),10)].field:t.columns[parseInt(o.toString(),10)].columnName,l=Object.keys(e),p=0,c=l;p<c.length;p++){var h=c[p];if(h===d)if(this.flatChildRecords.length)e[""+h]=this.getSummaryValues(t.columns[parseInt(o.toString(),10)],this.flatChildRecords);else if(this.parent.isLocalData){var u=this.parent.dataSource instanceof r.DataManager?this.parent.dataSource.dataSource.json:this.parent.flatData;e[""+h]=this.getSummaryValues(t.columns[parseInt(o.toString(),10)],u)}}return e},e.prototype.getSummaryValues=function(e,t){var o=new r.Query,d={},l={},p=i.i(a.isNullOrUndefined)(e.field)?void 0:this.parent.getColumnByField(e.field).type;e.setPropertiesSilent({format:this.getFormatFromType(e.format,p)}),e.setFormatter(this.parent.grid.locale);var c=e.getFormatter()||function(){return function(e){return e}}();e.setTemplate(l);var h=e.getTemplate(2);o.queries=this.summaryQuery,o.requiresCount();var u,g=new r.DataManager(t).executeLocal(o),f=e.type;f=[e.type];for(var y=0;y<f.length;y++){u=f[parseInt(y.toString(),10)];var m=e.field+" - "+f[parseInt(y.toString(),10)].toLowerCase(),v="Custom"!==f[parseInt(y.toString(),10)]?i.i(n.getObject)("aggregates",g):i.i(n.calculateAggregate)(f[parseInt(y.toString(),10)],g,e,this.parent),S=e.columnName,I="Custom"!==f[parseInt(y.toString(),10)]?v[""+m]:v;d[""+S]=d[""+S]||{},d[""+S][""+m]=I,d[""+S][f[parseInt(y.toString(),10)]]=i.i(a.isNullOrUndefined)(v)?" ":c(I)}l.format=e.getFormatter();var w=i.i(a.createElement)("td",{className:"e-summary"});if(this.parent.isReact){h.fn(d[e.columnName],this.parent,h.property,"",null,null,w);var R=this;R.parent.renderReactTemplates(function(){R.parent.trigger(s.D,R.parent.args)})}else i.i(n.appendChildren)(w,h.fn(d[e.columnName],this.parent,h.property));var x=d[""+e.columnName][""+u];return-1===w.innerHTML.indexOf(x)?w.innerHTML+x:w.innerHTML},e.prototype.getFormatFromType=function(e,t){if(i.i(a.isNullOrUndefined)(t)||"string"!=typeof e)return e;var r;switch(t){case"number":r={format:e};break;case"datetime":r={type:"dateTime",skeleton:e};break;case"date":r={type:t,skeleton:e}}return r},e.prototype.destroy=function(){this.removeEventListener()},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(0),n=(i.n(r),i(2)),o=i(1),a=(i.n(o),function(){function e(e){r.Grid.Inject(r.Toolbar),this.parent=e,this.addEventListener()}return e.prototype.getModuleName=function(){return"toolbar"},e.prototype.addEventListener=function(){this.parent.on(n.E,this.refreshToolbar,this),this.parent.on(n.F,this.refreshToolbar,this),this.parent.on(n.G,this.toolbarClickHandler,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(n.E,this.refreshToolbar),this.parent.off(n.F,this.refreshToolbar),this.parent.off(n.G,this.toolbarClickHandler))},e.prototype.refreshToolbar=function(e){var t=this.parent.grid.toolbarModule.getToolbar();if(!i.i(o.isNullOrUndefined)(t)){var r=this.parent,n=void 0,a=void 0,s=r.element.id+"_gridcontrol_indent",d=r.element.id+"_gridcontrol_outdent",l=t.querySelector("#"+s),p=t.querySelector("#"+d),c=e.row,h=r.getSelectedRows()[0];if(i.i(o.isNullOrUndefined)(c[0])||(c=c[0]),c=i.i(o.isNullOrUndefined)(h)||h.rowIndex===c.rowIndex?c:h,null!==l&&null!==p){if(n=t.querySelector("#"+s).parentElement,a=t.querySelector("#"+d).parentElement,0===c.rowIndex||r.getSelectedRowIndexes().length>1)n.classList.add("e-hidden"),a.classList.add("e-hidden");else if("rowDeselected"!==e.name||!i.i(o.isNullOrUndefined)(h)&&r.grid.isCheckBoxSelection){var u=r.getCurrentViewRecords()[c.rowIndex];i.i(o.isNullOrUndefined)(u)||(u.level>r.getCurrentViewRecords()[c.rowIndex-1].level?n.classList.add("e-hidden"):n.classList.remove("e-hidden"),u.level===r.getCurrentViewRecords()[c.rowIndex-1].level&&n.classList.remove("e-hidden"),0===u.level&&a.classList.add("e-hidden"),0!==u.level&&a.classList.remove("e-hidden"))}"rowDeselected"===e.name&&i.i(o.isNullOrUndefined)(h)&&!r.grid.isCheckBoxSelection&&(this.parent.toolbar.includes("Indent")&&n.classList.add("e-hidden"),this.parent.toolbar.includes("Outdent")&&a.classList.add("e-hidden"))}}},e.prototype.toolbarClickHandler=function(e){var t=this.parent;"Cell"===this.parent.editSettings.mode&&"Batch"===this.parent.grid.editSettings.mode&&e.item.id===this.parent.grid.element.id+"_update"&&(e.cancel=!0,this.parent.grid.editModule.saveCell()),e.item.id===this.parent.grid.element.id+"_expandall"&&this.parent.expandAll(),e.item.id===this.parent.grid.element.id+"_collapseall"&&this.parent.collapseAll(),e.item.id===t.grid.element.id+"_indent"&&t.getSelectedRecords().length&&!i.i(o.isNullOrUndefined)(t.rowDragAndDropModule)&&this.parent.rowDragAndDropModule.indentOutdentAction(null,"indent"),e.item.id===t.grid.element.id+"_outdent"&&t.getSelectedRecords().length&&!i.i(o.isNullOrUndefined)(t.rowDragAndDropModule)&&this.parent.rowDragAndDropModule.indentOutdentAction(null,"outdent")},e.prototype.getToolbar=function(){return this.parent.grid.toolbarModule.getToolbar()},e.prototype.enableItems=function(e,t){this.parent.grid.toolbarModule.enableItems(e,t)},e.prototype.destroy=function(){this.removeEventListener()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return p}),i.d(t,"b",function(){return c});var r=i(0),n=(i.n(r),i(1)),o=(i.n(n),i(2)),a=i(4),s=(i.n(a),i(3)),d=i(54),l=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),p=function(){function e(e){this.prevstartIndex=-1,this.prevendIndex=-1,this.parent=e,r.Grid.Inject(c),this.addEventListener()}return e.prototype.returnVisualData=function(e){e.data=this.visualData},e.prototype.getModuleName=function(){return"virtualScroll"},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(o.b,this.collapseExpandVirtualchilds,this),this.parent.on(o.a,this.virtualPageAction,this),this.parent.on(o.c,this.destroy,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(o.b,this.collapseExpandVirtualchilds),this.parent.off(o.a,this.virtualPageAction),this.parent.off(o.c,this.destroy))},e.prototype.collapseExpandVirtualchilds=function(e){this.parent.grid.notify(o.d,{isExpandCollapse:!0}),this.expandCollapseRec=e.record,e.record.expanded="collapse"!==e.action;var t={result:this.parent.flatData,row:e.row,action:e.action,record:e.record,count:this.parent.flatData.length};(this.parent.enableVirtualization&&"Cell"===this.parent.selectionSettings.mode||"Row"===this.parent.selectionSettings.mode&&!this.parent.selectionSettings.persistSelection)&&this.parent.grid.clearSelection();var r=i.i(n.getValue)("isCollapseAll",this.parent)?"collapseAll":"refresh";i.i(n.getValue)("grid.renderModule",this.parent).dataManagerSuccess(t,{requestType:r})},e.prototype.virtualPageAction=function(e){var t=this,d=new a.DataManager(e.result),l=new a.Predicate("expanded","notequal",null).or("expanded","notequal",void 0),p=d.executeLocal((new a.Query).where(l)),c=p.filter(function(e){return i.i(s.f)(t.parent,e,p)});this.visualData=c,e.count=c.length,this.parent.grid.notify(o.e,{data:c});var h={startIndex:-1,endIndex:-1,count:e.count,requestType:e.actionArgs.requestType};this.parent.grid.notify(o.f,h);var u=h.startIndex,g=h.endIndex;if(e.count=c.length,-1===u&&-1===g){var f=new a.Query,y=this.parent.grid.pageSettings.pageSize,m=this.parent.grid.pageSettings.currentPage,v=y*(m-1);f=f.skip(v).take(y),d.dataSource.json=c,e.result=d.executeLocal(f)}else{var S=e.actionArgs.requestType;("filtering"===S||"collapseAll"===S||"searching"===S||"refresh"===S&&this.parent.enableCollapseAll&&g>c.length&&i.i(n.isNullOrUndefined)(this.expandCollapseRec))&&(u=0,g=this.parent.grid.pageSettings.pageSize-1,this.parent.grid.getContent().firstElementChild.scrollTop=0,this.parent.grid.notify(o.d,{setTop:!0})),("save"===S&&e.actionArgs.index>=h.count-this.parent.grid.pageSettings.pageSize||"refresh"===S&&this.parent.isGantt&&this.parent.isAddedFromGantt&&this.parent.grid.pageSettings.currentPage===this.parent.grid.contentModule.maxPage)&&(u=h.startIndex+(h.count-h.endIndex),g=h.count,this.parent.isAddedFromGantt=!1);var I=this.parent.grid.contentModule.virtualEle.wrapper,w=i.i(r.getTransformValues)(I).height;if(!i.i(n.isNullOrUndefined)(this.expandCollapseRec)&&("virtualscroll"===e.actionArgs.requestType||"refresh"===e.actionArgs.requestType&&u!==this.prevstartIndex)&&u<this.parent.getRows().length&&g<=u+this.parent.getRows().length&&0===w&&(u=0),!i.i(n.isNullOrUndefined)(this.expandCollapseRec)){var R=this.parent.getRows(),x=c.indexOf(this.expandCollapseRec);c.slice(x,x+R.length).length<R.length&&x>=0&&0!==u?(x=c.length-R.length,x=x>0?x:0,u=x,g=c.length):i.i(n.getValue)("isCollapseAll",this.parent)&&(u=0,g=this.parent.grid.pageSettings.pageSize-1,this.parent.grid.notify(o.d,{setTop:!0}))}!this.parent.enableCollapseAll&&!this.parent.expandStateMapping||i.i(n.isNullOrUndefined)(this.expandCollapseRec)||(e.count<this.parent.getRows()[0].getBoundingClientRect().height?u=0:this.parent.isExpandAll||(u=-1===this.prevstartIndex?0:this.prevstartIndex)),this.expandCollapseRec=null,u=u<0?0:u,0===g&&c.length>0?e.result=c:e.result=c.slice(u,g),this.prevstartIndex=u,this.prevendIndex=g}this.parent.notify("updateAction",e)},e.prototype.destroy=function(){this.removeEventListener()},e}(),c=function(e){function t(t,r){var o=e.call(this,t,r)||this;return i.i(n.getValue)("parent",o).off("initial-load",i.i(n.getValue)("instantiateRenderer",o),o),i.i(n.getValue)("parent",o).on("initial-load",o.instantiateRenderers,o),o}return l(t,e),t.prototype.getModuleName=function(){return"treeVirtualScroll"},t.prototype.instantiateRenderers=function(){var e=i.i(n.getValue)("parent",this);i.i(n.getValue)("parent",this).log(["limitation","virtual_height"],"virtualization");var t=i.i(n.getValue)("locator",this).getService("rendererFactory");e.enableColumnVirtualization&&i.i(n.getValue)("addRenderer",t).apply(t,[r.RenderType.Header,new r.VirtualHeaderRenderer(i.i(n.getValue)("parent",this),i.i(n.getValue)("locator",this))]),i.i(n.getValue)("addRenderer",t).apply(t,[r.RenderType.Content,new d.a(i.i(n.getValue)("parent",this),i.i(n.getValue)("locator",this))]),this.ensurePageSize()},t.prototype.ensurePageSize=function(){var e=i.i(n.getValue)("parent",this),t=e.getRowHeight();i.i(n.isNullOrUndefined)(e.height)||"string"!=typeof e.height||-1===e.height.indexOf("%")||(e.element.style.height=e.height);var r=e.height.toString().indexOf("%")<0?parseInt(e.height.toString(),10):e.element.getBoundingClientRect().height,o=~~(r/t),a=2*o,s=e.pageSettings.pageSize;e.setProperties({pageSettings:{pageSize:s<a?a:s}},!0)},t}(r.VirtualScroll)},function(e,t,i){"use strict";var r=i(49);i.d(t,"a",function(){return r.a});var n=i(2);i.d(t,"b",function(){return n.K}),i.d(t,"c",function(){return n.J}),i.d(t,"d",function(){return n.L}),i.d(t,"e",function(){return n.D}),i.d(t,"f",function(){return n.M}),i.d(t,"g",function(){return n.v}),i.d(t,"h",function(){return n.N}),i.d(t,"i",function(){return n.h}),i.d(t,"j",function(){return n.O}),i.d(t,"k",function(){return n.E}),i.d(t,"l",function(){return n.j}),i.d(t,"m",function(){return n.F}),i.d(t,"n",function(){return n.G}),i.d(t,"o",function(){return n.I}),i.d(t,"p",function(){return n.H}),i.d(t,"q",function(){return n.P}),i.d(t,"r",function(){return n.Q}),i.d(t,"s",function(){return n.R}),i.d(t,"t",function(){return n.S}),i.d(t,"u",function(){return n.T}),i.d(t,"v",function(){return n.U}),i.d(t,"w",function(){return n.b}),i.d(t,"x",function(){return n.a}),i.d(t,"y",function(){return n.V}),i.d(t,"z",function(){return n.W}),i.d(t,"A",function(){return n.X}),i.d(t,"B",function(){return n.C}),i.d(t,"C",function(){return n.Y}),i.d(t,"D",function(){return n.Z}),i.d(t,"E",function(){return n.k}),i.d(t,"F",function(){return n.l}),i.d(t,"G",function(){return n.m}),i.d(t,"H",function(){return n.n}),i.d(t,"I",function(){return n.o}),i.d(t,"J",function(){return n.x}),i.d(t,"K",function(){return n.r}),i.d(t,"L",function(){return n._0}),i.d(t,"M",function(){return n.p}),i.d(t,"N",function(){return n.y}),i.d(t,"O",function(){return n.A}),i.d(t,"P",function(){return n.z}),i.d(t,"Q",function(){return n.B}),i.d(t,"R",function(){return n.w}),i.d(t,"S",function(){return n.q}),i.d(t,"T",function(){return n._1}),i.d(t,"U",function(){return n.s}),i.d(t,"V",function(){return n._2}),i.d(t,"W",function(){return n.d}),i.d(t,"X",function(){return n.c}),i.d(t,"Y",function(){return n.e}),i.d(t,"Z",function(){return n.f}),i.d(t,"_0",function(){return n.t}),i.d(t,"_1",function(){return n.u}),i.d(t,"_2",function(){return n._3}),i.d(t,"_3",function(){return n._4}),i.d(t,"_4",function(){return n._5}),i.d(t,"_5",function(){return n._6}),i.d(t,"_6",function(){return n._7}),i.d(t,"_7",function(){return n._8}),i.d(t,"_8",function(){return n._9}),i.d(t,"_9",function(){return n._10}),i.d(t,"_10",function(){return n._11}),i.d(t,"_11",function(){return n._12}),i.d(t,"_12",function(){return n.i}),i.d(t,"_13",function(){return n._13}),i.d(t,"_14",function(){return n._14}),i.d(t,"_15",function(){return n._15}),i.d(t,"_16",function(){return n._16}),i.d(t,"_17",function(){return n._17}),i.d(t,"_18",function(){return n._18}),i.d(t,"_19",function(){return n._19}),i.d(t,"_20",function(){return n._20}),i.d(t,"_21",function(){return n._21}),i.d(t,"_22",function(){return n._22}),i.d(t,"_23",function(){return n._23}),i.d(t,"_24",function(){return n._24}),i.d(t,"_25",function(){return n._25}),i.d(t,"_26",function(){return n.g}),i.d(t,"_27",function(){return n._26});var o=i(12);i.d(t,"_28",function(){return o.a});var a=i(9);i.d(t,"_29",function(){return a.a});var s=i(10);i.d(t,"_30",function(){return s.a});var d=i(43);i.d(t,"_31",function(){return d.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return E});var r=i(1),n=(i.n(r),i(14)),o=i(0),a=(i.n(o),i(18)),s=i(16),d=i(52),l=i(8),p=i(7),c=i(11),h=i(42),u=i(2),g=i(20),f=i(21),y=i(4),m=(i.n(y),i(6)),v=(i.n(m),i(3)),S=i(24),I=i(12),w=i(13),R=i(19),x=i(23),C=i(15),b=i(22),D=i(5),M=i(17),O=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),P=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},E=function(e){function t(t,n){var a=e.call(this,t,n)||this;a.dataResults={},a.uniqueIDCollection={},a.uniqueIDFilterCollection={},a.changedRecords="changedRecords",a.deletedRecords="deletedRecords",a.addedRecords="addedRecords",a.indentOutdentAction="indentOutdentAction",a.modifiedRecords=[],a.stackedHeader=!1,a.objectEqualityChecker=function(e,t){if(e){for(var i=Object.keys(e),r=!0,n=["Children","childRecords","taskData","uniqueID","parentItem","parentUniqueID","index"],o=0;o<i.length;o++)if(e[i[parseInt(o.toString(),10)]]!==t[i[parseInt(o.toString(),10)]]&&-1===n.indexOf(i[parseInt(o.toString(),10)])){var a=e[i[parseInt(o.toString(),10)]]instanceof Date&&t[i[parseInt(o.toString(),10)]]instanceof Date;if(!a||e[i[parseInt(o.toString(),10)]].getTime()!==t[i[parseInt(o.toString(),10)]].getTime()){r=!1;break}}return r}return!1},E.Inject(c.a),i.i(r.setValue)("mergePersistData",a.mergePersistTreeGridData,a);return i.i(r.isNullOrUndefined)(a.injectedModules.Logger)||o.Grid.Inject(o.Logger),a.grid=new o.Grid,a}O(t,e),E=t,t.prototype.excelExport=function(e,t,i,r){return this.excelExportModule.Map(e,t,i,r,!1)},t.prototype.csvExport=function(e,t,i,r){return this.excelExportModule.Map(e,t,i,r,!0)},t.prototype.pdfExport=function(e,t,i,r){return this.pdfExportModule.Map(e,t,i,r)},t.prototype.serverExcelExport=function(e){this.isExcel=!0,this.exportTreeGrid(e)},t.prototype.serverPdfExport=function(e){this.isExcel=!1,this.exportTreeGrid(e)},t.prototype.serverCsvExport=function(e){this.isExcel=!0,this.exportTreeGrid(e)},t.prototype.exportTreeGrid=function(e){var t=this,i=t.grid.getDataModule().generateQuery(!0),r=(new y.UrlAdaptor).processQuery(new y.DataManager({url:""}),i),n=JSON.parse(r.data),o=JSON.parse(this.addOnPersist(["allowPaging","pageSettings","sortSettings","allowPdfExport","allowExcelExport","aggregates","filterSettings","columns","locale","searchSettings","idMapping","parentIdMapping","childMapping","treeColumnIndex"])),a=["field","headerText","type","format","visible","template","index","width","textAlign","headerTextAlign","columns"];o.filterSettings.columns=n.where,o.searchSettings.fields=n.search&&n.search[0].fields||[],o.sortSettings.columns=n.sorted,o.columns=this.setHeaderText(o.columns,a);var s=this.createElement("form",{id:"ExportForm",styles:"display:none;"}),d=this.createElement("input",{id:"treeGridInput",attrs:{name:"treeGridModel"}});d.value=JSON.stringify(o),s.method="POST",s.action=e,s.appendChild(d),document.body.appendChild(s),s.submit(),s.remove()},t.prototype.setHeaderText=function(e,t){for(var n=0;n<e.length;n++){var a=this.getColumnByUid(e[parseInt(n.toString(),10)].uid);this.stackedHeader&&i.i(r.isNullOrUndefined)(a)&&(a=i.i(r.isNullOrUndefined)(e[parseInt(n.toString(),10)].field)?e[parseInt(n.toString(),10)]:this.getColumnByField(e[parseInt(n.toString(),10)].field)),e[parseInt(n.toString(),10)].headerText=a.headerText,i.i(r.isNullOrUndefined)(a.template)||(e[parseInt(n.toString(),10)].template="true"),e[parseInt(n.toString(),10)].format&&(e[parseInt(n.toString(),10)].format=i.i(o.getNumberFormat)(this.getFormat(a.format),a.type,!1,this.currencyCode),this.isExcel||"datetime"!==a.type&&"date"!==a.type||(e[parseInt(n.toString(),10)].format=e[parseInt(n.toString(),10)].format.toString().replace("AM/PM","tt")),e[parseInt(n.toString(),10)].type=a.type),e[parseInt(n.toString(),10)].columns&&this.setHeaderText(e[parseInt(n.toString(),10)].columns,t);for(var s=Object.keys(e[parseInt(n.toString(),10)]),d=0;d<s.length;d++)t.indexOf(s[parseInt(d.toString(),10)])<0&&delete e[parseInt(n.toString(),10)][s[parseInt(d.toString(),10)]]}return e},t.prototype.getFormat=function(e){return"object"==typeof e?i.i(r.isNullOrUndefined)(e.format)?e.skeleton:e.format:e},t.prototype.getModuleName=function(){return"treegrid"},t.prototype.preRender=function(){this.TreeGridLocale(),this.initProperties(),this.defaultLocale={Above:"Above",Below:"Below",Child:"Child",AddRow:"Add Row",ExpandAll:"Expand All",CollapseAll:"Collapse All",RowIndent:"Indent",RowOutdent:"Outdent"},this.l10n=new r.L10n("treegrid",this.defaultLocale,this.locale),this.isSelfReference&&i.i(r.isNullOrUndefined)(this.childMapping)&&(this.childMapping="Children")},t.prototype.sortByColumn=function(e,t,i){this.sortModule&&this.sortModule.sortColumn(e,t,i)},t.prototype.clearSorting=function(){this.sortModule&&this.sortModule.clearSorting()},t.prototype.removeSortColumn=function(e){this.sortModule&&this.sortModule.removeSortColumn(e)},t.prototype.search=function(e){this.grid.search(e)},t.prototype.autoFitColumns=function(e){this.resizeModule.autoFitColumns(e),this.updateColumnModel()},t.prototype.reorderColumns=function(e,t){this.grid.reorderColumns(e,t)},t.prototype.TreeGridLocale=function(){var e=r.L10n.locale,t={};i.i(r.setValue)(this.locale,{},t);var n;n={},n=i.i(o.getObject)(this.locale,e);var a;a={},a=i.i(o.getObject)(this.getModuleName(),n),i.i(r.setValue)("grid",a,i.i(o.getObject)(this.locale,t)),r.L10n.load(t)},t.prototype.print=function(){this.printModule.print()},t.prototype.treeGridkeyActionHandler=function(e){if(this.allowKeyboard){var t=void 0,n=void 0,o=void 0,a=void 0,s=void 0;switch(e.action){case"ctrlDownArrow":this.expandAll();break;case"ctrlUpArrow":this.collapseAll();break;case"ctrlShiftUpArrow":t=e.target,o=t.closest(".e-rowcell"),i.i(r.isNullOrUndefined)(o)||(a=o.closest("tr"),i.i(r.isNullOrUndefined)(a)||i.i(r.isNullOrUndefined)(a.getElementsByClassName("e-treegridexpand")[0])||this.expandCollapseRequest(a.querySelector(".e-treegridexpand")));break;case"ctrlShiftDownArrow":t=e.target,o=t.closest(".e-rowcell"),i.i(r.isNullOrUndefined)(o)||(a=o.closest("tr"),i.i(r.isNullOrUndefined)(a)||i.i(r.isNullOrUndefined)(a.getElementsByClassName("e-treegridcollapse")[0])||this.expandCollapseRequest(a.querySelector(".e-treegridcollapse")));break;case"downArrow":if(!this.enableVirtualization){t=e.target,n=t.parentElement;var d=n.cellIndex;if("dropdownedit"===this.grid.getColumnByIndex(d).editType&&i.i(r.isNullOrUndefined)(this.grid.getColumnByIndex(d).edit.obj)&&(n=t),null!==(s=this.findnextRowElement(n))){var l=s.rowIndex;this.selectRow(l);var p=e.target.cellIndex,c=s.children[parseInt(p.toString(),10)];i.i(r.addClass)([c],"e-focused"),i.i(r.addClass)([c],"e-focus")}else this.clearSelection()}break;case"upArrow":if(!this.enableVirtualization){t=e.target,n=t.parentElement;var d=n.cellIndex;if("dropdownedit"===this.grid.getColumnByIndex(d).editType&&i.i(r.isNullOrUndefined)(this.grid.getColumnByIndex(d).edit.obj)&&(n=t),null!==(s=this.findPreviousRowElement(n))){var h=s.rowIndex;this.selectRow(h);var u=e.target.cellIndex,g=s.children[parseInt(u.toString(),10)];i.i(r.addClass)([g],"e-focused"),i.i(r.addClass)([g],"e-focus")}else this.clearSelection()}}}},t.prototype.findnextRowElement=function(e){var t=e.nextElementSibling;return null===t||-1===t.className.indexOf("e-summaryrow")&&"none"!==t.style.display||(t=this.findnextRowElement(t)),t},t.prototype.findPreviousRowElement=function(e){var t=e.previousElementSibling;return null===t||-1===t.className.indexOf("e-summaryrow")&&"none"!==t.style.display||(t=this.findPreviousRowElement(t)),t},t.prototype.initProperties=function(){this.defaultLocale={},this.flatData=[],this.infiniteScrollData=[],this.remoteCollapsedData=[],this.remoteExpandedData=[],this.parentData=[],this.columnModel=[],this.isExpandAll=!1,this.isCollapseAll=!1,this.keyConfigs={ctrlDownArrow:"ctrl+downarrow",ctrlUpArrow:"ctrl+uparrow",ctrlShiftUpArrow:"ctrl+shift+uparrow",ctrlShiftDownArrow:"ctrl+shift+downarrow",downArrow:"downArrow",upArrow:"upArrow"},this.isLocalData=!(this.dataSource instanceof y.DataManager)||this.dataSource.dataSource.offline||!i.i(r.isNullOrUndefined)(this.dataSource.ready)||this.dataSource.adaptor instanceof y.RemoteSaveAdaptor,this.isSelfReference=!i.i(r.isNullOrUndefined)(this.parentIdMapping)},t.prototype.wireEvents=function(){r.EventHandler.add(this.grid.element,"click",this.mouseClickHandler,this),r.EventHandler.add(this.element,"touchend",this.mouseClickHandler,this),r.EventHandler.add(this.element,"mousemove",this.mouseMoveHandler,this),this.keyboardModule=new r.KeyboardEvents(this.element,{keyAction:this.treeGridkeyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.allowKeyboard&&(this.element.tabIndex=-1===this.element.tabIndex?0:this.element.tabIndex)},t.prototype.requiredModules=function(){var e=[];if(this.grid.splitFrozenCount(this.getColumns()),this.isDestroyed)return e;e.push({member:"filter",args:[this,this.filterSettings]}),i.i(r.isNullOrUndefined)(this.toolbar)||e.push({member:"toolbar",args:[this]}),this.contextMenuItems&&e.push({member:"contextMenu",args:[this]}),this.allowPaging&&e.push({member:"pager",args:[this,this.pageSettings]}),this.allowReordering&&e.push({member:"reorder",args:[this]}),this.allowSorting&&e.push({member:"sort",args:[this]}),this.aggregates.length>0&&e.push({member:"summary",args:[this]}),e.push({member:"resize",args:[this]}),this.allowExcelExport&&e.push({member:"ExcelExport",args:[this]});var t=this.injectedModules.filter(function(e){return"freeze"===e.prototype.getModuleName()});return(this.frozenColumns||this.frozenRows||this.getFrozenColumns()||this.grid.getFrozenLeftColumnsCount()||this.grid.getFrozenRightColumnsCount()||t.length)&&e.push({member:"freeze",args:[this]}),this.detailTemplate&&e.push({member:"detailRow",args:[this]}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this]}),this.showColumnMenu&&e.push({member:"columnMenu",args:[this]}),this.showColumnChooser&&e.push({member:"ColumnChooser",args:[this]}),this.extendRequiredModules(e),e},t.prototype.extendRequiredModules=function(e){var t=this.injectedModules.filter(function(e){return"rowDragAndDrop"===e.prototype.getModuleName()});(this.allowRowDragAndDrop||t.length)&&(i.i(r.isNullOrUndefined)(this.toolbar)||!this.toolbar.includes("Indent")&&!this.toolbar.includes("Outdent")||(this.isIndentEnabled=!0),e.push({member:"rowDragAndDrop",args:[this]})),(this.editSettings.allowAdding||this.editSettings.allowDeleting||this.editSettings.allowEditing)&&e.push({member:"edit",args:[this]}),this.isCommandColumn(this.columns)&&e.push({member:"commandColumn",args:[this]}),this.allowSelection&&e.push({member:"selection",args:[this]}),this.enableVirtualization&&e.push({member:"virtualScroll",args:[this]}),this.enableInfiniteScrolling&&e.push({member:"infiniteScroll",args:[this]}),e.push({member:"logger",args:[this.grid]})},t.prototype.isCommandColumn=function(e){var t=this;return e.some(function(e){return e.columns?t.isCommandColumn(e.columns):!(!e.commands&&!e.commandsTemplate)})},t.prototype.unwireEvents=function(){this.grid&&this.grid.element&&r.EventHandler.remove(this.grid.element,"click",this.mouseClickHandler)},t.prototype.log=function(e,t){this.loggerModule&&this.loggerModule.treeLog(e,t,this)},t.prototype.render=function(){var e=this;this.isReact&&(this.grid.isReact=!0,this.grid.portals=[]),this.isVue&&(this.grid.isVue=!0,this.grid.vueInstance=this.vueInstance),i.i(m.createSpinner)({target:this.element},this.createElement),this.log(["mapping_fields_missing"]),this.renderModule=new S.a(this),this.dataModule=new I.a(this),this.printModule=new h.a(this),this.trigger(u.K),this.autoGenerateColumns(),this.initialRender=!0,i.i(r.isNullOrUndefined)(this.dataSource)||this.convertTreeData(this.dataSource),this.loadGrid(),this.element.classList.contains("e-treegrid")&&this.rowDropSettings.targetID&&(this.grid.rowDropSettings.targetID+="_gridcontrol"),this.addListener();var t=i.i(r.createElement)("div",{id:this.element.id+"_gridcontrol"});i.i(r.addClass)([this.element],"e-treegrid"),i.i(r.isNullOrUndefined)(this.height)||"string"!=typeof this.height||-1===this.height.indexOf("%")||(this.element.style.height=this.height),i.i(r.isNullOrUndefined)(this.width)||"string"!=typeof this.width||-1===this.width.indexOf("%")||(this.element.style.width=this.width),this.element.appendChild(t);var n=this.grid.requiredModules;this.grid.requiredModules=function(){var e=[];e=n.apply(this);for(var t=0;t<e.length;t++)"virtualscroll"===e[parseInt(t.toString(),10)].member&&(e[parseInt(t.toString(),10)].member="treeVirtualScroll");return e};this.grid.root=this.root?this.root:this,this.grid.appendTo(t),this.element.getElementsByClassName("e-gridcontent")[0].childNodes[0].setAttribute("tabindex","0"),this.element.getElementsByClassName("e-content")[0].querySelector(".e-table").setAttribute("role","treegrid"),this.isIndentEnabled&&this.refreshToolbarItems(),this.wireEvents(),this.renderComplete();var o=this.grid.destroyTemplate;this.grid.destroyTemplate=function(t,n){o.apply(e.grid);e.isReact&&i.i(r.isNullOrUndefined)(e.portals)||e.clearTemplate(t,n)}},t.prototype.refreshToolbarItems=function(){var e=this.toolbarModule.getToolbar(),t=this.element.id+"_gridcontrol_indent",i=this.element.id+"_gridcontrol_outdent",r=e.querySelector("#"+t).parentElement,n=e.querySelector("#"+i).parentElement;r.classList.add("e-hidden"),n.classList.add("e-hidden")},t.prototype.afterGridRender=function(){i.i(r.isNullOrUndefined)(this.grid.clipboardModule)||this.grid.clipboardModule.destroy(),this.clipboardModule=this.grid.clipboardModule=new p.a(this,this.grid.serviceLocator)},t.prototype.convertTreeData=function(e){var t=this;if(i.i(v.b)(this)&&(e=i.i(r.getValue)("result",e)),e instanceof Array&&e.length>0&&Object.prototype.hasOwnProperty.call(e[0],"level"))this.flatData=e,this.flatData.filter(function(e){i.i(r.setValue)("uniqueIDCollection."+e.uniqueID,e,t),0===e.level&&t.parentData.push(e)});else if(i.i(v.b)(this)){var n=i.i(r.getValue)("result",this.dataSource);this.dataModule.convertToFlatData(n)}else this.dataModule.convertToFlatData(e)},t.prototype.bindGridProperties=function(){this.bindedDataSource(),this.grid.enableRtl=this.enableRtl,this.grid.allowKeyboard=this.allowKeyboard,this.grid.columns=this.getGridColumns(this.columns),this.grid.allowExcelExport=this.allowExcelExport,this.grid.allowPdfExport=this.allowPdfExport,this.grid.query=this.query,this.grid.columnQueryMode=this.columnQueryMode,this.grid.allowPaging=this.allowPaging,this.grid.pageSettings=i.i(o.getActualProperties)(this.pageSettings),this.grid.pagerTemplate=this.pagerTemplate,this.grid.showColumnMenu=this.showColumnMenu,this.grid.allowSorting=this.allowSorting,this.grid.allowFiltering=this.allowFiltering,this.grid.enableVirtualization=this.enableVirtualization,this.grid.enableColumnVirtualization=this.enableColumnVirtualization,this.grid.enableInfiniteScrolling=this.enableInfiniteScrolling,this.grid.infiniteScrollSettings=this.infiniteScrollSettings,this.grid.enableVirtualMaskRow=this.enableVirtualMaskRow,this.grid.loadingIndicator=this.loadingIndicator,this.grid.width=this.width,this.grid.height=this.height,this.grid.enableAltRow=this.enableAltRow,this.grid.allowReordering=this.allowReordering,this.grid.allowTextWrap=this.allowTextWrap,this.grid.allowResizing=this.allowResizing,this.grid.enableHover=this.enableHover,this.grid.enableAutoFill=this.enableAutoFill,this.grid.enableAdaptiveUI=this.enableAdaptiveUI,this.grid.enableImmutableMode=this.enableImmutableMode,this.grid.allowRowDragAndDrop=this.allowRowDragAndDrop,this.grid.rowDropSettings=i.i(o.getActualProperties)(this.rowDropSettings),this.grid.rowHeight=this.rowHeight,this.grid.gridLines=this.gridLines,this.grid.allowSelection=this.allowSelection,this.grid.toolbar=i.i(o.getActualProperties)(this.getGridToolbar()),this.grid.toolbarTemplate=this.toolbarTemplate,this.grid.showColumnChooser=this.showColumnChooser,this.grid.filterSettings=i.i(o.getActualProperties)(this.filterSettings),this.grid.selectionSettings=i.i(o.getActualProperties)(this.selectionSettings),this.grid.sortSettings=i.i(o.getActualProperties)(this.sortSettings),this.grid.searchSettings=i.i(o.getActualProperties)(this.searchSettings),this.grid.aggregates=i.i(o.getActualProperties)(this.aggregates),this.grid.textWrapSettings=i.i(o.getActualProperties)(this.textWrapSettings),this.grid.printMode=i.i(o.getActualProperties)(this.printMode),this.grid.locale=i.i(o.getActualProperties)(this.locale),this.grid.selectedRowIndex=this.selectedRowIndex,this.grid.contextMenuItems=i.i(o.getActualProperties)(this.getContextMenu()),this.grid.columnMenuItems=i.i(o.getActualProperties)(this.columnMenuItems),this.grid.editSettings=this.getGridEditSettings(),this.grid.rowTemplate=i.i(o.getActualProperties)(this.rowTemplate),this.grid.detailTemplate=i.i(o.getActualProperties)(this.detailTemplate),this.grid.frozenRows=this.frozenRows,this.grid.frozenColumns=this.frozenColumns,this.grid.clipMode=i.i(o.getActualProperties)(this.clipMode);this.grid.templateDotnetInstance=this.templateDotnetInstance;this.grid.isJsComponent=!0;this.grid.enableHtmlSanitizer=this.enableHtmlSanitizer},t.prototype.triggerEvents=function(e){this.trigger(i.i(o.getObject)("name",e),e)},t.prototype.IsExpandCollapseClicked=function(e){if(!i.i(r.isNullOrUndefined)(e.target)&&(e.target.classList.contains("e-treegridexpand")||e.target.classList.contains("e-treegridcollapse")||e.target.classList.contains("e-summarycell"))&&!this.selectionSettings.checkboxOnly&&(!i.i(r.isNullOrUndefined)(e.data)&&e.data.hasChildRecords||-1!==e.rowIndex&&i.i(r.isNullOrUndefined)(e.data)))return void(e.cancel=!0)},t.prototype.bindGridEvents=function(){var e=this;this.grid.rowSelecting=function(t){e.IsExpandCollapseClicked(t),e.trigger(u.O,t)},this.grid.rowDeselecting=function(t){e.IsExpandCollapseClicked(t),e.trigger(u._13,t)},this.grid.rowSelected=function(t){if(e.enableVirtualization&&t.isHeaderCheckboxClicked&&e.grid.currentViewData.length!==e.grid.selectionModule.selectedRowIndexes.length)for(var i=0;i<e.getRows().length;i++)e.getRows()[parseInt(i.toString(),10)].getElementsByClassName("e-frame e-icons e-uncheck").length&&e.grid.selectionModule.updateRowSelection(e.getRows()[parseInt(i.toString(),10)],e.getCurrentViewRecords()[parseInt(i.toString(),10)].index);e.selectedRowIndex=e.grid.selectedRowIndex,e.notify(u.E,t),e.trigger(u.E,t)},this.grid.rowDeselected=function(t){e.selectedRowIndex=e.grid.selectedRowIndex,i.i(r.isNullOrUndefined)(t.data)||e.notify(u.F,t),e.trigger(u.F,t)},this.grid.resizeStop=function(t){e.updateColumnModel(),e.trigger(u.P,t)},this.grid.excelQueryCellInfo=function(t){e.notify("excelCellInfo",t),t=e.dataResults},this.grid.pdfQueryCellInfo=function(t){e.notify("pdfCellInfo",t),t=e.dataResults},this.grid.checkBoxChange=function(t){e.trigger(u.j,t)},this.grid.pdfExportComplete=this.triggerEvents.bind(this),this.grid.excelExportComplete=this.triggerEvents.bind(this),this.grid.excelHeaderQueryCellInfo=this.triggerEvents.bind(this),this.grid.pdfHeaderQueryCellInfo=this.triggerEvents.bind(this),this.grid.dataSourceChanged=this.triggerEvents.bind(this),this.grid.recordDoubleClick=this.triggerEvents.bind(this),this.grid.cellDeselected=this.triggerEvents.bind(this),this.grid.cellDeselecting=this.triggerEvents.bind(this),this.grid.columnMenuOpen=this.triggerEvents.bind(this),this.grid.columnMenuClick=this.triggerEvents.bind(this),this.grid.cellSelected=this.triggerEvents.bind(this),this.grid.headerCellInfo=this.triggerEvents.bind(this),this.grid.resizeStart=this.triggerEvents.bind(this),this.grid.resizing=this.triggerEvents.bind(this),this.grid.columnDrag=this.triggerEvents.bind(this),this.grid.columnDragStart=this.triggerEvents.bind(this),this.grid.columnDrop=this.triggerEvents.bind(this),this.grid.beforePrint=this.triggerEvents.bind(this),this.grid.beforeCopy=this.triggerEvents.bind(this),this.grid.beforePaste=function(t){for(var i=e.getRows();i[t.rowIndex].classList.contains("e-summaryrow");)t.rowIndex++;e.trigger(u.Y,t)},this.grid.load=function(){if(e.grid.on("initial-end",e.afterGridRender,e),!i.i(r.isNullOrUndefined)(e.loggerModule)){e.loggerModule=e.grid.loggerModule=new l.a(e.grid)}},this.grid.printComplete=this.triggerEvents.bind(this),this.grid.actionFailure=this.triggerEvents.bind(this),this.extendedGridDataBoundEvent(),this.extendedGridEvents(),this.extendedGridActionEvents(),this.extendedGridEditEvents(),this.bindGridDragEvents(),this.bindCallBackEvents()},t.prototype.lastRowBorder=function(e,t){for(var n=0;n<e.cells.length;n++)t?i.i(r.addClass)([e.cells[parseInt(n.toString(),10)]],"e-lastrowcell"):i.i(r.removeClass)([e.cells[parseInt(n.toString(),10)]],"e-lastrowcell")},t.prototype.isPixelHeight=function(){return"auto"!==this.height&&-1===this.height.toString().indexOf("%")},t.prototype.extendedGridDataBoundEvent=function(){var e=this;this.grid.dataBound=function(t){if(e.updateRowTemplate(),e.updateColumnModel(),e.updateAltRow(e.getRows()),e.notify("dataBoundArg",t),i.i(v.a)(e)&&!i.i(v.h)(e)&&!e.hasChildMapping){var n=void 0;n=e.dataResults.result?0:1,i.i(r.setValue)("grid.contentModule.isLoaded",!(n>0),e)}if(e.isPixelHeight()&&e.initialRender)for(var o=e.getContentTable().rows,a=[].slice.call(o),s=a.length-1;s>0;s--)if(!i.i(v.l)(a[parseInt(s.toString(),10)])){a[parseInt(s.toString(),10)].nextElementSibling&&e.lastRowBorder(a[parseInt(s.toString(),10)],!0);break}if(e.enableVirtualization&&e.selectionSettings.persistSelection&&("expand"===e.dataResults.action||"collapse"===e.dataResults.action)){if(e.grid.selectionModule.refreshPersistSelection(),"Single"===e.grid.selectionSettings.type){var d=e.getCurrentViewRecords().indexOf(e.grid.selectionModule.data);e.grid.selectionModule.updateRowSelection(e.getRows()[parseInt(d.toString(),10)],d)}}e.trigger(u.L,t),e.initialRender=!1};var t=this;this.grid.beforeDataBound=function(e){var n=i.i(o.getObject)("action",e);if((i.i(v.a)(t)&&!i.i(v.h)(t)||i.i(v.b)(this))&&"edit"!==n)t.notify("updateRemoteLevel",e),e=t.dataResults;else if(0===t.flatData.length&&i.i(v.h)(t)&&t.dataSource instanceof y.DataManager){var a=t.dataSource;t.dataModule.convertToFlatData(a.dataSource.json),e.result=t.grid.dataSource.dataSource.json=t.flatData}if(i.i(v.a)(t)||i.i(v.b)(this)||i.i(r.isNullOrUndefined)(t.dataSource)||(this.isPrinting&&i.i(r.setValue)("isPrinting",!0,e),t.notify("dataProcessor",e)),i.i(r.extend)(e,t.dataResults),t.enableImmutableMode&&(e.result=e.result.slice()),t.initialRender&&(this.contentModule.objectEqualityChecker=t.objectEqualityChecker),!this.isPrinting){var s=new y.Deferred;return t.trigger(u.M,e,function(e){s.resolve(e)}),s}},this.grid.log=function(t,i){e.loggerModule&&e.loggerModule.log(t,i)}},t.prototype.bindCallBackEvents=function(){var e=this;this.grid.toolbarClick=function(t){if(!(t.item.id===e.grid.element.id+"_excelexport"&&!1===e.allowExcelExport||t.item.id===e.grid.element.id+"_pdfexport"&&!1===e.allowPdfExport||t.item.id===e.grid.element.id+"_csvexport"&&!1===e.allowExcelExport)){var i=new y.Deferred;return e.trigger(u.G,t,function(r){r.cancel||e.notify(u.G,t),i.resolve(r)}),i}},this.grid.cellSelecting=function(t){var n=e.grid.selectionModule.actualTarget;i.i(r.isNullOrUndefined)(n)||!n.classList.contains("e-treegridexpand")&&!n.classList.contains("e-treegridcollapse")||(t.cancel=!0);var a=new y.Deferred;return e.trigger(i.i(o.getObject)("name",t),t,function(e){a.resolve(e)}),a},this.grid.beginEdit=function(t){if(!i.i(r.isNullOrUndefined)(t.row)&&t.row.classList.contains("e-summaryrow"))return void(t.cancel=!0);var n=new y.Deferred;return e.trigger(u.l,t,function(e){n.resolve(e)}),n}},t.prototype.extendedGridEditEvents=function(){var e=this;this.grid.dataStateChange=function(t){e.isExpandRefresh?(e.isExpandRefresh=!1,e.grid.dataSource={result:e.flatData,count:i.i(r.getValue)("count",e.grid.dataSource)}):("infiniteScroll"!==t.action.requestType&&(e.infiniteScrollData=[]),e.trigger(u.N,t))},this.grid.cellSave=function(t){if(e.grid.isContextMenuOpen()){var n=e.grid.contextMenuModule.contextMenu.element.getElementsByClassName("e-selected")[0];(i.i(r.isNullOrUndefined)(n)||n.id!==e.element.id+"_gridcontrol_cmenu_Save")&&(t.cancel=!0)}var o=new y.Deferred;return e.trigger(u.o,t,function(t){t.cancel||e.notify(u.o,t),o.resolve(t)}),o},this.grid.cellSaved=function(t){e.trigger(u.x,t),e.notify(u.x,t)},this.grid.cellEdit=function(t){var i=new y.Deferred;return t.promise=i,e.notify(u.r,t),i},this.grid.batchAdd=function(t){e.trigger(u.y,t),e.notify(u.y,t)},this.grid.beforeBatchSave=function(t){e.trigger(u.B,t),e.notify(u.B,t)},this.grid.beforeBatchAdd=function(t){e.trigger(u.z,t),e.notify(u.z,t)},this.grid.batchDelete=function(t){e.trigger(u._0,t),e.notify(u._0,t)},this.grid.beforeBatchDelete=function(t){e.trigger(u.A,t),e.notify(u.A,t)},this.grid.batchCancel=function(t){"Cell"!==e.editSettings.mode&&e.trigger(u.p,t),e.notify(u.p,t)}},t.prototype.updateRowTemplate=function(){var e=this;this.rowTemplate&&(this.isReact&&0===this.getContentTable().rows.length?setTimeout(function(){if(e.treeColumnRowTemplate(),e.enableCollapseAll)for(var t=e.getCurrentViewRecords(),i=e.getContentTable().rows,r=0;r<i.length;r++){var n={data:t[parseInt(r.toString(),10)],row:i[parseInt(r.toString(),10)]};e.renderModule.RowModifier(n)}},0):this.treeColumnRowTemplate())},t.prototype.bindedDataSource=function(){if(this.dataSource&&i.i(v.b)(this)){var e=this.flatData,t=i.i(r.getValue)("count",this.dataSource);this.grid.dataSource={result:e,count:t}}else this.grid.dataSource=this.dataSource instanceof y.DataManager?new y.DataManager(this.dataSource.dataSource,this.dataSource.defaultQuery,this.dataSource.adaptor):this.flatData;if(this.dataSource instanceof y.DataManager&&(this.dataSource.dataSource.offline||this.dataSource.ready)){this.grid.dataSource.dataSource.json=i.i(v.i)(this.dataSource.dataSource.json),this.grid.dataSource.ready=this.dataSource.ready;var n=this;i.i(r.isNullOrUndefined)(this.grid.dataSource.ready)||this.grid.dataSource.ready.then(function(e){var t=n.grid.dataSource;t.dataSource.offline=!0,t.isDataAvailable=!0,t.dataSource.json=e.result,t.adaptor=new y.JsonAdaptor})}},t.prototype.extendedGridActionEvents=function(){var e=this;this.grid.actionBegin=function(t){if("sorting"===t.requestType&&t.target&&t.target.parentElement&&t.target.parentElement.classList.contains("e-hierarchycheckbox")&&(t.cancel=!0),"reorder"===i.i(o.getObject)("requestType",t)&&e.notify("getColumnIndex",{}),i.i(v.a)(e)&&e.enableVirtualization&&("virtualscroll"===t.requestType?(e.query.expand("VirtualScrollingAction"),e.showSpinner()):"searching"===t.requestType&&""===t.searchString?e.query.expand("ClearSearchingAction"):"clearFilter"===t.action&&e.query.expand("ClearFilteringAction")),e.notify("actionBegin",{editAction:t}),i.i(v.a)(e)||i.i(r.isNullOrUndefined)(e.filterModule)||i.i(v.b)(e)||0!==e.grid.filterSettings.columns.length||0!==e.grid.searchSettings.key.length||(e.notify("clearFilters",{flatData:e.grid.dataSource}),e.grid.setProperties({dataSource:e.dataResults.result},!0),i.i(r.isNullOrUndefined)(e.grid.changedProperties.dataSource)&&(e.grid.renderModule.data.dataManager=e.grid.dataSource instanceof y.DataManager?e.grid.dataSource:i.i(r.isNullOrUndefined)(e.grid.dataSource)?new y.DataManager:new y.DataManager(e.grid.dataSource),e.grid.renderModule.data.isQueryInvokedFromData=!0,e.grid.query=e.grid.query instanceof y.Query?e.grid.query:new y.Query)),"indenting"!==e.action&&"outdenting"!==e.action){var n=new y.Deferred;return e.trigger(u.v,t,function(t){t.cancel||e.notify(u.l,t),n.resolve(t)}),n}},this.grid.actionComplete=function(t){if(e.notify("actioncomplete",t),e.updateColumnModel(),e.updateTreeGridModel(),"reorder"===t.requestType&&e.notify("setColumnIndex",{}),e.notify("actionComplete",{editAction:t}),"add"===t.requestType&&"Top"!==e.editSettings.newRowPosition&&"Bottom"!==e.editSettings.newRowPosition&&e.notify(u.m,t),"batchsave"===t.requestType&&e.notify(u.w,t),e.notify("updateGridActions",t),"save"===t.requestType&&e.aggregates.map(function(e){return!0===e.showChildSummary}).length&&e.grid.refresh(),"filter"===t.action&&(""===e.filterModule.currentFilterObject||!e.enableVirtualization||e.initialRender||i.i(v.a)(e)&&e.enableVirtualization||e.expandAll()),"searching"===t.requestType&&(""===e.searchSettings.key||!e.enableVirtualization||e.initialRender||i.i(v.a)(e)&&e.enableVirtualization||e.expandAll()),"clearFilter"===t.action&&e.enableCollapseAll&&e.collapseAll(),"indenting"===e.action||"outdenting"===e.action){e.action="indenting"===e.action?"indented":"outdented";var r=[e.selectedRecords],n={data:r,dropIndex:e.dropIndex,dropPosition:e.dropPosition,modifiedRecords:e.modifiedRecords,requestType:e.action,row:e.selectedRows};e.trigger(u.h,n);e.getCurrentViewRecords().filter(function(e){return e.uniqueID===r[0].uniqueID}).length||e.refreshToolbarItems(),e.action="",e.selectedRecords=e.selectedRows=e.modifiedRecords=[]}else{if(e.grid.isFrozenGrid()&&e.enableVirtualization&&"movable"===t.tableName){var o=e.grid.element.querySelector("."+u._15),a=e.grid.element.querySelector("."+u._17);o.style.height=a.style.height="auto"}e.trigger(u.h,t)}}},t.prototype.extendedGridEvents=function(){var e=this,t=this;this.grid.recordDoubleClick=function(t){e.trigger(u.n,t),e.notify(u.n,t)},this.grid.detailDataBound=function(t){e.notify("detaildataBound",t),e.trigger(u._4,t)},this.grid.rowDataBound=function(e){i.i(r.isNullOrUndefined)(this.isPrinting)?i.i(r.setValue)("isPrinting",!1,e):i.i(r.setValue)("isPrinting",this.isPrinting,e),t.renderModule.RowModifier(e)},this.grid.queryCellInfo=function(e){i.i(r.isNullOrUndefined)(this.isPrinting)?i.i(r.setValue)("isPrinting",!1,e):i.i(r.setValue)("isPrinting",this.isPrinting,e),t.renderModule.cellRender(e)},this.grid.contextMenuClick=function(t){e.notify(u.X,t),e.trigger(u.X,t)},this.grid.contextMenuOpen=function(t){e.notify(u.W,t),e.trigger(u.W,t)},this.grid.queryCellInfo=function(t){e.renderModule.cellRender(t)}},t.prototype.bindGridDragEvents=function(){var e=this;this.grid.rowDragStartHelper=function(t){e.trigger(u._6,t)},this.grid.rowDragStart=function(t){e.trigger(u._8,t)},this.grid.rowDrag=function(t){if(e.grid.isEdit)return void(t.cancel=!0);e.notify(u._11,t),e.trigger(u._5,t)},this.grid.rowDrop=function(t){if(e.grid.isEdit)return void(t.cancel=!0);e.notify(u._12,t),t.cancel=!0}},t.prototype.loadGrid=function(){this.bindGridProperties(),this.bindGridEvents(),i.i(r.setValue)("registeredTemplate",this.registeredTemplate,this.grid);i.i(r.setValue)("viewContainerRef",this.viewContainerRef,this.grid)},t.prototype.autoGenerateColumns=function(){if(!this.columns.length&&!this.dataModule.isRemote()&&Object.keys(this.dataSource).length){this.columns=[];for(var e=this.dataSource[0],t=Object.keys(e),i=0;i<t.length;i++)-1===[this.childMapping,this.parentIdMapping].indexOf(t[parseInt(i.toString(),10)])&&this.columns.push(t[parseInt(i.toString(),10)])}},t.prototype.getGridEditSettings=function(){var e={};switch(e.allowAdding=this.editSettings.allowAdding,e.allowEditing=this.editSettings.allowEditing,e.allowDeleting=this.editSettings.allowDeleting,e.newRowPosition="Bottom"===this.editSettings.newRowPosition?"Bottom":"Top",e.allowEditOnDblClick=this.editSettings.allowEditOnDblClick,e.showConfirmDialog=this.editSettings.showConfirmDialog,e.template=this.editSettings.template,e.showDeleteConfirmDialog=this.editSettings.showDeleteConfirmDialog,e.allowNextRowEdit=this.editSettings.allowNextRowEdit,e.guid=this.editSettings.guid,e.dialog=this.editSettings.dialog,this.editSettings.mode){case"Dialog":case"Batch":e.mode=this.editSettings.mode;break;case"Row":e.mode="Normal";break;case"Cell":e.mode="Normal",e.showConfirmDialog=!1}return e},t.prototype.getContextMenu=function(){if(this.contextMenuItems){for(var e=[],t=0;t<this.contextMenuItems.length;t++)switch(this.contextMenuItems[parseInt(t.toString(),10)]){case"AddRow":case w.b.AddRow:e.push({text:this.l10n.getConstant("AddRow"),target:".e-content",id:this.element.id+"_gridcontrol_cmenu_AddRow",items:[{text:this.l10n.getConstant("Above"),id:"Above"},{text:this.l10n.getConstant("Below"),id:"Below"},{text:this.l10n.getConstant("Child"),id:"Child"}]});break;case"Indent":case w.b.RowIndent:e.push({text:this.l10n.getConstant("RowIndent"),target:".e-content",iconCss:"e-indent e-icons",id:this.element.id+"_gridcontrol_cmenu_Indent"});break;case"Outdent":case w.b.RowOutdent:e.push({text:this.l10n.getConstant("RowOutdent"),target:".e-content",iconCss:"e-outdent e-icons",id:this.element.id+"_gridcontrol_cmenu_Outdent"});break;default:e.push(this.contextMenuItems[parseInt(t.toString(),10)])}return e}return null},t.prototype.getGridToolbar=function(){if(this.toolbar){this.l10n=new r.L10n("treegrid",this.defaultLocale,this.locale);for(var e=[],t=void 0,i=0;i<this.toolbar.length;i++)switch(this.toolbar[parseInt(i.toString(),10)]){case"Search":case w.a.Search:e.push("Search");break;case"Print":case w.a.Print:e.push("Print");break;case"ExpandAll":case w.a.ExpandAll:t=this.l10n.getConstant("ExpandAll"),e.push({text:t,tooltipText:t,prefixIcon:"e-expand",id:this.element.id+"_gridcontrol_expandall"});break;case"CollapseAll":case w.a.CollapseAll:t=this.l10n.getConstant("CollapseAll"),e.push({text:t,tooltipText:t,prefixIcon:"e-collapse",id:this.element.id+"_gridcontrol_collapseall"});break;case"Indent":case w.a.RowIndent:t=this.l10n.getConstant("RowIndent"),e.push({text:t,tooltipText:t,prefixIcon:"e-indent",id:this.element.id+"_gridcontrol_indent"});break;case"Outdent":case w.a.RowOutdent:t=this.l10n.getConstant("RowOutdent"),e.push({text:t,tooltipText:t,prefixIcon:"e-outdent",id:this.element.id+"_gridcontrol_outdent"});break;default:e.push(this.toolbar[parseInt(i.toString(),10)])}return e}return null},t.prototype.getGridColumns=function(e,t,o){void 0===t&&(t=!0),void 0===o&&(o=0);var a=e;t&&(this.columnModel=[]);var s,d;0===this.columnModel.length&&(o=0===o?-1:o);for(var l=[],p=0;p<a.length;p++){o+=1;var c=this.grid.getColumnByUid(a[parseInt(p.toString(),10)].uid);if(d=c||{},s={},"string"==typeof this.columns[parseInt(p.toString(),10)])d.field=s.field=this.columns[parseInt(p.toString(),10)];else for(var h=0,u=Object.keys(a[parseInt(p.toString(),10)]);h<u.length;h++){var g=u[h];o===this.treeColumnIndex&&"template"===g?s[""+g]=a[parseInt(p.toString(),10)][""+g]:"columns"!==g||i.i(r.isNullOrUndefined)(a[parseInt(p.toString(),10)][""+g])?this.initialRender&&!i.i(r.isNullOrUndefined)(c)&&this.enablePersistence&&"edit"===g?d[""+g]=s[""+g]=c[""+g]:c&&"sortComparer"===g||(d[""+g]=s[""+g]=a[parseInt(p.toString(),10)][""+g]):(d[""+g]=this.getGridColumns(a[parseInt(p.toString(),10)][""+g],!1,this.columnModel.length-1),s[""+g]=a[parseInt(p.toString(),10)][""+g])}s.columns||this.columnModel.push(new n.a(s)),l.push(d),!i.i(r.isNullOrUndefined)(this.columnModel[this.treeColumnIndex])&&this.enableRtl&&d.field===this.columnModel[this.treeColumnIndex].field&&(i.i(r.isNullOrUndefined)(this.treeColumnTextAlign)&&(this.treeColumnTextAlign=this.columnModel[this.treeColumnIndex].textAlign,this.treeColumnField=this.columnModel[this.treeColumnIndex].field),d.textAlign="Right")}return l},t.prototype.onPropertyChanged=function(e){for(var t=Object.keys(e),n=!1,a=0,s=t;a<s.length;a++){var d=s[a];switch(d){case"treeColumnIndex":this.grid.refreshColumns();break;case"allowPaging":this.grid.allowPaging=this.allowPaging;break;case"pageSettings":this.grid.pageSettings=i.i(o.getActualProperties)(this.pageSettings),n=!0;break;case"enableVirtualization":this.grid.enableVirtualization=this.enableVirtualization;break;case"enableColumnVirtualization":this.grid.enableColumnVirtualization=this.enableColumnVirtualization;break;case"toolbar":this.grid.toolbar=this.getGridToolbar();break;case"allowSelection":this.grid.allowSelection=this.allowSelection;break;case"selectionSettings":this.grid.selectionSettings=i.i(o.getActualProperties)(this.selectionSettings);break;case"allowSorting":this.grid.allowSorting=this.allowSorting;break;case"allowMultiSorting":this.grid.allowMultiSorting=this.allowMultiSorting;break;case"sortSettings":this.grid.sortSettings=i.i(o.getActualProperties)(this.sortSettings);break;case"searchSettings":this.grid.searchSettings=i.i(o.getActualProperties)(this.searchSettings);break;case"allowFiltering":this.grid.allowFiltering=this.allowFiltering;break;case"filterSettings":this.initialRender||(this.grid.filterSettings=i.i(o.getActualProperties)(this.filterSettings));break;case"showColumnMenu":this.grid.showColumnMenu=this.showColumnMenu;break;case"allowRowDragAndDrop":this.grid.allowRowDragAndDrop=this.allowRowDragAndDrop;break;case"aggregates":this.grid.aggregates=i.i(o.getActualProperties)(this.aggregates);break;case"enableInfiniteScrolling":this.grid.enableInfiniteScrolling=this.enableInfiniteScrolling;break;case"dataSource":if(this.isLocalData=!(this.dataSource instanceof y.DataManager)||!i.i(r.isNullOrUndefined)(this.dataSource.ready)||this.dataSource.adaptor instanceof y.RemoteSaveAdaptor,this.convertTreeData(this.dataSource),this.isLocalData){if(i.i(v.b)(this)){var l=i.i(r.getValue)("count",this.dataSource);this.grid.dataSource={result:this.flatData,count:l}}else{var p=this.dataSource;this.grid.dataSource=p instanceof y.DataManager?new y.DataManager(p.dataSource,p.defaultQuery,p.adaptor):this.flatData}this.enableVirtualization&&(this.grid.contentModule.isDataSourceChanged=!0)}else this.bindedDataSource(),this.enableVirtualization&&(this.grid.contentModule.removeEventListener(),this.grid.contentModule.eventListener("on"),this.grid.contentModule.renderTable());break;case"query":this.grid.query=this.query;break;case"enableCollapseAll":e[""+d]?this.collapseAll():this.expandAll();break;case"expandStateMapping":this.grid.refresh();break;case"gridLines":this.grid.gridLines=this.gridLines;break;case"rowTemplate":this.grid.rowTemplate=i.i(o.getActualProperties)(this.rowTemplate);break;case"frozenRows":this.grid.frozenRows=this.frozenRows;break;case"frozenColumns":this.grid.frozenColumns=this.frozenColumns;break;case"rowHeight":this.grid.rowHeight=this.rowHeight;break;case"height":i.i(r.isNullOrUndefined)(this.height)||"string"!=typeof this.height||-1===this.height.indexOf("%")||(this.element.style.height=this.height),this.grid.height=this.height;break;case"width":i.i(r.isNullOrUndefined)(this.width)||"string"!=typeof this.width||-1===this.width.indexOf("%")||(this.element.style.width=this.width),this.grid.width=this.width;break;case"locale":this.grid.locale=this.locale,this.TreeGridLocale(),this.grid.toolbar=this.getGridToolbar(),this.grid.contextMenuItems=this.getContextMenu();break;case"selectedRowIndex":this.grid.selectedRowIndex=this.selectedRowIndex;break;case"enableAltRow":this.grid.enableAltRow=this.enableAltRow;break;case"enableHover":this.grid.enableHover=this.enableHover;break;case"enableAutoFill":this.grid.enableAutoFill=this.enableAutoFill;break;case"enableAdaptiveUI":this.grid.enableAdaptiveUI=this.enableAdaptiveUI;break;case"enableImmutableMode":this.grid.enableImmutableMode=this.enableImmutableMode;break;case"allowExcelExport":this.grid.allowExcelExport=this.allowExcelExport;break;case"allowPdfExport":this.grid.allowPdfExport=this.allowPdfExport;break;case"enableRtl":i.i(r.isNullOrUndefined)(this.treeColumnField)||this.updateTreeColumnTextAlign(),this.grid.enableRtl=this.enableRtl;break;case"allowReordering":this.grid.allowReordering=this.allowReordering;break;case"allowResizing":this.grid.allowResizing=this.allowResizing;break;case"textWrapSettings":this.grid.textWrapSettings=i.i(o.getActualProperties)(this.textWrapSettings);break;case"allowTextWrap":this.grid.allowTextWrap=i.i(o.getActualProperties)(this.allowTextWrap),this.grid.refresh();break;case"contextMenuItems":this.grid.contextMenuItems=this.getContextMenu();break;case"showColumnChooser":this.grid.showColumnChooser=this.showColumnChooser;break;case"detailTemplate":this.grid.detailTemplate=i.i(o.getActualProperties)(this.detailTemplate);break;case"columnMenuItems":this.grid.columnMenuItems=i.i(o.getActualProperties)(this.columnMenuItems);break;case"editSettings":this.grid.isEdit&&"Normal"===this.grid.editSettings.mode&&e[""+d].mode&&("Cell"===e[""+d].mode||"Row"===e[""+d].mode)&&this.grid.closeEdit(),this.grid.editSettings=this.getGridEditSettings()}n&&this.grid.refresh()}},t.prototype.updateTreeColumnTextAlign=function(){this.grid.getColumnByField(this.treeColumnField).textAlign=this.enableRtl?"Right":this.treeColumnTextAlign,this.grid.refreshColumns()},t.prototype.destroy=function(){var t=this.element;if(t){var i=!(!t.querySelector(".e-gridheader")||!t.querySelector(".e-gridcontent"));i&&this.unwireEvents(),this.removeListener(),i&&e.prototype.destroy.call(this),this.grid&&this.grid.destroy(),this.dataModule&&this.dataModule.destroy();for(var r=["dataModule","sortModule","renderModule","filterModule","printModule","clipboardModule","excelExportModule","pdfExportModule","toolbarModule","summaryModule","reorderModule","resizeModule","pagerModule","keyboardModule","columnMenuModule","contextMenuModule","editModule","virtualScrollModule","selectionModule","detailRow","rowDragAndDropModule","freezeModule"],n=0;n<r.length;n++)this[r[parseInt(n.toString(),10)]]&&(this[r[parseInt(n.toString(),10)]]=null);this.element.innerHTML="",this.grid=null}},t.prototype.dataBind=function(){i.i(r.isNullOrUndefined)(this.grid)||(!i.i(r.isNullOrUndefined)(this.rowDropSettings.targetID)&&i.i(r.isNullOrUndefined)(document.getElementById(this.grid.rowDropSettings.targetID))&&(document.getElementById(this.rowDropSettings.targetID).id=this.grid.rowDropSettings.targetID,this.rowDropSettings.targetID=this.grid.rowDropSettings.targetID),e.prototype.dataBind.call(this),this.grid.dataBind())},t.prototype.getPersistData=function(){for(var e=["pageSettings","sortSettings","filterSettings","columns","searchSettings","selectedRowIndex","treeColumnIndex"],t={pageSettings:["template","pageSizes","pageSizeMode","enableQueryString","totalRecordsCount","pageCount"],filterSettings:["type","mode","showFilterBarStatus","immediateModeDelay","ignoreAccent","hierarchyMode"],searchSettings:["fields","operator","ignoreCase"],sortSettings:[],columns:[],selectedRowIndex:[]},n=["filter","edit","filterBarTemplate","headerTemplate","template","commandTemplate","commands","dataSource"],o=0;o<e.length;o++)for(var a=this[e[parseInt(o.toString(),10)]],s=0,d=t[e[parseInt(o.toString(),10)]];!i.i(r.isNullOrUndefined)(d)&&s<d.length;s++){var l=d[parseInt(s.toString(),10)];delete a[""+l]}return this.ignoreInArrays(n,this.columns),this.addOnPersist(e)},t.prototype.ignoreInArrays=function(e,t){for(var i=0;i<t.length;i++)t[parseInt(i.toString(),10)].columns?(this.ignoreInColumn(e,t[parseInt(i.toString(),10)]),this.ignoreInArrays(e,t[parseInt(i.toString(),10)].columns)):this.ignoreInColumn(e,t[parseInt(i.toString(),10)])},t.prototype.ignoreInColumn=function(e,t){if(i.i(r.isNullOrUndefined)(t.template))for(var n=0;n<e.length;n++)delete t[e[parseInt(n.toString(),10)]],t.filter={}},t.prototype.mouseClickHandler=function(e){if(i.i(r.isNullOrUndefined)(e.touches)){var t=e.target;if(!t.classList.contains("e-treegridexpand")&&!t.classList.contains("e-treegridcollapse")||this.isEditCollapse||this.grid.isEdit||this.expandCollapseRequest(t),this.isEditCollapse=!1,this.notify("checkboxSelection",{target:t}),this.grid.isCheckBoxSelection&&!this.grid.isPersistSelection&&this.aggregates.map(function(e){return!0===e.showChildSummary}).length){var n=this.grid.getHeaderContent().querySelector(".e-checkselectall");if(this.grid.getSelectedRowIndexes().length===this.getCurrentViewRecords().length){var o=n.nextElementSibling;i.i(r.removeClass)([o],["e-stop","e-uncheck"]),i.i(r.addClass)([o],["e-check"])}}}},t.prototype.mouseMoveHandler=function(e){var t=!1,r=this.getColumns();"EllipsisWithTooltip"===this.clipMode&&(t=!0);var n=i.i(o.parentsUntil)(e.target,"e-ellipsistooltip");if((t||-1!==this.treeColumnIndex&&"EllipsisWithTooltip"===r[this.treeColumnIndex].clipMode)&&null!==n&&parseInt(n.getAttribute("data-colindex"),10)===this.treeColumnIndex&&n.children[0].scrollWidth>n.children[0].clientWidth){new m.Tooltip({content:n.textContent}).appendTo(n)}},t.prototype.getRows=function(){return this.grid.getRows()},t.prototype.getPager=function(){return this.grid.getPager()},t.prototype.addRecord=function(e,t,i){if(this.editModule){this.editModule.isAddedRowByMethod=!0,this.editModule.addRecord(e,t,i)}},t.prototype.closeEdit=function(){this.grid.editModule&&this.grid.editModule.closeEdit()},t.prototype.saveCell=function(){this.grid.editModule&&this.grid.editModule.saveCell()},t.prototype.updateCell=function(e,t,i){this.grid.editModule&&this.grid.editModule.updateCell(e,t,i)},t.prototype.updateRow=function(e,t){if(this.grid.editModule)if(i.i(r.isNullOrUndefined)(e))this.grid.editModule.updateRow(e,t);else{var n=this.grid.getCurrentViewRecords()[parseInt(e.toString(),10)];i.i(r.extend)(n,t),this.grid.editModule.updateRow(e,n)}},t.prototype.deleteRecord=function(e,t){this.grid.editModule&&this.grid.editModule.deleteRecord(e,t)},t.prototype.startEdit=function(e){this.grid.editModule&&this.grid.editModule.startEdit(e)},t.prototype.editCell=function(e,t){this.editModule&&this.editModule.editCell(e,t)},t.prototype.enableToolbarItems=function(e,t){this.grid.toolbarModule&&this.grid.toolbarModule.enableItems(e,t)},t.prototype.endEdit=function(){this.grid.editModule&&this.grid.editModule.endEdit()},t.prototype.openColumnChooser=function(e,t){this.columnChooserModule&&this.columnChooserModule.openColumnChooser(e,t)},t.prototype.deleteRow=function(e){this.grid.editModule&&this.grid.editModule.deleteRow(e)},t.prototype.getPrimaryKeyFieldNames=function(){return this.grid.getPrimaryKeyFieldNames()},t.prototype.setCellValue=function(e,t,n){this.grid.setCellValue(e,t,n);var o=this.grid.getRowIndexByPrimaryKey(e),a=this.getCurrentViewRecords()[parseInt(o.toString(),10)];i.i(r.isNullOrUndefined)(a)||i.i(D.a)({value:a,action:"edit"},this,this.isSelfReference,a.index,this.grid.selectedRowIndex,t)},t.prototype.setRowData=function(e,t){var i=this.getCurrentViewRecords(),r=this.grid.getPrimaryKeyFieldNames()[0],n=0,o={};i.some(function(t){return t[""+r]===e&&(o=t,!0)}),n=o.level,t.level=n,t.index=o.index,t.childRecords=o.childRecords,t.taskData=o.taskData,t.uniqueID=o.uniqueID,t.parentItem=o.parentItem,t.checkboxState=o.checkboxState,t.hasChildRecords=o.hasChildRecords,t.parentUniqueID=o.parentUniqueID,t.expanded=o.expanded,this.grid.setRowData(e,t);var a=this.getVisibleRecords();if(a.length>0&&e===a[a.length-1][""+r]){var s=this.getContentTable(),d=s.scrollHeight,l=this.getContent().clientHeight;this.lastRowBorder(this.getRows()[i.indexOf(o)],d<=l)}},t.prototype.goToPage=function(e){this.grid.pagerModule&&this.grid.pagerModule.goToPage(e)},t.prototype.updateExternalMessage=function(e){this.pagerModule&&this.grid.pagerModule.updateExternalMessage(e)},t.prototype.getCellFromIndex=function(e,t){return this.grid.getCellFromIndex(e,t)},t.prototype.getColumnByField=function(e){return i.i(o.iterateArrayOrObject)(this.columnModel,function(t){if(t.field===e)return t})[0]},t.prototype.getColumnByUid=function(e){var t=this.initialRender?this.grid.columns:this.columns;return this.grid.columns.length!==this.columnModel.length&&(t=this.grid.columnModel),i.i(o.iterateArrayOrObject)(t,function(t){if(t.uid===e)return t})[0]},t.prototype.getColumnFieldNames=function(){return this.grid.getColumnFieldNames()},t.prototype.getFooterContent=function(){return this.grid.getFooterContent()},t.prototype.getFooterContentTable=function(){return this.grid.getFooterContentTable()},t.prototype.showColumns=function(e,t){this.grid.showColumns(e,t),this.updateColumnModel()},t.prototype.hideColumns=function(e,t){this.grid.hideColumns(e,t),this.updateColumnModel()},t.prototype.getColumnHeaderByField=function(e){return this.grid.getColumnHeaderByField(e)},t.prototype.getColumnHeaderByIndex=function(e){return this.grid.getColumnHeaderByIndex(e)},t.prototype.getColumnHeaderByUid=function(e){return this.grid.getColumnHeaderByUid(e)},t.prototype.getColumnIndexByField=function(e){return this.grid.getColumnIndexByField(e)},t.prototype.getVirtualColIndexByUid=function(e){var t=i.i(o.iterateArrayOrObject)(this.grid.columnModel,function(t,i){if(t.uid===e)return i})[0];return i.i(r.isNullOrUndefined)(t)?-1:t},t.prototype.getColumnIndexByUid=function(e){return this.grid.getColumnIndexByUid(e)},t.prototype.getColumns=function(e){return this.updateColumnModel(this.grid.getColumns(e)),this.columnModel},t.prototype.updateColumnModel=function(e){var t,o,a=i.i(r.isNullOrUndefined)(e)?this.grid.getColumns():e;-1!==this.treeColumnIndex&&this.columnModel[this.treeColumnIndex]&&!i.i(r.isNullOrUndefined)(this.columnModel[this.treeColumnIndex].template)&&(t=this.columnModel[this.treeColumnIndex].template,o=this.columnModel[this.treeColumnIndex].field);var s;if(!this.enableColumnVirtualization||this.enableColumnVirtualization&&this.columnModel.length===a.length){this.columnModel=[];for(var d=0;d<a.length;d++){s={};for(var l=0,p=Object.keys(a[parseInt(d.toString(),10)]);l<p.length;l++){var c=p[l];s[""+c]=a[parseInt(d.toString(),10)][""+c]}this.columnModel.push(new n.a(s)),o!==this.columnModel[parseInt(d.toString(),10)].field||"checkbox"===this.columnModel[parseInt(d.toString(),10)].type||i.i(r.isNullOrUndefined)(t)||""===t||(this.columnModel[parseInt(d.toString(),10)].template=t)}}return this.deepMerge=["columns"],this.grid.columns.length!==this.columnModel.length&&(this.stackedHeader=!0),this.stackedHeader&&this.allowResizing&&this.updateColumnsWidth(this.columns),this.stackedHeader||i.i(r.merge)(this.columns,this.columnModel),this.deepMerge=void 0,this.columnModel},t.prototype.updateColumnsWidth=function(e){var t=this;e.forEach(function(e){if(e.columns)t.updateColumnsWidth(e.columns);else if(e.field){var n=t.grid.getColumnByField(e.field);i.i(r.isNullOrUndefined)(n)||(e.width=n.width)}})},t.prototype.getContent=function(){return this.grid.getContent()},t.prototype.mergePersistTreeGridData=function(){this.grid.mergePersistGridData.apply(this)},t.prototype.mergeColumns=function(e,t){this.grid.mergeColumns.apply(this,[e,t])},t.prototype.updateTreeGridModel=function(){this.setProperties({filterSettings:i.i(o.getObject)("properties",this.grid.filterSettings)},!0),this.setProperties({pageSettings:i.i(o.getObject)("properties",this.grid.pageSettings)},!0),this.setProperties({searchSettings:i.i(o.getObject)("properties",this.grid.searchSettings)},!0),this.setProperties({sortSettings:i.i(o.getObject)("properties",this.grid.sortSettings)},!0)},t.prototype.getContentTable=function(){return this.grid.getContentTable()},t.prototype.getDataRows=function(){for(var e=[],t=this.grid.getDataRows(),i=0,r=t.length;i<r;i++)t[parseInt(i.toString(),10)].classList.contains("e-summaryrow")||e.push(t[parseInt(i.toString(),10)]);return e},t.prototype.getCurrentViewRecords=function(){return this.grid.currentViewData.filter(function(e){return i.i(r.isNullOrUndefined)(e.isSummaryRow)})},t.prototype.getBatchChanges=function(){return this.grid.editModule.getBatchChanges()},t.prototype.getHeaderContent=function(){return this.grid.getHeaderContent()},t.prototype.getHeaderTable=function(){return this.grid.getHeaderTable()},t.prototype.getRowByIndex=function(e){return this.grid.getRowByIndex(e)},t.prototype.getRowInfo=function(e){return this.grid.getRowInfo(e)},t.prototype.getUidByColumnField=function(e){return this.grid.getUidByColumnField(e)},t.prototype.getVisibleColumns=function(){for(var e=[],t=0,i=this.columnModel;t<i.length;t++){var r=i[t];r.visible&&e.push(r)}return e},t.prototype.showSpinner=function(){i.i(m.showSpinner)(this.element)},t.prototype.hideSpinner=function(){i.i(m.hideSpinner)(this.element)},t.prototype.refresh=function(){this.uniqueIDCollection={},this.convertTreeData(this.dataSource),i.i(v.b)(this)||(this.dataSource instanceof y.DataManager?this.grid.setProperties({dataSource:new y.DataManager(this.dataSource.dataSource,this.dataSource.defaultQuery,this.dataSource.adaptor)},!0):this.grid.dataSource=this.flatData),this.grid.refresh()},t.prototype.getCheckedRecords=function(){return this.selectionModule.getCheckedrecords()},t.prototype.getVisibleRecords=function(){var e=[],t=this.getCurrentViewRecords();if(this.allowPaging)e=t;else for(var r=0;r<t.length;r++)e.push(t[parseInt(r.toString(),10)]),t[parseInt(r.toString(),10)].expanded||(r+=i.i(v.g)(t[parseInt(r.toString(),10)]).length);return e},t.prototype.getCheckedRowIndexes=function(){return this.selectionModule.getCheckedRowIndexes()},t.prototype.selectCheckboxes=function(e){this.selectionModule.selectCheckboxes(e)},t.prototype.refreshColumns=function(e){i.i(r.isNullOrUndefined)(e)||e?(this.grid.columns=this.getGridColumns(this.columns),this.grid.refreshColumns()):this.grid.setProperties({columns:this.getGridColumns(this.columns)},!0)},t.prototype.refreshHeader=function(){this.grid.refreshHeader()},t.prototype.expandCollapseRequest=function(e){if("Batch"===this.editSettings.mode){if((this.getBatchChanges()[this.changedRecords].length||this.getBatchChanges()[this.deletedRecords].length||this.getBatchChanges()[this.addedRecords].length)&&this.editSettings.showConfirmDialog){var t=this.grid.editModule.dialogObj;return this.grid.editModule.showDialog("CancelEdit",t),void(this.targetElement=e)}}if(this.rowTemplate){var i=e.closest(".e-treerowcell").parentElement,r=this.getCurrentViewRecords()[i.rowIndex];e.classList.contains("e-treegridexpand")?this.collapseRow(i,r):this.expandRow(i,r)}else{var n=this.grid.getRowInfo(e),r=n.rowData;if(this.grid.isFrozenGrid()&&this.enableVirtualization&&!Object.keys(r).length){r=this.grid.contentModule.freezeRows.filter(function(e){return e.uid===n.row.getAttribute("data-uid")})[0].data}this.enableImmutableMode&&(r=this.getCurrentViewRecords()[n.rowIndex]),e.classList.contains("e-treegridexpand")?this.collapseRow(n.row,r):this.expandRow(n.row,r)}},t.prototype.expandRow=function(e,t,n,o){var a=this,s=this.parentData;if(this.enableVirtualization||(s=this.flatData.filter(function(e){return e.hasChildRecords})),t=this.getCollapseExpandRecords(e,t),!i.i(r.isNullOrUndefined)(e)&&e.cells[0].classList.contains("e-lastrowcell")&&this.lastRowBorder(e,!1),this.isExpandAll&&!i.i(v.a)(this)){var d={data:s,row:e,cancel:!1},l=!1;this.grid.pagerModule&&!i.i(r.isNullOrUndefined)(this.grid.pagerModule.pagerObj.pagerdropdownModule)&&(l=!!this.grid.pagerModule.pagerObj.pagerdropdownModule.dropDownListObject.value),this.isExpandingEventTriggered?(!this.allowPaging||l&&"All"===this.grid.pagerModule.pagerObj.pagerdropdownModule.dropDownListObject.value)&&!this.expandAllPrevent&&this.isExpandingEventTriggered&&this.expandRows(e,t,s,n,o):this.trigger(u.R,d,function(i){a.expandAllPrevent=i.cancel,i.cancel||(i.expandAll&&a.expandCollapseAllChildren(t,"expand",n,o),a.expandRows(e,t,s,n,o))}),this.isExpandingEventTriggered=!0}else if(!this.isExpandAll||this.isExpandAll&&i.i(v.a)(this)){var d={data:t,row:e,cancel:!1};this.trigger(u.R,d,function(i){i.cancel||(i.expandAll&&a.expandCollapseAllChildren(t,"expand",n,o),a.expandRows(e,t,s,n,o))})}},t.prototype.expandRows=function(e,t,n,o,a){this.expandCollapse("expand",e,t);if((!i.i(v.a)(this)||i.i(v.h)(this))&&(!i.i(v.b)(this)||!i.i(r.isNullOrUndefined)(t.Children))){var s={data:t,row:e};i.i(r.isNullOrUndefined)(this.expandStateMapping)||this.updateExpandStateMapping(s.data,!0),this.isExpandAll&&!this.isExpandedEventTriggered?(this.isExpandedEventTriggered=!0,s={data:n,row:e},this.trigger(u.Q,s)):this.isExpandAll||this.trigger(u.Q,s)}},t.prototype.expandCollapseAllChildren=function(e,t,n,o){if((i.i(r.isNullOrUndefined)(n)||e[this.getPrimaryKeyFieldNames()[0]]===n)&&(i.i(r.isNullOrUndefined)(o)||o===e.level)){var a=i.i(v.g)(e).filter(function(e){return e.hasChildRecords});a.unshift(e);for(var s=0;s<a.length;s++)this.expandCollapse(t,null,a[parseInt(s.toString(),10)])}},t.prototype.getCollapseExpandRecords=function(e,t){return this.allowPaging&&"All"===this.pageSettings.pageSizeMode&&this.isExpandAll&&i.i(r.isNullOrUndefined)(t)&&!i.i(v.a)(this)?t=this.flatData.filter(function(e){return e.hasChildRecords}):i.i(r.isNullOrUndefined)(t)&&(t=this.detailTemplate?this.grid.getCurrentViewRecords()[e.getAttribute("data-rowindex")]:this.enableVirtualization&&this.isCollapseAll?this.isExpandAll&&-1===e.rowIndex?this.grid.getCurrentViewRecords()[parseInt(e.getAttribute("data-rowindex"),10)]:this.grid.getCurrentViewRecords()[e.rowIndex]:this.grid.getCurrentViewRecords()[parseInt(e.getAttribute("data-rowindex"),10)]),t},t.prototype.collapseRow=function(e,t,r){var n=this,o=this.parentData;if(this.enableVirtualization||(o=this.flatData.filter(function(e){return e.hasChildRecords})),t=this.getCollapseExpandRecords(e,t),this.isCollapseAll&&!i.i(v.a)(this)){var a={data:o,row:e,cancel:!1};this.isCollapsingEventTriggered?this.allowPaging||this.collapseAllPrevent||!this.isCollapsingEventTriggered||this.collapseRows(e,t,o,r):this.trigger(u.T,a,function(i){n.collapseAllPrevent=i.cancel,i.cancel||(i.collapseAll&&n.expandCollapseAllChildren(t,"collapse",r),n.collapseRows(e,t,o,r))}),this.isCollapsingEventTriggered=!0}else if(!this.isCollapseAll||this.isCollapseAll&&i.i(v.a)(this)){var a={data:t,row:e,cancel:!1};this.trigger(u.T,a,function(i){i.cancel||n.collapseRows(e,t,o,r)})}},t.prototype.collapseRows=function(e,t,n,o){this.expandCollapse("collapse",e,t);var a={data:t,row:e};if(!i.i(v.a)(this)&&(i.i(r.isNullOrUndefined)(this.expandStateMapping)||this.updateExpandStateMapping(a.data,!1),this.isCollapseAll&&!this.isCollapsedEventTriggered?(this.isCollapsedEventTriggered=!0,a={data:n,row:e},this.trigger(u.S,a)):this.isCollapseAll||this.trigger(u.S,a),this.enableInfiniteScrolling)){this.grid.getContent().firstElementChild.scrollHeight-this.grid.getContent().firstElementChild.scrollTop<this.grid.getRowHeight()+ +this.height&&this.grid.getContent().firstElementChild.scrollBy(0,this.grid.getRowHeight())}},t.prototype.updateExpandStateMapping=function(e,t){var r=e;if(r.length)for(var n=0;n<r.length;n++)r[parseInt(n.toString(),10)][this.expandStateMapping]=t,i.i(D.a)({value:r[parseInt(n.toString(),10)],action:"edit"},this,this.isSelfReference,r[parseInt(n.toString(),10)].index,this.grid.selectedRowIndex,this.expandStateMapping);else e[""+this.expandStateMapping]=t,i.i(D.a)({value:e,action:"edit"},this,this.isSelfReference,e.index,this.grid.selectedRowIndex,this.expandStateMapping)},t.prototype.expandAtLevel=function(e){if((this.allowPaging&&"All"===this.pageSettings.pageSizeMode||this.enableVirtualization)&&!i.i(v.a)(this)){var t=this.grid.dataSource.filter(function(t){return t.hasChildRecords&&t.level===e&&(t.expanded=!0),t.hasChildRecords&&t.level===e});this.expandAction(t,null,e,!0)}else{var t=this.getRecordDetails(e),r=i.i(o.getObject)("records",t);this.expandAction(r,null,e)}},t.prototype.expandByKey=function(e){this.expandCollapseActionByKey(e,"Expand")},t.prototype.expandAction=function(e,t,n,o){void 0===o&&(o=!1);for(var a=this,s=0;s<e.length;s++)!function(s){if(!i.i(r.isNullOrUndefined)(e[parseInt(s.toString(),10)].parentItem)){var d=e[parseInt(s.toString(),10)].parentItem.uniqueID,l=a.flatData.filter(function(e){return e.uniqueID===d});i.i(v.a)(a)&&(l=a.getCurrentViewRecords().filter(function(e){return e.uniqueID===d})),!1===l[0].expanded?(e.push(l[0]),l[0].expanded=!0):i.i(v.f)(a,l[0],a.parentData)||l[0].expanded&&void 0!==l[0].parentItem&&e.push(l[0])}o||a.expandRow(null,e[parseInt(s.toString(),10)],t,n)}(s);o&&this.expandRow(null,e,t,n)},t.prototype.getRecordDetails=function(e){var t=this.getRows().filter(function(t){return-1!==t.className.indexOf("level"+e)&&(t.querySelector(".e-treegridcollapse")||t.querySelector(".e-treegridexpand"))});return{records:this.getCurrentViewRecords().filter(function(t){return t.level===e&&t.hasChildRecords}),rows:t}},t.prototype.collapseAtLevel=function(e){if((this.allowPaging&&"All"===this.pageSettings.pageSizeMode||this.enableVirtualization)&&!i.i(v.a)(this)){var t=this.grid.dataSource.filter(function(t){return t.hasChildRecords&&t.level===e&&(t.expanded=!1),t.hasChildRecords&&t.level===e});this.collapseAction(t,null,!0)}else{var r=this.getRecordDetails(e),n=i.i(o.getObject)("records",r);this.collapseAction(n)}},t.prototype.collapseByKey=function(e){this.expandCollapseActionByKey(e,"Collapse")},t.prototype.expandCollapseActionByKey=function(e,t){var n=this.getPrimaryKeyFieldNames()[0],o=i.i(v.a)(this)?this.getCurrentViewRecords():this.grid.dataSource;if(!i.i(r.isNullOrUndefined)(n)){var a=o.filter(function(t){return t[""+n].toString()===e.toString()});"Expand"===t?this.expandAction(a,e,null):this.collapseAction(a,e)}},t.prototype.collapseAction=function(e,t,i){if(void 0===i&&(i=!1),i)this.collapseRow(null,e);else for(var r=0;r<e.length;r++)this.collapseRow(null,e[parseInt(r.toString(),10)],t);if(!this.grid.contentModule.isDataSourceChanged&&this.enableVirtualization&&this.getRows()&&this.parentData.length===this.getRows().length){this.grid.contentModule.startIndex=-1,this.grid.contentModule.endIndex=-1}},t.prototype.expandAll=function(){this.isExpandedEventTriggered=!1,this.isExpandingEventTriggered=!1,this.expandCollapseAll("expand")},t.prototype.collapseAll=function(){this.isCollapsedEventTriggered=!1,this.isCollapsingEventTriggered=!1,this.expandCollapseAll("collapse")},t.prototype.expandCollapseAll=function(e){var t=this.getRows().filter(function(t){return t.querySelector(".e-treegrid"+("expand"===e?"collapse":"expand"))});if(!t.length&&this.getRows().length&&t.push(this.getRows()[0]),this.isExpandAll=!0,this.isCollapseAll=!0,(this.allowPaging&&"All"===this.pageSettings.pageSizeMode||this.enableVirtualization||this.enableInfiniteScrolling)&&!i.i(v.a)(this)){if(this.flatData.filter(function(t){t.hasChildRecords&&(t.expanded="collapse"!==e)}),t.length)for(var n=0;n<t.length;n++)"collapse"===e?i.i(r.isNullOrUndefined)(this.getCurrentViewRecords()[t[parseInt(n.toString(),10)].rowIndex])||this.collapseRow(t[parseInt(n.toString(),10)]):this.enableVirtualization?"true"!==t[0].getAttribute("aria-expanded")&&this.expandRow(t[0]):this.expandRow(t[parseInt(n.toString(),10)]);else if(this.allowPaging){var o=this.enableCollapseAll;this.setProperties({enableCollapseAll:!0},!0),this.grid.pagerModule.goToPage(1),this.setProperties({enableCollapseAll:o},!0)}}else for(var n=0;n<t.length;n++)"collapse"===e?this.collapseRow(t[parseInt(n.toString(),10)]):this.expandRow(t[parseInt(n.toString(),10)]);this.isExpandAll=!1,this.isCollapseAll=!1},t.prototype.expandCollapse=function(e,t,n,o){var a,s=this,d={row:t,data:n,childData:[],requestType:e},l=this.grid.currentViewData.filter(function(e){return e.parentUniqueID===n.uniqueID});(!i.i(v.a)(this)&&"expand"===e&&this.isSelfReference&&i.i(v.b)(this)&&!l.length||"collapse"===e||this.isExpandAll&&this.loadChildOnDemand&&!i.i(v.a)(this)&&this.isSelfReference&&i.i(v.b)(this))&&this.updateChildOnDemand(d);var p=this.getRows();if(this.rowTemplate){var c=this.getContentTable().rows;p=[].slice.call(c)}var h;if(i.i(r.isNullOrUndefined)(t)?(h=this.grid.currentViewData.indexOf(n),t=p[parseInt(h.toString(),10)]):h=+t.getAttribute("data-rowindex"),i.i(r.isNullOrUndefined)(t)||t.setAttribute("aria-expanded","expand"===e?"true":"false"),!(this.allowPaging&&"All"===this.pageSettings.pageSizeMode||this.enableVirtualization)||i.i(v.a)(this)||i.i(v.b)(this)){var g=void 0;if("expand"===e){if(g="table-row",o||(n.expanded=!0,this.uniqueIDCollection[n.uniqueID].expanded=n.expanded),i.i(r.isNullOrUndefined)(t)||(a=t.getElementsByClassName("e-treegridcollapse")[0]),o&&!i.i(r.isNullOrUndefined)(n[this.expandStateMapping])&&n[this.expandStateMapping]&&i.i(r.isNullOrUndefined)(a)&&(a=t.getElementsByClassName("e-treegridexpand")[0]),i.i(r.isNullOrUndefined)(a))return;a.classList.contains("e-treegridexpand")||i.i(r.addClass)([a],"e-treegridexpand"),i.i(r.removeClass)([a],"e-treegridcollapse")}else{if(g="none",o&&!i.i(v.b)(this)||(n.expanded=!1,this.uniqueIDCollection[n.uniqueID].expanded=n.expanded),i.i(r.isNullOrUndefined)(t)||(a=t.getElementsByClassName("e-treegridexpand")[0]),o&&!i.i(r.isNullOrUndefined)(n[this.expandStateMapping])&&!n[this.expandStateMapping]&&i.i(r.isNullOrUndefined)(a)&&(a=t.getElementsByClassName("e-treegridcollapse")[0]),i.i(r.isNullOrUndefined)(a))return;a.classList.contains("e-treegridcollapse")||i.i(r.addClass)([a],"e-treegridcollapse"),i.i(r.removeClass)([a],"e-treegridexpand")}t.querySelectorAll(".e-treerowcell")[0].setAttribute("aria-expanded","expand"===e?"true":"false");var f=p.filter(function(e){return e.classList.contains("e-griddetailrowindex"+n.index+"level"+(n.level+1))});if(i.i(v.a)(this)&&!i.i(v.h)(this))this.remoteExpand(e,t,n);else{i.i(v.b)(this)&&!l.length&&"collapse"!==e||this.localExpand(e,t,n);var y=this.getVisibleRecords()[this.getVisibleRecords().length-1].index,m=this.getRowByIndex(y);this.grid.getContentTable().clientHeight<=this.grid.getContent().clientHeight&&!i.i(r.isNullOrUndefined)(m)&&!m.cells[0].classList.contains("e-lastrowcell")&&this.lastRowBorder(m,!0)}if(i.i(v.b)(this)&&"expand"===e){var S=this.getCurrentViewRecords(),I=S.filter(function(e){return i.i(v.f)(s,e,s.parentData)});this.dataResults.result=I}if(!i.i(r.isNullOrUndefined)(a)&&a.closest(".e-treerowcell").classList.contains("e-cellselectionbackground")&&(a.closest(".e-treerowcell").classList.remove("e-cellselectionbackground"),a.closest(".e-treerowcell").removeAttribute("aria-selected")),this.isPixelHeight()&&!t.cells[0].classList.contains("e-lastrowcell")){var w=this.getRows(),c=this.getContentTable().rows;w=[].slice.call(c);for(var R=w.length-1;R>=0;R--)if(!i.i(v.l)(w[parseInt(R.toString(),10)])){var x=this.getContentTable(),C=x.scrollHeight,b=this.getContent().clientHeight;this.lastRowBorder(w[parseInt(R.toString(),10)],C<=b);break}}this.notify("rowExpandCollapse",{detailrows:f,action:g,record:n,row:t}),this.updateAltRow(p)}else this.notify(u.b,{action:e,row:t,record:n})},t.prototype.updateChildOnDemand=function(e){var t=this;if("collapse"===e.requestType&&i.i(v.b)(this)){for(var n=this.flatData.slice(),a=0;a<n.length;a++)n[parseInt(a.toString(),10)].parentUniqueID===e.data.uniqueID&&(n.splice(a,1),a-=1);return void(this.dataResults.result=n)}var s=new y.Deferred;e.childDataBind=s.resolve;var d=e.data;this.trigger(u.N,e),s.promise.then(function(){if(e.childData.length){i.i(v.b)(t)&&(t.flatData=t.dataResults.result),t.enableInfiniteScrolling&&i.i(v.b)(t)&&(t.flatData=t.infiniteScrollData);for(var n=t.flatData,a=0,s=0;s<n.length;s++)if(n[parseInt(s.toString(),10)].taskData===d.taskData){a=s;break}for(var l=i.i(r.getValue)("result",t.dataSource),p=i.i(v.i)(e.childData),c=d[t.childMapping]&&d[t.childMapping].length>p.length?d[t.childMapping].length:p.length,s=0;s<c;s++)d[t.childMapping]&&l.filter(function(e,i){e[t.parentIdMapping]===d[t.idMapping]&&l.splice(i,1)}),p[parseInt(s.toString(),10)]?(p[parseInt(s.toString(),10)].level=d.level+1,p[parseInt(s.toString(),10)].index=Math.ceil(1e3*Math.random()),p[parseInt(s.toString(),10)].parentItem=i.i(r.extend)({},d),p[parseInt(s.toString(),10)].taskData=i.i(r.extend)({},p[parseInt(s.toString(),10)]),delete p[parseInt(s.toString(),10)].parentItem.childRecords,delete p[parseInt(s.toString(),10)].taskData.parentItem,p[parseInt(s.toString(),10)].parentUniqueID=d.uniqueID,p[parseInt(s.toString(),10)].uniqueID=i.i(o.getUid)(t.element.id+"_data_"),i.i(r.setValue)("uniqueIDCollection."+p[parseInt(s.toString(),10)].uniqueID,p[parseInt(s.toString(),10)],t),(!i.i(r.isNullOrUndefined)(p[parseInt(s.toString(),10)][t.childMapping])||p[parseInt(s.toString(),10)][t.hasChildMapping]&&i.i(v.b)(t))&&(p[parseInt(s.toString(),10)].hasChildRecords=!0),i.i(v.b)(t)&&d[t.childMapping]&&d[t.childMapping][parseInt(s.toString(),10)]?n.splice(a+1+s,0,p[parseInt(s.toString(),10)]):n.splice(a+1+s,d[t.childMapping]&&d[t.childMapping][parseInt(s.toString(),10)]?1:0,p[parseInt(s.toString(),10)])):n.splice(a+1+s,1);n[parseInt(a.toString(),10)][""+t.childMapping]=p,n[parseInt(a.toString(),10)].childRecords=p,n[parseInt(a.toString(),10)].expanded=!0,i.i(r.setValue)("uniqueIDCollection."+n[parseInt(a.toString(),10)].uniqueID,n[parseInt(a.toString(),10)],t);for(var h=0;h<e.childData.length;h++)l.push(e.childData[parseInt(h.toString(),10)])}i.i(v.b)(t)&&t.loadChildOnDemand&&"expand"===e.requestType&&(t.dataResults.expandRecord={},t.dataResults.expandRecord=e.data),t.isExpandRefresh=!0;var g=t.getContentTable().parentElement.scrollTop;t.grid.refresh(),t.enableInfiniteScrolling&&(t.getContentTable().parentElement.scrollTop=g),t.trigger(u.Q,e)})},t.prototype.remoteExpand=function(e,t,i){var r=this.getRows();if(this.rowTemplate){var n=this.getContentTable().rows;r=[].slice.call(n)}var o={data:i,row:t},a=[];if(a=r.filter(function(e){return e.querySelector(".e-gridrowindex"+i.index+"level"+(i.level+1))||e.querySelector(".e-gridrowindex"+i.index+"level0.e-summarycell")}),"expand"===e){this.notify(u.U,{record:i,rows:a,parentRow:t});var s={row:t,data:i};a.length>0&&this.trigger(u.Q,s)}else"collapse"===e&&this.enableVirtualization?this.dataModule.fetchRemoteChildData({action:e,record:o.data,rows:null,parentRow:o.row}):(this.collapseRemoteChild({record:i,rows:a}),this.trigger(u.S,o))},t.prototype.localExpand=function(e,t,n){var o,a=this.grid.currentViewData.filter(function(e){return e.parentUniqueID===n.uniqueID});this.isPixelHeight()&&t.cells[0].classList.contains("e-lastrowcell")&&this.lastRowBorder(t,!1);var s,d,l=this.getRows();if(this.rowTemplate){var p=this.getContentTable().rows;l=[].slice.call(p)}var c="expand"===e?"table-row":"none",h=this.getPrimaryKeyFieldNames()[0];if(this.enableImmutableMode&&!this.allowPaging){o=[];for(var u=0;u<a.length;u++){var g=this.grid.getRowIndexByPrimaryKey(a[parseInt(u.toString(),10)][""+h]);o.push(this.getRows()[parseInt(g.toString(),10)])}}else o=l.filter(function(e){return e.querySelector(".e-gridrowindex"+n.index+"level"+(n.level+1))});var f=this.grid.getFrozenLeftColumnsCount()>0||this.grid.getFrozenRightColumnsCount()>0;(this.frozenRows||this.frozenColumns||this.getFrozenColumns()||f)&&(s=this.getRows().filter(function(e){return e.querySelector(".e-gridrowindex"+n.index+"level"+(n.level+1))})),f&&(d=this.getRows().filter(function(e){return e.querySelector(".e-gridrowindex"+n.index+"level"+(n.level+1))}));var y=this.grid.getRowsObject(),m=this.grid.currentViewData,S=m.filter(function(e){return e.uniqueID===n.uniqueID}),I=m.indexOf(S[0]);i.i(r.isNullOrUndefined)(y[parseInt(I.toString(),10)].visible)||!1===y[parseInt(I.toString(),10)].visible||(y[parseInt(I.toString(),10)].visible=!0);for(var w=l.filter(function(e){return e.classList.contains("e-griddetailrowindex"+n.index+"level"+(n.level+1))}),u=0;u<o.length;u++){if(i.i(r.isNullOrUndefined)(o[parseInt(u.toString(),10)])||(o[parseInt(u.toString(),10)].style.display=c),!i.i(r.isNullOrUndefined)(o[parseInt(u.toString(),10)])&&!this.allowPaging&&!(this.enableVirtualization||this.enableInfiniteScrolling||i.i(v.a)(this)||i.i(v.b)(this))){y[o[parseInt(u.toString(),10)].rowIndex].visible="none"!==c;var R=m.filter(function(e){return e.uniqueID===S[0].parentUniqueID});!i.i(r.isNullOrUndefined)(R[0])&&l[m.indexOf(R[0])].getElementsByClassName("e-treegridcollapse").length&&(y[parseInt(I.toString(),10)].visible=!1)}i.i(r.isNullOrUndefined)(s)||(s[parseInt(u.toString(),10)].style.display=c),i.i(r.isNullOrUndefined)(d)||(d[parseInt(u.toString(),10)].style.display=c),this.notify("childRowExpand",{row:o[parseInt(u.toString(),10)]}),!i.i(r.isNullOrUndefined)(a[parseInt(u.toString(),10)].childRecords)&&a[parseInt(u.toString(),10)].childRecords.length>0&&("expand"!==e||i.i(r.isNullOrUndefined)(a[parseInt(u.toString(),10)].expanded)||a[parseInt(u.toString(),10)].expanded)&&(this.expandCollapse(e,o[parseInt(u.toString(),10)],a[parseInt(u.toString(),10)],!0),this.frozenColumns<=this.treeColumnIndex&&!i.i(r.isNullOrUndefined)(s)&&this.expandCollapse(e,s[parseInt(u.toString(),10)],a[parseInt(u.toString(),10)],!0))}for(var u=0;u<w.length;u++)i.i(r.isNullOrUndefined)(w[parseInt(u.toString(),10)])||this.allowPaging||this.enableVirtualization||this.enableInfiniteScrolling||i.i(v.a)(this)||i.i(v.b)(this)||(y[w[parseInt(u.toString(),10)].rowIndex].visible="none"!==c,w[parseInt(u.toString(),10)].style.display=c);this.allowPaging||this.enableVirtualization||this.enableInfiniteScrolling||i.i(v.a)(this)||i.i(v.b)(this)||this.grid.notify("refresh-Expand-and-Collapse",{rows:this.grid.getRowsObject()})},t.prototype.updateAltRow=function(e){if(this.enableAltRow&&!this.rowTemplate)for(var t=0,n=0;e&&n<e.length;n++){var o=e[parseInt(n.toString(),10)];"none"!==o.style.display&&(o.classList.contains("e-altrow")&&i.i(r.removeClass)([o],"e-altrow"),t%2==0||o.classList.contains("e-summaryrow")||o.classList.contains("e-detailrow")||i.i(r.addClass)([o],"e-altrow"),o.classList.contains("e-summaryrow")||o.classList.contains("e-detailrow")||t++)}},t.prototype.treeColumnRowTemplate=function(){var e=this.getContentTable().rows;e=[].slice.call(e);for(var t=this.grid.getRowsObject(),i=0;i<e.length;i++){var r=this.grid.getContentTable().rows[parseInt(i.toString(),10)].cells[this.treeColumnIndex],n=e[parseInt(i.toString(),10)],o=0!==t.length?t[parseInt(i.toString(),10)].data:new Object,a={data:o,row:n,cell:r,column:this.getColumns()[this.treeColumnIndex]};this.renderModule.cellRender(a)}},t.prototype.collapseRemoteChild=function(e,t){t||(e.record.expanded=!1);var n,o,a=e.rows,s=[],d=[],l=this.getFrozenLeftColumnsCount()>0||this.getFrozenRightColumnsCount()>0;l&&(s=this.getRows().filter(function(t){return t.querySelector(".e-gridrowindex"+e.record.index+"level"+(e.record.level+1))}),d=this.getRows().filter(function(t){return t.querySelector(".e-gridrowindex"+e.record.index+"level"+(e.record.level+1))}));for(var p=0;p<a.length;p++){a[parseInt(p.toString(),10)].style.display="none",n=a[parseInt(p.toString(),10)];var c=a[parseInt(p.toString(),10)].querySelector(".e-detailrowexpand");if(i.i(r.isNullOrUndefined)(c)||this.grid.detailRowModule.collapse(c),l&&(s[parseInt(p.toString(),10)].style.display="none",d[parseInt(p.toString(),10)].style.display="none",a[parseInt(p.toString(),10)].querySelector(".e-treecolumn-container .e-treegridexpand")||(s[parseInt(p.toString(),10)].querySelector(".e-treecolumn-container .e-treegridexpand")?n=s[parseInt(p.toString(),10)]:d[parseInt(p.toString(),10)].querySelector(".e-treecolumn-container .e-treegridexpand")&&(n=d[parseInt(p.toString(),10)]))),n.querySelector(".e-treecolumn-container .e-treegridexpand")){var h=n.querySelector(".e-treecolumn-container .e-treegridexpand");o=this.rowTemplate?this.grid.getCurrentViewRecords()[a[parseInt(p.toString(),10)].rowIndex]:this.grid.getRowObjectFromUID(a[parseInt(p.toString(),10)].getAttribute("data-Uid")).data,!i.i(r.isNullOrUndefined)(h)&&o.expanded&&(i.i(r.removeClass)([h],"e-treegridexpand"),i.i(r.addClass)([h],"e-treegridcollapse"));for(var u=[],g=this.getRows(),f=0;f<g.length;f++)g[parseInt(f.toString(),10)].querySelector(".e-gridrowindex"+o.index+"level"+(o.level+1))&&u.push(g[parseInt(f.toString(),10)]);u.length&&o.expanded&&this.collapseRemoteChild({record:o,rows:u},!1)}}},t.prototype.sanitize=function(e){return this.enableHtmlSanitizer&&"string"==typeof e?r.SanitizeHtmlHelper.sanitize(e):e},t.prototype.updateRowAndCellElements=function(e,t,i){for(var r=0;r<e.length;r++)this.renderModule.cellRender({data:e[parseInt(r.toString(),10)],cell:t[parseInt(r.toString(),10)].cells[parseInt(i.toString(),10)],column:this.grid.getColumns()[this.treeColumnIndex],requestType:"rowDragAndDrop"}),"indenting"!==this.action&&"outdenting"!==this.action||this.renderModule.RowModifier({data:e[parseInt(r.toString(),10)],row:t[parseInt(r.toString(),10)]})},t.prototype.addListener=function(){this.on("updateResults",this.updateResultModel,this),this.grid.on("initial-end",this.afterGridRender,this)},t.prototype.updateResultModel=function(e){this.dataResults=e},t.prototype.removeListener=function(){this.isDestroyed||(this.off("updateResults",this.updateResultModel),this.grid.off("initial-end",this.afterGridRender))},t.prototype.filterByColumn=function(e,t,i,r,n,o,a,s){this.grid.filterByColumn(e,t,i,r,n,o,a,s)},t.prototype.clearFiltering=function(){this.grid.clearFiltering()},t.prototype.removeFilteredColsByField=function(e,t){this.grid.removeFilteredColsByField(e,t)},t.prototype.selectRow=function(e,t){this.grid.selectRow(e,t)},t.prototype.selectRows=function(e){this.grid.selectRows(e)},t.prototype.clearSelection=function(){this.grid.clearSelection()},t.prototype.copy=function(e){this.clipboardModule.copy(e)},t.prototype.paste=function(e,t,i){this.clipboardModule.paste(e,t,i)},t.prototype.selectCell=function(e,t){this.grid.selectCell(e,t)},t.prototype.getSelectedRows=function(){return this.grid.getSelectedRows()},t.prototype.getMovableCellFromIndex=function(e,t){return this.grid.getCellFromIndex(e,t)},t.prototype.getMovableDataRows=function(){return this.grid.getDataRows()},t.prototype.getMovableRowByIndex=function(e){return this.grid.getRowByIndex(e)},t.prototype.getMovableRows=function(){return this.grid.getRows()},t.prototype.getFrozenRightRowByIndex=function(e){return this.grid.getRowByIndex(e)},t.prototype.getFrozenRightRows=function(){return this.grid.getRows()},t.prototype.getFrozenRightDataRows=function(){return this.grid.getDataRows()},t.prototype.getFrozenRightCellFromIndex=function(e,t){return this.grid.getCellFromIndex(e,t)},t.prototype.getFrozenLeftColumnHeaderByIndex=function(e){return this.grid.getColumnHeaderByIndex(e)},t.prototype.getFrozenRightColumnHeaderByIndex=function(e){return this.grid.getColumnHeaderByIndex(e)},t.prototype.getMovableColumnHeaderByIndex=function(e){return this.grid.getColumnHeaderByIndex(e)},t.prototype.getMovableColumnsCount=function(){return this.grid.getMovableColumnsCount()},t.prototype.getFrozenLeftColumnsCount=function(){return this.grid.getFrozenLeftColumnsCount()},t.prototype.getFrozenRightColumnsCount=function(){return this.grid.getFrozenRightColumnsCount()},t.prototype.getFrozenLeftColumns=function(){return this.updateColumnModel(this.grid.getFrozenLeftColumns()),this.columnModel},t.prototype.getFrozenRightColumns=function(){return this.updateColumnModel(this.grid.getFrozenRightColumns()),this.columnModel},t.prototype.getVisibleMovableCount=function(){return this.grid.getVisibleMovableCount()},t.prototype.getVisibleFrozenRightCount=function(){return this.grid.getVisibleFrozenRightCount()},t.prototype.getVisibleFrozenLeftCount=function(){return this.grid.getVisibleFrozenLeftCount()},t.prototype.getMovableColumns=function(){return this.updateColumnModel(this.grid.getMovableColumns()),this.columnModel},t.prototype.getFrozenColumns=function(){return this.getFrozenCount(this.columns,0)+this.frozenColumns},t.prototype.getFrozenCount=function(e,t){for(var i=0,r=e.length;i<r;i++)e[parseInt(i.toString(),10)].columns?t=this.getFrozenCount(e[parseInt(i.toString(),10)].columns,t):e[parseInt(i.toString(),10)].isFrozen&&t++;return t},t.prototype.getSelectedRowIndexes=function(){return this.grid.getSelectedRowIndexes()},t.prototype.getSelectedRowCellIndexes=function(){return this.grid.getSelectedRowCellIndexes()},t.prototype.getSelectedRecords=function(){return this.grid.getSelectedRecords()},t.prototype.getDataModule=function(){return{baseModule:this.grid.getDataModule(),treeModule:this.dataModule}},t.prototype.reorderRows=function(e,t,i){this.rowDragAndDropModule.reorderRows(e,t,i)},t.prototype.indent=function(e){i.i(r.isNullOrUndefined)(this.rowDragAndDropModule)||(e=e,this.rowDragAndDropModule[this.indentOutdentAction](e,"indent"))},t.prototype.outdent=function(e){i.i(r.isNullOrUndefined)(this.rowDragAndDropModule)||(e=e,this.rowDragAndDropModule[this.indentOutdentAction](e,"outdent"))};var E;return P([i.i(r.Property)(0)],t.prototype,"frozenRows",void 0),P([i.i(r.Property)(0)],t.prototype,"frozenColumns",void 0),P([i.i(r.Property)("Ellipsis")],t.prototype,"clipMode",void 0),P([i.i(r.Property)([])],t.prototype,"columns",void 0),P([i.i(r.Property)(null)],t.prototype,"childMapping",void 0),P([i.i(r.Property)(null)],t.prototype,"hasChildMapping",void 0),P([i.i(r.Property)(0)],t.prototype,"treeColumnIndex",void 0),P([i.i(r.Property)(null)],t.prototype,"idMapping",void 0),P([i.i(r.Property)(null)],t.prototype,"parentIdMapping",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableCollapseAll",void 0),P([i.i(r.Property)(null)],t.prototype,"expandStateMapping",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowRowDragAndDrop",void 0),P([i.i(r.Property)([])],t.prototype,"dataSource",void 0),P([i.i(r.Property)()],t.prototype,"query",void 0),P([i.i(r.Property)()],t.prototype,"cloneQuery",void 0),P([i.i(r.Property)("AllPages")],t.prototype,"printMode",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowPaging",void 0),P([i.i(r.Property)(!1)],t.prototype,"loadChildOnDemand",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowTextWrap",void 0),P([i.i(r.Complex)({},d.a)],t.prototype,"textWrapSettings",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowReordering",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowResizing",void 0),P([i.i(r.Property)(!1)],t.prototype,"autoCheckHierarchy",void 0),P([i.i(r.Complex)({},R.a)],t.prototype,"pageSettings",void 0),P([i.i(r.Complex)({},o.RowDropSettings)],t.prototype,"rowDropSettings",void 0),P([i.i(r.Property)("USD")],t.prototype,"currencyCode",void 0),P([i.i(r.Property)()],t.prototype,"pagerTemplate",void 0),P([i.i(r.Property)(!1)],t.prototype,"showColumnMenu",void 0),P([i.i(r.Property)(!1)],t.prototype,"showColumnChooser",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowSorting",void 0),P([i.i(r.Property)(!0)],t.prototype,"allowMultiSorting",void 0),P([i.i(r.Complex)({},b.b)],t.prototype,"sortSettings",void 0),P([i.i(r.Collection)([],x.b)],t.prototype,"aggregates",void 0),P([i.i(r.Complex)({},C.a)],t.prototype,"editSettings",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowFiltering",void 0),P([i.i(r.Property)()],t.prototype,"detailTemplate",void 0),P([i.i(r.Complex)({},s.b)],t.prototype,"filterSettings",void 0),P([i.i(r.Complex)({},g.a)],t.prototype,"searchSettings",void 0),P([i.i(r.Property)()],t.prototype,"toolbar",void 0),P([i.i(r.Property)()],t.prototype,"toolbarTemplate",void 0),P([i.i(r.Property)("Default")],t.prototype,"gridLines",void 0),P([i.i(r.Property)()],t.prototype,"contextMenuItems",void 0),P([i.i(r.Property)()],t.prototype,"columnMenuItems",void 0),P([i.i(r.Property)()],t.prototype,"rowTemplate",void 0),P([i.i(r.Property)("Parent")],t.prototype,"copyHierarchyMode",void 0),P([i.i(r.Property)(null)],t.prototype,"rowHeight",void 0),P([i.i(r.Property)(!0)],t.prototype,"enableAltRow",void 0),P([i.i(r.Property)(!0)],t.prototype,"allowKeyboard",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableHover",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableAutoFill",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableAdaptiveUI",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableImmutableMode",void 0),P([i.i(r.Property)("auto")],t.prototype,"height",void 0),P([i.i(r.Property)("auto")],t.prototype,"width",void 0),P([i.i(r.Complex)({},a.a)],t.prototype,"loadingIndicator",void 0),P([i.i(r.Property)(!0)],t.prototype,"enableVirtualMaskRow",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableVirtualization",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableColumnVirtualization",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableHtmlSanitizer",void 0),P([i.i(r.Property)(!1)],t.prototype,"enableInfiniteScrolling",void 0),P([i.i(r.Complex)({},M.a)],t.prototype,"infiniteScrollSettings",void 0),P([i.i(r.Property)("All")],t.prototype,"columnQueryMode",void 0),P([i.i(r.Event)()],t.prototype,"created",void 0),P([i.i(r.Event)()],t.prototype,"load",void 0),P([i.i(r.Event)()],t.prototype,"expanding",void 0),P([i.i(r.Event)()],t.prototype,"expanded",void 0),P([i.i(r.Event)()],t.prototype,"collapsing",void 0),P([i.i(r.Event)()],t.prototype,"collapsed",void 0),P([i.i(r.Event)()],t.prototype,"cellSave",void 0),P([i.i(r.Event)()],t.prototype,"cellSaved",void 0),P([i.i(r.Event)()],t.prototype,"actionBegin",void 0),P([i.i(r.Event)()],t.prototype,"actionComplete",void 0),P([i.i(r.Event)()],t.prototype,"beginEdit",void 0),P([i.i(r.Event)()],t.prototype,"batchAdd",void 0),P([i.i(r.Event)()],t.prototype,"batchDelete",void 0),P([i.i(r.Event)()],t.prototype,"batchCancel",void 0),P([i.i(r.Event)()],t.prototype,"beforeBatchAdd",void 0),P([i.i(r.Event)()],t.prototype,"beforeBatchDelete",void 0),P([i.i(r.Event)()],t.prototype,"beforeBatchSave",void 0),P([i.i(r.Event)()],t.prototype,"cellEdit",void 0),P([i.i(r.Event)()],t.prototype,"actionFailure",void 0),P([i.i(r.Event)()],t.prototype,"dataBound",void 0),P([i.i(r.Event)()],t.prototype,"dataSourceChanged",void 0),P([i.i(r.Event)()],t.prototype,"dataStateChange",void 0),P([i.i(r.Event)()],t.prototype,"recordDoubleClick",void 0),P([i.i(r.Event)()],t.prototype,"rowDataBound",void 0),P([i.i(r.Event)()],t.prototype,"detailDataBound",void 0),P([i.i(r.Event)()],t.prototype,"queryCellInfo",void 0),P([i.i(r.Property)(!0)],t.prototype,"allowSelection",void 0),P([i.i(r.Event)()],t.prototype,"rowSelecting",void 0),P([i.i(r.Event)()],t.prototype,"rowSelected",void 0),P([i.i(r.Event)()],t.prototype,"rowDeselecting",void 0),P([i.i(r.Event)()],t.prototype,"rowDeselected",void 0),P([i.i(r.Event)()],t.prototype,"headerCellInfo",void 0),P([i.i(r.Event)()],t.prototype,"cellSelecting",void 0),P([i.i(r.Event)()],t.prototype,"columnMenuOpen",void 0),P([i.i(r.Event)()],t.prototype,"columnMenuClick",void 0),P([i.i(r.Event)()],t.prototype,"cellSelected",void 0),P([i.i(r.Event)()],t.prototype,"cellDeselecting",void 0),P([i.i(r.Event)()],t.prototype,"cellDeselected",void 0),P([i.i(r.Event)()],t.prototype,"resizeStart",void 0),P([i.i(r.Event)()],t.prototype,"resizing",void 0),P([i.i(r.Event)()],t.prototype,"resizeStop",void 0),P([i.i(r.Event)()],t.prototype,"columnDragStart",void 0),P([i.i(r.Event)()],t.prototype,"columnDrag",void 0),P([i.i(r.Event)()],t.prototype,"columnDrop",void 0),P([i.i(r.Event)()],t.prototype,"checkboxChange",void 0),P([i.i(r.Event)()],t.prototype,"printComplete",void 0),P([i.i(r.Event)()],t.prototype,"beforePrint",void 0),P([i.i(r.Event)()],t.prototype,"toolbarClick",void 0),P([i.i(r.Event)()],t.prototype,"beforeDataBound",void 0),P([i.i(r.Event)()],t.prototype,"contextMenuOpen",void 0),P([i.i(r.Event)()],t.prototype,"contextMenuClick",void 0),P([i.i(r.Event)()],t.prototype,"beforeCopy",void 0),P([i.i(r.Event)()],t.prototype,"beforePaste",void 0),P([i.i(r.Event)()],t.prototype,"rowDrag",void 0),P([i.i(r.Event)()],t.prototype,"rowDragStart",void 0),P([i.i(r.Event)()],t.prototype,"rowDragStartHelper",void 0),P([i.i(r.Event)()],t.prototype,"rowDrop",void 0),P([i.i(r.Property)(-1)],t.prototype,"selectedRowIndex",void 0),P([i.i(r.Complex)({},f.a)],t.prototype,"selectionSettings",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowExcelExport",void 0),P([i.i(r.Property)(!1)],t.prototype,"allowPdfExport",void 0),P([i.i(r.Event)()],t.prototype,"pdfQueryCellInfo",void 0),P([i.i(r.Event)()],t.prototype,"pdfHeaderQueryCellInfo",void 0),P([i.i(r.Event)()],t.prototype,"excelQueryCellInfo",void 0),P([i.i(r.Event)()],t.prototype,"excelHeaderQueryCellInfo",void 0),P([i.i(r.Event)()],t.prototype,"beforeExcelExport",void 0),P([i.i(r.Event)()],t.prototype,"excelExportComplete",void 0),P([i.i(r.Event)()],t.prototype,"beforePdfExport",void 0),P([i.i(r.Event)()],t.prototype,"pdfExportComplete",void 0),t=E=P([r.NotifyPropertyChanges],t)}(r.Component)},function(e,t,i){"use strict";var r=i(14);i.d(t,"a",function(){return r.a}),i.d(t,"b",function(){return r.b}),i.d(t,"c",function(){return r.c});var n=i(15);i.d(t,"d",function(){return n.a});var o=i(16);i.d(t,"e",function(){return o.a}),i.d(t,"f",function(){return o.b});var a=i(19);i.d(t,"g",function(){return a.a});var s=i(20);i.d(t,"h",function(){return s.a});var d=i(21);i.d(t,"i",function(){return d.a});var l=i(23);i.d(t,"j",function(){return l.a}),i.d(t,"k",function(){return l.b});var p=i(22);i.d(t,"l",function(){return p.a}),i.d(t,"m",function(){return p.b});var c=i(51);i.d(t,"n",function(){return c.a});var h=i(17);i.d(t,"o",function(){return h.a});var u=i(18);i.d(t,"p",function(){return u.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)()],t.prototype,"targetID",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(1),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),o([i.i(r.Property)("Both")],t.prototype,"wrapMode",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";var r=i(24);i.d(t,"a",function(){return r.a});var n=i(25);i.d(t,"b",function(){return n.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return p});var r=i(0),n=(i.n(r),i(2)),o=i(25),a=i(1),s=(i.n(a),i(4)),d=(i.n(s),i(3)),l=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),p=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.isExpandCollapse=!1,r.translateY=0,r.maxiPage=0,r.recordAdded=!1,r.startIndex=-1,r.endIndex=-1,r.preTranslate=0,r.isRemoteExpand=!1,r.isDataSourceChanged=!1,r.addEventListener(),r}return l(t,e),t.prototype.getModelGenerator=function(){return new o.a(this.parent)},t.prototype.getRowByIndex=function(e){return this.parent.enableVirtualization&&this.parent.isFrozenGrid()?this.getRowCollection(e,!0):this.parent.getDataRows().filter(function(t){return parseInt(t.getAttribute("data-rowindex"),10)===e})[0]},t.prototype.getFrozenRightVirtualRowByIndex=function(e){return this.getRowCollection(e,!1,!1,!0)},t.prototype.getRowCollection=function(e,t,i,r){var o=parseInt(this.parent.getRows()[0].getAttribute(n.g),10),a=this.parent.getDataRows(),s=i?this.parent.getCurrentViewRecords():a,d=s[e-o];return this.parent.frozenRows&&this.parent.pageSettings.currentPage>1&&(d=i?e<=this.parent.frozenRows?this.parent.getRowsObject()[parseInt(e.toString(),10)].data:d:e<=this.parent.frozenRows?a[parseInt(e.toString(),10)]:a[e-o+this.parent.frozenRows]),d},t.prototype.addEventListener=function(){this.parent.on(n.d,this.virtualOtherAction,this),this.parent.on(n.f,this.indexModifier,this)},t.prototype.virtualOtherAction=function(e){e.setTop?(this.translateY=0,this.startIndex=0,this.endIndex=this.parent.pageSettings.pageSize-1):e.isExpandCollapse&&(this.isExpandCollapse=!0)},t.prototype.indexModifier=function(e){var t=this.parent.getContent().querySelector(".e-content");if((this.recordAdded||"delete"===e.requestType&&this.endIndex>e.count-this.parent.pageSettings.pageSize)&&this.startIndex>-1&&this.endIndex>-1){if(this.endIndex>e.count-this.parent.pageSettings.pageSize){var i=~~(t.scrollTop/this.parent.getRowHeight()),r=i+this.parent.getRows().length;r>e.count&&(r=i+(e.count-i)),this.startIndex=r-this.parent.getRows().length,this.endIndex=r}else("Top"!==this.parent.root.editSettings.newRowPosition&&-1!==this.parent.root.editModule.selectedIndex||-1!==this.parent.root.editModule.selectedIndex)&&(this.startIndex+=1,this.endIndex+=1);this.recordAdded=!1}this.isDataSourceChanged&&(this.startIndex=0,this.endIndex=this.parent.pageSettings.pageSize-1),this.endIndex-this.startIndex!==this.parent.pageSettings.pageSize&&this.totalRecords>this.parent.pageSettings.pageSize&&this.endIndex===this.totalRecords?(e.startIndex=this.endIndex-this.parent.pageSettings.pageSize,e.endIndex=this.endIndex):(e.startIndex=this.startIndex,e.endIndex=this.endIndex)},t.prototype.eventListener=function(t){var r=this;this.parent.dataSource instanceof s.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url&&i.i(d.b)(this.parent)?e.prototype.eventListener.call(this,"on"):(this.parent[""+t]("data-ready",this.onDataReady,this),this.parent[""+t]("refresh-virtual-block",this.refreshContentRows,this),this.fn=function(){r.observers.observes(function(e){return r.scrollListeners(e)},r.onEnteredAction(),r.parent),r.parent.off("content-ready",r.fn)},this.parent.addEventListener("dataBound",this.dataBoundEvent.bind(this)),this.parent.addEventListener("rowSelected",this.rowSelectedEvent.bind(this)),this.parent[""+t]("select-virtual-Row",this.toSelectVirtualRow,this),this.parent.on("content-ready",this.fn,this),this.parent.addEventListener(n.h,this.onActionComplete.bind(this)),this.parent[""+t]("virtual-scroll-edit-action-begin",this.beginEdit,this),this.parent[""+t]("virtual-scroll-add-action-begin",this.beginAdd,this),this.parent[""+t]("virtual-scroll-edit-success",this.virtualEditSuccess,this),this.parent[""+t]("edit-reset",this.resetIseditValue,this),this.parent[""+t]("get-virtual-data",this.getData,this),this.parent[""+t]("virtual-scroll-edit-cancel",this.cancelEdit,this),this.parent[""+t]("select-row-on-context-open",this.toSelectRowOnContextOpen,this),this.parent[""+t]("refresh-virtual-editform-cells",this.refreshCell,this),this.parent[""+t]("virtaul-cell-focus",this.cellFocus,this))},t.prototype.cellFocus=function(t){e.prototype.virtualCellFocus.call(this,t)},t.prototype.onDataReady=function(t){if(e.prototype.onDataReady.call(this,t),!(this.parent.dataSource instanceof s.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url&&i.i(d.b)(this.parent))){if(!i.i(a.isNullOrUndefined)(t.count)){if(this.totalRecords=t.count,this.parent.isFrozenGrid()&&t.count<Object.keys(this.parent.dataSource).length){var r=this.parent.enableColumnVirtualization?this.getColumnOffset(this.parent.columns.length-1)+"px":"100%",n=this.parent.getRowHeight()*t.count-this.parent.getRowHeight()*this.parent.pageSettings.pageSize;i.i(a.getValue)("virtualEle",this).setVirtualHeight(n,r)}this.parent.enableColumnVirtualization||this.parent.isFrozenGrid()||i.i(a.getValue)("virtualEle",this).setVirtualHeight(this.parent.getRowHeight()*t.count,"100%")}(!i.i(a.isNullOrUndefined)(t.requestType)&&"collapseAll"===t.requestType.toString()||this.isDataSourceChanged&&(-1===this.startIndex||0===this.startIndex&&0===this.preStartIndex))&&(this.contents.scrollTop=0,this.isDataSourceChanged=!1)}},t.prototype.renderTable=function(){e.prototype.renderTable.call(this),this.parent.dataSource instanceof s.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url&&i.i(d.b)(this.parent)||(i.i(a.getValue)("observer",this).options.debounceEvent=!1,this.observers=new c(i.i(a.getValue)("observer",this).element,i.i(a.getValue)("observer",this).options),this.contents=this.getPanel().firstChild)},t.prototype.getTranslateY=function(t,r,n,o){return this.parent.dataSource instanceof s.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&!this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url||i.i(d.b)(this.parent)?this.isRemoteExpand?(this.isRemoteExpand=!1,this.preTranslate):(this.preTranslate=e.prototype.getTranslateY.call(this,t,r,n,o),e.prototype.getTranslateY.call(this,t,r,n,o)):e.prototype.getTranslateY.call(this,t,r,n,o)},t.prototype.dataBoundEvent=function(){if(!i.i(a.isNullOrUndefined)(this.parent.getRowByIndex(0))&&this.parent.getRows().length&&!this.initialRowTop){var t=this.parent.getRowByIndex(0).getBoundingClientRect().top,r=this.parent.element.getBoundingClientRect().top;this.initialRowTop=t>0?this.parent.getRowByIndex(0).getBoundingClientRect().top-r:this.content.getBoundingClientRect().top-this.parent.getRowByIndex(0).getBoundingClientRect().height}e.prototype.dataBound.call(this)},t.prototype.rowSelectedEvent=function(t){e.prototype.rowSelected.call(this,t)},t.prototype.toSelectVirtualRow=function(t){if(!this.parent.isEdit){i.i(a.isNullOrUndefined)(this.observer.containerRect)&&(this.observer.containerRect=this.observers.containerRect),(i.i(a.isNullOrUndefined)(this.parent.clipboardModule.treeGridParent.editModule)||0!==t.selectedIndex||i.i(a.isNullOrUndefined)(this.parent.clipboardModule.treeGridParent.editModule.addRowIndex))&&e.prototype.selectVirtualRow.call(this,t)}},t.prototype.refreshCell=function(e){e.cells=this.generateCells()},t.prototype.generateCells=function(){for(var e=[],t=0;t<this.parent.columns.length;t++)e.push(this.generateCell(this.parent.columns[parseInt(t.toString(),10)]));return e},t.prototype.generateCell=function(e,t,n,o,s,d){var l={visible:e.visible,isDataCell:!i.i(a.isNullOrUndefined)(e.field||e.template),isTemplate:!i.i(a.isNullOrUndefined)(e.template),rowID:t,column:e,cellType:i.i(a.isNullOrUndefined)(n)?r.CellType.Data:n,colSpan:o,commands:e.commands,isForeignKey:e.isForeignColumn&&e.isForeignColumn(),foreignKeyData:e.isForeignColumn&&e.isForeignColumn()&&i.i(a.getValue)(e.field,d)};return(l.isDataCell||"checkbox"===l.column.type||l.commands)&&(l.index=s),new r.Cell(l)},t.prototype.beginEdit=function(e){this.editedRowIndex=e.index;var t='.e-row[data-rowindex="'+e.index+'"]',i=this.parent.getContent().querySelector(t).rowIndex,r=this.parent.getCurrentViewRecords()[parseInt(i.toString(),10)];e.data=r},t.prototype.beginAdd=function(t){var i={newRowPosition:this.rowPosition,addRowIndex:this.addRowIndex,dataRowIndex:this.dataRowIndex};this.parent.notify("get-row-position",i),this.rowPosition=i.newRowPosition,this.addRowIndex=i.addRowIndex,this.dataRowIndex=i.dataRowIndex;var r=this.parent.getRows(),n=r.length?+r[0].getAttribute("data-rowindex"):0,o=r.length?+r[r.length-1].getAttribute("data-rowindex"):0,a=this.parent.selectedRowIndex>=n&&this.parent.selectedRowIndex<=o;"Top"!==this.rowPosition&&"Bottom"!==this.rowPosition&&(this.isAdd=!0),"Top"!==this.rowPosition&&"Bottom"!==this.rowPosition&&(this.addRowIndex&&-1!==this.addRowIndex||-1!==this.parent.selectedRowIndex&&a)||e.prototype.addActionBegin.call(this,t)},t.prototype.restoreEditState=function(){e.prototype.restoreEdit.call(this)},t.prototype.resetIseditValue=function(){this.parent.notify("reset-edit-props",{}),"Top"!==this.rowPosition&&"Bottom"!==this.rowPosition||!this.isAdd||e.prototype.resetIsedit.call(this)},t.prototype.virtualEditSuccess=function(){var e=this.parent.getContent().querySelector(".e-content");this.isAdd&&e.querySelector(".e-addedrow")&&(this.recordAdded=!0)},t.prototype.cancelEdit=function(t){e.prototype.editCancel.call(this,t)},t.prototype.toSelectRowOnContextOpen=function(t){e.prototype.selectRowOnContextOpen.call(this,t)},t.prototype.restoreNewRow=function(){var e=this.parent.getContent().querySelector(".e-content");this.isAdd&&!e.querySelector(".e-addedrow")&&(this.parent.isEdit=!1,this.parent.editModule.addRecord(null,this.parent.root.editModule.selectedIndex))},t.prototype.getData=function(t){e.prototype.getVirtualData.call(this,t)},t.prototype.onActionComplete=function(t){if("add"===t.requestType){var i={newRowPosition:this.rowPosition,addRowIndex:this.addRowIndex,dataRowIndex:this.dataRowIndex};this.parent.notify("get-row-position",i),this.rowPosition=i.newRowPosition,this.addRowIndex=i.addRowIndex,this.dataRowIndex=this.parent.root.editModule.selectedIndex}e.prototype.actionComplete.call(this,t)},t.prototype.onEnteredAction=function(){var e=this;return function(t,i,r,n,o,s){if(!e.parent.directVirtualRender){!a.Browser.isIE||o||!s||e.preventEvent||e.parent.enableVirtualMaskRow||e.parent.showSpinner(),e.parent.enableVirtualMaskRow&&!e.preventEvent&&setTimeout(function(){e.parent.showMaskRow(i.axis),e.parent.notify("showGanttShimmer",{requestType:"showShimmer"})},0);var d=e.content.getBoundingClientRect().height,l=e.prevInfo.offsets?e.prevInfo.offsets.top:null,p="X"===i.axis,c=e.getColumnOffset(p?e.vgenerator.getColumnIndexes()[0]-1:e.prevInfo.columnIndexes[0]-1);if(p){var h=Object.keys(e.vgenerator.cOffsets).length-e.prevInfo.columnIndexes.length,u=e.vgenerator.cOffsets[h-1];c=c>u?u:c}var g=e.getTranslateY(n.top,d,p&&l===n.top?e.prevInfo:void 0,!0);if(!e.parent.isFrozenGrid()||e.parent.enableVirtualMaskRow){if(e.parent.enableVirtualMaskRow){var f=n.top-e.translateY<0;g=Math.round(e.translateY)>g&&!f?Math.round(e.translateY):g,e.virtualEle.adjustTable(c,g)}else e.virtualEle.adjustTable(c,e.translateY);e.parent.enableColumnVirtualization&&e.header.virtualEle.adjustTable(c,0)}}}},t.prototype.scrollListeners=function(e){this.scrollAfterEdit();var t=e.sentinel,r=this.parent.getRowHeight(),n=this.parent.pageSettings.pageSize-Math.ceil(this.parent.pageSettings.pageSize/2),o=this.parent.getContent().querySelector(".e-content"),l=n*r,p=e.offset.top-this.translateY<0,c=Math.ceil(e.offset.top-this.translateY)+r>=l,h=this.parent.currentViewData;if(p&&"right"!==e.direction&&"left"!==e.direction){var u=+(this.parent.height.toString().indexOf("%")<0?parseInt(this.parent.height.toString(),10):this.parent.element.getBoundingClientRect().height),g=~~(o.scrollTop/r)+Math.ceil(u/r)-this.parent.pageSettings.pageSize;if(g=g>0?g:0,i.i(a.isNullOrUndefined)(this.selectedRowIndex)||-1===this.selectedRowIndex||g===this.selectedRowIndex||(g=this.selectedRowIndex),this.startIndex=g,this.endIndex=g+this.parent.pageSettings.pageSize,this.endIndex>this.totalRecords){var f=this.totalRecords-1,y=this.endIndex%f;this.endIndex=f,this.startIndex=this.startIndex-y<0?0:this.startIndex-y}h.length&&h[0].index>=this.parent.pageSettings.pageSize/2&&h[0].index-this.startIndex<this.parent.pageSettings.pageSize/2&&this.parent.selectionModule.isRowSelected&&(this.startIndex=h[0].index-this.parent.pageSettings.pageSize/2,this.endIndex=this.startIndex+this.parent.pageSettings.pageSize);var m=Math.ceil(e.offset.top/r);m%=this.parent.pageSettings.pageSize;var v=0;if(!i.i(a.isNullOrUndefined)(this.parent.getRows()[parseInt(m.toString(),10)])&&!i.i(a.isNullOrUndefined)(this.parent.getContent().querySelectorAll(".e-content tr")[parseInt(m.toString(),10)])){v=+this.parent.getContent().querySelectorAll(".e-content tr")[parseInt(m.toString(),10)].querySelector("td").getAttribute("index")}0===v?(e.offset.top=o.scrollTop,this.parent.allowRowDragAndDrop?this.translateY=e.offset.top-2*r:this.translateY=e.offset.top):this.translateY=e.offset.top-n*r>0?e.offset.top-n*r+10:0}else if(c&&"right"!==e.direction&&"left"!==e.direction){var S=~~(o.scrollTop/r),I=!(this.selectedRowIndex+this.parent.pageSettings.pageSize<this.totalRecords);i.i(a.isNullOrUndefined)(this.selectedRowIndex)||-1===this.selectedRowIndex||S===this.selectedRowIndex||I||(S=this.selectedRowIndex);var w=S+this.parent.pageSettings.pageSize;w>this.totalRecords&&(w=S+(this.totalRecords-S)),this.startIndex=!I||i.i(a.isNullOrUndefined)(this.selectedRowIndex)?w-this.parent.pageSettings.pageSize:S,this.endIndex=w,S+this.parent.pageSettings.pageSize>this.totalRecords&&this.endIndex-this.startIndex<this.parent.pageSettings.pageSize/2&&this.endIndex-S<this.parent.pageSettings.pageSize/2&&(this.startIndex=w-this.parent.pageSettings.pageSize/2),h.length&&this.startIndex>h[0].index&&this.startIndex-h[0].index<this.parent.pageSettings.pageSize/2&&this.parent.selectionModule.isRowSelected&&(this.startIndex=h[0].index+this.parent.pageSettings.pageSize/2),e.offset.top>r*this.totalRecords?this.translateY=this.getTranslateY(e.offset.top,o.getBoundingClientRect().height):this.totalRecords===this.endIndex?this.translateY=this.totalRecords*r-(this.endIndex-this.startIndex)*r:this.parent.allowRowDragAndDrop?this.translateY=e.offset.top-2*r:this.translateY=e.offset.top}if(c&&e.offset.top<r*this.totalRecords||p||"right"===e.direction||"left"===e.direction||this.parent.dataSource instanceof s.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&!this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url&&(c||p)||i.i(d.b)(this.parent)){var R=this.currentInfo=i.i(a.getValue)("getInfoFromView",this).apply(this,[e.direction,t,e.offset]);this.previousInfo=R,this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization?R.columnIndexes:[]);var x=R.loadNext&&!R.loadSelf?R.nextInfo.page:R.page;this.parent.setProperties({pageSettings:{currentPage:x}},!0),this.requestType="virtualscroll","right"!==e.direction&&"left"!==e.direction&&(R.event="refresh-virtual-block"===R.event?"model-changed":R.event),this.parent.enableVirtualMaskRow&&(this.parent.showMaskRow(t.axis),this.parent.addShimmerEffect(),this.parent.notify("showGanttShimmer",{requestType:"showShimmer"})),this.parent.notify(R.event,{requestType:"virtualscroll",virtualInfo:R,focusElement:e.focusElement})}else this.parent.enableVirtualMaskRow&&(this.parent.removeMaskRow(),this.parent.notify("removeGanttShimmer",{requestType:"hideShimmer"}))},t.prototype.appendContent=function(t,r,o){if(this.parent.dataSource instanceof s.DataManager&&void 0!==this.parent.dataSource.dataSource.url&&!this.parent.dataSource.dataSource.offline&&""!==this.parent.dataSource.dataSource.url||i.i(d.b)(this.parent)||this.parent.isFrozenGrid())i.i(a.getValue)("isExpandCollapse",o)&&(this.isRemoteExpand=!0),e.prototype.appendContent.call(this,t,r,o),-1!==i.i(a.getValue)("requestTypes",this).indexOf("isFrozen")&&(i.i(a.getValue)("requestTypes",this).splice(i.i(a.getValue)("requestTypes",this).indexOf("isFrozen"),1),this.requestType="isFrozen"===this.requestType?void 0:this.requestType);else{var l=o.virtualInfo.sentinelInfo&&"Y"===o.virtualInfo.sentinelInfo.axis&&i.i(a.getValue)("currentInfo",this).page&&i.i(a.getValue)("currentInfo",this).page!==o.virtualInfo.page?i.i(a.getValue)("currentInfo",this):o.virtualInfo,p=l.columnIndexes[0]-1,c=this.getColumnOffset(p),h=void 0;if(this.parent.enableColumnVirtualization){this.header.virtualEle.adjustTable(c,0);var u=l.columnIndexes;h=this.getColumnOffset(u[u.length-1])-this.getColumnOffset(u[0]-1)+"",this.header.virtualEle.setWrapperWidth(h)}this.virtualEle.setWrapperWidth(h,a.Browser.isIE||"edge"===a.Browser.info.name),t=this.parent.createElement("tbody"),t.appendChild(r);this.getTable().querySelector("tbody").replaceWith(t),this.isExpandCollapse&&0!==this.translateY?this.isExpandCollapse=!1:(this.translateY=this.translateY<0?0:this.translateY,i.i(a.getValue)("virtualEle",this).adjustTable(c,this.translateY)),i.i(a.setValue)("prevInfo",this.previousInfo?this.previousInfo:l,this),"virtualscroll"===o.requestType&&"X"===o.virtualInfo.sentinelInfo.axis&&this.parent.notify(n.i,{});e.prototype.focusCell.call(this,o);this.isAdd&&!this.parent.getContent().querySelector(".e-content").querySelector(".e-addedrow")&&"Top"!==this.rowPosition&&"Bottom"!==this.rowPosition&&(this.dataRowIndex>=this.startIndex?this.restoreNewRow():this.addRowIndex&&this.addRowIndex>-1&&(this.isAdd=!1,this.parent.isEdit=!1)),this.restoreEditState(),e.prototype.restoreAdd.call(this),e.prototype.ensureSelectedRowPosition.call(this)}},t.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("data-ready",this.onDataReady),this.parent.off("content-ready",this.fn),this.parent.off("select-virtual-Row",this.toSelectVirtualRow),this.parent.off("dataBound",this.dataBoundEvent),this.parent.off("rowSelected",this.rowSelectedEvent),this.parent.off(n.d,this.virtualOtherAction),this.parent.off(n.f,this.indexModifier),this.parent.off("virtual-scroll-edit-action-begin",this.beginEdit),this.parent.off("virtual-scroll-add-action-begin",this.beginAdd),this.parent.off("virtual-scroll-edit-success",this.virtualEditSuccess),this.parent.off("edit-reset",this.resetIseditValue),this.parent.off("get-virtual-data",this.getData),this.parent.off("virtual-scroll-edit-cancel",this.cancelEdit),this.parent.off("select-row-on-context-open",this.toSelectRowOnContextOpen),this.parent.off("refresh-virtual-editform-cells",this.refreshCell),this.parent.off("virtaul-cell-focus",this.cellFocus))},t}(r.VirtualContentRenderer),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isWheeling=!1,t.newPos=0,t.lastPos=0,t.timer=0,t}return l(t,e),t.prototype.observes=function(t,r,n){if(e.prototype.containerRect=i.i(a.getValue)("options",this).container.getBoundingClientRect(),a.EventHandler.add(i.i(a.getValue)("options",this).container,"scroll",this.virtualScrollHandlers(t,r,n),this),i.i(a.getValue)("options",this).movableContainer){e.prototype.movableContainerRect=i.i(a.getValue)("options",this).movableContainer.getBoundingClientRect(),a.EventHandler.add(i.i(a.getValue)("options",this).movableContainer,"scroll",this.virtualScrollHandlers(t,r,n),this)}},t.prototype.clear=function(){this.lastPos=null},t.prototype.virtualScrollHandlers=function(e,t,r){var n=this,o="chrome"===a.Browser.info.name?200:100,l=i.i(a.debounce)(e,o),p=i.i(a.debounce)(e,50);return this.options.prevTop=this.options.prevLeft=0,function(o){var a=n.options.movableContainer?n.options.container.scrollTop:o.target.scrollTop,c=n.options.movableContainer?n.options.scrollbar.scrollLeft:o.target.scrollLeft,h=n.options.prevTop<a?"down":"up";h=n.options.prevLeft===c?h:n.options.prevLeft<c?"right":"left",n.options.prevTop=a,n.options.prevLeft=c;var u=n.sentinelInfo[""+h],g=0;if(n.newPos=a,null!=n.lastPos&&(g=n.newPos-n.lastPos),n.lastPos=n.newPos,n.timer&&clearTimeout(n.timer),n.timer=setTimeout(n.clear,0),(g>100||g<-100)&&o&&o.preventDefault&&(o.returnValue=!1,o.preventDefault()),-1!==n.options.axes.indexOf(u.axis)){n.containerRect=n.options.container.getBoundingClientRect();var f=n.check(h);if(u.entered&&("X"===u.axis||r.enableVirtualMaskRow)&&(!n.movableEle||"right"!==h&&"left"!==h?t(n.element,u,h,{top:a,left:c},n.fromWheel,f):t(n.movableEle,u,h,{top:a,left:c},n.fromWheel,f)),f){var y=p;"X"===u.axis?y({direction:h,sentinel:u,offset:{top:a,left:c},focusElement:document.activeElement}):r.dataSource instanceof s.DataManager&&void 0!==r.dataSource.dataSource.url&&!r.dataSource.dataSource.offline&&""!==r.dataSource.dataSource.url||i.i(d.b)(r)||r.enableVirtualMaskRow?(y=r.enableVirtualMaskRow?l:y)({direction:h,sentinel:u,offset:{top:a,left:c},focusElement:document.activeElement}):e({direction:h,sentinel:u,offset:{top:a,left:c},focusElement:document.activeElement})}n.fromWheel=!1}}},t}(r.InterSectionObserver)},function(e,t){e.exports=n}])});