(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[34,43],{161:function(e,t,a){"use strict";a.r(t),a.d(t,"Block",(function(){return d}));var c=a(0),n=a(1),l=a(5),s=a.n(l),r=a(30),o=a(24),i=a(88),u=a(48);a(285);const d=e=>{const{className:t,align:a}=e,l=Object(i.a)(e),{parentClassName:u}=Object(o.useInnerBlockLayoutContext)(),{product:d}=Object(o.useProductDataContext)();if(!(d.id&&d.on_sale||e.isDescendentOfSingleProductTemplate))return null;const b="string"==typeof a?`wc-block-components-product-sale-badge--align-${a}`:"";return Object(c.createElement)("div",{className:s()("wc-block-components-product-sale-badge",t,b,{[`${u}__product-onsale`]:u},l.className),style:l.style},Object(c.createElement)(r.a,{label:Object(n.__)("Sale","woocommerce"),screenReaderLabel:Object(n.__)("Product on sale","woocommerce")}))};t.default=Object(u.withProductDataContext)(d)},227:function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var c=a(0),n=a(1),l=a(5),s=a.n(l),r=a(3),o=a(24),i=a(88),u=a(48),d=a(100),b=a(161),m=(a(287),a(60));const g=e=>Object(c.createElement)("img",{...e,src:r.PLACEHOLDER_IMG_SRC,alt:"",width:void 0,height:void 0}),p=({image:e,loaded:t,showFullSize:a,fallbackAlt:n,width:l,scale:s,height:r})=>{const{thumbnail:o,src:i,srcset:u,sizes:d,alt:b}=e||{},m={alt:b||n,hidden:!t,src:o,...a&&{src:i,srcSet:u,sizes:d}},p={height:r,width:l,objectFit:s};return Object(c.createElement)(c.Fragment,null,m.src&&Object(c.createElement)("img",{style:p,"data-testid":"product-image",...m}),!e&&Object(c.createElement)(g,{style:p}))},h=e=>{const{className:t,imageSizing:a=m.a.SINGLE,showProductLink:l=!0,showSaleBadge:r,saleBadgeAlign:u="right",height:h,width:O,scale:j,...w}=e,f=Object(i.a)(e),{parentClassName:k}=Object(o.useInnerBlockLayoutContext)(),{product:E,isLoading:y}=Object(o.useProductDataContext)(),{dispatchStoreEvent:N}=Object(d.a)();if(!E.id)return Object(c.createElement)("div",{className:s()(t,"wc-block-components-product-image",{[`${k}__product-image`]:k},f.className),style:f.style},Object(c.createElement)(g,null));const _=!!E.images.length,L=_?E.images[0]:null,S=l?"a":c.Fragment,v=Object(n.sprintf)(/* translators: %s is referring to the product name */
Object(n.__)("Link to %s","woocommerce"),E.name),B={href:E.permalink,...!_&&{"aria-label":v},onClick:()=>{N("product-view-link",{product:E})}};return Object(c.createElement)("div",{className:s()(t,"wc-block-components-product-image",{[`${k}__product-image`]:k},f.className),style:f.style},Object(c.createElement)(S,{...l&&B},!!r&&Object(c.createElement)(b.default,{align:u,...w}),Object(c.createElement)(p,{fallbackAlt:E.name,image:L,loaded:!y,showFullSize:a!==m.a.THUMBNAIL,width:O,height:h,scale:j})))};t.b=Object(u.withProductDataContext)(h)},285:function(e,t){},287:function(e,t){},30:function(e,t,a){"use strict";var c=a(0),n=a(5),l=a.n(n);t.a=({label:e,screenReaderLabel:t,wrapperElement:a,wrapperProps:n={}})=>{let s;const r=null!=e,o=null!=t;return!r&&o?(s=a||"span",n={...n,className:l()(n.className,"screen-reader-text")},Object(c.createElement)(s,{...n},t)):(s=a||c.Fragment,r&&o&&e!==t?Object(c.createElement)(s,{...n},Object(c.createElement)("span",{"aria-hidden":"true"},e),Object(c.createElement)("span",{className:"screen-reader-text"},t)):Object(c.createElement)(s,{...n},e))}},364:function(e,t,a){"use strict";const c={showProductLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:a(60).a.SINGLE},productId:{type:"number",default:0},isDescendentOfQueryLoop:{type:"boolean",default:!1},isDescendentOfSingleProductBlock:{type:"boolean",default:!1},width:{type:"string"},height:{type:"string"},scale:{type:"string",default:"cover"}};t.a=c},674:function(e,t,a){"use strict";a.r(t);var c=a(48),n=a(227),l=a(364);t.default=Object(c.withFilteredAttributes)(l.a)(n.b)}}]);