OwlCyberSecurity - MANAGER
Edit File: all-products.js
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-products"]=function(e){function t(t){for(var r,a,s=t[0],l=t[1],i=t[2],d=0,b=[];d<s.length;d++)a=s[d],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&b.push(o[a][0]),o[a]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(u&&u(t);b.length;)b.shift()();return n.push.apply(n,i||[]),c()}function c(){for(var e,t=0;t<n.length;t++){for(var c=n[t],r=!0,s=1;s<c.length;s++){var l=c[s];0!==o[l]&&(r=!1)}r&&(n.splice(t--,1),e=a(a.s=c[0]))}return e}var r={},o={5:0,1:0,2:0,3:0,8:0,9:0,11:0,12:0,13:0,14:0,15:0,16:0},n=[];function a(t){if(r[t])return r[t].exports;var c=r[t]={i:t,l:!1,exports:{}};return e[t].call(c.exports,c,c.exports,a),c.l=!0,c.exports}a.e=function(e){var t=[],c=o[e];if(0!==c)if(c)t.push(c[2]);else{var r=new Promise((function(t,r){c=o[e]=[t,r]}));t.push(c[2]=r);var n,s=document.createElement("script");s.charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.src=function(e){return a.p+""+({1:"atomic-block-components/add-to-cart--atomic-block-components/button--atomic-block-components/image---a7e2bb9b",2:"atomic-block-components/add-to-cart--atomic-block-components/button",3:"atomic-block-components/sale-badge",7:"atomic-block-components/add-to-cart",8:"atomic-block-components/button",9:"atomic-block-components/category-list",10:"atomic-block-components/image",11:"atomic-block-components/price",12:"atomic-block-components/rating",13:"atomic-block-components/sku",14:"atomic-block-components/stock-indicator",15:"atomic-block-components/summary",16:"atomic-block-components/tag-list",17:"atomic-block-components/title"}[e]||e)+".js?ver="+{1:"8e7f72ad74a970d045be",2:"7bf99e49a420eaae19bc",3:"1e8ef83cc8f9cf11930a",7:"bffb666ec86caa409288",8:"b3fc2cbb4f71da95ed55",9:"bb4a9315b8255156aa92",10:"cab119d54f90f1456438",11:"5c266369d5583591582a",12:"b6bcd0d478cdad5f8219",13:"4565df0d3a57b1c6e384",14:"a2a08a643c4e73034676",15:"0a827bfc775c099a9dbf",16:"5a78f0df5ea7029b3eef",17:"0ddca9eb4050a03fc3b3"}[e]}(e);var l=new Error;n=function(t){s.onerror=s.onload=null,clearTimeout(i);var c=o[e];if(0!==c){if(c){var r=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+r+": "+n+")",l.name="ChunkLoadError",l.type=r,l.request=n,c[1](l)}o[e]=void 0}};var i=setTimeout((function(){n({type:"timeout",target:s})}),12e4);s.onerror=s.onload=n,document.head.appendChild(s)}return Promise.all(t)},a.m=e,a.c=r,a.d=function(e,t,c){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(a.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(c,r,function(t){return e[t]}.bind(null,r));return c},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var i=0;i<s.length;i++)t(s[i]);var u=l;return n.push([774,0]),c()}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){e.exports=window.wp.data},102:function(e,t,c){"use strict";c.d(t,"a",(function(){return d})),c.d(t,"b",(function(){return b})),c.d(t,"c",(function(){return p}));var r=c(19),o=c(10),n=c(0),a=c(31),s=c.n(a),l=c(52),i=c(142),u=c(68);const d=e=>{const t=Object(u.a)();e=e||t;const c=Object(o.useSelect)(t=>t(r.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:a}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[c,Object(n.useCallback)(t=>{a(e,t)},[e,a])]},b=(e,t,c)=>{const a=Object(u.a)();c=c||a;const s=Object(o.useSelect)(o=>o(r.QUERY_STATE_STORE_KEY).getValueForQueryKey(c,e,t),[c,e]),{setQueryValue:l}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[s,Object(n.useCallback)(t=>{l(c,e,t)},[c,e,l])]},p=(e,t)=>{const c=Object(u.a)();t=t||c;const[r,o]=d(t),a=Object(l.a)(r),b=Object(l.a)(e),p=Object(i.a)(b),m=Object(n.useRef)(!1);return Object(n.useEffect)(()=>{s()(p,b)||(o(Object.assign({},a,b)),m.current=!0)},[a,b,p,o]),m.current?[r,o]:[e,o]}},103:function(e,t){e.exports=window.wp.autop},108:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=c(185),s=c(5),l=c.n(s),i=c(133);c(222),t.a=e=>{let{className:t,showSpinner:c=!1,children:r,...s}=e;const u=l()("wc-block-components-button",t,{"wc-block-components-button--loading":c});return Object(n.createElement)(a.a,o()({className:u},s),c&&Object(n.createElement)(i.a,null),Object(n.createElement)("span",{className:"wc-block-components-button__text"},r))}},11:function(e,t){e.exports=window.wp.apiFetch},110:function(e,t,c){"use strict";c.d(t,"c",(function(){return n})),c.d(t,"d",(function(){return a})),c.d(t,"a",(function(){return s})),c.d(t,"b",(function(){return l}));var r=c(14),o=c(32);const n=(e,t)=>{if(o.n>2)return Object(r.registerBlockType)(e,t)},a=(e,t)=>{if(o.n>1)return Object(r.registerBlockType)(e,t)},s=()=>o.n>2,l=()=>o.n>1},113:function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"c",(function(){return o})),c.d(t,"b",(function(){return n})),c.d(t,"d",(function(){return a}));const r=e=>"number"==typeof e,o=e=>"string"==typeof e,n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function a(e,t){return n(e)&&t in e}},115:function(e,t){},116:function(e,t){e.exports=window.wp.coreData},117:function(e,t){},12:function(e,t){e.exports=window.wp.compose},120:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=c(40),s=c(4),l=c(5),i=c.n(l);t.a=e=>{let{className:t,item:c,isSelected:r,isLoading:l,onSelect:u,disabled:d,...b}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.c,o()({},b,{key:c.id,className:t,isSelected:r,item:c,onSelect:u,isSingle:!0,disabled:d})),r&&l&&Object(n.createElement)("div",{key:"loading",className:i()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(n.createElement)(s.Spinner,null)))}},121:function(e,t,c){"use strict";var r=c(0),o=c(6),n=c(1),a=c(4);function s(e){let{level:t}=e;const c={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 c.hasOwnProperty(t)?Object(r.createElement)(a.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(a.Path,{d:c[t]})):null}class l extends r.Component{createLevelControl(e,t,c){const o=e===t;return{icon:Object(r.createElement)(s,{level:e}),title:Object(n.sprintf)( /* translators: %s: heading level e.g: "2", "3", "4" */ Object(n.__)("Heading %d",'woocommerce'),e),isActive:o,onClick:()=>c(e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:c,selectedLevel:n,onChange:l}=this.props;return Object(r.createElement)(a.ToolbarGroup,{isCollapsed:e,icon:Object(r.createElement)(s,{level:n}),controls:Object(o.range)(t,c).map(e=>this.createLevelControl(e,n,l))})}}t.a=l},125:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(55),a=c(161),s=c(3),l=c(9),i=c(36);t.a=e=>{const t=(Object(i.useProductDataContext)().product||{}).id||e.productId||0;return t?Object(r.createElement)(l.InspectorControls,null,Object(r.createElement)("div",{className:"wc-block-single-product__edit-card"},Object(r.createElement)("div",{className:"wc-block-single-product__edit-card-title"},Object(r.createElement)("a",{href:`${s.ADMIN_URL}post.php?post=${t}&action=edit`,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Edit this product's details",'woocommerce'),Object(r.createElement)(n.a,{srcElement:a.a,size:16}))),Object(r.createElement)("div",{className:"wc-block-single-product__edit-card-description"},Object(o.__)("Edit details such as title, price, description and more.",'woocommerce')))):null}},126:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0);const o=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},13:function(e,t){e.exports=window.wp.url},132:function(e,t,c){"use strict";var r=c(3),o=c(1),n=c(113);const a=Object(r.getSetting)("countryLocale",{}),s=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)( /* translators: %s Field label. */ Object(o.__)("%s (optional)",'woocommerce'),e.label)),e.priority&&(Object(n.a)(e.priority)&&(t.index=e.priority),Object(n.c)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(a).map(e=>{let[t,c]=e;return[t,Object.entries(c).map(e=>{let[t,c]=e;return[t,s(c)]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{})]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{});t.a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=c&&void 0!==l[c]?l[c]:{};return e.map(e=>({key:e,...r.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},133:function(e,t,c){"use strict";var r=c(0);c(223),t.a=()=>Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},134:function(e,t){e.exports=window.wp.wordcount},135:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=c(1),s=c(6),l=(c(2),c(40)),i=c(12),u=Object(i.createHigherOrderComponent)(e=>{class t extends n.Component{render(){const{selected:t}=this.props,c=null==t;return Object(n.createElement)(e,o()({},this.props,{selected:c?[]:[t]}))}}return t.defaultProps={selected:null},t},"withTransformSingleSelectToMultipleSelect"),d=c(273),b=c(16),p=c.n(b),m=c(31),g=c.n(m),O=c(34),h=c(35),j=Object(i.createHigherOrderComponent)(e=>{class t extends n.Component{constructor(){super(...arguments),p()(this,"state",{error:null,loading:!1,variations:{}}),p()(this,"loadVariations",()=>{const{products:e}=this.props,{loading:t,variations:c}=this.state;if(t)return;const r=this.getExpandedProduct();if(!r||c[r])return;const o=e.find(e=>e.id===r);o.variations&&0!==o.variations.length?(this.setState({loading:!0}),Object(O.g)(r).then(e=>{const t=e.map(e=>({...e,parent:r}));this.setState({variations:{...this.state.variations,[r]:t},loading:!1,error:null})}).catch(async e=>{const t=await Object(h.a)(e);this.setState({variations:{...this.state.variations,[r]:null},loading:!1,error:t})})):this.setState({variations:{...this.state.variations,[r]:null},loading:!1,error:null})})}componentDidMount(){const{selected:e,showVariations:t}=this.props;e&&t&&this.loadVariations()}componentDidUpdate(e){const{isLoading:t,selected:c,showVariations:r}=this.props;r&&(!g()(e.selected,c)||e.isLoading&&!t)&&this.loadVariations()}isProductId(e){const{products:t}=this.props;return t.some(t=>t.id===e)}findParentProduct(e){const{products:t}=this.props;return t.filter(t=>t.variations&&t.variations.find(t=>{let{id:c}=t;return c===e}))[0].id}getExpandedProduct(){const{isLoading:e,selected:t,showVariations:c}=this.props;if(!c)return null;let r=t&&t.length?t[0]:null;return r?this.prevSelectedItem=r:this.prevSelectedItem&&(e||this.isProductId(this.prevSelectedItem)||(r=this.prevSelectedItem)),!e&&r?this.isProductId(r)?r:this.findParentProduct(r):null}render(){const{error:t,isLoading:c}=this.props,{error:r,loading:a,variations:s}=this.state;return Object(n.createElement)(e,o()({},this.props,{error:r||t,expandedProduct:this.getExpandedProduct(),isLoading:c,variations:s,variationsLoading:a}))}}return p()(t,"defaultProps",{selected:[],showVariations:!1}),t},"withProductVariations"),E=c(41),w=c(5),_=c.n(w),f=c(120);c(191);const v={list:Object(a.__)("Products",'woocommerce'),noItems:Object(a.__)("Your store doesn't have any products.",'woocommerce'),search:Object(a.__)("Search for a product to display",'woocommerce'),updated:Object(a.__)("Product search results updated.",'woocommerce')},k=e=>{let{expandedProduct:t,error:c,instanceId:r,isCompact:i,isLoading:u,onChange:d,onSearch:b,products:p,renderItem:m,selected:g,showVariations:O,variations:h,variationsLoading:j}=e;if(c)return Object(n.createElement)(E.a,{error:c});const w=[...p,...h&&h[t]?h[t]:[]];return Object(n.createElement)(l.b,{className:"woocommerce-products",list:w,isCompact:i,isLoading:u,isSingle:!0,selected:w.filter(e=>{let{id:t}=e;return g.includes(t)}),onChange:d,renderItem:m||(O?e=>{const{item:t,search:c,depth:i=0,isSelected:d,onSelect:b}=e,p=t.variations&&Array.isArray(t.variations)?t.variations.length:0,m=_()("woocommerce-search-product__item","woocommerce-search-list__item","depth-"+i,"has-count",{"is-searching":c.length>0,"is-skip-level":0===i&&0!==t.parent,"is-variable":p>0});if(!t.breadcrumbs.length)return Object(n.createElement)(f.a,o()({},e,{className:_()(m,{"is-selected":d}),isSelected:d,item:t,onSelect:()=>()=>{b(t)()},isLoading:u||j,countLabel:t.variations.length>0?Object(a.sprintf)( /* translators: %1$d is the number of variations of a product product. */ Object(a.__)("%1$d variations",'woocommerce'),t.variations.length):null,name:"products-"+r,"aria-label":Object(a.sprintf)( /* translators: %1$s is the product name, %2$d is the number of variations of that product. */ Object(a._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.variations.length,'woocommerce'),t.name,t.variations.length)}));const g=Object(s.isEmpty)(t.variation)?e:{...e,item:{...e.item,name:t.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.variation}`};return Object(n.createElement)(l.c,o()({},g,{className:m,name:"variations-"+r}))}:null),onSearch:b,messages:v,isHierarchical:!0})};k.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=u(Object(d.a)(j(Object(i.withInstanceId)(k))))},136:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=n},138:function(e,t,c){"use strict";var r=c(0),o=(c(2),c(5)),n=c.n(o),a=c(37),s=c(12);c(193),t.a=Object(s.withInstanceId)(e=>{let{className:t,instanceId:c,label:o,onChange:s,options:l,screenReaderLabel:i,readOnly:u,value:d}=e;const b="wc-block-components-sort-select__select-"+c;return Object(r.createElement)("div",{className:n()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(r.createElement)(a.a,{label:o,screenReaderLabel:i,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:b}}),Object(r.createElement)("select",{id:b,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:s,readOnly:u,value:d},l.map(e=>Object(r.createElement)("option",{key:e.key,value:e.key},e.label))))})},139:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(53),a=c(5),s=c.n(a),l=c(44);c(220);const i=e=>{let{currency:t,maxPrice:c,minPrice:a,priceClassName:i,priceStyle:u}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.sprintf)( /* translators: %1$s min price, %2$s max price */ Object(o.__)("Price between %1$s and %2$s",'woocommerce'),Object(l.formatPrice)(a),Object(l.formatPrice)(c))),Object(r.createElement)("span",{"aria-hidden":!0},Object(r.createElement)(n.a,{className:s()("wc-block-components-product-price__value",i),currency:t,value:a,style:u})," — ",Object(r.createElement)(n.a,{className:s()("wc-block-components-product-price__value",i),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:a,regularPrice:l,priceClassName:i,priceStyle:u,price:d}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Previous price:",'woocommerce')),Object(r.createElement)(n.a,{currency:t,renderText:e=>Object(r.createElement)("del",{className:s()("wc-block-components-product-price__regular",c),style:a},e),value:l}),Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Discounted price:",'woocommerce')),Object(r.createElement)(n.a,{currency:t,renderText:e=>Object(r.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",i),style:u},e),value:d}))};t.a=e=>{let{align:t,className:c,currency:o,format:a="<price/>",maxPrice:l,minPrice:d,price:b,priceClassName:p,priceStyle:m,regularPrice:g,regularPriceClassName:O,regularPriceStyle:h}=e;const j=s()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});a.includes("<price/>")||(a="<price/>",console.error("Price formats need to include the `<price/>` tag."));const E=g&&b!==g;let w=Object(r.createElement)("span",{className:s()("wc-block-components-product-price__value",p)});return E?w=Object(r.createElement)(u,{currency:o,price:b,priceClassName:p,priceStyle:m,regularPrice:g,regularPriceClassName:O,regularPriceStyle:h}):void 0!==d&&void 0!==l?w=Object(r.createElement)(i,{currency:o,maxPrice:l,minPrice:d,priceClassName:p,priceStyle:m}):b&&(w=Object(r.createElement)(n.a,{className:s()("wc-block-components-product-price__value",p),currency:o,value:b,style:m})),Object(r.createElement)("span",{className:j},Object(r.createInterpolateElement)(a,{price:w}))}},14:function(e,t){e.exports=window.wp.blocks},141:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return s}));var r=c(6);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const n={addEventCallback:function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(r.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:c}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},a={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:c,id:r,callback:n,priority:s}=arguments.length>1?arguments[1]:void 0;const l=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return l.set(r,{priority:s,callback:n}),{...e,[c]:l};case o.REMOVE_EVENT_CALLBACK:return l.delete(r),{...e,[c]:l}}}},142:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(8);function o(e,t){const c=Object(r.useRef)();return Object(r.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},148:function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var r=c(0),o=c(6),n=c(31),a=c.n(n);const s=Object(r.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),l=()=>Object(r.useContext)(s),i=e=>{let{children:t}=e;const[c,n]=Object(r.useState)({}),l=Object(r.useCallback)(e=>c[e],[c]),i=Object(r.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(r.useCallback)(e=>{n(t=>{if(!t[e])return t;const{[e]:c,...r}=t;return r})},[]),d=Object(r.useCallback)(()=>{n({})},[]),b=Object(r.useCallback)(e=>{e&&n(t=>(e=Object(o.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&a()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),p=Object(r.useCallback)((e,t)=>{n(c=>{if(!c.hasOwnProperty(e))return c;const r={...c[e],...t};return a()(c[e],r)?c:{...c,[e]:r}})},[]),m={getValidationError:l,setValidationErrors:b,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(r.useCallback)(e=>{p(e,{hidden:!0})},[p]),showValidationError:Object(r.useCallback)(e=>{p(e,{hidden:!1})},[p]),showAllValidationErrors:Object(r.useCallback)(()=>{n(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:i};return Object(r.createElement)(s.Provider,{value:m},t)}},149:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var r=c(19),o=c(10),n=c(0),a=c(52),s=c(126);const l=e=>{const{namespace:t,resourceName:c,resourceValues:l=[],query:i={},shouldSelect:u=!0}=e;if(!t||!c)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=Object(n.useRef)({results:[],isLoading:!0}),b=Object(a.a)(i),p=Object(a.a)(l),m=Object(s.a)(),g=Object(o.useSelect)(e=>{if(!u)return null;const o=e(r.COLLECTIONS_STORE_KEY),n=[t,c,b,p],a=o.getCollectionError(...n);return a&&m(a),{results:o.getCollection(...n),isLoading:!o.hasFinishedResolution("getCollection",n)}},[t,c,p,b,u]);return null!==g&&(d.current=g),d.current}},161:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{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=n},172:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0);const o=Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"}},Object(r.createElement)("title",null,"Grid Block Preview"),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"}))},173:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=c(20),s=c(5),l=c.n(s);c(219),t.a=e=>{let{className:t="",disabled:c=!1,name:r,permalink:s="",rel:i,style:u,onClick:d,...b}=e;const p=l()("wc-block-components-product-name",t);if(c){const e=b;return Object(n.createElement)("span",o()({className:p},e,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)}}))}return Object(n.createElement)("a",o()({className:p,href:s,rel:i},b,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)},style:u}))}},174:function(e,t,c){"use strict";c.d(t,"b",(function(){return g})),c.d(t,"a",(function(){return O}));var r=c(0),o=(c(2),c(10)),n=c(75),a=c(73),s=c(7),l=c.n(s),i=c(5),u=c.n(i),d=c(888);c(221);const b=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""};var p=e=>{let{className:t,notices:c,removeNotice:o}=e;const n=c.filter(e=>"snackbar"!==e.type);if(!n.length)return null;const a=u()(t,"wc-block-components-notices");return Object(r.createElement)("div",{className:a},n.map(e=>Object(r.createElement)(d.a,l()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",b(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const m=Object(r.createContext)({notices:[],createNotice:(e,t,c)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),g=()=>Object(r.useContext)(m),O=e=>{let{children:t,className:c="",createNoticeContainer:s=!0,context:l="wc/core"}=e;const{createNotice:i,removeNotice:u}=Object(o.useDispatch)("core/notices"),[d,b]=Object(r.useState)(!1),{dispatchStoreEvent:g}=Object(n.a)(),{isEditor:O}=Object(a.b)(),h=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i(e,t,{...c,context:c.context||l}),g("store-notice-create",{status:e,content:t,options:c})}),[i,g,l]),j=Object(r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;u(e,t)}),[u,l]),{notices:E}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(l)}),[l]),w={notices:E,createNotice:h,removeNotice:j,context:l,setIsSuppressed:b},_=d?null:Object(r.createElement)(p,{className:c,notices:w.notices,removeNotice:w.removeNotice,isEditor:O});return Object(r.createElement)(m.Provider,{value:w},s&&_,t)}},175:function(e,t,c){"use strict";var r=c(0),o=c(134),n=c(103);const a=e=>{const t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},s=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),l=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const r=s(e),o=r.split(" ").splice(0,t).join(" ");return Object(n.autop)(l(o,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const o=s(e),a=o.slice(0,t);if(c)return Object(n.autop)(l(a,r));const i=a.match(/([\s]+)/g),u=i?i.length:0,d=o.slice(0,t+u);return Object(n.autop)(l(d,r))};t.a=e=>{let{source:t,maxLength:c=15,countType:s="words",className:l=""}=e;const d=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(n.autop)(e),s=Object(o.count)(r,c);if(s<=t)return r;const l=a(r),d=Object(o.count)(l,c);return d<=t?l:"words"===c?i(l,t):u(l,t,"characters_including_spaces"===c)}(t,c,s),[t,c,s]);return Object(r.createElement)(r.RawHTML,{className:l},d)}},18:function(e,t){e.exports=window.wp.primitives},186:function(e,t){},19:function(e,t){e.exports=window.wc.wcBlocksData},191:function(e,t){},193:function(e,t){},197:function(e,t){e.exports=window.wp.warning},20:function(e,t){e.exports=window.wp.htmlEntities},21:function(e,t){e.exports=window.moment},211:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>e.reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{})},219:function(e,t){},220:function(e,t){},221:function(e,t){},222:function(e,t){},223:function(e,t){},224:function(e,t){},273:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=c(32),s=c(34),l=c(165),i=c(35);t.a=e=>t=>{let{selected:c,...r}=t;const[u,d]=Object(n.useState)(!0),[b,p]=Object(n.useState)(null),[m,g]=Object(n.useState)([]),O=a.o.productCount>100,h=async e=>{const t=await Object(i.a)(e);p(t),d(!1)},j=Object(n.useRef)(c);Object(n.useEffect)(()=>{Object(s.h)({selected:j.current}).then(e=>{g(e),d(!1)}).catch(h)},[j]);const E=Object(l.a)(e=>{Object(s.h)({selected:c,search:e}).then(e=>{g(e),d(!1)}).catch(h)},400),w=Object(n.useCallback)(e=>{d(!0),E(e)},[d,E]);return Object(n.createElement)(e,o()({},r,{selected:c,error:b,products:m,isLoading:u,onSearch:O?w:null}))}},274:function(e,t,c){"use strict";c.r(t);var r=c(0),o=(c(2),c(1)),n=c(5),a=c.n(n),s=c(37),l=c(36),i=c(78);c(541),t.default=Object(i.withProductDataContext)(e=>{let{className:t,align:c}=e;const{parentClassName:n}=Object(l.useInnerBlockLayoutContext)(),{product:i}=Object(l.useProductDataContext)();if(!i.id||!i.on_sale)return null;const u="string"==typeof c?"wc-block-components-product-sale-badge--align-"+c:"";return Object(r.createElement)("div",{className:a()("wc-block-components-product-sale-badge",t,u,{[n+"__product-onsale"]:n})},Object(r.createElement)(s.a,{label:Object(o.__)("Sale",'woocommerce'),screenReaderLabel:Object(o.__)("Product on sale",'woocommerce')}))})},276:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0),o=(c(2),c(148));c(224);const n=e=>{let{errorMessage:t="",propertyName:c="",elementId:n=""}=e;const{getValidationError:a,getValidationErrorId:s}=Object(o.b)();if(!t||"string"!=typeof t){const e=a(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:s(n)},t))}},3:function(e,t){e.exports=window.wc.wcSettings},30:function(e,t){e.exports=window.wp.dataControls},31:function(e,t){e.exports=window.wp.isShallowEqual},32:function(e,t,c){"use strict";c.d(t,"o",(function(){return n})),c.d(t,"m",(function(){return a})),c.d(t,"l",(function(){return s})),c.d(t,"n",(function(){return l})),c.d(t,"j",(function(){return i})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return d})),c.d(t,"g",(function(){return b})),c.d(t,"k",(function(){return p})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return g})),c.d(t,"h",(function(){return O})),c.d(t,"a",(function(){return h})),c.d(t,"i",(function(){return j})),c.d(t,"b",(function(){return E}));var r,o=c(3);const n=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=n.pluginUrl+"images/",s=n.pluginUrl+"build/",l=n.buildPhase,i=null===(r=o.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=o.STORE_PAGES.checkout.id,d=o.STORE_PAGES.checkout.permalink,b=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id),g=o.STORE_PAGES.cart.permalink,O=(o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),Object(o.getSetting)("shippingCountries",{})),h=Object(o.getSetting)("allowedCountries",{}),j=Object(o.getSetting)("shippingStates",{}),E=Object(o.getSetting)("allowedStates",{})},328:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=n},329:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=n},34:function(e,t,c){"use strict";c.d(t,"h",(function(){return i})),c.d(t,"e",(function(){return u})),c.d(t,"b",(function(){return d})),c.d(t,"i",(function(){return b})),c.d(t,"f",(function(){return p})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return g})),c.d(t,"g",(function(){return O})),c.d(t,"a",(function(){return h}));var r=c(13),o=c(11),n=c.n(o),a=c(6),s=c(3),l=c(32);const i=e=>{let{selected:t=[],search:c="",queryArgs:o={}}=e;const s=(e=>{let{selected:t=[],search:c="",queryArgs:o={}}=e;const n=l.o.productCount>100,a={per_page:n?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},s=[Object(r.addQueryArgs)("/wc/store/products",{...a,...o})];return n&&t.length&&s.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),s})({selected:t,search:c,queryArgs:o});return Promise.all(s.map(e=>n()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),d=()=>n()({path:"wc/store/products/attributes"}),b=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),p=e=>{let{selected:t=[],search:c}=e;const o=(e=>{let{selected:t=[],search:c}=e;const o=Object(s.getSetting)("limitTags",!1),n=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:c})];return o&&t.length&&n.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:c});return Promise.all(o.map(e=>n()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id"))},m=e=>n()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),g=e=>n()({path:"wc/store/products/categories/"+e}),O=e=>n()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),h=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},35:function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return n}));var r=c(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},n=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.",'woocommerce')}},36:function(e,t){e.exports=window.wc.wcBlocksSharedContext},366:function(e,t){},367:function(e,t,c){"use strict";var r=c(110);let o={headingLevel:{type:"number",default:2},showProductLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(r.b)()&&(o={...o,align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}}),t.a=o},368:function(e,t,c){"use strict";var r=c(0),o=c(5),n=c.n(o),a=c(36),s=c(9),l=c(110),i=c(78),u=c(173),d=c(75);c(540);const b=e=>{let{children:t,headingLevel:c,elementType:o="h"+c,...n}=e;return Object(r.createElement)(o,n,t)};t.a=Object(i.withProductDataContext)(e=>{var t,c,o,i;let{className:p,headingLevel:m=2,showProductLink:g=!0,align:O,textColor:h,fontSize:j,style:E}=e;const{parentClassName:w}=Object(a.useInnerBlockLayoutContext)(),{product:_}=Object(a.useProductDataContext)(),{dispatchStoreEvent:f}=Object(d.a)(),v=Object(s.getColorClassName)("color",h),k=Object(s.getFontSizeClass)(j),y=n()("wp-block-woocommerce-product-title",{"has-text-color":h||(null==E||null===(t=E.color)||void 0===t?void 0:t.text)||(null==E?void 0:E.color),"has-font-size":j||(null==E||null===(c=E.typography)||void 0===c?void 0:c.fontSize)||(null==E?void 0:E.fontSize),[v]:v,[k]:k}),C={fontSize:(null==E?void 0:E.fontSize)||(null==E||null===(o=E.typography)||void 0===o?void 0:o.fontSize),color:(null==E||null===(i=E.color)||void 0===i?void 0:i.text)||(null==E?void 0:E.color)};return _.id?Object(r.createElement)(b,{headingLevel:m,className:n()(p,"wc-block-components-product-title",{[w+"__product-title"]:w,["wc-block-components-product-title--align-"+O]:O&&Object(l.b)()})},Object(r.createElement)(u.a,{className:n()({[y]:Object(l.b)()}),disabled:!g,name:_.name,permalink:_.permalink,rel:g?"nofollow":"",onClick:()=>{f("product-view-link",{product:_})},style:Object(l.b)()?C:{}})):Object(r.createElement)(b,{headingLevel:m,className:n()(p,"wc-block-components-product-title",{[w+"__product-title"]:w,["wc-block-components-product-title--align-"+O]:O&&Object(l.b)(),[y]:Object(l.b)()})})})},369:function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));const r=window.CustomEvent||null,o=(e,t)=>{let{bubbles:c=!1,cancelable:o=!1,element:n,detail:a={}}=t;if(!r)return;n||(n=document.body);const s=new r(e,{bubbles:c,cancelable:o,detail:a});n.dispatchEvent(s)};let n;const a=()=>{n&&clearTimeout(n),n=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const n=()=>{o(t,{bubbles:c,cancelable:r})};return jQuery(document).on(e,n),()=>jQuery(document).off(e,n)}},37:function(e,t,c){"use strict";var r=c(0),o=c(5),n=c.n(o);t.a=e=>{let t,{label:c,screenReaderLabel:o,wrapperElement:a,wrapperProps:s={}}=e;const l=null!=c,i=null!=o;return!l&&i?(t=a||"span",s={...s,className:n()(s.className,"screen-reader-text")},Object(r.createElement)(t,s,o)):(t=a||r.Fragment,l&&i&&c!==o?Object(r.createElement)(t,s,Object(r.createElement)("span",{"aria-hidden":"true"},c),Object(r.createElement)("span",{className:"screen-reader-text"},o)):Object(r.createElement)(t,s,c))}},370:function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"c",(function(){return s})),c.d(t,"a",(function(){return l}));var r=c(3),o=c(132),n=c(13);const a=e=>{let{country:t="",state:c="",city:r="",postcode:o=""}=e;return{country:t.trim(),state:c.trim(),city:r.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},s=e=>{let{email:t=""}=e;return Object(n.isEmail)(t)?t.trim():""},l=e=>{const t=Object.keys(r.defaultAddressFields),c=Object(o.a)(t,{},e.country),n=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:r=!1}=t;r&&((e,t)=>e in t)(c,e)&&(n[c]="")}),n}},371:function(e,t,c){"use strict";t.a={showProductLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},372:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=(c(2),c(1)),s=c(5),l=c.n(s),i=c(3),u=c(36),d=c(78),b=c(75),p=c(274);c(542);const m=()=>Object(n.createElement)("img",{src:i.PLACEHOLDER_IMG_SRC,alt:"",width:500,height:500}),g=e=>{let{image:t,onLoad:c,loaded:r,showFullSize:a,fallbackAlt:s}=e;const{thumbnail:l,src:i,srcset:u,sizes:d,alt:b}=t||{},p={alt:b||s,onLoad:c,hidden:!r,src:l,...a&&{src:i,srcSet:u,sizes:d}};return Object(n.createElement)(n.Fragment,null,p.src&&Object(n.createElement)("img",o()({"data-testid":"product-image"},p)),!r&&Object(n.createElement)(m,null))};t.a=Object(d.withProductDataContext)(e=>{let{className:t,imageSizing:c="full-size",showProductLink:r=!0,showSaleBadge:o,saleBadgeAlign:s="right"}=e;const{parentClassName:i}=Object(u.useInnerBlockLayoutContext)(),{product:d}=Object(u.useProductDataContext)(),[O,h]=Object(n.useState)(!1),{dispatchStoreEvent:j}=Object(b.a)();if(!d.id)return Object(n.createElement)("div",{className:l()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",{[i+"__product-image"]:i})},Object(n.createElement)(m,null));const E=!!d.images.length,w=E?d.images[0]:null,_=r?"a":n.Fragment,f=Object(a.sprintf)( /* translators: %s is referring to the product name */ Object(a.__)("Link to %s",'woocommerce'),d.name),v={href:d.permalink,rel:"nofollow",...!E&&{"aria-label":f},onClick:()=>{j("product-view-link",{product:d})}};return Object(n.createElement)("div",{className:l()(t,"wc-block-components-product-image",{[i+"__product-image"]:i})},Object(n.createElement)(_,r&&v,!!o&&Object(n.createElement)(p.default,{align:s,product:d}),Object(n.createElement)(g,{fallbackAlt:d.name,image:w,onLoad:()=>h(!0),loaded:O,showFullSize:"cropped"!==c})))})},373:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(141);const o=(e,t)=>function(c){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=r.a.addEventCallback(e,c,o);return t(n),()=>{t(r.a.removeEventCallback(e,n.id))}}},374:function(e,t,c){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},375:function(e,t,c){"use strict";var r=c(0),o=(c(2),c(5)),n=c.n(o),a=c(1),s=c(52),l=c(879);const i={PRISTINE:"pristine",IDLE:"idle",DISABLED:"disabled",PROCESSING:"processing",BEFORE_PROCESSING:"before_processing",AFTER_PROCESSING:"after_processing"},u={status:i.PRISTINE,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},d={SET_PRISTINE:"set_pristine",SET_IDLE:"set_idle",SET_DISABLED:"set_disabled",SET_PROCESSING:"set_processing",SET_BEFORE_PROCESSING:"set_before_processing",SET_AFTER_PROCESSING:"set_after_processing",SET_PROCESSING_RESPONSE:"set_processing_response",SET_HAS_ERROR:"set_has_error",SET_NO_ERROR:"set_no_error",SET_QUANTITY:"set_quantity",SET_REQUEST_PARAMS:"set_request_params"},{SET_PRISTINE:b,SET_IDLE:p,SET_DISABLED:m,SET_PROCESSING:g,SET_BEFORE_PROCESSING:O,SET_AFTER_PROCESSING:h,SET_PROCESSING_RESPONSE:j,SET_HAS_ERROR:E,SET_NO_ERROR:w,SET_QUANTITY:_,SET_REQUEST_PARAMS:f}=d,v=()=>({type:p}),k=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=e?E:w;return{type:t}},{SET_PRISTINE:y,SET_IDLE:C,SET_DISABLED:S,SET_PROCESSING:x,SET_BEFORE_PROCESSING:P,SET_AFTER_PROCESSING:N,SET_PROCESSING_RESPONSE:T,SET_HAS_ERROR:R,SET_NO_ERROR:I,SET_QUANTITY:A,SET_REQUEST_PARAMS:B}=d,{PRISTINE:L,IDLE:V,DISABLED:z,PROCESSING:D,BEFORE_PROCESSING:F,AFTER_PROCESSING:M}=i,H=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,{quantity:c,type:r,data:o}=arguments.length>1?arguments[1]:void 0;switch(r){case y:e=u;break;case C:e=t.status!==V?{...t,status:V}:t;break;case S:e=t.status!==z?{...t,status:z}:t;break;case A:e=c!==t.quantity?{...t,quantity:c}:t;break;case B:e={...t,requestParams:{...t.requestParams,...o}};break;case T:e={...t,processingResponse:o};break;case x:e=t.status!==D?{...t,status:D,hasError:!1}:t,e=!1===e.hasError?e:{...e,hasError:!1};break;case P:e=t.status!==F?{...t,status:F,hasError:!1}:t;break;case N:e=t.status!==M?{...t,status:M}:t;break;case R:e=t.hasError?t:{...t,hasError:!0},e=t.status===D||t.status===F?{...e,status:V}:e;break;case I:e=t.hasError?{...t,hasError:!1}:t}return e!==t&&r!==y&&e.status===L&&(e.status=V),e};var G=c(141),q=c(373);const Q=e=>({onAddToCartAfterProcessingWithSuccess:Object(q.a)("add_to_cart_after_processing_with_success",e),onAddToCartProcessingWithError:Object(q.a)("add_to_cart_after_processing_with_error",e),onAddToCartBeforeProcessing:Object(q.a)("add_to_cart_before_processing",e)});var Y=c(376),U=c(148),W=c(63),K=c(59);const $=Object(r.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:e=>{},onAddToCartAfterProcessingWithError:e=>{},onAddToCartBeforeProcessing:e=>{}},dispatchActions:{resetForm:()=>{},submitForm:()=>{},setQuantity:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},setRequestParams:e=>{}}}),J=()=>Object(r.useContext)($),X=e=>{let{children:t,product:c,showFormElements:o}=e;const[n,d]=Object(r.useReducer)(H,u),[p,E]=Object(r.useReducer)(G.b,{}),w=Object(s.a)(p),{addErrorNotice:y,removeNotices:C}=Object(W.a)(),{setValidationErrors:S}=Object(U.b)(),{isSuccessResponse:x,isErrorResponse:P,isFailResponse:N}=Object(K.c)(),T=Object(r.useMemo)(()=>({onAddToCartAfterProcessingWithSuccess:Q(E).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Q(E).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Q(E).onAddToCartBeforeProcessing}),[E]),R=Object(r.useMemo)(()=>({resetForm:()=>{d({type:b})},submitForm:()=>{d({type:O})},setQuantity:e=>{d((e=>({type:_,quantity:e}))(e))},setHasError:e=>{d(k(e))},setRequestParams:e=>{d((e=>({type:f,data:e}))(e))},setAfterProcessing:e=>{d({type:j,data:e}),d({type:h})}}),[]);Object(r.useEffect)(()=>{const e=n.status,t=!c.id||!Object(l.a)(c);e!==i.DISABLED||t?e!==i.DISABLED&&t&&d({type:m}):d(v())},[n.status,c,d]),Object(r.useEffect)(()=>{n.status===i.BEFORE_PROCESSING&&(C("error"),Object(Y.a)(w,"add_to_cart_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:c}=e;t&&y(t),c&&S(c)}),d(v())):d({type:g})}))},[n.status,S,y,C,d,w]),Object(r.useEffect)(()=>{if(n.status===i.AFTER_PROCESSING){const e={processingResponse:n.processingResponse},t=e=>{let t=!1;return e.forEach(e=>{const{message:c,messageContext:r}=e;(P(e)||N(e))&&c&&(t=!0,y(c,r?{context:r}:void 0))}),t};if(n.hasError)return void Object(Y.b)(w,"add_to_cart_after_processing_with_error",e).then(c=>{if(!t(c)){var r;const t=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(a.__)("Something went wrong. Please contact us to get assistance.",'woocommerce');y(t,{id:"add-to-cart"})}d(v())});Object(Y.b)(w,"add_to_cart_after_processing_with_success",e).then(e=>{t(e)?d(k(!0)):d(v())})}},[n.status,n.hasError,n.processingResponse,R,y,P,N,x,w]);const I=Object(l.b)(c),A={product:c,productType:c.type||"simple",productIsPurchasable:Object(l.a)(c),productHasOptions:c.has_options||!1,supportsFormElements:I,showFormElements:o&&I,quantity:n.quantity,minQuantity:1,maxQuantity:c.quantity_limit||99,requestParams:n.requestParams,isIdle:n.status===i.IDLE,isDisabled:n.status===i.DISABLED,isProcessing:n.status===i.PROCESSING,isBeforeProcessing:n.status===i.BEFORE_PROCESSING,isAfterProcessing:n.status===i.AFTER_PROCESSING,hasError:n.hasError,eventRegistration:T,dispatchActions:R};return Object(r.createElement)($.Provider,{value:A},t)};var Z=c(11),ee=c.n(Z),te=c(20),ce=c(46),re=()=>{const{dispatchActions:e,product:t,quantity:c,eventRegistration:o,hasError:n,isProcessing:s,requestParams:l}=J(),{hasValidationErrors:i,showAllValidationErrors:u}=Object(U.b)(),{addErrorNotice:d,removeNotice:b}=Object(W.a)(),{receiveCart:p}=Object(ce.a)(),[m,g]=Object(r.useState)(!1),O=!n&&s,h=Object(r.useCallback)(()=>!i||(u(),{type:"error"}),[i,u]);Object(r.useEffect)(()=>{const e=o.onAddToCartBeforeProcessing(h,0);return()=>{e()}},[o,h]);const j=Object(r.useCallback)(()=>{g(!0),b("add-to-cart");const r={id:t.id||0,quantity:c,...l};ee()({path:"/wc/store/cart/add-item",method:"POST",data:r,cache:"no-store",parse:!1}).then(t=>{ee.a.setNonce(t.headers),t.json().then((function(c){t.ok?p(c):(c.body&&c.body.message?d(Object(te.decodeEntities)(c.body.message),{id:"add-to-cart"}):d(Object(a.__)("Something went wrong. Please contact us to get assistance.",'woocommerce'),{id:"add-to-cart"}),e.setHasError()),e.setAfterProcessing(c),g(!1)}))}).catch(t=>{t.json().then((function(t){var c;null!==(c=t.data)&&void 0!==c&&c.cart&&p(t.data.cart),e.setHasError(),e.setAfterProcessing(t),g(!1)}))})},[t,d,b,p,e,c,l]);return Object(r.useEffect)(()=>{O&&!m&&j()},[O,j,m]),null};const oe=e=>{let{children:t,product:c,showFormElements:o}=e;return Object(r.createElement)(U.a,null,Object(r.createElement)(X,{product:c,showFormElements:o},t,Object(r.createElement)(re,null)))};var ne=c(36),ae=c(6),se=c(78),le=(c(366),c(108)),ie=c(55),ue=c(551),de=c(75),be=c(777);const pe=e=>{let{className:t,href:c,text:o,onClick:n}=e;return Object(r.createElement)(le.a,{className:t,href:c,onClick:n,rel:"nofollow"},o)},me=e=>{let{className:t,quantityInCart:c,isProcessing:o,isDisabled:n,isDone:s,onClick:l}=e;return Object(r.createElement)(le.a,{className:t,disabled:n,showSpinner:o,onClick:l},s&&c>0?Object(a.sprintf)( /* translators: %s number of products in cart. */ Object(a._n)("%d in cart","%d in cart",c,'woocommerce'),c):Object(a.__)("Add to cart",'woocommerce'),!!s&&Object(r.createElement)(ie.a,{srcElement:ue.a,alt:Object(a.__)("Done",'woocommerce')}))};var ge=()=>{const{showFormElements:e,productIsPurchasable:t,productHasOptions:c,product:o,productType:n,isDisabled:s,isProcessing:l,eventRegistration:i,hasError:u,dispatchActions:d}=J(),{parentName:b}=Object(ne.useInnerBlockLayoutContext)(),{dispatchStoreEvent:p}=Object(de.a)(),{cartQuantity:m}=Object(be.a)(o.id||0),[g,O]=Object(r.useState)(!1),h=o.add_to_cart||{url:"",text:""};return Object(r.useEffect)(()=>{const e=i.onAddToCartAfterProcessingWithSuccess(()=>(u||O(!0),!0),0);return()=>{e()}},[i,u]),(e||!c&&"simple"===n)&&t?Object(r.createElement)(me,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:m,isDisabled:s,isProcessing:l,isDone:g,onClick:()=>{d.submitForm(),p("cart-add-item",{product:o,listName:b})}}):Object(r.createElement)(pe,{className:"wc-block-components-product-add-to-cart-button",href:h.url,text:h.text||Object(a.__)("View Product",'woocommerce'),onClick:()=>{p("product-view-link",{product:o,listName:b})}})},Oe=e=>{let{disabled:t,min:c,max:o,value:n,onChange:a}=e;return Object(r.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:n,min:c,max:o,hidden:1===o,disabled:t,onChange:e=>{a(e.target.value)}})},he=e=>{let{reason:t=Object(a.__)("Sorry, this product cannot be purchased.",'woocommerce')}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},t)},je=()=>{const{product:e,quantity:t,minQuantity:c,maxQuantity:o,dispatchActions:n,isDisabled:s}=J();return e.id&&!e.is_purchasable?Object(r.createElement)(he,null):e.id&&!e.is_in_stock?Object(r.createElement)(he,{reason:Object(a.__)("This product is currently out of stock and cannot be purchased.",'woocommerce')}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Oe,{value:t,min:c,max:o,disabled:s,onChange:n.setQuantity}),Object(r.createElement)(ge,null))},Ee=(c(550),c(898)),we=c(8),_e=c(276);const fe={value:"",label:Object(a.__)("Select an option",'woocommerce')};var ve=e=>{let{attributeName:t,options:c=[],value:o="",onChange:s=(()=>{}),errorMessage:l=Object(a.__)("Please select a value.",'woocommerce')}=e;const{getValidationError:i,setValidationErrors:u,clearValidationError:d}=Object(U.b)(),b=t,p=i(b)||{};return Object(we.useEffect)(()=>{o?d(b):u({[b]:{message:l,hidden:!0}})},[o,b,l,d,u]),Object(we.useEffect)(()=>()=>{d(b)},[b,d]),Object(r.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(r.createElement)(Ee.a,{label:Object(te.decodeEntities)(t),value:o||"",options:[fe,...c],onChange:s,required:!0,className:n()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":p.message&&!p.hidden})}),Object(r.createElement)(_e.a,{propertyName:b,elementId:b}))},ke=c(113);const ye=(e,t,c)=>{const r=Object.values(t).map(e=>{let{id:t}=e;return t});if(Object.values(c).every(e=>""===e))return r;const o=Object.keys(e);return r.filter(e=>o.every(r=>{const o=c[r]||"",n=t["id:"+e].attributes[r];return""===o||null===n||n===o}))};var Ce=e=>{let{attributes:t,variationAttributes:c,setRequestParams:o}=e;const n=Object(s.a)(t),a=Object(s.a)(c),[l,i]=Object(r.useState)(0),[u,d]=Object(r.useState)({}),[b,p]=Object(r.useState)(!1),m=Object(r.useMemo)(()=>((e,t,c)=>{const r={},o=Object.keys(e),n=Object.values(c).filter(Boolean).length>0;return o.forEach(o=>{const a=e[o],s={...c,[o]:null},l=n?ye(e,t,s):null,i=null!==l?l.map(e=>t["id:"+e].attributes[o]):null;r[o]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map(e=>{let{name:c,slug:r}=e;return null===t||t.includes(null)||t.includes(r)?{value:r,label:Object(te.decodeEntities)(c)}:null}).filter(Boolean)}(a.terms,i)}),r})(n,a,u),[u,n,a]);return Object(r.useEffect)(()=>{if(!b){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Object(ke.b)(e))return{};const t=Object.keys(e),c={};return 0===t.length||t.forEach(t=>{const r=e[t],o=r.terms.filter(e=>e.default);var n;o.length>0&&(c[r.name]=null===(n=o[0])||void 0===n?void 0:n.slug)}),c}(t);e&&d({...e}),p(!0)}},[u,t,b]),Object(r.useEffect)(()=>{Object.values(u).filter(e=>""!==e).length===Object.keys(n).length?i(((e,t,c)=>ye(e,t,c)[0]||0)(n,a,u)):l>0&&i(0)},[u,l,n,a]),Object(r.useEffect)(()=>{o({id:l,variation:Object.keys(u).map(e=>({attribute:e,value:u[e]}))})},[o,l,u]),Object(r.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(n).map(e=>Object(r.createElement)(ve,{key:e,attributeName:e,options:m[e],value:u[e],onChange:t=>{d({...u,[e]:t})}})))},Se=e=>{let{product:t,dispatchers:c}=e;const o=(e=>e?Object(ae.keyBy)(Object.values(e).filter(e=>{let{has_variations:t}=e;return t}),"name"):{})(t.attributes),n=(e=>{if(!e)return{};const t={};return e.forEach(e=>{let{id:c,attributes:r}=e;t["id:"+c]={id:c,attributes:r.reduce((e,t)=>{let{name:c,value:r}=t;return e[c]=r,e},{})}}),t})(t.variations);return 0===Object.keys(o).length||0===n.length?null:Object(r.createElement)(Ce,{attributes:o,variationAttributes:n,setRequestParams:c.setRequestParams})},xe=()=>{const{product:e,quantity:t,minQuantity:c,maxQuantity:o,dispatchActions:n,isDisabled:s}=J();return e.id&&!e.is_purchasable?Object(r.createElement)(he,null):e.id&&!e.is_in_stock?Object(r.createElement)(he,{reason:Object(a.__)("This product is currently out of stock and cannot be purchased.",'woocommerce')}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Se,{product:e,dispatchers:n}),Object(r.createElement)(Oe,{value:t,min:c,max:o,disabled:s,onChange:n.setQuantity}),Object(r.createElement)(ge,null))},Pe=()=>Object(r.createElement)(ge,null),Ne=c(889),Te=()=>Object(r.createElement)(Ne.a,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element."),Re=()=>Object(r.createElement)(Te,null);const Ie=()=>{const{showFormElements:e,productType:t}=J();return e?"variable"===t?Object(r.createElement)(xe,null):"grouped"===t?Object(r.createElement)(Re,null):"external"===t?Object(r.createElement)(Pe,null):"simple"===t||"variation"===t?Object(r.createElement)(je,null):null:Object(r.createElement)(ge,null)};t.a=Object(se.withProductDataContext)(e=>{let{className:t,showFormElements:c}=e;const{product:o}=Object(ne.useProductDataContext)(),a=n()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(ae.isEmpty)(o)});return Object(r.createElement)(oe,{product:o,showFormElements:c},Object(r.createElement)("div",{className:a},Object(r.createElement)(Ie,null)))})},376:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return a}));const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=c(59);const n=async(e,t,c)=>{const o=r(e,t),n=[];for(const e of o)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&n.push(t)}catch(e){console.error(e)}return!n.length||n},a=async(e,t,c)=>{const n=[],a=r(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return n.push(t),n;n.push(t)}catch(e){return console.error(e),n.push({type:"error"}),n}return n}},38:function(e,t){e.exports=window.wp.keycodes},39:function(e,t){e.exports=window.wp.escapeHtml},4:function(e,t){e.exports=window.wp.components},41:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(39);t.a=e=>{let{error:t}=e;return Object(r.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:c}=e;return t?"general"===c?Object(r.createElement)("span",null,Object(o.__)("The following error was returned",'woocommerce'),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(n.escapeHTML)(t))):"api"===c?Object(r.createElement)("span",null,Object(o.__)("The following error was returned from the API",'woocommerce'),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(n.escapeHTML)(t))):t:Object(o.__)("An unknown error occurred which prevented the block from being updated.",'woocommerce')})(t))}},44:function(e,t){e.exports=window.wc.priceFormat},45:function(e,t){e.exports=window.wp.hooks},46:function(e,t,c){"use strict";c.d(t,"a",(function(){return w}));var r=c(6),o=c(0),n=c(19),a=c(10),s=c(20),l=c(211),i=c(370),u=c(73),d=c(369);const b=e=>{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(n.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(d.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(d.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",b),document.body.addEventListener("wc-blocks_removed_from_cart",b),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",b),document.body.removeEventListener("wc-blocks_removed_from_cart",b)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},g={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},O={...g,email:""},h={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:n.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},j=e=>Object(l.a)(Object.entries(e).map(e=>{let[t,c]=e;return[t,Object(s.decodeEntities)(c)]})),E={cartCoupons:n.EMPTY_CART_COUPONS,cartItems:n.EMPTY_CART_ITEMS,cartFees:n.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:n.EMPTY_CART_ITEM_ERRORS,cartTotals:h,cartIsLoading:!0,cartErrors:n.EMPTY_CART_ERRORS,billingAddress:O,shippingAddress:g,shippingRates:n.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:n.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:n.EMPTY_EXTENSIONS},w=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:c}=Object(u.b)(),s=null==c?void 0:c.previewCart,{shouldSelect:l}=e,d=Object(o.useRef)();m();const b=Object(a.useSelect)((e,c)=>{let{dispatch:r}=c;if(!l)return E;if(t)return{cartCoupons:s.coupons,cartItems:s.items,cartFees:s.fees,cartItemsCount:s.items_count,cartItemsWeight:s.items_weight,cartNeedsPayment:s.needs_payment,cartNeedsShipping:s.needs_shipping,cartItemErrors:n.EMPTY_CART_ITEM_ERRORS,cartTotals:s.totals,cartIsLoading:!1,cartErrors:n.EMPTY_CART_ERRORS,billingAddress:O,shippingAddress:g,extensions:n.EMPTY_EXTENSIONS,shippingRates:s.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:s.has_calculated_shipping,paymentRequirements:s.paymentRequirements,receiveCart:"function"==typeof(null==s?void 0:s.receiveCart)?s.receiveCart:()=>{}};const o=e(n.CART_STORE_KEY),a=o.getCartData(),u=o.getCartErrors(),d=o.getCartTotals(),b=!o.hasFinishedResolution("getCartData"),p=o.isCustomerDataUpdating(),{receiveCart:m}=r(n.CART_STORE_KEY),h=j(a.billingAddress),w=a.needsShipping?j(a.shippingAddress):h,_=a.fees.length>0?a.fees.map(e=>j(e)):n.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map(e=>({...e,label:e.code})):n.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:_,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:d,cartIsLoading:b,cartErrors:u,billingAddress:Object(i.a)(h),shippingAddress:Object(i.a)(w),extensions:a.extensions,shippingRates:a.shippingRates,shippingRatesLoading:p,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:m}},[l]);return d.current&&Object(r.isEqual)(d.current,b)||(d.current=b),d.current}},47:function(e,t){e.exports=window.wc.wcBlocksRegistry},477:function(e,t,c){"use strict";c.r(t);var r=c(0),o=(c(2),c(5)),n=c.n(o),a=c(139),s=c(44),l=c(36),i=c(9),u=c(110),d=c(78);t.default=Object(d.withProductDataContext)(e=>{var t,c;let{className:o,align:d,fontSize:b,customFontSize:p,saleFontSize:m,customSaleFontSize:g,color:O,customColor:h,saleColor:j,customSaleColor:E}=e;const{parentClassName:w}=Object(l.useInnerBlockLayoutContext)(),{product:_}=Object(l.useProductDataContext)(),f=n()(o,{[w+"__product-price"]:w});if(!_.id)return Object(r.createElement)(a.a,{align:d,className:f});const v=Object(i.getColorClassName)("color",O),k=Object(i.getFontSizeClass)(b),y=Object(i.getColorClassName)("color",j),C=Object(i.getFontSizeClass)(m),S=n()({"has-text-color":O||h,"has-font-size":b||p,[v]:v,[k]:k}),x=n()({"has-text-color":j||E,"has-font-size":m||g,[y]:y,[C]:C}),P={color:h,fontSize:p},N={color:E,fontSize:g},T=_.prices,R=Object(s.getCurrencyFromPriceResponse)(T),I=T.price!==T.regular_price,A=I?n()({[w+"__product-price__value"]:w,[x]:Object(u.b)()}):n()({[w+"__product-price__value"]:w,[S]:Object(u.b)()}),B=I?N:P;return Object(r.createElement)(a.a,{align:d,className:f,currency:R,price:T.price,priceClassName:A,priceStyle:Object(u.b)()?B:{},minPrice:null==T||null===(t=T.price_range)||void 0===t?void 0:t.min_amount,maxPrice:null==T||null===(c=T.price_range)||void 0===c?void 0:c.max_amount,regularPrice:T.regular_price,regularPriceClassName:n()({[w+"__product-price__regular"]:w,[S]:Object(u.b)()}),regularPriceStyle:Object(u.b)()?P:{}})})},478:function(e,t,c){"use strict";c.r(t);var r=c(0),o=(c(2),c(1)),n=c(5),a=c.n(n),s=c(36),l=c(78);c(543);t.default=Object(l.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)(),l=(e=>{const t=parseFloat(e.average_rating);return Number.isFinite(t)&&t>0?t:0})(n);if(!l)return null;const i={width:l/5*100+"%"},u=Object(o.sprintf)( /* translators: %f is referring to the average rating value */ Object(o.__)("Rated %f out of 5",'woocommerce'),l);return Object(r.createElement)("div",{className:a()(t,"wc-block-components-product-rating",{[c+"__product-rating"]:c})},Object(r.createElement)("div",{className:a()("wc-block-components-product-rating__stars",c+"__product-rating__stars"),role:"img","aria-label":u},Object(r.createElement)("span",{style:i},u)))})},479:function(e,t,c){"use strict";c.r(t);var r=c(7),o=c.n(r),n=c(0),a=(c(2),c(5)),s=c.n(a),l=c(1),i=c(75),u=c(777),d=c(20),b=c(36),p=c(78);c(544);const m=e=>{let{product:t}=e;const{id:c,permalink:r,add_to_cart:a,has_options:b,is_purchasable:p,is_in_stock:m}=t,{dispatchStoreEvent:g}=Object(i.a)(),{cartQuantity:O,addingToCart:h,addToCart:j}=Object(u.a)(c),E=Number.isFinite(O)&&O>0,w=!b&&p&&m,_=Object(d.decodeEntities)((null==a?void 0:a.description)||""),f=E?Object(l.sprintf)( /* translators: %s number of products in cart. */ Object(l._n)("%d in cart","%d in cart",O,'woocommerce'),O):Object(d.decodeEntities)((null==a?void 0:a.text)||Object(l.__)("Add to cart",'woocommerce')),v=w?"button":"a",k={};return w?k.onClick=()=>{j(),g("cart-add-item",{product:t})}:(k.href=r,k.rel="nofollow",k.onClick=()=>{g("product-view-link",{product:t})}),Object(n.createElement)(v,o()({"aria-label":_,className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:h,added:E}),disabled:h},k),f)},g=()=>Object(n.createElement)("button",{className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0});t.default=Object(p.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(b.useInnerBlockLayoutContext)(),{product:r}=Object(b.useProductDataContext)();return Object(n.createElement)("div",{className:s()(t,"wp-block-button","wc-block-components-product-button",{[c+"__product-add-to-cart"]:c})},r.id?Object(n.createElement)(m,{product:r}):Object(n.createElement)(g,null))})},481:function(e,t,c){"use strict";c.r(t);var r=c(0),o=(c(2),c(5)),n=c.n(o),a=c(175),s=c(32),l=c(36),i=c(78);c(545),t.default=Object(i.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(l.useInnerBlockLayoutContext)(),{product:o}=Object(l.useProductDataContext)();if(!o)return Object(r.createElement)("div",{className:n()(t,"wc-block-components-product-summary",{[c+"__product-summary"]:c})});const i=o.short_description?o.short_description:o.description;return i?Object(r.createElement)(a.a,{className:n()(t,"wc-block-components-product-summary",{[c+"__product-summary"]:c}),source:i,maxLength:150,countType:s.o.wordCountType||"words"}):null})},482:function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=(c(2),c(5)),a=c.n(n),s=c(36),l=c(78);c(546),t.default=Object(l.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)(),l=n.sku;return l?Object(r.createElement)("div",{className:a()(t,"wc-block-components-product-sku",{[c+"__product-sku"]:c})},Object(o.__)("SKU:",'woocommerce')," ",Object(r.createElement)("strong",null,l)):null})},483:function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=c(5),a=c.n(n),s=c(36),l=c(6),i=c(78);c(547),t.default=Object(i.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)();return Object(l.isEmpty)(n.categories)?null:Object(r.createElement)("div",{className:a()(t,"wc-block-components-product-category-list",{[c+"__product-category-list"]:c})},Object(o.__)("Categories:",'woocommerce')," ",Object(r.createElement)("ul",null,Object.values(n.categories).map(e=>{let{name:t,link:c,slug:o}=e;return Object(r.createElement)("li",{key:"category-list-item-"+o},Object(r.createElement)("a",{href:c},t))})))})},484:function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=(c(2),c(5)),a=c.n(n),s=c(36),l=c(6),i=c(78);c(548),t.default=Object(i.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)();return Object(l.isEmpty)(n.tags)?null:Object(r.createElement)("div",{className:a()(t,"wc-block-components-product-tag-list",{[c+"__product-tag-list"]:c})},Object(o.__)("Tags:",'woocommerce')," ",Object(r.createElement)("ul",null,Object.values(n.tags).map(e=>{let{name:t,link:c,slug:o}=e;return Object(r.createElement)("li",{key:"tag-list-item-"+o},Object(r.createElement)("a",{href:c},t))})))})},485:function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=(c(2),c(5)),a=c.n(n),s=c(36),l=c(78);c(549);t.default=Object(l.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)();if(!n.id||!n.is_purchasable)return null;const l=!!n.is_in_stock,i=n.low_stock_remaining,u=n.is_on_backorder;return Object(r.createElement)("div",{className:a()(t,"wc-block-components-product-stock-indicator",{[c+"__stock-indicator"]:c,"wc-block-components-product-stock-indicator--in-stock":l,"wc-block-components-product-stock-indicator--out-of-stock":!l,"wc-block-components-product-stock-indicator--low-stock":!!i,"wc-block-components-product-stock-indicator--available-on-backorder":!!u})},i?(e=>Object(o.sprintf)( /* translators: %d stock amount (number of items in stock for product) */ Object(o.__)("%d left in stock",'woocommerce'),e))(i):((e,t)=>t?Object(o.__)("Available on backorder",'woocommerce'):e?Object(o.__)("In Stock",'woocommerce'):Object(o.__)("Out of Stock",'woocommerce'))(l,u))})},51:function(e,t){e.exports=window.wp.deprecated},52:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(0),o=c(31),n=c.n(o);function a(e){const t=Object(r.useRef)(e);return n()(e,t.current)||(t.current=e),t.current}},53:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=c(178),s=c(5),l=c.n(s);c(186);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:r,onValueChange:s,displayType:u="text",...d}=e;const b="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(b))return null;const p=b/10**r.minorUnit;if(!Number.isFinite(p))return null;const m=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...d,...i(r),value:void 0,currency:void 0,onValueChange:void 0},O=s?e=>{const t=e.value*10**r.minorUnit;s(t)}:()=>{};return Object(n.createElement)(a.a,o()({className:m,displayType:u},g,{value:p,onValueChange:O}))}},540:function(e,t){},541:function(e,t){},542:function(e,t){},543:function(e,t){},544:function(e,t){},545:function(e,t){},546:function(e,t){},547:function(e,t){},548:function(e,t){},549:function(e,t){},55:function(e,t,c){"use strict";var r=c(0);t.a=function(e){let{srcElement:t,size:c=24,...o}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:c,height:c,...o}):null}},550:function(e,t){},551:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(r.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=n},59:function(e,t,c){"use strict";c.d(t,"a",(function(){return l})),c.d(t,"b",(function(){return i})),c.d(t,"c",(function(){return d}));var r=c(113);let o,n;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(o||(o={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(n||(n={}));const a=(e,t)=>Object(r.b)(e)&&"type"in e&&e.type===t,s=e=>a(e,o.SUCCESS),l=e=>a(e,o.ERROR),i=e=>a(e,o.FAIL),u=e=>!Object(r.b)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:o,noticeContexts:n,shouldRetry:u,isSuccessResponse:s,isErrorResponse:l,isFailResponse:i})},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},62:function(e,t){e.exports=window.wp.a11y},63:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0),o=c(174);const n=()=>{const{notices:e,createNotice:t,removeNotice:c,setIsSuppressed:n}=Object(o.b)(),a=Object(r.useRef)(e);Object(r.useEffect)(()=>{a.current=e},[e]);const s=Object(r.useMemo)(()=>({hasNoticesOfType:e=>a.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeNotice:c}),[c]),l=Object(r.useMemo)(()=>({addDefaultNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...c})},addErrorNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...c})},addWarningNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...c})},addInfoNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...c})},addSuccessNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...c})}}),[t]);return{notices:e,...s,...l,setIsSuppressed:n}}},64:function(e,t){e.exports=window.regeneratorRuntime},68:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0);const o=Object(r.createContext)("page"),n=()=>Object(r.useContext)(o);o.Provider},73:function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));var r=c(0),o=c(10);const n=Object(r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),a=()=>Object(r.useContext)(n),s=e=>{let{children:t,currentPostId:c=0,currentView:a="",previewData:s={}}=e;const l=Object(o.useSelect)(e=>c||e("core/editor").getCurrentPostId(),[c]),i=Object(r.useCallback)(e=>e in s?s[e]:{},[s]),u={isEditor:!0,currentPostId:l,currentView:a,previewData:s,getPreviewData:i};return Object(r.createElement)(n.Provider,{value:u},t)}},746:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"}));t.a=n},75:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(45),o=c(0),n=c(46);const a=()=>{const e=Object(n.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...c,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},753:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01L4 11V4h7v-.01l9 9-7 7.02z"}),Object(r.createElement)("circle",{cx:"6.5",cy:"6.5",r:"1.5"}),Object(r.createElement)("path",{d:"M8.9 12.55c0 .57.23 1.07.6 1.45l3.5 3.5 3.5-3.5c.37-.37.6-.89.6-1.45 0-1.13-.92-2.05-2.05-2.05-.57 0-1.08.23-1.45.6l-.6.6-.6-.59c-.37-.38-.89-.61-1.45-.61-1.13 0-2.05.92-2.05 2.05z"}));t.a=n},761:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}));t.a=n},762:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(1),o=c(32);const n=[{id:1,name:"WordPress Pennant",variation:"",permalink:"https://example.org",sku:"wp-pennant",short_description:Object(r.__)("Fly your WordPress banner with this beauty! Deck out your office space or add it to your kids walls. This banner will spruce up any space it’s hung!",'woocommerce'),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",price:"7.99",price_html:'<span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>7.99</span>',images:[{id:1,src:o.m+"previews/pennant.jpg",thumbnail:o.m+"previews/pennant.jpg",name:"pennant-1.jpg",alt:"WordPress Pennant",srcset:"",sizes:""}],average_rating:5,review_count:1,prices:{currency_code:"GBP",decimal_separator:".",thousand_separator:",",decimals:2,price_prefix:"£",price_suffix:"",price:"7.99",regular_price:"9.99",sale_price:"7.99",price_range:null},add_to_cart:{text:Object(r.__)("Add to cart",'woocommerce'),description:Object(r.__)("Add to cart",'woocommerce')},has_options:!1,is_purchasable:!0,is_in_stock:!0,on_sale:!0}]},767:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}));t.a=n},774:function(e,t,c){e.exports=c(847)},775:function(e,t){},776:function(e,t){},777:function(e,t,c){"use strict";c.d(t,"a",(function(){return u}));var r=c(0),o=c(10),n=c(19),a=c(20),s=c(46),l=c(63);const i=(e,t)=>{const c=e.find(e=>{let{id:c}=e;return c===t});return c?c.quantity:0},u=e=>{const{addItemToCart:t}=Object(o.useDispatch)(n.CART_STORE_KEY),{cartItems:c,cartIsLoading:u}=Object(s.a)(),{addErrorNotice:d,removeNotice:b}=Object(l.a)(),[p,m]=Object(r.useState)(!1),g=Object(r.useRef)(i(c,e));return Object(r.useEffect)(()=>{const t=i(c,e);t!==g.current&&(g.current=t)},[c,e]),{cartQuantity:Number.isFinite(g.current)?g.current:0,addingToCart:p,cartIsLoading:u,addToCart:function(){let c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return m(!0),t(e,c).then(()=>{b("add-to-cart")}).catch(e=>{d(Object(a.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})}).finally(()=>{m(!1)})}}}},778:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},Object(r.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M2 .75h12c.69 0 1.25.56 1.25 1.25v12c0 .69-.56 1.25-1.25 1.25H2c-.69 0-1.25-.56-1.25-1.25V2C.75 1.31 1.31.75 2 .75z"}),Object(r.createElement)("path",{fill:"currentColor",d:"M12 6H4V4.75h8zM12 9H4V7.75h8zM10 12H4v-1.25h6z"})));t.a=n},779:function(e,t){},78:function(e,t){e.exports=window.wc.wcBlocksSharedHocs},780:function(e,t){},781:function(e,t){},782:function(e,t){},783:function(e,t){},79:function(e,t){e.exports=window.ReactDOM},8:function(e,t){e.exports=window.React},80:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=c(6),s=c(5),l=c.n(s),i=c(4),u=c(12);c(117);class d extends n.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:c,className:r,help:s,options:u,value:d}=this.props,b="inspector-toggle-button-control-"+c;let p;return s&&(p=Object(a.isFunction)(s)?s(t):s),Object(n.createElement)(i.BaseControl,{id:b,help:p,className:l()("components-toggle-button-control",r)},Object(n.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},e),Object(n.createElement)(i.ButtonGroup,{"aria-labelledby":b+"__label"},u.map((t,c)=>{const r={};return d===t.value?(r.isPrimary=!0,r["aria-pressed"]=!0):(r.isSecondary=!0,r["aria-pressed"]=!1),Object(n.createElement)(i.Button,o()({key:`${t.label}-${t.value}-${c}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},r),t.label)})))}}t.a=Object(u.withInstanceId)(d)},82:function(e,t){e.exports=window.wp.viewport},847:function(e,t,c){"use strict";c.r(t),c.d(t,"blockSettings",(function(){return It}));var r=c(7),o=c.n(r),n=c(0),a=c(1),s=c(9),l=c(14),i=c(55),u=c(18),d=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"})),b=c(110),p=c(5),m=c.n(p),g={category:"woocommerce-product-elements",keywords:[Object(a.__)("WooCommerce",'woocommerce')],icon:{src:Object(n.createElement)(i.a,{srcElement:d}),foreground:"#7f54b3"},supports:{html:!1},parent:Object(b.a)()?void 0:["@woocommerce/all-products","@woocommerce/single-product"],save:e=>{let{attributes:t}=e;return Object(n.createElement)("div",{className:m()("is-loading",t.className)})},deprecated:[{attributes:{},save:()=>null}]},O=c(367),h=c(4),j=c(12),E=c(121),w=c(368),_=c(135);c(776);var f=function(e){let{className:t="",...c}=e;const r=m()("wc-block-text-toolbar-button",t);return Object(n.createElement)(h.Button,o()({className:r},c))},v=c(36);c(775);var k=e=>t=>c=>{const r=Object(v.useProductDataContext)(),{attributes:o,setAttributes:l}=c,{productId:i}=o,[u,d]=Object(n.useState)(!i);return r.hasContext?Object(n.createElement)(t,c):Object(n.createElement)(n.Fragment,null,u?Object(n.createElement)(h.Placeholder,{icon:e.icon||"",label:e.label||"",className:"wc-atomic-blocks-product"},!!e.description&&Object(n.createElement)("div",null,e.description),Object(n.createElement)("div",{className:"wc-atomic-blocks-product__selection"},Object(n.createElement)(_.a,{selected:i||0,showVariations:!0,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];l({productId:e[0]?e[0].id:0})}}),Object(n.createElement)(h.Button,{isSecondary:!0,disabled:!i,onClick:()=>{d(!1)}},Object(a.__)("Done",'woocommerce')))):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.BlockControls,null,Object(n.createElement)(h.ToolbarGroup,null,Object(n.createElement)(f,{onClick:()=>d(!0)},Object(a.__)("Switch product…",'woocommerce')))),Object(n.createElement)(t,c)))},y=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M17 3H7a2 2 0 00-2 2v16l7-3 7 3V5a2 2 0 00-2-2z"}));const C=Object(a.__)("Product Title",'woocommerce'),S=Object(n.createElement)(i.a,{srcElement:y}),x=Object(a.__)("Display the title of a product.",'woocommerce'),P=e=>{let{attributes:t,setAttributes:c}=e;const r=Object(s.useBlockProps)(),{headingLevel:o,showProductLink:l,align:i}=t;return Object(n.createElement)("div",r,Object(n.createElement)(s.BlockControls,null,Object(n.createElement)(E.a,{isCollapsed:!0,minLevel:1,maxLevel:7,selectedLevel:o,onChange:e=>c({headingLevel:e})}),Object(b.b)()&&Object(n.createElement)(s.AlignmentToolbar,{value:i,onChange:e=>{c({align:e})}})),Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Content",'woocommerce')},Object(n.createElement)(h.ToggleControl,{label:Object(a.__)("Link to Product Page",'woocommerce'),help:Object(a.__)("Links the image to the single product listing.",'woocommerce'),checked:l,onChange:()=>c({showProductLink:!l})}))),Object(n.createElement)(h.Disabled,null,Object(n.createElement)(w.a,t)))};var N=Object(b.b)()?Object(j.compose)([k({icon:S,label:C,description:Object(a.__)("Choose a product to display its title.",'woocommerce')})])(P):P;const T={...g,apiVersion:2,title:C,description:x,icon:{src:S,foreground:"#7f54b3"},attributes:O.a,edit:N,supports:Object(b.b)()?{html:!1,color:{background:!1},typography:{fontSize:!0}}:g.supports};Object(l.registerBlockType)("woocommerce/product-title",T);var R=c(477),I=c(328);const A=Object(a.__)("Product Price",'woocommerce'),B=Object(n.createElement)(i.a,{srcElement:I.a}),L=Object(a.__)("Display the price of a product.",'woocommerce'),V=e=>{let{fontSize:t,setFontSize:c,color:r,setColor:o,colorLabel:l}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.FontSizePicker,{value:t.size,onChange:c}),Object(n.createElement)(h.BaseControl,{label:l},Object(n.createElement)(s.ColorPalette,{value:r.color,onChange:o,label:Object(a.__)("Color",'woocommerce')})))},z=e=>{let{fontSize:t,saleFontSize:c,setFontSize:r,setSaleFontSize:o,color:l,saleColor:i,setColor:u,setSaleColor:d,attributes:p,setAttributes:m}=e;const{align:g}=p;return Object(n.createElement)(n.Fragment,null,Object(b.b)()&&Object(n.createElement)(s.BlockControls,null,Object(n.createElement)(s.AlignmentToolbar,{value:g,onChange:e=>{m({align:e})}})),Object(n.createElement)(s.InspectorControls,null,Object(b.b)()&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Price",'woocommerce')},Object(n.createElement)(V,{color:l,setColor:u,fontSize:t,setFontSize:r,colorLabel:Object(a.__)("Color",'woocommerce')})),Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Sale price",'woocommerce')},Object(n.createElement)(V,{color:i,setColor:d,fontSize:c,setFontSize:o,colorLabel:Object(a.__)("Color",'woocommerce')})))),Object(n.createElement)(R.default,p))};var D=Object(b.b)()?Object(j.compose)([Object(s.withFontSizes)("fontSize"),Object(s.withFontSizes)("saleFontSize"),Object(s.withFontSizes)("originalFontSize"),Object(s.withColors)("color",{textColor:"color"}),Object(s.withColors)("saleColor",{textColor:"saleColor"}),Object(s.withColors)("originalColor",{textColor:"originalColor"}),k({icon:B,label:A,description:Object(a.__)("Choose a product to display its price.",'woocommerce')})])(z):z;let F={productId:{type:"number",default:0}};Object(b.b)()&&(F={...F,align:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},saleFontSize:{type:"string"},customSaleFontSize:{type:"number"},color:{type:"string"},saleColor:{type:"string"},customColor:{type:"string"},customSaleColor:{type:"string"}});const M={title:A,description:L,icon:{src:B,foreground:"#7f54b3"},attributes:F,edit:D};Object(l.registerBlockType)("woocommerce/product-price",{...g,...M});var H=c(371),G=c(80),q=c(3),Q=c(372),Y=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"}));const U=Object(a.__)("Product Image",'woocommerce'),W=Object(n.createElement)(i.a,{srcElement:Y}),K=Object(a.__)("Display the main product image",'woocommerce');var $=k({icon:W,label:U,description:Object(a.__)("Choose a product to display its image.",'woocommerce')})(e=>{let{attributes:t,setAttributes:c}=e;const{showProductLink:r,imageSizing:o,showSaleBadge:l,saleBadgeAlign:i}=t;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Content",'woocommerce')},Object(n.createElement)(h.ToggleControl,{label:Object(a.__)("Link to Product Page",'woocommerce'),help:Object(a.__)("Links the image to the single product listing.",'woocommerce'),checked:r,onChange:()=>c({showProductLink:!r})}),Object(n.createElement)(h.ToggleControl,{label:Object(a.__)("Show On-Sale Badge",'woocommerce'),help:Object(a.__)('Overlay a "sale" badge if the product is on-sale.','woocommerce'),checked:l,onChange:()=>c({showSaleBadge:!l})}),l&&Object(n.createElement)(G.a,{label:Object(a.__)("Sale Badge Alignment",'woocommerce'),value:i,options:[{label:Object(a.__)("Left",'woocommerce'),value:"left"},{label:Object(a.__)("Center",'woocommerce'),value:"center"},{label:Object(a.__)("Right",'woocommerce'),value:"right"}],onChange:e=>c({saleBadgeAlign:e})}),Object(n.createElement)(G.a,{label:Object(a.__)("Image Sizing",'woocommerce'),help:Object(n.createInterpolateElement)(Object(a.__)("Product image cropping can be modified in the <a>Customizer</a>.",'woocommerce'),{a:Object(n.createElement)("a",{href:Object(q.getAdminLink)("customize.php")+"?autofocus[panel]=woocommerce&autofocus[section]=woocommerce_product_images",target:"_blank",rel:"noopener noreferrer"})}),value:o,options:[{label:Object(a.__)("Full Size",'woocommerce'),value:"full-size"},{label:Object(a.__)("Cropped",'woocommerce'),value:"cropped"}],onChange:e=>c({imageSizing:e})}))),Object(n.createElement)(h.Disabled,null,Object(n.createElement)(Q.a,t)))});const J={title:U,description:K,icon:{src:W,foreground:"#7f54b3"},attributes:H.a,edit:$};Object(l.registerBlockType)("woocommerce/product-image",{...g,...J});var X=c(478),Z=c(761);const ee=Object(a.__)("Product Rating",'woocommerce'),te=Object(n.createElement)(i.a,{srcElement:Z.a}),ce={title:ee,description:Object(a.__)("Display the average rating of a product.",'woocommerce'),icon:{src:te,foreground:"#7f54b3"},attributes:{productId:{type:"number",default:0}},edit:k({icon:te,label:ee,description:Object(a.__)("Choose a product to display its rating.",'woocommerce')})(e=>{let{attributes:t}=e;return Object(n.createElement)(X.default,t)})};Object(l.registerBlockType)("woocommerce/product-rating",{...g,...ce});var re=c(479),oe=c(329);const ne=Object(a.__)("Add to Cart Button",'woocommerce'),ae=Object(n.createElement)(i.a,{srcElement:oe.a}),se={title:ne,description:Object(a.__)("Display a call to action button which either adds the product to the cart, or links to the product page.",'woocommerce'),icon:{src:ae,foreground:"#7f54b3"},attributes:{productId:{type:"number",default:0}},edit:k({icon:ae,label:ne,description:Object(a.__)("Choose a product to display its add to cart button.",'woocommerce')})(e=>{let{attributes:t}=e;return Object(n.createElement)(h.Disabled,null,Object(n.createElement)(re.default,t))})};Object(l.registerBlockType)("woocommerce/product-button",{...g,...se});var le=c(481),ie=c(778);const ue=Object(a.__)("Product Summary",'woocommerce'),de=Object(n.createElement)(i.a,{srcElement:ie.a}),be={title:ue,description:Object(a.__)("Display a short description about a product.",'woocommerce'),icon:{src:de,foreground:"#7f54b3"},attributes:{productId:{type:"number",default:0}},edit:k({icon:de,label:ue,description:Object(a.__)("Choose a product to display its short description.",'woocommerce')})(e=>{let{attributes:t}=e;return Object(n.createElement)(le.default,t)})};Object(l.registerBlockType)("woocommerce/product-summary",{...g,...be});var pe=c(274),me=c(753);const ge=Object(a.__)("On-Sale Badge",'woocommerce'),Oe=Object(n.createElement)(i.a,{srcElement:me.a}),he={title:ge,description:Object(a.__)("Displays an on-sale badge if the product is on-sale.",'woocommerce'),icon:{src:Oe,foreground:"#7f54b3"},supports:{html:!1},attributes:{productId:{type:"number",default:0}},edit:k({icon:Oe,label:ge,description:Object(a.__)("Choose a product to display its sale-badge.",'woocommerce')})(e=>{let{attributes:t}=e;return Object(n.createElement)(pe.default,t)})};Object(l.registerBlockType)("woocommerce/product-sale-badge",{...g,...he});var je=c(125),Ee=c(482),we=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M2 6h2v12H2V6m3 0h1v12H5V6m2 0h3v12H7V6m4 0h1v12h-1V6m3 0h2v12h-2V6m3 0h3v12h-3V6m4 0h1v12h-1V6z"}));const _e=Object(a.__)("Product SKU",'woocommerce'),fe=Object(n.createElement)(i.a,{srcElement:we}),ve={title:_e,description:Object(a.__)("Display the SKU of a product.",'woocommerce'),icon:{src:fe,foreground:"#7f54b3"},attributes:{productId:{type:"number",default:0}},edit:k({icon:fe,label:_e,description:Object(a.__)("Choose a product to display its SKU.",'woocommerce')})(e=>{let{attributes:t}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(je.a,null),Object(n.createElement)(Ee.default,t))})};Object(b.c)("woocommerce/product-sku",{...g,...ve});var ke=c(483),ye=c(746);const Ce=Object(a.__)("Product Category List",'woocommerce'),Se=Object(n.createElement)(i.a,{srcElement:ye.a}),xe=Object(a.__)("Display a list of categories belonging to a product.",'woocommerce');var Pe=k({icon:Se,label:Ce,description:Object(a.__)("Choose a product to display its categories.",'woocommerce')})(e=>{let{attributes:t}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(je.a,null),Object(n.createElement)(h.Disabled,null,Object(n.createElement)(ke.default,t)))});const Ne={...g,title:Ce,description:xe,icon:{src:Se,foreground:"#7f54b3"},attributes:{productId:{type:"number",default:0}},edit:Pe};Object(b.c)("woocommerce/product-category-list",Ne);var Te=c(484);const Re=Object(a.__)("Product Tag List",'woocommerce'),Ie=Object(n.createElement)(i.a,{srcElement:me.a}),Ae={title:Re,description:Object(a.__)("Display a list of tags belonging to a product.",'woocommerce'),icon:{src:Ie,foreground:"#7f54b3"},attributes:{productId:{type:"number",default:0}},edit:k({icon:Ie,label:Re,description:Object(a.__)("Choose a product to display its tags.",'woocommerce')})(e=>{let{attributes:t}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(je.a,null),Object(n.createElement)(h.Disabled,null,Object(n.createElement)(Te.default,t)))})};Object(b.c)("woocommerce/product-tag-list",{...g,...Ae});var Be=c(485),Le=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("g",{fillRule:"evenodd"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{fillRule:"nonzero",d:"M20.5 5.2l-1.4-1.7C19 3.3 18.5 3 18 3H6c-.5 0-.9.2-1.2.5L3.5 5.3A2 2 0 003 6.5V19c0 1.1.9 2 2 2h14a2 2 0 002-2V6.5c0-.5-.2-1-.5-1.3zM6.2 5h11.6l.8 1H5.4l.8-1zM5 19V8h14v11H5z"})));const Ve=Object(a.__)("Product Stock Indicator",'woocommerce'),ze=Object(n.createElement)(i.a,{srcElement:Le}),De={title:Ve,description:Object(a.__)("Display product stock status.",'woocommerce'),icon:{src:ze,foreground:"#7f54b3"},attributes:{productId:{type:"number",default:0}},edit:k({icon:ze,label:Ve,description:Object(a.__)("Choose a product to display its stock.",'woocommerce')})(e=>{let{attributes:t}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(je.a,null),Object(n.createElement)(Be.default,t))})};Object(b.c)("woocommerce/product-stock-indicator",{...g,...De});var Fe=c(879),Me=(c(366),c(375));const He=Object(a.__)("Add to Cart",'woocommerce'),Ge=Object(n.createElement)(i.a,{srcElement:oe.a}),qe={title:He,description:Object(a.__)("Displays an add to cart button. Optionally displays other add to cart form elements.",'woocommerce'),icon:{src:Ge,foreground:"#7f54b3"},edit:k({icon:Ge,label:He,description:Object(a.__)("Choose a product to display its add to cart form.",'woocommerce')})(e=>{let{attributes:t,setAttributes:c}=e;const{product:r}=Object(v.useProductDataContext)(),{className:o,showFormElements:l}=t;return Object(n.createElement)("div",{className:m()(o,"wc-block-components-product-add-to-cart")},Object(n.createElement)(je.a,{productId:r.id}),Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Layout",'woocommerce')},Object(Fe.b)(r)?Object(n.createElement)(h.ToggleControl,{label:Object(a.__)("Display form elements",'woocommerce'),help:Object(a.__)("Depending on product type, allow customers to select a quantity, variations etc.",'woocommerce'),checked:l,onChange:()=>c({showFormElements:!l})}):Object(n.createElement)(h.Notice,{className:"wc-block-components-product-add-to-cart-notice",isDismissible:!1,status:"info"},Object(a.__)("This product does not support the block based add to cart form. A link to the product page will be shown instead.",'woocommerce')))),Object(n.createElement)(h.Disabled,null,Object(n.createElement)(Me.a,t)))}),attributes:c(374).a};Object(b.c)("woocommerce/product-add-to-cart",{...g,...qe});var Qe=c(16),Ye=c.n(Qe),Ue=c(10),We=(c(2),c(85)),Ke=c(875),$e=c(762),Je=c(32);const Xe=(e,t)=>{const{className:c,contentVisibility:r}=t;return m()(e,c,{"has-image":r&&r.image,"has-title":r&&r.title,"has-rating":r&&r.rating,"has-price":r&&r.price,"has-button":r&&r.button})};var Ze=c(161);const et=[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],tt=e=>e&&0!==e.length?e.map(e=>[e.name,{...e.attributes,product:void 0,children:e.innerBlocks.length>0?tt(e.innerBlocks):[]}]):[];var ct=c(8),rt=c(6),ot=c(37);c(782);const nt=e=>{let{currentPage:t,displayFirstAndLastPages:c,displayNextAndPreviousArrows:r,pagesToDisplay:o,onPageChange:s,totalPages:l}=e,{minIndex:i,maxIndex:u}=((e,t,c)=>{if(c<=2)return{minIndex:null,maxIndex:null};const r=e-1,o=Math.max(Math.floor(t-r/2),2),n=Math.min(Math.ceil(t+(r-(t-o))),c-1);return{minIndex:Math.max(Math.floor(t-(r-(n-t))),2),maxIndex:n}})(o,t,l);const d=c&&Boolean(1!==i),b=c&&Boolean(u!==l),p=c&&Boolean(i>3),g=c&&Boolean(u<l-2);d&&3===i&&(i-=1),b&&u===l-2&&(u+=1);const O=[];if(i&&u)for(let e=i;e<=u;e++)O.push(e);return Object(n.createElement)("div",{className:"wc-block-pagination wc-block-components-pagination"},Object(n.createElement)(ot.a,{screenReaderLabel:Object(a.__)("Navigate to another page",'woocommerce')}),r&&Object(n.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page wc-block-components-pagination-page--arrow",onClick:()=>s(t-1),title:Object(a.__)("Previous page",'woocommerce'),disabled:t<=1},Object(n.createElement)(ot.a,{label:"←",screenReaderLabel:Object(a.__)("Previous page",'woocommerce')})),d&&Object(n.createElement)("button",{className:m()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:()=>s(1),disabled:1===t},Object(n.createElement)(ot.a,{label:1,screenReaderLabel:Object(a.sprintf)( /* translators: %d is the page number (1, 2, 3...). */ Object(a.__)("Page %d",'woocommerce'),1)})),p&&Object(n.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(a.__)("…",'woocommerce')),O.map(e=>Object(n.createElement)("button",{key:e,className:m()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:()=>s(e),disabled:t===e},Object(n.createElement)(ot.a,{label:e,screenReaderLabel:Object(a.sprintf)( /* translators: %d is the page number (1, 2, 3...). */ Object(a.__)("Page %d",'woocommerce'),e)}))),g&&Object(n.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(a.__)("…",'woocommerce')),b&&Object(n.createElement)("button",{className:m()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===l,"wc-block-components-pagination__page--active":t===l}),onClick:()=>s(l),disabled:t===l},Object(n.createElement)(ot.a,{label:l,screenReaderLabel:Object(a.sprintf)( /* translators: %d is the page number (1, 2, 3...). */ Object(a.__)("Page %d",'woocommerce'),l)})),r&&Object(n.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page wc-block-components-pagination-page--arrow",onClick:()=>s(t+1),title:Object(a.__)("Next page",'woocommerce'),disabled:t>=l},Object(n.createElement)(ot.a,{label:"→",screenReaderLabel:Object(a.__)("Next page",'woocommerce')})))};nt.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var at=nt,st=c(142),lt=c(102),it=c(149),ut=c(19),dt=c(52);var bt=c(75);c(783);const pt=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};var mt=c(62),gt=c(136),Ot=()=>{const{parentClassName:e}=Object(v.useInnerBlockLayoutContext)();return Object(n.createElement)("div",{className:e+"__no-products"},Object(n.createElement)(i.a,{className:e+"__no-products-image",alt:"",srcElement:gt.a,size:100}),Object(n.createElement)("strong",{className:e+"__no-products-title"},Object(a.__)("No products",'woocommerce')),Object(n.createElement)("p",{className:e+"__no-products-description"},Object(a.__)("There are currently no products available to display.",'woocommerce')))},ht=c(767),jt=e=>{let{resetCallback:t=(()=>{})}=e;const{parentClassName:c}=Object(v.useInnerBlockLayoutContext)();return Object(n.createElement)("div",{className:c+"__no-products"},Object(n.createElement)(i.a,{className:c+"__no-products-image",alt:"",srcElement:ht.a,size:100}),Object(n.createElement)("strong",{className:c+"__no-products-title"},Object(a.__)("No products found",'woocommerce')),Object(n.createElement)("p",{className:c+"__no-products-description"},Object(a.__)("We were unable to find any results based on your search.",'woocommerce')),Object(n.createElement)("button",{onClick:t},Object(a.__)("Reset Search",'woocommerce')))},Et=c(138);c(781);var wt=e=>{let{onChange:t,readOnly:c,value:r}=e;return Object(n.createElement)(Et.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",name:"orderby",onChange:t,options:[{key:"menu_order",label:Object(a.__)("Default sorting",'woocommerce')},{key:"popularity",label:Object(a.__)("Popularity",'woocommerce')},{key:"rating",label:Object(a.__)("Average rating",'woocommerce')},{key:"date",label:Object(a.__)("Latest",'woocommerce')},{key:"price",label:Object(a.__)("Price: low to high",'woocommerce')},{key:"price-desc",label:Object(a.__)("Price: high to low",'woocommerce')}],readOnly:c,screenReaderLabel:Object(a.__)("Order products by",'woocommerce'),value:r})};const _t=(e,t,c,r)=>{if(!c)return;const a=Object(Ke.a)(e);return c.map((c,s)=>{let[l,i={}]=c,u=[];i.children&&i.children.length>0&&(u=_t(e,t,i.children,r));const d=a[l];if(!d)return null;const b=t.id||0,p=["layout",l,s,r,b];return Object(n.createElement)(n.Suspense,{key:p.join("_"),fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(d,o()({},i,{children:u,product:t})))})};var ft=Object(j.withInstanceId)(e=>{let{product:t,attributes:c,instanceId:r}=e;const{layoutConfig:o}=c,{parentClassName:a,parentName:s}=Object(v.useInnerBlockLayoutContext)(),l=0===Object.keys(t).length,i=m()(a+"__product","wc-block-layout",{"is-loading":l});return Object(n.createElement)("li",{className:i,"aria-hidden":l},_t(s,t,o,r))});c(780);const vt=function(e){let{totalQuery:t,totalProducts:c}=e,{totalQuery:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!Object(rt.isEqual)(t,r)&&Number.isFinite(c)};var kt,yt=(kt=e=>{let{attributes:t,currentPage:c,onPageChange:r,onSortChange:o,sortValue:s,scrollToTop:l}=e;const[i,u]=Object(lt.b)("attributes",[]),[d,b]=Object(lt.b)("stock_status",[]),[p,g]=Object(lt.b)("min_price"),[O,h]=Object(lt.b)("max_price"),[j]=Object(lt.c)((e=>{let{sortValue:t,currentPage:c,attributes:r}=e;const{columns:o,rows:n}=r;return{...(e=>{switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}})(t),catalog_visibility:"catalog",per_page:o*n,page:c}})({attributes:t,sortValue:s,currentPage:c})),{products:E,totalProducts:w,productsLoading:_}=(e=>{const t={namespace:"/wc/store",resourceName:"products"},{results:c,isLoading:r}=Object(it.a)({...t,query:e}),{value:o}=((e,t)=>{const{namespace:c,resourceName:r,resourceValues:o=[],query:n={}}=t;if(!c||!r)throw new Error("The options object must have valid values for the namespace and the resource name properties.");const a=Object(dt.a)(n),s=Object(dt.a)(o),{value:l,isLoading:i=!0}=Object(Ue.useSelect)(e=>{const t=e(ut.COLLECTIONS_STORE_KEY),o=["x-wp-total",c,r,a,s];return{value:t.getCollectionHeader(...o),isLoading:t.hasFinishedResolution("getCollectionHeader",o)}},["x-wp-total",c,r,s,a]);return{value:l,isLoading:i}})(0,{...t,query:e});return{products:c,totalProducts:parseInt(o,10),productsLoading:r}})(j),{parentClassName:f,parentName:k}=Object(v.useInnerBlockLayoutContext)(),y=(e=>{const{order:t,orderby:c,page:r,per_page:o,...n}=e;return n||{}})(j),{dispatchStoreEvent:C}=Object(bt.a)(),S=Object(st.a)({totalQuery:y,totalProducts:w},vt);Object(n.useEffect)(()=>{C("product-list-render",{products:E,listName:k})},[E,k,C]),Object(n.useEffect)(()=>{Object(rt.isEqual)(y,null==S?void 0:S.totalQuery)||(r(1),null!=S&&S.totalQuery&&(e=>{Number.isFinite(e)&&(0===e?Object(mt.speak)(Object(a.__)("No products found",'woocommerce')):Object(mt.speak)(Object(a.sprintf)( /* translators: %s is an integer higher than 0 (1, 2, 3...) */ Object(a._n)("%d product found","%d products found",e,'woocommerce'),e)))})(w))},[null==S?void 0:S.totalQuery,w,r,y]);const{contentVisibility:x}=t,P=t.columns*t.rows,N=!Number.isFinite(w)&&Number.isFinite(null==S?void 0:S.totalProducts)&&Object(rt.isEqual)(y,null==S?void 0:S.totalQuery)?Math.ceil(S.totalProducts/P):Math.ceil(w/P),T=E.length?E:Array.from({length:P}),R=0!==E.length||_,I=i.length>0||d.length>0||Number.isFinite(p)||Number.isFinite(O);return Object(n.createElement)("div",{className:(()=>{const{columns:e,rows:c,alignButtons:r,align:o}=t,n=void 0!==o?"align"+o:"";return m()(f,n,"has-"+e+"-columns",{"has-multiple-rows":c>1,"has-aligned-buttons":r})})()},x.orderBy&&R&&Object(n.createElement)(wt,{onChange:o,value:s}),!R&&I&&Object(n.createElement)(jt,{resetCallback:()=>{u([]),b([]),g(null),h(null)}}),!R&&!I&&Object(n.createElement)(Ot,null),R&&Object(n.createElement)("ul",{className:f+"__products"},T.map((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=arguments.length>1?arguments[1]:void 0;return Object(n.createElement)(ft,{key:e.id||c,attributes:t,product:e})}))),N>1&&Object(n.createElement)(at,{currentPage:c,onPageChange:e=>{l({focusableSelector:"a, button"}),r(e)},totalPages:N}))},e=>{const t=Object(n.useRef)(null);return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:t,"aria-hidden":!0}),Object(n.createElement)(kt,o()({},e,{scrollToTop:e=>{null!==t.current&&((e,t)=>{const{focusableSelector:c}=t||{};window&&Number.isFinite(window.innerHeight)&&(c?((e,t)=>{var c;const r=(null===(c=e.parentElement)||void 0===c?void 0:c.querySelectorAll(t))||[];if(r.length){const e=r[0];pt(e),null==e||e.focus()}else pt(e)})(e,c):pt(e))})(t.current,e)}})))}),Ct=e=>{let{attributes:t}=e;const[c,r]=Object(n.useState)(1),[o,a]=Object(n.useState)(t.orderby);return Object(n.useEffect)(()=>{a(t.orderby)},[t.orderby]),Object(n.createElement)(yt,{attributes:t,currentPage:c,onPageChange:e=>{r(e)},onSortChange:e=>{const t=e.target.value;a(t),r(1)},sortValue:o})},St=c(172);class xt extends ct.Component{render(){const{attributes:e,urlParameterSuffix:t}=this.props;return e.isPreview?St.a:Object(n.createElement)(v.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(n.createElement)(Ct,{attributes:e,urlParameterSuffix:t}))}}var Pt=xt;c(779);class Nt extends n.Component{constructor(){super(...arguments),Ye()(this,"state",{isEditing:!1,innerBlocks:[]}),Ye()(this,"blockMap",Object(Ke.a)("woocommerce/all-products")),Ye()(this,"componentDidMount",()=>{const{block:e}=this.props;this.setState({innerBlocks:e.innerBlocks})}),Ye()(this,"getTitle",()=>Object(a.__)("All Products",'woocommerce')),Ye()(this,"getIcon",()=>Object(n.createElement)(i.a,{srcElement:d})),Ye()(this,"togglePreview",()=>{const{debouncedSpeak:e}=this.props;this.setState({isEditing:!this.state.isEditing}),this.state.isEditing||e(Object(a.__)("Showing All Products block preview.",'woocommerce'))}),Ye()(this,"getInspectorControls",()=>{const{attributes:e,setAttributes:t}=this.props,{columns:c,rows:r,alignButtons:o}=e;return Object(n.createElement)(s.InspectorControls,{key:"inspector"},Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Layout Settings",'woocommerce'),initialOpen:!0},Object(n.createElement)(We.a,{columns:c,rows:r,alignButtons:o,setAttributes:t,minColumns:Object(q.getSetting)("min_columns",1),maxColumns:Object(q.getSetting)("max_columns",6),minRows:Object(q.getSetting)("min_rows",1),maxRows:Object(q.getSetting)("max_rows",6)})),Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Content Settings",'woocommerce')},((e,t)=>{const{contentVisibility:c}=e;return Object(n.createElement)(h.ToggleControl,{label:Object(a.__)("Show Sorting Dropdown",'woocommerce'),checked:c.orderBy,onChange:()=>t({contentVisibility:{...c,orderBy:!c.orderBy}})})})(e,t),((e,t)=>Object(n.createElement)(h.SelectControl,{label:Object(a.__)("Order Products By",'woocommerce'),value:e.orderby,options:[{label:Object(a.__)("Default sorting (menu order)",'woocommerce'),value:"menu_order"},{label:Object(a.__)("Popularity",'woocommerce'),value:"popularity"},{label:Object(a.__)("Average rating",'woocommerce'),value:"rating"},{label:Object(a.__)("Latest",'woocommerce'),value:"date"},{label:Object(a.__)("Price: low to high",'woocommerce'),value:"price"},{label:Object(a.__)("Price: high to low",'woocommerce'),value:"price-desc"}],onChange:e=>t({orderby:e})}))(e,t)))}),Ye()(this,"getBlockControls",()=>{const{isEditing:e}=this.state;return Object(n.createElement)(s.BlockControls,null,Object(n.createElement)(h.ToolbarGroup,{controls:[{icon:"edit",title:Object(a.__)("Edit inner product layout",'woocommerce'),onClick:()=>this.togglePreview(),isActive:e}]}))}),Ye()(this,"renderEditMode",()=>{const e={template:this.props.attributes.layoutConfig,templateLock:!1,allowedBlocks:Object.keys(this.blockMap)};return 0!==this.props.attributes.layoutConfig.length&&(e.renderAppender=!1),Object(n.createElement)(h.Placeholder,{icon:this.getIcon(),label:this.getTitle()},Object(a.__)("Display all products from your store as a grid.",'woocommerce'),Object(n.createElement)("div",{className:"wc-block-all-products-grid-item-template"},Object(n.createElement)(h.Tip,null,Object(a.__)("Edit the blocks inside the preview below to change the content displayed for each product within the product grid.",'woocommerce')),Object(n.createElement)(v.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(n.createElement)("div",{className:"wc-block-grid wc-block-layout has-1-columns"},Object(n.createElement)("ul",{className:"wc-block-grid__products"},Object(n.createElement)("li",{className:"wc-block-grid__product"},Object(n.createElement)(v.ProductDataContextProvider,{product:$e.a[0]},Object(n.createElement)(s.InnerBlocks,e)))))),Object(n.createElement)("div",{className:"wc-block-all-products__actions"},Object(n.createElement)(h.Button,{className:"wc-block-all-products__done-button",isPrimary:!0,onClick:()=>{const{block:e,setAttributes:t}=this.props;t({layoutConfig:tt(e.innerBlocks)}),this.setState({innerBlocks:e.innerBlocks}),this.togglePreview()}},Object(a.__)("Done",'woocommerce')),Object(n.createElement)(h.Button,{className:"wc-block-all-products__cancel-button",isTertiary:!0,onClick:()=>{const{block:e,replaceInnerBlocks:t}=this.props,{innerBlocks:c}=this.state;t(e.clientId,c,!1),this.togglePreview()}},Object(a.__)("Cancel",'woocommerce')),Object(n.createElement)(h.Button,{className:"wc-block-all-products__reset-button",icon:Object(n.createElement)(i.a,{srcElement:d}),label:Object(a.__)("Reset layout to default",'woocommerce'),onClick:()=>{const{block:e,replaceInnerBlocks:t}=this.props,c=[];et.map(e=>{let[t,r]=e;return c.push(Object(l.createBlock)(t,r)),!0}),t(e.clientId,c,!1),this.setState({innerBlocks:e.innerBlocks})}},Object(a.__)("Reset Layout",'woocommerce')))))}),Ye()(this,"renderViewMode",()=>{const{attributes:e}=this.props,{layoutConfig:t}=e,c=t&&0!==t.length,r=this.getTitle(),o=this.getIcon();return c?Object(n.createElement)(h.Disabled,null,Object(n.createElement)(Pt,{attributes:e})):((e,t)=>Object(n.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(a.__)("The content for this block is hidden due to block settings.",'woocommerce')))(r,o)}),Ye()(this,"render",()=>{const{attributes:e}=this.props,{isEditing:t}=this.state,c=this.getTitle(),r=this.getIcon();return 0===Je.o.productCount?((e,t)=>Object(n.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(n.createElement)("p",null,Object(a.__)("You haven't published any products to list here yet.",'woocommerce')),Object(n.createElement)(h.Button,{className:"wc-block-products__add-product-button",isSecondary:!0,href:q.ADMIN_URL+"post-new.php?post_type=product"},Object(a.__)("Add new product",'woocommerce')+" ",Object(n.createElement)(i.a,{srcElement:Ze.a})),Object(n.createElement)(h.Button,{className:"wc-block-products__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-products/"},Object(a.__)("Learn more",'woocommerce'))))(c,r):Object(n.createElement)("div",{className:Xe("wc-block-all-products",e)},this.getBlockControls(),this.getInspectorControls(),t?this.renderEditMode():this.renderViewMode())})}}var Tt=Object(j.compose)(h.withSpokenMessages,Object(Ue.withSelect)((e,t)=>{let{clientId:c}=t;const{getBlock:r}=e("core/block-editor");return{block:r(c)}}),Object(Ue.withDispatch)(e=>{const{replaceInnerBlocks:t}=e("core/block-editor");return{replaceInnerBlocks:t}}))(Nt);const Rt={columns:Object(q.getSetting)("default_columns",3),rows:Object(q.getSetting)("default_rows",3),alignButtons:!1,contentVisibility:{orderBy:!0},orderby:"date",layoutConfig:et,isPreview:!1},It={title:Object(a.__)("All Products",'woocommerce'),icon:{src:Object(n.createElement)(i.a,{srcElement:d}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce",'woocommerce')],description:Object(a.__)("Display products from your store in a grid layout.",'woocommerce'),supports:{align:["wide","full"],html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:{columns:{type:"number"},rows:{type:"number"},alignButtons:{type:"boolean"},contentVisibility:{type:"object"},orderby:{type:"string"},layoutConfig:{type:"array"},isPreview:{type:"boolean",default:!1}},defaults:Rt,edit:e=>Object(n.createElement)(Tt,e),save(e){let{attributes:t}=e;const c={};Object.keys(t).sort().forEach(e=>{c[e]=t[e]});const r={"data-attributes":JSON.stringify(c)};return Object(n.createElement)("div",o()({className:Xe("wc-block-all-products",t)},r),Object(n.createElement)(s.InnerBlocks.Content,null))}};Object(l.registerBlockType)("woocommerce/all-products",{...It,deprecated:[{attributes:Object.assign({},It.attributes,{rows:{type:"number",default:1}}),save(e){let{attributes:t}=e;const c={"data-attributes":JSON.stringify(t)};return Object(n.createElement)("div",o()({className:Xe("wc-block-all-products",t)},c),Object(n.createElement)(s.InnerBlocks.Content,null))}}]})},85:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(6),a=(c(2),c(4));t.a=e=>{let{columns:t,rows:c,setAttributes:s,alignButtons:l,minColumns:i=1,maxColumns:u=6,minRows:d=1,maxRows:b=6}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(a.RangeControl,{label:Object(o.__)("Columns",'woocommerce'),value:t,onChange:e=>{const t=Object(n.clamp)(e,i,u);s({columns:Number.isNaN(t)?"":t})},min:i,max:u}),Object(r.createElement)(a.RangeControl,{label:Object(o.__)("Rows",'woocommerce'),value:c,onChange:e=>{const t=Object(n.clamp)(e,d,b);s({rows:Number.isNaN(t)?"":t})},min:d,max:b}),Object(r.createElement)(a.ToggleControl,{label:Object(o.__)("Align Last Block",'woocommerce'),help:l?Object(o.__)("The last inner block will be aligned vertically.",'woocommerce'):Object(o.__)("The last inner block will follow other content.",'woocommerce'),checked:l,onChange:()=>s({alignButtons:!l})}))}},875:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(47),o=c(0),n=c(32);c.p=n.l,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)(()=>Promise.all([c.e(0),c.e(11)]).then(c.bind(null,477)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)(()=>Promise.all([c.e(1),c.e(3),c.e(10)]).then(c.bind(null,901)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)(()=>Promise.all([c.e(1),c.e(17)]).then(c.bind(null,902)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)(()=>c.e(12).then(c.bind(null,478)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)(()=>Promise.all([c.e(0),c.e(1),c.e(2),c.e(8)]).then(c.bind(null,479)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)(()=>c.e(15).then(c.bind(null,481)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)(()=>c.e(3).then(c.bind(null,274)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)(()=>c.e(13).then(c.bind(null,482)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)(()=>c.e(9).then(c.bind(null,483)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)(()=>c.e(16).then(c.bind(null,484)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)(()=>c.e(14).then(c.bind(null,485)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)(()=>Promise.all([c.e(0),c.e(1),c.e(2),c.e(7)]).then(c.bind(null,903)))});const a=e=>Object(r.getRegisteredBlockComponents)(e)},879:function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return o}));const r=e=>e.is_purchasable||!1,o=e=>["simple","variable"].includes(e.type||"simple")},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor}});