Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-content
/
test
/
wp-content
/
plugins
/
woocommerce
/
assets
/
client
/
blocks
:
product-sale-badge.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
(self.webpackChunkwebpackWcBlocksJsonp=self.webpackChunkwebpackWcBlocksJsonp||[]).push([[5432],{5863:(e,t,o)=>{"use strict";o.r(t),o.d(t,{Block:()=>d,default:()=>f});var n=o(9196),l=o(5736),s=o(3849),r=o.n(s),c=o(711),a=o(2864),i=o(947),u=o(721);o(3902);const d=e=>{const{className:t,align:o}=e,s=(0,i.F)(e),{parentClassName:u}=(0,a.useInnerBlockLayoutContext)(),{product:d}=(0,a.useProductDataContext)();if(!(d.id&&d.on_sale||e.isDescendentOfSingleProductTemplate))return null;const f="string"==typeof o?`wc-block-components-product-sale-badge--align-${o}`:"";return(0,n.createElement)("div",{className:r()("wc-block-components-product-sale-badge",t,f,{[`${u}__product-onsale`]:u},s.className),style:s.style},(0,n.createElement)(c.Label,{label:(0,l.__)("Sale","woocommerce"),screenReaderLabel:(0,l.__)("Product on sale","woocommerce")}))},f=(0,u.withProductDataContext)(d)},947:(e,t,o)=>{"use strict";o.d(t,{F:()=>i});var n=o(3849),l=o.n(n),s=o(7998),r=o(3243),c=o(3392),a=o(172);const i=e=>{const t=(e=>{const t=(0,s.Kn)(e)?e:{style:{}};let o=t.style;return(0,r.H)(o)&&(o=JSON.parse(o)||{}),(0,s.Kn)(o)||(o={}),{...t,style:o}})(e),o=(0,a.vc)(t),n=(0,a.l8)(t),i=(0,a.su)(t),u=(0,c.f)(t);return{className:l()(u.className,o.className,n.className,i.className),style:{...u.style,...o.style,...n.style,...i.style}}}},3392:(e,t,o)=>{"use strict";o.d(t,{f:()=>s});var n=o(7998),l=o(3243);const s=e=>{const t=(0,n.Kn)(e.style.typography)?e.style.typography:{},o=(0,l.H)(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:o,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}}},172:(e,t,o)=>{"use strict";o.d(t,{l8:()=>d,su:()=>f,vc:()=>u});var n=o(3849),l=o.n(n),s=o(7427),r=o(2289),c=o(7998);function a(e={}){const t={};return(0,r.getCSSRules)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function i(e,t){return e&&t?`has-${(0,s.o)(t)}-${e}`:""}function u(e){var t,o,n,s,r,u,d;const{backgroundColor:f,textColor:y,gradient:v,style:m}=e,g=i("background-color",f),p=i("color",y),b=function(e){if(e)return`has-${e}-gradient-background`}(v),k=b||(null==m||null===(t=m.color)||void 0===t?void 0:t.gradient);return{className:l()(p,b,{[g]:!k&&!!g,"has-text-color":y||(null==m||null===(o=m.color)||void 0===o?void 0:o.text),"has-background":f||(null==m||null===(n=m.color)||void 0===n?void 0:n.background)||v||(null==m||null===(s=m.color)||void 0===s?void 0:s.gradient),"has-link-color":(0,c.Kn)(null==m||null===(r=m.elements)||void 0===r?void 0:r.link)?null==m||null===(u=m.elements)||void 0===u||null===(d=u.link)||void 0===d?void 0:d.color:void 0}),style:a({color:(null==m?void 0:m.color)||{}})}}function d(e){var t;const o=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:function(e){var t;const{borderColor:o,style:n}=e,s=o?i("border-color",o):"";return l()({"has-border-color":!!o||!(null==n||null===(t=n.border)||void 0===t||!t.color),[s]:!!s})}(e),style:a({border:o})}}function f(e){var t;return{className:void 0,style:a({spacing:(null===(t=e.style)||void 0===t?void 0:t.spacing)||{}})}}},2893:(e,t,o)=>{"use strict";o.d(t,{F:()=>n});const n=e=>null===e},7998:(e,t,o)=>{"use strict";o.d(t,{$n:()=>s,Kn:()=>l,Qr:()=>r});var n=o(2893);const l=e=>!(0,n.F)(e)&&e instanceof Object&&e.constructor===Object;function s(e,t){return l(e)&&t in e}const r=e=>0===Object.keys(e).length},3243:(e,t,o)=>{"use strict";o.d(t,{H:()=>n});const n=e=>"string"==typeof e},3902:()=>{}}]);