rebase code on oct-10-2023
This commit is contained in:
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[16],{27:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(0),s=n(14),c=n.n(s);function o(e){const t=Object(a.useRef)(e);return c()(e,t.current)||(t.current=e),t.current}},314:function(e,t){},322:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return d}));var a=n(27),s=n(21),c=n(5),o=n(3);const i=(e=!1)=>{const{paymentMethodsInitialized:t,expressPaymentMethodsInitialized:n,availablePaymentMethods:i,availableExpressPaymentMethods:r}=Object(c.useSelect)((e=>{const t=e(o.PAYMENT_STORE_KEY);return{paymentMethodsInitialized:t.paymentMethodsInitialized(),expressPaymentMethodsInitialized:t.expressPaymentMethodsInitialized(),availableExpressPaymentMethods:t.getAvailableExpressPaymentMethods(),availablePaymentMethods:t.getAvailablePaymentMethods()}})),d=Object.values(i).map((({name:e})=>e)),l=Object.values(r).map((({name:e})=>e)),m=Object(s.getPaymentMethods)(),p=Object(s.getExpressPaymentMethods)(),u=Object.keys(m).reduce(((e,t)=>(d.includes(t)&&(e[t]=m[t]),e)),{}),y=Object.keys(p).reduce(((e,t)=>(l.includes(t)&&(e[t]=p[t]),e)),{}),h=Object(a.a)(u),b=Object(a.a)(y);return{paymentMethods:e?b:h,isInitialized:e?n:t}},r=()=>i(!1),d=()=>i(!0)},335:function(e,t,n){"use strict";var a=n(0),s=n(4),c=n.n(s);const o=e=>`wc-block-components-payment-method-icon wc-block-components-payment-method-icon--${e}`;var i=({id:e,src:t=null,alt:n=""})=>t?Object(a.createElement)("img",{className:o(e),src:t,alt:n}):null,r=n(30);const d=[{id:"alipay",alt:"Alipay",src:r.n+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:r.n+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:r.n+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:r.n+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:r.n+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:r.n+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:r.n+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:r.n+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:r.n+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:r.n+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:r.n+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:r.n+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:r.n+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:r.n+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:r.n+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:r.n+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:r.n+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:r.n+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:r.n+"payment-methods/wechat.svg"}];var l=n(29);n(314),t.a=({icons:e=[],align:t="center",className:n})=>{const s=(e=>{const t={};return e.forEach((e=>{let n={};"string"==typeof e&&(n={id:e,alt:e,src:null}),"object"==typeof e&&(n={id:e.id||"",alt:e.alt||"",src:e.src||null}),n.id&&Object(l.a)(n.id)&&!t[n.id]&&(t[n.id]=n)})),Object.values(t)})(e);if(0===s.length)return null;const o=c()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===t,"wc-block-components-payment-method-icons--align-right":"right"===t},n);return Object(a.createElement)("div",{className:o},s.map((e=>{const t={...e,...(n=e.id,d.find((e=>e.id===n))||{})};var n;return Object(a.createElement)(i,{key:"payment-method-icon-"+e.id,...t})})))}},448:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));const a=e=>Object.values(e).reduce(((e,t)=>(null!==t.icons&&(e=e.concat(t.icons)),e)),[])},521:function(e,t,n){"use strict";n.r(t);var a=n(0),s=n(335),c=n(322),o=n(448);t.default=({className:e})=>{const{paymentMethods:t}=Object(c.b)();return Object(a.createElement)(s.a,{className:e,icons:Object(o.a)(t)})}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[16],{27:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(0),s=n(14),c=n.n(s);function o(e){const t=Object(a.useRef)(e);return c()(e,t.current)||(t.current=e),t.current}},311:function(e,t){},317:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return l}));var a=n(27),s=n(23),c=n(4),o=n(3);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethodsInitialized:t,expressPaymentMethodsInitialized:n,availablePaymentMethods:i,availableExpressPaymentMethods:r}=Object(c.useSelect)(e=>{const t=e(o.PAYMENT_STORE_KEY);return{paymentMethodsInitialized:t.paymentMethodsInitialized(),expressPaymentMethodsInitialized:t.expressPaymentMethodsInitialized(),availableExpressPaymentMethods:t.getAvailableExpressPaymentMethods(),availablePaymentMethods:t.getAvailablePaymentMethods()}}),l=Object.values(i).map(e=>{let{name:t}=e;return t}),d=Object.values(r).map(e=>{let{name:t}=e;return t}),m=Object(s.getPaymentMethods)(),p=Object(s.getExpressPaymentMethods)(),u=Object.keys(m).reduce((e,t)=>(l.includes(t)&&(e[t]=m[t]),e),{}),y=Object.keys(p).reduce((e,t)=>(d.includes(t)&&(e[t]=p[t]),e),{}),h=Object(a.a)(u),b=Object(a.a)(y);return{paymentMethods:e?b:h,isInitialized:e?n:t}},r=()=>i(!1),l=()=>i(!0)},332:function(e,t,n){"use strict";var a=n(13),s=n.n(a),c=n(0),o=n(5),i=n.n(o);const r=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var l=e=>{let{id:t,src:n=null,alt:a=""}=e;return n?Object(c.createElement)("img",{className:r(t),src:n,alt:a}):null},d=n(26);const m=[{id:"alipay",alt:"Alipay",src:d.n+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:d.n+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:d.n+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:d.n+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:d.n+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:d.n+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:d.n+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:d.n+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:d.n+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:d.n+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:d.n+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:d.n+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:d.n+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:d.n+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:d.n+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:d.n+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:d.n+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:d.n+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:d.n+"payment-methods/wechat.svg"}];var p=n(28);n(311),t.a=e=>{let{icons:t=[],align:n="center",className:a}=e;const o=(e=>{const t={};return e.forEach(e=>{let n={};"string"==typeof e&&(n={id:e,alt:e,src:null}),"object"==typeof e&&(n={id:e.id||"",alt:e.alt||"",src:e.src||null}),n.id&&Object(p.a)(n.id)&&!t[n.id]&&(t[n.id]=n)}),Object.values(t)})(t);if(0===o.length)return null;const r=i()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===n,"wc-block-components-payment-method-icons--align-right":"right"===n},a);return Object(c.createElement)("div",{className:r},o.map(e=>{const t={...e,...(n=e.id,m.find(e=>e.id===n)||{})};var n;return Object(c.createElement)(l,s()({key:"payment-method-icon-"+e.id},t))}))}},445:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));const a=e=>Object.values(e).reduce((e,t)=>(null!==t.icons&&(e=e.concat(t.icons)),e),[])},516:function(e,t,n){"use strict";n.r(t);var a=n(0),s=n(332),c=n(317),o=n(445);t.default=e=>{let{className:t}=e;const{paymentMethods:n}=Object(c.b)();return Object(a.createElement)(s.a,{className:t,icons:Object(o.a)(n)})}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[24],{937:function(c,o,s){"use strict";s.r(o);var n=s(484);o.default=n.a}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[24],{918:function(c,o,s){"use strict";s.r(o);var n=s(475);o.default=n.a}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[17],{479:function(c,s,e){"use strict";e.r(s);var n=e(0),t=e(72);s.default=({children:c,className:s=""})=>{const{crossSellsProducts:e,cartIsLoading:a}=Object(t.a)();return a||e.length<1?null:Object(n.createElement)("div",{className:s},c)}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[17],{474:function(c,e,s){"use strict";s.r(e);var t=s(0),l=s(46);e.default=c=>{let{children:e,className:s=""}=c;const{crossSellsProducts:n,cartIsLoading:a}=Object(l.a)();return a||n.length<1?null:Object(t.createElement)("div",{className:s},e)}}}]);
|
||||
@@ -1,2 +1,3 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[6],{113:function(e,t,r){"use strict";var c=r(0),n=r(147),a=r(4),l=r.n(a);r(222);const o=e=>({thousandSeparator:null==e?void 0:e.thousandSeparator,decimalSeparator:null==e?void 0:e.decimalSeparator,fixedDecimalScale:!0,prefix:null==e?void 0:e.prefix,suffix:null==e?void 0:e.suffix,isNumericString:!0});t.a=({className:e,value:t,currency:r,onValueChange:a,displayType:i="text",...s})=>{var u;const p="string"==typeof t?parseInt(t,10):t;if(!Number.isFinite(p))return null;const m=p/10**r.minorUnit;if(!Number.isFinite(m))return null;const d=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",e),b=null!==(u=s.decimalScale)&&void 0!==u?u:null==r?void 0:r.minorUnit,v={...s,...o(r),decimalScale:b,value:void 0,currency:void 0,onValueChange:void 0},y=a?e=>{const t=+e.value*10**r.minorUnit;a(t)}:()=>{};return Object(c.createElement)(n.a,{className:d,displayType:i,...v,value:m,onValueChange:y})}},222:function(e,t){},286:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var c=function(){return c=Object.assign||function(e){for(var t,r=1,c=arguments.length;r<c;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},c.apply(this,arguments)};Object.create,Object.create},287:function(e,t,r){"use strict";function c(e){return e.toLowerCase()}r.d(t,"a",(function(){return l}));var n=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],a=/[^A-Z0-9]+/gi;function l(e,t){void 0===t&&(t={});for(var r=t.splitRegexp,l=void 0===r?n:r,i=t.stripRegexp,s=void 0===i?a:i,u=t.transform,p=void 0===u?c:u,m=t.delimiter,d=void 0===m?" ":m,b=o(o(e,l,"$1\0$2"),s,"\0"),v=0,y=b.length;"\0"===b.charAt(v);)v++;for(;"\0"===b.charAt(y-1);)y--;return b.slice(v,y).split("\0").map(p).join(d)}function o(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce((function(e,t){return e.replace(t,r)}),e)}},290:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var c=r(286),n=r(287);function a(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),Object(n.a)(e,Object(c.a)({delimiter:"."},t))}(e,Object(c.a)({delimiter:"-"},t))}},291:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var c=r(4),n=r.n(c),a=r(20),l=r(29),o=r(290),i=r(132);function s(e={}){const t={};return Object(i.getCSSRules)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function u(e,t){return e&&t?`has-${Object(o.a)(t)}-${e}`:""}const p=e=>{const t=(e=>{const t=Object(a.a)(e)?e:{style:{}};let r=t.style;return Object(l.a)(r)&&(r=JSON.parse(r)||{}),Object(a.a)(r)||(r={}),{...t,style:r}})(e),r=function(e){var t,r,c,l,o,i,p;const{backgroundColor:m,textColor:d,gradient:b,style:v}=e,y=u("background-color",m),f=u("color",d),g=function(e){if(e)return`has-${e}-gradient-background`}(b),O=g||(null==v||null===(t=v.color)||void 0===t?void 0:t.gradient);return{className:n()(f,g,{[y]:!O&&!!y,"has-text-color":d||(null==v||null===(r=v.color)||void 0===r?void 0:r.text),"has-background":m||(null==v||null===(c=v.color)||void 0===c?void 0:c.background)||b||(null==v||null===(l=v.color)||void 0===l?void 0:l.gradient),"has-link-color":Object(a.a)(null==v||null===(o=v.elements)||void 0===o?void 0:o.link)?null==v||null===(i=v.elements)||void 0===i||null===(p=i.link)||void 0===p?void 0:p.color:void 0}),style:s({color:(null==v?void 0:v.color)||{}})}}(t),c=function(e){var t;const r=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:function(e){var t;const{borderColor:r,style:c}=e,a=r?u("border-color",r):"";return n()({"has-border-color":!!r||!(null==c||null===(t=c.border)||void 0===t||!t.color),[a]:!!a})}(e),style:s({border:r})}}(t),o=function(e){var t;return{className:void 0,style:s({spacing:(null===(t=e.style)||void 0===t?void 0:t.spacing)||{}})}}(t),i=(e=>{const t=Object(a.a)(e.style.typography)?e.style.typography:{},r=Object(l.a)(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:r,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}}})(t);return{className:n()(i.className,r.className,c.className,o.className),style:{...i.style,...r.style,...c.style,...o.style}}}},340:function(e,t,r){"use strict";var c=r(0),n=r(1),a=r(113),l=r(4),o=r.n(l),i=r(39);r(341);const s=({currency:e,maxPrice:t,minPrice:r,priceClassName:l,priceStyle:s={}})=>Object(c.createElement)(c.Fragment,null,Object(c.createElement)("span",{className:"screen-reader-text"},Object(n.sprintf)(/* translators: %1$s min price, %2$s max price */
|
||||
Object(n.__)("Price between %1$s and %2$s","woocommerce"),Object(i.formatPrice)(r),Object(i.formatPrice)(t))),Object(c.createElement)("span",{"aria-hidden":!0},Object(c.createElement)(a.a,{className:o()("wc-block-components-product-price__value",l),currency:e,value:r,style:s})," — ",Object(c.createElement)(a.a,{className:o()("wc-block-components-product-price__value",l),currency:e,value:t,style:s}))),u=({currency:e,regularPriceClassName:t,regularPriceStyle:r,regularPrice:l,priceClassName:i,priceStyle:s,price:u})=>Object(c.createElement)(c.Fragment,null,Object(c.createElement)("span",{className:"screen-reader-text"},Object(n.__)("Previous price:","woocommerce")),Object(c.createElement)(a.a,{currency:e,renderText:e=>Object(c.createElement)("del",{className:o()("wc-block-components-product-price__regular",t),style:r},e),value:l}),Object(c.createElement)("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:","woocommerce")),Object(c.createElement)(a.a,{currency:e,renderText:e=>Object(c.createElement)("ins",{className:o()("wc-block-components-product-price__value","is-discounted",i),style:s},e),value:u}));t.a=({align:e,className:t,currency:r,format:n="<price/>",maxPrice:l,minPrice:i,price:p,priceClassName:m,priceStyle:d,regularPrice:b,regularPriceClassName:v,regularPriceStyle:y,style:f})=>{const g=o()(t,"price","wc-block-components-product-price",{[`wc-block-components-product-price--align-${e}`]:e});n.includes("<price/>")||(n="<price/>",console.error("Price formats need to include the `<price/>` tag."));const O=b&&p!==b;let j=Object(c.createElement)("span",{className:o()("wc-block-components-product-price__value",m)});return O?j=Object(c.createElement)(u,{currency:r,price:p,priceClassName:m,priceStyle:d,regularPrice:b,regularPriceClassName:v,regularPriceStyle:y}):void 0!==i&&void 0!==l?j=Object(c.createElement)(s,{currency:r,maxPrice:l,minPrice:i,priceClassName:m,priceStyle:d}):p&&(j=Object(c.createElement)(a.a,{className:o()("wc-block-components-product-price__value",m),currency:r,value:p,style:d})),Object(c.createElement)("span",{className:g,style:f},Object(c.createInterpolateElement)(n,{price:j}))}},341:function(e,t){},425:function(e,t,r){"use strict";r.r(t),r.d(t,"Block",(function(){return p}));var c=r(0),n=r(4),a=r.n(n),l=r(340),o=r(39),i=r(60),s=r(291),u=r(145);const p=e=>{var t,r;const{className:n,textAlign:u,isDescendentOfSingleProductTemplate:p}=e,m=Object(s.a)(e),{parentName:d,parentClassName:b}=Object(i.useInnerBlockLayoutContext)(),{product:v}=Object(i.useProductDataContext)(),y="woocommerce/all-products"===d,f=a()("wc-block-components-product-price",n,m.className,{[`${b}__product-price`]:b});if(!v.id&&!p){const e=Object(c.createElement)(l.a,{align:u,className:f});return y?Object(c.createElement)("div",{className:"wp-block-woocommerce-product-price"},e):e}const g=v.prices,O=p?Object(o.getCurrencyFromPriceResponse)():Object(o.getCurrencyFromPriceResponse)(g),j="5000",N=g.price!==g.regular_price,_=a()({[`${b}__product-price__value`]:b,[`${b}__product-price__value--on-sale`]:N}),P=Object(c.createElement)(l.a,{align:u,className:f,style:m.style,regularPriceStyle:m.style,priceStyle:m.style,priceClassName:_,currency:O,price:p?j:g.price,minPrice:null==g||null===(t=g.price_range)||void 0===t?void 0:t.min_amount,maxPrice:null==g||null===(r=g.price_range)||void 0===r?void 0:r.max_amount,regularPrice:p?j:g.regular_price,regularPriceClassName:a()({[`${b}__product-price__regular`]:b})});return y?Object(c.createElement)("div",{className:"wp-block-woocommerce-product-price"},P):P};t.default=e=>e.isDescendentOfSingleProductTemplate?Object(c.createElement)(p,{...e}):Object(u.withProductDataContext)(p)(e)}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[5],{117:function(e,t,r){"use strict";var c=r(13),n=r.n(c),l=r(0),a=r(150),o=r(5),i=r.n(o);r(222);const s=e=>({thousandSeparator:null==e?void 0:e.thousandSeparator,decimalSeparator:null==e?void 0:e.decimalSeparator,fixedDecimalScale:!0,prefix:null==e?void 0:e.prefix,suffix:null==e?void 0:e.suffix,isNumericString:!0});t.a=e=>{var t;let{className:r,value:c,currency:o,onValueChange:u,displayType:p="text",...m}=e;const d="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(d))return null;const b=d/10**o.minorUnit;if(!Number.isFinite(b))return null;const v=i()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",r),y=null!==(t=m.decimalScale)&&void 0!==t?t:null==o?void 0:o.minorUnit,f={...m,...s(o),decimalScale:y,value:void 0,currency:void 0,onValueChange:void 0},g=u?e=>{const t=+e.value*10**o.minorUnit;u(t)}:()=>{};return Object(l.createElement)(a.a,n()({className:v,displayType:p},f,{value:b,onValueChange:g}))}},222:function(e,t){},283:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var c=function(){return(c=Object.assign||function(e){for(var t,r=1,c=arguments.length;r<c;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};Object.create,Object.create},284:function(e,t,r){"use strict";function c(e){return e.toLowerCase()}r.d(t,"a",(function(){return a}));var n=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],l=/[^A-Z0-9]+/gi;function a(e,t){void 0===t&&(t={});for(var r=t.splitRegexp,a=void 0===r?n:r,i=t.stripRegexp,s=void 0===i?l:i,u=t.transform,p=void 0===u?c:u,m=t.delimiter,d=void 0===m?" ":m,b=o(o(e,a,"$1\0$2"),s,"\0"),v=0,y=b.length;"\0"===b.charAt(v);)v++;for(;"\0"===b.charAt(y-1);)y--;return b.slice(v,y).split("\0").map(p).join(d)}function o(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce((function(e,t){return e.replace(t,r)}),e)}},288:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var c=r(283),n=r(284);function l(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),Object(n.a)(e,Object(c.a)({delimiter:"."},t))}(e,Object(c.a)({delimiter:"-"},t))}},290:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var c=r(5),n=r.n(c),l=r(21),a=r(28),o=r(288),i=r(132);function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};return Object(i.getCSSRules)(e,{selector:""}).forEach(e=>{t[e.key]=e.value}),t}function u(e,t){return e&&t?`has-${Object(o.a)(t)}-${e}`:""}const p=e=>{const t=(e=>{const t=Object(l.a)(e)?e:{style:{}};let r=t.style;return Object(a.a)(r)&&(r=JSON.parse(r)||{}),Object(l.a)(r)||(r={}),{...t,style:r}})(e),r=function(e){var t,r,c,a,o,i,p;const{backgroundColor:m,textColor:d,gradient:b,style:v}=e,y=u("background-color",m),f=u("color",d),g=function(e){if(e)return`has-${e}-gradient-background`}(b),O=g||(null==v||null===(t=v.color)||void 0===t?void 0:t.gradient);return{className:n()(f,g,{[y]:!O&&!!y,"has-text-color":d||(null==v||null===(r=v.color)||void 0===r?void 0:r.text),"has-background":m||(null==v||null===(c=v.color)||void 0===c?void 0:c.background)||b||(null==v||null===(a=v.color)||void 0===a?void 0:a.gradient),"has-link-color":Object(l.a)(null==v||null===(o=v.elements)||void 0===o?void 0:o.link)?null==v||null===(i=v.elements)||void 0===i||null===(p=i.link)||void 0===p?void 0:p.color:void 0}),style:s({color:(null==v?void 0:v.color)||{}})}}(t),c=function(e){var t;const r=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:function(e){var t;const{borderColor:r,style:c}=e,l=r?u("border-color",r):"";return n()({"has-border-color":r||(null==c||null===(t=c.border)||void 0===t?void 0:t.color),borderColorClass:l})}(e),style:s({border:r})}}(t),o=function(e){var t;return{className:void 0,style:s({spacing:(null===(t=e.style)||void 0===t?void 0:t.spacing)||{}})}}(t),i=(e=>{const t=Object(l.a)(e.style.typography)?e.style.typography:{},r=Object(a.a)(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:r,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}}})(t);return{className:n()(i.className,r.className,c.className,o.className),style:{...i.style,...r.style,...c.style,...o.style}}}},337:function(e,t,r){"use strict";var c=r(0),n=r(1),l=r(117),a=r(5),o=r.n(a),i=r(39);r(338);const s=e=>{let{currency:t,maxPrice:r,minPrice:a,priceClassName:s,priceStyle:u={}}=e;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("span",{className:"screen-reader-text"},Object(n.sprintf)(
|
||||
/* translators: %1$s min price, %2$s max price */
|
||||
Object(n.__)("Price between %1$s and %2$s","woocommerce"),Object(i.formatPrice)(a),Object(i.formatPrice)(r))),Object(c.createElement)("span",{"aria-hidden":!0},Object(c.createElement)(l.a,{className:o()("wc-block-components-product-price__value",s),currency:t,value:a,style:u})," — ",Object(c.createElement)(l.a,{className:o()("wc-block-components-product-price__value",s),currency:t,value:r,style:u})))},u=e=>{let{currency:t,regularPriceClassName:r,regularPriceStyle:a,regularPrice:i,priceClassName:s,priceStyle:u,price:p}=e;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("span",{className:"screen-reader-text"},Object(n.__)("Previous price:","woocommerce")),Object(c.createElement)(l.a,{currency:t,renderText:e=>Object(c.createElement)("del",{className:o()("wc-block-components-product-price__regular",r),style:a},e),value:i}),Object(c.createElement)("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:","woocommerce")),Object(c.createElement)(l.a,{currency:t,renderText:e=>Object(c.createElement)("ins",{className:o()("wc-block-components-product-price__value","is-discounted",s),style:u},e),value:p}))};t.a=e=>{let{align:t,className:r,currency:n,format:a="<price/>",maxPrice:i,minPrice:p,price:m,priceClassName:d,priceStyle:b,regularPrice:v,regularPriceClassName:y,regularPriceStyle:f,style:g}=e;const O=o()(r,"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 j=v&&m!==v;let N=Object(c.createElement)("span",{className:o()("wc-block-components-product-price__value",d)});return j?N=Object(c.createElement)(u,{currency:n,price:m,priceClassName:d,priceStyle:b,regularPrice:v,regularPriceClassName:y,regularPriceStyle:f}):void 0!==p&&void 0!==i?N=Object(c.createElement)(s,{currency:n,maxPrice:i,minPrice:p,priceClassName:d,priceStyle:b}):m&&(N=Object(c.createElement)(l.a,{className:o()("wc-block-components-product-price__value",d),currency:n,value:m,style:b})),Object(c.createElement)("span",{className:O,style:g},Object(c.createInterpolateElement)(a,{price:N}))}},338:function(e,t){},423:function(e,t,r){"use strict";r.r(t),r.d(t,"Block",(function(){return p}));var c=r(0),n=r(5),l=r.n(n),a=r(337),o=r(39),i=r(61),s=r(290),u=r(147);const p=e=>{var t,r;const{className:n,textAlign:u,isDescendentOfSingleProductTemplate:p}=e,m=Object(s.a)(e),{parentName:d,parentClassName:b}=Object(i.useInnerBlockLayoutContext)(),{product:v}=Object(i.useProductDataContext)(),y="woocommerce/all-products"===d,f=l()("wc-block-components-product-price",n,m.className,{[b+"__product-price"]:b});if(!v.id&&!p){const e=Object(c.createElement)(a.a,{align:u,className:f});return y?Object(c.createElement)("div",{className:"wp-block-woocommerce-product-price"},e):e}const g=v.prices,O=p?Object(o.getCurrencyFromPriceResponse)():Object(o.getCurrencyFromPriceResponse)(g),j=g.price!==g.regular_price,N=l()({[b+"__product-price__value"]:b,[b+"__product-price__value--on-sale"]:j}),_=Object(c.createElement)(a.a,{align:u,className:f,style:m.style,regularPriceStyle:m.style,priceStyle:m.style,priceClassName:N,currency:O,price:p?"5000":g.price,minPrice:null==g||null===(t=g.price_range)||void 0===t?void 0:t.min_amount,maxPrice:null==g||null===(r=g.price_range)||void 0===r?void 0:r.max_amount,regularPrice:p?"5000":g.regular_price,regularPriceClassName:l()({[b+"__product-price__regular"]:b})});return y?Object(c.createElement)("div",{className:"wp-block-woocommerce-product-price"},_):_};t.default=e=>e.isDescendentOfSingleProductTemplate?Object(c.createElement)(p,e):Object(u.withProductDataContext)(p)(e)}}]);
|
||||
@@ -1,6 +1,11 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[18],{19:function(e,t,c){"use strict";var n=c(0),a=c(4),r=c.n(a);t.a=({label:e,screenReaderLabel:t,wrapperElement:c,wrapperProps:a={}})=>{let o;const s=null!=e,l=null!=t;return!s&&l?(o=c||"span",a={...a,className:r()(a.className,"screen-reader-text")},Object(n.createElement)(o,{...a},t)):(o=c||n.Fragment,s&&l&&e!==t?Object(n.createElement)(o,{...a},Object(n.createElement)("span",{"aria-hidden":"true"},e),Object(n.createElement)("span",{className:"screen-reader-text"},t)):Object(n.createElement)(o,{...a},e))}},311:function(e,t,c){"use strict";var n=c(0),a=c(23),r=c(4),o=c.n(r);c(312),t.a=({className:e="",disabled:t=!1,name:c,permalink:r="",target:s,rel:l,style:i,onClick:u,...d})=>{const b=o()("wc-block-components-product-name",e);if(t){const e=d;return Object(n.createElement)("span",{className:b,...e,dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(c)}})}return Object(n.createElement)("a",{className:b,href:r,target:s,...d,dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(c)},style:i})}},312:function(e,t){},342:function(e,t,c){"use strict";c.r(t),c.d(t,"Block",(function(){return d}));var n=c(0),a=c(1),r=c(4),o=c.n(r),s=c(19),l=c(60),i=c(291),u=c(145);c(343);const d=e=>{const{className:t,align:c}=e,r=Object(i.a)(e),{parentClassName:u}=Object(l.useInnerBlockLayoutContext)(),{product:d}=Object(l.useProductDataContext)();if(!d.id||!d.on_sale)return null;const b="string"==typeof c?`wc-block-components-product-sale-badge--align-${c}`:"";return Object(n.createElement)("div",{className:o()("wc-block-components-product-sale-badge",t,b,{[`${u}__product-onsale`]:u},r.className),style:r.style},Object(n.createElement)(s.a,{label:Object(a.__)("Sale","woocommerce"),screenReaderLabel:Object(a.__)("Product on sale","woocommerce")}))};t.default=Object(u.withProductDataContext)(d)},343:function(e,t){},344:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));let n=function(e){return e.SINGLE="single",e.THUMBNAIL="thumbnail",e}({})},366:function(e,t,c){"use strict";c.d(t,"a",(function(){return O}));var n=c(0),a=c(1),r=c(4),o=c.n(r),s=c(2),l=c(60),i=c(291),u=c(145),d=c(73),b=c(342),m=(c(367),c(344));const p=e=>Object(n.createElement)("img",{...e,src:s.PLACEHOLDER_IMG_SRC,alt:"",width:void 0,height:void 0}),g=({image:e,loaded:t,showFullSize:c,fallbackAlt:a,width:r,scale:o,height:s})=>{const{thumbnail:l,src:i,srcset:u,sizes:d,alt:b}=e||{},m={alt:b||a,hidden:!t,src:l,...c&&{src:i,srcSet:u,sizes:d}},g={height:s,width:r,objectFit:o};return Object(n.createElement)(n.Fragment,null,m.src&&Object(n.createElement)("img",{style:g,"data-testid":"product-image",...m}),!e&&Object(n.createElement)(p,{style:g}))},O=e=>{const{className:t,imageSizing:c=m.a.SINGLE,showProductLink:r=!0,showSaleBadge:s,saleBadgeAlign:u="right",height:O,width:j,scale:w,..._}=e,k=Object(i.a)(e),{parentClassName:E}=Object(l.useInnerBlockLayoutContext)(),{product:f,isLoading:h}=Object(l.useProductDataContext)(),{dispatchStoreEvent:N}=Object(d.a)();if(!f.id)return Object(n.createElement)("div",{className:o()(t,"wc-block-components-product-image",{[`${E}__product-image`]:E},k.className)},Object(n.createElement)(p,null));const v=!!f.images.length,y=v?f.images[0]:null,C=r?"a":n.Fragment,L=Object(a.sprintf)(/* translators: %s is referring to the product name */
|
||||
Object(a.__)("Link to %s","woocommerce"),f.name),x={href:f.permalink,...!v&&{"aria-label":L},onClick:()=>{N("product-view-link",{product:f})}};return Object(n.createElement)("div",{className:o()(t,"wc-block-components-product-image",{[`${E}__product-image`]:E},k.className)},Object(n.createElement)(C,{...r&&x},!!s&&Object(n.createElement)(b.default,{align:u,..._}),Object(n.createElement)(g,{fallbackAlt:f.name,image:y,loaded:!h,showFullSize:c!==m.a.THUMBNAIL,width:j,height:O,scale:w})))};t.b=Object(u.withProductDataContext)(O)},367:function(e,t){},368:function(e,t,c){"use strict";c.d(t,"a",(function(){return m}));var n=c(0),a=c(4),r=c.n(a),o=c(60),s=c(426),l=c(145),i=c(311),u=c(73),d=c(291);c(369);const b=({children:e,headingLevel:t,elementType:c=`h${t}`,...a})=>Object(n.createElement)(c,{...a},e),m=e=>{const{className:t,headingLevel:c=2,showProductLink:a=!0,linkTarget:l,align:m}=e,p=Object(d.a)(e),{parentClassName:g}=Object(o.useInnerBlockLayoutContext)(),{product:O}=Object(o.useProductDataContext)(),{dispatchStoreEvent:j}=Object(u.a)();return O.id?Object(n.createElement)(b,{headingLevel:c,className:r()(t,p.className,"wc-block-components-product-title",{[`${g}__product-title`]:g,[`wc-block-components-product-title--align-${m}`]:m&&Object(s.a)()}),style:Object(s.a)()?p.style:{}},Object(n.createElement)(i.a,{disabled:!a,name:O.name,permalink:O.permalink,target:l,onClick:()=>{j("product-view-link",{product:O})}})):Object(n.createElement)(b,{headingLevel:c,className:r()(t,p.className,"wc-block-components-product-title",{[`${g}__product-title`]:g,[`wc-block-components-product-title--align-${m}`]:m&&Object(s.a)()}),style:Object(s.a)()?p.style:{}})};t.b=Object(l.withProductDataContext)(m)},369:function(e,t){},370:function(e,t){},371:function(e,t){},398:function(e,t,c){"use strict";c.r(t),c.d(t,"Block",(function(){return g}));var n=c(0),a=c(1),r=c(4),o=c.n(r),s=c(60),l=c(291),i=c(145),u=c(120);c(370);const d=e=>({width:e/5*100+"%"}),b=({parentClassName:e})=>{const t=d(0);return Object(n.createElement)("div",{className:o()("wc-block-components-product-rating__norating-container",`${e}-product-rating__norating-container`)},Object(n.createElement)("div",{className:"wc-block-components-product-rating__norating",role:"img"},Object(n.createElement)("span",{style:t})),Object(n.createElement)("span",null,Object(a.__)("No Reviews","woocommerce")))},m=e=>{const{rating:t,reviews:c,parentClassName:r}=e,s=d(t),l=Object(a.sprintf)(/* translators: %f is referring to the average rating value */
|
||||
Object(a.__)("Rated %f out of 5","woocommerce"),t),i={__html:Object(a.sprintf)(/* translators: %1$s is referring to the average rating value, %2$s is referring to the number of ratings */
|
||||
Object(a._n)("Rated %1$s out of 5 based on %2$s customer rating","Rated %1$s out of 5 based on %2$s customer ratings",c,"woocommerce"),Object(a.sprintf)('<strong class="rating">%f</strong>',t),Object(a.sprintf)('<span class="rating">%d</span>',c))};return Object(n.createElement)("div",{className:o()("wc-block-components-product-rating__stars",`${r}__product-rating__stars`),role:"img","aria-label":l},Object(n.createElement)("span",{style:s,dangerouslySetInnerHTML:i}))},p=e=>{const{reviews:t}=e,c=Object(a.sprintf)(/* translators: %s is referring to the total of reviews for a product */
|
||||
Object(a._n)("(%s customer review)","(%s customer reviews)",t,"woocommerce"),t);return Object(n.createElement)("span",{className:"wc-block-components-product-rating__reviews_count"},c)},g=e=>{const{textAlign:t,isDescendentOfSingleProductBlock:c,shouldDisplayMockedReviewsWhenProductHasNoReviews:a}=e,r=Object(l.a)(e),{parentClassName:i}=Object(s.useInnerBlockLayoutContext)(),{product:d}=Object(s.useProductDataContext)(),g=(e=>{const t=parseFloat(e.average_rating);return Number.isFinite(t)&&t>0?t:0})(d),O=(e=>{const t=Object(u.a)(e.review_count)?e.review_count:parseInt(e.review_count,10);return Number.isFinite(t)&&t>0?t:0})(d),j=o()(r.className,"wc-block-components-product-rating",{[`${i}__product-rating`]:i,[`has-text-align-${t}`]:t}),w=a?Object(n.createElement)(b,{parentClassName:i}):null,_=O?Object(n.createElement)(m,{rating:g,reviews:O,parentClassName:i}):w;if(O||a)return Object(n.createElement)("div",{className:j,style:r.style},Object(n.createElement)("div",{className:"wc-block-components-product-rating__container"},_,O&&c?Object(n.createElement)(p,{reviews:O}):null))};t.default=Object(i.withProductDataContext)(g)},399:function(e,t,c){"use strict";c.r(t),c.d(t,"Block",(function(){return j}));var n=c(0),a=c(4),r=c.n(a),o=c(1),s=c(73),l=c(400),i=c(291),u=c(23),d=c(30),b=c(2),m=c(60),p=c(145);c(371);const g=({product:e,className:t,style:c,textAlign:a})=>{const{id:i,permalink:m,add_to_cart:p,has_options:g,is_purchasable:O,is_in_stock:j}=e,{dispatchStoreEvent:w}=Object(s.a)(),{cartQuantity:_,addingToCart:k,addToCart:E}=Object(l.a)(i),f=Number.isFinite(_)&&_>0,h=!g&&O&&j,N=Object(u.decodeEntities)((null==p?void 0:p.description)||""),v=f?Object(o.sprintf)(/* translators: %s number of products in cart. */
|
||||
Object(o._n)("%d in cart","%d in cart",_,"woocommerce"),_):Object(u.decodeEntities)((null==p?void 0:p.text)||Object(o.__)("Add to cart","woocommerce")),y=h?"button":"a",C={};return h?C.onClick=async()=>{await E(),w("cart-add-item",{product:e});const{cartRedirectAfterAdd:t}=Object(b.getSetting)("productsSettings");t&&(window.location.href=d.c)}:(C.href=m,C.rel="nofollow",C.onClick=()=>{w("product-view-link",{product:e})}),Object(n.createElement)(y,{...C,"aria-label":N,disabled:k,className:r()(t,"wp-block-button__link","wp-element-button","add_to_cart_button","wc-block-components-product-button__button",{loading:k,added:f},{[`has-text-align-${a}`]:a}),style:c},v)},O=({className:e,style:t})=>Object(n.createElement)("button",{className:r()("wp-block-button__link","wp-element-button","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder",e),style:t,disabled:!0}),j=e=>{const{className:t,textAlign:c}=e,a=Object(i.a)(e),{parentClassName:o}=Object(m.useInnerBlockLayoutContext)(),{product:s}=Object(m.useProductDataContext)();return Object(n.createElement)("div",{className:r()(t,"wp-block-button","wc-block-components-product-button",{[`${o}__product-add-to-cart`]:o},{[`has-text-align-${c}`]:c})},s.id?Object(n.createElement)(g,{product:s,style:a.style,className:a.className}):Object(n.createElement)(O,{style:a.style,className:a.className}))};t.default=Object(p.withProductDataContext)(j)},400:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var n=c(0),a=c(5),r=c(3),o=c(23),s=c(72);const l=(e,t)=>{const c=e.find((({id:e})=>e===t));return c?c.quantity:0},i=e=>{const{addItemToCart:t}=Object(a.useDispatch)(r.CART_STORE_KEY),{cartItems:c,cartIsLoading:i}=Object(s.a)(),{createErrorNotice:u,removeNotice:d}=Object(a.useDispatch)("core/notices"),[b,m]=Object(n.useState)(!1),p=Object(n.useRef)(l(c,e));return Object(n.useEffect)((()=>{const t=l(c,e);t!==p.current&&(p.current=t)}),[c,e]),{cartQuantity:Number.isFinite(p.current)?p.current:0,addingToCart:b,cartIsLoading:i,addToCart:(c=1)=>(m(!0),t(e,c).then((()=>{d("add-to-cart")})).catch((e=>{u(Object(o.decodeEntities)(e.message),{id:"add-to-cart",context:"wc/all-products",isDismissible:!0})})).finally((()=>{m(!1)})))}}},426:function(e,t,c){"use strict";c.d(t,"a",(function(){return a})),c(236);var n=c(30);const a=()=>n.o>1},507:function(e,t,c){"use strict";c.r(t);var n=c(0),a=c(72),r=c(60),o=c(366),s=c(368),l=c(398),i=c(342),u=c(425),d=c(399),b=c(344),m=({product:e})=>Object(n.createElement)("div",{className:"cross-sells-product"},Object(n.createElement)(r.InnerBlockLayoutContextProvider,{parentName:"woocommerce/cart-cross-sells-block",parentClassName:"wp-block-cart-cross-sells-product"},Object(n.createElement)(r.ProductDataContextProvider,{isLoading:!1,product:e},Object(n.createElement)("div",null,Object(n.createElement)(o.a,{className:"",showSaleBadge:!1,productId:e.id,showProductLink:!1,saleBadgeAlign:"left",imageSizing:b.a.SINGLE,isDescendentOfQueryLoop:!1}),Object(n.createElement)(s.a,{align:"",headingLevel:3,showProductLink:!0}),Object(n.createElement)(l.Block,null),Object(n.createElement)(i.Block,{productId:e.id,align:"left"}),Object(n.createElement)(u.Block,null)),Object(n.createElement)(d.Block,null)))),p=({products:e,columns:t})=>{const c=e.map(((e,c)=>c>=t?null:Object(n.createElement)(m,{isLoading:!1,product:e,key:e.id})));return Object(n.createElement)("div",null,c)},g=c(165);t.default=({className:e,columns:t})=>{const{crossSellsProducts:c}=Object(a.a)();return void 0===t&&(t=g.attributes.columns.default),Object(n.createElement)(p,{className:e,columns:t,products:c})}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[18],{20:function(e,t,c){"use strict";var n=c(0),a=c(5),r=c.n(a);t.a=e=>{let t,{label:c,screenReaderLabel:a,wrapperElement:o,wrapperProps:s={}}=e;const l=null!=c,i=null!=a;return!l&&i?(t=o||"span",s={...s,className:r()(s.className,"screen-reader-text")},Object(n.createElement)(t,s,a)):(t=o||n.Fragment,l&&i&&c!==a?Object(n.createElement)(t,s,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},a)):Object(n.createElement)(t,s,c))}},308:function(e,t,c){"use strict";var n=c(13),a=c.n(n),r=c(0),o=c(22),s=c(5),l=c.n(s);c(309),t.a=e=>{let{className:t="",disabled:c=!1,name:n,permalink:s="",target:i,rel:u,style:d,onClick:b,...m}=e;const p=l()("wc-block-components-product-name",t);if(c){const e=m;return Object(r.createElement)("span",a()({className:p},e,{dangerouslySetInnerHTML:{__html:Object(o.decodeEntities)(n)}}))}return Object(r.createElement)("a",a()({className:p,href:s,target:i},m,{dangerouslySetInnerHTML:{__html:Object(o.decodeEntities)(n)},style:d}))}},309:function(e,t){},339:function(e,t,c){"use strict";c.r(t),c.d(t,"Block",(function(){return d}));var n=c(0),a=c(1),r=c(5),o=c.n(r),s=c(20),l=c(61),i=c(290),u=c(147);c(340);const d=e=>{const{className:t,align:c}=e,r=Object(i.a)(e),{parentClassName:u}=Object(l.useInnerBlockLayoutContext)(),{product:d}=Object(l.useProductDataContext)();if(!d.id||!d.on_sale)return null;const b="string"==typeof c?"wc-block-components-product-sale-badge--align-"+c:"";return Object(n.createElement)("div",{className:o()("wc-block-components-product-sale-badge",t,b,{[u+"__product-onsale"]:u},r.className),style:r.style},Object(n.createElement)(s.a,{label:Object(a.__)("Sale","woocommerce"),screenReaderLabel:Object(a.__)("Product on sale","woocommerce")}))};t.default=Object(u.withProductDataContext)(d)},340:function(e,t){},341:function(e,t,c){"use strict";let n;c.d(t,"a",(function(){return n})),function(e){e.SINGLE="single",e.THUMBNAIL="thumbnail"}(n||(n={}))},364:function(e,t,c){"use strict";c.d(t,"a",(function(){return w}));var n=c(13),a=c.n(n),r=c(0),o=c(1),s=c(5),l=c.n(s),i=c(2),u=c(61),d=c(290),b=c(147),m=c(75),p=c(339),g=(c(365),c(341));const O=e=>Object(r.createElement)("img",a()({},e,{src:i.PLACEHOLDER_IMG_SRC,alt:"",width:void 0,height:void 0})),j=e=>{let{image:t,loaded:c,showFullSize:n,fallbackAlt:o,width:s,scale:l,height:i}=e;const{thumbnail:u,src:d,srcset:b,sizes:m,alt:p}=t||{},g={alt:p||o,hidden:!c,src:u,...n&&{src:d,srcSet:b,sizes:m}},j={height:i,width:s,objectFit:l};return Object(r.createElement)(r.Fragment,null,g.src&&Object(r.createElement)("img",a()({style:j,"data-testid":"product-image"},g)),!t&&Object(r.createElement)(O,{style:j}))},w=e=>{const{className:t,imageSizing:c=g.a.SINGLE,showProductLink:n=!0,showSaleBadge:s,saleBadgeAlign:i="right",height:b,width:w,scale:_,...k}=e,E=Object(d.a)(e),{parentClassName:f}=Object(u.useInnerBlockLayoutContext)(),{product:h,isLoading:N}=Object(u.useProductDataContext)(),{dispatchStoreEvent:v}=Object(m.a)();if(!h.id)return Object(r.createElement)("div",{className:l()(t,"wc-block-components-product-image",{[f+"__product-image"]:f},E.className)},Object(r.createElement)(O,null));const y=!!h.images.length,C=y?h.images[0]:null,L=n?"a":r.Fragment,x=Object(o.sprintf)(
|
||||
/* translators: %s is referring to the product name */
|
||||
Object(o.__)("Link to %s","woocommerce"),h.name),S={href:h.permalink,...!y&&{"aria-label":x},onClick:()=>{v("product-view-link",{product:h})}};return Object(r.createElement)("div",{className:l()(t,"wc-block-components-product-image",{[f+"__product-image"]:f},E.className)},Object(r.createElement)(L,n&&S,!!s&&Object(r.createElement)(p.default,a()({align:i},k)),Object(r.createElement)(j,{fallbackAlt:h.name,image:C,loaded:!N,showFullSize:c!==g.a.THUMBNAIL,width:w,height:b,scale:_})))};t.b=Object(b.withProductDataContext)(w)},365:function(e,t){},366:function(e,t,c){"use strict";c.d(t,"a",(function(){return m}));var n=c(0),a=c(5),r=c.n(a),o=c(61),s=c(424),l=c(147),i=c(308),u=c(75),d=c(290);c(367);const b=e=>{let{children:t,headingLevel:c,elementType:a="h"+c,...r}=e;return Object(n.createElement)(a,r,t)},m=e=>{const{className:t,headingLevel:c=2,showProductLink:a=!0,linkTarget:l,align:m}=e,p=Object(d.a)(e),{parentClassName:g}=Object(o.useInnerBlockLayoutContext)(),{product:O}=Object(o.useProductDataContext)(),{dispatchStoreEvent:j}=Object(u.a)();return O.id?Object(n.createElement)(b,{headingLevel:c,className:r()(t,p.className,"wc-block-components-product-title",{[g+"__product-title"]:g,["wc-block-components-product-title--align-"+m]:m&&Object(s.a)()}),style:Object(s.a)()?p.style:{}},Object(n.createElement)(i.a,{disabled:!a,name:O.name,permalink:O.permalink,target:l,onClick:()=>{j("product-view-link",{product:O})}})):Object(n.createElement)(b,{headingLevel:c,className:r()(t,p.className,"wc-block-components-product-title",{[g+"__product-title"]:g,["wc-block-components-product-title--align-"+m]:m&&Object(s.a)()}),style:Object(s.a)()?p.style:{}})};t.b=Object(l.withProductDataContext)(m)},367:function(e,t){},368:function(e,t){},393:function(e,t,c){"use strict";c.r(t),c.d(t,"Block",(function(){return g}));var n=c(0),a=c(1),r=c(5),o=c.n(r),s=c(61),l=c(290),i=c(147),u=c(109);const d=e=>({width:e/5*100+"%"}),b=e=>{let{parentClassName:t}=e;const c=d(0);return Object(n.createElement)("div",{className:o()("wc-block-components-product-rating__norating-container",t+"-product-rating__norating-container")},Object(n.createElement)("div",{className:"wc-block-components-product-rating__norating",role:"img"},Object(n.createElement)("span",{style:c})),Object(n.createElement)("span",null,Object(a.__)("No Reviews","woocommerce")))},m=e=>{const{rating:t,reviews:c,parentClassName:r}=e,s=d(t),l=Object(a.sprintf)(
|
||||
/* translators: %f is referring to the average rating value */
|
||||
Object(a.__)("Rated %f out of 5","woocommerce"),t),i={__html:Object(a.sprintf)(
|
||||
/* translators: %1$s is referring to the average rating value, %2$s is referring to the number of ratings */
|
||||
Object(a._n)("Rated %1$s out of 5 based on %2$s customer rating","Rated %1$s out of 5 based on %2$s customer ratings",c,"woocommerce"),Object(a.sprintf)('<strong class="rating">%f</strong>',t),Object(a.sprintf)('<span class="rating">%d</span>',c))};return Object(n.createElement)("div",{className:o()("wc-block-components-product-rating__stars",r+"__product-rating__stars"),role:"img","aria-label":l},Object(n.createElement)("span",{style:s,dangerouslySetInnerHTML:i}))},p=e=>{const{reviews:t}=e,c=Object(a.sprintf)(
|
||||
/* translators: %s is referring to the total of reviews for a product */
|
||||
Object(a._n)("(%s customer review)","(%s customer reviews)",t,"woocommerce"),t);return Object(n.createElement)("span",{className:"wc-block-components-product-rating__reviews_count"},c)},g=e=>{const{textAlign:t,isDescendentOfSingleProductBlock:c,shouldDisplayMockedReviewsWhenProductHasNoReviews:a}=e,r=Object(l.a)(e),{parentClassName:i}=Object(s.useInnerBlockLayoutContext)(),{product:d}=Object(s.useProductDataContext)(),g=(e=>{const t=parseFloat(e.average_rating);return Number.isFinite(t)&&t>0?t:0})(d),O=(e=>{const t=Object(u.a)(e.review_count)?e.review_count:parseInt(e.review_count,10);return Number.isFinite(t)&&t>0?t:0})(d),j=o()(r.className,"wc-block-components-product-rating",{[i+"__product-rating"]:i,["has-text-align-"+t]:t}),w=a?Object(n.createElement)(b,{parentClassName:i}):null,_=O?Object(n.createElement)(m,{rating:g,reviews:O,parentClassName:i}):w;if(O||a)return Object(n.createElement)("div",{className:j,style:r.style},Object(n.createElement)("div",{className:"wc-block-components-product-rating__container"},_,O&&c?Object(n.createElement)(p,{reviews:O}):null))};t.default=Object(i.withProductDataContext)(g)},394:function(e,t,c){"use strict";c.r(t),c.d(t,"Block",(function(){return _}));var n=c(13),a=c.n(n),r=c(0),o=c(5),s=c.n(o),l=c(1),i=c(75),u=c(395),d=c(290),b=c(22),m=c(26),p=c(2),g=c(61),O=c(147);c(368);const j=e=>{let{product:t,className:c,style:n,textAlign:o}=e;const{id:d,permalink:g,add_to_cart:O,has_options:j,is_purchasable:w,is_in_stock:_}=t,{dispatchStoreEvent:k}=Object(i.a)(),{cartQuantity:E,addingToCart:f,addToCart:h}=Object(u.a)(d),N=Number.isFinite(E)&&E>0,v=!j&&w&&_,y=Object(b.decodeEntities)((null==O?void 0:O.description)||""),C=N?Object(l.sprintf)(
|
||||
/* translators: %s number of products in cart. */
|
||||
Object(l._n)("%d in cart","%d in cart",E,"woocommerce"),E):Object(b.decodeEntities)((null==O?void 0:O.text)||Object(l.__)("Add to cart","woocommerce")),L=v?"button":"a",x={};return v?x.onClick=async()=>{await h(),k("cart-add-item",{product:t});const{cartRedirectAfterAdd:e}=Object(p.getSetting)("productsSettings");e&&(window.location.href=m.c)}:(x.href=g,x.rel="nofollow",x.onClick=()=>{k("product-view-link",{product:t})}),Object(r.createElement)(L,a()({},x,{"aria-label":y,disabled:f,className:s()(c,"wp-block-button__link","wp-element-button","add_to_cart_button","wc-block-components-product-button__button",{loading:f,added:N},{["has-text-align-"+o]:o}),style:n}),C)},w=e=>{let{className:t,style:c}=e;return Object(r.createElement)("button",{className:s()("wp-block-button__link","wp-element-button","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder",t),style:c,disabled:!0})},_=e=>{const{className:t,textAlign:c}=e,n=Object(d.a)(e),{parentClassName:a}=Object(g.useInnerBlockLayoutContext)(),{product:o}=Object(g.useProductDataContext)();return Object(r.createElement)("div",{className:s()(t,"wp-block-button","wc-block-components-product-button",{[a+"__product-add-to-cart"]:a},{["has-text-align-"+c]:c})},o.id?Object(r.createElement)(j,{product:o,style:n.style,className:n.className}):Object(r.createElement)(w,{style:n.style,className:n.className}))};t.default=Object(O.withProductDataContext)(_)},395:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var n=c(0),a=c(4),r=c(3),o=c(22),s=c(46);const l=(e,t)=>{const c=e.find(e=>{let{id:c}=e;return c===t});return c?c.quantity:0},i=e=>{const{addItemToCart:t}=Object(a.useDispatch)(r.CART_STORE_KEY),{cartItems:c,cartIsLoading:i}=Object(s.a)(),{createErrorNotice:u,removeNotice:d}=Object(a.useDispatch)("core/notices"),[b,m]=Object(n.useState)(!1),p=Object(n.useRef)(l(c,e));return Object(n.useEffect)(()=>{const t=l(c,e);t!==p.current&&(p.current=t)},[c,e]),{cartQuantity:Number.isFinite(p.current)?p.current:0,addingToCart:b,cartIsLoading:i,addToCart:function(){let c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return m(!0),t(e,c).then(()=>{d("add-to-cart")}).catch(e=>{u(Object(o.decodeEntities)(e.message),{id:"add-to-cart",context:"wc/all-products",isDismissible:!0})}).finally(()=>{m(!1)})}}}},424:function(e,t,c){"use strict";c.d(t,"a",(function(){return a})),c(235);var n=c(26);const a=()=>n.o>1},502:function(e,t,c){"use strict";c.r(t);var n=c(0),a=c(46),r=c(61),o=c(364),s=c(366),l=c(393),i=c(339),u=c(423),d=c(394),b=c(341),m=e=>{let{product:t}=e;return Object(n.createElement)("div",{className:"cross-sells-product"},Object(n.createElement)(r.InnerBlockLayoutContextProvider,{parentName:"woocommerce/cart-cross-sells-block",parentClassName:"wp-block-cart-cross-sells-product"},Object(n.createElement)(r.ProductDataContextProvider,{isLoading:!1,product:t},Object(n.createElement)("div",null,Object(n.createElement)(o.a,{className:"",showSaleBadge:!1,productId:t.id,showProductLink:!1,saleBadgeAlign:"left",imageSizing:b.a.SINGLE,isDescendentOfQueryLoop:!1}),Object(n.createElement)(s.a,{align:"",headingLevel:3,showProductLink:!0}),Object(n.createElement)(l.Block,null),Object(n.createElement)(i.Block,{productId:t.id,align:"left"}),Object(n.createElement)(u.Block,null)),Object(n.createElement)(d.Block,null))))},p=e=>{let{products:t,columns:c}=e;const a=t.map((e,t)=>t>=c?null:Object(n.createElement)(m,{isLoading:!1,product:e,key:e.id}));return Object(n.createElement)("div",null,a)},g=c(166);t.default=e=>{let{className:t,columns:c}=e;const{crossSellsProducts:r}=Object(a.a)();return void 0===c&&(c=g.attributes.columns.default),Object(n.createElement)(p,{className:t,columns:c,products:r})}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[26],{932:function(c,o,s){"use strict";s.r(o);var n=s(520);o.default=n.a}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[26],{913:function(c,o,s){"use strict";s.r(o);var n=s(510);o.default=n.a}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[25],{931:function(c,s,e){"use strict";e.r(s);var n=e(0),t=e(56);s.default=({children:c,className:s=""})=>{const{crossSellsProducts:e,cartIsLoading:a}=Object(t.a)();return a||e.length<1?null:Object(n.createElement)("div",{className:s},c)}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[25],{912:function(c,e,s){"use strict";s.r(e);var t=s(0),l=s(49);e.default=c=>{let{children:e,className:s=""}=c;const{crossSellsProducts:n,cartIsLoading:a}=Object(l.a)();return a||n.length<1?null:Object(t.createElement)("div",{className:s},e)}}}]);
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[19],{510:function(e,t,s){"use strict";s.r(t);var c=s(0),n=s(72),r=s(4),o=s.n(r),a=s(1),i=s(322),l=s(37),m=s(12),p=s(146),b=s(5),u=s(3),E=s(412);s(411);var O=()=>{const{paymentMethods:e,isInitialized:t}=Object(i.a)(),{isCalculating:s,isProcessing:n,isAfterProcessing:r,isBeforeProcessing:o,isComplete:O,hasError:g}=Object(b.useSelect)((e=>{const t=e(u.CHECKOUT_STORE_KEY);return{isCalculating:t.isCalculating(),isProcessing:t.isProcessing(),isAfterProcessing:t.isAfterProcessing(),isBeforeProcessing:t.isBeforeProcessing(),isComplete:t.isComplete(),hasError:t.hasError()}})),j=Object(b.useSelect)((e=>e(u.PAYMENT_STORE_KEY).isExpressPaymentMethodActive()));if(!t||t&&0===Object.keys(e).length)return null;const d=n||r||o||O&&!g;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(p.a,{isLoading:s||d||j},Object(c.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--cart"},Object(c.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(c.createElement)(m.StoreNoticesContainer,{context:l.d.EXPRESS_PAYMENTS}),Object(c.createElement)(E.a,null)))),Object(c.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--cart"},Object(a.__)("Or","woocommerce")))};t.default=({className:e})=>{const{cartNeedsPayment:t}=Object(n.a)();return t?Object(c.createElement)("div",{className:o()("wc-block-cart__payment-options",e)},Object(c.createElement)(O,null)):null}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[19],{505:function(e,t,s){"use strict";s.r(t);var c=s(0),n=s(46),r=s(5),o=s.n(r),a=s(1),l=s(317),i=s(37),m=s(9),p=s(149),b=s(4),u=s(3),E=s(407);s(406);var O=()=>{const{paymentMethods:e,isInitialized:t}=Object(l.a)(),{isCalculating:s,isProcessing:n,isAfterProcessing:r,isBeforeProcessing:o,isComplete:O,hasError:g}=Object(b.useSelect)(e=>{const t=e(u.CHECKOUT_STORE_KEY);return{isCalculating:t.isCalculating(),isProcessing:t.isProcessing(),isAfterProcessing:t.isAfterProcessing(),isBeforeProcessing:t.isBeforeProcessing(),isComplete:t.isComplete(),hasError:t.hasError()}}),j=Object(b.useSelect)(e=>e(u.PAYMENT_STORE_KEY).isExpressPaymentMethodActive());if(!t||t&&0===Object.keys(e).length)return null;const d=n||r||o||O&&!g;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(p.a,{isLoading:s||d||j},Object(c.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--cart"},Object(c.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(c.createElement)(m.StoreNoticesContainer,{context:i.d.EXPRESS_PAYMENTS}),Object(c.createElement)(E.a,null)))),Object(c.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--cart"},Object(a.__)("Or","woocommerce")))};t.default=e=>{let{className:t}=e;const{cartNeedsPayment:s}=Object(n.a)();return s?Object(c.createElement)("div",{className:o()("wc-block-cart__payment-options",t)},Object(c.createElement)(O,null)):null}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[27],{934:function(c,o,s){"use strict";s.r(o);var n=s(526);o.default=n.a}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[27],{915:function(c,o,s){"use strict";s.r(o);var n=s(516);o.default=n.a}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[20],{441:function(c,e,a){"use strict";var n=a(0),s=a(4),t=a.n(s);const o=Object(n.forwardRef)((({children:c,className:e=""},a)=>Object(n.createElement)("div",{ref:a,className:t()("wc-block-components-main",e)},c)));e.a=o},478:function(c,e,a){"use strict";a.r(e);var n=a(0),s=a(441),t=a(4),o=a.n(t);e.default=({children:c,className:e})=>Object(n.createElement)(s.a,{className:o()("wc-block-cart__main",e)},c)}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[20],{438:function(e,c,a){"use strict";var n=a(0),t=a(5),s=a.n(t);const r=Object(n.forwardRef)((e,c)=>{let{children:a,className:t=""}=e;return Object(n.createElement)("div",{ref:c,className:s()("wc-block-components-main",t)},a)});c.a=r},473:function(e,c,a){"use strict";a.r(c);var n=a(0),t=a(438),s=a(5),r=a.n(s);c.default=e=>{let{children:c,className:a}=e;return Object(n.createElement)(t.a,{className:r()("wc-block-cart__main",a)},c)}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[28],{929:function(c,a,e){"use strict";e.r(a);var s=e(0),n=e(704),l=e(4),o=e.n(l);a.default=({children:c,className:a})=>Object(s.createElement)(n.a,{className:o()("wc-block-cart__main",a)},c)}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[28],{910:function(c,e,a){"use strict";a.r(e);var n=a(0),s=a(689),t=a(4),l=a.n(t);e.default=c=>{let{children:e,className:a}=c;return Object(n.createElement)(s.a,{className:l()("wc-block-cart__main",a)},e)}}}]);
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[21],{44:function(r,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return u}));var t=e(9);function u(r,n,e){var u=this,c=Object(t.useRef)(null),i=Object(t.useRef)(0),a=Object(t.useRef)(null),f=Object(t.useRef)([]),o=Object(t.useRef)(),s=Object(t.useRef)(),l=Object(t.useRef)(r),b=Object(t.useRef)(!0);Object(t.useEffect)((function(){l.current=r}),[r]);var m=!n&&0!==n&&"undefined"!=typeof window;if("function"!=typeof r)throw new TypeError("Expected a function");n=+n||0;var j=!!(e=e||{}).leading,O=!("trailing"in e)||!!e.trailing,d="maxWait"in e,v=d?Math.max(+e.maxWait||0,n):null;Object(t.useEffect)((function(){return b.current=!0,function(){b.current=!1}}),[]);var w=Object(t.useMemo)((function(){var r=function(r){var n=f.current,e=o.current;return f.current=o.current=null,i.current=r,s.current=l.current.apply(e,n)},e=function(r,n){m&&cancelAnimationFrame(a.current),a.current=m?requestAnimationFrame(r):setTimeout(r,n)},t=function(r){if(!b.current)return!1;var e=r-c.current;return!c.current||e>=n||e<0||d&&r-i.current>=v},w=function(n){return a.current=null,O&&f.current?r(n):(f.current=o.current=null,s.current)},p=function r(){var u=Date.now();if(t(u))return w(u);if(b.current){var a=n-(u-c.current),f=d?Math.min(a,v-(u-i.current)):a;e(r,f)}},R=function(){var l=Date.now(),m=t(l);if(f.current=[].slice.call(arguments),o.current=u,c.current=l,m){if(!a.current&&b.current)return i.current=c.current,e(p,n),j?r(c.current):s.current;if(d)return e(p,n),r(c.current)}return a.current||e(p,n),s.current};return R.cancel=function(){a.current&&(m?cancelAnimationFrame(a.current):clearTimeout(a.current)),i.current=0,f.current=c.current=o.current=a.current=null},R.isPending=function(){return!!a.current},R.flush=function(){return a.current?w(Date.now()):s.current},R}),[j,d,n,v,O,m]);return w}function c(r,n){return r===n}function i(r){return"function"==typeof r?function(){return r}:r}function a(r,n,e){var a,f,o=e&&e.equalityFn||c,s=(a=Object(t.useState)(i(r)),f=a[1],[a[0],Object(t.useCallback)((function(r){return f(i(r))}),[])]),l=s[0],b=s[1],m=u(Object(t.useCallback)((function(r){return b(r)}),[b]),n,e),j=Object(t.useRef)(r);return o(j.current,r)||(m(r),j.current=r),[l,m]}},519:function(r,n,e){"use strict";e.r(n);var t=e(0),u=e(72),c=e(506);n.default=({className:r})=>{const{cartItems:n,cartIsLoading:e}=Object(u.a)();return Object(t.createElement)(c.a,{className:r,lineItems:n,isLoading:e})}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[21],{514:function(r,n,e){"use strict";e.r(n);var t=e(0),u=e(46),c=e(501);n.default=r=>{let{className:n}=r;const{cartItems:e,cartIsLoading:i}=Object(u.a)();return Object(t.createElement)(c.a,{className:n,lineItems:e,isLoading:i})}},55:function(r,n,e){"use strict";e.d(n,"a",(function(){return u}));var t=e(8);function u(r,n,e){var u=this,c=Object(t.useRef)(null),i=Object(t.useRef)(0),a=Object(t.useRef)(null),f=Object(t.useRef)([]),o=Object(t.useRef)(),s=Object(t.useRef)(),l=Object(t.useRef)(r),b=Object(t.useRef)(!0);l.current=r;var m=!n&&0!==n&&"undefined"!=typeof window;if("function"!=typeof r)throw new TypeError("Expected a function");n=+n||0;var j=!!(e=e||{}).leading,O=!("trailing"in e)||!!e.trailing,v="maxWait"in e,d=v?Math.max(+e.maxWait||0,n):null;return Object(t.useEffect)((function(){return b.current=!0,function(){b.current=!1}}),[]),Object(t.useMemo)((function(){var r=function(r){var n=f.current,e=o.current;return f.current=o.current=null,i.current=r,s.current=l.current.apply(e,n)},e=function(r,n){m&&cancelAnimationFrame(a.current),a.current=m?requestAnimationFrame(r):setTimeout(r,n)},t=function(r){if(!b.current)return!1;var e=r-c.current,t=r-i.current;return!c.current||e>=n||e<0||v&&t>=d},w=function(n){return a.current=null,O&&f.current?r(n):(f.current=o.current=null,s.current)},p=function(){var r=Date.now();if(t(r))return w(r);if(b.current){var u=r-c.current,a=r-i.current,f=n-u,o=v?Math.min(f,d-a):f;e(p,o)}},R=function(){for(var l=[],m=0;m<arguments.length;m++)l[m]=arguments[m];var O=Date.now(),d=t(O);if(f.current=l,o.current=u,c.current=O,d){if(!a.current&&b.current)return i.current=c.current,e(p,n),j?r(c.current):s.current;if(v)return e(p,n),r(c.current)}return a.current||e(p,n),s.current};return R.cancel=function(){a.current&&(m?cancelAnimationFrame(a.current):clearTimeout(a.current)),i.current=0,f.current=c.current=o.current=a.current=null},R.isPending=function(){return!!a.current},R.flush=function(){return a.current?w(Date.now()):s.current},R}),[j,v,n,d,O,m])}},85:function(r,n,e){"use strict";e.d(n,"a",(function(){return a}));var t=e(8),u=e(55);function c(r,n){return r===n}function i(r){return"function"==typeof r?function(){return r}:r}function a(r,n,e){var a=e&&e.equalityFn||c,f=function(r){var n=Object(t.useState)(i(r)),e=n[0],u=n[1];return[e,Object(t.useCallback)((function(r){return u(i(r))}),[])]}(r),o=f[0],s=f[1],l=Object(u.a)(Object(t.useCallback)((function(r){return s(r)}),[s]),n,e),b=Object(t.useRef)(r);return a(b.current,r)||(l(r),b.current=r),[o,l]}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[29],{930:function(c,o,s){"use strict";s.r(o);var n=s(481);o.default=n.a}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[29],{911:function(c,o,s){"use strict";s.r(o);var n=s(472);o.default=n.a}}]);
|
||||
@@ -1,2 +1,3 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[22],{113:function(e,t,c){"use strict";var a=c(0),n=c(147),o=c(4),r=c.n(o);c(222);const l=e=>({thousandSeparator:null==e?void 0:e.thousandSeparator,decimalSeparator:null==e?void 0:e.decimalSeparator,fixedDecimalScale:!0,prefix:null==e?void 0:e.prefix,suffix:null==e?void 0:e.suffix,isNumericString:!0});t.a=({className:e,value:t,currency:c,onValueChange:o,displayType:s="text",...i})=>{var u;const m="string"==typeof t?parseInt(t,10):t;if(!Number.isFinite(m))return null;const b=m/10**c.minorUnit;if(!Number.isFinite(b))return null;const p=r()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",e),d=null!==(u=i.decimalScale)&&void 0!==u?u:null==c?void 0:c.minorUnit,v={...i,...l(c),decimalScale:d,value:void 0,currency:void 0,onValueChange:void 0},f=o?e=>{const t=+e.value*10**c.minorUnit;o(t)}:()=>{};return Object(a.createElement)(n.a,{className:p,displayType:s,...v,value:b,onValueChange:f})}},222:function(e,t){},382:function(e,t){},449:function(e,t,c){"use strict";var a=c(0),n=c(1),o=c(4),r=c.n(o),l=c(113),s=c(12),i=c(72),u=c(2),m=c(39);c(382),t.a=({currency:e,values:t,className:c})=>{const o=Object(u.getSetting)("taxesEnabled",!0)&&Object(u.getSetting)("displayCartPricesIncludingTax",!1),{total_price:b,total_tax:p,tax_lines:d}=t,{receiveCart:v,...f}=Object(i.a)(),j=Object(s.applyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(n.__)("Total","woocommerce"),extensions:f.extensions,arg:{cart:f}}),O=parseInt(p,10),g=d&&d.length>0?Object(n.sprintf)(/* translators: %s is a list of tax rates */
|
||||
Object(n.__)("Including %s","woocommerce"),d.map((({name:t,price:c})=>`${Object(m.formatPrice)(c,e)} ${t}`)).join(", ")):Object(n.__)("Including <TaxAmount/> in taxes","woocommerce");return Object(a.createElement)(s.TotalsItem,{className:r()("wc-block-components-totals-footer-item",c),currency:e,label:j,value:parseInt(b,10),description:o&&0!==O&&Object(a.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(a.createInterpolateElement)(g,{TaxAmount:Object(a.createElement)(l.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:e,value:O})}))})}},522:function(e,t,c){"use strict";c.r(t);var a=c(0),n=c(449),o=c(39),r=c(72),l=c(12);const s=()=>{const{extensions:e,receiveCart:t,...c}=Object(r.a)(),n={extensions:e,cart:c,context:"woocommerce/cart"};return Object(a.createElement)(l.ExperimentalOrderMeta.Slot,{...n})};t.default=({children:e,className:t=""})=>{const{cartTotals:c}=Object(r.a)(),l=Object(o.getCurrencyFromPriceResponse)(c);return Object(a.createElement)("div",{className:t},e,Object(a.createElement)("div",{className:"wc-block-components-totals-wrapper"},Object(a.createElement)(n.a,{currency:l,values:c})),Object(a.createElement)(s,null))}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[22],{117:function(e,t,c){"use strict";var n=c(13),a=c.n(n),o=c(0),r=c(150),l=c(5),s=c.n(l);c(222);const i=e=>({thousandSeparator:null==e?void 0:e.thousandSeparator,decimalSeparator:null==e?void 0:e.decimalSeparator,fixedDecimalScale:!0,prefix:null==e?void 0:e.prefix,suffix:null==e?void 0:e.suffix,isNumericString:!0});t.a=e=>{var t;let{className:c,value:n,currency:l,onValueChange:u,displayType:m="text",...b}=e;const p="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(p))return null;const d=p/10**l.minorUnit;if(!Number.isFinite(d))return null;const v=s()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",c),f=null!==(t=b.decimalScale)&&void 0!==t?t:null==l?void 0:l.minorUnit,j={...b,...i(l),decimalScale:f,value:void 0,currency:void 0,onValueChange:void 0},O=u?e=>{const t=+e.value*10**l.minorUnit;u(t)}:()=>{};return Object(o.createElement)(r.a,a()({className:v,displayType:m},j,{value:d,onValueChange:O}))}},222:function(e,t){},379:function(e,t){},446:function(e,t,c){"use strict";var n=c(0),a=c(1),o=c(5),r=c.n(o),l=c(117),s=c(9),i=c(46),u=c(2),m=c(39);c(379),t.a=e=>{let{currency:t,values:c,className:o}=e;const b=Object(u.getSetting)("taxesEnabled",!0)&&Object(u.getSetting)("displayCartPricesIncludingTax",!1),{total_price:p,total_tax:d,tax_lines:v}=c,{receiveCart:f,...j}=Object(i.a)(),O=Object(s.applyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(a.__)("Total","woocommerce"),extensions:j.extensions,arg:{cart:j}}),g=parseInt(d,10),x=v&&v.length>0?Object(a.sprintf)(
|
||||
/* translators: %s is a list of tax rates */
|
||||
Object(a.__)("Including %s","woocommerce"),v.map(e=>{let{name:c,price:n}=e;return`${Object(m.formatPrice)(n,t)} ${c}`}).join(", ")):Object(a.__)("Including <TaxAmount/> in taxes","woocommerce");return Object(n.createElement)(s.TotalsItem,{className:r()("wc-block-components-totals-footer-item",o),currency:t,label:O,value:parseInt(p,10),description:b&&0!==g&&Object(n.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(n.createInterpolateElement)(x,{TaxAmount:Object(n.createElement)(l.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:g})}))})}},517:function(e,t,c){"use strict";c.r(t);var n=c(0),a=c(446),o=c(39),r=c(46),l=c(9);const s=()=>{const{extensions:e,receiveCart:t,...c}=Object(r.a)(),a={extensions:e,cart:c,context:"woocommerce/cart"};return Object(n.createElement)(l.ExperimentalOrderMeta.Slot,a)};t.default=e=>{let{children:t,className:c=""}=e;const{cartTotals:l}=Object(r.a)(),i=Object(o.getCurrencyFromPriceResponse)(l);return Object(n.createElement)("div",{className:c},t,Object(n.createElement)("div",{className:"wc-block-components-totals-wrapper"},Object(n.createElement)(a.a,{currency:i,values:l})),Object(n.createElement)(s,null))}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[30],{938:function(e,c,t){"use strict";t.r(c);var a=t(0),s=t(794),n=t(28),r=t(56),l=t(486);c.default=({children:e,className:c=""})=>{const{cartTotals:t}=Object(r.a)(),o=Object(n.getCurrencyFromPriceResponse)(t);return Object(a.createElement)("div",{className:c},e,Object(a.createElement)("div",{className:"wc-block-components-totals-wrapper"},Object(a.createElement)(s.a,{currency:o,values:t})),Object(a.createElement)(l.a,null))}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[30],{919:function(e,c,t){"use strict";t.r(c);var a=t(0),s=t(775),n=t(29),r=t(49),l=t(477);c.default=e=>{let{children:c,className:t=""}=e;const{cartTotals:o}=Object(r.a)(),b=Object(n.getCurrencyFromPriceResponse)(o);return Object(a.createElement)("div",{className:t},c,Object(a.createElement)("div",{className:"wc-block-components-totals-wrapper"},Object(a.createElement)(s.a,{currency:b,values:o})),Object(a.createElement)(l.a,null))}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[23],{444:function(c,e){},445:function(c,e,a){"use strict";var s=a(0),n=a(4),t=a.n(n);const o=Object(s.forwardRef)((({children:c,className:e=""},a)=>Object(s.createElement)("div",{ref:a,className:t()("wc-block-components-sidebar",e)},c)));e.a=o},480:function(c,e,a){"use strict";a.r(e);var s=a(0),n=a(4),t=a.n(n),o=a(445);a(444),e.default=({children:c,className:e=""})=>Object(s.createElement)(o.a,{className:t()("wc-block-cart__sidebar",e)},c)}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[23],{441:function(e,c){},442:function(e,c,t){"use strict";var a=t(0),n=t(5),s=t.n(n);const r=Object(a.forwardRef)((e,c)=>{let{children:t,className:n=""}=e;return Object(a.createElement)("div",{ref:c,className:s()("wc-block-components-sidebar",n)},t)});c.a=r},475:function(e,c,t){"use strict";t.r(c);var a=t(0),n=t(5),s=t.n(n),r=t(442);t(441),c.default=e=>{let{children:c,className:t=""}=e;return Object(a.createElement)(r.a,{className:s()("wc-block-cart__sidebar",t)},c)}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[31],{933:function(c,e,a){"use strict";a.r(e);var s=a(0),n=a(4),l=a.n(n),o=a(705);a(583);e.default=({children:c,className:e=""})=>Object(s.createElement)(o.a,{className:l()("wc-block-cart__sidebar",e)},c)}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[31],{914:function(c,e,a){"use strict";a.r(e);var s=a(0),n=a(4),t=a.n(n),l=a(690);a(571);e.default=c=>{let{children:e,className:a=""}=c;return Object(s.createElement)(l.a,{className:t()("wc-block-cart__sidebar",a)},e)}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[24],{440:function(e,c){},477:function(e,c,t){"use strict";t.r(c);var n=t(0),o=t(72),s=t(105);t(440),c.default=({children:e,className:c})=>{const{cartItems:t,cartIsLoading:r}=Object(o.a)();return Object(n.useEffect)((()=>{Object(s.a)("wc-blocks_render_blocks_frontend",{element:document.body.querySelector(".wp-block-woocommerce-cart")})}),[]),r||0!==t.length?null:Object(n.createElement)("div",{className:c},e)}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[24],{437:function(e,c){},472:function(e,c,t){"use strict";t.r(c);var n=t(0),o=t(46),s=t(87);t(437),c.default=e=>{let{children:c,className:t}=e;const{cartItems:l,cartIsLoading:r}=Object(o.a)();return Object(n.useEffect)(()=>{Object(s.a)("wc-blocks_render_blocks_frontend",{element:document.body.querySelector(".wp-block-woocommerce-cart")})},[]),r||0!==l.length?null:Object(n.createElement)("div",{className:t},c)}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[32],{928:function(e,c,t){"use strict";t.r(c);var o=t(0),n=t(56),s=t(214);t(584);c.default=({children:e,className:c})=>{const{cartItems:t,cartIsLoading:r}=Object(n.a)();return Object(o.useEffect)(()=>{Object(s.a)("wc-blocks_render_blocks_frontend",{element:document.body.querySelector(".wp-block-woocommerce-cart")})},[]),r||0!==t.length?null:Object(o.createElement)("div",{className:c},e)}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[32],{909:function(e,c,t){"use strict";t.r(c);var o=t(0),n=t(49),s=t(211);t(572);c.default=e=>{let{children:c,className:t}=e;const{cartItems:l,cartIsLoading:r}=Object(n.a)();return Object(o.useEffect)(()=>{Object(s.a)("wc-blocks_render_blocks_frontend",{element:document.body.querySelector(".wp-block-woocommerce-cart")})},[]),r||0!==l.length?null:Object(o.createElement)("div",{className:t},c)}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[25],{230:function(e,s){},276:function(e,s,t){"use strict";t.d(s,"b",(function(){return l})),t.d(s,"a",(function(){return o}));var a=t(0),c=t(11),n=t(4),i=t.n(n);const r=Object(a.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),l=()=>Object(a.useContext)(r),o=({children:e,className:s=""})=>{const[t,n]=(()=>{const[e,{width:s}]=Object(c.useResizeObserver)();let t="";return s>700?t="is-large":s>520?t="is-medium":s>400?t="is-small":s&&(t="is-mobile"),[e,t]})(),l={hasContainerWidth:""!==n,containerClassName:n,isMobile:"is-mobile"===n,isSmall:"is-small"===n,isMedium:"is-medium"===n,isLarge:"is-large"===n};return Object(a.createElement)(r.Provider,{value:l},Object(a.createElement)("div",{className:i()(s,n)},t,e))}},281:function(e,s,t){"use strict";var a=t(0),c=t(4),n=t.n(c),i=t(276);t(230),s.a=({children:e,className:s})=>Object(a.createElement)(i.a,{className:n()("wc-block-components-sidebar-layout",s)},e)},476:function(e,s,t){"use strict";t.r(s);var a=t(0),c=t(4),n=t.n(c),i=t(281),r=t(72),l=t(168);s.default=({children:e,className:s})=>{const{cartItems:t,cartIsLoading:c}=Object(r.a)(),{hasDarkControls:o}=Object(l.b)();return c||t.length>=1?Object(a.createElement)(i.a,{className:n()("wc-block-cart",s,{"has-dark-controls":o})},e):null}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[25],{229:function(e,t){},274:function(e,t,s){"use strict";s.d(t,"b",(function(){return l})),s.d(t,"a",(function(){return o}));var a=s(0),c=s(11),n=s(5),i=s.n(n);const r=Object(a.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),l=()=>Object(a.useContext)(r),o=e=>{let{children:t,className:s=""}=e;const[n,l]=(()=>{const[e,{width:t}]=Object(c.useResizeObserver)();let s="";return t>700?s="is-large":t>520?s="is-medium":t>400?s="is-small":t&&(s="is-mobile"),[e,s]})(),o={hasContainerWidth:""!==l,containerClassName:l,isMobile:"is-mobile"===l,isSmall:"is-small"===l,isMedium:"is-medium"===l,isLarge:"is-large"===l};return Object(a.createElement)(r.Provider,{value:o},Object(a.createElement)("div",{className:i()(s,l)},n,t))}},279:function(e,t,s){"use strict";var a=s(0),c=s(5),n=s.n(c),i=s(274);s(229),t.a=e=>{let{children:t,className:s}=e;return Object(a.createElement)(i.a,{className:n()("wc-block-components-sidebar-layout",s)},t)}},471:function(e,t,s){"use strict";s.r(t);var a=s(0),c=s(5),n=s.n(c),i=s(279),r=s(46),l=s(169);t.default=e=>{let{children:t,className:s}=e;const{cartItems:c,cartIsLoading:o}=Object(r.a)(),{hasDarkControls:m}=Object(l.b)();return o||c.length>=1?Object(a.createElement)(i.a,{className:n()("wc-block-cart",s,{"has-dark-controls":m})},t):null}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[33],{927:function(c,a,s){"use strict";s.r(a);var t=s(0),e=s(4),n=s.n(e),o=s(792),r=s(56),l=s(286);a.default=({children:c,className:a})=>{const{cartItems:s,cartIsLoading:e}=Object(r.a)(),{hasDarkControls:b}=Object(l.b)();return e||s.length>=1?Object(t.createElement)(o.a,{className:n()("wc-block-cart",a,{"has-dark-controls":b})},c):null}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[33],{908:function(c,a,t){"use strict";t.r(a);var e=t(0),s=t(4),n=t.n(s),l=t(773),o=t(49),r=t(285);a.default=c=>{let{children:a,className:t}=c;const{cartItems:s,cartIsLoading:b}=Object(o.a)(),{hasDarkControls:k}=Object(r.b)();return b||s.length>=1?Object(e.createElement)(l.a,{className:n()("wc-block-cart",t,{"has-dark-controls":k})},a):null}}}]);
|
||||
@@ -1,3 +1,5 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[26],{112:function(e,o,t){"use strict";var n=t(0),c=t(57),a=t(4),s=t.n(a),r=t(79);t(133),o.a=({className:e,showSpinner:o=!1,children:t,variant:a="contained",...p})=>{const l=s()("wc-block-components-button","wp-element-button",e,a,{"wc-block-components-button--loading":o});return Object(n.createElement)(c.a,{className:l,...p},o&&Object(n.createElement)(r.a,null),Object(n.createElement)("span",{className:"wc-block-components-button__text"},t))}},133:function(e,o){},313:function(e,o,t){"use strict";t.d(o,"a",(function(){return l}));var n=t(1),c=t(5),a=t(3),s=t(23),r=t(12),p=t(72);const l=(e="")=>{const{cartCoupons:o,cartIsLoading:t}=Object(p.a)(),{createErrorNotice:l}=Object(c.useDispatch)("core/notices"),{createNotice:u}=Object(c.useDispatch)("core/notices"),{setValidationErrors:i}=Object(c.useDispatch)(a.VALIDATION_STORE_KEY),{isApplyingCoupon:b,isRemovingCoupon:m}=Object(c.useSelect)((e=>{const o=e(a.CART_STORE_KEY);return{isApplyingCoupon:o.isApplyingCoupon(),isRemovingCoupon:o.isRemovingCoupon()}}),[l,u]),{applyCoupon:d,removeCoupon:O}=Object(c.useDispatch)(a.CART_STORE_KEY);return{appliedCoupons:o,isLoading:t,applyCoupon:o=>d(o).then((()=>(Object(r.applyCheckoutFilter)({filterName:"showApplyCouponNotice",defaultValue:!0,arg:{couponCode:o,context:e}})&&u("info",Object(n.sprintf)(/* translators: %s coupon code. */
|
||||
Object(n.__)('Coupon code "%s" has been applied to your cart.',"woocommerce"),o),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0)))).catch((e=>(i({coupon:{message:Object(s.decodeEntities)(e.message),hidden:!1}}),Promise.resolve(!1)))),removeCoupon:o=>O(o).then((()=>(Object(r.applyCheckoutFilter)({filterName:"showRemoveCouponNotice",defaultValue:!0,arg:{couponCode:o,context:e}})&&u("info",Object(n.sprintf)(/* translators: %s coupon code. */
|
||||
Object(n.__)('Coupon code "%s" has been removed from your cart.',"woocommerce"),o),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0)))).catch((o=>(l(o.message,{id:"coupon-form",context:e}),Promise.resolve(!1)))),isApplyingCoupon:b,isRemovingCoupon:m}}},384:function(e,o){},451:function(e,o,t){"use strict";var n=t(0),c=t(1),a=t(112),s=t(146),r=t(11),p=t(12),l=t(5),u=t(3),i=t(4),b=t.n(i);t(384),o.a=Object(r.withInstanceId)((({instanceId:e,isLoading:o=!1,onSubmit:t,displayCouponForm:r=!1})=>{const[i,m]=Object(n.useState)(""),[d,O]=Object(n.useState)(!r),g=`wc-block-components-totals-coupon__input-${e}`,_=b()("wc-block-components-totals-coupon__content",{"screen-reader-text":d}),{validationErrorId:j}=Object(l.useSelect)((e=>({validationErrorId:e(u.VALIDATION_STORE_KEY).getValidationErrorId(g)})));return Object(n.createElement)("div",{className:"wc-block-components-totals-coupon"},d?Object(n.createElement)("a",{role:"button",href:"#wc-block-components-totals-coupon__form",className:"wc-block-components-totals-coupon-link","aria-label":Object(c.__)("Add a coupon","woocommerce"),onClick:e=>{e.preventDefault(),O(!1)}},Object(c.__)("Add a coupon","woocommerce")):Object(n.createElement)(s.a,{screenReaderLabel:Object(c.__)("Applying coupon…","woocommerce"),isLoading:o,showSpinner:!1},Object(n.createElement)("div",{className:_},Object(n.createElement)("form",{className:"wc-block-components-totals-coupon__form",id:"wc-block-components-totals-coupon__form"},Object(n.createElement)(p.ValidatedTextInput,{id:g,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(c.__)("Enter code","woocommerce"),value:i,ariaDescribedBy:j,onChange:e=>{m(e)},focusOnMount:!0,validateOnMount:!1,showError:!1}),Object(n.createElement)(a.a,{className:"wc-block-components-totals-coupon__button",disabled:o||!i,showSpinner:o,onClick:e=>{e.preventDefault(),void 0!==t?t(i).then((e=>{e&&(m(""),O(!0))})):(m(""),O(!0))},type:"submit"},Object(c.__)("Apply","woocommerce"))),Object(n.createElement)(p.ValidationInputError,{propertyName:"coupon",elementId:g}))))}))},526:function(e,o,t){"use strict";t.r(o);var n=t(0),c=t(451),a=t(313),s=t(2),r=t(12);o.default=({className:e})=>{const o=Object(s.getSetting)("couponsEnabled",!0),{applyCoupon:t,isApplyingCoupon:p}=Object(a.a)("wc/cart");return o?Object(n.createElement)(r.TotalsWrapper,{className:e},Object(n.createElement)(c.a,{onSubmit:t,isLoading:p})):null}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[26],{148:function(e,o,t){"use strict";var n=t(13),c=t.n(n),a=t(0),s=t(74),r=t(5),p=t.n(r),l=t(116);t(223),o.a=e=>{let{className:o,showSpinner:t=!1,children:n,variant:r="contained",...i}=e;const u=p()("wc-block-components-button","wp-element-button",o,r,{"wc-block-components-button--loading":t});return Object(a.createElement)(s.a,c()({className:u},i),t&&Object(a.createElement)(l.a,null),Object(a.createElement)("span",{className:"wc-block-components-button__text"},n))}},223:function(e,o){},310:function(e,o,t){"use strict";t.d(o,"a",(function(){return l}));var n=t(1),c=t(4),a=t(3),s=t(22),r=t(9),p=t(46);const l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{cartCoupons:o,cartIsLoading:t}=Object(p.a)(),{createErrorNotice:l}=Object(c.useDispatch)("core/notices"),{createNotice:i}=Object(c.useDispatch)("core/notices"),{setValidationErrors:u}=Object(c.useDispatch)(a.VALIDATION_STORE_KEY),{isApplyingCoupon:b,isRemovingCoupon:d}=Object(c.useSelect)(e=>{const o=e(a.CART_STORE_KEY);return{isApplyingCoupon:o.isApplyingCoupon(),isRemovingCoupon:o.isRemovingCoupon()}},[l,i]),{applyCoupon:m,removeCoupon:O}=Object(c.useDispatch)(a.CART_STORE_KEY),g=o=>m(o).then(()=>(Object(r.applyCheckoutFilter)({filterName:"showApplyCouponNotice",defaultValue:!0,arg:{couponCode:o,context:e}})&&i("info",Object(n.sprintf)(
|
||||
/* translators: %s coupon code. */
|
||||
Object(n.__)('Coupon code "%s" has been applied to your cart.',"woocommerce"),o),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0))).catch(e=>(u({coupon:{message:Object(s.decodeEntities)(e.message),hidden:!1}}),Promise.resolve(!1))),_=o=>O(o).then(()=>(Object(r.applyCheckoutFilter)({filterName:"showRemoveCouponNotice",defaultValue:!0,arg:{couponCode:o,context:e}})&&i("info",Object(n.sprintf)(
|
||||
/* translators: %s coupon code. */
|
||||
Object(n.__)('Coupon code "%s" has been removed from your cart.',"woocommerce"),o),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0))).catch(o=>(l(o.message,{id:"coupon-form",context:e}),Promise.resolve(!1)));return{appliedCoupons:o,isLoading:t,applyCoupon:g,removeCoupon:_,isApplyingCoupon:b,isRemovingCoupon:d}}},381:function(e,o){},448:function(e,o,t){"use strict";var n=t(0),c=t(1),a=t(148),s=t(149),r=t(11),p=t(9),l=t(4),i=t(3),u=t(5),b=t.n(u);t(381),o.a=Object(r.withInstanceId)(e=>{let{instanceId:o,isLoading:t=!1,onSubmit:r,displayCouponForm:u=!1}=e;const[d,m]=Object(n.useState)(""),[O,g]=Object(n.useState)(!u),_="wc-block-components-totals-coupon__input-"+o,j=b()("wc-block-components-totals-coupon__content",{"screen-reader-text":O}),{validationErrorId:w}=Object(l.useSelect)(e=>({validationErrorId:e(i.VALIDATION_STORE_KEY).getValidationErrorId(_)}));return Object(n.createElement)("div",{className:"wc-block-components-totals-coupon"},O?Object(n.createElement)("a",{role:"button",href:"#wc-block-components-totals-coupon__form",className:"wc-block-components-totals-coupon-link","aria-label":Object(c.__)("Add a coupon","woocommerce"),onClick:e=>{e.preventDefault(),g(!1)}},Object(c.__)("Add a coupon","woocommerce")):Object(n.createElement)(s.a,{screenReaderLabel:Object(c.__)("Applying coupon…","woocommerce"),isLoading:t,showSpinner:!1},Object(n.createElement)("div",{className:j},Object(n.createElement)("form",{className:"wc-block-components-totals-coupon__form",id:"wc-block-components-totals-coupon__form"},Object(n.createElement)(p.ValidatedTextInput,{id:_,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(c.__)("Enter code","woocommerce"),value:d,ariaDescribedBy:w,onChange:e=>{m(e)},focusOnMount:!0,validateOnMount:!1,showError:!1}),Object(n.createElement)(a.a,{className:"wc-block-components-totals-coupon__button",disabled:t||!d,showSpinner:t,onClick:e=>{e.preventDefault(),void 0!==r?r(d).then(e=>{e&&(m(""),g(!0))}):(m(""),g(!0))},type:"submit"},Object(c.__)("Apply","woocommerce"))),Object(n.createElement)(p.ValidationInputError,{propertyName:"coupon",elementId:_}))))})},521:function(e,o,t){"use strict";t.r(o);var n=t(0),c=t(448),a=t(310),s=t(2),r=t(9);o.default=e=>{let{className:o}=e;const t=Object(s.getSetting)("couponsEnabled",!0),{applyCoupon:p,isApplyingCoupon:l}=Object(a.a)("wc/cart");return t?Object(n.createElement)(r.TotalsWrapper,{className:o},Object(n.createElement)(c.a,{onSubmit:p,isLoading:l})):null}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[34],{942:function(c,o,s){"use strict";s.r(o);var n=s(493);o.default=n.a}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[34],{923:function(c,o,s){"use strict";s.r(o);var n=s(484);o.default=n.a}}]);
|
||||
@@ -1,7 +1,13 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[27],{225:function(e,t){},227:function(e,t,o){"use strict";var c=o(0),n=o(10);const s=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=s},237:function(e,t,o){"use strict";var c=o(0),n=o(4),s=o.n(n),a=o(1),r=o(76),l=o(227);o(225);var i=({text:e,screenReaderText:t="",element:o="li",className:n="",radius:a="small",children:r=null,...l})=>{const i=o,u=s()(n,"wc-block-components-chip","wc-block-components-chip--radius-"+a),p=Boolean(t&&t!==e);return Object(c.createElement)(i,{className:u,...l},Object(c.createElement)("span",{"aria-hidden":p,className:"wc-block-components-chip__text"},e),p&&Object(c.createElement)("span",{className:"screen-reader-text"},t),r)};t.a=({ariaLabel:e="",className:t="",disabled:o=!1,onRemove:n=(()=>{}),removeOnAnyClick:u=!1,text:p,screenReaderText:b="",...m})=>{const d=u?"span":"button";if(!e){const t=b&&"string"==typeof b?b:p;e="string"!=typeof t?/* translators: Remove chip. */
|
||||
Object(a.__)("Remove","woocommerce"):Object(a.sprintf)(/* translators: %s text of the chip to remove. */
|
||||
Object(a.__)('Remove "%s"',"woocommerce"),t)}const g={"aria-label":e,disabled:o,onClick:n,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||n()}},O=u?g:{},j=u?{"aria-hidden":!0}:g;return Object(c.createElement)(i,{...m,...O,className:s()(t,"is-removable"),element:u?"button":m.element,screenReaderText:b,text:p},Object(c.createElement)(d,{className:"wc-block-components-chip__remove",...j},Object(c.createElement)(r.a,{className:"wc-block-components-chip__remove-icon",icon:l.a,size:16})))}},313:function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var c=o(1),n=o(5),s=o(3),a=o(23),r=o(12),l=o(72);const i=(e="")=>{const{cartCoupons:t,cartIsLoading:o}=Object(l.a)(),{createErrorNotice:i}=Object(n.useDispatch)("core/notices"),{createNotice:u}=Object(n.useDispatch)("core/notices"),{setValidationErrors:p}=Object(n.useDispatch)(s.VALIDATION_STORE_KEY),{isApplyingCoupon:b,isRemovingCoupon:m}=Object(n.useSelect)((e=>{const t=e(s.CART_STORE_KEY);return{isApplyingCoupon:t.isApplyingCoupon(),isRemovingCoupon:t.isRemovingCoupon()}}),[i,u]),{applyCoupon:d,removeCoupon:g}=Object(n.useDispatch)(s.CART_STORE_KEY);return{appliedCoupons:t,isLoading:o,applyCoupon:t=>d(t).then((()=>(Object(r.applyCheckoutFilter)({filterName:"showApplyCouponNotice",defaultValue:!0,arg:{couponCode:t,context:e}})&&u("info",Object(c.sprintf)(/* translators: %s coupon code. */
|
||||
Object(c.__)('Coupon code "%s" has been applied to your cart.',"woocommerce"),t),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0)))).catch((e=>(p({coupon:{message:Object(a.decodeEntities)(e.message),hidden:!1}}),Promise.resolve(!1)))),removeCoupon:t=>g(t).then((()=>(Object(r.applyCheckoutFilter)({filterName:"showRemoveCouponNotice",defaultValue:!0,arg:{couponCode:t,context:e}})&&u("info",Object(c.sprintf)(/* translators: %s coupon code. */
|
||||
Object(c.__)('Coupon code "%s" has been removed from your cart.',"woocommerce"),t),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0)))).catch((t=>(i(t.message,{id:"coupon-form",context:e}),Promise.resolve(!1)))),isApplyingCoupon:b,isRemovingCoupon:m}}},383:function(e,t){},450:function(e,t,o){"use strict";var c=o(0),n=o(1),s=o(146),a=o(237),r=o(12),l=o(2);o(383);const i={context:"summary"};t.a=({cartCoupons:e=[],currency:t,isRemovingCoupon:o,removeCoupon:u,values:p})=>{const{total_discount:b,total_discount_tax:m}=p,d=parseInt(b,10);if(!d&&0===e.length)return null;const g=parseInt(m,10),O=Object(l.getSetting)("displayCartPricesIncludingTax",!1)?d+g:d,j=Object(r.applyCheckoutFilter)({arg:i,filterName:"coupons",defaultValue:e});return Object(c.createElement)(r.TotalsItem,{className:"wc-block-components-totals-discount",currency:t,description:0!==j.length&&Object(c.createElement)(s.a,{screenReaderLabel:Object(n.__)("Removing coupon…","woocommerce"),isLoading:o,showSpinner:!1},Object(c.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},j.map((e=>Object(c.createElement)(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(n.sprintf)(/* translators: %s Coupon code. */
|
||||
Object(n.__)("Coupon: %s","woocommerce"),e.label),disabled:o,onRemove:()=>{u(e.code)},radius:"large",ariaLabel:Object(n.sprintf)(/* translators: %s is a coupon code. */
|
||||
Object(n.__)('Remove coupon "%s"',"woocommerce"),e.label)}))))),label:O?Object(n.__)("Discount","woocommerce"):Object(n.__)("Coupons","woocommerce"),value:O?-1*O:"-"})}},525:function(e,t,o){"use strict";o.r(t);var c=o(0),n=o(450),s=o(39),a=o(72),r=o(313),l=o(12);const i=()=>{const{extensions:e,receiveCart:t,...o}=Object(a.a)(),n={extensions:e,cart:o,context:"woocommerce/cart"};return Object(c.createElement)(l.ExperimentalDiscountsMeta.Slot,{...n})};t.default=({className:e})=>{const{cartTotals:t,cartCoupons:o}=Object(a.a)(),{removeCoupon:u,isRemovingCoupon:p}=Object(r.a)("wc/cart"),b=Object(s.getCurrencyFromPriceResponse)(t);return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(l.TotalsWrapper,{className:e},Object(c.createElement)(n.a,{cartCoupons:o,currency:b,isRemovingCoupon:p,removeCoupon:u,values:t})),Object(c.createElement)(i,null))}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[27],{225:function(e,t){},226:function(e,t,o){"use strict";var c=o(0),n=o(12);const s=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=s},236:function(e,t,o){"use strict";var c=o(13),n=o.n(c),s=o(0),a=o(5),r=o.n(a),l=o(1),i=o(82),u=o(226);o(225);var p=e=>{let{text:t,screenReaderText:o="",element:c="li",className:a="",radius:l="small",children:i=null,...u}=e;const p=c,b=r()(a,"wc-block-components-chip","wc-block-components-chip--radius-"+l),m=Boolean(o&&o!==t);return Object(s.createElement)(p,n()({className:b},u),Object(s.createElement)("span",{"aria-hidden":m,className:"wc-block-components-chip__text"},t),m&&Object(s.createElement)("span",{className:"screen-reader-text"},o),i)};t.a=e=>{let{ariaLabel:t="",className:o="",disabled:c=!1,onRemove:a=(()=>{}),removeOnAnyClick:b=!1,text:m,screenReaderText:d="",...g}=e;const O=b?"span":"button";if(!t){const e=d&&"string"==typeof d?d:m;t="string"!=typeof e?
|
||||
/* translators: Remove chip. */
|
||||
Object(l.__)("Remove","woocommerce"):Object(l.sprintf)(
|
||||
/* translators: %s text of the chip to remove. */
|
||||
Object(l.__)('Remove "%s"',"woocommerce"),e)}const j={"aria-label":t,disabled:c,onClick:a,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||a()}},v=b?j:{},C=b?{"aria-hidden":!0}:j;return Object(s.createElement)(p,n()({},g,v,{className:r()(o,"is-removable"),element:b?"button":g.element,screenReaderText:d,text:m}),Object(s.createElement)(O,n()({className:"wc-block-components-chip__remove"},C),Object(s.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",icon:u.a,size:16})))}},310:function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var c=o(1),n=o(4),s=o(3),a=o(22),r=o(9),l=o(46);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{cartCoupons:t,cartIsLoading:o}=Object(l.a)(),{createErrorNotice:i}=Object(n.useDispatch)("core/notices"),{createNotice:u}=Object(n.useDispatch)("core/notices"),{setValidationErrors:p}=Object(n.useDispatch)(s.VALIDATION_STORE_KEY),{isApplyingCoupon:b,isRemovingCoupon:m}=Object(n.useSelect)(e=>{const t=e(s.CART_STORE_KEY);return{isApplyingCoupon:t.isApplyingCoupon(),isRemovingCoupon:t.isRemovingCoupon()}},[i,u]),{applyCoupon:d,removeCoupon:g}=Object(n.useDispatch)(s.CART_STORE_KEY),O=t=>d(t).then(()=>(Object(r.applyCheckoutFilter)({filterName:"showApplyCouponNotice",defaultValue:!0,arg:{couponCode:t,context:e}})&&u("info",Object(c.sprintf)(
|
||||
/* translators: %s coupon code. */
|
||||
Object(c.__)('Coupon code "%s" has been applied to your cart.',"woocommerce"),t),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0))).catch(e=>(p({coupon:{message:Object(a.decodeEntities)(e.message),hidden:!1}}),Promise.resolve(!1))),j=t=>g(t).then(()=>(Object(r.applyCheckoutFilter)({filterName:"showRemoveCouponNotice",defaultValue:!0,arg:{couponCode:t,context:e}})&&u("info",Object(c.sprintf)(
|
||||
/* translators: %s coupon code. */
|
||||
Object(c.__)('Coupon code "%s" has been removed from your cart.',"woocommerce"),t),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0))).catch(t=>(i(t.message,{id:"coupon-form",context:e}),Promise.resolve(!1)));return{appliedCoupons:t,isLoading:o,applyCoupon:O,removeCoupon:j,isApplyingCoupon:b,isRemovingCoupon:m}}},380:function(e,t){},447:function(e,t,o){"use strict";var c=o(0),n=o(1),s=o(149),a=o(236),r=o(9),l=o(2);o(380);const i={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:o,isRemovingCoupon:u,removeCoupon:p,values:b}=e;const{total_discount:m,total_discount_tax:d}=b,g=parseInt(m,10);if(!g&&0===t.length)return null;const O=parseInt(d,10),j=Object(l.getSetting)("displayCartPricesIncludingTax",!1)?g+O:g,v=Object(r.applyCheckoutFilter)({arg:i,filterName:"coupons",defaultValue:t});return Object(c.createElement)(r.TotalsItem,{className:"wc-block-components-totals-discount",currency:o,description:0!==v.length&&Object(c.createElement)(s.a,{screenReaderLabel:Object(n.__)("Removing coupon…","woocommerce"),isLoading:u,showSpinner:!1},Object(c.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},v.map(e=>Object(c.createElement)(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(n.sprintf)(
|
||||
/* translators: %s Coupon code. */
|
||||
Object(n.__)("Coupon: %s","woocommerce"),e.label),disabled:u,onRemove:()=>{p(e.code)},radius:"large",ariaLabel:Object(n.sprintf)(
|
||||
/* translators: %s is a coupon code. */
|
||||
Object(n.__)('Remove coupon "%s"',"woocommerce"),e.label)})))),label:j?Object(n.__)("Discount","woocommerce"):Object(n.__)("Coupons","woocommerce"),value:j?-1*j:"-"})}},520:function(e,t,o){"use strict";o.r(t);var c=o(0),n=o(447),s=o(39),a=o(46),r=o(310),l=o(9);const i=()=>{const{extensions:e,receiveCart:t,...o}=Object(a.a)(),n={extensions:e,cart:o,context:"woocommerce/cart"};return Object(c.createElement)(l.ExperimentalDiscountsMeta.Slot,n)};t.default=e=>{let{className:t}=e;const{cartTotals:o,cartCoupons:u}=Object(a.a)(),{removeCoupon:p,isRemovingCoupon:b}=Object(r.a)("wc/cart"),m=Object(s.getCurrencyFromPriceResponse)(o);return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(l.TotalsWrapper,{className:t},Object(c.createElement)(n.a,{cartCoupons:u,currency:m,isRemovingCoupon:b,removeCoupon:p,values:o})),Object(c.createElement)(i,null))}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[35],{941:function(c,o,s){"use strict";s.r(o);var n=s(489);o.default=n.a}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[35],{922:function(c,o,s){"use strict";s.r(o);var n=s(480);o.default=n.a}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[28],{524:function(e,c,t){"use strict";t.r(c);var s=t(0),a=t(12),r=t(39),n=t(72);c.default=({className:e})=>{const{cartFees:c,cartTotals:t}=Object(n.a)(),o=Object(r.getCurrencyFromPriceResponse)(t);return Object(s.createElement)(a.TotalsWrapper,{className:e},Object(s.createElement)(a.TotalsFees,{currency:o,cartFees:c}))}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[28],{519:function(e,c,t){"use strict";t.r(c);var s=t(0),a=t(9),r=t(39),n=t(46);c.default=e=>{let{className:c}=e;const{cartFees:t,cartTotals:o}=Object(n.a)(),l=Object(r.getCurrencyFromPriceResponse)(o);return Object(s.createElement)(a.TotalsWrapper,{className:c},Object(s.createElement)(a.TotalsFees,{currency:l,cartFees:t}))}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[36],{940:function(c,o,s){"use strict";s.r(o);var n=s(488);o.default=n.a}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[36],{921:function(c,o,s){"use strict";s.r(o);var n=s(479);o.default=n.a}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[29],{511:function(t,e,c){"use strict";c.r(e);var o=c(145),s=c(0),a=c(4),l=c.n(a),n=c(1),r={content:{type:"string",default:Object(n.__)("Cart totals","woocommerce")},lock:{type:"object",default:{remove:!1,move:!1}}};e.default=Object(o.withFilteredAttributes)(r)((({className:t,content:e=""})=>Object(s.createElement)("span",{className:l()(t,"wc-block-cart__totals-title")},e)))}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[29],{506:function(t,e,c){"use strict";c.r(e);var o=c(147),s=c(0),a=c(5),l=c.n(a),n=c(1),r={content:{type:"string",default:Object(n.__)("Cart totals","woocommerce")},lock:{type:"object",default:{remove:!1,move:!1}}};e.default=Object(o.withFilteredAttributes)(r)(t=>{let{className:e,content:c=""}=t;return Object(s.createElement)("span",{className:l()(e,"wc-block-cart__totals-title")},c)})}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[37],{974:function(t,e,c){"use strict";c.r(e);var o=c(61),a=c(0),s=c(4),l=c.n(s);var n=({className:t,content:e=""})=>Object(a.createElement)("span",{className:l()(t,"wc-block-cart__totals-title")},e),r=c(1),b={content:{type:"string",default:Object(r.__)("Cart totals","woocommerce")},lock:{type:"object",default:{remove:!1,move:!1}}};e.default=Object(o.withFilteredAttributes)(b)(n)}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[37],{955:function(t,e,c){"use strict";c.r(e);var o=c(67),a=c(0),s=c(4),l=c.n(s);var n=t=>{let{className:e,content:c=""}=t;return Object(a.createElement)("span",{className:l()(e,"wc-block-cart__totals-title")},c)},r=c(1),b={content:{type:"string",default:Object(r.__)("Cart totals","woocommerce")},lock:{type:"object",default:{remove:!1,move:!1}}};e.default=Object(o.withFilteredAttributes)(b)(n)}}]);
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[38],{943:function(t,c,e){"use strict";e.r(c);var s=e(61),i=e(491),o=e(490);c.default=Object(s.withFilteredAttributes)(o.a)(i.a)}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[38],{924:function(t,c,e){"use strict";e.r(c);var s=e(67),i=e(482),o=e(481);c.default=Object(s.withFilteredAttributes)(o.a)(i.a)}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[31],{523:function(e,c,t){"use strict";t.r(c);var a=t(0),s=t(12),r=t(39),n=t(72);c.default=({className:e=""})=>{const{cartTotals:c}=Object(n.a)(),t=Object(r.getCurrencyFromPriceResponse)(c);return Object(a.createElement)(s.TotalsWrapper,{className:e},Object(a.createElement)(s.Subtotal,{currency:t,values:c}))}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[31],{518:function(e,c,t){"use strict";t.r(c);var a=t(0),s=t(9),r=t(39),n=t(46);c.default=e=>{let{className:c=""}=e;const{cartTotals:t}=Object(n.a)(),o=Object(r.getCurrencyFromPriceResponse)(t);return Object(a.createElement)(s.TotalsWrapper,{className:c},Object(a.createElement)(s.Subtotal,{currency:o,values:t}))}}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[39],{939:function(c,o,s){"use strict";s.r(o);var n=s(487);o.default=n.a}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[39],{920:function(c,o,s){"use strict";s.r(o);var n=s(478);o.default=n.a}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[32],{513:function(e,t,a){"use strict";a.r(t);var c=a(145),r=a(0),s=a(12),n=a(39),o=a(72),l=a(2),i={showRateAfterTaxName:{type:"boolean",default:Object(l.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{remove:!0,move:!1}}};t.default=Object(c.withFilteredAttributes)(i)((({className:e,showRateAfterTaxName:t})=>{const{cartTotals:a}=Object(o.a)();if(Object(l.getSetting)("displayCartPricesIncludingTax",!1)||parseInt(a.total_tax,10)<=0)return null;const c=Object(n.getCurrencyFromPriceResponse)(a);return Object(r.createElement)(s.TotalsWrapper,{className:e},Object(r.createElement)(s.TotalsTaxes,{showRateAfterTaxName:t,currency:c,values:a}))}))}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[32],{508:function(e,t,a){"use strict";a.r(t);var c=a(147),r=a(0),s=a(9),l=a(39),n=a(46),o=a(2),i={showRateAfterTaxName:{type:"boolean",default:Object(o.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{remove:!0,move:!1}}};t.default=Object(c.withFilteredAttributes)(i)(e=>{let{className:t,showRateAfterTaxName:a}=e;const{cartTotals:c}=Object(n.a)();if(Object(o.getSetting)("displayCartPricesIncludingTax",!1)||parseInt(c.total_tax,10)<=0)return null;const i=Object(l.getCurrencyFromPriceResponse)(c);return Object(r.createElement)(s.TotalsWrapper,{className:t},Object(r.createElement)(s.TotalsTaxes,{showRateAfterTaxName:a,currency:i,values:c}))})}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[40],{944:function(t,c,e){"use strict";e.r(c);var s=e(61),i=e(495),o=e(494);c.default=Object(s.withFilteredAttributes)(o.a)(i.a)}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[40],{925:function(t,c,e){"use strict";e.r(c);var s=e(67),i=e(486),o=e(485);c.default=Object(s.withFilteredAttributes)(o.a)(i.a)}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[33],{112:function(e,t,c){"use strict";var n=c(0),o=c(57),a=c(4),r=c.n(a),s=c(79);c(133),t.a=({className:e,showSpinner:t=!1,children:c,variant:a="contained",...u})=>{const i=r()("wc-block-components-button","wp-element-button",e,a,{"wc-block-components-button--loading":t});return Object(n.createElement)(o.a,{className:i,...u},t&&Object(n.createElement)(s.a,null),Object(n.createElement)("span",{className:"wc-block-components-button__text"},c))}},133:function(e,t){},413:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(1);const o=Object(n.__)("Proceed to Checkout","woocommerce")},446:function(e,t,c){"use strict";(function(e){var n=c(0),o=c(4),a=c.n(o),r=c(112),s=c(30),u=c(481),i=c(2),l=c(5),b=c(3),d=c(12),m=c(37),p=c(277),f=c(413);t.a=({checkoutPageId:t,className:c,buttonLabel:o})=>{const w=Object(i.getSetting)("page-"+t,!1),O=Object(l.useSelect)((e=>e(b.CHECKOUT_STORE_KEY).isCalculating())),[k,h]=Object(u.a)(),[j,v]=Object(n.useState)(!1);Object(n.useEffect)((()=>{if("function"!=typeof e.addEventListener||"function"!=typeof e.removeEventListener)return;const t=()=>{v(!1)};return e.addEventListener("pageshow",t),()=>{e.removeEventListener("pageshow",t)}}),[]);const g=Object(l.useSelect)((e=>e(b.CART_STORE_KEY).getCartData())),E=Object(d.applyCheckoutFilter)({filterName:"proceedToCheckoutButtonLabel",defaultValue:o||f.a,arg:{cart:g}}),_=Object(d.applyCheckoutFilter)({filterName:"proceedToCheckoutButtonLink",defaultValue:w||s.d,arg:{cart:g}}),{dispatchOnProceedToCheckout:y}=Object(p.b)(),C=Object(n.createElement)(r.a,{className:"wc-block-cart__submit-button",href:_,disabled:O,onClick:e=>{y().then((t=>{t.some(m.b)?e.preventDefault():v(!0)}))},showSpinner:j},E),N=Object(n.useMemo)((()=>getComputedStyle(document.body).backgroundColor),[]);return Object(n.createElement)("div",{className:a()("wc-block-cart__submit",c)},k,Object(n.createElement)("div",{className:"wc-block-cart__submit-container"},C),"below"===h&&Object(n.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky",style:{backgroundColor:N}},C))}}).call(this,c(447))},447:function(e,t){var c;c=function(){return this}();try{c=c||new Function("return this")()}catch(e){"object"==typeof window&&(c=window)}e.exports=c},481:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var n=c(0);const o={bottom:0,left:0,opacity:0,pointerEvents:"none",position:"absolute",right:0,top:0,zIndex:-1},a=()=>{const[e,t]=Object(n.useState)(""),c=Object(n.useRef)(null),a=Object(n.useRef)(new IntersectionObserver((e=>{e[0].isIntersecting?t("visible"):t(e[0].boundingClientRect.top>0?"below":"above")}),{threshold:1}));return Object(n.useLayoutEffect)((()=>{const e=c.current,t=a.current;return e&&t.observe(e),()=>{t.unobserve(e)}}),[]),[Object(n.createElement)("div",{"aria-hidden":!0,ref:c,style:o}),e]}},520:function(e,t,c){"use strict";c.r(t);var n=c(145),o=c(446),a={checkoutPageId:{type:"number",default:0},lock:{type:"object",default:{move:!0,remove:!0}},buttonLabel:{type:"string",default:c(413).a}};t.default=Object(n.withFilteredAttributes)(a)(o.a)}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[33],{148:function(e,t,c){"use strict";var n=c(13),o=c.n(n),a=c(0),r=c(74),s=c(5),u=c.n(s),i=c(116);c(223),t.a=e=>{let{className:t,showSpinner:c=!1,children:n,variant:s="contained",...l}=e;const b=u()("wc-block-components-button","wp-element-button",t,s,{"wc-block-components-button--loading":c});return Object(a.createElement)(r.a,o()({className:b},l),c&&Object(a.createElement)(i.a,null),Object(a.createElement)("span",{className:"wc-block-components-button__text"},n))}},223:function(e,t){},408:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(1);const o=Object(n.__)("Proceed to Checkout","woocommerce")},443:function(e,t,c){"use strict";(function(e){var n=c(0),o=c(5),a=c.n(o),r=c(148),s=c(26),u=c(476),i=c(2),l=c(4),b=c(3),d=c(9),m=c(37),p=c(275),f=c(408);t.a=t=>{let{checkoutPageId:c,className:o,buttonLabel:w}=t;const O=Object(i.getSetting)("page-"+c,!1),k=Object(l.useSelect)(e=>e(b.CHECKOUT_STORE_KEY).isCalculating()),[h,j]=Object(u.a)(),[v,g]=Object(n.useState)(!1);Object(n.useEffect)(()=>{if("function"!=typeof e.addEventListener||"function"!=typeof e.removeEventListener)return;const t=()=>{g(!1)};return e.addEventListener("pageshow",t),()=>{e.removeEventListener("pageshow",t)}},[]);const E=Object(l.useSelect)(e=>e(b.CART_STORE_KEY).getCartData()),_=Object(d.applyCheckoutFilter)({filterName:"proceedToCheckoutButtonLabel",defaultValue:w||f.a,arg:{cart:E}}),y=Object(d.applyCheckoutFilter)({filterName:"proceedToCheckoutButtonLink",defaultValue:O||s.d,arg:{cart:E}}),{dispatchOnProceedToCheckout:C}=Object(p.b)(),N=Object(n.createElement)(r.a,{className:"wc-block-cart__submit-button",href:y,disabled:k,onClick:e=>{C().then(t=>{t.some(m.b)?e.preventDefault():g(!0)})},showSpinner:v},_),S=Object(n.useMemo)(()=>getComputedStyle(document.body).backgroundColor,[]);return Object(n.createElement)("div",{className:a()("wc-block-cart__submit",o)},h,Object(n.createElement)("div",{className:"wc-block-cart__submit-container"},N),"below"===j&&Object(n.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky",style:{backgroundColor:S}},N))}}).call(this,c(444))},444:function(e,t){var c;c=function(){return this}();try{c=c||new Function("return this")()}catch(e){"object"==typeof window&&(c=window)}e.exports=c},476:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var n=c(0);const o={bottom:0,left:0,opacity:0,pointerEvents:"none",position:"absolute",right:0,top:0,zIndex:-1},a=()=>{const[e,t]=Object(n.useState)(""),c=Object(n.useRef)(null),a=Object(n.useRef)(new IntersectionObserver(e=>{e[0].isIntersecting?t("visible"):t(e[0].boundingClientRect.top>0?"below":"above")},{threshold:1}));return Object(n.useLayoutEffect)(()=>{const e=c.current,t=a.current;return e&&t.observe(e),()=>{t.unobserve(e)}},[]),[Object(n.createElement)("div",{"aria-hidden":!0,ref:c,style:o}),e]}},515:function(e,t,c){"use strict";c.r(t);var n=c(147),o=c(443),a={checkoutPageId:{type:"number",default:0},lock:{type:"object",default:{move:!0,remove:!0}},buttonLabel:{type:"string",default:c(408).a}};t.default=Object(n.withFilteredAttributes)(a)(o.a)}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[41],{920:function(e,t,c){"use strict";(function(e){var n=c(0),o=c(4),a=c.n(o),r=c(78),s=c(20),i=c(936),u=c(2),l=c(7),b=c(10),d=c(12),f=c(53),p=c(430),O=c(363);t.a=({checkoutPageId:t,className:c,buttonLabel:o})=>{const m=Object(u.getSetting)("page-"+t,!1),j=Object(l.useSelect)(e=>e(b.CHECKOUT_STORE_KEY).isCalculating()),[k,v]=Object(i.a)(),[h,w]=Object(n.useState)(!1);Object(n.useEffect)(()=>{if("function"!=typeof e.addEventListener||"function"!=typeof e.removeEventListener)return;const t=()=>{w(!1)};return e.addEventListener("pageshow",t),()=>{e.removeEventListener("pageshow",t)}},[]);const E=Object(l.useSelect)(e=>e(b.CART_STORE_KEY).getCartData()),g=Object(d.applyCheckoutFilter)({filterName:"proceedToCheckoutButtonLabel",defaultValue:o||O.a,arg:{cart:E}}),C=Object(d.applyCheckoutFilter)({filterName:"proceedToCheckoutButtonLink",defaultValue:m||s.f,arg:{cart:E}}),{dispatchOnProceedToCheckout:_}=Object(p.b)(),y=Object(n.createElement)(r.a,{className:"wc-block-cart__submit-button",href:C,disabled:j,onClick:e=>{_().then(t=>{t.some(f.b)?e.preventDefault():w(!0)})},showSpinner:h},g),S=Object(n.useMemo)(()=>getComputedStyle(document.body).backgroundColor,[]);return Object(n.createElement)("div",{className:a()("wc-block-cart__submit",c)},k,Object(n.createElement)("div",{className:"wc-block-cart__submit-container"},y),"below"===v&&Object(n.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky",style:{backgroundColor:S}},y))}}).call(this,c(921))},935:function(e,t,c){"use strict";c.r(t);var n=c(61),o=c(920),a=c(483);t.default=Object(n.withFilteredAttributes)(a.a)(o.a)},936:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var n=c(0);const o={bottom:0,left:0,opacity:0,pointerEvents:"none",position:"absolute",right:0,top:0,zIndex:-1},a=()=>{const[e,t]=Object(n.useState)(""),c=Object(n.useRef)(null),a=Object(n.useRef)(new IntersectionObserver(e=>{e[0].isIntersecting?t("visible"):t(e[0].boundingClientRect.top>0?"below":"above")},{threshold:1}));Object(n.useLayoutEffect)(()=>{const e=c.current,t=a.current;return e&&t.observe(e),()=>{t.unobserve(e)}},[]);return[Object(n.createElement)("div",{"aria-hidden":!0,ref:c,style:o}),e]}}}]);
|
||||
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[41],{901:function(e,t,c){"use strict";(function(e){var n=c(0),o=c(4),a=c.n(o),r=c(79),s=c(22),i=c(917),u=c(2),l=c(8),b=c(10),d=c(13),f=c(54),p=c(425),O=c(361);t.a=t=>{let{checkoutPageId:c,className:o,buttonLabel:m}=t;const j=Object(u.getSetting)("page-"+c,!1),k=Object(l.useSelect)(e=>e(b.CHECKOUT_STORE_KEY).isCalculating()),[v,h]=Object(i.a)(),[w,E]=Object(n.useState)(!1);Object(n.useEffect)(()=>{if("function"!=typeof e.addEventListener||"function"!=typeof e.removeEventListener)return;const t=()=>{E(!1)};return e.addEventListener("pageshow",t),()=>{e.removeEventListener("pageshow",t)}},[]);const g=Object(l.useSelect)(e=>e(b.CART_STORE_KEY).getCartData()),C=Object(d.applyCheckoutFilter)({filterName:"proceedToCheckoutButtonLabel",defaultValue:m||O.a,arg:{cart:g}}),_=Object(d.applyCheckoutFilter)({filterName:"proceedToCheckoutButtonLink",defaultValue:j||s.f,arg:{cart:g}}),{dispatchOnProceedToCheckout:y}=Object(p.b)(),S=Object(n.createElement)(r.a,{className:"wc-block-cart__submit-button",href:_,disabled:k,onClick:e=>{y().then(t=>{t.some(f.b)?e.preventDefault():E(!0)})},showSpinner:w},C),L=Object(n.useMemo)(()=>getComputedStyle(document.body).backgroundColor,[]);return Object(n.createElement)("div",{className:a()("wc-block-cart__submit",o)},v,Object(n.createElement)("div",{className:"wc-block-cart__submit-container"},S),"below"===h&&Object(n.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky",style:{backgroundColor:L}},S))}}).call(this,c(902))},916:function(e,t,c){"use strict";c.r(t);var n=c(67),o=c(901),a=c(474);t.default=Object(n.withFilteredAttributes)(a.a)(o.a)},917:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var n=c(0);const o={bottom:0,left:0,opacity:0,pointerEvents:"none",position:"absolute",right:0,top:0,zIndex:-1},a=()=>{const[e,t]=Object(n.useState)(""),c=Object(n.useRef)(null),a=Object(n.useRef)(new IntersectionObserver(e=>{e[0].isIntersecting?t("visible"):t(e[0].boundingClientRect.top>0?"below":"above")},{threshold:1}));Object(n.useLayoutEffect)(()=>{const e=c.current,t=a.current;return e&&t.observe(e),()=>{t.unobserve(e)}},[]);return[Object(n.createElement)("div",{"aria-hidden":!0,ref:c,style:o}),e]}}}]);
|
||||
Reference in New Issue
Block a user