@limetech/lime-elements 38.34.0 → 38.35.0

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 (115) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/lime-elements.cjs.js +1 -1
  3. package/dist/cjs/limel-action-bar_2.cjs.entry.js +1 -1
  4. package/dist/cjs/limel-ai-avatar.cjs.entry.js +1 -1
  5. package/dist/cjs/limel-callout.cjs.entry.js +1 -1
  6. package/dist/cjs/limel-chart.cjs.entry.js +7 -4
  7. package/dist/cjs/limel-chart.cjs.entry.js.map +1 -1
  8. package/dist/cjs/limel-chip_2.cjs.entry.js +1 -1
  9. package/dist/cjs/limel-collapsible-section.cjs.entry.js +1 -1
  10. package/dist/cjs/limel-drag-handle.cjs.entry.js +1 -1
  11. package/dist/cjs/limel-file-viewer.cjs.entry.js +1 -1
  12. package/dist/cjs/limel-file.cjs.entry.js +1 -1
  13. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
  14. package/dist/cjs/limel-linear-progress.cjs.entry.js +1 -1
  15. package/dist/cjs/limel-list-item.cjs.entry.js +1 -1
  16. package/dist/cjs/limel-profile-picture.cjs.entry.js +1 -1
  17. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
  18. package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
  19. package/dist/cjs/limel-table.cjs.entry.js +1 -1
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/cjs/{translations-a42886f2.js → translations-e58b6da5.js} +9 -1
  22. package/dist/cjs/translations-e58b6da5.js.map +1 -0
  23. package/dist/collection/components/chart/chart.css +53 -0
  24. package/dist/collection/components/chart/chart.js +42 -3
  25. package/dist/collection/components/chart/chart.js.map +1 -1
  26. package/dist/collection/translations/da.js +1 -0
  27. package/dist/collection/translations/da.js.map +1 -1
  28. package/dist/collection/translations/de.js +1 -0
  29. package/dist/collection/translations/de.js.map +1 -1
  30. package/dist/collection/translations/en.js +1 -0
  31. package/dist/collection/translations/en.js.map +1 -1
  32. package/dist/collection/translations/fi.js +1 -0
  33. package/dist/collection/translations/fi.js.map +1 -1
  34. package/dist/collection/translations/fr.js +1 -0
  35. package/dist/collection/translations/fr.js.map +1 -1
  36. package/dist/collection/translations/nl.js +1 -0
  37. package/dist/collection/translations/nl.js.map +1 -1
  38. package/dist/collection/translations/no.js +1 -0
  39. package/dist/collection/translations/no.js.map +1 -1
  40. package/dist/collection/translations/sv.js +1 -0
  41. package/dist/collection/translations/sv.js.map +1 -1
  42. package/dist/esm/lime-elements.js +1 -1
  43. package/dist/esm/limel-action-bar_2.entry.js +1 -1
  44. package/dist/esm/limel-ai-avatar.entry.js +1 -1
  45. package/dist/esm/limel-callout.entry.js +1 -1
  46. package/dist/esm/limel-chart.entry.js +7 -4
  47. package/dist/esm/limel-chart.entry.js.map +1 -1
  48. package/dist/esm/limel-chip_2.entry.js +1 -1
  49. package/dist/esm/limel-collapsible-section.entry.js +1 -1
  50. package/dist/esm/limel-drag-handle.entry.js +1 -1
  51. package/dist/esm/limel-file-viewer.entry.js +1 -1
  52. package/dist/esm/limel-file.entry.js +1 -1
  53. package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
  54. package/dist/esm/limel-linear-progress.entry.js +1 -1
  55. package/dist/esm/limel-list-item.entry.js +1 -1
  56. package/dist/esm/limel-profile-picture.entry.js +1 -1
  57. package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
  58. package/dist/esm/limel-snackbar.entry.js +1 -1
  59. package/dist/esm/limel-table.entry.js +1 -1
  60. package/dist/esm/loader.js +1 -1
  61. package/dist/esm/{translations-9bfde9f4.js → translations-4151479a.js} +9 -1
  62. package/dist/esm/translations-4151479a.js.map +1 -0
  63. package/dist/lime-elements/lime-elements.esm.js +1 -1
  64. package/dist/lime-elements/lime-elements.esm.js.map +1 -1
  65. package/dist/lime-elements/{p-ee5c4112.entry.js → p-13bd2797.entry.js} +2 -2
  66. package/dist/lime-elements/{p-df9bcace.entry.js → p-158897dd.entry.js} +2 -2
  67. package/dist/lime-elements/{p-e00465fa.entry.js → p-182ce303.entry.js} +2 -2
  68. package/dist/lime-elements/{p-d79c85e2.entry.js → p-23de215d.entry.js} +2 -2
  69. package/dist/lime-elements/{p-8ea3b80a.entry.js → p-3746c217.entry.js} +2 -2
  70. package/dist/lime-elements/{p-aa1e7319.entry.js → p-61b2e426.entry.js} +2 -2
  71. package/dist/lime-elements/{p-92aa9610.entry.js → p-68799403.entry.js} +2 -2
  72. package/dist/lime-elements/{p-3311eaf3.entry.js → p-6d9fb8e8.entry.js} +2 -2
  73. package/dist/lime-elements/{p-fbac230b.entry.js → p-7da20f22.entry.js} +2 -2
  74. package/dist/lime-elements/{p-cd2f780a.entry.js → p-7e1a548a.entry.js} +2 -2
  75. package/dist/lime-elements/{p-b0acf522.entry.js → p-99f5e70b.entry.js} +2 -2
  76. package/dist/lime-elements/{p-40542ccc.entry.js → p-bf527989.entry.js} +2 -2
  77. package/dist/lime-elements/p-c582027f.js +2 -0
  78. package/dist/lime-elements/p-c582027f.js.map +1 -0
  79. package/dist/lime-elements/{p-31f1cb08.entry.js → p-d76d70ce.entry.js} +2 -2
  80. package/dist/lime-elements/p-dc55f5ca.entry.js +2 -0
  81. package/dist/lime-elements/p-dc55f5ca.entry.js.map +1 -0
  82. package/dist/lime-elements/{p-5e976a59.entry.js → p-f529b510.entry.js} +2 -2
  83. package/dist/lime-elements/{p-42e889d8.entry.js → p-ffedb0be.entry.js} +2 -2
  84. package/dist/types/components/chart/chart.d.ts +13 -0
  85. package/dist/types/components.d.ts +22 -2
  86. package/dist/types/translations/da.d.ts +1 -0
  87. package/dist/types/translations/de.d.ts +1 -0
  88. package/dist/types/translations/en.d.ts +1 -0
  89. package/dist/types/translations/fi.d.ts +1 -0
  90. package/dist/types/translations/fr.d.ts +1 -0
  91. package/dist/types/translations/nl.d.ts +1 -0
  92. package/dist/types/translations/no.d.ts +1 -0
  93. package/dist/types/translations/sv.d.ts +1 -0
  94. package/package.json +1 -1
  95. package/dist/cjs/translations-a42886f2.js.map +0 -1
  96. package/dist/esm/translations-9bfde9f4.js.map +0 -1
  97. package/dist/lime-elements/p-5df2361b.js +0 -2
  98. package/dist/lime-elements/p-5df2361b.js.map +0 -1
  99. package/dist/lime-elements/p-84e00842.entry.js +0 -2
  100. package/dist/lime-elements/p-84e00842.entry.js.map +0 -1
  101. /package/dist/lime-elements/{p-ee5c4112.entry.js.map → p-13bd2797.entry.js.map} +0 -0
  102. /package/dist/lime-elements/{p-df9bcace.entry.js.map → p-158897dd.entry.js.map} +0 -0
  103. /package/dist/lime-elements/{p-e00465fa.entry.js.map → p-182ce303.entry.js.map} +0 -0
  104. /package/dist/lime-elements/{p-d79c85e2.entry.js.map → p-23de215d.entry.js.map} +0 -0
  105. /package/dist/lime-elements/{p-8ea3b80a.entry.js.map → p-3746c217.entry.js.map} +0 -0
  106. /package/dist/lime-elements/{p-aa1e7319.entry.js.map → p-61b2e426.entry.js.map} +0 -0
  107. /package/dist/lime-elements/{p-92aa9610.entry.js.map → p-68799403.entry.js.map} +0 -0
  108. /package/dist/lime-elements/{p-3311eaf3.entry.js.map → p-6d9fb8e8.entry.js.map} +0 -0
  109. /package/dist/lime-elements/{p-fbac230b.entry.js.map → p-7da20f22.entry.js.map} +0 -0
  110. /package/dist/lime-elements/{p-cd2f780a.entry.js.map → p-7e1a548a.entry.js.map} +0 -0
  111. /package/dist/lime-elements/{p-b0acf522.entry.js.map → p-99f5e70b.entry.js.map} +0 -0
  112. /package/dist/lime-elements/{p-40542ccc.entry.js.map → p-bf527989.entry.js.map} +0 -0
  113. /package/dist/lime-elements/{p-31f1cb08.entry.js.map → p-d76d70ce.entry.js.map} +0 -0
  114. /package/dist/lime-elements/{p-5e976a59.entry.js.map → p-f529b510.entry.js.map} +0 -0
  115. /package/dist/lime-elements/{p-42e889d8.entry.js.map → p-ffedb0be.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as t,c as r,h as n,H as o,g as s}from"./p-288f0842.js";import{a}from"./p-669626e5.js";import{h as u,c as l,a as f,d as h,b as c}from"./p-18973354.js";import{a as d}from"./p-50bd0336.js";import{a as b}from"./p-9acf7b5d.js";import{i as p}from"./p-c93050d6.js";import{g as v}from"./p-7f49c7da.js";import{n as m}from"./p-64122988.js";import{i as g}from"./p-6ebb1f7c.js";import{t as w}from"./p-5df2361b.js";import"./p-2cdaeb7b.js";import"./p-eda23c05.js";import"./p-4c3358cb.js";import"./p-0b1af919.js";import"./p-858c6b82.js";import"./p-d529bb7d.js";import"./p-5467ea06.js";import"./p-5fdb83c9.js";import"./p-4f093090.js";var y=Object.prototype;var x=y.hasOwnProperty;function k(t,i){return t!=null&&x.call(t,i)}function C(t,i){return t!=null&&u(t,i,k)}function E(t,i,e,r){if(!p(t)){return t}i=l(i,t);var n=-1,o=i.length,s=o-1,a=t;while(a!=null&&++n<o){var u=f(i[n]),h=e;if(u==="__proto__"||u==="constructor"||u==="prototype"){return t}if(n!=s){var c=a[u];h=r?r(c,u,a):undefined;if(h===undefined){h=p(c)?c:b(i[n+1])?[]:{}}}d(a,u,h);a=a[u]}return t}function j(t,i,e){var r=-1,n=i.length,o={};while(++r<n){var s=i[r],a=h(t,s);if(e(a,s)){E(o,l(s,t),a)}}return o}function z(t,i){if(t==null){return{}}var e=a(v(t),(function(t){return[t]}));i=c(i);return j(t,e,(function(t,e){return i(t,e[0])}))}var T=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};if(!Array.prototype.findIndex){Object.defineProperty(Array.prototype,"findIndex",{value:function t(i){if(this==null){throw new TypeError('"this" is null or not defined')}var e=Object(this);var r=e.length>>>0;if(typeof i!=="function"){throw new TypeError("predicate must be a function")}var n=arguments[1];var o=0;while(o<r){var s=e[o];if(i.call(n,s,o,e)){return o}o++}return-1}})}if(!Array.prototype.find){Object.defineProperty(Array.prototype,"find",{value:function t(i){if(this==null){throw new TypeError('"this" is null or not defined')}var e=Object(this);var r=e.length>>>0;if(typeof i!=="function"){throw new TypeError("predicate must be a function")}var n=arguments[1];var o=0;while(o<r){var s=e[o];if(i.call(n,s,o,e)){return s}o++}return undefined}})}if(!String.prototype.includes){String.prototype.includes=function(t,i){if(t instanceof RegExp){throw TypeError("first argument must not be a RegExp")}if(i===undefined){i=0}return this.indexOf(t,i)!==-1}}if(!Array.prototype.includes){Object.defineProperty(Array.prototype,"includes",{value:function t(i,e){if(this==null){throw new TypeError('"this" is null or not defined')}var r=Object(this);var n=r.length>>>0;if(n===0){return false}var o=e|0;var s=Math.max(o>=0?o:n-Math.abs(o),0);function a(t,i){return t===i||typeof t==="number"&&typeof i==="number"&&isNaN(t)&&isNaN(i)}while(s<n){if(a(r[s],i)){return true}s++}return false}})}if(typeof Object.assign!=="function"){Object.defineProperty(Object,"assign",{value:function t(i,e){if(i===null||i===undefined){throw new TypeError("Cannot convert undefined or null to object")}var r=Object(i);for(var n=1;n<arguments.length;n++){var o=arguments[n];if(o!==null&&o!==undefined){for(var s in o){if(Object.prototype.hasOwnProperty.call(o,s)){r[s]=o[s]}}}}return r},writable:true,configurable:true})}var S=function t(i){this.table=i;this.blockHozScrollEvent=false;this.headersElement=this.createHeadersElement();this.element=this.createHeaderElement();this.rowManager=null;this.columns=[];this.columnsByIndex=[];this.columnsByField={};this.scrollLeft=0;this.element.insertBefore(this.headersElement,this.element.firstChild)};S.prototype.createHeadersElement=function(){var t=document.createElement("div");t.classList.add("tabulator-headers");return t};S.prototype.createHeaderElement=function(){var t=document.createElement("div");t.classList.add("tabulator-header");if(!this.table.options.headerVisible){t.classList.add("tabulator-header-hidden")}return t};S.prototype.initialize=function(){};S.prototype.setRowManager=function(t){this.rowManager=t};S.prototype.getElement=function(){return this.element};S.prototype.getHeadersElement=function(){return this.headersElement};S.prototype.scrollHorizontal=function(t){var i=0,e=this.element.scrollWidth-this.table.element.clientWidth;this.element.scrollLeft=t;if(t>e){i=t-e;this.element.style.marginLeft=-i+"px"}else{this.element.style.marginLeft=0}this.scrollLeft=t;if(this.table.modExists("frozenColumns")){this.table.modules.frozenColumns.scrollHorizontal()}};S.prototype.generateColumnsFromRowData=function(t){var i=[],e=this.table.options.autoColumnsDefinitions,r,n;if(t&&t.length){r=t[0];for(var o in r){var s={field:o,title:o};var a=r[o];switch(typeof a==="undefined"?"undefined":T(a)){case"undefined":n="string";break;case"boolean":n="boolean";break;case"object":if(Array.isArray(a)){n="array"}else{n="string"}break;default:if(!isNaN(a)&&a!==""){n="number"}else{if(a.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){n="alphanum"}else{n="string"}}break}s.sorter=n;i.push(s)}if(e){switch(typeof e==="undefined"?"undefined":T(e)){case"function":this.table.options.columns=e.call(this.table,i);break;case"object":if(Array.isArray(e)){i.forEach((function(t){var i=e.find((function(i){return i.field===t.field}));if(i){Object.assign(t,i)}}))}else{i.forEach((function(t){if(e[t.field]){Object.assign(t,e[t.field])}}))}this.table.options.columns=i;break}}else{this.table.options.columns=i}this.setColumns(this.table.options.columns)}};S.prototype.setColumns=function(t,i){var e=this;while(e.headersElement.firstChild){e.headersElement.removeChild(e.headersElement.firstChild)}e.columns=[];e.columnsByIndex=[];e.columnsByField={};if(e.table.modExists("frozenColumns")){e.table.modules.frozenColumns.reset()}t.forEach((function(t,i){e._addColumn(t)}));e._reIndexColumns();if(e.table.options.responsiveLayout&&e.table.modExists("responsiveLayout",true)){e.table.modules.responsiveLayout.initialize()}if(this.table.options.virtualDomHoz){this.table.vdomHoz.reinitialize(false,true)}e.redraw(true)};S.prototype._addColumn=function(t,i,e){var r=new N(t,this),n=r.getElement(),o=e?this.findColumnIndex(e):e;if(e&&o>-1){var s=this.columns.indexOf(e.getTopColumn());var a=e.getElement();if(i){this.columns.splice(s,0,r);a.parentNode.insertBefore(n,a)}else{this.columns.splice(s+1,0,r);a.parentNode.insertBefore(n,a.nextSibling)}}else{if(i){this.columns.unshift(r);this.headersElement.insertBefore(r.getElement(),this.headersElement.firstChild)}else{this.columns.push(r);this.headersElement.appendChild(r.getElement())}r.columnRendered()}return r};S.prototype.registerColumnField=function(t){if(t.definition.field){this.columnsByField[t.definition.field]=t}};S.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)};S.prototype._reIndexColumns=function(){this.columnsByIndex=[];this.columns.forEach((function(t){t.reRegisterPosition()}))};S.prototype._verticalAlignHeaders=function(){var t=this,i=0;t.columns.forEach((function(t){var e;t.clearVerticalAlign();e=t.getHeight();if(e>i){i=e}}));t.columns.forEach((function(e){e.verticalAlign(t.table.options.columnHeaderVertAlign,i)}));t.rowManager.adjustTableSize()};S.prototype.findColumn=function(t){var i=this;if((typeof t==="undefined"?"undefined":T(t))=="object"){if(t instanceof N){return t}else if(t instanceof R){return t._getSelf()||false}else if(typeof HTMLElement!=="undefined"&&t instanceof HTMLElement){var e=i.columns.find((function(i){return i.element===t}));return e||false}}else{return this.columnsByField[t]||false}return false};S.prototype.getColumnByField=function(t){return this.columnsByField[t]};S.prototype.getColumnsByFieldRoot=function(t){var i=this;var e=[];Object.keys(this.columnsByField).forEach((function(r){var n=r.split(".")[0];if(n===t){e.push(i.columnsByField[r])}}));return e};S.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]};S.prototype.getFirstVisibileColumn=function(t){var t=this.columnsByIndex.findIndex((function(t){return t.visible}));return t>-1?this.columnsByIndex[t]:false};S.prototype.getColumns=function(){return this.columns};S.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex((function(i){return t===i}))};S.prototype.getRealColumns=function(){return this.columnsByIndex};S.prototype.traverse=function(t){var i=this;i.columnsByIndex.forEach((function(i,e){t(i,e)}))};S.prototype.getDefinitions=function(t){var i=this,e=[];i.columnsByIndex.forEach((function(i){if(!t||t&&i.visible){e.push(i.getDefinition())}}));return e};S.prototype.getDefinitionTree=function(){var t=this,i=[];t.columns.forEach((function(t){i.push(t.getDefinition(true))}));return i};S.prototype.getComponents=function(t){var i=this,e=[],r=t?i.columns:i.columnsByIndex;r.forEach((function(t){e.push(t.getComponent())}));return e};S.prototype.getWidth=function(){var t=0;this.columnsByIndex.forEach((function(i){if(i.visible){t+=i.getWidth()}}));return t};S.prototype.moveColumn=function(t,i,e){this.moveColumnActual(t,i,e);if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.initialize()}if(this.table.modExists("columnCalcs")){this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)}i.element.parentNode.insertBefore(t.element,i.element);if(e){i.element.parentNode.insertBefore(i.element,t.element)}this._verticalAlignHeaders();this.table.rowManager.reinitialize()};S.prototype.moveColumnActual=function(t,i,e){if(t.parent.isGroup){this._moveColumnInArray(t.parent.columns,t,i,e)}else{this._moveColumnInArray(this.columns,t,i,e)}this._moveColumnInArray(this.columnsByIndex,t,i,e,true);if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.initialize()}if(this.table.options.virtualDomHoz){this.table.vdomHoz.reinitialize(true)}if(this.table.options.columnMoved){this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents())}if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.columns){this.table.modules.persistence.save("columns")}};S.prototype._moveColumnInArray=function(t,i,e,r,n){var o=this;var s=t.indexOf(i),a,u=[];if(s>-1){t.splice(s,1);a=t.indexOf(e);if(a>-1){if(r){a=a+1}}else{a=s}t.splice(a,0,i);if(n){if(this.table.options.dataTree&&this.table.modExists("dataTree",true)){this.table.rowManager.rows.forEach((function(t){u=u.concat(o.table.modules.dataTree.getTreeChildren(t,false,true))}))}u=u.concat(this.table.rowManager.rows);u.forEach((function(t){if(t.cells.length){var i=t.cells.splice(s,1)[0];t.cells.splice(a,0,i)}}))}}};S.prototype.scrollToColumn=function(t,i,e){var r=this;var n=0,o=0,s=0,a=t.getElement();return new Promise((function(u,l){if(typeof i==="undefined"){i=r.table.options.scrollToColumnPosition}if(typeof e==="undefined"){e=r.table.options.scrollToColumnIfVisible}if(t.visible){switch(i){case"middle":case"center":s=-r.element.clientWidth/2;break;case"right":s=a.clientWidth-r.headersElement.clientWidth;break}if(!e){o=a.offsetLeft;if(o>0&&o+a.offsetWidth<r.element.clientWidth){return false}}n=a.offsetLeft+s;n=Math.max(Math.min(n,r.table.rowManager.element.scrollWidth-r.table.rowManager.element.clientWidth),0);r.table.rowManager.scrollHorizontal(n);r.scrollHorizontal(n);u()}else{console.warn("Scroll Error - Column not visible");l("Scroll Error - Column not visible")}}))};S.prototype.generateCells=function(t){var i=this;var e=[];i.columnsByIndex.forEach((function(i){e.push(i.generateCell(t))}));return e};S.prototype.getFlexBaseWidth=function(){var t=this,i=t.table.element.clientWidth,e=0;if(t.rowManager.element.scrollHeight>t.rowManager.element.clientHeight){i-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth}this.columnsByIndex.forEach((function(r){var n,o,s;if(r.visible){n=r.definition.width||0;o=typeof r.minWidth=="undefined"?t.table.options.columnMinWidth:parseInt(r.minWidth);if(typeof n=="string"){if(n.indexOf("%")>-1){s=i/100*parseInt(n)}else{s=parseInt(n)}}else{s=n}e+=s>o?s:o}}));return e};S.prototype.addColumn=function(t,i,e){var r=this;return new Promise((function(n,o){var s=r._addColumn(t,i,e);r._reIndexColumns();if(r.table.options.responsiveLayout&&r.table.modExists("responsiveLayout",true)){r.table.modules.responsiveLayout.initialize()}if(r.table.modExists("columnCalcs")){r.table.modules.columnCalcs.recalc(r.table.rowManager.activeRows)}r.redraw(true);if(r.table.modules.layout.getMode()!="fitColumns"){s.reinitializeWidth()}r._verticalAlignHeaders();r.table.rowManager.reinitialize();if(r.table.options.virtualDomHoz){r.table.vdomHoz.reinitialize()}n(s)}))};S.prototype.deregisterColumn=function(t){var i=t.getField(),e;if(i){delete this.columnsByField[i]}e=this.columnsByIndex.indexOf(t);if(e>-1){this.columnsByIndex.splice(e,1)}e=this.columns.indexOf(t);if(e>-1){this.columns.splice(e,1)}if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.initialize()}this._verticalAlignHeaders();this.redraw()};S.prototype.redraw=function(t){if(t){if(H.prototype.helpers.elVisible(this.element)){this._verticalAlignHeaders()}this.table.rowManager.resetScroll();this.table.rowManager.reinitialize()}if(["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1){this.table.modules.layout.layout()}else{if(t){this.table.modules.layout.layout()}else{if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.update()}}}if(this.table.modExists("frozenColumns")){this.table.modules.frozenColumns.layout()}if(this.table.modExists("columnCalcs")){this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)}if(t){if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.columns){this.table.modules.persistence.save("columns")}if(this.table.modExists("columnCalcs")){this.table.modules.columnCalcs.redraw()}}this.table.footerManager.redraw()};var R=function t(i){this._column=i;this.type="ColumnComponent"};R.prototype.getElement=function(){return this._column.getElement()};R.prototype.getDefinition=function(){return this._column.getDefinition()};R.prototype.getField=function(){return this._column.getField()};R.prototype.getCells=function(){var t=[];this._column.cells.forEach((function(i){t.push(i.getComponent())}));return t};R.prototype.getVisibility=function(){console.warn("getVisibility function is deprecated, you should now use the isVisible function");return this._column.visible};R.prototype.isVisible=function(){return this._column.visible};R.prototype.show=function(){if(this._column.isGroup){this._column.columns.forEach((function(t){t.show()}))}else{this._column.show()}};R.prototype.hide=function(){if(this._column.isGroup){this._column.columns.forEach((function(t){t.hide()}))}else{this._column.hide()}};R.prototype.toggle=function(){if(this._column.visible){this.hide()}else{this.show()}};R.prototype.delete=function(){return this._column.delete()};R.prototype.getSubColumns=function(){var t=[];if(this._column.columns.length){this._column.columns.forEach((function(i){t.push(i.getComponent())}))}return t};R.prototype.getParentColumn=function(){return this._column.parent instanceof N?this._column.parent.getComponent():false};R.prototype._getSelf=function(){return this._column};R.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)};R.prototype.getTable=function(){return this._column.table};R.prototype.headerFilterFocus=function(){if(this._column.table.modExists("filter",true)){this._column.table.modules.filter.setHeaderFilterFocus(this._column)}};R.prototype.reloadHeaderFilter=function(){if(this._column.table.modExists("filter",true)){this._column.table.modules.filter.reloadHeaderFilter(this._column)}};R.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",true)){return this._column.table.modules.filter.getHeaderFilterValue(this._column)}};R.prototype.setHeaderFilterValue=function(t){if(this._column.table.modExists("filter",true)){this._column.table.modules.filter.setHeaderFilterValue(this._column,t)}};R.prototype.move=function(t,i){var e=this._column.table.columnManager.findColumn(t);if(e){this._column.table.columnManager.moveColumn(this._column,e,i)}else{console.warn("Move Error - No matching column found:",e)}};R.prototype.getNextColumn=function(){var t=this._column.nextColumn();return t?t.getComponent():false};R.prototype.getPrevColumn=function(){var t=this._column.prevColumn();return t?t.getComponent():false};R.prototype.updateDefinition=function(t){return this._column.updateDefinition(t)};R.prototype.getWidth=function(){return this._column.getWidth()};R.prototype.setWidth=function(t){var i;if(t===true){i=this._column.reinitializeWidth(true)}else{i=this._column.setWidth(t)}if(this._column.table.options.virtualDomHoz){this._column.table.vdomHoz.reinitialize(true)}return i};R.prototype.validate=function(){return this._column.validate()};var N=function t(i,e){var r=this;this.table=e.table;this.definition=i;this.parent=e;this.type="column";this.columns=[];this.cells=[];this.element=this.createElement();this.contentElement=false;this.titleHolderElement=false;this.titleElement=false;this.groupElement=this.createGroupElement();this.isGroup=false;this.tooltip=false;this.hozAlign="";this.vertAlign="";this.field="";this.fieldStructure="";this.getFieldValue="";this.setFieldValue="";this.titleFormatterRendered=false;this.setField(this.definition.field);if(this.table.options.invalidOptionWarnings){this.checkDefinition()}this.modules={};this.cellEvents={cellClick:false,cellDblClick:false,cellContext:false,cellTap:false,cellDblTap:false,cellTapHold:false,cellMouseEnter:false,cellMouseLeave:false,cellMouseOver:false,cellMouseOut:false,cellMouseMove:false};this.width=null;this.widthStyled="";this.maxWidth=null;this.maxWidthStyled="";this.minWidth=null;this.minWidthStyled="";this.widthFixed=false;this.visible=true;this.component=null;this._mapDepricatedFunctionality();if(i.columns){this.isGroup=true;i.columns.forEach((function(i,e){var n=new t(i,r);r.attachColumn(n)}));r.checkColumnVisibility()}else{e.registerColumnField(this)}if(i.rowHandle&&this.table.options.movableRows!==false&&this.table.modExists("moveRow")){this.table.modules.moveRow.setHandle(true)}this._buildHeader();this.bindModuleColumns()};N.prototype.createElement=function(){var t=document.createElement("div");t.classList.add("tabulator-col");t.setAttribute("role","columnheader");t.setAttribute("aria-sort","none");return t};N.prototype.createGroupElement=function(){var t=document.createElement("div");t.classList.add("tabulator-col-group-cols");return t};N.prototype.checkDefinition=function(){var t=this;Object.keys(this.definition).forEach((function(i){if(t.defaultOptionList.indexOf(i)===-1){console.warn("Invalid column definition option in '"+(t.field||t.definition.title)+"' column:",i)}}))};N.prototype.setField=function(t){this.field=t;this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[];this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData;this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData};N.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)};N.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)};N.prototype.reRegisterPosition=function(){if(this.isGroup){this.columns.forEach((function(t){t.reRegisterPosition()}))}else{this.registerColumnPosition(this)}};N.prototype._mapDepricatedFunctionality=function(){if(typeof this.definition.hideInHtml!=="undefined"){this.definition.htmlOutput=!this.definition.hideInHtml;console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")}if(typeof this.definition.align!=="undefined"){this.definition.hozAlign=this.definition.align;console.warn("align column definition property is deprecated, you should now use hozAlign")}if(typeof this.definition.downloadTitle!=="undefined"){this.definition.titleDownload=this.definition.downloadTitle;console.warn("downloadTitle definition property is deprecated, you should now use titleDownload")}};N.prototype.setTooltip=function(){var t=this,i=t.definition;var e=i.headerTooltip||i.tooltip===false?i.headerTooltip:t.table.options.tooltipsHeader;if(e){if(e===true){if(i.field){t.table.modules.localize.bind("columns|"+i.field,(function(e){t.element.setAttribute("title",e||i.title)}))}else{t.element.setAttribute("title",i.title)}}else{if(typeof e=="function"){e=e(t.getComponent());if(e===false){e=""}}t.element.setAttribute("title",e)}}else{t.element.setAttribute("title","")}};N.prototype._buildHeader=function(){var t=this,i=t.definition;while(t.element.firstChild){t.element.removeChild(t.element.firstChild)}if(i.headerVertical){t.element.classList.add("tabulator-col-vertical");if(i.headerVertical==="flip"){t.element.classList.add("tabulator-col-vertical-flip")}}t.contentElement=t._bindEvents();t.contentElement=t._buildColumnHeaderContent();t.element.appendChild(t.contentElement);if(t.isGroup){t._buildGroupHeader()}else{t._buildColumnHeader()}t.setTooltip();if(t.table.options.resizableColumns&&t.table.modExists("resizeColumns")){t.table.modules.resizeColumns.initializeColumn("header",t,t.element)}if(i.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")){if(typeof i.headerFilterPlaceholder!=="undefined"&&i.field){t.table.modules.localize.setHeaderFilterColumnPlaceholder(i.field,i.headerFilterPlaceholder)}t.table.modules.filter.initializeColumn(t)}if(t.table.modExists("frozenColumns")){t.table.modules.frozenColumns.initializeColumn(t)}if(t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")){t.table.modules.moveColumn.initializeColumn(t)}if((i.topCalc||i.bottomCalc)&&t.table.modExists("columnCalcs")){t.table.modules.columnCalcs.initializeColumn(t)}if(t.table.modExists("persistence")&&t.table.modules.persistence.config.columns){t.table.modules.persistence.initializeColumn(t)}t.element.addEventListener("mouseenter",(function(i){t.setTooltip()}))};N.prototype._bindEvents=function(){var t=this,i=t.definition,e,r,n;if(typeof i.headerClick=="function"){t.element.addEventListener("click",(function(e){i.headerClick(e,t.getComponent())}))}if(typeof i.headerDblClick=="function"){t.element.addEventListener("dblclick",(function(e){i.headerDblClick(e,t.getComponent())}))}if(typeof i.headerContext=="function"){t.element.addEventListener("contextmenu",(function(e){i.headerContext(e,t.getComponent())}))}if(typeof i.headerTap=="function"){n=false;t.element.addEventListener("touchstart",(function(t){n=true}),{passive:true});t.element.addEventListener("touchend",(function(e){if(n){i.headerTap(e,t.getComponent())}n=false}))}if(typeof i.headerDblTap=="function"){e=null;t.element.addEventListener("touchend",(function(r){if(e){clearTimeout(e);e=null;i.headerDblTap(r,t.getComponent())}else{e=setTimeout((function(){clearTimeout(e);e=null}),300)}}))}if(typeof i.headerTapHold=="function"){r=null;t.element.addEventListener("touchstart",(function(e){clearTimeout(r);r=setTimeout((function(){clearTimeout(r);r=null;n=false;i.headerTapHold(e,t.getComponent())}),1e3)}),{passive:true});t.element.addEventListener("touchend",(function(t){clearTimeout(r);r=null}))}if(typeof i.cellClick=="function"){t.cellEvents.cellClick=i.cellClick}if(typeof i.cellDblClick=="function"){t.cellEvents.cellDblClick=i.cellDblClick}if(typeof i.cellContext=="function"){t.cellEvents.cellContext=i.cellContext}if(typeof i.cellMouseEnter=="function"){t.cellEvents.cellMouseEnter=i.cellMouseEnter}if(typeof i.cellMouseLeave=="function"){t.cellEvents.cellMouseLeave=i.cellMouseLeave}if(typeof i.cellMouseOver=="function"){t.cellEvents.cellMouseOver=i.cellMouseOver}if(typeof i.cellMouseOut=="function"){t.cellEvents.cellMouseOut=i.cellMouseOut}if(typeof i.cellMouseMove=="function"){t.cellEvents.cellMouseMove=i.cellMouseMove}if(typeof i.cellTap=="function"){t.cellEvents.cellTap=i.cellTap}if(typeof i.cellDblTap=="function"){t.cellEvents.cellDblTap=i.cellDblTap}if(typeof i.cellTapHold=="function"){t.cellEvents.cellTapHold=i.cellTapHold}if(typeof i.cellEdited=="function"){t.cellEvents.cellEdited=i.cellEdited}if(typeof i.cellEditing=="function"){t.cellEvents.cellEditing=i.cellEditing}if(typeof i.cellEditCancelled=="function"){t.cellEvents.cellEditCancelled=i.cellEditCancelled}};N.prototype._buildColumnHeader=function(){var t=this;var i=this.definition,e=this.table;if(e.modExists("sort")){e.modules.sort.initializeColumn(this,this.titleHolderElement)}if((i.headerContextMenu||i.headerClickMenu||i.headerMenu)&&e.modExists("menu")){e.modules.menu.initializeColumnHeader(this)}if(e.modExists("format")){e.modules.format.initializeColumn(this)}if(typeof i.editor!="undefined"&&e.modExists("edit")){e.modules.edit.initializeColumn(this)}if(typeof i.validator!="undefined"&&e.modExists("validate")){e.modules.validate.initializeColumn(this)}if(e.modExists("mutator")){e.modules.mutator.initializeColumn(this)}if(e.modExists("accessor")){e.modules.accessor.initializeColumn(this)}if(T(e.options.responsiveLayout)&&e.modExists("responsiveLayout")){e.modules.responsiveLayout.initializeColumn(this)}if(typeof i.visible!="undefined"){if(i.visible){this.show(true)}else{this.hide(true)}}if(i.cssClass){var r=i.cssClass.split(" ");r.forEach((function(i){t.element.classList.add(i)}))}if(i.field){this.element.setAttribute("tabulator-field",i.field)}this.setMinWidth(typeof i.minWidth=="undefined"?this.table.options.columnMinWidth:parseInt(i.minWidth));if(i.maxWidth||this.table.options.columnMaxWidth){if(i.maxWidth!==false){this.setMaxWidth(typeof i.maxWidth=="undefined"?this.table.options.columnMaxWidth:parseInt(i.maxWidth))}}this.reinitializeWidth();this.tooltip=this.definition.tooltip||this.definition.tooltip===false?this.definition.tooltip:this.table.options.tooltips;this.hozAlign=typeof this.definition.hozAlign=="undefined"?this.table.options.cellHozAlign:this.definition.hozAlign;this.vertAlign=typeof this.definition.vertAlign=="undefined"?this.table.options.cellVertAlign:this.definition.vertAlign;this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign};N.prototype._buildColumnHeaderContent=function(){var t=document.createElement("div");t.classList.add("tabulator-col-content");this.titleHolderElement=document.createElement("div");this.titleHolderElement.classList.add("tabulator-col-title-holder");t.appendChild(this.titleHolderElement);this.titleElement=this._buildColumnHeaderTitle();this.titleHolderElement.appendChild(this.titleElement);return t};N.prototype._buildColumnHeaderTitle=function(){var t=this,i=t.definition,e=t.table;var r=document.createElement("div");r.classList.add("tabulator-col-title");if(i.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor");n.addEventListener("click",(function(t){t.stopPropagation();n.focus()}));n.addEventListener("change",(function(){i.title=n.value;e.options.columnTitleChanged.call(t.table,t.getComponent())}));r.appendChild(n);if(i.field){e.modules.localize.bind("columns|"+i.field,(function(t){n.value=t||i.title||"&nbsp;"}))}else{n.value=i.title||"&nbsp;"}}else{if(i.field){e.modules.localize.bind("columns|"+i.field,(function(e){t._formatColumnHeaderTitle(r,e||i.title||"&nbsp;")}))}else{t._formatColumnHeaderTitle(r,i.title||"&nbsp;")}}return r};N.prototype._formatColumnHeaderTitle=function(t,i){var e=this;var r,n,o,s,a;if(this.definition.titleFormatter&&this.table.modExists("format")){r=this.table.modules.format.getFormatter(this.definition.titleFormatter);a=function t(i){e.titleFormatterRendered=i};s={getValue:function t(){return i},getElement:function i(){return t}};o=this.definition.titleFormatterParams||{};o=typeof o==="function"?o():o;n=r.call(this.table.modules.format,s,o,a);switch(typeof n==="undefined"?"undefined":T(n)){case"object":if(n instanceof Node){t.appendChild(n)}else{t.innerHTML="";console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",n)}break;case"undefined":case"null":t.innerHTML="";break;default:t.innerHTML=n}}else{t.innerHTML=i}};N.prototype._buildGroupHeader=function(){var t=this;this.element.classList.add("tabulator-col-group");this.element.setAttribute("role","columngroup");this.element.setAttribute("aria-title",this.definition.title);if(this.definition.cssClass){var i=this.definition.cssClass.split(" ");i.forEach((function(i){t.element.classList.add(i)}))}if((this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")){this.table.modules.menu.initializeColumnHeader(this)}this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign;this.element.appendChild(this.groupElement)};N.prototype._getFlatData=function(t){return t[this.field]};N.prototype._getNestedData=function(t){var i=t,e=this.fieldStructure,r=e.length,n;for(var o=0;o<r;o++){i=i[e[o]];n=i;if(!i){break}}return n};N.prototype._setFlatData=function(t,i){if(this.field){t[this.field]=i}};N.prototype._setNestedData=function(t,i){var e=t,r=this.fieldStructure,n=r.length;for(var o=0;o<n;o++){if(o==n-1){e[r[o]]=i}else{if(!e[r[o]]){if(typeof i!=="undefined"){e[r[o]]={}}else{break}}e=e[r[o]]}}};N.prototype.attachColumn=function(t){var i=this;if(i.groupElement){i.columns.push(t);i.groupElement.appendChild(t.getElement())}else{console.warn("Column Warning - Column being attached to another column instead of column group")}};N.prototype.verticalAlign=function(t,i){var e=this.parent.isGroup?this.parent.getGroupElement().clientHeight:i||this.parent.getHeadersElement().clientHeight;this.element.style.height=e+"px";if(this.isGroup){this.groupElement.style.minHeight=e-this.contentElement.offsetHeight+"px"}if(!this.isGroup&&t!=="top"){if(t==="bottom"){this.element.style.paddingTop=this.element.clientHeight-this.contentElement.offsetHeight+"px"}else{this.element.style.paddingTop=(this.element.clientHeight-this.contentElement.offsetHeight)/2+"px"}}this.columns.forEach((function(i){i.verticalAlign(t)}))};N.prototype.clearVerticalAlign=function(){this.element.style.paddingTop="";this.element.style.height="";this.element.style.minHeight="";this.groupElement.style.minHeight="";this.columns.forEach((function(t){t.clearVerticalAlign()}))};N.prototype.bindModuleColumns=function(){if(this.definition.formatter=="rownum"){this.table.rowManager.rowNumColumn=this}};N.prototype.getElement=function(){return this.element};N.prototype.getGroupElement=function(){return this.groupElement};N.prototype.getField=function(){return this.field};N.prototype.getFirstColumn=function(){if(!this.isGroup){return this}else{if(this.columns.length){return this.columns[0].getFirstColumn()}else{return false}}};N.prototype.getLastColumn=function(){if(!this.isGroup){return this}else{if(this.columns.length){return this.columns[this.columns.length-1].getLastColumn()}else{return false}}};N.prototype.getColumns=function(){return this.columns};N.prototype.getCells=function(){return this.cells};N.prototype.getTopColumn=function(){if(this.parent.isGroup){return this.parent.getTopColumn()}else{return this}};N.prototype.getDefinition=function(t){var i=[];if(this.isGroup&&t){this.columns.forEach((function(t){i.push(t.getDefinition(true))}));this.definition.columns=i}return this.definition};N.prototype.checkColumnVisibility=function(){var t=false;this.columns.forEach((function(i){if(i.visible){t=true}}));if(t){this.show();this.parent.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),false)}else{this.hide()}};N.prototype.show=function(t,i){if(!this.visible){this.visible=true;this.element.style.display="";if(this.parent.isGroup){this.parent.checkColumnVisibility()}this.cells.forEach((function(t){t.show()}));if(!this.isGroup&&this.width===null){this.reinitializeWidth()}this.table.columnManager._verticalAlignHeaders();if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.columns){this.table.modules.persistence.save("columns")}if(!i&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible)}if(!t){this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),true)}if(this.parent.isGroup){this.parent.matchChildWidths()}if(!this.silent&&this.table.options.virtualDomHoz){this.table.vdomHoz.reinitialize()}}};N.prototype.hide=function(t,i){if(this.visible){this.visible=false;this.element.style.display="none";this.table.columnManager._verticalAlignHeaders();if(this.parent.isGroup){this.parent.checkColumnVisibility()}this.cells.forEach((function(t){t.hide()}));if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.columns){this.table.modules.persistence.save("columns")}if(!i&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible)}if(!t){this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),false)}if(this.parent.isGroup){this.parent.matchChildWidths()}if(!this.silent&&this.table.options.virtualDomHoz){this.table.vdomHoz.reinitialize()}}};N.prototype.matchChildWidths=function(){var t=0;if(this.contentElement&&this.columns.length){this.columns.forEach((function(i){if(i.visible){t+=i.getWidth()}}));this.contentElement.style.maxWidth=t-1+"px";if(this.parent.isGroup){this.parent.matchChildWidths()}}};N.prototype.removeChild=function(t){var i=this.columns.indexOf(t);if(i>-1){this.columns.splice(i,1)}if(!this.columns.length){this.delete()}};N.prototype.setWidth=function(t){this.widthFixed=true;this.setWidthActual(t)};N.prototype.setWidthActual=function(t){if(isNaN(t)){t=Math.floor(this.table.element.clientWidth/100*parseInt(t))}t=Math.max(this.minWidth,t);if(this.maxWidth){t=Math.min(this.maxWidth,t)}this.width=t;this.widthStyled=t?t+"px":"";this.element.style.width=this.widthStyled;if(!this.isGroup){this.cells.forEach((function(t){t.setWidth()}))}if(this.parent.isGroup){this.parent.matchChildWidths()}if(this.table.modExists("frozenColumns")){this.table.modules.frozenColumns.layout()}};N.prototype.checkCellHeights=function(){var t=[];this.cells.forEach((function(i){if(i.row.heightInitialized){if(i.row.getElement().offsetParent!==null){t.push(i.row);i.row.clearCellHeight()}else{i.row.heightInitialized=false}}}));t.forEach((function(t){t.calcHeight()}));t.forEach((function(t){t.setCellHeight()}))};N.prototype.getWidth=function(){var t=0;if(this.isGroup){this.columns.forEach((function(i){if(i.visible){t+=i.getWidth()}}))}else{t=this.width}return t};N.prototype.getHeight=function(){return this.element.offsetHeight};N.prototype.setMinWidth=function(t){this.minWidth=t;this.minWidthStyled=t?t+"px":"";this.element.style.minWidth=this.minWidthStyled;this.cells.forEach((function(t){t.setMinWidth()}))};N.prototype.setMaxWidth=function(t){this.maxWidth=t;this.maxWidthStyled=t?t+"px":"";this.element.style.maxWidth=this.maxWidthStyled;this.cells.forEach((function(t){t.setMaxWidth()}))};N.prototype.delete=function(){var t=this;return new Promise((function(i,e){if(t.isGroup){t.columns.forEach((function(t){t.delete()}))}if(t.table.modExists("edit")){if(t.table.modules.edit.currentCell.column===t){t.table.modules.edit.cancelEdit()}}var r=t.cells.length;for(var n=0;n<r;n++){t.cells[0].delete()}if(t.element.parentNode){t.element.parentNode.removeChild(t.element)}t.element=false;t.contentElement=false;t.titleElement=false;t.groupElement=false;if(t.parent.isGroup){t.parent.removeChild(t)}t.table.columnManager.deregisterColumn(t);if(t.table.options.virtualDomHoz){t.table.vdomHoz.reinitialize(true)}i()}))};N.prototype.columnRendered=function(){if(this.titleFormatterRendered){this.titleFormatterRendered()}};N.prototype.validate=function(){var t=[];this.cells.forEach((function(i){if(!i.validate()){t.push(i.getComponent())}}));return t.length?t:true};N.prototype.generateCell=function(t){var i=this;var e=new A(i,t);this.cells.push(e);return e};N.prototype.nextColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1?this._nextVisibleColumn(t+1):false};N.prototype._nextVisibleColumn=function(t){var i=this.table.columnManager.getColumnByIndex(t);return!i||i.visible?i:this._nextVisibleColumn(t+1)};N.prototype.prevColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1?this._prevVisibleColumn(t-1):false};N.prototype._prevVisibleColumn=function(t){var i=this.table.columnManager.getColumnByIndex(t);return!i||i.visible?i:this._prevVisibleColumn(t-1)};N.prototype.reinitializeWidth=function(t){this.widthFixed=false;if(typeof this.definition.width!=="undefined"&&!t){this.setWidth(this.definition.width)}if(this.table.modExists("filter")){this.table.modules.filter.hideHeaderFilterElements()}this.fitToData();if(this.table.modExists("filter")){this.table.modules.filter.showHeaderFilterElements()}};N.prototype.fitToData=function(){var t=this;if(!this.widthFixed){this.element.style.width="";t.cells.forEach((function(t){t.clearWidth()}))}var i=this.element.offsetWidth;if(!t.width||!this.widthFixed){t.cells.forEach((function(t){var e=t.getWidth();if(e>i){i=e}}));if(i){t.setWidthActual(i+1)}}};N.prototype.updateDefinition=function(t){var i=this;return new Promise((function(e,r){var n;if(!i.isGroup){if(!i.parent.isGroup){n=Object.assign({},i.getDefinition());n=Object.assign(n,t);i.table.columnManager.addColumn(n,false,i).then((function(t){if(n.field==i.field){i.field=false}i.delete().then((function(){e(t.getComponent())})).catch((function(t){r(t)}))})).catch((function(t){r(t)}))}else{console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns");r("Column Update Error - The updateDefinition function is only available on columns, not column groups")}}else{console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns");r("Column Update Error - The updateDefinition function is only available on columns, not column groups")}}))};N.prototype.deleteCell=function(t){var i=this.cells.indexOf(t);if(i>-1){this.cells.splice(i,1)}};N.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","maxWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","headerHozAlign","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","clickMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"];N.prototype.getComponent=function(){if(!this.component){this.component=new R(this)}return this.component};var M=function t(i){this.table=i;this.element=this.createHolderElement();this.tableElement=this.createTableElement();this.heightFixer=this.createTableElement();this.columnManager=null;this.height=0;this.firstRender=false;this.renderMode="virtual";this.fixedHeight=false;this.rows=[];this.activeRows=[];this.activeRowsCount=0;this.displayRows=[];this.displayRowsCount=0;this.scrollTop=0;this.scrollLeft=0;this.vDomRowHeight=20;this.vDomTop=0;this.vDomBottom=0;this.vDomScrollPosTop=0;this.vDomScrollPosBottom=0;this.vDomTopPad=0;this.vDomBottomPad=0;this.vDomMaxRenderChain=90;this.vDomWindowBuffer=0;this.vDomWindowMinTotalRows=20;this.vDomWindowMinMarginRows=5;this.vDomTopNewRows=[];this.vDomBottomNewRows=[];this.rowNumColumn=false;this.redrawBlock=false;this.redrawBlockRestoreConfig=false;this.redrawBlockRederInPosition=false};M.prototype.createHolderElement=function(){var t=document.createElement("div");t.classList.add("tabulator-tableHolder");t.setAttribute("tabindex",0);return t};M.prototype.createTableElement=function(){var t=document.createElement("div");t.classList.add("tabulator-table");return t};M.prototype.getElement=function(){return this.element};M.prototype.getTableElement=function(){return this.tableElement};M.prototype.getRowPosition=function(t,i){if(i){return this.activeRows.indexOf(t)}else{return this.rows.indexOf(t)}};M.prototype.setColumnManager=function(t){this.columnManager=t};M.prototype.initialize=function(){var t=this;t.setRenderMode();t.element.appendChild(t.tableElement);t.firstRender=true;t.element.addEventListener("scroll",(function(){var i=t.element.scrollLeft;if(t.scrollLeft!=i){t.columnManager.scrollHorizontal(i);if(t.table.options.groupBy){t.table.modules.groupRows.scrollHeaders(i)}if(t.table.modExists("columnCalcs")){t.table.modules.columnCalcs.scrollHorizontal(i)}t.table.options.scrollHorizontal(i)}t.scrollLeft=i}));if(this.renderMode==="virtual"){t.element.addEventListener("scroll",(function(){var i=t.element.scrollTop;var e=t.scrollTop>i;if(t.scrollTop!=i){t.scrollTop=i;t.scrollVertical(e);if(t.table.options.ajaxProgressiveLoad=="scroll"){t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-i)}t.table.options.scrollVertical(i)}else{t.scrollTop=i}}))}};M.prototype.findRow=function(t){var i=this;if((typeof t==="undefined"?"undefined":T(t))=="object"){if(t instanceof P){return t}else if(t instanceof O){return t._getSelf()||false}else if(typeof HTMLElement!=="undefined"&&t instanceof HTMLElement){var e=i.rows.find((function(i){return i.getElement()===t}));return e||false}}else if(typeof t=="undefined"||t===null){return false}else{var r=i.rows.find((function(e){return e.data[i.table.options.index]==t}));return r||false}return false};M.prototype.getRowFromDataObject=function(t){var i=this.rows.find((function(i){return i.data===t}));return i||false};M.prototype.getRowFromPosition=function(t,i){if(i){return this.activeRows[t]}else{return this.rows[t]}};M.prototype.scrollToRow=function(t,i,e){var r=this;var n=this.getDisplayRows().indexOf(t),o=t.getElement(),s,a=0;return new Promise((function(t,u){if(n>-1){if(typeof i==="undefined"){i=r.table.options.scrollToRowPosition}if(typeof e==="undefined"){e=r.table.options.scrollToRowIfVisible}if(i==="nearest"){switch(r.renderMode){case"classic":s=H.prototype.helpers.elOffset(o).top;i=Math.abs(r.element.scrollTop-s)>Math.abs(r.element.scrollTop+r.element.clientHeight-s)?"bottom":"top";break;case"virtual":i=Math.abs(r.vDomTop-n)>Math.abs(r.vDomBottom-n)?"bottom":"top";break}}if(!e){if(H.prototype.helpers.elVisible(o)){a=H.prototype.helpers.elOffset(o).top-H.prototype.helpers.elOffset(r.element).top;if(a>0&&a<r.element.clientHeight-o.offsetHeight){return false}}}switch(r.renderMode){case"classic":r.element.scrollTop=H.prototype.helpers.elOffset(o).top-H.prototype.helpers.elOffset(r.element).top+r.element.scrollTop;break;case"virtual":r._virtualRenderFill(n,true);break}switch(i){case"middle":case"center":if(r.element.scrollHeight-r.element.scrollTop==r.element.clientHeight){r.element.scrollTop=r.element.scrollTop+(o.offsetTop-r.element.scrollTop)-(r.element.scrollHeight-o.offsetTop)/2}else{r.element.scrollTop=r.element.scrollTop-r.element.clientHeight/2}break;case"bottom":if(r.element.scrollHeight-r.element.scrollTop==r.element.clientHeight){r.element.scrollTop=r.element.scrollTop-(r.element.scrollHeight-o.offsetTop)+o.offsetHeight}else{r.element.scrollTop=r.element.scrollTop-r.element.clientHeight+o.offsetHeight}break}t()}else{console.warn("Scroll Error - Row not visible");u("Scroll Error - Row not visible")}}))};M.prototype.setData=function(t,i,e){var r=this;var n=this;return new Promise((function(o,s){if(i&&r.getDisplayRows().length){if(n.table.options.pagination){n._setDataActual(t,true)}else{r.reRenderInPosition((function(){n._setDataActual(t)}))}}else{if(r.table.options.autoColumns&&e){r.table.columnManager.generateColumnsFromRowData(t)}r.resetScroll();r._setDataActual(t)}o()}))};M.prototype._setDataActual=function(t,i){var e=this;e.table.options.dataLoading.call(this.table,t);this._wipeElements();if(this.table.options.history&&this.table.modExists("history")){this.table.modules.history.clear()}if(Array.isArray(t)){if(this.table.modExists("selectRow")){this.table.modules.selectRow.clearSelectionData()}if(this.table.options.reactiveData&&this.table.modExists("reactiveData",true)){this.table.modules.reactiveData.watchData(t)}t.forEach((function(t,i){if(t&&(typeof t==="undefined"?"undefined":T(t))==="object"){var r=new P(t,e);e.rows.push(r)}else{console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",t)}}));e.refreshActiveData(false,false,i);e.table.options.dataLoaded.call(this.table,t)}else{console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",typeof t==="undefined"?"undefined":T(t),"\nData: ",t)}};M.prototype._wipeElements=function(){this.rows.forEach((function(t){t.wipe()}));if(this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.wipe()}this.rows=[];this.activeRows=[];this.activeRowsCount=0;this.displayRows=[];this.displayRowsCount=0;this.adjustTableSize()};M.prototype.deleteRow=function(t,i){var e=this.rows.indexOf(t),r=this.activeRows.indexOf(t);if(r>-1){this.activeRows.splice(r,1)}if(e>-1){this.rows.splice(e,1)}this.setActiveRows(this.activeRows);this.displayRowIterator((function(i){var e=i.indexOf(t);if(e>-1){i.splice(e,1)}}));if(!i){this.reRenderInPosition()}this.regenerateRowNumbers();this.table.options.rowDeleted.call(this.table,t.getComponent());if(this.table.options.dataChanged){this.table.options.dataChanged.call(this.table,this.getData())}if(this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.updateGroupRows(true)}else if(this.table.options.pagination&&this.table.modExists("page")){this.refreshActiveData(false,false,true)}else{if(this.table.options.pagination&&this.table.modExists("page")){this.refreshActiveData("page")}}};M.prototype.addRow=function(t,i,e,r){var n=this.addRowActual(t,i,e,r);if(this.table.options.history&&this.table.modExists("history")){this.table.modules.history.action("rowAdd",n,{data:t,pos:i,index:e})}return n};M.prototype.addRows=function(t,i,e){var r=this;var n=this,o=[];return new Promise((function(s,a){i=r.findAddRowPos(i);if(!Array.isArray(t)){t=[t]}if(typeof e=="undefined"&&i||typeof e!=="undefined"&&!i){t.reverse()}t.forEach((function(t,r){var s=n.addRow(t,i,e,true);o.push(s)}));if(r.table.options.groupBy&&r.table.modExists("groupRows")){r.table.modules.groupRows.updateGroupRows(true)}else if(r.table.options.pagination&&r.table.modExists("page")){r.refreshActiveData(false,false,true)}else{r.reRenderInPosition()}if(r.table.modExists("columnCalcs")){r.table.modules.columnCalcs.recalc(r.table.rowManager.activeRows)}r.regenerateRowNumbers();s(o)}))};M.prototype.findAddRowPos=function(t){if(typeof t==="undefined"){t=this.table.options.addRowPos}if(t==="pos"){t=true}if(t==="bottom"){t=false}return t};M.prototype.addRowActual=function(t,i,e,r){var n=t instanceof P?t:new P(t||{},this),o=this.findAddRowPos(i),s=-1,a,u;if(!e&&this.table.options.pagination&&this.table.options.paginationAddRow=="page"){u=this.getDisplayRows();if(o){if(u.length){e=u[0]}else{if(this.activeRows.length){e=this.activeRows[this.activeRows.length-1];o=false}}}else{if(u.length){e=u[u.length-1];o=u.length<this.table.modules.page.getPageSize()?false:true}}}if(typeof e!=="undefined"){e=this.findRow(e)}if(this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.assignRowToGroup(n);var l=n.getGroup().rows;if(l.length>1){if(!e||e&&l.indexOf(e)==-1){if(o){if(l[0]!==n){e=l[0];this._moveRowInArray(n.getGroup().rows,n,e,!o)}}else{if(l[l.length-1]!==n){e=l[l.length-1];this._moveRowInArray(n.getGroup().rows,n,e,!o)}}}else{this._moveRowInArray(n.getGroup().rows,n,e,!o)}}}if(e){s=this.rows.indexOf(e)}if(e&&s>-1){a=this.activeRows.indexOf(e);this.displayRowIterator((function(t){var i=t.indexOf(e);if(i>-1){t.splice(o?i:i+1,0,n)}}));if(a>-1){this.activeRows.splice(o?a:a+1,0,n)}this.rows.splice(o?s:s+1,0,n)}else{if(o){this.displayRowIterator((function(t){t.unshift(n)}));this.activeRows.unshift(n);this.rows.unshift(n)}else{this.displayRowIterator((function(t){t.push(n)}));this.activeRows.push(n);this.rows.push(n)}}this.setActiveRows(this.activeRows);this.table.options.rowAdded.call(this.table,n.getComponent());if(this.table.options.dataChanged){this.table.options.dataChanged.call(this.table,this.getData())}if(!r){this.reRenderInPosition()}return n};M.prototype.moveRow=function(t,i,e){if(this.table.options.history&&this.table.modExists("history")){this.table.modules.history.action("rowMove",t,{posFrom:this.getRowPosition(t),posTo:this.getRowPosition(i),to:i,after:e})}this.moveRowActual(t,i,e);this.regenerateRowNumbers();this.table.options.rowMoved.call(this.table,t.getComponent())};M.prototype.moveRowActual=function(t,i,e){var r=this;this._moveRowInArray(this.rows,t,i,e);this._moveRowInArray(this.activeRows,t,i,e);this.displayRowIterator((function(n){r._moveRowInArray(n,t,i,e)}));if(this.table.options.groupBy&&this.table.modExists("groupRows")){if(!e&&i instanceof nt){i=this.table.rowManager.prevDisplayRow(t)||i}var n=i.getGroup();var o=t.getGroup();if(n===o){this._moveRowInArray(n.rows,t,i,e)}else{if(o){o.removeRow(t)}n.insertRow(t,i,e)}}};M.prototype._moveRowInArray=function(t,i,e,r){var n,o,s,a;if(i!==e){n=t.indexOf(i);if(n>-1){t.splice(n,1);o=t.indexOf(e);if(o>-1){if(r){t.splice(o+1,0,i)}else{t.splice(o,0,i)}}else{t.splice(n,0,i)}}if(t===this.getDisplayRows()){s=n<o?n:o;a=o>n?o:n+1;for(var u=s;u<=a;u++){if(t[u]){this.styleRow(t[u],u)}}}}};M.prototype.clearData=function(){this.setData([])};M.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)};M.prototype.getDisplayRowIndex=function(t){var i=this.getDisplayRows().indexOf(t);return i>-1?i:false};M.prototype.nextDisplayRow=function(t,i){var e=this.getDisplayRowIndex(t),r=false;if(e!==false&&e<this.displayRowsCount-1){r=this.getDisplayRows()[e+1]}if(r&&(!(r instanceof P)||r.type!="row")){return this.nextDisplayRow(r,i)}return r};M.prototype.prevDisplayRow=function(t,i){var e=this.getDisplayRowIndex(t),r=false;if(e){r=this.getDisplayRows()[e-1]}if(i&&r&&(!(r instanceof P)||r.type!="row")){return this.prevDisplayRow(r,i)}return r};M.prototype.findRowIndex=function(t,i){var e;t=this.findRow(t);if(t){e=i.indexOf(t);if(e>-1){return e}}return false};M.prototype.getData=function(t,i){var e=[],r=this.getRows(t);r.forEach((function(t){if(t.type=="row"){e.push(t.getData(i||"data"))}}));return e};M.prototype.getComponents=function(t){var i=[],e=this.getRows(t);e.forEach((function(t){i.push(t.getComponent())}));return i};M.prototype.getDataCount=function(t){var i=this.getRows(t);return i.length};M.prototype._genRemoteRequest=function(){var t=this;var i=this.table,e=i.options,r={};if(i.modExists("page")){if(e.ajaxSorting){var n=this.table.modules.sort.getSort();n.forEach((function(t){delete t.column}));r[this.table.modules.page.paginationDataSentNames.sorters]=n}if(e.ajaxFiltering){var o=this.table.modules.filter.getFilters(true,true);r[this.table.modules.page.paginationDataSentNames.filters]=o}this.table.modules.ajax.setParams(r,true)}i.modules.ajax.sendRequest().then((function(i){t._setDataActual(i,true)})).catch((function(t){}))};M.prototype.filterRefresh=function(){var t=this.table,i=t.options,e=this.scrollLeft;if(i.ajaxFiltering){if(i.pagination=="remote"&&t.modExists("page")){t.modules.page.reset(true);t.modules.page.setPage(1).then((function(){})).catch((function(){}))}else if(i.ajaxProgressiveLoad){t.modules.ajax.loadData().then((function(){})).catch((function(){}))}else{this._genRemoteRequest()}}else{this.refreshActiveData("filter")}this.scrollHorizontal(e)};M.prototype.sorterRefresh=function(t){var i=this.table,e=this.table.options,r=this.scrollLeft;if(e.ajaxSorting){if((e.pagination=="remote"||e.progressiveLoad)&&i.modExists("page")){i.modules.page.reset(true);i.modules.page.setPage(1).then((function(){})).catch((function(){}))}else if(e.ajaxProgressiveLoad){i.modules.ajax.loadData().then((function(){})).catch((function(){}))}else{this._genRemoteRequest()}}else{this.refreshActiveData(t?"filter":"sort")}this.scrollHorizontal(r)};M.prototype.scrollHorizontal=function(t){this.scrollLeft=t;this.element.scrollLeft=t;if(this.table.options.groupBy){this.table.modules.groupRows.scrollHeaders(t)}if(this.table.modExists("columnCalcs")){this.table.modules.columnCalcs.scrollHorizontal(t)}};M.prototype.refreshActiveData=function(t,i,e){var r=this,n=this.table,o=["all","filter","sort","display","freeze","group","tree","page"],s;if(this.redrawBlock){if(!this.redrawBlockRestoreConfig||o.indexOf(t)<o.indexOf(this.redrawBlockRestoreConfig.stage)){this.redrawBlockRestoreConfig={stage:t,skipStage:i,renderInPosition:e}}return}else{if(r.table.modExists("edit")){r.table.modules.edit.cancelEdit()}if(!t){t="all"}if(n.options.selectable&&!n.options.selectablePersistence&&n.modExists("selectRow")){n.modules.selectRow.deselectRows()}switch(t){case"all":case"filter":if(!i){if(n.modExists("filter")){r.setActiveRows(n.modules.filter.filter(r.rows))}else{r.setActiveRows(r.rows.slice(0))}}else{i=false}case"sort":if(!i){if(n.modExists("sort")){n.modules.sort.sort(this.activeRows)}}else{i=false}this.regenerateRowNumbers();case"display":this.resetDisplayRows();case"freeze":if(!i){if(this.table.modExists("frozenRows")){if(n.modules.frozenRows.isFrozen()){if(!n.modules.frozenRows.getDisplayIndex()){n.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex())}s=n.modules.frozenRows.getDisplayIndex();s=r.setDisplayRows(n.modules.frozenRows.getRows(this.getDisplayRows(s-1)),s);if(s!==true){n.modules.frozenRows.setDisplayIndex(s)}}}}else{i=false}case"group":if(!i){if(n.options.groupBy&&n.modExists("groupRows")){if(!n.modules.groupRows.getDisplayIndex()){n.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex())}s=n.modules.groupRows.getDisplayIndex();s=r.setDisplayRows(n.modules.groupRows.getRows(this.getDisplayRows(s-1)),s);if(s!==true){n.modules.groupRows.setDisplayIndex(s)}}}else{i=false}case"tree":if(!i){if(n.options.dataTree&&n.modExists("dataTree")){if(!n.modules.dataTree.getDisplayIndex()){n.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex())}s=n.modules.dataTree.getDisplayIndex();s=r.setDisplayRows(n.modules.dataTree.getRows(this.getDisplayRows(s-1)),s);if(s!==true){n.modules.dataTree.setDisplayIndex(s)}}}else{i=false}if(n.options.pagination&&n.modExists("page")&&!e){if(n.modules.page.getMode()=="local"){n.modules.page.reset()}}case"page":if(!i){if(n.options.pagination&&n.modExists("page")){if(!n.modules.page.getDisplayIndex()){n.modules.page.setDisplayIndex(this.getNextDisplayIndex())}s=n.modules.page.getDisplayIndex();if(n.modules.page.getMode()=="local"){n.modules.page.setMaxRows(this.getDisplayRows(s-1).length)}s=r.setDisplayRows(n.modules.page.getRows(this.getDisplayRows(s-1)),s);if(s!==true){n.modules.page.setDisplayIndex(s)}}}else{i=false}}if(H.prototype.helpers.elVisible(r.element)){if(e){r.reRenderInPosition()}else{if(t==="all"&&this.table.options.virtualDomHoz){this.table.vdomHoz.dataChange()}r.renderTable();if(n.options.layoutColumnsOnNewData){r.table.columnManager.redraw(true)}}}if(n.modExists("columnCalcs")){n.modules.columnCalcs.recalc(this.activeRows)}}};M.prototype.regenerateRowNumbers=function(){var t=this;if(this.rowNumColumn){this.activeRows.forEach((function(i){var e=i.getCell(t.rowNumColumn);if(e){e._generateContents()}}))}};M.prototype.setActiveRows=function(t){this.activeRows=t;this.activeRowsCount=this.activeRows.length};M.prototype.resetDisplayRows=function(){this.displayRows=[];this.displayRows.push(this.activeRows.slice(0));this.displayRowsCount=this.displayRows[0].length;if(this.table.modExists("frozenRows")){this.table.modules.frozenRows.setDisplayIndex(0)}if(this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.setDisplayIndex(0)}if(this.table.options.pagination&&this.table.modExists("page")){this.table.modules.page.setDisplayIndex(0)}};M.prototype.getNextDisplayIndex=function(){return this.displayRows.length};M.prototype.setDisplayRows=function(t,i){var e=true;if(i&&typeof this.displayRows[i]!="undefined"){this.displayRows[i]=t;e=true}else{this.displayRows.push(t);e=i=this.displayRows.length-1}if(i==this.displayRows.length-1){this.displayRowsCount=this.displayRows[this.displayRows.length-1].length}return e};M.prototype.getDisplayRows=function(t){if(typeof t=="undefined"){return this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]}else{return this.displayRows[t]||[]}};M.prototype.getVisibleRows=function(t){var i=this.element.scrollTop,e=this.element.clientHeight+i,r=false,n=0,o=0,s=this.getDisplayRows();if(t){this.getDisplayRows();for(var a=this.vDomTop;a<=this.vDomBottom;a++){if(s[a]){if(!r){if(i-s[a].getElement().offsetTop>=0){n=a}else{r=true;if(e-s[a].getElement().offsetTop>=0){o=a}else{break}}}else{if(e-s[a].getElement().offsetTop>=0){o=a}else{break}}}}}else{n=this.vDomTop;o=this.vDomBottom}return s.slice(n,o+1)};M.prototype.displayRowIterator=function(t){this.displayRows.forEach(t);this.displayRowsCount=this.displayRows[this.displayRows.length-1].length};M.prototype.getRows=function(t){var i;switch(t){case"active":i=this.activeRows;break;case"display":i=this.table.rowManager.getDisplayRows();break;case"visible":i=this.getVisibleRows(true);break;case"selected":i=this.table.modules.selectRow.selectedRows;break;default:i=this.rows}return i};M.prototype.reRenderInPosition=function(t){if(this.getRenderMode()=="virtual"){if(this.redrawBlock){if(t){t()}else{this.redrawBlockRederInPosition=true}}else{var i=this.element.scrollTop;var e=false;var r=false;var n=this.scrollLeft;var o=this.getDisplayRows();for(var s=this.vDomTop;s<=this.vDomBottom;s++){if(o[s]){var a=i-o[s].getElement().offsetTop;if(r===false||Math.abs(a)<r){r=a;e=s}else{break}}}if(t){t()}this._virtualRenderFill(e===false?this.displayRowsCount-1:e,true,r||0);this.scrollHorizontal(n)}}else{this.renderTable();if(t){t()}}};M.prototype.setRenderMode=function(){if(this.table.options.virtualDom){this.renderMode="virtual";if(this.table.element.clientHeight||this.table.options.height){this.fixedHeight=true}else{this.fixedHeight=false}}else{this.renderMode="classic"}};M.prototype.getRenderMode=function(){return this.renderMode};M.prototype.renderTable=function(){this.table.options.renderStarted.call(this.table);this.element.scrollTop=0;switch(this.renderMode){case"classic":this._simpleRender();break;case"virtual":this._virtualRenderFill();break}if(this.firstRender){if(this.displayRowsCount){this.firstRender=false;this.table.modules.layout.layout()}else{this.renderEmptyScroll()}}if(this.table.modExists("frozenColumns")){this.table.modules.frozenColumns.layout()}if(!this.displayRowsCount){if(this.table.options.placeholder){this.table.options.placeholder.setAttribute("tabulator-render-mode",this.renderMode);this.getElement().appendChild(this.table.options.placeholder);this.table.options.placeholder.style.width=this.table.columnManager.getWidth()+"px"}}this.table.options.renderComplete.call(this.table)};M.prototype._simpleRender=function(){this._clearVirtualDom();if(this.displayRowsCount){this.checkClassicModeGroupHeaderWidth()}else{this.renderEmptyScroll()}};M.prototype.checkClassicModeGroupHeaderWidth=function(){var t=this,i=this.tableElement,e=true;t.getDisplayRows().forEach((function(r,n){t.styleRow(r,n);i.appendChild(r.getElement());r.initialize(true);if(r.type!=="group"){e=false}}));if(e){i.style.minWidth=t.table.columnManager.getWidth()+"px"}else{i.style.minWidth=""}};M.prototype.renderEmptyScroll=function(){if(this.table.options.placeholder){this.tableElement.style.display="none"}else{this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}};M.prototype._clearVirtualDom=function(){var t=this.tableElement;if(this.table.options.placeholder&&this.table.options.placeholder.parentNode){this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder)}while(t.firstChild){t.removeChild(t.firstChild)}t.style.paddingTop="";t.style.paddingBottom="";t.style.minWidth="";t.style.minHeight="";t.style.display="";t.style.visibility="";this.scrollTop=0;this.scrollLeft=0;this.vDomTop=0;this.vDomBottom=0;this.vDomTopPad=0;this.vDomBottomPad=0};M.prototype.styleRow=function(t,i){var e=t.getElement();if(i%2){e.classList.add("tabulator-row-even");e.classList.remove("tabulator-row-odd")}else{e.classList.add("tabulator-row-odd");e.classList.remove("tabulator-row-even")}};M.prototype._virtualRenderFill=function(t,i,e){var r=this,n=r.tableElement,o=r.element,s=0,a=0,u=0,l=0,f=true,h=r.getDisplayRows();t=t||0;e=e||0;if(!t){r._clearVirtualDom()}else{while(n.firstChild){n.removeChild(n.firstChild)}var c=(r.displayRowsCount-t+1)*r.vDomRowHeight;if(c<r.height){t-=Math.ceil((r.height-c)/r.vDomRowHeight);if(t<0){t=0}}s=Math.min(Math.max(Math.floor(r.vDomWindowBuffer/r.vDomRowHeight),r.vDomWindowMinMarginRows),t);t-=s}if(r.displayRowsCount&&H.prototype.helpers.elVisible(r.element)){r.vDomTop=t;r.vDomBottom=t-1;while((a<=r.height+r.vDomWindowBuffer||l<r.vDomWindowMinTotalRows)&&r.vDomBottom<r.displayRowsCount-1){var d=r.vDomBottom+1,b=h[d],p=0;r.styleRow(b,d);n.appendChild(b.getElement());b.initialize();if(!b.heightInitialized){b.normalizeHeight(true)}p=b.getHeight();if(l<s){u+=p}else{a+=p}if(p>this.vDomWindowBuffer){this.vDomWindowBuffer=p*2}if(b.type!=="group"){f=false}r.vDomBottom++;l++}if(!t){this.vDomTopPad=0;r.vDomRowHeight=Math.floor((a+u)/l);r.vDomBottomPad=r.vDomRowHeight*(r.displayRowsCount-r.vDomBottom-1);r.vDomScrollHeight=u+a+r.vDomBottomPad-r.height}else{r.vDomTopPad=!i?r.scrollTop-u:r.vDomRowHeight*this.vDomTop+e;r.vDomBottomPad=r.vDomBottom==r.displayRowsCount-1?0:Math.max(r.vDomScrollHeight-r.vDomTopPad-a-u,0)}n.style.paddingTop=r.vDomTopPad+"px";n.style.paddingBottom=r.vDomBottomPad+"px";if(i){this.scrollTop=r.vDomTopPad+u+e-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)}this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height);if(this.element.scrollWidth>this.element.offsetWidth&&i){this.scrollTop+=this.element.offsetHeight-this.element.clientHeight}this.vDomScrollPosTop=this.scrollTop;this.vDomScrollPosBottom=this.scrollTop;o.scrollTop=this.scrollTop;n.style.minWidth=f?r.table.columnManager.getWidth()+"px":"";if(r.table.options.groupBy){if(r.table.modules.layout.getMode()!="fitDataFill"&&r.displayRowsCount==r.table.modules.groupRows.countGroups()){r.tableElement.style.minWidth=r.table.columnManager.getWidth()}}}else{this.renderEmptyScroll()}if(!this.fixedHeight){this.adjustTableSize()}};M.prototype.scrollVertical=function(t){var i=this.scrollTop-this.vDomScrollPosTop;var e=this.scrollTop-this.vDomScrollPosBottom;var r=this.vDomWindowBuffer*2;if(-i>r||e>r){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount));this.scrollHorizontal(n)}else{if(t){if(i<0){this._addTopRow(-i)}if(e<0){if(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer){this._removeBottomRow(-e)}else{this.vDomScrollPosBottom=this.scrollTop}}}else{if(i>=0){if(this.scrollTop>this.vDomWindowBuffer){this._removeTopRow(i)}else{this.vDomScrollPosTop=this.scrollTop}}if(e>=0){this._addBottomRow(e)}}}};M.prototype._addTopRow=function(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var e=this.tableElement,r=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,o=r[n],s=o.getHeight()||this.vDomRowHeight;if(t>=s){this.styleRow(o,n);e.insertBefore(o.getElement(),e.firstChild);if(!o.initialized||!o.heightInitialized){this.vDomTopNewRows.push(o);if(!o.heightInitialized){o.clearCellHeight()}}o.initialize();this.vDomTopPad-=s;if(this.vDomTopPad<0){this.vDomTopPad=n*this.vDomRowHeight}if(!n){this.vDomTopPad=0}e.style.paddingTop=this.vDomTopPad+"px";this.vDomScrollPosTop-=s;this.vDomTop--}t=-(this.scrollTop-this.vDomScrollPosTop);if(o.getHeight()>this.vDomWindowBuffer){this.vDomWindowBuffer=o.getHeight()*2}if(i<this.vDomMaxRenderChain&&this.vDomTop&&t>=(r[this.vDomTop-1].getHeight()||this.vDomRowHeight)){this._addTopRow(t,i+1)}else{this._quickNormalizeRowHeight(this.vDomTopNewRows)}}};M.prototype._removeTopRow=function(t){var i=this.tableElement,e=this.getDisplayRows()[this.vDomTop],r=e.getHeight()||this.vDomRowHeight;if(t>=r){var n=e.getElement();n.parentNode.removeChild(n);this.vDomTopPad+=r;i.style.paddingTop=this.vDomTopPad+"px";this.vDomScrollPosTop+=this.vDomTop?r:r+this.vDomWindowBuffer;this.vDomTop++;t=this.scrollTop-this.vDomScrollPosTop;this._removeTopRow(t)}};M.prototype._addBottomRow=function(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var e=this.tableElement,r=this.getDisplayRows();if(this.vDomBottom<this.displayRowsCount-1){var n=this.vDomBottom+1,o=r[n],s=o.getHeight()||this.vDomRowHeight;if(t>=s){this.styleRow(o,n);e.appendChild(o.getElement());if(!o.initialized||!o.heightInitialized){this.vDomBottomNewRows.push(o);if(!o.heightInitialized){o.clearCellHeight()}}o.initialize();this.vDomBottomPad-=s;if(this.vDomBottomPad<0||n==this.displayRowsCount-1){this.vDomBottomPad=0}e.style.paddingBottom=this.vDomBottomPad+"px";this.vDomScrollPosBottom+=s;this.vDomBottom++}t=this.scrollTop-this.vDomScrollPosBottom;if(o.getHeight()>this.vDomWindowBuffer){this.vDomWindowBuffer=o.getHeight()*2}if(i<this.vDomMaxRenderChain&&this.vDomBottom<this.displayRowsCount-1&&t>=(r[this.vDomBottom+1].getHeight()||this.vDomRowHeight)){this._addBottomRow(t,i+1)}else{this._quickNormalizeRowHeight(this.vDomBottomNewRows)}}};M.prototype._removeBottomRow=function(t){var i=this.tableElement,e=this.getDisplayRows()[this.vDomBottom],r=e.getHeight()||this.vDomRowHeight;if(t>=r){var n=e.getElement();if(n.parentNode){n.parentNode.removeChild(n)}this.vDomBottomPad+=r;if(this.vDomBottomPad<0){this.vDomBottomPad=0}i.style.paddingBottom=this.vDomBottomPad+"px";this.vDomScrollPosBottom-=r;this.vDomBottom--;t=-(this.scrollTop-this.vDomScrollPosBottom);this._removeBottomRow(t)}};M.prototype._quickNormalizeRowHeight=function(t){t.forEach((function(t){t.calcHeight()}));t.forEach((function(t){t.setCellHeight()}));t.length=0};M.prototype.normalizeHeight=function(){this.activeRows.forEach((function(t){t.normalizeHeight()}))};M.prototype.adjustTableSize=function(){var t=this.element.clientHeight,i;if(this.renderMode==="virtual"){var e=Math.floor(this.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&this.table.footerManager.active&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));if(this.fixedHeight){this.element.style.minHeight="calc(100% - "+e+"px)";this.element.style.height="calc(100% - "+e+"px)";this.element.style.maxHeight="calc(100% - "+e+"px)"}else{this.element.style.height="";this.element.style.height=this.table.element.clientHeight-e+"px";this.element.scrollTop=this.scrollTop}this.height=this.element.clientHeight;this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height;if(!this.fixedHeight&&t!=this.element.clientHeight){i=this.table.modExists("resizeTable");if(i&&!this.table.modules.resizeTable.autoResize||!i){this.redraw()}}}};M.prototype.reinitialize=function(){this.rows.forEach((function(t){t.reinitialize(true)}))};M.prototype.blockRedraw=function(){this.redrawBlock=true;this.redrawBlockRestoreConfig=false};M.prototype.restoreRedraw=function(){this.redrawBlock=false;if(this.redrawBlockRestoreConfig){this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition);this.redrawBlockRestoreConfig=false}else{if(this.redrawBlockRederInPosition){this.reRenderInPosition()}}this.redrawBlockRederInPosition=false};M.prototype.redraw=function(t){var i=this.scrollLeft;this.adjustTableSize();this.table.tableWidth=this.table.element.clientWidth;if(!t){if(this.renderMode=="classic"){if(this.table.options.groupBy){this.refreshActiveData("group",false,false)}else{this._simpleRender()}}else{this.reRenderInPosition();this.scrollHorizontal(i)}if(!this.displayRowsCount){if(this.table.options.placeholder){this.getElement().appendChild(this.table.options.placeholder)}}}else{this.renderTable()}};M.prototype.resetScroll=function(){this.element.scrollLeft=0;this.element.scrollTop=0;if(this.table.browser==="ie"){var t=document.createEvent("Event");t.initEvent("scroll",false,true);this.element.dispatchEvent(t)}else{this.element.dispatchEvent(new Event("scroll"))}};var D=function t(i){this.table=i;this.element=this.table.rowManager.tableElement;this.holderEl=this.table.rowManager.element;this.leftCol=0;this.rightCol=0;this.scrollLeft=0;this.vDomScrollPosLeft=0;this.vDomScrollPosRight=0;this.vDomPadLeft=0;this.vDomPadRight=0;this.fitDataColAvg=0;this.window=200;this.initialized=false;this.columns=[];if(this.compatabilityCheck()){this.initialize()}};D.prototype.compatabilityCheck=function(){var t=this.table.options,i=false,e=true;if(t.layout=="fitDataTable"){console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode");e=false}if(t.responsiveLayout){console.warn("Horizontal Vitrual DOM is not compatible with responsive columns");e=false}if(this.table.rtl){console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction");e=false}if(t.columns){i=t.columns.find((function(t){return t.frozen}));if(i){console.warn("Horizontal Vitrual DOM is not compatible with frozen columns");e=false}}if(!e){t.virtualDomHoz=false}return e};D.prototype.initialize=function(){var t=this;this.holderEl.addEventListener("scroll",(function(){var i=t.holderEl.scrollLeft;if(t.scrollLeft!=i){t.scrollLeft=i;t.scroll(i-(t.vDomScrollPosLeft+t.window))}}))};D.prototype.deinitialize=function(){this.initialized=false};D.prototype.clear=function(){this.columns=[];this.leftCol=-1;this.rightCol=0;this.vDomScrollPosLeft=0;this.vDomScrollPosRight=0;this.vDomPadLeft=0;this.vDomPadRight=0};D.prototype.dataChange=function(){var t=false,i=0,e=0,r,n,o;if(this.table.options.layout==="fitData"){this.table.columnManager.columnsByIndex.forEach((function(i){if(!i.definition.width&&i.visible){t=true}}));if(t){if(t&&this.table.rowManager.getDisplayRows().length){this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window;if(this.table.options.groupBy){r=this.table.modules.groupRows.getGroups(false)[0];n=r.getRows(false)[0]}else{n=this.table.rowManager.getDisplayRows()[0]}if(n){o=n.getElement();n.generateCells();this.element.appendChild(o);for(var e=0;e<n.cells.length;e++){var s=n.cells[e];o.appendChild(s.getElement());s.column.reinitializeWidth();i+=s.column.getWidth();if(i>this.vDomScrollPosRight){break}}o.parentNode.removeChild(o);this.fitDataColAvg=Math.floor(i/(e+1));for(e;e<this.table.columnManager.columnsByIndex.length;e++){this.table.columnManager.columnsByIndex[e].setWidth(this.fitDataColAvg)}this.reinitialize(false,true)}}}}else{if(this.table.options.layout==="fitColumns"){this.table.modules.layout.layout();this.table.vdomHoz.reinitialize(false,true)}}};D.prototype.fitDataLayoutOverride=function(){for(var t=this.leftCol;t<=this.rightCol;t++){this.columns[t].reinitializeWidth()}};D.prototype.reinitialize=function(t,i){var e=this;var r={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol};if(t&&!this.initialized){return}this.clear();this.scrollLeft=this.holderEl.scrollLeft;this.vDomScrollPosLeft=this.scrollLeft-this.window;this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window;var n=0;this.table.columnManager.columnsByIndex.forEach((function(t){var i={};if(t.visible){var r=t.getWidth();i.leftPos=n;i.rightPos=n+r;if(n+r>e.vDomScrollPosLeft&&n<e.vDomScrollPosRight){if(e.leftCol==-1){e.leftCol=e.columns.length;e.vDomPadLeft=n}e.rightCol=e.columns.length}else{if(e.leftCol!==-1){e.vDomPadRight+=r}}e.columns.push(t);t.modules.vdomHoz=i;n+=r}}));this.element.style.paddingLeft=this.vDomPadLeft+"px";this.element.style.paddingRight=this.vDomPadRight+"px";this.initialized=true;if(!i){if(!t||this.reinitChanged(r)){this.renitializeRows()}}this.holderEl.scrollLeft=this.scrollLeft};D.prototype.reinitChanged=function(t){var i=this;var e=true;if(t.cols.length!==this.columns.length||t.leftCol!==this.leftCol||t.rightCol!==this.rightCol){return true}t.cols.forEach((function(t,r){if(t!==i.columns[r]){e=false}}));return!e};D.prototype.renitializeRows=function(){var t=this;var i=this.table.rowManager.getVisibleRows();i.forEach((function(i){t.reinitializeRow(i,true)}))};D.prototype.scroll=function(t){this.vDomScrollPosLeft+=t;this.vDomScrollPosRight+=t;if(t>this.holderEl.clientWidth*.8){this.reinitialize()}else{if(t>0){this.addColRight();this.removeColLeft()}else{this.addColLeft();this.removeColRight()}}};D.prototype.colPositionAdjust=function(t,i,e){for(var r=t;r<i;r++){var n=this.columns[r];n.modules.vdomHoz.leftPos-=e;n.modules.vdomHoz.rightPos-=e}};D.prototype.addColRight=function(){var t=this.columns[this.rightCol+1],i,e,r;if(t&&t.modules.vdomHoz.leftPos<=this.vDomScrollPosRight){i=this.table.rowManager.getVisibleRows();i.forEach((function(i){if(i.type!=="group"){var e=i.getCell(t);i.getElement().appendChild(e.getElement());e.cellRendered()}}));if(this.fitDataColAvg){e=t.getWidth();if(e===this.fitDataColAvg){t.reinitializeWidth();r=e-t.getWidth();if(r){t.modules.vdomHoz.rightPos-=r;this.colPositionAdjust(this.rightCol+1,this.columns.length,r)}}}this.rightCol++;if(this.rightCol>=this.columns.length-1){this.vDomPadRight=0}else{this.vDomPadRight-=t.getWidth()}this.element.style.paddingRight=this.vDomPadRight+"px";this.addColRight()}};D.prototype.addColLeft=function(){var t=this.columns[this.leftCol-1],i;if(t&&t.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){var i=this.table.rowManager.getVisibleRows();i.forEach((function(i){if(i.type!=="group"){var e=i.getCell(t);i.getElement().prepend(e.getElement());e.cellRendered()}}));if(!this.leftCol){this.vDomPadLeft=0}else{this.vDomPadLeft-=t.getWidth()}this.element.style.paddingLeft=this.vDomPadLeft+"px";this.leftCol--;this.addColLeft()}};D.prototype.removeColRight=function(t){var t=this.columns[this.rightCol],i;if(t&&t.modules.vdomHoz.leftPos>this.vDomScrollPosRight){i=this.table.rowManager.getVisibleRows();t.modules.vdomHoz.visible=false;i.forEach((function(i){if(i.type!=="group"){var e=i.getCell(t);i.getElement().removeChild(e.getElement())}}));this.vDomPadRight+=t.getWidth();this.element.style.paddingRight=this.vDomPadRight+"px";this.rightCol--;this.removeColRight()}};D.prototype.removeColLeft=function(){var t=this.columns[this.leftCol],i;if(t&&t.modules.vdomHoz.rightPos<this.vDomScrollPosLeft){i=this.table.rowManager.getVisibleRows();i.forEach((function(i){if(i.type!=="group"){var e=i.getCell(t);i.getElement().removeChild(e.getElement())}}));this.vDomPadLeft+=t.getWidth();this.element.style.paddingLeft=this.vDomPadLeft+"px";this.leftCol++;this.removeColLeft()}};D.prototype.initializeRow=function(t){if(t.type!=="group"){t.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol};for(var i=this.leftCol;i<=this.rightCol;i++){var e=this.columns[i];if(e&&e.visible){var r=t.getCell(e);t.getElement().appendChild(r.getElement());r.cellRendered()}}}};D.prototype.reinitializeRow=function(t,i){if(t.type!=="group"){if(i||!t.modules.vdomHoz||t.modules.vdomHoz.leftCol!==this.leftCol||t.modules.vdomHoz.rightCol!==this.rightCol){var e=t.getElement();while(e.firstChild){e.removeChild(e.firstChild)}this.initializeRow(t)}}};var O=function t(i){this._row=i};O.prototype.getData=function(t){return this._row.getData(t)};O.prototype.getElement=function(){return this._row.getElement()};O.prototype.getCells=function(){var t=[];this._row.getCells().forEach((function(i){t.push(i.getComponent())}));return t};O.prototype.getCell=function(t){var i=this._row.getCell(t);return i?i.getComponent():false};O.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]};O.prototype.getPosition=function(t){return this._row.table.rowManager.getRowPosition(this._row,t)};O.prototype.delete=function(){return this._row.delete()};O.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)};O.prototype.pageTo=function(){if(this._row.table.modExists("page",true)){return this._row.table.modules.page.setPageToRow(this._row)}};O.prototype.move=function(t,i){this._row.moveToRow(t,i)};O.prototype.update=function(t){return this._row.updateData(t)};O.prototype.normalizeHeight=function(){this._row.normalizeHeight(true)};O.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)};O.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)};O.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)};O.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)};O.prototype._getSelf=function(){return this._row};O.prototype.validate=function(){return this._row.validate()};O.prototype.freeze=function(){if(this._row.table.modExists("frozenRows",true)){this._row.table.modules.frozenRows.freezeRow(this._row)}};O.prototype.unfreeze=function(){if(this._row.table.modExists("frozenRows",true)){this._row.table.modules.frozenRows.unfreezeRow(this._row)}};O.prototype.isFrozen=function(){if(this._row.table.modExists("frozenRows",true)){var t=this._row.table.modules.frozenRows.rows.indexOf(this._row);return t>-1}return false};O.prototype.treeCollapse=function(){if(this._row.table.modExists("dataTree",true)){this._row.table.modules.dataTree.collapseRow(this._row)}};O.prototype.treeExpand=function(){if(this._row.table.modExists("dataTree",true)){this._row.table.modules.dataTree.expandRow(this._row)}};O.prototype.treeToggle=function(){if(this._row.table.modExists("dataTree",true)){this._row.table.modules.dataTree.toggleRow(this._row)}};O.prototype.getTreeParent=function(){if(this._row.table.modExists("dataTree",true)){return this._row.table.modules.dataTree.getTreeParent(this._row)}return false};O.prototype.getTreeChildren=function(){if(this._row.table.modExists("dataTree",true)){return this._row.table.modules.dataTree.getTreeChildren(this._row,true)}return false};O.prototype.addTreeChild=function(t,i,e){if(this._row.table.modExists("dataTree",true)){return this._row.table.modules.dataTree.addTreeChildRow(this._row,t,i,e)}return false};O.prototype.reformat=function(){return this._row.reinitialize()};O.prototype.getGroup=function(){return this._row.getGroup().getComponent()};O.prototype.getTable=function(){return this._row.table};O.prototype.getNextRow=function(){var t=this._row.nextRow();return t?t.getComponent():t};O.prototype.getPrevRow=function(){var t=this._row.prevRow();return t?t.getComponent():t};var P=function t(i,e){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"row";this.table=e.table;this.parent=e;this.data={};this.type=r;this.element=false;this.modules={};this.cells=[];this.height=0;this.heightStyled="";this.manualHeight=false;this.outerHeight=0;this.initialized=false;this.heightInitialized=false;this.component=null;this.created=false;this.setData(i)};P.prototype.create=function(){if(!this.created){this.created=true;this.generateElement()}};P.prototype.createElement=function(){var t=document.createElement("div");t.classList.add("tabulator-row");t.setAttribute("role","row");this.element=t};P.prototype.getElement=function(){this.create();return this.element};P.prototype.detachElement=function(){if(this.element&&this.element.parentNode){this.element.parentNode.removeChild(this.element)}};P.prototype.generateElement=function(){var t=this,i,e,r;this.createElement();if(t.table.options.selectable!==false&&t.table.modExists("selectRow")){t.table.modules.selectRow.initializeRow(this)}if(t.table.options.movableRows!==false&&t.table.modExists("moveRow")){t.table.modules.moveRow.initializeRow(this)}if(t.table.options.dataTree!==false&&t.table.modExists("dataTree")){t.table.modules.dataTree.initializeRow(this)}if(t.table.options.responsiveLayout==="collapse"&&t.table.modExists("responsiveLayout")){t.table.modules.responsiveLayout.initializeRow(this)}if((t.table.options.rowContextMenu||t.table.options.rowClickMenu)&&this.table.modExists("menu")){t.table.modules.menu.initializeRow(this)}if(t.table.options.rowClick){t.element.addEventListener("click",(function(i){t.table.options.rowClick(i,t.getComponent())}))}if(t.table.options.rowDblClick){t.element.addEventListener("dblclick",(function(i){t.table.options.rowDblClick(i,t.getComponent())}))}if(t.table.options.rowContext){t.element.addEventListener("contextmenu",(function(i){t.table.options.rowContext(i,t.getComponent())}))}if(t.table.options.rowMouseEnter){t.element.addEventListener("mouseenter",(function(i){t.table.options.rowMouseEnter(i,t.getComponent())}))}if(t.table.options.rowMouseLeave){t.element.addEventListener("mouseleave",(function(i){t.table.options.rowMouseLeave(i,t.getComponent())}))}if(t.table.options.rowMouseOver){t.element.addEventListener("mouseover",(function(i){t.table.options.rowMouseOver(i,t.getComponent())}))}if(t.table.options.rowMouseOut){t.element.addEventListener("mouseout",(function(i){t.table.options.rowMouseOut(i,t.getComponent())}))}if(t.table.options.rowMouseMove){t.element.addEventListener("mousemove",(function(i){t.table.options.rowMouseMove(i,t.getComponent())}))}if(t.table.options.rowTap){r=false;t.element.addEventListener("touchstart",(function(t){r=true}),{passive:true});t.element.addEventListener("touchend",(function(i){if(r){t.table.options.rowTap(i,t.getComponent())}r=false}))}if(t.table.options.rowDblTap){i=null;t.element.addEventListener("touchend",(function(e){if(i){clearTimeout(i);i=null;t.table.options.rowDblTap(e,t.getComponent())}else{i=setTimeout((function(){clearTimeout(i);i=null}),300)}}))}if(t.table.options.rowTapHold){e=null;t.element.addEventListener("touchstart",(function(i){clearTimeout(e);e=setTimeout((function(){clearTimeout(e);e=null;r=false;t.table.options.rowTapHold(i,t.getComponent())}),1e3)}),{passive:true});t.element.addEventListener("touchend",(function(t){clearTimeout(e);e=null}))}};P.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)};P.prototype.initialize=function(t){var i=this;this.create();if(!this.initialized||t){this.deleteCells();while(this.element.firstChild){this.element.removeChild(this.element.firstChild)}if(this.table.modExists("frozenColumns")){this.table.modules.frozenColumns.layoutRow(this)}this.generateCells();if(this.table.options.virtualDomHoz&&this.table.vdomHoz.initialized){this.table.vdomHoz.initializeRow(this)}else{this.cells.forEach((function(t){i.element.appendChild(t.getElement());t.cellRendered()}))}if(t){this.normalizeHeight()}if(this.table.options.dataTree&&this.table.modExists("dataTree")){this.table.modules.dataTree.layoutRow(this)}if(this.table.options.responsiveLayout==="collapse"&&this.table.modExists("responsiveLayout")){this.table.modules.responsiveLayout.layoutRow(this)}if(this.table.options.rowFormatter){this.table.options.rowFormatter(this.getComponent())}if(this.table.options.resizableRows&&this.table.modExists("resizeRows")){this.table.modules.resizeRows.initializeRow(this)}this.initialized=true}else{if(this.table.options.virtualDomHoz){this.table.vdomHoz.reinitializeRow(this)}}};P.prototype.reinitializeHeight=function(){this.heightInitialized=false;if(this.element&&this.element.offsetParent!==null){this.normalizeHeight(true)}};P.prototype.reinitialize=function(t){this.initialized=false;this.heightInitialized=false;if(!this.manualHeight){this.height=0;this.heightStyled=""}if(this.element&&this.element.offsetParent!==null){this.initialize(true)}if(this.table.options.dataTree&&this.table.modExists("dataTree",true)){this.table.modules.dataTree.getTreeChildren(this,false,true).forEach((function(t){t.reinitialize(true)}))}};P.prototype.calcHeight=function(t){var i=0,e=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach((function(t){var e=t.getHeight();if(e>i){i=e}}));if(t){this.height=Math.max(i,e)}else{this.height=this.manualHeight?this.height:Math.max(i,e)}this.heightStyled=this.height?this.height+"px":"";this.outerHeight=this.element.offsetHeight};P.prototype.setCellHeight=function(){this.cells.forEach((function(t){t.setHeight()}));this.heightInitialized=true};P.prototype.clearCellHeight=function(){this.cells.forEach((function(t){t.clearHeight()}))};P.prototype.normalizeHeight=function(t){if(t){this.clearCellHeight()}this.calcHeight(t);this.setCellHeight()};P.prototype.setHeight=function(t,i){if(this.height!=t||i){this.manualHeight=true;this.height=t;this.heightStyled=t?t+"px":"";this.setCellHeight();this.outerHeight=this.element.offsetHeight}};P.prototype.getHeight=function(){return this.outerHeight};P.prototype.getWidth=function(){return this.element.offsetWidth};P.prototype.deleteCell=function(t){var i=this.cells.indexOf(t);if(i>-1){this.cells.splice(i,1)}};P.prototype.setData=function(t){if(this.table.modExists("mutator")){t=this.table.modules.mutator.transformRow(t,"data")}this.data=t;if(this.table.options.reactiveData&&this.table.modExists("reactiveData",true)){this.table.modules.reactiveData.watchRow(this)}};P.prototype.updateData=function(t){var i=this;var e=this.element&&H.prototype.helpers.elVisible(this.element),r={},n;return new Promise((function(o,s){if(typeof t==="string"){t=JSON.parse(t)}if(i.table.options.reactiveData&&i.table.modExists("reactiveData",true)){i.table.modules.reactiveData.block()}if(i.table.modExists("mutator")){r=Object.assign(r,i.data);r=Object.assign(r,t);n=i.table.modules.mutator.transformRow(r,"data",t)}else{n=t}for(var a in n){i.data[a]=n[a]}if(i.table.options.reactiveData&&i.table.modExists("reactiveData",true)){i.table.modules.reactiveData.unblock()}for(var a in t){var u=i.table.columnManager.getColumnsByFieldRoot(a);u.forEach((function(t){var r=i.getCell(t.getField());if(r){var o=t.getFieldValue(n);if(r.getValue()!=o){r.setValueProcessData(o);if(e){r.cellRendered()}}}}))}if(i.table.options.groupUpdateOnCellEdit&&i.table.options.groupBy&&i.table.modExists("groupRows")){i.table.modules.groupRows.reassignRowToGroup(i.row)}if(e){i.normalizeHeight(true);if(i.table.options.rowFormatter){i.table.options.rowFormatter(i.getComponent())}}else{i.initialized=false;i.height=0;i.heightStyled=""}if(i.table.options.dataTree!==false&&i.table.modExists("dataTree")&&i.table.modules.dataTree.redrawNeeded(t)){i.table.modules.dataTree.initializeRow(i);if(e){i.table.modules.dataTree.layoutRow(i);i.table.rowManager.refreshActiveData("tree",false,true)}}i.table.options.rowUpdated.call(i.table,i.getComponent());if(i.table.options.dataChanged){i.table.options.dataChanged.call(i.table,i.table.rowManager.getData())}o()}))};P.prototype.getData=function(t){if(t){if(this.table.modExists("accessor")){return this.table.modules.accessor.transformRow(this,t)}}return this.data};P.prototype.getCell=function(t){var i=false;t=this.table.columnManager.findColumn(t);i=this.cells.find((function(i){return i.column===t}));return i};P.prototype.getCellIndex=function(t){return this.cells.findIndex((function(i){return i===t}))};P.prototype.findNextEditableCell=function(t){var i=false;if(t<this.cells.length-1){for(var e=t+1;e<this.cells.length;e++){var r=this.cells[e];if(r.column.modules.edit&&H.prototype.helpers.elVisible(r.getElement())){var n=true;if(typeof r.column.modules.edit.check=="function"){n=r.column.modules.edit.check(r.getComponent())}if(n){i=r;break}}}}return i};P.prototype.findPrevEditableCell=function(t){var i=false;if(t>0){for(var e=t-1;e>=0;e--){var r=this.cells[e],n=true;if(r.column.modules.edit&&H.prototype.helpers.elVisible(r.getElement())){if(typeof r.column.modules.edit.check=="function"){n=r.column.modules.edit.check(r.getComponent())}if(n){i=r;break}}}}return i};P.prototype.getCells=function(){return this.cells};P.prototype.nextRow=function(){var t=this.table.rowManager.nextDisplayRow(this,true);return t||false};P.prototype.prevRow=function(){var t=this.table.rowManager.prevDisplayRow(this,true);return t||false};P.prototype.moveToRow=function(t,i){var e=this.table.rowManager.findRow(t);if(e){this.table.rowManager.moveRowActual(this,e,!i);this.table.rowManager.refreshActiveData("display",false,true)}else{console.warn("Move Error - No matching row found:",t)}};P.prototype.validate=function(){var t=[];this.cells.forEach((function(i){if(!i.validate()){t.push(i.getComponent())}}));return t.length?t:true};P.prototype.delete=function(){var t=this;return new Promise((function(i,e){var r,n;if(t.table.options.history&&t.table.modExists("history")){if(t.table.options.groupBy&&t.table.modExists("groupRows")){n=t.getGroup().rows;r=n.indexOf(t);if(r){r=n[r-1]}}else{r=t.table.rowManager.getRowIndex(t);if(r){r=t.table.rowManager.rows[r-1]}}t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!r,index:r})}t.deleteActual();i()}))};P.prototype.deleteActual=function(t){this.table.rowManager.getRowIndex(this);this.detatchModules();if(this.table.options.reactiveData&&this.table.modExists("reactiveData",true));if(this.modules.group){this.modules.group.removeRow(this)}this.table.rowManager.deleteRow(this,t);this.deleteCells();this.initialized=false;this.heightInitialized=false;this.element=false;if(this.table.options.dataTree&&this.table.modExists("dataTree",true)){this.table.modules.dataTree.rowDelete(this)}if(this.table.modExists("columnCalcs")){if(this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.columnCalcs.recalcRowGroup(this)}else{this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)}}};P.prototype.detatchModules=function(){if(this.table.modExists("selectRow")){this.table.modules.selectRow._deselectRow(this,true)}if(this.table.modExists("edit")){if(this.table.modules.edit.currentCell.row===this){this.table.modules.edit.cancelEdit()}}if(this.table.modExists("frozenRows")){this.table.modules.frozenRows.detachRow(this)}};P.prototype.deleteCells=function(){var t=this.cells.length;for(var i=0;i<t;i++){this.cells[0].delete()}};P.prototype.wipe=function(){this.detatchModules();this.deleteCells();if(this.element){while(this.element.firstChild){this.element.removeChild(this.element.firstChild)}if(this.element.parentNode){this.element.parentNode.removeChild(this.element)}}this.element=false;this.modules={}};P.prototype.getGroup=function(){return this.modules.group||false};P.prototype.getComponent=function(){if(!this.component){this.component=new O(this)}return this.component};var F=function t(i){this._cell=i};F.prototype.getValue=function(){return this._cell.getValue()};F.prototype.getOldValue=function(){return this._cell.getOldValue()};F.prototype.getInitialValue=function(){return this._cell.initialValue};F.prototype.getElement=function(){return this._cell.getElement()};F.prototype.getRow=function(){return this._cell.row.getComponent()};F.prototype.getData=function(){return this._cell.row.getData()};F.prototype.getField=function(){return this._cell.column.getField()};F.prototype.getColumn=function(){return this._cell.column.getComponent()};F.prototype.setValue=function(t,i){if(typeof i=="undefined"){i=true}this._cell.setValue(t,i)};F.prototype.restoreOldValue=function(){this._cell.setValueActual(this._cell.getOldValue())};F.prototype.restoreInitialValue=function(){this._cell.setValueActual(this._cell.initialValue)};F.prototype.edit=function(t){return this._cell.edit(t)};F.prototype.cancelEdit=function(){this._cell.cancelEdit()};F.prototype.isEdited=function(){return!!this._cell.modules.edit&&this._cell.modules.edit.edited};F.prototype.clearEdited=function(){if(self.table.modExists("edit",true)){this._cell.table.modules.edit.clearEdited(this._cell)}};F.prototype.isValid=function(){return this._cell.modules.validate?!this._cell.modules.validate.invalid:true};F.prototype.validate=function(){return this._cell.validate()};F.prototype.clearValidation=function(){if(this._cell.table.modExists("validate",true)){this._cell.table.modules.validate.clearValidation(this._cell)}};F.prototype.nav=function(){return this._cell.nav()};F.prototype.checkHeight=function(){this._cell.checkHeight()};F.prototype.getTable=function(){return this._cell.table};F.prototype._getSelf=function(){return this._cell};var A=function t(i,e){this.table=i.table;this.column=i;this.row=e;this.element=null;this.value=null;this.oldValue=null;this.modules={};this.height=null;this.width=null;this.minWidth=null;this.component=null;this.loaded=false;this.build()};A.prototype.build=function(){this.generateElement();this.setWidth();this._configureCell();this.setValueActual(this.column.getFieldValue(this.row.data));this.initialValue=this.value};A.prototype.generateElement=function(){this.element=document.createElement("div");this.element.className="tabulator-cell";this.element.setAttribute("role","gridcell");this.element=this.element};A.prototype._configureCell=function(){var t=this,i=t.column.cellEvents,e=t.element,r=this.column.getField(),n={top:"flex-start",bottom:"flex-end",middle:"center"},o={left:"flex-start",right:"flex-end",center:"center"};e.style.textAlign=t.column.hozAlign;if(t.column.vertAlign){e.style.display="inline-flex";e.style.alignItems=n[t.column.vertAlign]||"";if(t.column.hozAlign){e.style.justifyContent=o[t.column.hozAlign]||""}}if(r){e.setAttribute("tabulator-field",r)}if(t.column.definition.cssClass){var s=t.column.definition.cssClass.split(" ");s.forEach((function(t){e.classList.add(t)}))}if(this.table.options.tooltipGenerationMode==="hover"){e.addEventListener("mouseenter",(function(i){t._generateTooltip()}))}t._bindClickEvents(i);t._bindTouchEvents(i);t._bindMouseEvents(i);if(t.column.modules.edit){t.table.modules.edit.bindEditor(t)}if(t.column.definition.rowHandle&&t.table.options.movableRows!==false&&t.table.modExists("moveRow")){t.table.modules.moveRow.initializeCell(t)}if(!t.column.visible){t.hide()}};A.prototype._bindClickEvents=function(t){var i=this,e=i.element;if(t.cellClick||i.table.options.cellClick){e.addEventListener("click",(function(e){var r=i.getComponent();if(t.cellClick){t.cellClick.call(i.table,e,r)}if(i.table.options.cellClick){i.table.options.cellClick.call(i.table,e,r)}}))}if(t.cellDblClick||this.table.options.cellDblClick){e.addEventListener("dblclick",(function(e){var r=i.getComponent();if(t.cellDblClick){t.cellDblClick.call(i.table,e,r)}if(i.table.options.cellDblClick){i.table.options.cellDblClick.call(i.table,e,r)}}))}else{e.addEventListener("dblclick",(function(t){if(i.table.modExists("edit")){if(i.table.modules.edit.currentCell===i){return}}t.preventDefault();try{if(document.selection){var e=document.body.createTextRange();e.moveToElementText(i.element);e.select()}else if(window.getSelection){var e=document.createRange();e.selectNode(i.element);window.getSelection().removeAllRanges();window.getSelection().addRange(e)}}catch(t){}}))}if(t.cellContext||this.table.options.cellContext){e.addEventListener("contextmenu",(function(e){var r=i.getComponent();if(t.cellContext){t.cellContext.call(i.table,e,r)}if(i.table.options.cellContext){i.table.options.cellContext.call(i.table,e,r)}}))}};A.prototype._bindMouseEvents=function(t){var i=this,e=i.element;if(t.cellMouseEnter||i.table.options.cellMouseEnter){e.addEventListener("mouseenter",(function(e){var r=i.getComponent();if(t.cellMouseEnter){t.cellMouseEnter.call(i.table,e,r)}if(i.table.options.cellMouseEnter){i.table.options.cellMouseEnter.call(i.table,e,r)}}))}if(t.cellMouseLeave||i.table.options.cellMouseLeave){e.addEventListener("mouseleave",(function(e){var r=i.getComponent();if(t.cellMouseLeave){t.cellMouseLeave.call(i.table,e,r)}if(i.table.options.cellMouseLeave){i.table.options.cellMouseLeave.call(i.table,e,r)}}))}if(t.cellMouseOver||i.table.options.cellMouseOver){e.addEventListener("mouseover",(function(e){var r=i.getComponent();if(t.cellMouseOver){t.cellMouseOver.call(i.table,e,r)}if(i.table.options.cellMouseOver){i.table.options.cellMouseOver.call(i.table,e,r)}}))}if(t.cellMouseOut||i.table.options.cellMouseOut){e.addEventListener("mouseout",(function(e){var r=i.getComponent();if(t.cellMouseOut){t.cellMouseOut.call(i.table,e,r)}if(i.table.options.cellMouseOut){i.table.options.cellMouseOut.call(i.table,e,r)}}))}if(t.cellMouseMove||i.table.options.cellMouseMove){e.addEventListener("mousemove",(function(e){var r=i.getComponent();if(t.cellMouseMove){t.cellMouseMove.call(i.table,e,r)}if(i.table.options.cellMouseMove){i.table.options.cellMouseMove.call(i.table,e,r)}}))}};A.prototype._bindTouchEvents=function(t){var i=this,e=i.element,r,n,o;if(t.cellTap||this.table.options.cellTap){o=false;e.addEventListener("touchstart",(function(t){o=true}),{passive:true});e.addEventListener("touchend",(function(e){if(o){var r=i.getComponent();if(t.cellTap){t.cellTap.call(i.table,e,r)}if(i.table.options.cellTap){i.table.options.cellTap.call(i.table,e,r)}}o=false}))}if(t.cellDblTap||this.table.options.cellDblTap){r=null;e.addEventListener("touchend",(function(e){if(r){clearTimeout(r);r=null;var n=i.getComponent();if(t.cellDblTap){t.cellDblTap.call(i.table,e,n)}if(i.table.options.cellDblTap){i.table.options.cellDblTap.call(i.table,e,n)}}else{r=setTimeout((function(){clearTimeout(r);r=null}),300)}}))}if(t.cellTapHold||this.table.options.cellTapHold){n=null;e.addEventListener("touchstart",(function(e){clearTimeout(n);n=setTimeout((function(){clearTimeout(n);n=null;o=false;var r=i.getComponent();if(t.cellTapHold){t.cellTapHold.call(i.table,e,r)}if(i.table.options.cellTapHold){i.table.options.cellTapHold.call(i.table,e,r)}}),1e3)}),{passive:true});e.addEventListener("touchend",(function(t){clearTimeout(n);n=null}))}};A.prototype._generateContents=function(){var t;if(this.table.modExists("format")){t=this.table.modules.format.formatValue(this)}else{t=this.element.innerHTML=this.value}switch(typeof t==="undefined"?"undefined":T(t)){case"object":if(t instanceof Node){while(this.element.firstChild){this.element.removeChild(this.element.firstChild)}this.element.appendChild(t)}else{this.element.innerHTML="";if(t!=null){console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",t)}}break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=t}};A.prototype.cellRendered=function(){if(this.table.modExists("format")&&this.table.modules.format.cellRendered){this.table.modules.format.cellRendered(this)}};A.prototype._generateTooltip=function(){var t=this.column.tooltip;if(t){if(t===true){t=this.value}else if(typeof t=="function"){t=t(this.getComponent());if(t===false){t=""}}if(typeof t==="undefined"){t=""}this.element.setAttribute("title",t)}else{this.element.setAttribute("title","")}};A.prototype.getElement=function(t){if(!this.loaded){this.loaded=true;if(!t){this.layoutElement()}}return this.element};A.prototype.getValue=function(){return this.value};A.prototype.getOldValue=function(){return this.oldValue};A.prototype.setValue=function(t,i){var e=this.setValueProcessData(t,i),r;if(e){if(this.table.options.history&&this.table.modExists("history")){this.table.modules.history.action("cellEdit",this,{oldValue:this.oldValue,newValue:this.value})}r=this.getComponent();if(this.column.cellEvents.cellEdited){this.column.cellEvents.cellEdited.call(this.table,r)}if(this.table.options.groupUpdateOnCellEdit&&this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.reassignRowToGroup(this.row)}this.cellRendered();this.table.options.cellEdited.call(this.table,r);if(this.table.options.dataChanged){this.table.options.dataChanged.call(this.table,this.table.rowManager.getData())}}};A.prototype.setValueProcessData=function(t,i){var e=false;if(this.value!=t){e=true;if(i){if(this.column.modules.mutate){t=this.table.modules.mutator.transformCell(this,t)}}}this.setValueActual(t);if(e&&this.table.modExists("columnCalcs")){if(this.column.definition.topCalc||this.column.definition.bottomCalc){if(this.table.options.groupBy&&this.table.modExists("groupRows")){if(this.table.options.columnCalcs=="table"||this.table.options.columnCalcs=="both"){this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)}if(this.table.options.columnCalcs!="table"){this.table.modules.columnCalcs.recalcRowGroup(this.row)}}else{this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)}}}return e};A.prototype.setValueActual=function(t){this.oldValue=this.value;this.value=t;if(this.table.options.reactiveData&&this.table.modExists("reactiveData")){this.table.modules.reactiveData.block()}this.column.setFieldValue(this.row.data,t);if(this.table.options.reactiveData&&this.table.modExists("reactiveData")){this.table.modules.reactiveData.unblock()}if(this.loaded){this.layoutElement()}};A.prototype.layoutElement=function(){this._generateContents();this._generateTooltip();if(this.table.options.resizableColumns&&this.table.modExists("resizeColumns")&&this.row.type==="row"){this.table.modules.resizeColumns.initializeColumn("cell",this.column,this.element)}if((this.column.definition.contextMenu||this.column.definition.clickMenu)&&this.table.modExists("menu")){this.table.modules.menu.initializeCell(this)}if(this.table.modExists("frozenColumns")){this.table.modules.frozenColumns.layoutElement(this.element,this.column)}};A.prototype.setWidth=function(){this.width=this.column.width;this.element.style.width=this.column.widthStyled};A.prototype.clearWidth=function(){this.width="";this.element.style.width=""};A.prototype.getWidth=function(){return this.width||this.element.offsetWidth};A.prototype.setMinWidth=function(){this.minWidth=this.column.minWidth;this.element.style.minWidth=this.column.minWidthStyled};A.prototype.setMaxWidth=function(){this.maxWidth=this.column.maxWidth;this.element.style.maxWidth=this.column.maxWidthStyled};A.prototype.checkHeight=function(){this.row.reinitializeHeight()};A.prototype.clearHeight=function(){this.element.style.height="";this.height=null};A.prototype.setHeight=function(){this.height=this.row.height;this.element.style.height=this.row.heightStyled};A.prototype.getHeight=function(){return this.height||this.element.offsetHeight};A.prototype.show=function(){this.element.style.display=this.column.vertAlign?"inline-flex":""};A.prototype.hide=function(){this.element.style.display="none"};A.prototype.edit=function(t){if(this.table.modExists("edit",true)){return this.table.modules.edit.editCell(this,t)}};A.prototype.cancelEdit=function(){if(this.table.modExists("edit",true)){var t=this.table.modules.edit.getCurrentCell();if(t&&t._getSelf()===this){this.table.modules.edit.cancelEdit()}else{console.warn("Cancel Editor Error - This cell is not currently being edited ")}}};A.prototype.validate=function(){if(this.column.modules.validate&&this.table.modExists("validate",true)){var t=this.table.modules.validate.validate(this.column.modules.validate,this,this.getValue());return t===true}else{return true}};A.prototype.delete=function(){if(!this.table.rowManager.redrawBlock&&this.element.parentNode){this.element.parentNode.removeChild(this.element)}if(this.modules.validate&&this.modules.validate.invalid){this.table.modules.validate.clearValidation(this)}if(this.modules.edit&&this.modules.edit.edited){this.table.modules.edit.clearEdited(this)}if(this.table.options.history){this.table.modules.history.clearComponentHistory(this)}this.element=false;this.column.deleteCell(this);this.row.deleteCell(this);this.calcs={}};A.prototype.nav=function(){var t=this,i=false,e=this.row.getCellIndex(this);return{next:function i(){var e=this.right(),r;if(!e){r=t.table.rowManager.nextDisplayRow(t.row,true);if(r){e=r.findNextEditableCell(-1);if(e){e.edit();return true}}}else{return true}return false},prev:function i(){var e=this.left(),r;if(!e){r=t.table.rowManager.prevDisplayRow(t.row,true);if(r){e=r.findPrevEditableCell(r.cells.length);if(e){e.edit();return true}}}else{return true}return false},left:function r(){i=t.row.findPrevEditableCell(e);if(i){i.edit();return true}else{return false}},right:function r(){i=t.row.findNextEditableCell(e);if(i){i.edit();return true}else{return false}},up:function i(){var r=t.table.rowManager.prevDisplayRow(t.row,true);if(r){r.cells[e].edit()}},down:function i(){var r=t.table.rowManager.nextDisplayRow(t.row,true);if(r){r.cells[e].edit()}}}};A.prototype.getIndex=function(){this.row.getCellIndex(this)};A.prototype.getComponent=function(){if(!this.component){this.component=new F(this)}return this.component};var L=function t(i){this.table=i;this.active=false;this.element=this.createElement();this.external=false;this.links=[];this._initialize()};L.prototype.createElement=function(){var t=document.createElement("div");t.classList.add("tabulator-footer");return t};L.prototype._initialize=function(t){if(this.table.options.footerElement){switch(T(this.table.options.footerElement)){case"string":if(this.table.options.footerElement[0]==="<"){this.element.innerHTML=this.table.options.footerElement}else{this.external=true;this.element=document.querySelector(this.table.options.footerElement)}break;default:this.element=this.table.options.footerElement;break}}};L.prototype.getElement=function(){return this.element};L.prototype.append=function(t,i){this.activate(i);this.element.appendChild(t);this.table.rowManager.adjustTableSize()};L.prototype.prepend=function(t,i){this.activate(i);this.element.insertBefore(t,this.element.firstChild);this.table.rowManager.adjustTableSize()};L.prototype.remove=function(t){t.parentNode.removeChild(t);this.deactivate()};L.prototype.deactivate=function(t){if(!this.element.firstChild||t){if(!this.external){this.element.parentNode.removeChild(this.element)}this.active=false}};L.prototype.activate=function(t){if(!this.active){this.active=true;if(!this.external){this.table.element.appendChild(this.getElement());this.table.element.style.display=""}}if(t){this.links.push(t)}};L.prototype.redraw=function(){this.links.forEach((function(t){t.footerRedraw()}))};var H=function t(i,e){this.options={};this.columnManager=null;this.rowManager=null;this.footerManager=null;this.vdomHoz=null;this.browser="";this.browserSlow=false;this.browserMobile=false;this.rtl=false;this.modules={};if(this.initializeElement(i)){this.initializeOptions(e||{});this._create()}t.prototype.comms.register(this)};H.prototype.defaultOptions={height:false,minHeight:false,maxHeight:false,layout:"fitData",layoutColumnsOnNewData:false,columnMinWidth:40,columnMaxWidth:false,columnHeaderVertAlign:"top",columnVertAlign:false,resizableColumns:true,resizableRows:false,autoResize:true,columns:[],cellHozAlign:"",cellVertAlign:"",headerHozAlign:"",data:[],autoColumns:false,autoColumnsDefinitions:false,reactiveData:false,nestedFieldSeparator:".",tooltips:false,tooltipsHeader:false,tooltipGenerationMode:"load",initialSort:false,initialFilter:false,initialHeaderFilter:false,columnHeaderSortMulti:true,sortOrderReverse:false,headerSort:true,headerSortTristate:false,headerSortElement:"<div class='tabulator-arrow'></div>",footerElement:false,index:"id",textDirection:"auto",keybindings:[],tabEndNewRow:false,invalidOptionWarnings:true,clipboard:false,clipboardCopyStyled:true,clipboardCopyConfig:false,clipboardCopyFormatter:false,clipboardCopyRowRange:"active",clipboardPasteParser:"table",clipboardPasteAction:"insert",clipboardCopied:function t(){},clipboardPasted:function t(){},clipboardPasteError:function t(){},downloadDataFormatter:false,downloadReady:function t(i,e){return e},downloadComplete:false,downloadConfig:{},downloadRowRange:"active",dataTree:false,dataTreeFilter:true,dataTreeSort:true,dataTreeElementColumn:false,dataTreeBranchElement:true,dataTreeChildIndent:9,dataTreeChildField:"_children",dataTreeCollapseElement:false,dataTreeExpandElement:false,dataTreeStartExpanded:false,dataTreeRowExpanded:function t(){},dataTreeRowCollapsed:function t(){},dataTreeChildColumnCalcs:false,dataTreeSelectPropagate:false,printAsHtml:false,printFormatter:false,printHeader:false,printFooter:false,printCopyStyle:true,printStyled:true,printVisibleRows:true,printRowRange:"visible",printConfig:{},addRowPos:"bottom",selectable:"highlight",selectableRangeMode:"drag",selectableRollingSelection:true,selectablePersistence:true,selectableCheck:function t(i,e){return true},headerFilterLiveFilterDelay:300,headerFilterPlaceholder:false,headerVisible:true,history:false,locale:false,langs:{},virtualDom:true,virtualDomBuffer:0,virtualDomHoz:false,persistentLayout:false,persistentSort:false,persistentFilter:false,persistenceID:"",persistenceMode:true,persistenceReaderFunc:false,persistenceWriterFunc:false,persistence:false,responsiveLayout:false,responsiveLayoutCollapseStartOpen:true,responsiveLayoutCollapseUseFormatters:true,responsiveLayoutCollapseFormatter:false,pagination:false,paginationSize:false,paginationInitialPage:1,paginationButtonCount:5,paginationSizeSelector:false,paginationElement:false,paginationDataSent:{},paginationDataReceived:{},paginationAddRow:"page",ajaxURL:false,ajaxURLGenerator:false,ajaxParams:{},ajaxConfig:"get",ajaxContentType:"form",ajaxRequestFunc:false,ajaxLoader:true,ajaxLoaderLoading:false,ajaxLoaderError:false,ajaxFiltering:false,ajaxSorting:false,ajaxProgressiveLoad:false,ajaxProgressiveLoadDelay:0,ajaxProgressiveLoadScrollMargin:0,groupBy:false,groupStartOpen:true,groupValues:false,groupUpdateOnCellEdit:false,groupHeader:false,groupHeaderPrint:null,groupHeaderClipboard:null,groupHeaderHtmlOutput:null,groupHeaderDownload:null,htmlOutputConfig:false,movableColumns:false,movableRows:false,movableRowsConnectedTables:false,movableRowsConnectedElements:false,movableRowsSender:false,movableRowsReceiver:"insert",movableRowsSendingStart:function t(){},movableRowsSent:function t(){},movableRowsSentFailed:function t(){},movableRowsSendingStop:function t(){},movableRowsReceivingStart:function t(){},movableRowsReceived:function t(){},movableRowsReceivedFailed:function t(){},movableRowsReceivingStop:function t(){},movableRowsElementDrop:function t(){},scrollToRowPosition:"top",scrollToRowIfVisible:true,scrollToColumnPosition:"left",scrollToColumnIfVisible:true,rowFormatter:false,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:false,tableBuilding:function t(){},tableBuilt:function t(){},renderStarted:function t(){},renderComplete:function t(){},rowClick:false,rowDblClick:false,rowContext:false,rowTap:false,rowDblTap:false,rowTapHold:false,rowMouseEnter:false,rowMouseLeave:false,rowMouseOver:false,rowMouseOut:false,rowMouseMove:false,rowContextMenu:false,rowClickMenu:false,rowAdded:function t(){},rowDeleted:function t(){},rowMoved:function t(){},rowUpdated:function t(){},rowSelectionChanged:function t(){},rowSelected:function t(){},rowDeselected:function t(){},rowResized:function t(){},cellClick:false,cellDblClick:false,cellContext:false,cellTap:false,cellDblTap:false,cellTapHold:false,cellMouseEnter:false,cellMouseLeave:false,cellMouseOver:false,cellMouseOut:false,cellMouseMove:false,cellEditing:function t(){},cellEdited:function t(){},cellEditCancelled:function t(){},columnMoved:false,columnResized:function t(){},columnTitleChanged:function t(){},columnVisibilityChanged:function t(){},htmlImporting:function t(){},htmlImported:function t(){},dataLoading:function t(){},dataLoaded:function t(){},dataEdited:false,dataChanged:false,ajaxRequesting:function t(){},ajaxResponse:false,ajaxError:function t(){},dataFiltering:false,dataFiltered:false,dataSorting:function t(){},dataSorted:function t(){},groupToggleElement:"arrow",groupClosedShowCalcs:false,dataGrouping:function t(){},dataGrouped:false,groupVisibilityChanged:function t(){},groupClick:false,groupDblClick:false,groupContext:false,groupContextMenu:false,groupClickMenu:false,groupTap:false,groupDblTap:false,groupTapHold:false,columnCalcs:true,pageLoaded:function t(){},localized:function t(){},validationMode:"blocking",validationFailed:function t(){},historyUndo:function t(){},historyRedo:function t(){},scrollHorizontal:function t(){},scrollVertical:function t(){}};H.prototype.initializeOptions=function(t){if(t.invalidOptionWarnings!==false){for(var i in t){if(typeof this.defaultOptions[i]==="undefined"){console.warn("Invalid table constructor option:",i)}}}for(var i in this.defaultOptions){if(i in t){this.options[i]=t[i]}else{if(Array.isArray(this.defaultOptions[i])){this.options[i]=Object.assign([],this.defaultOptions[i])}else if(T(this.defaultOptions[i])==="object"&&this.defaultOptions[i]!==null){this.options[i]=Object.assign({},this.defaultOptions[i])}else{this.options[i]=this.defaultOptions[i]}}}};H.prototype.initializeElement=function(t){if(typeof HTMLElement!=="undefined"&&t instanceof HTMLElement){this.element=t;return true}else if(typeof t==="string"){this.element=document.querySelector(t);if(this.element){return true}else{console.error("Tabulator Creation Error - no element found matching selector: ",t);return false}}else{console.error("Tabulator Creation Error - Invalid element provided:",t);return false}};H.prototype.rtlCheck=function(){var t=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if(t.direction!=="rtl"){break}case"rtl":this.element.classList.add("tabulator-rtl");this.rtl=true;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=false}};H.prototype._mapDepricatedFunctionality=function(){if(this.options.persistentLayout||this.options.persistentSort||this.options.persistentFilter){if(!this.options.persistence){this.options.persistence={}}}if(this.options.dataEdited){console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead");this.options.dataChanged=this.options.dataEdited}if(this.options.downloadDataFormatter){console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated")}if(typeof this.options.clipboardCopyHeader!=="undefined"){this.options.columnHeaders=this.options.clipboardCopyHeader;console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option")}if(this.options.printVisibleRows!==true){console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option");this.options.persistence.printRowRange="active"}if(this.options.printCopyStyle!==true){console.warn("printCopyStyle option is deprecated, you should now use the printStyled option");this.options.persistence.printStyled=this.options.printCopyStyle}if(this.options.persistentLayout){console.warn("persistentLayout option is deprecated, you should now use the persistence option");if(this.options.persistence!==true&&typeof this.options.persistence.columns==="undefined"){this.options.persistence.columns=true}}if(this.options.persistentSort){console.warn("persistentSort option is deprecated, you should now use the persistence option");if(this.options.persistence!==true&&typeof this.options.persistence.sort==="undefined"){this.options.persistence.sort=true}}if(this.options.persistentFilter){console.warn("persistentFilter option is deprecated, you should now use the persistence option");if(this.options.persistence!==true&&typeof this.options.persistence.filter==="undefined"){this.options.persistence.filter=true}}if(this.options.columnVertAlign){console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option");this.options.columnHeaderVertAlign=this.options.columnVertAlign}};H.prototype._clearSelection=function(){this.element.classList.add("tabulator-block-select");if(window.getSelection){if(window.getSelection().empty){window.getSelection().empty()}else if(window.getSelection().removeAllRanges){window.getSelection().removeAllRanges()}}else if(document.selection){document.selection.empty()}this.element.classList.remove("tabulator-block-select")};H.prototype._create=function(){this._clearObjectPointers();this._mapDepricatedFunctionality();this.bindModules();this.rtlCheck();if(this.element.tagName==="TABLE"){if(this.modExists("htmlTableImport",true)){this.modules.htmlTableImport.parseTable()}}this.columnManager=new S(this);this.rowManager=new M(this);this.footerManager=new L(this);this.columnManager.setRowManager(this.rowManager);this.rowManager.setColumnManager(this.columnManager);if(this.options.virtualDomHoz){this.vdomHoz=new D(this)}this._buildElement();this._loadInitialData()};H.prototype._clearObjectPointers=function(){this.options.columns=this.options.columns.slice(0);if(!this.options.reactiveData){this.options.data=this.options.data.slice(0)}};H.prototype._buildElement=function(){var t=this;var i=this.element,e=this.modules,r=this.options;r.tableBuilding.call(this);i.classList.add("tabulator");i.setAttribute("role","grid");while(i.firstChild){i.removeChild(i.firstChild)}if(r.height){r.height=isNaN(r.height)?r.height:r.height+"px";i.style.height=r.height}if(r.minHeight!==false){r.minHeight=isNaN(r.minHeight)?r.minHeight:r.minHeight+"px";i.style.minHeight=r.minHeight}if(r.maxHeight!==false){r.maxHeight=isNaN(r.maxHeight)?r.maxHeight:r.maxHeight+"px";i.style.maxHeight=r.maxHeight}this.columnManager.initialize();this.rowManager.initialize();this._detectBrowser();if(this.modExists("layout",true)){e.layout.initialize(r.layout)}e.localize.initialize();if(r.headerFilterPlaceholder!==false){e.localize.setHeaderFilterPlaceholder(r.headerFilterPlaceholder)}for(var n in r.langs){e.localize.installLang(n,r.langs[n])}e.localize.setLocale(r.locale);if(typeof r.placeholder=="string"){var o=document.createElement("div");o.classList.add("tabulator-placeholder");var s=document.createElement("span");s.innerHTML=r.placeholder;o.appendChild(s);r.placeholder=o}i.appendChild(this.columnManager.getElement());i.appendChild(this.rowManager.getElement());if(r.footerElement){this.footerManager.activate()}if(r.persistence&&this.modExists("persistence",true)){e.persistence.initialize()}if(r.movableRows&&this.modExists("moveRow")){e.moveRow.initialize()}if(r.autoColumns&&this.options.data){this.columnManager.generateColumnsFromRowData(this.options.data)}if(this.modExists("columnCalcs")){e.columnCalcs.initialize()}this.columnManager.setColumns(r.columns);if(r.dataTree&&this.modExists("dataTree",true)){e.dataTree.initialize()}if(this.modExists("frozenRows")){this.modules.frozenRows.initialize()}if((r.persistence&&this.modExists("persistence",true)&&e.persistence.config.sort||r.initialSort)&&this.modExists("sort",true)){var a=[];if(r.persistence&&this.modExists("persistence",true)&&e.persistence.config.sort){a=e.persistence.load("sort");if(a===false&&r.initialSort){a=r.initialSort}}else if(r.initialSort){a=r.initialSort}e.sort.setSort(a)}if((r.persistence&&this.modExists("persistence",true)&&e.persistence.config.filter||r.initialFilter)&&this.modExists("filter",true)){var u=[];if(r.persistence&&this.modExists("persistence",true)&&e.persistence.config.filter){u=e.persistence.load("filter");if(u===false&&r.initialFilter){u=r.initialFilter}}else if(r.initialFilter){u=r.initialFilter}e.filter.setFilter(u)}if(r.initialHeaderFilter&&this.modExists("filter",true)){r.initialHeaderFilter.forEach((function(i){var r=t.columnManager.findColumn(i.field);if(r){e.filter.setHeaderFilterValue(r,i.value)}else{console.warn("Column Filter Error - No matching column found:",i.field);return false}}))}if(this.modExists("ajax")){e.ajax.initialize()}if(r.pagination&&this.modExists("page",true)){e.page.initialize()}if(r.groupBy&&this.modExists("groupRows",true)){e.groupRows.initialize()}if(this.modExists("keybindings")){e.keybindings.initialize()}if(this.modExists("selectRow")){e.selectRow.clearSelectionData(true)}if(r.autoResize&&this.modExists("resizeTable")){e.resizeTable.initialize()}if(this.modExists("clipboard")){e.clipboard.initialize()}if(r.printAsHtml&&this.modExists("print")){e.print.initialize()}r.tableBuilt.call(this)};H.prototype._loadInitialData=function(){var t=this;if(t.options.pagination&&t.modExists("page")){t.modules.page.reset(true,true);if(t.options.pagination=="local"){if(t.options.data.length){t.rowManager.setData(t.options.data,false,true)}else{if((t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax")){t.modules.ajax.loadData(false,true).then((function(){})).catch((function(){if(t.options.paginationInitialPage){t.modules.page.setPage(t.options.paginationInitialPage)}}));return}else{t.rowManager.setData(t.options.data,false,true)}}if(t.options.paginationInitialPage){t.modules.page.setPage(t.options.paginationInitialPage)}}else{if(t.options.ajaxURL){t.modules.page.setPage(t.options.paginationInitialPage).then((function(){})).catch((function(){}))}else{t.rowManager.setData([],false,true)}}}else{if(t.options.data.length){t.rowManager.setData(t.options.data)}else{if((t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax")){t.modules.ajax.loadData(false,true).then((function(){})).catch((function(){}))}else{t.rowManager.setData(t.options.data,false,true)}}}};H.prototype.destroy=function(){var t=this.element;H.prototype.comms.deregister(this);if(this.options.reactiveData&&this.modExists("reactiveData",true)){this.modules.reactiveData.unwatchData()}this.rowManager.rows.forEach((function(t){t.wipe()}));this.rowManager.rows=[];this.rowManager.activeRows=[];this.rowManager.displayRows=[];if(this.options.autoResize&&this.modExists("resizeTable")){this.modules.resizeTable.clearBindings()}if(this.modExists("keybindings")){this.modules.keybindings.clearBindings()}while(t.firstChild){t.removeChild(t.firstChild)}t.classList.remove("tabulator")};H.prototype._detectBrowser=function(){var t=navigator.userAgent||navigator.vendor||window.opera;if(t.indexOf("Trident")>-1){this.browser="ie";this.browserSlow=true}else if(t.indexOf("Edge")>-1){this.browser="edge";this.browserSlow=true}else if(t.indexOf("Firefox")>-1){this.browser="firefox";this.browserSlow=false}else{this.browser="other";this.browserSlow=false}this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))};H.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()};H.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()};H.prototype.setDataFromLocalFile=function(t){var i=this;return new Promise((function(e,r){var n=document.createElement("input");n.type="file";n.accept=t||".json,application/json";n.addEventListener("change",(function(t){var o=n.files[0],s=new FileReader,a;s.readAsText(o);s.onload=function(t){try{a=JSON.parse(s.result)}catch(t){console.warn("File Load Error - File contents is invalid JSON",t);r(t);return}i.setData(a).then((function(t){e(t)})).catch((function(t){e(t)}))};s.onerror=function(t){console.warn("File Load Error - Unable to read file");r()}}));n.click()}))};H.prototype.setData=function(t,i,e){if(this.modExists("ajax")){this.modules.ajax.blockActiveRequest()}return this._setData(t,i,e,false,true)};H.prototype._setData=function(t,i,e,r,n){var o=this;if(typeof t==="string"){if(t.indexOf("{")==0||t.indexOf("[")==0){return o.rowManager.setData(JSON.parse(t),r,n)}else{if(o.modExists("ajax",true)){if(i){o.modules.ajax.setParams(i)}if(e){o.modules.ajax.setConfig(e)}o.modules.ajax.setUrl(t);if(o.options.pagination=="remote"&&o.modExists("page",true)){o.modules.page.reset(true,true);return o.modules.page.setPage(1)}else{return o.modules.ajax.loadData(r,n)}}}}else{if(t){return o.rowManager.setData(t,r,n)}else{if(o.modExists("ajax")&&(o.modules.ajax.getUrl||o.options.ajaxURLGenerator)){if(o.options.pagination=="remote"&&o.modExists("page",true)){o.modules.page.reset(true,true);return o.modules.page.setPage(1)}else{return o.modules.ajax.loadData(r,n)}}else{return o.rowManager.setData([],r,n)}}}};H.prototype.clearData=function(){if(this.modExists("ajax")){this.modules.ajax.blockActiveRequest()}this.rowManager.clearData()};H.prototype.getData=function(t){if(t===true){console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'");t="active"}return this.rowManager.getData(t)};H.prototype.getDataCount=function(t){if(t===true){console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'");t="active"}return this.rowManager.getDataCount(t)};H.prototype.searchRows=function(t,i,e){if(this.modExists("filter",true)){return this.modules.filter.search("rows",t,i,e)}};H.prototype.searchData=function(t,i,e){if(this.modExists("filter",true)){return this.modules.filter.search("data",t,i,e)}};H.prototype.getHtml=function(t,i,e){if(this.modExists("export",true)){return this.modules.export.getHtml(t,i,e)}};H.prototype.print=function(t,i,e){if(this.modExists("print",true)){return this.modules.print.printFullscreen(t,i,e)}};H.prototype.getAjaxUrl=function(){if(this.modExists("ajax",true)){return this.modules.ajax.getUrl()}};H.prototype.replaceData=function(t,i,e){if(this.modExists("ajax")){this.modules.ajax.blockActiveRequest()}return this._setData(t,i,e,true)};H.prototype.updateData=function(t){var i=this;var e=this;var r=0;return new Promise((function(n,o){if(i.modExists("ajax")){i.modules.ajax.blockActiveRequest()}if(typeof t==="string"){t=JSON.parse(t)}if(t){t.forEach((function(t){var i=e.rowManager.findRow(t[e.options.index]);if(i){r++;i.updateData(t).then((function(){r--;if(!r){n()}}))}}))}else{console.warn("Update Error - No data provided");o("Update Error - No data provided")}}))};H.prototype.addData=function(t,i,e){var r=this;return new Promise((function(n,o){if(r.modExists("ajax")){r.modules.ajax.blockActiveRequest()}if(typeof t==="string"){t=JSON.parse(t)}if(t){r.rowManager.addRows(t,i,e).then((function(t){var i=[];t.forEach((function(t){i.push(t.getComponent())}));n(i)}))}else{console.warn("Update Error - No data provided");o("Update Error - No data provided")}}))};H.prototype.updateOrAddData=function(t){var i=this;var e=this,r=[],n=0;return new Promise((function(o,s){if(i.modExists("ajax")){i.modules.ajax.blockActiveRequest()}if(typeof t==="string"){t=JSON.parse(t)}if(t){t.forEach((function(t){var i=e.rowManager.findRow(t[e.options.index]);n++;if(i){i.updateData(t).then((function(){n--;r.push(i.getComponent());if(!n){o(r)}}))}else{e.rowManager.addRows(t).then((function(t){n--;r.push(t[0].getComponent());if(!n){o(r)}}))}}))}else{console.warn("Update Error - No data provided");s("Update Error - No data provided")}}))};H.prototype.getRow=function(t){var i=this.rowManager.findRow(t);if(i){return i.getComponent()}else{console.warn("Find Error - No matching row found:",t);return false}};H.prototype.getRowFromPosition=function(t,i){var e=this.rowManager.getRowFromPosition(t,i);if(e){return e.getComponent()}else{console.warn("Find Error - No matching row found:",t);return false}};H.prototype.deleteRow=function(t){var i=this;return new Promise((function(e,r){var n=i,o=0,s=0,a=[];function u(){o++;if(o==t.length){if(s){n.rowManager.reRenderInPosition();e()}}}if(!Array.isArray(t)){t=[t]}t.forEach((function(t){var e=i.rowManager.findRow(t,true);if(e){a.push(e)}else{console.warn("Delete Error - No matching row found:",t);r("Delete Error - No matching row found");u()}}));a.sort((function(t,e){return i.rowManager.rows.indexOf(t)>i.rowManager.rows.indexOf(e)?1:-1}));a.forEach((function(t){t.delete().then((function(){s++;u()})).catch((function(t){u();r(t)}))}))}))};H.prototype.addRow=function(t,i,e){var r=this;return new Promise((function(n,o){if(typeof t==="string"){t=JSON.parse(t)}r.rowManager.addRows(t,i,e).then((function(t){if(r.modExists("columnCalcs")){r.modules.columnCalcs.recalc(r.rowManager.activeRows)}n(t[0].getComponent())}))}))};H.prototype.updateOrAddRow=function(t,i){var e=this;return new Promise((function(r,n){var o=e.rowManager.findRow(t);if(typeof i==="string"){i=JSON.parse(i)}if(o){o.updateData(i).then((function(){if(e.modExists("columnCalcs")){e.modules.columnCalcs.recalc(e.rowManager.activeRows)}r(o.getComponent())})).catch((function(t){n(t)}))}else{o=e.rowManager.addRows(i).then((function(t){if(e.modExists("columnCalcs")){e.modules.columnCalcs.recalc(e.rowManager.activeRows)}r(t[0].getComponent())})).catch((function(t){n(t)}))}}))};H.prototype.updateRow=function(t,i){var e=this;return new Promise((function(r,n){var o=e.rowManager.findRow(t);if(typeof i==="string"){i=JSON.parse(i)}if(o){o.updateData(i).then((function(){r(o.getComponent())})).catch((function(t){n(t)}))}else{console.warn("Update Error - No matching row found:",t);n("Update Error - No matching row found")}}))};H.prototype.scrollToRow=function(t,i,e){var r=this;return new Promise((function(n,o){var s=r.rowManager.findRow(t);if(s){r.rowManager.scrollToRow(s,i,e).then((function(){n()})).catch((function(t){o(t)}))}else{console.warn("Scroll Error - No matching row found:",t);o("Scroll Error - No matching row found")}}))};H.prototype.moveRow=function(t,i,e){var r=this.rowManager.findRow(t);if(r){r.moveToRow(i,e)}else{console.warn("Move Error - No matching row found:",t)}};H.prototype.getRows=function(t){if(t===true){console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'");t="active"}return this.rowManager.getComponents(t)};H.prototype.getRowPosition=function(t,i){var e=this.rowManager.findRow(t);if(e){return this.rowManager.getRowPosition(e,i)}else{console.warn("Position Error - No matching row found:",t);return false}};H.prototype.copyToClipboard=function(t){if(this.modExists("clipboard",true)){this.modules.clipboard.copy(t)}};H.prototype.setColumns=function(t){this.columnManager.setColumns(t)};H.prototype.getColumns=function(t){return this.columnManager.getComponents(t)};H.prototype.getColumn=function(t){var i=this.columnManager.findColumn(t);if(i){return i.getComponent()}else{console.warn("Find Error - No matching column found:",t);return false}};H.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()};H.prototype.getColumnLayout=function(){if(this.modExists("persistence",true)){return this.modules.persistence.parseColumns(this.columnManager.getColumns())}};H.prototype.setColumnLayout=function(t){if(this.modExists("persistence",true)){this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t));return true}return false};H.prototype.showColumn=function(t){var i=this.columnManager.findColumn(t);if(i){i.show();if(this.options.responsiveLayout&&this.modExists("responsiveLayout",true)){this.modules.responsiveLayout.update()}}else{console.warn("Column Show Error - No matching column found:",t);return false}};H.prototype.hideColumn=function(t){var i=this.columnManager.findColumn(t);if(i){i.hide();if(this.options.responsiveLayout&&this.modExists("responsiveLayout",true)){this.modules.responsiveLayout.update()}}else{console.warn("Column Hide Error - No matching column found:",t);return false}};H.prototype.toggleColumn=function(t){var i=this.columnManager.findColumn(t);if(i){if(i.visible){i.hide()}else{i.show()}}else{console.warn("Column Visibility Toggle Error - No matching column found:",t);return false}};H.prototype.addColumn=function(t,i,e){var r=this;return new Promise((function(n,o){var s=r.columnManager.findColumn(e);r.columnManager.addColumn(t,i,s).then((function(t){n(t.getComponent())})).catch((function(t){o(t)}))}))};H.prototype.deleteColumn=function(t){var i=this;return new Promise((function(e,r){var n=i.columnManager.findColumn(t);if(n){n.delete().then((function(){e()})).catch((function(t){r(t)}))}else{console.warn("Column Delete Error - No matching column found:",t);r()}}))};H.prototype.updateColumnDefinition=function(t,i){var e=this;return new Promise((function(r,n){var o=e.columnManager.findColumn(t);if(o){o.updateDefinition(i).then((function(t){r(t)})).catch((function(t){n(t)}))}else{console.warn("Column Update Error - No matching column found:",t);n()}}))};H.prototype.moveColumn=function(t,i,e){var r=this.columnManager.findColumn(t);var n=this.columnManager.findColumn(i);if(r){if(n){this.columnManager.moveColumn(r,n,e)}else{console.warn("Move Error - No matching column found:",n)}}else{console.warn("Move Error - No matching column found:",t)}};H.prototype.scrollToColumn=function(t,i,e){var r=this;return new Promise((function(n,o){var s=r.columnManager.findColumn(t);if(s){r.columnManager.scrollToColumn(s,i,e).then((function(){n()})).catch((function(t){o(t)}))}else{console.warn("Scroll Error - No matching column found:",t);o("Scroll Error - No matching column found")}}))};H.prototype.setLocale=function(t){this.modules.localize.setLocale(t)};H.prototype.getLocale=function(){return this.modules.localize.getLocale()};H.prototype.getLang=function(t){return this.modules.localize.getLang(t)};H.prototype.redraw=function(t){this.columnManager.redraw(t);this.rowManager.redraw(t)};H.prototype.setHeight=function(t){if(this.rowManager.renderMode!=="classic"){this.options.height=isNaN(t)?t:t+"px";this.element.style.height=this.options.height;this.rowManager.setRenderMode();this.rowManager.redraw()}else{console.warn("setHeight function is not available in classic render mode")}};H.prototype.setSort=function(t,i){if(this.modExists("sort",true)){this.modules.sort.setSort(t,i);this.rowManager.sorterRefresh()}};H.prototype.getSorters=function(){if(this.modExists("sort",true)){return this.modules.sort.getSort()}};H.prototype.clearSort=function(){if(this.modExists("sort",true)){this.modules.sort.clear();this.rowManager.sorterRefresh()}};H.prototype.setFilter=function(t,i,e,r){if(this.modExists("filter",true)){this.modules.filter.setFilter(t,i,e,r);this.rowManager.filterRefresh()}};H.prototype.refreshFilter=function(){if(this.modExists("filter",true)){this.rowManager.filterRefresh()}};H.prototype.addFilter=function(t,i,e,r){if(this.modExists("filter",true)){this.modules.filter.addFilter(t,i,e,r);this.rowManager.filterRefresh()}};H.prototype.getFilters=function(t){if(this.modExists("filter",true)){return this.modules.filter.getFilters(t)}};H.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",true)){var i=this.columnManager.findColumn(t);if(i){this.modules.filter.setHeaderFilterFocus(i)}else{console.warn("Column Filter Focus Error - No matching column found:",t);return false}}};H.prototype.getHeaderFilterValue=function(t){if(this.modExists("filter",true)){var i=this.columnManager.findColumn(t);if(i){return this.modules.filter.getHeaderFilterValue(i)}else{console.warn("Column Filter Error - No matching column found:",t)}}};H.prototype.setHeaderFilterValue=function(t,i){if(this.modExists("filter",true)){var e=this.columnManager.findColumn(t);if(e){this.modules.filter.setHeaderFilterValue(e,i)}else{console.warn("Column Filter Error - No matching column found:",t);return false}}};H.prototype.getHeaderFilters=function(){if(this.modExists("filter",true)){return this.modules.filter.getHeaderFilters()}};H.prototype.removeFilter=function(t,i,e){if(this.modExists("filter",true)){this.modules.filter.removeFilter(t,i,e);this.rowManager.filterRefresh()}};H.prototype.clearFilter=function(t){if(this.modExists("filter",true)){this.modules.filter.clearFilter(t);this.rowManager.filterRefresh()}};H.prototype.clearHeaderFilter=function(){if(this.modExists("filter",true)){this.modules.filter.clearHeaderFilter();this.rowManager.filterRefresh()}};H.prototype.selectRow=function(t){if(this.modExists("selectRow",true)){if(t===true){console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'");t="active"}this.modules.selectRow.selectRows(t)}};H.prototype.deselectRow=function(t){if(this.modExists("selectRow",true)){this.modules.selectRow.deselectRows(t)}};H.prototype.toggleSelectRow=function(t){if(this.modExists("selectRow",true)){this.modules.selectRow.toggleRow(t)}};H.prototype.getSelectedRows=function(){if(this.modExists("selectRow",true)){return this.modules.selectRow.getSelectedRows()}};H.prototype.getSelectedData=function(){if(this.modExists("selectRow",true)){return this.modules.selectRow.getSelectedData()}};H.prototype.getInvalidCells=function(){if(this.modExists("validate",true)){return this.modules.validate.getInvalidCells()}};H.prototype.clearCellValidation=function(t){var i=this;if(this.modExists("validate",true)){if(!t){t=this.modules.validate.getInvalidCells()}if(!Array.isArray(t)){t=[t]}t.forEach((function(t){i.modules.validate.clearValidation(t._getSelf())}))}};H.prototype.validate=function(t){var i=[];this.rowManager.rows.forEach((function(t){var e=t.validate();if(e!==true){i=i.concat(e)}}));return i.length?i:true};H.prototype.setMaxPage=function(t){if(this.options.pagination&&this.modExists("page")){this.modules.page.setMaxPage(t)}else{return false}};H.prototype.setPage=function(t){if(this.options.pagination&&this.modExists("page")){return this.modules.page.setPage(t)}else{return new Promise((function(t,i){i()}))}};H.prototype.setPageToRow=function(t){var i=this;return new Promise((function(e,r){if(i.options.pagination&&i.modExists("page")){t=i.rowManager.findRow(t);if(t){i.modules.page.setPageToRow(t).then((function(){e()})).catch((function(){r()}))}else{r()}}else{r()}}))};H.prototype.setPageSize=function(t){if(this.options.pagination&&this.modExists("page")){this.modules.page.setPageSize(t);this.modules.page.setPage(1).then((function(){})).catch((function(){}))}else{return false}};H.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",true)){return this.modules.page.getPageSize()}};H.prototype.previousPage=function(){if(this.options.pagination&&this.modExists("page")){this.modules.page.previousPage()}else{return false}};H.prototype.nextPage=function(){if(this.options.pagination&&this.modExists("page")){this.modules.page.nextPage()}else{return false}};H.prototype.getPage=function(){if(this.options.pagination&&this.modExists("page")){return this.modules.page.getPage()}else{return false}};H.prototype.getPageMax=function(){if(this.options.pagination&&this.modExists("page")){return this.modules.page.getPageMax()}else{return false}};H.prototype.setGroupBy=function(t){if(this.modExists("groupRows",true)){this.options.groupBy=t;this.modules.groupRows.initialize();this.rowManager.refreshActiveData("display");if(this.options.persistence&&this.modExists("persistence",true)&&this.modules.persistence.config.group){this.modules.persistence.save("group")}}else{return false}};H.prototype.setGroupValues=function(t){if(this.modExists("groupRows",true)){this.options.groupValues=t;this.modules.groupRows.initialize();this.rowManager.refreshActiveData("display");if(this.options.persistence&&this.modExists("persistence",true)&&this.modules.persistence.config.group){this.modules.persistence.save("group")}}else{return false}};H.prototype.setGroupStartOpen=function(t){if(this.modExists("groupRows",true)){this.options.groupStartOpen=t;this.modules.groupRows.initialize();if(this.options.groupBy){this.rowManager.refreshActiveData("group");if(this.options.persistence&&this.modExists("persistence",true)&&this.modules.persistence.config.group){this.modules.persistence.save("group")}}else{console.warn("Grouping Update - cant refresh view, no groups have been set")}}else{return false}};H.prototype.setGroupHeader=function(t){if(this.modExists("groupRows",true)){this.options.groupHeader=t;this.modules.groupRows.initialize();if(this.options.groupBy){this.rowManager.refreshActiveData("group");if(this.options.persistence&&this.modExists("persistence",true)&&this.modules.persistence.config.group){this.modules.persistence.save("group")}}else{console.warn("Grouping Update - cant refresh view, no groups have been set")}}else{return false}};H.prototype.getGroups=function(t){if(this.modExists("groupRows",true)){return this.modules.groupRows.getGroups(true)}else{return false}};H.prototype.getGroupedData=function(){if(this.modExists("groupRows",true)){return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()}};H.prototype.getEditedCells=function(){if(this.modExists("edit",true)){return this.modules.edit.getEditedCells()}};H.prototype.clearCellEdited=function(t){var i=this;if(this.modExists("edit",true)){if(!t){t=this.modules.edit.getEditedCells()}if(!Array.isArray(t)){t=[t]}t.forEach((function(t){i.modules.edit.clearEdited(t._getSelf())}))}};H.prototype.getCalcResults=function(){if(this.modExists("columnCalcs",true)){return this.modules.columnCalcs.getResults()}else{return false}};H.prototype.recalc=function(){if(this.modExists("columnCalcs",true)){this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)}};H.prototype.navigatePrev=function(){var t=false;if(this.modExists("edit",true)){t=this.modules.edit.currentCell;if(t){return t.nav().prev()}}return false};H.prototype.navigateNext=function(){var t=false;if(this.modExists("edit",true)){t=this.modules.edit.currentCell;if(t){return t.nav().next()}}return false};H.prototype.navigateLeft=function(){var t=false;if(this.modExists("edit",true)){t=this.modules.edit.currentCell;if(t){e.preventDefault();return t.nav().left()}}return false};H.prototype.navigateRight=function(){var t=false;if(this.modExists("edit",true)){t=this.modules.edit.currentCell;if(t){e.preventDefault();return t.nav().right()}}return false};H.prototype.navigateUp=function(){var t=false;if(this.modExists("edit",true)){t=this.modules.edit.currentCell;if(t){e.preventDefault();return t.nav().up()}}return false};H.prototype.navigateDown=function(){var t=false;if(this.modExists("edit",true)){t=this.modules.edit.currentCell;if(t){e.preventDefault();return t.nav().down()}}return false};H.prototype.undo=function(){if(this.options.history&&this.modExists("history",true)){return this.modules.history.undo()}else{return false}};H.prototype.redo=function(){if(this.options.history&&this.modExists("history",true)){return this.modules.history.redo()}else{return false}};H.prototype.getHistoryUndoSize=function(){if(this.options.history&&this.modExists("history",true)){return this.modules.history.getHistoryUndoSize()}else{return false}};H.prototype.getHistoryRedoSize=function(){if(this.options.history&&this.modExists("history",true)){return this.modules.history.getHistoryRedoSize()}else{return false}};H.prototype.clearHistory=function(){if(this.options.history&&this.modExists("history",true)){return this.modules.history.clear()}else{return false}};H.prototype.download=function(t,i,e,r){if(this.modExists("download",true)){this.modules.download.download(t,i,e,r)}};H.prototype.downloadToTab=function(t,i,e,r){if(this.modExists("download",true)){this.modules.download.download(t,i,e,r,true)}};H.prototype.tableComms=function(t,i,e,r){this.modules.comms.receive(t,i,e,r)};H.prototype.moduleBindings={};H.prototype.extendModule=function(t,i,e){if(H.prototype.moduleBindings[t]){var r=H.prototype.moduleBindings[t].prototype[i];if(r){if((typeof e==="undefined"?"undefined":T(e))=="object"){for(var n in e){r[n]=e[n]}}else{console.warn("Module Error - Invalid value type, it must be an object")}}else{console.warn("Module Error - property does not exist:",i)}}else{console.warn("Module Error - module does not exist:",t)}};H.prototype.registerModule=function(t,i){H.prototype.moduleBindings[t]=i};H.prototype.bindModules=function(){this.modules={};for(var t in H.prototype.moduleBindings){this.modules[t]=new H.prototype.moduleBindings[t](this)}};H.prototype.modExists=function(t,i){if(this.modules[t]){return true}else{if(i){console.error("Tabulator Module Not Installed: "+t)}return false}};H.prototype.helpers={elVisible:function t(i){return!(i.offsetWidth<=0&&i.offsetHeight<=0)},elOffset:function t(i){var e=i.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function t(i){var e=Object.assign(Array.isArray(i)?[]:{},i);for(var r in i){if(i[r]!=null&&T(i[r])==="object"){if(i[r]instanceof Date){e[r]=new Date(i[r])}else{e[r]=this.deepClone(i[r])}}}return e}};H.prototype.comms={tables:[],register:function t(i){H.prototype.comms.tables.push(i)},deregister:function t(i){var e=H.prototype.comms.tables.indexOf(i);if(e>-1){H.prototype.comms.tables.splice(e,1)}},lookupTable:function t(i,e){var r=[],n,o;if(typeof i==="string"){n=document.querySelectorAll(i);if(n.length){for(var s=0;s<n.length;s++){o=H.prototype.comms.matchElement(n[s]);if(o){r.push(o)}}}}else if(typeof HTMLElement!=="undefined"&&i instanceof HTMLElement||i instanceof H){o=H.prototype.comms.matchElement(i);if(o){r.push(o)}}else if(Array.isArray(i)){i.forEach((function(t){r=r.concat(H.prototype.comms.lookupTable(t))}))}else{if(!e){console.warn("Table Connection Error - Invalid Selector",i)}}return r},matchElement:function t(i){return H.prototype.comms.tables.find((function(t){return i instanceof H?t===i:t.element===i}))}};H.prototype.findTable=function(t){var i=H.prototype.comms.lookupTable(t,true);return Array.isArray(i)&&!i.length?false:i};var I=function t(i){this.table=i;this.mode=null};I.prototype.initialize=function(t){if(this.modes[t]){this.mode=t}else{console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+t);this.mode="fitData"}this.table.element.setAttribute("tabulator-layout",this.mode)};I.prototype.getMode=function(){return this.mode};I.prototype.layout=function(){this.modes[this.mode].call(this,this.table.columnManager.columnsByIndex);if(this.mode.indexOf("fitData")===0&&this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.columns){this.table.modules.persistence.save("columns")}};I.prototype.modes={fitData:function t(i){if(this.table.options.virtualDomHoz){this.table.vdomHoz.fitDataLayoutOverride()}else{i.forEach((function(t){t.reinitializeWidth()}))}if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.update()}},fitDataFill:function t(i){i.forEach((function(t){t.reinitializeWidth()}));if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.update()}},fitDataTable:function t(i){i.forEach((function(t){t.reinitializeWidth()}));if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.update()}},fitDataStretch:function t(i){var e=this;var r=0,n=this.table.rowManager.element.clientWidth,o=0,s=false;i.forEach((function(t,i){if(!t.widthFixed){t.reinitializeWidth()}if(e.table.options.responsiveLayout?t.modules.responsive.visible:t.visible){s=t}if(t.visible){r+=t.getWidth()}}));if(s){o=n-r+s.getWidth();if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){s.setWidth(0);this.table.modules.responsiveLayout.update()}if(o>0){s.setWidth(o)}else{s.reinitializeWidth()}}else{if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.update()}}},fitColumns:function t(i){var e=this;var r=e.table.element.clientWidth;var n=0;var o=0;var s=0;var a=0;var u=[];var l=[];var f=0;var h=0;var c=0;function d(t){var i;if(typeof t=="string"){if(t.indexOf("%")>-1){i=r/100*parseInt(t)}else{i=parseInt(t)}}else{i=t}return i}function b(t,i,e,r){var n=[],o=0,a=0,u=0,l=s,f=0,h=0,c=[];function p(t){return e*(t.column.definition.widthGrow||1)}function v(t){return d(t.width)-e*(t.column.definition.widthShrink||0)}t.forEach((function(t,o){var s=r?v(t):p(t);if(t.column.minWidth>=s){n.push(t)}else{if(t.column.maxWidth&&t.column.maxWidth<s){t.width=t.column.maxWidth;i-=t.column.maxWidth;l-=r?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1;if(l){e=Math.floor(i/l)}}else{c.push(t);h+=r?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1}}}));if(n.length){n.forEach((function(t){o+=r?t.width-t.column.minWidth:t.column.minWidth;t.width=t.column.minWidth}));a=i-o;u=h?Math.floor(a/h):a;f=a-u*h;f+=b(c,a,u,r)}else{f=h?i-Math.floor(i/h)*h:i;c.forEach((function(t){t.width=r?v(t):p(t)}))}return f}if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.update()}if(this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight){r-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth}i.forEach((function(t){var i,e,r;if(t.visible){i=t.definition.width;e=parseInt(t.minWidth);if(i){r=d(i);n+=r>e?r:e;if(t.definition.widthShrink){l.push({column:t,width:r>e?r:e});f+=t.definition.widthShrink}}else{u.push({column:t,width:0});s+=t.definition.widthGrow||1}}}));o=r-n;a=Math.floor(o/s);var c=b(u,o,a,false);if(u.length&&c>0){u[u.length-1].width+=+c}u.forEach((function(t){o-=t.width}));h=Math.abs(c)+o;if(h>0&&f){c=b(l,h,Math.floor(h/f),true)}if(l.length){l[l.length-1].width-=c}u.forEach((function(t){t.column.setWidth(t.width)}));l.forEach((function(t){t.column.setWidth(t.width)}))}};H.prototype.registerModule("layout",I);var _=function t(i){this.table=i;this.locale="default";this.lang=false;this.bindings={};this.langList={}};_.prototype.initialize=function(){this.langList=H.prototype.helpers.deepClone(this.langs)};_.prototype.setHeaderFilterPlaceholder=function(t){this.langList.default.headerFilters.default=t};_.prototype.setHeaderFilterColumnPlaceholder=function(t,i){this.langList.default.headerFilters.columns[t]=i;if(this.lang&&!this.lang.headerFilters.columns[t]){this.lang.headerFilters.columns[t]=i}};_.prototype.installLang=function(t,i){if(this.langList[t]){this._setLangProp(this.langList[t],i)}else{this.langList[t]=i}};_.prototype._setLangProp=function(t,i){for(var e in i){if(t[e]&&T(t[e])=="object"){this._setLangProp(t[e],i[e])}else{t[e]=i[e]}}};_.prototype.setLocale=function(t){var i=this;t=t||"default";function e(t,i){for(var r in t){if(T(t[r])=="object"){if(!i[r]){i[r]={}}e(t[r],i[r])}else{i[r]=t[r]}}}if(t===true&&navigator.language){t=navigator.language.toLowerCase()}if(t){if(!i.langList[t]){var r=t.split("-")[0];if(i.langList[r]){console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,r);t=r}else{console.warn("Localization Error - Matching locale not found, using default: ",t);t="default"}}}i.locale=t;i.lang=H.prototype.helpers.deepClone(i.langList.default||{});if(t!="default"){e(i.langList[t],i.lang)}i.table.options.localized.call(i.table,i.locale,i.lang);i._executeBindings()};_.prototype.getLocale=function(t){return self.locale};_.prototype.getLang=function(t){return t?this.langList[t]:this.lang};_.prototype.getText=function(t,i){var t=i?t+"|"+i:t,e=t.split("|"),r=this._getLangElement(e,this.locale);return r||""};_.prototype._getLangElement=function(t,i){var e=this;var r=e.lang;t.forEach((function(t){var i;if(r){i=r[t];if(typeof i!="undefined"){r=i}else{r=false}}}));return r};_.prototype.bind=function(t,i){if(!this.bindings[t]){this.bindings[t]=[]}this.bindings[t].push(i);i(this.getText(t),this.lang)};_.prototype._executeBindings=function(){var t=this;var i=function i(e){t.bindings[e].forEach((function(i){i(t.getText(e),t.lang)}))};for(var e in t.bindings){i(e)}};_.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}};H.prototype.registerModule("localize",_);var U=function t(i){this.table=i};U.prototype.getConnections=function(t){var i=this,e=[],r;r=H.prototype.comms.lookupTable(t);r.forEach((function(t){if(i.table!==t){e.push(t)}}));return e};U.prototype.send=function(t,i,e,r){var n=this,o=this.getConnections(t);o.forEach((function(t){t.tableComms(n.table.element,i,e,r)}));if(!o.length&&t){console.warn("Table Connection Error - No tables matching selector found",t)}};U.prototype.receive=function(t,i,e,r){if(this.table.modExists(i)){return this.table.modules[i].commsReceived(t,e,r)}else{console.warn("Inter-table Comms Error - no such module:",i)}};H.prototype.registerModule("comms",U);var V=function t(i){this.table=i;this.allowedTypes=["","data","download","clipboard","print","htmlOutput"]};V.prototype.initializeColumn=function(t){var i=this,e=false,r={};this.allowedTypes.forEach((function(n){var o="accessor"+(n.charAt(0).toUpperCase()+n.slice(1)),s;if(t.definition[o]){s=i.lookupAccessor(t.definition[o]);if(s){e=true;r[o]={accessor:s,params:t.definition[o+"Params"]||{}}}}}));if(e){t.modules.accessor=r}};V.prototype.lookupAccessor=function(t){var i=false;switch(typeof t==="undefined"?"undefined":T(t)){case"string":if(this.accessors[t]){i=this.accessors[t]}else{console.warn("Accessor Error - No such accessor found, ignoring: ",t)}break;case"function":i=t;break}return i};V.prototype.transformRow=function(t,i){var e="accessor"+(i.charAt(0).toUpperCase()+i.slice(1)),r=t.getComponent();var n=H.prototype.helpers.deepClone(t.data||{});this.table.columnManager.traverse((function(t){var o,s,a,u;if(t.modules.accessor){s=t.modules.accessor[e]||t.modules.accessor.accessor||false;if(s){o=t.getFieldValue(n);if(o!="undefined"){u=t.getComponent();a=typeof s.params==="function"?s.params(o,n,i,u,r):s.params;t.setFieldValue(n,s.accessor(o,n,i,a,u,r))}}}}));return n},V.prototype.accessors={};H.prototype.registerModule("accessor",V);var B=function t(i){this.table=i;this.config=false;this.url="";this.urlGenerator=false;this.params=false;this.loaderElement=this.createLoaderElement();this.msgElement=this.createMsgElement();this.loadingElement=false;this.errorElement=false;this.loaderPromise=false;this.progressiveLoad=false;this.loading=false;this.requestOrder=0};B.prototype.initialize=function(){var t;this.loaderElement.appendChild(this.msgElement);if(this.table.options.ajaxLoaderLoading){if(typeof this.table.options.ajaxLoaderLoading=="string"){t=document.createElement("template");t.innerHTML=this.table.options.ajaxLoaderLoading.trim();this.loadingElement=t.content.firstChild}else{this.loadingElement=this.table.options.ajaxLoaderLoading}}this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise;this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator;if(this.table.options.ajaxLoaderError){if(typeof this.table.options.ajaxLoaderError=="string"){t=document.createElement("template");t.innerHTML=this.table.options.ajaxLoaderError.trim();this.errorElement=t.content.firstChild}else{this.errorElement=this.table.options.ajaxLoaderError}}if(this.table.options.ajaxParams){this.setParams(this.table.options.ajaxParams)}if(this.table.options.ajaxConfig){this.setConfig(this.table.options.ajaxConfig)}if(this.table.options.ajaxURL){this.setUrl(this.table.options.ajaxURL)}if(this.table.options.ajaxProgressiveLoad){if(this.table.options.pagination){this.progressiveLoad=false;console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")}else{if(this.table.modExists("page")){this.progressiveLoad=this.table.options.ajaxProgressiveLoad;this.table.modules.page.initializeProgressive(this.progressiveLoad)}else{console.error("Pagination plugin is required for progressive ajax loading")}}}};B.prototype.createLoaderElement=function(){var t=document.createElement("div");t.classList.add("tabulator-loader");return t};B.prototype.createMsgElement=function(){var t=document.createElement("div");t.classList.add("tabulator-loader-msg");t.setAttribute("role","alert");return t};B.prototype.setParams=function(t,i){if(i){this.params=this.params||{};for(var e in t){this.params[e]=t[e]}}else{this.params=t}};B.prototype.getParams=function(){return this.params||{}};B.prototype.setConfig=function(t){this._loadDefaultConfig();if(typeof t=="string"){this.config.method=t}else{for(var i in t){this.config[i]=t[i]}}};B.prototype._loadDefaultConfig=function(t){var i=this;if(!i.config||t){i.config={};for(var e in i.defaultConfig){i.config[e]=i.defaultConfig[e]}}};B.prototype.setUrl=function(t){this.url=t};B.prototype.getUrl=function(){return this.url};B.prototype.loadData=function(t,i){if(this.progressiveLoad){return this._loadDataProgressive()}else{return this._loadDataStandard(t,i)}};B.prototype.nextPage=function(t){var i;if(!this.loading){i=this.table.options.ajaxProgressiveLoadScrollMargin||this.table.rowManager.getElement().clientHeight*2;if(t<i){this.table.modules.page.nextPage().then((function(){})).catch((function(){}))}}};B.prototype.blockActiveRequest=function(){this.requestOrder++};B.prototype._loadDataProgressive=function(){this.table.rowManager.setData([]);return this.table.modules.page.setPage(1)};B.prototype._loadDataStandard=function(t,i){var e=this;return new Promise((function(r,n){e.sendRequest(t).then((function(o){e.table.rowManager.setData(o,t,i).then((function(){r()})).catch((function(t){n(t)}))})).catch((function(t){n(t)}))}))};B.prototype.generateParamsList=function(t,i){var e=this,r=[];i=i||"";if(Array.isArray(t)){t.forEach((function(t,n){r=r.concat(e.generateParamsList(t,i?i+"["+n+"]":n))}))}else if((typeof t==="undefined"?"undefined":T(t))==="object"){for(var n in t){r=r.concat(e.generateParamsList(t[n],i?i+"["+n+"]":n))}}else{r.push({key:i,value:t})}return r};B.prototype.serializeParams=function(t){var i=this.generateParamsList(t),e=[];i.forEach((function(t){e.push(encodeURIComponent(t.key)+"="+encodeURIComponent(t.value))}));return e.join("&")};B.prototype.sendRequest=function(t){var i=this;var e=this,r=e.url,n;e.requestOrder++;n=e.requestOrder;e._loadDefaultConfig();return new Promise((function(o,s){if(e.table.options.ajaxRequesting.call(i.table,e.url,e.params)!==false){e.loading=true;if(!t){e.showLoader()}i.loaderPromise(r,e.config,e.params).then((function(t){if(n===e.requestOrder){if(e.table.options.ajaxResponse){t=e.table.options.ajaxResponse.call(e.table,e.url,e.params,t)}o(t);e.hideLoader();e.loading=false}else{console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made")}})).catch((function(t){console.error("Ajax Load Error: ",t);e.table.options.ajaxError.call(e.table,t);e.showError();setTimeout((function(){e.hideLoader()}),3e3);e.loading=false;s(t)}))}else{s()}}))};B.prototype.showLoader=function(){var t=typeof this.table.options.ajaxLoader==="function"?this.table.options.ajaxLoader():this.table.options.ajaxLoader;if(t){this.hideLoader();while(this.msgElement.firstChild){this.msgElement.removeChild(this.msgElement.firstChild)}this.msgElement.classList.remove("tabulator-error");this.msgElement.classList.add("tabulator-loading");if(this.loadingElement){this.msgElement.appendChild(this.loadingElement)}else{this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|loading")}this.table.element.appendChild(this.loaderElement)}};B.prototype.showError=function(){this.hideLoader();while(this.msgElement.firstChild){this.msgElement.removeChild(this.msgElement.firstChild)}this.msgElement.classList.remove("tabulator-loading");this.msgElement.classList.add("tabulator-error");if(this.errorElement){this.msgElement.appendChild(this.errorElement)}else{this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|error")}this.table.element.appendChild(this.loaderElement)};B.prototype.hideLoader=function(){if(this.loaderElement.parentNode){this.loaderElement.parentNode.removeChild(this.loaderElement)}};B.prototype.defaultConfig={method:"GET"};B.prototype.defaultURLGenerator=function(t,i,e){if(t){if(e&&Object.keys(e).length){if(!i.method||i.method.toLowerCase()=="get"){i.method="get";t+=(t.includes("?")?"&":"?")+this.modules.ajax.serializeParams(e)}}}return t};B.prototype.defaultLoaderPromise=function(t,i,e){var r=this,n;return new Promise((function(o,s){t=r.urlGenerator.call(r.table,t,i,e);if(i.method.toUpperCase()!="GET"){n=T(r.table.options.ajaxContentType)==="object"?r.table.options.ajaxContentType:r.contentTypeFormatters[r.table.options.ajaxContentType];if(n){for(var a in n.headers){if(!i.headers){i.headers={}}if(typeof i.headers[a]==="undefined"){i.headers[a]=n.headers[a]}}i.body=n.body.call(r,t,i,e)}else{console.warn("Ajax Error - Invalid ajaxContentType value:",r.table.options.ajaxContentType)}}if(t){if(typeof i.headers==="undefined"){i.headers={}}if(typeof i.headers.Accept==="undefined"){i.headers.Accept="application/json"}if(typeof i.headers["X-Requested-With"]==="undefined"){i.headers["X-Requested-With"]="XMLHttpRequest"}if(typeof i.mode==="undefined"){i.mode="cors"}if(i.mode=="cors"){if(typeof i.headers["Access-Control-Allow-Origin"]==="undefined"){i.headers["Access-Control-Allow-Origin"]=window.location.origin}if(typeof i.credentials==="undefined"){i.credentials="same-origin"}}else{if(typeof i.credentials==="undefined"){i.credentials="include"}}fetch(t,i).then((function(t){if(t.ok){t.json().then((function(t){o(t)})).catch((function(t){s(t);console.warn("Ajax Load Error - Invalid JSON returned",t)}))}else{console.error("Ajax Load Error - Connection Error: "+t.status,t.statusText);s(t)}})).catch((function(t){console.error("Ajax Load Error - Connection Error: ",t);s(t)}))}else{console.warn("Ajax Load Error - No URL Set");o([])}}))};B.prototype.contentTypeFormatters={json:{headers:{"Content-Type":"application/json"},body:function t(i,e,r){return JSON.stringify(r)}},form:{headers:{},body:function t(i,e,r){var n=this.generateParamsList(r),o=new FormData;n.forEach((function(t){o.append(t.key,t.value)}));return o}}};H.prototype.registerModule("ajax",B);var J=function t(i){this._row=i};J.prototype.getData=function(t){return this._row.getData(t)};J.prototype.getElement=function(){return this._row.getElement()};J.prototype.getTable=function(){return this._row.table};J.prototype.getCells=function(){var t=[];this._row.getCells().forEach((function(i){t.push(i.getComponent())}));return t};J.prototype.getCell=function(t){var i=this._row.getCell(t);return i?i.getComponent():false};J.prototype._getSelf=function(){return this._row};var W=function t(i){this.table=i;this.topCalcs=[];this.botCalcs=[];this.genColumn=false;this.topElement=this.createElement();this.botElement=this.createElement();this.topRow=false;this.botRow=false;this.topInitialized=false;this.botInitialized=false;this.initialize()};W.prototype.createElement=function(){var t=document.createElement("div");t.classList.add("tabulator-calcs-holder");return t};W.prototype.initialize=function(){this.genColumn=new N({field:"value"},this)};W.prototype.registerColumnField=function(){};W.prototype.initializeColumn=function(t){var i=t.definition;var e={topCalcParams:i.topCalcParams||{},botCalcParams:i.bottomCalcParams||{}};if(i.topCalc){switch(T(i.topCalc)){case"string":if(this.calculations[i.topCalc]){e.topCalc=this.calculations[i.topCalc]}else{console.warn("Column Calc Error - No such calculation found, ignoring: ",i.topCalc)}break;case"function":e.topCalc=i.topCalc;break}if(e.topCalc){t.modules.columnCalcs=e;this.topCalcs.push(t);if(this.table.options.columnCalcs!="group"){this.initializeTopRow()}}}if(i.bottomCalc){switch(T(i.bottomCalc)){case"string":if(this.calculations[i.bottomCalc]){e.botCalc=this.calculations[i.bottomCalc]}else{console.warn("Column Calc Error - No such calculation found, ignoring: ",i.bottomCalc)}break;case"function":e.botCalc=i.bottomCalc;break}if(e.botCalc){t.modules.columnCalcs=e;this.botCalcs.push(t);if(this.table.options.columnCalcs!="group"){this.initializeBottomRow()}}}};W.prototype.removeCalcs=function(){var t=false;if(this.topInitialized){this.topInitialized=false;this.topElement.parentNode.removeChild(this.topElement);t=true}if(this.botInitialized){this.botInitialized=false;this.table.footerManager.remove(this.botElement);t=true}if(t){this.table.rowManager.adjustTableSize()}};W.prototype.initializeTopRow=function(){if(!this.topInitialized){this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling);this.topInitialized=true}};W.prototype.initializeBottomRow=function(){if(!this.botInitialized){this.table.footerManager.prepend(this.botElement);this.botInitialized=true}};W.prototype.scrollHorizontal=function(t){if(this.botInitialized&&this.botRow){this.botRow.getElement().style.marginLeft=-t+"px"}};W.prototype.recalc=function(t){var i;if(this.topInitialized||this.botInitialized){this.rowsToData(t);if(this.topInitialized){if(this.topRow){this.topRow.deleteCells()}i=this.generateRow("top",this.rowsToData(t));this.topRow=i;while(this.topElement.firstChild){this.topElement.removeChild(this.topElement.firstChild)}this.topElement.appendChild(i.getElement());i.initialize(true)}if(this.botInitialized){if(this.botRow){this.botRow.deleteCells()}i=this.generateRow("bottom",this.rowsToData(t));this.botRow=i;while(this.botElement.firstChild){this.botElement.removeChild(this.botElement.firstChild)}this.botElement.appendChild(i.getElement());i.initialize(true)}this.table.rowManager.adjustTableSize();if(this.table.modExists("frozenColumns")){this.table.modules.frozenColumns.layout()}}};W.prototype.recalcRowGroup=function(t){this.recalcGroup(this.table.modules.groupRows.getRowGroup(t))};W.prototype.recalcAll=function(){var t=this;if(this.topCalcs.length||this.botCalcs.length){if(this.table.options.columnCalcs!=="group"){this.recalc(this.table.rowManager.activeRows)}if(this.table.options.groupBy&&this.table.options.columnCalcs!=="table"){var i=table.modules.groupRows.getChildGroups();i.forEach((function(i){t.recalcGroup(i)}))}}};W.prototype.recalcGroup=function(t){var i,e;if(t){if(t.calcs){if(t.calcs.bottom){i=this.rowsToData(t.rows);e=this.generateRowData("bottom",i);t.calcs.bottom.updateData(e);t.calcs.bottom.reinitialize()}if(t.calcs.top){i=this.rowsToData(t.rows);e=this.generateRowData("top",i);t.calcs.top.updateData(e);t.calcs.top.reinitialize()}}}};W.prototype.generateTopRow=function(t){return this.generateRow("top",this.rowsToData(t))};W.prototype.generateBottomRow=function(t){return this.generateRow("bottom",this.rowsToData(t))};W.prototype.rowsToData=function(t){var i=this;var e=[];t.forEach((function(t){e.push(t.getData());if(i.table.options.dataTree&&i.table.options.dataTreeChildColumnCalcs){if(t.modules.dataTree.open){var r=i.rowsToData(i.table.modules.dataTree.getFilteredTreeChildren(t));e=e.concat(r)}}}));return e};W.prototype.generateRow=function(t,i){var e=this,r=this.generateRowData(t,i),n;if(e.table.modExists("mutator")){e.table.modules.mutator.disable()}n=new P(r,this,"calc");if(e.table.modExists("mutator")){e.table.modules.mutator.enable()}n.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+t);n.component=false;n.getComponent=function(){if(!this.component){this.component=new J(this)}return this.component};n.generateCells=function(){var i=[];e.table.columnManager.columnsByIndex.forEach((function(r){e.genColumn.setField(r.getField());e.genColumn.hozAlign=r.hozAlign;if(r.definition[t+"CalcFormatter"]&&e.table.modExists("format")){e.genColumn.modules.format={formatter:e.table.modules.format.getFormatter(r.definition[t+"CalcFormatter"]),params:r.definition[t+"CalcFormatterParams"]||{}}}else{e.genColumn.modules.format={formatter:e.table.modules.format.getFormatter("plaintext"),params:{}}}e.genColumn.definition.cssClass=r.definition.cssClass;var o=new A(e.genColumn,n);o.getElement();o.column=r;o.setWidth();r.cells.push(o);i.push(o);if(!r.visible){o.hide()}}));this.cells=i};return n};W.prototype.generateRowData=function(t,i){var e={},r=t=="top"?this.topCalcs:this.botCalcs,n=t=="top"?"topCalc":"botCalc",o,s;r.forEach((function(t){var r=[];if(t.modules.columnCalcs&&t.modules.columnCalcs[n]){i.forEach((function(i){r.push(t.getFieldValue(i))}));s=n+"Params";o=typeof t.modules.columnCalcs[s]==="function"?t.modules.columnCalcs[s](r,i):t.modules.columnCalcs[s];t.setFieldValue(e,t.modules.columnCalcs[n](r,i,o))}}));return e};W.prototype.hasTopCalcs=function(){return!!this.topCalcs.length};W.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length};W.prototype.redraw=function(){if(this.topRow){this.topRow.normalizeHeight(true)}if(this.botRow){this.botRow.normalizeHeight(true)}};W.prototype.getResults=function(){var t=this,i={},e;if(this.table.options.groupBy&&this.table.modExists("groupRows")){e=this.table.modules.groupRows.getGroups(true);e.forEach((function(e){i[e.getKey()]=t.getGroupResults(e)}))}else{i={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}}}return i};W.prototype.getGroupResults=function(t){var i=this,e=t._getSelf(),r=t.getSubGroups(),n={},o={};r.forEach((function(t){n[t.getKey()]=i.getGroupResults(t)}));o={top:e.calcs.top?e.calcs.top.getData():{},bottom:e.calcs.bottom?e.calcs.bottom.getData():{},groups:n};return o};W.prototype.calculations={avg:function t(i,e,r){var n=0,o=typeof r.precision!=="undefined"?r.precision:2;if(i.length){n=i.reduce((function(t,i){return Number(t)+Number(i)}));n=n/i.length;n=o!==false?n.toFixed(o):n}return parseFloat(n).toString()},max:function t(i,e,r){var n=null,o=typeof r.precision!=="undefined"?r.precision:false;i.forEach((function(t){t=Number(t);if(t>n||n===null){n=t}}));return n!==null?o!==false?n.toFixed(o):n:""},min:function t(i,e,r){var n=null,o=typeof r.precision!=="undefined"?r.precision:false;i.forEach((function(t){t=Number(t);if(t<n||n===null){n=t}}));return n!==null?o!==false?n.toFixed(o):n:""},sum:function t(i,e,r){var n=0,o=typeof r.precision!=="undefined"?r.precision:false;if(i.length){i.forEach((function(t){t=Number(t);n+=!isNaN(t)?Number(t):0}))}return o!==false?n.toFixed(o):n},concat:function t(i,e,r){var n=0;if(i.length){n=i.reduce((function(t,i){return String(t)+String(i)}))}return n},count:function t(i,e,r){var n=0;if(i.length){i.forEach((function(t){if(t){n++}}))}return n}};H.prototype.registerModule("columnCalcs",W);var q=function t(i){this.table=i;this.mode=true;this.pasteParser=function(){};this.pasteAction=function(){};this.customSelection=false;this.rowRange=false;this.blocked=true};q.prototype.initialize=function(){var t=this;this.mode=this.table.options.clipboard;this.rowRange=this.table.options.clipboardCopyRowRange;if(this.mode===true||this.mode==="copy"){this.table.element.addEventListener("copy",(function(i){var e,r,n;if(!t.blocked){i.preventDefault();if(t.customSelection){e=t.customSelection;if(t.table.options.clipboardCopyFormatter){e=t.table.options.clipboardCopyFormatter("plain",e)}}else{var n=t.table.modules.export.generateExportList(t.table.options.clipboardCopyConfig,t.table.options.clipboardCopyStyled,t.rowRange,"clipboard");r=t.table.modules.export.genereateHTMLTable(n);e=r?t.generatePlainContent(n):"";if(t.table.options.clipboardCopyFormatter){e=t.table.options.clipboardCopyFormatter("plain",e);r=t.table.options.clipboardCopyFormatter("html",r)}}if(window.clipboardData&&window.clipboardData.setData){window.clipboardData.setData("Text",e)}else if(i.clipboardData&&i.clipboardData.setData){i.clipboardData.setData("text/plain",e);if(r){i.clipboardData.setData("text/html",r)}}else if(i.originalEvent&&i.originalEvent.clipboardData.setData){i.originalEvent.clipboardData.setData("text/plain",e);if(r){i.originalEvent.clipboardData.setData("text/html",r)}}t.table.options.clipboardCopied.call(t.table,e,r);t.reset()}}))}if(this.mode===true||this.mode==="paste"){this.table.element.addEventListener("paste",(function(i){t.paste(i)}))}this.setPasteParser(this.table.options.clipboardPasteParser);this.setPasteAction(this.table.options.clipboardPasteAction)};q.prototype.reset=function(){this.blocked=true;this.customSelection=false};q.prototype.generatePlainContent=function(t){var i=[];t.forEach((function(t){var e=[];t.columns.forEach((function(i){var r="";if(i){if(t.type==="group"){i.value=i.component.getKey()}if(i.value===null){r=""}else{switch(T(i.value)){case"object":r=JSON.stringify(i.value);break;case"undefined":r="";break;default:r=i.value}}}e.push(r)}));i.push(e.join("\t"))}));return i.join("\n")};q.prototype.copy=function(t,i){var t,e,r;this.blocked=false;this.customSelection=false;if(this.mode===true||this.mode==="copy"){this.rowRange=t||this.table.options.clipboardCopyRowRange;if(typeof window.getSelection!="undefined"&&typeof document.createRange!="undefined"){t=document.createRange();t.selectNodeContents(this.table.element);e=window.getSelection();if(e.toString()&&i){this.customSelection=e.toString()}e.removeAllRanges();e.addRange(t)}else if(typeof document.selection!="undefined"&&typeof document.body.createTextRange!="undefined"){r=document.body.createTextRange();r.moveToElementText(this.table.element);r.select()}document.execCommand("copy");if(e){e.removeAllRanges()}}};q.prototype.setPasteAction=function(t){switch(typeof t==="undefined"?"undefined":T(t)){case"string":this.pasteAction=this.pasteActions[t];if(!this.pasteAction){console.warn("Clipboard Error - No such paste action found:",t)}break;case"function":this.pasteAction=t;break}};q.prototype.setPasteParser=function(t){switch(typeof t==="undefined"?"undefined":T(t)){case"string":this.pasteParser=this.pasteParsers[t];if(!this.pasteParser){console.warn("Clipboard Error - No such paste parser found:",t)}break;case"function":this.pasteParser=t;break}};q.prototype.paste=function(t){var i,e,r;if(this.checkPaseOrigin(t)){i=this.getPasteData(t);e=this.pasteParser.call(this,i);if(e){t.preventDefault();if(this.table.modExists("mutator")){e=this.mutateData(e)}r=this.pasteAction.call(this,e);this.table.options.clipboardPasted.call(this.table,i,e,r)}else{this.table.options.clipboardPasteError.call(this.table,i)}}};q.prototype.mutateData=function(t){var i=this,e=[];if(Array.isArray(t)){t.forEach((function(t){e.push(i.table.modules.mutator.transformRow(t,"clipboard"))}))}else{e=t}return e};q.prototype.checkPaseOrigin=function(t){var i=true;if(t.target.tagName!="DIV"||this.table.modules.edit.currentCell){i=false}return i};q.prototype.getPasteData=function(t){var i;if(window.clipboardData&&window.clipboardData.getData){i=window.clipboardData.getData("Text")}else if(t.clipboardData&&t.clipboardData.getData){i=t.clipboardData.getData("text/plain")}else if(t.originalEvent&&t.originalEvent.clipboardData.getData){i=t.originalEvent.clipboardData.getData("text/plain")}return i};q.prototype.pasteParsers={table:function t(i){var e=[],r=true,n=this.table.columnManager.columns,o=[],s=[];i=i.split("\n");i.forEach((function(t){e.push(t.split("\t"))}));if(e.length&&!(e.length===1&&e[0].length<2)){e[0].forEach((function(t){var i=n.find((function(i){return t&&i.definition.title&&t.trim()&&i.definition.title.trim()===t.trim()}));if(i){o.push(i)}else{r=false}}));if(!r){r=true;o=[];e[0].forEach((function(t){var i=n.find((function(i){return t&&i.field&&t.trim()&&i.field.trim()===t.trim()}));if(i){o.push(i)}else{r=false}}));if(!r){o=this.table.columnManager.columnsByIndex}}if(r){e.shift()}e.forEach((function(t){var i={};t.forEach((function(t,e){if(o[e]){i[o[e].field]=t}}));s.push(i)}));return s}else{return false}}};q.prototype.pasteActions={replace:function t(i){return this.table.setData(i)},update:function t(i){return this.table.updateOrAddData(i)},insert:function t(i){return this.table.addData(i)}};H.prototype.registerModule("clipboard",q);var Y=function t(i){this.table=i;this.indent=10;this.field="";this.collapseEl=null;this.expandEl=null;this.branchEl=null;this.elementField=false;this.startOpen=function(){};this.displayIndex=0};Y.prototype.initialize=function(){var t=null,i=this.table.columnManager.getFirstVisibileColumn(),e=this.table.options;this.field=e.dataTreeChildField;this.indent=e.dataTreeChildIndent;this.elementField=e.dataTreeElementColumn||(i?i.field:false);if(e.dataTreeBranchElement){if(e.dataTreeBranchElement===true){this.branchEl=document.createElement("div");this.branchEl.classList.add("tabulator-data-tree-branch")}else{if(typeof e.dataTreeBranchElement==="string"){t=document.createElement("div");t.innerHTML=e.dataTreeBranchElement;this.branchEl=t.firstChild}else{this.branchEl=e.dataTreeBranchElement}}}if(e.dataTreeCollapseElement){if(typeof e.dataTreeCollapseElement==="string"){t=document.createElement("div");t.innerHTML=e.dataTreeCollapseElement;this.collapseEl=t.firstChild}else{this.collapseEl=e.dataTreeCollapseElement}}else{this.collapseEl=document.createElement("div");this.collapseEl.classList.add("tabulator-data-tree-control");this.collapseEl.tabIndex=0;this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"}if(e.dataTreeExpandElement){if(typeof e.dataTreeExpandElement==="string"){t=document.createElement("div");t.innerHTML=e.dataTreeExpandElement;this.expandEl=t.firstChild}else{this.expandEl=e.dataTreeExpandElement}}else{this.expandEl=document.createElement("div");this.expandEl.classList.add("tabulator-data-tree-control");this.expandEl.tabIndex=0;this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"}switch(T(e.dataTreeStartExpanded)){case"boolean":this.startOpen=function(t,i){return e.dataTreeStartExpanded};break;case"function":this.startOpen=e.dataTreeStartExpanded;break;default:this.startOpen=function(t,i){return e.dataTreeStartExpanded[i]};break}};Y.prototype.initializeRow=function(t){var i=t.getData()[this.field];var e=Array.isArray(i);var r=e||!e&&(typeof i==="undefined"?"undefined":T(i))==="object"&&i!==null;if(!r&&t.modules.dataTree&&t.modules.dataTree.branchEl){t.modules.dataTree.branchEl.parentNode.removeChild(t.modules.dataTree.branchEl)}if(!r&&t.modules.dataTree&&t.modules.dataTree.controlEl){t.modules.dataTree.controlEl.parentNode.removeChild(t.modules.dataTree.controlEl)}t.modules.dataTree={index:t.modules.dataTree?t.modules.dataTree.index:0,open:r?t.modules.dataTree?t.modules.dataTree.open:this.startOpen(t.getComponent(),0):false,controlEl:t.modules.dataTree&&r?t.modules.dataTree.controlEl:false,branchEl:t.modules.dataTree&&r?t.modules.dataTree.branchEl:false,parent:t.modules.dataTree?t.modules.dataTree.parent:false,children:r}};Y.prototype.layoutRow=function(t){var i=this.elementField?t.getCell(this.elementField):t.getCells()[0],e=i.getElement(),r=t.modules.dataTree;if(r.branchEl){if(r.branchEl.parentNode){r.branchEl.parentNode.removeChild(r.branchEl)}r.branchEl=false}if(r.controlEl){if(r.controlEl.parentNode){r.controlEl.parentNode.removeChild(r.controlEl)}r.controlEl=false}this.generateControlElement(t,e);t.getElement().classList.add("tabulator-tree-level-"+r.index);if(r.index){if(this.branchEl){r.branchEl=this.branchEl.cloneNode(true);e.insertBefore(r.branchEl,e.firstChild);if(this.table.rtl){r.branchEl.style.marginRight=(r.branchEl.offsetWidth+r.branchEl.style.marginLeft)*(r.index-1)+r.index*this.indent+"px"}else{r.branchEl.style.marginLeft=(r.branchEl.offsetWidth+r.branchEl.style.marginRight)*(r.index-1)+r.index*this.indent+"px"}}else{if(this.table.rtl){e.style.paddingRight=parseInt(window.getComputedStyle(e,null).getPropertyValue("padding-right"))+r.index*this.indent+"px"}else{e.style.paddingLeft=parseInt(window.getComputedStyle(e,null).getPropertyValue("padding-left"))+r.index*this.indent+"px"}}}};Y.prototype.generateControlElement=function(t,i){var e=this;var r=t.modules.dataTree,i=i||t.getCells()[0].getElement(),n=r.controlEl;if(r.children!==false){if(r.open){r.controlEl=this.collapseEl.cloneNode(true);r.controlEl.addEventListener("click",(function(i){i.stopPropagation();e.collapseRow(t)}))}else{r.controlEl=this.expandEl.cloneNode(true);r.controlEl.addEventListener("click",(function(i){i.stopPropagation();e.expandRow(t)}))}r.controlEl.addEventListener("mousedown",(function(t){t.stopPropagation()}));if(n&&n.parentNode===i){n.parentNode.replaceChild(r.controlEl,n)}else{i.insertBefore(r.controlEl,i.firstChild)}}};Y.prototype.setDisplayIndex=function(t){this.displayIndex=t};Y.prototype.getDisplayIndex=function(){return this.displayIndex};Y.prototype.getRows=function(t){var i=this;var e=[];t.forEach((function(t,r){var n,o;e.push(t);if(t instanceof P){t.create();n=t.modules.dataTree.children;if(!n.index&&n.children!==false){o=i.getChildren(t);o.forEach((function(t){t.create();e.push(t)}))}}}));return e};Y.prototype.getChildren=function(t,i){var e=this;var r=t.modules.dataTree,n=[],o=[];if(r.children!==false&&(r.open||i)){if(!Array.isArray(r.children)){r.children=this.generateChildren(t)}if(this.table.modExists("filter")&&this.table.options.dataTreeFilter){n=this.table.modules.filter.filter(r.children)}else{n=r.children}if(this.table.modExists("sort")&&this.table.options.dataTreeSort){this.table.modules.sort.sort(n)}n.forEach((function(t){o.push(t);var i=e.getChildren(t);i.forEach((function(t){o.push(t)}))}))}return o};Y.prototype.generateChildren=function(t){var i=this;var e=[];var r=t.getData()[this.field];if(!Array.isArray(r)){r=[r]}r.forEach((function(r){var n=new P(r||{},i.table.rowManager);n.create();n.modules.dataTree.index=t.modules.dataTree.index+1;n.modules.dataTree.parent=t;if(n.modules.dataTree.children){n.modules.dataTree.open=i.startOpen(n.getComponent(),n.modules.dataTree.index)}e.push(n)}));return e};Y.prototype.expandRow=function(t,i){var e=t.modules.dataTree;if(e.children!==false){e.open=true;t.reinitialize();this.table.rowManager.refreshActiveData("tree",false,true);this.table.options.dataTreeRowExpanded(t.getComponent(),t.modules.dataTree.index)}};Y.prototype.collapseRow=function(t){var i=t.modules.dataTree;if(i.children!==false){i.open=false;t.reinitialize();this.table.rowManager.refreshActiveData("tree",false,true);this.table.options.dataTreeRowCollapsed(t.getComponent(),t.modules.dataTree.index)}};Y.prototype.toggleRow=function(t){var i=t.modules.dataTree;if(i.children!==false){if(i.open){this.collapseRow(t)}else{this.expandRow(t)}}};Y.prototype.getTreeParent=function(t){return t.modules.dataTree.parent?t.modules.dataTree.parent.getComponent():false};Y.prototype.getFilteredTreeChildren=function(t){var i=t.modules.dataTree,e=[],r;if(i.children){if(!Array.isArray(i.children)){i.children=this.generateChildren(t)}if(this.table.modExists("filter")&&this.table.options.dataTreeFilter){r=this.table.modules.filter.filter(i.children)}else{r=i.children}r.forEach((function(t){if(t instanceof P){e.push(t)}}))}return e};Y.prototype.rowDelete=function(t){var i=t.modules.dataTree.parent,e;if(i){e=this.findChildIndex(t,i);if(e!==false){i.data[this.field].splice(e,1)}if(!i.data[this.field].length){delete i.data[this.field]}this.initializeRow(i);this.layoutRow(i)}this.table.rowManager.refreshActiveData("tree",false,true)};Y.prototype.addTreeChildRow=function(t,i,e,r){var n=false;if(typeof i==="string"){i=JSON.parse(i)}if(!Array.isArray(t.data[this.field])){t.data[this.field]=[];t.modules.dataTree.open=this.startOpen(t.getComponent(),t.modules.dataTree.index)}if(typeof r!=="undefined"){n=this.findChildIndex(r,t);if(n!==false){t.data[this.field].splice(e?n:n+1,0,i)}}if(n===false){if(e){t.data[this.field].unshift(i)}else{t.data[this.field].push(i)}}this.initializeRow(t);this.layoutRow(t);this.table.rowManager.refreshActiveData("tree",false,true)};Y.prototype.findChildIndex=function(t,i){var e=this;var r=false;if((typeof t==="undefined"?"undefined":T(t))=="object"){if(t instanceof P){r=t.data}else if(t instanceof O){r=t._getSelf().data}else if(typeof HTMLElement!=="undefined"&&t instanceof HTMLElement){if(i.modules.dataTree){r=i.modules.dataTree.children.find((function(i){return i instanceof P?i.element===t:false}));if(r){r=r.data}}}}else if(typeof t=="undefined"||t===null){r=false}else{r=i.data[this.field].find((function(i){return i.data[e.table.options.index]==t}))}if(r){if(Array.isArray(i.data[this.field])){r=i.data[this.field].indexOf(r)}if(r==-1){r=false}}return r};Y.prototype.getTreeChildren=function(t,i,e){var r=this;var n=t.modules.dataTree,o=[];if(n.children){if(!Array.isArray(n.children)){n.children=this.generateChildren(t)}n.children.forEach((function(t){if(t instanceof P){o.push(i?t.getComponent():t);if(e){o=o.concat(r.getTreeChildren(t,i,e))}}}))}return o};Y.prototype.checkForRestyle=function(t){if(!t.row.cells.indexOf(t)){t.row.reinitialize()}};Y.prototype.getChildField=function(){return this.field};Y.prototype.redrawNeeded=function(t){return(this.field?typeof t[this.field]!=="undefined":false)||(this.elementField?typeof t[this.elementField]!=="undefined":false)};H.prototype.registerModule("dataTree",Y);var G=function t(i){this.table=i};G.prototype.download=function(t,i,e,r,n){var o=this,s=false;function a(e,r){if(n){if(n===true){o.triggerDownload(e,r,t,i,true)}else{n(e)}}else{o.triggerDownload(e,r,t,i)}}if(typeof t=="function"){s=t}else{if(o.downloaders[t]){s=o.downloaders[t]}else{console.warn("Download Error - No such download type found: ",t)}}if(s){var u=this.generateExportList(r);s.call(this.table,u,e||{},a)}};G.prototype.generateExportList=function(t){var i=this.table.modules.export.generateExportList(this.table.options.downloadConfig,false,t||this.table.options.downloadRowRange,"download");var e=this.table.options.groupHeaderDownload;if(e&&!Array.isArray(e)){e=[e]}i.forEach((function(t){var i;if(t.type==="group"){i=t.columns[0];if(e&&e[t.indent]){i.value=e[t.indent](i.value,t.component._group.getRowCount(),t.component._group.getData(),t.component)}}}));return i};G.prototype.triggerDownload=function(t,i,e,r,n){var o=document.createElement("a"),s=new Blob([t],{type:i}),r=r||"Tabulator."+(typeof e==="function"?"txt":e);s=this.table.options.downloadReady.call(this.table,t,s);if(s){if(n){window.open(window.URL.createObjectURL(s))}else{if(navigator.msSaveOrOpenBlob){navigator.msSaveOrOpenBlob(s,r)}else{o.setAttribute("href",window.URL.createObjectURL(s));o.setAttribute("download",r);o.style.display="none";document.body.appendChild(o);o.click();document.body.removeChild(o)}}if(this.table.options.downloadComplete){this.table.options.downloadComplete()}}};G.prototype.commsReceived=function(t,i,e){switch(i){case"intercept":this.download(e.type,"",e.options,e.active,e.intercept);break}};G.prototype.downloaders={csv:function t(i,e,r){var n=e&&e.delimiter?e.delimiter:",",o=[],s=[];i.forEach((function(t){var i=[];switch(t.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":t.columns.forEach((function(t,i){if(t&&t.depth===1){s[i]=typeof t.value=="undefined"||t.value===null?"":'"'+String(t.value).split('"').join('""')+'"'}}));break;case"row":t.columns.forEach((function(t){if(t){switch(T(t.value)){case"object":t.value=JSON.stringify(t.value);break;case"undefined":case"null":t.value="";break}i.push('"'+String(t.value).split('"').join('""')+'"')}}));o.push(i.join(n));break}}));if(s.length){o.unshift(s.join(n))}o=o.join("\n");if(e.bom){o="\ufeff"+o}r(o,"text/csv")},json:function t(i,e,r){var n=[];i.forEach((function(t){var i={};switch(t.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":t.columns.forEach((function(t){if(t){i[t.component.getField()]=t.value}}));n.push(i);break}}));n=JSON.stringify(n,null,"\t");r(n,"application/json")},pdf:function t(i,e,r){var n=[],o=[],s={},a=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},u=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},l=e.jsPDF||{},f=e&&e.title?e.title:"";if(!l.orientation){l.orientation=e.orientation||"landscape"}if(!l.unit){l.unit="pt"}i.forEach((function(t){switch(t.type){case"header":n.push(h(t));break;case"group":o.push(h(t,a));break;case"calc":o.push(h(t,u));break;case"row":o.push(h(t));break}}));function h(t,i){var e=[];t.columns.forEach((function(t){var r;if(t){switch(T(t.value)){case"object":t.value=JSON.stringify(t.value);break;case"undefined":case"null":t.value="";break}r={content:t.value,colSpan:t.width,rowSpan:t.height};if(i){r.styles=i}e.push(r)}else{e.push("")}}));return e}var c=new jsPDF(l);if(e&&e.autoTable){if(typeof e.autoTable==="function"){s=e.autoTable(c)||{}}else{s=e.autoTable}}if(f){s.addPageContent=function(t){c.text(f,40,30)}}s.head=n;s.body=o;c.autoTable(s);if(e&&e.documentProcessing){e.documentProcessing(c)}r(c.output("arraybuffer"),"application/pdf")},xlsx:function t(i,e,r){var n=this,o=e.sheetName||"Sheet1",s=XLSX.utils.book_new(),a;s.SheetNames=[];s.Sheets={};function u(){var t=[],e=[],r={},n={s:{c:0,r:0},e:{c:i[0]?i[0].columns.reduce((function(t,i){return t+(i&&i.width?i.width:1)}),0):0,r:i.length}};i.forEach((function(i,r){var n=[];i.columns.forEach((function(t,i){if(t){n.push(!(t.value instanceof Date)&&T(t.value)==="object"?JSON.stringify(t.value):t.value);if(t.width>1||t.height>-1){e.push({s:{r,c:i},e:{r:r+t.height-1,c:i+t.width-1}})}}else{n.push("")}}));t.push(n)}));XLSX.utils.sheet_add_aoa(r,t);r["!ref"]=XLSX.utils.encode_range(n);if(e.length){r["!merges"]=e}return r}if(e.sheetOnly){r(u());return}if(e.sheets){for(var l in e.sheets){if(e.sheets[l]===true){s.SheetNames.push(l);s.Sheets[l]=u()}else{s.SheetNames.push(l);this.modules.comms.send(e.sheets[l],"download","intercept",{type:"xlsx",options:{sheetOnly:true},active:n.active,intercept:function t(i){s.Sheets[l]=i}})}}}else{s.SheetNames.push(o);s.Sheets[o]=u()}if(e.documentProcessing){s=e.documentProcessing(s)}function f(t){var i=new ArrayBuffer(t.length);var e=new Uint8Array(i);for(var r=0;r!=t.length;++r){e[r]=t.charCodeAt(r)&255}return i}a=XLSX.write(s,{bookType:"xlsx",bookSST:true,type:"binary"});r(f(a),"application/octet-stream")},html:function t(i,e,r){if(this.modExists("export",true)){r(this.modules.export.genereateHTMLTable(i),"text/html")}}};H.prototype.registerModule("download",G);var X=function t(i){this.table=i;this.currentCell=false;this.mouseClick=false;this.recursionBlock=false;this.invalidEdit=false;this.editedCells=[]};X.prototype.initializeColumn=function(t){var i=this,e={editor:false,blocked:false,check:t.definition.editable,params:t.definition.editorParams||{}};switch(T(t.definition.editor)){case"string":if(t.definition.editor==="tick"){t.definition.editor="tickCross";console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")}if(i.editors[t.definition.editor]){e.editor=i.editors[t.definition.editor]}else{console.warn("Editor Error - No such editor found: ",t.definition.editor)}break;case"function":e.editor=t.definition.editor;break;case"boolean":if(t.definition.editor===true){if(typeof t.definition.formatter!=="function"){if(t.definition.formatter==="tick"){t.definition.formatter="tickCross";console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")}if(i.editors[t.definition.formatter]){e.editor=i.editors[t.definition.formatter]}else{e.editor=i.editors["input"]}}else{console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",t.definition.formatter)}}break}if(e.editor){t.modules.edit=e}};X.prototype.getCurrentCell=function(){return this.currentCell?this.currentCell.getComponent():false};X.prototype.clearEditor=function(t){var i=this.currentCell,e;this.invalidEdit=false;if(i){this.currentCell=false;e=i.getElement();if(t){i.validate()}else{e.classList.remove("tabulator-validation-fail")}e.classList.remove("tabulator-editing");while(e.firstChild){e.removeChild(e.firstChild)}i.row.getElement().classList.remove("tabulator-row-editing")}};X.prototype.cancelEdit=function(){if(this.currentCell){var t=this.currentCell;var i=this.currentCell.getComponent();this.clearEditor(true);t.setValueActual(t.getValue());t.cellRendered();if(t.column.definition.editor=="textarea"||t.column.definition.variableHeight){t.row.normalizeHeight(true)}if(t.column.cellEvents.cellEditCancelled){t.column.cellEvents.cellEditCancelled.call(this.table,i)}this.table.options.cellEditCancelled.call(this.table,i)}};X.prototype.bindEditor=function(t){var i=this,e=t.getElement(true);e.setAttribute("tabindex",0);e.addEventListener("click",(function(t){if(!e.classList.contains("tabulator-editing")){e.focus({preventScroll:true})}}));e.addEventListener("mousedown",(function(t){if(t.button===2){t.preventDefault()}else{i.mouseClick=true}}));e.addEventListener("focus",(function(e){if(!i.recursionBlock){i.edit(t,e,false)}}))};X.prototype.focusCellNoEvent=function(t,i){this.recursionBlock=true;if(!(i&&this.table.browser==="ie")){t.getElement().focus({preventScroll:true})}this.recursionBlock=false};X.prototype.editCell=function(t,i){this.focusCellNoEvent(t);this.edit(t,false,i)};X.prototype.focusScrollAdjust=function(t){if(this.table.rowManager.getRenderMode()=="virtual"){var i=this.table.rowManager.element.scrollTop,e=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,r=t.row.getElement();if(r.offsetTop<i){this.table.rowManager.element.scrollTop-=i-r.offsetTop}else{if(r.offsetTop+r.offsetHeight>e){this.table.rowManager.element.scrollTop+=r.offsetTop+r.offsetHeight-e}}var n=this.table.rowManager.element.scrollLeft,o=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,s=t.getElement();if(this.table.modExists("frozenColumns")){n+=parseInt(this.table.modules.frozenColumns.leftMargin);o-=parseInt(this.table.modules.frozenColumns.rightMargin)}if(this.table.options.virtualDomHoz){n-=parseInt(this.table.vdomHoz.vDomPadLeft);o-=parseInt(this.table.vdomHoz.vDomPadLeft)}if(s.offsetLeft<n){this.table.rowManager.element.scrollLeft-=n-s.offsetLeft}else{if(s.offsetLeft+s.offsetWidth>o){this.table.rowManager.element.scrollLeft+=s.offsetLeft+s.offsetWidth-o}}}};X.prototype.edit=function(t,i,e){var r=this,n=true,o=function t(){},s=t.getElement(),a,u,l;if(this.currentCell){if(!this.invalidEdit){this.cancelEdit()}return}function f(i){if(r.currentCell===t){var e=true;if(t.column.modules.validate&&r.table.modExists("validate")&&r.table.options.validationMode!="manual"){e=r.table.modules.validate.validate(t.column.modules.validate,t,i)}if(e===true||r.table.options.validationMode==="highlight"){r.clearEditor();if(!t.modules.edit){t.modules.edit={}}t.modules.edit.edited=true;if(r.editedCells.indexOf(t)==-1){r.editedCells.push(t)}t.setValue(i,true);if(r.table.options.dataTree&&r.table.modExists("dataTree")){r.table.modules.dataTree.checkForRestyle(t)}if(e!==true){s.classList.add("tabulator-validation-fail");r.table.options.validationFailed.call(r.table,t.getComponent(),i,e);return false}return true}else{r.invalidEdit=true;s.classList.add("tabulator-validation-fail");r.focusCellNoEvent(t,true);o();r.table.options.validationFailed.call(r.table,t.getComponent(),i,e);return false}}}function h(){if(r.currentCell===t){r.cancelEdit();if(r.table.options.dataTree&&r.table.modExists("dataTree")){r.table.modules.dataTree.checkForRestyle(t)}}}function c(t){o=t}if(!t.column.modules.edit.blocked){if(i){i.stopPropagation()}switch(T(t.column.modules.edit.check)){case"function":n=t.column.modules.edit.check(t.getComponent());break;case"boolean":n=t.column.modules.edit.check;break}if(n||e){r.cancelEdit();r.currentCell=t;this.focusScrollAdjust(t);u=t.getComponent();if(this.mouseClick){this.mouseClick=false;if(t.column.cellEvents.cellClick){t.column.cellEvents.cellClick.call(this.table,i,u)}}if(t.column.cellEvents.cellEditing){t.column.cellEvents.cellEditing.call(this.table,u)}r.table.options.cellEditing.call(this.table,u);l=typeof t.column.modules.edit.params==="function"?t.column.modules.edit.params(u):t.column.modules.edit.params;a=t.column.modules.edit.editor.call(r,u,c,f,h,l);if(a!==false){if(a instanceof Node){s.classList.add("tabulator-editing");t.row.getElement().classList.add("tabulator-row-editing");while(s.firstChild){s.removeChild(s.firstChild)}s.appendChild(a);o();var d=s.children;for(var b=0;b<d.length;b++){d[b].addEventListener("click",(function(t){t.stopPropagation()}))}}else{console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",a);s.blur();return false}}else{s.blur();return false}return true}else{this.mouseClick=false;s.blur();return false}}else{this.mouseClick=false;s.blur();return false}};X.prototype.maskInput=function(t,i){var e=i.mask,r=typeof i.maskLetterChar!=="undefined"?i.maskLetterChar:"A",n=typeof i.maskNumberChar!=="undefined"?i.maskNumberChar:"9",o=typeof i.maskWildcardChar!=="undefined"?i.maskWildcardChar:"*";function s(i){var a=e[i];if(typeof a!=="undefined"&&a!==o&&a!==r&&a!==n){t.value=t.value+""+a;s(i+1)}}t.addEventListener("keydown",(function(i){var s=t.value.length,a=i.key;if(i.keyCode>46){if(s>=e.length){i.preventDefault();i.stopPropagation();return false}else{switch(e[s]){case r:if(a.toUpperCase()==a.toLowerCase()){i.preventDefault();i.stopPropagation();return false}break;case n:if(isNaN(a)){i.preventDefault();i.stopPropagation();return false}break;case o:break;default:if(a!==e[s]){i.preventDefault();i.stopPropagation();return false}}}}return}));t.addEventListener("keyup",(function(e){if(e.keyCode>46){if(i.maskAutoFill){s(t.value.length)}}}));if(!t.placeholder){t.placeholder=e}if(i.maskAutoFill){s(t.value.length)}};X.prototype.getEditedCells=function(){var t=[];this.editedCells.forEach((function(i){t.push(i.getComponent())}));return t};X.prototype.clearEdited=function(t){var i;if(t.modules.edit&&t.modules.edit.edited){t.modules.edit.edited=false;if(t.modules.validate){t.modules.validate.invalid=false}}i=this.editedCells.indexOf(t);if(i>-1){this.editedCells.splice(i,1)}};X.prototype.editors={input:function t(i,e,r,n,o){var s=i.getValue(),t=document.createElement("input");t.setAttribute("type",o.search?"search":"text");t.style.padding="4px";t.style.width="100%";t.style.boxSizing="border-box";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var a in o.elementAttributes){if(a.charAt(0)=="+"){a=a.slice(1);t.setAttribute(a,t.getAttribute(a)+o.elementAttributes["+"+a])}else{t.setAttribute(a,o.elementAttributes[a])}}}t.value=typeof s!=="undefined"?s:"";e((function(){t.focus({preventScroll:true});t.style.height="100%"}));function u(i){if((s===null||typeof s==="undefined")&&t.value!==""||t.value!==s){if(r(t.value)){s=t.value}}else{n()}}t.addEventListener("change",u);t.addEventListener("blur",u);t.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:u();break;case 27:n();break;case 35:case 36:t.stopPropagation();break}}));if(o.mask){this.table.modules.edit.maskInput(t,o)}return t},textarea:function t(i,e,r,n,o){var s=i.getValue(),a=o.verticalNavigation||"hybrid",u=String(s!==null&&typeof s!=="undefined"?s:"");(u.match(/(?:\r\n|\r|\n)/g)||[]).length+1;var l=document.createElement("textarea"),f=0;l.style.display="block";l.style.padding="2px";l.style.height="100%";l.style.width="100%";l.style.boxSizing="border-box";l.style.whiteSpace="pre-wrap";l.style.resize="none";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var h in o.elementAttributes){if(h.charAt(0)=="+"){h=h.slice(1);l.setAttribute(h,l.getAttribute(h)+o.elementAttributes["+"+h])}else{l.setAttribute(h,o.elementAttributes[h])}}}l.value=u;e((function(){l.focus({preventScroll:true});l.style.height="100%";l.style.height=l.scrollHeight+"px";i.getRow().normalizeHeight()}));function c(t){if((s===null||typeof s==="undefined")&&l.value!==""||l.value!==s){if(r(l.value)){s=l.value}setTimeout((function(){i.getRow().normalizeHeight()}),300)}else{n()}}l.addEventListener("change",c);l.addEventListener("blur",c);l.addEventListener("keyup",(function(){l.style.height="";var t=l.scrollHeight;l.style.height=t+"px";if(t!=f){f=t;i.getRow().normalizeHeight()}}));l.addEventListener("keydown",(function(t){switch(t.keyCode){case 27:n();break;case 38:if(a=="editor"||a=="hybrid"&&l.selectionStart){t.stopImmediatePropagation();t.stopPropagation()}break;case 40:if(a=="editor"||a=="hybrid"&&l.selectionStart!==l.value.length){t.stopImmediatePropagation();t.stopPropagation()}break;case 35:case 36:t.stopPropagation();break}}));if(o.mask){this.table.modules.edit.maskInput(l,o)}return l},number:function t(i,e,r,n,o){var s=i.getValue(),a=o.verticalNavigation||"editor",u=document.createElement("input");u.setAttribute("type","number");if(typeof o.max!="undefined"){u.setAttribute("max",o.max)}if(typeof o.min!="undefined"){u.setAttribute("min",o.min)}if(typeof o.step!="undefined"){u.setAttribute("step",o.step)}u.style.padding="4px";u.style.width="100%";u.style.boxSizing="border-box";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var l in o.elementAttributes){if(l.charAt(0)=="+"){l=l.slice(1);u.setAttribute(l,u.getAttribute(l)+o.elementAttributes["+"+l])}else{u.setAttribute(l,o.elementAttributes[l])}}}u.value=s;var f=function t(i){h()};e((function(){u.removeEventListener("blur",f);u.focus({preventScroll:true});u.style.height="100%";u.addEventListener("blur",f)}));function h(){var t=u.value;if(!isNaN(t)&&t!==""){t=Number(t)}if(t!==s){if(r(t)){s=t}}else{n()}}u.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:h();break;case 27:n();break;case 38:case 40:if(a=="editor"){t.stopImmediatePropagation();t.stopPropagation()}break;case 35:case 36:t.stopPropagation();break}}));if(o.mask){this.table.modules.edit.maskInput(u,o)}return u},range:function t(i,e,r,n,o){var s=i.getValue(),a=document.createElement("input");a.setAttribute("type","range");if(typeof o.max!="undefined"){a.setAttribute("max",o.max)}if(typeof o.min!="undefined"){a.setAttribute("min",o.min)}if(typeof o.step!="undefined"){a.setAttribute("step",o.step)}a.style.padding="4px";a.style.width="100%";a.style.boxSizing="border-box";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var u in o.elementAttributes){if(u.charAt(0)=="+"){u=u.slice(1);a.setAttribute(u,a.getAttribute(u)+o.elementAttributes["+"+u])}else{a.setAttribute(u,o.elementAttributes[u])}}}a.value=s;e((function(){a.focus({preventScroll:true});a.style.height="100%"}));function l(){var t=a.value;if(!isNaN(t)&&t!==""){t=Number(t)}if(t!=s){if(r(t)){s=t}}else{n()}}a.addEventListener("blur",(function(t){l()}));a.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:l();break;case 27:n();break}}));return a},select:function t(i,e,r,n,o){var s=this;var a=this,u=i.getElement(),l=i.getValue(),f=o.verticalNavigation||"editor",h=typeof l!=="undefined"||l===null?Array.isArray(l)?l:[l]:typeof o.defaultValue!=="undefined"?o.defaultValue:[],c=document.createElement("input"),d=document.createElement("div"),b=o.multiselect,p=[],v={},m=[],g=[],w=true,y=false,x="",k=null;if(Array.isArray(o)||!Array.isArray(o)&&(typeof o==="undefined"?"undefined":T(o))==="object"&&!o.values){console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object");o={values:o}}function C(t){var e={},r=a.table.getData(),n;if(t){n=a.table.columnManager.getColumnByField(t)}else{n=i.getColumn()._getSelf()}if(n){r.forEach((function(t){var i=n.getFieldValue(t);if(i!==null&&typeof i!=="undefined"&&i!==""){e[i]=true}}))}else{console.warn("unable to find matching column to create select lookup list:",t)}return Object.keys(e)}function E(t,e){var r=[];var n=[];function s(t){var t={label:t.label,value:t.value,itemParams:t.itemParams,elementAttributes:t.elementAttributes,element:false};if(e.indexOf(t.value)>-1){S(t)}r.push(t);n.push(t);return t}if(typeof t=="function"){t=t(i)}if(Array.isArray(t)){t.forEach((function(t){var i;if((typeof t==="undefined"?"undefined":T(t))==="object"){if(t.options){i={label:t.label,group:true,itemParams:t.itemParams,elementAttributes:t.elementAttributes,element:false};n.push(i);t.options.forEach((function(t){s(t)}))}else{s(t)}}else{i={label:t,value:t,element:false};if(e.indexOf(i.value)>-1){S(i)}r.push(i);n.push(i)}}))}else{for(var a in t){var u={label:t[a],value:a,element:false};if(e.indexOf(u.value)>-1){S(u)}r.push(u);n.push(u)}}if(o.sortValuesList){r.sort((function(t,i){return t.label<i.label?-1:t.label>i.label?1:0}));n.sort((function(t,i){return t.label<i.label?-1:t.label>i.label?1:0}));if(o.sortValuesList!=="asc"){r.reverse();n.reverse()}}p=r;m=n;j()}function j(){while(d.firstChild){d.removeChild(d.firstChild)}m.forEach((function(t){var e=t.element;if(!e){e=document.createElement("div");t.label=o.listItemFormatter?o.listItemFormatter(t.value,t.label,i,e,t.itemParams):t.label;if(t.group){e.classList.add("tabulator-edit-select-list-group");e.tabIndex=0;e.innerHTML=t.label===""?"&nbsp;":t.label}else{e.classList.add("tabulator-edit-select-list-item");e.tabIndex=0;e.innerHTML=t.label===""?"&nbsp;":t.label;e.addEventListener("click",(function(){y=true;setTimeout((function(){y=false}),10);if(b){N(t);c.focus()}else{M(t)}}));if(g.indexOf(t)>-1){e.classList.add("active")}}if(t.elementAttributes&&T(t.elementAttributes)=="object"){for(var r in t.elementAttributes){if(r.charAt(0)=="+"){r=r.slice(1);e.setAttribute(r,c.getAttribute(r)+t.elementAttributes["+"+r])}else{e.setAttribute(r,t.elementAttributes[r])}}}e.addEventListener("mousedown",(function(){w=false;setTimeout((function(){w=true}),10)}));t.element=e}d.appendChild(e)}))}function z(t,i){if(!b&&v&&v.element){v.element.classList.remove("active")}if(v&&v.element){v.element.classList.remove("focused")}v=t;if(t.element){t.element.classList.add("focused");if(i){t.element.classList.add("active")}}if(t&&t.element&&t.element.scrollIntoView){t.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}}function S(t){var i=g.indexOf(t);if(i==-1){g.push(t);z(t,true)}O()}function R(t){var i=g[t];if(t>-1){g.splice(t,1);if(i.element){i.element.classList.remove("active")}}}function N(t){if(!t){t=v}var i=g.indexOf(t);if(i>-1){R(i)}else{if(b!==true&&g.length>=b){R(0)}S(t)}O()}function M(t){L();if(!t){t=v}if(t){c.value=t.label;r(t.value)}h=[t.value]}function D(t){if(!t){L()}var i=[];g.forEach((function(t){i.push(t.value)}));h=i;r(i)}function O(){var t=[];g.forEach((function(i){t.push(i.label)}));c.value=t.join(", ");if(a.currentCell===false){D(true)}}function P(){var t=g.length;for(var i=0;i<t;i++){R(0)}}function F(){L();n()}function A(){g=[];if(!d.parentNode){if(o.values===true){E(C(),h)}else if(typeof o.values==="string"){E(C(o.values),h)}else{E(o.values||[],h)}var t=H.prototype.helpers.elOffset(u);d.style.minWidth=u.offsetWidth+"px";d.style.top=t.top+u.offsetHeight+"px";d.style.left=t.left+"px";d.addEventListener("mousedown",(function(t){w=false;setTimeout((function(){w=true}),10)}));document.body.appendChild(d)}}function L(){if(d.parentNode){d.parentNode.removeChild(d)}I()}function I(){a.table.rowManager.element.removeEventListener("scroll",F)}function _(t){clearTimeout(k);var i=String.fromCharCode(event.keyCode).toLowerCase();x+=i.toLowerCase();var e=p.find((function(t){return typeof t.label!=="undefined"&&t.label.toLowerCase().startsWith(x)}));if(e){z(e,!b)}k=setTimeout((function(){x=""}),800)}c.setAttribute("type","text");c.style.padding="4px";c.style.width="100%";c.style.boxSizing="border-box";c.style.cursor="default";c.readOnly=this.currentCell!=false;if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var U in o.elementAttributes){if(U.charAt(0)=="+"){U=U.slice(1);c.setAttribute(U,c.getAttribute(U)+o.elementAttributes["+"+U])}else{c.setAttribute(U,o.elementAttributes[U])}}}c.value=typeof l!=="undefined"||l===null?l:"";c.addEventListener("search",(function(t){if(!c.value){P();D()}}));c.addEventListener("keydown",(function(t){var i;switch(t.keyCode){case 38:i=p.indexOf(v);if(f=="editor"||f=="hybrid"&&i){t.stopImmediatePropagation();t.stopPropagation();t.preventDefault();if(i>0){z(p[i-1],!b)}}break;case 40:i=p.indexOf(v);if(f=="editor"||f=="hybrid"&&i<p.length-1){t.stopImmediatePropagation();t.stopPropagation();t.preventDefault();if(i<p.length-1){if(i==-1){z(p[0],!b)}else{z(p[i+1],!b)}}}break;case 37:case 39:t.stopImmediatePropagation();t.stopPropagation();t.preventDefault();break;case 13:if(b){N()}else{M()}break;case 27:F();break;case 9:break;default:if(a.currentCell===false){t.preventDefault()}if(t.keyCode>=38&&t.keyCode<=90){_()}}}));c.addEventListener("blur",(function(t){if(w){if(b){D()}else{F()}}}));c.addEventListener("focus",(function(t){if(!y){A()}}));d=document.createElement("div");d.classList.add("tabulator-edit-select-list");e((function(){c.style.height="100%";c.focus({preventScroll:true})}));setTimeout((function(){s.table.rowManager.element.addEventListener("scroll",F)}),10);return c},autocomplete:function t(i,e,r,n,o){var s=this;var a=this,u=i.getElement(),l=i.getValue(),f=o.verticalNavigation||"editor",h=typeof l!=="undefined"||l===null?l:typeof o.defaultValue!=="undefined"?o.defaultValue:"",c=document.createElement("input"),d=document.createElement("div"),b=[],p=false,v=true,m=false;c.setAttribute("type","search");c.style.padding="4px";c.style.width="100%";c.style.boxSizing="border-box";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var g in o.elementAttributes){if(g.charAt(0)=="+"){g=g.slice(1);c.setAttribute(g,c.getAttribute(g)+o.elementAttributes["+"+g])}else{c.setAttribute(g,o.elementAttributes[g])}}}d.classList.add("tabulator-edit-select-list");d.addEventListener("mousedown",(function(t){v=false;setTimeout((function(){v=true}),10)}));function w(){if(o.values===true){m=y()}else if(typeof o.values==="string"){m=y(o.values)}}function y(t){var e={},r=a.table.getData(),n;if(t){n=a.table.columnManager.getColumnByField(t)}else{n=i.getColumn()._getSelf()}if(n){r.forEach((function(t){var i=n.getFieldValue(t);if(i!==null&&typeof i!=="undefined"&&i!==""){e[i]=true}}));if(o.sortValuesList){if(o.sortValuesList=="asc"){e=Object.keys(e).sort()}else{e=Object.keys(e).sort().reverse()}}else{e=Object.keys(e)}}else{console.warn("unable to find matching column to create autocomplete lookup list:",t)}return e}function x(t,i){var e=[],r,n;if(m){r=m}else{r=o.values||[]}if(o.searchFunc){e=o.searchFunc(t,r);if(e instanceof Promise){k(typeof o.searchingPlaceholder!=="undefined"?o.searchingPlaceholder:"Searching...");e.then((function(t){j(C(t),i)})).catch((function(t){console.err("error in autocomplete search promise:",t)}))}else{j(C(e),i)}}else{n=C(r);if(t===""){if(o.showListOnEmpty){e=n}}else{n.forEach((function(i){if(i.value!==null||typeof i.value!=="undefined"){if(String(i.value).toLowerCase().indexOf(String(t).toLowerCase())>-1||String(i.title).toLowerCase().indexOf(String(t).toLowerCase())>-1){e.push(i)}}}))}j(e,i)}}function k(t){var i=document.createElement("div");E();if(t!==false){i.classList.add("tabulator-edit-select-list-notice");i.tabIndex=0;if(t instanceof Node){i.appendChild(t)}else{i.innerHTML=t}d.appendChild(i)}}function C(t){var i=[];if(Array.isArray(t)){t.forEach((function(t){var e={};if((typeof t==="undefined"?"undefined":T(t))==="object"){e.title=o.listItemFormatter?o.listItemFormatter(t.value,t.label):t.label;e.value=t.value}else{e.title=o.listItemFormatter?o.listItemFormatter(t,t):t;e.value=t}i.push(e)}))}else{for(var e in t){var r={title:o.listItemFormatter?o.listItemFormatter(e,t[e]):t[e],value:e};i.push(r)}}return i}function E(){while(d.firstChild){d.removeChild(d.firstChild)}}function j(t,i){if(t.length){z(t,i)}else{if(o.emptyPlaceholder){k(o.emptyPlaceholder)}}}function z(t,i){var e=false;E();b=t;b.forEach((function(t){var r=t.element;if(!r){r=document.createElement("div");r.classList.add("tabulator-edit-select-list-item");r.tabIndex=0;r.innerHTML=t.title;r.addEventListener("click",(function(i){N(t);S()}));r.addEventListener("mousedown",(function(t){v=false;setTimeout((function(){v=true}),10)}));t.element=r;if(i&&t.value==l){c.value=t.title;t.element.classList.add("active");e=true}if(t===p){t.element.classList.add("active");e=true}}d.appendChild(r)}));if(!e){N(false)}}function S(){M();if(p){if(l!==p.value){l=p.value;c.value=p.title;r(p.value)}else{n()}}else{if(o.freetext){l=c.value;r(c.value)}else{if(o.allowEmpty&&c.value===""){l=c.value;r(c.value)}else{n()}}}}function R(){if(!d.parentNode){console.log("show",h);while(d.firstChild){d.removeChild(d.firstChild)}var t=H.prototype.helpers.elOffset(u);d.style.minWidth=u.offsetWidth+"px";d.style.top=t.top+u.offsetHeight+"px";d.style.left=t.left+"px";document.body.appendChild(d)}}function N(t,i){if(p&&p.element){p.element.classList.remove("active")}p=t;if(t&&t.element){t.element.classList.add("active")}if(t&&t.element&&t.element.scrollIntoView){t.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}}function M(){if(d.parentNode){d.parentNode.removeChild(d)}O()}function D(){M();n()}function O(){a.table.rowManager.element.removeEventListener("scroll",D)}c.addEventListener("keydown",(function(t){var i;switch(t.keyCode){case 38:i=b.indexOf(p);if(f=="editor"||f=="hybrid"&&i){t.stopImmediatePropagation();t.stopPropagation();t.preventDefault();if(i>0){N(b[i-1])}else{N(false)}}break;case 40:i=b.indexOf(p);if(f=="editor"||f=="hybrid"&&i<b.length-1){t.stopImmediatePropagation();t.stopPropagation();t.preventDefault();if(i<b.length-1){if(i==-1){N(b[0])}else{N(b[i+1])}}}break;case 37:case 39:t.stopImmediatePropagation();t.stopPropagation();break;case 13:S();break;case 27:D();break;case 36:case 35:t.stopImmediatePropagation();break}}));c.addEventListener("keyup",(function(t){switch(t.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:x(c.value)}}));c.addEventListener("search",(function(t){x(c.value)}));c.addEventListener("blur",(function(t){if(v){S()}}));c.addEventListener("focus",(function(t){var i=h;w();R();c.value=i;x(i,true)}));e((function(){c.style.height="100%";c.focus({preventScroll:true})}));if(o.mask){this.table.modules.edit.maskInput(c,o)}setTimeout((function(){s.table.rowManager.element.addEventListener("scroll",D)}),10);w();c.value=h;x(h,true);return c},star:function t(i,e,r,n,o){var s=this,a=i.getElement(),u=i.getValue(),l=a.getElementsByTagName("svg").length||5,f=a.getElementsByTagName("svg")[0]?a.getElementsByTagName("svg")[0].getAttribute("width"):14,h=[],c=document.createElement("div"),t=document.createElementNS("http://www.w3.org/2000/svg","svg");function d(t){h.forEach((function(i,e){if(e<t){if(s.table.browser=="ie"){i.setAttribute("class","tabulator-star-active")}else{i.classList.replace("tabulator-star-inactive","tabulator-star-active")}i.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'}else{if(s.table.browser=="ie"){i.setAttribute("class","tabulator-star-inactive")}else{i.classList.replace("tabulator-star-active","tabulator-star-inactive")}i.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'}}))}function b(i){var e=document.createElement("span");var n=t.cloneNode(true);h.push(n);e.addEventListener("mouseenter",(function(t){t.stopPropagation();t.stopImmediatePropagation();d(i)}));e.addEventListener("mousemove",(function(t){t.stopPropagation();t.stopImmediatePropagation()}));e.addEventListener("click",(function(t){t.stopPropagation();t.stopImmediatePropagation();r(i);a.blur()}));e.appendChild(n);c.appendChild(e)}function p(t){u=t;d(t)}a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.textOverflow="ellipsis";c.style.verticalAlign="middle";c.style.display="inline-block";c.style.padding="4px";t.setAttribute("width",f);t.setAttribute("height",f);t.setAttribute("viewBox","0 0 512 512");t.setAttribute("xml:space","preserve");t.style.padding="0 1px";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var v in o.elementAttributes){if(v.charAt(0)=="+"){v=v.slice(1);c.setAttribute(v,c.getAttribute(v)+o.elementAttributes["+"+v])}else{c.setAttribute(v,o.elementAttributes[v])}}}for(var m=1;m<=l;m++){b(m)}u=Math.min(parseInt(u),l);d(u);c.addEventListener("mousemove",(function(t){d(0)}));c.addEventListener("click",(function(t){r(0)}));a.addEventListener("blur",(function(t){n()}));a.addEventListener("keydown",(function(t){switch(t.keyCode){case 39:p(u+1);break;case 37:p(u-1);break;case 13:r(u);break;case 27:n();break}}));return c},progress:function t(i,e,r,n,o){var s=i.getElement(),a=typeof o.max==="undefined"?s.getElementsByTagName("div")[0].getAttribute("max")||100:o.max,u=typeof o.min==="undefined"?s.getElementsByTagName("div")[0].getAttribute("min")||0:o.min,l=(a-u)/100,f=i.getValue()||0,h=document.createElement("div"),c=document.createElement("div"),d,b;function p(){var t=window.getComputedStyle(s,null);var i=l*Math.round(c.offsetWidth/((s.clientWidth-parseInt(t.getPropertyValue("padding-left"))-parseInt(t.getPropertyValue("padding-right")))/100))+u;r(i);s.setAttribute("aria-valuenow",i);s.setAttribute("aria-label",f)}h.style.position="absolute";h.style.right="0";h.style.top="0";h.style.bottom="0";h.style.width="5px";h.classList.add("tabulator-progress-handle");c.style.display="inline-block";c.style.position="relative";c.style.height="100%";c.style.backgroundColor="#488CE9";c.style.maxWidth="100%";c.style.minWidth="0%";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var v in o.elementAttributes){if(v.charAt(0)=="+"){v=v.slice(1);c.setAttribute(v,c.getAttribute(v)+o.elementAttributes["+"+v])}else{c.setAttribute(v,o.elementAttributes[v])}}}s.style.padding="4px 4px";f=Math.min(parseFloat(f),a);f=Math.max(parseFloat(f),u);f=Math.round((f-u)/l);c.style.width=f+"%";s.setAttribute("aria-valuemin",u);s.setAttribute("aria-valuemax",a);c.appendChild(h);h.addEventListener("mousedown",(function(t){d=t.screenX;b=c.offsetWidth}));h.addEventListener("mouseover",(function(){h.style.cursor="ew-resize"}));s.addEventListener("mousemove",(function(t){if(d){c.style.width=b+t.screenX-d+"px"}}));s.addEventListener("mouseup",(function(t){if(d){t.stopPropagation();t.stopImmediatePropagation();d=false;b=false;p()}}));s.addEventListener("keydown",(function(t){switch(t.keyCode){case 39:t.preventDefault();c.style.width=c.clientWidth+s.clientWidth/100+"px";break;case 37:t.preventDefault();c.style.width=c.clientWidth-s.clientWidth/100+"px";break;case 9:case 13:p();break;case 27:n();break}}));s.addEventListener("blur",(function(){n()}));return c},tickCross:function t(i,e,r,n,o){var s=i.getValue(),a=document.createElement("input"),u=o.tristate,l=typeof o.indeterminateValue==="undefined"?null:o.indeterminateValue,f=false;a.setAttribute("type","checkbox");a.style.marginTop="5px";a.style.boxSizing="border-box";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var h in o.elementAttributes){if(h.charAt(0)=="+"){h=h.slice(1);a.setAttribute(h,a.getAttribute(h)+o.elementAttributes["+"+h])}else{a.setAttribute(h,o.elementAttributes[h])}}}a.value=s;if(u&&(typeof s==="undefined"||s===l||s==="")){f=true;a.indeterminate=true}if(this.table.browser!="firefox"){e((function(){a.focus({preventScroll:true})}))}a.checked=s===true||s==="true"||s==="True"||s===1;e((function(){a.focus()}));function c(t){if(u){if(!t){if(a.checked&&!f){a.checked=false;a.indeterminate=true;f=true;return l}else{f=false;return a.checked}}else{if(f){return l}else{return a.checked}}}else{return a.checked}}a.addEventListener("change",(function(t){r(c())}));a.addEventListener("blur",(function(t){r(c(true))}));a.addEventListener("keydown",(function(t){if(t.keyCode==13){r(c())}if(t.keyCode==27){n()}}));return a}};H.prototype.registerModule("edit",X);var $=function t(i,e,r,n){this.type=i;this.columns=e;this.component=r||false;this.indent=n||0};var Z=function t(i,e,r,n,o){this.value=i;this.component=e||false;this.width=r;this.height=n;this.depth=o};var K=function t(i){this.table=i;this.config={};this.cloneTableStyle=true;this.colVisProp=""};K.prototype.generateExportList=function(t,i,e,r){this.cloneTableStyle=i;this.config=t||{};this.colVisProp=r;var n=this.config.columnHeaders!==false?this.headersToExportRows(this.generateColumnGroupHeaders()):[];var o=this.bodyToExportRows(this.rowLookup(e));return n.concat(o)};K.prototype.genereateTable=function(t,i,e,r){var n=this.generateExportList(t,i,e,r);return this.genereateTableElement(n)};K.prototype.rowLookup=function(t){var i=this;var e=[];if(typeof t=="function"){t.call(this.table).forEach((function(t){t=i.table.rowManager.findRow(t);if(t){e.push(t)}}))}else{switch(t){case true:case"visible":e=this.table.rowManager.getVisibleRows(true);break;case"all":e=this.table.rowManager.rows;break;case"selected":e=this.table.modules.selectRow.selectedRows;break;case"active":default:if(this.table.options.pagination){e=this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2)}else{e=this.table.rowManager.getDisplayRows()}}}return Object.assign([],e)};K.prototype.generateColumnGroupHeaders=function(){var t=this;var i=[];var e=this.config.columnGroups!==false?this.table.columnManager.columns:this.table.columnManager.columnsByIndex;e.forEach((function(e){var r=t.processColumnGroup(e);if(r){i.push(r)}}));return i};K.prototype.processColumnGroup=function(t){var i=this;var e=t.columns,r=0,n=t.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||t.definition.title;var o={title:n,column:t,depth:1};if(e.length){o.subGroups=[];o.width=0;e.forEach((function(t){var e=i.processColumnGroup(t);if(e){o.width+=e.width;o.subGroups.push(e);if(e.depth>r){r=e.depth}}}));o.depth+=r;if(!o.width){return false}}else{if(this.columnVisCheck(t)){o.width=1}else{return false}}return o};K.prototype.columnVisCheck=function(t){return t.definition[this.colVisProp]!==false&&(t.visible||!t.visible&&t.definition[this.colVisProp])};K.prototype.headersToExportRows=function(t){var i=[],e=0,r=[];function n(t,r){var o=e-r;if(typeof i[r]==="undefined"){i[r]=[]}t.height=t.subGroups?1:o-t.depth+1;i[r].push(t);if(t.height>1){for(var s=1;s<t.height;s++){if(typeof i[r+s]==="undefined"){i[r+s]=[]}i[r+s].push(false)}}if(t.width>1){for(var a=1;a<t.width;a++){i[r].push(false)}}if(t.subGroups){t.subGroups.forEach((function(t){n(t,r+1)}))}}t.forEach((function(t){if(t.depth>e){e=t.depth}}));t.forEach((function(t){n(t,0)}));i.forEach((function(t){var i=[];t.forEach((function(t){if(t){i.push(new Z(t.title,t.column.getComponent(),t.width,t.height,t.depth))}else{i.push(null)}}));r.push(new $("header",i))}));return r};K.prototype.bodyToExportRows=function(t){var i=this;var e=[];var r=[];this.table.columnManager.columnsByIndex.forEach((function(t){if(i.columnVisCheck(t)){e.push(t.getComponent())}}));if(this.config.columnCalcs!==false&&this.table.modExists("columnCalcs")){if(this.table.modules.columnCalcs.topInitialized){t.unshift(this.table.modules.columnCalcs.topRow)}if(this.table.modules.columnCalcs.botInitialized){t.push(this.table.modules.columnCalcs.botRow)}}t=t.filter((function(t){switch(t.type){case"group":return i.config.rowGroups!==false;case"calc":return i.config.columnCalcs!==false;case"row":return!(i.table.options.dataTree&&i.config.dataTree===false&&t.modules.dataTree.parent)}return true}));t.forEach((function(t,n){var o=t.getData(i.colVisProp);var s=[];var a=0;switch(t.type){case"group":a=t.level;s.push(new Z(t.key,t.getComponent(),e.length,1));break;case"calc":case"row":e.forEach((function(t){s.push(new Z(t._column.getFieldValue(o),t,1,1))}));if(i.table.options.dataTree&&i.config.dataTree!==false){a=t.modules.dataTree.index}break}r.push(new $(t.type,s,t.getComponent(),a))}));return r};K.prototype.genereateTableElement=function(t){var i=this;var e=document.createElement("table"),r=document.createElement("thead"),n=document.createElement("tbody"),o=this.lookupTableStyles(),s=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],a={};a.rowFormatter=s!==null?s:this.table.options.rowFormatter;if(this.table.options.dataTree&&this.config.dataTree!==false&&this.table.modExists("columnCalcs")){a.treeElementField=this.table.modules.dataTree.elementField}a.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))];if(a.groupHeader&&!Array.isArray(a.groupHeader)){a.groupHeader=[a.groupHeader]}e.classList.add("tabulator-print-table");this.mapElementStyles(this.table.columnManager.getHeadersElement(),r,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]);if(t.length>1e3){console.warn("It may take a long time to render an HTML table with more than 1000 rows")}t.forEach((function(t,e){switch(t.type){case"header":r.appendChild(i.genereateHeaderElement(t,a,o));break;case"group":n.appendChild(i.genereateGroupElement(t,a,o));break;case"calc":n.appendChild(i.genereateCalcElement(t,a,o));break;case"row":var s=i.genereateRowElement(t,a,o);i.mapElementStyles(e%2&&o.evenRow?o.evenRow:o.oddRow,s,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]);n.appendChild(s);break}}));if(r.innerHTML){e.appendChild(r)}e.appendChild(n);this.mapElementStyles(this.table.element,e,["border-top","border-left","border-right","border-bottom"]);return e};K.prototype.lookupTableStyles=function(){var t={};if(this.cloneTableStyle&&window.getComputedStyle){t.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)");t.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)");t.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs");t.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)");t.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0];if(t.firstRow){t.styleCells=t.firstRow.getElementsByClassName("tabulator-cell");t.firstCell=t.styleCells[0];t.lastCell=t.styleCells[t.styleCells.length-1]}}return t};K.prototype.genereateHeaderElement=function(t,i,e){var r=this;var n=document.createElement("tr");t.columns.forEach((function(t){if(t){var i=document.createElement("th");var e=t.component._column.definition.cssClass?t.component._column.definition.cssClass.split(" "):[];i.colSpan=t.width;i.rowSpan=t.height;i.innerHTML=t.value;if(r.cloneTableStyle){i.style.boxSizing="border-box"}e.forEach((function(t){i.classList.add(t)}));r.mapElementStyles(t.component.getElement(),i,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]);r.mapElementStyles(t.component._column.contentElement,i,["padding-top","padding-left","padding-right","padding-bottom"]);if(t.component._column.visible){r.mapElementStyles(t.component.getElement(),i,["width"])}else{if(t.component._column.definition.width){i.style.width=t.component._column.definition.width+"px"}}if(t.component._column.parent){r.mapElementStyles(t.component._column.parent.groupElement,i,["border-top"])}n.appendChild(i)}}));return n};K.prototype.genereateGroupElement=function(t,i,e){var r=document.createElement("tr"),n=document.createElement("td"),o=t.columns[0];r.classList.add("tabulator-print-table-row");if(i.groupHeader&&i.groupHeader[t.indent]){o.value=i.groupHeader[t.indent](o.value,t.component._group.getRowCount(),t.component._group.getData(),t.component)}else{if(i.groupHeader===false){o.value=o.value}else{o.value=t.component._group.generator(o.value,t.component._group.getRowCount(),t.component._group.getData(),t.component)}}n.colSpan=o.width;n.innerHTML=o.value;r.classList.add("tabulator-print-table-group");r.classList.add("tabulator-group-level-"+t.indent);if(o.component.isVisible()){r.classList.add("tabulator-group-visible")}this.mapElementStyles(e.firstGroup,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]);this.mapElementStyles(e.firstGroup,n,["padding-top","padding-left","padding-right","padding-bottom"]);r.appendChild(n);return r};K.prototype.genereateCalcElement=function(t,i,e){var r=this.genereateRowElement(t,i,e);r.classList.add("tabulator-print-table-calcs");this.mapElementStyles(e.calcRow,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]);return r};K.prototype.genereateRowElement=function(t,e,r){var n=this;var o=document.createElement("tr");o.classList.add("tabulator-print-table-row");t.columns.forEach((function(s){if(s){var a=document.createElement("td"),u=s.component._column,l=s.value;var f={modules:{},getValue:function t(){return l},getField:function t(){return u.definition.field},getElement:function t(){return a},getColumn:function t(){return u.getComponent()},getData:function i(){return t.component.getData()},getRow:function i(){return t.component},getComponent:function t(){return f},column:u};var h=u.definition.cssClass?u.definition.cssClass.split(" "):[];h.forEach((function(t){a.classList.add(t)}));if(n.table.modExists("format")&&n.config.formatCells!==false){l=n.table.modules.format.formatExportValue(f,n.colVisProp)}else{switch(typeof l==="undefined"?"undefined":T(l)){case"object":l=JSON.stringify(l);break;case"undefined":case"null":l="";break;default:l=l}}if(l instanceof Node){a.appendChild(l)}else{a.innerHTML=l}if(r.firstCell){n.mapElementStyles(r.firstCell,a,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]);if(u.definition.align){a.style.textAlign=u.definition.align}}if(n.table.options.dataTree&&n.config.dataTree!==false){if(e.treeElementField&&e.treeElementField==u.field||!e.treeElementField&&i==0){if(t.component._row.modules.dataTree.controlEl){a.insertBefore(t.component._row.modules.dataTree.controlEl.cloneNode(true),a.firstChild)}if(t.component._row.modules.dataTree.branchEl){a.insertBefore(t.component._row.modules.dataTree.branchEl.cloneNode(true),a.firstChild)}}}o.appendChild(a);if(f.modules.format&&f.modules.format.renderedCallback){f.modules.format.renderedCallback()}if(e.rowFormatter&&n.config.formatCells!==false){e.rowFormatter(t.component)}}}));return o};K.prototype.genereateHTMLTable=function(t){var i=document.createElement("div");i.appendChild(this.genereateTableElement(t));return i.innerHTML};K.prototype.getHtml=function(t,i,e,r){var n=this.generateExportList(e||this.table.options.htmlOutputConfig,i,t,r||"htmlOutput");return this.genereateHTMLTable(n)};K.prototype.mapElementStyles=function(t,i,e){if(this.cloneTableStyle&&t&&i){var r={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(t);e.forEach((function(t){i.style[r[t]]=n.getPropertyValue(t)}))}}};H.prototype.registerModule("export",K);var Q=function t(i){this.table=i;this.filterList=[];this.headerFilters={};this.headerFilterColumns=[];this.prevHeaderFilterChangeCheck="";this.prevHeaderFilterChangeCheck="{}";this.changed=false};Q.prototype.initializeColumn=function(t,i){var e=this,r=t.getField();function n(i){var n=t.modules.filter.tagType=="input"&&t.modules.filter.attrType=="text"||t.modules.filter.tagType=="textarea"?"partial":"match",o="",s="",a;if(typeof t.modules.filter.prevSuccess==="undefined"||t.modules.filter.prevSuccess!==i){t.modules.filter.prevSuccess=i;if(!t.modules.filter.emptyFunc(i)){t.modules.filter.value=i;switch(T(t.definition.headerFilterFunc)){case"string":if(e.filters[t.definition.headerFilterFunc]){o=t.definition.headerFilterFunc;a=function r(n){var o=t.definition.headerFilterFuncParams||{};var s=t.getFieldValue(n);o=typeof o==="function"?o(i,s,n):o;return e.filters[t.definition.headerFilterFunc](i,s,n,o)}}else{console.warn("Header Filter Error - Matching filter function not found: ",t.definition.headerFilterFunc)}break;case"function":a=function e(r){var n=t.definition.headerFilterFuncParams||{};var o=t.getFieldValue(r);n=typeof n==="function"?n(i,o,r):n;return t.definition.headerFilterFunc(i,o,r,n)};o=a;break}if(!a){switch(n){case"partial":a=function e(r){var n=t.getFieldValue(r);if(typeof n!=="undefined"&&n!==null){return String(n).toLowerCase().indexOf(String(i).toLowerCase())>-1}else{return false}};o="like";break;default:a=function e(r){return t.getFieldValue(r)==i};o="="}}e.headerFilters[r]={value:i,func:a,type:o,params:{}}}else{delete e.headerFilters[r]}s=JSON.stringify(e.headerFilters);if(e.prevHeaderFilterChangeCheck!==s){e.prevHeaderFilterChangeCheck=s;e.changed=true;e.table.rowManager.filterRefresh()}}return true}t.modules.filter={success:n,attrType:false,tagType:false,emptyFunc:false};this.generateHeaderFilterElement(t)};Q.prototype.generateHeaderFilterElement=function(t,i,e){var r=this;var n=this,o=t.modules.filter.success,s=t.getField(),a,u,l,f,h,c,d;function b(){}if(t.modules.filter.headerElement&&t.modules.filter.headerElement.parentNode){t.contentElement.removeChild(t.modules.filter.headerElement.parentNode)}if(s){t.modules.filter.emptyFunc=t.definition.headerFilterEmptyCheck||function(t){return!t&&t!=="0"&&t!==0};a=document.createElement("div");a.classList.add("tabulator-header-filter");switch(T(t.definition.headerFilter)){case"string":if(n.table.modules.edit.editors[t.definition.headerFilter]){u=n.table.modules.edit.editors[t.definition.headerFilter];if((t.definition.headerFilter==="tick"||t.definition.headerFilter==="tickCross")&&!t.definition.headerFilterEmptyCheck){t.modules.filter.emptyFunc=function(t){return t!==true&&t!==false}}}else{console.warn("Filter Error - Cannot build header filter, No such editor found: ",t.definition.editor)}break;case"function":u=t.definition.headerFilter;break;case"boolean":if(t.modules.edit&&t.modules.edit.editor){u=t.modules.edit.editor}else{if(t.definition.formatter&&n.table.modules.edit.editors[t.definition.formatter]){u=n.table.modules.edit.editors[t.definition.formatter];if((t.definition.formatter==="tick"||t.definition.formatter==="tickCross")&&!t.definition.headerFilterEmptyCheck){t.modules.filter.emptyFunc=function(t){return t!==true&&t!==false}}}else{u=n.table.modules.edit.editors["input"]}}break}if(u){f={getValue:function t(){return typeof i!=="undefined"?i:""},getField:function i(){return t.definition.field},getElement:function t(){return a},getColumn:function i(){return t.getComponent()},getRow:function t(){return{normalizeHeight:function t(){}}}};d=t.definition.headerFilterParams||{};d=typeof d==="function"?d.call(n.table):d;l=u.call(this.table.modules.edit,f,(function(){}),o,b,d);if(!l){console.warn("Filter Error - Cannot add filter to "+s+" column, editor returned a value of false");return}if(!(l instanceof Node)){console.warn("Filter Error - Cannot add filter to "+s+" column, editor should return an instance of Node, the editor returned:",l);return}if(s){n.table.modules.localize.bind("headerFilters|columns|"+t.definition.field,(function(t){l.setAttribute("placeholder",typeof t!=="undefined"&&t?t:n.table.modules.localize.getText("headerFilters|default"))}))}else{n.table.modules.localize.bind("headerFilters|default",(function(t){l.setAttribute("placeholder",typeof n.column.definition.headerFilterPlaceholder!=="undefined"&&n.column.definition.headerFilterPlaceholder?n.column.definition.headerFilterPlaceholder:t)}))}l.addEventListener("click",(function(t){t.stopPropagation();l.focus()}));l.addEventListener("focus",(function(t){var i=r.table.columnManager.element.scrollLeft;if(i!==r.table.rowManager.element.scrollLeft){r.table.rowManager.scrollHorizontal(i);r.table.columnManager.scrollHorizontal(i)}}));h=false;c=function t(i){if(h){clearTimeout(h)}h=setTimeout((function(){o(l.value)}),n.table.options.headerFilterLiveFilterDelay)};t.modules.filter.headerElement=l;t.modules.filter.attrType=l.hasAttribute("type")?l.getAttribute("type").toLowerCase():"";t.modules.filter.tagType=l.tagName.toLowerCase();if(t.definition.headerFilterLiveFilter!==false){if(!(t.definition.headerFilter==="autocomplete"||t.definition.headerFilter==="tickCross"||(t.definition.editor==="autocomplete"||t.definition.editor==="tickCross")&&t.definition.headerFilter===true)){l.addEventListener("keyup",c);l.addEventListener("search",c);if(t.modules.filter.attrType=="number"){l.addEventListener("change",(function(t){o(l.value)}))}if(t.modules.filter.attrType=="text"&&this.table.browser!=="ie"){l.setAttribute("type","search")}}if(t.modules.filter.tagType=="input"||t.modules.filter.tagType=="select"||t.modules.filter.tagType=="textarea"){l.addEventListener("mousedown",(function(t){t.stopPropagation()}))}}a.appendChild(l);t.contentElement.appendChild(a);if(!e){n.headerFilterColumns.push(t)}}}else{console.warn("Filter Error - Cannot add header filter, column has no field set:",t.definition.title)}};Q.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach((function(t){if(t.modules.filter&&t.modules.filter.headerElement){t.modules.filter.headerElement.style.display="none"}}))};Q.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach((function(t){if(t.modules.filter&&t.modules.filter.headerElement){t.modules.filter.headerElement.style.display=""}}))};Q.prototype.setHeaderFilterFocus=function(t){if(t.modules.filter&&t.modules.filter.headerElement){t.modules.filter.headerElement.focus()}else{console.warn("Column Filter Focus Error - No header filter set on column:",t.getField())}};Q.prototype.getHeaderFilterValue=function(t){if(t.modules.filter&&t.modules.filter.headerElement){return t.modules.filter.headerElement.value}else{console.warn("Column Filter Error - No header filter set on column:",t.getField())}};Q.prototype.setHeaderFilterValue=function(t,i){if(t){if(t.modules.filter&&t.modules.filter.headerElement){this.generateHeaderFilterElement(t,i,true);t.modules.filter.success(i)}else{console.warn("Column Filter Error - No header filter set on column:",t.getField())}}};Q.prototype.reloadHeaderFilter=function(t){if(t){if(t.modules.filter&&t.modules.filter.headerElement){this.generateHeaderFilterElement(t,t.modules.filter.value,true)}else{console.warn("Column Filter Error - No header filter set on column:",t.getField())}}};Q.prototype.hasChanged=function(){var t=this.changed;this.changed=false;return t};Q.prototype.setFilter=function(t,i,e,r){var n=this;n.filterList=[];if(!Array.isArray(t)){t=[{field:t,type:i,value:e,params:r}]}n.addFilter(t)};Q.prototype.addFilter=function(t,i,e,r){var n=this;if(!Array.isArray(t)){t=[{field:t,type:i,value:e,params:r}]}t.forEach((function(t){t=n.findFilter(t);if(t){n.filterList.push(t);n.changed=true}}));if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.filter){this.table.modules.persistence.save("filter")}};Q.prototype.findFilter=function(t){var i=this,e;if(Array.isArray(t)){return this.findSubFilters(t)}var r=false;if(typeof t.field=="function"){r=function i(e){return t.field(e,t.type||{})}}else{if(i.filters[t.type]){e=i.table.columnManager.getColumnByField(t.field);if(e){r=function r(n){return i.filters[t.type](t.value,e.getFieldValue(n),n,t.params||{})}}else{r=function e(r){return i.filters[t.type](t.value,r[t.field],r,t.params||{})}}}else{console.warn("Filter Error - No such filter type found, ignoring: ",t.type)}}t.func=r;return t.func?t:false};Q.prototype.findSubFilters=function(t){var i=this,e=[];t.forEach((function(t){t=i.findFilter(t);if(t){e.push(t)}}));return e.length?e:false};Q.prototype.getFilters=function(t,i){var e=[];if(t){e=this.getHeaderFilters()}if(i){e.forEach((function(t){if(typeof t.type=="function"){t.type="function"}}))}e=e.concat(this.filtersToArray(this.filterList,i));return e};Q.prototype.filtersToArray=function(t,i){var e=this;var r=[];t.forEach((function(t){var n;if(Array.isArray(t)){r.push(e.filtersToArray(t,i))}else{n={field:t.field,type:t.type,value:t.value};if(i){if(typeof n.type=="function"){n.type="function"}}r.push(n)}}));return r};Q.prototype.getHeaderFilters=function(){var t=[];for(var i in this.headerFilters){t.push({field:i,type:this.headerFilters[i].type,value:this.headerFilters[i].value})}return t};Q.prototype.removeFilter=function(t,i,e){var r=this;if(!Array.isArray(t)){t=[{field:t,type:i,value:e}]}t.forEach((function(t){var i=-1;if(T(t.field)=="object"){i=r.filterList.findIndex((function(i){return t===i}))}else{i=r.filterList.findIndex((function(i){return t.field===i.field&&t.type===i.type&&t.value===i.value}))}if(i>-1){r.filterList.splice(i,1);r.changed=true}else{console.warn("Filter Error - No matching filter type found, ignoring: ",t.type)}}));if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.filter){this.table.modules.persistence.save("filter")}};Q.prototype.clearFilter=function(t){this.filterList=[];if(t){this.clearHeaderFilter()}this.changed=true;if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.filter){this.table.modules.persistence.save("filter")}};Q.prototype.clearHeaderFilter=function(){var t=this;this.headerFilters={};t.prevHeaderFilterChangeCheck="{}";this.headerFilterColumns.forEach((function(i){if(typeof i.modules.filter.value!=="undefined"){delete i.modules.filter.value}i.modules.filter.prevSuccess=undefined;t.reloadHeaderFilter(i)}));this.changed=true};Q.prototype.search=function(t,i,e,r){var n=this,o=[],s=[];if(!Array.isArray(i)){i=[{field:i,type:e,value:r}]}i.forEach((function(t){t=n.findFilter(t);if(t){s.push(t)}}));this.table.rowManager.rows.forEach((function(i){var e=true;s.forEach((function(t){if(!n.filterRecurse(t,i.getData())){e=false}}));if(e){o.push(t==="data"?i.getData("data"):i.getComponent())}}));return o};Q.prototype.filter=function(t,i){var e=this,r=[],n=[];if(e.table.options.dataFiltering){e.table.options.dataFiltering.call(e.table,e.getFilters())}if(!e.table.options.ajaxFiltering&&(e.filterList.length||Object.keys(e.headerFilters).length)){t.forEach((function(t){if(e.filterRow(t)){r.push(t)}}))}else{r=t.slice(0)}if(e.table.options.dataFiltered){r.forEach((function(t){n.push(t.getComponent())}));e.table.options.dataFiltered.call(e.table,e.getFilters(),n)}return r};Q.prototype.filterRow=function(t,i){var e=this,r=true,n=t.getData();e.filterList.forEach((function(t){if(!e.filterRecurse(t,n)){r=false}}));for(var o in e.headerFilters){if(!e.headerFilters[o].func(n)){r=false}}return r};Q.prototype.filterRecurse=function(t,i){var e=this,r=false;if(Array.isArray(t)){t.forEach((function(t){if(e.filterRecurse(t,i)){r=true}}))}else{r=t.func(i)}return r};Q.prototype.filters={"=":function t(i,e,r,n){return e==i?true:false},"<":function t(i,e,r,n){return e<i?true:false},"<=":function t(i,e,r,n){return e<=i?true:false},">":function t(i,e,r,n){return e>i?true:false},">=":function t(i,e,r,n){return e>=i?true:false},"!=":function t(i,e,r,n){return e!=i?true:false},regex:function t(i,e,r,n){if(typeof i=="string"){i=new RegExp(i)}return i.test(e)},like:function t(i,e,r,n){if(i===null||typeof i==="undefined"){return e===i?true:false}else{if(typeof e!=="undefined"&&e!==null){return String(e).toLowerCase().indexOf(i.toLowerCase())>-1}else{return false}}},keywords:function t(i,e,r,n){var t=i.toLowerCase().split(typeof n.separator==="undefined"?" ":n.separator),o=String(e===null||typeof e==="undefined"?"":e).toLowerCase(),s=[];t.forEach((function(t){if(o.includes(t)){s.push(true)}}));return n.matchAll?s.length===t.length:!!s.length},starts:function t(i,e,r,n){if(i===null||typeof i==="undefined"){return e===i?true:false}else{if(typeof e!=="undefined"&&e!==null){return String(e).toLowerCase().startsWith(i.toLowerCase())}else{return false}}},ends:function t(i,e,r,n){if(i===null||typeof i==="undefined"){return e===i?true:false}else{if(typeof e!=="undefined"&&e!==null){return String(e).toLowerCase().endsWith(i.toLowerCase())}else{return false}}},in:function t(i,e,r,n){if(Array.isArray(i)){return i.length?i.indexOf(e)>-1:true}else{console.warn("Filter Error - filter value is not an array:",i);return false}}};H.prototype.registerModule("filter",Q);var tt=function t(i){this.table=i};tt.prototype.initializeColumn=function(t){t.modules.format=this.lookupFormatter(t,"");if(typeof t.definition.formatterPrint!=="undefined"){t.modules.format.print=this.lookupFormatter(t,"Print")}if(typeof t.definition.formatterClipboard!=="undefined"){t.modules.format.clipboard=this.lookupFormatter(t,"Clipboard")}if(typeof t.definition.formatterHtmlOutput!=="undefined"){t.modules.format.htmlOutput=this.lookupFormatter(t,"HtmlOutput")}};tt.prototype.lookupFormatter=function(t,i){var e={params:t.definition["formatter"+i+"Params"]||{}},r=t.definition["formatter"+i];switch(typeof r==="undefined"?"undefined":T(r)){case"string":if(r==="tick"){r="tickCross";if(typeof e.params.crossElement=="undefined"){e.params.crossElement=false}console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")}if(this.formatters[r]){e.formatter=this.formatters[r]}else{console.warn("Formatter Error - No such formatter found: ",r);e.formatter=this.formatters.plaintext}break;case"function":e.formatter=r;break;default:e.formatter=this.formatters.plaintext;break}return e};tt.prototype.cellRendered=function(t){if(t.modules.format&&t.modules.format.renderedCallback&&!t.modules.format.rendered){t.modules.format.renderedCallback();t.modules.format.rendered=true}};tt.prototype.formatValue=function(t){var i=t.getComponent(),e=typeof t.column.modules.format.params==="function"?t.column.modules.format.params(i):t.column.modules.format.params;function r(i){if(!t.modules.format){t.modules.format={}}t.modules.format.renderedCallback=i;t.modules.format.rendered=false}return t.column.modules.format.formatter.call(this,i,e,r)};tt.prototype.formatExportValue=function(t,i){var e=t.column.modules.format[i],r;if(e){var n=function i(e){if(!t.modules.format){t.modules.format={}}t.modules.format.renderedCallback=e;t.modules.format.rendered=false};r=typeof e.params==="function"?e.params(component):e.params;return e.formatter.call(this,t.getComponent(),r,n)}else{return this.formatValue(t)}};tt.prototype.sanitizeHTML=function(t){if(t){var i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(t).replace(/[&<>"'`=\/]/g,(function(t){return i[t]}))}else{return t}};tt.prototype.emptyToSpace=function(t){return t===null||typeof t==="undefined"||t===""?"&nbsp;":t};tt.prototype.getFormatter=function(t){var t;switch(typeof t==="undefined"?"undefined":T(t)){case"string":if(this.formatters[t]){t=this.formatters[t]}else{console.warn("Formatter Error - No such formatter found: ",t);t=this.formatters.plaintext}break;case"function":t=t;break;default:t=this.formatters.plaintext;break}return t};tt.prototype.formatters={plaintext:function t(i,e,r){return this.emptyToSpace(this.sanitizeHTML(i.getValue()))},html:function t(i,e,r){return i.getValue()},textarea:function t(i,e,r){i.getElement().style.whiteSpace="pre-wrap";return this.emptyToSpace(this.sanitizeHTML(i.getValue()))},money:function t(i,e,r){var n=parseFloat(i.getValue()),o,s,a,u;var l=e.decimal||".";var f=e.thousand||",";var h=e.symbol||"";var c=!!e.symbolAfter;var d=typeof e.precision!=="undefined"?e.precision:2;if(isNaN(n)){return this.emptyToSpace(this.sanitizeHTML(i.getValue()))}o=d!==false?n.toFixed(d):n;o=String(o).split(".");s=o[0];a=o.length>1?l+o[1]:"";u=/(\d+)(\d{3})/;while(u.test(s)){s=s.replace(u,"$1"+f+"$2")}return c?s+a+h:h+s+a},link:function t(i,e,r){var n=i.getValue(),o=e.urlPrefix||"",s=e.download,a=n,u=document.createElement("a"),l;if(e.labelField){l=i.getData();a=l[e.labelField]}if(e.label){switch(T(e.label)){case"string":a=e.label;break;case"function":a=e.label(i);break}}if(a){if(e.urlField){l=i.getData();n=l[e.urlField]}if(e.url){switch(T(e.url)){case"string":n=e.url;break;case"function":n=e.url(i);break}}u.setAttribute("href",o+n);if(e.target){u.setAttribute("target",e.target)}if(e.download){if(typeof s=="function"){s=s(i)}else{s=s===true?"":s}u.setAttribute("download",s)}u.innerHTML=this.emptyToSpace(this.sanitizeHTML(a));return u}else{return"&nbsp;"}},image:function t(i,e,r){var n=document.createElement("img"),o=i.getValue();if(e.urlPrefix){o=e.urlPrefix+i.getValue()}if(e.urlSuffix){o=o+e.urlSuffix}n.setAttribute("src",o);switch(T(e.height)){case"number":n.style.height=e.height+"px";break;case"string":n.style.height=e.height;break}switch(T(e.width)){case"number":n.style.width=e.width+"px";break;case"string":n.style.width=e.width;break}n.addEventListener("load",(function(){i.getRow().normalizeHeight()}));return n},tickCross:function t(i,e,r){var n=i.getValue(),o=i.getElement(),s=e.allowEmpty,a=e.allowTruthy,u=typeof e.tickElement!=="undefined"?e.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',l=typeof e.crossElement!=="undefined"?e.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';if(a&&n||n===true||n==="true"||n==="True"||n===1||n==="1"){o.setAttribute("aria-checked",true);return u||""}else{if(s&&(n==="null"||n===""||n===null||typeof n==="undefined")){o.setAttribute("aria-checked","mixed");return""}else{o.setAttribute("aria-checked",false);return l||""}}},datetime:function t(i,e,r){var n=e.inputFormat||"YYYY-MM-DD hh:mm:ss";var o=e.outputFormat||"DD/MM/YYYY hh:mm:ss";var s=typeof e.invalidPlaceholder!=="undefined"?e.invalidPlaceholder:"";var a=i.getValue();var u=moment(a,n);if(u.isValid()){return e.timezone?u.tz(e.timezone).format(o):u.format(o)}else{if(s===true){return a}else if(typeof s==="function"){return s(a)}else{return s}}},datetimediff:function t(i,e,r){var n=e.inputFormat||"YYYY-MM-DD hh:mm:ss";var o=typeof e.invalidPlaceholder!=="undefined"?e.invalidPlaceholder:"";var s=typeof e.suffix!=="undefined"?e.suffix:false;var a=typeof e.unit!=="undefined"?e.unit:undefined;var u=typeof e.humanize!=="undefined"?e.humanize:false;var l=typeof e.date!=="undefined"?e.date:moment();var f=i.getValue();var h=moment(f,n);if(h.isValid()){if(u){return moment.duration(h.diff(l)).humanize(s)}else{return h.diff(l,a)+(s?" "+s:"")}}else{if(o===true){return f}else if(typeof o==="function"){return o(f)}else{return o}}},lookup:function t(i,e,r){var n=i.getValue();if(typeof e[n]==="undefined"){console.warn("Missing display value for "+n);return n}return e[n]},star:function t(i,e,r){var n=i.getValue(),o=i.getElement(),s=e&&e.stars?e.stars:5,a=document.createElement("span"),t=document.createElementNS("http://www.w3.org/2000/svg","svg"),u='<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',l='<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>';a.style.verticalAlign="middle";t.setAttribute("width","14");t.setAttribute("height","14");t.setAttribute("viewBox","0 0 512 512");t.setAttribute("xml:space","preserve");t.style.padding="0 1px";n=n&&!isNaN(n)?parseInt(n):0;n=Math.max(0,Math.min(n,s));for(var f=1;f<=s;f++){var h=t.cloneNode(true);h.innerHTML=f<=n?u:l;a.appendChild(h)}o.style.whiteSpace="nowrap";o.style.overflow="hidden";o.style.textOverflow="ellipsis";o.setAttribute("aria-label",n);return a},traffic:function t(i,e,r){var n=this.sanitizeHTML(i.getValue())||0,o=document.createElement("span"),s=e&&e.max?e.max:100,a=e&&e.min?e.min:0,u=e&&typeof e.color!=="undefined"?e.color:["red","orange","green"],l="#666666",f,h;if(isNaN(n)||typeof i.getValue()==="undefined"){return}o.classList.add("tabulator-traffic-light");h=parseFloat(n)<=s?parseFloat(n):s;h=parseFloat(h)>=a?parseFloat(h):a;f=(s-a)/100;h=Math.round((h-a)/f);switch(typeof u==="undefined"?"undefined":T(u)){case"string":l=u;break;case"function":l=u(n);break;case"object":if(Array.isArray(u)){var c=100/u.length;var d=Math.floor(h/c);d=Math.min(d,u.length-1);d=Math.max(d,0);l=u[d];break}}o.style.backgroundColor=l;return o},progress:function t(i,e,r){var n=this.sanitizeHTML(i.getValue())||0,o=i.getElement(),s=e&&e.max?e.max:100,a=e&&e.min?e.min:0,u=e&&e.legendAlign?e.legendAlign:"center",l,f,h,c,d;f=parseFloat(n)<=s?parseFloat(n):s;f=parseFloat(f)>=a?parseFloat(f):a;l=(s-a)/100;f=Math.round((f-a)/l);switch(T(e.color)){case"string":h=e.color;break;case"function":h=e.color(n);break;case"object":if(Array.isArray(e.color)){var b=100/e.color.length;var p=Math.floor(f/b);p=Math.min(p,e.color.length-1);p=Math.max(p,0);h=e.color[p];break}default:h="#2DC214"}switch(T(e.legend)){case"string":c=e.legend;break;case"function":c=e.legend(n);break;case"boolean":c=n;break;default:c=false}switch(T(e.legendColor)){case"string":d=e.legendColor;break;case"function":d=e.legendColor(n);break;case"object":if(Array.isArray(e.legendColor)){var b=100/e.legendColor.length;var p=Math.floor(f/b);p=Math.min(p,e.legendColor.length-1);p=Math.max(p,0);d=e.legendColor[p]}break;default:d="#000"}o.style.minWidth="30px";o.style.position="relative";o.setAttribute("aria-label",f);var v=document.createElement("div");v.style.display="inline-block";v.style.position="relative";v.style.width=f+"%";v.style.backgroundColor=h;v.style.height="100%";v.setAttribute("data-max",s);v.setAttribute("data-min",a);if(c){var m=document.createElement("div");m.style.position="absolute";m.style.top="4px";m.style.left=0;m.style.textAlign=u;m.style.width="100%";m.style.color=d;m.innerHTML=c}r((function(){if(!(i instanceof F)){var t=document.createElement("div");t.style.position="absolute";t.style.top="4px";t.style.bottom="4px";t.style.left="4px";t.style.right="4px";o.appendChild(t);o=t}o.appendChild(v);if(c){o.appendChild(m)}}));return""},color:function t(i,e,r){i.getElement().style.backgroundColor=this.sanitizeHTML(i.getValue());return""},buttonTick:function t(i,e,r){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'},buttonCross:function t(i,e,r){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'},rownum:function t(i,e,r){return this.table.rowManager.activeRows.indexOf(i.getRow()._getSelf())+1},handle:function t(i,e,r){i.getElement().classList.add("tabulator-row-handle");return"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"},responsiveCollapse:function t(i,e,r){var n=document.createElement("div"),o=i.getRow()._row.modules.responsiveLayout;n.classList.add("tabulator-responsive-collapse-toggle");n.innerHTML="<span class='tabulator-responsive-collapse-toggle-open'>+</span><span class='tabulator-responsive-collapse-toggle-close'>-</span>";i.getElement().classList.add("tabulator-row-handle");function s(t){var i=o.element;o.open=t;if(i){if(o.open){n.classList.add("open");i.style.display=""}else{n.classList.remove("open");i.style.display="none"}}}n.addEventListener("click",(function(t){t.stopImmediatePropagation();s(!o.open)}));s(o.open);return n},rowSelection:function t(i,e,r){var n=this;var o=document.createElement("input");o.type="checkbox";if(this.table.modExists("selectRow",true)){o.addEventListener("click",(function(t){t.stopPropagation()}));if(typeof i.getRow=="function"){var s=i.getRow();if(s instanceof O){o.addEventListener("change",(function(t){s.toggleSelect()}));o.checked=s.isSelected&&s.isSelected();this.table.modules.selectRow.registerRowSelectCheckbox(s,o)}else{o=""}}else{o.addEventListener("change",(function(t){if(n.table.modules.selectRow.selectedRows.length){n.table.deselectRow()}else{n.table.selectRow(e.rowRange)}}));this.table.modules.selectRow.registerHeaderSelectCheckbox(o)}}return o}};H.prototype.registerModule("format",tt);var it=function t(i){this.table=i;this.leftColumns=[];this.rightColumns=[];this.leftMargin=0;this.rightMargin=0;this.rightPadding=0;this.initializationMode="left";this.active=false;this.scrollEndTimer=false};it.prototype.reset=function(){this.initializationMode="left";this.leftColumns=[];this.rightColumns=[];this.leftMargin=0;this.rightMargin=0;this.rightMargin=0;this.active=false;this.table.columnManager.headersElement.style.marginLeft=0;this.table.columnManager.element.style.paddingRight=0};it.prototype.initializeColumn=function(t){var i={margin:0,edge:false};if(!t.isGroup){if(this.frozenCheck(t)){i.position=this.initializationMode;if(this.initializationMode=="left"){this.leftColumns.push(t)}else{this.rightColumns.unshift(t)}this.active=true;t.modules.frozen=i}else{this.initializationMode="right"}}};it.prototype.frozenCheck=function(t){if(t.parent.isGroup&&t.definition.frozen){console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups")}if(t.parent.isGroup){return this.frozenCheck(t.parent)}else{return t.definition.frozen}};it.prototype.scrollHorizontal=function(){var t=this;var i;if(this.active){clearTimeout(this.scrollEndTimer);this.scrollEndTimer=setTimeout((function(){t.layout()}),100);i=this.table.rowManager.getVisibleRows();this.calcMargins();this.layoutColumnPosition();this.layoutCalcRows();i.forEach((function(i){if(i.type==="row"){t.layoutRow(i)}}));this.table.rowManager.tableElement.style.marginRight=this.rightMargin}};it.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px";this.table.columnManager.headersElement.style.marginLeft=this.leftMargin;this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px";this.table.columnManager.element.style.paddingRight=this.rightMargin;this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft};it.prototype.layoutCalcRows=function(){if(this.table.modExists("columnCalcs")){if(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow){this.layoutRow(this.table.modules.columnCalcs.topRow)}if(this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow){this.layoutRow(this.table.modules.columnCalcs.botRow)}}};it.prototype.layoutColumnPosition=function(t){var i=this;var e=[];this.leftColumns.forEach((function(r,n){r.modules.frozen.margin=i._calcSpace(i.leftColumns,n)+i.table.columnManager.scrollLeft+"px";if(n==i.leftColumns.length-1){r.modules.frozen.edge=true}else{r.modules.frozen.edge=false}if(r.parent.isGroup){var o=i.getColGroupParentElement(r);if(!e.includes(o)){i.layoutElement(o,r);e.push(o)}if(r.modules.frozen.edge){o.classList.add("tabulator-frozen-"+r.modules.frozen.position)}}else{i.layoutElement(r.getElement(),r)}if(t){r.cells.forEach((function(t){i.layoutElement(t.getElement(true),r)}))}}));this.rightColumns.forEach((function(e,r){e.modules.frozen.margin=i.rightPadding-i._calcSpace(i.rightColumns,r+1)+"px";if(r==i.rightColumns.length-1){e.modules.frozen.edge=true}else{e.modules.frozen.edge=false}if(e.parent.isGroup){i.layoutElement(i.getColGroupParentElement(e),e)}else{i.layoutElement(e.getElement(),e)}if(t){e.cells.forEach((function(t){i.layoutElement(t.getElement(true),e)}))}}))};it.prototype.getColGroupParentElement=function(t){return t.parent.isGroup?this.getColGroupParentElement(t.parent):t.getElement()};it.prototype.layout=function(){var t=this;if(t.active){this.calcMargins();t.table.rowManager.getDisplayRows().forEach((function(i){if(i.type==="row"){t.layoutRow(i)}}));this.layoutCalcRows();this.layoutColumnPosition(true);this.table.rowManager.tableElement.style.marginRight=this.rightMargin}};it.prototype.layoutRow=function(t){var i=this;var e=t.getElement();e.style.paddingLeft=this.leftMargin;this.leftColumns.forEach((function(e){var r=t.getCell(e);if(r){i.layoutElement(r.getElement(true),e)}}));this.rightColumns.forEach((function(e){var r=t.getCell(e);if(r){i.layoutElement(r.getElement(true),e)}}))};it.prototype.layoutElement=function(t,i){if(i.modules.frozen){t.style.position="absolute";t.style.left=i.modules.frozen.margin;t.classList.add("tabulator-frozen");if(i.modules.frozen.edge){t.classList.add("tabulator-frozen-"+i.modules.frozen.position)}}};it.prototype._calcSpace=function(t,i){var e=0;for(var r=0;r<i;r++){if(t[r].visible){e+=t[r].getWidth()}}return e};H.prototype.registerModule("frozenColumns",it);var et=function t(i){this.table=i;this.topElement=document.createElement("div");this.rows=[];this.displayIndex=0};et.prototype.initialize=function(){this.rows=[];this.topElement.classList.add("tabulator-frozen-rows-holder");this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling)};et.prototype.setDisplayIndex=function(t){this.displayIndex=t};et.prototype.getDisplayIndex=function(){return this.displayIndex};et.prototype.isFrozen=function(){return!!this.rows.length};et.prototype.getRows=function(t){var i=t.slice(0);this.rows.forEach((function(t){var e=i.indexOf(t);if(e>-1){i.splice(e,1)}}));return i};et.prototype.freezeRow=function(t){if(!t.modules.frozen){t.modules.frozen=true;this.topElement.appendChild(t.getElement());t.initialize();t.normalizeHeight();this.table.rowManager.adjustTableSize();this.rows.push(t);this.table.rowManager.refreshActiveData("display");this.styleRows()}else{console.warn("Freeze Error - Row is already frozen")}};et.prototype.unfreezeRow=function(t){this.rows.indexOf(t);if(t.modules.frozen){t.modules.frozen=false;this.detachRow(t);this.table.rowManager.adjustTableSize();this.table.rowManager.refreshActiveData("display");if(this.rows.length){this.styleRows()}}else{console.warn("Freeze Error - Row is already unfrozen")}};et.prototype.detachRow=function(t){var i=this.rows.indexOf(t);if(i>-1){var e=t.getElement();e.parentNode.removeChild(e);this.rows.splice(i,1)}};et.prototype.styleRows=function(t){var i=this;this.rows.forEach((function(t,e){i.table.rowManager.styleRow(t,e)}))};H.prototype.registerModule("frozenRows",et);var rt=function t(i){this._group=i;this.type="GroupComponent"};rt.prototype.getKey=function(){return this._group.key};rt.prototype.getField=function(){return this._group.field};rt.prototype.getElement=function(){return this._group.element};rt.prototype.getRows=function(){return this._group.getRows(true)};rt.prototype.getSubGroups=function(){return this._group.getSubGroups(true)};rt.prototype.getParentGroup=function(){return this._group.parent?this._group.parent.getComponent():false};rt.prototype.getVisibility=function(){console.warn("getVisibility function is deprecated, you should now use the isVisible function");return this._group.visible};rt.prototype.isVisible=function(){return this._group.visible};rt.prototype.show=function(){this._group.show()};rt.prototype.hide=function(){this._group.hide()};rt.prototype.toggle=function(){this._group.toggleVisibility()};rt.prototype._getSelf=function(){return this._group};rt.prototype.getTable=function(){return this._group.groupManager.table};var nt=function t(i,e,r,n,o,s,a){this.groupManager=i;this.parent=e;this.key=n;this.level=r;this.field=o;this.hasSubGroups=r<i.groupIDLookups.length-1;this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow;this.type="group";this.old=a;this.rows=[];this.groups=[];this.groupList=[];this.generator=s;this.elementContents=false;this.height=0;this.outerHeight=0;this.initialized=false;this.calcs={};this.initialized=false;this.modules={};this.arrowElement=false;this.visible=a?a.visible:typeof i.startOpen[r]!=="undefined"?i.startOpen[r]:i.startOpen[0];this.component=null;this.createElements();this.addBindings();this.createValueGroups()};nt.prototype.wipe=function(){if(this.groupList.length){this.groupList.forEach((function(t){t.wipe()}))}else{this.element=false;this.arrowElement=false;this.elementContents=false}};nt.prototype.createElements=function(){var t=document.createElement("div");t.classList.add("tabulator-arrow");this.element=document.createElement("div");this.element.classList.add("tabulator-row");this.element.classList.add("tabulator-group");this.element.classList.add("tabulator-group-level-"+this.level);this.element.setAttribute("role","rowgroup");this.arrowElement=document.createElement("div");this.arrowElement.classList.add("tabulator-group-toggle");this.arrowElement.appendChild(t);if(this.groupManager.table.options.movableRows!==false&&this.groupManager.table.modExists("moveRow")){this.groupManager.table.modules.moveRow.initializeGroupHeader(this)}};nt.prototype.createValueGroups=function(){var t=this;var i=this.level+1;if(this.groupManager.allowedValues&&this.groupManager.allowedValues[i]){this.groupManager.allowedValues[i].forEach((function(e){t._createGroup(e,i)}))}};nt.prototype.addBindings=function(){var t=this,i,e,r,n;if(t.groupManager.table.options.groupClick){t.element.addEventListener("click",(function(i){t.groupManager.table.options.groupClick.call(t.groupManager.table,i,t.getComponent())}))}if(t.groupManager.table.options.groupDblClick){t.element.addEventListener("dblclick",(function(i){t.groupManager.table.options.groupDblClick.call(t.groupManager.table,i,t.getComponent())}))}if(t.groupManager.table.options.groupContext){t.element.addEventListener("contextmenu",(function(i){t.groupManager.table.options.groupContext.call(t.groupManager.table,i,t.getComponent())}))}if((t.groupManager.table.options.groupContextMenu||t.groupManager.table.options.groupClickMenu)&&t.groupManager.table.modExists("menu")){t.groupManager.table.modules.menu.initializeGroup.call(t.groupManager.table.modules.menu,t)}if(t.groupManager.table.options.groupTap){r=false;t.element.addEventListener("touchstart",(function(t){r=true}),{passive:true});t.element.addEventListener("touchend",(function(i){if(r){t.groupManager.table.options.groupTap(i,t.getComponent())}r=false}))}if(t.groupManager.table.options.groupDblTap){i=null;t.element.addEventListener("touchend",(function(e){if(i){clearTimeout(i);i=null;t.groupManager.table.options.groupDblTap(e,t.getComponent())}else{i=setTimeout((function(){clearTimeout(i);i=null}),300)}}))}if(t.groupManager.table.options.groupTapHold){e=null;t.element.addEventListener("touchstart",(function(i){clearTimeout(e);e=setTimeout((function(){clearTimeout(e);e=null;r=false;t.groupManager.table.options.groupTapHold(i,t.getComponent())}),1e3)}),{passive:true});t.element.addEventListener("touchend",(function(t){clearTimeout(e);e=null}))}if(t.groupManager.table.options.groupToggleElement){n=t.groupManager.table.options.groupToggleElement=="arrow"?t.arrowElement:t.element;n.addEventListener("click",(function(i){i.stopPropagation();i.stopImmediatePropagation();t.toggleVisibility()}))}};nt.prototype._createGroup=function(t,i){var e=i+"_"+t;var r=new nt(this.groupManager,this,i,t,this.groupManager.groupIDLookups[i].field,this.groupManager.headerGenerator[i]||this.groupManager.headerGenerator[0],this.old?this.old.groups[e]:false);this.groups[e]=r;this.groupList.push(r)};nt.prototype._addRowToGroup=function(t){var i=this.level+1;if(this.hasSubGroups){var e=this.groupManager.groupIDLookups[i].func(t.getData()),r=i+"_"+e;if(this.groupManager.allowedValues&&this.groupManager.allowedValues[i]){if(this.groups[r]){this.groups[r].addRow(t)}}else{if(!this.groups[r]){this._createGroup(e,i)}this.groups[r].addRow(t)}}};nt.prototype._addRow=function(t){this.rows.push(t);t.modules.group=this};nt.prototype.insertRow=function(t,i,e){var r=this.conformRowData({});t.updateData(r);var n=this.rows.indexOf(i);if(n>-1){if(e){this.rows.splice(n+1,0,t)}else{this.rows.splice(n,0,t)}}else{if(e){this.rows.push(t)}else{this.rows.unshift(t)}}t.modules.group=this;this.generateGroupHeaderContents();if(this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"){this.groupManager.table.modules.columnCalcs.recalcGroup(this)}this.groupManager.updateGroupRows(true)};nt.prototype.scrollHeader=function(t){this.arrowElement.style.marginLeft=t;this.groupList.forEach((function(i){i.scrollHeader(t)}))};nt.prototype.getRowIndex=function(t){};nt.prototype.conformRowData=function(t){if(this.field){t[this.field]=this.key}else{console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function")}if(this.parent){t=this.parent.conformRowData(t)}return t};nt.prototype.removeRow=function(t){var i=this.rows.indexOf(t);var e=t.getElement();if(i>-1){this.rows.splice(i,1)}if(!this.groupManager.table.options.groupValues&&!this.rows.length){if(this.parent){this.parent.removeGroup(this)}else{this.groupManager.removeGroup(this)}this.groupManager.updateGroupRows(true)}else{if(e.parentNode){e.parentNode.removeChild(e)}this.generateGroupHeaderContents();if(this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"){this.groupManager.table.modules.columnCalcs.recalcGroup(this)}}};nt.prototype.removeGroup=function(t){var i=t.level+"_"+t.key,e;if(this.groups[i]){delete this.groups[i];e=this.groupList.indexOf(t);if(e>-1){this.groupList.splice(e,1)}if(!this.groupList.length){if(this.parent){this.parent.removeGroup(this)}else{this.groupManager.removeGroup(this)}}}};nt.prototype.getHeadersAndRows=function(t){var i=[];i.push(this);this._visSet();if(this.visible){if(this.groupList.length){this.groupList.forEach((function(e){i=i.concat(e.getHeadersAndRows(t))}))}else{if(!t&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()){if(this.calcs.top){this.calcs.top.detachElement();this.calcs.top.deleteCells()}this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);i.push(this.calcs.top)}i=i.concat(this.rows);if(!t&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){if(this.calcs.bottom){this.calcs.bottom.detachElement();this.calcs.bottom.deleteCells()}this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);i.push(this.calcs.bottom)}}}else{if(!this.groupList.length&&this.groupManager.table.options.columnCalcs!="table"){if(this.groupManager.table.modExists("columnCalcs")){if(!t&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()){if(this.calcs.top){this.calcs.top.detachElement();this.calcs.top.deleteCells()}if(this.groupManager.table.options.groupClosedShowCalcs){this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);i.push(this.calcs.top)}}if(!t&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){if(this.calcs.bottom){this.calcs.bottom.detachElement();this.calcs.bottom.deleteCells()}if(this.groupManager.table.options.groupClosedShowCalcs){this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);i.push(this.calcs.bottom)}}}}}return i};nt.prototype.getData=function(t,i){var e=[];this._visSet();if(!t||t&&this.visible){this.rows.forEach((function(t){e.push(t.getData(i||"data"))}))}return e};nt.prototype.getRowCount=function(){var t=0;if(this.groupList.length){this.groupList.forEach((function(i){t+=i.getRowCount()}))}else{t=this.rows.length}return t};nt.prototype.toggleVisibility=function(){if(this.visible){this.hide()}else{this.show()}};nt.prototype.hide=function(){this.visible=false;if(this.groupManager.table.rowManager.getRenderMode()=="classic"&&!this.groupManager.table.options.pagination){this.element.classList.remove("tabulator-group-visible");if(this.groupList.length){this.groupList.forEach((function(t){var i=t.getHeadersAndRows();i.forEach((function(t){t.detachElement()}))}))}else{this.rows.forEach((function(t){var i=t.getElement();i.parentNode.removeChild(i)}))}this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex());this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}else{this.groupManager.updateGroupRows(true)}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),false)};nt.prototype.show=function(){var t=this;t.visible=true;if(this.groupManager.table.rowManager.getRenderMode()=="classic"&&!this.groupManager.table.options.pagination){this.element.classList.add("tabulator-group-visible");var i=t.getElement();if(this.groupList.length){this.groupList.forEach((function(t){var e=t.getHeadersAndRows();e.forEach((function(t){var e=t.getElement();i.parentNode.insertBefore(e,i.nextSibling);t.initialize();i=e}))}))}else{t.rows.forEach((function(t){var e=t.getElement();i.parentNode.insertBefore(e,i.nextSibling);t.initialize();i=e}))}this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex());this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}else{this.groupManager.updateGroupRows(true)}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),true)};nt.prototype._visSet=function(){var t=[];if(typeof this.visible=="function"){this.rows.forEach((function(i){t.push(i.getData())}));this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent())}};nt.prototype.getRowGroup=function(t){var i=false;if(this.groupList.length){this.groupList.forEach((function(e){var r=e.getRowGroup(t);if(r){i=r}}))}else{if(this.rows.find((function(i){return i===t}))){i=this}}return i};nt.prototype.getSubGroups=function(t){var i=[];this.groupList.forEach((function(e){i.push(t?e.getComponent():e)}));return i};nt.prototype.getRows=function(t){var i=[];this.rows.forEach((function(e){i.push(t?e.getComponent():e)}));return i};nt.prototype.generateGroupHeaderContents=function(){var t=[];this.rows.forEach((function(i){t.push(i.getData())}));this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());while(this.element.firstChild){this.element.removeChild(this.element.firstChild)}if(typeof this.elementContents==="string"){this.element.innerHTML=this.elementContents}else{this.element.appendChild(this.elementContents)}this.element.insertBefore(this.arrowElement,this.element.firstChild)};nt.prototype.getPath=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];t.unshift(this.key);if(this.parent){this.parent.getPath(t)}return t};nt.prototype.getElement=function(){this.addBindingsd=false;this._visSet();if(this.visible){this.element.classList.add("tabulator-group-visible")}else{this.element.classList.remove("tabulator-group-visible")}for(var t=0;t<this.element.childNodes.length;++t){this.element.childNodes[t].parentNode.removeChild(this.element.childNodes[t])}this.generateGroupHeaderContents();return this.element};nt.prototype.detachElement=function(){if(this.element&&this.element.parentNode){this.element.parentNode.removeChild(this.element)}};nt.prototype.normalizeHeight=function(){this.setHeight(this.element.clientHeight)};nt.prototype.initialize=function(t){if(!this.initialized||t){this.normalizeHeight();this.initialized=true}};nt.prototype.reinitialize=function(){this.initialized=false;this.height=0;if(H.prototype.helpers.elVisible(this.element)){this.initialize(true)}};nt.prototype.setHeight=function(t){if(this.height!=t){this.height=t;this.outerHeight=this.element.offsetHeight}};nt.prototype.getHeight=function(){return this.outerHeight};nt.prototype.getGroup=function(){return this};nt.prototype.reinitializeHeight=function(){};nt.prototype.calcHeight=function(){};nt.prototype.setCellHeight=function(){};nt.prototype.clearCellHeight=function(){};nt.prototype.getComponent=function(){if(!this.component){this.component=new rt(this)}return this.component};var ot=function t(i){this.table=i;this.groupIDLookups=false;this.startOpen=[function(){return false}];this.headerGenerator=[function(){return""}];this.groupList=[];this.allowedValues=false;this.groups={};this.displayIndex=0};ot.prototype.initialize=function(){var t=this,i=t.table.options.groupBy,e=t.table.options.groupStartOpen,r=t.table.options.groupHeader;this.allowedValues=t.table.options.groupValues;if(Array.isArray(i)&&Array.isArray(r)&&i.length>r.length){console.warn("Error creating group headers, groupHeader array is shorter than groupBy array")}t.headerGenerator=[function(){return""}];this.startOpen=[function(){return false}];t.table.modules.localize.bind("groups|item",(function(i,e){t.headerGenerator[0]=function(t,r,n){return(typeof t==="undefined"?"":t)+"<span>("+r+" "+(r===1?i:e.groups.items)+")</span>"}}));this.groupIDLookups=[];if(Array.isArray(i)||i){if(this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="table"&&this.table.options.columnCalcs!="both"){this.table.modules.columnCalcs.removeCalcs()}}else{if(this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="group"){var n=this.table.columnManager.getRealColumns();n.forEach((function(i){if(i.definition.topCalc){t.table.modules.columnCalcs.initializeTopRow()}if(i.definition.bottomCalc){t.table.modules.columnCalcs.initializeBottomRow()}}))}}if(!Array.isArray(i)){i=[i]}i.forEach((function(i,e){var r,n;if(typeof i=="function"){r=i}else{n=t.table.columnManager.getColumnByField(i);if(n){r=function t(i){return n.getFieldValue(i)}}else{r=function t(e){return e[i]}}}t.groupIDLookups.push({field:typeof i==="function"?false:i,func:r,values:t.allowedValues?t.allowedValues[e]:false})}));if(e){if(!Array.isArray(e)){e=[e]}e.forEach((function(t){}));t.startOpen=e}if(r){t.headerGenerator=Array.isArray(r)?r:[r]}this.initialized=true};ot.prototype.setDisplayIndex=function(t){this.displayIndex=t};ot.prototype.getDisplayIndex=function(){return this.displayIndex};ot.prototype.getRows=function(t){if(this.groupIDLookups.length){this.table.options.dataGrouping.call(this.table);this.generateGroups(t);if(this.table.options.dataGrouped){this.table.options.dataGrouped.call(this.table,this.getGroups(true))}return this.updateGroupRows()}else{return t.slice(0)}};ot.prototype.getGroups=function(t){var i=[];this.groupList.forEach((function(e){i.push(t?e.getComponent():e)}));return i};ot.prototype.getChildGroups=function(t){var i=this;var e=[];if(!t){t=this}t.groupList.forEach((function(t){if(t.groupList.length){e=e.concat(i.getChildGroups(t))}else{e.push(t)}}));return e};ot.prototype.wipe=function(){this.groupList.forEach((function(t){t.wipe()}))};ot.prototype.pullGroupListData=function(t){var i=this;var e=[];t.forEach((function(t){var r={};r.level=0;r.rowCount=0;r.headerContent="";var n=[];if(t.hasSubGroups){n=i.pullGroupListData(t.groupList);r.level=t.level;r.rowCount=n.length-t.groupList.length;r.headerContent=t.generator(t.key,r.rowCount,t.rows,t);e.push(r);e=e.concat(n)}else{r.level=t.level;r.headerContent=t.generator(t.key,t.rows.length,t.rows,t);r.rowCount=t.getRows().length;e.push(r);t.getRows().forEach((function(t){e.push(t.getData("data"))}))}}));return e};ot.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)};ot.prototype.getRowGroup=function(t){var i=false;this.groupList.forEach((function(e){var r=e.getRowGroup(t);if(r){i=r}}));return i};ot.prototype.countGroups=function(){return this.groupList.length};ot.prototype.generateGroups=function(t){var i=this,e=i.groups;i.groups={};i.groupList=[];if(this.allowedValues&&this.allowedValues[0]){this.allowedValues[0].forEach((function(t){i.createGroup(t,0,e)}));t.forEach((function(t){i.assignRowToExistingGroup(t,e)}))}else{t.forEach((function(t){i.assignRowToGroup(t,e)}))}};ot.prototype.createGroup=function(t,i,e){var r=i+"_"+t,n;e=e||[];n=new nt(this,false,i,t,this.groupIDLookups[0].field,this.headerGenerator[0],e[r]);this.groups[r]=n;this.groupList.push(n)};ot.prototype.assignRowToExistingGroup=function(t,i){var e=this.groupIDLookups[0].func(t.getData()),r="0_"+e;if(this.groups[r]){this.groups[r].addRow(t)}};ot.prototype.assignRowToGroup=function(t,i){var e=this.groupIDLookups[0].func(t.getData()),r=!this.groups["0_"+e];if(r){this.createGroup(e,0,i)}this.groups["0_"+e].addRow(t);return!r};ot.prototype.reassignRowToGroup=function(t){var i=t.getGroup(),e=i.getPath(),r=this.getExpectedPath(t),n=true;var n=e.length==r.length&&e.every((function(t,i){return t===r[i]}));if(!n){i.removeRow(t);this.assignRowToGroup(t,self.groups);this.table.rowManager.refreshActiveData("group",false,true)}};ot.prototype.getExpectedPath=function(t){var i=[],e=t.getData();this.groupIDLookups.forEach((function(t){i.push(t.func(e))}));return i};ot.prototype.updateGroupRows=function(t){var i=this,e=[];i.groupList.forEach((function(t){e=e.concat(t.getHeadersAndRows())}));if(t){var r=i.table.rowManager.setDisplayRows(e,this.getDisplayIndex());if(r!==true){this.setDisplayIndex(r)}i.table.rowManager.refreshActiveData("group",true,true)}return e};ot.prototype.scrollHeaders=function(t){if(this.table.options.virtualDomHoz){t-=this.table.vdomHoz.vDomPadLeft}t=t+"px";this.groupList.forEach((function(i){i.scrollHeader(t)}))};ot.prototype.removeGroup=function(t){var i=t.level+"_"+t.key,e;if(this.groups[i]){delete this.groups[i];e=this.groupList.indexOf(t);if(e>-1){this.groupList.splice(e,1)}}};H.prototype.registerModule("groupRows",ot);var st=function t(i){this.table=i;this.history=[];this.index=-1};st.prototype.clear=function(){this.history=[];this.index=-1};st.prototype.action=function(t,i,e){this.history=this.history.slice(0,this.index+1);this.history.push({type:t,component:i,data:e});this.index++};st.prototype.getHistoryUndoSize=function(){return this.index+1};st.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)};st.prototype.clearComponentHistory=function(t){var i=this.history.findIndex((function(i){return i.component===t}));if(i>-1){this.history.splice(i,1);if(i<=this.index){this.index--}this.clearComponentHistory(t)}};st.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];this.undoers[t.type].call(this,t);this.index--;this.table.options.historyUndo.call(this.table,t.type,t.component.getComponent(),t.data);return true}else{console.warn("History Undo Error - No more history to undo");return false}};st.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];this.redoers[t.type].call(this,t);this.table.options.historyRedo.call(this.table,t.type,t.component.getComponent(),t.data);return true}else{console.warn("History Redo Error - No more history to redo");return false}};st.prototype.undoers={cellEdit:function t(i){i.component.setValueProcessData(i.data.oldValue)},rowAdd:function t(i){i.component.deleteActual()},rowDelete:function t(i){var e=this.table.rowManager.addRowActual(i.data.data,i.data.pos,i.data.index);if(this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.updateGroupRows(true)}this._rebindRow(i.component,e)},rowMove:function t(i){this.table.rowManager.moveRowActual(i.component,this.table.rowManager.rows[i.data.posFrom],!i.data.after);this.table.rowManager.redraw()}};st.prototype.redoers={cellEdit:function t(i){i.component.setValueProcessData(i.data.newValue)},rowAdd:function t(i){var e=this.table.rowManager.addRowActual(i.data.data,i.data.pos,i.data.index);if(this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.updateGroupRows(true)}this._rebindRow(i.component,e)},rowDelete:function t(i){i.component.deleteActual()},rowMove:function t(i){this.table.rowManager.moveRowActual(i.component,this.table.rowManager.rows[i.data.posTo],i.data.after);this.table.rowManager.redraw()}};st.prototype._rebindRow=function(t,i){this.history.forEach((function(e){if(e.component instanceof P){if(e.component===t){e.component=i}}else if(e.component instanceof A){if(e.component.row===t){var r=e.component.column.getField();if(r){e.component=i.getCell(r)}}}}))};H.prototype.registerModule("history",st);var at=function t(i){this.table=i;this.fieldIndex=[];this.hasIndex=false};at.prototype.parseTable=function(){var t=this,i=t.table.element,e=t.table.options,r=i.getElementsByTagName("th"),n=i.getElementsByTagName("tbody")[0],o=[];t.hasIndex=false;t.table.options.htmlImporting.call(this.table);n=n?n.getElementsByTagName("tr"):[];t._extractOptions(i,e);if(r.length){t._extractHeaders(r,n)}else{t._generateBlankHeaders(r,n)}for(var s=0;s<n.length;s++){var a=n[s],u=a.getElementsByTagName("td"),l={};if(!t.hasIndex){l[e.index]=s}for(var f=0;f<u.length;f++){var h=u[f];if(typeof this.fieldIndex[f]!=="undefined"){l[this.fieldIndex[f]]=h.innerHTML}}o.push(l)}var c=document.createElement("div");var d=i.attributes;for(var f in d){if(T(d[f])=="object"){c.setAttribute(d[f].name,d[f].value)}}i.parentNode.replaceChild(c,i);e.data=o;t.table.options.htmlImported.call(this.table);this.table.element=c};at.prototype._extractOptions=function(t,i,e){var r=t.attributes;var n=e?Object.assign([],e):Object.keys(i);var o={};n.forEach((function(t){o[t.toLowerCase()]=t}));for(var s in r){var a=r[s];var u;if(a&&(typeof a==="undefined"?"undefined":T(a))=="object"&&a.name&&a.name.indexOf("tabulator-")===0){u=a.name.replace("tabulator-","");if(typeof o[u]!=="undefined"){i[o[u]]=this._attribValue(a.value)}}}};at.prototype._attribValue=function(t){if(t==="true"){return true}if(t==="false"){return false}return t};at.prototype._findCol=function(t){var i=this.table.options.columns.find((function(i){return i.title===t}));return i||false};at.prototype._extractHeaders=function(t,i){for(var e=0;e<t.length;e++){var r=t[e],n=false,o=this._findCol(r.textContent),s;if(o){n=true}else{o={title:r.textContent.trim()}}if(!o.field){o.field=r.textContent.trim().toLowerCase().replace(" ","_")}s=r.getAttribute("width");if(s&&!o.width){o.width=s}this._extractOptions(r,o,N.prototype.defaultOptionList);this.fieldIndex[e]=o.field;if(o.field==this.table.options.index){this.hasIndex=true}if(!n){this.table.options.columns.push(o)}}};at.prototype._generateBlankHeaders=function(t,i){for(var e=0;e<t.length;e++){var r=t[e],n={title:"",field:"col"+e};this.fieldIndex[e]=n.field;var o=r.getAttribute("width");if(o){n.width=o}this.table.options.columns.push(n)}};H.prototype.registerModule("htmlTableImport",at);var ut=function t(i){this.table=i;this.watchKeys=null;this.pressedKeys=null;this.keyupBinding=false;this.keydownBinding=false};ut.prototype.initialize=function(){var t=this.table.options.keybindings,i={};this.watchKeys={};this.pressedKeys=[];if(t!==false){for(var e in this.bindings){i[e]=this.bindings[e]}if(Object.keys(t).length){for(var r in t){i[r]=t[r]}}this.mapBindings(i);this.bindEvents()}};ut.prototype.mapBindings=function(t){var i=this;var e=this;var r=function r(n){if(i.actions[n]){if(t[n]){if(T(t[n])!=="object"){t[n]=[t[n]]}t[n].forEach((function(t){e.mapBinding(n,t)}))}}else{console.warn("Key Binding Error - no such action:",n)}};for(var n in t){r(n)}};ut.prototype.mapBinding=function(t,i){var e=this;var r={action:this.actions[t],keys:[],ctrl:false,shift:false,meta:false};var n=i.toString().toLowerCase().split(" ").join("").split("+");n.forEach((function(t){switch(t){case"ctrl":r.ctrl=true;break;case"shift":r.shift=true;break;case"meta":r.meta=true;break;default:t=parseInt(t);r.keys.push(t);if(!e.watchKeys[t]){e.watchKeys[t]=[]}e.watchKeys[t].push(r)}}))};ut.prototype.bindEvents=function(){var t=this;this.keyupBinding=function(i){var e=i.keyCode;var r=t.watchKeys[e];if(r){t.pressedKeys.push(e);r.forEach((function(e){t.checkBinding(i,e)}))}};this.keydownBinding=function(i){var e=i.keyCode;var r=t.watchKeys[e];if(r){var n=t.pressedKeys.indexOf(e);if(n>-1){t.pressedKeys.splice(n,1)}}};this.table.element.addEventListener("keydown",this.keyupBinding);this.table.element.addEventListener("keyup",this.keydownBinding)};ut.prototype.clearBindings=function(){if(this.keyupBinding){this.table.element.removeEventListener("keydown",this.keyupBinding)}if(this.keydownBinding){this.table.element.removeEventListener("keyup",this.keydownBinding)}};ut.prototype.checkBinding=function(t,i){var e=this,r=true;if(t.ctrlKey==i.ctrl&&t.shiftKey==i.shift&&t.metaKey==i.meta){i.keys.forEach((function(t){var i=e.pressedKeys.indexOf(t);if(i==-1){r=false}}));if(r){i.action.call(e,t)}return true}return false};ut.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"};ut.prototype.actions={keyBlock:function t(i){i.stopPropagation();i.preventDefault()},scrollPageUp:function t(i){var e=this.table.rowManager,r=e.scrollTop-e.height;i.preventDefault();if(e.displayRowsCount){if(r>=0){e.element.scrollTop=r}else{e.scrollToRow(e.getDisplayRows()[0])}}this.table.element.focus()},scrollPageDown:function t(i){var e=this.table.rowManager,r=e.scrollTop+e.height,n=e.element.scrollHeight;i.preventDefault();if(e.displayRowsCount){if(r<=n){e.element.scrollTop=r}else{e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])}}this.table.element.focus()},scrollToStart:function t(i){var e=this.table.rowManager;i.preventDefault();if(e.displayRowsCount){e.scrollToRow(e.getDisplayRows()[0])}this.table.element.focus()},scrollToEnd:function t(i){var e=this.table.rowManager;i.preventDefault();if(e.displayRowsCount){e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])}this.table.element.focus()},navPrev:function t(i){var e=false;if(this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(e){i.preventDefault();e.nav().prev()}}},navNext:function t(i){var e=false;var r=this.table.options.tabEndNewRow;var n;if(this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(e){i.preventDefault();n=e.nav();if(!n.next()){if(r){e.getElement().firstChild.blur();if(r===true){r=this.table.addRow({})}else{if(typeof r=="function"){r=this.table.addRow(r(e.row.getComponent()))}else{r=this.table.addRow(Object.assign({},r))}}r.then((function(){setTimeout((function(){n.next()}))}))}}}}},navLeft:function t(i){var e=false;if(this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(e){i.preventDefault();e.nav().left()}}},navRight:function t(i){var e=false;if(this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(e){i.preventDefault();e.nav().right()}}},navUp:function t(i){var e=false;if(this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(e){i.preventDefault();e.nav().up()}}},navDown:function t(i){var e=false;if(this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(e){i.preventDefault();e.nav().down()}}},undo:function t(i){var e=false;if(this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(!e){i.preventDefault();this.table.modules.history.undo()}}},redo:function t(i){var e=false;if(this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(!e){i.preventDefault();this.table.modules.history.redo()}}},copyToClipboard:function t(i){if(!this.table.modules.edit.currentCell){if(this.table.modExists("clipboard",true)){this.table.modules.clipboard.copy(false,true)}}}};H.prototype.registerModule("keybindings",ut);var lt=function t(i){this.table=i;this.menuElements=[];this.blurEvent=this.hideMenu.bind(this);this.escEvent=this.escMenu.bind(this);this.nestedMenuBlock=false;this.positionReversedX=false};lt.prototype.initializeColumnHeader=function(t){var i=this;var e;if(t.definition.headerContextMenu){t.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,t.definition.headerContextMenu));this.tapHold(t,t.definition.headerContextMenu)}if(t.definition.headerMenu){e=document.createElement("span");e.classList.add("tabulator-header-menu-button");e.innerHTML="&vellip;";e.addEventListener("click",(function(e){e.stopPropagation();e.preventDefault();i.LoadMenuEvent(t,t.definition.headerMenu,e)}));t.titleElement.insertBefore(e,t.titleElement.firstChild)}};lt.prototype.LoadMenuEvent=function(t,i,e){i=typeof i=="function"?i.call(this.table,t.getComponent(),e):i;this.loadMenu(e,t,i)};lt.prototype.tapHold=function(t,i){var e=this;var r=t.getElement(),n=null,o=false;r.addEventListener("touchstart",(function(r){clearTimeout(n);o=false;n=setTimeout((function(){clearTimeout(n);n=null;o=true;e.LoadMenuEvent(t,i,r)}),1e3)}),{passive:true});r.addEventListener("touchend",(function(t){clearTimeout(n);n=null;if(o){t.preventDefault()}}))};lt.prototype.initializeCell=function(t){if(t.column.definition.contextMenu){t.getElement(true).addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,t.column.definition.contextMenu));this.tapHold(t,t.column.definition.contextMenu)}if(t.column.definition.clickMenu){t.getElement(true).addEventListener("click",this.LoadMenuEvent.bind(this,t,t.column.definition.clickMenu))}};lt.prototype.initializeRow=function(t){if(this.table.options.rowContextMenu){t.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,this.table.options.rowContextMenu));this.tapHold(t,this.table.options.rowContextMenu)}if(this.table.options.rowClickMenu){t.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,t,this.table.options.rowClickMenu))}};lt.prototype.initializeGroup=function(t){if(this.table.options.groupContextMenu){t.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,this.table.options.groupContextMenu));this.tapHold(t,this.table.options.groupContextMenu)}if(this.table.options.groupClickMenu){t.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,t,this.table.options.groupClickMenu))}};lt.prototype.loadMenu=function(t,i,e,r){var n=this;var o=!(t instanceof MouseEvent);var s=document.createElement("div");s.classList.add("tabulator-menu");if(!o){t.preventDefault()}if(!e||!e.length){return}if(!r){if(this.nestedMenuBlock){if(this.isOpen()){return}}else{this.nestedMenuBlock=setTimeout((function(){n.nestedMenuBlock=false}),100)}this.hideMenu();this.menuElements=[]}e.forEach((function(t){var e=document.createElement("div"),r=t.label,o=t.disabled;if(t.separator){e.classList.add("tabulator-menu-separator")}else{e.classList.add("tabulator-menu-item");if(typeof r=="function"){r=r.call(n.table,i.getComponent())}if(r instanceof Node){e.appendChild(r)}else{e.innerHTML=r}if(typeof o=="function"){o=o.call(n.table,i.getComponent())}if(o){e.classList.add("tabulator-menu-item-disabled");e.addEventListener("click",(function(t){t.stopPropagation()}))}else{if(t.menu&&t.menu.length){e.addEventListener("click",(function(r){r.stopPropagation();n.hideOldSubMenus(s);n.loadMenu(r,i,t.menu,e)}))}else{if(t.action){e.addEventListener("click",(function(e){t.action(e,i.getComponent())}))}}}if(t.menu&&t.menu.length){e.classList.add("tabulator-menu-item-submenu")}}s.appendChild(e)}));s.addEventListener("click",(function(t){n.hideMenu()}));this.menuElements.push(s);this.positionMenu(s,r,o,t)};lt.prototype.hideOldSubMenus=function(t){var i=this.menuElements.indexOf(t);if(i>-1){for(var e=this.menuElements.length-1;e>i;e--){var r=this.menuElements[e];if(r.parentNode){r.parentNode.removeChild(r)}this.menuElements.pop()}}};lt.prototype.positionMenu=function(t,i,e,r){var n=this;var o=Math.max(document.body.offsetHeight,window.innerHeight),s,a,u;if(!i){s=e?r.touches[0].pageX:r.pageX;a=e?r.touches[0].pageY:r.pageY;this.positionReversedX=false}else{u=H.prototype.helpers.elOffset(i);s=u.left+i.offsetWidth;a=u.top-1}t.style.top=a+"px";t.style.left=s+"px";setTimeout((function(){n.table.rowManager.element.addEventListener("scroll",n.blurEvent);document.body.addEventListener("click",n.blurEvent);document.body.addEventListener("contextmenu",n.blurEvent);window.addEventListener("resize",n.blurEvent);document.body.addEventListener("keydown",n.escEvent)}),100);document.body.appendChild(t);if(a+t.offsetHeight>=o){t.style.top="";if(i){t.style.bottom=o-u.top-i.offsetHeight-1+"px"}else{t.style.bottom=o-a+"px"}}if(s+t.offsetWidth>=document.body.offsetWidth||this.positionReversedX){t.style.left="";if(i){t.style.right=document.documentElement.offsetWidth-u.left+"px"}else{t.style.right=document.documentElement.offsetWidth-s+"px"}this.positionReversedX=true}};lt.prototype.isOpen=function(){return!!this.menuElements.length};lt.prototype.escMenu=function(t){if(t.keyCode==27){this.hideMenu()}};lt.prototype.hideMenu=function(){this.menuElements.forEach((function(t){if(t.parentNode){t.parentNode.removeChild(t)}}));document.body.removeEventListener("keydown",this.escEvent);document.body.removeEventListener("click",this.blurEvent);document.body.removeEventListener("contextmenu",this.blurEvent);window.removeEventListener("resize",this.blurEvent);this.table.rowManager.element.removeEventListener("scroll",this.blurEvent)};lt.prototype.menus={};H.prototype.registerModule("menu",lt);var ft=function t(i){this.table=i;this.placeholderElement=this.createPlaceholderElement();this.hoverElement=false;this.checkTimeout=false;this.checkPeriod=250;this.moving=false;this.toCol=false;this.toColAfter=false;this.startX=0;this.autoScrollMargin=40;this.autoScrollStep=5;this.autoScrollTimeout=false;this.touchMove=false;this.moveHover=this.moveHover.bind(this);this.endMove=this.endMove.bind(this)};ft.prototype.createPlaceholderElement=function(){var t=document.createElement("div");t.classList.add("tabulator-col");t.classList.add("tabulator-col-placeholder");return t};ft.prototype.initializeColumn=function(t){var i=this,e={},r;if(!t.modules.frozen){r=t.getElement();e.mousemove=function(e){if(t.parent===i.moving.parent){if((i.touchMove?e.touches[0].pageX:e.pageX)-H.prototype.helpers.elOffset(r).left+i.table.columnManager.element.scrollLeft>t.getWidth()/2){if(i.toCol!==t||!i.toColAfter){r.parentNode.insertBefore(i.placeholderElement,r.nextSibling);i.moveColumn(t,true)}}else{if(i.toCol!==t||i.toColAfter){r.parentNode.insertBefore(i.placeholderElement,r);i.moveColumn(t,false)}}}}.bind(i);r.addEventListener("mousedown",(function(e){i.touchMove=false;if(e.which===1){i.checkTimeout=setTimeout((function(){i.startMove(e,t)}),i.checkPeriod)}}));r.addEventListener("mouseup",(function(t){if(t.which===1){if(i.checkTimeout){clearTimeout(i.checkTimeout)}}}));i.bindTouchEvents(t)}t.modules.moveColumn=e};ft.prototype.bindTouchEvents=function(t){var i=this,e=t.getElement(),r=false,n,o,s,a,u,l;e.addEventListener("touchstart",(function(e){i.checkTimeout=setTimeout((function(){i.touchMove=true;n=t.nextColumn();s=n?n.getWidth()/2:0;o=t.prevColumn();a=o?o.getWidth()/2:0;u=0;l=0;r=false;i.startMove(e,t)}),i.checkPeriod)}),{passive:true});e.addEventListener("touchmove",(function(e){var f,h;if(i.moving){i.moveHover(e);if(!r){r=e.touches[0].pageX}f=e.touches[0].pageX-r;if(f>0){if(n&&f-u>s){h=n;if(h!==t){r=e.touches[0].pageX;h.getElement().parentNode.insertBefore(i.placeholderElement,h.getElement().nextSibling);i.moveColumn(h,true)}}}else{if(o&&-f-l>a){h=o;if(h!==t){r=e.touches[0].pageX;h.getElement().parentNode.insertBefore(i.placeholderElement,h.getElement());i.moveColumn(h,false)}}}if(h){n=h.nextColumn();u=s;s=n?n.getWidth()/2:0;o=h.prevColumn();l=a;a=o?o.getWidth()/2:0}}}),{passive:true});e.addEventListener("touchend",(function(t){if(i.checkTimeout){clearTimeout(i.checkTimeout)}if(i.moving){i.endMove(t)}}))};ft.prototype.startMove=function(t,i){var e=i.getElement();this.moving=i;this.startX=(this.touchMove?t.touches[0].pageX:t.pageX)-H.prototype.helpers.elOffset(e).left;this.table.element.classList.add("tabulator-block-select");this.placeholderElement.style.width=i.getWidth()+"px";this.placeholderElement.style.height=i.getHeight()+"px";e.parentNode.insertBefore(this.placeholderElement,e);e.parentNode.removeChild(e);this.hoverElement=e.cloneNode(true);this.hoverElement.classList.add("tabulator-moving");this.table.columnManager.getElement().appendChild(this.hoverElement);this.hoverElement.style.left="0";this.hoverElement.style.bottom="0";if(!this.touchMove){this._bindMouseMove();document.body.addEventListener("mousemove",this.moveHover);document.body.addEventListener("mouseup",this.endMove)}this.moveHover(t)};ft.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach((function(t){if(t.modules.moveColumn.mousemove){t.getElement().addEventListener("mousemove",t.modules.moveColumn.mousemove)}}))};ft.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach((function(t){if(t.modules.moveColumn.mousemove){t.getElement().removeEventListener("mousemove",t.modules.moveColumn.mousemove)}}))};ft.prototype.moveColumn=function(t,i){var e=this.moving.getCells();this.toCol=t;this.toColAfter=i;if(i){t.getCells().forEach((function(t,i){var r=t.getElement(true);r.parentNode.insertBefore(e[i].getElement(),r.nextSibling)}))}else{t.getCells().forEach((function(t,i){var r=t.getElement(true);r.parentNode.insertBefore(e[i].getElement(),r)}))}};ft.prototype.endMove=function(t){if(t.which===1||this.touchMove){this._unbindMouseMove();this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling);this.placeholderElement.parentNode.removeChild(this.placeholderElement);this.hoverElement.parentNode.removeChild(this.hoverElement);this.table.element.classList.remove("tabulator-block-select");if(this.toCol){this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter)}this.moving=false;this.toCol=false;this.toColAfter=false;if(!this.touchMove){document.body.removeEventListener("mousemove",this.moveHover);document.body.removeEventListener("mouseup",this.endMove)}}};ft.prototype.moveHover=function(t){var i=this,e=i.table.columnManager.getElement(),r=e.scrollLeft,n=(i.touchMove?t.touches[0].pageX:t.pageX)-H.prototype.helpers.elOffset(e).left+r,o;i.hoverElement.style.left=n-i.startX+"px";if(n-r<i.autoScrollMargin){if(!i.autoScrollTimeout){i.autoScrollTimeout=setTimeout((function(){o=Math.max(0,r-5);i.table.rowManager.getElement().scrollLeft=o;i.autoScrollTimeout=false}),1)}}if(r+e.clientWidth-n<i.autoScrollMargin){if(!i.autoScrollTimeout){i.autoScrollTimeout=setTimeout((function(){o=Math.min(e.clientWidth,r+5);i.table.rowManager.getElement().scrollLeft=o;i.autoScrollTimeout=false}),1)}}};H.prototype.registerModule("moveColumn",ft);var ht=function t(i){this.table=i;this.placeholderElement=this.createPlaceholderElement();this.hoverElement=false;this.checkTimeout=false;this.checkPeriod=150;this.moving=false;this.toRow=false;this.toRowAfter=false;this.hasHandle=false;this.startY=0;this.startX=0;this.moveHover=this.moveHover.bind(this);this.endMove=this.endMove.bind(this);this.tableRowDropEvent=false;this.touchMove=false;this.connection=false;this.connectionSelectorsTables=false;this.connectionSelectorsElements=false;this.connectionElements=[];this.connections=[];this.connectedTable=false;this.connectedRow=false};ht.prototype.createPlaceholderElement=function(){var t=document.createElement("div");t.classList.add("tabulator-row");t.classList.add("tabulator-row-placeholder");return t};ht.prototype.initialize=function(t){this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables;this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements;this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements};ht.prototype.setHandle=function(t){this.hasHandle=t};ht.prototype.initializeGroupHeader=function(t){var i=this,e={};e.mouseup=function(t){i.tableRowDrop(t,row)}.bind(i);e.mousemove=function(e){if(e.pageY-H.prototype.helpers.elOffset(t.element).top+i.table.rowManager.element.scrollTop>t.getHeight()/2){if(i.toRow!==t||!i.toRowAfter){var r=t.getElement();r.parentNode.insertBefore(i.placeholderElement,r.nextSibling);i.moveRow(t,true)}}else{if(i.toRow!==t||i.toRowAfter){var r=t.getElement();if(r.previousSibling){r.parentNode.insertBefore(i.placeholderElement,r);i.moveRow(t,false)}}}}.bind(i);t.modules.moveRow=e};ht.prototype.initializeRow=function(t){var i=this,e={},r;e.mouseup=function(e){i.tableRowDrop(e,t)}.bind(i);e.mousemove=function(e){var r=t.getElement();if(e.pageY-H.prototype.helpers.elOffset(r).top+i.table.rowManager.element.scrollTop>t.getHeight()/2){if(i.toRow!==t||!i.toRowAfter){r.parentNode.insertBefore(i.placeholderElement,r.nextSibling);i.moveRow(t,true)}}else{if(i.toRow!==t||i.toRowAfter){r.parentNode.insertBefore(i.placeholderElement,r);i.moveRow(t,false)}}}.bind(i);if(!this.hasHandle){r=t.getElement();r.addEventListener("mousedown",(function(e){if(e.which===1){i.checkTimeout=setTimeout((function(){i.startMove(e,t)}),i.checkPeriod)}}));r.addEventListener("mouseup",(function(t){if(t.which===1){if(i.checkTimeout){clearTimeout(i.checkTimeout)}}}));this.bindTouchEvents(t,t.getElement())}t.modules.moveRow=e};ht.prototype.initializeCell=function(t){var i=this,e=t.getElement(true);e.addEventListener("mousedown",(function(e){if(e.which===1){i.checkTimeout=setTimeout((function(){i.startMove(e,t.row)}),i.checkPeriod)}}));e.addEventListener("mouseup",(function(t){if(t.which===1){if(i.checkTimeout){clearTimeout(i.checkTimeout)}}}));this.bindTouchEvents(t.row,e)};ht.prototype.bindTouchEvents=function(t,i){var e=this,r=false,n,o,s,a,u,l;i.addEventListener("touchstart",(function(i){e.checkTimeout=setTimeout((function(){e.touchMove=true;n=t.nextRow();s=n?n.getHeight()/2:0;o=t.prevRow();a=o?o.getHeight()/2:0;u=0;l=0;r=false;e.startMove(i,t)}),e.checkPeriod)}),{passive:true});i.addEventListener("touchmove",(function(i){var f,h;if(e.moving){i.preventDefault();e.moveHover(i);if(!r){r=i.touches[0].pageY}f=i.touches[0].pageY-r;if(f>0){if(n&&f-u>s){h=n;if(h!==t){r=i.touches[0].pageY;h.getElement().parentNode.insertBefore(e.placeholderElement,h.getElement().nextSibling);e.moveRow(h,true)}}}else{if(o&&-f-l>a){h=o;if(h!==t){r=i.touches[0].pageY;h.getElement().parentNode.insertBefore(e.placeholderElement,h.getElement());e.moveRow(h,false)}}}if(h){n=h.nextRow();u=s;s=n?n.getHeight()/2:0;o=h.prevRow();l=a;a=o?o.getHeight()/2:0}}}));i.addEventListener("touchend",(function(t){if(e.checkTimeout){clearTimeout(e.checkTimeout)}if(e.moving){e.endMove(t);e.touchMove=false}}))};ht.prototype._bindMouseMove=function(){var t=this;t.table.rowManager.getDisplayRows().forEach((function(t){if((t.type==="row"||t.type==="group")&&t.modules.moveRow.mousemove){t.getElement().addEventListener("mousemove",t.modules.moveRow.mousemove)}}))};ht.prototype._unbindMouseMove=function(){var t=this;t.table.rowManager.getDisplayRows().forEach((function(t){if((t.type==="row"||t.type==="group")&&t.modules.moveRow.mousemove){t.getElement().removeEventListener("mousemove",t.modules.moveRow.mousemove)}}))};ht.prototype.startMove=function(t,i){var e=i.getElement();this.setStartPosition(t,i);this.moving=i;this.table.element.classList.add("tabulator-block-select");this.placeholderElement.style.width=i.getWidth()+"px";this.placeholderElement.style.height=i.getHeight()+"px";if(!this.connection){e.parentNode.insertBefore(this.placeholderElement,e);e.parentNode.removeChild(e)}else{this.table.element.classList.add("tabulator-movingrow-sending");this.connectToTables(i)}this.hoverElement=e.cloneNode(true);this.hoverElement.classList.add("tabulator-moving");if(this.connection){document.body.appendChild(this.hoverElement);this.hoverElement.style.left="0";this.hoverElement.style.top="0";this.hoverElement.style.width=this.table.element.clientWidth+"px";this.hoverElement.style.whiteSpace="nowrap";this.hoverElement.style.overflow="hidden";this.hoverElement.style.pointerEvents="none"}else{this.table.rowManager.getTableElement().appendChild(this.hoverElement);this.hoverElement.style.left="0";this.hoverElement.style.top="0";this._bindMouseMove()}document.body.addEventListener("mousemove",this.moveHover);document.body.addEventListener("mouseup",this.endMove);this.moveHover(t)};ht.prototype.setStartPosition=function(t,i){var e=this.touchMove?t.touches[0].pageX:t.pageX,r=this.touchMove?t.touches[0].pageY:t.pageY,n,o;n=i.getElement();if(this.connection){o=n.getBoundingClientRect();this.startX=o.left-e+window.pageXOffset;this.startY=o.top-r+window.pageYOffset}else{this.startY=r-n.getBoundingClientRect().top}};ht.prototype.endMove=function(t){if(!t||t.which===1||this.touchMove){this._unbindMouseMove();if(!this.connection){this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling);this.placeholderElement.parentNode.removeChild(this.placeholderElement)}this.hoverElement.parentNode.removeChild(this.hoverElement);this.table.element.classList.remove("tabulator-block-select");if(this.toRow){this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter)}this.moving=false;this.toRow=false;this.toRowAfter=false;document.body.removeEventListener("mousemove",this.moveHover);document.body.removeEventListener("mouseup",this.endMove);if(this.connection){this.table.element.classList.remove("tabulator-movingrow-sending");this.disconnectFromTables()}}};ht.prototype.moveRow=function(t,i){this.toRow=t;this.toRowAfter=i};ht.prototype.moveHover=function(t){if(this.connection){this.moveHoverConnections.call(this,t)}else{this.moveHoverTable.call(this,t)}};ht.prototype.moveHoverTable=function(t){var i=this.table.rowManager.getElement(),e=i.scrollTop,r=(this.touchMove?t.touches[0].pageY:t.pageY)-i.getBoundingClientRect().top+e;this.hoverElement.style.top=r-this.startY+"px"};ht.prototype.moveHoverConnections=function(t){this.hoverElement.style.left=this.startX+(this.touchMove?t.touches[0].pageX:t.pageX)+"px";this.hoverElement.style.top=this.startY+(this.touchMove?t.touches[0].pageY:t.pageY)+"px"};ht.prototype.elementRowDrop=function(t,i,e){if(this.table.options.movableRowsElementDrop){this.table.options.movableRowsElementDrop(t,i,e?e.getComponent():false)}};ht.prototype.connectToTables=function(t){var i=this;var e;if(this.connectionSelectorsTables){e=this.table.modules.comms.getConnections(this.connectionSelectorsTables);this.table.options.movableRowsSendingStart.call(this.table,e);this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","connect",{row:t})}if(this.connectionSelectorsElements){this.connectionElements=[];if(!Array.isArray(this.connectionSelectorsElements)){this.connectionSelectorsElements=[this.connectionSelectorsElements]}this.connectionSelectorsElements.forEach((function(t){if(typeof t==="string"){i.connectionElements=i.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(t)))}else{i.connectionElements.push(t)}}));this.connectionElements.forEach((function(t){var e=function e(r){i.elementRowDrop(r,t,i.moving)};t.addEventListener("mouseup",e);t.tabulatorElementDropEvent=e;t.classList.add("tabulator-movingrow-receiving")}))}};ht.prototype.disconnectFromTables=function(){var t;if(this.connectionSelectorsTables){t=this.table.modules.comms.getConnections(this.connectionSelectorsTables);this.table.options.movableRowsSendingStop.call(this.table,t);this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","disconnect")}this.connectionElements.forEach((function(t){t.classList.remove("tabulator-movingrow-receiving");t.removeEventListener("mouseup",t.tabulatorElementDropEvent);delete t.tabulatorElementDropEvent}))};ht.prototype.connect=function(t,i){var e=this;if(!this.connectedTable){this.connectedTable=t;this.connectedRow=i;this.table.element.classList.add("tabulator-movingrow-receiving");e.table.rowManager.getDisplayRows().forEach((function(t){if(t.type==="row"&&t.modules.moveRow&&t.modules.moveRow.mouseup){t.getElement().addEventListener("mouseup",t.modules.moveRow.mouseup)}}));e.tableRowDropEvent=e.tableRowDrop.bind(e);e.table.element.addEventListener("mouseup",e.tableRowDropEvent);this.table.options.movableRowsReceivingStart.call(this.table,i,t);return true}else{console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable);return false}};ht.prototype.disconnect=function(t){var i=this;if(t===this.connectedTable){this.connectedTable=false;this.connectedRow=false;this.table.element.classList.remove("tabulator-movingrow-receiving");i.table.rowManager.getDisplayRows().forEach((function(t){if(t.type==="row"&&t.modules.moveRow&&t.modules.moveRow.mouseup){t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)}}));i.table.element.removeEventListener("mouseup",i.tableRowDropEvent);this.table.options.movableRowsReceivingStop.call(this.table,t)}else{console.warn("Move Row Error - trying to disconnect from non connected table")}};ht.prototype.dropComplete=function(t,i,e){var r=false;if(e){switch(T(this.table.options.movableRowsSender)){case"string":r=this.senders[this.table.options.movableRowsSender];break;case"function":r=this.table.options.movableRowsSender;break}if(r){r.call(this,this.moving.getComponent(),i?i.getComponent():undefined,t)}else{if(this.table.options.movableRowsSender){console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender)}}this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),i?i.getComponent():undefined,t)}else{this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),i?i.getComponent():undefined,t)}this.endMove()};ht.prototype.tableRowDrop=function(t,i){var e=false,r=false;t.stopImmediatePropagation();switch(T(this.table.options.movableRowsReceiver)){case"string":e=this.receivers[this.table.options.movableRowsReceiver];break;case"function":e=this.table.options.movableRowsReceiver;break}if(e){r=e.call(this,this.connectedRow.getComponent(),i?i.getComponent():undefined,this.connectedTable)}else{console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver)}if(r){this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),i?i.getComponent():undefined,this.connectedTable)}else{this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),i?i.getComponent():undefined,this.connectedTable)}this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:i,success:r})};ht.prototype.receivers={insert:function t(i,e,r){this.table.addRow(i.getData(),undefined,e);return true},add:function t(i,e,r){this.table.addRow(i.getData());return true},update:function t(i,e,r){if(e){e.update(i.getData());return true}return false},replace:function t(i,e,r){if(e){this.table.addRow(i.getData(),undefined,e);e.delete();return true}return false}};ht.prototype.senders={delete:function t(i,e,r){i.delete()}};ht.prototype.commsReceived=function(t,i,e){switch(i){case"connect":return this.connect(t,e.row);case"disconnect":return this.disconnect(t);case"dropcomplete":return this.dropComplete(t,e.row,e.success)}};H.prototype.registerModule("moveRow",ht);var ct=function t(i){this.table=i;this.allowedTypes=["","data","edit","clipboard"];this.enabled=true};ct.prototype.initializeColumn=function(t){var i=this,e=false,r={};this.allowedTypes.forEach((function(n){var o="mutator"+(n.charAt(0).toUpperCase()+n.slice(1)),s;if(t.definition[o]){s=i.lookupMutator(t.definition[o]);if(s){e=true;r[o]={mutator:s,params:t.definition[o+"Params"]||{}}}}}));if(e){t.modules.mutate=r}};ct.prototype.lookupMutator=function(t){var i=false;switch(typeof t==="undefined"?"undefined":T(t)){case"string":if(this.mutators[t]){i=this.mutators[t]}else{console.warn("Mutator Error - No such mutator found, ignoring: ",t)}break;case"function":i=t;break}return i};ct.prototype.transformRow=function(t,i,e){var r=this,n="mutator"+(i.charAt(0).toUpperCase()+i.slice(1)),o;if(this.enabled){r.table.columnManager.traverse((function(r){var s,a,u;if(r.modules.mutate){s=r.modules.mutate[n]||r.modules.mutate.mutator||false;if(s){o=r.getFieldValue(typeof e!=="undefined"?e:t);if(i=="data"||typeof o!=="undefined"){u=r.getComponent();a=typeof s.params==="function"?s.params(o,t,i,u):s.params;r.setFieldValue(t,s.mutator(o,t,i,a,u))}}}}))}return t};ct.prototype.transformCell=function(t,i){var e=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||false,r={};if(e){r=Object.assign(r,t.row.getData());t.column.setFieldValue(r,i);return e.mutator(i,r,"edit",e.params,t.getComponent())}else{return i}};ct.prototype.enable=function(){this.enabled=true};ct.prototype.disable=function(){this.enabled=false};ct.prototype.mutators={};H.prototype.registerModule("mutator",ct);var dt=function t(i){this.table=i;this.mode="local";this.progressiveLoad=false;this.size=0;this.page=1;this.count=5;this.max=1;this.displayIndex=0;this.initialLoad=true;this.pageSizes=[];this.dataReceivedNames={};this.dataSentNames={};this.createElements()};dt.prototype.createElements=function(){var t;this.element=document.createElement("span");this.element.classList.add("tabulator-paginator");this.pagesElement=document.createElement("span");this.pagesElement.classList.add("tabulator-pages");t=document.createElement("button");t.classList.add("tabulator-page");t.setAttribute("type","button");t.setAttribute("role","button");t.setAttribute("aria-label","");t.setAttribute("title","");this.firstBut=t.cloneNode(true);this.firstBut.setAttribute("data-page","first");this.prevBut=t.cloneNode(true);this.prevBut.setAttribute("data-page","prev");this.nextBut=t.cloneNode(true);this.nextBut.setAttribute("data-page","next");this.lastBut=t.cloneNode(true);this.lastBut.setAttribute("data-page","last");if(this.table.options.paginationSizeSelector){this.pageSizeSelect=document.createElement("select");this.pageSizeSelect.classList.add("tabulator-page-size")}};dt.prototype.generatePageSizeSelectList=function(){var t=this;var i=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector)){i=this.table.options.paginationSizeSelector;this.pageSizes=i;if(this.pageSizes.indexOf(this.size)==-1){i.unshift(this.size)}}else{if(this.pageSizes.indexOf(this.size)==-1){i=[];for(var e=1;e<5;e++){i.push(this.size*e)}this.pageSizes=i}else{i=this.pageSizes}}while(this.pageSizeSelect.firstChild){this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild)}i.forEach((function(i){var e=document.createElement("option");e.value=i;if(i===true){t.table.modules.localize.bind("pagination|all",(function(t){e.innerHTML=t}))}else{e.innerHTML=i}t.pageSizeSelect.appendChild(e)}));this.pageSizeSelect.value=this.size}};dt.prototype.initialize=function(t){var i=this,e,r,n;this.dataSentNames=Object.assign({},this.paginationDataSentNames);this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent);this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames);this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived);i.table.modules.localize.bind("pagination|first",(function(t){i.firstBut.innerHTML=t}));i.table.modules.localize.bind("pagination|first_title",(function(t){i.firstBut.setAttribute("aria-label",t);i.firstBut.setAttribute("title",t)}));i.table.modules.localize.bind("pagination|prev",(function(t){i.prevBut.innerHTML=t}));i.table.modules.localize.bind("pagination|prev_title",(function(t){i.prevBut.setAttribute("aria-label",t);i.prevBut.setAttribute("title",t)}));i.table.modules.localize.bind("pagination|next",(function(t){i.nextBut.innerHTML=t}));i.table.modules.localize.bind("pagination|next_title",(function(t){i.nextBut.setAttribute("aria-label",t);i.nextBut.setAttribute("title",t)}));i.table.modules.localize.bind("pagination|last",(function(t){i.lastBut.innerHTML=t}));i.table.modules.localize.bind("pagination|last_title",(function(t){i.lastBut.setAttribute("aria-label",t);i.lastBut.setAttribute("title",t)}));i.firstBut.addEventListener("click",(function(){i.setPage(1).then((function(){})).catch((function(){}))}));i.prevBut.addEventListener("click",(function(){i.previousPage().then((function(){})).catch((function(){}))}));i.nextBut.addEventListener("click",(function(){i.nextPage().then((function(){})).catch((function(){}))}));i.lastBut.addEventListener("click",(function(){i.setPage(i.max).then((function(){})).catch((function(){}))}));if(i.table.options.paginationElement){i.element=i.table.options.paginationElement}if(this.pageSizeSelect){e=document.createElement("label");i.table.modules.localize.bind("pagination|page_size",(function(t){i.pageSizeSelect.setAttribute("aria-label",t);i.pageSizeSelect.setAttribute("title",t);e.innerHTML=t}));i.element.appendChild(e);i.element.appendChild(i.pageSizeSelect);i.pageSizeSelect.addEventListener("change",(function(t){i.setPageSize(i.pageSizeSelect.value=="true"?true:i.pageSizeSelect.value);i.setPage(1).then((function(){})).catch((function(){}))}))}i.element.appendChild(i.firstBut);i.element.appendChild(i.prevBut);i.element.appendChild(i.pagesElement);i.element.appendChild(i.nextBut);i.element.appendChild(i.lastBut);if(!i.table.options.paginationElement&&!t){i.table.footerManager.append(i.element,i)}i.mode=i.table.options.pagination;if(i.table.options.paginationSize){i.size=i.table.options.paginationSize}else{r=document.createElement("div");r.classList.add("tabulator-row");r.style.visibility=t;n=document.createElement("div");n.classList.add("tabulator-cell");n.innerHTML="Page Row Test";r.appendChild(n);i.table.rowManager.getTableElement().appendChild(r);i.size=Math.floor(i.table.rowManager.getElement().clientHeight/r.offsetHeight);i.table.rowManager.getTableElement().removeChild(r)}i.count=i.table.options.paginationButtonCount;i.generatePageSizeSelectList()};dt.prototype.initializeProgressive=function(t){this.initialize(true);this.mode="progressive_"+t;this.progressiveLoad=true};dt.prototype.setDisplayIndex=function(t){this.displayIndex=t};dt.prototype.getDisplayIndex=function(){return this.displayIndex};dt.prototype.setMaxRows=function(t){if(!t){this.max=1}else{this.max=this.size===true?1:Math.ceil(t/this.size)}if(this.page>this.max){this.page=this.max}};dt.prototype.reset=function(t,i){if(this.mode=="local"||t){this.page=1}if(i){this.initialLoad=true}return true};dt.prototype.setMaxPage=function(t){t=parseInt(t);this.max=t||1;if(this.page>this.max){this.page=this.max;this.trigger()}};dt.prototype.setPage=function(t){var i=this;var e=this;switch(t){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise((function(r,n){t=parseInt(t);if(t>0&&t<=i.max||i.mode!=="local"){i.page=t;i.trigger().then((function(){r()})).catch((function(){n()}));if(e.table.options.persistence&&e.table.modExists("persistence",true)&&e.table.modules.persistence.config.page){e.table.modules.persistence.save("page")}}else{console.warn("Pagination Error - Requested page is out of range of 1 - "+i.max+":",t);n()}}))};dt.prototype.setPageToRow=function(t){var i=this;return new Promise((function(e,r){var n=i.table.rowManager.getDisplayRows(i.displayIndex-1);var o=n.indexOf(t);if(o>-1){var s=i.size===true?1:Math.ceil((o+1)/i.size);i.setPage(s).then((function(){e()})).catch((function(){r()}))}else{console.warn("Pagination Error - Requested row is not visible");r()}}))};dt.prototype.setPageSize=function(t){if(t!==true){t=parseInt(t)}if(t>0){this.size=t}if(this.pageSizeSelect){this.generatePageSizeSelectList()}if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.page){this.table.modules.persistence.save("page")}};dt.prototype._setPageButtons=function(){var t=this;var i=Math.floor((this.count-1)/2);var e=Math.ceil((this.count-1)/2);var r=this.max-this.page+i+1<this.count?this.max-this.count+1:Math.max(this.page-i,1);var n=this.page<=e?Math.min(this.count,this.max):Math.min(this.page+e,this.max);while(t.pagesElement.firstChild){t.pagesElement.removeChild(t.pagesElement.firstChild)}if(t.page==1){t.firstBut.disabled=true;t.prevBut.disabled=true}else{t.firstBut.disabled=false;t.prevBut.disabled=false}if(t.page==t.max){t.lastBut.disabled=true;t.nextBut.disabled=true}else{t.lastBut.disabled=false;t.nextBut.disabled=false}for(var o=r;o<=n;o++){if(o>0&&o<=t.max){t.pagesElement.appendChild(t._generatePageButton(o))}}this.footerRedraw()};dt.prototype._generatePageButton=function(t){var i=this,e=document.createElement("button");e.classList.add("tabulator-page");if(t==i.page){e.classList.add("active")}e.setAttribute("type","button");e.setAttribute("role","button");i.table.modules.localize.bind("pagination|page_title",(function(i){e.setAttribute("aria-label",i+" "+t);e.setAttribute("title",i+" "+t)}));e.setAttribute("data-page",t);e.textContent=t;e.addEventListener("click",(function(e){i.setPage(t).then((function(){})).catch((function(){}))}));return e};dt.prototype.previousPage=function(){var t=this;return new Promise((function(i,e){if(t.page>1){t.page--;t.trigger().then((function(){i()})).catch((function(){e()}));if(t.table.options.persistence&&t.table.modExists("persistence",true)&&t.table.modules.persistence.config.page){t.table.modules.persistence.save("page")}}else{console.warn("Pagination Error - Previous page would be less than page 1:",0);e()}}))};dt.prototype.nextPage=function(){var t=this;return new Promise((function(i,e){if(t.page<t.max){t.page++;t.trigger().then((function(){i()})).catch((function(){e()}));if(t.table.options.persistence&&t.table.modExists("persistence",true)&&t.table.modules.persistence.config.page){t.table.modules.persistence.save("page")}}else{if(!t.progressiveLoad){console.warn("Pagination Error - Next page would be greater than maximum page of "+t.max+":",t.max+1)}e()}}))};dt.prototype.getPage=function(){return this.page};dt.prototype.getPageMax=function(){return this.max};dt.prototype.getPageSize=function(t){return this.size};dt.prototype.getMode=function(){return this.mode};dt.prototype.getRows=function(t){var i,e,r;if(this.mode=="local"){i=[];if(this.size===true){e=0;r=t.length}else{e=this.size*(this.page-1);r=e+parseInt(this.size)}this._setPageButtons();for(var n=e;n<r;n++){if(t[n]){i.push(t[n])}}return i}else{this._setPageButtons();return t.slice(0)}};dt.prototype.trigger=function(){var t=this;var i;return new Promise((function(e,r){switch(t.mode){case"local":i=t.table.rowManager.scrollLeft;t.table.rowManager.refreshActiveData("page");t.table.rowManager.scrollHorizontal(i);t.table.options.pageLoaded.call(t.table,t.getPage());e();break;case"remote":case"progressive_load":case"progressive_scroll":t.table.modules.ajax.blockActiveRequest();t._getRemotePage().then((function(){e()})).catch((function(){r()}));break;default:console.warn("Pagination Error - no such pagination mode:",t.mode);r()}}))};dt.prototype._getRemotePage=function(){var t=this;var i=this,e,r;return new Promise((function(n,o){if(!i.table.modExists("ajax",true)){o()}e=H.prototype.helpers.deepClone(i.table.modules.ajax.getParams()||{});r=i.table.modules.ajax.getParams();r[t.dataSentNames.page]=i.page;if(t.size){r[t.dataSentNames.size]=t.size}if(t.table.options.ajaxSorting&&t.table.modExists("sort")){var s=i.table.modules.sort.getSort();s.forEach((function(t){delete t.column}));r[t.dataSentNames.sorters]=s}if(t.table.options.ajaxFiltering&&t.table.modExists("filter")){var a=i.table.modules.filter.getFilters(true,true);r[t.dataSentNames.filters]=a}i.table.modules.ajax.setParams(r);i.table.modules.ajax.sendRequest(t.progressiveLoad).then((function(t){i._parseRemoteData(t);n()})).catch((function(t){o()}));i.table.modules.ajax.setParams(e)}))};dt.prototype._parseRemoteData=function(t){var i=this,e,t,r;if(typeof t[this.dataReceivedNames.last_page]==="undefined"){console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.last_page+"' property")}if(t[this.dataReceivedNames.data]){this.max=parseInt(t[this.dataReceivedNames.last_page])||1;if(this.progressiveLoad){switch(this.mode){case"progressive_load":if(this.page==1){this.table.rowManager.setData(t[this.dataReceivedNames.data],false,this.initialLoad&&this.page==1)}else{this.table.rowManager.addRows(t[this.dataReceivedNames.data])}if(this.page<this.max){setTimeout((function(){i.nextPage().then((function(){})).catch((function(){}))}),i.table.options.ajaxProgressiveLoadDelay)}break;case"progressive_scroll":t=this.table.rowManager.getData().concat(t[this.dataReceivedNames.data]);this.table.rowManager.setData(t,true,this.initialLoad&&this.page==1);r=this.table.options.ajaxProgressiveLoadScrollMargin||this.table.rowManager.element.clientHeight*2;if(i.table.rowManager.element.scrollHeight<=i.table.rowManager.element.clientHeight+r){i.nextPage().then((function(){})).catch((function(){}))}break}}else{e=this.table.rowManager.scrollLeft;this.table.rowManager.setData(t[this.dataReceivedNames.data],false,this.initialLoad&&this.page==1);this.table.rowManager.scrollHorizontal(e);this.table.columnManager.scrollHorizontal(e);this.table.options.pageLoaded.call(this.table,this.getPage())}this.initialLoad=false}else{console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.data+"' property")}};dt.prototype.footerRedraw=function(){var t=this.table.footerManager.element;if(Math.ceil(t.clientWidth)-t.scrollWidth<0){this.pagesElement.style.display="none"}else{this.pagesElement.style.display="";if(Math.ceil(t.clientWidth)-t.scrollWidth<0){this.pagesElement.style.display="none"}}};dt.prototype.paginationDataSentNames={page:"page",size:"size",sorters:"sorters",filters:"filters"};dt.prototype.paginationDataReceivedNames={current_page:"current_page",last_page:"last_page",data:"data"};H.prototype.registerModule("page",dt);var bt=function t(i){this.table=i;this.mode="";this.id="";this.defWatcherBlock=false;this.config={};this.readFunc=false;this.writeFunc=false};bt.prototype.localStorageTest=function(){var t="_tabulator_test";try{window.localStorage.setItem(t,t);window.localStorage.removeItem(t);return true}catch(t){return false}};bt.prototype.initialize=function(){var t=this.table.options.persistenceMode,i=this.table.options.persistenceID,e;this.mode=t!==true?t:this.localStorageTest()?"local":"cookie";if(this.table.options.persistenceReaderFunc){if(typeof this.table.options.persistenceReaderFunc==="function"){this.readFunc=this.table.options.persistenceReaderFunc}else{if(this.readers[this.table.options.persistenceReaderFunc]){this.readFunc=this.readers[this.table.options.persistenceReaderFunc]}else{console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc)}}}else{if(this.readers[this.mode]){this.readFunc=this.readers[this.mode]}else{console.warn("Persistence Read Error - invalid reader set",this.mode)}}if(this.table.options.persistenceWriterFunc){if(typeof this.table.options.persistenceWriterFunc==="function"){this.writeFunc=this.table.options.persistenceWriterFunc}else{if(this.readers[this.table.options.persistenceWriterFunc]){this.writeFunc=this.readers[this.table.options.persistenceWriterFunc]}else{console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc)}}}else{if(this.writers[this.mode]){this.writeFunc=this.writers[this.mode]}else{console.warn("Persistence Write Error - invalid writer set",this.mode)}}this.id="tabulator-"+(i||this.table.element.getAttribute("id")||"");this.config={sort:this.table.options.persistence===true||this.table.options.persistence.sort,filter:this.table.options.persistence===true||this.table.options.persistence.filter,group:this.table.options.persistence===true||this.table.options.persistence.group,page:this.table.options.persistence===true||this.table.options.persistence.page,columns:this.table.options.persistence===true?["title","width","visible"]:this.table.options.persistence.columns};if(this.config.page){e=this.retreiveData("page");if(e){if(typeof e.paginationSize!=="undefined"&&(this.config.page===true||this.config.page.size)){this.table.options.paginationSize=e.paginationSize}if(typeof e.paginationInitialPage!=="undefined"&&(this.config.page===true||this.config.page.page)){this.table.options.paginationInitialPage=e.paginationInitialPage}}}if(this.config.group){e=this.retreiveData("group");if(e){if(typeof e.groupBy!=="undefined"&&(this.config.group===true||this.config.group.groupBy)){this.table.options.groupBy=e.groupBy}if(typeof e.groupStartOpen!=="undefined"&&(this.config.group===true||this.config.group.groupStartOpen)){this.table.options.groupStartOpen=e.groupStartOpen}if(typeof e.groupHeader!=="undefined"&&(this.config.group===true||this.config.group.groupHeader)){this.table.options.groupHeader=e.groupHeader}}}if(this.config.columns){this.table.options.columns=this.load("columns",this.table.options.columns)}};bt.prototype.initializeColumn=function(t){var i=this,e,r;if(this.config.columns){this.defWatcherBlock=true;e=t.getDefinition();r=this.config.columns===true?Object.keys(e):this.config.columns;r.forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);var n=e[t];if(r){Object.defineProperty(e,t,{set:function t(e){n=e;if(!i.defWatcherBlock){i.save("columns")}if(r.set){r.set(e)}},get:function t(){if(r.get){r.get()}return n}})}}));this.defWatcherBlock=false}};bt.prototype.load=function(t,i){var e=this.retreiveData(t);if(i){e=e?this.mergeDefinition(i,e):i}return e};bt.prototype.retreiveData=function(t){return this.readFunc?this.readFunc(this.id,t):false};bt.prototype.mergeDefinition=function(t,i){var e=this,r=[];i=i||[];i.forEach((function(i,n){var o=e._findColumn(t,i),s;if(o){if(e.config.columns===true||e.config.columns==undefined){s=Object.keys(o);s.push("width")}else{s=e.config.columns}s.forEach((function(t){if(t!=="columns"&&typeof i[t]!=="undefined"){o[t]=i[t]}}));if(o.columns){o.columns=e.mergeDefinition(o.columns,i.columns)}r.push(o)}}));t.forEach((function(t,n){var o=e._findColumn(i,t);if(!o){if(r.length>n){r.splice(n,0,t)}else{r.push(t)}}}));return r};bt.prototype._findColumn=function(t,i){var e=i.columns?"group":i.field?"field":"object";return t.find((function(t){switch(e){case"group":return t.title===i.title&&t.columns.length===i.columns.length;case"field":return t.field===i.field;case"object":return t===i}}))};bt.prototype.save=function(t){var i={};switch(t){case"columns":i=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":i=this.table.modules.filter.getFilters();break;case"sort":i=this.validateSorters(this.table.modules.sort.getSort());break;case"group":i=this.getGroupConfig();break;case"page":i=this.getPageConfig();break}if(this.writeFunc){this.writeFunc(this.id,t,i)}};bt.prototype.validateSorters=function(t){t.forEach((function(t){t.column=t.field;delete t.field}));return t};bt.prototype.getGroupConfig=function(){var t={};if(this.config.group){if(this.config.group===true||this.config.group.groupBy){t.groupBy=this.table.options.groupBy}if(this.config.group===true||this.config.group.groupStartOpen){t.groupStartOpen=this.table.options.groupStartOpen}if(this.config.group===true||this.config.group.groupHeader){t.groupHeader=this.table.options.groupHeader}}return t};bt.prototype.getPageConfig=function(){var t={};if(this.config.page){if(this.config.page===true||this.config.page.size){t.paginationSize=this.table.modules.page.getPageSize()}if(this.config.page===true||this.config.page.page){t.paginationInitialPage=this.table.modules.page.getPage()}}return t};bt.prototype.parseColumns=function(t){var i=this,e=[],r=["headerContextMenu","headerMenu","contextMenu","clickMenu"];t.forEach((function(t){var n={},o=t.getDefinition(),s;if(t.isGroup){n.title=o.title;n.columns=i.parseColumns(t.getColumns())}else{n.field=t.getField();if(i.config.columns===true||i.config.columns==undefined){s=Object.keys(o);s.push("width")}else{s=i.config.columns}s.forEach((function(i){switch(i){case"width":n.width=t.getWidth();break;case"visible":n.visible=t.visible;break;default:if(typeof o[i]!=="function"&&r.indexOf(i)===-1){n[i]=o[i]}}}))}e.push(n)}));return e};bt.prototype.readers={local:function t(i,e){var r=localStorage.getItem(i+"-"+e);return r?JSON.parse(r):false},cookie:function t(i,e){var t=document.cookie,r=i+"-"+e,n=t.indexOf(r+"="),o,s;if(n>-1){t=t.substr(n);o=t.indexOf(";");if(o>-1){t=t.substr(0,o)}s=t.replace(r+"=","")}return s?JSON.parse(s):false}};bt.prototype.writers={local:function t(i,e,r){localStorage.setItem(i+"-"+e,JSON.stringify(r))},cookie:function t(i,e,r){var n=new Date;n.setDate(n.getDate()+1e4);document.cookie=i+"-"+e+"="+JSON.stringify(r)+"; expires="+n.toUTCString()}};H.prototype.registerModule("persistence",bt);var pt=function t(i){this.table=i;this.element=false;this.manualBlock=false};pt.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this));window.addEventListener("afterprint",this.cleanup.bind(this))};pt.prototype.replaceTable=function(){if(!this.manualBlock){this.element=document.createElement("div");this.element.classList.add("tabulator-print-table");this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print"));this.table.element.style.display="none";this.table.element.parentNode.insertBefore(this.element,this.table.element)}};pt.prototype.cleanup=function(){document.body.classList.remove("tabulator-print-fullscreen-hide");if(this.element&&this.element.parentNode){this.element.parentNode.removeChild(this.element);this.table.element.style.display=""}};pt.prototype.printFullscreen=function(t,i,e){var r=window.scrollX,n=window.scrollY,o=document.createElement("div"),s=document.createElement("div"),a=this.table.modules.export.genereateTable(typeof e!="undefined"?e:this.table.options.printConfig,typeof i!="undefined"?i:this.table.options.printStyled,t,"print"),u,l;this.manualBlock=true;this.element=document.createElement("div");this.element.classList.add("tabulator-print-fullscreen");if(this.table.options.printHeader){o.classList.add("tabulator-print-header");u=typeof this.table.options.printHeader=="function"?this.table.options.printHeader.call(this.table):this.table.options.printHeader;if(typeof u=="string"){o.innerHTML=u}else{o.appendChild(u)}this.element.appendChild(o)}this.element.appendChild(a);if(this.table.options.printFooter){s.classList.add("tabulator-print-footer");l=typeof this.table.options.printFooter=="function"?this.table.options.printFooter.call(this.table):this.table.options.printFooter;if(typeof l=="string"){s.innerHTML=l}else{s.appendChild(l)}this.element.appendChild(s)}document.body.classList.add("tabulator-print-fullscreen-hide");document.body.appendChild(this.element);if(this.table.options.printFormatter){this.table.options.printFormatter(this.element,a)}window.print();this.cleanup();window.scrollTo(r,n);this.manualBlock=false};H.prototype.registerModule("print",pt);var vt=function t(i){this.table=i;this.data=false;this.blocked=false;this.origFuncs={};this.currentVersion=0};vt.prototype.watchData=function(t){var i=this,e;this.currentVersion++;e=this.currentVersion;i.unwatchData();i.data=t;i.origFuncs.push=t.push;Object.defineProperty(i.data,"push",{enumerable:false,configurable:true,value:function r(){var n=Array.from(arguments);if(!i.blocked&&e===i.currentVersion){n.forEach((function(t){i.table.rowManager.addRowActual(t,false)}))}return i.origFuncs.push.apply(t,arguments)}});i.origFuncs.unshift=t.unshift;Object.defineProperty(i.data,"unshift",{enumerable:false,configurable:true,value:function r(){var n=Array.from(arguments);if(!i.blocked&&e===i.currentVersion){n.forEach((function(t){i.table.rowManager.addRowActual(t,true)}))}return i.origFuncs.unshift.apply(t,arguments)}});i.origFuncs.shift=t.shift;Object.defineProperty(i.data,"shift",{enumerable:false,configurable:true,value:function r(){var n;if(!i.blocked&&e===i.currentVersion){if(i.data.length){n=i.table.rowManager.getRowFromDataObject(i.data[0]);if(n){n.deleteActual()}}}return i.origFuncs.shift.call(t)}});i.origFuncs.pop=t.pop;Object.defineProperty(i.data,"pop",{enumerable:false,configurable:true,value:function r(){var n;if(!i.blocked&&e===i.currentVersion){if(i.data.length){n=i.table.rowManager.getRowFromDataObject(i.data[i.data.length-1]);if(n){n.deleteActual()}}}return i.origFuncs.pop.call(t)}});i.origFuncs.splice=t.splice;Object.defineProperty(i.data,"splice",{enumerable:false,configurable:true,value:function r(){var n=Array.from(arguments),o=n[0]<0?t.length+n[0]:n[0],s=n[1],a=n[2]?n.slice(2):false,u;if(!i.blocked&&e===i.currentVersion){if(a){u=t[o]?i.table.rowManager.getRowFromDataObject(t[o]):false;if(u){a.forEach((function(t){i.table.rowManager.addRowActual(t,true,u,true)}))}else{a=a.slice().reverse();a.forEach((function(t){i.table.rowManager.addRowActual(t,true,false,true)}))}}if(s!==0){var l=t.slice(o,typeof n[1]==="undefined"?n[1]:o+s);l.forEach((function(t,e){var r=i.table.rowManager.getRowFromDataObject(t);if(r){r.deleteActual(e!==l.length-1)}}))}if(a||s!==0){i.table.rowManager.reRenderInPosition()}}return i.origFuncs.splice.apply(t,arguments)}})};vt.prototype.unwatchData=function(){if(this.data!==false){for(var t in this.origFuncs){Object.defineProperty(this.data,t,{enumerable:true,configurable:true,writable:true,value:this.origFuncs.key})}}};vt.prototype.watchRow=function(t){var i=t.getData();this.blocked=true;for(var e in i){this.watchKey(t,i,e)}if(this.table.options.dataTree){this.watchTreeChildren(t)}this.blocked=false};vt.prototype.watchTreeChildren=function(t){var i=this,e=t.getData()[this.table.options.dataTreeChildField],r={};function n(){i.table.modules.dataTree.initializeRow(t);i.table.modules.dataTree.layoutRow(t);i.table.rowManager.refreshActiveData("tree",false,true)}if(e){r.push=e.push;Object.defineProperty(e,"push",{enumerable:false,configurable:true,value:function t(){var i=r.push.apply(e,arguments);n();return i}});r.unshift=e.unshift;Object.defineProperty(e,"unshift",{enumerable:false,configurable:true,value:function t(){var i=r.unshift.apply(e,arguments);n();return i}});r.shift=e.shift;Object.defineProperty(e,"shift",{enumerable:false,configurable:true,value:function t(){var i=r.shift.call(e);n();return i}});r.pop=e.pop;Object.defineProperty(e,"pop",{enumerable:false,configurable:true,value:function t(){var i=r.pop.call(e);n();return i}});r.splice=e.splice;Object.defineProperty(e,"splice",{enumerable:false,configurable:true,value:function t(){var i=r.splice.apply(e,arguments);n();return i}})}};vt.prototype.watchKey=function(t,i,e){var r=this,n=Object.getOwnPropertyDescriptor(i,e),o=i[e],s=this.currentVersion;Object.defineProperty(i,e,{set:function i(a){o=a;if(!r.blocked&&s===r.currentVersion){var u={};u[e]=a;t.updateData(u)}if(n.set){n.set(a)}},get:function t(){if(n.get){n.get()}return o}})};vt.prototype.unwatchRow=function(t){var i=t.getData();for(var e in i){Object.defineProperty(i,e,{value:i[e]})}};vt.prototype.block=function(){this.blocked=true};vt.prototype.unblock=function(){this.blocked=false};H.prototype.registerModule("reactiveData",vt);var mt=function t(i){this.table=i;this.startColumn=false;this.startX=false;this.startWidth=false;this.handle=null;this.prevHandle=null};mt.prototype.initializeColumn=function(t,i,e){var r=this,n=false,o=this.table.options.resizableColumns;if(t==="header"){n=i.definition.formatter=="textarea"||i.definition.variableHeight;i.modules.resize={variableHeight:n}}if(o===true||o==t){var s=document.createElement("div");s.className="tabulator-col-resize-handle";var a=document.createElement("div");a.className="tabulator-col-resize-handle prev";s.addEventListener("click",(function(t){t.stopPropagation()}));var u=function t(e){var n=i.getLastColumn();if(n&&r._checkResizability(n)){r.startColumn=i;r._mouseDown(e,n,s)}};s.addEventListener("mousedown",u);s.addEventListener("touchstart",u,{passive:true});s.addEventListener("dblclick",(function(t){var e=i.getLastColumn();if(e&&r._checkResizability(e)){t.stopPropagation();e.reinitializeWidth(true)}}));a.addEventListener("click",(function(t){t.stopPropagation()}));var l=function t(e){var n,o,s;n=i.getFirstColumn();if(n){o=r.table.columnManager.findColumnIndex(n);s=o>0?r.table.columnManager.getColumnByIndex(o-1):false;if(s&&r._checkResizability(s)){r.startColumn=i;r._mouseDown(e,s,a)}}};a.addEventListener("mousedown",l);a.addEventListener("touchstart",l,{passive:true});a.addEventListener("dblclick",(function(t){var e,n,o;e=i.getFirstColumn();if(e){n=r.table.columnManager.findColumnIndex(e);o=n>0?r.table.columnManager.getColumnByIndex(n-1):false;if(o&&r._checkResizability(o)){t.stopPropagation();o.reinitializeWidth(true)}}}));e.appendChild(s);e.appendChild(a)}};mt.prototype._checkResizability=function(t){return typeof t.definition.resizable!="undefined"?t.definition.resizable:this.table.options.resizableColumns};mt.prototype._mouseDown=function(t,i,e){var r=this;r.table.element.classList.add("tabulator-block-select");function n(t){if(r.table.rtl){i.setWidth(r.startWidth-((typeof t.screenX==="undefined"?t.touches[0].screenX:t.screenX)-r.startX))}else{i.setWidth(r.startWidth+((typeof t.screenX==="undefined"?t.touches[0].screenX:t.screenX)-r.startX))}if(r.table.options.virtualDomHoz){r.table.vdomHoz.reinitialize(true)}if(!r.table.browserSlow&&i.modules.resize&&i.modules.resize.variableHeight){i.checkCellHeights()}}function o(t){if(r.startColumn.modules.edit){r.startColumn.modules.edit.blocked=false}if(r.table.browserSlow&&i.modules.resize&&i.modules.resize.variableHeight){i.checkCellHeights()}document.body.removeEventListener("mouseup",o);document.body.removeEventListener("mousemove",n);e.removeEventListener("touchmove",n);e.removeEventListener("touchend",o);r.table.element.classList.remove("tabulator-block-select");if(r.table.options.persistence&&r.table.modExists("persistence",true)&&r.table.modules.persistence.config.columns){r.table.modules.persistence.save("columns")}r.table.options.columnResized.call(r.table,i.getComponent())}t.stopPropagation();if(r.startColumn.modules.edit){r.startColumn.modules.edit.blocked=true}r.startX=typeof t.screenX==="undefined"?t.touches[0].screenX:t.screenX;r.startWidth=i.getWidth();document.body.addEventListener("mousemove",n);document.body.addEventListener("mouseup",o);e.addEventListener("touchmove",n,{passive:true});e.addEventListener("touchend",o)};H.prototype.registerModule("resizeColumns",mt);var gt=function t(i){this.table=i;this.startColumn=false;this.startY=false;this.startHeight=false;this.handle=null;this.prevHandle=null};gt.prototype.initializeRow=function(t){var i=this,e=t.getElement();var r=document.createElement("div");r.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev";r.addEventListener("click",(function(t){t.stopPropagation()}));var o=function e(n){i.startRow=t;i._mouseDown(n,t,r)};r.addEventListener("mousedown",o);r.addEventListener("touchstart",o,{passive:true});n.addEventListener("click",(function(t){t.stopPropagation()}));var s=function e(r){var o=i.table.rowManager.prevDisplayRow(t);if(o){i.startRow=o;i._mouseDown(r,o,n)}};n.addEventListener("mousedown",s);n.addEventListener("touchstart",s,{passive:true});e.appendChild(r);e.appendChild(n)};gt.prototype._mouseDown=function(t,i,e){var r=this;r.table.element.classList.add("tabulator-block-select");function n(t){i.setHeight(r.startHeight+((typeof t.screenY==="undefined"?t.touches[0].screenY:t.screenY)-r.startY))}function o(t){document.body.removeEventListener("mouseup",n);document.body.removeEventListener("mousemove",n);e.removeEventListener("touchmove",n);e.removeEventListener("touchend",o);r.table.element.classList.remove("tabulator-block-select");r.table.options.rowResized.call(this.table,i.getComponent())}t.stopPropagation();r.startY=typeof t.screenY==="undefined"?t.touches[0].screenY:t.screenY;r.startHeight=i.getHeight();document.body.addEventListener("mousemove",n);document.body.addEventListener("mouseup",o);e.addEventListener("touchmove",n,{passive:true});e.addEventListener("touchend",o)};H.prototype.registerModule("resizeRows",gt);var wt=function t(i){this.table=i;this.binding=false;this.observer=false;this.containerObserver=false;this.tableHeight=0;this.tableWidth=0;this.containerHeight=0;this.containerWidth=0;this.autoResize=false};wt.prototype.initialize=function(t){var i=this;var e=this.table,r;this.tableHeight=e.element.clientHeight;this.tableWidth=e.element.clientWidth;if(e.element.parentNode){this.containerHeight=e.element.parentNode.clientHeight;this.containerWidth=e.element.parentNode.clientWidth}if(typeof ResizeObserver!=="undefined"&&e.rowManager.getRenderMode()==="virtual"){this.autoResize=true;this.observer=new ResizeObserver((function(t){if(!e.browserMobile||e.browserMobile&&!e.modules.edit.currentCell){var r=Math.floor(t[0].contentRect.height);var n=Math.floor(t[0].contentRect.width);if(i.tableHeight!=r||i.tableWidth!=n){i.tableHeight=r;i.tableWidth=n;if(e.element.parentNode){i.containerHeight=e.element.parentNode.clientHeight;i.containerWidth=e.element.parentNode.clientWidth}if(e.options.virtualDomHoz){e.vdomHoz.reinitialize(true)}e.redraw()}}}));this.observer.observe(e.element);r=window.getComputedStyle(e.element);if(this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(r.getPropertyValue("max-height")||r.getPropertyValue("min-height"))){this.containerObserver=new ResizeObserver((function(t){if(!e.browserMobile||e.browserMobile&&!e.modules.edit.currentCell){var r=Math.floor(t[0].contentRect.height);var n=Math.floor(t[0].contentRect.width);if(i.containerHeight!=r||i.containerWidth!=n){i.containerHeight=r;i.containerWidth=n;i.tableHeight=e.element.clientHeight;i.tableWidth=e.element.clientWidth}if(e.options.virtualDomHoz){e.vdomHoz.reinitialize(true)}e.redraw()}}));this.containerObserver.observe(this.table.element.parentNode)}}else{this.binding=function(){if(!e.browserMobile||e.browserMobile&&!e.modules.edit.currentCell){if(e.options.virtualDomHoz){e.vdomHoz.reinitialize(true)}e.redraw()}};window.addEventListener("resize",this.binding)}};wt.prototype.clearBindings=function(t){if(this.binding){window.removeEventListener("resize",this.binding)}if(this.observer){this.observer.unobserve(this.table.element)}if(this.containerObserver){this.containerObserver.unobserve(this.table.element.parentNode)}};H.prototype.registerModule("resizeTable",wt);var yt=function t(i){this.table=i;this.columns=[];this.hiddenColumns=[];this.mode="";this.index=0;this.collapseFormatter=[];this.collapseStartOpen=true;this.collapseHandleColumn=false};yt.prototype.initialize=function(){var t=this,i=[];this.mode=this.table.options.responsiveLayout;this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData;this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen;this.hiddenColumns=[];this.table.columnManager.columnsByIndex.forEach((function(e,r){if(e.modules.responsive){if(e.modules.responsive.order&&e.modules.responsive.visible){e.modules.responsive.index=r;i.push(e);if(!e.visible&&t.mode==="collapse"){t.hiddenColumns.push(e)}}}}));i=i.reverse();i=i.sort((function(t,i){var e=i.modules.responsive.order-t.modules.responsive.order;return e||i.modules.responsive.index-t.modules.responsive.index}));this.columns=i;if(this.mode==="collapse"){this.generateCollapsedContent()}for(var e=this.table.columnManager.columnsByIndex,r=Array.isArray(e),n=0,e=r?e:e[Symbol.iterator]();;){var o;if(r){if(n>=e.length)break;o=e[n++]}else{n=e.next();if(n.done)break;o=n.value}var s=o;if(s.definition.formatter=="responsiveCollapse"){this.collapseHandleColumn=s;break}}if(this.collapseHandleColumn){if(this.hiddenColumns.length){this.collapseHandleColumn.show()}else{this.collapseHandleColumn.hide()}}};yt.prototype.initializeColumn=function(t){var i=t.getDefinition();t.modules.responsive={order:typeof i.responsive==="undefined"?1:i.responsive,visible:i.visible===false?false:true}};yt.prototype.initializeRow=function(t){var i;if(t.type!=="calc"){i=document.createElement("div");i.classList.add("tabulator-responsive-collapse");t.modules.responsiveLayout={element:i,open:this.collapseStartOpen};if(!this.collapseStartOpen){i.style.display="none"}}};yt.prototype.layoutRow=function(t){var i=t.getElement();if(t.modules.responsiveLayout){i.appendChild(t.modules.responsiveLayout.element);this.generateCollapsedRowContent(t)}};yt.prototype.updateColumnVisibility=function(t,i){if(t.modules.responsive){t.modules.responsive.visible=i;this.initialize()}};yt.prototype.hideColumn=function(t){var i=this.hiddenColumns.length;t.hide(false,true);if(this.mode==="collapse"){this.hiddenColumns.unshift(t);this.generateCollapsedContent();if(this.collapseHandleColumn&&!i){this.collapseHandleColumn.show()}}};yt.prototype.showColumn=function(t){var i;t.show(false,true);t.setWidth(t.getWidth());if(this.mode==="collapse"){i=this.hiddenColumns.indexOf(t);if(i>-1){this.hiddenColumns.splice(i,1)}this.generateCollapsedContent();if(this.collapseHandleColumn&&!this.hiddenColumns.length){this.collapseHandleColumn.hide()}}};yt.prototype.update=function(){var t=this,i=true;while(i){var e=t.table.modules.layout.getMode()=="fitColumns"?t.table.columnManager.getFlexBaseWidth():t.table.columnManager.getWidth();var r=(t.table.options.headerVisible?t.table.columnManager.element.clientWidth:t.table.element.clientWidth)-e;if(r<0){var n=t.columns[t.index];if(n){t.hideColumn(n);t.index++}else{i=false}}else{var o=t.columns[t.index-1];if(o){if(r>0){if(r>=o.getWidth()){t.showColumn(o);t.index--}else{i=false}}else{i=false}}else{i=false}}if(!t.table.rowManager.activeRowsCount){t.table.rowManager.renderEmptyScroll()}}};yt.prototype.generateCollapsedContent=function(){var t=this,i=this.table.rowManager.getDisplayRows();i.forEach((function(i){t.generateCollapsedRowContent(i)}))};yt.prototype.generateCollapsedRowContent=function(t){var i,e;if(t.modules.responsiveLayout){i=t.modules.responsiveLayout.element;while(i.firstChild){i.removeChild(i.firstChild)}e=this.collapseFormatter(this.generateCollapsedRowData(t));if(e){i.appendChild(e)}}};yt.prototype.generateCollapsedRowData=function(t){var i=this,e=t.getData(),r=[],n;this.hiddenColumns.forEach((function(o){var s=o.getFieldValue(e);if(o.definition.title&&o.field){if(o.modules.format&&i.table.options.responsiveLayoutCollapseUseFormatters){n={value:false,data:{},getValue:function t(){return s},getData:function t(){return e},getElement:function t(){return document.createElement("div")},getRow:function i(){return t.getComponent()},getColumn:function t(){return o.getComponent()}};r.push({field:o.field,title:o.definition.title,value:o.modules.format.formatter.call(i.table.modules.format,n,o.modules.format.params)})}else{r.push({field:o.field,title:o.definition.title,value:s})}}}));return r};yt.prototype.formatCollapsedData=function(t){var i=document.createElement("table");t.forEach((function(t){var e=document.createElement("tr");var r=document.createElement("td");var n=document.createElement("td");var o;var s=document.createElement("strong");r.appendChild(s);this.table.modules.localize.bind("columns|"+t.field,(function(i){s.innerText=i||t.title}));if(t.value instanceof Node){o=document.createElement("div");o.appendChild(t.value);n.appendChild(o)}else{n.innerHTML=t.value}e.appendChild(r);e.appendChild(n);i.appendChild(e)}),this);return Object.keys(t).length?i:""};H.prototype.registerModule("responsiveLayout",yt);var xt=function t(i){this.table=i;this.selecting=false;this.lastClickedRow=false;this.selectPrev=[];this.selectedRows=[];this.headerCheckboxElement=null};xt.prototype.clearSelectionData=function(t){this.selecting=false;this.lastClickedRow=false;this.selectPrev=[];this.selectedRows=[];if(!t){this._rowSelectionChanged()}};xt.prototype.initializeRow=function(t){var i=this,e=t.getElement();var r=function t(){setTimeout((function(){i.selecting=false}),50);document.body.removeEventListener("mouseup",t)};t.modules.select={selected:false};if(i.table.options.selectableCheck.call(this.table,t.getComponent())){e.classList.add("tabulator-selectable");e.classList.remove("tabulator-unselectable");if(i.table.options.selectable&&i.table.options.selectable!="highlight"){if(i.table.options.selectableRangeMode==="click"){e.addEventListener("click",(function(e){if(e.shiftKey){i.table._clearSelection();i.lastClickedRow=i.lastClickedRow||t;var r=i.table.rowManager.getDisplayRowIndex(i.lastClickedRow);var n=i.table.rowManager.getDisplayRowIndex(t);var o=r<=n?r:n;var s=r>=n?r:n;var a=i.table.rowManager.getDisplayRows().slice(0);var u=a.splice(o,s-o+1);if(e.ctrlKey||e.metaKey){u.forEach((function(e){if(e!==i.lastClickedRow){if(i.table.options.selectable!==true&&!i.isRowSelected(t)){if(i.selectedRows.length<i.table.options.selectable){i.toggleRow(e)}}else{i.toggleRow(e)}}}));i.lastClickedRow=t}else{i.deselectRows(undefined,true);if(i.table.options.selectable!==true){if(u.length>i.table.options.selectable){u=u.slice(0,i.table.options.selectable)}}i.selectRows(u)}i.table._clearSelection()}else if(e.ctrlKey||e.metaKey){i.toggleRow(t);i.lastClickedRow=t}else{i.deselectRows(undefined,true);i.selectRows(t);i.lastClickedRow=t}}))}else{e.addEventListener("click",(function(e){if(!i.table.modExists("edit")||!i.table.modules.edit.getCurrentCell()){i.table._clearSelection()}if(!i.selecting){i.toggleRow(t)}}));e.addEventListener("mousedown",(function(e){if(e.shiftKey){i.table._clearSelection();i.selecting=true;i.selectPrev=[];document.body.addEventListener("mouseup",r);document.body.addEventListener("keyup",r);i.toggleRow(t);return false}}));e.addEventListener("mouseenter",(function(e){if(i.selecting){i.table._clearSelection();i.toggleRow(t);if(i.selectPrev[1]==t){i.toggleRow(i.selectPrev[0])}}}));e.addEventListener("mouseout",(function(e){if(i.selecting){i.table._clearSelection();i.selectPrev.unshift(t)}}))}}}else{e.classList.add("tabulator-unselectable");e.classList.remove("tabulator-selectable")}};xt.prototype.toggleRow=function(t){if(this.table.options.selectableCheck.call(this.table,t.getComponent())){if(t.modules.select&&t.modules.select.selected){this._deselectRow(t)}else{this._selectRow(t)}}};xt.prototype.selectRows=function(t){var i=this;var e;switch(typeof t==="undefined"?"undefined":T(t)){case"undefined":this.table.rowManager.rows.forEach((function(t){i._selectRow(t,true,true)}));this._rowSelectionChanged();break;case"string":e=this.table.rowManager.findRow(t);if(e){this._selectRow(e,true,true)}else{this.table.rowManager.getRows(t).forEach((function(t){i._selectRow(t,true,true)}))}this._rowSelectionChanged();break;default:if(Array.isArray(t)){t.forEach((function(t){i._selectRow(t,true,true)}));this._rowSelectionChanged()}else{this._selectRow(t,false,true)}break}};xt.prototype._selectRow=function(t,i,e){if(!isNaN(this.table.options.selectable)&&this.table.options.selectable!==true&&!e){if(this.selectedRows.length>=this.table.options.selectable){if(this.table.options.selectableRollingSelection){this._deselectRow(this.selectedRows[0])}else{return false}}}var r=this.table.rowManager.findRow(t);if(r){if(this.selectedRows.indexOf(r)==-1){r.getElement().classList.add("tabulator-selected");if(!r.modules.select){r.modules.select={}}r.modules.select.selected=true;if(r.modules.select.checkboxEl){r.modules.select.checkboxEl.checked=true}this.selectedRows.push(r);if(this.table.options.dataTreeSelectPropagate){this.childRowSelection(r,true)}if(!i){this.table.options.rowSelected.call(this.table,r.getComponent())}this._rowSelectionChanged(i)}}else{if(!i){console.warn("Selection Error - No such row found, ignoring selection:"+t)}}};xt.prototype.isRowSelected=function(t){return this.selectedRows.indexOf(t)!==-1};xt.prototype.deselectRows=function(t,i){var e=this,r;if(typeof t=="undefined"){r=e.selectedRows.length;for(var n=0;n<r;n++){e._deselectRow(e.selectedRows[0],true)}e._rowSelectionChanged(i)}else{if(Array.isArray(t)){t.forEach((function(t){e._deselectRow(t,true)}));e._rowSelectionChanged(i)}else{e._deselectRow(t,i)}}};xt.prototype._deselectRow=function(t,i){var e=this,r=e.table.rowManager.findRow(t),n;if(r){n=e.selectedRows.findIndex((function(t){return t==r}));if(n>-1){r.getElement().classList.remove("tabulator-selected");if(!r.modules.select){r.modules.select={}}r.modules.select.selected=false;if(r.modules.select.checkboxEl){r.modules.select.checkboxEl.checked=false}e.selectedRows.splice(n,1);if(this.table.options.dataTreeSelectPropagate){this.childRowSelection(r,false)}if(!i){e.table.options.rowDeselected.call(this.table,r.getComponent())}e._rowSelectionChanged(i)}}else{if(!i){console.warn("Deselection Error - No such row found, ignoring selection:"+t)}}};xt.prototype.getSelectedData=function(){var t=[];this.selectedRows.forEach((function(i){t.push(i.getData())}));return t};xt.prototype.getSelectedRows=function(){var t=[];this.selectedRows.forEach((function(i){t.push(i.getComponent())}));return t};xt.prototype._rowSelectionChanged=function(t){if(this.headerCheckboxElement){if(this.selectedRows.length===0){this.headerCheckboxElement.checked=false;this.headerCheckboxElement.indeterminate=false}else if(this.table.rowManager.rows.length===this.selectedRows.length){this.headerCheckboxElement.checked=true;this.headerCheckboxElement.indeterminate=false}else{this.headerCheckboxElement.indeterminate=true;this.headerCheckboxElement.checked=false}}if(!t){this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())}};xt.prototype.registerRowSelectCheckbox=function(t,i){if(!t._row.modules.select){t._row.modules.select={}}t._row.modules.select.checkboxEl=i};xt.prototype.registerHeaderSelectCheckbox=function(t){this.headerCheckboxElement=t};xt.prototype.childRowSelection=function(t,i){var e=this.table.modules.dataTree.getChildren(t,true);if(i){for(var r=e,n=Array.isArray(r),o=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(o>=r.length)break;s=r[o++]}else{o=r.next();if(o.done)break;s=o.value}var a=s;this._selectRow(a,true)}}else{for(var u=e,l=Array.isArray(u),f=0,u=l?u:u[Symbol.iterator]();;){var h;if(l){if(f>=u.length)break;h=u[f++]}else{f=u.next();if(f.done)break;h=f.value}var c=h;this._deselectRow(c,true)}}};H.prototype.registerModule("selectRow",xt);var kt=function t(i){this.table=i;this.sortList=[];this.changed=false};kt.prototype.initializeColumn=function(t,i){var e=this,r=false,n,o;switch(T(t.definition.sorter)){case"string":if(e.sorters[t.definition.sorter]){r=e.sorters[t.definition.sorter]}else{console.warn("Sort Error - No such sorter found: ",t.definition.sorter)}break;case"function":r=t.definition.sorter;break}t.modules.sort={sorter:r,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc",tristate:typeof t.definition.headerSortTristate!=="undefined"?t.definition.headerSortTristate:this.table.options.headerSortTristate};if(typeof t.definition.headerSort==="undefined"?this.table.options.headerSort!==false:t.definition.headerSort!==false){n=t.getElement();n.classList.add("tabulator-sortable");o=document.createElement("div");o.classList.add("tabulator-col-sorter");if(T(this.table.options.headerSortElement)=="object"){o.appendChild(this.table.options.headerSortElement)}else{o.innerHTML=this.table.options.headerSortElement}i.appendChild(o);t.modules.sort.element=o;n.addEventListener("click",(function(i){var r="",n=[],o=false;if(t.modules.sort){if(t.modules.sort.tristate){if(t.modules.sort.dir=="none"){r=t.modules.sort.startingDir}else{if(t.modules.sort.dir==t.modules.sort.startingDir){r=t.modules.sort.dir=="asc"?"desc":"asc"}else{r="none"}}}else{switch(t.modules.sort.dir){case"asc":r="desc";break;case"desc":r="asc";break;default:r=t.modules.sort.startingDir}}if(e.table.options.columnHeaderSortMulti&&(i.shiftKey||i.ctrlKey)){n=e.getSort();o=n.findIndex((function(i){return i.field===t.getField()}));if(o>-1){n[o].dir=r;if(o!=n.length-1){o=n.splice(o,1)[0];if(r!="none"){n.push(o)}}}else{if(r!="none"){n.push({column:t,dir:r})}}e.setSort(n)}else{if(r=="none"){e.clear()}else{e.setSort(t,r)}}e.table.rowManager.sorterRefresh(!e.sortList.length)}}))}};kt.prototype.hasChanged=function(){var t=this.changed;this.changed=false;return t};kt.prototype.getSort=function(){var t=this,i=[];t.sortList.forEach((function(t){if(t.column){i.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})}}));return i};kt.prototype.setSort=function(t,i){var e=this,r=[];if(!Array.isArray(t)){t=[{column:t,dir:i}]}t.forEach((function(t){var i;i=e.table.columnManager.findColumn(t.column);if(i){t.column=i;r.push(t);e.changed=true}else{console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)}}));e.sortList=r;if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.sort){this.table.modules.persistence.save("sort")}};kt.prototype.clear=function(){this.setSort([])};kt.prototype.findSorter=function(t){var i=this.table.rowManager.activeRows[0],e="string",r,n;if(i){i=i.getData();r=t.getField();if(r){n=t.getFieldValue(i);switch(typeof n==="undefined"?"undefined":T(n)){case"undefined":e="string";break;case"boolean":e="boolean";break;default:if(!isNaN(n)&&n!==""){e="number"}else{if(n.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){e="alphanum"}}break}}}return this.sorters[e]};kt.prototype.sort=function(t){var i=this,e=this.table.options.sortOrderReverse?i.sortList.slice().reverse():i.sortList,r=[],n=[];if(i.table.options.dataSorting){i.table.options.dataSorting.call(i.table,i.getSort())}i.clearColumnHeaders();if(!i.table.options.ajaxSorting){e.forEach((function(t,e){var n=t.column.modules.sort;if(t.column&&n){if(!n.sorter){n.sorter=i.findSorter(t.column)}t.params=typeof n.params==="function"?n.params(t.column.getComponent(),t.dir):n.params;r.push(t)}i.setColumnHeader(t.column,t.dir)}));if(r.length){i._sortItems(t,r)}}else{e.forEach((function(t,e){i.setColumnHeader(t.column,t.dir)}))}if(i.table.options.dataSorted){t.forEach((function(t){n.push(t.getComponent())}));i.table.options.dataSorted.call(i.table,i.getSort(),n)}};kt.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach((function(t){if(t.modules.sort){t.modules.sort.dir="none";t.getElement().setAttribute("aria-sort","none")}}))};kt.prototype.setColumnHeader=function(t,i){t.modules.sort.dir=i;t.getElement().setAttribute("aria-sort",i)};kt.prototype._sortItems=function(t,i){var e=this;var r=i.length-1;t.sort((function(t,n){var o;for(var s=r;s>=0;s--){var a=i[s];o=e._sortRow(t,n,a.column,a.dir,a.params);if(o!==0){break}}return o}))};kt.prototype._sortRow=function(t,i,e,r,n){var o,s;var a=r=="asc"?t:i;var u=r=="asc"?i:t;t=e.getFieldValue(a.getData());i=e.getFieldValue(u.getData());t=typeof t!=="undefined"?t:"";i=typeof i!=="undefined"?i:"";o=a.getComponent();s=u.getComponent();return e.modules.sort.sorter.call(this,t,i,o,s,e.getComponent(),r,n)};kt.prototype.sorters={number:function t(i,e,r,n,o,s,a){var u=a.alignEmptyValues;var l=a.decimalSeparator;var f=a.thousandSeparator;var h=0;i=String(i);e=String(e);if(f){i=i.split(f).join("");e=e.split(f).join("")}if(l){i=i.split(l).join(".");e=e.split(l).join(".")}i=parseFloat(i);e=parseFloat(e);if(isNaN(i)){h=isNaN(e)?0:-1}else if(isNaN(e)){h=1}else{return i-e}if(u==="top"&&s==="desc"||u==="bottom"&&s==="asc"){h*=-1}return h},string:function t(i,e,r,n,o,s,a){var u=a.alignEmptyValues;var l=0;var f;if(!i){l=!e?0:-1}else if(!e){l=1}else{switch(T(a.locale)){case"boolean":if(a.locale){f=this.table.modules.localize.getLocale()}break;case"string":f=a.locale;break}return String(i).toLowerCase().localeCompare(String(e).toLowerCase(),f)}if(u==="top"&&s==="desc"||u==="bottom"&&s==="asc"){l*=-1}return l},date:function t(i,e,r,n,o,s,a){if(!a.format){a.format="DD/MM/YYYY"}return this.sorters.datetime.call(this,i,e,r,n,o,s,a)},time:function t(i,e,r,n,o,s,a){if(!a.format){a.format="HH:mm"}return this.sorters.datetime.call(this,i,e,r,n,o,s,a)},datetime:function t(i,e,r,n,o,s,a){var u=a.format||"DD/MM/YYYY HH:mm:ss",l=a.alignEmptyValues,f=0;if(typeof moment!="undefined"){i=moment(i,u);e=moment(e,u);if(!i.isValid()){f=!e.isValid()?0:-1}else if(!e.isValid()){f=1}else{return i-e}if(l==="top"&&s==="desc"||l==="bottom"&&s==="asc"){f*=-1}return f}else{console.error("Sort Error - 'datetime' sorter is dependant on moment.js")}},boolean:function t(i,e,r,n,o,s,a){var u=i===true||i==="true"||i==="True"||i===1?1:0;var l=e===true||e==="true"||e==="True"||e===1?1:0;return u-l},array:function t(i,e,r,n,o,s,a){var u=0;var l=0;var f=a.type||"length";var h=a.alignEmptyValues;var c=0;function d(t){switch(f){case"length":return t.length;case"sum":return t.reduce((function(t,i){return t+i}));case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce((function(t,i){return t+i}))/t.length}}if(!Array.isArray(i)){h=!Array.isArray(e)?0:-1}else if(!Array.isArray(e)){h=1}else{u=i?d(i):0;l=e?d(e):0;return u-l}if(h==="top"&&s==="desc"||h==="bottom"&&s==="asc"){c*=-1}return c},exists:function t(i,e,r,n,o,s,a){var u=typeof i=="undefined"?0:1;var l=typeof e=="undefined"?0:1;return u-l},alphanum:function t(i,e,r,n,o,s,a){var u,l,f,h,c=0,d,b=/(\d+)|(\D+)/g,p=/\d/;var v=a.alignEmptyValues;var m=0;if(!i&&i!==0){m=!e&&e!==0?0:-1}else if(!e&&e!==0){m=1}else{if(isFinite(i)&&isFinite(e))return i-e;u=String(i).toLowerCase();l=String(e).toLowerCase();if(u===l)return 0;if(!(p.test(u)&&p.test(l)))return u>l?1:-1;u=u.match(b);l=l.match(b);d=u.length>l.length?l.length:u.length;while(c<d){f=u[c];h=l[c++];if(f!==h){if(isFinite(f)&&isFinite(h)){if(f.charAt(0)==="0")f="."+f;if(h.charAt(0)==="0")h="."+h;return f-h}else return f>h?1:-1}}return u.length>l.length}if(v==="top"&&s==="desc"||v==="bottom"&&s==="asc"){m*=-1}return m}};H.prototype.registerModule("sort",kt);var Ct=function t(i){this.table=i;this.invalidCells=[]};Ct.prototype.initializeColumn=function(t){var i=this,e=[],r;if(t.definition.validator){if(Array.isArray(t.definition.validator)){t.definition.validator.forEach((function(t){r=i._extractValidator(t);if(r){e.push(r)}}))}else{r=this._extractValidator(t.definition.validator);if(r){e.push(r)}}t.modules.validate=e.length?e:false}};Ct.prototype._extractValidator=function(t){var i,e,r;switch(typeof t==="undefined"?"undefined":T(t)){case"string":r=t.indexOf(":");if(r>-1){i=t.substring(0,r);e=t.substring(r+1)}else{i=t}return this._buildValidator(i,e);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}};Ct.prototype._buildValidator=function(t,i){var e=typeof t=="function"?t:this.validators[t];if(!e){console.warn("Validator Setup Error - No matching validator found:",t);return false}else{return{type:typeof t=="function"?"function":t,func:e,params:i}}};Ct.prototype.validate=function(t,i,e){var r=this,n=[],o=this.invalidCells.indexOf(i);if(t){t.forEach((function(t){if(!t.func.call(r,i.getComponent(),e,t.params)){n.push({type:t.type,parameters:t.params})}}))}n=n.length?n:true;if(!i.modules.validate){i.modules.validate={}}if(n===true){i.modules.validate.invalid=false;i.getElement().classList.remove("tabulator-validation-fail");if(o>-1){this.invalidCells.splice(o,1)}}else{i.modules.validate.invalid=true;if(this.table.options.validationMode!=="manual"){i.getElement().classList.add("tabulator-validation-fail")}if(o==-1){this.invalidCells.push(i)}}return n};Ct.prototype.getInvalidCells=function(){var t=[];this.invalidCells.forEach((function(i){t.push(i.getComponent())}));return t};Ct.prototype.clearValidation=function(t){var i;if(t.modules.validate&&t.modules.validate.invalid){t.getElement().classList.remove("tabulator-validation-fail");t.modules.validate.invalid=false;i=this.invalidCells.indexOf(t);if(i>-1){this.invalidCells.splice(i,1)}}};Ct.prototype.validators={integer:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}e=Number(e);return typeof e==="number"&&isFinite(e)&&Math.floor(e)===e},float:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}e=Number(e);return typeof e==="number"&&isFinite(e)&&e%1!==0},numeric:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return!isNaN(e)},string:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return isNaN(e)},max:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return parseFloat(e)<=r},min:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return parseFloat(e)>=r},starts:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return String(e).toLowerCase().startsWith(String(r).toLowerCase())},ends:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return String(e).toLowerCase().endsWith(String(r).toLowerCase())},minLength:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return String(e).length>=r},maxLength:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return String(e).length<=r},in:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}if(typeof r=="string"){r=r.split("|")}return e===""||r.indexOf(e)>-1},regex:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}var n=new RegExp(r);return n.test(e)},unique:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}var t=true;var n=i.getData();var o=i.getColumn()._getSelf();this.table.rowManager.rows.forEach((function(i){var r=i.getData();if(r!==n){if(e==o.getFieldValue(r)){t=false}}}));return t},required:function t(i,e,r){return e!==""&&e!==null&&typeof e!=="undefined"}};H.prototype.registerModule("validate",Ct);const{replace:Et}="";const jt=/[&<>'"]/g;const zt={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"};const Tt=t=>zt[t];const St=t=>Et.call(t,jt,Tt);class Rt{constructor(t){this.pool=t;this.create=this.create.bind(this)}create(t){var i;const e={title:t.title,field:t.field,hozAlign:t.horizontalAlign,headerSort:t.headerSort,headerSortStartingDir:"desc"};if(t.headerComponent){e.titleFormatter=Nt(t)}if(((i=t.component)===null||i===void 0?void 0:i.name)||t.formatter){e.formatter=Mt(t,this.pool);e.formatterParams=t}if(t.aggregator){e.bottomCalc=_t(t)}return e}}const Nt=t=>()=>{const i=document.createElement("div");i.setAttribute("class","lime-col-title__custom-component");const e=document.createElement("span");e.setAttribute("class","title-component-text");e.textContent=t.title;const r=document.createElement(t.headerComponent.name);r.setAttribute("class","title-component-slot");let n=t.headerComponent.props||{};if(t.headerComponent.propsFactory){n=Object.assign(Object.assign({},n),t.headerComponent.propsFactory(null))}Ft(r,n);i.append(e);i.append(r);return i};function Mt(t,i){var e;if(!((e=t.component)===null||e===void 0?void 0:e.name)){return Ot}if(!Dt(t)){console.warn(`Failed to render custom component for column "${t.field.toString()}". Custom element <${t.component.name}/> does not exist. Using the default formatter.`);return Ot}return e=>{const r=Ot(e,t);return Pt(e,t,r,i)}}function Dt(t){const i=t.component.name;if(typeof i==="string"){const e=!i.includes("-");const r=customElements.get(t.component.name);return e||r}else{return false}}function Ot(t,i){const e=t.getData();let r=t.getValue();if(i.formatter){r=i.formatter(r,e)}if(typeof r==="string"&&!i.component){r=St(r)}return r}function Pt(t,i,e,r){const n=t.getField();const o=t.getData();const s=r.get(i.component.name);let a=i.component.props||{};if(i.component.propsFactory){a=Object.assign(Object.assign({},a),i.component.propsFactory(o))}a=Object.assign(Object.assign({},a),{field:n,value:e,data:o});s.style.display="inline-block";Ft(s,a);Ht(s,t.getColumn());return s}function Ft(t,i){const e=z(i,m(At));Object.assign(t,e);const r=z(i,At);for(const[i,e]of Object.entries(r)){const r=Lt(i);t.addEventListener(r,e)}}function At(t,i){if(typeof t!=="function"){return false}return/^on[A-Z]/.test(i)}function Lt(t){return t.charAt(2).toLowerCase()+t.slice(3)}function Ht(t,i){if(!("ResizeObserver"in window)){return}const e=1e3;const r=16;const n=new ResizeObserver((()=>{const e=t.getBoundingClientRect().width;const n=e+r;if(n<i.getWidth()){return}i.setWidth(n)}));n.observe(t);setTimeout((()=>{n.unobserve(t)}),e)}const It=t=>i=>{const e=t.find((t=>t.field===i.field));const r=i.dir.toUpperCase();return{column:e,direction:r}};function _t(t){const i=t.aggregator;if(Ut(i)){return(e,r)=>i(t,e,r)}return i}function Ut(t){return typeof t==="function"}class Vt{constructor(t){this.isFree=t=>!this.usedElements.has(t);this.document=t;this.releaseAll();this.clear()}get(t){var i;let e=(i=this.pool[t])===null||i===void 0?void 0:i.find(this.isFree);if(!e){e=this.createElement(t)}this.usedElements.set(e,true);return e}release(t){this.usedElements.delete(t)}releaseAll(){this.usedElements=new WeakMap}clear(){this.pool={}}createElement(t){const i=this.document.createElement(t);if(!(t in this.pool)){this.pool[t]=[]}this.pool[t].push(i);return i}}class Bt{constructor(t){this.getDataByIndex=t;this.toggleRange=(t,i)=>{const e=!this.selectedItems.has(this.getDataByIndex(i));const r=Math.min(t,i);const n=Math.max(t,i);const o=[];const s=[];for(let t=r;t<=n;t++){const i=this.getDataByIndex(t);if(!i){continue}const r=this.selectedItems.has(i);if(r===e){continue}if(e){this.selectedItems.add(i)}else{this.selectedItems.delete(i)}o.push(t);s.push(i)}this.lastToggledIndex=i;return{selected:e,items:s,indexes:o}};this.clear()}get size(){return this.selectedItems.size}get items(){return[...this.selectedItems]}set items(t){this.selectedItems=new Set(t);this.lastToggledIndex=-1}has(t){return this.selectedItems.has(t)}toggleSelection(t){return this.toggleRange(t,t)}toggleSelectionFromLastIndex(t){if(this.lastToggledIndex<0){return this.toggleSelection(t)}return this.toggleRange(this.lastToggledIndex,t)}clear(){this.selectedItems=new Set;this.lastToggledIndex=-1}}const Jt="limel-checkbox";const Wt=t=>{var i;return(i=t.id)!==null&&i!==void 0?i:t};class qt{constructor(t,i,e,r){this.getTable=t;this.pool=i;this.selectEvent=e;this.getTranslation=r;this.rowSelectorCellClick=(t,i)=>{t.stopPropagation();t.preventDefault();const e=i.getRow();const r=e.getPosition(true);if(t.shiftKey){this.updateRowSelectors(this.selection.toggleSelectionFromLastIndex(r))}else{this.updateRowSelectors(this.selection.toggleSelection(r))}this.selectEvent.emit(this.selection.items.map(this.getRowData))};this.getRowData=t=>{if(typeof t==="object"){return t}return this.getTable().getRow(t).getData()};this.updateRowSelectors=t=>{for(const i of t.indexes.map(this.getRowByIndex))this.updateRowSelector(i,t.selected)};this.updateRowSelector=(t,i)=>{const e=t.getCells()[0];if(e){const t=e.getElement().querySelector(Jt);t.checked=i}};this.getActiveRows=()=>{const t=this.getTable();if(!t){return[]}return t.getRows("active")};this.getRowByIndex=t=>this.getTable().getRowFromPosition(t,true);this.selection=new Bt((t=>Wt(this.getRowByIndex(t).getData())))}get hasSelection(){return this.selection.size>0}clear(){this.selection.clear()}setSelection(t=[]){const i=t.map(Wt);if(this.selection.size===t.length&&this.selection.items.every(((t,e)=>t===i[e]))){return}this.selection.items=i;const e=this.getActiveRows();for(const t of e)this.updateRowSelector(t,this.selection.has(Wt(t.getData())))}getColumnDefinitions(t){return[this.getRowSelectorColumnDefinition(),...t]}getRowSelectorColumnDefinition(){return{title:"",formatter:this.getRowSelectorFormatter(),cellClick:this.rowSelectorCellClick,headerClick:this.headerClick,headerSort:false,cssClass:"limel-table--row-selector",resizable:false,htmlOutput:false,clipboard:false}}headerClick(t){t.stopPropagation()}getRowSelectorFormatter(){return t=>{const i=this.pool.get(Jt);Ft(i,{checked:this.selection.has(Wt(t.getData())),label:this.getTranslation("table.select-row")});i.classList.add("hide-label");i.style.display="inline-block";return i}}}function Yt(t){const i={stretchLastColumn:"fitDataStretch",stretchColumns:"fitColumns",lowDensity:"fitData"};return i[t]||"fitDataFill"}const Gt=(t,i)=>{if(t.length!==i.length){return false}return t.every(((t,e)=>g(t,i[e])))};const Xt='@charset "UTF-8";.tabulator{position:relative;border:1px solid #999;background-color:#888;font-size:14px;text-align:left;overflow:hidden;-webkit-transform:translatez(0);-moz-transform:translatez(0);-ms-transform:translatez(0);-o-transform:translatez(0);transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator.tabulator-block-select{user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:1px solid #999;background-color:#e6e6e6;color:#555;font-weight:bold;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;border-right:1px solid #aaa;background:#e6e6e6;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#cdcdcd;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:0.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{display:flex;align-items:center;position:absolute;top:0;bottom:0;right:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:flex;border-top:1px solid #aaa;overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto !important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#cdcdcd}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid #666;color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{writing-mode:vertical-rl;text-orientation:mixed;display:flex;align-items:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{justify-content:center;left:0;right:0;top:4px;bottom:auto}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:600%;background:#f3f3f3 !important;border-top:1px solid #aaa;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#f3f3f3 !important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:flex;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#ccc;font-weight:bold;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:bold;background:#e2e2e2 !important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #aaa}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #aaa}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#e6e6e6;text-align:right;color:#555;font-weight:bold;white-space:nowrap;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px -10px;text-align:left;background:#f3f3f3 !important;border-bottom:1px solid #aaa;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#f3f3f3 !important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator{color:#555;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #aaa;border-radius:3px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:rgba(255, 255, 255, 0.2)}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:0.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0, 0, 0, 0.2);color:#fff}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-loader{position:absolute;display:flex;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0, 0, 0, 0.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:bold;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #D00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#fff}.tabulator-row.tabulator-row-even{background-color:#EFEFEF}.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9ABCEA}.tabulator-row.tabulator-selected:hover{background-color:#769BCC;cursor:pointer}.tabulator-row.tabulator-row-moving{border:1px solid #000;background:#fff}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #aaa;border-bottom:1px solid #aaa;pointer-events:none;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #aaa;border-bottom:1px solid #aaa}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:4px;border-right:1px solid #aaa;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1D68CD;outline:none;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #dd0000}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#dd0000}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:inline-flex;align-items:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0, 0, 0, 0.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0, 0, 0, 0.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:inline-flex;align-items:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:bold;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:0.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open{display:none}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:bold;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0, 0, 0, 0.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#d00}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:#fff;border:1px solid #aaa;box-shadow:0 0 5px 0 rgba(0, 0, 0, 0.2);font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{position:relative;box-sizing:border-box;padding:5px 10px;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:0.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:#EFEFEF}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu{padding-right:25px}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after{display:inline-block;position:absolute;top:calc(5px + 0.4em);right:10px;height:7px;width:7px;content:"";border-width:1px 1px 0 0;border-style:solid;border-color:#aaa;vertical-align:top;transform:rotate(45deg)}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #aaa}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #aaa;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1D68CD}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid rgba(255, 255, 255, 0.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #1D68CD}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1D68CD}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;color:#333;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #aaa;padding:4px;padding-top:6px;color:#333;font-weight:bold}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{text-align:initial;direction:rtl}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{text-align:initial;border-left:1px solid #aaa;border-right:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-right:initial;margin-left:-1px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:0;padding-left:25px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{left:8px;right:initial}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-right:initial;border-left:1px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{margin-right:initial;margin-left:5px;border-bottom-left-radius:initial;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-right:initial;margin-left:5px}.tabulator.tabulator-rtl .tabulator-col-resize-handle{position:absolute;left:0;right:auto}.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev{right:0;left:auto}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>*:not(.tabulator-print-fullscreen){display:none !important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:bold;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:rgba(0, 0, 0, 0.1)}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px !important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px !important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px !important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px !important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px !important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#d00}.tabulator-print-table .tabulator-data-tree-control{display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0, 0, 0, 0.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0, 0, 0, 0.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}:host(limel-table){isolation:isolate;display:block;--table-header-background-color:var(--contrast-500);--table-header-background-color--hover:var(--contrast-400);--table-header-background-color-when-being-dragged:var(--contrast-100);--table-row-background-color--odd:var(--contrast-200);--table-row-background-color--even:var(--contrast-100);--table-row-background-color--hover:var(\n --lime-elevated-surface-background-color\n );--table-row-background-color--active:var(--contrast-300);--table-arrow-color:var(--contrast-800);--table-arrow-color--active:var(\n --lime-primary-color,\n var(--limel-theme-primary-color)\n );--table-text-color:var(--limel-theme-text-primary-on-background-color);--limel-chip-size:1.25rem}#tabulator-container,#tabulator-table{height:100%;width:100%}.tabulator{display:flex;flex-direction:column}.tabulator *{box-sizing:border-box}.tabulator .tabulator-header{flex-shrink:0}.tabulator .tabulator-tableHolder{isolation:isolate;flex-grow:1;height:unset !important;max-height:unset !important;min-height:unset !important;padding-bottom:5rem}.tabulator .tabulator-footer{flex-shrink:0}#tabulator-container{position:relative}#tabulator-container,#tabulator-table{background-color:transparent;border:none}.tabulator .tabulator-header{color:var(--table-text-color)}.tabulator .tabulator-tableHolder .tabulator-table{color:var(--table-text-color);background-color:transparent}.tabulator .tabulator-header{border-bottom:0;background-color:rgb(var(--table-header-background-color))}.tabulator .tabulator-header .tabulator-headers{width:fit-content}.tabulator .tabulator-header .tabulator-col{transition:background-color 0.2s ease;background-color:rgb(var(--table-header-background-color));border-right-color:rgb(var(--contrast-200))}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{background-color:rgb(var(--table-header-background-color--hover))}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{padding:0 0.5rem 0 0.25rem}.tabulator .tabulator-header .tabulator-col-title-holder{height:1.75rem;display:flex;align-items:center;gap:0.25rem}.tabulator .tabulator-header .tabulator-col-sorter{order:1}.tabulator .tabulator-header .tabulator-col-title{order:2;font-weight:500;padding-right:0 !important;line-height:1.25rem}.tabulator-row{height:2.25rem}.tabulator-row .tabulator-cell{border-right:transparent;padding:0.5rem;padding-left:1rem;height:inherit}.tabulator-row .tabulator-cell[style*="text-align: right;"]{justify-content:flex-end}.tabulator-row .tabulator-cell[style*="text-align: center;"]{justify-content:center}.tabulator-row .tabulator-col-resize-handle{display:none}.tabulator-col,.tabulator-cell{max-width:var(--table-max-column-width, 40rem)}#tabulator-loader,#tabulator-empty-text{position:absolute;width:100%;height:100%;z-index:1;display:flex;align-items:center;justify-content:center}#tabulator-loader{background-color:rgba(var(--contrast-100), 0.6);cursor:wait}#tabulator-empty-text{color:rgb(var(--contrast-800));font-weight:bold;font-size:1.25rem;pointer-events:none}limel-chip{transform:translateY(-0.15rem)}.tabulator-col-sorter{transition:opacity 0.2s ease;right:0 !important;position:relative !important;justify-content:center;cursor:pointer}[aria-sort=none] .tabulator-col-sorter{opacity:0}[aria-sort=desc] .tabulator-col-sorter,[aria-sort=asc] .tabulator-col-sorter{opacity:1}[aria-sort=desc] .tabulator-col-sorter:before,[aria-sort=asc] .tabulator-col-sorter:before{position:absolute;content:"";width:0.125rem;height:0.4rem;background-color:var(--table-arrow-color--active)}.tabulator-sortable[aria-sort=desc]:hover .tabulator-col-sorter,.tabulator-sortable[aria-sort=asc]:hover .tabulator-col-sorter{opacity:1;animation:indicate-sortable-sorted-column 0.5s ease}.tabulator-sortable[aria-sort=none]:hover .tabulator-col-sorter{opacity:1}.tabulator-sortable[aria-sort=none]:hover .tabulator-col-sorter .tabulator-arrow{animation:indicate-sortable-unsorted-column 2s ease forwards}.tabulator-arrow{transition:border 0.2s ease;border-left:0.25rem solid transparent !important;border-right:0.25rem solid transparent !important}.tabulator#tabulator-table .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-arrow{height:0.75rem;border-top-width:0.25rem;border-top-style:solid;border-top-color:rgb(var(--table-arrow-color));border-bottom-width:0.25rem;border-bottom-style:solid;border-bottom-color:rgb(var(--table-arrow-color))}.tabulator#tabulator-table .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-arrow{height:0;transform:translate3d(0, -0.2rem, 0) rotate(180deg);border-top-width:0.25rem;border-bottom-width:0;border-top-color:var(--table-arrow-color--active)}.tabulator#tabulator-table .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-arrow{height:0;transform:translate3d(0, 0.2rem, 0) rotate(180deg);border-top-width:0;border-bottom-width:0.25rem;border-bottom-color:var(--table-arrow-color--active)}@keyframes indicate-sortable-sorted-column{0%,100%{transform:translate3d(0, 0, 0)}30%{transform:translate3d(0, -0.0875rem, 0)}60%{transform:translate3d(0, 0.0875rem, 0)}}@keyframes indicate-sortable-unsorted-column{0%,15%,45%,75%{border-top-color:transparent;border-bottom-color:transparent;transform:translate3d(0, 0, 0)}30%{border-top-color:transparent;border-bottom-color:var(--table-arrow-color--active);transform:translate3d(0, -0.3125rem, 0)}60%{border-top-color:var(--table-arrow-color--active);border-bottom-color:transparent;transform:translate3d(0, 0.3125rem, 0)}100%{border-top-color:rgb(var(--table-arrow-color));border-bottom-color:rgb(var(--table-arrow-color))}}#tabulator-container:not(.has-pagination) .tabulator-paginator{display:var(--limel-table-single-page-paginator-display, grid)}.tabulator .tabulator-footer .tabulator-paginator{box-sizing:border-box;display:grid;grid-auto-flow:column;justify-content:end;padding-top:0.25rem;padding-bottom:0.25rem}.tabulator .tabulator-footer .tabulator-paginator .tabulator-pages{margin:0 0.5rem}.tabulator .tabulator-footer .tabulator-paginator .tabulator-pages .tabulator-page{margin:0 0rem}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page{position:relative;height:1.75rem;min-width:1.75rem;padding:0 0.5rem;margin:0;border:none;border-radius:2.5rem;background-color:transparent}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:rgb(var(--contrast-1200)) !important;background-color:transparent}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):hover,.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):focus,.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):focus-visible{will-change:color, background-color, box-shadow, transform}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):hover,.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):hover{box-shadow:var(--button-shadow-hovered)}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):hover,.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page.active{background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset)}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:disabled{opacity:0.3;cursor:not-allowed}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:disabled:hover{background-color:transparent}button.tabulator-page{display:inline-flex !important;align-items:center;justify-content:center}button.tabulator-page[data-page=first],button.tabulator-page[data-page=prev],button.tabulator-page[data-page=next],button.tabulator-page[data-page=last]{font-size:0;color:transparent !important}button.tabulator-page[data-page=first]:before,button.tabulator-page[data-page=first]:after,button.tabulator-page[data-page=prev]:before,button.tabulator-page[data-page=prev]:after,button.tabulator-page[data-page=next]:before,button.tabulator-page[data-page=next]:after,button.tabulator-page[data-page=last]:before,button.tabulator-page[data-page=last]:after{content:"";transition:transform 0.2s ease;display:block;position:absolute}button.tabulator-page[data-page=first]:after,button.tabulator-page[data-page=prev]:after,button.tabulator-page[data-page=next]:after,button.tabulator-page[data-page=last]:after{border-style:solid;border-color:transparent;border-width:0.25rem 0 0.25rem 0.4rem;border-left-color:var(--limel-theme-on-surface-color)}button.tabulator-page[data-page=first]:before,button.tabulator-page[data-page=last]:before{height:0.5rem;width:0.125rem;background-color:var(--limel-theme-on-surface-color)}button.tabulator-page[data-page=first]:before{left:0.375rem}button.tabulator-page[data-page=last]:before{right:0.375rem}button.tabulator-page[data-page=first]:after,button.tabulator-page[data-page=prev]:after{transform:rotateZ(180deg)}button.tabulator-page[data-page=next]:not([disabled]):hover:after,button.tabulator-page[data-page=last]:not([disabled]):hover:after{transform:translate3d(0.09375rem, 0, 0)}button.tabulator-page[data-page=first]:not([disabled]):hover:after,button.tabulator-page[data-page=prev]:not([disabled]):hover:after{transform:translate3d(-0.09375rem, 0, 0) rotateZ(180deg)}@keyframes fade-in-tabulator-loader{0%{background:transparent}100%{background:rgba(var(--contrast-1400), 0.4)}}@keyframes spin-tabulator-loader{to{transform:rotate(360deg)}}.tabulator .tabulator-loader{animation:fade-in-tabulator-loader 0.5s ease 0.5s forwards;animation-iteration-count:1;cursor:progress;background:transparent}.tabulator .tabulator-loader .tabulator-loader-msg{animation:spin-tabulator-loader 0.4s linear infinite;color:transparent;font-size:0;border-radius:50%;border:0.1875rem solid rgb(var(--lime-brand-color-flexible-turquoise)) !important;border-top-color:transparent !important;width:1.25rem;height:1.25rem;background-color:transparent !important;padding:0}.interactive-feedback{position:absolute;inset:0;min-height:0.125rem;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;background-color:rgb(var(--limel-table-row-background-color))}.tabulator-row:not(.tabulator-calcs){background-color:transparent}.tabulator-row:not(.tabulator-calcs).tabulator-row-odd{--limel-table-row-background-color:var(\n --table-row-background-color--odd\n )}.tabulator-row:not(.tabulator-calcs).tabulator-row-even{--limel-table-row-background-color:var(\n --table-row-background-color--even\n )}.tabulator-row:not(.tabulator-calcs) .tabulator-cell{pointer-events:none}.tabulator-row:not(.tabulator-calcs) .tabulator-cell>*{pointer-events:auto}.tabulator-row:not(.tabulator-calcs).tabulator-selectable:hover{z-index:2}.tabulator-row:not(.tabulator-calcs).tabulator-selectable.active{--limel-table-row-background-color:var(\n --table-row-background-color--active\n )}.tabulator-row:not(.tabulator-calcs).tabulator-selectable.active .interactive-feedback{box-shadow:var(--button-shadow-inset-pressed)}.tabulator-row:not(.tabulator-calcs).tabulator-selectable.active:before{content:"";display:inline-block;box-sizing:border-box;position:sticky;z-index:3;inset:0 0 auto 0;border:0.2rem solid var(--lime-primary-color, var(--limel-theme-primary-color));border-radius:1rem;margin-right:-0.4rem}:host(.has-interactive-rows) .tabulator-row:not(.tabulator-calcs).tabulator-selectable .interactive-feedback:hover{box-shadow:var(--button-shadow-hovered)}:host(.has-interactive-rows) .tabulator-row:not(.tabulator-calcs).tabulator-selectable:active .interactive-feedback{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}:host(.has-interactive-rows) .tabulator-row:not(.tabulator-calcs).tabulator-selectable:not(.active) .interactive-feedback:hover{background-color:var(--table-row-background-color--hover)}:host(.has-low-density) #tabulator-container{width:max-content;max-width:100%;margin:auto}:host(.has-low-density) .tabulator-table{background-color:transparent}:host(.has-low-density) .tabulator-header{border-radius:0.375rem}:host(.has-low-density) .tabulator-footer{border-radius:0.5rem}:host(.has-low-density) .tabulator-calcs-holder{border-radius:0.5rem 0.5rem 0 0}:host(.has-low-density) .tabulator-row{border-radius:0.5rem}:host(.has-low-density) .tabulator-row:not(.tabulator-calcs-bottom){margin-bottom:0.25rem}:host(.has-low-density) .tabulator-row:not(.tabulator-calcs-bottom):first-child{margin-top:0.75rem}:host(.has-low-density) .tabulator-row:not(.tabulator-calcs-bottom) .tabulator-cell{height:2.75rem !important}:host(.has-low-density) .tabulator-row:not(.tabulator-calcs-bottom) .tabulator-cell:first-child{border-radius:0.5rem 0 0 0.5rem}:host(.has-low-density) .tabulator-row:not(.tabulator-calcs-bottom) .tabulator-cell:last-child{border-radius:0 0.5rem 0.5rem 0}:host(.has-pagination-on-top) .tabulator .tabulator-header{order:2}:host(.has-pagination-on-top) .tabulator .tabulator-tableHolder{order:3}:host(.has-pagination-on-top) .tabulator .tabulator-footer{order:1;background-color:transparent}:host(.has-pagination-on-top) .tabulator .tabulator-calcs-holder{position:absolute;bottom:0}:host(.has-pagination-on-top):has(.tabulator-calcs-holder) .tabulator-tableHolder{margin-bottom:1.5rem}:host(.has-pagination-on-top) .select-all{top:2.5rem}.lime-col-title__custom-component{width:100%;display:flex;align-items:center;margin-right:1.25rem;gap:0.25rem}.title-component-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex-grow:1;flex-shrink:1;min-width:0}.title-component-slot{flex-shrink:0}@keyframes detach-a-column-header{0%{transform:rotate(0deg)}100%{transform:rotate(-2deg)}}.has-movable-columns .tabulator-header{overflow-y:visible}.has-movable-columns .tabulator-header .tabulator-col:not(.tabulator-frozen){cursor:move !important}.has-movable-columns .tabulator-header .tabulator-col:not(.tabulator-frozen).tabulator-sortable.tabulator-moving{animation:detach-a-column-header 0.2s ease forwards;opacity:0.9;border:none;border-radius:0.25rem;background-color:rgb(var(---table-header-background-color-when-being-dragged));box-shadow:var(--shadow-depth-16)}.has-movable-columns .tabulator-header .tabulator-col:not(.tabulator-frozen).tabulator-sortable.tabulator-moving:hover{background-color:rgb(var(---table-header-background-color-when-being-dragged))}.has-movable-columns .tabulator-header .tabulator-col:not(.tabulator-frozen).tabulator-sortable.tabulator-moving .tabulator-arrow:before{background-color:rgb(var(---table-header-background-color-when-being-dragged))}.tabulator .tabulator-footer{transition:transform 0.5s ease-out, opacity 0.35s ease;padding-top:0;padding-bottom:0;color:var(--table-text-color);background-color:rgb(var(--table-header-background-color--hover));border:none;user-select:auto}.tabulator .tabulator-footer .tabulator-calcs-holder{border-color:rgb(var(--contrast-500));background:rgb(var(--contrast-500)) !important;margin-top:0;margin-bottom:0}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{height:1.5rem;background:transparent !important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-calcs{cursor:default}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-cell{height:1.5rem !important;padding-top:0.25rem;padding-bottom:0}.select-all,.limel-table--row-selector{--limel-checkbox-min-height:1.25rem;display:inline-flex !important;align-items:center;justify-content:center;text-overflow:unset !important;padding:0 !important}.select-all{position:absolute;z-index:1;left:0.375rem;top:0.1875rem}.limel-table--row-selector{position:sticky !important;left:0;border-width:0;z-index:1}.limel-table--row-selector:before{content:"";inset:0.25rem 0;position:absolute;background-image:linear-gradient(to right, rgb(var(--limel-table-row-background-color)) 70%, rgb(var(--limel-table-row-background-color), 0))}.limel-table--row-selector limel-checkbox{transition:opacity 0.2s ease;opacity:0.3}.tabulator-row:hover .limel-table--row-selector limel-checkbox{opacity:1}.has-selection .limel-table--row-selector limel-checkbox{opacity:1}.limel-table--row-selector .tabulator-col-resize-handle{display:none}.limel-table--row-selector+.tabulator-col .tabulator-col-resize-handle.prev,.limel-table--row-selector+.tabulator-cell .tabulator-col-resize-handle.prev{display:none}.has-movable-columns .tabulator-header .tabulator-col.limel-table--row-selector{border:none;cursor:default !important;pointer-events:none;background-color:transparent;background-image:linear-gradient(to right, rgb(var(--table-header-background-color--hover)) 70%, rgb(var(--table-header-background-color--hover), 0));left:0}.has-selection .tabulator-calcs .tabulator-cell{color:var(--table-arrow-color--active)}';const $t=1;const Zt=class{constructor(i){t(this,i);this.sort=r(this,"sort",7);this.changePage=r(this,"changePage",7);this.load=r(this,"load",7);this.activate=r(this,"activate",7);this.changeColumns=r(this,"changeColumns",7);this.select=r(this,"select",7);this.selectAll=r(this,"selectAll",7);this.shouldSort=false;this.getActiveRows=()=>{if(!this.tabulator){return[]}return this.tabulator.getRows("active")};this.getActiveRowsData=()=>this.getActiveRows().map((t=>t.getData()));this.selectAllOnChange=t=>{const i=t.detail;t.stopPropagation();t.preventDefault();const e=i?this.getActiveRowsData():[];this.select.emit(e);this.tableSelection.setSelection(e);this.selectAll.emit(i)};this.getColumnOptions=()=>{if(!this.movableColumns){return{}}return{movableColumns:true,columnMoved:this.handleMoveColumn}};this.handleMoveColumn=(t,i)=>{const e=i.map(this.findColumn).filter(Boolean);this.changeColumns.emit(e)};this.findColumn=t=>this.columns.find((i=>i.field===t.getField()&&i.title===t.getDefinition().title));this.getTranslation=t=>w.get(t,this.language);this.data=[];this.columns=[];this.mode="local";this.layout=undefined;this.pageSize=undefined;this.totalRows=undefined;this.sorting=[];this.activeRow=undefined;this.movableColumns=undefined;this.sortableColumns=true;this.loading=false;this.page=$t;this.emptyMessage=undefined;this.aggregates=undefined;this.selectable=undefined;this.selection=undefined;this.language="en";this.handleDataSorting=this.handleDataSorting.bind(this);this.handlePageLoaded=this.handlePageLoaded.bind(this);this.handleRenderComplete=this.handleRenderComplete.bind(this);this.handleAjaxRequesting=this.handleAjaxRequesting.bind(this);this.requestData=this.requestData.bind(this);this.onClickRow=this.onClickRow.bind(this);this.formatRow=this.formatRow.bind(this);this.formatRows=this.formatRows.bind(this);this.updateMaxPage=this.updateMaxPage.bind(this);this.initTabulatorComponent=this.initTabulatorComponent.bind(this);this.setSelection=this.setSelection.bind(this);this.addColumnAggregator=this.addColumnAggregator.bind(this);this.pool=new Vt(document);this.columnFactory=new Rt(this.pool)}componentWillLoad(){this.firstRequest=this.mode==="remote";this.initTableSelection()}componentDidLoad(){this.init()}disconnectedCallback(){this.pool.clear()}totalRowsChanged(){this.updateMaxPage()}pageSizeChanged(){this.updateMaxPage()}pageChanged(){if(!this.tabulator){return}if(this.tabulator.getPage()===this.page){return}this.tabulator.setPage(this.page)}activeRowChanged(){if(!this.tabulator){return}this.formatRows()}updateData(t=[],i=[]){const e=this.getRowIds(t);const r=this.getRowIds(i);const n=this.shouldReplaceData(e,r);const o=!Gt(t,i);setTimeout((()=>{if(!this.tabulator){return}if(n){this.pool.releaseAll();this.tabulator.replaceData(t);this.setSelection();return}if(o){this.tabulator.updateData(t);this.setSelection();return}this.tabulator.updateOrAddData(t)}))}updateColumns(t,i){if(!this.tabulator){return}if(this.areSameColumns(t,i)){return}const e=this.tabulator.getColumns().filter((t=>t.getField()));const r=e.map((t=>i.find((i=>i.field===t.getField()))));if(this.areSameColumns(t,r)){return}this.tabulator.setColumns(this.getColumnDefinitions());this.shouldSort=true}updateAggregates(t,i){if(!this.tabulator){return}if(g(t,i)){return}if(!this.haveSameAggregateFields(t,i)){this.init();return}this.tabulator.recalc();this.tabulator.rowManager.redraw()}updateSelection(t){if(!this.tableSelection){return}this.tableSelection.setSelection(t)}updateSelectable(){if(this.tableSelection&&!this.selectable){this.tableSelection=null}this.initTableSelection();this.init()}updateSortableColumns(){if(!this.tabulator){return}this.tabulator.setColumns(this.getColumnDefinitions());this.shouldSort=true}updateSorting(t,i){const e=this.getColumnSorter(t);const r=this.getColumnSorter(i);if(g(e,r)){return}this.tabulator.setSort(e)}shouldReplaceData(t,i){return!this.areEqualIds(t,i)||!this.isSameOrder(t,i)}getRowIds(t){return t.map((t=>{var i;return(i=t.id)!==null&&i!==void 0?i:t}))}areEqualIds(t,i){const e=new Set(t);const r=new Set(i);return e.size===r.size&&t.every((t=>r.has(t)))}isSameOrder(t,i){return t.every(((t,e)=>t===i[e]))}areSameColumns(t,i){return t.length===i.length&&t.every((t=>i.includes(t)))}haveSameAggregateFields(t,i){const e=(i===null||i===void 0?void 0:i.map((t=>t.field)))||[];return(t===null||t===void 0?void 0:t.length)===(i===null||i===void 0?void 0:i.length)&&!!(t===null||t===void 0?void 0:t.every((t=>e.includes(t.field))))}init(){if(this.tabulator){this.pool.releaseAll();this.tabulator.destroy()}const t=this.host.shadowRoot.querySelector("#tabulator-table");this.initTabulatorComponent(t)}initTabulatorComponent(t){if(!("ResizeObserver"in window)){this.tabulator=new H(t,this.getOptions());this.setSelection();return}const i=new ResizeObserver((()=>{requestAnimationFrame((()=>{this.tabulator=new H(t,this.getOptions());this.setSelection();i.unobserve(t);i.disconnect()}))}));i.observe(t)}initTableSelection(){if(this.selectable){this.tableSelection=new qt((()=>this.tabulator),this.pool,this.select,(t=>this.getTranslation(t)));this.tableSelection.setSelection(this.selection)}}setSelection(){if(!(this.tabulator&&this.tableSelection)){return}this.tableSelection.setSelection(this.selection)}updateMaxPage(){var t;(t=this.tabulator)===null||t===void 0?void 0:t.setMaxPage(this.calculatePageCount())}getOptions(){const t=this.getAjaxOptions();const i=this.getPaginationOptions();const e=this.getColumnOptions();return Object.assign(Object.assign(Object.assign(Object.assign({data:this.data,layout:Yt(this.layout),columns:this.getColumnDefinitions(),dataSorting:this.handleDataSorting,pageLoaded:this.handlePageLoaded,renderComplete:this.handleRenderComplete},t),i),{rowClick:this.onClickRow,rowFormatter:this.formatRow,initialSort:this.getInitialSorting(),nestedFieldSeparator:false}),e)}getInitialSorting(){if(this.currentSorting&&this.currentSorting.length>0){return this.getColumnSorter(this.currentSorting)}return this.getColumnSorter(this.sorting)}getColumnSorter(t){return t.map((t=>({column:String(t.column.field),dir:t.direction.toLocaleLowerCase()})))}getColumnDefinitions(){const t=this.columns.map(this.addColumnAggregator).map((t=>{var i;const e=this.columnFactory.create(t);const r=(i=t.headerSort)!==null&&i!==void 0?i:true;e.headerSort=this.sortableColumns&&r;return e}));if(this.tableSelection){return this.tableSelection.getColumnDefinitions(t)}return t}addColumnAggregator(t){var i;if(!((i=this.aggregates)===null||i===void 0?void 0:i.length)||t.aggregator){return t}const e=this.aggregates.find((i=>i.field===t.field));if(e){t.aggregator=t=>{var i;if(!t){return}const e=(i=this.aggregates.find((i=>i.field===t.field)))===null||i===void 0?void 0:i.value;if(t.formatter){return t.formatter(e)}return e}}return t}getAjaxOptions(){if(!this.isRemoteMode()){return{}}const t="https://localhost";return{ajaxSorting:true,ajaxURL:t,ajaxRequestFunc:this.requestData,ajaxRequesting:this.handleAjaxRequesting}}handleAjaxRequesting(){var t;const i=this.firstRequest&&!!((t=this.data)===null||t===void 0?void 0:t.length);this.firstRequest=false;if(i){setTimeout((()=>{this.updateMaxPage();this.tabulator.replaceData(this.data)}));return false}return true}getPaginationOptions(){if(!this.pageSize){return{}}return{pagination:this.isRemoteMode()?"remote":"local",paginationSize:this.pageSize,paginationInitialPage:this.page}}requestData(t,i,e){const r=e.sorters;const n=e.page;if(this.page!==n){this.changePage.emit(n)}const o=r.map(It(this.columns));const s={page:n,sorters:o};const a=Promise.resolve({last_page:this.calculatePageCount(),data:this.data});if(!g(this.currentLoad,s)){this.currentSorting=o;this.currentLoad=s;this.load.emit(s)}return a}isRemoteMode(){return this.mode==="remote"}handleDataSorting(t){if(this.isRemoteMode()){return}const i=t.map(It(this.columns));if(i.length===0){return}this.sort.emit(i)}handlePageLoaded(t){if(this.isRemoteMode()){return}this.changePage.emit(t)}handleRenderComplete(){if(this.tabulator&&this.shouldSort){this.shouldSort=false;this.tabulator.setSort(this.getColumnSorter(this.sorting))}}onClickRow(t,i){if(i.getPosition===undefined){return}if(this.isActiveRow(i)){this.activeRow=null}else{this.activeRow=i.getData()}this.activate.emit(this.activeRow)}formatRows(){this.tabulator.getRows().forEach(this.formatRow)}formatRow(t){if(this.isActiveRow(t)){t.getElement().classList.add("active")}else{t.getElement().classList.remove("active")}const i=t.getElement().querySelectorAll(".interactive-feedback");if(i.length===0){const i=t.getElement().ownerDocument.createElement("div");i.classList.add("interactive-feedback");t.getElement().prepend(i)}}isActiveRow(t){var i;if(!this.activeRow){return false}const e=(i=this.activeRow.id)!==null&&i!==void 0?i:null;if(e!==null){return e===t.getData().id}return this.activeRow===t.getData()}calculatePageCount(){let t=this.totalRows;if(!t){t=this.data.length}return Math.ceil(t/this.pageSize)}hasAggregation(t){return t.some((t=>C(t,"aggregator")))}render(){var t;return n(o,{class:{"has-low-density":this.layout==="lowDensity"}},n("div",{id:"tabulator-container",class:{"has-pagination":this.totalRows>this.pageSize,"has-aggregation":this.hasAggregation(this.columns),"has-movable-columns":this.movableColumns,"has-rowselector":this.selectable,"has-selection":(t=this.tableSelection)===null||t===void 0?void 0:t.hasSelection}},n("div",{id:"tabulator-loader",style:{display:this.loading?"flex":"none"}},n("limel-spinner",{size:"large"})),this.renderEmptyMessage(),this.renderSelectAll(),n("div",{id:"tabulator-table"})))}renderSelectAll(){var t,i,e;if(!this.selectable){return}const r=!this.loading&&this.tableSelection;return n("div",{class:"select-all",style:{display:r?"inline-block":"none"}},n("limel-checkbox",{class:"hide-label",onChange:this.selectAllOnChange,disabled:this.data.length===0,checked:(t=this.tableSelection)===null||t===void 0?void 0:t.hasSelection,indeterminate:((i=this.tableSelection)===null||i===void 0?void 0:i.hasSelection)&&((e=this.selection)===null||e===void 0?void 0:e.length)<this.data.length,label:this.getTranslation("table.select-all")}))}renderEmptyMessage(){const t=!this.loading&&this.data.length===0&&this.emptyMessage;return n("div",{id:"tabulator-empty-text",style:{display:t?"flex":"none"}},n("span",null,this.emptyMessage))}get host(){return s(this)}static get watchers(){return{totalRows:["totalRowsChanged"],pageSize:["pageSizeChanged"],page:["pageChanged"],activeRow:["activeRowChanged"],data:["updateData"],columns:["updateColumns"],aggregates:["updateAggregates"],selection:["updateSelection"],selectable:["updateSelectable"],sortableColumns:["updateSortableColumns"],sorting:["updateSorting"]}}};Zt.style=Xt;export{Zt as limel_table};
2
- //# sourceMappingURL=p-92aa9610.entry.js.map
1
+ import{r as t,c as r,h as n,H as o,g as s}from"./p-288f0842.js";import{a}from"./p-669626e5.js";import{h as u,c as l,a as f,d as h,b as c}from"./p-18973354.js";import{a as d}from"./p-50bd0336.js";import{a as b}from"./p-9acf7b5d.js";import{i as p}from"./p-c93050d6.js";import{g as v}from"./p-7f49c7da.js";import{n as m}from"./p-64122988.js";import{i as g}from"./p-6ebb1f7c.js";import{t as w}from"./p-c582027f.js";import"./p-2cdaeb7b.js";import"./p-eda23c05.js";import"./p-4c3358cb.js";import"./p-0b1af919.js";import"./p-858c6b82.js";import"./p-d529bb7d.js";import"./p-5467ea06.js";import"./p-5fdb83c9.js";import"./p-4f093090.js";var y=Object.prototype;var x=y.hasOwnProperty;function k(t,i){return t!=null&&x.call(t,i)}function C(t,i){return t!=null&&u(t,i,k)}function E(t,i,e,r){if(!p(t)){return t}i=l(i,t);var n=-1,o=i.length,s=o-1,a=t;while(a!=null&&++n<o){var u=f(i[n]),h=e;if(u==="__proto__"||u==="constructor"||u==="prototype"){return t}if(n!=s){var c=a[u];h=r?r(c,u,a):undefined;if(h===undefined){h=p(c)?c:b(i[n+1])?[]:{}}}d(a,u,h);a=a[u]}return t}function j(t,i,e){var r=-1,n=i.length,o={};while(++r<n){var s=i[r],a=h(t,s);if(e(a,s)){E(o,l(s,t),a)}}return o}function z(t,i){if(t==null){return{}}var e=a(v(t),(function(t){return[t]}));i=c(i);return j(t,e,(function(t,e){return i(t,e[0])}))}var T=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};if(!Array.prototype.findIndex){Object.defineProperty(Array.prototype,"findIndex",{value:function t(i){if(this==null){throw new TypeError('"this" is null or not defined')}var e=Object(this);var r=e.length>>>0;if(typeof i!=="function"){throw new TypeError("predicate must be a function")}var n=arguments[1];var o=0;while(o<r){var s=e[o];if(i.call(n,s,o,e)){return o}o++}return-1}})}if(!Array.prototype.find){Object.defineProperty(Array.prototype,"find",{value:function t(i){if(this==null){throw new TypeError('"this" is null or not defined')}var e=Object(this);var r=e.length>>>0;if(typeof i!=="function"){throw new TypeError("predicate must be a function")}var n=arguments[1];var o=0;while(o<r){var s=e[o];if(i.call(n,s,o,e)){return s}o++}return undefined}})}if(!String.prototype.includes){String.prototype.includes=function(t,i){if(t instanceof RegExp){throw TypeError("first argument must not be a RegExp")}if(i===undefined){i=0}return this.indexOf(t,i)!==-1}}if(!Array.prototype.includes){Object.defineProperty(Array.prototype,"includes",{value:function t(i,e){if(this==null){throw new TypeError('"this" is null or not defined')}var r=Object(this);var n=r.length>>>0;if(n===0){return false}var o=e|0;var s=Math.max(o>=0?o:n-Math.abs(o),0);function a(t,i){return t===i||typeof t==="number"&&typeof i==="number"&&isNaN(t)&&isNaN(i)}while(s<n){if(a(r[s],i)){return true}s++}return false}})}if(typeof Object.assign!=="function"){Object.defineProperty(Object,"assign",{value:function t(i,e){if(i===null||i===undefined){throw new TypeError("Cannot convert undefined or null to object")}var r=Object(i);for(var n=1;n<arguments.length;n++){var o=arguments[n];if(o!==null&&o!==undefined){for(var s in o){if(Object.prototype.hasOwnProperty.call(o,s)){r[s]=o[s]}}}}return r},writable:true,configurable:true})}var S=function t(i){this.table=i;this.blockHozScrollEvent=false;this.headersElement=this.createHeadersElement();this.element=this.createHeaderElement();this.rowManager=null;this.columns=[];this.columnsByIndex=[];this.columnsByField={};this.scrollLeft=0;this.element.insertBefore(this.headersElement,this.element.firstChild)};S.prototype.createHeadersElement=function(){var t=document.createElement("div");t.classList.add("tabulator-headers");return t};S.prototype.createHeaderElement=function(){var t=document.createElement("div");t.classList.add("tabulator-header");if(!this.table.options.headerVisible){t.classList.add("tabulator-header-hidden")}return t};S.prototype.initialize=function(){};S.prototype.setRowManager=function(t){this.rowManager=t};S.prototype.getElement=function(){return this.element};S.prototype.getHeadersElement=function(){return this.headersElement};S.prototype.scrollHorizontal=function(t){var i=0,e=this.element.scrollWidth-this.table.element.clientWidth;this.element.scrollLeft=t;if(t>e){i=t-e;this.element.style.marginLeft=-i+"px"}else{this.element.style.marginLeft=0}this.scrollLeft=t;if(this.table.modExists("frozenColumns")){this.table.modules.frozenColumns.scrollHorizontal()}};S.prototype.generateColumnsFromRowData=function(t){var i=[],e=this.table.options.autoColumnsDefinitions,r,n;if(t&&t.length){r=t[0];for(var o in r){var s={field:o,title:o};var a=r[o];switch(typeof a==="undefined"?"undefined":T(a)){case"undefined":n="string";break;case"boolean":n="boolean";break;case"object":if(Array.isArray(a)){n="array"}else{n="string"}break;default:if(!isNaN(a)&&a!==""){n="number"}else{if(a.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){n="alphanum"}else{n="string"}}break}s.sorter=n;i.push(s)}if(e){switch(typeof e==="undefined"?"undefined":T(e)){case"function":this.table.options.columns=e.call(this.table,i);break;case"object":if(Array.isArray(e)){i.forEach((function(t){var i=e.find((function(i){return i.field===t.field}));if(i){Object.assign(t,i)}}))}else{i.forEach((function(t){if(e[t.field]){Object.assign(t,e[t.field])}}))}this.table.options.columns=i;break}}else{this.table.options.columns=i}this.setColumns(this.table.options.columns)}};S.prototype.setColumns=function(t,i){var e=this;while(e.headersElement.firstChild){e.headersElement.removeChild(e.headersElement.firstChild)}e.columns=[];e.columnsByIndex=[];e.columnsByField={};if(e.table.modExists("frozenColumns")){e.table.modules.frozenColumns.reset()}t.forEach((function(t,i){e._addColumn(t)}));e._reIndexColumns();if(e.table.options.responsiveLayout&&e.table.modExists("responsiveLayout",true)){e.table.modules.responsiveLayout.initialize()}if(this.table.options.virtualDomHoz){this.table.vdomHoz.reinitialize(false,true)}e.redraw(true)};S.prototype._addColumn=function(t,i,e){var r=new N(t,this),n=r.getElement(),o=e?this.findColumnIndex(e):e;if(e&&o>-1){var s=this.columns.indexOf(e.getTopColumn());var a=e.getElement();if(i){this.columns.splice(s,0,r);a.parentNode.insertBefore(n,a)}else{this.columns.splice(s+1,0,r);a.parentNode.insertBefore(n,a.nextSibling)}}else{if(i){this.columns.unshift(r);this.headersElement.insertBefore(r.getElement(),this.headersElement.firstChild)}else{this.columns.push(r);this.headersElement.appendChild(r.getElement())}r.columnRendered()}return r};S.prototype.registerColumnField=function(t){if(t.definition.field){this.columnsByField[t.definition.field]=t}};S.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)};S.prototype._reIndexColumns=function(){this.columnsByIndex=[];this.columns.forEach((function(t){t.reRegisterPosition()}))};S.prototype._verticalAlignHeaders=function(){var t=this,i=0;t.columns.forEach((function(t){var e;t.clearVerticalAlign();e=t.getHeight();if(e>i){i=e}}));t.columns.forEach((function(e){e.verticalAlign(t.table.options.columnHeaderVertAlign,i)}));t.rowManager.adjustTableSize()};S.prototype.findColumn=function(t){var i=this;if((typeof t==="undefined"?"undefined":T(t))=="object"){if(t instanceof N){return t}else if(t instanceof R){return t._getSelf()||false}else if(typeof HTMLElement!=="undefined"&&t instanceof HTMLElement){var e=i.columns.find((function(i){return i.element===t}));return e||false}}else{return this.columnsByField[t]||false}return false};S.prototype.getColumnByField=function(t){return this.columnsByField[t]};S.prototype.getColumnsByFieldRoot=function(t){var i=this;var e=[];Object.keys(this.columnsByField).forEach((function(r){var n=r.split(".")[0];if(n===t){e.push(i.columnsByField[r])}}));return e};S.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]};S.prototype.getFirstVisibileColumn=function(t){var t=this.columnsByIndex.findIndex((function(t){return t.visible}));return t>-1?this.columnsByIndex[t]:false};S.prototype.getColumns=function(){return this.columns};S.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex((function(i){return t===i}))};S.prototype.getRealColumns=function(){return this.columnsByIndex};S.prototype.traverse=function(t){var i=this;i.columnsByIndex.forEach((function(i,e){t(i,e)}))};S.prototype.getDefinitions=function(t){var i=this,e=[];i.columnsByIndex.forEach((function(i){if(!t||t&&i.visible){e.push(i.getDefinition())}}));return e};S.prototype.getDefinitionTree=function(){var t=this,i=[];t.columns.forEach((function(t){i.push(t.getDefinition(true))}));return i};S.prototype.getComponents=function(t){var i=this,e=[],r=t?i.columns:i.columnsByIndex;r.forEach((function(t){e.push(t.getComponent())}));return e};S.prototype.getWidth=function(){var t=0;this.columnsByIndex.forEach((function(i){if(i.visible){t+=i.getWidth()}}));return t};S.prototype.moveColumn=function(t,i,e){this.moveColumnActual(t,i,e);if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.initialize()}if(this.table.modExists("columnCalcs")){this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)}i.element.parentNode.insertBefore(t.element,i.element);if(e){i.element.parentNode.insertBefore(i.element,t.element)}this._verticalAlignHeaders();this.table.rowManager.reinitialize()};S.prototype.moveColumnActual=function(t,i,e){if(t.parent.isGroup){this._moveColumnInArray(t.parent.columns,t,i,e)}else{this._moveColumnInArray(this.columns,t,i,e)}this._moveColumnInArray(this.columnsByIndex,t,i,e,true);if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.initialize()}if(this.table.options.virtualDomHoz){this.table.vdomHoz.reinitialize(true)}if(this.table.options.columnMoved){this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents())}if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.columns){this.table.modules.persistence.save("columns")}};S.prototype._moveColumnInArray=function(t,i,e,r,n){var o=this;var s=t.indexOf(i),a,u=[];if(s>-1){t.splice(s,1);a=t.indexOf(e);if(a>-1){if(r){a=a+1}}else{a=s}t.splice(a,0,i);if(n){if(this.table.options.dataTree&&this.table.modExists("dataTree",true)){this.table.rowManager.rows.forEach((function(t){u=u.concat(o.table.modules.dataTree.getTreeChildren(t,false,true))}))}u=u.concat(this.table.rowManager.rows);u.forEach((function(t){if(t.cells.length){var i=t.cells.splice(s,1)[0];t.cells.splice(a,0,i)}}))}}};S.prototype.scrollToColumn=function(t,i,e){var r=this;var n=0,o=0,s=0,a=t.getElement();return new Promise((function(u,l){if(typeof i==="undefined"){i=r.table.options.scrollToColumnPosition}if(typeof e==="undefined"){e=r.table.options.scrollToColumnIfVisible}if(t.visible){switch(i){case"middle":case"center":s=-r.element.clientWidth/2;break;case"right":s=a.clientWidth-r.headersElement.clientWidth;break}if(!e){o=a.offsetLeft;if(o>0&&o+a.offsetWidth<r.element.clientWidth){return false}}n=a.offsetLeft+s;n=Math.max(Math.min(n,r.table.rowManager.element.scrollWidth-r.table.rowManager.element.clientWidth),0);r.table.rowManager.scrollHorizontal(n);r.scrollHorizontal(n);u()}else{console.warn("Scroll Error - Column not visible");l("Scroll Error - Column not visible")}}))};S.prototype.generateCells=function(t){var i=this;var e=[];i.columnsByIndex.forEach((function(i){e.push(i.generateCell(t))}));return e};S.prototype.getFlexBaseWidth=function(){var t=this,i=t.table.element.clientWidth,e=0;if(t.rowManager.element.scrollHeight>t.rowManager.element.clientHeight){i-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth}this.columnsByIndex.forEach((function(r){var n,o,s;if(r.visible){n=r.definition.width||0;o=typeof r.minWidth=="undefined"?t.table.options.columnMinWidth:parseInt(r.minWidth);if(typeof n=="string"){if(n.indexOf("%")>-1){s=i/100*parseInt(n)}else{s=parseInt(n)}}else{s=n}e+=s>o?s:o}}));return e};S.prototype.addColumn=function(t,i,e){var r=this;return new Promise((function(n,o){var s=r._addColumn(t,i,e);r._reIndexColumns();if(r.table.options.responsiveLayout&&r.table.modExists("responsiveLayout",true)){r.table.modules.responsiveLayout.initialize()}if(r.table.modExists("columnCalcs")){r.table.modules.columnCalcs.recalc(r.table.rowManager.activeRows)}r.redraw(true);if(r.table.modules.layout.getMode()!="fitColumns"){s.reinitializeWidth()}r._verticalAlignHeaders();r.table.rowManager.reinitialize();if(r.table.options.virtualDomHoz){r.table.vdomHoz.reinitialize()}n(s)}))};S.prototype.deregisterColumn=function(t){var i=t.getField(),e;if(i){delete this.columnsByField[i]}e=this.columnsByIndex.indexOf(t);if(e>-1){this.columnsByIndex.splice(e,1)}e=this.columns.indexOf(t);if(e>-1){this.columns.splice(e,1)}if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.initialize()}this._verticalAlignHeaders();this.redraw()};S.prototype.redraw=function(t){if(t){if(H.prototype.helpers.elVisible(this.element)){this._verticalAlignHeaders()}this.table.rowManager.resetScroll();this.table.rowManager.reinitialize()}if(["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1){this.table.modules.layout.layout()}else{if(t){this.table.modules.layout.layout()}else{if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.update()}}}if(this.table.modExists("frozenColumns")){this.table.modules.frozenColumns.layout()}if(this.table.modExists("columnCalcs")){this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)}if(t){if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.columns){this.table.modules.persistence.save("columns")}if(this.table.modExists("columnCalcs")){this.table.modules.columnCalcs.redraw()}}this.table.footerManager.redraw()};var R=function t(i){this._column=i;this.type="ColumnComponent"};R.prototype.getElement=function(){return this._column.getElement()};R.prototype.getDefinition=function(){return this._column.getDefinition()};R.prototype.getField=function(){return this._column.getField()};R.prototype.getCells=function(){var t=[];this._column.cells.forEach((function(i){t.push(i.getComponent())}));return t};R.prototype.getVisibility=function(){console.warn("getVisibility function is deprecated, you should now use the isVisible function");return this._column.visible};R.prototype.isVisible=function(){return this._column.visible};R.prototype.show=function(){if(this._column.isGroup){this._column.columns.forEach((function(t){t.show()}))}else{this._column.show()}};R.prototype.hide=function(){if(this._column.isGroup){this._column.columns.forEach((function(t){t.hide()}))}else{this._column.hide()}};R.prototype.toggle=function(){if(this._column.visible){this.hide()}else{this.show()}};R.prototype.delete=function(){return this._column.delete()};R.prototype.getSubColumns=function(){var t=[];if(this._column.columns.length){this._column.columns.forEach((function(i){t.push(i.getComponent())}))}return t};R.prototype.getParentColumn=function(){return this._column.parent instanceof N?this._column.parent.getComponent():false};R.prototype._getSelf=function(){return this._column};R.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)};R.prototype.getTable=function(){return this._column.table};R.prototype.headerFilterFocus=function(){if(this._column.table.modExists("filter",true)){this._column.table.modules.filter.setHeaderFilterFocus(this._column)}};R.prototype.reloadHeaderFilter=function(){if(this._column.table.modExists("filter",true)){this._column.table.modules.filter.reloadHeaderFilter(this._column)}};R.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",true)){return this._column.table.modules.filter.getHeaderFilterValue(this._column)}};R.prototype.setHeaderFilterValue=function(t){if(this._column.table.modExists("filter",true)){this._column.table.modules.filter.setHeaderFilterValue(this._column,t)}};R.prototype.move=function(t,i){var e=this._column.table.columnManager.findColumn(t);if(e){this._column.table.columnManager.moveColumn(this._column,e,i)}else{console.warn("Move Error - No matching column found:",e)}};R.prototype.getNextColumn=function(){var t=this._column.nextColumn();return t?t.getComponent():false};R.prototype.getPrevColumn=function(){var t=this._column.prevColumn();return t?t.getComponent():false};R.prototype.updateDefinition=function(t){return this._column.updateDefinition(t)};R.prototype.getWidth=function(){return this._column.getWidth()};R.prototype.setWidth=function(t){var i;if(t===true){i=this._column.reinitializeWidth(true)}else{i=this._column.setWidth(t)}if(this._column.table.options.virtualDomHoz){this._column.table.vdomHoz.reinitialize(true)}return i};R.prototype.validate=function(){return this._column.validate()};var N=function t(i,e){var r=this;this.table=e.table;this.definition=i;this.parent=e;this.type="column";this.columns=[];this.cells=[];this.element=this.createElement();this.contentElement=false;this.titleHolderElement=false;this.titleElement=false;this.groupElement=this.createGroupElement();this.isGroup=false;this.tooltip=false;this.hozAlign="";this.vertAlign="";this.field="";this.fieldStructure="";this.getFieldValue="";this.setFieldValue="";this.titleFormatterRendered=false;this.setField(this.definition.field);if(this.table.options.invalidOptionWarnings){this.checkDefinition()}this.modules={};this.cellEvents={cellClick:false,cellDblClick:false,cellContext:false,cellTap:false,cellDblTap:false,cellTapHold:false,cellMouseEnter:false,cellMouseLeave:false,cellMouseOver:false,cellMouseOut:false,cellMouseMove:false};this.width=null;this.widthStyled="";this.maxWidth=null;this.maxWidthStyled="";this.minWidth=null;this.minWidthStyled="";this.widthFixed=false;this.visible=true;this.component=null;this._mapDepricatedFunctionality();if(i.columns){this.isGroup=true;i.columns.forEach((function(i,e){var n=new t(i,r);r.attachColumn(n)}));r.checkColumnVisibility()}else{e.registerColumnField(this)}if(i.rowHandle&&this.table.options.movableRows!==false&&this.table.modExists("moveRow")){this.table.modules.moveRow.setHandle(true)}this._buildHeader();this.bindModuleColumns()};N.prototype.createElement=function(){var t=document.createElement("div");t.classList.add("tabulator-col");t.setAttribute("role","columnheader");t.setAttribute("aria-sort","none");return t};N.prototype.createGroupElement=function(){var t=document.createElement("div");t.classList.add("tabulator-col-group-cols");return t};N.prototype.checkDefinition=function(){var t=this;Object.keys(this.definition).forEach((function(i){if(t.defaultOptionList.indexOf(i)===-1){console.warn("Invalid column definition option in '"+(t.field||t.definition.title)+"' column:",i)}}))};N.prototype.setField=function(t){this.field=t;this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[];this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData;this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData};N.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)};N.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)};N.prototype.reRegisterPosition=function(){if(this.isGroup){this.columns.forEach((function(t){t.reRegisterPosition()}))}else{this.registerColumnPosition(this)}};N.prototype._mapDepricatedFunctionality=function(){if(typeof this.definition.hideInHtml!=="undefined"){this.definition.htmlOutput=!this.definition.hideInHtml;console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")}if(typeof this.definition.align!=="undefined"){this.definition.hozAlign=this.definition.align;console.warn("align column definition property is deprecated, you should now use hozAlign")}if(typeof this.definition.downloadTitle!=="undefined"){this.definition.titleDownload=this.definition.downloadTitle;console.warn("downloadTitle definition property is deprecated, you should now use titleDownload")}};N.prototype.setTooltip=function(){var t=this,i=t.definition;var e=i.headerTooltip||i.tooltip===false?i.headerTooltip:t.table.options.tooltipsHeader;if(e){if(e===true){if(i.field){t.table.modules.localize.bind("columns|"+i.field,(function(e){t.element.setAttribute("title",e||i.title)}))}else{t.element.setAttribute("title",i.title)}}else{if(typeof e=="function"){e=e(t.getComponent());if(e===false){e=""}}t.element.setAttribute("title",e)}}else{t.element.setAttribute("title","")}};N.prototype._buildHeader=function(){var t=this,i=t.definition;while(t.element.firstChild){t.element.removeChild(t.element.firstChild)}if(i.headerVertical){t.element.classList.add("tabulator-col-vertical");if(i.headerVertical==="flip"){t.element.classList.add("tabulator-col-vertical-flip")}}t.contentElement=t._bindEvents();t.contentElement=t._buildColumnHeaderContent();t.element.appendChild(t.contentElement);if(t.isGroup){t._buildGroupHeader()}else{t._buildColumnHeader()}t.setTooltip();if(t.table.options.resizableColumns&&t.table.modExists("resizeColumns")){t.table.modules.resizeColumns.initializeColumn("header",t,t.element)}if(i.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")){if(typeof i.headerFilterPlaceholder!=="undefined"&&i.field){t.table.modules.localize.setHeaderFilterColumnPlaceholder(i.field,i.headerFilterPlaceholder)}t.table.modules.filter.initializeColumn(t)}if(t.table.modExists("frozenColumns")){t.table.modules.frozenColumns.initializeColumn(t)}if(t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")){t.table.modules.moveColumn.initializeColumn(t)}if((i.topCalc||i.bottomCalc)&&t.table.modExists("columnCalcs")){t.table.modules.columnCalcs.initializeColumn(t)}if(t.table.modExists("persistence")&&t.table.modules.persistence.config.columns){t.table.modules.persistence.initializeColumn(t)}t.element.addEventListener("mouseenter",(function(i){t.setTooltip()}))};N.prototype._bindEvents=function(){var t=this,i=t.definition,e,r,n;if(typeof i.headerClick=="function"){t.element.addEventListener("click",(function(e){i.headerClick(e,t.getComponent())}))}if(typeof i.headerDblClick=="function"){t.element.addEventListener("dblclick",(function(e){i.headerDblClick(e,t.getComponent())}))}if(typeof i.headerContext=="function"){t.element.addEventListener("contextmenu",(function(e){i.headerContext(e,t.getComponent())}))}if(typeof i.headerTap=="function"){n=false;t.element.addEventListener("touchstart",(function(t){n=true}),{passive:true});t.element.addEventListener("touchend",(function(e){if(n){i.headerTap(e,t.getComponent())}n=false}))}if(typeof i.headerDblTap=="function"){e=null;t.element.addEventListener("touchend",(function(r){if(e){clearTimeout(e);e=null;i.headerDblTap(r,t.getComponent())}else{e=setTimeout((function(){clearTimeout(e);e=null}),300)}}))}if(typeof i.headerTapHold=="function"){r=null;t.element.addEventListener("touchstart",(function(e){clearTimeout(r);r=setTimeout((function(){clearTimeout(r);r=null;n=false;i.headerTapHold(e,t.getComponent())}),1e3)}),{passive:true});t.element.addEventListener("touchend",(function(t){clearTimeout(r);r=null}))}if(typeof i.cellClick=="function"){t.cellEvents.cellClick=i.cellClick}if(typeof i.cellDblClick=="function"){t.cellEvents.cellDblClick=i.cellDblClick}if(typeof i.cellContext=="function"){t.cellEvents.cellContext=i.cellContext}if(typeof i.cellMouseEnter=="function"){t.cellEvents.cellMouseEnter=i.cellMouseEnter}if(typeof i.cellMouseLeave=="function"){t.cellEvents.cellMouseLeave=i.cellMouseLeave}if(typeof i.cellMouseOver=="function"){t.cellEvents.cellMouseOver=i.cellMouseOver}if(typeof i.cellMouseOut=="function"){t.cellEvents.cellMouseOut=i.cellMouseOut}if(typeof i.cellMouseMove=="function"){t.cellEvents.cellMouseMove=i.cellMouseMove}if(typeof i.cellTap=="function"){t.cellEvents.cellTap=i.cellTap}if(typeof i.cellDblTap=="function"){t.cellEvents.cellDblTap=i.cellDblTap}if(typeof i.cellTapHold=="function"){t.cellEvents.cellTapHold=i.cellTapHold}if(typeof i.cellEdited=="function"){t.cellEvents.cellEdited=i.cellEdited}if(typeof i.cellEditing=="function"){t.cellEvents.cellEditing=i.cellEditing}if(typeof i.cellEditCancelled=="function"){t.cellEvents.cellEditCancelled=i.cellEditCancelled}};N.prototype._buildColumnHeader=function(){var t=this;var i=this.definition,e=this.table;if(e.modExists("sort")){e.modules.sort.initializeColumn(this,this.titleHolderElement)}if((i.headerContextMenu||i.headerClickMenu||i.headerMenu)&&e.modExists("menu")){e.modules.menu.initializeColumnHeader(this)}if(e.modExists("format")){e.modules.format.initializeColumn(this)}if(typeof i.editor!="undefined"&&e.modExists("edit")){e.modules.edit.initializeColumn(this)}if(typeof i.validator!="undefined"&&e.modExists("validate")){e.modules.validate.initializeColumn(this)}if(e.modExists("mutator")){e.modules.mutator.initializeColumn(this)}if(e.modExists("accessor")){e.modules.accessor.initializeColumn(this)}if(T(e.options.responsiveLayout)&&e.modExists("responsiveLayout")){e.modules.responsiveLayout.initializeColumn(this)}if(typeof i.visible!="undefined"){if(i.visible){this.show(true)}else{this.hide(true)}}if(i.cssClass){var r=i.cssClass.split(" ");r.forEach((function(i){t.element.classList.add(i)}))}if(i.field){this.element.setAttribute("tabulator-field",i.field)}this.setMinWidth(typeof i.minWidth=="undefined"?this.table.options.columnMinWidth:parseInt(i.minWidth));if(i.maxWidth||this.table.options.columnMaxWidth){if(i.maxWidth!==false){this.setMaxWidth(typeof i.maxWidth=="undefined"?this.table.options.columnMaxWidth:parseInt(i.maxWidth))}}this.reinitializeWidth();this.tooltip=this.definition.tooltip||this.definition.tooltip===false?this.definition.tooltip:this.table.options.tooltips;this.hozAlign=typeof this.definition.hozAlign=="undefined"?this.table.options.cellHozAlign:this.definition.hozAlign;this.vertAlign=typeof this.definition.vertAlign=="undefined"?this.table.options.cellVertAlign:this.definition.vertAlign;this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign};N.prototype._buildColumnHeaderContent=function(){var t=document.createElement("div");t.classList.add("tabulator-col-content");this.titleHolderElement=document.createElement("div");this.titleHolderElement.classList.add("tabulator-col-title-holder");t.appendChild(this.titleHolderElement);this.titleElement=this._buildColumnHeaderTitle();this.titleHolderElement.appendChild(this.titleElement);return t};N.prototype._buildColumnHeaderTitle=function(){var t=this,i=t.definition,e=t.table;var r=document.createElement("div");r.classList.add("tabulator-col-title");if(i.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor");n.addEventListener("click",(function(t){t.stopPropagation();n.focus()}));n.addEventListener("change",(function(){i.title=n.value;e.options.columnTitleChanged.call(t.table,t.getComponent())}));r.appendChild(n);if(i.field){e.modules.localize.bind("columns|"+i.field,(function(t){n.value=t||i.title||"&nbsp;"}))}else{n.value=i.title||"&nbsp;"}}else{if(i.field){e.modules.localize.bind("columns|"+i.field,(function(e){t._formatColumnHeaderTitle(r,e||i.title||"&nbsp;")}))}else{t._formatColumnHeaderTitle(r,i.title||"&nbsp;")}}return r};N.prototype._formatColumnHeaderTitle=function(t,i){var e=this;var r,n,o,s,a;if(this.definition.titleFormatter&&this.table.modExists("format")){r=this.table.modules.format.getFormatter(this.definition.titleFormatter);a=function t(i){e.titleFormatterRendered=i};s={getValue:function t(){return i},getElement:function i(){return t}};o=this.definition.titleFormatterParams||{};o=typeof o==="function"?o():o;n=r.call(this.table.modules.format,s,o,a);switch(typeof n==="undefined"?"undefined":T(n)){case"object":if(n instanceof Node){t.appendChild(n)}else{t.innerHTML="";console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",n)}break;case"undefined":case"null":t.innerHTML="";break;default:t.innerHTML=n}}else{t.innerHTML=i}};N.prototype._buildGroupHeader=function(){var t=this;this.element.classList.add("tabulator-col-group");this.element.setAttribute("role","columngroup");this.element.setAttribute("aria-title",this.definition.title);if(this.definition.cssClass){var i=this.definition.cssClass.split(" ");i.forEach((function(i){t.element.classList.add(i)}))}if((this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")){this.table.modules.menu.initializeColumnHeader(this)}this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign;this.element.appendChild(this.groupElement)};N.prototype._getFlatData=function(t){return t[this.field]};N.prototype._getNestedData=function(t){var i=t,e=this.fieldStructure,r=e.length,n;for(var o=0;o<r;o++){i=i[e[o]];n=i;if(!i){break}}return n};N.prototype._setFlatData=function(t,i){if(this.field){t[this.field]=i}};N.prototype._setNestedData=function(t,i){var e=t,r=this.fieldStructure,n=r.length;for(var o=0;o<n;o++){if(o==n-1){e[r[o]]=i}else{if(!e[r[o]]){if(typeof i!=="undefined"){e[r[o]]={}}else{break}}e=e[r[o]]}}};N.prototype.attachColumn=function(t){var i=this;if(i.groupElement){i.columns.push(t);i.groupElement.appendChild(t.getElement())}else{console.warn("Column Warning - Column being attached to another column instead of column group")}};N.prototype.verticalAlign=function(t,i){var e=this.parent.isGroup?this.parent.getGroupElement().clientHeight:i||this.parent.getHeadersElement().clientHeight;this.element.style.height=e+"px";if(this.isGroup){this.groupElement.style.minHeight=e-this.contentElement.offsetHeight+"px"}if(!this.isGroup&&t!=="top"){if(t==="bottom"){this.element.style.paddingTop=this.element.clientHeight-this.contentElement.offsetHeight+"px"}else{this.element.style.paddingTop=(this.element.clientHeight-this.contentElement.offsetHeight)/2+"px"}}this.columns.forEach((function(i){i.verticalAlign(t)}))};N.prototype.clearVerticalAlign=function(){this.element.style.paddingTop="";this.element.style.height="";this.element.style.minHeight="";this.groupElement.style.minHeight="";this.columns.forEach((function(t){t.clearVerticalAlign()}))};N.prototype.bindModuleColumns=function(){if(this.definition.formatter=="rownum"){this.table.rowManager.rowNumColumn=this}};N.prototype.getElement=function(){return this.element};N.prototype.getGroupElement=function(){return this.groupElement};N.prototype.getField=function(){return this.field};N.prototype.getFirstColumn=function(){if(!this.isGroup){return this}else{if(this.columns.length){return this.columns[0].getFirstColumn()}else{return false}}};N.prototype.getLastColumn=function(){if(!this.isGroup){return this}else{if(this.columns.length){return this.columns[this.columns.length-1].getLastColumn()}else{return false}}};N.prototype.getColumns=function(){return this.columns};N.prototype.getCells=function(){return this.cells};N.prototype.getTopColumn=function(){if(this.parent.isGroup){return this.parent.getTopColumn()}else{return this}};N.prototype.getDefinition=function(t){var i=[];if(this.isGroup&&t){this.columns.forEach((function(t){i.push(t.getDefinition(true))}));this.definition.columns=i}return this.definition};N.prototype.checkColumnVisibility=function(){var t=false;this.columns.forEach((function(i){if(i.visible){t=true}}));if(t){this.show();this.parent.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),false)}else{this.hide()}};N.prototype.show=function(t,i){if(!this.visible){this.visible=true;this.element.style.display="";if(this.parent.isGroup){this.parent.checkColumnVisibility()}this.cells.forEach((function(t){t.show()}));if(!this.isGroup&&this.width===null){this.reinitializeWidth()}this.table.columnManager._verticalAlignHeaders();if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.columns){this.table.modules.persistence.save("columns")}if(!i&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible)}if(!t){this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),true)}if(this.parent.isGroup){this.parent.matchChildWidths()}if(!this.silent&&this.table.options.virtualDomHoz){this.table.vdomHoz.reinitialize()}}};N.prototype.hide=function(t,i){if(this.visible){this.visible=false;this.element.style.display="none";this.table.columnManager._verticalAlignHeaders();if(this.parent.isGroup){this.parent.checkColumnVisibility()}this.cells.forEach((function(t){t.hide()}));if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.columns){this.table.modules.persistence.save("columns")}if(!i&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible)}if(!t){this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),false)}if(this.parent.isGroup){this.parent.matchChildWidths()}if(!this.silent&&this.table.options.virtualDomHoz){this.table.vdomHoz.reinitialize()}}};N.prototype.matchChildWidths=function(){var t=0;if(this.contentElement&&this.columns.length){this.columns.forEach((function(i){if(i.visible){t+=i.getWidth()}}));this.contentElement.style.maxWidth=t-1+"px";if(this.parent.isGroup){this.parent.matchChildWidths()}}};N.prototype.removeChild=function(t){var i=this.columns.indexOf(t);if(i>-1){this.columns.splice(i,1)}if(!this.columns.length){this.delete()}};N.prototype.setWidth=function(t){this.widthFixed=true;this.setWidthActual(t)};N.prototype.setWidthActual=function(t){if(isNaN(t)){t=Math.floor(this.table.element.clientWidth/100*parseInt(t))}t=Math.max(this.minWidth,t);if(this.maxWidth){t=Math.min(this.maxWidth,t)}this.width=t;this.widthStyled=t?t+"px":"";this.element.style.width=this.widthStyled;if(!this.isGroup){this.cells.forEach((function(t){t.setWidth()}))}if(this.parent.isGroup){this.parent.matchChildWidths()}if(this.table.modExists("frozenColumns")){this.table.modules.frozenColumns.layout()}};N.prototype.checkCellHeights=function(){var t=[];this.cells.forEach((function(i){if(i.row.heightInitialized){if(i.row.getElement().offsetParent!==null){t.push(i.row);i.row.clearCellHeight()}else{i.row.heightInitialized=false}}}));t.forEach((function(t){t.calcHeight()}));t.forEach((function(t){t.setCellHeight()}))};N.prototype.getWidth=function(){var t=0;if(this.isGroup){this.columns.forEach((function(i){if(i.visible){t+=i.getWidth()}}))}else{t=this.width}return t};N.prototype.getHeight=function(){return this.element.offsetHeight};N.prototype.setMinWidth=function(t){this.minWidth=t;this.minWidthStyled=t?t+"px":"";this.element.style.minWidth=this.minWidthStyled;this.cells.forEach((function(t){t.setMinWidth()}))};N.prototype.setMaxWidth=function(t){this.maxWidth=t;this.maxWidthStyled=t?t+"px":"";this.element.style.maxWidth=this.maxWidthStyled;this.cells.forEach((function(t){t.setMaxWidth()}))};N.prototype.delete=function(){var t=this;return new Promise((function(i,e){if(t.isGroup){t.columns.forEach((function(t){t.delete()}))}if(t.table.modExists("edit")){if(t.table.modules.edit.currentCell.column===t){t.table.modules.edit.cancelEdit()}}var r=t.cells.length;for(var n=0;n<r;n++){t.cells[0].delete()}if(t.element.parentNode){t.element.parentNode.removeChild(t.element)}t.element=false;t.contentElement=false;t.titleElement=false;t.groupElement=false;if(t.parent.isGroup){t.parent.removeChild(t)}t.table.columnManager.deregisterColumn(t);if(t.table.options.virtualDomHoz){t.table.vdomHoz.reinitialize(true)}i()}))};N.prototype.columnRendered=function(){if(this.titleFormatterRendered){this.titleFormatterRendered()}};N.prototype.validate=function(){var t=[];this.cells.forEach((function(i){if(!i.validate()){t.push(i.getComponent())}}));return t.length?t:true};N.prototype.generateCell=function(t){var i=this;var e=new A(i,t);this.cells.push(e);return e};N.prototype.nextColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1?this._nextVisibleColumn(t+1):false};N.prototype._nextVisibleColumn=function(t){var i=this.table.columnManager.getColumnByIndex(t);return!i||i.visible?i:this._nextVisibleColumn(t+1)};N.prototype.prevColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1?this._prevVisibleColumn(t-1):false};N.prototype._prevVisibleColumn=function(t){var i=this.table.columnManager.getColumnByIndex(t);return!i||i.visible?i:this._prevVisibleColumn(t-1)};N.prototype.reinitializeWidth=function(t){this.widthFixed=false;if(typeof this.definition.width!=="undefined"&&!t){this.setWidth(this.definition.width)}if(this.table.modExists("filter")){this.table.modules.filter.hideHeaderFilterElements()}this.fitToData();if(this.table.modExists("filter")){this.table.modules.filter.showHeaderFilterElements()}};N.prototype.fitToData=function(){var t=this;if(!this.widthFixed){this.element.style.width="";t.cells.forEach((function(t){t.clearWidth()}))}var i=this.element.offsetWidth;if(!t.width||!this.widthFixed){t.cells.forEach((function(t){var e=t.getWidth();if(e>i){i=e}}));if(i){t.setWidthActual(i+1)}}};N.prototype.updateDefinition=function(t){var i=this;return new Promise((function(e,r){var n;if(!i.isGroup){if(!i.parent.isGroup){n=Object.assign({},i.getDefinition());n=Object.assign(n,t);i.table.columnManager.addColumn(n,false,i).then((function(t){if(n.field==i.field){i.field=false}i.delete().then((function(){e(t.getComponent())})).catch((function(t){r(t)}))})).catch((function(t){r(t)}))}else{console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns");r("Column Update Error - The updateDefinition function is only available on columns, not column groups")}}else{console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns");r("Column Update Error - The updateDefinition function is only available on columns, not column groups")}}))};N.prototype.deleteCell=function(t){var i=this.cells.indexOf(t);if(i>-1){this.cells.splice(i,1)}};N.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","maxWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","headerHozAlign","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","clickMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"];N.prototype.getComponent=function(){if(!this.component){this.component=new R(this)}return this.component};var M=function t(i){this.table=i;this.element=this.createHolderElement();this.tableElement=this.createTableElement();this.heightFixer=this.createTableElement();this.columnManager=null;this.height=0;this.firstRender=false;this.renderMode="virtual";this.fixedHeight=false;this.rows=[];this.activeRows=[];this.activeRowsCount=0;this.displayRows=[];this.displayRowsCount=0;this.scrollTop=0;this.scrollLeft=0;this.vDomRowHeight=20;this.vDomTop=0;this.vDomBottom=0;this.vDomScrollPosTop=0;this.vDomScrollPosBottom=0;this.vDomTopPad=0;this.vDomBottomPad=0;this.vDomMaxRenderChain=90;this.vDomWindowBuffer=0;this.vDomWindowMinTotalRows=20;this.vDomWindowMinMarginRows=5;this.vDomTopNewRows=[];this.vDomBottomNewRows=[];this.rowNumColumn=false;this.redrawBlock=false;this.redrawBlockRestoreConfig=false;this.redrawBlockRederInPosition=false};M.prototype.createHolderElement=function(){var t=document.createElement("div");t.classList.add("tabulator-tableHolder");t.setAttribute("tabindex",0);return t};M.prototype.createTableElement=function(){var t=document.createElement("div");t.classList.add("tabulator-table");return t};M.prototype.getElement=function(){return this.element};M.prototype.getTableElement=function(){return this.tableElement};M.prototype.getRowPosition=function(t,i){if(i){return this.activeRows.indexOf(t)}else{return this.rows.indexOf(t)}};M.prototype.setColumnManager=function(t){this.columnManager=t};M.prototype.initialize=function(){var t=this;t.setRenderMode();t.element.appendChild(t.tableElement);t.firstRender=true;t.element.addEventListener("scroll",(function(){var i=t.element.scrollLeft;if(t.scrollLeft!=i){t.columnManager.scrollHorizontal(i);if(t.table.options.groupBy){t.table.modules.groupRows.scrollHeaders(i)}if(t.table.modExists("columnCalcs")){t.table.modules.columnCalcs.scrollHorizontal(i)}t.table.options.scrollHorizontal(i)}t.scrollLeft=i}));if(this.renderMode==="virtual"){t.element.addEventListener("scroll",(function(){var i=t.element.scrollTop;var e=t.scrollTop>i;if(t.scrollTop!=i){t.scrollTop=i;t.scrollVertical(e);if(t.table.options.ajaxProgressiveLoad=="scroll"){t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-i)}t.table.options.scrollVertical(i)}else{t.scrollTop=i}}))}};M.prototype.findRow=function(t){var i=this;if((typeof t==="undefined"?"undefined":T(t))=="object"){if(t instanceof P){return t}else if(t instanceof O){return t._getSelf()||false}else if(typeof HTMLElement!=="undefined"&&t instanceof HTMLElement){var e=i.rows.find((function(i){return i.getElement()===t}));return e||false}}else if(typeof t=="undefined"||t===null){return false}else{var r=i.rows.find((function(e){return e.data[i.table.options.index]==t}));return r||false}return false};M.prototype.getRowFromDataObject=function(t){var i=this.rows.find((function(i){return i.data===t}));return i||false};M.prototype.getRowFromPosition=function(t,i){if(i){return this.activeRows[t]}else{return this.rows[t]}};M.prototype.scrollToRow=function(t,i,e){var r=this;var n=this.getDisplayRows().indexOf(t),o=t.getElement(),s,a=0;return new Promise((function(t,u){if(n>-1){if(typeof i==="undefined"){i=r.table.options.scrollToRowPosition}if(typeof e==="undefined"){e=r.table.options.scrollToRowIfVisible}if(i==="nearest"){switch(r.renderMode){case"classic":s=H.prototype.helpers.elOffset(o).top;i=Math.abs(r.element.scrollTop-s)>Math.abs(r.element.scrollTop+r.element.clientHeight-s)?"bottom":"top";break;case"virtual":i=Math.abs(r.vDomTop-n)>Math.abs(r.vDomBottom-n)?"bottom":"top";break}}if(!e){if(H.prototype.helpers.elVisible(o)){a=H.prototype.helpers.elOffset(o).top-H.prototype.helpers.elOffset(r.element).top;if(a>0&&a<r.element.clientHeight-o.offsetHeight){return false}}}switch(r.renderMode){case"classic":r.element.scrollTop=H.prototype.helpers.elOffset(o).top-H.prototype.helpers.elOffset(r.element).top+r.element.scrollTop;break;case"virtual":r._virtualRenderFill(n,true);break}switch(i){case"middle":case"center":if(r.element.scrollHeight-r.element.scrollTop==r.element.clientHeight){r.element.scrollTop=r.element.scrollTop+(o.offsetTop-r.element.scrollTop)-(r.element.scrollHeight-o.offsetTop)/2}else{r.element.scrollTop=r.element.scrollTop-r.element.clientHeight/2}break;case"bottom":if(r.element.scrollHeight-r.element.scrollTop==r.element.clientHeight){r.element.scrollTop=r.element.scrollTop-(r.element.scrollHeight-o.offsetTop)+o.offsetHeight}else{r.element.scrollTop=r.element.scrollTop-r.element.clientHeight+o.offsetHeight}break}t()}else{console.warn("Scroll Error - Row not visible");u("Scroll Error - Row not visible")}}))};M.prototype.setData=function(t,i,e){var r=this;var n=this;return new Promise((function(o,s){if(i&&r.getDisplayRows().length){if(n.table.options.pagination){n._setDataActual(t,true)}else{r.reRenderInPosition((function(){n._setDataActual(t)}))}}else{if(r.table.options.autoColumns&&e){r.table.columnManager.generateColumnsFromRowData(t)}r.resetScroll();r._setDataActual(t)}o()}))};M.prototype._setDataActual=function(t,i){var e=this;e.table.options.dataLoading.call(this.table,t);this._wipeElements();if(this.table.options.history&&this.table.modExists("history")){this.table.modules.history.clear()}if(Array.isArray(t)){if(this.table.modExists("selectRow")){this.table.modules.selectRow.clearSelectionData()}if(this.table.options.reactiveData&&this.table.modExists("reactiveData",true)){this.table.modules.reactiveData.watchData(t)}t.forEach((function(t,i){if(t&&(typeof t==="undefined"?"undefined":T(t))==="object"){var r=new P(t,e);e.rows.push(r)}else{console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",t)}}));e.refreshActiveData(false,false,i);e.table.options.dataLoaded.call(this.table,t)}else{console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",typeof t==="undefined"?"undefined":T(t),"\nData: ",t)}};M.prototype._wipeElements=function(){this.rows.forEach((function(t){t.wipe()}));if(this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.wipe()}this.rows=[];this.activeRows=[];this.activeRowsCount=0;this.displayRows=[];this.displayRowsCount=0;this.adjustTableSize()};M.prototype.deleteRow=function(t,i){var e=this.rows.indexOf(t),r=this.activeRows.indexOf(t);if(r>-1){this.activeRows.splice(r,1)}if(e>-1){this.rows.splice(e,1)}this.setActiveRows(this.activeRows);this.displayRowIterator((function(i){var e=i.indexOf(t);if(e>-1){i.splice(e,1)}}));if(!i){this.reRenderInPosition()}this.regenerateRowNumbers();this.table.options.rowDeleted.call(this.table,t.getComponent());if(this.table.options.dataChanged){this.table.options.dataChanged.call(this.table,this.getData())}if(this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.updateGroupRows(true)}else if(this.table.options.pagination&&this.table.modExists("page")){this.refreshActiveData(false,false,true)}else{if(this.table.options.pagination&&this.table.modExists("page")){this.refreshActiveData("page")}}};M.prototype.addRow=function(t,i,e,r){var n=this.addRowActual(t,i,e,r);if(this.table.options.history&&this.table.modExists("history")){this.table.modules.history.action("rowAdd",n,{data:t,pos:i,index:e})}return n};M.prototype.addRows=function(t,i,e){var r=this;var n=this,o=[];return new Promise((function(s,a){i=r.findAddRowPos(i);if(!Array.isArray(t)){t=[t]}if(typeof e=="undefined"&&i||typeof e!=="undefined"&&!i){t.reverse()}t.forEach((function(t,r){var s=n.addRow(t,i,e,true);o.push(s)}));if(r.table.options.groupBy&&r.table.modExists("groupRows")){r.table.modules.groupRows.updateGroupRows(true)}else if(r.table.options.pagination&&r.table.modExists("page")){r.refreshActiveData(false,false,true)}else{r.reRenderInPosition()}if(r.table.modExists("columnCalcs")){r.table.modules.columnCalcs.recalc(r.table.rowManager.activeRows)}r.regenerateRowNumbers();s(o)}))};M.prototype.findAddRowPos=function(t){if(typeof t==="undefined"){t=this.table.options.addRowPos}if(t==="pos"){t=true}if(t==="bottom"){t=false}return t};M.prototype.addRowActual=function(t,i,e,r){var n=t instanceof P?t:new P(t||{},this),o=this.findAddRowPos(i),s=-1,a,u;if(!e&&this.table.options.pagination&&this.table.options.paginationAddRow=="page"){u=this.getDisplayRows();if(o){if(u.length){e=u[0]}else{if(this.activeRows.length){e=this.activeRows[this.activeRows.length-1];o=false}}}else{if(u.length){e=u[u.length-1];o=u.length<this.table.modules.page.getPageSize()?false:true}}}if(typeof e!=="undefined"){e=this.findRow(e)}if(this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.assignRowToGroup(n);var l=n.getGroup().rows;if(l.length>1){if(!e||e&&l.indexOf(e)==-1){if(o){if(l[0]!==n){e=l[0];this._moveRowInArray(n.getGroup().rows,n,e,!o)}}else{if(l[l.length-1]!==n){e=l[l.length-1];this._moveRowInArray(n.getGroup().rows,n,e,!o)}}}else{this._moveRowInArray(n.getGroup().rows,n,e,!o)}}}if(e){s=this.rows.indexOf(e)}if(e&&s>-1){a=this.activeRows.indexOf(e);this.displayRowIterator((function(t){var i=t.indexOf(e);if(i>-1){t.splice(o?i:i+1,0,n)}}));if(a>-1){this.activeRows.splice(o?a:a+1,0,n)}this.rows.splice(o?s:s+1,0,n)}else{if(o){this.displayRowIterator((function(t){t.unshift(n)}));this.activeRows.unshift(n);this.rows.unshift(n)}else{this.displayRowIterator((function(t){t.push(n)}));this.activeRows.push(n);this.rows.push(n)}}this.setActiveRows(this.activeRows);this.table.options.rowAdded.call(this.table,n.getComponent());if(this.table.options.dataChanged){this.table.options.dataChanged.call(this.table,this.getData())}if(!r){this.reRenderInPosition()}return n};M.prototype.moveRow=function(t,i,e){if(this.table.options.history&&this.table.modExists("history")){this.table.modules.history.action("rowMove",t,{posFrom:this.getRowPosition(t),posTo:this.getRowPosition(i),to:i,after:e})}this.moveRowActual(t,i,e);this.regenerateRowNumbers();this.table.options.rowMoved.call(this.table,t.getComponent())};M.prototype.moveRowActual=function(t,i,e){var r=this;this._moveRowInArray(this.rows,t,i,e);this._moveRowInArray(this.activeRows,t,i,e);this.displayRowIterator((function(n){r._moveRowInArray(n,t,i,e)}));if(this.table.options.groupBy&&this.table.modExists("groupRows")){if(!e&&i instanceof nt){i=this.table.rowManager.prevDisplayRow(t)||i}var n=i.getGroup();var o=t.getGroup();if(n===o){this._moveRowInArray(n.rows,t,i,e)}else{if(o){o.removeRow(t)}n.insertRow(t,i,e)}}};M.prototype._moveRowInArray=function(t,i,e,r){var n,o,s,a;if(i!==e){n=t.indexOf(i);if(n>-1){t.splice(n,1);o=t.indexOf(e);if(o>-1){if(r){t.splice(o+1,0,i)}else{t.splice(o,0,i)}}else{t.splice(n,0,i)}}if(t===this.getDisplayRows()){s=n<o?n:o;a=o>n?o:n+1;for(var u=s;u<=a;u++){if(t[u]){this.styleRow(t[u],u)}}}}};M.prototype.clearData=function(){this.setData([])};M.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)};M.prototype.getDisplayRowIndex=function(t){var i=this.getDisplayRows().indexOf(t);return i>-1?i:false};M.prototype.nextDisplayRow=function(t,i){var e=this.getDisplayRowIndex(t),r=false;if(e!==false&&e<this.displayRowsCount-1){r=this.getDisplayRows()[e+1]}if(r&&(!(r instanceof P)||r.type!="row")){return this.nextDisplayRow(r,i)}return r};M.prototype.prevDisplayRow=function(t,i){var e=this.getDisplayRowIndex(t),r=false;if(e){r=this.getDisplayRows()[e-1]}if(i&&r&&(!(r instanceof P)||r.type!="row")){return this.prevDisplayRow(r,i)}return r};M.prototype.findRowIndex=function(t,i){var e;t=this.findRow(t);if(t){e=i.indexOf(t);if(e>-1){return e}}return false};M.prototype.getData=function(t,i){var e=[],r=this.getRows(t);r.forEach((function(t){if(t.type=="row"){e.push(t.getData(i||"data"))}}));return e};M.prototype.getComponents=function(t){var i=[],e=this.getRows(t);e.forEach((function(t){i.push(t.getComponent())}));return i};M.prototype.getDataCount=function(t){var i=this.getRows(t);return i.length};M.prototype._genRemoteRequest=function(){var t=this;var i=this.table,e=i.options,r={};if(i.modExists("page")){if(e.ajaxSorting){var n=this.table.modules.sort.getSort();n.forEach((function(t){delete t.column}));r[this.table.modules.page.paginationDataSentNames.sorters]=n}if(e.ajaxFiltering){var o=this.table.modules.filter.getFilters(true,true);r[this.table.modules.page.paginationDataSentNames.filters]=o}this.table.modules.ajax.setParams(r,true)}i.modules.ajax.sendRequest().then((function(i){t._setDataActual(i,true)})).catch((function(t){}))};M.prototype.filterRefresh=function(){var t=this.table,i=t.options,e=this.scrollLeft;if(i.ajaxFiltering){if(i.pagination=="remote"&&t.modExists("page")){t.modules.page.reset(true);t.modules.page.setPage(1).then((function(){})).catch((function(){}))}else if(i.ajaxProgressiveLoad){t.modules.ajax.loadData().then((function(){})).catch((function(){}))}else{this._genRemoteRequest()}}else{this.refreshActiveData("filter")}this.scrollHorizontal(e)};M.prototype.sorterRefresh=function(t){var i=this.table,e=this.table.options,r=this.scrollLeft;if(e.ajaxSorting){if((e.pagination=="remote"||e.progressiveLoad)&&i.modExists("page")){i.modules.page.reset(true);i.modules.page.setPage(1).then((function(){})).catch((function(){}))}else if(e.ajaxProgressiveLoad){i.modules.ajax.loadData().then((function(){})).catch((function(){}))}else{this._genRemoteRequest()}}else{this.refreshActiveData(t?"filter":"sort")}this.scrollHorizontal(r)};M.prototype.scrollHorizontal=function(t){this.scrollLeft=t;this.element.scrollLeft=t;if(this.table.options.groupBy){this.table.modules.groupRows.scrollHeaders(t)}if(this.table.modExists("columnCalcs")){this.table.modules.columnCalcs.scrollHorizontal(t)}};M.prototype.refreshActiveData=function(t,i,e){var r=this,n=this.table,o=["all","filter","sort","display","freeze","group","tree","page"],s;if(this.redrawBlock){if(!this.redrawBlockRestoreConfig||o.indexOf(t)<o.indexOf(this.redrawBlockRestoreConfig.stage)){this.redrawBlockRestoreConfig={stage:t,skipStage:i,renderInPosition:e}}return}else{if(r.table.modExists("edit")){r.table.modules.edit.cancelEdit()}if(!t){t="all"}if(n.options.selectable&&!n.options.selectablePersistence&&n.modExists("selectRow")){n.modules.selectRow.deselectRows()}switch(t){case"all":case"filter":if(!i){if(n.modExists("filter")){r.setActiveRows(n.modules.filter.filter(r.rows))}else{r.setActiveRows(r.rows.slice(0))}}else{i=false}case"sort":if(!i){if(n.modExists("sort")){n.modules.sort.sort(this.activeRows)}}else{i=false}this.regenerateRowNumbers();case"display":this.resetDisplayRows();case"freeze":if(!i){if(this.table.modExists("frozenRows")){if(n.modules.frozenRows.isFrozen()){if(!n.modules.frozenRows.getDisplayIndex()){n.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex())}s=n.modules.frozenRows.getDisplayIndex();s=r.setDisplayRows(n.modules.frozenRows.getRows(this.getDisplayRows(s-1)),s);if(s!==true){n.modules.frozenRows.setDisplayIndex(s)}}}}else{i=false}case"group":if(!i){if(n.options.groupBy&&n.modExists("groupRows")){if(!n.modules.groupRows.getDisplayIndex()){n.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex())}s=n.modules.groupRows.getDisplayIndex();s=r.setDisplayRows(n.modules.groupRows.getRows(this.getDisplayRows(s-1)),s);if(s!==true){n.modules.groupRows.setDisplayIndex(s)}}}else{i=false}case"tree":if(!i){if(n.options.dataTree&&n.modExists("dataTree")){if(!n.modules.dataTree.getDisplayIndex()){n.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex())}s=n.modules.dataTree.getDisplayIndex();s=r.setDisplayRows(n.modules.dataTree.getRows(this.getDisplayRows(s-1)),s);if(s!==true){n.modules.dataTree.setDisplayIndex(s)}}}else{i=false}if(n.options.pagination&&n.modExists("page")&&!e){if(n.modules.page.getMode()=="local"){n.modules.page.reset()}}case"page":if(!i){if(n.options.pagination&&n.modExists("page")){if(!n.modules.page.getDisplayIndex()){n.modules.page.setDisplayIndex(this.getNextDisplayIndex())}s=n.modules.page.getDisplayIndex();if(n.modules.page.getMode()=="local"){n.modules.page.setMaxRows(this.getDisplayRows(s-1).length)}s=r.setDisplayRows(n.modules.page.getRows(this.getDisplayRows(s-1)),s);if(s!==true){n.modules.page.setDisplayIndex(s)}}}else{i=false}}if(H.prototype.helpers.elVisible(r.element)){if(e){r.reRenderInPosition()}else{if(t==="all"&&this.table.options.virtualDomHoz){this.table.vdomHoz.dataChange()}r.renderTable();if(n.options.layoutColumnsOnNewData){r.table.columnManager.redraw(true)}}}if(n.modExists("columnCalcs")){n.modules.columnCalcs.recalc(this.activeRows)}}};M.prototype.regenerateRowNumbers=function(){var t=this;if(this.rowNumColumn){this.activeRows.forEach((function(i){var e=i.getCell(t.rowNumColumn);if(e){e._generateContents()}}))}};M.prototype.setActiveRows=function(t){this.activeRows=t;this.activeRowsCount=this.activeRows.length};M.prototype.resetDisplayRows=function(){this.displayRows=[];this.displayRows.push(this.activeRows.slice(0));this.displayRowsCount=this.displayRows[0].length;if(this.table.modExists("frozenRows")){this.table.modules.frozenRows.setDisplayIndex(0)}if(this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.setDisplayIndex(0)}if(this.table.options.pagination&&this.table.modExists("page")){this.table.modules.page.setDisplayIndex(0)}};M.prototype.getNextDisplayIndex=function(){return this.displayRows.length};M.prototype.setDisplayRows=function(t,i){var e=true;if(i&&typeof this.displayRows[i]!="undefined"){this.displayRows[i]=t;e=true}else{this.displayRows.push(t);e=i=this.displayRows.length-1}if(i==this.displayRows.length-1){this.displayRowsCount=this.displayRows[this.displayRows.length-1].length}return e};M.prototype.getDisplayRows=function(t){if(typeof t=="undefined"){return this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]}else{return this.displayRows[t]||[]}};M.prototype.getVisibleRows=function(t){var i=this.element.scrollTop,e=this.element.clientHeight+i,r=false,n=0,o=0,s=this.getDisplayRows();if(t){this.getDisplayRows();for(var a=this.vDomTop;a<=this.vDomBottom;a++){if(s[a]){if(!r){if(i-s[a].getElement().offsetTop>=0){n=a}else{r=true;if(e-s[a].getElement().offsetTop>=0){o=a}else{break}}}else{if(e-s[a].getElement().offsetTop>=0){o=a}else{break}}}}}else{n=this.vDomTop;o=this.vDomBottom}return s.slice(n,o+1)};M.prototype.displayRowIterator=function(t){this.displayRows.forEach(t);this.displayRowsCount=this.displayRows[this.displayRows.length-1].length};M.prototype.getRows=function(t){var i;switch(t){case"active":i=this.activeRows;break;case"display":i=this.table.rowManager.getDisplayRows();break;case"visible":i=this.getVisibleRows(true);break;case"selected":i=this.table.modules.selectRow.selectedRows;break;default:i=this.rows}return i};M.prototype.reRenderInPosition=function(t){if(this.getRenderMode()=="virtual"){if(this.redrawBlock){if(t){t()}else{this.redrawBlockRederInPosition=true}}else{var i=this.element.scrollTop;var e=false;var r=false;var n=this.scrollLeft;var o=this.getDisplayRows();for(var s=this.vDomTop;s<=this.vDomBottom;s++){if(o[s]){var a=i-o[s].getElement().offsetTop;if(r===false||Math.abs(a)<r){r=a;e=s}else{break}}}if(t){t()}this._virtualRenderFill(e===false?this.displayRowsCount-1:e,true,r||0);this.scrollHorizontal(n)}}else{this.renderTable();if(t){t()}}};M.prototype.setRenderMode=function(){if(this.table.options.virtualDom){this.renderMode="virtual";if(this.table.element.clientHeight||this.table.options.height){this.fixedHeight=true}else{this.fixedHeight=false}}else{this.renderMode="classic"}};M.prototype.getRenderMode=function(){return this.renderMode};M.prototype.renderTable=function(){this.table.options.renderStarted.call(this.table);this.element.scrollTop=0;switch(this.renderMode){case"classic":this._simpleRender();break;case"virtual":this._virtualRenderFill();break}if(this.firstRender){if(this.displayRowsCount){this.firstRender=false;this.table.modules.layout.layout()}else{this.renderEmptyScroll()}}if(this.table.modExists("frozenColumns")){this.table.modules.frozenColumns.layout()}if(!this.displayRowsCount){if(this.table.options.placeholder){this.table.options.placeholder.setAttribute("tabulator-render-mode",this.renderMode);this.getElement().appendChild(this.table.options.placeholder);this.table.options.placeholder.style.width=this.table.columnManager.getWidth()+"px"}}this.table.options.renderComplete.call(this.table)};M.prototype._simpleRender=function(){this._clearVirtualDom();if(this.displayRowsCount){this.checkClassicModeGroupHeaderWidth()}else{this.renderEmptyScroll()}};M.prototype.checkClassicModeGroupHeaderWidth=function(){var t=this,i=this.tableElement,e=true;t.getDisplayRows().forEach((function(r,n){t.styleRow(r,n);i.appendChild(r.getElement());r.initialize(true);if(r.type!=="group"){e=false}}));if(e){i.style.minWidth=t.table.columnManager.getWidth()+"px"}else{i.style.minWidth=""}};M.prototype.renderEmptyScroll=function(){if(this.table.options.placeholder){this.tableElement.style.display="none"}else{this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}};M.prototype._clearVirtualDom=function(){var t=this.tableElement;if(this.table.options.placeholder&&this.table.options.placeholder.parentNode){this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder)}while(t.firstChild){t.removeChild(t.firstChild)}t.style.paddingTop="";t.style.paddingBottom="";t.style.minWidth="";t.style.minHeight="";t.style.display="";t.style.visibility="";this.scrollTop=0;this.scrollLeft=0;this.vDomTop=0;this.vDomBottom=0;this.vDomTopPad=0;this.vDomBottomPad=0};M.prototype.styleRow=function(t,i){var e=t.getElement();if(i%2){e.classList.add("tabulator-row-even");e.classList.remove("tabulator-row-odd")}else{e.classList.add("tabulator-row-odd");e.classList.remove("tabulator-row-even")}};M.prototype._virtualRenderFill=function(t,i,e){var r=this,n=r.tableElement,o=r.element,s=0,a=0,u=0,l=0,f=true,h=r.getDisplayRows();t=t||0;e=e||0;if(!t){r._clearVirtualDom()}else{while(n.firstChild){n.removeChild(n.firstChild)}var c=(r.displayRowsCount-t+1)*r.vDomRowHeight;if(c<r.height){t-=Math.ceil((r.height-c)/r.vDomRowHeight);if(t<0){t=0}}s=Math.min(Math.max(Math.floor(r.vDomWindowBuffer/r.vDomRowHeight),r.vDomWindowMinMarginRows),t);t-=s}if(r.displayRowsCount&&H.prototype.helpers.elVisible(r.element)){r.vDomTop=t;r.vDomBottom=t-1;while((a<=r.height+r.vDomWindowBuffer||l<r.vDomWindowMinTotalRows)&&r.vDomBottom<r.displayRowsCount-1){var d=r.vDomBottom+1,b=h[d],p=0;r.styleRow(b,d);n.appendChild(b.getElement());b.initialize();if(!b.heightInitialized){b.normalizeHeight(true)}p=b.getHeight();if(l<s){u+=p}else{a+=p}if(p>this.vDomWindowBuffer){this.vDomWindowBuffer=p*2}if(b.type!=="group"){f=false}r.vDomBottom++;l++}if(!t){this.vDomTopPad=0;r.vDomRowHeight=Math.floor((a+u)/l);r.vDomBottomPad=r.vDomRowHeight*(r.displayRowsCount-r.vDomBottom-1);r.vDomScrollHeight=u+a+r.vDomBottomPad-r.height}else{r.vDomTopPad=!i?r.scrollTop-u:r.vDomRowHeight*this.vDomTop+e;r.vDomBottomPad=r.vDomBottom==r.displayRowsCount-1?0:Math.max(r.vDomScrollHeight-r.vDomTopPad-a-u,0)}n.style.paddingTop=r.vDomTopPad+"px";n.style.paddingBottom=r.vDomBottomPad+"px";if(i){this.scrollTop=r.vDomTopPad+u+e-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)}this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height);if(this.element.scrollWidth>this.element.offsetWidth&&i){this.scrollTop+=this.element.offsetHeight-this.element.clientHeight}this.vDomScrollPosTop=this.scrollTop;this.vDomScrollPosBottom=this.scrollTop;o.scrollTop=this.scrollTop;n.style.minWidth=f?r.table.columnManager.getWidth()+"px":"";if(r.table.options.groupBy){if(r.table.modules.layout.getMode()!="fitDataFill"&&r.displayRowsCount==r.table.modules.groupRows.countGroups()){r.tableElement.style.minWidth=r.table.columnManager.getWidth()}}}else{this.renderEmptyScroll()}if(!this.fixedHeight){this.adjustTableSize()}};M.prototype.scrollVertical=function(t){var i=this.scrollTop-this.vDomScrollPosTop;var e=this.scrollTop-this.vDomScrollPosBottom;var r=this.vDomWindowBuffer*2;if(-i>r||e>r){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount));this.scrollHorizontal(n)}else{if(t){if(i<0){this._addTopRow(-i)}if(e<0){if(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer){this._removeBottomRow(-e)}else{this.vDomScrollPosBottom=this.scrollTop}}}else{if(i>=0){if(this.scrollTop>this.vDomWindowBuffer){this._removeTopRow(i)}else{this.vDomScrollPosTop=this.scrollTop}}if(e>=0){this._addBottomRow(e)}}}};M.prototype._addTopRow=function(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var e=this.tableElement,r=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,o=r[n],s=o.getHeight()||this.vDomRowHeight;if(t>=s){this.styleRow(o,n);e.insertBefore(o.getElement(),e.firstChild);if(!o.initialized||!o.heightInitialized){this.vDomTopNewRows.push(o);if(!o.heightInitialized){o.clearCellHeight()}}o.initialize();this.vDomTopPad-=s;if(this.vDomTopPad<0){this.vDomTopPad=n*this.vDomRowHeight}if(!n){this.vDomTopPad=0}e.style.paddingTop=this.vDomTopPad+"px";this.vDomScrollPosTop-=s;this.vDomTop--}t=-(this.scrollTop-this.vDomScrollPosTop);if(o.getHeight()>this.vDomWindowBuffer){this.vDomWindowBuffer=o.getHeight()*2}if(i<this.vDomMaxRenderChain&&this.vDomTop&&t>=(r[this.vDomTop-1].getHeight()||this.vDomRowHeight)){this._addTopRow(t,i+1)}else{this._quickNormalizeRowHeight(this.vDomTopNewRows)}}};M.prototype._removeTopRow=function(t){var i=this.tableElement,e=this.getDisplayRows()[this.vDomTop],r=e.getHeight()||this.vDomRowHeight;if(t>=r){var n=e.getElement();n.parentNode.removeChild(n);this.vDomTopPad+=r;i.style.paddingTop=this.vDomTopPad+"px";this.vDomScrollPosTop+=this.vDomTop?r:r+this.vDomWindowBuffer;this.vDomTop++;t=this.scrollTop-this.vDomScrollPosTop;this._removeTopRow(t)}};M.prototype._addBottomRow=function(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var e=this.tableElement,r=this.getDisplayRows();if(this.vDomBottom<this.displayRowsCount-1){var n=this.vDomBottom+1,o=r[n],s=o.getHeight()||this.vDomRowHeight;if(t>=s){this.styleRow(o,n);e.appendChild(o.getElement());if(!o.initialized||!o.heightInitialized){this.vDomBottomNewRows.push(o);if(!o.heightInitialized){o.clearCellHeight()}}o.initialize();this.vDomBottomPad-=s;if(this.vDomBottomPad<0||n==this.displayRowsCount-1){this.vDomBottomPad=0}e.style.paddingBottom=this.vDomBottomPad+"px";this.vDomScrollPosBottom+=s;this.vDomBottom++}t=this.scrollTop-this.vDomScrollPosBottom;if(o.getHeight()>this.vDomWindowBuffer){this.vDomWindowBuffer=o.getHeight()*2}if(i<this.vDomMaxRenderChain&&this.vDomBottom<this.displayRowsCount-1&&t>=(r[this.vDomBottom+1].getHeight()||this.vDomRowHeight)){this._addBottomRow(t,i+1)}else{this._quickNormalizeRowHeight(this.vDomBottomNewRows)}}};M.prototype._removeBottomRow=function(t){var i=this.tableElement,e=this.getDisplayRows()[this.vDomBottom],r=e.getHeight()||this.vDomRowHeight;if(t>=r){var n=e.getElement();if(n.parentNode){n.parentNode.removeChild(n)}this.vDomBottomPad+=r;if(this.vDomBottomPad<0){this.vDomBottomPad=0}i.style.paddingBottom=this.vDomBottomPad+"px";this.vDomScrollPosBottom-=r;this.vDomBottom--;t=-(this.scrollTop-this.vDomScrollPosBottom);this._removeBottomRow(t)}};M.prototype._quickNormalizeRowHeight=function(t){t.forEach((function(t){t.calcHeight()}));t.forEach((function(t){t.setCellHeight()}));t.length=0};M.prototype.normalizeHeight=function(){this.activeRows.forEach((function(t){t.normalizeHeight()}))};M.prototype.adjustTableSize=function(){var t=this.element.clientHeight,i;if(this.renderMode==="virtual"){var e=Math.floor(this.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&this.table.footerManager.active&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));if(this.fixedHeight){this.element.style.minHeight="calc(100% - "+e+"px)";this.element.style.height="calc(100% - "+e+"px)";this.element.style.maxHeight="calc(100% - "+e+"px)"}else{this.element.style.height="";this.element.style.height=this.table.element.clientHeight-e+"px";this.element.scrollTop=this.scrollTop}this.height=this.element.clientHeight;this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height;if(!this.fixedHeight&&t!=this.element.clientHeight){i=this.table.modExists("resizeTable");if(i&&!this.table.modules.resizeTable.autoResize||!i){this.redraw()}}}};M.prototype.reinitialize=function(){this.rows.forEach((function(t){t.reinitialize(true)}))};M.prototype.blockRedraw=function(){this.redrawBlock=true;this.redrawBlockRestoreConfig=false};M.prototype.restoreRedraw=function(){this.redrawBlock=false;if(this.redrawBlockRestoreConfig){this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition);this.redrawBlockRestoreConfig=false}else{if(this.redrawBlockRederInPosition){this.reRenderInPosition()}}this.redrawBlockRederInPosition=false};M.prototype.redraw=function(t){var i=this.scrollLeft;this.adjustTableSize();this.table.tableWidth=this.table.element.clientWidth;if(!t){if(this.renderMode=="classic"){if(this.table.options.groupBy){this.refreshActiveData("group",false,false)}else{this._simpleRender()}}else{this.reRenderInPosition();this.scrollHorizontal(i)}if(!this.displayRowsCount){if(this.table.options.placeholder){this.getElement().appendChild(this.table.options.placeholder)}}}else{this.renderTable()}};M.prototype.resetScroll=function(){this.element.scrollLeft=0;this.element.scrollTop=0;if(this.table.browser==="ie"){var t=document.createEvent("Event");t.initEvent("scroll",false,true);this.element.dispatchEvent(t)}else{this.element.dispatchEvent(new Event("scroll"))}};var D=function t(i){this.table=i;this.element=this.table.rowManager.tableElement;this.holderEl=this.table.rowManager.element;this.leftCol=0;this.rightCol=0;this.scrollLeft=0;this.vDomScrollPosLeft=0;this.vDomScrollPosRight=0;this.vDomPadLeft=0;this.vDomPadRight=0;this.fitDataColAvg=0;this.window=200;this.initialized=false;this.columns=[];if(this.compatabilityCheck()){this.initialize()}};D.prototype.compatabilityCheck=function(){var t=this.table.options,i=false,e=true;if(t.layout=="fitDataTable"){console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode");e=false}if(t.responsiveLayout){console.warn("Horizontal Vitrual DOM is not compatible with responsive columns");e=false}if(this.table.rtl){console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction");e=false}if(t.columns){i=t.columns.find((function(t){return t.frozen}));if(i){console.warn("Horizontal Vitrual DOM is not compatible with frozen columns");e=false}}if(!e){t.virtualDomHoz=false}return e};D.prototype.initialize=function(){var t=this;this.holderEl.addEventListener("scroll",(function(){var i=t.holderEl.scrollLeft;if(t.scrollLeft!=i){t.scrollLeft=i;t.scroll(i-(t.vDomScrollPosLeft+t.window))}}))};D.prototype.deinitialize=function(){this.initialized=false};D.prototype.clear=function(){this.columns=[];this.leftCol=-1;this.rightCol=0;this.vDomScrollPosLeft=0;this.vDomScrollPosRight=0;this.vDomPadLeft=0;this.vDomPadRight=0};D.prototype.dataChange=function(){var t=false,i=0,e=0,r,n,o;if(this.table.options.layout==="fitData"){this.table.columnManager.columnsByIndex.forEach((function(i){if(!i.definition.width&&i.visible){t=true}}));if(t){if(t&&this.table.rowManager.getDisplayRows().length){this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window;if(this.table.options.groupBy){r=this.table.modules.groupRows.getGroups(false)[0];n=r.getRows(false)[0]}else{n=this.table.rowManager.getDisplayRows()[0]}if(n){o=n.getElement();n.generateCells();this.element.appendChild(o);for(var e=0;e<n.cells.length;e++){var s=n.cells[e];o.appendChild(s.getElement());s.column.reinitializeWidth();i+=s.column.getWidth();if(i>this.vDomScrollPosRight){break}}o.parentNode.removeChild(o);this.fitDataColAvg=Math.floor(i/(e+1));for(e;e<this.table.columnManager.columnsByIndex.length;e++){this.table.columnManager.columnsByIndex[e].setWidth(this.fitDataColAvg)}this.reinitialize(false,true)}}}}else{if(this.table.options.layout==="fitColumns"){this.table.modules.layout.layout();this.table.vdomHoz.reinitialize(false,true)}}};D.prototype.fitDataLayoutOverride=function(){for(var t=this.leftCol;t<=this.rightCol;t++){this.columns[t].reinitializeWidth()}};D.prototype.reinitialize=function(t,i){var e=this;var r={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol};if(t&&!this.initialized){return}this.clear();this.scrollLeft=this.holderEl.scrollLeft;this.vDomScrollPosLeft=this.scrollLeft-this.window;this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window;var n=0;this.table.columnManager.columnsByIndex.forEach((function(t){var i={};if(t.visible){var r=t.getWidth();i.leftPos=n;i.rightPos=n+r;if(n+r>e.vDomScrollPosLeft&&n<e.vDomScrollPosRight){if(e.leftCol==-1){e.leftCol=e.columns.length;e.vDomPadLeft=n}e.rightCol=e.columns.length}else{if(e.leftCol!==-1){e.vDomPadRight+=r}}e.columns.push(t);t.modules.vdomHoz=i;n+=r}}));this.element.style.paddingLeft=this.vDomPadLeft+"px";this.element.style.paddingRight=this.vDomPadRight+"px";this.initialized=true;if(!i){if(!t||this.reinitChanged(r)){this.renitializeRows()}}this.holderEl.scrollLeft=this.scrollLeft};D.prototype.reinitChanged=function(t){var i=this;var e=true;if(t.cols.length!==this.columns.length||t.leftCol!==this.leftCol||t.rightCol!==this.rightCol){return true}t.cols.forEach((function(t,r){if(t!==i.columns[r]){e=false}}));return!e};D.prototype.renitializeRows=function(){var t=this;var i=this.table.rowManager.getVisibleRows();i.forEach((function(i){t.reinitializeRow(i,true)}))};D.prototype.scroll=function(t){this.vDomScrollPosLeft+=t;this.vDomScrollPosRight+=t;if(t>this.holderEl.clientWidth*.8){this.reinitialize()}else{if(t>0){this.addColRight();this.removeColLeft()}else{this.addColLeft();this.removeColRight()}}};D.prototype.colPositionAdjust=function(t,i,e){for(var r=t;r<i;r++){var n=this.columns[r];n.modules.vdomHoz.leftPos-=e;n.modules.vdomHoz.rightPos-=e}};D.prototype.addColRight=function(){var t=this.columns[this.rightCol+1],i,e,r;if(t&&t.modules.vdomHoz.leftPos<=this.vDomScrollPosRight){i=this.table.rowManager.getVisibleRows();i.forEach((function(i){if(i.type!=="group"){var e=i.getCell(t);i.getElement().appendChild(e.getElement());e.cellRendered()}}));if(this.fitDataColAvg){e=t.getWidth();if(e===this.fitDataColAvg){t.reinitializeWidth();r=e-t.getWidth();if(r){t.modules.vdomHoz.rightPos-=r;this.colPositionAdjust(this.rightCol+1,this.columns.length,r)}}}this.rightCol++;if(this.rightCol>=this.columns.length-1){this.vDomPadRight=0}else{this.vDomPadRight-=t.getWidth()}this.element.style.paddingRight=this.vDomPadRight+"px";this.addColRight()}};D.prototype.addColLeft=function(){var t=this.columns[this.leftCol-1],i;if(t&&t.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){var i=this.table.rowManager.getVisibleRows();i.forEach((function(i){if(i.type!=="group"){var e=i.getCell(t);i.getElement().prepend(e.getElement());e.cellRendered()}}));if(!this.leftCol){this.vDomPadLeft=0}else{this.vDomPadLeft-=t.getWidth()}this.element.style.paddingLeft=this.vDomPadLeft+"px";this.leftCol--;this.addColLeft()}};D.prototype.removeColRight=function(t){var t=this.columns[this.rightCol],i;if(t&&t.modules.vdomHoz.leftPos>this.vDomScrollPosRight){i=this.table.rowManager.getVisibleRows();t.modules.vdomHoz.visible=false;i.forEach((function(i){if(i.type!=="group"){var e=i.getCell(t);i.getElement().removeChild(e.getElement())}}));this.vDomPadRight+=t.getWidth();this.element.style.paddingRight=this.vDomPadRight+"px";this.rightCol--;this.removeColRight()}};D.prototype.removeColLeft=function(){var t=this.columns[this.leftCol],i;if(t&&t.modules.vdomHoz.rightPos<this.vDomScrollPosLeft){i=this.table.rowManager.getVisibleRows();i.forEach((function(i){if(i.type!=="group"){var e=i.getCell(t);i.getElement().removeChild(e.getElement())}}));this.vDomPadLeft+=t.getWidth();this.element.style.paddingLeft=this.vDomPadLeft+"px";this.leftCol++;this.removeColLeft()}};D.prototype.initializeRow=function(t){if(t.type!=="group"){t.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol};for(var i=this.leftCol;i<=this.rightCol;i++){var e=this.columns[i];if(e&&e.visible){var r=t.getCell(e);t.getElement().appendChild(r.getElement());r.cellRendered()}}}};D.prototype.reinitializeRow=function(t,i){if(t.type!=="group"){if(i||!t.modules.vdomHoz||t.modules.vdomHoz.leftCol!==this.leftCol||t.modules.vdomHoz.rightCol!==this.rightCol){var e=t.getElement();while(e.firstChild){e.removeChild(e.firstChild)}this.initializeRow(t)}}};var O=function t(i){this._row=i};O.prototype.getData=function(t){return this._row.getData(t)};O.prototype.getElement=function(){return this._row.getElement()};O.prototype.getCells=function(){var t=[];this._row.getCells().forEach((function(i){t.push(i.getComponent())}));return t};O.prototype.getCell=function(t){var i=this._row.getCell(t);return i?i.getComponent():false};O.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]};O.prototype.getPosition=function(t){return this._row.table.rowManager.getRowPosition(this._row,t)};O.prototype.delete=function(){return this._row.delete()};O.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)};O.prototype.pageTo=function(){if(this._row.table.modExists("page",true)){return this._row.table.modules.page.setPageToRow(this._row)}};O.prototype.move=function(t,i){this._row.moveToRow(t,i)};O.prototype.update=function(t){return this._row.updateData(t)};O.prototype.normalizeHeight=function(){this._row.normalizeHeight(true)};O.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)};O.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)};O.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)};O.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)};O.prototype._getSelf=function(){return this._row};O.prototype.validate=function(){return this._row.validate()};O.prototype.freeze=function(){if(this._row.table.modExists("frozenRows",true)){this._row.table.modules.frozenRows.freezeRow(this._row)}};O.prototype.unfreeze=function(){if(this._row.table.modExists("frozenRows",true)){this._row.table.modules.frozenRows.unfreezeRow(this._row)}};O.prototype.isFrozen=function(){if(this._row.table.modExists("frozenRows",true)){var t=this._row.table.modules.frozenRows.rows.indexOf(this._row);return t>-1}return false};O.prototype.treeCollapse=function(){if(this._row.table.modExists("dataTree",true)){this._row.table.modules.dataTree.collapseRow(this._row)}};O.prototype.treeExpand=function(){if(this._row.table.modExists("dataTree",true)){this._row.table.modules.dataTree.expandRow(this._row)}};O.prototype.treeToggle=function(){if(this._row.table.modExists("dataTree",true)){this._row.table.modules.dataTree.toggleRow(this._row)}};O.prototype.getTreeParent=function(){if(this._row.table.modExists("dataTree",true)){return this._row.table.modules.dataTree.getTreeParent(this._row)}return false};O.prototype.getTreeChildren=function(){if(this._row.table.modExists("dataTree",true)){return this._row.table.modules.dataTree.getTreeChildren(this._row,true)}return false};O.prototype.addTreeChild=function(t,i,e){if(this._row.table.modExists("dataTree",true)){return this._row.table.modules.dataTree.addTreeChildRow(this._row,t,i,e)}return false};O.prototype.reformat=function(){return this._row.reinitialize()};O.prototype.getGroup=function(){return this._row.getGroup().getComponent()};O.prototype.getTable=function(){return this._row.table};O.prototype.getNextRow=function(){var t=this._row.nextRow();return t?t.getComponent():t};O.prototype.getPrevRow=function(){var t=this._row.prevRow();return t?t.getComponent():t};var P=function t(i,e){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"row";this.table=e.table;this.parent=e;this.data={};this.type=r;this.element=false;this.modules={};this.cells=[];this.height=0;this.heightStyled="";this.manualHeight=false;this.outerHeight=0;this.initialized=false;this.heightInitialized=false;this.component=null;this.created=false;this.setData(i)};P.prototype.create=function(){if(!this.created){this.created=true;this.generateElement()}};P.prototype.createElement=function(){var t=document.createElement("div");t.classList.add("tabulator-row");t.setAttribute("role","row");this.element=t};P.prototype.getElement=function(){this.create();return this.element};P.prototype.detachElement=function(){if(this.element&&this.element.parentNode){this.element.parentNode.removeChild(this.element)}};P.prototype.generateElement=function(){var t=this,i,e,r;this.createElement();if(t.table.options.selectable!==false&&t.table.modExists("selectRow")){t.table.modules.selectRow.initializeRow(this)}if(t.table.options.movableRows!==false&&t.table.modExists("moveRow")){t.table.modules.moveRow.initializeRow(this)}if(t.table.options.dataTree!==false&&t.table.modExists("dataTree")){t.table.modules.dataTree.initializeRow(this)}if(t.table.options.responsiveLayout==="collapse"&&t.table.modExists("responsiveLayout")){t.table.modules.responsiveLayout.initializeRow(this)}if((t.table.options.rowContextMenu||t.table.options.rowClickMenu)&&this.table.modExists("menu")){t.table.modules.menu.initializeRow(this)}if(t.table.options.rowClick){t.element.addEventListener("click",(function(i){t.table.options.rowClick(i,t.getComponent())}))}if(t.table.options.rowDblClick){t.element.addEventListener("dblclick",(function(i){t.table.options.rowDblClick(i,t.getComponent())}))}if(t.table.options.rowContext){t.element.addEventListener("contextmenu",(function(i){t.table.options.rowContext(i,t.getComponent())}))}if(t.table.options.rowMouseEnter){t.element.addEventListener("mouseenter",(function(i){t.table.options.rowMouseEnter(i,t.getComponent())}))}if(t.table.options.rowMouseLeave){t.element.addEventListener("mouseleave",(function(i){t.table.options.rowMouseLeave(i,t.getComponent())}))}if(t.table.options.rowMouseOver){t.element.addEventListener("mouseover",(function(i){t.table.options.rowMouseOver(i,t.getComponent())}))}if(t.table.options.rowMouseOut){t.element.addEventListener("mouseout",(function(i){t.table.options.rowMouseOut(i,t.getComponent())}))}if(t.table.options.rowMouseMove){t.element.addEventListener("mousemove",(function(i){t.table.options.rowMouseMove(i,t.getComponent())}))}if(t.table.options.rowTap){r=false;t.element.addEventListener("touchstart",(function(t){r=true}),{passive:true});t.element.addEventListener("touchend",(function(i){if(r){t.table.options.rowTap(i,t.getComponent())}r=false}))}if(t.table.options.rowDblTap){i=null;t.element.addEventListener("touchend",(function(e){if(i){clearTimeout(i);i=null;t.table.options.rowDblTap(e,t.getComponent())}else{i=setTimeout((function(){clearTimeout(i);i=null}),300)}}))}if(t.table.options.rowTapHold){e=null;t.element.addEventListener("touchstart",(function(i){clearTimeout(e);e=setTimeout((function(){clearTimeout(e);e=null;r=false;t.table.options.rowTapHold(i,t.getComponent())}),1e3)}),{passive:true});t.element.addEventListener("touchend",(function(t){clearTimeout(e);e=null}))}};P.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)};P.prototype.initialize=function(t){var i=this;this.create();if(!this.initialized||t){this.deleteCells();while(this.element.firstChild){this.element.removeChild(this.element.firstChild)}if(this.table.modExists("frozenColumns")){this.table.modules.frozenColumns.layoutRow(this)}this.generateCells();if(this.table.options.virtualDomHoz&&this.table.vdomHoz.initialized){this.table.vdomHoz.initializeRow(this)}else{this.cells.forEach((function(t){i.element.appendChild(t.getElement());t.cellRendered()}))}if(t){this.normalizeHeight()}if(this.table.options.dataTree&&this.table.modExists("dataTree")){this.table.modules.dataTree.layoutRow(this)}if(this.table.options.responsiveLayout==="collapse"&&this.table.modExists("responsiveLayout")){this.table.modules.responsiveLayout.layoutRow(this)}if(this.table.options.rowFormatter){this.table.options.rowFormatter(this.getComponent())}if(this.table.options.resizableRows&&this.table.modExists("resizeRows")){this.table.modules.resizeRows.initializeRow(this)}this.initialized=true}else{if(this.table.options.virtualDomHoz){this.table.vdomHoz.reinitializeRow(this)}}};P.prototype.reinitializeHeight=function(){this.heightInitialized=false;if(this.element&&this.element.offsetParent!==null){this.normalizeHeight(true)}};P.prototype.reinitialize=function(t){this.initialized=false;this.heightInitialized=false;if(!this.manualHeight){this.height=0;this.heightStyled=""}if(this.element&&this.element.offsetParent!==null){this.initialize(true)}if(this.table.options.dataTree&&this.table.modExists("dataTree",true)){this.table.modules.dataTree.getTreeChildren(this,false,true).forEach((function(t){t.reinitialize(true)}))}};P.prototype.calcHeight=function(t){var i=0,e=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach((function(t){var e=t.getHeight();if(e>i){i=e}}));if(t){this.height=Math.max(i,e)}else{this.height=this.manualHeight?this.height:Math.max(i,e)}this.heightStyled=this.height?this.height+"px":"";this.outerHeight=this.element.offsetHeight};P.prototype.setCellHeight=function(){this.cells.forEach((function(t){t.setHeight()}));this.heightInitialized=true};P.prototype.clearCellHeight=function(){this.cells.forEach((function(t){t.clearHeight()}))};P.prototype.normalizeHeight=function(t){if(t){this.clearCellHeight()}this.calcHeight(t);this.setCellHeight()};P.prototype.setHeight=function(t,i){if(this.height!=t||i){this.manualHeight=true;this.height=t;this.heightStyled=t?t+"px":"";this.setCellHeight();this.outerHeight=this.element.offsetHeight}};P.prototype.getHeight=function(){return this.outerHeight};P.prototype.getWidth=function(){return this.element.offsetWidth};P.prototype.deleteCell=function(t){var i=this.cells.indexOf(t);if(i>-1){this.cells.splice(i,1)}};P.prototype.setData=function(t){if(this.table.modExists("mutator")){t=this.table.modules.mutator.transformRow(t,"data")}this.data=t;if(this.table.options.reactiveData&&this.table.modExists("reactiveData",true)){this.table.modules.reactiveData.watchRow(this)}};P.prototype.updateData=function(t){var i=this;var e=this.element&&H.prototype.helpers.elVisible(this.element),r={},n;return new Promise((function(o,s){if(typeof t==="string"){t=JSON.parse(t)}if(i.table.options.reactiveData&&i.table.modExists("reactiveData",true)){i.table.modules.reactiveData.block()}if(i.table.modExists("mutator")){r=Object.assign(r,i.data);r=Object.assign(r,t);n=i.table.modules.mutator.transformRow(r,"data",t)}else{n=t}for(var a in n){i.data[a]=n[a]}if(i.table.options.reactiveData&&i.table.modExists("reactiveData",true)){i.table.modules.reactiveData.unblock()}for(var a in t){var u=i.table.columnManager.getColumnsByFieldRoot(a);u.forEach((function(t){var r=i.getCell(t.getField());if(r){var o=t.getFieldValue(n);if(r.getValue()!=o){r.setValueProcessData(o);if(e){r.cellRendered()}}}}))}if(i.table.options.groupUpdateOnCellEdit&&i.table.options.groupBy&&i.table.modExists("groupRows")){i.table.modules.groupRows.reassignRowToGroup(i.row)}if(e){i.normalizeHeight(true);if(i.table.options.rowFormatter){i.table.options.rowFormatter(i.getComponent())}}else{i.initialized=false;i.height=0;i.heightStyled=""}if(i.table.options.dataTree!==false&&i.table.modExists("dataTree")&&i.table.modules.dataTree.redrawNeeded(t)){i.table.modules.dataTree.initializeRow(i);if(e){i.table.modules.dataTree.layoutRow(i);i.table.rowManager.refreshActiveData("tree",false,true)}}i.table.options.rowUpdated.call(i.table,i.getComponent());if(i.table.options.dataChanged){i.table.options.dataChanged.call(i.table,i.table.rowManager.getData())}o()}))};P.prototype.getData=function(t){if(t){if(this.table.modExists("accessor")){return this.table.modules.accessor.transformRow(this,t)}}return this.data};P.prototype.getCell=function(t){var i=false;t=this.table.columnManager.findColumn(t);i=this.cells.find((function(i){return i.column===t}));return i};P.prototype.getCellIndex=function(t){return this.cells.findIndex((function(i){return i===t}))};P.prototype.findNextEditableCell=function(t){var i=false;if(t<this.cells.length-1){for(var e=t+1;e<this.cells.length;e++){var r=this.cells[e];if(r.column.modules.edit&&H.prototype.helpers.elVisible(r.getElement())){var n=true;if(typeof r.column.modules.edit.check=="function"){n=r.column.modules.edit.check(r.getComponent())}if(n){i=r;break}}}}return i};P.prototype.findPrevEditableCell=function(t){var i=false;if(t>0){for(var e=t-1;e>=0;e--){var r=this.cells[e],n=true;if(r.column.modules.edit&&H.prototype.helpers.elVisible(r.getElement())){if(typeof r.column.modules.edit.check=="function"){n=r.column.modules.edit.check(r.getComponent())}if(n){i=r;break}}}}return i};P.prototype.getCells=function(){return this.cells};P.prototype.nextRow=function(){var t=this.table.rowManager.nextDisplayRow(this,true);return t||false};P.prototype.prevRow=function(){var t=this.table.rowManager.prevDisplayRow(this,true);return t||false};P.prototype.moveToRow=function(t,i){var e=this.table.rowManager.findRow(t);if(e){this.table.rowManager.moveRowActual(this,e,!i);this.table.rowManager.refreshActiveData("display",false,true)}else{console.warn("Move Error - No matching row found:",t)}};P.prototype.validate=function(){var t=[];this.cells.forEach((function(i){if(!i.validate()){t.push(i.getComponent())}}));return t.length?t:true};P.prototype.delete=function(){var t=this;return new Promise((function(i,e){var r,n;if(t.table.options.history&&t.table.modExists("history")){if(t.table.options.groupBy&&t.table.modExists("groupRows")){n=t.getGroup().rows;r=n.indexOf(t);if(r){r=n[r-1]}}else{r=t.table.rowManager.getRowIndex(t);if(r){r=t.table.rowManager.rows[r-1]}}t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!r,index:r})}t.deleteActual();i()}))};P.prototype.deleteActual=function(t){this.table.rowManager.getRowIndex(this);this.detatchModules();if(this.table.options.reactiveData&&this.table.modExists("reactiveData",true));if(this.modules.group){this.modules.group.removeRow(this)}this.table.rowManager.deleteRow(this,t);this.deleteCells();this.initialized=false;this.heightInitialized=false;this.element=false;if(this.table.options.dataTree&&this.table.modExists("dataTree",true)){this.table.modules.dataTree.rowDelete(this)}if(this.table.modExists("columnCalcs")){if(this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.columnCalcs.recalcRowGroup(this)}else{this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)}}};P.prototype.detatchModules=function(){if(this.table.modExists("selectRow")){this.table.modules.selectRow._deselectRow(this,true)}if(this.table.modExists("edit")){if(this.table.modules.edit.currentCell.row===this){this.table.modules.edit.cancelEdit()}}if(this.table.modExists("frozenRows")){this.table.modules.frozenRows.detachRow(this)}};P.prototype.deleteCells=function(){var t=this.cells.length;for(var i=0;i<t;i++){this.cells[0].delete()}};P.prototype.wipe=function(){this.detatchModules();this.deleteCells();if(this.element){while(this.element.firstChild){this.element.removeChild(this.element.firstChild)}if(this.element.parentNode){this.element.parentNode.removeChild(this.element)}}this.element=false;this.modules={}};P.prototype.getGroup=function(){return this.modules.group||false};P.prototype.getComponent=function(){if(!this.component){this.component=new O(this)}return this.component};var F=function t(i){this._cell=i};F.prototype.getValue=function(){return this._cell.getValue()};F.prototype.getOldValue=function(){return this._cell.getOldValue()};F.prototype.getInitialValue=function(){return this._cell.initialValue};F.prototype.getElement=function(){return this._cell.getElement()};F.prototype.getRow=function(){return this._cell.row.getComponent()};F.prototype.getData=function(){return this._cell.row.getData()};F.prototype.getField=function(){return this._cell.column.getField()};F.prototype.getColumn=function(){return this._cell.column.getComponent()};F.prototype.setValue=function(t,i){if(typeof i=="undefined"){i=true}this._cell.setValue(t,i)};F.prototype.restoreOldValue=function(){this._cell.setValueActual(this._cell.getOldValue())};F.prototype.restoreInitialValue=function(){this._cell.setValueActual(this._cell.initialValue)};F.prototype.edit=function(t){return this._cell.edit(t)};F.prototype.cancelEdit=function(){this._cell.cancelEdit()};F.prototype.isEdited=function(){return!!this._cell.modules.edit&&this._cell.modules.edit.edited};F.prototype.clearEdited=function(){if(self.table.modExists("edit",true)){this._cell.table.modules.edit.clearEdited(this._cell)}};F.prototype.isValid=function(){return this._cell.modules.validate?!this._cell.modules.validate.invalid:true};F.prototype.validate=function(){return this._cell.validate()};F.prototype.clearValidation=function(){if(this._cell.table.modExists("validate",true)){this._cell.table.modules.validate.clearValidation(this._cell)}};F.prototype.nav=function(){return this._cell.nav()};F.prototype.checkHeight=function(){this._cell.checkHeight()};F.prototype.getTable=function(){return this._cell.table};F.prototype._getSelf=function(){return this._cell};var A=function t(i,e){this.table=i.table;this.column=i;this.row=e;this.element=null;this.value=null;this.oldValue=null;this.modules={};this.height=null;this.width=null;this.minWidth=null;this.component=null;this.loaded=false;this.build()};A.prototype.build=function(){this.generateElement();this.setWidth();this._configureCell();this.setValueActual(this.column.getFieldValue(this.row.data));this.initialValue=this.value};A.prototype.generateElement=function(){this.element=document.createElement("div");this.element.className="tabulator-cell";this.element.setAttribute("role","gridcell");this.element=this.element};A.prototype._configureCell=function(){var t=this,i=t.column.cellEvents,e=t.element,r=this.column.getField(),n={top:"flex-start",bottom:"flex-end",middle:"center"},o={left:"flex-start",right:"flex-end",center:"center"};e.style.textAlign=t.column.hozAlign;if(t.column.vertAlign){e.style.display="inline-flex";e.style.alignItems=n[t.column.vertAlign]||"";if(t.column.hozAlign){e.style.justifyContent=o[t.column.hozAlign]||""}}if(r){e.setAttribute("tabulator-field",r)}if(t.column.definition.cssClass){var s=t.column.definition.cssClass.split(" ");s.forEach((function(t){e.classList.add(t)}))}if(this.table.options.tooltipGenerationMode==="hover"){e.addEventListener("mouseenter",(function(i){t._generateTooltip()}))}t._bindClickEvents(i);t._bindTouchEvents(i);t._bindMouseEvents(i);if(t.column.modules.edit){t.table.modules.edit.bindEditor(t)}if(t.column.definition.rowHandle&&t.table.options.movableRows!==false&&t.table.modExists("moveRow")){t.table.modules.moveRow.initializeCell(t)}if(!t.column.visible){t.hide()}};A.prototype._bindClickEvents=function(t){var i=this,e=i.element;if(t.cellClick||i.table.options.cellClick){e.addEventListener("click",(function(e){var r=i.getComponent();if(t.cellClick){t.cellClick.call(i.table,e,r)}if(i.table.options.cellClick){i.table.options.cellClick.call(i.table,e,r)}}))}if(t.cellDblClick||this.table.options.cellDblClick){e.addEventListener("dblclick",(function(e){var r=i.getComponent();if(t.cellDblClick){t.cellDblClick.call(i.table,e,r)}if(i.table.options.cellDblClick){i.table.options.cellDblClick.call(i.table,e,r)}}))}else{e.addEventListener("dblclick",(function(t){if(i.table.modExists("edit")){if(i.table.modules.edit.currentCell===i){return}}t.preventDefault();try{if(document.selection){var e=document.body.createTextRange();e.moveToElementText(i.element);e.select()}else if(window.getSelection){var e=document.createRange();e.selectNode(i.element);window.getSelection().removeAllRanges();window.getSelection().addRange(e)}}catch(t){}}))}if(t.cellContext||this.table.options.cellContext){e.addEventListener("contextmenu",(function(e){var r=i.getComponent();if(t.cellContext){t.cellContext.call(i.table,e,r)}if(i.table.options.cellContext){i.table.options.cellContext.call(i.table,e,r)}}))}};A.prototype._bindMouseEvents=function(t){var i=this,e=i.element;if(t.cellMouseEnter||i.table.options.cellMouseEnter){e.addEventListener("mouseenter",(function(e){var r=i.getComponent();if(t.cellMouseEnter){t.cellMouseEnter.call(i.table,e,r)}if(i.table.options.cellMouseEnter){i.table.options.cellMouseEnter.call(i.table,e,r)}}))}if(t.cellMouseLeave||i.table.options.cellMouseLeave){e.addEventListener("mouseleave",(function(e){var r=i.getComponent();if(t.cellMouseLeave){t.cellMouseLeave.call(i.table,e,r)}if(i.table.options.cellMouseLeave){i.table.options.cellMouseLeave.call(i.table,e,r)}}))}if(t.cellMouseOver||i.table.options.cellMouseOver){e.addEventListener("mouseover",(function(e){var r=i.getComponent();if(t.cellMouseOver){t.cellMouseOver.call(i.table,e,r)}if(i.table.options.cellMouseOver){i.table.options.cellMouseOver.call(i.table,e,r)}}))}if(t.cellMouseOut||i.table.options.cellMouseOut){e.addEventListener("mouseout",(function(e){var r=i.getComponent();if(t.cellMouseOut){t.cellMouseOut.call(i.table,e,r)}if(i.table.options.cellMouseOut){i.table.options.cellMouseOut.call(i.table,e,r)}}))}if(t.cellMouseMove||i.table.options.cellMouseMove){e.addEventListener("mousemove",(function(e){var r=i.getComponent();if(t.cellMouseMove){t.cellMouseMove.call(i.table,e,r)}if(i.table.options.cellMouseMove){i.table.options.cellMouseMove.call(i.table,e,r)}}))}};A.prototype._bindTouchEvents=function(t){var i=this,e=i.element,r,n,o;if(t.cellTap||this.table.options.cellTap){o=false;e.addEventListener("touchstart",(function(t){o=true}),{passive:true});e.addEventListener("touchend",(function(e){if(o){var r=i.getComponent();if(t.cellTap){t.cellTap.call(i.table,e,r)}if(i.table.options.cellTap){i.table.options.cellTap.call(i.table,e,r)}}o=false}))}if(t.cellDblTap||this.table.options.cellDblTap){r=null;e.addEventListener("touchend",(function(e){if(r){clearTimeout(r);r=null;var n=i.getComponent();if(t.cellDblTap){t.cellDblTap.call(i.table,e,n)}if(i.table.options.cellDblTap){i.table.options.cellDblTap.call(i.table,e,n)}}else{r=setTimeout((function(){clearTimeout(r);r=null}),300)}}))}if(t.cellTapHold||this.table.options.cellTapHold){n=null;e.addEventListener("touchstart",(function(e){clearTimeout(n);n=setTimeout((function(){clearTimeout(n);n=null;o=false;var r=i.getComponent();if(t.cellTapHold){t.cellTapHold.call(i.table,e,r)}if(i.table.options.cellTapHold){i.table.options.cellTapHold.call(i.table,e,r)}}),1e3)}),{passive:true});e.addEventListener("touchend",(function(t){clearTimeout(n);n=null}))}};A.prototype._generateContents=function(){var t;if(this.table.modExists("format")){t=this.table.modules.format.formatValue(this)}else{t=this.element.innerHTML=this.value}switch(typeof t==="undefined"?"undefined":T(t)){case"object":if(t instanceof Node){while(this.element.firstChild){this.element.removeChild(this.element.firstChild)}this.element.appendChild(t)}else{this.element.innerHTML="";if(t!=null){console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",t)}}break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=t}};A.prototype.cellRendered=function(){if(this.table.modExists("format")&&this.table.modules.format.cellRendered){this.table.modules.format.cellRendered(this)}};A.prototype._generateTooltip=function(){var t=this.column.tooltip;if(t){if(t===true){t=this.value}else if(typeof t=="function"){t=t(this.getComponent());if(t===false){t=""}}if(typeof t==="undefined"){t=""}this.element.setAttribute("title",t)}else{this.element.setAttribute("title","")}};A.prototype.getElement=function(t){if(!this.loaded){this.loaded=true;if(!t){this.layoutElement()}}return this.element};A.prototype.getValue=function(){return this.value};A.prototype.getOldValue=function(){return this.oldValue};A.prototype.setValue=function(t,i){var e=this.setValueProcessData(t,i),r;if(e){if(this.table.options.history&&this.table.modExists("history")){this.table.modules.history.action("cellEdit",this,{oldValue:this.oldValue,newValue:this.value})}r=this.getComponent();if(this.column.cellEvents.cellEdited){this.column.cellEvents.cellEdited.call(this.table,r)}if(this.table.options.groupUpdateOnCellEdit&&this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.reassignRowToGroup(this.row)}this.cellRendered();this.table.options.cellEdited.call(this.table,r);if(this.table.options.dataChanged){this.table.options.dataChanged.call(this.table,this.table.rowManager.getData())}}};A.prototype.setValueProcessData=function(t,i){var e=false;if(this.value!=t){e=true;if(i){if(this.column.modules.mutate){t=this.table.modules.mutator.transformCell(this,t)}}}this.setValueActual(t);if(e&&this.table.modExists("columnCalcs")){if(this.column.definition.topCalc||this.column.definition.bottomCalc){if(this.table.options.groupBy&&this.table.modExists("groupRows")){if(this.table.options.columnCalcs=="table"||this.table.options.columnCalcs=="both"){this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)}if(this.table.options.columnCalcs!="table"){this.table.modules.columnCalcs.recalcRowGroup(this.row)}}else{this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)}}}return e};A.prototype.setValueActual=function(t){this.oldValue=this.value;this.value=t;if(this.table.options.reactiveData&&this.table.modExists("reactiveData")){this.table.modules.reactiveData.block()}this.column.setFieldValue(this.row.data,t);if(this.table.options.reactiveData&&this.table.modExists("reactiveData")){this.table.modules.reactiveData.unblock()}if(this.loaded){this.layoutElement()}};A.prototype.layoutElement=function(){this._generateContents();this._generateTooltip();if(this.table.options.resizableColumns&&this.table.modExists("resizeColumns")&&this.row.type==="row"){this.table.modules.resizeColumns.initializeColumn("cell",this.column,this.element)}if((this.column.definition.contextMenu||this.column.definition.clickMenu)&&this.table.modExists("menu")){this.table.modules.menu.initializeCell(this)}if(this.table.modExists("frozenColumns")){this.table.modules.frozenColumns.layoutElement(this.element,this.column)}};A.prototype.setWidth=function(){this.width=this.column.width;this.element.style.width=this.column.widthStyled};A.prototype.clearWidth=function(){this.width="";this.element.style.width=""};A.prototype.getWidth=function(){return this.width||this.element.offsetWidth};A.prototype.setMinWidth=function(){this.minWidth=this.column.minWidth;this.element.style.minWidth=this.column.minWidthStyled};A.prototype.setMaxWidth=function(){this.maxWidth=this.column.maxWidth;this.element.style.maxWidth=this.column.maxWidthStyled};A.prototype.checkHeight=function(){this.row.reinitializeHeight()};A.prototype.clearHeight=function(){this.element.style.height="";this.height=null};A.prototype.setHeight=function(){this.height=this.row.height;this.element.style.height=this.row.heightStyled};A.prototype.getHeight=function(){return this.height||this.element.offsetHeight};A.prototype.show=function(){this.element.style.display=this.column.vertAlign?"inline-flex":""};A.prototype.hide=function(){this.element.style.display="none"};A.prototype.edit=function(t){if(this.table.modExists("edit",true)){return this.table.modules.edit.editCell(this,t)}};A.prototype.cancelEdit=function(){if(this.table.modExists("edit",true)){var t=this.table.modules.edit.getCurrentCell();if(t&&t._getSelf()===this){this.table.modules.edit.cancelEdit()}else{console.warn("Cancel Editor Error - This cell is not currently being edited ")}}};A.prototype.validate=function(){if(this.column.modules.validate&&this.table.modExists("validate",true)){var t=this.table.modules.validate.validate(this.column.modules.validate,this,this.getValue());return t===true}else{return true}};A.prototype.delete=function(){if(!this.table.rowManager.redrawBlock&&this.element.parentNode){this.element.parentNode.removeChild(this.element)}if(this.modules.validate&&this.modules.validate.invalid){this.table.modules.validate.clearValidation(this)}if(this.modules.edit&&this.modules.edit.edited){this.table.modules.edit.clearEdited(this)}if(this.table.options.history){this.table.modules.history.clearComponentHistory(this)}this.element=false;this.column.deleteCell(this);this.row.deleteCell(this);this.calcs={}};A.prototype.nav=function(){var t=this,i=false,e=this.row.getCellIndex(this);return{next:function i(){var e=this.right(),r;if(!e){r=t.table.rowManager.nextDisplayRow(t.row,true);if(r){e=r.findNextEditableCell(-1);if(e){e.edit();return true}}}else{return true}return false},prev:function i(){var e=this.left(),r;if(!e){r=t.table.rowManager.prevDisplayRow(t.row,true);if(r){e=r.findPrevEditableCell(r.cells.length);if(e){e.edit();return true}}}else{return true}return false},left:function r(){i=t.row.findPrevEditableCell(e);if(i){i.edit();return true}else{return false}},right:function r(){i=t.row.findNextEditableCell(e);if(i){i.edit();return true}else{return false}},up:function i(){var r=t.table.rowManager.prevDisplayRow(t.row,true);if(r){r.cells[e].edit()}},down:function i(){var r=t.table.rowManager.nextDisplayRow(t.row,true);if(r){r.cells[e].edit()}}}};A.prototype.getIndex=function(){this.row.getCellIndex(this)};A.prototype.getComponent=function(){if(!this.component){this.component=new F(this)}return this.component};var L=function t(i){this.table=i;this.active=false;this.element=this.createElement();this.external=false;this.links=[];this._initialize()};L.prototype.createElement=function(){var t=document.createElement("div");t.classList.add("tabulator-footer");return t};L.prototype._initialize=function(t){if(this.table.options.footerElement){switch(T(this.table.options.footerElement)){case"string":if(this.table.options.footerElement[0]==="<"){this.element.innerHTML=this.table.options.footerElement}else{this.external=true;this.element=document.querySelector(this.table.options.footerElement)}break;default:this.element=this.table.options.footerElement;break}}};L.prototype.getElement=function(){return this.element};L.prototype.append=function(t,i){this.activate(i);this.element.appendChild(t);this.table.rowManager.adjustTableSize()};L.prototype.prepend=function(t,i){this.activate(i);this.element.insertBefore(t,this.element.firstChild);this.table.rowManager.adjustTableSize()};L.prototype.remove=function(t){t.parentNode.removeChild(t);this.deactivate()};L.prototype.deactivate=function(t){if(!this.element.firstChild||t){if(!this.external){this.element.parentNode.removeChild(this.element)}this.active=false}};L.prototype.activate=function(t){if(!this.active){this.active=true;if(!this.external){this.table.element.appendChild(this.getElement());this.table.element.style.display=""}}if(t){this.links.push(t)}};L.prototype.redraw=function(){this.links.forEach((function(t){t.footerRedraw()}))};var H=function t(i,e){this.options={};this.columnManager=null;this.rowManager=null;this.footerManager=null;this.vdomHoz=null;this.browser="";this.browserSlow=false;this.browserMobile=false;this.rtl=false;this.modules={};if(this.initializeElement(i)){this.initializeOptions(e||{});this._create()}t.prototype.comms.register(this)};H.prototype.defaultOptions={height:false,minHeight:false,maxHeight:false,layout:"fitData",layoutColumnsOnNewData:false,columnMinWidth:40,columnMaxWidth:false,columnHeaderVertAlign:"top",columnVertAlign:false,resizableColumns:true,resizableRows:false,autoResize:true,columns:[],cellHozAlign:"",cellVertAlign:"",headerHozAlign:"",data:[],autoColumns:false,autoColumnsDefinitions:false,reactiveData:false,nestedFieldSeparator:".",tooltips:false,tooltipsHeader:false,tooltipGenerationMode:"load",initialSort:false,initialFilter:false,initialHeaderFilter:false,columnHeaderSortMulti:true,sortOrderReverse:false,headerSort:true,headerSortTristate:false,headerSortElement:"<div class='tabulator-arrow'></div>",footerElement:false,index:"id",textDirection:"auto",keybindings:[],tabEndNewRow:false,invalidOptionWarnings:true,clipboard:false,clipboardCopyStyled:true,clipboardCopyConfig:false,clipboardCopyFormatter:false,clipboardCopyRowRange:"active",clipboardPasteParser:"table",clipboardPasteAction:"insert",clipboardCopied:function t(){},clipboardPasted:function t(){},clipboardPasteError:function t(){},downloadDataFormatter:false,downloadReady:function t(i,e){return e},downloadComplete:false,downloadConfig:{},downloadRowRange:"active",dataTree:false,dataTreeFilter:true,dataTreeSort:true,dataTreeElementColumn:false,dataTreeBranchElement:true,dataTreeChildIndent:9,dataTreeChildField:"_children",dataTreeCollapseElement:false,dataTreeExpandElement:false,dataTreeStartExpanded:false,dataTreeRowExpanded:function t(){},dataTreeRowCollapsed:function t(){},dataTreeChildColumnCalcs:false,dataTreeSelectPropagate:false,printAsHtml:false,printFormatter:false,printHeader:false,printFooter:false,printCopyStyle:true,printStyled:true,printVisibleRows:true,printRowRange:"visible",printConfig:{},addRowPos:"bottom",selectable:"highlight",selectableRangeMode:"drag",selectableRollingSelection:true,selectablePersistence:true,selectableCheck:function t(i,e){return true},headerFilterLiveFilterDelay:300,headerFilterPlaceholder:false,headerVisible:true,history:false,locale:false,langs:{},virtualDom:true,virtualDomBuffer:0,virtualDomHoz:false,persistentLayout:false,persistentSort:false,persistentFilter:false,persistenceID:"",persistenceMode:true,persistenceReaderFunc:false,persistenceWriterFunc:false,persistence:false,responsiveLayout:false,responsiveLayoutCollapseStartOpen:true,responsiveLayoutCollapseUseFormatters:true,responsiveLayoutCollapseFormatter:false,pagination:false,paginationSize:false,paginationInitialPage:1,paginationButtonCount:5,paginationSizeSelector:false,paginationElement:false,paginationDataSent:{},paginationDataReceived:{},paginationAddRow:"page",ajaxURL:false,ajaxURLGenerator:false,ajaxParams:{},ajaxConfig:"get",ajaxContentType:"form",ajaxRequestFunc:false,ajaxLoader:true,ajaxLoaderLoading:false,ajaxLoaderError:false,ajaxFiltering:false,ajaxSorting:false,ajaxProgressiveLoad:false,ajaxProgressiveLoadDelay:0,ajaxProgressiveLoadScrollMargin:0,groupBy:false,groupStartOpen:true,groupValues:false,groupUpdateOnCellEdit:false,groupHeader:false,groupHeaderPrint:null,groupHeaderClipboard:null,groupHeaderHtmlOutput:null,groupHeaderDownload:null,htmlOutputConfig:false,movableColumns:false,movableRows:false,movableRowsConnectedTables:false,movableRowsConnectedElements:false,movableRowsSender:false,movableRowsReceiver:"insert",movableRowsSendingStart:function t(){},movableRowsSent:function t(){},movableRowsSentFailed:function t(){},movableRowsSendingStop:function t(){},movableRowsReceivingStart:function t(){},movableRowsReceived:function t(){},movableRowsReceivedFailed:function t(){},movableRowsReceivingStop:function t(){},movableRowsElementDrop:function t(){},scrollToRowPosition:"top",scrollToRowIfVisible:true,scrollToColumnPosition:"left",scrollToColumnIfVisible:true,rowFormatter:false,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:false,tableBuilding:function t(){},tableBuilt:function t(){},renderStarted:function t(){},renderComplete:function t(){},rowClick:false,rowDblClick:false,rowContext:false,rowTap:false,rowDblTap:false,rowTapHold:false,rowMouseEnter:false,rowMouseLeave:false,rowMouseOver:false,rowMouseOut:false,rowMouseMove:false,rowContextMenu:false,rowClickMenu:false,rowAdded:function t(){},rowDeleted:function t(){},rowMoved:function t(){},rowUpdated:function t(){},rowSelectionChanged:function t(){},rowSelected:function t(){},rowDeselected:function t(){},rowResized:function t(){},cellClick:false,cellDblClick:false,cellContext:false,cellTap:false,cellDblTap:false,cellTapHold:false,cellMouseEnter:false,cellMouseLeave:false,cellMouseOver:false,cellMouseOut:false,cellMouseMove:false,cellEditing:function t(){},cellEdited:function t(){},cellEditCancelled:function t(){},columnMoved:false,columnResized:function t(){},columnTitleChanged:function t(){},columnVisibilityChanged:function t(){},htmlImporting:function t(){},htmlImported:function t(){},dataLoading:function t(){},dataLoaded:function t(){},dataEdited:false,dataChanged:false,ajaxRequesting:function t(){},ajaxResponse:false,ajaxError:function t(){},dataFiltering:false,dataFiltered:false,dataSorting:function t(){},dataSorted:function t(){},groupToggleElement:"arrow",groupClosedShowCalcs:false,dataGrouping:function t(){},dataGrouped:false,groupVisibilityChanged:function t(){},groupClick:false,groupDblClick:false,groupContext:false,groupContextMenu:false,groupClickMenu:false,groupTap:false,groupDblTap:false,groupTapHold:false,columnCalcs:true,pageLoaded:function t(){},localized:function t(){},validationMode:"blocking",validationFailed:function t(){},historyUndo:function t(){},historyRedo:function t(){},scrollHorizontal:function t(){},scrollVertical:function t(){}};H.prototype.initializeOptions=function(t){if(t.invalidOptionWarnings!==false){for(var i in t){if(typeof this.defaultOptions[i]==="undefined"){console.warn("Invalid table constructor option:",i)}}}for(var i in this.defaultOptions){if(i in t){this.options[i]=t[i]}else{if(Array.isArray(this.defaultOptions[i])){this.options[i]=Object.assign([],this.defaultOptions[i])}else if(T(this.defaultOptions[i])==="object"&&this.defaultOptions[i]!==null){this.options[i]=Object.assign({},this.defaultOptions[i])}else{this.options[i]=this.defaultOptions[i]}}}};H.prototype.initializeElement=function(t){if(typeof HTMLElement!=="undefined"&&t instanceof HTMLElement){this.element=t;return true}else if(typeof t==="string"){this.element=document.querySelector(t);if(this.element){return true}else{console.error("Tabulator Creation Error - no element found matching selector: ",t);return false}}else{console.error("Tabulator Creation Error - Invalid element provided:",t);return false}};H.prototype.rtlCheck=function(){var t=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if(t.direction!=="rtl"){break}case"rtl":this.element.classList.add("tabulator-rtl");this.rtl=true;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=false}};H.prototype._mapDepricatedFunctionality=function(){if(this.options.persistentLayout||this.options.persistentSort||this.options.persistentFilter){if(!this.options.persistence){this.options.persistence={}}}if(this.options.dataEdited){console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead");this.options.dataChanged=this.options.dataEdited}if(this.options.downloadDataFormatter){console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated")}if(typeof this.options.clipboardCopyHeader!=="undefined"){this.options.columnHeaders=this.options.clipboardCopyHeader;console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option")}if(this.options.printVisibleRows!==true){console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option");this.options.persistence.printRowRange="active"}if(this.options.printCopyStyle!==true){console.warn("printCopyStyle option is deprecated, you should now use the printStyled option");this.options.persistence.printStyled=this.options.printCopyStyle}if(this.options.persistentLayout){console.warn("persistentLayout option is deprecated, you should now use the persistence option");if(this.options.persistence!==true&&typeof this.options.persistence.columns==="undefined"){this.options.persistence.columns=true}}if(this.options.persistentSort){console.warn("persistentSort option is deprecated, you should now use the persistence option");if(this.options.persistence!==true&&typeof this.options.persistence.sort==="undefined"){this.options.persistence.sort=true}}if(this.options.persistentFilter){console.warn("persistentFilter option is deprecated, you should now use the persistence option");if(this.options.persistence!==true&&typeof this.options.persistence.filter==="undefined"){this.options.persistence.filter=true}}if(this.options.columnVertAlign){console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option");this.options.columnHeaderVertAlign=this.options.columnVertAlign}};H.prototype._clearSelection=function(){this.element.classList.add("tabulator-block-select");if(window.getSelection){if(window.getSelection().empty){window.getSelection().empty()}else if(window.getSelection().removeAllRanges){window.getSelection().removeAllRanges()}}else if(document.selection){document.selection.empty()}this.element.classList.remove("tabulator-block-select")};H.prototype._create=function(){this._clearObjectPointers();this._mapDepricatedFunctionality();this.bindModules();this.rtlCheck();if(this.element.tagName==="TABLE"){if(this.modExists("htmlTableImport",true)){this.modules.htmlTableImport.parseTable()}}this.columnManager=new S(this);this.rowManager=new M(this);this.footerManager=new L(this);this.columnManager.setRowManager(this.rowManager);this.rowManager.setColumnManager(this.columnManager);if(this.options.virtualDomHoz){this.vdomHoz=new D(this)}this._buildElement();this._loadInitialData()};H.prototype._clearObjectPointers=function(){this.options.columns=this.options.columns.slice(0);if(!this.options.reactiveData){this.options.data=this.options.data.slice(0)}};H.prototype._buildElement=function(){var t=this;var i=this.element,e=this.modules,r=this.options;r.tableBuilding.call(this);i.classList.add("tabulator");i.setAttribute("role","grid");while(i.firstChild){i.removeChild(i.firstChild)}if(r.height){r.height=isNaN(r.height)?r.height:r.height+"px";i.style.height=r.height}if(r.minHeight!==false){r.minHeight=isNaN(r.minHeight)?r.minHeight:r.minHeight+"px";i.style.minHeight=r.minHeight}if(r.maxHeight!==false){r.maxHeight=isNaN(r.maxHeight)?r.maxHeight:r.maxHeight+"px";i.style.maxHeight=r.maxHeight}this.columnManager.initialize();this.rowManager.initialize();this._detectBrowser();if(this.modExists("layout",true)){e.layout.initialize(r.layout)}e.localize.initialize();if(r.headerFilterPlaceholder!==false){e.localize.setHeaderFilterPlaceholder(r.headerFilterPlaceholder)}for(var n in r.langs){e.localize.installLang(n,r.langs[n])}e.localize.setLocale(r.locale);if(typeof r.placeholder=="string"){var o=document.createElement("div");o.classList.add("tabulator-placeholder");var s=document.createElement("span");s.innerHTML=r.placeholder;o.appendChild(s);r.placeholder=o}i.appendChild(this.columnManager.getElement());i.appendChild(this.rowManager.getElement());if(r.footerElement){this.footerManager.activate()}if(r.persistence&&this.modExists("persistence",true)){e.persistence.initialize()}if(r.movableRows&&this.modExists("moveRow")){e.moveRow.initialize()}if(r.autoColumns&&this.options.data){this.columnManager.generateColumnsFromRowData(this.options.data)}if(this.modExists("columnCalcs")){e.columnCalcs.initialize()}this.columnManager.setColumns(r.columns);if(r.dataTree&&this.modExists("dataTree",true)){e.dataTree.initialize()}if(this.modExists("frozenRows")){this.modules.frozenRows.initialize()}if((r.persistence&&this.modExists("persistence",true)&&e.persistence.config.sort||r.initialSort)&&this.modExists("sort",true)){var a=[];if(r.persistence&&this.modExists("persistence",true)&&e.persistence.config.sort){a=e.persistence.load("sort");if(a===false&&r.initialSort){a=r.initialSort}}else if(r.initialSort){a=r.initialSort}e.sort.setSort(a)}if((r.persistence&&this.modExists("persistence",true)&&e.persistence.config.filter||r.initialFilter)&&this.modExists("filter",true)){var u=[];if(r.persistence&&this.modExists("persistence",true)&&e.persistence.config.filter){u=e.persistence.load("filter");if(u===false&&r.initialFilter){u=r.initialFilter}}else if(r.initialFilter){u=r.initialFilter}e.filter.setFilter(u)}if(r.initialHeaderFilter&&this.modExists("filter",true)){r.initialHeaderFilter.forEach((function(i){var r=t.columnManager.findColumn(i.field);if(r){e.filter.setHeaderFilterValue(r,i.value)}else{console.warn("Column Filter Error - No matching column found:",i.field);return false}}))}if(this.modExists("ajax")){e.ajax.initialize()}if(r.pagination&&this.modExists("page",true)){e.page.initialize()}if(r.groupBy&&this.modExists("groupRows",true)){e.groupRows.initialize()}if(this.modExists("keybindings")){e.keybindings.initialize()}if(this.modExists("selectRow")){e.selectRow.clearSelectionData(true)}if(r.autoResize&&this.modExists("resizeTable")){e.resizeTable.initialize()}if(this.modExists("clipboard")){e.clipboard.initialize()}if(r.printAsHtml&&this.modExists("print")){e.print.initialize()}r.tableBuilt.call(this)};H.prototype._loadInitialData=function(){var t=this;if(t.options.pagination&&t.modExists("page")){t.modules.page.reset(true,true);if(t.options.pagination=="local"){if(t.options.data.length){t.rowManager.setData(t.options.data,false,true)}else{if((t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax")){t.modules.ajax.loadData(false,true).then((function(){})).catch((function(){if(t.options.paginationInitialPage){t.modules.page.setPage(t.options.paginationInitialPage)}}));return}else{t.rowManager.setData(t.options.data,false,true)}}if(t.options.paginationInitialPage){t.modules.page.setPage(t.options.paginationInitialPage)}}else{if(t.options.ajaxURL){t.modules.page.setPage(t.options.paginationInitialPage).then((function(){})).catch((function(){}))}else{t.rowManager.setData([],false,true)}}}else{if(t.options.data.length){t.rowManager.setData(t.options.data)}else{if((t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax")){t.modules.ajax.loadData(false,true).then((function(){})).catch((function(){}))}else{t.rowManager.setData(t.options.data,false,true)}}}};H.prototype.destroy=function(){var t=this.element;H.prototype.comms.deregister(this);if(this.options.reactiveData&&this.modExists("reactiveData",true)){this.modules.reactiveData.unwatchData()}this.rowManager.rows.forEach((function(t){t.wipe()}));this.rowManager.rows=[];this.rowManager.activeRows=[];this.rowManager.displayRows=[];if(this.options.autoResize&&this.modExists("resizeTable")){this.modules.resizeTable.clearBindings()}if(this.modExists("keybindings")){this.modules.keybindings.clearBindings()}while(t.firstChild){t.removeChild(t.firstChild)}t.classList.remove("tabulator")};H.prototype._detectBrowser=function(){var t=navigator.userAgent||navigator.vendor||window.opera;if(t.indexOf("Trident")>-1){this.browser="ie";this.browserSlow=true}else if(t.indexOf("Edge")>-1){this.browser="edge";this.browserSlow=true}else if(t.indexOf("Firefox")>-1){this.browser="firefox";this.browserSlow=false}else{this.browser="other";this.browserSlow=false}this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))};H.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()};H.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()};H.prototype.setDataFromLocalFile=function(t){var i=this;return new Promise((function(e,r){var n=document.createElement("input");n.type="file";n.accept=t||".json,application/json";n.addEventListener("change",(function(t){var o=n.files[0],s=new FileReader,a;s.readAsText(o);s.onload=function(t){try{a=JSON.parse(s.result)}catch(t){console.warn("File Load Error - File contents is invalid JSON",t);r(t);return}i.setData(a).then((function(t){e(t)})).catch((function(t){e(t)}))};s.onerror=function(t){console.warn("File Load Error - Unable to read file");r()}}));n.click()}))};H.prototype.setData=function(t,i,e){if(this.modExists("ajax")){this.modules.ajax.blockActiveRequest()}return this._setData(t,i,e,false,true)};H.prototype._setData=function(t,i,e,r,n){var o=this;if(typeof t==="string"){if(t.indexOf("{")==0||t.indexOf("[")==0){return o.rowManager.setData(JSON.parse(t),r,n)}else{if(o.modExists("ajax",true)){if(i){o.modules.ajax.setParams(i)}if(e){o.modules.ajax.setConfig(e)}o.modules.ajax.setUrl(t);if(o.options.pagination=="remote"&&o.modExists("page",true)){o.modules.page.reset(true,true);return o.modules.page.setPage(1)}else{return o.modules.ajax.loadData(r,n)}}}}else{if(t){return o.rowManager.setData(t,r,n)}else{if(o.modExists("ajax")&&(o.modules.ajax.getUrl||o.options.ajaxURLGenerator)){if(o.options.pagination=="remote"&&o.modExists("page",true)){o.modules.page.reset(true,true);return o.modules.page.setPage(1)}else{return o.modules.ajax.loadData(r,n)}}else{return o.rowManager.setData([],r,n)}}}};H.prototype.clearData=function(){if(this.modExists("ajax")){this.modules.ajax.blockActiveRequest()}this.rowManager.clearData()};H.prototype.getData=function(t){if(t===true){console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'");t="active"}return this.rowManager.getData(t)};H.prototype.getDataCount=function(t){if(t===true){console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'");t="active"}return this.rowManager.getDataCount(t)};H.prototype.searchRows=function(t,i,e){if(this.modExists("filter",true)){return this.modules.filter.search("rows",t,i,e)}};H.prototype.searchData=function(t,i,e){if(this.modExists("filter",true)){return this.modules.filter.search("data",t,i,e)}};H.prototype.getHtml=function(t,i,e){if(this.modExists("export",true)){return this.modules.export.getHtml(t,i,e)}};H.prototype.print=function(t,i,e){if(this.modExists("print",true)){return this.modules.print.printFullscreen(t,i,e)}};H.prototype.getAjaxUrl=function(){if(this.modExists("ajax",true)){return this.modules.ajax.getUrl()}};H.prototype.replaceData=function(t,i,e){if(this.modExists("ajax")){this.modules.ajax.blockActiveRequest()}return this._setData(t,i,e,true)};H.prototype.updateData=function(t){var i=this;var e=this;var r=0;return new Promise((function(n,o){if(i.modExists("ajax")){i.modules.ajax.blockActiveRequest()}if(typeof t==="string"){t=JSON.parse(t)}if(t){t.forEach((function(t){var i=e.rowManager.findRow(t[e.options.index]);if(i){r++;i.updateData(t).then((function(){r--;if(!r){n()}}))}}))}else{console.warn("Update Error - No data provided");o("Update Error - No data provided")}}))};H.prototype.addData=function(t,i,e){var r=this;return new Promise((function(n,o){if(r.modExists("ajax")){r.modules.ajax.blockActiveRequest()}if(typeof t==="string"){t=JSON.parse(t)}if(t){r.rowManager.addRows(t,i,e).then((function(t){var i=[];t.forEach((function(t){i.push(t.getComponent())}));n(i)}))}else{console.warn("Update Error - No data provided");o("Update Error - No data provided")}}))};H.prototype.updateOrAddData=function(t){var i=this;var e=this,r=[],n=0;return new Promise((function(o,s){if(i.modExists("ajax")){i.modules.ajax.blockActiveRequest()}if(typeof t==="string"){t=JSON.parse(t)}if(t){t.forEach((function(t){var i=e.rowManager.findRow(t[e.options.index]);n++;if(i){i.updateData(t).then((function(){n--;r.push(i.getComponent());if(!n){o(r)}}))}else{e.rowManager.addRows(t).then((function(t){n--;r.push(t[0].getComponent());if(!n){o(r)}}))}}))}else{console.warn("Update Error - No data provided");s("Update Error - No data provided")}}))};H.prototype.getRow=function(t){var i=this.rowManager.findRow(t);if(i){return i.getComponent()}else{console.warn("Find Error - No matching row found:",t);return false}};H.prototype.getRowFromPosition=function(t,i){var e=this.rowManager.getRowFromPosition(t,i);if(e){return e.getComponent()}else{console.warn("Find Error - No matching row found:",t);return false}};H.prototype.deleteRow=function(t){var i=this;return new Promise((function(e,r){var n=i,o=0,s=0,a=[];function u(){o++;if(o==t.length){if(s){n.rowManager.reRenderInPosition();e()}}}if(!Array.isArray(t)){t=[t]}t.forEach((function(t){var e=i.rowManager.findRow(t,true);if(e){a.push(e)}else{console.warn("Delete Error - No matching row found:",t);r("Delete Error - No matching row found");u()}}));a.sort((function(t,e){return i.rowManager.rows.indexOf(t)>i.rowManager.rows.indexOf(e)?1:-1}));a.forEach((function(t){t.delete().then((function(){s++;u()})).catch((function(t){u();r(t)}))}))}))};H.prototype.addRow=function(t,i,e){var r=this;return new Promise((function(n,o){if(typeof t==="string"){t=JSON.parse(t)}r.rowManager.addRows(t,i,e).then((function(t){if(r.modExists("columnCalcs")){r.modules.columnCalcs.recalc(r.rowManager.activeRows)}n(t[0].getComponent())}))}))};H.prototype.updateOrAddRow=function(t,i){var e=this;return new Promise((function(r,n){var o=e.rowManager.findRow(t);if(typeof i==="string"){i=JSON.parse(i)}if(o){o.updateData(i).then((function(){if(e.modExists("columnCalcs")){e.modules.columnCalcs.recalc(e.rowManager.activeRows)}r(o.getComponent())})).catch((function(t){n(t)}))}else{o=e.rowManager.addRows(i).then((function(t){if(e.modExists("columnCalcs")){e.modules.columnCalcs.recalc(e.rowManager.activeRows)}r(t[0].getComponent())})).catch((function(t){n(t)}))}}))};H.prototype.updateRow=function(t,i){var e=this;return new Promise((function(r,n){var o=e.rowManager.findRow(t);if(typeof i==="string"){i=JSON.parse(i)}if(o){o.updateData(i).then((function(){r(o.getComponent())})).catch((function(t){n(t)}))}else{console.warn("Update Error - No matching row found:",t);n("Update Error - No matching row found")}}))};H.prototype.scrollToRow=function(t,i,e){var r=this;return new Promise((function(n,o){var s=r.rowManager.findRow(t);if(s){r.rowManager.scrollToRow(s,i,e).then((function(){n()})).catch((function(t){o(t)}))}else{console.warn("Scroll Error - No matching row found:",t);o("Scroll Error - No matching row found")}}))};H.prototype.moveRow=function(t,i,e){var r=this.rowManager.findRow(t);if(r){r.moveToRow(i,e)}else{console.warn("Move Error - No matching row found:",t)}};H.prototype.getRows=function(t){if(t===true){console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'");t="active"}return this.rowManager.getComponents(t)};H.prototype.getRowPosition=function(t,i){var e=this.rowManager.findRow(t);if(e){return this.rowManager.getRowPosition(e,i)}else{console.warn("Position Error - No matching row found:",t);return false}};H.prototype.copyToClipboard=function(t){if(this.modExists("clipboard",true)){this.modules.clipboard.copy(t)}};H.prototype.setColumns=function(t){this.columnManager.setColumns(t)};H.prototype.getColumns=function(t){return this.columnManager.getComponents(t)};H.prototype.getColumn=function(t){var i=this.columnManager.findColumn(t);if(i){return i.getComponent()}else{console.warn("Find Error - No matching column found:",t);return false}};H.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()};H.prototype.getColumnLayout=function(){if(this.modExists("persistence",true)){return this.modules.persistence.parseColumns(this.columnManager.getColumns())}};H.prototype.setColumnLayout=function(t){if(this.modExists("persistence",true)){this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t));return true}return false};H.prototype.showColumn=function(t){var i=this.columnManager.findColumn(t);if(i){i.show();if(this.options.responsiveLayout&&this.modExists("responsiveLayout",true)){this.modules.responsiveLayout.update()}}else{console.warn("Column Show Error - No matching column found:",t);return false}};H.prototype.hideColumn=function(t){var i=this.columnManager.findColumn(t);if(i){i.hide();if(this.options.responsiveLayout&&this.modExists("responsiveLayout",true)){this.modules.responsiveLayout.update()}}else{console.warn("Column Hide Error - No matching column found:",t);return false}};H.prototype.toggleColumn=function(t){var i=this.columnManager.findColumn(t);if(i){if(i.visible){i.hide()}else{i.show()}}else{console.warn("Column Visibility Toggle Error - No matching column found:",t);return false}};H.prototype.addColumn=function(t,i,e){var r=this;return new Promise((function(n,o){var s=r.columnManager.findColumn(e);r.columnManager.addColumn(t,i,s).then((function(t){n(t.getComponent())})).catch((function(t){o(t)}))}))};H.prototype.deleteColumn=function(t){var i=this;return new Promise((function(e,r){var n=i.columnManager.findColumn(t);if(n){n.delete().then((function(){e()})).catch((function(t){r(t)}))}else{console.warn("Column Delete Error - No matching column found:",t);r()}}))};H.prototype.updateColumnDefinition=function(t,i){var e=this;return new Promise((function(r,n){var o=e.columnManager.findColumn(t);if(o){o.updateDefinition(i).then((function(t){r(t)})).catch((function(t){n(t)}))}else{console.warn("Column Update Error - No matching column found:",t);n()}}))};H.prototype.moveColumn=function(t,i,e){var r=this.columnManager.findColumn(t);var n=this.columnManager.findColumn(i);if(r){if(n){this.columnManager.moveColumn(r,n,e)}else{console.warn("Move Error - No matching column found:",n)}}else{console.warn("Move Error - No matching column found:",t)}};H.prototype.scrollToColumn=function(t,i,e){var r=this;return new Promise((function(n,o){var s=r.columnManager.findColumn(t);if(s){r.columnManager.scrollToColumn(s,i,e).then((function(){n()})).catch((function(t){o(t)}))}else{console.warn("Scroll Error - No matching column found:",t);o("Scroll Error - No matching column found")}}))};H.prototype.setLocale=function(t){this.modules.localize.setLocale(t)};H.prototype.getLocale=function(){return this.modules.localize.getLocale()};H.prototype.getLang=function(t){return this.modules.localize.getLang(t)};H.prototype.redraw=function(t){this.columnManager.redraw(t);this.rowManager.redraw(t)};H.prototype.setHeight=function(t){if(this.rowManager.renderMode!=="classic"){this.options.height=isNaN(t)?t:t+"px";this.element.style.height=this.options.height;this.rowManager.setRenderMode();this.rowManager.redraw()}else{console.warn("setHeight function is not available in classic render mode")}};H.prototype.setSort=function(t,i){if(this.modExists("sort",true)){this.modules.sort.setSort(t,i);this.rowManager.sorterRefresh()}};H.prototype.getSorters=function(){if(this.modExists("sort",true)){return this.modules.sort.getSort()}};H.prototype.clearSort=function(){if(this.modExists("sort",true)){this.modules.sort.clear();this.rowManager.sorterRefresh()}};H.prototype.setFilter=function(t,i,e,r){if(this.modExists("filter",true)){this.modules.filter.setFilter(t,i,e,r);this.rowManager.filterRefresh()}};H.prototype.refreshFilter=function(){if(this.modExists("filter",true)){this.rowManager.filterRefresh()}};H.prototype.addFilter=function(t,i,e,r){if(this.modExists("filter",true)){this.modules.filter.addFilter(t,i,e,r);this.rowManager.filterRefresh()}};H.prototype.getFilters=function(t){if(this.modExists("filter",true)){return this.modules.filter.getFilters(t)}};H.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",true)){var i=this.columnManager.findColumn(t);if(i){this.modules.filter.setHeaderFilterFocus(i)}else{console.warn("Column Filter Focus Error - No matching column found:",t);return false}}};H.prototype.getHeaderFilterValue=function(t){if(this.modExists("filter",true)){var i=this.columnManager.findColumn(t);if(i){return this.modules.filter.getHeaderFilterValue(i)}else{console.warn("Column Filter Error - No matching column found:",t)}}};H.prototype.setHeaderFilterValue=function(t,i){if(this.modExists("filter",true)){var e=this.columnManager.findColumn(t);if(e){this.modules.filter.setHeaderFilterValue(e,i)}else{console.warn("Column Filter Error - No matching column found:",t);return false}}};H.prototype.getHeaderFilters=function(){if(this.modExists("filter",true)){return this.modules.filter.getHeaderFilters()}};H.prototype.removeFilter=function(t,i,e){if(this.modExists("filter",true)){this.modules.filter.removeFilter(t,i,e);this.rowManager.filterRefresh()}};H.prototype.clearFilter=function(t){if(this.modExists("filter",true)){this.modules.filter.clearFilter(t);this.rowManager.filterRefresh()}};H.prototype.clearHeaderFilter=function(){if(this.modExists("filter",true)){this.modules.filter.clearHeaderFilter();this.rowManager.filterRefresh()}};H.prototype.selectRow=function(t){if(this.modExists("selectRow",true)){if(t===true){console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'");t="active"}this.modules.selectRow.selectRows(t)}};H.prototype.deselectRow=function(t){if(this.modExists("selectRow",true)){this.modules.selectRow.deselectRows(t)}};H.prototype.toggleSelectRow=function(t){if(this.modExists("selectRow",true)){this.modules.selectRow.toggleRow(t)}};H.prototype.getSelectedRows=function(){if(this.modExists("selectRow",true)){return this.modules.selectRow.getSelectedRows()}};H.prototype.getSelectedData=function(){if(this.modExists("selectRow",true)){return this.modules.selectRow.getSelectedData()}};H.prototype.getInvalidCells=function(){if(this.modExists("validate",true)){return this.modules.validate.getInvalidCells()}};H.prototype.clearCellValidation=function(t){var i=this;if(this.modExists("validate",true)){if(!t){t=this.modules.validate.getInvalidCells()}if(!Array.isArray(t)){t=[t]}t.forEach((function(t){i.modules.validate.clearValidation(t._getSelf())}))}};H.prototype.validate=function(t){var i=[];this.rowManager.rows.forEach((function(t){var e=t.validate();if(e!==true){i=i.concat(e)}}));return i.length?i:true};H.prototype.setMaxPage=function(t){if(this.options.pagination&&this.modExists("page")){this.modules.page.setMaxPage(t)}else{return false}};H.prototype.setPage=function(t){if(this.options.pagination&&this.modExists("page")){return this.modules.page.setPage(t)}else{return new Promise((function(t,i){i()}))}};H.prototype.setPageToRow=function(t){var i=this;return new Promise((function(e,r){if(i.options.pagination&&i.modExists("page")){t=i.rowManager.findRow(t);if(t){i.modules.page.setPageToRow(t).then((function(){e()})).catch((function(){r()}))}else{r()}}else{r()}}))};H.prototype.setPageSize=function(t){if(this.options.pagination&&this.modExists("page")){this.modules.page.setPageSize(t);this.modules.page.setPage(1).then((function(){})).catch((function(){}))}else{return false}};H.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",true)){return this.modules.page.getPageSize()}};H.prototype.previousPage=function(){if(this.options.pagination&&this.modExists("page")){this.modules.page.previousPage()}else{return false}};H.prototype.nextPage=function(){if(this.options.pagination&&this.modExists("page")){this.modules.page.nextPage()}else{return false}};H.prototype.getPage=function(){if(this.options.pagination&&this.modExists("page")){return this.modules.page.getPage()}else{return false}};H.prototype.getPageMax=function(){if(this.options.pagination&&this.modExists("page")){return this.modules.page.getPageMax()}else{return false}};H.prototype.setGroupBy=function(t){if(this.modExists("groupRows",true)){this.options.groupBy=t;this.modules.groupRows.initialize();this.rowManager.refreshActiveData("display");if(this.options.persistence&&this.modExists("persistence",true)&&this.modules.persistence.config.group){this.modules.persistence.save("group")}}else{return false}};H.prototype.setGroupValues=function(t){if(this.modExists("groupRows",true)){this.options.groupValues=t;this.modules.groupRows.initialize();this.rowManager.refreshActiveData("display");if(this.options.persistence&&this.modExists("persistence",true)&&this.modules.persistence.config.group){this.modules.persistence.save("group")}}else{return false}};H.prototype.setGroupStartOpen=function(t){if(this.modExists("groupRows",true)){this.options.groupStartOpen=t;this.modules.groupRows.initialize();if(this.options.groupBy){this.rowManager.refreshActiveData("group");if(this.options.persistence&&this.modExists("persistence",true)&&this.modules.persistence.config.group){this.modules.persistence.save("group")}}else{console.warn("Grouping Update - cant refresh view, no groups have been set")}}else{return false}};H.prototype.setGroupHeader=function(t){if(this.modExists("groupRows",true)){this.options.groupHeader=t;this.modules.groupRows.initialize();if(this.options.groupBy){this.rowManager.refreshActiveData("group");if(this.options.persistence&&this.modExists("persistence",true)&&this.modules.persistence.config.group){this.modules.persistence.save("group")}}else{console.warn("Grouping Update - cant refresh view, no groups have been set")}}else{return false}};H.prototype.getGroups=function(t){if(this.modExists("groupRows",true)){return this.modules.groupRows.getGroups(true)}else{return false}};H.prototype.getGroupedData=function(){if(this.modExists("groupRows",true)){return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()}};H.prototype.getEditedCells=function(){if(this.modExists("edit",true)){return this.modules.edit.getEditedCells()}};H.prototype.clearCellEdited=function(t){var i=this;if(this.modExists("edit",true)){if(!t){t=this.modules.edit.getEditedCells()}if(!Array.isArray(t)){t=[t]}t.forEach((function(t){i.modules.edit.clearEdited(t._getSelf())}))}};H.prototype.getCalcResults=function(){if(this.modExists("columnCalcs",true)){return this.modules.columnCalcs.getResults()}else{return false}};H.prototype.recalc=function(){if(this.modExists("columnCalcs",true)){this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)}};H.prototype.navigatePrev=function(){var t=false;if(this.modExists("edit",true)){t=this.modules.edit.currentCell;if(t){return t.nav().prev()}}return false};H.prototype.navigateNext=function(){var t=false;if(this.modExists("edit",true)){t=this.modules.edit.currentCell;if(t){return t.nav().next()}}return false};H.prototype.navigateLeft=function(){var t=false;if(this.modExists("edit",true)){t=this.modules.edit.currentCell;if(t){e.preventDefault();return t.nav().left()}}return false};H.prototype.navigateRight=function(){var t=false;if(this.modExists("edit",true)){t=this.modules.edit.currentCell;if(t){e.preventDefault();return t.nav().right()}}return false};H.prototype.navigateUp=function(){var t=false;if(this.modExists("edit",true)){t=this.modules.edit.currentCell;if(t){e.preventDefault();return t.nav().up()}}return false};H.prototype.navigateDown=function(){var t=false;if(this.modExists("edit",true)){t=this.modules.edit.currentCell;if(t){e.preventDefault();return t.nav().down()}}return false};H.prototype.undo=function(){if(this.options.history&&this.modExists("history",true)){return this.modules.history.undo()}else{return false}};H.prototype.redo=function(){if(this.options.history&&this.modExists("history",true)){return this.modules.history.redo()}else{return false}};H.prototype.getHistoryUndoSize=function(){if(this.options.history&&this.modExists("history",true)){return this.modules.history.getHistoryUndoSize()}else{return false}};H.prototype.getHistoryRedoSize=function(){if(this.options.history&&this.modExists("history",true)){return this.modules.history.getHistoryRedoSize()}else{return false}};H.prototype.clearHistory=function(){if(this.options.history&&this.modExists("history",true)){return this.modules.history.clear()}else{return false}};H.prototype.download=function(t,i,e,r){if(this.modExists("download",true)){this.modules.download.download(t,i,e,r)}};H.prototype.downloadToTab=function(t,i,e,r){if(this.modExists("download",true)){this.modules.download.download(t,i,e,r,true)}};H.prototype.tableComms=function(t,i,e,r){this.modules.comms.receive(t,i,e,r)};H.prototype.moduleBindings={};H.prototype.extendModule=function(t,i,e){if(H.prototype.moduleBindings[t]){var r=H.prototype.moduleBindings[t].prototype[i];if(r){if((typeof e==="undefined"?"undefined":T(e))=="object"){for(var n in e){r[n]=e[n]}}else{console.warn("Module Error - Invalid value type, it must be an object")}}else{console.warn("Module Error - property does not exist:",i)}}else{console.warn("Module Error - module does not exist:",t)}};H.prototype.registerModule=function(t,i){H.prototype.moduleBindings[t]=i};H.prototype.bindModules=function(){this.modules={};for(var t in H.prototype.moduleBindings){this.modules[t]=new H.prototype.moduleBindings[t](this)}};H.prototype.modExists=function(t,i){if(this.modules[t]){return true}else{if(i){console.error("Tabulator Module Not Installed: "+t)}return false}};H.prototype.helpers={elVisible:function t(i){return!(i.offsetWidth<=0&&i.offsetHeight<=0)},elOffset:function t(i){var e=i.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function t(i){var e=Object.assign(Array.isArray(i)?[]:{},i);for(var r in i){if(i[r]!=null&&T(i[r])==="object"){if(i[r]instanceof Date){e[r]=new Date(i[r])}else{e[r]=this.deepClone(i[r])}}}return e}};H.prototype.comms={tables:[],register:function t(i){H.prototype.comms.tables.push(i)},deregister:function t(i){var e=H.prototype.comms.tables.indexOf(i);if(e>-1){H.prototype.comms.tables.splice(e,1)}},lookupTable:function t(i,e){var r=[],n,o;if(typeof i==="string"){n=document.querySelectorAll(i);if(n.length){for(var s=0;s<n.length;s++){o=H.prototype.comms.matchElement(n[s]);if(o){r.push(o)}}}}else if(typeof HTMLElement!=="undefined"&&i instanceof HTMLElement||i instanceof H){o=H.prototype.comms.matchElement(i);if(o){r.push(o)}}else if(Array.isArray(i)){i.forEach((function(t){r=r.concat(H.prototype.comms.lookupTable(t))}))}else{if(!e){console.warn("Table Connection Error - Invalid Selector",i)}}return r},matchElement:function t(i){return H.prototype.comms.tables.find((function(t){return i instanceof H?t===i:t.element===i}))}};H.prototype.findTable=function(t){var i=H.prototype.comms.lookupTable(t,true);return Array.isArray(i)&&!i.length?false:i};var I=function t(i){this.table=i;this.mode=null};I.prototype.initialize=function(t){if(this.modes[t]){this.mode=t}else{console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+t);this.mode="fitData"}this.table.element.setAttribute("tabulator-layout",this.mode)};I.prototype.getMode=function(){return this.mode};I.prototype.layout=function(){this.modes[this.mode].call(this,this.table.columnManager.columnsByIndex);if(this.mode.indexOf("fitData")===0&&this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.columns){this.table.modules.persistence.save("columns")}};I.prototype.modes={fitData:function t(i){if(this.table.options.virtualDomHoz){this.table.vdomHoz.fitDataLayoutOverride()}else{i.forEach((function(t){t.reinitializeWidth()}))}if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.update()}},fitDataFill:function t(i){i.forEach((function(t){t.reinitializeWidth()}));if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.update()}},fitDataTable:function t(i){i.forEach((function(t){t.reinitializeWidth()}));if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.update()}},fitDataStretch:function t(i){var e=this;var r=0,n=this.table.rowManager.element.clientWidth,o=0,s=false;i.forEach((function(t,i){if(!t.widthFixed){t.reinitializeWidth()}if(e.table.options.responsiveLayout?t.modules.responsive.visible:t.visible){s=t}if(t.visible){r+=t.getWidth()}}));if(s){o=n-r+s.getWidth();if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){s.setWidth(0);this.table.modules.responsiveLayout.update()}if(o>0){s.setWidth(o)}else{s.reinitializeWidth()}}else{if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.update()}}},fitColumns:function t(i){var e=this;var r=e.table.element.clientWidth;var n=0;var o=0;var s=0;var a=0;var u=[];var l=[];var f=0;var h=0;var c=0;function d(t){var i;if(typeof t=="string"){if(t.indexOf("%")>-1){i=r/100*parseInt(t)}else{i=parseInt(t)}}else{i=t}return i}function b(t,i,e,r){var n=[],o=0,a=0,u=0,l=s,f=0,h=0,c=[];function p(t){return e*(t.column.definition.widthGrow||1)}function v(t){return d(t.width)-e*(t.column.definition.widthShrink||0)}t.forEach((function(t,o){var s=r?v(t):p(t);if(t.column.minWidth>=s){n.push(t)}else{if(t.column.maxWidth&&t.column.maxWidth<s){t.width=t.column.maxWidth;i-=t.column.maxWidth;l-=r?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1;if(l){e=Math.floor(i/l)}}else{c.push(t);h+=r?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1}}}));if(n.length){n.forEach((function(t){o+=r?t.width-t.column.minWidth:t.column.minWidth;t.width=t.column.minWidth}));a=i-o;u=h?Math.floor(a/h):a;f=a-u*h;f+=b(c,a,u,r)}else{f=h?i-Math.floor(i/h)*h:i;c.forEach((function(t){t.width=r?v(t):p(t)}))}return f}if(this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",true)){this.table.modules.responsiveLayout.update()}if(this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight){r-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth}i.forEach((function(t){var i,e,r;if(t.visible){i=t.definition.width;e=parseInt(t.minWidth);if(i){r=d(i);n+=r>e?r:e;if(t.definition.widthShrink){l.push({column:t,width:r>e?r:e});f+=t.definition.widthShrink}}else{u.push({column:t,width:0});s+=t.definition.widthGrow||1}}}));o=r-n;a=Math.floor(o/s);var c=b(u,o,a,false);if(u.length&&c>0){u[u.length-1].width+=+c}u.forEach((function(t){o-=t.width}));h=Math.abs(c)+o;if(h>0&&f){c=b(l,h,Math.floor(h/f),true)}if(l.length){l[l.length-1].width-=c}u.forEach((function(t){t.column.setWidth(t.width)}));l.forEach((function(t){t.column.setWidth(t.width)}))}};H.prototype.registerModule("layout",I);var _=function t(i){this.table=i;this.locale="default";this.lang=false;this.bindings={};this.langList={}};_.prototype.initialize=function(){this.langList=H.prototype.helpers.deepClone(this.langs)};_.prototype.setHeaderFilterPlaceholder=function(t){this.langList.default.headerFilters.default=t};_.prototype.setHeaderFilterColumnPlaceholder=function(t,i){this.langList.default.headerFilters.columns[t]=i;if(this.lang&&!this.lang.headerFilters.columns[t]){this.lang.headerFilters.columns[t]=i}};_.prototype.installLang=function(t,i){if(this.langList[t]){this._setLangProp(this.langList[t],i)}else{this.langList[t]=i}};_.prototype._setLangProp=function(t,i){for(var e in i){if(t[e]&&T(t[e])=="object"){this._setLangProp(t[e],i[e])}else{t[e]=i[e]}}};_.prototype.setLocale=function(t){var i=this;t=t||"default";function e(t,i){for(var r in t){if(T(t[r])=="object"){if(!i[r]){i[r]={}}e(t[r],i[r])}else{i[r]=t[r]}}}if(t===true&&navigator.language){t=navigator.language.toLowerCase()}if(t){if(!i.langList[t]){var r=t.split("-")[0];if(i.langList[r]){console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,r);t=r}else{console.warn("Localization Error - Matching locale not found, using default: ",t);t="default"}}}i.locale=t;i.lang=H.prototype.helpers.deepClone(i.langList.default||{});if(t!="default"){e(i.langList[t],i.lang)}i.table.options.localized.call(i.table,i.locale,i.lang);i._executeBindings()};_.prototype.getLocale=function(t){return self.locale};_.prototype.getLang=function(t){return t?this.langList[t]:this.lang};_.prototype.getText=function(t,i){var t=i?t+"|"+i:t,e=t.split("|"),r=this._getLangElement(e,this.locale);return r||""};_.prototype._getLangElement=function(t,i){var e=this;var r=e.lang;t.forEach((function(t){var i;if(r){i=r[t];if(typeof i!="undefined"){r=i}else{r=false}}}));return r};_.prototype.bind=function(t,i){if(!this.bindings[t]){this.bindings[t]=[]}this.bindings[t].push(i);i(this.getText(t),this.lang)};_.prototype._executeBindings=function(){var t=this;var i=function i(e){t.bindings[e].forEach((function(i){i(t.getText(e),t.lang)}))};for(var e in t.bindings){i(e)}};_.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}};H.prototype.registerModule("localize",_);var U=function t(i){this.table=i};U.prototype.getConnections=function(t){var i=this,e=[],r;r=H.prototype.comms.lookupTable(t);r.forEach((function(t){if(i.table!==t){e.push(t)}}));return e};U.prototype.send=function(t,i,e,r){var n=this,o=this.getConnections(t);o.forEach((function(t){t.tableComms(n.table.element,i,e,r)}));if(!o.length&&t){console.warn("Table Connection Error - No tables matching selector found",t)}};U.prototype.receive=function(t,i,e,r){if(this.table.modExists(i)){return this.table.modules[i].commsReceived(t,e,r)}else{console.warn("Inter-table Comms Error - no such module:",i)}};H.prototype.registerModule("comms",U);var V=function t(i){this.table=i;this.allowedTypes=["","data","download","clipboard","print","htmlOutput"]};V.prototype.initializeColumn=function(t){var i=this,e=false,r={};this.allowedTypes.forEach((function(n){var o="accessor"+(n.charAt(0).toUpperCase()+n.slice(1)),s;if(t.definition[o]){s=i.lookupAccessor(t.definition[o]);if(s){e=true;r[o]={accessor:s,params:t.definition[o+"Params"]||{}}}}}));if(e){t.modules.accessor=r}};V.prototype.lookupAccessor=function(t){var i=false;switch(typeof t==="undefined"?"undefined":T(t)){case"string":if(this.accessors[t]){i=this.accessors[t]}else{console.warn("Accessor Error - No such accessor found, ignoring: ",t)}break;case"function":i=t;break}return i};V.prototype.transformRow=function(t,i){var e="accessor"+(i.charAt(0).toUpperCase()+i.slice(1)),r=t.getComponent();var n=H.prototype.helpers.deepClone(t.data||{});this.table.columnManager.traverse((function(t){var o,s,a,u;if(t.modules.accessor){s=t.modules.accessor[e]||t.modules.accessor.accessor||false;if(s){o=t.getFieldValue(n);if(o!="undefined"){u=t.getComponent();a=typeof s.params==="function"?s.params(o,n,i,u,r):s.params;t.setFieldValue(n,s.accessor(o,n,i,a,u,r))}}}}));return n},V.prototype.accessors={};H.prototype.registerModule("accessor",V);var B=function t(i){this.table=i;this.config=false;this.url="";this.urlGenerator=false;this.params=false;this.loaderElement=this.createLoaderElement();this.msgElement=this.createMsgElement();this.loadingElement=false;this.errorElement=false;this.loaderPromise=false;this.progressiveLoad=false;this.loading=false;this.requestOrder=0};B.prototype.initialize=function(){var t;this.loaderElement.appendChild(this.msgElement);if(this.table.options.ajaxLoaderLoading){if(typeof this.table.options.ajaxLoaderLoading=="string"){t=document.createElement("template");t.innerHTML=this.table.options.ajaxLoaderLoading.trim();this.loadingElement=t.content.firstChild}else{this.loadingElement=this.table.options.ajaxLoaderLoading}}this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise;this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator;if(this.table.options.ajaxLoaderError){if(typeof this.table.options.ajaxLoaderError=="string"){t=document.createElement("template");t.innerHTML=this.table.options.ajaxLoaderError.trim();this.errorElement=t.content.firstChild}else{this.errorElement=this.table.options.ajaxLoaderError}}if(this.table.options.ajaxParams){this.setParams(this.table.options.ajaxParams)}if(this.table.options.ajaxConfig){this.setConfig(this.table.options.ajaxConfig)}if(this.table.options.ajaxURL){this.setUrl(this.table.options.ajaxURL)}if(this.table.options.ajaxProgressiveLoad){if(this.table.options.pagination){this.progressiveLoad=false;console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")}else{if(this.table.modExists("page")){this.progressiveLoad=this.table.options.ajaxProgressiveLoad;this.table.modules.page.initializeProgressive(this.progressiveLoad)}else{console.error("Pagination plugin is required for progressive ajax loading")}}}};B.prototype.createLoaderElement=function(){var t=document.createElement("div");t.classList.add("tabulator-loader");return t};B.prototype.createMsgElement=function(){var t=document.createElement("div");t.classList.add("tabulator-loader-msg");t.setAttribute("role","alert");return t};B.prototype.setParams=function(t,i){if(i){this.params=this.params||{};for(var e in t){this.params[e]=t[e]}}else{this.params=t}};B.prototype.getParams=function(){return this.params||{}};B.prototype.setConfig=function(t){this._loadDefaultConfig();if(typeof t=="string"){this.config.method=t}else{for(var i in t){this.config[i]=t[i]}}};B.prototype._loadDefaultConfig=function(t){var i=this;if(!i.config||t){i.config={};for(var e in i.defaultConfig){i.config[e]=i.defaultConfig[e]}}};B.prototype.setUrl=function(t){this.url=t};B.prototype.getUrl=function(){return this.url};B.prototype.loadData=function(t,i){if(this.progressiveLoad){return this._loadDataProgressive()}else{return this._loadDataStandard(t,i)}};B.prototype.nextPage=function(t){var i;if(!this.loading){i=this.table.options.ajaxProgressiveLoadScrollMargin||this.table.rowManager.getElement().clientHeight*2;if(t<i){this.table.modules.page.nextPage().then((function(){})).catch((function(){}))}}};B.prototype.blockActiveRequest=function(){this.requestOrder++};B.prototype._loadDataProgressive=function(){this.table.rowManager.setData([]);return this.table.modules.page.setPage(1)};B.prototype._loadDataStandard=function(t,i){var e=this;return new Promise((function(r,n){e.sendRequest(t).then((function(o){e.table.rowManager.setData(o,t,i).then((function(){r()})).catch((function(t){n(t)}))})).catch((function(t){n(t)}))}))};B.prototype.generateParamsList=function(t,i){var e=this,r=[];i=i||"";if(Array.isArray(t)){t.forEach((function(t,n){r=r.concat(e.generateParamsList(t,i?i+"["+n+"]":n))}))}else if((typeof t==="undefined"?"undefined":T(t))==="object"){for(var n in t){r=r.concat(e.generateParamsList(t[n],i?i+"["+n+"]":n))}}else{r.push({key:i,value:t})}return r};B.prototype.serializeParams=function(t){var i=this.generateParamsList(t),e=[];i.forEach((function(t){e.push(encodeURIComponent(t.key)+"="+encodeURIComponent(t.value))}));return e.join("&")};B.prototype.sendRequest=function(t){var i=this;var e=this,r=e.url,n;e.requestOrder++;n=e.requestOrder;e._loadDefaultConfig();return new Promise((function(o,s){if(e.table.options.ajaxRequesting.call(i.table,e.url,e.params)!==false){e.loading=true;if(!t){e.showLoader()}i.loaderPromise(r,e.config,e.params).then((function(t){if(n===e.requestOrder){if(e.table.options.ajaxResponse){t=e.table.options.ajaxResponse.call(e.table,e.url,e.params,t)}o(t);e.hideLoader();e.loading=false}else{console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made")}})).catch((function(t){console.error("Ajax Load Error: ",t);e.table.options.ajaxError.call(e.table,t);e.showError();setTimeout((function(){e.hideLoader()}),3e3);e.loading=false;s(t)}))}else{s()}}))};B.prototype.showLoader=function(){var t=typeof this.table.options.ajaxLoader==="function"?this.table.options.ajaxLoader():this.table.options.ajaxLoader;if(t){this.hideLoader();while(this.msgElement.firstChild){this.msgElement.removeChild(this.msgElement.firstChild)}this.msgElement.classList.remove("tabulator-error");this.msgElement.classList.add("tabulator-loading");if(this.loadingElement){this.msgElement.appendChild(this.loadingElement)}else{this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|loading")}this.table.element.appendChild(this.loaderElement)}};B.prototype.showError=function(){this.hideLoader();while(this.msgElement.firstChild){this.msgElement.removeChild(this.msgElement.firstChild)}this.msgElement.classList.remove("tabulator-loading");this.msgElement.classList.add("tabulator-error");if(this.errorElement){this.msgElement.appendChild(this.errorElement)}else{this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|error")}this.table.element.appendChild(this.loaderElement)};B.prototype.hideLoader=function(){if(this.loaderElement.parentNode){this.loaderElement.parentNode.removeChild(this.loaderElement)}};B.prototype.defaultConfig={method:"GET"};B.prototype.defaultURLGenerator=function(t,i,e){if(t){if(e&&Object.keys(e).length){if(!i.method||i.method.toLowerCase()=="get"){i.method="get";t+=(t.includes("?")?"&":"?")+this.modules.ajax.serializeParams(e)}}}return t};B.prototype.defaultLoaderPromise=function(t,i,e){var r=this,n;return new Promise((function(o,s){t=r.urlGenerator.call(r.table,t,i,e);if(i.method.toUpperCase()!="GET"){n=T(r.table.options.ajaxContentType)==="object"?r.table.options.ajaxContentType:r.contentTypeFormatters[r.table.options.ajaxContentType];if(n){for(var a in n.headers){if(!i.headers){i.headers={}}if(typeof i.headers[a]==="undefined"){i.headers[a]=n.headers[a]}}i.body=n.body.call(r,t,i,e)}else{console.warn("Ajax Error - Invalid ajaxContentType value:",r.table.options.ajaxContentType)}}if(t){if(typeof i.headers==="undefined"){i.headers={}}if(typeof i.headers.Accept==="undefined"){i.headers.Accept="application/json"}if(typeof i.headers["X-Requested-With"]==="undefined"){i.headers["X-Requested-With"]="XMLHttpRequest"}if(typeof i.mode==="undefined"){i.mode="cors"}if(i.mode=="cors"){if(typeof i.headers["Access-Control-Allow-Origin"]==="undefined"){i.headers["Access-Control-Allow-Origin"]=window.location.origin}if(typeof i.credentials==="undefined"){i.credentials="same-origin"}}else{if(typeof i.credentials==="undefined"){i.credentials="include"}}fetch(t,i).then((function(t){if(t.ok){t.json().then((function(t){o(t)})).catch((function(t){s(t);console.warn("Ajax Load Error - Invalid JSON returned",t)}))}else{console.error("Ajax Load Error - Connection Error: "+t.status,t.statusText);s(t)}})).catch((function(t){console.error("Ajax Load Error - Connection Error: ",t);s(t)}))}else{console.warn("Ajax Load Error - No URL Set");o([])}}))};B.prototype.contentTypeFormatters={json:{headers:{"Content-Type":"application/json"},body:function t(i,e,r){return JSON.stringify(r)}},form:{headers:{},body:function t(i,e,r){var n=this.generateParamsList(r),o=new FormData;n.forEach((function(t){o.append(t.key,t.value)}));return o}}};H.prototype.registerModule("ajax",B);var J=function t(i){this._row=i};J.prototype.getData=function(t){return this._row.getData(t)};J.prototype.getElement=function(){return this._row.getElement()};J.prototype.getTable=function(){return this._row.table};J.prototype.getCells=function(){var t=[];this._row.getCells().forEach((function(i){t.push(i.getComponent())}));return t};J.prototype.getCell=function(t){var i=this._row.getCell(t);return i?i.getComponent():false};J.prototype._getSelf=function(){return this._row};var W=function t(i){this.table=i;this.topCalcs=[];this.botCalcs=[];this.genColumn=false;this.topElement=this.createElement();this.botElement=this.createElement();this.topRow=false;this.botRow=false;this.topInitialized=false;this.botInitialized=false;this.initialize()};W.prototype.createElement=function(){var t=document.createElement("div");t.classList.add("tabulator-calcs-holder");return t};W.prototype.initialize=function(){this.genColumn=new N({field:"value"},this)};W.prototype.registerColumnField=function(){};W.prototype.initializeColumn=function(t){var i=t.definition;var e={topCalcParams:i.topCalcParams||{},botCalcParams:i.bottomCalcParams||{}};if(i.topCalc){switch(T(i.topCalc)){case"string":if(this.calculations[i.topCalc]){e.topCalc=this.calculations[i.topCalc]}else{console.warn("Column Calc Error - No such calculation found, ignoring: ",i.topCalc)}break;case"function":e.topCalc=i.topCalc;break}if(e.topCalc){t.modules.columnCalcs=e;this.topCalcs.push(t);if(this.table.options.columnCalcs!="group"){this.initializeTopRow()}}}if(i.bottomCalc){switch(T(i.bottomCalc)){case"string":if(this.calculations[i.bottomCalc]){e.botCalc=this.calculations[i.bottomCalc]}else{console.warn("Column Calc Error - No such calculation found, ignoring: ",i.bottomCalc)}break;case"function":e.botCalc=i.bottomCalc;break}if(e.botCalc){t.modules.columnCalcs=e;this.botCalcs.push(t);if(this.table.options.columnCalcs!="group"){this.initializeBottomRow()}}}};W.prototype.removeCalcs=function(){var t=false;if(this.topInitialized){this.topInitialized=false;this.topElement.parentNode.removeChild(this.topElement);t=true}if(this.botInitialized){this.botInitialized=false;this.table.footerManager.remove(this.botElement);t=true}if(t){this.table.rowManager.adjustTableSize()}};W.prototype.initializeTopRow=function(){if(!this.topInitialized){this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling);this.topInitialized=true}};W.prototype.initializeBottomRow=function(){if(!this.botInitialized){this.table.footerManager.prepend(this.botElement);this.botInitialized=true}};W.prototype.scrollHorizontal=function(t){if(this.botInitialized&&this.botRow){this.botRow.getElement().style.marginLeft=-t+"px"}};W.prototype.recalc=function(t){var i;if(this.topInitialized||this.botInitialized){this.rowsToData(t);if(this.topInitialized){if(this.topRow){this.topRow.deleteCells()}i=this.generateRow("top",this.rowsToData(t));this.topRow=i;while(this.topElement.firstChild){this.topElement.removeChild(this.topElement.firstChild)}this.topElement.appendChild(i.getElement());i.initialize(true)}if(this.botInitialized){if(this.botRow){this.botRow.deleteCells()}i=this.generateRow("bottom",this.rowsToData(t));this.botRow=i;while(this.botElement.firstChild){this.botElement.removeChild(this.botElement.firstChild)}this.botElement.appendChild(i.getElement());i.initialize(true)}this.table.rowManager.adjustTableSize();if(this.table.modExists("frozenColumns")){this.table.modules.frozenColumns.layout()}}};W.prototype.recalcRowGroup=function(t){this.recalcGroup(this.table.modules.groupRows.getRowGroup(t))};W.prototype.recalcAll=function(){var t=this;if(this.topCalcs.length||this.botCalcs.length){if(this.table.options.columnCalcs!=="group"){this.recalc(this.table.rowManager.activeRows)}if(this.table.options.groupBy&&this.table.options.columnCalcs!=="table"){var i=table.modules.groupRows.getChildGroups();i.forEach((function(i){t.recalcGroup(i)}))}}};W.prototype.recalcGroup=function(t){var i,e;if(t){if(t.calcs){if(t.calcs.bottom){i=this.rowsToData(t.rows);e=this.generateRowData("bottom",i);t.calcs.bottom.updateData(e);t.calcs.bottom.reinitialize()}if(t.calcs.top){i=this.rowsToData(t.rows);e=this.generateRowData("top",i);t.calcs.top.updateData(e);t.calcs.top.reinitialize()}}}};W.prototype.generateTopRow=function(t){return this.generateRow("top",this.rowsToData(t))};W.prototype.generateBottomRow=function(t){return this.generateRow("bottom",this.rowsToData(t))};W.prototype.rowsToData=function(t){var i=this;var e=[];t.forEach((function(t){e.push(t.getData());if(i.table.options.dataTree&&i.table.options.dataTreeChildColumnCalcs){if(t.modules.dataTree.open){var r=i.rowsToData(i.table.modules.dataTree.getFilteredTreeChildren(t));e=e.concat(r)}}}));return e};W.prototype.generateRow=function(t,i){var e=this,r=this.generateRowData(t,i),n;if(e.table.modExists("mutator")){e.table.modules.mutator.disable()}n=new P(r,this,"calc");if(e.table.modExists("mutator")){e.table.modules.mutator.enable()}n.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+t);n.component=false;n.getComponent=function(){if(!this.component){this.component=new J(this)}return this.component};n.generateCells=function(){var i=[];e.table.columnManager.columnsByIndex.forEach((function(r){e.genColumn.setField(r.getField());e.genColumn.hozAlign=r.hozAlign;if(r.definition[t+"CalcFormatter"]&&e.table.modExists("format")){e.genColumn.modules.format={formatter:e.table.modules.format.getFormatter(r.definition[t+"CalcFormatter"]),params:r.definition[t+"CalcFormatterParams"]||{}}}else{e.genColumn.modules.format={formatter:e.table.modules.format.getFormatter("plaintext"),params:{}}}e.genColumn.definition.cssClass=r.definition.cssClass;var o=new A(e.genColumn,n);o.getElement();o.column=r;o.setWidth();r.cells.push(o);i.push(o);if(!r.visible){o.hide()}}));this.cells=i};return n};W.prototype.generateRowData=function(t,i){var e={},r=t=="top"?this.topCalcs:this.botCalcs,n=t=="top"?"topCalc":"botCalc",o,s;r.forEach((function(t){var r=[];if(t.modules.columnCalcs&&t.modules.columnCalcs[n]){i.forEach((function(i){r.push(t.getFieldValue(i))}));s=n+"Params";o=typeof t.modules.columnCalcs[s]==="function"?t.modules.columnCalcs[s](r,i):t.modules.columnCalcs[s];t.setFieldValue(e,t.modules.columnCalcs[n](r,i,o))}}));return e};W.prototype.hasTopCalcs=function(){return!!this.topCalcs.length};W.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length};W.prototype.redraw=function(){if(this.topRow){this.topRow.normalizeHeight(true)}if(this.botRow){this.botRow.normalizeHeight(true)}};W.prototype.getResults=function(){var t=this,i={},e;if(this.table.options.groupBy&&this.table.modExists("groupRows")){e=this.table.modules.groupRows.getGroups(true);e.forEach((function(e){i[e.getKey()]=t.getGroupResults(e)}))}else{i={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}}}return i};W.prototype.getGroupResults=function(t){var i=this,e=t._getSelf(),r=t.getSubGroups(),n={},o={};r.forEach((function(t){n[t.getKey()]=i.getGroupResults(t)}));o={top:e.calcs.top?e.calcs.top.getData():{},bottom:e.calcs.bottom?e.calcs.bottom.getData():{},groups:n};return o};W.prototype.calculations={avg:function t(i,e,r){var n=0,o=typeof r.precision!=="undefined"?r.precision:2;if(i.length){n=i.reduce((function(t,i){return Number(t)+Number(i)}));n=n/i.length;n=o!==false?n.toFixed(o):n}return parseFloat(n).toString()},max:function t(i,e,r){var n=null,o=typeof r.precision!=="undefined"?r.precision:false;i.forEach((function(t){t=Number(t);if(t>n||n===null){n=t}}));return n!==null?o!==false?n.toFixed(o):n:""},min:function t(i,e,r){var n=null,o=typeof r.precision!=="undefined"?r.precision:false;i.forEach((function(t){t=Number(t);if(t<n||n===null){n=t}}));return n!==null?o!==false?n.toFixed(o):n:""},sum:function t(i,e,r){var n=0,o=typeof r.precision!=="undefined"?r.precision:false;if(i.length){i.forEach((function(t){t=Number(t);n+=!isNaN(t)?Number(t):0}))}return o!==false?n.toFixed(o):n},concat:function t(i,e,r){var n=0;if(i.length){n=i.reduce((function(t,i){return String(t)+String(i)}))}return n},count:function t(i,e,r){var n=0;if(i.length){i.forEach((function(t){if(t){n++}}))}return n}};H.prototype.registerModule("columnCalcs",W);var q=function t(i){this.table=i;this.mode=true;this.pasteParser=function(){};this.pasteAction=function(){};this.customSelection=false;this.rowRange=false;this.blocked=true};q.prototype.initialize=function(){var t=this;this.mode=this.table.options.clipboard;this.rowRange=this.table.options.clipboardCopyRowRange;if(this.mode===true||this.mode==="copy"){this.table.element.addEventListener("copy",(function(i){var e,r,n;if(!t.blocked){i.preventDefault();if(t.customSelection){e=t.customSelection;if(t.table.options.clipboardCopyFormatter){e=t.table.options.clipboardCopyFormatter("plain",e)}}else{var n=t.table.modules.export.generateExportList(t.table.options.clipboardCopyConfig,t.table.options.clipboardCopyStyled,t.rowRange,"clipboard");r=t.table.modules.export.genereateHTMLTable(n);e=r?t.generatePlainContent(n):"";if(t.table.options.clipboardCopyFormatter){e=t.table.options.clipboardCopyFormatter("plain",e);r=t.table.options.clipboardCopyFormatter("html",r)}}if(window.clipboardData&&window.clipboardData.setData){window.clipboardData.setData("Text",e)}else if(i.clipboardData&&i.clipboardData.setData){i.clipboardData.setData("text/plain",e);if(r){i.clipboardData.setData("text/html",r)}}else if(i.originalEvent&&i.originalEvent.clipboardData.setData){i.originalEvent.clipboardData.setData("text/plain",e);if(r){i.originalEvent.clipboardData.setData("text/html",r)}}t.table.options.clipboardCopied.call(t.table,e,r);t.reset()}}))}if(this.mode===true||this.mode==="paste"){this.table.element.addEventListener("paste",(function(i){t.paste(i)}))}this.setPasteParser(this.table.options.clipboardPasteParser);this.setPasteAction(this.table.options.clipboardPasteAction)};q.prototype.reset=function(){this.blocked=true;this.customSelection=false};q.prototype.generatePlainContent=function(t){var i=[];t.forEach((function(t){var e=[];t.columns.forEach((function(i){var r="";if(i){if(t.type==="group"){i.value=i.component.getKey()}if(i.value===null){r=""}else{switch(T(i.value)){case"object":r=JSON.stringify(i.value);break;case"undefined":r="";break;default:r=i.value}}}e.push(r)}));i.push(e.join("\t"))}));return i.join("\n")};q.prototype.copy=function(t,i){var t,e,r;this.blocked=false;this.customSelection=false;if(this.mode===true||this.mode==="copy"){this.rowRange=t||this.table.options.clipboardCopyRowRange;if(typeof window.getSelection!="undefined"&&typeof document.createRange!="undefined"){t=document.createRange();t.selectNodeContents(this.table.element);e=window.getSelection();if(e.toString()&&i){this.customSelection=e.toString()}e.removeAllRanges();e.addRange(t)}else if(typeof document.selection!="undefined"&&typeof document.body.createTextRange!="undefined"){r=document.body.createTextRange();r.moveToElementText(this.table.element);r.select()}document.execCommand("copy");if(e){e.removeAllRanges()}}};q.prototype.setPasteAction=function(t){switch(typeof t==="undefined"?"undefined":T(t)){case"string":this.pasteAction=this.pasteActions[t];if(!this.pasteAction){console.warn("Clipboard Error - No such paste action found:",t)}break;case"function":this.pasteAction=t;break}};q.prototype.setPasteParser=function(t){switch(typeof t==="undefined"?"undefined":T(t)){case"string":this.pasteParser=this.pasteParsers[t];if(!this.pasteParser){console.warn("Clipboard Error - No such paste parser found:",t)}break;case"function":this.pasteParser=t;break}};q.prototype.paste=function(t){var i,e,r;if(this.checkPaseOrigin(t)){i=this.getPasteData(t);e=this.pasteParser.call(this,i);if(e){t.preventDefault();if(this.table.modExists("mutator")){e=this.mutateData(e)}r=this.pasteAction.call(this,e);this.table.options.clipboardPasted.call(this.table,i,e,r)}else{this.table.options.clipboardPasteError.call(this.table,i)}}};q.prototype.mutateData=function(t){var i=this,e=[];if(Array.isArray(t)){t.forEach((function(t){e.push(i.table.modules.mutator.transformRow(t,"clipboard"))}))}else{e=t}return e};q.prototype.checkPaseOrigin=function(t){var i=true;if(t.target.tagName!="DIV"||this.table.modules.edit.currentCell){i=false}return i};q.prototype.getPasteData=function(t){var i;if(window.clipboardData&&window.clipboardData.getData){i=window.clipboardData.getData("Text")}else if(t.clipboardData&&t.clipboardData.getData){i=t.clipboardData.getData("text/plain")}else if(t.originalEvent&&t.originalEvent.clipboardData.getData){i=t.originalEvent.clipboardData.getData("text/plain")}return i};q.prototype.pasteParsers={table:function t(i){var e=[],r=true,n=this.table.columnManager.columns,o=[],s=[];i=i.split("\n");i.forEach((function(t){e.push(t.split("\t"))}));if(e.length&&!(e.length===1&&e[0].length<2)){e[0].forEach((function(t){var i=n.find((function(i){return t&&i.definition.title&&t.trim()&&i.definition.title.trim()===t.trim()}));if(i){o.push(i)}else{r=false}}));if(!r){r=true;o=[];e[0].forEach((function(t){var i=n.find((function(i){return t&&i.field&&t.trim()&&i.field.trim()===t.trim()}));if(i){o.push(i)}else{r=false}}));if(!r){o=this.table.columnManager.columnsByIndex}}if(r){e.shift()}e.forEach((function(t){var i={};t.forEach((function(t,e){if(o[e]){i[o[e].field]=t}}));s.push(i)}));return s}else{return false}}};q.prototype.pasteActions={replace:function t(i){return this.table.setData(i)},update:function t(i){return this.table.updateOrAddData(i)},insert:function t(i){return this.table.addData(i)}};H.prototype.registerModule("clipboard",q);var Y=function t(i){this.table=i;this.indent=10;this.field="";this.collapseEl=null;this.expandEl=null;this.branchEl=null;this.elementField=false;this.startOpen=function(){};this.displayIndex=0};Y.prototype.initialize=function(){var t=null,i=this.table.columnManager.getFirstVisibileColumn(),e=this.table.options;this.field=e.dataTreeChildField;this.indent=e.dataTreeChildIndent;this.elementField=e.dataTreeElementColumn||(i?i.field:false);if(e.dataTreeBranchElement){if(e.dataTreeBranchElement===true){this.branchEl=document.createElement("div");this.branchEl.classList.add("tabulator-data-tree-branch")}else{if(typeof e.dataTreeBranchElement==="string"){t=document.createElement("div");t.innerHTML=e.dataTreeBranchElement;this.branchEl=t.firstChild}else{this.branchEl=e.dataTreeBranchElement}}}if(e.dataTreeCollapseElement){if(typeof e.dataTreeCollapseElement==="string"){t=document.createElement("div");t.innerHTML=e.dataTreeCollapseElement;this.collapseEl=t.firstChild}else{this.collapseEl=e.dataTreeCollapseElement}}else{this.collapseEl=document.createElement("div");this.collapseEl.classList.add("tabulator-data-tree-control");this.collapseEl.tabIndex=0;this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"}if(e.dataTreeExpandElement){if(typeof e.dataTreeExpandElement==="string"){t=document.createElement("div");t.innerHTML=e.dataTreeExpandElement;this.expandEl=t.firstChild}else{this.expandEl=e.dataTreeExpandElement}}else{this.expandEl=document.createElement("div");this.expandEl.classList.add("tabulator-data-tree-control");this.expandEl.tabIndex=0;this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"}switch(T(e.dataTreeStartExpanded)){case"boolean":this.startOpen=function(t,i){return e.dataTreeStartExpanded};break;case"function":this.startOpen=e.dataTreeStartExpanded;break;default:this.startOpen=function(t,i){return e.dataTreeStartExpanded[i]};break}};Y.prototype.initializeRow=function(t){var i=t.getData()[this.field];var e=Array.isArray(i);var r=e||!e&&(typeof i==="undefined"?"undefined":T(i))==="object"&&i!==null;if(!r&&t.modules.dataTree&&t.modules.dataTree.branchEl){t.modules.dataTree.branchEl.parentNode.removeChild(t.modules.dataTree.branchEl)}if(!r&&t.modules.dataTree&&t.modules.dataTree.controlEl){t.modules.dataTree.controlEl.parentNode.removeChild(t.modules.dataTree.controlEl)}t.modules.dataTree={index:t.modules.dataTree?t.modules.dataTree.index:0,open:r?t.modules.dataTree?t.modules.dataTree.open:this.startOpen(t.getComponent(),0):false,controlEl:t.modules.dataTree&&r?t.modules.dataTree.controlEl:false,branchEl:t.modules.dataTree&&r?t.modules.dataTree.branchEl:false,parent:t.modules.dataTree?t.modules.dataTree.parent:false,children:r}};Y.prototype.layoutRow=function(t){var i=this.elementField?t.getCell(this.elementField):t.getCells()[0],e=i.getElement(),r=t.modules.dataTree;if(r.branchEl){if(r.branchEl.parentNode){r.branchEl.parentNode.removeChild(r.branchEl)}r.branchEl=false}if(r.controlEl){if(r.controlEl.parentNode){r.controlEl.parentNode.removeChild(r.controlEl)}r.controlEl=false}this.generateControlElement(t,e);t.getElement().classList.add("tabulator-tree-level-"+r.index);if(r.index){if(this.branchEl){r.branchEl=this.branchEl.cloneNode(true);e.insertBefore(r.branchEl,e.firstChild);if(this.table.rtl){r.branchEl.style.marginRight=(r.branchEl.offsetWidth+r.branchEl.style.marginLeft)*(r.index-1)+r.index*this.indent+"px"}else{r.branchEl.style.marginLeft=(r.branchEl.offsetWidth+r.branchEl.style.marginRight)*(r.index-1)+r.index*this.indent+"px"}}else{if(this.table.rtl){e.style.paddingRight=parseInt(window.getComputedStyle(e,null).getPropertyValue("padding-right"))+r.index*this.indent+"px"}else{e.style.paddingLeft=parseInt(window.getComputedStyle(e,null).getPropertyValue("padding-left"))+r.index*this.indent+"px"}}}};Y.prototype.generateControlElement=function(t,i){var e=this;var r=t.modules.dataTree,i=i||t.getCells()[0].getElement(),n=r.controlEl;if(r.children!==false){if(r.open){r.controlEl=this.collapseEl.cloneNode(true);r.controlEl.addEventListener("click",(function(i){i.stopPropagation();e.collapseRow(t)}))}else{r.controlEl=this.expandEl.cloneNode(true);r.controlEl.addEventListener("click",(function(i){i.stopPropagation();e.expandRow(t)}))}r.controlEl.addEventListener("mousedown",(function(t){t.stopPropagation()}));if(n&&n.parentNode===i){n.parentNode.replaceChild(r.controlEl,n)}else{i.insertBefore(r.controlEl,i.firstChild)}}};Y.prototype.setDisplayIndex=function(t){this.displayIndex=t};Y.prototype.getDisplayIndex=function(){return this.displayIndex};Y.prototype.getRows=function(t){var i=this;var e=[];t.forEach((function(t,r){var n,o;e.push(t);if(t instanceof P){t.create();n=t.modules.dataTree.children;if(!n.index&&n.children!==false){o=i.getChildren(t);o.forEach((function(t){t.create();e.push(t)}))}}}));return e};Y.prototype.getChildren=function(t,i){var e=this;var r=t.modules.dataTree,n=[],o=[];if(r.children!==false&&(r.open||i)){if(!Array.isArray(r.children)){r.children=this.generateChildren(t)}if(this.table.modExists("filter")&&this.table.options.dataTreeFilter){n=this.table.modules.filter.filter(r.children)}else{n=r.children}if(this.table.modExists("sort")&&this.table.options.dataTreeSort){this.table.modules.sort.sort(n)}n.forEach((function(t){o.push(t);var i=e.getChildren(t);i.forEach((function(t){o.push(t)}))}))}return o};Y.prototype.generateChildren=function(t){var i=this;var e=[];var r=t.getData()[this.field];if(!Array.isArray(r)){r=[r]}r.forEach((function(r){var n=new P(r||{},i.table.rowManager);n.create();n.modules.dataTree.index=t.modules.dataTree.index+1;n.modules.dataTree.parent=t;if(n.modules.dataTree.children){n.modules.dataTree.open=i.startOpen(n.getComponent(),n.modules.dataTree.index)}e.push(n)}));return e};Y.prototype.expandRow=function(t,i){var e=t.modules.dataTree;if(e.children!==false){e.open=true;t.reinitialize();this.table.rowManager.refreshActiveData("tree",false,true);this.table.options.dataTreeRowExpanded(t.getComponent(),t.modules.dataTree.index)}};Y.prototype.collapseRow=function(t){var i=t.modules.dataTree;if(i.children!==false){i.open=false;t.reinitialize();this.table.rowManager.refreshActiveData("tree",false,true);this.table.options.dataTreeRowCollapsed(t.getComponent(),t.modules.dataTree.index)}};Y.prototype.toggleRow=function(t){var i=t.modules.dataTree;if(i.children!==false){if(i.open){this.collapseRow(t)}else{this.expandRow(t)}}};Y.prototype.getTreeParent=function(t){return t.modules.dataTree.parent?t.modules.dataTree.parent.getComponent():false};Y.prototype.getFilteredTreeChildren=function(t){var i=t.modules.dataTree,e=[],r;if(i.children){if(!Array.isArray(i.children)){i.children=this.generateChildren(t)}if(this.table.modExists("filter")&&this.table.options.dataTreeFilter){r=this.table.modules.filter.filter(i.children)}else{r=i.children}r.forEach((function(t){if(t instanceof P){e.push(t)}}))}return e};Y.prototype.rowDelete=function(t){var i=t.modules.dataTree.parent,e;if(i){e=this.findChildIndex(t,i);if(e!==false){i.data[this.field].splice(e,1)}if(!i.data[this.field].length){delete i.data[this.field]}this.initializeRow(i);this.layoutRow(i)}this.table.rowManager.refreshActiveData("tree",false,true)};Y.prototype.addTreeChildRow=function(t,i,e,r){var n=false;if(typeof i==="string"){i=JSON.parse(i)}if(!Array.isArray(t.data[this.field])){t.data[this.field]=[];t.modules.dataTree.open=this.startOpen(t.getComponent(),t.modules.dataTree.index)}if(typeof r!=="undefined"){n=this.findChildIndex(r,t);if(n!==false){t.data[this.field].splice(e?n:n+1,0,i)}}if(n===false){if(e){t.data[this.field].unshift(i)}else{t.data[this.field].push(i)}}this.initializeRow(t);this.layoutRow(t);this.table.rowManager.refreshActiveData("tree",false,true)};Y.prototype.findChildIndex=function(t,i){var e=this;var r=false;if((typeof t==="undefined"?"undefined":T(t))=="object"){if(t instanceof P){r=t.data}else if(t instanceof O){r=t._getSelf().data}else if(typeof HTMLElement!=="undefined"&&t instanceof HTMLElement){if(i.modules.dataTree){r=i.modules.dataTree.children.find((function(i){return i instanceof P?i.element===t:false}));if(r){r=r.data}}}}else if(typeof t=="undefined"||t===null){r=false}else{r=i.data[this.field].find((function(i){return i.data[e.table.options.index]==t}))}if(r){if(Array.isArray(i.data[this.field])){r=i.data[this.field].indexOf(r)}if(r==-1){r=false}}return r};Y.prototype.getTreeChildren=function(t,i,e){var r=this;var n=t.modules.dataTree,o=[];if(n.children){if(!Array.isArray(n.children)){n.children=this.generateChildren(t)}n.children.forEach((function(t){if(t instanceof P){o.push(i?t.getComponent():t);if(e){o=o.concat(r.getTreeChildren(t,i,e))}}}))}return o};Y.prototype.checkForRestyle=function(t){if(!t.row.cells.indexOf(t)){t.row.reinitialize()}};Y.prototype.getChildField=function(){return this.field};Y.prototype.redrawNeeded=function(t){return(this.field?typeof t[this.field]!=="undefined":false)||(this.elementField?typeof t[this.elementField]!=="undefined":false)};H.prototype.registerModule("dataTree",Y);var G=function t(i){this.table=i};G.prototype.download=function(t,i,e,r,n){var o=this,s=false;function a(e,r){if(n){if(n===true){o.triggerDownload(e,r,t,i,true)}else{n(e)}}else{o.triggerDownload(e,r,t,i)}}if(typeof t=="function"){s=t}else{if(o.downloaders[t]){s=o.downloaders[t]}else{console.warn("Download Error - No such download type found: ",t)}}if(s){var u=this.generateExportList(r);s.call(this.table,u,e||{},a)}};G.prototype.generateExportList=function(t){var i=this.table.modules.export.generateExportList(this.table.options.downloadConfig,false,t||this.table.options.downloadRowRange,"download");var e=this.table.options.groupHeaderDownload;if(e&&!Array.isArray(e)){e=[e]}i.forEach((function(t){var i;if(t.type==="group"){i=t.columns[0];if(e&&e[t.indent]){i.value=e[t.indent](i.value,t.component._group.getRowCount(),t.component._group.getData(),t.component)}}}));return i};G.prototype.triggerDownload=function(t,i,e,r,n){var o=document.createElement("a"),s=new Blob([t],{type:i}),r=r||"Tabulator."+(typeof e==="function"?"txt":e);s=this.table.options.downloadReady.call(this.table,t,s);if(s){if(n){window.open(window.URL.createObjectURL(s))}else{if(navigator.msSaveOrOpenBlob){navigator.msSaveOrOpenBlob(s,r)}else{o.setAttribute("href",window.URL.createObjectURL(s));o.setAttribute("download",r);o.style.display="none";document.body.appendChild(o);o.click();document.body.removeChild(o)}}if(this.table.options.downloadComplete){this.table.options.downloadComplete()}}};G.prototype.commsReceived=function(t,i,e){switch(i){case"intercept":this.download(e.type,"",e.options,e.active,e.intercept);break}};G.prototype.downloaders={csv:function t(i,e,r){var n=e&&e.delimiter?e.delimiter:",",o=[],s=[];i.forEach((function(t){var i=[];switch(t.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":t.columns.forEach((function(t,i){if(t&&t.depth===1){s[i]=typeof t.value=="undefined"||t.value===null?"":'"'+String(t.value).split('"').join('""')+'"'}}));break;case"row":t.columns.forEach((function(t){if(t){switch(T(t.value)){case"object":t.value=JSON.stringify(t.value);break;case"undefined":case"null":t.value="";break}i.push('"'+String(t.value).split('"').join('""')+'"')}}));o.push(i.join(n));break}}));if(s.length){o.unshift(s.join(n))}o=o.join("\n");if(e.bom){o="\ufeff"+o}r(o,"text/csv")},json:function t(i,e,r){var n=[];i.forEach((function(t){var i={};switch(t.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":t.columns.forEach((function(t){if(t){i[t.component.getField()]=t.value}}));n.push(i);break}}));n=JSON.stringify(n,null,"\t");r(n,"application/json")},pdf:function t(i,e,r){var n=[],o=[],s={},a=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},u=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},l=e.jsPDF||{},f=e&&e.title?e.title:"";if(!l.orientation){l.orientation=e.orientation||"landscape"}if(!l.unit){l.unit="pt"}i.forEach((function(t){switch(t.type){case"header":n.push(h(t));break;case"group":o.push(h(t,a));break;case"calc":o.push(h(t,u));break;case"row":o.push(h(t));break}}));function h(t,i){var e=[];t.columns.forEach((function(t){var r;if(t){switch(T(t.value)){case"object":t.value=JSON.stringify(t.value);break;case"undefined":case"null":t.value="";break}r={content:t.value,colSpan:t.width,rowSpan:t.height};if(i){r.styles=i}e.push(r)}else{e.push("")}}));return e}var c=new jsPDF(l);if(e&&e.autoTable){if(typeof e.autoTable==="function"){s=e.autoTable(c)||{}}else{s=e.autoTable}}if(f){s.addPageContent=function(t){c.text(f,40,30)}}s.head=n;s.body=o;c.autoTable(s);if(e&&e.documentProcessing){e.documentProcessing(c)}r(c.output("arraybuffer"),"application/pdf")},xlsx:function t(i,e,r){var n=this,o=e.sheetName||"Sheet1",s=XLSX.utils.book_new(),a;s.SheetNames=[];s.Sheets={};function u(){var t=[],e=[],r={},n={s:{c:0,r:0},e:{c:i[0]?i[0].columns.reduce((function(t,i){return t+(i&&i.width?i.width:1)}),0):0,r:i.length}};i.forEach((function(i,r){var n=[];i.columns.forEach((function(t,i){if(t){n.push(!(t.value instanceof Date)&&T(t.value)==="object"?JSON.stringify(t.value):t.value);if(t.width>1||t.height>-1){e.push({s:{r,c:i},e:{r:r+t.height-1,c:i+t.width-1}})}}else{n.push("")}}));t.push(n)}));XLSX.utils.sheet_add_aoa(r,t);r["!ref"]=XLSX.utils.encode_range(n);if(e.length){r["!merges"]=e}return r}if(e.sheetOnly){r(u());return}if(e.sheets){for(var l in e.sheets){if(e.sheets[l]===true){s.SheetNames.push(l);s.Sheets[l]=u()}else{s.SheetNames.push(l);this.modules.comms.send(e.sheets[l],"download","intercept",{type:"xlsx",options:{sheetOnly:true},active:n.active,intercept:function t(i){s.Sheets[l]=i}})}}}else{s.SheetNames.push(o);s.Sheets[o]=u()}if(e.documentProcessing){s=e.documentProcessing(s)}function f(t){var i=new ArrayBuffer(t.length);var e=new Uint8Array(i);for(var r=0;r!=t.length;++r){e[r]=t.charCodeAt(r)&255}return i}a=XLSX.write(s,{bookType:"xlsx",bookSST:true,type:"binary"});r(f(a),"application/octet-stream")},html:function t(i,e,r){if(this.modExists("export",true)){r(this.modules.export.genereateHTMLTable(i),"text/html")}}};H.prototype.registerModule("download",G);var X=function t(i){this.table=i;this.currentCell=false;this.mouseClick=false;this.recursionBlock=false;this.invalidEdit=false;this.editedCells=[]};X.prototype.initializeColumn=function(t){var i=this,e={editor:false,blocked:false,check:t.definition.editable,params:t.definition.editorParams||{}};switch(T(t.definition.editor)){case"string":if(t.definition.editor==="tick"){t.definition.editor="tickCross";console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")}if(i.editors[t.definition.editor]){e.editor=i.editors[t.definition.editor]}else{console.warn("Editor Error - No such editor found: ",t.definition.editor)}break;case"function":e.editor=t.definition.editor;break;case"boolean":if(t.definition.editor===true){if(typeof t.definition.formatter!=="function"){if(t.definition.formatter==="tick"){t.definition.formatter="tickCross";console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")}if(i.editors[t.definition.formatter]){e.editor=i.editors[t.definition.formatter]}else{e.editor=i.editors["input"]}}else{console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",t.definition.formatter)}}break}if(e.editor){t.modules.edit=e}};X.prototype.getCurrentCell=function(){return this.currentCell?this.currentCell.getComponent():false};X.prototype.clearEditor=function(t){var i=this.currentCell,e;this.invalidEdit=false;if(i){this.currentCell=false;e=i.getElement();if(t){i.validate()}else{e.classList.remove("tabulator-validation-fail")}e.classList.remove("tabulator-editing");while(e.firstChild){e.removeChild(e.firstChild)}i.row.getElement().classList.remove("tabulator-row-editing")}};X.prototype.cancelEdit=function(){if(this.currentCell){var t=this.currentCell;var i=this.currentCell.getComponent();this.clearEditor(true);t.setValueActual(t.getValue());t.cellRendered();if(t.column.definition.editor=="textarea"||t.column.definition.variableHeight){t.row.normalizeHeight(true)}if(t.column.cellEvents.cellEditCancelled){t.column.cellEvents.cellEditCancelled.call(this.table,i)}this.table.options.cellEditCancelled.call(this.table,i)}};X.prototype.bindEditor=function(t){var i=this,e=t.getElement(true);e.setAttribute("tabindex",0);e.addEventListener("click",(function(t){if(!e.classList.contains("tabulator-editing")){e.focus({preventScroll:true})}}));e.addEventListener("mousedown",(function(t){if(t.button===2){t.preventDefault()}else{i.mouseClick=true}}));e.addEventListener("focus",(function(e){if(!i.recursionBlock){i.edit(t,e,false)}}))};X.prototype.focusCellNoEvent=function(t,i){this.recursionBlock=true;if(!(i&&this.table.browser==="ie")){t.getElement().focus({preventScroll:true})}this.recursionBlock=false};X.prototype.editCell=function(t,i){this.focusCellNoEvent(t);this.edit(t,false,i)};X.prototype.focusScrollAdjust=function(t){if(this.table.rowManager.getRenderMode()=="virtual"){var i=this.table.rowManager.element.scrollTop,e=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,r=t.row.getElement();if(r.offsetTop<i){this.table.rowManager.element.scrollTop-=i-r.offsetTop}else{if(r.offsetTop+r.offsetHeight>e){this.table.rowManager.element.scrollTop+=r.offsetTop+r.offsetHeight-e}}var n=this.table.rowManager.element.scrollLeft,o=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,s=t.getElement();if(this.table.modExists("frozenColumns")){n+=parseInt(this.table.modules.frozenColumns.leftMargin);o-=parseInt(this.table.modules.frozenColumns.rightMargin)}if(this.table.options.virtualDomHoz){n-=parseInt(this.table.vdomHoz.vDomPadLeft);o-=parseInt(this.table.vdomHoz.vDomPadLeft)}if(s.offsetLeft<n){this.table.rowManager.element.scrollLeft-=n-s.offsetLeft}else{if(s.offsetLeft+s.offsetWidth>o){this.table.rowManager.element.scrollLeft+=s.offsetLeft+s.offsetWidth-o}}}};X.prototype.edit=function(t,i,e){var r=this,n=true,o=function t(){},s=t.getElement(),a,u,l;if(this.currentCell){if(!this.invalidEdit){this.cancelEdit()}return}function f(i){if(r.currentCell===t){var e=true;if(t.column.modules.validate&&r.table.modExists("validate")&&r.table.options.validationMode!="manual"){e=r.table.modules.validate.validate(t.column.modules.validate,t,i)}if(e===true||r.table.options.validationMode==="highlight"){r.clearEditor();if(!t.modules.edit){t.modules.edit={}}t.modules.edit.edited=true;if(r.editedCells.indexOf(t)==-1){r.editedCells.push(t)}t.setValue(i,true);if(r.table.options.dataTree&&r.table.modExists("dataTree")){r.table.modules.dataTree.checkForRestyle(t)}if(e!==true){s.classList.add("tabulator-validation-fail");r.table.options.validationFailed.call(r.table,t.getComponent(),i,e);return false}return true}else{r.invalidEdit=true;s.classList.add("tabulator-validation-fail");r.focusCellNoEvent(t,true);o();r.table.options.validationFailed.call(r.table,t.getComponent(),i,e);return false}}}function h(){if(r.currentCell===t){r.cancelEdit();if(r.table.options.dataTree&&r.table.modExists("dataTree")){r.table.modules.dataTree.checkForRestyle(t)}}}function c(t){o=t}if(!t.column.modules.edit.blocked){if(i){i.stopPropagation()}switch(T(t.column.modules.edit.check)){case"function":n=t.column.modules.edit.check(t.getComponent());break;case"boolean":n=t.column.modules.edit.check;break}if(n||e){r.cancelEdit();r.currentCell=t;this.focusScrollAdjust(t);u=t.getComponent();if(this.mouseClick){this.mouseClick=false;if(t.column.cellEvents.cellClick){t.column.cellEvents.cellClick.call(this.table,i,u)}}if(t.column.cellEvents.cellEditing){t.column.cellEvents.cellEditing.call(this.table,u)}r.table.options.cellEditing.call(this.table,u);l=typeof t.column.modules.edit.params==="function"?t.column.modules.edit.params(u):t.column.modules.edit.params;a=t.column.modules.edit.editor.call(r,u,c,f,h,l);if(a!==false){if(a instanceof Node){s.classList.add("tabulator-editing");t.row.getElement().classList.add("tabulator-row-editing");while(s.firstChild){s.removeChild(s.firstChild)}s.appendChild(a);o();var d=s.children;for(var b=0;b<d.length;b++){d[b].addEventListener("click",(function(t){t.stopPropagation()}))}}else{console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",a);s.blur();return false}}else{s.blur();return false}return true}else{this.mouseClick=false;s.blur();return false}}else{this.mouseClick=false;s.blur();return false}};X.prototype.maskInput=function(t,i){var e=i.mask,r=typeof i.maskLetterChar!=="undefined"?i.maskLetterChar:"A",n=typeof i.maskNumberChar!=="undefined"?i.maskNumberChar:"9",o=typeof i.maskWildcardChar!=="undefined"?i.maskWildcardChar:"*";function s(i){var a=e[i];if(typeof a!=="undefined"&&a!==o&&a!==r&&a!==n){t.value=t.value+""+a;s(i+1)}}t.addEventListener("keydown",(function(i){var s=t.value.length,a=i.key;if(i.keyCode>46){if(s>=e.length){i.preventDefault();i.stopPropagation();return false}else{switch(e[s]){case r:if(a.toUpperCase()==a.toLowerCase()){i.preventDefault();i.stopPropagation();return false}break;case n:if(isNaN(a)){i.preventDefault();i.stopPropagation();return false}break;case o:break;default:if(a!==e[s]){i.preventDefault();i.stopPropagation();return false}}}}return}));t.addEventListener("keyup",(function(e){if(e.keyCode>46){if(i.maskAutoFill){s(t.value.length)}}}));if(!t.placeholder){t.placeholder=e}if(i.maskAutoFill){s(t.value.length)}};X.prototype.getEditedCells=function(){var t=[];this.editedCells.forEach((function(i){t.push(i.getComponent())}));return t};X.prototype.clearEdited=function(t){var i;if(t.modules.edit&&t.modules.edit.edited){t.modules.edit.edited=false;if(t.modules.validate){t.modules.validate.invalid=false}}i=this.editedCells.indexOf(t);if(i>-1){this.editedCells.splice(i,1)}};X.prototype.editors={input:function t(i,e,r,n,o){var s=i.getValue(),t=document.createElement("input");t.setAttribute("type",o.search?"search":"text");t.style.padding="4px";t.style.width="100%";t.style.boxSizing="border-box";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var a in o.elementAttributes){if(a.charAt(0)=="+"){a=a.slice(1);t.setAttribute(a,t.getAttribute(a)+o.elementAttributes["+"+a])}else{t.setAttribute(a,o.elementAttributes[a])}}}t.value=typeof s!=="undefined"?s:"";e((function(){t.focus({preventScroll:true});t.style.height="100%"}));function u(i){if((s===null||typeof s==="undefined")&&t.value!==""||t.value!==s){if(r(t.value)){s=t.value}}else{n()}}t.addEventListener("change",u);t.addEventListener("blur",u);t.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:u();break;case 27:n();break;case 35:case 36:t.stopPropagation();break}}));if(o.mask){this.table.modules.edit.maskInput(t,o)}return t},textarea:function t(i,e,r,n,o){var s=i.getValue(),a=o.verticalNavigation||"hybrid",u=String(s!==null&&typeof s!=="undefined"?s:"");(u.match(/(?:\r\n|\r|\n)/g)||[]).length+1;var l=document.createElement("textarea"),f=0;l.style.display="block";l.style.padding="2px";l.style.height="100%";l.style.width="100%";l.style.boxSizing="border-box";l.style.whiteSpace="pre-wrap";l.style.resize="none";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var h in o.elementAttributes){if(h.charAt(0)=="+"){h=h.slice(1);l.setAttribute(h,l.getAttribute(h)+o.elementAttributes["+"+h])}else{l.setAttribute(h,o.elementAttributes[h])}}}l.value=u;e((function(){l.focus({preventScroll:true});l.style.height="100%";l.style.height=l.scrollHeight+"px";i.getRow().normalizeHeight()}));function c(t){if((s===null||typeof s==="undefined")&&l.value!==""||l.value!==s){if(r(l.value)){s=l.value}setTimeout((function(){i.getRow().normalizeHeight()}),300)}else{n()}}l.addEventListener("change",c);l.addEventListener("blur",c);l.addEventListener("keyup",(function(){l.style.height="";var t=l.scrollHeight;l.style.height=t+"px";if(t!=f){f=t;i.getRow().normalizeHeight()}}));l.addEventListener("keydown",(function(t){switch(t.keyCode){case 27:n();break;case 38:if(a=="editor"||a=="hybrid"&&l.selectionStart){t.stopImmediatePropagation();t.stopPropagation()}break;case 40:if(a=="editor"||a=="hybrid"&&l.selectionStart!==l.value.length){t.stopImmediatePropagation();t.stopPropagation()}break;case 35:case 36:t.stopPropagation();break}}));if(o.mask){this.table.modules.edit.maskInput(l,o)}return l},number:function t(i,e,r,n,o){var s=i.getValue(),a=o.verticalNavigation||"editor",u=document.createElement("input");u.setAttribute("type","number");if(typeof o.max!="undefined"){u.setAttribute("max",o.max)}if(typeof o.min!="undefined"){u.setAttribute("min",o.min)}if(typeof o.step!="undefined"){u.setAttribute("step",o.step)}u.style.padding="4px";u.style.width="100%";u.style.boxSizing="border-box";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var l in o.elementAttributes){if(l.charAt(0)=="+"){l=l.slice(1);u.setAttribute(l,u.getAttribute(l)+o.elementAttributes["+"+l])}else{u.setAttribute(l,o.elementAttributes[l])}}}u.value=s;var f=function t(i){h()};e((function(){u.removeEventListener("blur",f);u.focus({preventScroll:true});u.style.height="100%";u.addEventListener("blur",f)}));function h(){var t=u.value;if(!isNaN(t)&&t!==""){t=Number(t)}if(t!==s){if(r(t)){s=t}}else{n()}}u.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:h();break;case 27:n();break;case 38:case 40:if(a=="editor"){t.stopImmediatePropagation();t.stopPropagation()}break;case 35:case 36:t.stopPropagation();break}}));if(o.mask){this.table.modules.edit.maskInput(u,o)}return u},range:function t(i,e,r,n,o){var s=i.getValue(),a=document.createElement("input");a.setAttribute("type","range");if(typeof o.max!="undefined"){a.setAttribute("max",o.max)}if(typeof o.min!="undefined"){a.setAttribute("min",o.min)}if(typeof o.step!="undefined"){a.setAttribute("step",o.step)}a.style.padding="4px";a.style.width="100%";a.style.boxSizing="border-box";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var u in o.elementAttributes){if(u.charAt(0)=="+"){u=u.slice(1);a.setAttribute(u,a.getAttribute(u)+o.elementAttributes["+"+u])}else{a.setAttribute(u,o.elementAttributes[u])}}}a.value=s;e((function(){a.focus({preventScroll:true});a.style.height="100%"}));function l(){var t=a.value;if(!isNaN(t)&&t!==""){t=Number(t)}if(t!=s){if(r(t)){s=t}}else{n()}}a.addEventListener("blur",(function(t){l()}));a.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:l();break;case 27:n();break}}));return a},select:function t(i,e,r,n,o){var s=this;var a=this,u=i.getElement(),l=i.getValue(),f=o.verticalNavigation||"editor",h=typeof l!=="undefined"||l===null?Array.isArray(l)?l:[l]:typeof o.defaultValue!=="undefined"?o.defaultValue:[],c=document.createElement("input"),d=document.createElement("div"),b=o.multiselect,p=[],v={},m=[],g=[],w=true,y=false,x="",k=null;if(Array.isArray(o)||!Array.isArray(o)&&(typeof o==="undefined"?"undefined":T(o))==="object"&&!o.values){console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object");o={values:o}}function C(t){var e={},r=a.table.getData(),n;if(t){n=a.table.columnManager.getColumnByField(t)}else{n=i.getColumn()._getSelf()}if(n){r.forEach((function(t){var i=n.getFieldValue(t);if(i!==null&&typeof i!=="undefined"&&i!==""){e[i]=true}}))}else{console.warn("unable to find matching column to create select lookup list:",t)}return Object.keys(e)}function E(t,e){var r=[];var n=[];function s(t){var t={label:t.label,value:t.value,itemParams:t.itemParams,elementAttributes:t.elementAttributes,element:false};if(e.indexOf(t.value)>-1){S(t)}r.push(t);n.push(t);return t}if(typeof t=="function"){t=t(i)}if(Array.isArray(t)){t.forEach((function(t){var i;if((typeof t==="undefined"?"undefined":T(t))==="object"){if(t.options){i={label:t.label,group:true,itemParams:t.itemParams,elementAttributes:t.elementAttributes,element:false};n.push(i);t.options.forEach((function(t){s(t)}))}else{s(t)}}else{i={label:t,value:t,element:false};if(e.indexOf(i.value)>-1){S(i)}r.push(i);n.push(i)}}))}else{for(var a in t){var u={label:t[a],value:a,element:false};if(e.indexOf(u.value)>-1){S(u)}r.push(u);n.push(u)}}if(o.sortValuesList){r.sort((function(t,i){return t.label<i.label?-1:t.label>i.label?1:0}));n.sort((function(t,i){return t.label<i.label?-1:t.label>i.label?1:0}));if(o.sortValuesList!=="asc"){r.reverse();n.reverse()}}p=r;m=n;j()}function j(){while(d.firstChild){d.removeChild(d.firstChild)}m.forEach((function(t){var e=t.element;if(!e){e=document.createElement("div");t.label=o.listItemFormatter?o.listItemFormatter(t.value,t.label,i,e,t.itemParams):t.label;if(t.group){e.classList.add("tabulator-edit-select-list-group");e.tabIndex=0;e.innerHTML=t.label===""?"&nbsp;":t.label}else{e.classList.add("tabulator-edit-select-list-item");e.tabIndex=0;e.innerHTML=t.label===""?"&nbsp;":t.label;e.addEventListener("click",(function(){y=true;setTimeout((function(){y=false}),10);if(b){N(t);c.focus()}else{M(t)}}));if(g.indexOf(t)>-1){e.classList.add("active")}}if(t.elementAttributes&&T(t.elementAttributes)=="object"){for(var r in t.elementAttributes){if(r.charAt(0)=="+"){r=r.slice(1);e.setAttribute(r,c.getAttribute(r)+t.elementAttributes["+"+r])}else{e.setAttribute(r,t.elementAttributes[r])}}}e.addEventListener("mousedown",(function(){w=false;setTimeout((function(){w=true}),10)}));t.element=e}d.appendChild(e)}))}function z(t,i){if(!b&&v&&v.element){v.element.classList.remove("active")}if(v&&v.element){v.element.classList.remove("focused")}v=t;if(t.element){t.element.classList.add("focused");if(i){t.element.classList.add("active")}}if(t&&t.element&&t.element.scrollIntoView){t.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}}function S(t){var i=g.indexOf(t);if(i==-1){g.push(t);z(t,true)}O()}function R(t){var i=g[t];if(t>-1){g.splice(t,1);if(i.element){i.element.classList.remove("active")}}}function N(t){if(!t){t=v}var i=g.indexOf(t);if(i>-1){R(i)}else{if(b!==true&&g.length>=b){R(0)}S(t)}O()}function M(t){L();if(!t){t=v}if(t){c.value=t.label;r(t.value)}h=[t.value]}function D(t){if(!t){L()}var i=[];g.forEach((function(t){i.push(t.value)}));h=i;r(i)}function O(){var t=[];g.forEach((function(i){t.push(i.label)}));c.value=t.join(", ");if(a.currentCell===false){D(true)}}function P(){var t=g.length;for(var i=0;i<t;i++){R(0)}}function F(){L();n()}function A(){g=[];if(!d.parentNode){if(o.values===true){E(C(),h)}else if(typeof o.values==="string"){E(C(o.values),h)}else{E(o.values||[],h)}var t=H.prototype.helpers.elOffset(u);d.style.minWidth=u.offsetWidth+"px";d.style.top=t.top+u.offsetHeight+"px";d.style.left=t.left+"px";d.addEventListener("mousedown",(function(t){w=false;setTimeout((function(){w=true}),10)}));document.body.appendChild(d)}}function L(){if(d.parentNode){d.parentNode.removeChild(d)}I()}function I(){a.table.rowManager.element.removeEventListener("scroll",F)}function _(t){clearTimeout(k);var i=String.fromCharCode(event.keyCode).toLowerCase();x+=i.toLowerCase();var e=p.find((function(t){return typeof t.label!=="undefined"&&t.label.toLowerCase().startsWith(x)}));if(e){z(e,!b)}k=setTimeout((function(){x=""}),800)}c.setAttribute("type","text");c.style.padding="4px";c.style.width="100%";c.style.boxSizing="border-box";c.style.cursor="default";c.readOnly=this.currentCell!=false;if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var U in o.elementAttributes){if(U.charAt(0)=="+"){U=U.slice(1);c.setAttribute(U,c.getAttribute(U)+o.elementAttributes["+"+U])}else{c.setAttribute(U,o.elementAttributes[U])}}}c.value=typeof l!=="undefined"||l===null?l:"";c.addEventListener("search",(function(t){if(!c.value){P();D()}}));c.addEventListener("keydown",(function(t){var i;switch(t.keyCode){case 38:i=p.indexOf(v);if(f=="editor"||f=="hybrid"&&i){t.stopImmediatePropagation();t.stopPropagation();t.preventDefault();if(i>0){z(p[i-1],!b)}}break;case 40:i=p.indexOf(v);if(f=="editor"||f=="hybrid"&&i<p.length-1){t.stopImmediatePropagation();t.stopPropagation();t.preventDefault();if(i<p.length-1){if(i==-1){z(p[0],!b)}else{z(p[i+1],!b)}}}break;case 37:case 39:t.stopImmediatePropagation();t.stopPropagation();t.preventDefault();break;case 13:if(b){N()}else{M()}break;case 27:F();break;case 9:break;default:if(a.currentCell===false){t.preventDefault()}if(t.keyCode>=38&&t.keyCode<=90){_()}}}));c.addEventListener("blur",(function(t){if(w){if(b){D()}else{F()}}}));c.addEventListener("focus",(function(t){if(!y){A()}}));d=document.createElement("div");d.classList.add("tabulator-edit-select-list");e((function(){c.style.height="100%";c.focus({preventScroll:true})}));setTimeout((function(){s.table.rowManager.element.addEventListener("scroll",F)}),10);return c},autocomplete:function t(i,e,r,n,o){var s=this;var a=this,u=i.getElement(),l=i.getValue(),f=o.verticalNavigation||"editor",h=typeof l!=="undefined"||l===null?l:typeof o.defaultValue!=="undefined"?o.defaultValue:"",c=document.createElement("input"),d=document.createElement("div"),b=[],p=false,v=true,m=false;c.setAttribute("type","search");c.style.padding="4px";c.style.width="100%";c.style.boxSizing="border-box";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var g in o.elementAttributes){if(g.charAt(0)=="+"){g=g.slice(1);c.setAttribute(g,c.getAttribute(g)+o.elementAttributes["+"+g])}else{c.setAttribute(g,o.elementAttributes[g])}}}d.classList.add("tabulator-edit-select-list");d.addEventListener("mousedown",(function(t){v=false;setTimeout((function(){v=true}),10)}));function w(){if(o.values===true){m=y()}else if(typeof o.values==="string"){m=y(o.values)}}function y(t){var e={},r=a.table.getData(),n;if(t){n=a.table.columnManager.getColumnByField(t)}else{n=i.getColumn()._getSelf()}if(n){r.forEach((function(t){var i=n.getFieldValue(t);if(i!==null&&typeof i!=="undefined"&&i!==""){e[i]=true}}));if(o.sortValuesList){if(o.sortValuesList=="asc"){e=Object.keys(e).sort()}else{e=Object.keys(e).sort().reverse()}}else{e=Object.keys(e)}}else{console.warn("unable to find matching column to create autocomplete lookup list:",t)}return e}function x(t,i){var e=[],r,n;if(m){r=m}else{r=o.values||[]}if(o.searchFunc){e=o.searchFunc(t,r);if(e instanceof Promise){k(typeof o.searchingPlaceholder!=="undefined"?o.searchingPlaceholder:"Searching...");e.then((function(t){j(C(t),i)})).catch((function(t){console.err("error in autocomplete search promise:",t)}))}else{j(C(e),i)}}else{n=C(r);if(t===""){if(o.showListOnEmpty){e=n}}else{n.forEach((function(i){if(i.value!==null||typeof i.value!=="undefined"){if(String(i.value).toLowerCase().indexOf(String(t).toLowerCase())>-1||String(i.title).toLowerCase().indexOf(String(t).toLowerCase())>-1){e.push(i)}}}))}j(e,i)}}function k(t){var i=document.createElement("div");E();if(t!==false){i.classList.add("tabulator-edit-select-list-notice");i.tabIndex=0;if(t instanceof Node){i.appendChild(t)}else{i.innerHTML=t}d.appendChild(i)}}function C(t){var i=[];if(Array.isArray(t)){t.forEach((function(t){var e={};if((typeof t==="undefined"?"undefined":T(t))==="object"){e.title=o.listItemFormatter?o.listItemFormatter(t.value,t.label):t.label;e.value=t.value}else{e.title=o.listItemFormatter?o.listItemFormatter(t,t):t;e.value=t}i.push(e)}))}else{for(var e in t){var r={title:o.listItemFormatter?o.listItemFormatter(e,t[e]):t[e],value:e};i.push(r)}}return i}function E(){while(d.firstChild){d.removeChild(d.firstChild)}}function j(t,i){if(t.length){z(t,i)}else{if(o.emptyPlaceholder){k(o.emptyPlaceholder)}}}function z(t,i){var e=false;E();b=t;b.forEach((function(t){var r=t.element;if(!r){r=document.createElement("div");r.classList.add("tabulator-edit-select-list-item");r.tabIndex=0;r.innerHTML=t.title;r.addEventListener("click",(function(i){N(t);S()}));r.addEventListener("mousedown",(function(t){v=false;setTimeout((function(){v=true}),10)}));t.element=r;if(i&&t.value==l){c.value=t.title;t.element.classList.add("active");e=true}if(t===p){t.element.classList.add("active");e=true}}d.appendChild(r)}));if(!e){N(false)}}function S(){M();if(p){if(l!==p.value){l=p.value;c.value=p.title;r(p.value)}else{n()}}else{if(o.freetext){l=c.value;r(c.value)}else{if(o.allowEmpty&&c.value===""){l=c.value;r(c.value)}else{n()}}}}function R(){if(!d.parentNode){console.log("show",h);while(d.firstChild){d.removeChild(d.firstChild)}var t=H.prototype.helpers.elOffset(u);d.style.minWidth=u.offsetWidth+"px";d.style.top=t.top+u.offsetHeight+"px";d.style.left=t.left+"px";document.body.appendChild(d)}}function N(t,i){if(p&&p.element){p.element.classList.remove("active")}p=t;if(t&&t.element){t.element.classList.add("active")}if(t&&t.element&&t.element.scrollIntoView){t.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}}function M(){if(d.parentNode){d.parentNode.removeChild(d)}O()}function D(){M();n()}function O(){a.table.rowManager.element.removeEventListener("scroll",D)}c.addEventListener("keydown",(function(t){var i;switch(t.keyCode){case 38:i=b.indexOf(p);if(f=="editor"||f=="hybrid"&&i){t.stopImmediatePropagation();t.stopPropagation();t.preventDefault();if(i>0){N(b[i-1])}else{N(false)}}break;case 40:i=b.indexOf(p);if(f=="editor"||f=="hybrid"&&i<b.length-1){t.stopImmediatePropagation();t.stopPropagation();t.preventDefault();if(i<b.length-1){if(i==-1){N(b[0])}else{N(b[i+1])}}}break;case 37:case 39:t.stopImmediatePropagation();t.stopPropagation();break;case 13:S();break;case 27:D();break;case 36:case 35:t.stopImmediatePropagation();break}}));c.addEventListener("keyup",(function(t){switch(t.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:x(c.value)}}));c.addEventListener("search",(function(t){x(c.value)}));c.addEventListener("blur",(function(t){if(v){S()}}));c.addEventListener("focus",(function(t){var i=h;w();R();c.value=i;x(i,true)}));e((function(){c.style.height="100%";c.focus({preventScroll:true})}));if(o.mask){this.table.modules.edit.maskInput(c,o)}setTimeout((function(){s.table.rowManager.element.addEventListener("scroll",D)}),10);w();c.value=h;x(h,true);return c},star:function t(i,e,r,n,o){var s=this,a=i.getElement(),u=i.getValue(),l=a.getElementsByTagName("svg").length||5,f=a.getElementsByTagName("svg")[0]?a.getElementsByTagName("svg")[0].getAttribute("width"):14,h=[],c=document.createElement("div"),t=document.createElementNS("http://www.w3.org/2000/svg","svg");function d(t){h.forEach((function(i,e){if(e<t){if(s.table.browser=="ie"){i.setAttribute("class","tabulator-star-active")}else{i.classList.replace("tabulator-star-inactive","tabulator-star-active")}i.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'}else{if(s.table.browser=="ie"){i.setAttribute("class","tabulator-star-inactive")}else{i.classList.replace("tabulator-star-active","tabulator-star-inactive")}i.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'}}))}function b(i){var e=document.createElement("span");var n=t.cloneNode(true);h.push(n);e.addEventListener("mouseenter",(function(t){t.stopPropagation();t.stopImmediatePropagation();d(i)}));e.addEventListener("mousemove",(function(t){t.stopPropagation();t.stopImmediatePropagation()}));e.addEventListener("click",(function(t){t.stopPropagation();t.stopImmediatePropagation();r(i);a.blur()}));e.appendChild(n);c.appendChild(e)}function p(t){u=t;d(t)}a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.textOverflow="ellipsis";c.style.verticalAlign="middle";c.style.display="inline-block";c.style.padding="4px";t.setAttribute("width",f);t.setAttribute("height",f);t.setAttribute("viewBox","0 0 512 512");t.setAttribute("xml:space","preserve");t.style.padding="0 1px";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var v in o.elementAttributes){if(v.charAt(0)=="+"){v=v.slice(1);c.setAttribute(v,c.getAttribute(v)+o.elementAttributes["+"+v])}else{c.setAttribute(v,o.elementAttributes[v])}}}for(var m=1;m<=l;m++){b(m)}u=Math.min(parseInt(u),l);d(u);c.addEventListener("mousemove",(function(t){d(0)}));c.addEventListener("click",(function(t){r(0)}));a.addEventListener("blur",(function(t){n()}));a.addEventListener("keydown",(function(t){switch(t.keyCode){case 39:p(u+1);break;case 37:p(u-1);break;case 13:r(u);break;case 27:n();break}}));return c},progress:function t(i,e,r,n,o){var s=i.getElement(),a=typeof o.max==="undefined"?s.getElementsByTagName("div")[0].getAttribute("max")||100:o.max,u=typeof o.min==="undefined"?s.getElementsByTagName("div")[0].getAttribute("min")||0:o.min,l=(a-u)/100,f=i.getValue()||0,h=document.createElement("div"),c=document.createElement("div"),d,b;function p(){var t=window.getComputedStyle(s,null);var i=l*Math.round(c.offsetWidth/((s.clientWidth-parseInt(t.getPropertyValue("padding-left"))-parseInt(t.getPropertyValue("padding-right")))/100))+u;r(i);s.setAttribute("aria-valuenow",i);s.setAttribute("aria-label",f)}h.style.position="absolute";h.style.right="0";h.style.top="0";h.style.bottom="0";h.style.width="5px";h.classList.add("tabulator-progress-handle");c.style.display="inline-block";c.style.position="relative";c.style.height="100%";c.style.backgroundColor="#488CE9";c.style.maxWidth="100%";c.style.minWidth="0%";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var v in o.elementAttributes){if(v.charAt(0)=="+"){v=v.slice(1);c.setAttribute(v,c.getAttribute(v)+o.elementAttributes["+"+v])}else{c.setAttribute(v,o.elementAttributes[v])}}}s.style.padding="4px 4px";f=Math.min(parseFloat(f),a);f=Math.max(parseFloat(f),u);f=Math.round((f-u)/l);c.style.width=f+"%";s.setAttribute("aria-valuemin",u);s.setAttribute("aria-valuemax",a);c.appendChild(h);h.addEventListener("mousedown",(function(t){d=t.screenX;b=c.offsetWidth}));h.addEventListener("mouseover",(function(){h.style.cursor="ew-resize"}));s.addEventListener("mousemove",(function(t){if(d){c.style.width=b+t.screenX-d+"px"}}));s.addEventListener("mouseup",(function(t){if(d){t.stopPropagation();t.stopImmediatePropagation();d=false;b=false;p()}}));s.addEventListener("keydown",(function(t){switch(t.keyCode){case 39:t.preventDefault();c.style.width=c.clientWidth+s.clientWidth/100+"px";break;case 37:t.preventDefault();c.style.width=c.clientWidth-s.clientWidth/100+"px";break;case 9:case 13:p();break;case 27:n();break}}));s.addEventListener("blur",(function(){n()}));return c},tickCross:function t(i,e,r,n,o){var s=i.getValue(),a=document.createElement("input"),u=o.tristate,l=typeof o.indeterminateValue==="undefined"?null:o.indeterminateValue,f=false;a.setAttribute("type","checkbox");a.style.marginTop="5px";a.style.boxSizing="border-box";if(o.elementAttributes&&T(o.elementAttributes)=="object"){for(var h in o.elementAttributes){if(h.charAt(0)=="+"){h=h.slice(1);a.setAttribute(h,a.getAttribute(h)+o.elementAttributes["+"+h])}else{a.setAttribute(h,o.elementAttributes[h])}}}a.value=s;if(u&&(typeof s==="undefined"||s===l||s==="")){f=true;a.indeterminate=true}if(this.table.browser!="firefox"){e((function(){a.focus({preventScroll:true})}))}a.checked=s===true||s==="true"||s==="True"||s===1;e((function(){a.focus()}));function c(t){if(u){if(!t){if(a.checked&&!f){a.checked=false;a.indeterminate=true;f=true;return l}else{f=false;return a.checked}}else{if(f){return l}else{return a.checked}}}else{return a.checked}}a.addEventListener("change",(function(t){r(c())}));a.addEventListener("blur",(function(t){r(c(true))}));a.addEventListener("keydown",(function(t){if(t.keyCode==13){r(c())}if(t.keyCode==27){n()}}));return a}};H.prototype.registerModule("edit",X);var $=function t(i,e,r,n){this.type=i;this.columns=e;this.component=r||false;this.indent=n||0};var Z=function t(i,e,r,n,o){this.value=i;this.component=e||false;this.width=r;this.height=n;this.depth=o};var K=function t(i){this.table=i;this.config={};this.cloneTableStyle=true;this.colVisProp=""};K.prototype.generateExportList=function(t,i,e,r){this.cloneTableStyle=i;this.config=t||{};this.colVisProp=r;var n=this.config.columnHeaders!==false?this.headersToExportRows(this.generateColumnGroupHeaders()):[];var o=this.bodyToExportRows(this.rowLookup(e));return n.concat(o)};K.prototype.genereateTable=function(t,i,e,r){var n=this.generateExportList(t,i,e,r);return this.genereateTableElement(n)};K.prototype.rowLookup=function(t){var i=this;var e=[];if(typeof t=="function"){t.call(this.table).forEach((function(t){t=i.table.rowManager.findRow(t);if(t){e.push(t)}}))}else{switch(t){case true:case"visible":e=this.table.rowManager.getVisibleRows(true);break;case"all":e=this.table.rowManager.rows;break;case"selected":e=this.table.modules.selectRow.selectedRows;break;case"active":default:if(this.table.options.pagination){e=this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2)}else{e=this.table.rowManager.getDisplayRows()}}}return Object.assign([],e)};K.prototype.generateColumnGroupHeaders=function(){var t=this;var i=[];var e=this.config.columnGroups!==false?this.table.columnManager.columns:this.table.columnManager.columnsByIndex;e.forEach((function(e){var r=t.processColumnGroup(e);if(r){i.push(r)}}));return i};K.prototype.processColumnGroup=function(t){var i=this;var e=t.columns,r=0,n=t.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||t.definition.title;var o={title:n,column:t,depth:1};if(e.length){o.subGroups=[];o.width=0;e.forEach((function(t){var e=i.processColumnGroup(t);if(e){o.width+=e.width;o.subGroups.push(e);if(e.depth>r){r=e.depth}}}));o.depth+=r;if(!o.width){return false}}else{if(this.columnVisCheck(t)){o.width=1}else{return false}}return o};K.prototype.columnVisCheck=function(t){return t.definition[this.colVisProp]!==false&&(t.visible||!t.visible&&t.definition[this.colVisProp])};K.prototype.headersToExportRows=function(t){var i=[],e=0,r=[];function n(t,r){var o=e-r;if(typeof i[r]==="undefined"){i[r]=[]}t.height=t.subGroups?1:o-t.depth+1;i[r].push(t);if(t.height>1){for(var s=1;s<t.height;s++){if(typeof i[r+s]==="undefined"){i[r+s]=[]}i[r+s].push(false)}}if(t.width>1){for(var a=1;a<t.width;a++){i[r].push(false)}}if(t.subGroups){t.subGroups.forEach((function(t){n(t,r+1)}))}}t.forEach((function(t){if(t.depth>e){e=t.depth}}));t.forEach((function(t){n(t,0)}));i.forEach((function(t){var i=[];t.forEach((function(t){if(t){i.push(new Z(t.title,t.column.getComponent(),t.width,t.height,t.depth))}else{i.push(null)}}));r.push(new $("header",i))}));return r};K.prototype.bodyToExportRows=function(t){var i=this;var e=[];var r=[];this.table.columnManager.columnsByIndex.forEach((function(t){if(i.columnVisCheck(t)){e.push(t.getComponent())}}));if(this.config.columnCalcs!==false&&this.table.modExists("columnCalcs")){if(this.table.modules.columnCalcs.topInitialized){t.unshift(this.table.modules.columnCalcs.topRow)}if(this.table.modules.columnCalcs.botInitialized){t.push(this.table.modules.columnCalcs.botRow)}}t=t.filter((function(t){switch(t.type){case"group":return i.config.rowGroups!==false;case"calc":return i.config.columnCalcs!==false;case"row":return!(i.table.options.dataTree&&i.config.dataTree===false&&t.modules.dataTree.parent)}return true}));t.forEach((function(t,n){var o=t.getData(i.colVisProp);var s=[];var a=0;switch(t.type){case"group":a=t.level;s.push(new Z(t.key,t.getComponent(),e.length,1));break;case"calc":case"row":e.forEach((function(t){s.push(new Z(t._column.getFieldValue(o),t,1,1))}));if(i.table.options.dataTree&&i.config.dataTree!==false){a=t.modules.dataTree.index}break}r.push(new $(t.type,s,t.getComponent(),a))}));return r};K.prototype.genereateTableElement=function(t){var i=this;var e=document.createElement("table"),r=document.createElement("thead"),n=document.createElement("tbody"),o=this.lookupTableStyles(),s=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],a={};a.rowFormatter=s!==null?s:this.table.options.rowFormatter;if(this.table.options.dataTree&&this.config.dataTree!==false&&this.table.modExists("columnCalcs")){a.treeElementField=this.table.modules.dataTree.elementField}a.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))];if(a.groupHeader&&!Array.isArray(a.groupHeader)){a.groupHeader=[a.groupHeader]}e.classList.add("tabulator-print-table");this.mapElementStyles(this.table.columnManager.getHeadersElement(),r,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]);if(t.length>1e3){console.warn("It may take a long time to render an HTML table with more than 1000 rows")}t.forEach((function(t,e){switch(t.type){case"header":r.appendChild(i.genereateHeaderElement(t,a,o));break;case"group":n.appendChild(i.genereateGroupElement(t,a,o));break;case"calc":n.appendChild(i.genereateCalcElement(t,a,o));break;case"row":var s=i.genereateRowElement(t,a,o);i.mapElementStyles(e%2&&o.evenRow?o.evenRow:o.oddRow,s,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]);n.appendChild(s);break}}));if(r.innerHTML){e.appendChild(r)}e.appendChild(n);this.mapElementStyles(this.table.element,e,["border-top","border-left","border-right","border-bottom"]);return e};K.prototype.lookupTableStyles=function(){var t={};if(this.cloneTableStyle&&window.getComputedStyle){t.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)");t.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)");t.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs");t.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)");t.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0];if(t.firstRow){t.styleCells=t.firstRow.getElementsByClassName("tabulator-cell");t.firstCell=t.styleCells[0];t.lastCell=t.styleCells[t.styleCells.length-1]}}return t};K.prototype.genereateHeaderElement=function(t,i,e){var r=this;var n=document.createElement("tr");t.columns.forEach((function(t){if(t){var i=document.createElement("th");var e=t.component._column.definition.cssClass?t.component._column.definition.cssClass.split(" "):[];i.colSpan=t.width;i.rowSpan=t.height;i.innerHTML=t.value;if(r.cloneTableStyle){i.style.boxSizing="border-box"}e.forEach((function(t){i.classList.add(t)}));r.mapElementStyles(t.component.getElement(),i,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]);r.mapElementStyles(t.component._column.contentElement,i,["padding-top","padding-left","padding-right","padding-bottom"]);if(t.component._column.visible){r.mapElementStyles(t.component.getElement(),i,["width"])}else{if(t.component._column.definition.width){i.style.width=t.component._column.definition.width+"px"}}if(t.component._column.parent){r.mapElementStyles(t.component._column.parent.groupElement,i,["border-top"])}n.appendChild(i)}}));return n};K.prototype.genereateGroupElement=function(t,i,e){var r=document.createElement("tr"),n=document.createElement("td"),o=t.columns[0];r.classList.add("tabulator-print-table-row");if(i.groupHeader&&i.groupHeader[t.indent]){o.value=i.groupHeader[t.indent](o.value,t.component._group.getRowCount(),t.component._group.getData(),t.component)}else{if(i.groupHeader===false){o.value=o.value}else{o.value=t.component._group.generator(o.value,t.component._group.getRowCount(),t.component._group.getData(),t.component)}}n.colSpan=o.width;n.innerHTML=o.value;r.classList.add("tabulator-print-table-group");r.classList.add("tabulator-group-level-"+t.indent);if(o.component.isVisible()){r.classList.add("tabulator-group-visible")}this.mapElementStyles(e.firstGroup,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]);this.mapElementStyles(e.firstGroup,n,["padding-top","padding-left","padding-right","padding-bottom"]);r.appendChild(n);return r};K.prototype.genereateCalcElement=function(t,i,e){var r=this.genereateRowElement(t,i,e);r.classList.add("tabulator-print-table-calcs");this.mapElementStyles(e.calcRow,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]);return r};K.prototype.genereateRowElement=function(t,e,r){var n=this;var o=document.createElement("tr");o.classList.add("tabulator-print-table-row");t.columns.forEach((function(s){if(s){var a=document.createElement("td"),u=s.component._column,l=s.value;var f={modules:{},getValue:function t(){return l},getField:function t(){return u.definition.field},getElement:function t(){return a},getColumn:function t(){return u.getComponent()},getData:function i(){return t.component.getData()},getRow:function i(){return t.component},getComponent:function t(){return f},column:u};var h=u.definition.cssClass?u.definition.cssClass.split(" "):[];h.forEach((function(t){a.classList.add(t)}));if(n.table.modExists("format")&&n.config.formatCells!==false){l=n.table.modules.format.formatExportValue(f,n.colVisProp)}else{switch(typeof l==="undefined"?"undefined":T(l)){case"object":l=JSON.stringify(l);break;case"undefined":case"null":l="";break;default:l=l}}if(l instanceof Node){a.appendChild(l)}else{a.innerHTML=l}if(r.firstCell){n.mapElementStyles(r.firstCell,a,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]);if(u.definition.align){a.style.textAlign=u.definition.align}}if(n.table.options.dataTree&&n.config.dataTree!==false){if(e.treeElementField&&e.treeElementField==u.field||!e.treeElementField&&i==0){if(t.component._row.modules.dataTree.controlEl){a.insertBefore(t.component._row.modules.dataTree.controlEl.cloneNode(true),a.firstChild)}if(t.component._row.modules.dataTree.branchEl){a.insertBefore(t.component._row.modules.dataTree.branchEl.cloneNode(true),a.firstChild)}}}o.appendChild(a);if(f.modules.format&&f.modules.format.renderedCallback){f.modules.format.renderedCallback()}if(e.rowFormatter&&n.config.formatCells!==false){e.rowFormatter(t.component)}}}));return o};K.prototype.genereateHTMLTable=function(t){var i=document.createElement("div");i.appendChild(this.genereateTableElement(t));return i.innerHTML};K.prototype.getHtml=function(t,i,e,r){var n=this.generateExportList(e||this.table.options.htmlOutputConfig,i,t,r||"htmlOutput");return this.genereateHTMLTable(n)};K.prototype.mapElementStyles=function(t,i,e){if(this.cloneTableStyle&&t&&i){var r={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(t);e.forEach((function(t){i.style[r[t]]=n.getPropertyValue(t)}))}}};H.prototype.registerModule("export",K);var Q=function t(i){this.table=i;this.filterList=[];this.headerFilters={};this.headerFilterColumns=[];this.prevHeaderFilterChangeCheck="";this.prevHeaderFilterChangeCheck="{}";this.changed=false};Q.prototype.initializeColumn=function(t,i){var e=this,r=t.getField();function n(i){var n=t.modules.filter.tagType=="input"&&t.modules.filter.attrType=="text"||t.modules.filter.tagType=="textarea"?"partial":"match",o="",s="",a;if(typeof t.modules.filter.prevSuccess==="undefined"||t.modules.filter.prevSuccess!==i){t.modules.filter.prevSuccess=i;if(!t.modules.filter.emptyFunc(i)){t.modules.filter.value=i;switch(T(t.definition.headerFilterFunc)){case"string":if(e.filters[t.definition.headerFilterFunc]){o=t.definition.headerFilterFunc;a=function r(n){var o=t.definition.headerFilterFuncParams||{};var s=t.getFieldValue(n);o=typeof o==="function"?o(i,s,n):o;return e.filters[t.definition.headerFilterFunc](i,s,n,o)}}else{console.warn("Header Filter Error - Matching filter function not found: ",t.definition.headerFilterFunc)}break;case"function":a=function e(r){var n=t.definition.headerFilterFuncParams||{};var o=t.getFieldValue(r);n=typeof n==="function"?n(i,o,r):n;return t.definition.headerFilterFunc(i,o,r,n)};o=a;break}if(!a){switch(n){case"partial":a=function e(r){var n=t.getFieldValue(r);if(typeof n!=="undefined"&&n!==null){return String(n).toLowerCase().indexOf(String(i).toLowerCase())>-1}else{return false}};o="like";break;default:a=function e(r){return t.getFieldValue(r)==i};o="="}}e.headerFilters[r]={value:i,func:a,type:o,params:{}}}else{delete e.headerFilters[r]}s=JSON.stringify(e.headerFilters);if(e.prevHeaderFilterChangeCheck!==s){e.prevHeaderFilterChangeCheck=s;e.changed=true;e.table.rowManager.filterRefresh()}}return true}t.modules.filter={success:n,attrType:false,tagType:false,emptyFunc:false};this.generateHeaderFilterElement(t)};Q.prototype.generateHeaderFilterElement=function(t,i,e){var r=this;var n=this,o=t.modules.filter.success,s=t.getField(),a,u,l,f,h,c,d;function b(){}if(t.modules.filter.headerElement&&t.modules.filter.headerElement.parentNode){t.contentElement.removeChild(t.modules.filter.headerElement.parentNode)}if(s){t.modules.filter.emptyFunc=t.definition.headerFilterEmptyCheck||function(t){return!t&&t!=="0"&&t!==0};a=document.createElement("div");a.classList.add("tabulator-header-filter");switch(T(t.definition.headerFilter)){case"string":if(n.table.modules.edit.editors[t.definition.headerFilter]){u=n.table.modules.edit.editors[t.definition.headerFilter];if((t.definition.headerFilter==="tick"||t.definition.headerFilter==="tickCross")&&!t.definition.headerFilterEmptyCheck){t.modules.filter.emptyFunc=function(t){return t!==true&&t!==false}}}else{console.warn("Filter Error - Cannot build header filter, No such editor found: ",t.definition.editor)}break;case"function":u=t.definition.headerFilter;break;case"boolean":if(t.modules.edit&&t.modules.edit.editor){u=t.modules.edit.editor}else{if(t.definition.formatter&&n.table.modules.edit.editors[t.definition.formatter]){u=n.table.modules.edit.editors[t.definition.formatter];if((t.definition.formatter==="tick"||t.definition.formatter==="tickCross")&&!t.definition.headerFilterEmptyCheck){t.modules.filter.emptyFunc=function(t){return t!==true&&t!==false}}}else{u=n.table.modules.edit.editors["input"]}}break}if(u){f={getValue:function t(){return typeof i!=="undefined"?i:""},getField:function i(){return t.definition.field},getElement:function t(){return a},getColumn:function i(){return t.getComponent()},getRow:function t(){return{normalizeHeight:function t(){}}}};d=t.definition.headerFilterParams||{};d=typeof d==="function"?d.call(n.table):d;l=u.call(this.table.modules.edit,f,(function(){}),o,b,d);if(!l){console.warn("Filter Error - Cannot add filter to "+s+" column, editor returned a value of false");return}if(!(l instanceof Node)){console.warn("Filter Error - Cannot add filter to "+s+" column, editor should return an instance of Node, the editor returned:",l);return}if(s){n.table.modules.localize.bind("headerFilters|columns|"+t.definition.field,(function(t){l.setAttribute("placeholder",typeof t!=="undefined"&&t?t:n.table.modules.localize.getText("headerFilters|default"))}))}else{n.table.modules.localize.bind("headerFilters|default",(function(t){l.setAttribute("placeholder",typeof n.column.definition.headerFilterPlaceholder!=="undefined"&&n.column.definition.headerFilterPlaceholder?n.column.definition.headerFilterPlaceholder:t)}))}l.addEventListener("click",(function(t){t.stopPropagation();l.focus()}));l.addEventListener("focus",(function(t){var i=r.table.columnManager.element.scrollLeft;if(i!==r.table.rowManager.element.scrollLeft){r.table.rowManager.scrollHorizontal(i);r.table.columnManager.scrollHorizontal(i)}}));h=false;c=function t(i){if(h){clearTimeout(h)}h=setTimeout((function(){o(l.value)}),n.table.options.headerFilterLiveFilterDelay)};t.modules.filter.headerElement=l;t.modules.filter.attrType=l.hasAttribute("type")?l.getAttribute("type").toLowerCase():"";t.modules.filter.tagType=l.tagName.toLowerCase();if(t.definition.headerFilterLiveFilter!==false){if(!(t.definition.headerFilter==="autocomplete"||t.definition.headerFilter==="tickCross"||(t.definition.editor==="autocomplete"||t.definition.editor==="tickCross")&&t.definition.headerFilter===true)){l.addEventListener("keyup",c);l.addEventListener("search",c);if(t.modules.filter.attrType=="number"){l.addEventListener("change",(function(t){o(l.value)}))}if(t.modules.filter.attrType=="text"&&this.table.browser!=="ie"){l.setAttribute("type","search")}}if(t.modules.filter.tagType=="input"||t.modules.filter.tagType=="select"||t.modules.filter.tagType=="textarea"){l.addEventListener("mousedown",(function(t){t.stopPropagation()}))}}a.appendChild(l);t.contentElement.appendChild(a);if(!e){n.headerFilterColumns.push(t)}}}else{console.warn("Filter Error - Cannot add header filter, column has no field set:",t.definition.title)}};Q.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach((function(t){if(t.modules.filter&&t.modules.filter.headerElement){t.modules.filter.headerElement.style.display="none"}}))};Q.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach((function(t){if(t.modules.filter&&t.modules.filter.headerElement){t.modules.filter.headerElement.style.display=""}}))};Q.prototype.setHeaderFilterFocus=function(t){if(t.modules.filter&&t.modules.filter.headerElement){t.modules.filter.headerElement.focus()}else{console.warn("Column Filter Focus Error - No header filter set on column:",t.getField())}};Q.prototype.getHeaderFilterValue=function(t){if(t.modules.filter&&t.modules.filter.headerElement){return t.modules.filter.headerElement.value}else{console.warn("Column Filter Error - No header filter set on column:",t.getField())}};Q.prototype.setHeaderFilterValue=function(t,i){if(t){if(t.modules.filter&&t.modules.filter.headerElement){this.generateHeaderFilterElement(t,i,true);t.modules.filter.success(i)}else{console.warn("Column Filter Error - No header filter set on column:",t.getField())}}};Q.prototype.reloadHeaderFilter=function(t){if(t){if(t.modules.filter&&t.modules.filter.headerElement){this.generateHeaderFilterElement(t,t.modules.filter.value,true)}else{console.warn("Column Filter Error - No header filter set on column:",t.getField())}}};Q.prototype.hasChanged=function(){var t=this.changed;this.changed=false;return t};Q.prototype.setFilter=function(t,i,e,r){var n=this;n.filterList=[];if(!Array.isArray(t)){t=[{field:t,type:i,value:e,params:r}]}n.addFilter(t)};Q.prototype.addFilter=function(t,i,e,r){var n=this;if(!Array.isArray(t)){t=[{field:t,type:i,value:e,params:r}]}t.forEach((function(t){t=n.findFilter(t);if(t){n.filterList.push(t);n.changed=true}}));if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.filter){this.table.modules.persistence.save("filter")}};Q.prototype.findFilter=function(t){var i=this,e;if(Array.isArray(t)){return this.findSubFilters(t)}var r=false;if(typeof t.field=="function"){r=function i(e){return t.field(e,t.type||{})}}else{if(i.filters[t.type]){e=i.table.columnManager.getColumnByField(t.field);if(e){r=function r(n){return i.filters[t.type](t.value,e.getFieldValue(n),n,t.params||{})}}else{r=function e(r){return i.filters[t.type](t.value,r[t.field],r,t.params||{})}}}else{console.warn("Filter Error - No such filter type found, ignoring: ",t.type)}}t.func=r;return t.func?t:false};Q.prototype.findSubFilters=function(t){var i=this,e=[];t.forEach((function(t){t=i.findFilter(t);if(t){e.push(t)}}));return e.length?e:false};Q.prototype.getFilters=function(t,i){var e=[];if(t){e=this.getHeaderFilters()}if(i){e.forEach((function(t){if(typeof t.type=="function"){t.type="function"}}))}e=e.concat(this.filtersToArray(this.filterList,i));return e};Q.prototype.filtersToArray=function(t,i){var e=this;var r=[];t.forEach((function(t){var n;if(Array.isArray(t)){r.push(e.filtersToArray(t,i))}else{n={field:t.field,type:t.type,value:t.value};if(i){if(typeof n.type=="function"){n.type="function"}}r.push(n)}}));return r};Q.prototype.getHeaderFilters=function(){var t=[];for(var i in this.headerFilters){t.push({field:i,type:this.headerFilters[i].type,value:this.headerFilters[i].value})}return t};Q.prototype.removeFilter=function(t,i,e){var r=this;if(!Array.isArray(t)){t=[{field:t,type:i,value:e}]}t.forEach((function(t){var i=-1;if(T(t.field)=="object"){i=r.filterList.findIndex((function(i){return t===i}))}else{i=r.filterList.findIndex((function(i){return t.field===i.field&&t.type===i.type&&t.value===i.value}))}if(i>-1){r.filterList.splice(i,1);r.changed=true}else{console.warn("Filter Error - No matching filter type found, ignoring: ",t.type)}}));if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.filter){this.table.modules.persistence.save("filter")}};Q.prototype.clearFilter=function(t){this.filterList=[];if(t){this.clearHeaderFilter()}this.changed=true;if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.filter){this.table.modules.persistence.save("filter")}};Q.prototype.clearHeaderFilter=function(){var t=this;this.headerFilters={};t.prevHeaderFilterChangeCheck="{}";this.headerFilterColumns.forEach((function(i){if(typeof i.modules.filter.value!=="undefined"){delete i.modules.filter.value}i.modules.filter.prevSuccess=undefined;t.reloadHeaderFilter(i)}));this.changed=true};Q.prototype.search=function(t,i,e,r){var n=this,o=[],s=[];if(!Array.isArray(i)){i=[{field:i,type:e,value:r}]}i.forEach((function(t){t=n.findFilter(t);if(t){s.push(t)}}));this.table.rowManager.rows.forEach((function(i){var e=true;s.forEach((function(t){if(!n.filterRecurse(t,i.getData())){e=false}}));if(e){o.push(t==="data"?i.getData("data"):i.getComponent())}}));return o};Q.prototype.filter=function(t,i){var e=this,r=[],n=[];if(e.table.options.dataFiltering){e.table.options.dataFiltering.call(e.table,e.getFilters())}if(!e.table.options.ajaxFiltering&&(e.filterList.length||Object.keys(e.headerFilters).length)){t.forEach((function(t){if(e.filterRow(t)){r.push(t)}}))}else{r=t.slice(0)}if(e.table.options.dataFiltered){r.forEach((function(t){n.push(t.getComponent())}));e.table.options.dataFiltered.call(e.table,e.getFilters(),n)}return r};Q.prototype.filterRow=function(t,i){var e=this,r=true,n=t.getData();e.filterList.forEach((function(t){if(!e.filterRecurse(t,n)){r=false}}));for(var o in e.headerFilters){if(!e.headerFilters[o].func(n)){r=false}}return r};Q.prototype.filterRecurse=function(t,i){var e=this,r=false;if(Array.isArray(t)){t.forEach((function(t){if(e.filterRecurse(t,i)){r=true}}))}else{r=t.func(i)}return r};Q.prototype.filters={"=":function t(i,e,r,n){return e==i?true:false},"<":function t(i,e,r,n){return e<i?true:false},"<=":function t(i,e,r,n){return e<=i?true:false},">":function t(i,e,r,n){return e>i?true:false},">=":function t(i,e,r,n){return e>=i?true:false},"!=":function t(i,e,r,n){return e!=i?true:false},regex:function t(i,e,r,n){if(typeof i=="string"){i=new RegExp(i)}return i.test(e)},like:function t(i,e,r,n){if(i===null||typeof i==="undefined"){return e===i?true:false}else{if(typeof e!=="undefined"&&e!==null){return String(e).toLowerCase().indexOf(i.toLowerCase())>-1}else{return false}}},keywords:function t(i,e,r,n){var t=i.toLowerCase().split(typeof n.separator==="undefined"?" ":n.separator),o=String(e===null||typeof e==="undefined"?"":e).toLowerCase(),s=[];t.forEach((function(t){if(o.includes(t)){s.push(true)}}));return n.matchAll?s.length===t.length:!!s.length},starts:function t(i,e,r,n){if(i===null||typeof i==="undefined"){return e===i?true:false}else{if(typeof e!=="undefined"&&e!==null){return String(e).toLowerCase().startsWith(i.toLowerCase())}else{return false}}},ends:function t(i,e,r,n){if(i===null||typeof i==="undefined"){return e===i?true:false}else{if(typeof e!=="undefined"&&e!==null){return String(e).toLowerCase().endsWith(i.toLowerCase())}else{return false}}},in:function t(i,e,r,n){if(Array.isArray(i)){return i.length?i.indexOf(e)>-1:true}else{console.warn("Filter Error - filter value is not an array:",i);return false}}};H.prototype.registerModule("filter",Q);var tt=function t(i){this.table=i};tt.prototype.initializeColumn=function(t){t.modules.format=this.lookupFormatter(t,"");if(typeof t.definition.formatterPrint!=="undefined"){t.modules.format.print=this.lookupFormatter(t,"Print")}if(typeof t.definition.formatterClipboard!=="undefined"){t.modules.format.clipboard=this.lookupFormatter(t,"Clipboard")}if(typeof t.definition.formatterHtmlOutput!=="undefined"){t.modules.format.htmlOutput=this.lookupFormatter(t,"HtmlOutput")}};tt.prototype.lookupFormatter=function(t,i){var e={params:t.definition["formatter"+i+"Params"]||{}},r=t.definition["formatter"+i];switch(typeof r==="undefined"?"undefined":T(r)){case"string":if(r==="tick"){r="tickCross";if(typeof e.params.crossElement=="undefined"){e.params.crossElement=false}console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")}if(this.formatters[r]){e.formatter=this.formatters[r]}else{console.warn("Formatter Error - No such formatter found: ",r);e.formatter=this.formatters.plaintext}break;case"function":e.formatter=r;break;default:e.formatter=this.formatters.plaintext;break}return e};tt.prototype.cellRendered=function(t){if(t.modules.format&&t.modules.format.renderedCallback&&!t.modules.format.rendered){t.modules.format.renderedCallback();t.modules.format.rendered=true}};tt.prototype.formatValue=function(t){var i=t.getComponent(),e=typeof t.column.modules.format.params==="function"?t.column.modules.format.params(i):t.column.modules.format.params;function r(i){if(!t.modules.format){t.modules.format={}}t.modules.format.renderedCallback=i;t.modules.format.rendered=false}return t.column.modules.format.formatter.call(this,i,e,r)};tt.prototype.formatExportValue=function(t,i){var e=t.column.modules.format[i],r;if(e){var n=function i(e){if(!t.modules.format){t.modules.format={}}t.modules.format.renderedCallback=e;t.modules.format.rendered=false};r=typeof e.params==="function"?e.params(component):e.params;return e.formatter.call(this,t.getComponent(),r,n)}else{return this.formatValue(t)}};tt.prototype.sanitizeHTML=function(t){if(t){var i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(t).replace(/[&<>"'`=\/]/g,(function(t){return i[t]}))}else{return t}};tt.prototype.emptyToSpace=function(t){return t===null||typeof t==="undefined"||t===""?"&nbsp;":t};tt.prototype.getFormatter=function(t){var t;switch(typeof t==="undefined"?"undefined":T(t)){case"string":if(this.formatters[t]){t=this.formatters[t]}else{console.warn("Formatter Error - No such formatter found: ",t);t=this.formatters.plaintext}break;case"function":t=t;break;default:t=this.formatters.plaintext;break}return t};tt.prototype.formatters={plaintext:function t(i,e,r){return this.emptyToSpace(this.sanitizeHTML(i.getValue()))},html:function t(i,e,r){return i.getValue()},textarea:function t(i,e,r){i.getElement().style.whiteSpace="pre-wrap";return this.emptyToSpace(this.sanitizeHTML(i.getValue()))},money:function t(i,e,r){var n=parseFloat(i.getValue()),o,s,a,u;var l=e.decimal||".";var f=e.thousand||",";var h=e.symbol||"";var c=!!e.symbolAfter;var d=typeof e.precision!=="undefined"?e.precision:2;if(isNaN(n)){return this.emptyToSpace(this.sanitizeHTML(i.getValue()))}o=d!==false?n.toFixed(d):n;o=String(o).split(".");s=o[0];a=o.length>1?l+o[1]:"";u=/(\d+)(\d{3})/;while(u.test(s)){s=s.replace(u,"$1"+f+"$2")}return c?s+a+h:h+s+a},link:function t(i,e,r){var n=i.getValue(),o=e.urlPrefix||"",s=e.download,a=n,u=document.createElement("a"),l;if(e.labelField){l=i.getData();a=l[e.labelField]}if(e.label){switch(T(e.label)){case"string":a=e.label;break;case"function":a=e.label(i);break}}if(a){if(e.urlField){l=i.getData();n=l[e.urlField]}if(e.url){switch(T(e.url)){case"string":n=e.url;break;case"function":n=e.url(i);break}}u.setAttribute("href",o+n);if(e.target){u.setAttribute("target",e.target)}if(e.download){if(typeof s=="function"){s=s(i)}else{s=s===true?"":s}u.setAttribute("download",s)}u.innerHTML=this.emptyToSpace(this.sanitizeHTML(a));return u}else{return"&nbsp;"}},image:function t(i,e,r){var n=document.createElement("img"),o=i.getValue();if(e.urlPrefix){o=e.urlPrefix+i.getValue()}if(e.urlSuffix){o=o+e.urlSuffix}n.setAttribute("src",o);switch(T(e.height)){case"number":n.style.height=e.height+"px";break;case"string":n.style.height=e.height;break}switch(T(e.width)){case"number":n.style.width=e.width+"px";break;case"string":n.style.width=e.width;break}n.addEventListener("load",(function(){i.getRow().normalizeHeight()}));return n},tickCross:function t(i,e,r){var n=i.getValue(),o=i.getElement(),s=e.allowEmpty,a=e.allowTruthy,u=typeof e.tickElement!=="undefined"?e.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',l=typeof e.crossElement!=="undefined"?e.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';if(a&&n||n===true||n==="true"||n==="True"||n===1||n==="1"){o.setAttribute("aria-checked",true);return u||""}else{if(s&&(n==="null"||n===""||n===null||typeof n==="undefined")){o.setAttribute("aria-checked","mixed");return""}else{o.setAttribute("aria-checked",false);return l||""}}},datetime:function t(i,e,r){var n=e.inputFormat||"YYYY-MM-DD hh:mm:ss";var o=e.outputFormat||"DD/MM/YYYY hh:mm:ss";var s=typeof e.invalidPlaceholder!=="undefined"?e.invalidPlaceholder:"";var a=i.getValue();var u=moment(a,n);if(u.isValid()){return e.timezone?u.tz(e.timezone).format(o):u.format(o)}else{if(s===true){return a}else if(typeof s==="function"){return s(a)}else{return s}}},datetimediff:function t(i,e,r){var n=e.inputFormat||"YYYY-MM-DD hh:mm:ss";var o=typeof e.invalidPlaceholder!=="undefined"?e.invalidPlaceholder:"";var s=typeof e.suffix!=="undefined"?e.suffix:false;var a=typeof e.unit!=="undefined"?e.unit:undefined;var u=typeof e.humanize!=="undefined"?e.humanize:false;var l=typeof e.date!=="undefined"?e.date:moment();var f=i.getValue();var h=moment(f,n);if(h.isValid()){if(u){return moment.duration(h.diff(l)).humanize(s)}else{return h.diff(l,a)+(s?" "+s:"")}}else{if(o===true){return f}else if(typeof o==="function"){return o(f)}else{return o}}},lookup:function t(i,e,r){var n=i.getValue();if(typeof e[n]==="undefined"){console.warn("Missing display value for "+n);return n}return e[n]},star:function t(i,e,r){var n=i.getValue(),o=i.getElement(),s=e&&e.stars?e.stars:5,a=document.createElement("span"),t=document.createElementNS("http://www.w3.org/2000/svg","svg"),u='<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',l='<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>';a.style.verticalAlign="middle";t.setAttribute("width","14");t.setAttribute("height","14");t.setAttribute("viewBox","0 0 512 512");t.setAttribute("xml:space","preserve");t.style.padding="0 1px";n=n&&!isNaN(n)?parseInt(n):0;n=Math.max(0,Math.min(n,s));for(var f=1;f<=s;f++){var h=t.cloneNode(true);h.innerHTML=f<=n?u:l;a.appendChild(h)}o.style.whiteSpace="nowrap";o.style.overflow="hidden";o.style.textOverflow="ellipsis";o.setAttribute("aria-label",n);return a},traffic:function t(i,e,r){var n=this.sanitizeHTML(i.getValue())||0,o=document.createElement("span"),s=e&&e.max?e.max:100,a=e&&e.min?e.min:0,u=e&&typeof e.color!=="undefined"?e.color:["red","orange","green"],l="#666666",f,h;if(isNaN(n)||typeof i.getValue()==="undefined"){return}o.classList.add("tabulator-traffic-light");h=parseFloat(n)<=s?parseFloat(n):s;h=parseFloat(h)>=a?parseFloat(h):a;f=(s-a)/100;h=Math.round((h-a)/f);switch(typeof u==="undefined"?"undefined":T(u)){case"string":l=u;break;case"function":l=u(n);break;case"object":if(Array.isArray(u)){var c=100/u.length;var d=Math.floor(h/c);d=Math.min(d,u.length-1);d=Math.max(d,0);l=u[d];break}}o.style.backgroundColor=l;return o},progress:function t(i,e,r){var n=this.sanitizeHTML(i.getValue())||0,o=i.getElement(),s=e&&e.max?e.max:100,a=e&&e.min?e.min:0,u=e&&e.legendAlign?e.legendAlign:"center",l,f,h,c,d;f=parseFloat(n)<=s?parseFloat(n):s;f=parseFloat(f)>=a?parseFloat(f):a;l=(s-a)/100;f=Math.round((f-a)/l);switch(T(e.color)){case"string":h=e.color;break;case"function":h=e.color(n);break;case"object":if(Array.isArray(e.color)){var b=100/e.color.length;var p=Math.floor(f/b);p=Math.min(p,e.color.length-1);p=Math.max(p,0);h=e.color[p];break}default:h="#2DC214"}switch(T(e.legend)){case"string":c=e.legend;break;case"function":c=e.legend(n);break;case"boolean":c=n;break;default:c=false}switch(T(e.legendColor)){case"string":d=e.legendColor;break;case"function":d=e.legendColor(n);break;case"object":if(Array.isArray(e.legendColor)){var b=100/e.legendColor.length;var p=Math.floor(f/b);p=Math.min(p,e.legendColor.length-1);p=Math.max(p,0);d=e.legendColor[p]}break;default:d="#000"}o.style.minWidth="30px";o.style.position="relative";o.setAttribute("aria-label",f);var v=document.createElement("div");v.style.display="inline-block";v.style.position="relative";v.style.width=f+"%";v.style.backgroundColor=h;v.style.height="100%";v.setAttribute("data-max",s);v.setAttribute("data-min",a);if(c){var m=document.createElement("div");m.style.position="absolute";m.style.top="4px";m.style.left=0;m.style.textAlign=u;m.style.width="100%";m.style.color=d;m.innerHTML=c}r((function(){if(!(i instanceof F)){var t=document.createElement("div");t.style.position="absolute";t.style.top="4px";t.style.bottom="4px";t.style.left="4px";t.style.right="4px";o.appendChild(t);o=t}o.appendChild(v);if(c){o.appendChild(m)}}));return""},color:function t(i,e,r){i.getElement().style.backgroundColor=this.sanitizeHTML(i.getValue());return""},buttonTick:function t(i,e,r){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'},buttonCross:function t(i,e,r){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'},rownum:function t(i,e,r){return this.table.rowManager.activeRows.indexOf(i.getRow()._getSelf())+1},handle:function t(i,e,r){i.getElement().classList.add("tabulator-row-handle");return"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"},responsiveCollapse:function t(i,e,r){var n=document.createElement("div"),o=i.getRow()._row.modules.responsiveLayout;n.classList.add("tabulator-responsive-collapse-toggle");n.innerHTML="<span class='tabulator-responsive-collapse-toggle-open'>+</span><span class='tabulator-responsive-collapse-toggle-close'>-</span>";i.getElement().classList.add("tabulator-row-handle");function s(t){var i=o.element;o.open=t;if(i){if(o.open){n.classList.add("open");i.style.display=""}else{n.classList.remove("open");i.style.display="none"}}}n.addEventListener("click",(function(t){t.stopImmediatePropagation();s(!o.open)}));s(o.open);return n},rowSelection:function t(i,e,r){var n=this;var o=document.createElement("input");o.type="checkbox";if(this.table.modExists("selectRow",true)){o.addEventListener("click",(function(t){t.stopPropagation()}));if(typeof i.getRow=="function"){var s=i.getRow();if(s instanceof O){o.addEventListener("change",(function(t){s.toggleSelect()}));o.checked=s.isSelected&&s.isSelected();this.table.modules.selectRow.registerRowSelectCheckbox(s,o)}else{o=""}}else{o.addEventListener("change",(function(t){if(n.table.modules.selectRow.selectedRows.length){n.table.deselectRow()}else{n.table.selectRow(e.rowRange)}}));this.table.modules.selectRow.registerHeaderSelectCheckbox(o)}}return o}};H.prototype.registerModule("format",tt);var it=function t(i){this.table=i;this.leftColumns=[];this.rightColumns=[];this.leftMargin=0;this.rightMargin=0;this.rightPadding=0;this.initializationMode="left";this.active=false;this.scrollEndTimer=false};it.prototype.reset=function(){this.initializationMode="left";this.leftColumns=[];this.rightColumns=[];this.leftMargin=0;this.rightMargin=0;this.rightMargin=0;this.active=false;this.table.columnManager.headersElement.style.marginLeft=0;this.table.columnManager.element.style.paddingRight=0};it.prototype.initializeColumn=function(t){var i={margin:0,edge:false};if(!t.isGroup){if(this.frozenCheck(t)){i.position=this.initializationMode;if(this.initializationMode=="left"){this.leftColumns.push(t)}else{this.rightColumns.unshift(t)}this.active=true;t.modules.frozen=i}else{this.initializationMode="right"}}};it.prototype.frozenCheck=function(t){if(t.parent.isGroup&&t.definition.frozen){console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups")}if(t.parent.isGroup){return this.frozenCheck(t.parent)}else{return t.definition.frozen}};it.prototype.scrollHorizontal=function(){var t=this;var i;if(this.active){clearTimeout(this.scrollEndTimer);this.scrollEndTimer=setTimeout((function(){t.layout()}),100);i=this.table.rowManager.getVisibleRows();this.calcMargins();this.layoutColumnPosition();this.layoutCalcRows();i.forEach((function(i){if(i.type==="row"){t.layoutRow(i)}}));this.table.rowManager.tableElement.style.marginRight=this.rightMargin}};it.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px";this.table.columnManager.headersElement.style.marginLeft=this.leftMargin;this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px";this.table.columnManager.element.style.paddingRight=this.rightMargin;this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft};it.prototype.layoutCalcRows=function(){if(this.table.modExists("columnCalcs")){if(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow){this.layoutRow(this.table.modules.columnCalcs.topRow)}if(this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow){this.layoutRow(this.table.modules.columnCalcs.botRow)}}};it.prototype.layoutColumnPosition=function(t){var i=this;var e=[];this.leftColumns.forEach((function(r,n){r.modules.frozen.margin=i._calcSpace(i.leftColumns,n)+i.table.columnManager.scrollLeft+"px";if(n==i.leftColumns.length-1){r.modules.frozen.edge=true}else{r.modules.frozen.edge=false}if(r.parent.isGroup){var o=i.getColGroupParentElement(r);if(!e.includes(o)){i.layoutElement(o,r);e.push(o)}if(r.modules.frozen.edge){o.classList.add("tabulator-frozen-"+r.modules.frozen.position)}}else{i.layoutElement(r.getElement(),r)}if(t){r.cells.forEach((function(t){i.layoutElement(t.getElement(true),r)}))}}));this.rightColumns.forEach((function(e,r){e.modules.frozen.margin=i.rightPadding-i._calcSpace(i.rightColumns,r+1)+"px";if(r==i.rightColumns.length-1){e.modules.frozen.edge=true}else{e.modules.frozen.edge=false}if(e.parent.isGroup){i.layoutElement(i.getColGroupParentElement(e),e)}else{i.layoutElement(e.getElement(),e)}if(t){e.cells.forEach((function(t){i.layoutElement(t.getElement(true),e)}))}}))};it.prototype.getColGroupParentElement=function(t){return t.parent.isGroup?this.getColGroupParentElement(t.parent):t.getElement()};it.prototype.layout=function(){var t=this;if(t.active){this.calcMargins();t.table.rowManager.getDisplayRows().forEach((function(i){if(i.type==="row"){t.layoutRow(i)}}));this.layoutCalcRows();this.layoutColumnPosition(true);this.table.rowManager.tableElement.style.marginRight=this.rightMargin}};it.prototype.layoutRow=function(t){var i=this;var e=t.getElement();e.style.paddingLeft=this.leftMargin;this.leftColumns.forEach((function(e){var r=t.getCell(e);if(r){i.layoutElement(r.getElement(true),e)}}));this.rightColumns.forEach((function(e){var r=t.getCell(e);if(r){i.layoutElement(r.getElement(true),e)}}))};it.prototype.layoutElement=function(t,i){if(i.modules.frozen){t.style.position="absolute";t.style.left=i.modules.frozen.margin;t.classList.add("tabulator-frozen");if(i.modules.frozen.edge){t.classList.add("tabulator-frozen-"+i.modules.frozen.position)}}};it.prototype._calcSpace=function(t,i){var e=0;for(var r=0;r<i;r++){if(t[r].visible){e+=t[r].getWidth()}}return e};H.prototype.registerModule("frozenColumns",it);var et=function t(i){this.table=i;this.topElement=document.createElement("div");this.rows=[];this.displayIndex=0};et.prototype.initialize=function(){this.rows=[];this.topElement.classList.add("tabulator-frozen-rows-holder");this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling)};et.prototype.setDisplayIndex=function(t){this.displayIndex=t};et.prototype.getDisplayIndex=function(){return this.displayIndex};et.prototype.isFrozen=function(){return!!this.rows.length};et.prototype.getRows=function(t){var i=t.slice(0);this.rows.forEach((function(t){var e=i.indexOf(t);if(e>-1){i.splice(e,1)}}));return i};et.prototype.freezeRow=function(t){if(!t.modules.frozen){t.modules.frozen=true;this.topElement.appendChild(t.getElement());t.initialize();t.normalizeHeight();this.table.rowManager.adjustTableSize();this.rows.push(t);this.table.rowManager.refreshActiveData("display");this.styleRows()}else{console.warn("Freeze Error - Row is already frozen")}};et.prototype.unfreezeRow=function(t){this.rows.indexOf(t);if(t.modules.frozen){t.modules.frozen=false;this.detachRow(t);this.table.rowManager.adjustTableSize();this.table.rowManager.refreshActiveData("display");if(this.rows.length){this.styleRows()}}else{console.warn("Freeze Error - Row is already unfrozen")}};et.prototype.detachRow=function(t){var i=this.rows.indexOf(t);if(i>-1){var e=t.getElement();e.parentNode.removeChild(e);this.rows.splice(i,1)}};et.prototype.styleRows=function(t){var i=this;this.rows.forEach((function(t,e){i.table.rowManager.styleRow(t,e)}))};H.prototype.registerModule("frozenRows",et);var rt=function t(i){this._group=i;this.type="GroupComponent"};rt.prototype.getKey=function(){return this._group.key};rt.prototype.getField=function(){return this._group.field};rt.prototype.getElement=function(){return this._group.element};rt.prototype.getRows=function(){return this._group.getRows(true)};rt.prototype.getSubGroups=function(){return this._group.getSubGroups(true)};rt.prototype.getParentGroup=function(){return this._group.parent?this._group.parent.getComponent():false};rt.prototype.getVisibility=function(){console.warn("getVisibility function is deprecated, you should now use the isVisible function");return this._group.visible};rt.prototype.isVisible=function(){return this._group.visible};rt.prototype.show=function(){this._group.show()};rt.prototype.hide=function(){this._group.hide()};rt.prototype.toggle=function(){this._group.toggleVisibility()};rt.prototype._getSelf=function(){return this._group};rt.prototype.getTable=function(){return this._group.groupManager.table};var nt=function t(i,e,r,n,o,s,a){this.groupManager=i;this.parent=e;this.key=n;this.level=r;this.field=o;this.hasSubGroups=r<i.groupIDLookups.length-1;this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow;this.type="group";this.old=a;this.rows=[];this.groups=[];this.groupList=[];this.generator=s;this.elementContents=false;this.height=0;this.outerHeight=0;this.initialized=false;this.calcs={};this.initialized=false;this.modules={};this.arrowElement=false;this.visible=a?a.visible:typeof i.startOpen[r]!=="undefined"?i.startOpen[r]:i.startOpen[0];this.component=null;this.createElements();this.addBindings();this.createValueGroups()};nt.prototype.wipe=function(){if(this.groupList.length){this.groupList.forEach((function(t){t.wipe()}))}else{this.element=false;this.arrowElement=false;this.elementContents=false}};nt.prototype.createElements=function(){var t=document.createElement("div");t.classList.add("tabulator-arrow");this.element=document.createElement("div");this.element.classList.add("tabulator-row");this.element.classList.add("tabulator-group");this.element.classList.add("tabulator-group-level-"+this.level);this.element.setAttribute("role","rowgroup");this.arrowElement=document.createElement("div");this.arrowElement.classList.add("tabulator-group-toggle");this.arrowElement.appendChild(t);if(this.groupManager.table.options.movableRows!==false&&this.groupManager.table.modExists("moveRow")){this.groupManager.table.modules.moveRow.initializeGroupHeader(this)}};nt.prototype.createValueGroups=function(){var t=this;var i=this.level+1;if(this.groupManager.allowedValues&&this.groupManager.allowedValues[i]){this.groupManager.allowedValues[i].forEach((function(e){t._createGroup(e,i)}))}};nt.prototype.addBindings=function(){var t=this,i,e,r,n;if(t.groupManager.table.options.groupClick){t.element.addEventListener("click",(function(i){t.groupManager.table.options.groupClick.call(t.groupManager.table,i,t.getComponent())}))}if(t.groupManager.table.options.groupDblClick){t.element.addEventListener("dblclick",(function(i){t.groupManager.table.options.groupDblClick.call(t.groupManager.table,i,t.getComponent())}))}if(t.groupManager.table.options.groupContext){t.element.addEventListener("contextmenu",(function(i){t.groupManager.table.options.groupContext.call(t.groupManager.table,i,t.getComponent())}))}if((t.groupManager.table.options.groupContextMenu||t.groupManager.table.options.groupClickMenu)&&t.groupManager.table.modExists("menu")){t.groupManager.table.modules.menu.initializeGroup.call(t.groupManager.table.modules.menu,t)}if(t.groupManager.table.options.groupTap){r=false;t.element.addEventListener("touchstart",(function(t){r=true}),{passive:true});t.element.addEventListener("touchend",(function(i){if(r){t.groupManager.table.options.groupTap(i,t.getComponent())}r=false}))}if(t.groupManager.table.options.groupDblTap){i=null;t.element.addEventListener("touchend",(function(e){if(i){clearTimeout(i);i=null;t.groupManager.table.options.groupDblTap(e,t.getComponent())}else{i=setTimeout((function(){clearTimeout(i);i=null}),300)}}))}if(t.groupManager.table.options.groupTapHold){e=null;t.element.addEventListener("touchstart",(function(i){clearTimeout(e);e=setTimeout((function(){clearTimeout(e);e=null;r=false;t.groupManager.table.options.groupTapHold(i,t.getComponent())}),1e3)}),{passive:true});t.element.addEventListener("touchend",(function(t){clearTimeout(e);e=null}))}if(t.groupManager.table.options.groupToggleElement){n=t.groupManager.table.options.groupToggleElement=="arrow"?t.arrowElement:t.element;n.addEventListener("click",(function(i){i.stopPropagation();i.stopImmediatePropagation();t.toggleVisibility()}))}};nt.prototype._createGroup=function(t,i){var e=i+"_"+t;var r=new nt(this.groupManager,this,i,t,this.groupManager.groupIDLookups[i].field,this.groupManager.headerGenerator[i]||this.groupManager.headerGenerator[0],this.old?this.old.groups[e]:false);this.groups[e]=r;this.groupList.push(r)};nt.prototype._addRowToGroup=function(t){var i=this.level+1;if(this.hasSubGroups){var e=this.groupManager.groupIDLookups[i].func(t.getData()),r=i+"_"+e;if(this.groupManager.allowedValues&&this.groupManager.allowedValues[i]){if(this.groups[r]){this.groups[r].addRow(t)}}else{if(!this.groups[r]){this._createGroup(e,i)}this.groups[r].addRow(t)}}};nt.prototype._addRow=function(t){this.rows.push(t);t.modules.group=this};nt.prototype.insertRow=function(t,i,e){var r=this.conformRowData({});t.updateData(r);var n=this.rows.indexOf(i);if(n>-1){if(e){this.rows.splice(n+1,0,t)}else{this.rows.splice(n,0,t)}}else{if(e){this.rows.push(t)}else{this.rows.unshift(t)}}t.modules.group=this;this.generateGroupHeaderContents();if(this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"){this.groupManager.table.modules.columnCalcs.recalcGroup(this)}this.groupManager.updateGroupRows(true)};nt.prototype.scrollHeader=function(t){this.arrowElement.style.marginLeft=t;this.groupList.forEach((function(i){i.scrollHeader(t)}))};nt.prototype.getRowIndex=function(t){};nt.prototype.conformRowData=function(t){if(this.field){t[this.field]=this.key}else{console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function")}if(this.parent){t=this.parent.conformRowData(t)}return t};nt.prototype.removeRow=function(t){var i=this.rows.indexOf(t);var e=t.getElement();if(i>-1){this.rows.splice(i,1)}if(!this.groupManager.table.options.groupValues&&!this.rows.length){if(this.parent){this.parent.removeGroup(this)}else{this.groupManager.removeGroup(this)}this.groupManager.updateGroupRows(true)}else{if(e.parentNode){e.parentNode.removeChild(e)}this.generateGroupHeaderContents();if(this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"){this.groupManager.table.modules.columnCalcs.recalcGroup(this)}}};nt.prototype.removeGroup=function(t){var i=t.level+"_"+t.key,e;if(this.groups[i]){delete this.groups[i];e=this.groupList.indexOf(t);if(e>-1){this.groupList.splice(e,1)}if(!this.groupList.length){if(this.parent){this.parent.removeGroup(this)}else{this.groupManager.removeGroup(this)}}}};nt.prototype.getHeadersAndRows=function(t){var i=[];i.push(this);this._visSet();if(this.visible){if(this.groupList.length){this.groupList.forEach((function(e){i=i.concat(e.getHeadersAndRows(t))}))}else{if(!t&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()){if(this.calcs.top){this.calcs.top.detachElement();this.calcs.top.deleteCells()}this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);i.push(this.calcs.top)}i=i.concat(this.rows);if(!t&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){if(this.calcs.bottom){this.calcs.bottom.detachElement();this.calcs.bottom.deleteCells()}this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);i.push(this.calcs.bottom)}}}else{if(!this.groupList.length&&this.groupManager.table.options.columnCalcs!="table"){if(this.groupManager.table.modExists("columnCalcs")){if(!t&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()){if(this.calcs.top){this.calcs.top.detachElement();this.calcs.top.deleteCells()}if(this.groupManager.table.options.groupClosedShowCalcs){this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);i.push(this.calcs.top)}}if(!t&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){if(this.calcs.bottom){this.calcs.bottom.detachElement();this.calcs.bottom.deleteCells()}if(this.groupManager.table.options.groupClosedShowCalcs){this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);i.push(this.calcs.bottom)}}}}}return i};nt.prototype.getData=function(t,i){var e=[];this._visSet();if(!t||t&&this.visible){this.rows.forEach((function(t){e.push(t.getData(i||"data"))}))}return e};nt.prototype.getRowCount=function(){var t=0;if(this.groupList.length){this.groupList.forEach((function(i){t+=i.getRowCount()}))}else{t=this.rows.length}return t};nt.prototype.toggleVisibility=function(){if(this.visible){this.hide()}else{this.show()}};nt.prototype.hide=function(){this.visible=false;if(this.groupManager.table.rowManager.getRenderMode()=="classic"&&!this.groupManager.table.options.pagination){this.element.classList.remove("tabulator-group-visible");if(this.groupList.length){this.groupList.forEach((function(t){var i=t.getHeadersAndRows();i.forEach((function(t){t.detachElement()}))}))}else{this.rows.forEach((function(t){var i=t.getElement();i.parentNode.removeChild(i)}))}this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex());this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}else{this.groupManager.updateGroupRows(true)}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),false)};nt.prototype.show=function(){var t=this;t.visible=true;if(this.groupManager.table.rowManager.getRenderMode()=="classic"&&!this.groupManager.table.options.pagination){this.element.classList.add("tabulator-group-visible");var i=t.getElement();if(this.groupList.length){this.groupList.forEach((function(t){var e=t.getHeadersAndRows();e.forEach((function(t){var e=t.getElement();i.parentNode.insertBefore(e,i.nextSibling);t.initialize();i=e}))}))}else{t.rows.forEach((function(t){var e=t.getElement();i.parentNode.insertBefore(e,i.nextSibling);t.initialize();i=e}))}this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex());this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}else{this.groupManager.updateGroupRows(true)}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),true)};nt.prototype._visSet=function(){var t=[];if(typeof this.visible=="function"){this.rows.forEach((function(i){t.push(i.getData())}));this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent())}};nt.prototype.getRowGroup=function(t){var i=false;if(this.groupList.length){this.groupList.forEach((function(e){var r=e.getRowGroup(t);if(r){i=r}}))}else{if(this.rows.find((function(i){return i===t}))){i=this}}return i};nt.prototype.getSubGroups=function(t){var i=[];this.groupList.forEach((function(e){i.push(t?e.getComponent():e)}));return i};nt.prototype.getRows=function(t){var i=[];this.rows.forEach((function(e){i.push(t?e.getComponent():e)}));return i};nt.prototype.generateGroupHeaderContents=function(){var t=[];this.rows.forEach((function(i){t.push(i.getData())}));this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());while(this.element.firstChild){this.element.removeChild(this.element.firstChild)}if(typeof this.elementContents==="string"){this.element.innerHTML=this.elementContents}else{this.element.appendChild(this.elementContents)}this.element.insertBefore(this.arrowElement,this.element.firstChild)};nt.prototype.getPath=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];t.unshift(this.key);if(this.parent){this.parent.getPath(t)}return t};nt.prototype.getElement=function(){this.addBindingsd=false;this._visSet();if(this.visible){this.element.classList.add("tabulator-group-visible")}else{this.element.classList.remove("tabulator-group-visible")}for(var t=0;t<this.element.childNodes.length;++t){this.element.childNodes[t].parentNode.removeChild(this.element.childNodes[t])}this.generateGroupHeaderContents();return this.element};nt.prototype.detachElement=function(){if(this.element&&this.element.parentNode){this.element.parentNode.removeChild(this.element)}};nt.prototype.normalizeHeight=function(){this.setHeight(this.element.clientHeight)};nt.prototype.initialize=function(t){if(!this.initialized||t){this.normalizeHeight();this.initialized=true}};nt.prototype.reinitialize=function(){this.initialized=false;this.height=0;if(H.prototype.helpers.elVisible(this.element)){this.initialize(true)}};nt.prototype.setHeight=function(t){if(this.height!=t){this.height=t;this.outerHeight=this.element.offsetHeight}};nt.prototype.getHeight=function(){return this.outerHeight};nt.prototype.getGroup=function(){return this};nt.prototype.reinitializeHeight=function(){};nt.prototype.calcHeight=function(){};nt.prototype.setCellHeight=function(){};nt.prototype.clearCellHeight=function(){};nt.prototype.getComponent=function(){if(!this.component){this.component=new rt(this)}return this.component};var ot=function t(i){this.table=i;this.groupIDLookups=false;this.startOpen=[function(){return false}];this.headerGenerator=[function(){return""}];this.groupList=[];this.allowedValues=false;this.groups={};this.displayIndex=0};ot.prototype.initialize=function(){var t=this,i=t.table.options.groupBy,e=t.table.options.groupStartOpen,r=t.table.options.groupHeader;this.allowedValues=t.table.options.groupValues;if(Array.isArray(i)&&Array.isArray(r)&&i.length>r.length){console.warn("Error creating group headers, groupHeader array is shorter than groupBy array")}t.headerGenerator=[function(){return""}];this.startOpen=[function(){return false}];t.table.modules.localize.bind("groups|item",(function(i,e){t.headerGenerator[0]=function(t,r,n){return(typeof t==="undefined"?"":t)+"<span>("+r+" "+(r===1?i:e.groups.items)+")</span>"}}));this.groupIDLookups=[];if(Array.isArray(i)||i){if(this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="table"&&this.table.options.columnCalcs!="both"){this.table.modules.columnCalcs.removeCalcs()}}else{if(this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="group"){var n=this.table.columnManager.getRealColumns();n.forEach((function(i){if(i.definition.topCalc){t.table.modules.columnCalcs.initializeTopRow()}if(i.definition.bottomCalc){t.table.modules.columnCalcs.initializeBottomRow()}}))}}if(!Array.isArray(i)){i=[i]}i.forEach((function(i,e){var r,n;if(typeof i=="function"){r=i}else{n=t.table.columnManager.getColumnByField(i);if(n){r=function t(i){return n.getFieldValue(i)}}else{r=function t(e){return e[i]}}}t.groupIDLookups.push({field:typeof i==="function"?false:i,func:r,values:t.allowedValues?t.allowedValues[e]:false})}));if(e){if(!Array.isArray(e)){e=[e]}e.forEach((function(t){}));t.startOpen=e}if(r){t.headerGenerator=Array.isArray(r)?r:[r]}this.initialized=true};ot.prototype.setDisplayIndex=function(t){this.displayIndex=t};ot.prototype.getDisplayIndex=function(){return this.displayIndex};ot.prototype.getRows=function(t){if(this.groupIDLookups.length){this.table.options.dataGrouping.call(this.table);this.generateGroups(t);if(this.table.options.dataGrouped){this.table.options.dataGrouped.call(this.table,this.getGroups(true))}return this.updateGroupRows()}else{return t.slice(0)}};ot.prototype.getGroups=function(t){var i=[];this.groupList.forEach((function(e){i.push(t?e.getComponent():e)}));return i};ot.prototype.getChildGroups=function(t){var i=this;var e=[];if(!t){t=this}t.groupList.forEach((function(t){if(t.groupList.length){e=e.concat(i.getChildGroups(t))}else{e.push(t)}}));return e};ot.prototype.wipe=function(){this.groupList.forEach((function(t){t.wipe()}))};ot.prototype.pullGroupListData=function(t){var i=this;var e=[];t.forEach((function(t){var r={};r.level=0;r.rowCount=0;r.headerContent="";var n=[];if(t.hasSubGroups){n=i.pullGroupListData(t.groupList);r.level=t.level;r.rowCount=n.length-t.groupList.length;r.headerContent=t.generator(t.key,r.rowCount,t.rows,t);e.push(r);e=e.concat(n)}else{r.level=t.level;r.headerContent=t.generator(t.key,t.rows.length,t.rows,t);r.rowCount=t.getRows().length;e.push(r);t.getRows().forEach((function(t){e.push(t.getData("data"))}))}}));return e};ot.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)};ot.prototype.getRowGroup=function(t){var i=false;this.groupList.forEach((function(e){var r=e.getRowGroup(t);if(r){i=r}}));return i};ot.prototype.countGroups=function(){return this.groupList.length};ot.prototype.generateGroups=function(t){var i=this,e=i.groups;i.groups={};i.groupList=[];if(this.allowedValues&&this.allowedValues[0]){this.allowedValues[0].forEach((function(t){i.createGroup(t,0,e)}));t.forEach((function(t){i.assignRowToExistingGroup(t,e)}))}else{t.forEach((function(t){i.assignRowToGroup(t,e)}))}};ot.prototype.createGroup=function(t,i,e){var r=i+"_"+t,n;e=e||[];n=new nt(this,false,i,t,this.groupIDLookups[0].field,this.headerGenerator[0],e[r]);this.groups[r]=n;this.groupList.push(n)};ot.prototype.assignRowToExistingGroup=function(t,i){var e=this.groupIDLookups[0].func(t.getData()),r="0_"+e;if(this.groups[r]){this.groups[r].addRow(t)}};ot.prototype.assignRowToGroup=function(t,i){var e=this.groupIDLookups[0].func(t.getData()),r=!this.groups["0_"+e];if(r){this.createGroup(e,0,i)}this.groups["0_"+e].addRow(t);return!r};ot.prototype.reassignRowToGroup=function(t){var i=t.getGroup(),e=i.getPath(),r=this.getExpectedPath(t),n=true;var n=e.length==r.length&&e.every((function(t,i){return t===r[i]}));if(!n){i.removeRow(t);this.assignRowToGroup(t,self.groups);this.table.rowManager.refreshActiveData("group",false,true)}};ot.prototype.getExpectedPath=function(t){var i=[],e=t.getData();this.groupIDLookups.forEach((function(t){i.push(t.func(e))}));return i};ot.prototype.updateGroupRows=function(t){var i=this,e=[];i.groupList.forEach((function(t){e=e.concat(t.getHeadersAndRows())}));if(t){var r=i.table.rowManager.setDisplayRows(e,this.getDisplayIndex());if(r!==true){this.setDisplayIndex(r)}i.table.rowManager.refreshActiveData("group",true,true)}return e};ot.prototype.scrollHeaders=function(t){if(this.table.options.virtualDomHoz){t-=this.table.vdomHoz.vDomPadLeft}t=t+"px";this.groupList.forEach((function(i){i.scrollHeader(t)}))};ot.prototype.removeGroup=function(t){var i=t.level+"_"+t.key,e;if(this.groups[i]){delete this.groups[i];e=this.groupList.indexOf(t);if(e>-1){this.groupList.splice(e,1)}}};H.prototype.registerModule("groupRows",ot);var st=function t(i){this.table=i;this.history=[];this.index=-1};st.prototype.clear=function(){this.history=[];this.index=-1};st.prototype.action=function(t,i,e){this.history=this.history.slice(0,this.index+1);this.history.push({type:t,component:i,data:e});this.index++};st.prototype.getHistoryUndoSize=function(){return this.index+1};st.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)};st.prototype.clearComponentHistory=function(t){var i=this.history.findIndex((function(i){return i.component===t}));if(i>-1){this.history.splice(i,1);if(i<=this.index){this.index--}this.clearComponentHistory(t)}};st.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];this.undoers[t.type].call(this,t);this.index--;this.table.options.historyUndo.call(this.table,t.type,t.component.getComponent(),t.data);return true}else{console.warn("History Undo Error - No more history to undo");return false}};st.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];this.redoers[t.type].call(this,t);this.table.options.historyRedo.call(this.table,t.type,t.component.getComponent(),t.data);return true}else{console.warn("History Redo Error - No more history to redo");return false}};st.prototype.undoers={cellEdit:function t(i){i.component.setValueProcessData(i.data.oldValue)},rowAdd:function t(i){i.component.deleteActual()},rowDelete:function t(i){var e=this.table.rowManager.addRowActual(i.data.data,i.data.pos,i.data.index);if(this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.updateGroupRows(true)}this._rebindRow(i.component,e)},rowMove:function t(i){this.table.rowManager.moveRowActual(i.component,this.table.rowManager.rows[i.data.posFrom],!i.data.after);this.table.rowManager.redraw()}};st.prototype.redoers={cellEdit:function t(i){i.component.setValueProcessData(i.data.newValue)},rowAdd:function t(i){var e=this.table.rowManager.addRowActual(i.data.data,i.data.pos,i.data.index);if(this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.updateGroupRows(true)}this._rebindRow(i.component,e)},rowDelete:function t(i){i.component.deleteActual()},rowMove:function t(i){this.table.rowManager.moveRowActual(i.component,this.table.rowManager.rows[i.data.posTo],i.data.after);this.table.rowManager.redraw()}};st.prototype._rebindRow=function(t,i){this.history.forEach((function(e){if(e.component instanceof P){if(e.component===t){e.component=i}}else if(e.component instanceof A){if(e.component.row===t){var r=e.component.column.getField();if(r){e.component=i.getCell(r)}}}}))};H.prototype.registerModule("history",st);var at=function t(i){this.table=i;this.fieldIndex=[];this.hasIndex=false};at.prototype.parseTable=function(){var t=this,i=t.table.element,e=t.table.options,r=i.getElementsByTagName("th"),n=i.getElementsByTagName("tbody")[0],o=[];t.hasIndex=false;t.table.options.htmlImporting.call(this.table);n=n?n.getElementsByTagName("tr"):[];t._extractOptions(i,e);if(r.length){t._extractHeaders(r,n)}else{t._generateBlankHeaders(r,n)}for(var s=0;s<n.length;s++){var a=n[s],u=a.getElementsByTagName("td"),l={};if(!t.hasIndex){l[e.index]=s}for(var f=0;f<u.length;f++){var h=u[f];if(typeof this.fieldIndex[f]!=="undefined"){l[this.fieldIndex[f]]=h.innerHTML}}o.push(l)}var c=document.createElement("div");var d=i.attributes;for(var f in d){if(T(d[f])=="object"){c.setAttribute(d[f].name,d[f].value)}}i.parentNode.replaceChild(c,i);e.data=o;t.table.options.htmlImported.call(this.table);this.table.element=c};at.prototype._extractOptions=function(t,i,e){var r=t.attributes;var n=e?Object.assign([],e):Object.keys(i);var o={};n.forEach((function(t){o[t.toLowerCase()]=t}));for(var s in r){var a=r[s];var u;if(a&&(typeof a==="undefined"?"undefined":T(a))=="object"&&a.name&&a.name.indexOf("tabulator-")===0){u=a.name.replace("tabulator-","");if(typeof o[u]!=="undefined"){i[o[u]]=this._attribValue(a.value)}}}};at.prototype._attribValue=function(t){if(t==="true"){return true}if(t==="false"){return false}return t};at.prototype._findCol=function(t){var i=this.table.options.columns.find((function(i){return i.title===t}));return i||false};at.prototype._extractHeaders=function(t,i){for(var e=0;e<t.length;e++){var r=t[e],n=false,o=this._findCol(r.textContent),s;if(o){n=true}else{o={title:r.textContent.trim()}}if(!o.field){o.field=r.textContent.trim().toLowerCase().replace(" ","_")}s=r.getAttribute("width");if(s&&!o.width){o.width=s}this._extractOptions(r,o,N.prototype.defaultOptionList);this.fieldIndex[e]=o.field;if(o.field==this.table.options.index){this.hasIndex=true}if(!n){this.table.options.columns.push(o)}}};at.prototype._generateBlankHeaders=function(t,i){for(var e=0;e<t.length;e++){var r=t[e],n={title:"",field:"col"+e};this.fieldIndex[e]=n.field;var o=r.getAttribute("width");if(o){n.width=o}this.table.options.columns.push(n)}};H.prototype.registerModule("htmlTableImport",at);var ut=function t(i){this.table=i;this.watchKeys=null;this.pressedKeys=null;this.keyupBinding=false;this.keydownBinding=false};ut.prototype.initialize=function(){var t=this.table.options.keybindings,i={};this.watchKeys={};this.pressedKeys=[];if(t!==false){for(var e in this.bindings){i[e]=this.bindings[e]}if(Object.keys(t).length){for(var r in t){i[r]=t[r]}}this.mapBindings(i);this.bindEvents()}};ut.prototype.mapBindings=function(t){var i=this;var e=this;var r=function r(n){if(i.actions[n]){if(t[n]){if(T(t[n])!=="object"){t[n]=[t[n]]}t[n].forEach((function(t){e.mapBinding(n,t)}))}}else{console.warn("Key Binding Error - no such action:",n)}};for(var n in t){r(n)}};ut.prototype.mapBinding=function(t,i){var e=this;var r={action:this.actions[t],keys:[],ctrl:false,shift:false,meta:false};var n=i.toString().toLowerCase().split(" ").join("").split("+");n.forEach((function(t){switch(t){case"ctrl":r.ctrl=true;break;case"shift":r.shift=true;break;case"meta":r.meta=true;break;default:t=parseInt(t);r.keys.push(t);if(!e.watchKeys[t]){e.watchKeys[t]=[]}e.watchKeys[t].push(r)}}))};ut.prototype.bindEvents=function(){var t=this;this.keyupBinding=function(i){var e=i.keyCode;var r=t.watchKeys[e];if(r){t.pressedKeys.push(e);r.forEach((function(e){t.checkBinding(i,e)}))}};this.keydownBinding=function(i){var e=i.keyCode;var r=t.watchKeys[e];if(r){var n=t.pressedKeys.indexOf(e);if(n>-1){t.pressedKeys.splice(n,1)}}};this.table.element.addEventListener("keydown",this.keyupBinding);this.table.element.addEventListener("keyup",this.keydownBinding)};ut.prototype.clearBindings=function(){if(this.keyupBinding){this.table.element.removeEventListener("keydown",this.keyupBinding)}if(this.keydownBinding){this.table.element.removeEventListener("keyup",this.keydownBinding)}};ut.prototype.checkBinding=function(t,i){var e=this,r=true;if(t.ctrlKey==i.ctrl&&t.shiftKey==i.shift&&t.metaKey==i.meta){i.keys.forEach((function(t){var i=e.pressedKeys.indexOf(t);if(i==-1){r=false}}));if(r){i.action.call(e,t)}return true}return false};ut.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"};ut.prototype.actions={keyBlock:function t(i){i.stopPropagation();i.preventDefault()},scrollPageUp:function t(i){var e=this.table.rowManager,r=e.scrollTop-e.height;i.preventDefault();if(e.displayRowsCount){if(r>=0){e.element.scrollTop=r}else{e.scrollToRow(e.getDisplayRows()[0])}}this.table.element.focus()},scrollPageDown:function t(i){var e=this.table.rowManager,r=e.scrollTop+e.height,n=e.element.scrollHeight;i.preventDefault();if(e.displayRowsCount){if(r<=n){e.element.scrollTop=r}else{e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])}}this.table.element.focus()},scrollToStart:function t(i){var e=this.table.rowManager;i.preventDefault();if(e.displayRowsCount){e.scrollToRow(e.getDisplayRows()[0])}this.table.element.focus()},scrollToEnd:function t(i){var e=this.table.rowManager;i.preventDefault();if(e.displayRowsCount){e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])}this.table.element.focus()},navPrev:function t(i){var e=false;if(this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(e){i.preventDefault();e.nav().prev()}}},navNext:function t(i){var e=false;var r=this.table.options.tabEndNewRow;var n;if(this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(e){i.preventDefault();n=e.nav();if(!n.next()){if(r){e.getElement().firstChild.blur();if(r===true){r=this.table.addRow({})}else{if(typeof r=="function"){r=this.table.addRow(r(e.row.getComponent()))}else{r=this.table.addRow(Object.assign({},r))}}r.then((function(){setTimeout((function(){n.next()}))}))}}}}},navLeft:function t(i){var e=false;if(this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(e){i.preventDefault();e.nav().left()}}},navRight:function t(i){var e=false;if(this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(e){i.preventDefault();e.nav().right()}}},navUp:function t(i){var e=false;if(this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(e){i.preventDefault();e.nav().up()}}},navDown:function t(i){var e=false;if(this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(e){i.preventDefault();e.nav().down()}}},undo:function t(i){var e=false;if(this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(!e){i.preventDefault();this.table.modules.history.undo()}}},redo:function t(i){var e=false;if(this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")){e=this.table.modules.edit.currentCell;if(!e){i.preventDefault();this.table.modules.history.redo()}}},copyToClipboard:function t(i){if(!this.table.modules.edit.currentCell){if(this.table.modExists("clipboard",true)){this.table.modules.clipboard.copy(false,true)}}}};H.prototype.registerModule("keybindings",ut);var lt=function t(i){this.table=i;this.menuElements=[];this.blurEvent=this.hideMenu.bind(this);this.escEvent=this.escMenu.bind(this);this.nestedMenuBlock=false;this.positionReversedX=false};lt.prototype.initializeColumnHeader=function(t){var i=this;var e;if(t.definition.headerContextMenu){t.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,t.definition.headerContextMenu));this.tapHold(t,t.definition.headerContextMenu)}if(t.definition.headerMenu){e=document.createElement("span");e.classList.add("tabulator-header-menu-button");e.innerHTML="&vellip;";e.addEventListener("click",(function(e){e.stopPropagation();e.preventDefault();i.LoadMenuEvent(t,t.definition.headerMenu,e)}));t.titleElement.insertBefore(e,t.titleElement.firstChild)}};lt.prototype.LoadMenuEvent=function(t,i,e){i=typeof i=="function"?i.call(this.table,t.getComponent(),e):i;this.loadMenu(e,t,i)};lt.prototype.tapHold=function(t,i){var e=this;var r=t.getElement(),n=null,o=false;r.addEventListener("touchstart",(function(r){clearTimeout(n);o=false;n=setTimeout((function(){clearTimeout(n);n=null;o=true;e.LoadMenuEvent(t,i,r)}),1e3)}),{passive:true});r.addEventListener("touchend",(function(t){clearTimeout(n);n=null;if(o){t.preventDefault()}}))};lt.prototype.initializeCell=function(t){if(t.column.definition.contextMenu){t.getElement(true).addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,t.column.definition.contextMenu));this.tapHold(t,t.column.definition.contextMenu)}if(t.column.definition.clickMenu){t.getElement(true).addEventListener("click",this.LoadMenuEvent.bind(this,t,t.column.definition.clickMenu))}};lt.prototype.initializeRow=function(t){if(this.table.options.rowContextMenu){t.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,this.table.options.rowContextMenu));this.tapHold(t,this.table.options.rowContextMenu)}if(this.table.options.rowClickMenu){t.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,t,this.table.options.rowClickMenu))}};lt.prototype.initializeGroup=function(t){if(this.table.options.groupContextMenu){t.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,this.table.options.groupContextMenu));this.tapHold(t,this.table.options.groupContextMenu)}if(this.table.options.groupClickMenu){t.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,t,this.table.options.groupClickMenu))}};lt.prototype.loadMenu=function(t,i,e,r){var n=this;var o=!(t instanceof MouseEvent);var s=document.createElement("div");s.classList.add("tabulator-menu");if(!o){t.preventDefault()}if(!e||!e.length){return}if(!r){if(this.nestedMenuBlock){if(this.isOpen()){return}}else{this.nestedMenuBlock=setTimeout((function(){n.nestedMenuBlock=false}),100)}this.hideMenu();this.menuElements=[]}e.forEach((function(t){var e=document.createElement("div"),r=t.label,o=t.disabled;if(t.separator){e.classList.add("tabulator-menu-separator")}else{e.classList.add("tabulator-menu-item");if(typeof r=="function"){r=r.call(n.table,i.getComponent())}if(r instanceof Node){e.appendChild(r)}else{e.innerHTML=r}if(typeof o=="function"){o=o.call(n.table,i.getComponent())}if(o){e.classList.add("tabulator-menu-item-disabled");e.addEventListener("click",(function(t){t.stopPropagation()}))}else{if(t.menu&&t.menu.length){e.addEventListener("click",(function(r){r.stopPropagation();n.hideOldSubMenus(s);n.loadMenu(r,i,t.menu,e)}))}else{if(t.action){e.addEventListener("click",(function(e){t.action(e,i.getComponent())}))}}}if(t.menu&&t.menu.length){e.classList.add("tabulator-menu-item-submenu")}}s.appendChild(e)}));s.addEventListener("click",(function(t){n.hideMenu()}));this.menuElements.push(s);this.positionMenu(s,r,o,t)};lt.prototype.hideOldSubMenus=function(t){var i=this.menuElements.indexOf(t);if(i>-1){for(var e=this.menuElements.length-1;e>i;e--){var r=this.menuElements[e];if(r.parentNode){r.parentNode.removeChild(r)}this.menuElements.pop()}}};lt.prototype.positionMenu=function(t,i,e,r){var n=this;var o=Math.max(document.body.offsetHeight,window.innerHeight),s,a,u;if(!i){s=e?r.touches[0].pageX:r.pageX;a=e?r.touches[0].pageY:r.pageY;this.positionReversedX=false}else{u=H.prototype.helpers.elOffset(i);s=u.left+i.offsetWidth;a=u.top-1}t.style.top=a+"px";t.style.left=s+"px";setTimeout((function(){n.table.rowManager.element.addEventListener("scroll",n.blurEvent);document.body.addEventListener("click",n.blurEvent);document.body.addEventListener("contextmenu",n.blurEvent);window.addEventListener("resize",n.blurEvent);document.body.addEventListener("keydown",n.escEvent)}),100);document.body.appendChild(t);if(a+t.offsetHeight>=o){t.style.top="";if(i){t.style.bottom=o-u.top-i.offsetHeight-1+"px"}else{t.style.bottom=o-a+"px"}}if(s+t.offsetWidth>=document.body.offsetWidth||this.positionReversedX){t.style.left="";if(i){t.style.right=document.documentElement.offsetWidth-u.left+"px"}else{t.style.right=document.documentElement.offsetWidth-s+"px"}this.positionReversedX=true}};lt.prototype.isOpen=function(){return!!this.menuElements.length};lt.prototype.escMenu=function(t){if(t.keyCode==27){this.hideMenu()}};lt.prototype.hideMenu=function(){this.menuElements.forEach((function(t){if(t.parentNode){t.parentNode.removeChild(t)}}));document.body.removeEventListener("keydown",this.escEvent);document.body.removeEventListener("click",this.blurEvent);document.body.removeEventListener("contextmenu",this.blurEvent);window.removeEventListener("resize",this.blurEvent);this.table.rowManager.element.removeEventListener("scroll",this.blurEvent)};lt.prototype.menus={};H.prototype.registerModule("menu",lt);var ft=function t(i){this.table=i;this.placeholderElement=this.createPlaceholderElement();this.hoverElement=false;this.checkTimeout=false;this.checkPeriod=250;this.moving=false;this.toCol=false;this.toColAfter=false;this.startX=0;this.autoScrollMargin=40;this.autoScrollStep=5;this.autoScrollTimeout=false;this.touchMove=false;this.moveHover=this.moveHover.bind(this);this.endMove=this.endMove.bind(this)};ft.prototype.createPlaceholderElement=function(){var t=document.createElement("div");t.classList.add("tabulator-col");t.classList.add("tabulator-col-placeholder");return t};ft.prototype.initializeColumn=function(t){var i=this,e={},r;if(!t.modules.frozen){r=t.getElement();e.mousemove=function(e){if(t.parent===i.moving.parent){if((i.touchMove?e.touches[0].pageX:e.pageX)-H.prototype.helpers.elOffset(r).left+i.table.columnManager.element.scrollLeft>t.getWidth()/2){if(i.toCol!==t||!i.toColAfter){r.parentNode.insertBefore(i.placeholderElement,r.nextSibling);i.moveColumn(t,true)}}else{if(i.toCol!==t||i.toColAfter){r.parentNode.insertBefore(i.placeholderElement,r);i.moveColumn(t,false)}}}}.bind(i);r.addEventListener("mousedown",(function(e){i.touchMove=false;if(e.which===1){i.checkTimeout=setTimeout((function(){i.startMove(e,t)}),i.checkPeriod)}}));r.addEventListener("mouseup",(function(t){if(t.which===1){if(i.checkTimeout){clearTimeout(i.checkTimeout)}}}));i.bindTouchEvents(t)}t.modules.moveColumn=e};ft.prototype.bindTouchEvents=function(t){var i=this,e=t.getElement(),r=false,n,o,s,a,u,l;e.addEventListener("touchstart",(function(e){i.checkTimeout=setTimeout((function(){i.touchMove=true;n=t.nextColumn();s=n?n.getWidth()/2:0;o=t.prevColumn();a=o?o.getWidth()/2:0;u=0;l=0;r=false;i.startMove(e,t)}),i.checkPeriod)}),{passive:true});e.addEventListener("touchmove",(function(e){var f,h;if(i.moving){i.moveHover(e);if(!r){r=e.touches[0].pageX}f=e.touches[0].pageX-r;if(f>0){if(n&&f-u>s){h=n;if(h!==t){r=e.touches[0].pageX;h.getElement().parentNode.insertBefore(i.placeholderElement,h.getElement().nextSibling);i.moveColumn(h,true)}}}else{if(o&&-f-l>a){h=o;if(h!==t){r=e.touches[0].pageX;h.getElement().parentNode.insertBefore(i.placeholderElement,h.getElement());i.moveColumn(h,false)}}}if(h){n=h.nextColumn();u=s;s=n?n.getWidth()/2:0;o=h.prevColumn();l=a;a=o?o.getWidth()/2:0}}}),{passive:true});e.addEventListener("touchend",(function(t){if(i.checkTimeout){clearTimeout(i.checkTimeout)}if(i.moving){i.endMove(t)}}))};ft.prototype.startMove=function(t,i){var e=i.getElement();this.moving=i;this.startX=(this.touchMove?t.touches[0].pageX:t.pageX)-H.prototype.helpers.elOffset(e).left;this.table.element.classList.add("tabulator-block-select");this.placeholderElement.style.width=i.getWidth()+"px";this.placeholderElement.style.height=i.getHeight()+"px";e.parentNode.insertBefore(this.placeholderElement,e);e.parentNode.removeChild(e);this.hoverElement=e.cloneNode(true);this.hoverElement.classList.add("tabulator-moving");this.table.columnManager.getElement().appendChild(this.hoverElement);this.hoverElement.style.left="0";this.hoverElement.style.bottom="0";if(!this.touchMove){this._bindMouseMove();document.body.addEventListener("mousemove",this.moveHover);document.body.addEventListener("mouseup",this.endMove)}this.moveHover(t)};ft.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach((function(t){if(t.modules.moveColumn.mousemove){t.getElement().addEventListener("mousemove",t.modules.moveColumn.mousemove)}}))};ft.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach((function(t){if(t.modules.moveColumn.mousemove){t.getElement().removeEventListener("mousemove",t.modules.moveColumn.mousemove)}}))};ft.prototype.moveColumn=function(t,i){var e=this.moving.getCells();this.toCol=t;this.toColAfter=i;if(i){t.getCells().forEach((function(t,i){var r=t.getElement(true);r.parentNode.insertBefore(e[i].getElement(),r.nextSibling)}))}else{t.getCells().forEach((function(t,i){var r=t.getElement(true);r.parentNode.insertBefore(e[i].getElement(),r)}))}};ft.prototype.endMove=function(t){if(t.which===1||this.touchMove){this._unbindMouseMove();this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling);this.placeholderElement.parentNode.removeChild(this.placeholderElement);this.hoverElement.parentNode.removeChild(this.hoverElement);this.table.element.classList.remove("tabulator-block-select");if(this.toCol){this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter)}this.moving=false;this.toCol=false;this.toColAfter=false;if(!this.touchMove){document.body.removeEventListener("mousemove",this.moveHover);document.body.removeEventListener("mouseup",this.endMove)}}};ft.prototype.moveHover=function(t){var i=this,e=i.table.columnManager.getElement(),r=e.scrollLeft,n=(i.touchMove?t.touches[0].pageX:t.pageX)-H.prototype.helpers.elOffset(e).left+r,o;i.hoverElement.style.left=n-i.startX+"px";if(n-r<i.autoScrollMargin){if(!i.autoScrollTimeout){i.autoScrollTimeout=setTimeout((function(){o=Math.max(0,r-5);i.table.rowManager.getElement().scrollLeft=o;i.autoScrollTimeout=false}),1)}}if(r+e.clientWidth-n<i.autoScrollMargin){if(!i.autoScrollTimeout){i.autoScrollTimeout=setTimeout((function(){o=Math.min(e.clientWidth,r+5);i.table.rowManager.getElement().scrollLeft=o;i.autoScrollTimeout=false}),1)}}};H.prototype.registerModule("moveColumn",ft);var ht=function t(i){this.table=i;this.placeholderElement=this.createPlaceholderElement();this.hoverElement=false;this.checkTimeout=false;this.checkPeriod=150;this.moving=false;this.toRow=false;this.toRowAfter=false;this.hasHandle=false;this.startY=0;this.startX=0;this.moveHover=this.moveHover.bind(this);this.endMove=this.endMove.bind(this);this.tableRowDropEvent=false;this.touchMove=false;this.connection=false;this.connectionSelectorsTables=false;this.connectionSelectorsElements=false;this.connectionElements=[];this.connections=[];this.connectedTable=false;this.connectedRow=false};ht.prototype.createPlaceholderElement=function(){var t=document.createElement("div");t.classList.add("tabulator-row");t.classList.add("tabulator-row-placeholder");return t};ht.prototype.initialize=function(t){this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables;this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements;this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements};ht.prototype.setHandle=function(t){this.hasHandle=t};ht.prototype.initializeGroupHeader=function(t){var i=this,e={};e.mouseup=function(t){i.tableRowDrop(t,row)}.bind(i);e.mousemove=function(e){if(e.pageY-H.prototype.helpers.elOffset(t.element).top+i.table.rowManager.element.scrollTop>t.getHeight()/2){if(i.toRow!==t||!i.toRowAfter){var r=t.getElement();r.parentNode.insertBefore(i.placeholderElement,r.nextSibling);i.moveRow(t,true)}}else{if(i.toRow!==t||i.toRowAfter){var r=t.getElement();if(r.previousSibling){r.parentNode.insertBefore(i.placeholderElement,r);i.moveRow(t,false)}}}}.bind(i);t.modules.moveRow=e};ht.prototype.initializeRow=function(t){var i=this,e={},r;e.mouseup=function(e){i.tableRowDrop(e,t)}.bind(i);e.mousemove=function(e){var r=t.getElement();if(e.pageY-H.prototype.helpers.elOffset(r).top+i.table.rowManager.element.scrollTop>t.getHeight()/2){if(i.toRow!==t||!i.toRowAfter){r.parentNode.insertBefore(i.placeholderElement,r.nextSibling);i.moveRow(t,true)}}else{if(i.toRow!==t||i.toRowAfter){r.parentNode.insertBefore(i.placeholderElement,r);i.moveRow(t,false)}}}.bind(i);if(!this.hasHandle){r=t.getElement();r.addEventListener("mousedown",(function(e){if(e.which===1){i.checkTimeout=setTimeout((function(){i.startMove(e,t)}),i.checkPeriod)}}));r.addEventListener("mouseup",(function(t){if(t.which===1){if(i.checkTimeout){clearTimeout(i.checkTimeout)}}}));this.bindTouchEvents(t,t.getElement())}t.modules.moveRow=e};ht.prototype.initializeCell=function(t){var i=this,e=t.getElement(true);e.addEventListener("mousedown",(function(e){if(e.which===1){i.checkTimeout=setTimeout((function(){i.startMove(e,t.row)}),i.checkPeriod)}}));e.addEventListener("mouseup",(function(t){if(t.which===1){if(i.checkTimeout){clearTimeout(i.checkTimeout)}}}));this.bindTouchEvents(t.row,e)};ht.prototype.bindTouchEvents=function(t,i){var e=this,r=false,n,o,s,a,u,l;i.addEventListener("touchstart",(function(i){e.checkTimeout=setTimeout((function(){e.touchMove=true;n=t.nextRow();s=n?n.getHeight()/2:0;o=t.prevRow();a=o?o.getHeight()/2:0;u=0;l=0;r=false;e.startMove(i,t)}),e.checkPeriod)}),{passive:true});i.addEventListener("touchmove",(function(i){var f,h;if(e.moving){i.preventDefault();e.moveHover(i);if(!r){r=i.touches[0].pageY}f=i.touches[0].pageY-r;if(f>0){if(n&&f-u>s){h=n;if(h!==t){r=i.touches[0].pageY;h.getElement().parentNode.insertBefore(e.placeholderElement,h.getElement().nextSibling);e.moveRow(h,true)}}}else{if(o&&-f-l>a){h=o;if(h!==t){r=i.touches[0].pageY;h.getElement().parentNode.insertBefore(e.placeholderElement,h.getElement());e.moveRow(h,false)}}}if(h){n=h.nextRow();u=s;s=n?n.getHeight()/2:0;o=h.prevRow();l=a;a=o?o.getHeight()/2:0}}}));i.addEventListener("touchend",(function(t){if(e.checkTimeout){clearTimeout(e.checkTimeout)}if(e.moving){e.endMove(t);e.touchMove=false}}))};ht.prototype._bindMouseMove=function(){var t=this;t.table.rowManager.getDisplayRows().forEach((function(t){if((t.type==="row"||t.type==="group")&&t.modules.moveRow.mousemove){t.getElement().addEventListener("mousemove",t.modules.moveRow.mousemove)}}))};ht.prototype._unbindMouseMove=function(){var t=this;t.table.rowManager.getDisplayRows().forEach((function(t){if((t.type==="row"||t.type==="group")&&t.modules.moveRow.mousemove){t.getElement().removeEventListener("mousemove",t.modules.moveRow.mousemove)}}))};ht.prototype.startMove=function(t,i){var e=i.getElement();this.setStartPosition(t,i);this.moving=i;this.table.element.classList.add("tabulator-block-select");this.placeholderElement.style.width=i.getWidth()+"px";this.placeholderElement.style.height=i.getHeight()+"px";if(!this.connection){e.parentNode.insertBefore(this.placeholderElement,e);e.parentNode.removeChild(e)}else{this.table.element.classList.add("tabulator-movingrow-sending");this.connectToTables(i)}this.hoverElement=e.cloneNode(true);this.hoverElement.classList.add("tabulator-moving");if(this.connection){document.body.appendChild(this.hoverElement);this.hoverElement.style.left="0";this.hoverElement.style.top="0";this.hoverElement.style.width=this.table.element.clientWidth+"px";this.hoverElement.style.whiteSpace="nowrap";this.hoverElement.style.overflow="hidden";this.hoverElement.style.pointerEvents="none"}else{this.table.rowManager.getTableElement().appendChild(this.hoverElement);this.hoverElement.style.left="0";this.hoverElement.style.top="0";this._bindMouseMove()}document.body.addEventListener("mousemove",this.moveHover);document.body.addEventListener("mouseup",this.endMove);this.moveHover(t)};ht.prototype.setStartPosition=function(t,i){var e=this.touchMove?t.touches[0].pageX:t.pageX,r=this.touchMove?t.touches[0].pageY:t.pageY,n,o;n=i.getElement();if(this.connection){o=n.getBoundingClientRect();this.startX=o.left-e+window.pageXOffset;this.startY=o.top-r+window.pageYOffset}else{this.startY=r-n.getBoundingClientRect().top}};ht.prototype.endMove=function(t){if(!t||t.which===1||this.touchMove){this._unbindMouseMove();if(!this.connection){this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling);this.placeholderElement.parentNode.removeChild(this.placeholderElement)}this.hoverElement.parentNode.removeChild(this.hoverElement);this.table.element.classList.remove("tabulator-block-select");if(this.toRow){this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter)}this.moving=false;this.toRow=false;this.toRowAfter=false;document.body.removeEventListener("mousemove",this.moveHover);document.body.removeEventListener("mouseup",this.endMove);if(this.connection){this.table.element.classList.remove("tabulator-movingrow-sending");this.disconnectFromTables()}}};ht.prototype.moveRow=function(t,i){this.toRow=t;this.toRowAfter=i};ht.prototype.moveHover=function(t){if(this.connection){this.moveHoverConnections.call(this,t)}else{this.moveHoverTable.call(this,t)}};ht.prototype.moveHoverTable=function(t){var i=this.table.rowManager.getElement(),e=i.scrollTop,r=(this.touchMove?t.touches[0].pageY:t.pageY)-i.getBoundingClientRect().top+e;this.hoverElement.style.top=r-this.startY+"px"};ht.prototype.moveHoverConnections=function(t){this.hoverElement.style.left=this.startX+(this.touchMove?t.touches[0].pageX:t.pageX)+"px";this.hoverElement.style.top=this.startY+(this.touchMove?t.touches[0].pageY:t.pageY)+"px"};ht.prototype.elementRowDrop=function(t,i,e){if(this.table.options.movableRowsElementDrop){this.table.options.movableRowsElementDrop(t,i,e?e.getComponent():false)}};ht.prototype.connectToTables=function(t){var i=this;var e;if(this.connectionSelectorsTables){e=this.table.modules.comms.getConnections(this.connectionSelectorsTables);this.table.options.movableRowsSendingStart.call(this.table,e);this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","connect",{row:t})}if(this.connectionSelectorsElements){this.connectionElements=[];if(!Array.isArray(this.connectionSelectorsElements)){this.connectionSelectorsElements=[this.connectionSelectorsElements]}this.connectionSelectorsElements.forEach((function(t){if(typeof t==="string"){i.connectionElements=i.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(t)))}else{i.connectionElements.push(t)}}));this.connectionElements.forEach((function(t){var e=function e(r){i.elementRowDrop(r,t,i.moving)};t.addEventListener("mouseup",e);t.tabulatorElementDropEvent=e;t.classList.add("tabulator-movingrow-receiving")}))}};ht.prototype.disconnectFromTables=function(){var t;if(this.connectionSelectorsTables){t=this.table.modules.comms.getConnections(this.connectionSelectorsTables);this.table.options.movableRowsSendingStop.call(this.table,t);this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","disconnect")}this.connectionElements.forEach((function(t){t.classList.remove("tabulator-movingrow-receiving");t.removeEventListener("mouseup",t.tabulatorElementDropEvent);delete t.tabulatorElementDropEvent}))};ht.prototype.connect=function(t,i){var e=this;if(!this.connectedTable){this.connectedTable=t;this.connectedRow=i;this.table.element.classList.add("tabulator-movingrow-receiving");e.table.rowManager.getDisplayRows().forEach((function(t){if(t.type==="row"&&t.modules.moveRow&&t.modules.moveRow.mouseup){t.getElement().addEventListener("mouseup",t.modules.moveRow.mouseup)}}));e.tableRowDropEvent=e.tableRowDrop.bind(e);e.table.element.addEventListener("mouseup",e.tableRowDropEvent);this.table.options.movableRowsReceivingStart.call(this.table,i,t);return true}else{console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable);return false}};ht.prototype.disconnect=function(t){var i=this;if(t===this.connectedTable){this.connectedTable=false;this.connectedRow=false;this.table.element.classList.remove("tabulator-movingrow-receiving");i.table.rowManager.getDisplayRows().forEach((function(t){if(t.type==="row"&&t.modules.moveRow&&t.modules.moveRow.mouseup){t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)}}));i.table.element.removeEventListener("mouseup",i.tableRowDropEvent);this.table.options.movableRowsReceivingStop.call(this.table,t)}else{console.warn("Move Row Error - trying to disconnect from non connected table")}};ht.prototype.dropComplete=function(t,i,e){var r=false;if(e){switch(T(this.table.options.movableRowsSender)){case"string":r=this.senders[this.table.options.movableRowsSender];break;case"function":r=this.table.options.movableRowsSender;break}if(r){r.call(this,this.moving.getComponent(),i?i.getComponent():undefined,t)}else{if(this.table.options.movableRowsSender){console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender)}}this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),i?i.getComponent():undefined,t)}else{this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),i?i.getComponent():undefined,t)}this.endMove()};ht.prototype.tableRowDrop=function(t,i){var e=false,r=false;t.stopImmediatePropagation();switch(T(this.table.options.movableRowsReceiver)){case"string":e=this.receivers[this.table.options.movableRowsReceiver];break;case"function":e=this.table.options.movableRowsReceiver;break}if(e){r=e.call(this,this.connectedRow.getComponent(),i?i.getComponent():undefined,this.connectedTable)}else{console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver)}if(r){this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),i?i.getComponent():undefined,this.connectedTable)}else{this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),i?i.getComponent():undefined,this.connectedTable)}this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:i,success:r})};ht.prototype.receivers={insert:function t(i,e,r){this.table.addRow(i.getData(),undefined,e);return true},add:function t(i,e,r){this.table.addRow(i.getData());return true},update:function t(i,e,r){if(e){e.update(i.getData());return true}return false},replace:function t(i,e,r){if(e){this.table.addRow(i.getData(),undefined,e);e.delete();return true}return false}};ht.prototype.senders={delete:function t(i,e,r){i.delete()}};ht.prototype.commsReceived=function(t,i,e){switch(i){case"connect":return this.connect(t,e.row);case"disconnect":return this.disconnect(t);case"dropcomplete":return this.dropComplete(t,e.row,e.success)}};H.prototype.registerModule("moveRow",ht);var ct=function t(i){this.table=i;this.allowedTypes=["","data","edit","clipboard"];this.enabled=true};ct.prototype.initializeColumn=function(t){var i=this,e=false,r={};this.allowedTypes.forEach((function(n){var o="mutator"+(n.charAt(0).toUpperCase()+n.slice(1)),s;if(t.definition[o]){s=i.lookupMutator(t.definition[o]);if(s){e=true;r[o]={mutator:s,params:t.definition[o+"Params"]||{}}}}}));if(e){t.modules.mutate=r}};ct.prototype.lookupMutator=function(t){var i=false;switch(typeof t==="undefined"?"undefined":T(t)){case"string":if(this.mutators[t]){i=this.mutators[t]}else{console.warn("Mutator Error - No such mutator found, ignoring: ",t)}break;case"function":i=t;break}return i};ct.prototype.transformRow=function(t,i,e){var r=this,n="mutator"+(i.charAt(0).toUpperCase()+i.slice(1)),o;if(this.enabled){r.table.columnManager.traverse((function(r){var s,a,u;if(r.modules.mutate){s=r.modules.mutate[n]||r.modules.mutate.mutator||false;if(s){o=r.getFieldValue(typeof e!=="undefined"?e:t);if(i=="data"||typeof o!=="undefined"){u=r.getComponent();a=typeof s.params==="function"?s.params(o,t,i,u):s.params;r.setFieldValue(t,s.mutator(o,t,i,a,u))}}}}))}return t};ct.prototype.transformCell=function(t,i){var e=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||false,r={};if(e){r=Object.assign(r,t.row.getData());t.column.setFieldValue(r,i);return e.mutator(i,r,"edit",e.params,t.getComponent())}else{return i}};ct.prototype.enable=function(){this.enabled=true};ct.prototype.disable=function(){this.enabled=false};ct.prototype.mutators={};H.prototype.registerModule("mutator",ct);var dt=function t(i){this.table=i;this.mode="local";this.progressiveLoad=false;this.size=0;this.page=1;this.count=5;this.max=1;this.displayIndex=0;this.initialLoad=true;this.pageSizes=[];this.dataReceivedNames={};this.dataSentNames={};this.createElements()};dt.prototype.createElements=function(){var t;this.element=document.createElement("span");this.element.classList.add("tabulator-paginator");this.pagesElement=document.createElement("span");this.pagesElement.classList.add("tabulator-pages");t=document.createElement("button");t.classList.add("tabulator-page");t.setAttribute("type","button");t.setAttribute("role","button");t.setAttribute("aria-label","");t.setAttribute("title","");this.firstBut=t.cloneNode(true);this.firstBut.setAttribute("data-page","first");this.prevBut=t.cloneNode(true);this.prevBut.setAttribute("data-page","prev");this.nextBut=t.cloneNode(true);this.nextBut.setAttribute("data-page","next");this.lastBut=t.cloneNode(true);this.lastBut.setAttribute("data-page","last");if(this.table.options.paginationSizeSelector){this.pageSizeSelect=document.createElement("select");this.pageSizeSelect.classList.add("tabulator-page-size")}};dt.prototype.generatePageSizeSelectList=function(){var t=this;var i=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector)){i=this.table.options.paginationSizeSelector;this.pageSizes=i;if(this.pageSizes.indexOf(this.size)==-1){i.unshift(this.size)}}else{if(this.pageSizes.indexOf(this.size)==-1){i=[];for(var e=1;e<5;e++){i.push(this.size*e)}this.pageSizes=i}else{i=this.pageSizes}}while(this.pageSizeSelect.firstChild){this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild)}i.forEach((function(i){var e=document.createElement("option");e.value=i;if(i===true){t.table.modules.localize.bind("pagination|all",(function(t){e.innerHTML=t}))}else{e.innerHTML=i}t.pageSizeSelect.appendChild(e)}));this.pageSizeSelect.value=this.size}};dt.prototype.initialize=function(t){var i=this,e,r,n;this.dataSentNames=Object.assign({},this.paginationDataSentNames);this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent);this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames);this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived);i.table.modules.localize.bind("pagination|first",(function(t){i.firstBut.innerHTML=t}));i.table.modules.localize.bind("pagination|first_title",(function(t){i.firstBut.setAttribute("aria-label",t);i.firstBut.setAttribute("title",t)}));i.table.modules.localize.bind("pagination|prev",(function(t){i.prevBut.innerHTML=t}));i.table.modules.localize.bind("pagination|prev_title",(function(t){i.prevBut.setAttribute("aria-label",t);i.prevBut.setAttribute("title",t)}));i.table.modules.localize.bind("pagination|next",(function(t){i.nextBut.innerHTML=t}));i.table.modules.localize.bind("pagination|next_title",(function(t){i.nextBut.setAttribute("aria-label",t);i.nextBut.setAttribute("title",t)}));i.table.modules.localize.bind("pagination|last",(function(t){i.lastBut.innerHTML=t}));i.table.modules.localize.bind("pagination|last_title",(function(t){i.lastBut.setAttribute("aria-label",t);i.lastBut.setAttribute("title",t)}));i.firstBut.addEventListener("click",(function(){i.setPage(1).then((function(){})).catch((function(){}))}));i.prevBut.addEventListener("click",(function(){i.previousPage().then((function(){})).catch((function(){}))}));i.nextBut.addEventListener("click",(function(){i.nextPage().then((function(){})).catch((function(){}))}));i.lastBut.addEventListener("click",(function(){i.setPage(i.max).then((function(){})).catch((function(){}))}));if(i.table.options.paginationElement){i.element=i.table.options.paginationElement}if(this.pageSizeSelect){e=document.createElement("label");i.table.modules.localize.bind("pagination|page_size",(function(t){i.pageSizeSelect.setAttribute("aria-label",t);i.pageSizeSelect.setAttribute("title",t);e.innerHTML=t}));i.element.appendChild(e);i.element.appendChild(i.pageSizeSelect);i.pageSizeSelect.addEventListener("change",(function(t){i.setPageSize(i.pageSizeSelect.value=="true"?true:i.pageSizeSelect.value);i.setPage(1).then((function(){})).catch((function(){}))}))}i.element.appendChild(i.firstBut);i.element.appendChild(i.prevBut);i.element.appendChild(i.pagesElement);i.element.appendChild(i.nextBut);i.element.appendChild(i.lastBut);if(!i.table.options.paginationElement&&!t){i.table.footerManager.append(i.element,i)}i.mode=i.table.options.pagination;if(i.table.options.paginationSize){i.size=i.table.options.paginationSize}else{r=document.createElement("div");r.classList.add("tabulator-row");r.style.visibility=t;n=document.createElement("div");n.classList.add("tabulator-cell");n.innerHTML="Page Row Test";r.appendChild(n);i.table.rowManager.getTableElement().appendChild(r);i.size=Math.floor(i.table.rowManager.getElement().clientHeight/r.offsetHeight);i.table.rowManager.getTableElement().removeChild(r)}i.count=i.table.options.paginationButtonCount;i.generatePageSizeSelectList()};dt.prototype.initializeProgressive=function(t){this.initialize(true);this.mode="progressive_"+t;this.progressiveLoad=true};dt.prototype.setDisplayIndex=function(t){this.displayIndex=t};dt.prototype.getDisplayIndex=function(){return this.displayIndex};dt.prototype.setMaxRows=function(t){if(!t){this.max=1}else{this.max=this.size===true?1:Math.ceil(t/this.size)}if(this.page>this.max){this.page=this.max}};dt.prototype.reset=function(t,i){if(this.mode=="local"||t){this.page=1}if(i){this.initialLoad=true}return true};dt.prototype.setMaxPage=function(t){t=parseInt(t);this.max=t||1;if(this.page>this.max){this.page=this.max;this.trigger()}};dt.prototype.setPage=function(t){var i=this;var e=this;switch(t){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise((function(r,n){t=parseInt(t);if(t>0&&t<=i.max||i.mode!=="local"){i.page=t;i.trigger().then((function(){r()})).catch((function(){n()}));if(e.table.options.persistence&&e.table.modExists("persistence",true)&&e.table.modules.persistence.config.page){e.table.modules.persistence.save("page")}}else{console.warn("Pagination Error - Requested page is out of range of 1 - "+i.max+":",t);n()}}))};dt.prototype.setPageToRow=function(t){var i=this;return new Promise((function(e,r){var n=i.table.rowManager.getDisplayRows(i.displayIndex-1);var o=n.indexOf(t);if(o>-1){var s=i.size===true?1:Math.ceil((o+1)/i.size);i.setPage(s).then((function(){e()})).catch((function(){r()}))}else{console.warn("Pagination Error - Requested row is not visible");r()}}))};dt.prototype.setPageSize=function(t){if(t!==true){t=parseInt(t)}if(t>0){this.size=t}if(this.pageSizeSelect){this.generatePageSizeSelectList()}if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.page){this.table.modules.persistence.save("page")}};dt.prototype._setPageButtons=function(){var t=this;var i=Math.floor((this.count-1)/2);var e=Math.ceil((this.count-1)/2);var r=this.max-this.page+i+1<this.count?this.max-this.count+1:Math.max(this.page-i,1);var n=this.page<=e?Math.min(this.count,this.max):Math.min(this.page+e,this.max);while(t.pagesElement.firstChild){t.pagesElement.removeChild(t.pagesElement.firstChild)}if(t.page==1){t.firstBut.disabled=true;t.prevBut.disabled=true}else{t.firstBut.disabled=false;t.prevBut.disabled=false}if(t.page==t.max){t.lastBut.disabled=true;t.nextBut.disabled=true}else{t.lastBut.disabled=false;t.nextBut.disabled=false}for(var o=r;o<=n;o++){if(o>0&&o<=t.max){t.pagesElement.appendChild(t._generatePageButton(o))}}this.footerRedraw()};dt.prototype._generatePageButton=function(t){var i=this,e=document.createElement("button");e.classList.add("tabulator-page");if(t==i.page){e.classList.add("active")}e.setAttribute("type","button");e.setAttribute("role","button");i.table.modules.localize.bind("pagination|page_title",(function(i){e.setAttribute("aria-label",i+" "+t);e.setAttribute("title",i+" "+t)}));e.setAttribute("data-page",t);e.textContent=t;e.addEventListener("click",(function(e){i.setPage(t).then((function(){})).catch((function(){}))}));return e};dt.prototype.previousPage=function(){var t=this;return new Promise((function(i,e){if(t.page>1){t.page--;t.trigger().then((function(){i()})).catch((function(){e()}));if(t.table.options.persistence&&t.table.modExists("persistence",true)&&t.table.modules.persistence.config.page){t.table.modules.persistence.save("page")}}else{console.warn("Pagination Error - Previous page would be less than page 1:",0);e()}}))};dt.prototype.nextPage=function(){var t=this;return new Promise((function(i,e){if(t.page<t.max){t.page++;t.trigger().then((function(){i()})).catch((function(){e()}));if(t.table.options.persistence&&t.table.modExists("persistence",true)&&t.table.modules.persistence.config.page){t.table.modules.persistence.save("page")}}else{if(!t.progressiveLoad){console.warn("Pagination Error - Next page would be greater than maximum page of "+t.max+":",t.max+1)}e()}}))};dt.prototype.getPage=function(){return this.page};dt.prototype.getPageMax=function(){return this.max};dt.prototype.getPageSize=function(t){return this.size};dt.prototype.getMode=function(){return this.mode};dt.prototype.getRows=function(t){var i,e,r;if(this.mode=="local"){i=[];if(this.size===true){e=0;r=t.length}else{e=this.size*(this.page-1);r=e+parseInt(this.size)}this._setPageButtons();for(var n=e;n<r;n++){if(t[n]){i.push(t[n])}}return i}else{this._setPageButtons();return t.slice(0)}};dt.prototype.trigger=function(){var t=this;var i;return new Promise((function(e,r){switch(t.mode){case"local":i=t.table.rowManager.scrollLeft;t.table.rowManager.refreshActiveData("page");t.table.rowManager.scrollHorizontal(i);t.table.options.pageLoaded.call(t.table,t.getPage());e();break;case"remote":case"progressive_load":case"progressive_scroll":t.table.modules.ajax.blockActiveRequest();t._getRemotePage().then((function(){e()})).catch((function(){r()}));break;default:console.warn("Pagination Error - no such pagination mode:",t.mode);r()}}))};dt.prototype._getRemotePage=function(){var t=this;var i=this,e,r;return new Promise((function(n,o){if(!i.table.modExists("ajax",true)){o()}e=H.prototype.helpers.deepClone(i.table.modules.ajax.getParams()||{});r=i.table.modules.ajax.getParams();r[t.dataSentNames.page]=i.page;if(t.size){r[t.dataSentNames.size]=t.size}if(t.table.options.ajaxSorting&&t.table.modExists("sort")){var s=i.table.modules.sort.getSort();s.forEach((function(t){delete t.column}));r[t.dataSentNames.sorters]=s}if(t.table.options.ajaxFiltering&&t.table.modExists("filter")){var a=i.table.modules.filter.getFilters(true,true);r[t.dataSentNames.filters]=a}i.table.modules.ajax.setParams(r);i.table.modules.ajax.sendRequest(t.progressiveLoad).then((function(t){i._parseRemoteData(t);n()})).catch((function(t){o()}));i.table.modules.ajax.setParams(e)}))};dt.prototype._parseRemoteData=function(t){var i=this,e,t,r;if(typeof t[this.dataReceivedNames.last_page]==="undefined"){console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.last_page+"' property")}if(t[this.dataReceivedNames.data]){this.max=parseInt(t[this.dataReceivedNames.last_page])||1;if(this.progressiveLoad){switch(this.mode){case"progressive_load":if(this.page==1){this.table.rowManager.setData(t[this.dataReceivedNames.data],false,this.initialLoad&&this.page==1)}else{this.table.rowManager.addRows(t[this.dataReceivedNames.data])}if(this.page<this.max){setTimeout((function(){i.nextPage().then((function(){})).catch((function(){}))}),i.table.options.ajaxProgressiveLoadDelay)}break;case"progressive_scroll":t=this.table.rowManager.getData().concat(t[this.dataReceivedNames.data]);this.table.rowManager.setData(t,true,this.initialLoad&&this.page==1);r=this.table.options.ajaxProgressiveLoadScrollMargin||this.table.rowManager.element.clientHeight*2;if(i.table.rowManager.element.scrollHeight<=i.table.rowManager.element.clientHeight+r){i.nextPage().then((function(){})).catch((function(){}))}break}}else{e=this.table.rowManager.scrollLeft;this.table.rowManager.setData(t[this.dataReceivedNames.data],false,this.initialLoad&&this.page==1);this.table.rowManager.scrollHorizontal(e);this.table.columnManager.scrollHorizontal(e);this.table.options.pageLoaded.call(this.table,this.getPage())}this.initialLoad=false}else{console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.data+"' property")}};dt.prototype.footerRedraw=function(){var t=this.table.footerManager.element;if(Math.ceil(t.clientWidth)-t.scrollWidth<0){this.pagesElement.style.display="none"}else{this.pagesElement.style.display="";if(Math.ceil(t.clientWidth)-t.scrollWidth<0){this.pagesElement.style.display="none"}}};dt.prototype.paginationDataSentNames={page:"page",size:"size",sorters:"sorters",filters:"filters"};dt.prototype.paginationDataReceivedNames={current_page:"current_page",last_page:"last_page",data:"data"};H.prototype.registerModule("page",dt);var bt=function t(i){this.table=i;this.mode="";this.id="";this.defWatcherBlock=false;this.config={};this.readFunc=false;this.writeFunc=false};bt.prototype.localStorageTest=function(){var t="_tabulator_test";try{window.localStorage.setItem(t,t);window.localStorage.removeItem(t);return true}catch(t){return false}};bt.prototype.initialize=function(){var t=this.table.options.persistenceMode,i=this.table.options.persistenceID,e;this.mode=t!==true?t:this.localStorageTest()?"local":"cookie";if(this.table.options.persistenceReaderFunc){if(typeof this.table.options.persistenceReaderFunc==="function"){this.readFunc=this.table.options.persistenceReaderFunc}else{if(this.readers[this.table.options.persistenceReaderFunc]){this.readFunc=this.readers[this.table.options.persistenceReaderFunc]}else{console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc)}}}else{if(this.readers[this.mode]){this.readFunc=this.readers[this.mode]}else{console.warn("Persistence Read Error - invalid reader set",this.mode)}}if(this.table.options.persistenceWriterFunc){if(typeof this.table.options.persistenceWriterFunc==="function"){this.writeFunc=this.table.options.persistenceWriterFunc}else{if(this.readers[this.table.options.persistenceWriterFunc]){this.writeFunc=this.readers[this.table.options.persistenceWriterFunc]}else{console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc)}}}else{if(this.writers[this.mode]){this.writeFunc=this.writers[this.mode]}else{console.warn("Persistence Write Error - invalid writer set",this.mode)}}this.id="tabulator-"+(i||this.table.element.getAttribute("id")||"");this.config={sort:this.table.options.persistence===true||this.table.options.persistence.sort,filter:this.table.options.persistence===true||this.table.options.persistence.filter,group:this.table.options.persistence===true||this.table.options.persistence.group,page:this.table.options.persistence===true||this.table.options.persistence.page,columns:this.table.options.persistence===true?["title","width","visible"]:this.table.options.persistence.columns};if(this.config.page){e=this.retreiveData("page");if(e){if(typeof e.paginationSize!=="undefined"&&(this.config.page===true||this.config.page.size)){this.table.options.paginationSize=e.paginationSize}if(typeof e.paginationInitialPage!=="undefined"&&(this.config.page===true||this.config.page.page)){this.table.options.paginationInitialPage=e.paginationInitialPage}}}if(this.config.group){e=this.retreiveData("group");if(e){if(typeof e.groupBy!=="undefined"&&(this.config.group===true||this.config.group.groupBy)){this.table.options.groupBy=e.groupBy}if(typeof e.groupStartOpen!=="undefined"&&(this.config.group===true||this.config.group.groupStartOpen)){this.table.options.groupStartOpen=e.groupStartOpen}if(typeof e.groupHeader!=="undefined"&&(this.config.group===true||this.config.group.groupHeader)){this.table.options.groupHeader=e.groupHeader}}}if(this.config.columns){this.table.options.columns=this.load("columns",this.table.options.columns)}};bt.prototype.initializeColumn=function(t){var i=this,e,r;if(this.config.columns){this.defWatcherBlock=true;e=t.getDefinition();r=this.config.columns===true?Object.keys(e):this.config.columns;r.forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);var n=e[t];if(r){Object.defineProperty(e,t,{set:function t(e){n=e;if(!i.defWatcherBlock){i.save("columns")}if(r.set){r.set(e)}},get:function t(){if(r.get){r.get()}return n}})}}));this.defWatcherBlock=false}};bt.prototype.load=function(t,i){var e=this.retreiveData(t);if(i){e=e?this.mergeDefinition(i,e):i}return e};bt.prototype.retreiveData=function(t){return this.readFunc?this.readFunc(this.id,t):false};bt.prototype.mergeDefinition=function(t,i){var e=this,r=[];i=i||[];i.forEach((function(i,n){var o=e._findColumn(t,i),s;if(o){if(e.config.columns===true||e.config.columns==undefined){s=Object.keys(o);s.push("width")}else{s=e.config.columns}s.forEach((function(t){if(t!=="columns"&&typeof i[t]!=="undefined"){o[t]=i[t]}}));if(o.columns){o.columns=e.mergeDefinition(o.columns,i.columns)}r.push(o)}}));t.forEach((function(t,n){var o=e._findColumn(i,t);if(!o){if(r.length>n){r.splice(n,0,t)}else{r.push(t)}}}));return r};bt.prototype._findColumn=function(t,i){var e=i.columns?"group":i.field?"field":"object";return t.find((function(t){switch(e){case"group":return t.title===i.title&&t.columns.length===i.columns.length;case"field":return t.field===i.field;case"object":return t===i}}))};bt.prototype.save=function(t){var i={};switch(t){case"columns":i=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":i=this.table.modules.filter.getFilters();break;case"sort":i=this.validateSorters(this.table.modules.sort.getSort());break;case"group":i=this.getGroupConfig();break;case"page":i=this.getPageConfig();break}if(this.writeFunc){this.writeFunc(this.id,t,i)}};bt.prototype.validateSorters=function(t){t.forEach((function(t){t.column=t.field;delete t.field}));return t};bt.prototype.getGroupConfig=function(){var t={};if(this.config.group){if(this.config.group===true||this.config.group.groupBy){t.groupBy=this.table.options.groupBy}if(this.config.group===true||this.config.group.groupStartOpen){t.groupStartOpen=this.table.options.groupStartOpen}if(this.config.group===true||this.config.group.groupHeader){t.groupHeader=this.table.options.groupHeader}}return t};bt.prototype.getPageConfig=function(){var t={};if(this.config.page){if(this.config.page===true||this.config.page.size){t.paginationSize=this.table.modules.page.getPageSize()}if(this.config.page===true||this.config.page.page){t.paginationInitialPage=this.table.modules.page.getPage()}}return t};bt.prototype.parseColumns=function(t){var i=this,e=[],r=["headerContextMenu","headerMenu","contextMenu","clickMenu"];t.forEach((function(t){var n={},o=t.getDefinition(),s;if(t.isGroup){n.title=o.title;n.columns=i.parseColumns(t.getColumns())}else{n.field=t.getField();if(i.config.columns===true||i.config.columns==undefined){s=Object.keys(o);s.push("width")}else{s=i.config.columns}s.forEach((function(i){switch(i){case"width":n.width=t.getWidth();break;case"visible":n.visible=t.visible;break;default:if(typeof o[i]!=="function"&&r.indexOf(i)===-1){n[i]=o[i]}}}))}e.push(n)}));return e};bt.prototype.readers={local:function t(i,e){var r=localStorage.getItem(i+"-"+e);return r?JSON.parse(r):false},cookie:function t(i,e){var t=document.cookie,r=i+"-"+e,n=t.indexOf(r+"="),o,s;if(n>-1){t=t.substr(n);o=t.indexOf(";");if(o>-1){t=t.substr(0,o)}s=t.replace(r+"=","")}return s?JSON.parse(s):false}};bt.prototype.writers={local:function t(i,e,r){localStorage.setItem(i+"-"+e,JSON.stringify(r))},cookie:function t(i,e,r){var n=new Date;n.setDate(n.getDate()+1e4);document.cookie=i+"-"+e+"="+JSON.stringify(r)+"; expires="+n.toUTCString()}};H.prototype.registerModule("persistence",bt);var pt=function t(i){this.table=i;this.element=false;this.manualBlock=false};pt.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this));window.addEventListener("afterprint",this.cleanup.bind(this))};pt.prototype.replaceTable=function(){if(!this.manualBlock){this.element=document.createElement("div");this.element.classList.add("tabulator-print-table");this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print"));this.table.element.style.display="none";this.table.element.parentNode.insertBefore(this.element,this.table.element)}};pt.prototype.cleanup=function(){document.body.classList.remove("tabulator-print-fullscreen-hide");if(this.element&&this.element.parentNode){this.element.parentNode.removeChild(this.element);this.table.element.style.display=""}};pt.prototype.printFullscreen=function(t,i,e){var r=window.scrollX,n=window.scrollY,o=document.createElement("div"),s=document.createElement("div"),a=this.table.modules.export.genereateTable(typeof e!="undefined"?e:this.table.options.printConfig,typeof i!="undefined"?i:this.table.options.printStyled,t,"print"),u,l;this.manualBlock=true;this.element=document.createElement("div");this.element.classList.add("tabulator-print-fullscreen");if(this.table.options.printHeader){o.classList.add("tabulator-print-header");u=typeof this.table.options.printHeader=="function"?this.table.options.printHeader.call(this.table):this.table.options.printHeader;if(typeof u=="string"){o.innerHTML=u}else{o.appendChild(u)}this.element.appendChild(o)}this.element.appendChild(a);if(this.table.options.printFooter){s.classList.add("tabulator-print-footer");l=typeof this.table.options.printFooter=="function"?this.table.options.printFooter.call(this.table):this.table.options.printFooter;if(typeof l=="string"){s.innerHTML=l}else{s.appendChild(l)}this.element.appendChild(s)}document.body.classList.add("tabulator-print-fullscreen-hide");document.body.appendChild(this.element);if(this.table.options.printFormatter){this.table.options.printFormatter(this.element,a)}window.print();this.cleanup();window.scrollTo(r,n);this.manualBlock=false};H.prototype.registerModule("print",pt);var vt=function t(i){this.table=i;this.data=false;this.blocked=false;this.origFuncs={};this.currentVersion=0};vt.prototype.watchData=function(t){var i=this,e;this.currentVersion++;e=this.currentVersion;i.unwatchData();i.data=t;i.origFuncs.push=t.push;Object.defineProperty(i.data,"push",{enumerable:false,configurable:true,value:function r(){var n=Array.from(arguments);if(!i.blocked&&e===i.currentVersion){n.forEach((function(t){i.table.rowManager.addRowActual(t,false)}))}return i.origFuncs.push.apply(t,arguments)}});i.origFuncs.unshift=t.unshift;Object.defineProperty(i.data,"unshift",{enumerable:false,configurable:true,value:function r(){var n=Array.from(arguments);if(!i.blocked&&e===i.currentVersion){n.forEach((function(t){i.table.rowManager.addRowActual(t,true)}))}return i.origFuncs.unshift.apply(t,arguments)}});i.origFuncs.shift=t.shift;Object.defineProperty(i.data,"shift",{enumerable:false,configurable:true,value:function r(){var n;if(!i.blocked&&e===i.currentVersion){if(i.data.length){n=i.table.rowManager.getRowFromDataObject(i.data[0]);if(n){n.deleteActual()}}}return i.origFuncs.shift.call(t)}});i.origFuncs.pop=t.pop;Object.defineProperty(i.data,"pop",{enumerable:false,configurable:true,value:function r(){var n;if(!i.blocked&&e===i.currentVersion){if(i.data.length){n=i.table.rowManager.getRowFromDataObject(i.data[i.data.length-1]);if(n){n.deleteActual()}}}return i.origFuncs.pop.call(t)}});i.origFuncs.splice=t.splice;Object.defineProperty(i.data,"splice",{enumerable:false,configurable:true,value:function r(){var n=Array.from(arguments),o=n[0]<0?t.length+n[0]:n[0],s=n[1],a=n[2]?n.slice(2):false,u;if(!i.blocked&&e===i.currentVersion){if(a){u=t[o]?i.table.rowManager.getRowFromDataObject(t[o]):false;if(u){a.forEach((function(t){i.table.rowManager.addRowActual(t,true,u,true)}))}else{a=a.slice().reverse();a.forEach((function(t){i.table.rowManager.addRowActual(t,true,false,true)}))}}if(s!==0){var l=t.slice(o,typeof n[1]==="undefined"?n[1]:o+s);l.forEach((function(t,e){var r=i.table.rowManager.getRowFromDataObject(t);if(r){r.deleteActual(e!==l.length-1)}}))}if(a||s!==0){i.table.rowManager.reRenderInPosition()}}return i.origFuncs.splice.apply(t,arguments)}})};vt.prototype.unwatchData=function(){if(this.data!==false){for(var t in this.origFuncs){Object.defineProperty(this.data,t,{enumerable:true,configurable:true,writable:true,value:this.origFuncs.key})}}};vt.prototype.watchRow=function(t){var i=t.getData();this.blocked=true;for(var e in i){this.watchKey(t,i,e)}if(this.table.options.dataTree){this.watchTreeChildren(t)}this.blocked=false};vt.prototype.watchTreeChildren=function(t){var i=this,e=t.getData()[this.table.options.dataTreeChildField],r={};function n(){i.table.modules.dataTree.initializeRow(t);i.table.modules.dataTree.layoutRow(t);i.table.rowManager.refreshActiveData("tree",false,true)}if(e){r.push=e.push;Object.defineProperty(e,"push",{enumerable:false,configurable:true,value:function t(){var i=r.push.apply(e,arguments);n();return i}});r.unshift=e.unshift;Object.defineProperty(e,"unshift",{enumerable:false,configurable:true,value:function t(){var i=r.unshift.apply(e,arguments);n();return i}});r.shift=e.shift;Object.defineProperty(e,"shift",{enumerable:false,configurable:true,value:function t(){var i=r.shift.call(e);n();return i}});r.pop=e.pop;Object.defineProperty(e,"pop",{enumerable:false,configurable:true,value:function t(){var i=r.pop.call(e);n();return i}});r.splice=e.splice;Object.defineProperty(e,"splice",{enumerable:false,configurable:true,value:function t(){var i=r.splice.apply(e,arguments);n();return i}})}};vt.prototype.watchKey=function(t,i,e){var r=this,n=Object.getOwnPropertyDescriptor(i,e),o=i[e],s=this.currentVersion;Object.defineProperty(i,e,{set:function i(a){o=a;if(!r.blocked&&s===r.currentVersion){var u={};u[e]=a;t.updateData(u)}if(n.set){n.set(a)}},get:function t(){if(n.get){n.get()}return o}})};vt.prototype.unwatchRow=function(t){var i=t.getData();for(var e in i){Object.defineProperty(i,e,{value:i[e]})}};vt.prototype.block=function(){this.blocked=true};vt.prototype.unblock=function(){this.blocked=false};H.prototype.registerModule("reactiveData",vt);var mt=function t(i){this.table=i;this.startColumn=false;this.startX=false;this.startWidth=false;this.handle=null;this.prevHandle=null};mt.prototype.initializeColumn=function(t,i,e){var r=this,n=false,o=this.table.options.resizableColumns;if(t==="header"){n=i.definition.formatter=="textarea"||i.definition.variableHeight;i.modules.resize={variableHeight:n}}if(o===true||o==t){var s=document.createElement("div");s.className="tabulator-col-resize-handle";var a=document.createElement("div");a.className="tabulator-col-resize-handle prev";s.addEventListener("click",(function(t){t.stopPropagation()}));var u=function t(e){var n=i.getLastColumn();if(n&&r._checkResizability(n)){r.startColumn=i;r._mouseDown(e,n,s)}};s.addEventListener("mousedown",u);s.addEventListener("touchstart",u,{passive:true});s.addEventListener("dblclick",(function(t){var e=i.getLastColumn();if(e&&r._checkResizability(e)){t.stopPropagation();e.reinitializeWidth(true)}}));a.addEventListener("click",(function(t){t.stopPropagation()}));var l=function t(e){var n,o,s;n=i.getFirstColumn();if(n){o=r.table.columnManager.findColumnIndex(n);s=o>0?r.table.columnManager.getColumnByIndex(o-1):false;if(s&&r._checkResizability(s)){r.startColumn=i;r._mouseDown(e,s,a)}}};a.addEventListener("mousedown",l);a.addEventListener("touchstart",l,{passive:true});a.addEventListener("dblclick",(function(t){var e,n,o;e=i.getFirstColumn();if(e){n=r.table.columnManager.findColumnIndex(e);o=n>0?r.table.columnManager.getColumnByIndex(n-1):false;if(o&&r._checkResizability(o)){t.stopPropagation();o.reinitializeWidth(true)}}}));e.appendChild(s);e.appendChild(a)}};mt.prototype._checkResizability=function(t){return typeof t.definition.resizable!="undefined"?t.definition.resizable:this.table.options.resizableColumns};mt.prototype._mouseDown=function(t,i,e){var r=this;r.table.element.classList.add("tabulator-block-select");function n(t){if(r.table.rtl){i.setWidth(r.startWidth-((typeof t.screenX==="undefined"?t.touches[0].screenX:t.screenX)-r.startX))}else{i.setWidth(r.startWidth+((typeof t.screenX==="undefined"?t.touches[0].screenX:t.screenX)-r.startX))}if(r.table.options.virtualDomHoz){r.table.vdomHoz.reinitialize(true)}if(!r.table.browserSlow&&i.modules.resize&&i.modules.resize.variableHeight){i.checkCellHeights()}}function o(t){if(r.startColumn.modules.edit){r.startColumn.modules.edit.blocked=false}if(r.table.browserSlow&&i.modules.resize&&i.modules.resize.variableHeight){i.checkCellHeights()}document.body.removeEventListener("mouseup",o);document.body.removeEventListener("mousemove",n);e.removeEventListener("touchmove",n);e.removeEventListener("touchend",o);r.table.element.classList.remove("tabulator-block-select");if(r.table.options.persistence&&r.table.modExists("persistence",true)&&r.table.modules.persistence.config.columns){r.table.modules.persistence.save("columns")}r.table.options.columnResized.call(r.table,i.getComponent())}t.stopPropagation();if(r.startColumn.modules.edit){r.startColumn.modules.edit.blocked=true}r.startX=typeof t.screenX==="undefined"?t.touches[0].screenX:t.screenX;r.startWidth=i.getWidth();document.body.addEventListener("mousemove",n);document.body.addEventListener("mouseup",o);e.addEventListener("touchmove",n,{passive:true});e.addEventListener("touchend",o)};H.prototype.registerModule("resizeColumns",mt);var gt=function t(i){this.table=i;this.startColumn=false;this.startY=false;this.startHeight=false;this.handle=null;this.prevHandle=null};gt.prototype.initializeRow=function(t){var i=this,e=t.getElement();var r=document.createElement("div");r.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev";r.addEventListener("click",(function(t){t.stopPropagation()}));var o=function e(n){i.startRow=t;i._mouseDown(n,t,r)};r.addEventListener("mousedown",o);r.addEventListener("touchstart",o,{passive:true});n.addEventListener("click",(function(t){t.stopPropagation()}));var s=function e(r){var o=i.table.rowManager.prevDisplayRow(t);if(o){i.startRow=o;i._mouseDown(r,o,n)}};n.addEventListener("mousedown",s);n.addEventListener("touchstart",s,{passive:true});e.appendChild(r);e.appendChild(n)};gt.prototype._mouseDown=function(t,i,e){var r=this;r.table.element.classList.add("tabulator-block-select");function n(t){i.setHeight(r.startHeight+((typeof t.screenY==="undefined"?t.touches[0].screenY:t.screenY)-r.startY))}function o(t){document.body.removeEventListener("mouseup",n);document.body.removeEventListener("mousemove",n);e.removeEventListener("touchmove",n);e.removeEventListener("touchend",o);r.table.element.classList.remove("tabulator-block-select");r.table.options.rowResized.call(this.table,i.getComponent())}t.stopPropagation();r.startY=typeof t.screenY==="undefined"?t.touches[0].screenY:t.screenY;r.startHeight=i.getHeight();document.body.addEventListener("mousemove",n);document.body.addEventListener("mouseup",o);e.addEventListener("touchmove",n,{passive:true});e.addEventListener("touchend",o)};H.prototype.registerModule("resizeRows",gt);var wt=function t(i){this.table=i;this.binding=false;this.observer=false;this.containerObserver=false;this.tableHeight=0;this.tableWidth=0;this.containerHeight=0;this.containerWidth=0;this.autoResize=false};wt.prototype.initialize=function(t){var i=this;var e=this.table,r;this.tableHeight=e.element.clientHeight;this.tableWidth=e.element.clientWidth;if(e.element.parentNode){this.containerHeight=e.element.parentNode.clientHeight;this.containerWidth=e.element.parentNode.clientWidth}if(typeof ResizeObserver!=="undefined"&&e.rowManager.getRenderMode()==="virtual"){this.autoResize=true;this.observer=new ResizeObserver((function(t){if(!e.browserMobile||e.browserMobile&&!e.modules.edit.currentCell){var r=Math.floor(t[0].contentRect.height);var n=Math.floor(t[0].contentRect.width);if(i.tableHeight!=r||i.tableWidth!=n){i.tableHeight=r;i.tableWidth=n;if(e.element.parentNode){i.containerHeight=e.element.parentNode.clientHeight;i.containerWidth=e.element.parentNode.clientWidth}if(e.options.virtualDomHoz){e.vdomHoz.reinitialize(true)}e.redraw()}}}));this.observer.observe(e.element);r=window.getComputedStyle(e.element);if(this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(r.getPropertyValue("max-height")||r.getPropertyValue("min-height"))){this.containerObserver=new ResizeObserver((function(t){if(!e.browserMobile||e.browserMobile&&!e.modules.edit.currentCell){var r=Math.floor(t[0].contentRect.height);var n=Math.floor(t[0].contentRect.width);if(i.containerHeight!=r||i.containerWidth!=n){i.containerHeight=r;i.containerWidth=n;i.tableHeight=e.element.clientHeight;i.tableWidth=e.element.clientWidth}if(e.options.virtualDomHoz){e.vdomHoz.reinitialize(true)}e.redraw()}}));this.containerObserver.observe(this.table.element.parentNode)}}else{this.binding=function(){if(!e.browserMobile||e.browserMobile&&!e.modules.edit.currentCell){if(e.options.virtualDomHoz){e.vdomHoz.reinitialize(true)}e.redraw()}};window.addEventListener("resize",this.binding)}};wt.prototype.clearBindings=function(t){if(this.binding){window.removeEventListener("resize",this.binding)}if(this.observer){this.observer.unobserve(this.table.element)}if(this.containerObserver){this.containerObserver.unobserve(this.table.element.parentNode)}};H.prototype.registerModule("resizeTable",wt);var yt=function t(i){this.table=i;this.columns=[];this.hiddenColumns=[];this.mode="";this.index=0;this.collapseFormatter=[];this.collapseStartOpen=true;this.collapseHandleColumn=false};yt.prototype.initialize=function(){var t=this,i=[];this.mode=this.table.options.responsiveLayout;this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData;this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen;this.hiddenColumns=[];this.table.columnManager.columnsByIndex.forEach((function(e,r){if(e.modules.responsive){if(e.modules.responsive.order&&e.modules.responsive.visible){e.modules.responsive.index=r;i.push(e);if(!e.visible&&t.mode==="collapse"){t.hiddenColumns.push(e)}}}}));i=i.reverse();i=i.sort((function(t,i){var e=i.modules.responsive.order-t.modules.responsive.order;return e||i.modules.responsive.index-t.modules.responsive.index}));this.columns=i;if(this.mode==="collapse"){this.generateCollapsedContent()}for(var e=this.table.columnManager.columnsByIndex,r=Array.isArray(e),n=0,e=r?e:e[Symbol.iterator]();;){var o;if(r){if(n>=e.length)break;o=e[n++]}else{n=e.next();if(n.done)break;o=n.value}var s=o;if(s.definition.formatter=="responsiveCollapse"){this.collapseHandleColumn=s;break}}if(this.collapseHandleColumn){if(this.hiddenColumns.length){this.collapseHandleColumn.show()}else{this.collapseHandleColumn.hide()}}};yt.prototype.initializeColumn=function(t){var i=t.getDefinition();t.modules.responsive={order:typeof i.responsive==="undefined"?1:i.responsive,visible:i.visible===false?false:true}};yt.prototype.initializeRow=function(t){var i;if(t.type!=="calc"){i=document.createElement("div");i.classList.add("tabulator-responsive-collapse");t.modules.responsiveLayout={element:i,open:this.collapseStartOpen};if(!this.collapseStartOpen){i.style.display="none"}}};yt.prototype.layoutRow=function(t){var i=t.getElement();if(t.modules.responsiveLayout){i.appendChild(t.modules.responsiveLayout.element);this.generateCollapsedRowContent(t)}};yt.prototype.updateColumnVisibility=function(t,i){if(t.modules.responsive){t.modules.responsive.visible=i;this.initialize()}};yt.prototype.hideColumn=function(t){var i=this.hiddenColumns.length;t.hide(false,true);if(this.mode==="collapse"){this.hiddenColumns.unshift(t);this.generateCollapsedContent();if(this.collapseHandleColumn&&!i){this.collapseHandleColumn.show()}}};yt.prototype.showColumn=function(t){var i;t.show(false,true);t.setWidth(t.getWidth());if(this.mode==="collapse"){i=this.hiddenColumns.indexOf(t);if(i>-1){this.hiddenColumns.splice(i,1)}this.generateCollapsedContent();if(this.collapseHandleColumn&&!this.hiddenColumns.length){this.collapseHandleColumn.hide()}}};yt.prototype.update=function(){var t=this,i=true;while(i){var e=t.table.modules.layout.getMode()=="fitColumns"?t.table.columnManager.getFlexBaseWidth():t.table.columnManager.getWidth();var r=(t.table.options.headerVisible?t.table.columnManager.element.clientWidth:t.table.element.clientWidth)-e;if(r<0){var n=t.columns[t.index];if(n){t.hideColumn(n);t.index++}else{i=false}}else{var o=t.columns[t.index-1];if(o){if(r>0){if(r>=o.getWidth()){t.showColumn(o);t.index--}else{i=false}}else{i=false}}else{i=false}}if(!t.table.rowManager.activeRowsCount){t.table.rowManager.renderEmptyScroll()}}};yt.prototype.generateCollapsedContent=function(){var t=this,i=this.table.rowManager.getDisplayRows();i.forEach((function(i){t.generateCollapsedRowContent(i)}))};yt.prototype.generateCollapsedRowContent=function(t){var i,e;if(t.modules.responsiveLayout){i=t.modules.responsiveLayout.element;while(i.firstChild){i.removeChild(i.firstChild)}e=this.collapseFormatter(this.generateCollapsedRowData(t));if(e){i.appendChild(e)}}};yt.prototype.generateCollapsedRowData=function(t){var i=this,e=t.getData(),r=[],n;this.hiddenColumns.forEach((function(o){var s=o.getFieldValue(e);if(o.definition.title&&o.field){if(o.modules.format&&i.table.options.responsiveLayoutCollapseUseFormatters){n={value:false,data:{},getValue:function t(){return s},getData:function t(){return e},getElement:function t(){return document.createElement("div")},getRow:function i(){return t.getComponent()},getColumn:function t(){return o.getComponent()}};r.push({field:o.field,title:o.definition.title,value:o.modules.format.formatter.call(i.table.modules.format,n,o.modules.format.params)})}else{r.push({field:o.field,title:o.definition.title,value:s})}}}));return r};yt.prototype.formatCollapsedData=function(t){var i=document.createElement("table");t.forEach((function(t){var e=document.createElement("tr");var r=document.createElement("td");var n=document.createElement("td");var o;var s=document.createElement("strong");r.appendChild(s);this.table.modules.localize.bind("columns|"+t.field,(function(i){s.innerText=i||t.title}));if(t.value instanceof Node){o=document.createElement("div");o.appendChild(t.value);n.appendChild(o)}else{n.innerHTML=t.value}e.appendChild(r);e.appendChild(n);i.appendChild(e)}),this);return Object.keys(t).length?i:""};H.prototype.registerModule("responsiveLayout",yt);var xt=function t(i){this.table=i;this.selecting=false;this.lastClickedRow=false;this.selectPrev=[];this.selectedRows=[];this.headerCheckboxElement=null};xt.prototype.clearSelectionData=function(t){this.selecting=false;this.lastClickedRow=false;this.selectPrev=[];this.selectedRows=[];if(!t){this._rowSelectionChanged()}};xt.prototype.initializeRow=function(t){var i=this,e=t.getElement();var r=function t(){setTimeout((function(){i.selecting=false}),50);document.body.removeEventListener("mouseup",t)};t.modules.select={selected:false};if(i.table.options.selectableCheck.call(this.table,t.getComponent())){e.classList.add("tabulator-selectable");e.classList.remove("tabulator-unselectable");if(i.table.options.selectable&&i.table.options.selectable!="highlight"){if(i.table.options.selectableRangeMode==="click"){e.addEventListener("click",(function(e){if(e.shiftKey){i.table._clearSelection();i.lastClickedRow=i.lastClickedRow||t;var r=i.table.rowManager.getDisplayRowIndex(i.lastClickedRow);var n=i.table.rowManager.getDisplayRowIndex(t);var o=r<=n?r:n;var s=r>=n?r:n;var a=i.table.rowManager.getDisplayRows().slice(0);var u=a.splice(o,s-o+1);if(e.ctrlKey||e.metaKey){u.forEach((function(e){if(e!==i.lastClickedRow){if(i.table.options.selectable!==true&&!i.isRowSelected(t)){if(i.selectedRows.length<i.table.options.selectable){i.toggleRow(e)}}else{i.toggleRow(e)}}}));i.lastClickedRow=t}else{i.deselectRows(undefined,true);if(i.table.options.selectable!==true){if(u.length>i.table.options.selectable){u=u.slice(0,i.table.options.selectable)}}i.selectRows(u)}i.table._clearSelection()}else if(e.ctrlKey||e.metaKey){i.toggleRow(t);i.lastClickedRow=t}else{i.deselectRows(undefined,true);i.selectRows(t);i.lastClickedRow=t}}))}else{e.addEventListener("click",(function(e){if(!i.table.modExists("edit")||!i.table.modules.edit.getCurrentCell()){i.table._clearSelection()}if(!i.selecting){i.toggleRow(t)}}));e.addEventListener("mousedown",(function(e){if(e.shiftKey){i.table._clearSelection();i.selecting=true;i.selectPrev=[];document.body.addEventListener("mouseup",r);document.body.addEventListener("keyup",r);i.toggleRow(t);return false}}));e.addEventListener("mouseenter",(function(e){if(i.selecting){i.table._clearSelection();i.toggleRow(t);if(i.selectPrev[1]==t){i.toggleRow(i.selectPrev[0])}}}));e.addEventListener("mouseout",(function(e){if(i.selecting){i.table._clearSelection();i.selectPrev.unshift(t)}}))}}}else{e.classList.add("tabulator-unselectable");e.classList.remove("tabulator-selectable")}};xt.prototype.toggleRow=function(t){if(this.table.options.selectableCheck.call(this.table,t.getComponent())){if(t.modules.select&&t.modules.select.selected){this._deselectRow(t)}else{this._selectRow(t)}}};xt.prototype.selectRows=function(t){var i=this;var e;switch(typeof t==="undefined"?"undefined":T(t)){case"undefined":this.table.rowManager.rows.forEach((function(t){i._selectRow(t,true,true)}));this._rowSelectionChanged();break;case"string":e=this.table.rowManager.findRow(t);if(e){this._selectRow(e,true,true)}else{this.table.rowManager.getRows(t).forEach((function(t){i._selectRow(t,true,true)}))}this._rowSelectionChanged();break;default:if(Array.isArray(t)){t.forEach((function(t){i._selectRow(t,true,true)}));this._rowSelectionChanged()}else{this._selectRow(t,false,true)}break}};xt.prototype._selectRow=function(t,i,e){if(!isNaN(this.table.options.selectable)&&this.table.options.selectable!==true&&!e){if(this.selectedRows.length>=this.table.options.selectable){if(this.table.options.selectableRollingSelection){this._deselectRow(this.selectedRows[0])}else{return false}}}var r=this.table.rowManager.findRow(t);if(r){if(this.selectedRows.indexOf(r)==-1){r.getElement().classList.add("tabulator-selected");if(!r.modules.select){r.modules.select={}}r.modules.select.selected=true;if(r.modules.select.checkboxEl){r.modules.select.checkboxEl.checked=true}this.selectedRows.push(r);if(this.table.options.dataTreeSelectPropagate){this.childRowSelection(r,true)}if(!i){this.table.options.rowSelected.call(this.table,r.getComponent())}this._rowSelectionChanged(i)}}else{if(!i){console.warn("Selection Error - No such row found, ignoring selection:"+t)}}};xt.prototype.isRowSelected=function(t){return this.selectedRows.indexOf(t)!==-1};xt.prototype.deselectRows=function(t,i){var e=this,r;if(typeof t=="undefined"){r=e.selectedRows.length;for(var n=0;n<r;n++){e._deselectRow(e.selectedRows[0],true)}e._rowSelectionChanged(i)}else{if(Array.isArray(t)){t.forEach((function(t){e._deselectRow(t,true)}));e._rowSelectionChanged(i)}else{e._deselectRow(t,i)}}};xt.prototype._deselectRow=function(t,i){var e=this,r=e.table.rowManager.findRow(t),n;if(r){n=e.selectedRows.findIndex((function(t){return t==r}));if(n>-1){r.getElement().classList.remove("tabulator-selected");if(!r.modules.select){r.modules.select={}}r.modules.select.selected=false;if(r.modules.select.checkboxEl){r.modules.select.checkboxEl.checked=false}e.selectedRows.splice(n,1);if(this.table.options.dataTreeSelectPropagate){this.childRowSelection(r,false)}if(!i){e.table.options.rowDeselected.call(this.table,r.getComponent())}e._rowSelectionChanged(i)}}else{if(!i){console.warn("Deselection Error - No such row found, ignoring selection:"+t)}}};xt.prototype.getSelectedData=function(){var t=[];this.selectedRows.forEach((function(i){t.push(i.getData())}));return t};xt.prototype.getSelectedRows=function(){var t=[];this.selectedRows.forEach((function(i){t.push(i.getComponent())}));return t};xt.prototype._rowSelectionChanged=function(t){if(this.headerCheckboxElement){if(this.selectedRows.length===0){this.headerCheckboxElement.checked=false;this.headerCheckboxElement.indeterminate=false}else if(this.table.rowManager.rows.length===this.selectedRows.length){this.headerCheckboxElement.checked=true;this.headerCheckboxElement.indeterminate=false}else{this.headerCheckboxElement.indeterminate=true;this.headerCheckboxElement.checked=false}}if(!t){this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())}};xt.prototype.registerRowSelectCheckbox=function(t,i){if(!t._row.modules.select){t._row.modules.select={}}t._row.modules.select.checkboxEl=i};xt.prototype.registerHeaderSelectCheckbox=function(t){this.headerCheckboxElement=t};xt.prototype.childRowSelection=function(t,i){var e=this.table.modules.dataTree.getChildren(t,true);if(i){for(var r=e,n=Array.isArray(r),o=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(o>=r.length)break;s=r[o++]}else{o=r.next();if(o.done)break;s=o.value}var a=s;this._selectRow(a,true)}}else{for(var u=e,l=Array.isArray(u),f=0,u=l?u:u[Symbol.iterator]();;){var h;if(l){if(f>=u.length)break;h=u[f++]}else{f=u.next();if(f.done)break;h=f.value}var c=h;this._deselectRow(c,true)}}};H.prototype.registerModule("selectRow",xt);var kt=function t(i){this.table=i;this.sortList=[];this.changed=false};kt.prototype.initializeColumn=function(t,i){var e=this,r=false,n,o;switch(T(t.definition.sorter)){case"string":if(e.sorters[t.definition.sorter]){r=e.sorters[t.definition.sorter]}else{console.warn("Sort Error - No such sorter found: ",t.definition.sorter)}break;case"function":r=t.definition.sorter;break}t.modules.sort={sorter:r,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc",tristate:typeof t.definition.headerSortTristate!=="undefined"?t.definition.headerSortTristate:this.table.options.headerSortTristate};if(typeof t.definition.headerSort==="undefined"?this.table.options.headerSort!==false:t.definition.headerSort!==false){n=t.getElement();n.classList.add("tabulator-sortable");o=document.createElement("div");o.classList.add("tabulator-col-sorter");if(T(this.table.options.headerSortElement)=="object"){o.appendChild(this.table.options.headerSortElement)}else{o.innerHTML=this.table.options.headerSortElement}i.appendChild(o);t.modules.sort.element=o;n.addEventListener("click",(function(i){var r="",n=[],o=false;if(t.modules.sort){if(t.modules.sort.tristate){if(t.modules.sort.dir=="none"){r=t.modules.sort.startingDir}else{if(t.modules.sort.dir==t.modules.sort.startingDir){r=t.modules.sort.dir=="asc"?"desc":"asc"}else{r="none"}}}else{switch(t.modules.sort.dir){case"asc":r="desc";break;case"desc":r="asc";break;default:r=t.modules.sort.startingDir}}if(e.table.options.columnHeaderSortMulti&&(i.shiftKey||i.ctrlKey)){n=e.getSort();o=n.findIndex((function(i){return i.field===t.getField()}));if(o>-1){n[o].dir=r;if(o!=n.length-1){o=n.splice(o,1)[0];if(r!="none"){n.push(o)}}}else{if(r!="none"){n.push({column:t,dir:r})}}e.setSort(n)}else{if(r=="none"){e.clear()}else{e.setSort(t,r)}}e.table.rowManager.sorterRefresh(!e.sortList.length)}}))}};kt.prototype.hasChanged=function(){var t=this.changed;this.changed=false;return t};kt.prototype.getSort=function(){var t=this,i=[];t.sortList.forEach((function(t){if(t.column){i.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})}}));return i};kt.prototype.setSort=function(t,i){var e=this,r=[];if(!Array.isArray(t)){t=[{column:t,dir:i}]}t.forEach((function(t){var i;i=e.table.columnManager.findColumn(t.column);if(i){t.column=i;r.push(t);e.changed=true}else{console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)}}));e.sortList=r;if(this.table.options.persistence&&this.table.modExists("persistence",true)&&this.table.modules.persistence.config.sort){this.table.modules.persistence.save("sort")}};kt.prototype.clear=function(){this.setSort([])};kt.prototype.findSorter=function(t){var i=this.table.rowManager.activeRows[0],e="string",r,n;if(i){i=i.getData();r=t.getField();if(r){n=t.getFieldValue(i);switch(typeof n==="undefined"?"undefined":T(n)){case"undefined":e="string";break;case"boolean":e="boolean";break;default:if(!isNaN(n)&&n!==""){e="number"}else{if(n.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){e="alphanum"}}break}}}return this.sorters[e]};kt.prototype.sort=function(t){var i=this,e=this.table.options.sortOrderReverse?i.sortList.slice().reverse():i.sortList,r=[],n=[];if(i.table.options.dataSorting){i.table.options.dataSorting.call(i.table,i.getSort())}i.clearColumnHeaders();if(!i.table.options.ajaxSorting){e.forEach((function(t,e){var n=t.column.modules.sort;if(t.column&&n){if(!n.sorter){n.sorter=i.findSorter(t.column)}t.params=typeof n.params==="function"?n.params(t.column.getComponent(),t.dir):n.params;r.push(t)}i.setColumnHeader(t.column,t.dir)}));if(r.length){i._sortItems(t,r)}}else{e.forEach((function(t,e){i.setColumnHeader(t.column,t.dir)}))}if(i.table.options.dataSorted){t.forEach((function(t){n.push(t.getComponent())}));i.table.options.dataSorted.call(i.table,i.getSort(),n)}};kt.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach((function(t){if(t.modules.sort){t.modules.sort.dir="none";t.getElement().setAttribute("aria-sort","none")}}))};kt.prototype.setColumnHeader=function(t,i){t.modules.sort.dir=i;t.getElement().setAttribute("aria-sort",i)};kt.prototype._sortItems=function(t,i){var e=this;var r=i.length-1;t.sort((function(t,n){var o;for(var s=r;s>=0;s--){var a=i[s];o=e._sortRow(t,n,a.column,a.dir,a.params);if(o!==0){break}}return o}))};kt.prototype._sortRow=function(t,i,e,r,n){var o,s;var a=r=="asc"?t:i;var u=r=="asc"?i:t;t=e.getFieldValue(a.getData());i=e.getFieldValue(u.getData());t=typeof t!=="undefined"?t:"";i=typeof i!=="undefined"?i:"";o=a.getComponent();s=u.getComponent();return e.modules.sort.sorter.call(this,t,i,o,s,e.getComponent(),r,n)};kt.prototype.sorters={number:function t(i,e,r,n,o,s,a){var u=a.alignEmptyValues;var l=a.decimalSeparator;var f=a.thousandSeparator;var h=0;i=String(i);e=String(e);if(f){i=i.split(f).join("");e=e.split(f).join("")}if(l){i=i.split(l).join(".");e=e.split(l).join(".")}i=parseFloat(i);e=parseFloat(e);if(isNaN(i)){h=isNaN(e)?0:-1}else if(isNaN(e)){h=1}else{return i-e}if(u==="top"&&s==="desc"||u==="bottom"&&s==="asc"){h*=-1}return h},string:function t(i,e,r,n,o,s,a){var u=a.alignEmptyValues;var l=0;var f;if(!i){l=!e?0:-1}else if(!e){l=1}else{switch(T(a.locale)){case"boolean":if(a.locale){f=this.table.modules.localize.getLocale()}break;case"string":f=a.locale;break}return String(i).toLowerCase().localeCompare(String(e).toLowerCase(),f)}if(u==="top"&&s==="desc"||u==="bottom"&&s==="asc"){l*=-1}return l},date:function t(i,e,r,n,o,s,a){if(!a.format){a.format="DD/MM/YYYY"}return this.sorters.datetime.call(this,i,e,r,n,o,s,a)},time:function t(i,e,r,n,o,s,a){if(!a.format){a.format="HH:mm"}return this.sorters.datetime.call(this,i,e,r,n,o,s,a)},datetime:function t(i,e,r,n,o,s,a){var u=a.format||"DD/MM/YYYY HH:mm:ss",l=a.alignEmptyValues,f=0;if(typeof moment!="undefined"){i=moment(i,u);e=moment(e,u);if(!i.isValid()){f=!e.isValid()?0:-1}else if(!e.isValid()){f=1}else{return i-e}if(l==="top"&&s==="desc"||l==="bottom"&&s==="asc"){f*=-1}return f}else{console.error("Sort Error - 'datetime' sorter is dependant on moment.js")}},boolean:function t(i,e,r,n,o,s,a){var u=i===true||i==="true"||i==="True"||i===1?1:0;var l=e===true||e==="true"||e==="True"||e===1?1:0;return u-l},array:function t(i,e,r,n,o,s,a){var u=0;var l=0;var f=a.type||"length";var h=a.alignEmptyValues;var c=0;function d(t){switch(f){case"length":return t.length;case"sum":return t.reduce((function(t,i){return t+i}));case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce((function(t,i){return t+i}))/t.length}}if(!Array.isArray(i)){h=!Array.isArray(e)?0:-1}else if(!Array.isArray(e)){h=1}else{u=i?d(i):0;l=e?d(e):0;return u-l}if(h==="top"&&s==="desc"||h==="bottom"&&s==="asc"){c*=-1}return c},exists:function t(i,e,r,n,o,s,a){var u=typeof i=="undefined"?0:1;var l=typeof e=="undefined"?0:1;return u-l},alphanum:function t(i,e,r,n,o,s,a){var u,l,f,h,c=0,d,b=/(\d+)|(\D+)/g,p=/\d/;var v=a.alignEmptyValues;var m=0;if(!i&&i!==0){m=!e&&e!==0?0:-1}else if(!e&&e!==0){m=1}else{if(isFinite(i)&&isFinite(e))return i-e;u=String(i).toLowerCase();l=String(e).toLowerCase();if(u===l)return 0;if(!(p.test(u)&&p.test(l)))return u>l?1:-1;u=u.match(b);l=l.match(b);d=u.length>l.length?l.length:u.length;while(c<d){f=u[c];h=l[c++];if(f!==h){if(isFinite(f)&&isFinite(h)){if(f.charAt(0)==="0")f="."+f;if(h.charAt(0)==="0")h="."+h;return f-h}else return f>h?1:-1}}return u.length>l.length}if(v==="top"&&s==="desc"||v==="bottom"&&s==="asc"){m*=-1}return m}};H.prototype.registerModule("sort",kt);var Ct=function t(i){this.table=i;this.invalidCells=[]};Ct.prototype.initializeColumn=function(t){var i=this,e=[],r;if(t.definition.validator){if(Array.isArray(t.definition.validator)){t.definition.validator.forEach((function(t){r=i._extractValidator(t);if(r){e.push(r)}}))}else{r=this._extractValidator(t.definition.validator);if(r){e.push(r)}}t.modules.validate=e.length?e:false}};Ct.prototype._extractValidator=function(t){var i,e,r;switch(typeof t==="undefined"?"undefined":T(t)){case"string":r=t.indexOf(":");if(r>-1){i=t.substring(0,r);e=t.substring(r+1)}else{i=t}return this._buildValidator(i,e);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}};Ct.prototype._buildValidator=function(t,i){var e=typeof t=="function"?t:this.validators[t];if(!e){console.warn("Validator Setup Error - No matching validator found:",t);return false}else{return{type:typeof t=="function"?"function":t,func:e,params:i}}};Ct.prototype.validate=function(t,i,e){var r=this,n=[],o=this.invalidCells.indexOf(i);if(t){t.forEach((function(t){if(!t.func.call(r,i.getComponent(),e,t.params)){n.push({type:t.type,parameters:t.params})}}))}n=n.length?n:true;if(!i.modules.validate){i.modules.validate={}}if(n===true){i.modules.validate.invalid=false;i.getElement().classList.remove("tabulator-validation-fail");if(o>-1){this.invalidCells.splice(o,1)}}else{i.modules.validate.invalid=true;if(this.table.options.validationMode!=="manual"){i.getElement().classList.add("tabulator-validation-fail")}if(o==-1){this.invalidCells.push(i)}}return n};Ct.prototype.getInvalidCells=function(){var t=[];this.invalidCells.forEach((function(i){t.push(i.getComponent())}));return t};Ct.prototype.clearValidation=function(t){var i;if(t.modules.validate&&t.modules.validate.invalid){t.getElement().classList.remove("tabulator-validation-fail");t.modules.validate.invalid=false;i=this.invalidCells.indexOf(t);if(i>-1){this.invalidCells.splice(i,1)}}};Ct.prototype.validators={integer:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}e=Number(e);return typeof e==="number"&&isFinite(e)&&Math.floor(e)===e},float:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}e=Number(e);return typeof e==="number"&&isFinite(e)&&e%1!==0},numeric:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return!isNaN(e)},string:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return isNaN(e)},max:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return parseFloat(e)<=r},min:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return parseFloat(e)>=r},starts:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return String(e).toLowerCase().startsWith(String(r).toLowerCase())},ends:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return String(e).toLowerCase().endsWith(String(r).toLowerCase())},minLength:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return String(e).length>=r},maxLength:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}return String(e).length<=r},in:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}if(typeof r=="string"){r=r.split("|")}return e===""||r.indexOf(e)>-1},regex:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}var n=new RegExp(r);return n.test(e)},unique:function t(i,e,r){if(e===""||e===null||typeof e==="undefined"){return true}var t=true;var n=i.getData();var o=i.getColumn()._getSelf();this.table.rowManager.rows.forEach((function(i){var r=i.getData();if(r!==n){if(e==o.getFieldValue(r)){t=false}}}));return t},required:function t(i,e,r){return e!==""&&e!==null&&typeof e!=="undefined"}};H.prototype.registerModule("validate",Ct);const{replace:Et}="";const jt=/[&<>'"]/g;const zt={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"};const Tt=t=>zt[t];const St=t=>Et.call(t,jt,Tt);class Rt{constructor(t){this.pool=t;this.create=this.create.bind(this)}create(t){var i;const e={title:t.title,field:t.field,hozAlign:t.horizontalAlign,headerSort:t.headerSort,headerSortStartingDir:"desc"};if(t.headerComponent){e.titleFormatter=Nt(t)}if(((i=t.component)===null||i===void 0?void 0:i.name)||t.formatter){e.formatter=Mt(t,this.pool);e.formatterParams=t}if(t.aggregator){e.bottomCalc=_t(t)}return e}}const Nt=t=>()=>{const i=document.createElement("div");i.setAttribute("class","lime-col-title__custom-component");const e=document.createElement("span");e.setAttribute("class","title-component-text");e.textContent=t.title;const r=document.createElement(t.headerComponent.name);r.setAttribute("class","title-component-slot");let n=t.headerComponent.props||{};if(t.headerComponent.propsFactory){n=Object.assign(Object.assign({},n),t.headerComponent.propsFactory(null))}Ft(r,n);i.append(e);i.append(r);return i};function Mt(t,i){var e;if(!((e=t.component)===null||e===void 0?void 0:e.name)){return Ot}if(!Dt(t)){console.warn(`Failed to render custom component for column "${t.field.toString()}". Custom element <${t.component.name}/> does not exist. Using the default formatter.`);return Ot}return e=>{const r=Ot(e,t);return Pt(e,t,r,i)}}function Dt(t){const i=t.component.name;if(typeof i==="string"){const e=!i.includes("-");const r=customElements.get(t.component.name);return e||r}else{return false}}function Ot(t,i){const e=t.getData();let r=t.getValue();if(i.formatter){r=i.formatter(r,e)}if(typeof r==="string"&&!i.component){r=St(r)}return r}function Pt(t,i,e,r){const n=t.getField();const o=t.getData();const s=r.get(i.component.name);let a=i.component.props||{};if(i.component.propsFactory){a=Object.assign(Object.assign({},a),i.component.propsFactory(o))}a=Object.assign(Object.assign({},a),{field:n,value:e,data:o});s.style.display="inline-block";Ft(s,a);Ht(s,t.getColumn());return s}function Ft(t,i){const e=z(i,m(At));Object.assign(t,e);const r=z(i,At);for(const[i,e]of Object.entries(r)){const r=Lt(i);t.addEventListener(r,e)}}function At(t,i){if(typeof t!=="function"){return false}return/^on[A-Z]/.test(i)}function Lt(t){return t.charAt(2).toLowerCase()+t.slice(3)}function Ht(t,i){if(!("ResizeObserver"in window)){return}const e=1e3;const r=16;const n=new ResizeObserver((()=>{const e=t.getBoundingClientRect().width;const n=e+r;if(n<i.getWidth()){return}i.setWidth(n)}));n.observe(t);setTimeout((()=>{n.unobserve(t)}),e)}const It=t=>i=>{const e=t.find((t=>t.field===i.field));const r=i.dir.toUpperCase();return{column:e,direction:r}};function _t(t){const i=t.aggregator;if(Ut(i)){return(e,r)=>i(t,e,r)}return i}function Ut(t){return typeof t==="function"}class Vt{constructor(t){this.isFree=t=>!this.usedElements.has(t);this.document=t;this.releaseAll();this.clear()}get(t){var i;let e=(i=this.pool[t])===null||i===void 0?void 0:i.find(this.isFree);if(!e){e=this.createElement(t)}this.usedElements.set(e,true);return e}release(t){this.usedElements.delete(t)}releaseAll(){this.usedElements=new WeakMap}clear(){this.pool={}}createElement(t){const i=this.document.createElement(t);if(!(t in this.pool)){this.pool[t]=[]}this.pool[t].push(i);return i}}class Bt{constructor(t){this.getDataByIndex=t;this.toggleRange=(t,i)=>{const e=!this.selectedItems.has(this.getDataByIndex(i));const r=Math.min(t,i);const n=Math.max(t,i);const o=[];const s=[];for(let t=r;t<=n;t++){const i=this.getDataByIndex(t);if(!i){continue}const r=this.selectedItems.has(i);if(r===e){continue}if(e){this.selectedItems.add(i)}else{this.selectedItems.delete(i)}o.push(t);s.push(i)}this.lastToggledIndex=i;return{selected:e,items:s,indexes:o}};this.clear()}get size(){return this.selectedItems.size}get items(){return[...this.selectedItems]}set items(t){this.selectedItems=new Set(t);this.lastToggledIndex=-1}has(t){return this.selectedItems.has(t)}toggleSelection(t){return this.toggleRange(t,t)}toggleSelectionFromLastIndex(t){if(this.lastToggledIndex<0){return this.toggleSelection(t)}return this.toggleRange(this.lastToggledIndex,t)}clear(){this.selectedItems=new Set;this.lastToggledIndex=-1}}const Jt="limel-checkbox";const Wt=t=>{var i;return(i=t.id)!==null&&i!==void 0?i:t};class qt{constructor(t,i,e,r){this.getTable=t;this.pool=i;this.selectEvent=e;this.getTranslation=r;this.rowSelectorCellClick=(t,i)=>{t.stopPropagation();t.preventDefault();const e=i.getRow();const r=e.getPosition(true);if(t.shiftKey){this.updateRowSelectors(this.selection.toggleSelectionFromLastIndex(r))}else{this.updateRowSelectors(this.selection.toggleSelection(r))}this.selectEvent.emit(this.selection.items.map(this.getRowData))};this.getRowData=t=>{if(typeof t==="object"){return t}return this.getTable().getRow(t).getData()};this.updateRowSelectors=t=>{for(const i of t.indexes.map(this.getRowByIndex))this.updateRowSelector(i,t.selected)};this.updateRowSelector=(t,i)=>{const e=t.getCells()[0];if(e){const t=e.getElement().querySelector(Jt);t.checked=i}};this.getActiveRows=()=>{const t=this.getTable();if(!t){return[]}return t.getRows("active")};this.getRowByIndex=t=>this.getTable().getRowFromPosition(t,true);this.selection=new Bt((t=>Wt(this.getRowByIndex(t).getData())))}get hasSelection(){return this.selection.size>0}clear(){this.selection.clear()}setSelection(t=[]){const i=t.map(Wt);if(this.selection.size===t.length&&this.selection.items.every(((t,e)=>t===i[e]))){return}this.selection.items=i;const e=this.getActiveRows();for(const t of e)this.updateRowSelector(t,this.selection.has(Wt(t.getData())))}getColumnDefinitions(t){return[this.getRowSelectorColumnDefinition(),...t]}getRowSelectorColumnDefinition(){return{title:"",formatter:this.getRowSelectorFormatter(),cellClick:this.rowSelectorCellClick,headerClick:this.headerClick,headerSort:false,cssClass:"limel-table--row-selector",resizable:false,htmlOutput:false,clipboard:false}}headerClick(t){t.stopPropagation()}getRowSelectorFormatter(){return t=>{const i=this.pool.get(Jt);Ft(i,{checked:this.selection.has(Wt(t.getData())),label:this.getTranslation("table.select-row")});i.classList.add("hide-label");i.style.display="inline-block";return i}}}function Yt(t){const i={stretchLastColumn:"fitDataStretch",stretchColumns:"fitColumns",lowDensity:"fitData"};return i[t]||"fitDataFill"}const Gt=(t,i)=>{if(t.length!==i.length){return false}return t.every(((t,e)=>g(t,i[e])))};const Xt='@charset "UTF-8";.tabulator{position:relative;border:1px solid #999;background-color:#888;font-size:14px;text-align:left;overflow:hidden;-webkit-transform:translatez(0);-moz-transform:translatez(0);-ms-transform:translatez(0);-o-transform:translatez(0);transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator.tabulator-block-select{user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:1px solid #999;background-color:#e6e6e6;color:#555;font-weight:bold;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;border-right:1px solid #aaa;background:#e6e6e6;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#cdcdcd;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:0.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{display:flex;align-items:center;position:absolute;top:0;bottom:0;right:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:flex;border-top:1px solid #aaa;overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto !important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#cdcdcd}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid #666;color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{writing-mode:vertical-rl;text-orientation:mixed;display:flex;align-items:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{justify-content:center;left:0;right:0;top:4px;bottom:auto}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:600%;background:#f3f3f3 !important;border-top:1px solid #aaa;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#f3f3f3 !important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:flex;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#ccc;font-weight:bold;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:bold;background:#e2e2e2 !important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #aaa}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #aaa}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#e6e6e6;text-align:right;color:#555;font-weight:bold;white-space:nowrap;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px -10px;text-align:left;background:#f3f3f3 !important;border-bottom:1px solid #aaa;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#f3f3f3 !important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator{color:#555;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #aaa;border-radius:3px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:rgba(255, 255, 255, 0.2)}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:0.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0, 0, 0, 0.2);color:#fff}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-loader{position:absolute;display:flex;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0, 0, 0, 0.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:bold;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #D00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#fff}.tabulator-row.tabulator-row-even{background-color:#EFEFEF}.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9ABCEA}.tabulator-row.tabulator-selected:hover{background-color:#769BCC;cursor:pointer}.tabulator-row.tabulator-row-moving{border:1px solid #000;background:#fff}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #aaa;border-bottom:1px solid #aaa;pointer-events:none;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #aaa;border-bottom:1px solid #aaa}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:4px;border-right:1px solid #aaa;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1D68CD;outline:none;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #dd0000}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#dd0000}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:inline-flex;align-items:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0, 0, 0, 0.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0, 0, 0, 0.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:inline-flex;align-items:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:bold;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:0.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open{display:none}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:bold;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0, 0, 0, 0.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#d00}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:#fff;border:1px solid #aaa;box-shadow:0 0 5px 0 rgba(0, 0, 0, 0.2);font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{position:relative;box-sizing:border-box;padding:5px 10px;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:0.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:#EFEFEF}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu{padding-right:25px}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after{display:inline-block;position:absolute;top:calc(5px + 0.4em);right:10px;height:7px;width:7px;content:"";border-width:1px 1px 0 0;border-style:solid;border-color:#aaa;vertical-align:top;transform:rotate(45deg)}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #aaa}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #aaa;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1D68CD}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid rgba(255, 255, 255, 0.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #1D68CD}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1D68CD}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;color:#333;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #aaa;padding:4px;padding-top:6px;color:#333;font-weight:bold}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{text-align:initial;direction:rtl}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{text-align:initial;border-left:1px solid #aaa;border-right:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-right:initial;margin-left:-1px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:0;padding-left:25px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{left:8px;right:initial}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-right:initial;border-left:1px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{margin-right:initial;margin-left:5px;border-bottom-left-radius:initial;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-right:initial;margin-left:5px}.tabulator.tabulator-rtl .tabulator-col-resize-handle{position:absolute;left:0;right:auto}.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev{right:0;left:auto}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>*:not(.tabulator-print-fullscreen){display:none !important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:bold;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:rgba(0, 0, 0, 0.1)}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px !important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px !important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px !important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px !important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px !important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#d00}.tabulator-print-table .tabulator-data-tree-control{display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0, 0, 0, 0.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0, 0, 0, 0.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}:host(limel-table){isolation:isolate;display:block;--table-header-background-color:var(--contrast-500);--table-header-background-color--hover:var(--contrast-400);--table-header-background-color-when-being-dragged:var(--contrast-100);--table-row-background-color--odd:var(--contrast-200);--table-row-background-color--even:var(--contrast-100);--table-row-background-color--hover:var(\n --lime-elevated-surface-background-color\n );--table-row-background-color--active:var(--contrast-300);--table-arrow-color:var(--contrast-800);--table-arrow-color--active:var(\n --lime-primary-color,\n var(--limel-theme-primary-color)\n );--table-text-color:var(--limel-theme-text-primary-on-background-color);--limel-chip-size:1.25rem}#tabulator-container,#tabulator-table{height:100%;width:100%}.tabulator{display:flex;flex-direction:column}.tabulator *{box-sizing:border-box}.tabulator .tabulator-header{flex-shrink:0}.tabulator .tabulator-tableHolder{isolation:isolate;flex-grow:1;height:unset !important;max-height:unset !important;min-height:unset !important;padding-bottom:5rem}.tabulator .tabulator-footer{flex-shrink:0}#tabulator-container{position:relative}#tabulator-container,#tabulator-table{background-color:transparent;border:none}.tabulator .tabulator-header{color:var(--table-text-color)}.tabulator .tabulator-tableHolder .tabulator-table{color:var(--table-text-color);background-color:transparent}.tabulator .tabulator-header{border-bottom:0;background-color:rgb(var(--table-header-background-color))}.tabulator .tabulator-header .tabulator-headers{width:fit-content}.tabulator .tabulator-header .tabulator-col{transition:background-color 0.2s ease;background-color:rgb(var(--table-header-background-color));border-right-color:rgb(var(--contrast-200))}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{background-color:rgb(var(--table-header-background-color--hover))}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{padding:0 0.5rem 0 0.25rem}.tabulator .tabulator-header .tabulator-col-title-holder{height:1.75rem;display:flex;align-items:center;gap:0.25rem}.tabulator .tabulator-header .tabulator-col-sorter{order:1}.tabulator .tabulator-header .tabulator-col-title{order:2;font-weight:500;padding-right:0 !important;line-height:1.25rem}.tabulator-row{height:2.25rem}.tabulator-row .tabulator-cell{border-right:transparent;padding:0.5rem;padding-left:1rem;height:inherit}.tabulator-row .tabulator-cell[style*="text-align: right;"]{justify-content:flex-end}.tabulator-row .tabulator-cell[style*="text-align: center;"]{justify-content:center}.tabulator-row .tabulator-col-resize-handle{display:none}.tabulator-col,.tabulator-cell{max-width:var(--table-max-column-width, 40rem)}#tabulator-loader,#tabulator-empty-text{position:absolute;width:100%;height:100%;z-index:1;display:flex;align-items:center;justify-content:center}#tabulator-loader{background-color:rgba(var(--contrast-100), 0.6);cursor:wait}#tabulator-empty-text{color:rgb(var(--contrast-800));font-weight:bold;font-size:1.25rem;pointer-events:none}limel-chip{transform:translateY(-0.15rem)}.tabulator-col-sorter{transition:opacity 0.2s ease;right:0 !important;position:relative !important;justify-content:center;cursor:pointer}[aria-sort=none] .tabulator-col-sorter{opacity:0}[aria-sort=desc] .tabulator-col-sorter,[aria-sort=asc] .tabulator-col-sorter{opacity:1}[aria-sort=desc] .tabulator-col-sorter:before,[aria-sort=asc] .tabulator-col-sorter:before{position:absolute;content:"";width:0.125rem;height:0.4rem;background-color:var(--table-arrow-color--active)}.tabulator-sortable[aria-sort=desc]:hover .tabulator-col-sorter,.tabulator-sortable[aria-sort=asc]:hover .tabulator-col-sorter{opacity:1;animation:indicate-sortable-sorted-column 0.5s ease}.tabulator-sortable[aria-sort=none]:hover .tabulator-col-sorter{opacity:1}.tabulator-sortable[aria-sort=none]:hover .tabulator-col-sorter .tabulator-arrow{animation:indicate-sortable-unsorted-column 2s ease forwards}.tabulator-arrow{transition:border 0.2s ease;border-left:0.25rem solid transparent !important;border-right:0.25rem solid transparent !important}.tabulator#tabulator-table .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-arrow{height:0.75rem;border-top-width:0.25rem;border-top-style:solid;border-top-color:rgb(var(--table-arrow-color));border-bottom-width:0.25rem;border-bottom-style:solid;border-bottom-color:rgb(var(--table-arrow-color))}.tabulator#tabulator-table .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-arrow{height:0;transform:translate3d(0, -0.2rem, 0) rotate(180deg);border-top-width:0.25rem;border-bottom-width:0;border-top-color:var(--table-arrow-color--active)}.tabulator#tabulator-table .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-arrow{height:0;transform:translate3d(0, 0.2rem, 0) rotate(180deg);border-top-width:0;border-bottom-width:0.25rem;border-bottom-color:var(--table-arrow-color--active)}@keyframes indicate-sortable-sorted-column{0%,100%{transform:translate3d(0, 0, 0)}30%{transform:translate3d(0, -0.0875rem, 0)}60%{transform:translate3d(0, 0.0875rem, 0)}}@keyframes indicate-sortable-unsorted-column{0%,15%,45%,75%{border-top-color:transparent;border-bottom-color:transparent;transform:translate3d(0, 0, 0)}30%{border-top-color:transparent;border-bottom-color:var(--table-arrow-color--active);transform:translate3d(0, -0.3125rem, 0)}60%{border-top-color:var(--table-arrow-color--active);border-bottom-color:transparent;transform:translate3d(0, 0.3125rem, 0)}100%{border-top-color:rgb(var(--table-arrow-color));border-bottom-color:rgb(var(--table-arrow-color))}}#tabulator-container:not(.has-pagination) .tabulator-paginator{display:var(--limel-table-single-page-paginator-display, grid)}.tabulator .tabulator-footer .tabulator-paginator{box-sizing:border-box;display:grid;grid-auto-flow:column;justify-content:end;padding-top:0.25rem;padding-bottom:0.25rem}.tabulator .tabulator-footer .tabulator-paginator .tabulator-pages{margin:0 0.5rem}.tabulator .tabulator-footer .tabulator-paginator .tabulator-pages .tabulator-page{margin:0 0rem}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page{position:relative;height:1.75rem;min-width:1.75rem;padding:0 0.5rem;margin:0;border:none;border-radius:2.5rem;background-color:transparent}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:rgb(var(--contrast-1200)) !important;background-color:transparent}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):hover,.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):focus,.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):focus-visible{will-change:color, background-color, box-shadow, transform}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):hover,.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):hover{box-shadow:var(--button-shadow-hovered)}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):hover,.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:not([disabled]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page.active{background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset)}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:disabled{opacity:0.3;cursor:not-allowed}.tabulator .tabulator-footer .tabulator-paginator .tabulator-page:disabled:hover{background-color:transparent}button.tabulator-page{display:inline-flex !important;align-items:center;justify-content:center}button.tabulator-page[data-page=first],button.tabulator-page[data-page=prev],button.tabulator-page[data-page=next],button.tabulator-page[data-page=last]{font-size:0;color:transparent !important}button.tabulator-page[data-page=first]:before,button.tabulator-page[data-page=first]:after,button.tabulator-page[data-page=prev]:before,button.tabulator-page[data-page=prev]:after,button.tabulator-page[data-page=next]:before,button.tabulator-page[data-page=next]:after,button.tabulator-page[data-page=last]:before,button.tabulator-page[data-page=last]:after{content:"";transition:transform 0.2s ease;display:block;position:absolute}button.tabulator-page[data-page=first]:after,button.tabulator-page[data-page=prev]:after,button.tabulator-page[data-page=next]:after,button.tabulator-page[data-page=last]:after{border-style:solid;border-color:transparent;border-width:0.25rem 0 0.25rem 0.4rem;border-left-color:var(--limel-theme-on-surface-color)}button.tabulator-page[data-page=first]:before,button.tabulator-page[data-page=last]:before{height:0.5rem;width:0.125rem;background-color:var(--limel-theme-on-surface-color)}button.tabulator-page[data-page=first]:before{left:0.375rem}button.tabulator-page[data-page=last]:before{right:0.375rem}button.tabulator-page[data-page=first]:after,button.tabulator-page[data-page=prev]:after{transform:rotateZ(180deg)}button.tabulator-page[data-page=next]:not([disabled]):hover:after,button.tabulator-page[data-page=last]:not([disabled]):hover:after{transform:translate3d(0.09375rem, 0, 0)}button.tabulator-page[data-page=first]:not([disabled]):hover:after,button.tabulator-page[data-page=prev]:not([disabled]):hover:after{transform:translate3d(-0.09375rem, 0, 0) rotateZ(180deg)}@keyframes fade-in-tabulator-loader{0%{background:transparent}100%{background:rgba(var(--contrast-1400), 0.4)}}@keyframes spin-tabulator-loader{to{transform:rotate(360deg)}}.tabulator .tabulator-loader{animation:fade-in-tabulator-loader 0.5s ease 0.5s forwards;animation-iteration-count:1;cursor:progress;background:transparent}.tabulator .tabulator-loader .tabulator-loader-msg{animation:spin-tabulator-loader 0.4s linear infinite;color:transparent;font-size:0;border-radius:50%;border:0.1875rem solid rgb(var(--lime-brand-color-flexible-turquoise)) !important;border-top-color:transparent !important;width:1.25rem;height:1.25rem;background-color:transparent !important;padding:0}.interactive-feedback{position:absolute;inset:0;min-height:0.125rem;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;background-color:rgb(var(--limel-table-row-background-color))}.tabulator-row:not(.tabulator-calcs){background-color:transparent}.tabulator-row:not(.tabulator-calcs).tabulator-row-odd{--limel-table-row-background-color:var(\n --table-row-background-color--odd\n )}.tabulator-row:not(.tabulator-calcs).tabulator-row-even{--limel-table-row-background-color:var(\n --table-row-background-color--even\n )}.tabulator-row:not(.tabulator-calcs) .tabulator-cell{pointer-events:none}.tabulator-row:not(.tabulator-calcs) .tabulator-cell>*{pointer-events:auto}.tabulator-row:not(.tabulator-calcs).tabulator-selectable:hover{z-index:2}.tabulator-row:not(.tabulator-calcs).tabulator-selectable.active{--limel-table-row-background-color:var(\n --table-row-background-color--active\n )}.tabulator-row:not(.tabulator-calcs).tabulator-selectable.active .interactive-feedback{box-shadow:var(--button-shadow-inset-pressed)}.tabulator-row:not(.tabulator-calcs).tabulator-selectable.active:before{content:"";display:inline-block;box-sizing:border-box;position:sticky;z-index:3;inset:0 0 auto 0;border:0.2rem solid var(--lime-primary-color, var(--limel-theme-primary-color));border-radius:1rem;margin-right:-0.4rem}:host(.has-interactive-rows) .tabulator-row:not(.tabulator-calcs).tabulator-selectable .interactive-feedback:hover{box-shadow:var(--button-shadow-hovered)}:host(.has-interactive-rows) .tabulator-row:not(.tabulator-calcs).tabulator-selectable:active .interactive-feedback{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}:host(.has-interactive-rows) .tabulator-row:not(.tabulator-calcs).tabulator-selectable:not(.active) .interactive-feedback:hover{background-color:var(--table-row-background-color--hover)}:host(.has-low-density) #tabulator-container{width:max-content;max-width:100%;margin:auto}:host(.has-low-density) .tabulator-table{background-color:transparent}:host(.has-low-density) .tabulator-header{border-radius:0.375rem}:host(.has-low-density) .tabulator-footer{border-radius:0.5rem}:host(.has-low-density) .tabulator-calcs-holder{border-radius:0.5rem 0.5rem 0 0}:host(.has-low-density) .tabulator-row{border-radius:0.5rem}:host(.has-low-density) .tabulator-row:not(.tabulator-calcs-bottom){margin-bottom:0.25rem}:host(.has-low-density) .tabulator-row:not(.tabulator-calcs-bottom):first-child{margin-top:0.75rem}:host(.has-low-density) .tabulator-row:not(.tabulator-calcs-bottom) .tabulator-cell{height:2.75rem !important}:host(.has-low-density) .tabulator-row:not(.tabulator-calcs-bottom) .tabulator-cell:first-child{border-radius:0.5rem 0 0 0.5rem}:host(.has-low-density) .tabulator-row:not(.tabulator-calcs-bottom) .tabulator-cell:last-child{border-radius:0 0.5rem 0.5rem 0}:host(.has-pagination-on-top) .tabulator .tabulator-header{order:2}:host(.has-pagination-on-top) .tabulator .tabulator-tableHolder{order:3}:host(.has-pagination-on-top) .tabulator .tabulator-footer{order:1;background-color:transparent}:host(.has-pagination-on-top) .tabulator .tabulator-calcs-holder{position:absolute;bottom:0}:host(.has-pagination-on-top):has(.tabulator-calcs-holder) .tabulator-tableHolder{margin-bottom:1.5rem}:host(.has-pagination-on-top) .select-all{top:2.5rem}.lime-col-title__custom-component{width:100%;display:flex;align-items:center;margin-right:1.25rem;gap:0.25rem}.title-component-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex-grow:1;flex-shrink:1;min-width:0}.title-component-slot{flex-shrink:0}@keyframes detach-a-column-header{0%{transform:rotate(0deg)}100%{transform:rotate(-2deg)}}.has-movable-columns .tabulator-header{overflow-y:visible}.has-movable-columns .tabulator-header .tabulator-col:not(.tabulator-frozen){cursor:move !important}.has-movable-columns .tabulator-header .tabulator-col:not(.tabulator-frozen).tabulator-sortable.tabulator-moving{animation:detach-a-column-header 0.2s ease forwards;opacity:0.9;border:none;border-radius:0.25rem;background-color:rgb(var(---table-header-background-color-when-being-dragged));box-shadow:var(--shadow-depth-16)}.has-movable-columns .tabulator-header .tabulator-col:not(.tabulator-frozen).tabulator-sortable.tabulator-moving:hover{background-color:rgb(var(---table-header-background-color-when-being-dragged))}.has-movable-columns .tabulator-header .tabulator-col:not(.tabulator-frozen).tabulator-sortable.tabulator-moving .tabulator-arrow:before{background-color:rgb(var(---table-header-background-color-when-being-dragged))}.tabulator .tabulator-footer{transition:transform 0.5s ease-out, opacity 0.35s ease;padding-top:0;padding-bottom:0;color:var(--table-text-color);background-color:rgb(var(--table-header-background-color--hover));border:none;user-select:auto}.tabulator .tabulator-footer .tabulator-calcs-holder{border-color:rgb(var(--contrast-500));background:rgb(var(--contrast-500)) !important;margin-top:0;margin-bottom:0}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{height:1.5rem;background:transparent !important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-calcs{cursor:default}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-cell{height:1.5rem !important;padding-top:0.25rem;padding-bottom:0}.select-all,.limel-table--row-selector{--limel-checkbox-min-height:1.25rem;display:inline-flex !important;align-items:center;justify-content:center;text-overflow:unset !important;padding:0 !important}.select-all{position:absolute;z-index:1;left:0.375rem;top:0.1875rem}.limel-table--row-selector{position:sticky !important;left:0;border-width:0;z-index:1}.limel-table--row-selector:before{content:"";inset:0.25rem 0;position:absolute;background-image:linear-gradient(to right, rgb(var(--limel-table-row-background-color)) 70%, rgb(var(--limel-table-row-background-color), 0))}.limel-table--row-selector limel-checkbox{transition:opacity 0.2s ease;opacity:0.3}.tabulator-row:hover .limel-table--row-selector limel-checkbox{opacity:1}.has-selection .limel-table--row-selector limel-checkbox{opacity:1}.limel-table--row-selector .tabulator-col-resize-handle{display:none}.limel-table--row-selector+.tabulator-col .tabulator-col-resize-handle.prev,.limel-table--row-selector+.tabulator-cell .tabulator-col-resize-handle.prev{display:none}.has-movable-columns .tabulator-header .tabulator-col.limel-table--row-selector{border:none;cursor:default !important;pointer-events:none;background-color:transparent;background-image:linear-gradient(to right, rgb(var(--table-header-background-color--hover)) 70%, rgb(var(--table-header-background-color--hover), 0));left:0}.has-selection .tabulator-calcs .tabulator-cell{color:var(--table-arrow-color--active)}';const $t=1;const Zt=class{constructor(i){t(this,i);this.sort=r(this,"sort",7);this.changePage=r(this,"changePage",7);this.load=r(this,"load",7);this.activate=r(this,"activate",7);this.changeColumns=r(this,"changeColumns",7);this.select=r(this,"select",7);this.selectAll=r(this,"selectAll",7);this.shouldSort=false;this.getActiveRows=()=>{if(!this.tabulator){return[]}return this.tabulator.getRows("active")};this.getActiveRowsData=()=>this.getActiveRows().map((t=>t.getData()));this.selectAllOnChange=t=>{const i=t.detail;t.stopPropagation();t.preventDefault();const e=i?this.getActiveRowsData():[];this.select.emit(e);this.tableSelection.setSelection(e);this.selectAll.emit(i)};this.getColumnOptions=()=>{if(!this.movableColumns){return{}}return{movableColumns:true,columnMoved:this.handleMoveColumn}};this.handleMoveColumn=(t,i)=>{const e=i.map(this.findColumn).filter(Boolean);this.changeColumns.emit(e)};this.findColumn=t=>this.columns.find((i=>i.field===t.getField()&&i.title===t.getDefinition().title));this.getTranslation=t=>w.get(t,this.language);this.data=[];this.columns=[];this.mode="local";this.layout=undefined;this.pageSize=undefined;this.totalRows=undefined;this.sorting=[];this.activeRow=undefined;this.movableColumns=undefined;this.sortableColumns=true;this.loading=false;this.page=$t;this.emptyMessage=undefined;this.aggregates=undefined;this.selectable=undefined;this.selection=undefined;this.language="en";this.handleDataSorting=this.handleDataSorting.bind(this);this.handlePageLoaded=this.handlePageLoaded.bind(this);this.handleRenderComplete=this.handleRenderComplete.bind(this);this.handleAjaxRequesting=this.handleAjaxRequesting.bind(this);this.requestData=this.requestData.bind(this);this.onClickRow=this.onClickRow.bind(this);this.formatRow=this.formatRow.bind(this);this.formatRows=this.formatRows.bind(this);this.updateMaxPage=this.updateMaxPage.bind(this);this.initTabulatorComponent=this.initTabulatorComponent.bind(this);this.setSelection=this.setSelection.bind(this);this.addColumnAggregator=this.addColumnAggregator.bind(this);this.pool=new Vt(document);this.columnFactory=new Rt(this.pool)}componentWillLoad(){this.firstRequest=this.mode==="remote";this.initTableSelection()}componentDidLoad(){this.init()}disconnectedCallback(){this.pool.clear()}totalRowsChanged(){this.updateMaxPage()}pageSizeChanged(){this.updateMaxPage()}pageChanged(){if(!this.tabulator){return}if(this.tabulator.getPage()===this.page){return}this.tabulator.setPage(this.page)}activeRowChanged(){if(!this.tabulator){return}this.formatRows()}updateData(t=[],i=[]){const e=this.getRowIds(t);const r=this.getRowIds(i);const n=this.shouldReplaceData(e,r);const o=!Gt(t,i);setTimeout((()=>{if(!this.tabulator){return}if(n){this.pool.releaseAll();this.tabulator.replaceData(t);this.setSelection();return}if(o){this.tabulator.updateData(t);this.setSelection();return}this.tabulator.updateOrAddData(t)}))}updateColumns(t,i){if(!this.tabulator){return}if(this.areSameColumns(t,i)){return}const e=this.tabulator.getColumns().filter((t=>t.getField()));const r=e.map((t=>i.find((i=>i.field===t.getField()))));if(this.areSameColumns(t,r)){return}this.tabulator.setColumns(this.getColumnDefinitions());this.shouldSort=true}updateAggregates(t,i){if(!this.tabulator){return}if(g(t,i)){return}if(!this.haveSameAggregateFields(t,i)){this.init();return}this.tabulator.recalc();this.tabulator.rowManager.redraw()}updateSelection(t){if(!this.tableSelection){return}this.tableSelection.setSelection(t)}updateSelectable(){if(this.tableSelection&&!this.selectable){this.tableSelection=null}this.initTableSelection();this.init()}updateSortableColumns(){if(!this.tabulator){return}this.tabulator.setColumns(this.getColumnDefinitions());this.shouldSort=true}updateSorting(t,i){const e=this.getColumnSorter(t);const r=this.getColumnSorter(i);if(g(e,r)){return}this.tabulator.setSort(e)}shouldReplaceData(t,i){return!this.areEqualIds(t,i)||!this.isSameOrder(t,i)}getRowIds(t){return t.map((t=>{var i;return(i=t.id)!==null&&i!==void 0?i:t}))}areEqualIds(t,i){const e=new Set(t);const r=new Set(i);return e.size===r.size&&t.every((t=>r.has(t)))}isSameOrder(t,i){return t.every(((t,e)=>t===i[e]))}areSameColumns(t,i){return t.length===i.length&&t.every((t=>i.includes(t)))}haveSameAggregateFields(t,i){const e=(i===null||i===void 0?void 0:i.map((t=>t.field)))||[];return(t===null||t===void 0?void 0:t.length)===(i===null||i===void 0?void 0:i.length)&&!!(t===null||t===void 0?void 0:t.every((t=>e.includes(t.field))))}init(){if(this.tabulator){this.pool.releaseAll();this.tabulator.destroy()}const t=this.host.shadowRoot.querySelector("#tabulator-table");this.initTabulatorComponent(t)}initTabulatorComponent(t){if(!("ResizeObserver"in window)){this.tabulator=new H(t,this.getOptions());this.setSelection();return}const i=new ResizeObserver((()=>{requestAnimationFrame((()=>{this.tabulator=new H(t,this.getOptions());this.setSelection();i.unobserve(t);i.disconnect()}))}));i.observe(t)}initTableSelection(){if(this.selectable){this.tableSelection=new qt((()=>this.tabulator),this.pool,this.select,(t=>this.getTranslation(t)));this.tableSelection.setSelection(this.selection)}}setSelection(){if(!(this.tabulator&&this.tableSelection)){return}this.tableSelection.setSelection(this.selection)}updateMaxPage(){var t;(t=this.tabulator)===null||t===void 0?void 0:t.setMaxPage(this.calculatePageCount())}getOptions(){const t=this.getAjaxOptions();const i=this.getPaginationOptions();const e=this.getColumnOptions();return Object.assign(Object.assign(Object.assign(Object.assign({data:this.data,layout:Yt(this.layout),columns:this.getColumnDefinitions(),dataSorting:this.handleDataSorting,pageLoaded:this.handlePageLoaded,renderComplete:this.handleRenderComplete},t),i),{rowClick:this.onClickRow,rowFormatter:this.formatRow,initialSort:this.getInitialSorting(),nestedFieldSeparator:false}),e)}getInitialSorting(){if(this.currentSorting&&this.currentSorting.length>0){return this.getColumnSorter(this.currentSorting)}return this.getColumnSorter(this.sorting)}getColumnSorter(t){return t.map((t=>({column:String(t.column.field),dir:t.direction.toLocaleLowerCase()})))}getColumnDefinitions(){const t=this.columns.map(this.addColumnAggregator).map((t=>{var i;const e=this.columnFactory.create(t);const r=(i=t.headerSort)!==null&&i!==void 0?i:true;e.headerSort=this.sortableColumns&&r;return e}));if(this.tableSelection){return this.tableSelection.getColumnDefinitions(t)}return t}addColumnAggregator(t){var i;if(!((i=this.aggregates)===null||i===void 0?void 0:i.length)||t.aggregator){return t}const e=this.aggregates.find((i=>i.field===t.field));if(e){t.aggregator=t=>{var i;if(!t){return}const e=(i=this.aggregates.find((i=>i.field===t.field)))===null||i===void 0?void 0:i.value;if(t.formatter){return t.formatter(e)}return e}}return t}getAjaxOptions(){if(!this.isRemoteMode()){return{}}const t="https://localhost";return{ajaxSorting:true,ajaxURL:t,ajaxRequestFunc:this.requestData,ajaxRequesting:this.handleAjaxRequesting}}handleAjaxRequesting(){var t;const i=this.firstRequest&&!!((t=this.data)===null||t===void 0?void 0:t.length);this.firstRequest=false;if(i){setTimeout((()=>{this.updateMaxPage();this.tabulator.replaceData(this.data)}));return false}return true}getPaginationOptions(){if(!this.pageSize){return{}}return{pagination:this.isRemoteMode()?"remote":"local",paginationSize:this.pageSize,paginationInitialPage:this.page}}requestData(t,i,e){const r=e.sorters;const n=e.page;if(this.page!==n){this.changePage.emit(n)}const o=r.map(It(this.columns));const s={page:n,sorters:o};const a=Promise.resolve({last_page:this.calculatePageCount(),data:this.data});if(!g(this.currentLoad,s)){this.currentSorting=o;this.currentLoad=s;this.load.emit(s)}return a}isRemoteMode(){return this.mode==="remote"}handleDataSorting(t){if(this.isRemoteMode()){return}const i=t.map(It(this.columns));if(i.length===0){return}this.sort.emit(i)}handlePageLoaded(t){if(this.isRemoteMode()){return}this.changePage.emit(t)}handleRenderComplete(){if(this.tabulator&&this.shouldSort){this.shouldSort=false;this.tabulator.setSort(this.getColumnSorter(this.sorting))}}onClickRow(t,i){if(i.getPosition===undefined){return}if(this.isActiveRow(i)){this.activeRow=null}else{this.activeRow=i.getData()}this.activate.emit(this.activeRow)}formatRows(){this.tabulator.getRows().forEach(this.formatRow)}formatRow(t){if(this.isActiveRow(t)){t.getElement().classList.add("active")}else{t.getElement().classList.remove("active")}const i=t.getElement().querySelectorAll(".interactive-feedback");if(i.length===0){const i=t.getElement().ownerDocument.createElement("div");i.classList.add("interactive-feedback");t.getElement().prepend(i)}}isActiveRow(t){var i;if(!this.activeRow){return false}const e=(i=this.activeRow.id)!==null&&i!==void 0?i:null;if(e!==null){return e===t.getData().id}return this.activeRow===t.getData()}calculatePageCount(){let t=this.totalRows;if(!t){t=this.data.length}return Math.ceil(t/this.pageSize)}hasAggregation(t){return t.some((t=>C(t,"aggregator")))}render(){var t;return n(o,{class:{"has-low-density":this.layout==="lowDensity"}},n("div",{id:"tabulator-container",class:{"has-pagination":this.totalRows>this.pageSize,"has-aggregation":this.hasAggregation(this.columns),"has-movable-columns":this.movableColumns,"has-rowselector":this.selectable,"has-selection":(t=this.tableSelection)===null||t===void 0?void 0:t.hasSelection}},n("div",{id:"tabulator-loader",style:{display:this.loading?"flex":"none"}},n("limel-spinner",{size:"large"})),this.renderEmptyMessage(),this.renderSelectAll(),n("div",{id:"tabulator-table"})))}renderSelectAll(){var t,i,e;if(!this.selectable){return}const r=!this.loading&&this.tableSelection;return n("div",{class:"select-all",style:{display:r?"inline-block":"none"}},n("limel-checkbox",{class:"hide-label",onChange:this.selectAllOnChange,disabled:this.data.length===0,checked:(t=this.tableSelection)===null||t===void 0?void 0:t.hasSelection,indeterminate:((i=this.tableSelection)===null||i===void 0?void 0:i.hasSelection)&&((e=this.selection)===null||e===void 0?void 0:e.length)<this.data.length,label:this.getTranslation("table.select-all")}))}renderEmptyMessage(){const t=!this.loading&&this.data.length===0&&this.emptyMessage;return n("div",{id:"tabulator-empty-text",style:{display:t?"flex":"none"}},n("span",null,this.emptyMessage))}get host(){return s(this)}static get watchers(){return{totalRows:["totalRowsChanged"],pageSize:["pageSizeChanged"],page:["pageChanged"],activeRow:["activeRowChanged"],data:["updateData"],columns:["updateColumns"],aggregates:["updateAggregates"],selection:["updateSelection"],selectable:["updateSelectable"],sortableColumns:["updateSortableColumns"],sorting:["updateSorting"]}}};Zt.style=Xt;export{Zt as limel_table};
2
+ //# sourceMappingURL=p-68799403.entry.js.map