text: (window.webpackJsonp=window.webpackJsonp||[]).push([[24],{112:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=new WeakMap;function c(e){return Object(r.useMemo)((function(){return function(e){var t=o.get(e)||0;return o.set(e,t+1),t}(e)}),[e])}},128:function(e,t,n){"use strict";var r=n(6),o=n(14),c=n(8),a=n.n(c),i=n(0);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.as,n=void 0===t?"div":t,c=e.className,l=Object(o.a)(e,["as","className"]);return function(e){var t=e.as,n=void 0===t?"div":t,r=Object(o.a)(e,["as"]);return"function"==typeof r.children?r.children(r):Object(i.createElement)(n,r)}(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({as:n,className:a()("components-visually-hidden",c)},l))}},171:function(e,t,n){"use strict";var r=n(0),o=n(8),c=n.n(o),a=n(128);function i(e){var t=e.id,n=e.label,o=e.hideLabelFromVision,s=e.help,l=e.className,u=e.children;return Object(r.createElement)("div",{className:c()("components-base-control",l)},Object(r.createElement)("div",{className:"components-base-control__field"},n&&t&&(o?Object(r.createElement)(a.a,{as:"label",htmlFor:t},n):Object(r.createElement)("label",{className:"components-base-control__label",htmlFor:t},n)),n&&!t&&(o?Object(r.createElement)(a.a,{as:"label"},n):Object(r.createElement)(i.VisualLabel,null,n)),u),!!s&&Object(r.createElement)("p",{id:t+"__help",className:"components-base-control__help"},s))}i.VisualLabel=function(e){var t=e.className,n=e.children;return t=c()("components-base-control__label",t),Object(r.createElement)("span",{className:t},n)},t.a=i},422:function(e,t,n){"use strict";var r=n(6),o=n(14),c=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,i=void 0===n?24:n,s=Object(o.a)(e,["icon","size"]);return Object(c.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:i,height:i},s))}},721:function(e,t,n){"use strict";var r=n(12),o=n(9),c=n(7),a=n(5),i=n(11),s=n(4),l=n(10),u=n(0),p=n(8),b=n.n(p),d=n(82);function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var m=function(e){Object(l.a)(p,e);var t,n=(t=p,function(){var e,n=Object(s.a)(t);if(f()){var r=Object(s.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(i.a)(this,e)});function p(){var e;return Object(o.a)(this,p),(e=n.apply(this,arguments)).toggle=e.toggle.bind(Object(a.a)(e)),e.close=e.close.bind(Object(a.a)(e)),e.closeIfFocusOutside=e.closeIfFocusOutside.bind(Object(a.a)(e)),e.containerRef=Object(u.createRef)(),e.state={isOpen:!1},e}return Object(c.a)(p,[{key:"componentWillUnmount",value:function(){var e=this.state.isOpen,t=this.props.onToggle;e&&t&&t(!1)}},{key:"componentDidUpdate",value:function(e,t){var n=this.state.isOpen,r=this.props.onToggle;t.isOpen!==n&&r&&r(n)}},{key:"toggle",value:function(){this.setState((function(e){return{isOpen:!e.isOpen}}))}},{key:"closeIfFocusOutside",value:function(){this.containerRef.current.contains(document.activeElement)||document.activeElement.closest('[role="dialog"]')||this.close()}},{key:"close",value:function(){this.props.onClose&&this.props.onClose(),this.setState({isOpen:!1})}},{key:"render",value:function(){var e=this.state.isOpen,t=this.props,n=t.renderContent,o=t.renderToggle,c=t.position,a=void 0===c?"bottom right":c,i=t.className,s=t.contentClassName,l=t.expandOnMobile,p=t.headerTitle,f=t.focusOnMount,m=t.popoverProps,O={isOpen:e,onToggle:this.toggle,onClose:this.close};return Object(u.createElement)("div",{className:b()("components-dropdown",i),ref:this.containerRef},o(O),e&&Object(u.createElement)(d.a,Object(r.a)({position:a,onClose:this.close,onFocusOutside:this.closeIfFocusOutside,expandOnMobile:l,headerTitle:p,focusOnMount:f},m,{className:b()("components-dropdown__content",m?m.className:void 0,s)}),n(O)))}}]),p}(u.Component);t.a=m},724:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(12),o=n(14),c=n(0),a=n(112),i=n(171);function s(e){var t=e.label,n=e.hideLabelFromVision,l=e.value,u=e.help,p=e.className,b=e.onChange,d=e.type,f=void 0===d?"text":d,m=Object(o.a)(e,["label","hideLabelFromVision","value","help","className","onChange","type"]),O=Object(a.a)(s),h="inspector-text-control-".concat(O);return Object(c.createElement)(i.a,{label:t,hideLabelFromVision:n,id:h,help:u,className:p},Object(c.createElement)("input",Object(r.a)({className:"components-text-control__input",type:f,id:h,value:l,onChange:function(e){return b(e.target.value)},"aria-describedby":u?h+"__help":void 0},m)))}},757:function(e,t,n){"use strict";var r=n(17),o=n.n(r),c=n(38),a=n.n(c),i=n(37),s=n.n(i),l=n(62),u=n.n(l),p=n(39),b=n.n(p),d=n(42),f=n.n(d),m=n(26),O=n.n(m),h=n(0),v=n(1),j=n.n(v),y=n(2),_=n(18),g=n(53),k=n(23),w=n(43),E=n(63),D=n(108),S=n(200);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O()(e);if(t){var o=O()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var C=function(e){b()(n,e);var t=T(n);function n(){var e;return a()(this,n),(e=t.call(this)).trackDateSelect=e.trackDateSelect.bind(u()(e)),e.trackFilterSelect=e.trackFilterSelect.bind(u()(e)),e.trackAdvancedFilterAction=e.trackAdvancedFilterAction.bind(u()(e)),e}return s()(n,[{key:"trackDateSelect",value:function(e){var t=this.props.report;Object(E.b)("datepicker_update",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({report:t},Object(y.omitBy)(e,y.isUndefined)))}},{key:"trackFilterSelect",value:function(e){var t=this.props.report;Object(E.b)("analytics_filter",{report:t,filter:e.filter||"all"})}},{key:"trackAdvancedFilterAction",value:function(e,t){var n=this.props.report;switch(e){case"add":Object(E.b)("analytics_filters_add",{report:n,filter:t.key});break;case"remove":Object(E.b)("analytics_filters_remove",{report:n,filter:t.key});break;case"filter":var r=Object.keys(t).reduce((function(e,n){return e[Object(y.snakeCase)(n)]=t[n],e}),{});Object(E.b)("analytics_filters_filter",{report:n,snakeCaseData:r});break;case"clear_all":Object(E.b)("analytics_filters_clear_all",{report:n});break;case"match":Object(E.b)("analytics_filters_all_any",{report:n,value:t.match})}}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.filters,r=e.path,o=e.query,c=e.showDatePicker,a=e.defaultDateRange,i=Object(D.h)(o,a),s=i.period,l=i.compare,u=i.before,p=i.after,b=Object(D.f)(o,a),d={period:s,compare:l,before:u,after:p,primaryDate:b.primary,secondaryDate:b.secondary},f=this.context;return Object(h.createElement)(g.ReportFilters,{query:o,siteLocale:k.c.siteLocale,currency:f.getCurrency(),path:r,filters:n,advancedFilters:t,showDatePicker:c,onDateSelect:this.trackDateSelect,onFilterSelect:this.trackFilterSelect,onAdvancedFilterAction:this.trackAdvancedFilterAction,dateQuery:d,isoDateFormat:D.k})}}]),n}(h.Component);C.contextType=S.a,t.a=Object(_.withSelect)((function(e){return{defaultDateRange:e(w.SETTINGS_STORE_NAME).getSetting("wc_admin","wcAdminSettings").woocommerce_default_date_range}}))(C),C.propTypes={advancedFilters:j.a.object,filters:j.a.array,path:j.a.string.isRequired,query:j.a.object,showDatePicker:j.a.bool,report:j.a.string.isRequired}},910:function(e,t,n){"use strict";n.r(t);var r=n(129),o=n.n(r),c=n(17),a=n.n(c),i=n(41),s=n.n(i),l=n(0),u=n(3),p=n(169),b=n(2),d=n(721),f=n(67),m=n(96),O=n(48),h=n(422),v=n(32),j=Object(l.createElement)(v.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.a,{d:"M2 12C2 6.44444 6.44444 2 12 2C17.5556 2 22 6.44444 22 12C22 17.5556 17.5556 22 12 22C6.44444 22 2 17.5556 2 12ZM13 11V7H11V11H7V13H11V17H13V13H17V11H13Z"})),y=n(53),_=n(43),g=(n(769),Object(l.lazy)((function(){return Promise.all([n.e(2),n.e(1),n.e(26)]).then(n.bind(null,924))}))),k=Object(l.lazy)((function(){return Promise.all([n.e(4),n.e(32)]).then(n.bind(null,929))})),w=Object(l.lazy)((function(){return n.e(44).then(n.bind(null,919))})),E=Object(O.applyFilters)("woocommerce_dashboard_default_sections",[{key:"store-performance",component:function(e){return Object(l.createElement)(l.Suspense,{fallback:Object(l.createElement)(y.Spinner,null)},Object(l.createElement)(w,e))},title:Object(u.__)("Performance",'woocommerce'),isVisible:!0,icon:"arrow-right-alt",hiddenBlocks:["coupons/amount","coupons/orders_count","downloads/download_count","taxes/order_tax","taxes/total_tax","taxes/shipping_tax","revenue/shipping","orders/avg_order_value","revenue/refunds","revenue/gross_sales"]},{key:"charts",component:function(e){return Object(l.createElement)(l.Suspense,{fallback:Object(l.createElement)(y.Spinner,null)},Object(l.createElement)(g,e))},title:Object(u.__)("Charts",'woocommerce'),isVisible:!0,icon:"chart-bar",hiddenBlocks:["orders_avg_order_value","avg_items_per_order","products_items_sold","revenue_total_sales","revenue_refunds","coupons_amount","coupons_orders_count","revenue_shipping","taxes_total_tax","taxes_order_tax","taxes_shipping_tax","downloads_download_count"]},{key:"leaderboards",component:function(e){return Object(l.createElement)(l.Suspense,{fallback:Object(l.createElement)(y.Spinner,null)},Object(l.createElement)(k,e))},title:Object(u.__)("Leaderboards",'woocommerce'),isVisible:!0,icon:"editor-ol",hiddenBlocks:["coupons","customers"]}]),D=n(80),S=n.n(D),P=n(38),T=n.n(P),C=n(37),R=n.n(C),F=n(62),N=n.n(F),M=n(39),x=n.n(M),B=n(42),V=n.n(B),I=n(26),A=n.n(I),H=n(724);function L(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=A()(e);if(t){var o=A()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return V()(this,n)}}var U=function(e){x()(n,e);var t=L(n);function n(e){var r;return T()(this,n),(r=t.call(this,e)).onMoveUp=r.onMoveUp.bind(N()(r)),r.onMoveDown=r.onMoveDown.bind(N()(r)),r}return R()(n,[{key:"onMoveUp",value:function(){var e=this.props,t=e.onMove,n=e.onToggle;t(-1),n()}},{key:"onMoveDown",value:function(){var e=this.props,t=e.onMove,n=e.onToggle;t(1),n()}},{key:"render",value:function(){var e=this.props,t=e.onRemove,n=e.isFirst,r=e.isLast,o=e.onTitleBlur,c=e.onTitleChange,a=e.titleInput;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"woocommerce-ellipsis-menu__item"},Object(l.createElement)(H.a,{label:Object(u.__)("Section Title",'woocommerce'),onBlur:o,onChange:c,required:!0,value:a})),Object(l.createElement)("div",{className:"woocommerce-dashboard-section-controls"},!n&&Object(l.createElement)(y.MenuItem,{isClickable:!0,onInvoke:this.onMoveUp},Object(l.createElement)(m.a,{icon:"arrow-up-alt2",label:Object(u.__)("Move up")}),Object(u.__)("Move up",'woocommerce')),!r&&Object(l.createElement)(y.MenuItem,{isClickable:!0,onInvoke:this.onMoveDown},Object(l.createElement)(m.a,{icon:"arrow-down-alt2",label:Object(u.__)("Move Down")}),Object(u.__)("Move Down",'woocommerce')),Object(l.createElement)(y.MenuItem,{isClickable:!0,onInvoke:t},Object(l.createElement)(m.a,{icon:"trash",label:Object(u.__)("Remove block")}),Object(u.__)("Remove section",'woocommerce'))))}}]),n}(l.Component);function q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=A()(e);if(t){var o=A()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return V()(this,n)}}var z=function(e){x()(n,e);var t=q(n);function n(e){var r;T()(this,n),r=t.call(this,e);var o=e.title;return r.state={titleInput:o},r.onToggleHiddenBlock=r.onToggleHiddenBlock.bind(N()(r)),r.onTitleChange=r.onTitleChange.bind(N()(r)),r.onTitleBlur=r.onTitleBlur.bind(N()(r)),r}return R()(n,[{key:"onTitleChange",value:function(e){this.setState({titleInput:e})}},{key:"onTitleBlur",value:function(){var e=this.props,t=e.onTitleUpdate,n=e.title,r=this.state.titleInput;""===r?this.setState({titleInput:n}):t&&t(r)}},{key:"onToggleHiddenBlock",value:function(e){var t=this;return function(){var n=Object(b.xor)(t.props.hiddenBlocks,[e]);t.props.onChangeHiddenBlocks(n)}}},{key:"render",value:function(){var e=this.props,t=e.component,n=o()(e,["component"]),r=this.state.titleInput;return Object(l.createElement)("div",{className:"woocommerce-dashboard-section"},Object(l.createElement)(t,S()({onTitleChange:this.onTitleChange,onTitleBlur:this.onTitleBlur,onToggleHiddenBlock:this.onToggleHiddenBlock,titleInput:r,controls:U},n)))}}]),n}(l.Component),G=n(101),J=n(63),Q=n(753),W=n(108),Z=n(757);function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Y=Object(l.lazy)((function(){return Promise.all([n.e(3),n.e(4),n.e(6),n.e(45)]).then(n.bind(null,920))})),$=Object(O.applyFilters)("woocommerce_admin_dashboard_filters",[]);t.default=Object(p.a)(Object(G.a)((function(e){var t=e(_.OPTIONS_STORE_NAME).getOption,n={defaultDateRange:e(_.SETTINGS_STORE_NAME).getSetting("wc_admin","wcAdminSettings").woocommerce_default_date_range};return Object(Q.e)()&&(n.homepageEnabled=window.wcAdminFeatures.homescreen&&"yes"===t("woocommerce_homescreen_enabled"),n.taskListHidden="yes"===t("woocommerce_task_list_hidden"),n.taskListComplete="yes"===t("woocommerce_task_list_complete")),n})))((function(e){var t,n,r,c,a,i,p,O,v,g=e.defaultDateRange,k=e.homepageEnabled,w=e.path,D=e.query,S=e.taskListComplete,P=e.taskListHidden,T=Object(_.useUserPreferences)(),C=T.updateUserPreferences,R=function(e){if(!e||0===e.length)return E;var t=E.map((function(e){return e.key})),n=e.map((function(e){return e.key})),r=new Set([].concat(s()(n),s()(t))),o=[];return r.forEach((function(t){var n=E.find((function(e){return e.key===t}));if(n){var r=e.find((function(e){return e.key===t}));o.push(X(X({},n),r))}})),o}(o()(T,["updateUserPreferences"]).dashboard_sections),F=!k&&Object(Q.e)()&&!P,N=!F||!D.task&&S,M=function(e){C({dashboard_sections:e})},x=function(e,t){var n=R.map((function(n){return n.key===e?X(X({},n),t):n}));M(n)},B=function(e){return function(t){Object(J.b)("dash_section_rename",{key:e}),x(e,{title:t})}},V=function(e,t){return function(){t&&t();var n=R.findIndex((function(t){return e===t.key})),r=R.splice(n,1).shift();r.isVisible=!r.isVisible,R.push(r),r.isVisible?Object(J.b)("dash_section_add",{key:r.key}):Object(J.b)("dash_section_remove",{key:r.key}),M(R)}},I=function e(t,n){var r=R.splice(t,1).shift(),o=t+n;if(R[n<0?o:o-1].isVisible||0===t||t===R.length-1){R.splice(o,0,r),M(R);var c={key:r.key,direction:n>0?"down":"up"};Object(J.b)("dash_section_order_change",c)}else e(t,n+n)};return Object(l.createElement)(l.Fragment,null,F&&Object(l.createElement)(l.Suspense,{fallback:Object(l.createElement)(y.Spinner,null)},Object(l.createElement)(Y,{query:D,inline:N})),N&&(n=Object(W.h)(D,g),r=n.period,c=n.compare,a=n.before,i=n.after,p=Object(W.f)(D,g),O={period:r,compare:c,before:a,after:i,primaryDate:p.primary,secondaryDate:p.secondary},v=R.filter((function(e){return e.isVisible})).map((function(e){return e.key})),Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Z.a,{report:"dashboard",query:D,path:w,dateQuery:O,isoDateFormat:W.k,filters:$}),R.map((function(e,t){return e.isVisible?Object(l.createElement)(z,{component:e.component,hiddenBlocks:e.hiddenBlocks,key:e.key,onChangeHiddenBlocks:(n=e.key,function(e){x(n,{hiddenBlocks:e})}),onTitleUpdate:B(e.key),path:w,query:D,title:e.title,onMove:Object(b.partial)(I,t),onRemove:V(e.key),isFirst:e.key===v[0],isLast:e.key===v[v.length-1]}):null;var n})),0===(t=R.filter((function(e){return!1===e.isVisible}))).length?null:Object(l.createElement)(d.a,{position:"top center",className:"woocommerce-dashboard-section__add-more",renderToggle:function(e){var t=e.onToggle,n=e.isOpen;return Object(l.createElement)(f.a,{onClick:t,title:Object(u.__)("Add more sections",'woocommerce'),"aria-expanded":n},Object(l.createElement)(h.a,{icon:j}))},renderContent:function(e){var n=e.onToggle;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(y.H,null,Object(u.__)("Dashboard Sections",'woocommerce')),Object(l.createElement)("div",{className:"woocommerce-dashboard-section__add-more-choices"},t.map((function(e){return Object(l.createElement)(f.a,{key:e.key,onClick:V(e.key,n),className:"woocommerce-dashboard-section__add-more-btn",title:Object(u.sprintf)(Object(u.__)("Add %s section",'woocommerce'),e.title)},Object(l.createElement)(m.a,{icon:e.icon,size:30}),Object(l.createElement)("span",{className:"woocommerce-dashboard-section__add-more-btn-title"},e.title))}))))}}))))}))}}]);
  