"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(17844),m=t(34546),h=t(5945),g=t(11982);const E=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)(h.Z,null);const r=E(this.props),t=(0,i.find)((0,g.Z)(),{report:r});if(!t)return(0,s.createElement)(m.E,null);const n=t.component;return(0,s.createElement)(u.CurrencyContext.Provider,{value:(0,u.getFilteredCurrencyInstance)((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=E(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,g=Object.keys(h);return g.length?{isError:u,isRequesting:m,query:{...r.query,[c]:g.join(",")}}:{isError:u,isRequesting:m}})))(d)}}]);