/*! Copyright 2010-2020 SpryMedia Ltd. This source file is free software, available under the following license: MIT license - http://datatables.net/license/mit This source file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. For details please refer to: http://www.datatables.net FixedColumns 3.3.2 ©2010-2020 SpryMedia Ltd - datatables.net/license */ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(c,h,k){c instanceof String&&(c=String(c));for(var t=c.length,n=0;n=this.s.iRightColumns&&(d=c(this.dom.clone.right.body).find("[data-dt-row="+a+"][data-dt-column="+b+"]"));return d&&d.length?d[0]:(new c.fn.dataTable.Api(this.s.dt)).cell(a,b).node()},_fnConstruct:function(a){var b=this;if("function"!=typeof this.s.dt.oInstance.fnVersionCheck||!0!==this.s.dt.oInstance.fnVersionCheck("1.8.0"))alert("FixedColumns "+u.VERSION+" required DataTables 1.8.0 or later. Please upgrade your DataTables installation");else if(""===this.s.dt.oScroll.sX)this.s.dt.oInstance.oApi._fnLog(this.s.dt, 1,"FixedColumns is not needed (no x-scrolling in DataTables enabled), so no action will be taken. Use 'FixedHeader' for column fixing when scrolling is not enabled");else{this.s=c.extend(!0,this.s,u.defaults,a);a=this.s.dt.oClasses;this.dom.grid.dt=c(this.s.dt.nTable).parents("div."+a.sScrollWrapper)[0];this.dom.scroller=c("div."+a.sScrollBody,this.dom.grid.dt)[0];this._fnColCalc();this._fnGridSetup();var d,f=!1;c(this.s.dt.nTableWrapper).on("mousedown.DTFC",function(g){0===g.button&&(f=!0,c(k).one("mouseup", function(){f=!1}))});c(this.dom.scroller).on("mouseover.DTFC touchstart.DTFC",function(){f||(d="main")}).on("scroll.DTFC",function(g){!d&&g.originalEvent&&(d="main");if("main"===d||"key"===d)0')[0], d=b.childNodes[0],f=b.childNodes[1];this.dom.grid.dt.parentNode.insertBefore(b,this.dom.grid.dt);b.appendChild(this.dom.grid.dt);this.dom.grid.wrapper=b;0b.clientWidth&&(d.x=!0);a.offsetHeight>b.clientHeight&&(d.y=!0);return d},_fnDraw:function(a){this._fnGridLayout();this._fnCloneLeft(a);this._fnCloneRight(a);c(this.dom.scroller).trigger("scroll");null!==this.s.fnDrawCallback&&this.s.fnDrawCallback.call(this,this.dom.clone.left,this.dom.clone.right);c(this).trigger("draw.dtfc",{leftClone:this.dom.clone.left,rightClone:this.dom.clone.right})},_fnCloneRight:function(a){if(!(0>=this.s.iRightColumns)){var b,d=[];for(b=this.s.iTableColumns- this.s.iRightColumns;b=this.s.iLeftColumns)){var b,d=[];for(b=0;bthead",a.header);p.empty();var r=0;for(l=q.length;rthead",a.header)[0]);r=0;for(l=q.length;rtbody>tr",e.dom.body).css("height","auto");null!==a.body&&(c(a.body).remove(),a.body=null);a.body=c(this.dom.body).clone(!0)[0];a.body.className+=" DTFC_Cloned";a.body.style.paddingBottom=g.oScroll.iBarWidth+"px";a.body.style.marginBottom=2*g.oScroll.iBarWidth+"px";null!==a.body.getAttribute("id")&&a.body.removeAttribute("id");c(">thead>tr",a.body).empty();c(">tfoot",a.body).remove();var C=c("tbody",a.body)[0];c(C).empty();if(0thead>tr", a.body)[0];for(m=0;mtbody>tr",e.dom.body).each(function(y){y=!1===e.s.dt.oFeatures.bServerSide?e.s.dt.aiDisplay[e.s.dt._iDisplayStart+y]:y;var D=e.s.dt.aoData[y].anCells||c(this).children("td, th"),B=this.cloneNode(!1);B.removeAttribute("id");B.setAttribute("data-dt-row", y);for(m=0;mtbody>tr",e.dom.body).each(function(y){v=this.cloneNode(!0);v.className+=" DTFC_NoData";c("td",v).html("");C.appendChild(v)});a.body.style.width="100%";a.body.style.margin="0";a.body.style.padding="0";g.oScroller!==t&&(l=g.oScroller.dom.force,b.forcer?b.forcer.style.height=l.style.height:(b.forcer= l.cloneNode(!0),b.liner.appendChild(b.forcer)));b.liner.appendChild(a.body);this._fnEqualiseHeights("tbody",e.dom.body,a.body);if(null!==g.nTFoot){if(f){null!==a.footer&&a.footer.parentNode.removeChild(a.footer);a.footer=c(this.dom.footer).clone(!0,!0)[0];a.footer.className+=" DTFC_Cloned";a.footer.style.width="100%";b.foot.appendChild(a.footer);q=this._fnCopyLayout(g.aoFooter,d,!0);b=c(">tfoot",a.footer);b.empty();r=0;for(l=q.length;rtfoot",a.footer)[0]),r=0,l=q.length;rthead",a.header)[0]);c(b).each(function(y){A=d[y];this.style.width=e.s.aiInnerWidths[A]+"px"});null!==e.s.dt.nTFoot&&(b=g.oApi._fnGetUniqueThs(g,c(">tfoot",a.footer)[0]),c(b).each(function(y){A=d[y];this.style.width=e.s.aiInnerWidths[A]+ "px"}))},_fnGetTrNodes:function(a){for(var b=[],d=0,f=a.childNodes.length;d"+a+">tr:eq(0)",b).children(":first");a.outerHeight();a.height();f=this._fnGetTrNodes(f);b=this._fnGetTrNodes(d);var e=[];d=0;for(a=b.length;dl?m:l;"semiauto"==this.s.sHeightMatch&&(f[d]._DTTC_iHeight=l);e.push(l)}d=0;for(a=b.length;d").css({position:"absolute",top:0,left:0,height:10,width:50,overflow:"scroll"}).appendTo("body");z=a[0].clientWidth===a[0].offsetWidth&&0!==this._fnDTOverflow().bar;a.remove()}return z}});u.defaults={iLeftColumns:1,iRightColumns:0,fnDrawCallback:null,sHeightMatch:"semiauto"}; u.version="3.3.2";n.Api.register("fixedColumns()",function(){return this});n.Api.register("fixedColumns().update()",function(){return this.iterator("table",function(a){a._oFixedColumns&&a._oFixedColumns.fnUpdate()})});n.Api.register("fixedColumns().relayout()",function(){return this.iterator("table",function(a){a._oFixedColumns&&a._oFixedColumns.fnRedrawLayout()})});n.Api.register("rows().recalcHeight()",function(){return this.iterator("row",function(a,b){a._oFixedColumns&&a._oFixedColumns.fnRecalculateHeight(this.row(b).node())})}); n.Api.register("fixedColumns().rowIndex()",function(a){a=c(a);return a.parents(".DTFC_Cloned").length?this.rows({page:"current"}).indexes()[a.index()]:this.row(a).index()});n.Api.register("fixedColumns().cellIndex()",function(a){a=c(a);if(a.parents(".DTFC_Cloned").length){var b=a.parent().index();b=this.rows({page:"current"}).indexes()[b];a=a.parents(".DTFC_LeftWrapper").length?a.index():this.columns().flatten().length-this.context[0]._oFixedColumns.s.iRightColumns+a.index();return{row:b,column:this.column.index("toData", a),columnVisible:a}}return this.cell(a).index()});n.Api.registerPlural("cells().fixedNodes()","cell().fixedNode()",function(){return this.iterator("cell",function(a,b,d){return a._oFixedColumns?a._oFixedColumns.fnToFixedNode(b,d):this.cell(b,d).node()},1)});c(k).on("init.dt.fixedColumns",function(a,b){if("dt"===a.namespace){a=b.oInit.fixedColumns;var d=n.defaults.fixedColumns;if(a||d)d=c.extend({},a,d),!1!==a&&new u(b,d)}});c.fn.dataTable.FixedColumns=u;return c.fn.DataTable.FixedColumns=u});