"use strict";(self.webpackChunk_wcAdmin_webpackJsonp=self.webpackChunk_wcAdmin_webpackJsonp||[]).push([[8544],{5945:function(e,r,t){var s=t(69307),n=t(65736),o=t(7862),a=t.n(o),c=t(86020);function i(e){let{className:r}=e;const t=(0,n.__)("There was an error getting your stats. Please try again.","woocommerce"),o=(0,n.__)("Reload","woocommerce");return(0,s.createElement)(c.EmptyContent,{className:r,title:t,actionLabel:o,actionCallback:()=>{window.location.reload()}})}i.propTypes={className:a().string},r.Z=i},62062:function(e,r,t){t.r(r);var s=t(69307),n=t(94333),o=t(9818),a=t(7862),c=t.n(a),i=t(92819),l=t(10431),p=t(67221),u=t(34546),m=t(5945),h=t(54071),E=t(11982);const g=e=>{let{params:r,path:t}=e;return r.report||t.replace(/^\/+/,"")};class d extends s.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(e){this.setState({hasError:!0}),console.warn(e)}render(){if(this.state.hasError)return null;const{isError:e}=this.props;if(e)return(0,s.createElement)(m.Z,null);const r=g(this.props),t=(0,i.find)((0,E.Z)(),{report:r});if(!t)return(0,s.createElement)(u.E,null);const n=t.component;return(0,s.createElement)(h.$.Provider,{value:(0,h.s)((0,l.getQuery)())},(0,s.createElement)(n,this.props))}}d.propTypes={params:c().object.isRequired},r.default=(0,n.compose)((0,o.withSelect)(((e,r)=>{const t=(0,l.getQuery)(),{search:s}=t,n=e(p.ITEMS_STORE_NAME);if(!s)return{};const o=g(r),a=(0,l.getSearchWords)(t),c="categories"===o&&"single_category"===t.filter?"products":o,i=(0,p.searchItemsByString)(n,c,a,{per_page:100}),{isError:u,isRequesting:m,items:h}=i,E=Object.keys(h);return E.length?{isError:u,isRequesting:m,query:{...r.query,[c]:E.join(",")}}:{isError:u,isRequesting:m}})))(d)}}]);