(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[44],{114:function(t,e,c){"use strict";c.d(e,"a",(function(){return o})),c(103);var n=c(47);const o=()=>n.m>1},135:function(t,e,c){"use strict";c.d(e,"c",(function(){return i})),c.d(e,"d",(function(){return l})),c.d(e,"b",(function(){return u})),c.d(e,"a",(function(){return d}));var n=c(72),o=c(114),r=c(61),s=c(63);const a=t=>Object(r.a)(t)?JSON.parse(t)||{}:Object(s.a)(t)?t:{},i=t=>{if(!Object(o.a)()||"function"!=typeof n.__experimentalGetSpacingClassesAndStyles)return{style:{}};const e=Object(s.a)(t)?t:{},c=a(e.style);return Object(n.__experimentalGetSpacingClassesAndStyles)({...e,style:c})},l=t=>{const e=Object(s.a)(t)?t:{},c=a(e.style),n=Object(s.a)(c.typography)?c.typography:{};return{style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:n.fontSize,lineHeight:n.lineHeight,fontWeight:n.fontWeight,textTransform:n.textTransform,fontFamily:e.fontFamily}}},u=t=>{if(!Object(o.a)())return{className:"",style:{}};const e=Object(s.a)(t)?t:{},c=a(e.style);return Object(n.__experimentalUseColorProps)({...e,style:c})},d=t=>{if(!Object(o.a)())return{className:"",style:{}};const e=Object(s.a)(t)?t:{},c=a(e.style);return Object(n.__experimentalUseBorderProps)({...e,style:c})}},331:function(t,e){},332:function(t,e,c){"use strict";c.d(e,"a",(function(){return u}));var n=c(0),o=c(9),r=c(5),s=c(19),a=c(29),i=c(39);const l=(t,e)=>{const c=t.find(t=>{let{id:c}=t;return c===e});return c?c.quantity:0},u=t=>{const{addItemToCart:e}=Object(o.useDispatch)(r.CART_STORE_KEY),{cartItems:c,cartIsLoading:u}=Object(a.a)(),{addErrorNotice:d,removeNotice:b}=Object(i.a)(),[p,f]=Object(n.useState)(!1),y=Object(n.useRef)(l(c,t));return Object(n.useEffect)(()=>{const e=l(c,t);e!==y.current&&(y.current=e)},[c,t]),{cartQuantity:Number.isFinite(y.current)?y.current:0,addingToCart:p,cartIsLoading:u,addToCart:function(){let c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return f(!0),e(t,c).then(()=>{b("add-to-cart")}).catch(t=>{d(Object(s.decodeEntities)(t.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})}).finally(()=>{f(!1)})}}}},379:function(t,e,c){"use strict";c.r(e);var n=c(10),o=c.n(n),r=c(0),s=(c(8),c(4)),a=c.n(s),i=c(1),l=c(31),u=c(332),d=c(19),b=c(47),p=c(2),f=c(46),y=c(118),O=(c(331),c(135));const j=t=>{let{product:e,colorStyles:c,borderStyles:n,typographyStyles:s,spacingStyles:f}=t;const{id:y,permalink:O,add_to_cart:j,has_options:m,is_purchasable:g,is_in_stock:_}=e,{dispatchStoreEvent:S}=Object(l.a)(),{cartQuantity:h,addingToCart:N,addToCart:w}=Object(u.a)(y),v=Number.isFinite(h)&&h>0,k=!m&&g&&_,E=Object(d.decodeEntities)((null==j?void 0:j.description)||""),C=v?Object(i.sprintf)(
/* translators: %s number of products in cart. */
Object(i._n)("%d in cart","%d in cart",h,'woocommerce'),h):Object(d.decodeEntities)((null==j?void 0:j.text)||Object(i.__)("Add to cart",'woocommerce')),x=k?"button":"a",T={};return k?T.onClick=()=>{w(),S("cart-add-item",{product:e});const{cartRedirectAfterAdd:t}=Object(p.getSetting)("productsSettings");t&&(window.location.href=b.c)}:(T.href=O,T.rel="nofollow",T.onClick=()=>{S("product-view-link",{product:e})}),Object(r.createElement)(x,o()({"aria-label":E,className:a()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",c.className,n.className,{loading:N,added:v}),style:{...c.style,...n.style,...s.style,...f.style},disabled:N},T),C)},m=t=>{let{colorStyles:e,borderStyles:c,typographyStyles:n,spacingStyles:o}=t;return Object(r.createElement)("button",{className:a()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder",e.className,c.className),style:{...e.style,...c.style,...n.style,...o.style},disabled:!0})};e.default=Object(y.withProductDataContext)(t=>{const{className:e}=t,{parentClassName:c}=Object(f.useInnerBlockLayoutContext)(),{product:n}=Object(f.useProductDataContext)(),o=Object(O.b)(t),s=Object(O.a)(t),i=Object(O.d)(t),l=Object(O.c)(t);return Object(r.createElement)("div",{className:a()(e,"wp-block-button","wc-block-components-product-button",{[c+"__product-add-to-cart"]:c})},n.id?Object(r.createElement)(j,{product:n,colorStyles:o,borderStyles:s,typographyStyles:i,spacingStyles:l}):Object(r.createElement)(m,{colorStyles:o,borderStyles:s,typographyStyles:i,spacingStyles:l}))})},39:function(t,e,c){"use strict";c.d(e,"a",(function(){return r}));var n=c(0),o=c(79);const r=()=>{const{notices:t,createNotice:e,removeNotice:c,setIsSuppressed:r}=Object(o.b)(),s=Object(n.useRef)(t);Object(n.useEffect)(()=>{s.current=t},[t]);const a=Object(n.useMemo)(()=>({hasNoticesOfType:t=>s.current.some(e=>e.type===t),removeNotices:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach(e=>{null!==t&&e.status!==t||c(e.id)})},removeNotice:c}),[c]),i=Object(n.useMemo)(()=>({addDefaultNotice:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e("default",t,{...c})},addErrorNotice:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e("error",t,{...c})},addWarningNotice:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e("warning",t,{...c})},addInfoNotice:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e("info",t,{...c})},addSuccessNotice:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e("success",t,{...c})}}),[e]);return{notices:t,...a,...i,setIsSuppressed:r}}},63:function(t,e,c){"use strict";c.d(e,"a",(function(){return n})),c.d(e,"b",(function(){return o}));const n=t=>!(t=>null===t)(t)&&t instanceof Object&&t.constructor===Object;function o(t,e){return n(t)&&e in t}}}]);