text: /*
   Scroller 1.4.2
   ©2011-2016 SpryMedia Ltd - datatables.net/license
  */
  (function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(c,b){c||(c=window);if(!b||!b.fn.dataTable){b=require("datatables.net")(c,b).$}return a(b,c,c.document)}:a(jQuery,window,document)})(function(n,f,d,b){var a=n.fn.dataTable,i=function(g,e){this instanceof i?(e===b&&(e={}),this.s={dt:n.fn.dataTable.Api(g).settings()[0],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=n.extend(this.s,i.oDefaults,e),this.s.heights.row=this.s.rowHeight,this.dom={force:d.createElement("div"),scroller:null,table:null,loader:null},this.s.dt.oScroller||(this.s.dt.oScroller=this,this._fnConstruct())):alert("Scroller warning: Scroller must be initialised with the 'new' keyword.")};n.extend(i.prototype,{fnRowToPixels:function(g,e,h){g=h?this._domain("virtualToPhysical",g*this.s.heights.row):this.s.baseScrollTop+(g-this.s.baseRowTop)*this.s.heights.row;return e||e===b?parseInt(g,10):g},fnPixelsToRow:function(g,e,j){var h=g-this.s.baseScrollTop,g=j?this._domain("physicalToVirtual",g)/this.s.heights.row:h/this.s.heights.row+this.s.baseRowTop;return e||e===b?parseInt(g,10):g},fnScrollToRow:function(g,e){var l=this,k=!1,j=this.fnRowToPixels(g),h=g-(this.s.displayBuffer-1)/2*this.s.viewportRows;0>h&&(h=0);if((j>this.s.redrawBottom||j<this.s.redrawTop)&&this.s.dt._iDisplayStart!==h){k=!0,j=this.fnRowToPixels(g,!1,!0)}"undefined"==typeof e||e?(this.s.ani=k,n(this.dom.scroller).animate({scrollTop:j},function(){setTimeout(function(){l.s.ani=!1},25)})):n(this.dom.scroller).scrollTop(j)},fnMeasure:function(g){this.s.autoHeight&&this._fnCalcRowHeight();var e=this.s.heights;e.row&&(e.viewport=n(this.dom.scroller).height(),this.s.viewportRows=parseInt(e.viewport/e.row,10)+1,this.s.dt._iDisplayLength=this.s.viewportRows*this.s.displayBuffer);(g===b||g)&&this.s.dt.oInstance.fnDraw(!1)},fnPageInfo:function(){var g=this.dom.scroller.scrollTop,e=this.s.dt.fnRecordsDisplay(),h=Math.ceil(this.fnPixelsToRow(g+this.s.heights.viewport,!1,this.s.ani));return{start:Math.floor(this.fnPixelsToRow(g,!1,this.s.ani)),end:e<h?e-1:h-1}},_fnConstruct:function(){var g=this;if(this.s.dt.oFeatures.bPaginate){this.dom.force.style.position="relative";this.dom.force.style.top="0px";this.dom.force.style.left="0px";this.dom.force.style.width="1px";this.dom.scroller=n("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=n(">table",this.dom.scroller)[0];this.dom.table.style.position="absolute";this.dom.table.style.top="0px";this.dom.table.style.left="0px";n(this.s.dt.nTableWrapper).addClass("DTS");this.s.loadingIndicator&&(this.dom.loader=n('<div class="dataTables_processing DTS_Loading">'+this.s.dt.oLanguage.sLoadingRecords+"</div>").css("display","none"),n(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(){g.s.dt.oApi._fnSaveState(g.s.dt)},500);n(this.dom.scroller).on("scroll.DTS",function(){g._fnScroll.call(g)});n(this.dom.scroller).on("touchstart.DTS",function(){g._fnScroll.call(g)});this.s.dt.aoDrawCallback.push({fn:function(){g.s.dt.bInitialised&&g._fnDrawCallback.call(g)},sName:"Scroller"});n(f).on("resize.DTS",function(){g.fnMeasure(false);g._fnInfo()});var e=!0;this.s.dt.oApi._fnCallbackReg(this.s.dt,"aoStateSaveParams",function(j,h){if(e&&g.s.dt.oLoadedState){h.iScroller=g.s.dt.oLoadedState.iScroller;h.iScrollerTopRow=g.s.dt.oLoadedState.iScrollerTopRow;e=false}else{h.iScroller=g.dom.scroller.scrollTop;h.iScrollerTopRow=g.s.topRowFloat}},"Scroller_State");this.s.dt.oLoadedState&&(this.s.topRowFloat=this.s.dt.oLoadedState.iScrollerTopRow||0);n(this.s.dt.nTable).one("init.dt",function(){g.fnMeasure()});this.s.dt.aoDestroyCallback.push({sName:"Scroller",fn:function(){n(f).off("resize.DTS");n(g.dom.scroller).off("touchstart.DTS scroll.DTS");n(g.s.dt.nTableWrapper).removeClass("DTS");n("div.DTS_Loading",g.dom.scroller.parentNode).remove();n(g.s.dt.nTable).off("init.dt");g.dom.table.style.position="";g.dom.table.style.top="";g.dom.table.style.left=""}})}else{this.s.dt.oApi._fnLog(this.s.dt,0,"Pagination must be enabled for Scroller")}},_fnScroll:function(){var g=this,e=this.s.heights,k=this.dom.scroller.scrollTop,j;if(!this.s.skip&&!this.s.ingnoreScroll){if(this.s.dt.bFiltered||this.s.dt.bSorted){this.s.lastScrollTop=0}else{this._fnInfo();clearTimeout(this.s.stateTO);this.s.stateTO=setTimeout(function(){g.s.dt.oApi._fnSaveState(g.s.dt)},250);if(k<this.s.redrawTop||k>this.s.redrawBottom){var h=Math.ceil((this.s.displayBuffer-1)/2*this.s.viewportRows);Math.abs(k-this.s.lastScrollTop)>e.viewport||this.s.ani?(j=parseInt(this._domain("physicalToVirtual",k)/e.row,10)-h,this.s.topRowFloat=this._domain("physicalToVirtual",k)/e.row):(j=this.fnPixelsToRow(k)-h,this.s.topRowFloat=this.fnPixelsToRow(k,!1));0>=j?j=0:j+this.s.dt._iDisplayLength>this.s.dt.fnRecordsDisplay()?(j=this.s.dt.fnRecordsDisplay()-this.s.dt._iDisplayLength,0>j&&(j=0)):0!==j%2&&j++;if(j!=this.s.dt._iDisplayStart&&(this.s.tableTop=n(this.s.dt.nTable).offset().top,this.s.tableBottom=n(this.s.dt.nTable).height()+this.s.tableTop,e=function(){if(g.s.scrollDrawReq===null){g.s.scrollDrawReq=k}g.s.dt._iDisplayStart=j;g.s.dt.oApi._fnDraw(g.s.dt)},this.s.dt.oFeatures.bServerSide?(clearTimeout(this.s.drawTO),this.s.drawTO=setTimeout(e,this.s.serverWait)):e(),this.dom.loader&&!this.s.loaderVisible)){this.dom.loader.css("display","block"),this.s.loaderVisible=!0}}else{this.s.topRowFloat=this._domain("physicalToVirtual",k)/e.row}this.s.lastScrollTop=k;this.s.stateSaveThrottle()}}},_domain:function(h,g){var m=this.s.heights,l;if(m.virtual===m.scroll){return g}var k=(m.scroll-m.viewport)/2,j=(m.virtual-m.viewport)/2;l=j/(k*k);if("virtualToPhysical"===h){if(g<j){return Math.pow(g/l,0.5)}g=2*j-g;return 0>g?m.scroll:2*k-Math.pow(g/l,0.5)}if("physicalToVirtual"===h){if(g<k){return g*g*l}g=2*k-g;return 0>g?m.virtual:2*j-g*g*l}},_fnDrawCallback:function(){var j=this,e=this.s.heights,q=this.dom.scroller.scrollTop,p=n(this.s.dt.nTable).height(),o=this.s.dt._iDisplayStart,k=this.s.dt._iDisplayLength,m=this.s.dt.fnRecordsDisplay();this.s.skip=!0;this._fnScrollForce();q=0===o?this.s.topRowFloat*e.row:o+k>=m?e.scroll-(m-this.s.topRowFloat)*e.row:this._domain("virtualToPhysical",this.s.topRowFloat*e.row);this.dom.scroller.scrollTop=q;this.s.baseScrollTop=q;this.s.baseRowTop=this.s.topRowFloat;var l=q-(this.s.topRowFloat-o)*e.row;0===o?l=0:o+k>=m&&(l=e.scroll-p);this.dom.table.style.top=l+"px";this.s.tableTop=l;this.s.tableBottom=p+this.s.tableTop;p=(q-this.s.tableTop)*this.s.boundaryScale;this.s.redrawTop=q-p;this.s.redrawBottom=q+p;this.s.skip=!1;this.s.dt.oFeatures.bStateSave&&null!==this.s.dt.oLoadedState&&"undefined"!=typeof this.s.dt.oLoadedState.iScroller?((q=(this.s.dt.sAjaxSource||j.s.dt.ajax)&&!this.s.dt.oFeatures.bServerSide?!0:!1)&&2==this.s.dt.iDraw||!q&&1==this.s.dt.iDraw)&&setTimeout(function(){n(j.dom.scroller).scrollTop(j.s.dt.oLoadedState.iScroller);j.s.redrawTop=j.s.dt.oLoadedState.iScroller-e.viewport/2;setTimeout(function(){j.s.ingnoreScroll=!1},0)},0):j.s.ingnoreScroll=!1;this.s.dt.oFeatures.bInfo&&setTimeout(function(){j._fnInfo.call(j)},0);this.dom.loader&&this.s.loaderVisible&&(this.dom.loader.css("display","none"),this.s.loaderVisible=!1)},_fnScrollForce:function(){var e=this.s.heights;e.virtual=e.row*this.s.dt.fnRecordsDisplay();e.scroll=e.virtual;1000000<e.scroll&&(e.scroll=1000000);this.dom.force.style.height=e.scroll>this.s.heights.row?e.scroll+"px":this.s.heights.row+"px"},_fnCalcRowHeight:function(){var g=this.s.dt,e=g.nTable,k=e.cloneNode(!1),j=n("<tbody/>").appendTo(k),h=n('<div class="'+g.oClasses.sWrapper+' DTS"><div class="'+g.oClasses.sScrollWrapper+'"><div class="'+g.oClasses.sScrollBody+'"></div></div></div>');for(n("tbody tr:lt(4)",e).clone().appendTo(j);3>n("tr",j).length;){j.append("<tr><td>&nbsp;</td></tr>")}n("div."+g.oClasses.sScrollBody,h).append(k);g=this.s.dt.nHolding||e.parentNode;n(g).is(":visible")||(g="body");h.appendTo(g);this.s.heights.row=n("tr",j).eq(1).outerHeight();h.remove()},_fnInfo:function(){if(this.s.dt.oFeatures.bInfo){var u=this.s.dt,t=u.oLanguage,s=this.dom.scroller.scrollTop,r=Math.floor(this.fnPixelsToRow(s,!1,this.s.ani)+1),q=u.fnRecordsTotal(),m=u.fnRecordsDisplay(),s=Math.ceil(this.fnPixelsToRow(s+this.s.heights.viewport,!1,this.s.ani)),s=m<s?m:s,p=u.fnFormatNumber(r),o=u.fnFormatNumber(s),l=u.fnFormatNumber(q),e=u.fnFormatNumber(m),p=0===u.fnRecordsDisplay()&&u.fnRecordsDisplay()==u.fnRecordsTotal()?t.sInfoEmpty+t.sInfoPostFix:0===u.fnRecordsDisplay()?t.sInfoEmpty+" "+t.sInfoFiltered.replace("_MAX_",l)+t.sInfoPostFix:u.fnRecordsDisplay()==u.fnRecordsTotal()?t.sInfo.replace("_START_",p).replace("_END_",o).replace("_MAX_",l).replace("_TOTAL_",e)+t.sInfoPostFix:t.sInfo.replace("_START_",p).replace("_END_",o).replace("_MAX_",l).replace("_TOTAL_",e)+" "+t.sInfoFiltered.replace("_MAX_",u.fnFormatNumber(u.fnRecordsTotal()))+t.sInfoPostFix;(t=t.fnInfoCallback)&&(p=t.call(u.oInstance,u,r,s,q,m,p));r=u.aanFeatures.i;if("undefined"!=typeof r){q=0;for(m=r.length;q<m;q++){n(r[q]).html(p)}}n(u.nTable).triggerHandler("info.dt")}}});i.defaults={trace:!1,rowHeight:"auto",serverWait:200,displayBuffer:9,boundaryScale:0.5,loadingIndicator:!1};i.oDefaults=i.defaults;i.version="1.4.2";"function"==typeof n.fn.dataTable&&"function"==typeof n.fn.dataTableExt.fnVersionCheck&&n.fn.dataTableExt.fnVersionCheck("1.10.0")?n.fn.dataTableExt.aoFeatures.push({fnInit:function(g){var e=g.oInit;new i(g,e.scroller||e.oScroller||{})},cFeature:"S",sFeature:"Scroller"}):alert("Warning: Scroller requires DataTables 1.10.0 or greater - www.datatables.net/download");n(d).on("preInit.dt.dtscroller",function(g,e){if("dt"===g.namespace){var j=e.oInit.scroller,h=a.defaults.scroller;if(j||h){h=n.extend({},j,h),!1!==j&&new i(e,h)}}});n.fn.dataTable.Scroller=i;n.fn.DataTable.Scroller=i;var c=n.fn.dataTable.Api;c.register("scroller()",function(){return this});c.register("scroller().rowToPixels()",function(g,e,j){var h=this.context;if(h.length&&h[0].oScroller){return h[0].oScroller.fnRowToPixels(g,e,j)}});c.register("scroller().pixelsToRow()",function(g,e,j){var h=this.context;if(h.length&&h[0].oScroller){return h[0].oScroller.fnPixelsToRow(g,e,j)}});c.register("scroller().scrollToRow()",function(g,e){this.iterator("table",function(h){h.oScroller&&h.oScroller.fnScrollToRow(g,e)});return this});c.register("row().scrollTo()",function(g){var e=this;this.iterator("row",function(k,j){if(k.oScroller){var h=e.rows({order:"applied",search:"applied"}).indexes().indexOf(j);k.oScroller.fnScrollToRow(h,g)}});return this});c.register("scroller.measure()",function(e){this.iterator("table",function(g){g.oScroller&&g.oScroller.fnMeasure(e)});return this});c.register("scroller.page()",function(){var e=this.context;if(e.length&&e[0].oScroller){return e[0].oScroller.fnPageInfo()}});return i});