UNPKG

react-table-6

Version:

A fast, lightweight, opinionated table and datagrid built on React

2 lines (1 loc) 39.4 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t(e.ReactTable={},e.React)}(this,function(e,t){"use strict";var n="default"in t?t.default:t;function o(e,t){return e(t={exports:{}},t.exports),t.exports}var r=o(function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],o=0;o<arguments.length;o++){var r=arguments[o];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===a)for(var i in r)t.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?e.exports=n:window.classNames=n}()}),a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},u=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},d=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n},p=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},c=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(o=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);o=!0);}catch(e){r=!0,a=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},g={get:function(e,t,n){if(!t)return e;var o=h(t),r=void 0;try{r=o.reduce(function(e,t){return e[t]},e)}catch(e){}return void 0!==r?r:n},set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=arguments[2],o=h(t),r=void 0,a=e;for(;(r=o.shift())&&o.length;)a[r]||(a[r]={}),a=a[r];return a[r]=n,e},takeRight:function(e,t){var n=t>e.length?0:e.length-t;return e.slice(n)},last:function(e){return e[e.length-1]},orderBy:function(e,t,n,o){return e.sort(function(e,r){for(var a=0;a<t.length;a+=1){var i=t[a],s=!1===n[a]||"desc"===n[a],l=i(e,r);if(l)return s?-l:l}return n[0]?e[o]-r[o]:r[o]-e[o]})},range:function(e){for(var t=[],n=0;n<e;n+=1)t.push(e);return t},remove:function(e,t){return e.filter(function(n,o){var r=t(n);return!!r&&(e.splice(o,1),!0)})},clone:function(e){try{return JSON.parse(JSON.stringify(e,function(e,t){return"function"==typeof t?t.toString():t}))}catch(t){return e}},getFirstDefined:function(){for(var e=0;e<arguments.length;e+=1)if(void 0!==(arguments.length<=e?void 0:arguments[e]))return arguments.length<=e?void 0:arguments[e]},sum:function(e){return e.reduce(function(e,t){return e+t},0)},makeTemplateComponent:function(e,t){if(!t)throw new Error("No displayName found for template component:",e);var o=function(t){var o=t.children,a=t.className,i=d(t,["children","className"]);return n.createElement("div",l({className:r(e,a)},i),o)};return o.displayName=t,o},groupBy:function(e,t){return e.reduce(function(e,n,o){var r="function"==typeof t?t(n,o):n[t];return e[r]=m(e[r])?e[r]:[],e[r].push(n),e},{})},isArray:m,splitProps:function(e){var t=e.className,n=e.style,o=d(e,["className","style"]);return{className:t,style:n,rest:o||{}}},compactObject:function(e){var t={};e&&Object.keys(e).map(function(n){return Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&void 0!==e[n]&&(t[n]=e[n]),!0});return t},isSortingDesc:function(e){return!("desc"!==e.sort&&!0!==e.desc&&!1!==e.asc)},normalizeComponent:function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;return r=e,function(e){return"function"==typeof e&&!!Object.getPrototypeOf(e).isReactComponent}(r)||function(e){return"function"==typeof e&&String(e).includes(".createElement")}(r)?n.createElement(e,t):"function"==typeof e?e(t):o;var r},asPx:function(e){return e=Number(e),Number.isNaN(e)?null:e+"px"}};function m(e){return Array.isArray(e)}function h(e){return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(m(t))for(var o=0;o<t.length;o+=1)e(t[o],n);else n.push(t);return n}(e).join(".").replace(/\[/g,".").replace(/\]/g,"").split(".")}var v=function(e){return n.createElement("button",l({type:"button"},e,{className:"-btn"}),e.children)},y=function(e){function t(e){a(this,t);var n=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.getSafePage=n.getSafePage.bind(n),n.changePage=n.changePage.bind(n),n.applyPage=n.applyPage.bind(n),n.state={page:e.page},n}return u(t,e),i(t,[{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.props.page!==e.page&&this.setState({page:e.page})}},{key:"getSafePage",value:function(e){return Number.isNaN(e)&&(e=this.props.page),Math.min(Math.max(e,0),this.props.pages-1)}},{key:"changePage",value:function(e){e=this.getSafePage(e),this.setState({page:e}),this.props.page!==e&&this.props.onPageChange(e)}},{key:"applyPage",value:function(e){e&&e.preventDefault();var t=this.state.page;this.changePage(""===t?this.props.page:t)}},{key:"getPageJumpProperties",value:function(){var e=this;return{onKeyPress:function(t){13!==t.which&&13!==t.keyCode||e.applyPage()},onBlur:this.applyPage,value:""===this.state.page?"":this.state.page+1,onChange:function(t){var n=t.target.value,o=n-1;if(""===n)return e.setState({page:n});e.setState({page:e.getSafePage(o)})},inputType:""===this.state.page?"text":"number",pageJumpText:this.props.pageJumpText}}},{key:"render",value:function(){var e=this,t=this.props,o=t.pages,a=t.page,i=t.showPageSizeOptions,s=t.pageSizeOptions,l=t.pageSize,u=t.showPageJump,d=t.canPrevious,p=t.canNext,c=t.onPageSizeChange,f=t.className,g=t.PreviousComponent,m=t.NextComponent,h=t.renderPageJump,v=t.renderCurrentPage,y=t.renderTotalPagesCount,P=t.renderPageSizeOptions;return n.createElement("div",{className:r(f,"-pagination"),style:this.props.style},n.createElement("div",{className:"-previous"},n.createElement(g,{onClick:function(){d&&e.changePage(a-1)},disabled:!d},this.props.previousText)),n.createElement("div",{className:"-center"},n.createElement("span",{className:"-pageInfo"},this.props.pageText," ",u?h(this.getPageJumpProperties()):v(a)," ",this.props.ofText," ",y(o)),i&&P({pageSize:l,rowsSelectorText:this.props.rowsSelectorText,pageSizeOptions:s,onPageSizeChange:c,rowsText:this.props.rowsText})),n.createElement("div",{className:"-next"},n.createElement(m,{onClick:function(){p&&e.changePage(a+1)},disabled:!p},this.props.nextText)))}}]),t}(t.Component);y.defaultProps={PreviousComponent:v,NextComponent:v,renderPageJump:function(e){var t=e.onChange,o=e.value,r=e.onBlur,a=e.onKeyPress,i=e.inputType,s=e.pageJumpText;return n.createElement("div",{className:"-pageJump"},n.createElement("input",{"aria-label":s,type:i,onChange:t,value:o,onBlur:r,onKeyPress:a}))},renderCurrentPage:function(e){return n.createElement("span",{className:"-currentPage"},e+1)},renderTotalPagesCount:function(e){return n.createElement("span",{className:"-totalPages"},e||1)},renderPageSizeOptions:function(e){var t=e.pageSize,o=e.pageSizeOptions,r=e.rowsSelectorText,a=e.onPageSizeChange,i=e.rowsText;return n.createElement("span",{className:"select-wrap -pageSizeOptions"},n.createElement("select",{"aria-label":r,onChange:function(e){return a(Number(e.target.value))},value:t},o.map(function(e,t){return n.createElement("option",{key:t,value:e},e+" "+i)})))}};var P=function(){return{}},C={data:[],resolveData:function(e){return e},loading:!1,showPagination:!0,showPaginationTop:!1,showPaginationBottom:!0,showPageSizeOptions:!0,pageSizeOptions:[5,10,20,25,50,100],defaultPage:0,defaultPageSize:20,showPageJump:!0,collapseOnSortingChange:!0,collapseOnPageChange:!0,collapseOnDataChange:!0,freezeWhenExpanded:!1,sortable:!0,multiSort:!0,resizable:!0,filterable:!1,defaultSortDesc:!1,defaultSorted:[],defaultFiltered:[],defaultResized:[],defaultExpanded:{},defaultFilterMethod:function(e,t,n){var o=e.pivotId||e.id;return void 0===t[o]||String(t[o]).startsWith(e.value)},defaultSortMethod:function(e,t,n){return e=null===e||void 0===e?"":e,t=null===t||void 0===t?"":t,(e="string"==typeof e?e.toLowerCase():e)>(t="string"==typeof t?t.toLowerCase():t)?1:e<t?-1:0},onPageChange:void 0,onPageSizeChange:void 0,onSortedChange:void 0,onFilteredChange:void 0,onResizedChange:void 0,onExpandedChange:void 0,pivotBy:void 0,pivotValKey:"_pivotVal",pivotIDKey:"_pivotID",subRowsKey:"_subRows",aggregatedKey:"_aggregated",nestingLevelKey:"_nestingLevel",originalKey:"_original",indexKey:"_index",groupedByPivotKey:"_groupedByPivot",onFetchData:function(){return null},className:"",style:{},getProps:P,getTableProps:P,getTheadGroupProps:P,getTheadGroupTrProps:P,getTheadGroupThProps:P,getTheadProps:P,getTheadTrProps:P,getTheadThProps:P,getTheadFilterProps:P,getTheadFilterTrProps:P,getTheadFilterThProps:P,getTbodyProps:P,getTrGroupProps:P,getTrProps:P,getTdProps:P,getTfootProps:P,getTfootTrProps:P,getTfootTdProps:P,getPaginationProps:P,getLoadingProps:P,getNoDataProps:P,getResizerProps:P,column:{Cell:void 0,Header:void 0,Footer:void 0,Aggregated:void 0,Pivot:void 0,PivotValue:void 0,Expander:void 0,Filter:void 0,Placeholder:void 0,sortable:void 0,resizable:void 0,filterable:void 0,show:!0,minWidth:100,minResizeWidth:11,className:"",style:{},getProps:P,aggregate:void 0,headerClassName:"",headerStyle:{},getHeaderProps:P,footerClassName:"",footerStyle:{},getFooterProps:P,filterMethod:void 0,filterAll:!1,sortMethod:void 0},expanderDefaults:{sortable:!1,resizable:!1,filterable:!1,width:35},pivotDefaults:{},previousText:"Previous",nextText:"Next",loadingText:"Loading...",noDataText:"No rows found",pageText:"Page",ofText:"of",rowsText:"rows",pageJumpText:"jump to page",rowsSelectorText:"rows per page",TableComponent:function(e){var t=e.children,o=e.className,a=d(e,["children","className"]);return n.createElement("div",l({className:r("rt-table",o),role:"grid"},a),t)},TheadComponent:g.makeTemplateComponent("rt-thead","Thead"),TbodyComponent:g.makeTemplateComponent("rt-tbody","Tbody"),TrGroupComponent:function(e){var t=e.children,o=e.className,a=d(e,["children","className"]);return n.createElement("div",l({className:r("rt-tr-group",o),role:"rowgroup"},a),t)},TrComponent:function(e){var t=e.children,o=e.className,a=d(e,["children","className"]);return n.createElement("div",l({className:r("rt-tr",o),role:"row"},a),t)},ThComponent:function(e){var t=e.toggleSort,o=e.className,a=e.children,i=d(e,["toggleSort","className","children"]);return n.createElement("div",l({className:r("rt-th",o),onClick:function(e){return t&&t(e)},role:"columnheader",tabIndex:"-1"},i),a)},TdComponent:function(e){e.toggleSort;var t=e.className,o=e.children,a=d(e,["toggleSort","className","children"]);return n.createElement("div",l({className:r("rt-td",t),role:"gridcell"},a),o)},TfootComponent:g.makeTemplateComponent("rt-tfoot","Tfoot"),FilterComponent:function(e){var t=e.filter,o=e.onChange,r=e.column;return n.createElement("input",{type:"text",style:{width:"100%"},placeholder:r.Placeholder,value:t?t.value:"",onChange:function(e){return o(e.target.value)}})},ExpanderComponent:function(e){var t=e.isExpanded;return n.createElement("div",{className:r("rt-expander",t&&"-open")},"•")},PivotValueComponent:function(e){var t=e.subRows,o=e.value;return n.createElement("span",null,o," ",t&&"("+t.length+")")},AggregatedComponent:function(e){var t=e.subRows,o=e.column,r=t.filter(function(e){return void 0!==e[o.id]}).map(function(e,r){return n.createElement("span",{key:r},e[o.id],r<t.length-1?", ":"")});return n.createElement("span",null,r)},PivotComponent:void 0,PaginationComponent:y,PreviousComponent:void 0,NextComponent:void 0,LoadingComponent:function(e){var t=e.className,o=e.loading,a=e.loadingText,i=d(e,["className","loading","loadingText"]);return n.createElement("div",l({className:r("-loading",{"-active":o},t)},i),n.createElement("div",{className:"-loading-inner"},a))},NoDataComponent:g.makeTemplateComponent("rt-noData","NoData"),ResizerComponent:g.makeTemplateComponent("rt-resizer","Resizer"),PadRowComponent:function(){return n.createElement("span",null," ")}},b="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function T(){}function x(){}x.resetWarningCache=T;var S,w=o(function(e){e.exports=function(){function e(e,t,n,o,r,a){if(a!==b){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:x,resetWarningCache:T};return n.PropTypes=n,n}()}),N={data:w.any,loading:w.bool,showPagination:w.bool,showPaginationTop:w.bool,showPaginationBottom:w.bool,showPageSizeOptions:w.bool,pageSizeOptions:w.array,defaultPageSize:w.number,showPageJump:w.bool,collapseOnSortingChange:w.bool,collapseOnPageChange:w.bool,collapseOnDataChange:w.bool,freezeWhenExpanded:w.bool,sortable:w.bool,resizable:w.bool,filterable:w.bool,defaultSortDesc:w.bool,defaultSorted:w.array,defaultFiltered:w.array,defaultResized:w.array,defaultExpanded:w.object,defaultFilterMethod:w.func,defaultSortMethod:w.func,onPageChange:w.func,onPageSizeChange:w.func,onSortedChange:w.func,onFilteredChange:w.func,onResizedChange:w.func,onExpandedChange:w.func,pivotBy:w.array,pivotValKey:w.string,pivotIDKey:w.string,subRowsKey:w.string,aggregatedKey:w.string,nestingLevelKey:w.string,originalKey:w.string,indexKey:w.string,groupedByPivotKey:w.string,onFetchData:w.func,className:w.string,style:w.object,getProps:w.func,getTableProps:w.func,getTheadGroupProps:w.func,getTheadGroupTrProps:w.func,getTheadGroupThProps:w.func,getTheadProps:w.func,getTheadTrProps:w.func,getTheadThProps:w.func,getTheadFilterProps:w.func,getTheadFilterTrProps:w.func,getTheadFilterThProps:w.func,getTbodyProps:w.func,getTrGroupProps:w.func,getTrProps:w.func,getTdProps:w.func,getTfootProps:w.func,getTfootTrProps:w.func,getTfootTdProps:w.func,getPaginationProps:w.func,getLoadingProps:w.func,getNoDataProps:w.func,getResizerProps:w.func,columns:w.arrayOf(w.shape({Cell:w.oneOfType([w.element,w.string,w.func]),Header:w.oneOfType([w.element,w.string,w.func]),Footer:w.oneOfType([w.element,w.string,w.func]),Aggregated:w.oneOfType([w.element,w.string,w.func]),Pivot:w.oneOfType([w.element,w.string,w.func]),PivotValue:w.oneOfType([w.element,w.string,w.func]),Expander:w.oneOfType([w.element,w.string,w.func]),Filter:w.oneOfType([w.element,w.func]),sortable:w.bool,resizable:w.bool,filterable:w.bool,show:w.bool,minWidth:w.number,minResizeWidth:w.number,className:w.string,style:w.object,getProps:w.func,aggregate:w.func,headerClassName:w.string,headerStyle:w.object,getHeaderProps:w.func,footerClassName:w.string,footerStyle:w.object,getFooterProps:w.func,filterMethod:w.func,filterAll:w.bool,sortMethod:w.func})),expanderDefaults:w.shape({sortable:w.bool,resizable:w.bool,filterable:w.bool,width:w.number}),pivotDefaults:w.object,previousText:w.node,nextText:w.node,loadingText:w.node,noDataText:w.node,pageText:w.node,ofText:w.node,rowsText:w.node,pageJumpText:w.node,rowsSelectorText:w.node,TableComponent:w.elementType,TheadComponent:w.elementType,TbodyComponent:w.elementType,TrGroupComponent:w.elementType,TrComponent:w.elementType,ThComponent:w.elementType,TdComponent:w.elementType,TfootComponent:w.elementType,FilterComponent:w.elementType,ExpanderComponent:w.elementType,PivotValueComponent:w.elementType,AggregatedComponent:w.elementType,PivotComponent:w.elementType,PaginationComponent:w.elementType,PreviousComponent:w.elementType,NextComponent:w.elementType,LoadingComponent:w.elementType,NoDataComponent:w.elementType,ResizerComponent:w.elementType,PadRowComponent:w.elementType},E=C,z=function(e){function t(e){a(this,t);var n=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.getResolvedState=n.getResolvedState.bind(n),n.getDataModel=n.getDataModel.bind(n),n.getSortedData=n.getSortedData.bind(n),n.fireFetchData=n.fireFetchData.bind(n),n.getPropOrState=n.getPropOrState.bind(n),n.getStateOrProp=n.getStateOrProp.bind(n),n.filterData=n.filterData.bind(n),n.sortData=n.sortData.bind(n),n.getMinRows=n.getMinRows.bind(n),n.onPageChange=n.onPageChange.bind(n),n.onPageSizeChange=n.onPageSizeChange.bind(n),n.sortColumn=n.sortColumn.bind(n),n.filterColumn=n.filterColumn.bind(n),n.resizeColumnStart=n.resizeColumnStart.bind(n),n.resizeColumnEnd=n.resizeColumnEnd.bind(n),n.resizeColumnMoving=n.resizeColumnMoving.bind(n),n.state={page:e.defaultPage,pageSize:e.defaultPageSize,sorted:e.defaultSorted,expanded:e.defaultExpanded,filtered:e.defaultFiltered,resized:e.defaultResized,currentlyResizing:!1,skipNextSort:!1},n}return u(t,e),i(t,[{key:"render",value:function(){var e=this,t=this.getResolvedState(),o=t.children,a=t.className,i=t.style,s=t.getProps,u=t.getTableProps,d=t.getTheadGroupProps,p=t.getTheadGroupTrProps,f=t.getTheadGroupThProps,m=t.getTheadProps,h=t.getTheadTrProps,v=t.getTheadThProps,y=t.getTheadFilterProps,P=t.getTheadFilterTrProps,b=t.getTheadFilterThProps,T=t.getTbodyProps,x=t.getTrGroupProps,S=t.getTrProps,w=t.getTdProps,N=t.getTfootProps,E=t.getTfootTrProps,z=t.getTfootTdProps,D=t.getPaginationProps,O=t.getLoadingProps,R=t.getNoDataProps,F=t.getResizerProps,k=t.showPagination,W=t.showPaginationTop,_=t.showPaginationBottom,K=t.manual,M=t.loadingText,j=t.noDataText,A=t.sortable,L=t.multiSort,B=t.resizable,G=t.filterable,I=t.pivotIDKey,J=t.pivotValKey,H=t.pivotBy,V=t.subRowsKey,U=t.aggregatedKey,X=t.originalKey,q=t.indexKey,Y=t.groupedByPivotKey,Q=t.loading,Z=t.pageSize,$=t.page,ee=t.sorted,te=t.filtered,ne=t.resized,oe=t.expanded,re=t.pages,ae=t.onExpandedChange,ie=t.TableComponent,se=t.TheadComponent,le=t.TbodyComponent,ue=t.TrGroupComponent,de=t.TrComponent,pe=t.ThComponent,ce=t.TdComponent,fe=t.TfootComponent,ge=t.PaginationComponent,me=t.LoadingComponent,he=t.SubComponent,ve=t.NoDataComponent,ye=t.ResizerComponent,Pe=t.ExpanderComponent,Ce=t.PivotValueComponent,be=t.PivotComponent,Te=t.AggregatedComponent,xe=t.FilterComponent,Se=t.PadRowComponent,we=t.resolvedData,Ne=t.allVisibleColumns,Ee=t.headerGroups,ze=t.hasHeaderGroups,De=t.sortedData,Oe=t.currentlyResizing,Re=Z*$,Fe=Re+Z,ke=K?we:De.slice(Re,Fe),We=this.getMinRows(),_e=g.range(Math.max(We-ke.length,0)),Ke=Ne.some(function(e){return e.Footer}),Me=G||Ne.some(function(e){return e.filterable}),je=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;return[t.map(function(t,r){var a=l({},t,{_viewIndex:o+=1}),i=n.concat([r]);if(a[V]&&g.get(oe,i)){var s=e(a[V],i,o),u=c(s,2);a[V]=u[0],o=u[1]}return a}),o]}(ke),Ae=c(je,1);ke=Ae[0];var Le=$>0,Be=$+1<re,Ge=g.sum(Ne.map(function(e){var t=ne.find(function(t){return t.id===e.id})||{};return g.getFirstDefined(t.value,e.width,e.minWidth)})),Ie=-1,Je=l({},t,{startRow:Re,endRow:Fe,pageRows:ke,minRows:We,padRows:_e,hasColumnFooter:Ke,canPrevious:Le,canNext:Be,rowMinWidth:Ge}),He=g.splitProps(s(Je,void 0,void 0,this)),Ve=g.splitProps(u(Je,void 0,void 0,this)),Ue=g.splitProps(T(Je,void 0,void 0,this)),Xe=O(Je,void 0,void 0,this),qe=R(Je,void 0,void 0,this),Ye=function(t,o){var a=function(e){return(ne.find(function(t){return t.id===e.id})||{}).value},i=g.sum(t.columns.map(function(e){return e.width||a(e)?0:e.minWidth})),s=g.sum(t.columns.map(function(e){return g.getFirstDefined(a(e),e.width,e.minWidth)})),u=g.sum(t.columns.map(function(e){return g.getFirstDefined(a(e),e.width,e.maxWidth)})),d=g.splitProps(f(Je,void 0,t,e)),p=g.splitProps(t.getHeaderProps(Je,void 0,t,e)),c=[t.headerClassName,d.className,p.className],m=l({},t.headerStyle,d.style,p.style),h=l({},d.rest,p.rest),v={flex:i+" 0 auto",width:g.asPx(s),maxWidth:g.asPx(u)};return n.createElement(pe,l({key:o+"-"+t.id,className:r(c),style:l({},m,v)},h),g.normalizeComponent(t.Header,{data:De,column:t}))},Qe=function(t,o){var a=ne.find(function(e){return e.id===t.id})||{},i=ee.find(function(e){return e.id===t.id}),s="function"==typeof t.show?t.show():t.show,u=g.getFirstDefined(a.value,t.width,t.minWidth),d=g.getFirstDefined(a.value,t.width,t.maxWidth),p=g.splitProps(v(Je,void 0,t,e)),c=g.splitProps(t.getHeaderProps(Je,void 0,t,e)),f=[t.headerClassName,p.className,c.className],m=l({},t.headerStyle,p.style,c.style),h=l({},p.rest,c.rest),y=g.getFirstDefined(t.resizable,B,!1),P=y?n.createElement(ye,l({onMouseDown:function(n){return e.resizeColumnStart(n,t,!1)},onTouchStart:function(n){return e.resizeColumnStart(n,t,!0)}},F("finalState",void 0,t,e))):null,C=g.getFirstDefined(t.sortable,A,!1);return n.createElement(pe,l({key:o+"-"+t.id,className:r(f,y&&"rt-resizable-header",i?i.desc?"-sort-desc":"-sort-asc":"",C&&"-cursor-pointer",!s&&"-hidden",H&&H.slice(0,-1).includes(t.id)&&"rt-header-pivot"),style:l({},m,{flex:u+" 0 auto",width:g.asPx(u),maxWidth:g.asPx(d)}),toggleSort:function(n){C&&e.sortColumn(t,!!L&&n.shiftKey)}},h),n.createElement("div",{className:r(y&&"rt-resizable-header-content")},g.normalizeComponent(t.Header,{data:De,column:t})),P)},Ze=function(t,o){var a=ne.find(function(e){return e.id===t.id})||{},i=g.getFirstDefined(a.value,t.width,t.minWidth),s=g.getFirstDefined(a.value,t.width,t.maxWidth),u=g.splitProps(b(Je,void 0,t,e)),d=g.splitProps(t.getHeaderProps(Je,void 0,t,e)),p=[t.headerClassName,u.className,d.className],c=l({},t.headerStyle,u.style,d.style),f=l({},u.rest,d.rest),m=te.find(function(e){return e.id===t.id}),h=t.Filter||xe,v=g.getFirstDefined(t.filterable,G,!1);return n.createElement(pe,l({key:o+"-"+t.id,className:r(p),style:l({},c,{flex:i+" 0 auto",width:g.asPx(i),maxWidth:g.asPx(s)})},f),v?g.normalizeComponent(h,{column:t,filter:m,onChange:function(n){return e.filterColumn(t,n)}},C.column.Filter):null)},$e=function(t,o){var a=ne.find(function(e){return e.id===t.id})||{},i="function"==typeof t.show?t.show():t.show,s=g.getFirstDefined(a.value,t.width,t.minWidth),u=s,d=g.getFirstDefined(a.value,t.width,t.maxWidth),p=g.splitProps(w(Je,void 0,t,e)),c=g.splitProps(t.getProps(Je,void 0,t,e)),f=[p.className,t.className,c.className],m=l({},p.style,t.style,c.style);return n.createElement(ce,l({key:o+"-"+t.id,className:r(f,!i&&"hidden"),style:l({},m,{flex:u+" 0 auto",width:g.asPx(s),maxWidth:g.asPx(d)})},p.rest),g.normalizeComponent(Se))},et=function(t,o){var a=x(Je,void 0,void 0,e),i=g.splitProps(S(Je,void 0,void 0,e));return n.createElement(ue,l({key:"pad-"+o},a),n.createElement(de,{className:r("-padRow",(ke.length+o)%2?"-even":"-odd",i.className),style:i.style||{}},Ne.map($e)))},tt=function(t,o){var a=ne.find(function(e){return e.id===t.id})||{},i="function"==typeof t.show?t.show():t.show,s=g.getFirstDefined(a.value,t.width,t.minWidth),u=g.getFirstDefined(a.value,t.width,t.maxWidth),d=g.splitProps(z(Je,void 0,t,e)),p=g.splitProps(t.getProps(Je,void 0,t,e)),c=g.splitProps(t.getFooterProps(Je,void 0,t,e)),f=[d.className,t.className,p.className,c.className],m=l({},d.style,t.style,p.style,c.style);return n.createElement(ce,l({key:o+"-"+t.id,className:r(f,!i&&"hidden"),style:l({},m,{flex:s+" 0 auto",width:g.asPx(s),maxWidth:g.asPx(u)})},p.rest,d.rest,c.rest),g.normalizeComponent(t.Footer,{data:De,column:t}))},nt=function(o){var r=g.splitProps(D(Je,void 0,void 0,e));return n.createElement(ge,l({},t,{pages:re,canPrevious:Le,canNext:Be,onPageChange:e.onPageChange,onPageSizeChange:e.onPageSizeChange,className:r.className,style:r.style,isTop:o},r.rest))},ot=function(){return n.createElement("div",l({className:r("ReactTable",a,He.className),style:l({},i,He.style)},He.rest),k&&W?n.createElement("div",{className:"pagination-top"},nt(!0)):null,n.createElement(ie,l({className:r(Ve.className,Oe?"rt-resizing":""),style:Ve.style},Ve.rest),ze?(v=g.splitProps(d(Je,void 0,void 0,e)),C=g.splitProps(p(Je,void 0,void 0,e)),n.createElement(se,l({className:r("-headerGroups",v.className),style:l({},v.style,{minWidth:Ge+"px"})},v.rest),n.createElement(de,l({className:C.className,style:C.style},C.rest),Ee.map(Ye)))):null,(c=g.splitProps(m(Je,void 0,void 0,e)),f=g.splitProps(h(Je,void 0,void 0,e)),n.createElement(se,l({className:r("-header",c.className),style:l({},c.style,{minWidth:Ge+"px"})},c.rest),n.createElement(de,l({className:f.className,style:f.style},f.rest),Ne.map(Qe)))),Me?(s=g.splitProps(y(Je,void 0,void 0,e)),u=g.splitProps(P(Je,void 0,void 0,e)),n.createElement(se,l({className:r("-filters",s.className),style:l({},s.style,{minWidth:Ge+"px"})},s.rest),n.createElement(de,l({className:u.className,style:u.style},u.rest),Ne.map(Ze)))):null,n.createElement(le,l({className:r(Ue.className),style:l({},Ue.style,{minWidth:Ge+"px"})},Ue.rest),ke.map(function(t,o){return function t(o,a){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s={original:o[X],row:o,index:o[q],viewIndex:Ie+=1,pageSize:Z,page:$,level:i.length,nestingPath:i.concat([a]),aggregated:o[U],groupedByPivot:o[Y],subRows:o[V]},u=g.get(oe,s.nestingPath),d=x(Je,s,void 0,e),p=g.splitProps(S(Je,s,void 0,e));return n.createElement(ue,l({key:s.nestingPath.join("_")},d),n.createElement(de,l({className:r(p.className,o._viewIndex%2?"-even":"-odd"),style:p.style},p.rest),Ne.map(function(t,a){var i=ne.find(function(e){return e.id===t.id})||{},d="function"==typeof t.show?t.show():t.show,p=g.getFirstDefined(i.value,t.width,t.minWidth),c=g.getFirstDefined(i.value,t.width,t.maxWidth),f=g.splitProps(w(Je,s,t,e)),m=g.splitProps(t.getProps(Je,s,t,e)),h=[f.className,t.className,m.className],v=l({},f.style,t.style,m.style),y=l({},s,{isExpanded:u,column:l({},t),value:s.row[t.id],pivoted:t.pivoted,expander:t.expander,resized:ne,show:d,width:p,maxWidth:c,tdProps:f,columnProps:m,classes:h,styles:v}),P=y.value,C=void 0,b=void 0,T=void 0,x=g.normalizeComponent(t.Cell,y,P),S=t.Aggregated||(t.aggregate?t.Cell:Te),N=t.Expander||Pe,E=t.PivotValue||Ce,z=be||function(e){return n.createElement("div",null,n.createElement(N,e),n.createElement(E,e))},D=t.Pivot||z;(y.pivoted||y.expander)&&(y.expandable=!0,C=!0,!y.pivoted||y.subRows||he||(y.expandable=!1)),y.pivoted?(b=s.row[I]===t.id&&y.subRows,T=H.indexOf(t.id)>H.indexOf(s.row[I])&&y.subRows,x=b?g.normalizeComponent(D,l({},y,{value:o[J]}),o[J]):T?g.normalizeComponent(S,y,P):null):y.aggregated&&(x=g.normalizeComponent(S,y,P)),y.expander&&(x=g.normalizeComponent(N,y,o[J]),H&&(y.groupedByPivot&&(x=null),y.subRows||he||(x=null)));var O=C?function(t){var n=g.clone(oe);return n=u?g.set(n,y.nestingPath,!1):g.set(n,y.nestingPath,{}),e.setStateWithData({expanded:n},function(){return ae&&ae(n,y.nestingPath,t,y)})}:function(){},R={onClick:O};return f.rest.onClick&&(R.onClick=function(e){f.rest.onClick(e,function(){return O(e)})}),m.rest.onClick&&(R.onClick=function(e){m.rest.onClick(e,function(){return O(e)})}),n.createElement(ce,l({key:a+"-"+t.id,className:r(h,!y.expandable&&!d&&"hidden",y.expandable&&"rt-expandable",(b||T)&&"rt-pivot"),style:l({},v,{flex:p+" 0 auto",width:g.asPx(p),maxWidth:g.asPx(c)})},f.rest,m.rest,R),x)})),s.subRows&&u&&s.subRows.map(function(e,n){return t(e,n,s.nestingPath)}),he&&!s.subRows&&u&&he(s,function(){var e=g.clone(oe);g.set(e,s.nestingPath,!1)}))}(t,o)}),_e.map(et)),Ke?(t=g.splitProps(N(Je,void 0,void 0,e)),o=g.splitProps(E(Je,void 0,void 0,e)),n.createElement(fe,l({className:t.className,style:l({},t.style,{minWidth:Ge+"px"})},t.rest),n.createElement(de,l({className:r(o.className),style:o.style},o.rest),Ne.map(tt)))):null),k&&_?n.createElement("div",{className:"pagination-bottom"},nt(!1)):null,!ke.length&&n.createElement(ve,qe,g.normalizeComponent(j)),n.createElement(me,l({loading:Q,loadingText:M},Xe)));var t,o,s,u,c,f,v,C};return o?o(Je,ot,this):ot()}}]),t}(function(e){return function(t){function o(){return a(this,o),p(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return u(o,e),i(o,[{key:"getResolvedState",value:function(e,t){return l({},g.compactObject(this.state),g.compactObject(this.props),g.compactObject(t),g.compactObject(e))}},{key:"getDataModel",value:function(e,t){var o=this,r=e.columns,a=e.pivotBy,i=void 0===a?[]:a,u=e.data,d=e.resolveData,p=e.pivotIDKey,m=e.pivotValKey,h=e.subRowsKey,v=e.aggregatedKey,y=e.nestingLevelKey,P=e.originalKey,C=e.indexKey,b=e.groupedByPivotKey,T=e.SubComponent,x=!1;r.forEach(function(e){e.columns&&(x=!0)});var S=[].concat(f(r)),w=r.find(function(e){return e.expander||e.columns&&e.columns.some(function(e){return e.expander})});w&&!w.expander&&(w=w.columns.find(function(e){return e.expander})),T&&!w&&(S=[w={expander:!0}].concat(f(S)));var N=[],E=function(e,t){var n=function(e,t){var n=void 0;if((n=e.expander?l({},o.props.column,o.props.expanderDefaults,e):l({},o.props.column,e)).maxWidth<n.minWidth&&(n.minWidth=n.maxWidth),t&&(n.parentColumn=t),"string"==typeof n.accessor){n.id=n.id||n.accessor;var r=n.accessor;return n.accessor=function(e){return g.get(e,r)},n}if(n.accessor&&!n.id)throw console.warn(n),new Error("A column id is required if using a non-string accessor for column above.");return n.accessor||(n.accessor=function(){}),n}(e,t);return N.push(n),n},z=S.map(function(e){return e.columns?l({},e,{columns:e.columns.map(function(t){return E(t,e)})}):E(e)}).slice(),D=[],O=(z=(z=z.map(function(e){if(e.columns){var t=e.columns.filter(function(e){return!(i.indexOf(e.id)>-1)&&g.getFirstDefined(e.show,!0)});return l({},e,{columns:t})}return e})).filter(function(e){return e.columns?e.columns.length:!(i.indexOf(e.id)>-1)&&g.getFirstDefined(e.show,!0)})).findIndex(function(e){return e.pivot});if(i.length){var R=[];i.forEach(function(e){var t=N.find(function(t){return t.id===e});t&&R.push(t)});var F=R.reduce(function(e,t){return e&&e===t.parentColumn&&t.parentColumn},R[0].parentColumn),k=x&&F.Header,W={Header:k=k||function(){return n.createElement("strong",null,"Pivoted")},columns:R.map(function(e){return l({},o.props.pivotDefaults,e,{pivoted:!0})})};O>=0?(W=l({},z[O],W),z.splice(O,1,W)):z.unshift(W)}var _=[],K=[],M=function(e,t){_.push(l({},o.props.column,t,{columns:e})),K=[]};z.forEach(function(e){if(e.columns)return D=D.concat(e.columns),K.length>0&&M(K),void M(e.columns,e);D.push(e),K.push(e)}),x&&K.length>0&&M(K);var j=this.resolvedData;this.resolvedData&&!t||(j=d(u),this.resolvedData=j),j=j.map(function(e,t){return function e(t,n){var o,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=(s(o={},P,t),s(o,C,n),s(o,h,t[h]),s(o,y,r),o);return N.forEach(function(e){e.expander||(a[e.id]=e.accessor(t))}),a[h]&&(a[h]=a[h].map(function(t,n){return e(t,n,r+1)})),a}(e,t)});var A=D.filter(function(e){return!e.expander&&e.aggregate});return i.length&&(j=function e(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(o===n.length)return t;var r=Object.entries(g.groupBy(t,n[o])).map(function(e){var t,r=c(e,2),a=r[0],i=r[1];return s(t={},p,n[o]),s(t,m,a),s(t,n[o],a),s(t,h,i),s(t,y,o),s(t,b,!0),t});return r=r.map(function(t){var r,a,i,u=e(t[h],n,o+1);return l({},t,(s(r={},h,u),s(r,v,!0),r),(a=u,i={},A.forEach(function(e){var t=a.map(function(t){return t[e.id]});i[e.id]=e.aggregate(t,a)}),i))})}(j,i)),l({},e,{resolvedData:j,allVisibleColumns:D,headerGroups:_,allDecoratedColumns:N,hasHeaderGroups:x})}},{key:"getSortedData",value:function(e){var t=e.manual,n=e.sorted,o=e.filtered,r=e.defaultFilterMethod,a=e.resolvedData,i=e.allDecoratedColumns,s={};return i.filter(function(e){return e.sortMethod}).forEach(function(e){s[e.id]=e.sortMethod}),{sortedData:t?a:this.sortData(this.filterData(a,o,r,i),n,s)}}},{key:"fireFetchData",value:function(){var e=l({},this.getResolvedState(),{page:this.getStateOrProp("page"),pageSize:this.getStateOrProp("pageSize"),filtered:this.getStateOrProp("filtered")});this.props.onFetchData(e,this)}},{key:"getPropOrState",value:function(e){return g.getFirstDefined(this.props[e],this.state[e])}},{key:"getStateOrProp",value:function(e){return g.getFirstDefined(this.state[e],this.props[e])}},{key:"filterData",value:function(e,t,n,o){var r=this,a=e;return t.length&&(a=(a=t.reduce(function(e,t){var r=o.find(function(e){return e.id===t.id});if(!r||!1===r.filterable)return e;var a=r.filterMethod||n;return r.filterAll?a(t,e,r):e.filter(function(e){return a(t,e,r)})},a)).map(function(e){return e[r.props.subRowsKey]?l({},e,s({},r.props.subRowsKey,r.filterData(e[r.props.subRowsKey],t,n,o))):e}).filter(function(e){return!e[r.props.subRowsKey]||e[r.props.subRowsKey].length>0})),a}},{key:"sortData",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.length)return e;var r=(this.props.orderByMethod||g.orderBy)(e,t.map(function(e){return o[e.id]?function(t,n){return o[e.id](t[e.id],n[e.id],e.desc)}:function(t,o){return n.props.defaultSortMethod(t[e.id],o[e.id],e.desc)}}),t.map(function(e){return!e.desc}),this.props.indexKey);return r.forEach(function(e){e[n.props.subRowsKey]&&(e[n.props.subRowsKey]=n.sortData(e[n.props.subRowsKey],t,o))}),r}},{key:"getMinRows",value:function(){return g.getFirstDefined(this.props.minRows,this.getStateOrProp("pageSize"))}},{key:"onPageChange",value:function(e){var t=this.props,n=t.onPageChange,o=t.collapseOnPageChange,r={page:e};o&&(r.expanded={}),this.setStateWithData(r,function(){return n&&n(e)})}},{key:"onPageSizeChange",value:function(e){var t=this.props.onPageSizeChange,n=this.getResolvedState(),o=n.pageSize*n.page,r=Math.floor(o/e);this.setStateWithData({pageSize:e,page:r},function(){return t&&t(e,r)})}},{key:"sortColumn",value:function(e,t){var n=this.getResolvedState(),o=n.sorted,r=n.skipNextSort,a=n.defaultSortDesc,i=Object.prototype.hasOwnProperty.call(e,"defaultSortDesc")?e.defaultSortDesc:a,s=!i;if(r)this.setStateWithData({skipNextSort:!1});else{var l=this.props.onSortedChange,u=g.clone(o||[]).map(function(e){return e.desc=g.isSortingDesc(e),e});if(g.isArray(e)){var d=u.findIndex(function(t){return t.id===e[0].id});d>-1?(u[d].desc===s?t?u.splice(d,e.length):e.forEach(function(e,t){u[d+t].desc=i}):e.forEach(function(e,t){u[d+t].desc=s}),t||(u=u.slice(d,e.length))):u=t?u.concat(e.map(function(e){return{id:e.id,desc:i}})):e.map(function(e){return{id:e.id,desc:i}})}else{var p=u.findIndex(function(t){return t.id===e.id});if(p>-1){var c=u[p];c.desc===s?t?u.splice(p,1):(c.desc=i,u=[c]):(c.desc=s,t||(u=[c]))}else t?u.push({id:e.id,desc:i}):u=[{id:e.id,desc:i}]}this.setStateWithData({page:!o.length&&u.length||!t?0:this.state.page,sorted:u},function(){return l&&l(u,e,t)})}}},{key:"filterColumn",value:function(e,t){var n=this.getResolvedState().filtered,o=this.props.onFilteredChange,r=(n||[]).filter(function(t){return t.id!==e.id});""!==t&&r.push({id:e.id,value:t}),this.setStateWithData({filtered:r},function(){return o&&o(r,e,t)})}},{key:"resizeColumnStart",value:function(e,t,n){var o=this;e.stopPropagation();var r=e.target.parentElement.getBoundingClientRect().width,a=void 0;a=n?e.changedTouches[0].pageX:e.pageX,this.trapEvents=!0,this.setStateWithData({currentlyResizing:{id:t.id,startX:a,parentWidth:r}},function(){n?(document.addEventListener("touchmove",o.resizeColumnMoving),document.addEventListener("touchcancel",o.resizeColumnEnd),document.addEventListener("touchend",o.resizeColumnEnd)):(document.addEventListener("mousemove",o.resizeColumnMoving),document.addEventListener("mouseup",o.resizeColumnEnd),document.addEventListener("mouseleave",o.resizeColumnEnd))})}},{key:"resizeColumnMoving",value:function(e){e.stopPropagation();var t=this.props,n=t.onResizedChange,o=t.column,r=this.getResolvedState(),a=r.resized,i=r.currentlyResizing,s=r.columns.find(function(e){return e.accessor===i.id||e.id===i.id}),l=s&&null!=s.minResizeWidth?s.minResizeWidth:o.minResizeWidth,u=a.filter(function(e){return e.id!==i.id}),d=void 0;"touchmove"===e.type?d=e.changedTouches[0].pageX:"mousemove"===e.type&&(d=e.pageX);var p=Math.max(i.parentWidth+d-i.startX,l);u.push({id:i.id,value:p}),this.setStateWithData({resized:u},function(){return n&&n(u,e)})}},{key:"resizeColumnEnd",value:function(e){e.stopPropagation();var t="touchend"===e.type||"touchcancel"===e.type;t&&(document.removeEventListener("touchmove",this.resizeColumnMoving),document.removeEventListener("touchcancel",this.resizeColumnEnd),document.removeEventListener("touchend",this.resizeColumnEnd)),document.removeEventListener("mousemove",this.resizeColumnMoving),document.removeEventListener("mouseup",this.resizeColumnEnd),document.removeEventListener("mouseleave",this.resizeColumnEnd),t||this.setStateWithData({skipNextSort:!0,currentlyResizing:!1})}}]),o}()}((S=t.Component,function(e){function t(){return a(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,S),i(t,[{key:"UNSAFE_componentWillMount",value:function(){this.setStateWithData(this.getDataModel(this.getResolvedState(),!0))}},{key:"componentDidMount",value:function(){this.fireFetchData()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e,t){var n=this.getResolvedState(),o=this.getResolvedState(e,t);["sorted","filtered","resized","expanded"].forEach(function(e){var t="default"+(e.charAt(0).toUpperCase()+e.slice(1));JSON.stringify(n[t])!==JSON.stringify(o[t])&&(o[e]=o[t])}),["sortable","filterable","resizable"].forEach(function(e){if(n[e]!==o[e]){var t=e.replace("able","")+"ed",r="default"+(t.charAt(0).toUpperCase()+t.slice(1));o[t]=o[r]}}),n.data===o.data&&n.columns===o.columns&&n.pivotBy===o.pivotBy&&n.sorted===o.sorted&&n.filtered===o.filtered||this.setStateWithData(this.getDataModel(o,n.data!==o.data))}},{key:"setStateWithData",value:function(e,t){var n=this,o=this.getResolvedState(),r=this.getResolvedState({},e),a=r.freezeWhenExpanded;if(r.frozen=!1,a)for(var i=Object.keys(r.expanded),s=0;s<i.length;s+=1)if(r.expanded[i[s]]){r.frozen=!0;break}return(o.frozen&&!r.frozen||o.sorted!==r.sorted||o.filtered!==r.filtered||o.showFilters!==r.showFilters||!r.frozen&&o.resolvedData!==r.resolvedData)&&((o.sorted!==r.sorted&&this.props.collapseOnSortingChange||o.filtered!==r.filtered||o.showFilters!==r.showFilters||o.sortedData&&!r.frozen&&o.resolvedData!==r.resolvedData&&this.props.collapseOnDataChange)&&(r.expanded={}),Object.assign(r,this.getSortedData(r))),o.filtered!==r.filtered&&(r.page=0),r.sortedData&&(r.pages=r.manual?r.pages:Math.ceil(r.sortedData.length/r.pageSize),r.page=r.manual?r.page:Math.max(r.page>=r.pages?r.pages-1:r.page,0)),this.setState(r,function(){t&&t(),o.page===r.page&&o.pageSize===r.pageSize&&o.sorted===r.sorted&&o.filtered===r.filtered||n.fireFetchData()})}}]),t}())));z.propTypes=N,z.defaultProps=C,e.ReactTableDefaults=E,e.default=z,Object.defineProperty(e,"__esModule",{value:!0})});