text: !function(t,s,o){var e=function(e,i){"use strict";var r=function(t,o){!this instanceof r||("undefined"==typeof o&&(o={}),this.s={dt:t,tableTop:0,tableBottom:0,redrawTop:0,redrawBottom:0,autoHeight:!0,viewportRows:0,stateTO:null,drawTO:null,heights:{jump:null,page:null,virtual:null,scroll:null,row:null,viewport:null},topRowFloat:0,scrollDrawDiff:null,loaderVisible:!1},this.s=e.extend(this.s,r.oDefaults,o),this.s.heights.row=this.s.rowHeight,this.dom={force:s.createElement("div"),scroller:null,table:null,loader:null},this.s.dt.oScroller=this,this._fnConstruct())};if(r.prototype={fnRowToPixels:function(t,s,e){var i;if(e)i=this._domain("virtualToPhysical",t*this.s.heights.row);else{var r=t-this.s.baseRowTop;i=this.s.baseScrollTop+r*this.s.heights.row}return s||s===o?parseInt(i,10):i},fnPixelsToRow:function(t,s,e){var i=t-this.s.baseScrollTop,r=e?this._domain("physicalToVirtual",t)/this.s.heights.row:i/this.s.heights.row+this.s.baseRowTop;return s||s===o?parseInt(r,10):r},fnScrollToRow:function(t,s){var o=this,i=!1,r=this.fnRowToPixels(t),l=(this.s.displayBuffer-1)/2*this.s.viewportRows,a=t-l;a<0&&(a=0),(r>this.s.redrawBottom||r<this.s.redrawTop)&&this.s.dt._iDisplayStart!==a&&(i=!0,r=this.fnRowToPixels(t,!1,!0)),"undefined"==typeof s||s?(this.s.ani=i,e(this.dom.scroller).animate({scrollTop:r},function(){setTimeout(function(){o.s.ani=!1},25)})):e(this.dom.scroller).scrollTop(r)},fnMeasure:function(t){this.s.autoHeight&&this._fnCalcRowHeight();var s=this.s.heights;s.viewport=e(this.dom.scroller).height(),this.s.viewportRows=parseInt(s.viewport/s.row,10)+1,this.s.dt._iDisplayLength=this.s.viewportRows*this.s.displayBuffer,(t===o||t)&&this.s.dt.oInstance.fnDraw()},_fnConstruct:function(){var s=this;if(!this.s.dt.oFeatures.bPaginate)return void this.s.dt.oApi._fnLog(this.s.dt,0,"Pagination must be enabled for Scroller");this.dom.force.style.position="absolute",this.dom.force.style.top="0px",this.dom.force.style.left="0px",this.dom.force.style.width="1px",this.dom.scroller=e("div."+this.s.dt.oClasses.sScrollBody,this.s.dt.nTableWrapper)[0],this.dom.scroller.appendChild(this.dom.force),this.dom.scroller.style.position="relative",this.dom.table=e(">table",this.dom.scroller)[0],this.dom.table.style.position="absolute",this.dom.table.style.top="0px",this.dom.table.style.left="0px",e(this.s.dt.nTableWrapper).addClass("DTS"),this.s.loadingIndicator&&(this.dom.loader=e('<div class="DTS_Loading">'+this.s.dt.oLanguage.sLoadingRecords+"</div>").css("display","none"),e(this.dom.scroller.parentNode).css("position","relative").append(this.dom.loader)),this.s.heights.row&&"auto"!=this.s.heights.row&&(this.s.autoHeight=!1),this.fnMeasure(!1),this.s.ingnoreScroll=!0,this.s.stateSaveThrottle=this.s.dt.oApi._fnThrottle(function(){s.s.dt.oApi._fnSaveState(s.s.dt)},500),e(this.dom.scroller).on("scroll.DTS",function(t){s._fnScroll.call(s)}),e(this.dom.scroller).on("touchstart.DTS",function(){s._fnScroll.call(s)}),this.s.dt.aoDrawCallback.push({fn:function(){s.s.dt.bInitialised&&s._fnDrawCallback.call(s)},sName:"Scroller"}),e(t).on("resize.DTS",function(){s.fnMeasure(!1),s._fnInfo()});var o=!0;this.s.dt.oApi._fnCallbackReg(this.s.dt,"aoStateSaveParams",function(t,e){o&&s.s.dt.oLoadedState?(e.iScroller=s.s.dt.oLoadedState.iScroller,e.iScrollerTopRow=s.s.dt.oLoadedState.iScrollerTopRow,o=!1):(e.iScroller=s.dom.scroller.scrollTop,e.iScrollerTopRow=s.s.topRowFloat)},"Scroller_State"),this.s.dt.oLoadedState&&(this.s.topRowFloat=this.s.dt.oLoadedState.iScrollerTopRow||0),this.s.dt.aoDestroyCallback.push({sName:"Scroller",fn:function(){e(t).off("resize.DTS"),e(s.dom.scroller).off("touchstart.DTS scroll.DTS"),e(s.s.dt.nTableWrapper).removeClass("DTS"),e("div.DTS_Loading",s.dom.scroller.parentNode).remove(),s.dom.table.style.position="",s.dom.table.style.top="",s.dom.table.style.left=""}})},_fnScroll:function(){var t,s=this,o=this.s.heights,i=this.dom.scroller.scrollTop;if(!this.s.skip&&!this.s.ingnoreScroll){if(this.s.dt.bFiltered||this.s.dt.bSorted)return void(this.s.lastScrollTop=0);if(this._fnInfo(),clearTimeout(this.s.stateTO),this.s.stateTO=setTimeout(function(){s.s.dt.oApi._fnSaveState(s.s.dt)},250),i<this.s.redrawTop||i>this.s.redrawBottom){var r=Math.ceil((this.s.displayBuffer-1)/2*this.s.viewportRows);if(Math.abs(i-this.s.lastScrollTop)>o.viewport||this.s.ani?(t=parseInt(this._domain("physicalToVirtual",i)/o.row,10)-r,this.s.topRowFloat=this._domain("physicalToVirtual",i)/o.row):(t=this.fnPixelsToRow(i)-r,this.s.topRowFloat=this.fnPixelsToRow(i,!1)),t<=0?t=0:t+this.s.dt._iDisplayLength>this.s.dt.fnRecordsDisplay()?(t=this.s.dt.fnRecordsDisplay()-this.s.dt._iDisplayLength,t<0&&(t=0)):t%2!==0&&t++,t!=this.s.dt._iDisplayStart){this.s.tableTop=e(this.s.dt.nTable).offset().top,this.s.tableBottom=e(this.s.dt.nTable).height()+this.s.tableTop;var l=function(){null===s.s.scrollDrawReq&&(s.s.scrollDrawReq=i),s.s.dt._iDisplayStart=t,s.s.dt.oApi._fnCalculateEnd&&s.s.dt.oApi._fnCalculateEnd(s.s.dt),s.s.dt.oApi._fnDraw(s.s.dt)};this.s.dt.oFeatures.bServerSide?(clearTimeout(this.s.drawTO),this.s.drawTO=setTimeout(l,this.s.serverWait)):l(),this.dom.loader&&!this.s.loaderVisible&&(this.dom.loader.css("display","block"),this.s.loaderVisible=!0)}}this.s.lastScrollTop=i,this.s.stateSaveThrottle()}},_domain:function(t,s){var o,e=this.s.heights;if(e.virtual===e.scroll){if(o=(e.virtual-e.viewport)/(e.scroll-e.viewport),"virtualToPhysical"===t)return s/o;if("physicalToVirtual"===t)return s*o}var i=(e.scroll-e.viewport)/2,r=(e.virtual-e.viewport)/2;return o=r/(i*i),"virtualToPhysical"===t?s<r?Math.pow(s/o,.5):(s=2*r-s,s<0?e.scroll:2*i-Math.pow(s/o,.5)):"physicalToVirtual"===t?s<i?s*s*o:(s=2*i-s,s<0?e.virtual:2*r-s*s*o):void 0},_fnDrawCallback:function(){var t=this,s=this.s.heights,o=this.dom.scroller.scrollTop,i=(o+s.viewport,e(this.s.dt.nTable).height()),r=this.s.dt._iDisplayStart,l=this.s.dt._iDisplayLength,a=this.s.dt.fnRecordsDisplay();this.s.skip=!0,this._fnScrollForce(),o=0===r?this.s.topRowFloat*s.row:r+l>=a?s.scroll-(a-this.s.topRowFloat)*s.row:this._domain("virtualToPhysical",this.s.topRowFloat*s.row),this.dom.scroller.scrollTop=o,this.s.baseScrollTop=o,this.s.baseRowTop=this.s.topRowFloat;var n=o-(this.s.topRowFloat-r)*s.row;0===r?n=0:r+l>=a&&(n=s.scroll-i),this.dom.table.style.top=n+"px",this.s.tableTop=n,this.s.tableBottom=i+this.s.tableTop;var h=(o-this.s.tableTop)*this.s.boundaryScale;if(this.s.redrawTop=o-h,this.s.redrawBottom=o+h,this.s.skip=!1,this.s.dt.oFeatures.bStateSave&&null!==this.s.dt.oLoadedState&&"undefined"!=typeof this.s.dt.oLoadedState.iScroller){var d=!(!this.s.dt.sAjaxSource&&!t.s.dt.ajax||this.s.dt.oFeatures.bServerSide);(d&&2==this.s.dt.iDraw||!d&&1==this.s.dt.iDraw)&&setTimeout(function(){e(t.dom.scroller).scrollTop(t.s.dt.oLoadedState.iScroller),t.s.redrawTop=t.s.dt.oLoadedState.iScroller-s.viewport/2,setTimeout(function(){t.s.ingnoreScroll=!1},0)},0)}else t.s.ingnoreScroll=!1;setTimeout(function(){t._fnInfo.call(t)},0),this.dom.loader&&this.s.loaderVisible&&(this.dom.loader.css("display","none"),this.s.loaderVisible=!1)},_fnScrollForce:function(){var t=this.s.heights,s=1e6;t.virtual=t.row*this.s.dt.fnRecordsDisplay(),t.scroll=t.virtual,t.scroll>s&&(t.scroll=s),this.dom.force.style.height=t.scroll+"px"},_fnCalcRowHeight:function(){var t=this.s.dt,s=t.nTable,o=s.cloneNode(!1),i=e("<tbody/>").appendTo(o),r=e('<div class="'+t.oClasses.sWrapper+' DTS"><div class="'+t.oClasses.sScrollWrapper+'"><div class="'+t.oClasses.sScrollBody+'"></div></div></div>');for(e("tbody tr:lt(4)",s).clone().appendTo(i);e("tr",i).length<3;)i.append("<tr><td>&nbsp;</td></tr>");e("div."+t.oClasses.sScrollBody,r).append(o);var l;t._bInitComplete?l=s.parentNode:(this.s.dt.nHolding||(this.s.dt.nHolding=e("<div></div>").insertBefore(this.s.dt.nTable)),l=this.s.dt.nHolding),r.appendTo(l),this.s.heights.row=e("tr",i).eq(1).outerHeight(),r.remove()},_fnInfo:function(){if(this.s.dt.oFeatures.bInfo){var t,s=this.s.dt,o=s.oLanguage,i=this.dom.scroller.scrollTop,r=Math.floor(this.fnPixelsToRow(i,!1,this.s.ani)+1),l=s.fnRecordsTotal(),a=s.fnRecordsDisplay(),n=Math.ceil(this.fnPixelsToRow(i+this.s.heights.viewport,!1,this.s.ani)),h=a<n?a:n,d=s.fnFormatNumber(r),c=s.fnFormatNumber(h),f=s.fnFormatNumber(l),p=s.fnFormatNumber(a);t=0===s.fnRecordsDisplay()&&s.fnRecordsDisplay()==s.fnRecordsTotal()?o.sInfoEmpty+o.sInfoPostFix:0===s.fnRecordsDisplay()?o.sInfoEmpty+" "+o.sInfoFiltered.replace("_MAX_",f)+o.sInfoPostFix:s.fnRecordsDisplay()==s.fnRecordsTotal()?o.sInfo.replace("_START_",d).replace("_END_",c).replace("_MAX_",f).replace("_TOTAL_",p)+o.sInfoPostFix:o.sInfo.replace("_START_",d).replace("_END_",c).replace("_MAX_",f).replace("_TOTAL_",p)+" "+o.sInfoFiltered.replace("_MAX_",s.fnFormatNumber(s.fnRecordsTotal()))+o.sInfoPostFix;var u=o.fnInfoCallback;u&&(t=u.call(s.oInstance,s,r,h,l,a,t));var T=s.aanFeatures.i;if("undefined"!=typeof T)for(var w=0,S=T.length;w<S;w++)e(T[w]).html(t)}}},r.defaults={trace:!1,rowHeight:"auto",serverWait:200,displayBuffer:9,boundaryScale:.5,loadingIndicator:!1},r.oDefaults=r.defaults,r.version="1.2.2","function"==typeof e.fn.dataTable&&"function"==typeof e.fn.dataTableExt.fnVersionCheck&&e.fn.dataTableExt.fnVersionCheck("1.9.0")&&e.fn.dataTableExt.aoFeatures.push({fnInit:function(t){var s=t.oInit,o=s.scroller||s.oScroller||{},e=new r(t,o);return e.dom.wrapper},cFeature:"S",sFeature:"Scroller"}),e.fn.dataTable.Scroller=r,e.fn.DataTable.Scroller=r,e.fn.dataTable.Api){var l=e.fn.dataTable.Api;l.register("scroller()",function(){return this}),l.register("scroller().rowToPixels()",function(t,s,o){var e=this.context;if(e.length&&e[0].oScroller)return e[0].oScroller.fnRowToPixels(t,s,o)}),l.register("scroller().pixelsToRow()",function(t,s,o){var e=this.context;if(e.length&&e[0].oScroller)return e[0].oScroller.fnPixelsToRow(t,s,o)}),l.register("scroller().scrollToRow()",function(t,s){return this.iterator("table",function(o){o.oScroller&&o.oScroller.fnScrollToRow(t,s)}),this}),l.register("scroller().measure()",function(t){return this.iterator("table",function(s){s.oScroller&&s.oScroller.fnMeasure(t)}),this})}return r};"function"==typeof define&&define.amd?define(["jquery","datatables"],e):"object"==typeof exports?e(require("jquery"),require("datatables")):jQuery&&!jQuery.fn.dataTable.Scroller&&e(jQuery,jQuery.fn.dataTable)}(window,document);