2 var FrozenColumns=
function(t){this.table=t,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode=
"left",this.active=!1,this.scrollEndTimer=!1};FrozenColumns.prototype.reset=
function(){this.initializationMode=
"left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0},FrozenColumns.prototype.initializeColumn=
function(t){var o={margin:0,edge:!1};t.definition.frozen?t.parent.isGroup?console.warn(
"Frozen Column Error - Grouped columns cannot be frozen"):t.isGroup?console.warn(
"Frozen Column Error - Column Groups cannot be frozen"):(o.position=this.initializationMode,
"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.modules.frozen=o):this.initializationMode=
"right"},FrozenColumns.prototype.scrollHorizontal=
function(){var t,o=
this;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout(
function(){o.layout()},100),t=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),t.forEach(
function(t){
"row"===t.type&&o.layoutRow(t)}),this.table.rowManager.tableElement.style.marginRight=
this.rightMargin)},FrozenColumns.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},FrozenColumns.prototype.layoutCalcRows=
function(){this.table.modExists(
"columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow))},FrozenColumns.prototype.layoutColumnPosition=
function(t){var o=
this;this.leftColumns.forEach(
function(e,n){e.modules.frozen.margin=o._calcSpace(o.leftColumns,n)+o.table.columnManager.scrollLeft+
"px",n==o.leftColumns.length-1?e.modules.frozen.edge=!0:e.modules.frozen.edge=!1,o.layoutElement(e.getElement(),e),t&&e.cells.forEach(
function(t){o.layoutElement(t.getElement(),e)})}),this.rightColumns.forEach(
function(e,n){e.modules.frozen.margin=o.rightPadding-o._calcSpace(o.rightColumns,n+1)+
"px",n==o.rightColumns.length-1?e.modules.frozen.edge=!0:e.modules.frozen.edge=!1,o.layoutElement(e.getElement(),e),t&&e.cells.forEach(
function(t){o.layoutElement(t.getElement(),e)})})},FrozenColumns.prototype.layout=
function(){var t=
this;t.active&&(this.calcMargins(),t.table.rowManager.getDisplayRows().forEach(
function(o){
"row"===o.type&&t.layoutRow(o)}),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.layoutRow=
function(t){var o=
this;t.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach(
function(e){var n=t.getCell(e);n&&o.layoutElement(n.getElement(),e)}),this.rightColumns.forEach(
function(e){var n=t.getCell(e);n&&o.layoutElement(n.getElement(),e)})},FrozenColumns.prototype.layoutElement=
function(t,o){o.modules.frozen&&(t.style.position=
"absolute",t.style.left=o.modules.frozen.margin,t.classList.add(
"tabulator-frozen"),o.modules.frozen.edge&&t.classList.add(
"tabulator-frozen-"+o.modules.frozen.position))},FrozenColumns.prototype._calcSpace=
function(t,o){
for(var e=0,n=0;n<o;n++)t[n].visible&&(e+=t[n].getWidth());
return e},Tabulator.prototype.registerModule(
"frozenColumns",FrozenColumns);