text: this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["attribute-filter"]=function(e){function t(t){for(var r,u,i=t[0],a=t[1],l=t[2],b=0,d=[];b<i.length;b++)u=i[b],Object.prototype.hasOwnProperty.call(c,u)&&c[u]&&d.push(c[u][0]),c[u]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r]);for(s&&s(t);d.length;)d.shift()();return o.push.apply(o,l||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,i=1;i<n.length;i++){var a=n[i];0!==c[a]&&(r=!1)}r&&(o.splice(t--,1),e=u(u.s=n[0]))}return e}var r={},c={7:0},o=[];function u(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,u),n.l=!0,n.exports}u.m=e,u.c=r,u.d=function(e,t,n){u.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,t){if(1&t&&(e=u(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(u.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)u.d(n,r,function(t){return e[t]}.bind(null,r));return n},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,"a",t),t},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var s=a;return o.push([839,2,0,1]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},110:function(e,t){},112:function(e,t){},113:function(e,t){},114:function(e,t){},115:function(e,t){},116:function(e,t){},117:function(e,t){},118:function(e,t){},119:function(e,t){},120:function(e,t){},121:function(e,t){},122:function(e,t){},123:function(e,t){},124:function(e,t){},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},14:function(e,t){!function(){e.exports=this.wp.blocks}()},145:function(e,t,n){"use strict";var r=n(20),c=n.n(r),o=n(26),u=n.n(o),i=n(21),a=n.n(i),l=n(22),s=n.n(l),b=n(12),d=n.n(b),p=n(0),f=n(6),g=n(1),O=n(4);function m(e){var t=e.level,n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(t)?Object(p.createElement)(O.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)(O.Path,{d:n[t]})):null}function h(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=d()(e);if(t){var c=d()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return s()(this,n)}}var j=function(e){a()(n,e);var t=h(n);function n(){return c()(this,n),t.apply(this,arguments)}return u()(n,[{key:"createLevelControl",value:function(e,t,n){var r=e===t;return{icon:Object(p.createElement)(m,{level:e}),title:Object(g.sprintf)(Object(g.__)("Heading %d"),e),isActive:r,onClick:function(){return n(e)}}}},{key:"render",value:function(){var e=this,t=this.props,n=t.isCollapsed,r=void 0===n||n,c=t.minLevel,o=t.maxLevel,u=t.selectedLevel,i=t.onChange;return Object(p.createElement)(O.Toolbar,{isCollapsed:r,icon:Object(p.createElement)(m,{level:u}),controls:Object(f.range)(c,o).map((function(t){return e.createLevelControl(t,u,i)}))})}}]),n}(p.Component);t.a=j},148:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(11),c=n.n(r),o=n(0),u=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return function(e){return t((function(){throw e}))}}},160:function(e,t,n){"use strict";var r=n(0),c=n(63),o=Object(r.createElement)(c.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(r.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(r.createElement)("g",{mask:"url(#external-mask)"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},165:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return p}));var r=n(11),c=n.n(r),o=n(39),u=n(35),i=n(0),a=n(96),l=n(6),s=n(57),b=function(e){var t=Object(a.a)();e=e||t;var n=Object(u.useSelect)((function(t){return t(o.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(u.useDispatch)(o.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(i.useCallback)((function(t){r(e,t)}),[e])]},d=function(e,t,n){var r=Object(a.a)();n=n||r;var c=Object(u.useSelect)((function(r){return r(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),l=Object(u.useDispatch)(o.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(i.useCallback)((function(t){l(n,e,t)}),[n,e])]},p=function(e,t){var n=Object(a.a)(),r=b(t=t||n),o=c()(r,2),u=o[0],d=o[1],p=Object(s.a)(e),f=Object(i.useRef)(!1);return Object(i.useEffect)((function(){d(Object(l.assign)({},u,p)),f.current=!0}),[p]),f.current?[u,d]:[e,d]}},17:function(e,t){!function(){e.exports=this.wp.url}()},176:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(24)),o=n(7),u=n.n(o);n(247);t.a=function(e){var t=e.className,n=e.headingLevel,o=e.onChange,i=e.heading,a="h".concat(n);return Object(r.createElement)(a,null,Object(r.createElement)(c.PlainText,{className:u()("wc-block-components-title",t),value:i,onChange:o}))}},197:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(39),c=n(35),o=n(0),u=n(148),i=n(57),a=function(e){var t=e.namespace,n=e.resourceName,a=e.resourceValues,l=void 0===a?[]:a,s=e.query,b=void 0===s?{}:s,d=e.shouldSelect,p=void 0===d||d;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var f=Object(o.useRef)({results:[],isLoading:!0}),g=Object(i.a)(b),O=Object(i.a)(l),m=Object(u.a)(),h=Object(c.useSelect)((function(e){if(!p)return null;var c=e(r.COLLECTIONS_STORE_KEY),o=[t,n,g,O],u=c.getCollectionError.apply(c,o);return u&&m(u),{results:c.getCollection.apply(c,o),isLoading:!c.hasFinishedResolution("getCollection",o)}}),[t,n,O,g,p]);return null!==h&&(f.current=h),f.current}},24:function(e,t){!function(){e.exports=this.wp.blockEditor}()},247:function(e,t,n){},25:function(e,t){!function(){e.exports=this.wp.compose}()},251:function(e,t,n){"use strict";var r=n(0),c=n(1),o=(n(2),n(7)),u=n.n(o),i=n(44),a=(n(490),function(e){var t=e.className,n=e.disabled,o=e.label,a=void 0===o?Object(c.__)("Go",'woocommerce'):o,l=e.onClick,s=e.screenReaderLabel,b=void 0===s?Object(c.__)("Apply filter",'woocommerce'):s;return Object(r.createElement)("button",{type:"submit",className:u()("wc-block-filter-submit-button",t),disabled:n,onClick:l},Object(r.createElement)(i.a,{label:a,screenReaderLabel:b}))});a.defaultProps={disabled:!1},t.a=a},252:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return u}));var r=n(5),c=r.c.reduce((function(e,t){var n,r=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;return r.id&&e.push(r),e}),[]),o=function(e){if(e)return c.find((function(t){return t.id===e}))},u=function(e){if(e)return c.find((function(t){return t.taxonomy===e}))}},253:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return o}));var r=n(6),c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=e.filter((function(e){return e.attribute===n.taxonomy})),u=o.length?o[0]:null;if(u&&u.slug&&Array.isArray(u.slug)&&u.slug.includes(c)){var i=u.slug.filter((function(e){return e!==c})),a=e.filter((function(e){return e.attribute!==n.taxonomy}));i.length>0&&(u.slug=i.sort(),a.push(u)),t(Object(r.sortBy)(a,"attribute"))}},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",u=e.filter((function(e){return e.attribute!==n.taxonomy}));0===c.length?t(u):(u.push({attribute:n.taxonomy,operator:o,slug:Object(r.map)(c,"slug").sort()}),t(Object(r.sortBy)(u,"attribute")))}},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},33:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},34:function(e,t){!function(){e.exports=this.moment}()},35:function(e,t){!function(){e.exports=this.wp.data}()},39:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},4:function(e,t){!function(){e.exports=this.wp.components}()},44:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(0),u=(n(2),n(9)),i=n(7),a=n.n(i);function l(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,i=e.wrapperProps,l=null!=n,b=null!=r;return!l&&b?(t=c||"span",i=s(s({},i),{},{className:a()(i.className,"screen-reader-text")}),Object(o.createElement)(t,i,r)):(t=c||u.Fragment,l&&b&&n!==r?Object(o.createElement)(t,i,Object(o.createElement)("span",{"aria-hidden":"true"},n),Object(o.createElement)("span",{className:"screen-reader-text"},r)):Object(o.createElement)(t,i,n))};b.defaultProps={wrapperProps:{}},t.a=b},48:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},5:function(e,t,n){"use strict";n.d(t,"k",(function(){return c})),n.d(t,"G",(function(){return o})),n.d(t,"M",(function(){return u})),n.d(t,"x",(function(){return i})),n.d(t,"z",(function(){return a})),n.d(t,"l",(function(){return l})),n.d(t,"y",(function(){return s})),n.d(t,"B",(function(){return b})),n.d(t,"n",(function(){return d})),n.d(t,"A",(function(){return p})),n.d(t,"m",(function(){return f})),n.d(t,"C",(function(){return g})),n.d(t,"t",(function(){return O})),n.d(t,"w",(function(){return m})),n.d(t,"q",(function(){return h})),n.d(t,"r",(function(){return j})),n.d(t,"s",(function(){return v})),n.d(t,"j",(function(){return w})),n.d(t,"I",(function(){return y})),n.d(t,"N",(function(){return _})),n.d(t,"p",(function(){return k})),n.d(t,"o",(function(){return E})),n.d(t,"F",(function(){return S})),n.d(t,"c",(function(){return P})),n.d(t,"u",(function(){return x})),n.d(t,"v",(function(){return C})),n.d(t,"Q",(function(){return N})),n.d(t,"H",(function(){return D})),n.d(t,"a",(function(){return T})),n.d(t,"K",(function(){return I})),n.d(t,"b",(function(){return L})),n.d(t,"J",(function(){return B})),n.d(t,"h",(function(){return A})),n.d(t,"L",(function(){return F})),n.d(t,"g",(function(){return H})),n.d(t,"i",(function(){return z})),n.d(t,"E",(function(){return q})),n.d(t,"D",(function(){return Y})),n.d(t,"P",(function(){return K})),n.d(t,"O",(function(){return Q})),n.d(t,"d",(function(){return U})),n.d(t,"e",(function(){return G})),n.d(t,"f",(function(){return W})),n.d(t,"R",(function(){return X})),n.d(t,"S",(function(){return Z}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),o=Object(r.getSetting)("reviewRatingsEnabled",!0),u=Object(r.getSetting)("showAvatars",!0),i=Object(r.getSetting)("max_columns",6),a=Object(r.getSetting)("min_columns",1),l=Object(r.getSetting)("default_columns",3),s=Object(r.getSetting)("max_rows",6),b=Object(r.getSetting)("min_rows",1),d=Object(r.getSetting)("default_rows",3),p=Object(r.getSetting)("min_height",500),f=Object(r.getSetting)("default_height",500),g=Object(r.getSetting)("placeholderImgSrc",""),O=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),m=Object(r.getSetting)("limitTags"),h=Object(r.getSetting)("hasProducts",!0),j=Object(r.getSetting)("hasTags",!0),v=Object(r.getSetting)("homeUrl",""),w=Object(r.getSetting)("couponsEnabled",!0),y=Object(r.getSetting)("shippingEnabled",!0),_=Object(r.getSetting)("taxesEnabled",!0),k=Object(r.getSetting)("displayItemizedTaxes",!1),E=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),S=Object(r.getSetting)("productCount",0),P=Object(r.getSetting)("attributes",[]),x=Object(r.getSetting)("isShippingCalculatorEnabled",!0),C=Object(r.getSetting)("isShippingCostHidden",!1),R=Object(r.getSetting)("woocommerceBlocksPhase",1),N=Object(r.getSetting)("wcBlocksAssetUrl",""),D=Object(r.getSetting)("shippingCountries",{}),T=Object(r.getSetting)("allowedCountries",{}),I=Object(r.getSetting)("shippingStates",{}),L=Object(r.getSetting)("allowedStates",{}),B=Object(r.getSetting)("shippingMethodsExist",!1),A=Object(r.getSetting)("checkoutShowLoginReminder",!0),M={id:0,title:"",permalink:""},V=Object(r.getSetting)("storePages",{shop:M,cart:M,checkout:M,privacy:M,terms:M}),F=V.shop.permalink,H=V.checkout.id,z=V.checkout.permalink,q=V.privacy.permalink,Y=V.privacy.title,K=V.terms.permalink,Q=V.terms.title,U=V.cart.id,G=V.cart.permalink,W=Object(r.getSetting)("checkoutAllowsGuest",!1),J=(Object(r.getSetting)("checkoutAllowsSignup",!1),n(14)),X=function(e,t){if(R>2)return Object(J.registerBlockType)(e,t)},Z=function(e,t){if(R>1)return Object(J.registerBlockType)(e,t)}},53:function(e,t){!function(){e.exports=this.wp.keycodes}()},57:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0),c=n(48),o=n.n(c),u=function(e){var t=Object(r.useRef)();return o()(e,t.current)||(t.current=e),t.current}},58:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(23),u=n.n(o),i=n(9);n(2);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.srcElement,n=e.size,r=void 0===n?24:n,o=u()(e,["srcElement","size"]);return Object(i.isValidElement)(t)&&Object(i.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){c()(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:r,height:r},o))}},6:function(e,t){!function(){e.exports=this.lodash}()},70:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(20),u=n.n(o),i=n(26),a=n.n(i),l=n(19),s=n.n(l),b=n(21),d=n.n(b),p=n(22),f=n.n(p),g=n(12),O=n.n(g),m=n(0),h=n(6),j=n(7),v=n.n(j),w=n(4),y=n(25);n(168);function _(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 c=O()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return f()(this,n)}}var k=function(e){d()(n,e);var t=_(n);function n(){var e;return u()(this,n),(e=t.apply(this,arguments)).onClick=e.onClick.bind(s()(e)),e}return a()(n,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.label,o=n.checked,u=n.instanceId,i=n.className,a=n.help,l=n.options,s=n.value,b="inspector-toggle-button-control-".concat(u);return a&&(e=Object(h.isFunction)(a)?a(o):a),Object(m.createElement)(w.BaseControl,{id:b,help:e,className:v()("components-toggle-button-control",i)},Object(m.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},r),Object(m.createElement)(w.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,n){var o={};return s===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isDefault=!0,o["aria-pressed"]=!1),Object(m.createElement)(w.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":r+": "+e.label},o),e.label)}))))}}]),n}(m.Component);t.a=Object(y.withInstanceId)(k)},73:function(e,t){!function(){e.exports=this.wp.dom}()},78:function(e,t){!function(){e.exports=this.ReactDOM}()},789:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(8),c=n.n(r),o=n(64),u=n.n(o),i=n(54),a=n.n(i),l=n(11),s=n.n(l),b=n(0),d=n(165),p=n(197),f=n(96),g=n(516),O=n(6),m=n(57);function h(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 j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=function(e){var t=e.queryAttribute,n=e.queryPrices,r=e.queryState,c=Object(f.a)();c="".concat(c,"-collection-data");var o=Object(d.a)(c),i=s()(o,1)[0],l=Object(d.b)("calculate_attribute_counts",[],c),h=s()(l,2),v=h[0],w=h[1],y=Object(d.b)("calculate_price_range",null,c),_=s()(y,2),k=_[0],E=_[1],S=Object(m.a)(t||{}),P=Object(m.a)(n);Object(b.useEffect)((function(){"object"===a()(S)&&Object.keys(S).length&&(v.find((function(e){return e.taxonomy===S.taxonomy}))||w([].concat(u()(v),[S])))}),[S,v,w]),Object(b.useEffect)((function(){k!==P&&void 0!==P&&E(P)}),[P,E,k]);var x=Object(b.useState)(!1),C=s()(x,2),R=C[0],N=C[1],D=Object(g.a)(R,200),T=s()(D,1)[0];R||N(!0);var I=Object(b.useMemo)((function(){return function(e){var t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(O.sortBy)(e.calculate_attribute_counts.map((function(e){return{taxonomy:e.taxonomy,query_type:e.queryType}})),["taxonomy","query_type"])),t}(i)}),[i]);return Object(p.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:j(j({},r),{},{page:void 0,per_page:void 0,orderby:void 0,order:void 0},I),shouldSelect:T})}},791:function(e,t,n){},81:function(e,t){!function(){e.exports=this.wp.viewport}()},82:function(e,t){!function(){e.exports=this.wp.a11y}()},839:function(e,t,n){"use strict";n.r(t);var r=n(10),c=n.n(r),o=n(0),u=n(1),i=n(14),a=n(58),l=n(63),s=Object(o.createElement)(l.a,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M19 15v4H5v-4h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM19 5v4H5V5h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5z"})),b=n(7),d=n.n(b),p=n(11),f=n.n(p),g=n(24),O=n(4),m=n(160),h=n(50),j=n(6),v=n(5),w=n(3),y=n(145),_=n(176),k=n(8),E=n.n(k),S=n(82),P=n(165),x=n(197),C=n(789),R=n(57),N=n(64),D=n.n(N),T=(n(2),n(794),function(e){var t=e.className,n=e.onChange,r=void 0===n?function(){}:n,c=e.options,i=void 0===c?[]:c,a=e.checked,l=void 0===a?[]:a,s=e.isLoading,b=void 0!==s&&s,p=e.isDisabled,g=void 0!==p&&p,O=e.limit,m=void 0===O?10:O,h=Object(o.useState)(!1),j=f()(h,2),v=j[0],w=j[1],y=Object(o.useMemo)((function(){return D()(Array(5)).map((function(e,t){return Object(o.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})}))}),[]),_=Object(o.useMemo)((function(){var e=i.length-m;return!v&&Object(o.createElement)("li",{key:"show-more",className:"show-more"},Object(o.createElement)("button",{onClick:function(){w(!0)},"aria-expanded":!1,"aria-label":Object(u.sprintf)(Object(u._n)("Show %s more option","Show %s more options",e,'woocommerce'),e)},Object(u.sprintf)(Object(u._n)("Show %s more","Show %s more",e,'woocommerce'),e)))}),[i,m,v]),k=Object(o.useMemo)((function(){return v&&Object(o.createElement)("li",{key:"show-less",className:"show-less"},Object(o.createElement)("button",{onClick:function(){w(!1)},"aria-expanded":!0,"aria-label":Object(u.__)("Show less options",'woocommerce')},Object(u.__)("Show less",'woocommerce')))}),[v]),E=Object(o.useMemo)((function(){var e=i.length>m+5;return Object(o.createElement)(o.Fragment,null,i.map((function(t,n){return Object(o.createElement)(o.Fragment,{key:t.value},Object(o.createElement)("li",e&&!v&&n>=m&&{hidden:!0},Object(o.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:function(e){r(e.target.value)},checked:l.includes(t.value),disabled:g}),Object(o.createElement)("label",{htmlFor:t.value},t.label)),e&&n===m-1&&_)})),e&&k)}),[i,l,v,m,k,_,g]),S=d()("wc-block-checkbox-list",{"is-loading":b},t);return Object(o.createElement)("ul",{className:S},b?y:E)}),I=n(226),L=function(e){var t=e.checked,n=e.getInputProps,r=e.inputRef,c=e.isDisabled,u=e.onFocus,i=e.onRemoveItem,a=e.placeholder,l=e.tabIndex,s=e.value;return Object(o.createElement)("input",n({ref:r,className:"wc-block-dropdown-selector__input",disabled:c,onFocus:u,onKeyDown:function(e){"Backspace"===e.key&&!s&&t.length>0&&i(t[t.length-1])},placeholder:a,tabIndex:l}))},B=function(e){var t=e.children,n=e.onClick;return Object(o.createElement)("div",{className:"wc-block-dropdown-selector__input-wrapper",onClick:n},t)},A=function(e){var t=e.checked,n=e.getItemProps,r=e.getMenuProps,c=e.highlightedIndex,i=e.options;return Object(o.createElement)("ul",r({className:"wc-block-dropdown-selector__list"}),i.map((function(e,r){var i=t.includes(e.value);return Object(o.createElement)("li",n({key:e.value,className:d()("wc-block-dropdown-selector__list-item",{"is-selected":i,"is-highlighted":c===r}),index:r,item:e.value,"aria-label":i?Object(u.sprintf)(Object(u.__)("Remove %s filter",'woocommerce'),e.name):null}),e.label)})))},M=function(e){var t=e.onRemoveItem,n=e.option;return Object(o.createElement)("button",{className:"wc-block-dropdown-selector__selected-chip",onClick:function(){t(n.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||t(n.value)},"aria-label":Object(u.sprintf)(Object(u.__)("Remove %s filter",'woocommerce'),n.name)},Object(o.createElement)("span",{className:"wc-block-dropdown-selector__selected-chip__label"},n.label),Object(o.createElement)("span",{className:"wc-block-dropdown-selector__selected-chip__remove"},"𝘅"))},V=function(e){var t=e.onClick,n=e.onRemoveItem,r=e.option,c=Object(o.useRef)(null);return Object(o.useEffect)((function(){c.current.focus()}),[c]),Object(o.createElement)("div",{className:"wc-block-dropdown-selector__selected-value"},Object(o.createElement)("button",{ref:c,className:"wc-block-dropdown-selector__selected-value__label",onClick:function(e){e.stopPropagation(),t(r.value)},"aria-label":Object(u.sprintf)(Object(u.__)("Replace current %s filter",'woocommerce'),r.name)},r.label),Object(o.createElement)("button",{className:"wc-block-dropdown-selector__selected-value__remove",onClick:function(){n(r.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||n(r.value)},"aria-label":Object(u.sprintf)(Object(u.__)("Remove %s filter",'woocommerce'),r.name)},"𝘅"))};n(793);function F(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 H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){E()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var z=function(e){var t=e.attributeLabel,n=void 0===t?"":t,r=e.className,c=e.checked,i=void 0===c?[]:c,a=e.inputLabel,l=void 0===a?"":a,s=e.isDisabled,b=void 0!==s&&s,p=e.isLoading,f=void 0!==p&&p,g=e.multiple,O=void 0!==g&&g,m=e.onChange,h=void 0===m?function(){}:m,j=e.options,v=void 0===j?[]:j,w=Object(o.useRef)(null),y=d()(r,"wc-block-dropdown-selector",{"is-disabled":b,"is-loading":f}),_=Object(o.useCallback)((function(e,t){switch(t.type){case I.a.stateChangeTypes.keyDownEnter:case I.a.stateChangeTypes.clickItem:return H(H({},t),{},{highlightedIndex:e.highlightedIndex,isOpen:O,inputValue:""});case I.a.stateChangeTypes.blurInput:case I.a.stateChangeTypes.mouseUp:return H(H({},t),{},{inputValue:e.inputValue});default:return t}}),[O]);return Object(o.createElement)(I.a,{onChange:h,selectedItem:null,stateReducer:_},(function(e){var t=e.getInputProps,r=e.getItemProps,c=e.getLabelProps,a=e.getMenuProps,s=e.highlightedIndex,p=e.inputValue,f=e.isOpen,g=e.openMenu;return Object(o.createElement)("div",{className:d()(y,{"is-multiple":O,"is-single":!O})},Object(o.createElement)("label",c({className:"screen-reader-text"}),l),Object(o.createElement)(B,{isOpen:f,onClick:function(){return w.current.focus()}},i.map((function(e){var t=v.find((function(t){return t.value===e})),n=function(e){h(e),w.current.focus()};return O?Object(o.createElement)(M,{key:e,onRemoveItem:n,option:t}):Object(o.createElement)(V,{key:e,onClick:function(){return w.current.focus()},onRemoveItem:n,option:t})})),Object(o.createElement)(L,{checked:i,getInputProps:t,inputRef:w,isDisabled:b,onFocus:g,onRemoveItem:function(e){h(e),w.current.focus()},placeholder:i.length>0&&O?null:Object(u.sprintf)(Object(u.__)("Any %s",'woocommerce'),n),tabIndex:!O&&i.length>0?"-1":"0",value:p})),f&&!b&&Object(o.createElement)(A,{checked:i,getItemProps:r,getMenuProps:a,highlightedIndex:s,options:v.filter((function(e){return!p||e.value.startsWith(p)}))}))}))},q=n(251),Y=n(48),K=n.n(Y),Q=n(33),U=n(252),G=n(253),W=n(44),J=function(e){var t=e.name,n=e.count;return Object(o.createElement)(o.Fragment,null,t,Number.isFinite(n)&&Object(o.createElement)(W.a,{label:n,screenReaderLabel:Object(u.sprintf)(Object(u._n)("%s product","%s products",n,'woocommerce'),n),wrapperElement:"span",wrapperProps:{className:"wc-block-attribute-filter-list-count"}}))},X=[{value:"preview-1",name:"Blue",label:Object(o.createElement)(J,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:Object(o.createElement)(J,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:Object(o.createElement)(J,{name:"Red",count:2})}],Z={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(792);function $(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 ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){E()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var te=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=t.isPreview&&!t.attributeId?Z:Object(U.a)(t.attributeId),i=Object(o.useState)([]),a=f()(i,2),l=a[0],s=a[1],b=Object(o.useState)(t.isPreview&&!t.attributeId?X:[]),d=f()(b,2),p=d[0],g=d[1],O=Object(P.a)(),m=f()(O,1)[0],h=Object(P.b)("attributes",[]),j=f()(h,2),v=j[0],w=j[1],y=Object(x.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[c.id],shouldSelect:t.attributeId>0}),_=y.results,k=y.isLoading,E="dropdown"!==t.displayStyle&&"and"===t.queryType,N=Object(C.a)({queryAttribute:{taxonomy:c.taxonomy,queryType:t.queryType},queryState:ee(ee({},m),{},{attributes:E?m.attributes:null})}),D=N.results,I=N.isLoading,L=Object(o.useCallback)((function(e){return D.attribute_counts?D.attribute_counts.find((function(t){return t.term===e})):null}),[D]);Object(o.useEffect)((function(){if(!k&&!I){var e=_.map((function(e){var n,r=L(e.id);if(!(r||l.includes(e.slug)||(n=e.slug,m&&m.attributes&&m.attributes.some((function(e){var t=e.attribute,r=e.slug,o=void 0===r?[]:r;return t===c.taxonomy&&o.includes(n)})))))return null;var u=r?r.count:0;return{value:e.slug,name:Object(Q.decodeEntities)(e.name),label:Object(o.createElement)(J,{name:Object(Q.decodeEntities)(e.name),count:t.showCounts?u:null})}})).filter(Boolean);g(e)}}),[c.taxonomy,_,k,t.showCounts,I,L,l,m.attributes]),Object(o.useEffect)((function(){t.showFilterButton||V()}),[l,V]);var B=Object(o.useMemo)((function(){return v.filter((function(e){return e.attribute===c.taxonomy})).flatMap((function(e){return e.slug}))}),[v,c.taxonomy]),A=Object(R.a)(B);Object(o.useEffect)((function(){K()(l,B)||s(B)}),[A]);var M=Object(o.useCallback)((function(e){return _.reduce((function(t,n){return e.includes(n.slug)&&t.push(n),t}),[])}),[_]),V=function(){r||Object(G.b)(v,w,c,M(l),"or"===t.queryType?"in":"and")},F="dropdown"!==t.displayStyle||"or"===t.queryType,H=Object(o.useCallback)((function(e){var t,n=function(e){return p.find((function(t){return t.value===e})).name},r=function(e){var t=e.filterAdded,r=e.filterRemoved,c=t?n(t):null,o=r?n(r):null;c&&o?Object(S.speak)(Object(u.sprintf)(Object(u.__)("%s filter replaced with %s.",'woocommerce'),c,o)):c?Object(S.speak)(Object(u.sprintf)(Object(u.__)("%s filter added.",'woocommerce'),c)):o&&Object(S.speak)(Object(u.sprintf)(Object(u.__)("%s filter removed.",'woocommerce'),o))},c=l.includes(e);F?(t=l.filter((function(t){return t!==e})),c?r({filterRemoved:e}):(t.push(e),t.sort(),r({filterAdded:e}))):(t=c?[]:[e],r({filterAdded:c?null:e,filterRemoved:1===l.length?l[0]:null}));s(t)}),[l,p,F]);if(0===p.length&&!k)return null;var Y="h".concat(t.headingLevel),W=!t.isPreview&&k,$=!t.isPreview&&I;return Object(o.createElement)(o.Fragment,null,!r&&t.heading&&Object(o.createElement)(Y,null,t.heading),Object(o.createElement)("div",{className:"wc-block-attribute-filter"},"dropdown"===t.displayStyle?Object(o.createElement)(z,{attributeLabel:c.label,checked:l,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:W,multiple:F,onChange:H,options:p}):Object(o.createElement)(T,{className:"wc-block-attribute-filter-list",options:p,checked:l,onChange:H,isLoading:W,isDisabled:$}),t.showFilterButton&&Object(o.createElement)(q.a,{className:"wc-block-attribute-filter__button",disabled:W||$,onClick:V})))},ne=(n(791),n(70)),re=Object(O.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=e.debouncedSpeak,c=t.attributeId,i=t.className,l=t.displayStyle,b=t.heading,d=t.headingLevel,p=t.isPreview,k=t.queryType,E=t.showCounts,S=t.showFilterButton,P=Object(o.useState)(!c&&!p),x=f()(P,2),C=x[0],R=x[1],N=Object(o.useCallback)((function(){R(!1),r(Object(u.__)("Showing Filter Products by Attribute block preview.",'woocommerce'))}),[]),D=Object(o.useCallback)((function(e){if(e&&e.length){var t=e[0].id,r=Object(j.find)(v.c,["attribute_id",t.toString()]);if(r&&c!==t){var o=r.attribute_label;n({attributeId:t,heading:Object(u.sprintf)(Object(u.__)("Filter by %s",'woocommerce'),o)})}}}),[c]),T=function(){var e={clear:Object(u.__)("Clear selected attribute",'woocommerce'),list:Object(u.__)("Product Attributes",'woocommerce'),noItems:Object(u.__)("Your store doesn't have any product attributes.",'woocommerce'),search:Object(u.__)("Search for a product attribute:",'woocommerce'),selected:function(e){return Object(u.sprintf)(Object(u._n)("%d attribute selected","%d attributes selected",e,'woocommerce'),e)},updated:Object(u.__)("Product attribute search results updated.",'woocommerce')},t=Object(j.sortBy)(Object(j.toArray)(Object(j.mapValues)(v.c,(function(e){return{id:parseInt(e.attribute_id,10),name:e.attribute_label}}))),"name");return Object(o.createElement)(h.a,{className:"woocommerce-product-attributes",list:t,selected:t.filter((function(e){return e.id===c})),onChange:D,messages:e,isSingle:!0})};return 0===Object.keys(v.c).length?Object(o.createElement)(O.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(a.a,{srcElement:s}),label:Object(u.__)("Filter Products by Attribute",'woocommerce'),instructions:Object(u.__)("Display a list of filters based on a chosen attribute.",'woocommerce')},Object(o.createElement)("p",null,Object(u.__)("Attributes are needed for filtering your products. You haven't created any attributes yet.",'woocommerce')),Object(o.createElement)(O.Button,{className:"wc-block-attribute-filter__add-attribute-button",isDefault:!0,isLarge:!0,href:Object(w.getAdminLink)("edit.php?post_type=product&page=product_attributes")},Object(u.__)("Add new attribute",'woocommerce')+" ",Object(o.createElement)(a.a,{srcElement:m.a})),Object(o.createElement)(O.Button,{className:"wc-block-attribute-filter__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-product-taxonomies/"},Object(u.__)("Learn more",'woocommerce'))):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(g.BlockControls,null,Object(o.createElement)(O.Toolbar,{controls:[{icon:"edit",title:Object(u.__)("Edit",'woocommerce'),onClick:function(){return R(!C)},isActive:C}]})),Object(o.createElement)(g.InspectorControls,{key:"inspector"},Object(o.createElement)(O.PanelBody,{title:Object(u.__)("Content",'woocommerce')},Object(o.createElement)(O.ToggleControl,{label:Object(u.__)("Product count",'woocommerce'),help:E?Object(u.__)("Product count is visible.",'woocommerce'):Object(u.__)("Product count is hidden.",'woocommerce'),checked:E,onChange:function(){return n({showCounts:!E})}}),Object(o.createElement)("p",null,Object(u.__)("Heading Level",'woocommerce')),Object(o.createElement)(y.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:d,onChange:function(e){return n({headingLevel:e})}})),Object(o.createElement)(O.PanelBody,{title:Object(u.__)("Block Settings",'woocommerce')},Object(o.createElement)(ne.a,{label:Object(u.__)("Query Type",'woocommerce'),help:"and"===k?Object(u.__)("Products that have all of the selected attributes will be shown.",'woocommerce'):Object(u.__)("Products that have any of the selected attributes will be shown.",'woocommerce'),value:k,options:[{label:Object(u.__)("And",'woocommerce'),value:"and"},{label:Object(u.__)("Or",'woocommerce'),value:"or"}],onChange:function(e){return n({queryType:e})}}),Object(o.createElement)(ne.a,{label:Object(u.__)("Display Style",'woocommerce'),value:l,options:[{label:Object(u.__)("List",'woocommerce'),value:"list"},{label:Object(u.__)("Dropdown",'woocommerce'),value:"dropdown"}],onChange:function(e){return n({displayStyle:e})}}),Object(o.createElement)(O.ToggleControl,{label:Object(u.__)("Filter button",'woocommerce'),help:S?Object(u.__)("Products will only update when the button is pressed.",'woocommerce'):Object(u.__)("Products will update as options are selected.",'woocommerce'),checked:S,onChange:function(e){return n({showFilterButton:e})}})),Object(o.createElement)(O.PanelBody,{title:Object(u.__)("Filter Products by Attribute",'woocommerce'),initialOpen:!1},T())),C?Object(o.createElement)(O.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(a.a,{srcElement:s}),label:Object(u.__)("Filter Products by Attribute",'woocommerce'),instructions:Object(u.__)("Display a list of filters based on a chosen attribute.",'woocommerce')},Object(o.createElement)("div",{className:"wc-block-attribute-filter__selection"},T(),Object(o.createElement)(O.Button,{isPrimary:!0,onClick:N},Object(u.__)("Done",'woocommerce')))):Object(o.createElement)("div",{className:i},Object(o.createElement)(_.a,{headingLevel:d,heading:b,onChange:function(e){return n({heading:e})}}),Object(o.createElement)(O.Disabled,null,Object(o.createElement)(te,{attributes:t,isEditor:!0}))))}));Object(i.registerBlockType)("woocommerce/attribute-filter",{title:Object(u.__)("Filter Products by Attribute",'woocommerce'),icon:{src:Object(o.createElement)(a.a,{srcElement:s}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(u.__)("WooCommerce",'woocommerce')],description:Object(u.__)("Allow customers to filter the grid by product attribute, such as color. Works in combination with the All Products block.",'woocommerce'),supports:{html:!1},example:{attributes:{isPreview:!0}},attributes:{attributeId:{type:"number",default:0},showCounts:{type:"boolean",default:!0},queryType:{type:"string",default:"or"},heading:{type:"string",default:Object(u.__)("Filter by attribute",'woocommerce')},headingLevel:{type:"number",default:3},displayStyle:{type:"string",default:"list"},showFilterButton:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:re,save:function(e){var t=e.attributes,n=t.className,r=t.showCounts,u=t.queryType,i=t.attributeId,a=t.heading,l=t.headingLevel,s=t.displayStyle,b=t.showFilterButton,p={"data-attribute-id":i,"data-show-counts":r,"data-query-type":u,"data-heading":a,"data-heading-level":l};return"list"!==s&&(p["data-display-style"]=s),b&&(p["data-show-filter-button"]=b),Object(o.createElement)("div",c()({className:d()("is-loading",n)},p),Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-attribute-filter__placeholder"}))}})},89:function(e,t){!function(){e.exports=this.wp.hooks}()},9:function(e,t){!function(){e.exports=this.React}()},94:function(e,t){!function(){e.exports=this.wp.date}()},96:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=Object(r.createContext)("page"),o=function(){return Object(r.useContext)(c)};c.Provider}});
  