File "product-sale-badge-frontend.js"

Full Path: /home/jlklyejr/public_html/wp-content/test/wp-content/plugins/woocommerce/assets/client/blocks/product-sale-badge-frontend.js
File size: 4.75 KB
MIME-type: text/plain
Charset: utf-8

(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),r=o(5736),l=o(3849),s=o.n(l),c=o(711),a=o(2864),i=o(947),u=o(721);o(3902);const d=e=>{const{className:t,align:o}=e,l=(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:s()("wc-block-components-product-sale-badge",t,f,{[`${u}__product-onsale`]:u},l.className),style:l.style},(0,n.createElement)(c.Label,{label:(0,r.__)("Sale","woocommerce"),screenReaderLabel:(0,r.__)("Product on sale","woocommerce")}))},f=(0,u.withProductDataContext)(d)},947:(e,t,o)=>{"use strict";o.d(t,{F:()=>i});var n=o(3849),r=o.n(n),l=o(7998),s=o(3243),c=o(3392),a=o(172);const i=e=>{const t=(e=>{const t=(0,l.Kn)(e)?e:{style:{}};let o=t.style;return(0,s.H)(o)&&(o=JSON.parse(o)||{}),(0,l.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:r()(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:()=>l});var n=o(7998),r=o(3243);const l=e=>{const t=(0,n.Kn)(e.style.typography)?e.style.typography:{},o=(0,r.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),r=o.n(n),l=o(7427),s=o(2289),c=o(7998);function a(e={}){const t={};return(0,s.getCSSRules)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function i(e,t){return e&&t?`has-${(0,l.o)(t)}-${e}`:""}function u(e){var t,o,n,l,s,u,d;const{backgroundColor:f,textColor:p,gradient:v,style:y}=e,g=i("background-color",f),m=i("color",p),b=function(e){if(e)return`has-${e}-gradient-background`}(v),h=b||(null==y||null===(t=y.color)||void 0===t?void 0:t.gradient);return{className:r()(m,b,{[g]:!h&&!!g,"has-text-color":p||(null==y||null===(o=y.color)||void 0===o?void 0:o.text),"has-background":f||(null==y||null===(n=y.color)||void 0===n?void 0:n.background)||v||(null==y||null===(l=y.color)||void 0===l?void 0:l.gradient),"has-link-color":(0,c.Kn)(null==y||null===(s=y.elements)||void 0===s?void 0:s.link)?null==y||null===(u=y.elements)||void 0===u||null===(d=u.link)||void 0===d?void 0:d.color:void 0}),style:a({color:(null==y?void 0:y.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,l=o?i("border-color",o):"";return r()({"has-border-color":!!o||!(null==n||null===(t=n.border)||void 0===t||!t.color),[l]:!!l})}(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:()=>l,Kn:()=>r});var n=o(2893);const r=e=>!(0,n.F)(e)&&e instanceof Object&&e.constructor===Object;function l(e,t){return r(e)&&t in e}},3243:(e,t,o)=>{"use strict";o.d(t,{H:()=>n});const n=e=>"string"==typeof e},112:(e,t,o)=>{"use strict";o.d(t,{$:()=>l});var n=o(3112),r=o(7090);function l(e,t){return void 0===t&&(t={}),(0,r.B)(e,(0,n.pi)({delimiter:"."},t))}},3902:()=>{},3569:(e,t,o)=>{"use strict";function n(e){return e.toLowerCase()}o.d(t,{U:()=>n})},7090:(e,t,o)=>{"use strict";o.d(t,{B:()=>s});var n=o(3569),r=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],l=/[^A-Z0-9]+/gi;function s(e,t){void 0===t&&(t={});for(var o=t.splitRegexp,s=void 0===o?r:o,a=t.stripRegexp,i=void 0===a?l:a,u=t.transform,d=void 0===u?n.U:u,f=t.delimiter,p=void 0===f?" ":f,v=c(c(e,s,"$1\0$2"),i,"\0"),y=0,g=v.length;"\0"===v.charAt(y);)y++;for(;"\0"===v.charAt(g-1);)g--;return v.slice(y,g).split("\0").map(d).join(p)}function c(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce((function(e,t){return e.replace(t,o)}),e)}},7427:(e,t,o)=>{"use strict";o.d(t,{o:()=>l});var n=o(3112),r=o(112);function l(e,t){return void 0===t&&(t={}),(0,r.$)(e,(0,n.pi)({delimiter:"-"},t))}},3112:(e,t,o)=>{"use strict";o.d(t,{pi:()=>n});var n=function(){return n=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)};Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError}}]);