PATH:
home
/
letacommog
/
ldqm1
/
wp-content
/
plugins
/
woocommerce
/
packages
/
woocommerce-blocks
/
build
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["attribute-filter"]=function(e){function t(t){for(var r,i,u=t[0],a=t[1],l=t[2],b=0,d=[];b<u.length;b++)i=u[b],Object.prototype.hasOwnProperty.call(c,i)&&c[i]&&d.push(c[i][0]),c[i]=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,u=1;u<n.length;u++){var a=n[u];0!==c[a]&&(r=!1)}r&&(o.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},c={18:0},o=[];function i(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,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var u=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=u.push.bind(u);u.push=t,u=u.slice();for(var l=0;l<u.length;l++)t(u[l]);var s=a;return o.push([853,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},102: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},108:function(e,t){},109:function(e,t){},110:function(e,t){},111: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){},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},14:function(e,t){!function(){e.exports=this.wp.blockEditor}()},152:function(e,t,n){"use strict";var r=n(21),c=n.n(r),o=n(24),i=n.n(o),u=n(22),a=n.n(u),l=n(23),s=n.n(l),b=n(12),d=n.n(b),p=n(0),f=n(6),g=n(1),m=n(4);function O(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)(m.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)(m.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 i()(n,[{key:"createLevelControl",value:function(e,t,n){var r=e===t;return{icon:Object(p.createElement)(O,{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,i=t.selectedLevel,u=t.onChange;return Object(p.createElement)(m.Toolbar,{isCollapsed:r,icon:Object(p.createElement)(O,{level:i}),controls:Object(f.range)(c,o).map((function(t){return e.createLevelControl(t,i,u)}))})}}]),n}(p.Component);t.a=j},155:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(11),c=n.n(r),o=n(0),i=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return function(e){return t((function(){throw e}))}}},167:function(e,t,n){"use strict";var r=n(0),c=n(58),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},17:function(e,t){!function(){e.exports=this.wp.blocks}()},171: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(41),i=n(36),u=n(0),a=n(102),l=n(6),s=n(60),b=function(e){var t=Object(a.a)();e=e||t;var n=Object(i.useSelect)((function(t){return t(o.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(i.useDispatch)(o.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(u.useCallback)((function(t){r(e,t)}),[e])]},d=function(e,t,n){var r=Object(a.a)();n=n||r;var c=Object(i.useSelect)((function(r){return r(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),l=Object(i.useDispatch)(o.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(u.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),i=o[0],d=o[1],p=Object(s.a)(e),f=Object(u.useRef)(!1);return Object(u.useEffect)((function(){d(Object(l.assign)({},i,p)),f.current=!0}),[p]),f.current?[i,d]:[e,d]}},18:function(e,t){!function(){e.exports=this.wp.url}()},185:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(14)),o=n(7),i=n.n(o);n(260);t.a=function(e){var t=e.className,n=e.headingLevel,o=e.onChange,u=e.heading,a="h".concat(n);return Object(r.createElement)(a,null,Object(r.createElement)(c.PlainText,{className:i()("wc-block-editor-components-title",t),value:u,onChange:o}))}},202:function(e,t){},206:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(41),c=n(36),o=n(0),i=n(155),u=n(60),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(u.a)(b),m=Object(u.a)(l),O=Object(i.a)(),h=Object(c.useSelect)((function(e){if(!p)return null;var c=e(r.COLLECTIONS_STORE_KEY),o=[t,n,g,m],i=c.getCollectionError.apply(c,o);return i&&O(i),{results:c.getCollection.apply(c,o),isLoading:!c.hasFinishedResolution("getCollection",o)}}),[t,n,m,g,p]);return null!==h&&(f.current=h),f.current}},25:function(e,t){!function(){e.exports=this.wp.compose}()},260:function(e,t){},269:function(e,t,n){"use strict";var r=n(0),c=n(1),o=(n(2),n(7)),i=n.n(o),u=n(48),a=(n(362),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:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:l},Object(r.createElement)(u.a,{label:a,screenReaderLabel:b}))});a.defaultProps={disabled:!1},t.a=a},270:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));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}))},i=function(e){if(e)return c.find((function(t){return t.taxonomy===e}))}},271: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})),i=o.length?o[0]:null;if(i&&i.slug&&Array.isArray(i.slug)&&i.slug.includes(c)){var u=i.slug.filter((function(e){return e!==c})),a=e.filter((function(e){return e.attribute!==n.taxonomy}));u.length>0&&(i.slug=u.sort(),a.push(i)),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",i=e.filter((function(e){return e.attribute!==n.taxonomy}));0===c.length?t(i):(i.push({attribute:n.taxonomy,operator:o,slug:Object(r.map)(c,"slug").sort()}),t(Object(r.sortBy)(i,"attribute")))}},276:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),i=n.n(o),u=n(0),a=(n(2),n(7)),l=n.n(a),s=n(1),b=n(61),d=n(283),p=(n(202),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,o=e.element,a=void 0===o?"li":o,s=e.className,b=void 0===s?"":s,d=e.radius,p=void 0===d?"small":d,f=e.children,g=void 0===f?null:f,m=i()(e,["text","screenReaderText","element","className","radius","children"]),O=a,h=l()(b,"wc-block-components-chip","wc-block-components-chip--radius-"+p),j=Boolean(r&&r!==t);return Object(u.createElement)(O,c()({className:h},m),Object(u.createElement)("span",{"aria-hidden":j,className:"wc-block-components-chip__text"},t),j&&Object(u.createElement)("span",{className:"screen-reader-text"},r),g)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,o=void 0===r?"":r,a=e.disabled,f=void 0!==a&&a,g=e.onRemove,m=void 0===g?function(){}:g,O=e.removeOnAnyClick,h=void 0!==O&&O,j=e.text,v=e.screenReaderText,w=void 0===v?"":v,y=i()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),_=h?"span":"button";if(!n){var k=w&&"string"==typeof w?w:j;n="string"!=typeof k?Object(s.__)("Remove",'woocommerce'):Object(s.sprintf)(Object(s.__)('Remove "%s"','woocommerce'),k)}var E={"aria-label":n,disabled:f,onClick:m,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||m()}},S=h?E:{},x=h?{"aria-hidden":!0}:E;return Object(u.createElement)(p,c()({},y,S,{className:l()(o,"is-removable"),element:h?"button":y.element,screenReaderText:w,text:j}),Object(u.createElement)(_,c()({className:"wc-block-components-chip__remove"},x),Object(u.createElement)(b.a,{className:"wc-block-components-chip__remove-icon",srcElement:d.a,size:16})))}},283:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),i=n.n(o),u=n(0),a=n(58),l=Object(u.createElement)((function(e){var t=e.className,n=e.size,r=i()(e,["className","size"]);return Object(u.createElement)(a.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(u.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=l},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},33:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},35:function(e,t){!function(){e.exports=this.moment}()},36:function(e,t){!function(){e.exports=this.wp.data}()},362:function(e,t){},4:function(e,t){!function(){e.exports=this.wp.components}()},41:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},46:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},48:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(0),i=(n(2),n(9)),u=n(7),a=n.n(u);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}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,u=e.wrapperProps,l=void 0===u?{}:u,b=null!=n,d=null!=r;return!b&&d?(t=c||"span",l=s(s({},l),{},{className:a()(l.className,"screen-reader-text")}),Object(o.createElement)(t,l,r)):(t=c||i.Fragment,b&&d&&n!==r?Object(o.createElement)(t,l,Object(o.createElement)("span",{"aria-hidden":"true"},n),Object(o.createElement)("span",{className:"screen-reader-text"},r)):Object(o.createElement)(t,l,n))}},5:function(e,t,n){"use strict";n.d(t,"l",(function(){return c})),n.d(t,"K",(function(){return o})),n.d(t,"Q",(function(){return i})),n.d(t,"A",(function(){return u})),n.d(t,"C",(function(){return a})),n.d(t,"m",(function(){return l})),n.d(t,"B",(function(){return s})),n.d(t,"E",(function(){return b})),n.d(t,"o",(function(){return d})),n.d(t,"D",(function(){return p})),n.d(t,"n",(function(){return f})),n.d(t,"G",(function(){return g})),n.d(t,"v",(function(){return m})),n.d(t,"y",(function(){return O})),n.d(t,"s",(function(){return h})),n.d(t,"t",(function(){return j})),n.d(t,"u",(function(){return v})),n.d(t,"k",(function(){return w})),n.d(t,"M",(function(){return y})),n.d(t,"R",(function(){return _})),n.d(t,"q",(function(){return k})),n.d(t,"r",(function(){return E})),n.d(t,"p",(function(){return S})),n.d(t,"J",(function(){return x})),n.d(t,"c",(function(){return P})),n.d(t,"w",(function(){return C})),n.d(t,"x",(function(){return R})),n.d(t,"U",(function(){return T})),n.d(t,"V",(function(){return L})),n.d(t,"L",(function(){return D})),n.d(t,"a",(function(){return I})),n.d(t,"O",(function(){return B})),n.d(t,"b",(function(){return A})),n.d(t,"N",(function(){return M})),n.d(t,"F",(function(){return V})),n.d(t,"i",(function(){return F})),n.d(t,"P",(function(){return q})),n.d(t,"h",(function(){return U})),n.d(t,"j",(function(){return Y})),n.d(t,"I",(function(){return K})),n.d(t,"H",(function(){return Q})),n.d(t,"T",(function(){return G})),n.d(t,"S",(function(){return W})),n.d(t,"d",(function(){return J})),n.d(t,"e",(function(){return $})),n.d(t,"f",(function(){return X})),n.d(t,"g",(function(){return Z})),n.d(t,"z",(function(){return ee})),n.d(t,"Y",(function(){return ne})),n.d(t,"Z",(function(){return re})),n.d(t,"W",(function(){return ce})),n.d(t,"X",(function(){return oe}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),o=Object(r.getSetting)("reviewRatingsEnabled",!0),i=Object(r.getSetting)("showAvatars",!0),u=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",""),m=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),O=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)("hasDarkEditorStyleSupport",!1),S=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),x=Object(r.getSetting)("productCount",0),P=Object(r.getSetting)("attributes",[]),C=Object(r.getSetting)("isShippingCalculatorEnabled",!0),R=Object(r.getSetting)("isShippingCostHidden",!1),N=Object(r.getSetting)("woocommerceBlocksPhase",1),T=Object(r.getSetting)("wcBlocksAssetUrl",""),L=Object(r.getSetting)("wcBlocksBuildUrl",""),D=Object(r.getSetting)("shippingCountries",{}),I=Object(r.getSetting)("allowedCountries",{}),B=Object(r.getSetting)("shippingStates",{}),A=Object(r.getSetting)("allowedStates",{}),M=Object(r.getSetting)("shippingMethodsExist",!1),V=Object(r.getSetting)("paymentGatewaySortOrder",[]),F=Object(r.getSetting)("checkoutShowLoginReminder",!0),H={id:0,title:"",permalink:""},z=Object(r.getSetting)("storePages",{shop:H,cart:H,checkout:H,privacy:H,terms:H}),q=z.shop.permalink,U=z.checkout.id,Y=z.checkout.permalink,K=z.privacy.permalink,Q=z.privacy.title,G=z.terms.permalink,W=z.terms.title,J=z.cart.id,$=z.cart.permalink,X=Object(r.getSetting)("checkoutAllowsGuest",!1),Z=Object(r.getSetting)("checkoutAllowsSignup",!1),ee=Object(r.getSetting)("loginUrl","/wp-login.php"),te=n(17),ne=function(e,t){if(N>2)return Object(te.registerBlockType)(e,t)},re=function(e,t){if(N>1)return Object(te.registerBlockType)(e,t)},ce=function(){return N>2},oe=function(){return N>1}},54:function(e,t){!function(){e.exports=this.wp.keycodes}()},6:function(e,t){!function(){e.exports=this.lodash}()},60:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),c=n(46),o=n.n(c),i=function(e){var t=Object(r.useRef)();return o()(e,t.current)||(t.current=e),t.current}},61:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(27),i=n.n(o),u=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=i()(e,["srcElement","size"]);return Object(u.isValidElement)(t)&&Object(u.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))}},74:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(21),i=n.n(o),u=n(24),a=n.n(u),l=n(19),s=n.n(l),b=n(22),d=n.n(b),p=n(23),f=n.n(p),g=n(12),m=n.n(g),O=n(0),h=n(6),j=n(7),v=n.n(j),w=n(4),y=n(25);n(122);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=m()(e);if(t){var c=m()(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 i()(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,i=n.instanceId,u=n.className,a=n.help,l=n.options,s=n.value,b="inspector-toggle-button-control-".concat(i);return a&&(e=Object(h.isFunction)(a)?a(o):a),Object(O.createElement)(w.BaseControl,{id:b,help:e,className:v()("components-toggle-button-control",u)},Object(O.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},r),Object(O.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(O.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}(O.Component);t.a=Object(y.withInstanceId)(k)},75:function(e,t){!function(){e.exports=this.wp.hooks}()},77:function(e,t){!function(){e.exports=this.ReactDOM}()},78:function(e,t){!function(){e.exports=this.wp.dom}()},83:function(e,t){!function(){e.exports=this.wp.viewport}()},851:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(8),c=n.n(r),o=n(51),i=n.n(o),u=n(56),a=n.n(u),l=n(11),s=n.n(l),b=n(0),d=n(171),p=n(206),f=n(102),g=n(550),m=n(6),O=n(60);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),u=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(O.a)(t||{}),x=Object(O.a)(n);Object(b.useEffect)((function(){"object"===a()(S)&&Object.keys(S).length&&(v.find((function(e){return e.taxonomy===S.taxonomy}))||w([].concat(i()(v),[S])))}),[S,v,w]),Object(b.useEffect)((function(){k!==x&&void 0!==x&&E(x)}),[x,E,k]);var P=Object(b.useState)(!1),C=s()(P,2),R=C[0],N=C[1],T=Object(g.a)(R,200),L=s()(T,1)[0];R||N(!0);var D=Object(b.useMemo)((function(){return function(e){var t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(m.sortBy)(e.calculate_attribute_counts.map((function(e){return{taxonomy:e.taxonomy,query_type:e.queryType}})),["taxonomy","query_type"])),t}(u)}),[u]);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},D),shouldSelect:L})}},853:function(e,t,n){e.exports=n(902)},854:function(e,t){},855:function(e,t){},856:function(e,t){},857:function(e,t){},87:function(e,t){!function(){e.exports=this.wp.a11y}()},9:function(e,t){!function(){e.exports=this.React}()},902:function(e,t,n){"use strict";n.r(t);var r=n(10),c=n.n(r),o=n(0),i=n(1),u=n(17),a=n(61),l=n(58),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(14),m=n(4),O=n(167),h=n(50),j=n(6),v=n(5),w=n(3),y=n(152),_=n(185),k=n(74),E=n(8),S=n.n(E),x=n(87),P=n(171),C=n(206),R=n(851),N=n(60),T=n(51),L=n.n(T),D=(n(2),n(857),function(e){var t=e.className,n=e.onChange,r=void 0===n?function(){}:n,c=e.options,u=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,m=e.limit,O=void 0===m?10:m,h=Object(o.useState)(!1),j=f()(h,2),v=j[0],w=j[1],y=Object(o.useMemo)((function(){return L()(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=u.length-O;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(i.sprintf)(Object(i._n)("Show %s more option","Show %s more options",e,'woocommerce'),e)},Object(i.sprintf)(Object(i._n)("Show %s more","Show %s more",e,'woocommerce'),e)))}),[u,O,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(i.__)("Show less options",'woocommerce')},Object(i.__)("Show less",'woocommerce')))}),[v]),E=Object(o.useMemo)((function(){var e=u.length>O+5;return Object(o.createElement)(o.Fragment,null,u.map((function(t,n){return Object(o.createElement)(o.Fragment,{key:t.value},Object(o.createElement)("li",e&&!v&&n>=O&&{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===O-1&&_)})),e&&k)}),[u,l,v,O,k,_,g]),S=d()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":b},t);return Object(o.createElement)("ul",{className:S},b?y:E)}),I=n(235),B=function(e){var t=e.checked,n=e.getInputProps,r=e.inputRef,c=e.isDisabled,i=e.onFocus,u=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 wc-block-components-dropdown-selector__input",disabled:c,onFocus:i,onKeyDown:function(e){"Backspace"===e.key&&!s&&t.length>0&&u(t[t.length-1])},placeholder:a,tabIndex:l}))},A=function(e){var t=e.children,n=e.onClick;return Object(o.createElement)("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:n},t)},M=function(e){var t=e.checked,n=e.getItemProps,r=e.getMenuProps,c=e.highlightedIndex,u=e.options;return Object(o.createElement)("ul",r({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),u.map((function(e,r){var u=t.includes(e.value);return Object(o.createElement)("li",n({key:e.value,className:d()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":u,"is-highlighted":c===r}),index:r,item:e.value,"aria-label":u?Object(i.sprintf)(Object(i.__)("Remove %s filter",'woocommerce'),e.name):null}),e.label)})))},V=n(276),F=function(e){var t=e.onRemoveItem,n=e.option;return Object(o.createElement)(V.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:function(){t(n.value)},ariaLabel:Object(i.sprintf)(Object(i.__)("Remove %s filter",'woocommerce'),n.name),text:n.label,radius:"large"})},H=n(283),z=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 wc-block-components-dropdown-selector__selected-value"},Object(o.createElement)("button",{ref:c,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:function(e){e.stopPropagation(),t(r.value)},"aria-label":Object(i.sprintf)(Object(i.__)("Replace current %s filter",'woocommerce'),r.name)},r.label),Object(o.createElement)("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-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(i.sprintf)(Object(i.__)("Remove %s filter",'woocommerce'),r.name)},Object(o.createElement)(a.a,{srcElement:H.a,size:16})))};n(856);function q(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 U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){S()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Y=function(e){var t=e.attributeLabel,n=void 0===t?"":t,r=e.className,c=e.checked,u=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,m=void 0!==g&&g,O=e.onChange,h=void 0===O?function(){}:O,j=e.options,v=void 0===j?[]:j,w=Object(o.useRef)(null),y=d()(r,"wc-block-dropdown-selector","wc-block-components-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 U(U({},t),{},{highlightedIndex:e.highlightedIndex,isOpen:m,inputValue:""});case I.a.stateChangeTypes.blurInput:case I.a.stateChangeTypes.mouseUp:return U(U({},t),{},{inputValue:e.inputValue});default:return t}}),[m]);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":m,"is-single":!m,"has-checked":u.length>0,"is-open":f})},Object(o.createElement)("label",c({className:"screen-reader-text"}),l),Object(o.createElement)(A,{isOpen:f,onClick:function(){return w.current.focus()}},u.map((function(e){var t=v.find((function(t){return t.value===e})),n=function(e){h(e),w.current.focus()};return m?Object(o.createElement)(F,{key:e,onRemoveItem:n,option:t}):Object(o.createElement)(z,{key:e,onClick:function(){return w.current.focus()},onRemoveItem:n,option:t})})),Object(o.createElement)(B,{checked:u,getInputProps:t,inputRef:w,isDisabled:b,onFocus:g,onRemoveItem:function(e){h(e),w.current.focus()},placeholder:u.length>0&&m?null:Object(i.sprintf)(Object(i.__)("Any %s",'woocommerce'),n),tabIndex:!m&&u.length>0?"-1":"0",value:p})),f&&!b&&Object(o.createElement)(M,{checked:u,getItemProps:r,getMenuProps:a,highlightedIndex:s,options:v.filter((function(e){return!p||e.value.startsWith(p)}))}))}))},K=n(269),Q=n(46),G=n.n(Q),W=n(33),J=n(270),$=n(271),X=n(48),Z=function(e){var t=e.name,n=e.count;return Object(o.createElement)(o.Fragment,null,t,Number.isFinite(n)&&Object(o.createElement)(X.a,{label:n,screenReaderLabel:Object(i.sprintf)(Object(i._n)("%s product","%s products",n,'woocommerce'),n),wrapperElement:"span",wrapperProps:{className:"wc-block-attribute-filter-list-count"}}))},ee=[{value:"preview-1",name:"Blue",label:Object(o.createElement)(Z,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:Object(o.createElement)(Z,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:Object(o.createElement)(Z,{name:"Red",count:2})}],te={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(855);function ne(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 re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){S()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ce=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=t.isPreview&&!t.attributeId?te:Object(J.a)(t.attributeId),u=Object(o.useState)([]),a=f()(u,2),l=a[0],s=a[1],b=Object(o.useState)(t.isPreview&&!t.attributeId?ee:[]),d=f()(b,2),p=d[0],g=d[1],m=Object(P.a)(),O=f()(m,1)[0],h=Object(P.b)("attributes",[]),j=f()(h,2),v=j[0],w=j[1],y=Object(C.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,S=Object(R.a)({queryAttribute:{taxonomy:c.taxonomy,queryType:t.queryType},queryState:re(re({},O),{},{attributes:E?O.attributes:null})}),T=S.results,L=S.isLoading,I=Object(o.useCallback)((function(e){return T.attribute_counts?T.attribute_counts.find((function(t){return t.term===e})):null}),[T]);Object(o.useEffect)((function(){if(!k&&!L){var e=_.map((function(e){var n,r=I(e.id);if(!(r||l.includes(e.slug)||(n=e.slug,O&&O.attributes&&O.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 i=r?r.count:0;return{value:e.slug,name:Object(W.decodeEntities)(e.name),label:Object(o.createElement)(Z,{name:Object(W.decodeEntities)(e.name),count:t.showCounts?i:null})}})).filter(Boolean);g(e)}}),[c.taxonomy,_,k,t.showCounts,L,I,l,O.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(N.a)(B);Object(o.useEffect)((function(){G()(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($.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(x.speak)(Object(i.sprintf)(Object(i.__)("%1$s filter replaced with %2$s.",'woocommerce'),c,o)):c?Object(x.speak)(Object(i.sprintf)(Object(i.__)("%s filter added.",'woocommerce'),c)):o&&Object(x.speak)(Object(i.sprintf)(Object(i.__)("%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 z="h".concat(t.headingLevel),q=!t.isPreview&&k,U=!t.isPreview&&L;return Object(o.createElement)(o.Fragment,null,!r&&t.heading&&Object(o.createElement)(z,null,t.heading),Object(o.createElement)("div",{className:"wc-block-attribute-filter"},"dropdown"===t.displayStyle?Object(o.createElement)(Y,{attributeLabel:c.label,checked:l,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:q,multiple:F,onChange:H,options:p}):Object(o.createElement)(D,{className:"wc-block-attribute-filter-list",options:p,checked:l,onChange:H,isLoading:q,isDisabled:U}),t.showFilterButton&&Object(o.createElement)(K.a,{className:"wc-block-attribute-filter__button",disabled:q||U,onClick:V})))},oe=(n(854),Object(m.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=e.debouncedSpeak,c=t.attributeId,u=t.className,l=t.displayStyle,b=t.heading,d=t.headingLevel,p=t.isPreview,E=t.queryType,S=t.showCounts,x=t.showFilterButton,P=Object(o.useState)(!c&&!p),C=f()(P,2),R=C[0],N=C[1],T=Object(o.useCallback)((function(){N(!1),r(Object(i.__)("Showing Filter Products by Attribute block preview.",'woocommerce'))}),[]),L=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(i.sprintf)(Object(i.__)("Filter by %s",'woocommerce'),o)})}}}),[c]),D=function(){var e={clear:Object(i.__)("Clear selected attribute",'woocommerce'),list:Object(i.__)("Product Attributes",'woocommerce'),noItems:Object(i.__)("Your store doesn't have any product attributes.",'woocommerce'),search:Object(i.__)("Search for a product attribute:",'woocommerce'),selected:function(e){return Object(i.sprintf)(Object(i._n)("%d attribute selected","%d attributes selected",e,'woocommerce'),e)},updated:Object(i.__)("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:L,messages:e,isSingle:!0})};return 0===Object.keys(v.c).length?Object(o.createElement)(m.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(a.a,{srcElement:s}),label:Object(i.__)("Filter Products by Attribute",'woocommerce'),instructions:Object(i.__)("Display a list of filters based on a chosen attribute.",'woocommerce')},Object(o.createElement)("p",null,Object(i.__)("Attributes are needed for filtering your products. You haven't created any attributes yet.",'woocommerce')),Object(o.createElement)(m.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(i.__)("Add new attribute",'woocommerce')+" ",Object(o.createElement)(a.a,{srcElement:O.a})),Object(o.createElement)(m.Button,{className:"wc-block-attribute-filter__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-product-taxonomies/"},Object(i.__)("Learn more",'woocommerce'))):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(g.BlockControls,null,Object(o.createElement)(m.Toolbar,{controls:[{icon:"edit",title:Object(i.__)("Edit",'woocommerce'),onClick:function(){return N(!R)},isActive:R}]})),Object(o.createElement)(g.InspectorControls,{key:"inspector"},Object(o.createElement)(m.PanelBody,{title:Object(i.__)("Content",'woocommerce')},Object(o.createElement)(m.ToggleControl,{label:Object(i.__)("Product count",'woocommerce'),help:S?Object(i.__)("Product count is visible.",'woocommerce'):Object(i.__)("Product count is hidden.",'woocommerce'),checked:S,onChange:function(){return n({showCounts:!S})}}),Object(o.createElement)("p",null,Object(i.__)("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)(m.PanelBody,{title:Object(i.__)("Block Settings",'woocommerce')},Object(o.createElement)(k.a,{label:Object(i.__)("Query Type",'woocommerce'),help:"and"===E?Object(i.__)("Products that have all of the selected attributes will be shown.",'woocommerce'):Object(i.__)("Products that have any of the selected attributes will be shown.",'woocommerce'),value:E,options:[{label:Object(i.__)("And",'woocommerce'),value:"and"},{label:Object(i.__)("Or",'woocommerce'),value:"or"}],onChange:function(e){return n({queryType:e})}}),Object(o.createElement)(k.a,{label:Object(i.__)("Display Style",'woocommerce'),value:l,options:[{label:Object(i.__)("List",'woocommerce'),value:"list"},{label:Object(i.__)("Dropdown",'woocommerce'),value:"dropdown"}],onChange:function(e){return n({displayStyle:e})}}),Object(o.createElement)(m.ToggleControl,{label:Object(i.__)("Filter button",'woocommerce'),help:x?Object(i.__)("Products will only update when the button is pressed.",'woocommerce'):Object(i.__)("Products will update as options are selected.",'woocommerce'),checked:x,onChange:function(e){return n({showFilterButton:e})}})),Object(o.createElement)(m.PanelBody,{title:Object(i.__)("Filter Products by Attribute",'woocommerce'),initialOpen:!1},D())),R?Object(o.createElement)(m.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(a.a,{srcElement:s}),label:Object(i.__)("Filter Products by Attribute",'woocommerce'),instructions:Object(i.__)("Display a list of filters based on a chosen attribute.",'woocommerce')},Object(o.createElement)("div",{className:"wc-block-attribute-filter__selection"},D(),Object(o.createElement)(m.Button,{isPrimary:!0,onClick:T},Object(i.__)("Done",'woocommerce')))):Object(o.createElement)("div",{className:u},Object(o.createElement)(_.a,{headingLevel:d,heading:b,onChange:function(e){return n({heading:e})}}),Object(o.createElement)(m.Disabled,null,Object(o.createElement)(ce,{attributes:t,isEditor:!0}))))})));Object(u.registerBlockType)("woocommerce/attribute-filter",{title:Object(i.__)("Filter Products by Attribute",'woocommerce'),icon:{src:Object(o.createElement)(a.a,{srcElement:s}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce",'woocommerce')],description:Object(i.__)("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(i.__)("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:oe,save:function(e){var t=e.attributes,n=t.className,r=t.showCounts,i=t.queryType,u=t.attributeId,a=t.heading,l=t.headingLevel,s=t.displayStyle,b=t.showFilterButton,p={"data-attribute-id":u,"data-show-counts":r,"data-query-type":i,"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"}))}})},94:function(e,t){!function(){e.exports=this.wp.date}()}});
[+]
..
[-] featured-product.asset.php
[edit]
[-] reviews-by-product.asset.php
[edit]
[-] checkout.js
[edit]
[-] wc-payment-method-cheque.asset.php
[edit]
[-] single-product.asset.php
[edit]
[-] wc-shared-hocs.asset.php
[edit]
[-] products-by-attribute.js
[edit]
[-] wc-payment-method-stripe.js
[edit]
[-] reviews-by-category.js
[edit]
[-] vendors-style-rtl.css
[edit]
[-] checkout-frontend.asset.php
[edit]
[-] product-best-sellers.asset.php
[edit]
[-] price-filter.asset.php
[edit]
[-] reviews-frontend.js
[edit]
[-] wc-shared-context.js
[edit]
[-] wc-blocks-data.asset.php
[edit]
[-] cart.js
[edit]
[-] product-on-sale.js
[edit]
[-] all-products.js
[edit]
[-] attribute-filter-frontend.js
[edit]
[-] checkout.asset.php
[edit]
[-] style.css
[edit]
[-] product-tag.asset.php
[edit]
[-] wc-shared-context.asset.php
[edit]
[-] wc-blocks-middleware.js
[edit]
[-] cart.asset.php
[edit]
[-] products-by-attribute.asset.php
[edit]
[+]
atomic-block-components
[-] editor.css
[edit]
[+]
vendors~atomic-block-components
[-] price-filter-frontend.js
[edit]
[-] checkout-frontend.js
[edit]
[-] attribute-filter-frontend.asset.php
[edit]
[-] cart-frontend.js
[edit]
[-] wc-blocks-data.js
[edit]
[-] product-categories.js
[edit]
[-] wc-payment-method-paypal.asset.php
[edit]
[-] product-category.js
[edit]
[-] active-filters-frontend.js
[edit]
[-] product-new.asset.php
[edit]
[-] product-top-rated.asset.php
[edit]
[-] all-reviews.js
[edit]
[-] product-best-sellers.js
[edit]
[-] wc-blocks-registry.js
[edit]
[-] attribute-filter.asset.php
[edit]
[-] all-reviews.asset.php
[edit]
[-] reviews-frontend.asset.php
[edit]
[-] vendors.js
[edit]
[-] blocks.js
[edit]
[-] cart-frontend.asset.php
[edit]
[-] product-search.js
[edit]
[-] wc-payment-method-paypal.js
[edit]
[-] all-products-frontend.js
[edit]
[-] reviews-by-category.asset.php
[edit]
[-] featured-category.asset.php
[edit]
[-] featured-product.js
[edit]
[-] wc-payment-method-bacs.asset.php
[edit]
[-] active-filters.asset.php
[edit]
[-] featured-category.js
[edit]
[-] active-filters-frontend.asset.php
[edit]
[-] editor-rtl.css
[edit]
[-] wc-payment-method-cod.asset.php
[edit]
[-] single-product-frontend.asset.php
[edit]
[-] product-categories.asset.php
[edit]
[-] blocks.asset.php
[edit]
[-] all-products-frontend.asset.php
[edit]
[-] handpicked-products.asset.php
[edit]
[-] wc-blocks-middleware.asset.php
[edit]
[-] price-filter-frontend.asset.php
[edit]
[-] wc-blocks-registry.asset.php
[edit]
[-] product-search.asset.php
[edit]
[-] style-rtl.css
[edit]
[-] price-filter.js
[edit]
[-] active-filters.js
[edit]
[-] wc-payment-method-cheque.js
[edit]
[-] product-on-sale.asset.php
[edit]
[-] wc-payment-method-stripe.asset.php
[edit]
[-] all-products.asset.php
[edit]
[-] reviews-by-product.js
[edit]
[-] wc-settings.asset.php
[edit]
[-] product-tag.js
[edit]
[-] attribute-filter.js
[edit]
[-] product-category.asset.php
[edit]
[-] product-top-rated.js
[edit]
[-] single-product.js
[edit]
[-] handpicked-products.js
[edit]
[-] wc-payment-method-bacs.js
[edit]
[-] single-product-frontend.js
[edit]
[-] wc-payment-method-cod.js
[edit]
[-] wc-settings.js
[edit]
[-] vendors-style.css
[edit]
[-] product-new.js
[edit]
[-] wc-shared-hocs.js
[edit]